PageSourceSearch

https://dashboard.privion-agents.ai/assets/index-CTG57S2v.js

js privion-agents.ai collected 2026-10-05 12:26:32 UTC 2,483,065 bytes, 1,586 lines download raw bytes

vendor: 4,181 bytes, lines 1-9
1var bue=Object.defineProperty;var EL=e=>{throw TypeError(e)};var wue=(e,t,n)=>t in e?bue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Nf=(e,t,n)=>wue(e,typeof t!="symbol"?t+"":t,n),$k=(e,t,n)=>t.has(e)||EL("Cannot "+n);var re=(e,t,n)=>($k(e,t,"read from private field"),n?n.call(e):t.get(e)),Je=(e,t,n)=>t.has(e)?EL("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Be=(e,t,n,r)=>($k(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),xt=(e,t,n)=>($k(e,t,"access private method"),n);var fv=(e,t,n,r)=>({set _(a){Be(e,t,a,n)},get _(){return re(e,t,r)}});function jue(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var hv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fk={exports:{}},Bp={},zk={exports:{}},Vt={};/**
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 PL;function Nue(){if(PL)return Vt;PL=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function m(V){return V===null||typeof V!="object"?null:(V=f&&V[f]||V["@@iterator"],typeof V=="function"?V:null)}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,y={};function x(V,K,W){this.props=V,this.context=K,this.refs=y,this.updater=W||p}x.prototype.isReactComponent={},x.prototype.setState=function(V,K){if(typeof V!="object"&&typeof V!="function"&&V!=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,V,K,"setState")},x.prototype.forceUpdate=function(V){this.updater.enqueueForceUpdate(this,V,"forceUpdate")};function w(){}w.prototype=x.prototype;function N(V,K,W){this.props=V,this.context=K,this.refs=y,this.updater=W||p}var S=N.prototype=new w;S.constructor=N,v(S,x.prototype),S.isPureReactComponent=!0;var _=Array.isArray,k=Object.prototype.hasOwnProperty,C={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function O(V,K,W){var ie,ve={},ge=null,J=null;if(K!=null)for(ie in K.ref!==void 0&&(J=K.ref),K.key!==void 0&&(ge=""+K.key),K)k.call(K,ie)&&!E.hasOwnProperty(ie)&&(ve[ie]=K[ie]);var ne=arguments.length-2;if(ne===1)ve.children=W;else if(1<ne){for(var Z=Array(ne),oe=0;oe<ne;oe++)Z[oe]=arguments[oe+2];ve.children=Z}if(V&&V.defaultProps)for(ie in ne=V.defaultProps,ne)ve[ie]===void 0&&(ve[ie]=ne[ie]);return{$$typeof:e,type:V,key:ge,ref:J,props:ve,_owner:C.current}}function P(V,K){return{$$typeof:e,type:V.type,key:K,ref:V.ref,props:V.props,_owner:V._owner}}
vendor: 5,088 bytes, lines 9-17
9function R(V){return typeof V=="object"&&V!==null&&V.$$typeof===e}function T(V){var K={"=":"=0",":":"=2"};return"$"+V.replace(/[=:]/g,function(W){return K[W]})}var D=/\/+/g;function z(V,K){return typeof V=="object"&&V!==null&&V.key!=null?T(""+V.key):K.toString(36)}function I(V,K,W,ie,ve){var ge=typeof V;(ge==="undefined"||ge==="boolean")&&(V=null);var J=!1;if(V===null)J=!0;else switch(ge){case"string":case"number":J=!0;break;case"object":switch(V.$$typeof){case e:case t:J=!0}}if(J)return J=V,ve=ve(J),V=ie===""?"."+z(J,0):ie,_(ve)?(W="",V!=null&&(W=V.replace(D,"$&/")+"/"),I(ve,K,W,"",function(oe){return oe})):ve!=null&&(R(ve)&&(ve=P(ve,W+(!ve.key||J&&J.key===ve.key?"":(""+ve.key).replace(D,"$&/")+"/")+V)),K.push(ve)),1;if(J=0,ie=ie===""?".":ie+":",_(V))for(var ne=0;ne<V.length;ne++){ge=V[ne];var Z=ie+z(ge,ne);J+=I(ge,K,W,Z,ve)}else if(Z=m(V),typeof Z=="function")for(V=Z.call(V),ne=0;!(ge=V.next()).done;)ge=ge.value,Z=ie+z(ge,ne++),J+=I(ge,K,W,Z,ve);else if(ge==="object")throw K=String(V),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return J}function F(V,K,W){if(V==null)return V;var ie=[],ve=0;return I(V,ie,"","",function(ge){return K.call(W,ge,ve++)}),ie}function U(V){if(V._status===-1){var K=V._result;K=K(),K.then(function(W){(V._status===0||V._status===-1)&&(V._status=1,V._result=W)},function(W){(V._status===0||V._status===-1)&&(V._status=2,V._result=W)}),V._status===-1&&(V._status=0,V._result=K)}if(V._status===1)return V._result.default;throw V._result}var H={current:null},q={transition:null},B={ReactCurrentDispatcher:H,ReactCurrentBatchConfig:q,ReactCurrentOwner:C};function L(){throw Error("act(...) is not supported in production builds of React.")}return Vt.Children={map:F,forEach:function(V,K,W){F(V,function(){K.apply(this,arguments)},W)},count:function(V){var K=0;return F(V,function(){K++}),K},toArray:function(V){return F(V,function(K){return K})||[]},only:function(V){if(!R(V))throw Error("React.Children.only expected to receive a single React element child.");return V}},Vt.Component=x,Vt.Fragment=n,Vt.Profiler=a,Vt.PureComponent=N,Vt.StrictMode=r,Vt.Suspense=c,Vt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,Vt.act=L,Vt.cloneElement=function(V,K,W){if(V==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+V+".");var ie=v({},V.props),ve=V.key,ge=V.ref,J=V._owner;if(K!=null){if(K.ref!==void 0&&(ge=K.ref,J=C.current),K.key!==void 0&&(ve=""+K.key),V.type&&V.type.defaultProps)var ne=V.type.defaultProps;for(Z in K)k.call(K,Z)&&!E.hasOwnProperty(Z)&&(ie[Z]=K[Z]===void 0&&ne!==void 0?ne[Z]:K[Z])}var Z=arguments.length-2;if(Z===1)ie.children=W;else if(1<Z){ne=Array(Z);for(var oe=0;oe<Z;oe++)ne[oe]=arguments[oe+2];ie.children=ne}return{$$typeof:e,type:V.type,key:ve,ref:ge,props:ie,_owner:J}},Vt.createContext=function(V){return V={$$typeof:o,_currentValue:V,_currentValue2:V,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},V.Provider={$$typeof:i,_context:V},V.Consumer=V},Vt.createElement=O,Vt.createFactory=function(V){var K=O.bind(null,V);return K.type=V,K},Vt.createRef=function(){return{current:null}},Vt.forwardRef=function(V){return{$$typeof:l,render:V}},Vt.isValidElement=R,Vt.lazy=function(V){return{$$typeof:d,_payload:{_status:-1,_result:V},_init:U}},Vt.memo=function(V,K){return{$$typeof:u,type:V,compare:K===void 0?null:K}},Vt.startTransition=function(V){var K=q.transition;q.transition={};try{V()}finally{q.transition=K}},Vt.unstable_act=L,Vt.useCallback=function(V,K){return H.current.useCallback(V,K)},Vt.useContext=function(V){return H.current.useContext(V)},Vt.useDebugValue=function(){},Vt.useDeferredValue=function(V){return H.current.useDeferredValue(V)},Vt.useEffect=function(V,K){return H.current.useEffect(V,K)},Vt.useId=function(){return H.current.useId()},Vt.useImperativeHandle=function(V,K,W){return H.current.useImperativeHandle(V,K,W)},Vt.useInsertionEffect=function(V,K){return H.current.useInsertionEffect(V,K)},Vt.useLayoutEffect=function(V,K){return H.current.useLayoutEffect(V,K)},Vt.useMemo=function(V,K){return H.current.useMemo(V,K)},Vt.useReducer=function(V,K,W){return H.current.useReducer(V,K,W)},Vt.useRef=function(V){return H.current.useRef(V)},Vt.useState=function(V){return H.current.useState(V)},Vt.useSyncExternalStore=function(V,K,W){return H.current.useSyncExternalStore(V,K,W)},Vt.useTransition=function(){return H.current.useTransition()},Vt.version="18.3.1",Vt}var TL;function uy(){return TL||(TL=1,zk.exports=Nue()),zk.exports}/**
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 IL;function Sue(){if(IL)return Bp;IL=1;var e=uy(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INT
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var d,f={},m=null,p=null;u!==void 0&&(m=""+u),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(p=c.ref);for(d in c)r.call(c,d)&&!i.hasOwnProperty(d)&&(f[d]=c[d]);if(l&&l.defaultProps)for(d in c=l.defaultProps,c)f[d]===void 0&&(f[d]=c[d]);return{$$typeof:t,type:l,key:m,ref:p,props:f,_owner:a.current}}return Bp.Fragment=n,Bp.jsx=o,Bp.jsxs=o,Bp}var OL;function kue(){return OL||(OL=1,Fk.exports=Sue()),Fk.exports}var s=kue();const Rt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Uu="8.55.2",an=globalThis;function Dj(e,t,n){const r=n||an,a=r.__SENTRY__=r.__SENTRY__||{},i=a[Uu]=a[Uu]||{};return i[e]||(i[e]=t())}const Lc=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Cue="Sentry Logger ",vP=["debug","info","warn","error","log","assert","trace"],Ub={};function _d(e){if(!("console"in an))return e();const t=an.console,n={},r=Object.keys(Ub);r.forEach(a=>{const i=Ub[a];n[a]=t[a],t[a]=i});try{return e()}finally{r.forEach(a=>{t[a]=n[a]})}}function _ue(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Lc?vP.forEach(n=>{t[n]=(...r)=>{e&&_d(()=>{an.console[n](`${Cue}[${n}]:`,...r)})}}):vP.forEach(n=>{t[n]=()=>{}}),t}const We=Dj("logger",_ue),wW=50,sd="?",ML=/\(error: (.*)\)/,RL=/captureMessage|captureException/;function jW(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,a=0)=>{const i=[],o=n.split(`
18`);for(let l=r;l<o.length;l++){const c=o[l];if(c.length>1024)continue;const u=ML.test(c)?c.replace(ML,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const f=d(u);if(f){i.push(f);break}}if(i.length>=wW+a)break}}return Eue(i.slice(a))}}function Aue(e){return Array.isArray(e)?jW(...e):e}function Eue(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(mv(t).function||"")&&t.pop(),t.reverse(),RL.test(mv(t).function||"")&&(t.pop(),RL.test(mv(t).function||"")&&t.pop()),t.slice(0,wW).map(n=>({...n,filename:n.filename||mv(t).filename,function:n.function||sd}))}function mv(e){return e[e.length-1]||{}}const Bk="<anonymous>";function il(e){try{return!e||typeof e!="function"?Bk:e.name||Bk}catch{return Bk}}function DL(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const bb={},LL={};function $c(e,t){bb[e]=bb[e]||[],bb[e].push(t)}function Fc(e,t){if(!LL[e]){LL[e]=!0;try{t()}catch(n){Lc&&We.error(`Error while instrumenting ${e}`,n)}}}function Za(e,t){const n=e&&bb[e];if(n)for(const r of n)try{r(t)}catch(a){Lc&&We.error(`Error while triggering instrumentation handler.
19Type: ${e}
20Name: ${il(r)}
21Error:`,a)}}let Uk=null;function NW(e){const t="error";$c(t,e),Fc(t,Pue)}function Pue(){Uk=an.onerror,an.onerror=function(e,t,n,r,a){return Za("error",{column:r,error:a,line:n,msg:e,url:t}),Uk?Uk.apply(this,arguments):!1},an.onerror.__SENTRY_INSTRUMENTED__=!0}let Hk=null;function SW(e){const t="unhandledrejection";$c(t,e),Fc(t,Tue)}function Tue(){Hk=an.onunhandledrejection,an.onunhandledrejection=function(e){return Za("unhandledrejection",e),Hk?Hk.apply(this,arguments):!0},an.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ad(){return tO(an),an}function tO(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Uu,t[Uu]=t[Uu]||{}}const kW=Object.prototype.toString;function nO(e){switch(kW.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ol(e,Error)}}function Am(e,t){return kW.call(e)===`[object ${t}]`}function CW(e){return Am(e,"ErrorEvent")}function $L(e){return Am(e,"DOMError")}function Iue(e){return Am(e,"DOMException")}function Jo(e){return Am(e,"String")}function rO(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function sO(e){return e===null||rO(e)||typeof e!="object"&&typeof e!="function"}function Ph(e){return Am(e,"Object")}function Lj(e){return typeof Event<"u"&&ol(e,Event)}function Oue(e){return typeof Element<"u"&&ol(e,Element)}function Mue(e){return Am(e,"RegExp")}function $j(e){return!!(e&&e.then&&typeof e.then=="function")}
21function Rue(e){return Ph(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ol(e,t){try{return e instanceof t}catch{return!1}}function _W(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}const nh=an,Due=80;function ad(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,a=[];let i=0,o=0;const l=" > ",c=l.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Due;for(;n&&i++<r&&(u=Lue(n,d),!(u==="html"||i>1&&o+a.length*c+u.length>=f));)a.push(u),o+=u.length,n=n.parentNode;return a.reverse().join(l)}catch{return"<unknown>"}}function Lue(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(nh.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=t&&t.length?t.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(a&&a.length)a.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Jo(o)){const l=o.split(/\s+/);for(const c of l)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const l=n.getAttribute(o);l&&r.push(`[${o}="${l}"]`)}return r.join("")}function $ue(){try{return nh.document.location.href}catch{return""}}function Fue(e){return nh.document&&nh.document.querySelector?nh.document.querySelector(e):null}function AW(e){if(!nh.HTMLElement)return null;let t=e;const n=5;for(let r=0;r<n;r++){if(!t)return null;if(t instanceof HTMLElement){if(t.dataset.sentryComponent)return t.dataset.sentryComponent;if(t.dataset.sentryElement)return t.dataset.sentryElement}t=t.parentNode}return null}function rh(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function FL(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const a=e[r];try{_W(a)?n.push("[VueViewModel]"):n.push(String(a))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function zue(e,t,n=!1){return Jo(e)?Mue(t)?t.test(e):Jo(t)?n?e===t:e.includes(t):!1:!1}function Hu(e,t=[],n=!1){return t.some(r=>zue(e,r,n))}function Na(e,t,n){if(!(t in e))return;const r=e[t],a=n(r);typeof a=="function"&&EW(a,r);try{e[t]=a}catch{Lc&&We.log(`Failed to replace method "${t}" in object`,e)}}function si(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Lc&&We.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function EW(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,si(e,"__sentry_original__",t)}catch{}}function aO(e){return e.__sentry_original__}function PW(e){if(nO(e))return{message:e.message,name:e.name,stack:e.stack,...BL(e)};if(Lj(e)){const t={type:e.type,target:zL(e.target),currentTarget:zL(e.currentTarget),...BL(e)};return typeof CustomEvent<"u"&&ol(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function zL(e){try{return Oue(e)?ad(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function BL(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function Bue(e,t=40){const n=Object.keys(PW(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return rh(r,t);for(let a=n.length;a>0;a--){const i=n.slice(0,a).join(", ");if(!(i.length>t))return a===n.length?i:rh(i,t)}return""}function as(e){return bP(e,new Map)}function bP(e,t){if(Uue(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const a of Object.getOwnPropertyNames(e))typeof e[a]<"u"&&(r[a]=bP(e[a],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(a=>{r.push(bP(a,t))}),r}return e}function Uue(e){if(!Ph(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const TW=1e3;function dy(){return Date.now()/TW}function Hue(){const{performance:e}=an;if(!e||!e.now)return dy;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/TW}const Ms=Hue(),sa=(()=>{const{performance:e}=an;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=a<t,o=e.timing&&e.timing.navigationStart,c=typeof o=="number"?Math.abs(o+n-r):t,u=c<t;return i||u?a<=c?e.timeOrigin:o:r})();function Ja(){const e=an,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>
vendor: 7,583 bytes, line 21
21{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function IW(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function ac(e){const{message:t,event_id:n}=e;if(t)return t;const r=IW(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function wP(e,t,n){const r=e.exception=e.exception||{},a=r.values=r.values||[],i=a[0]=a[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Th(e,t){const n=IW(e);if(!n)return;const r={type:"generic",handled:!0},a=n.mechanism;if(n.mechanism={...r,...a,...t},t&&"data"in t){const i={...a&&a.data,...t.data};n.mechanism.data=i}}function UL(e){if(que(e))return!0;try{si(e,"__sentry_captured__",!0)}catch{}return!1}function que(e){try{return e.__sentry_captured__}catch{}}var $o;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})($o||($o={}));function id(e){return new Ga(t=>{t(e)})}function Hb(e){return new Ga((t,n)=>{n(e)})}class Ga{constructor(t){Ga.prototype.__init.call(this),Ga.prototype.__init2.call(this),Ga.prototype.__init3.call(this),Ga.prototype.__init4.call(this),this._state=$o.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Ga((r,a)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){a(o)}},i=>{if(!n)a(i);else try{r(n(i))}catch(o){a(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Ga((n,r)=>{let a,i;return this.then(o=>{i=!1,a=o,t&&t()},o=>{i=!0,a=o,t&&t()}).then(()=>{if(i){r(a);return}n(a)})})}__init(){this._resolve=t=>{this._setResult($o.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult($o.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===$o.PENDING){if($j(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===$o.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===$o.RESOLVED&&n[1](this._value),this._state===$o.REJECTED&&n[2](this._value),n[0]=!0)})}}}function Vue(e){const t=Ms(),n={sid:Ja(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Gue(n)};return e&&Ih(n,e),n}function Ih(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ms(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Ja()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Wue(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Ih(e,n)}function Gue(e){return as({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}function Ac(){return Ja()}function Ec(){return Ja().substring(16)}function Fj(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&t&&Object.keys(t).length===0)return e;const r={...e};for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=Fj(r[a],t[a],n-1));return r}const jP="_sentrySpan";function Bg(e,t){t?si(e,jP,t):delete e[jP]}function qb(e){return e[jP]}const Kue=100;class iO{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Ac(),spanId:Ec()}}clone(){const t=new iO;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Bg(t,qb(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ih(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,a]=n instanceof od?[n.getScopeData(),n.getRequestSession()]:Ph(n)?[t,t.requestSession]:[],{tags:i,extra:o,user:l,contexts:c,level:u,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},l&&Object.keys(l).length&&(this._user=l),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),a&&(this._requestSession=a),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Bg(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ac()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Kue;if(r<=0)return this;const a={timestamp:dy(),...t};return this._breadcrumbs.push(a),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client&&this._client.re
21cordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:qb(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Fj(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext={spanId:Ec(),...t},this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:Ja();if(!this._client)return We.warn("No client configured on scope - will not capture exception!"),r;const a=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:a,...n,event_id:r},this),r}captureMessage(t,n,r){const a=r&&r.event_id?r.event_id:Ja();if(!this._client)return We.warn("No client configured on scope - will not capture message!"),a;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:a},this),a}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Ja();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(We.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const od=iO;function Yue(){return Dj("defaultCurrentScope",()=>new od)}function Xue(){return Dj("defaultIsolationScope",()=>new od)}class Que{constructor(t,n){let r;t?r=t:r=new od;let a;n?a=n:a=new od,this._stack=[{scope:r}],this._isolationScope=a}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(a){throw this._popScope(),a}return $j(r)?r.then(a=>(this._popScope(),a),a=>{throw this._popScope(),a}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function Oh(){const e=Ad(),t=tO(e);return t.stack=t.stack||new Que(Yue(),Xue())}function Zue(e){return Oh().withScope(e)}function Jue(e,t){const n=Oh();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function HL(e){return Oh().withScope(()=>e(Oh().getIsolationScope()))}function ede(){return{withIsolationScope:HL,withScope:Zue,withSetScope:Jue,withSetIsolationScope:(e,t)=>HL(t),getCurrentScope:()=>Oh().getScope(),getIsolationScope:()=>Oh().getIsolationScope()}}function Em(e){const t=tO(e);return t.acs?t.acs:ede()}function Kn(){const e=Ad();return Em(e).getCurrentScope()}function bl(){const e=Ad();return Em(e).getIsolationScope()}function tde(){return Dj("globalScope",()=>new od)}function oO(...e){const t=Ad(),n=Em(t);if(e.length===2){const[r,a]=e;return r?n.withSetScope(r,a):n.withScope(a)}return n.withScope(e[0])}function yn(){return Kn().getClient()}function nde(e){const t=e.getPropagationContext(),{traceId:n,spanId:r,parentSpanId:a}=t;return as({trace_id:n,span_id:r,parent_span_id:a})}const rde="_sentryMetrics";function NP(e){const t=e[rde];if(!t)return;const n={};for(const[,[r,a]]of t)(n[r]||(n[r]=[])).push(as(a));return n}const Go="sentry.source",OW="sentry.sample_rate",ld="sentry.op",Wr="sentry.origin",SP="sentry.idle_span_finish_reason",zj="sentry.measurement_unit",Bj="sentry.measurement_value",qL="sentry.custom_span_name",sde="sentry.profile_id",lO="sentry.exclusive_time",ade=0,MW=1,Br=2;function ide(e){if(e<400&&e>=100)return{code:MW};if(e>=400&&e<500)switch(e){case 401:return{code:Br,message:"unauthenticated"};case 403:return{code:Br,message:"permission_denied"};case 404:return{code:Br,message:"not_found"};case 409:return{code:Br,message:"already_exists"};case 413:return{code:Br,message:"failed_precondition"};case 429:return{code:Br,message:"resource_exhausted"};case 499:return{code:Br,message:"cancelled"};default:return{code:Br,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:Br,message:"unimplemented"};case 503:return{code:Br,message:"unavailable"};case 504:return{code:Br,message:"deadline_exceeded"};default:return{code:Br,message:"internal_error"}}return{code:Br,message:"unknown_error"}}function RW(e,t){e.setAttribute("http.response.status_code",t);const n=ide(t);n.message!=="unknown_error"&&e.setStatus(n)}const cO="sentry-",ode=/^sentry-/,lde=8192;function DW(e){const t=ude(e);if(!t)return;const n=Object.entries(t).reduce((r,[a,i])=>{if(a.match(ode)){const o=a.slice(cO.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function cde(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,a])=>(a&&(n[`${cO}${r}`]=a),n),{});return dde(t)}function ude(e){if(!(!e||!Jo(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=VL(n);return Object.entries(r).forEach(([a,i])=>{t[a]=i}),t},{}):VL(e)}function VL(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function dde(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],a)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=a===0?i:`${t},${i}`;return o.length>lde?(Lc&&We.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const LW=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function fde(e){if(!e)return;const t=e.match(LW);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function hde(e,t){const n=fde(e),r=DW(t);if(!n||!n.traceId)return{traceId:Ac(),spanId:Ec()};const{traceId:a,parentSpanId:i,parentSampled:o}=n,l=Ec();return{traceId:a,parentSpanId:i,spanId:l,sampled:o,dsc:r||{}}}function $W(e=Ac(),t=Ec(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}const FW=0,zW=1;let WL=!1;function mde(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:a,parent_span_id:i,status:o,origin:l}=mn(e);return as({parent_span_id:i,span_id:t,trace_id:n,data:r,op:a,status:o,origin:l})}function pde(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),a=r?t:mn(e).parent_span_id,i=r?Ec():t;return as({parent_span_id:a,span_id:i,trace_id:n})}function gde(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ed(e);return $W(t,n,r)}function qu(e){return typeof e=="number"?GL(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?GL(e.getTime()):Ms()}function GL(e){return e>9999999999?e/1e3:e}function mn(e){if(yde(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(xde(e)){const{attributes:r,startTime:a,name:i,endTime:o,parentSpanId:l,status:c}=e;return as({span_id:t,trace_id:n,data:r,description:i,parent_span_id:l,start_timestamp:qu(a),timestamp:qu(o)||void 0,status:BW(c),op:r[ld],origin:r[Wr],_metrics_summary:NP(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function xde(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function yde(e){return typeof e.getSpanJSON=="function"}function Ed(e){const{traceFlags:t}=e.spanContext();return t===zW}function BW(e){if(!(!e||e.code===ade))return e.code===MW?"ok":e.message||"unknown_error"}const Vu="_sentryChildSpans",kP="_sentryRootSpan";function UW(e,t){const n=e[kP]||e;si(t,kP,n),e[Vu]?e[Vu].add(t):si(e,Vu,new Set([t]))}function vde(e,t){e[Vu]&&e[Vu].delete(t)}function wb(e){const t=new Set;function n(r){if(!t.has(r)&&Ed(r)){t.add(r);const a=r[Vu]?Array.from(r[Vu]):[];for(const i of a)n(i)}}return n(e),Array.from(t)}function vs(e){return e[kP]||e}function Ns(){const e=Ad(),t=Em(e);return t.getActiveSpan?t.getActiveSpan():qb(Kn())}function HW(){WL||(_d(()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK ver
21sion 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")}),WL=!0)}let KL=!1;function bde(){KL||(KL=!0,NW(CP),SW(CP))}function CP(){const e=Ns(),t=e&&vs(e);if(t){const n="internal_error";Rt&&We.log(`[Tracing] Root span: ${n} -> Global error occurred`),t.setStatus({code:Br,message:n})}}CP.tag="sentry_tracingErrorCallback";const qW="_sentryScope",VW="_sentryIsolationScope";function wde(e,t,n){e&&(si(e,VW,n),si(e,qW,t))}function YL(e){return{scope:e[qW],isolationScope:e[VW]}}function Pc(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=yn(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Pm{constructor(t={}){this._traceId=t.traceId||Ac(),this._spanId=t.spanId||Ec()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:FW}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}const uO="production",WW="_frozenDsc";function XL(e,t){si(e,WW,t)}function GW(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},a=as({environment:n.environment||uO,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",a),a}function KW(e,t){const n=t.getPropagationContext();return n.dsc||GW(n.traceId,e)}function Tm(e){const t=yn();if(!t)return{};const n=vs(e),r=n[WW];if(r)return r;const a=n.spanContext().traceState,i=a&&a.get("sentry.dsc"),o=i&&DW(i);if(o)return o;const l=GW(e.spanContext().traceId,t),c=mn(n),u=c.data||{},d=u[OW];d!=null&&(l.sample_rate=`${d}`);const f=u[Go],m=c.description;return f!=="url"&&m&&(l.transaction=m),Pc()&&(l.sampled=String(Ed(n))),t.emit("createDsc",l,n),l}function jde(e){if(!Rt)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=mn(e),{spanId:a}=e.spanContext(),i=Ed(e),o=vs(e),l=o===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${l?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${a}`];if(r&&u.push(`parent ID: ${r}`),!l){const{op:d,description:f}=mn(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),f&&u.push(`root description: ${f}`)}We.log(`${c}
22  ${u.join(`
23  `)}`)}function Nde(e){if(!Rt)return;const{description:t="< unknown name >",op:n="< unknown op >"}=mn(e),{spanId:r}=e.spanContext(),i=vs(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;We.log(o)}function YW(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){Rt&&We.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function Sde(e,t){if(!Pc(e))return[!1];const n=bl().getScopeData().sdkProcessingMetadata.normalizedRequest,r={...t,normalizedRequest:t.normalizedRequest||n};let a;typeof e.tracesSampler=="function"?a=e.tracesSampler(r):r.parentSampled!==void 0?a=r.parentSampled:typeof e.tracesSampleRate<"u"?a=e.tracesSampleRate:a=1;const i=YW(a);return i===void 0?(Rt&&We.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):i?Math.random()<i?[!0,i]:(Rt&&We.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[!1,i]):(Rt&&We.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i])}const kde=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Cde(e){return e==="http"||e==="https"}function fy(e,t=!1){const{host:n,path:r,pass:a,port:i,projectId:o,protocol:l,publicKey:c}=e;return`${l}://${c}${t&&a?`:${a}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function _de(e){const t=kde.exec(e);if(!t){_d(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,a="",i="",o="",l=""]=t.slice(1);let c="",u=l;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return XW({host:i,pass:a,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function XW(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function Ade(e){if(!Lc)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(We.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Cde(r)?t&&isNaN(parseInt(t,10))?(We.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(We.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(We.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ede(e){const t=typeof e=="string"?_de(e):XW(e);if(!(!t||!Ade(t)))return t}function Pde(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(a){if(e)return t.has(a)?!0:(t.add(a),!1);for(let i=0;i<t.length;i++)if(t[i]===a)return!0;return t.push(a),!1}function r(a){if(e)t.delete(a);else for(let i=0;i<t.length;i++)if(t[i]===a){t.splice(i,1);break}}return[n,r]}function Fo(e,t=100,n=1/0){try{return _P("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function QW(e,t=3,n=100*1024){const r=Fo(e,t);return Mde(r)>n?QW(e,t-1,n):r}function _P(e,t,n=1/0,r=1/0,a=Pde()){const[i,o]=a;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const l=Tde(e,t);if(!l.startsWith("[object "))return l;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return l.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return _P("",p,c-1,r,a)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const m=PW(t);for(const p in m){if(!Object.prototype.hasOwnProperty.call(m,p))continue;if(f>=r){d[p]="[MaxProperties ~]";break}const v=m[p];d[p]=_P(p,v,c-1,r,a),f++}return o(t),d}function Tde(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(_W(t))return"[VueViewModel]";if(Rue(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${il(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Ide(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Ide(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Ode(e){return~-encodeURI(e).split(/%..|./).length}function Mde(e){return Ode(JSON.stringify(e))}function Im(e,t=[]){return[e,t]}function Rde(e,t){const[n,r]=e;return[n,[...r,t]]}function QL(e,t){const n=e[1];for(const r of n){const a=r[0].type;if(t(r,a))return!0}return!1}function AP(e){return an.__SENTRY__&&an.__SENTRY__.encodePolyfill?an.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Dde(e){const[t,n]=e;let r=JSON.stringify(t);function a(i){typeof r=="string"?r=typeof i=="string"?r+i:[AP(r),i]:r.push(typeof i=="string"?AP(i):i)}for(const i of n){const[o,l]=i;if(a(`
24${JSON.stringify(o)}
25`),typeof l=="string"||l instanceof Uint8Array)a(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(Fo(l))}a(c)}}return typeof r=="string"?r:Lde(r)}function Lde(e){const t=e.reduce((a,i)=>a+i.length,0),n=new Uint8Array(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n}function $de(e){return[{type:"span"},e]}
25function Fde(e){const t=typeof e.data=="string"?AP(e.data):e.data;return[as({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const zde={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};function ZL(e){return zde[e]}function ZW(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Bde(e,t,n,r){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:fy(r)},...a&&{trace:as({...a})}}}function Ude(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function Hde(e,t,n,r){const a=ZW(n),i={sent_at:new Date().toISOString(),...a&&{sdk:a},...!!r&&t&&{dsn:fy(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Im(i,[o])}function qde(e,t,n,r){const a=ZW(n),i=e.type&&e.type!=="replay_event"?e.type:"event";Ude(e,n&&n.sdk);const o=Bde(e,a,r,t);return delete e.sdkProcessingMetadata,Im(o,[[{type:i},e]])}function Vde(e,t){function n(d){return!!d.trace_id&&!!d.public_key}const r=Tm(e[0]),a=t&&t.getDsn(),i=t&&t.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&a&&{dsn:fy(a)}},l=t&&t.getOptions().beforeSendSpan,c=l?d=>{const f=l(mn(d));return f||HW(),f}:d=>mn(d),u=[];for(const d of e){const f=c(d);f&&u.push($de(f))}return Im(o,u)}function Wde(e,t,n,r=Ns()){const a=r&&vs(r);a&&(Rt&&We.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[Bj]:t,[zj]:n}))}function JL(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},a=r[zj],i=r[Bj];typeof a=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:a})}),t}const e6=1e3;class dO{constructor(t={}){this._traceId=t.traceId||Ac(),this._spanId=t.spanId||Ec(),this._startTime=t.startTimestamp||Ms(),this._attributes={},this.setAttributes({[Wr]:"manual",[ld]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?zW:FW}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=qu(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Go,"custom"),this}end(t){this._endTime||(this._endTime=qu(t),Nde(this),this._onSpanEnded())}getSpanJSON(){return as({data:this._attributes,description:this._name,op:this._attributes[ld],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:BW(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Wr],_metrics_summary:NP(this),profile_id:this._attributes[sde],exclusive_time:this._attributes[lO],measurements:JL(this._events),is_segment:this._isStandaloneSpan&&vs(this)===this||void 0,segment_id:this._isStandaloneSpan?vs(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){Rt&&We.log("[Tracing] Adding an event to span:",t);const a=t6(n)?n:r||Ms(),i=t6(n)?{}:n||{},o={name:t,time:qu(a),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=yn();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===vs(this)))return;if(this._isStandaloneSpan){this._sampled?Kde(Vde([this],t)):(Rt&&We.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(YL(this).scope||Kn()).captureEvent(r)}_convertSpanToTransaction(){if(!n6(mn(this)))return;this._name||(Rt&&We.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=YL(this),a=(t||Kn()).getClient()||yn();if(this._sampled!==!0){Rt&&We.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),a&&a.recordDroppedEvent("sample_rate","transaction");return}const o=wb(this).filter(f=>f!==this&&!Gde(f)).map(f=>mn(f)).filter(n6),l=this._attributes[Go];delete this._attributes[qL],o.forEach(f=>{f.data&&delete f.data[qL]});const c={contexts:{trace:mde(this)},spans:o.length>e6?o.sort((f,m)=>f.start_timestamp-m.start_timestamp).slice(0,e6):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...as({dynamicSamplingContext:Tm(this)})},_metrics_summary:NP(this),...l&&{transaction_info:{source:l}}},u=JL(this._events);return u&&Object.keys(u).length&&(Rt&&We.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function t6(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function n6(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Gde(e){return e instanceof dO&&e.isStandaloneSpan()}function Kde(e){const t=yn();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}const JW="__SENTRY_SUPPRESS_TRACING__";function hy(e){const t=tG();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Xde(e),{forceTransaction:r,parentSpan:a}=e;return(e.scope?o=>oO(e.scope,o):a!==void 0?o=>eG(a,o):o=>o())(()=>{const o=Kn(),l=Zde(o);return e.onlyIfParent&&!l?new Pm:Yde({parentSpan:l,spanArguments:n,forceTransaction:r,scope:o})})}function eG(e,t){const n=tG();return n.withActiveSpan?n.withActiveSpan(e,t):oO(r=>(Bg(r,e||void 0),t(r)))}function Yde({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Pc())return new Pm;const a=bl();let i;if(e&&!n)i=Qde(e,r,t),UW(e,i);else if(e){const o=Tm(e),{traceId:l,spanId:c}=e.spanContext(),u=Ed(e);i=r6({traceId:l,parentSpanId:c,...t},r,u),XL(i,o)}else{const{traceId:o,dsc:l,parentSpanId:c,sampled:u}={...a.getPropagationContext(),...r.getPropagationContext()};i=r6({traceId:o,parentSpanId:c,...t},r,u),l&&XL(i,l)}return jde(i),wde(i,r,a),i}function Xde(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=qu(e.startTime),delete r.startTime,r}return n}function tG(){const e=Ad();return Em(e)}
25function r6(e,t,n){const r=yn(),a=r&&r.getOptions()||{},{name:i="",attributes:o}=e,[l,c]=t.getScopeData().sdkProcessingMetadata[JW]?[!1]:Sde(a,{name:i,parentSampled:n,attributes:o,transactionContext:{name:i,parentSampled:n}}),u=new dO({...e,attributes:{[Go]:"custom",...e.attributes},sampled:l});return c!==void 0&&u.setAttribute(OW,c),r&&r.emit("spanStart",u),u}function Qde(e,t,n){const{spanId:r,traceId:a}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[JW]?!1:Ed(e),o=i?new dO({...n,parentSpanId:r,traceId:a,sampled:i}):new Pm({traceId:a});UW(e,o);const l=yn();return l&&(l.emit("spanStart",o),n.endTimestamp&&l.emit("spanEnd",o)),o}function Zde(e){const t=qb(e);if(!t)return;const n=yn();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?vs(t):t}const jb={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Jde="heartbeatFailed",efe="idleTimeout",tfe="finalTimeout",nfe="externalFinish";function nG(e,t={}){const n=new Map;let r=!1,a,i=nfe,o=!t.disableAutoFinish;const l=[],{idleTimeout:c=jb.idleTimeout,finalTimeout:u=jb.finalTimeout,childSpanTimeout:d=jb.childSpanTimeout,beforeSpanEnd:f}=t,m=yn();if(!m||!Pc())return new Pm;const p=Kn(),v=Ns(),y=rfe(e);y.end=new Proxy(y.end,{apply(C,E,O){f&&f(y);const[P,...R]=O,T=P||Ms(),D=qu(T),z=wb(y).filter(q=>q!==y);if(!z.length)return k(D),Reflect.apply(C,E,[D,...R]);const I=z.map(q=>mn(q).timestamp).filter(q=>!!q),F=I.length?Math.max(...I):void 0,U=mn(y).start_timestamp,H=Math.min(U?U+u/1e3:1/0,Math.max(U||-1/0,Math.min(D,F||1/0)));return k(H),Reflect.apply(C,E,[H,...R])}});function x(){a&&(clearTimeout(a),a=void 0)}function w(C){x(),a=setTimeout(()=>{!r&&n.size===0&&o&&(i=efe,y.end(C))},c)}function N(C){a=setTimeout(()=>{!r&&o&&(i=Jde,y.end(C))},d)}function S(C){x(),n.set(C,!0);const E=Ms();N(E+d/1e3)}function _(C){if(n.has(C)&&n.delete(C),n.size===0){const E=Ms();w(E+c/1e3)}}function k(C){r=!0,n.clear(),l.forEach(D=>D()),Bg(p,v);const E=mn(y),{start_timestamp:O}=E;if(!O)return;(E.data||{})[SP]||y.setAttribute(SP,i),We.log(`[Tracing] Idle span "${E.op}" finished`);const R=wb(y).filter(D=>D!==y);let T=0;R.forEach(D=>{D.isRecording()&&(D.setStatus({code:Br,message:"cancelled"}),D.end(C),Rt&&We.log("[Tracing] Cancelling span since span ended early",JSON.stringify(D,void 0,2)));const z=mn(D),{timestamp:I=0,start_timestamp:F=0}=z,U=F<=C,H=(u+c)/1e3,q=I-F<=H;if(Rt){const B=JSON.stringify(D,void 0,2);U?q||We.log("[Tracing] Discarding span since it finished after idle span final timeout",B):We.log("[Tracing] Discarding span since it happened after idle span was finished",B)}(!q||!U)&&(vde(y,D),T++)}),T>0&&y.setAttribute("sentry.idle_span_discarded_spans",T)}return l.push(m.on("spanStart",C=>{if(r||C===y||mn(C).timestamp)return;wb(y).includes(C)&&S(C.spanContext().spanId)})),l.push(m.on("spanEnd",C=>{r||_(C.spanContext().spanId)})),l.push(m.on("idleSpanEnableAutoFinish",C=>{C===y&&(o=!0,w(),n.size&&N())})),t.disableAutoFinish||w(),setTimeout(()=>{r||(y.setStatus({code:Br,message:"deadline_exceeded"}),i=tfe,y.end())},u),y}function rfe(e){const t=hy(e);return Bg(Kn(),t),Rt&&We.log("[Tracing] Started span is an idle span"),t}function EP(e,t,n,r=0){return new Ga((a,i)=>{const o=e[r];if(t===null||typeof o!="function")a(t);else{const l=o({...t},n);Rt&&o.id&&l===null&&We.log(`Event processor "${o.id}" dropped event`),$j(l)?l.then(c=>EP(e,c,n,r+1).then(a)).then(null,i):EP(e,l,n,r+1).then(a).then(null,i)}})}let pv,s6,gv;function sfe(e){const t=an._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return gv&&n.length===s6||(s6=n.length,gv=n.reduce((r,a)=>{pv||(pv={});const i=pv[a];if(i)r[i[0]]=i[1];else{const o=e(a);for(let l=o.length-1;l>=0;l--){const c=o[l],u=c&&c.filename,d=t[a];if(u&&d){r[u]=d,pv[a]=[u,d];break}}}return r},{})),gv}function afe(e,t){const{fingerprint:n,span:r,breadcrumbs:a,sdkProcessingMetadata:i}=t;ife(e,t),r&&cfe(e,r),ufe(e,n),ofe(e,a),lfe(e,i)}function a6(e,t){const{extra:n,tags:r,user:a,contexts:i,level:o,sdkProcessingMetadata:l,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:m,transactionName:p,span:v}=t;xv(e,"extra",n),xv(e,"tags",r),xv(e,"user",a),xv(e,"contexts",i),e.sdkProcessingMetadata=Fj(e.sdkProcessingMetadata,l,2),o&&(e.level=o),p&&(e.transactionName=p),v&&(e.span=v),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...m}}function xv(e,t,n){e[t]=Fj(e[t],n,1)}function ife(e,t){const{extra:n,tags:r,user:a,contexts:i,level:o,transactionName:l}=t,c=as(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=as(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=as(a);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=as(i);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),o&&(e.level=o),l&&e.type!=="transaction"&&(e.transaction=l)}function ofe(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function lfe(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function cfe(e,t){e.contexts={trace:pde(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Tm(t),...e.sdkProcessingMetadata};const n=vs(t),r=mn(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function ufe(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function dfe(e,t,n,r,a,i){const{normalizeDepth:o=3,normalizeMaxBreadth:l=1e3}=e,c={...t,event_id:t.event_id||n.event_id||Ja(),timestamp:t.timestamp||dy()},u=n.integrations||e.integrations.map(x=>x.name);ffe(c,e),pfe(c,u),a&&a.emit("applyFrameMetadata",t),t.type===void 0&&hfe(c,e.stackParser);const d=xfe(r,n.captureContext);n.mechanism&&Th(c,n.mechanism);const f=a?a.getEventProcessors():[],m=tde().getScopeData();if(i){const x=i.getScopeData();a6(m,x)}if(d){const x=d.getScopeData();a6(m,x)}const p=[...n.attachments||[],...m.attachments];p.length&&(n.attachments=p),afe(c,m);const v=[...f,...m.eventProcessors];return EP(v,c,n).then(x=>(x&&mfe(x),typeof o=="number"&&o>0?gfe(x,o,l):x))}function ffe(e,t){const{environment:n,release:r,dist:a,maxValueLength:i=250}=t;e.environment=e.environment||n||uO,!e.release&&r&&(e.release=r),!e.dist&&a&&(e.dist=a),e.message&&(e.message=rh(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=rh(o.value,i));const l=e.request;l&&l.url&&(l.url=rh(l.url,i))}function hfe(e,t){const n=sfe(t);
25try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(a=>{n&&a.filename&&(a.debug_id=n[a.filename])})})}catch{}}function mfe(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(a=>{a.debug_id&&(a.abs_path?t[a.abs_path]=a.debug_id:a.filename&&(t[a.filename]=a.debug_id),delete a.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,a])=>{n.push({type:"sourcemap",code_file:r,debug_id:a})})}function pfe(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function gfe(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(a=>({...a,...a.data&&{data:Fo(a.data,t,n)}}))},...e.user&&{user:Fo(e.user,t,n)},...e.contexts&&{contexts:Fo(e.contexts,t,n)},...e.extra&&{extra:Fo(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Fo(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(a=>({...a,...a.data&&{data:Fo(a.data,t,n)}}))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=Fo(e.contexts.flags,3,n)),r}function xfe(e,t){if(!t)return e;const n=e?e.clone():new od;return n.update(t),n}function yfe(e,t){return Kn().captureException(e,void 0)}function rG(e,t){return Kn().captureEvent(e,t)}function vfe(e,t){bl().setContext(e,t)}function bfe(){const e=yn();return!!e&&e.getOptions().enabled!==!1&&!!e.getTransport()}function i6(e){const t=yn(),n=bl(),r=Kn(),{release:a,environment:i=uO}=t&&t.getOptions()||{},{userAgent:o}=an.navigator||{},l=Vue({release:a,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),c=n.getSession();return c&&c.status==="ok"&&Ih(c,{status:"exited"}),sG(),n.setSession(l),r.setSession(l),l}function sG(){const e=bl(),t=Kn(),n=t.getSession()||e.getSession();n&&Wue(n),aG(),e.setSession(),t.setSession()}function aG(){const e=bl(),t=Kn(),n=yn(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function o6(e=!1){if(e){sG();return}aG()}const wfe="7";function jfe(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Nfe(e){return`${jfe(e)}${e.projectId}/envelope/`}function Sfe(e,t){const n={sentry_version:wfe};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function kfe(e,t,n){return t||`${Nfe(e)}?${Sfe(e,n)}`}const l6=[];function Cfe(e){const t={};return e.forEach(n=>{const{name:r}=n,a=t[r];a&&!a.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function _fe(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;const a=Cfe(r),i=a.findIndex(o=>o.name==="Debug");if(i>-1){const[o]=a.splice(i,1);a.push(o)}return a}function Afe(e,t){const n={};return t.forEach(r=>{r&&iG(e,r,n)}),n}function c6(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function iG(e,t,n){if(n[t.name]){Rt&&We.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,l6.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),l6.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(a,i)=>r(a,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),a=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(a)}Rt&&We.log(`Integration installed: ${t.name}`)}function Efe(e,t,n){const r=[{type:"client_report"},{timestamp:dy(),discarded_events:e}];return Im(t?{dsn:t}:{},[r])}
vendor: 1,883 bytes, line 25
25class Ei extends Error{constructor(t,n="warn"){super(t),this.message=t,this.logLevel=n}}const u6="Not capturing exception because it's already been captured.";class Pfe{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ede(t.dsn):Rt&&We.warn("No DSN provided, client will not send events."),this._dsn){const a=kfe(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:a})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find(a=>a in t&&t[a]==null);r&&_d(()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)})}captureException(t,n,r){const a=Ja();if(UL(t))return Rt&&We.log(u6),a;const i={event_id:a,...n};return this._process(this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(t,n,r,a){const i={event_id:Ja(),...r},o=rO(t)?t:String(t),l=sO(t)?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(l.then(c=>this._captureEvent(c,i,a))),i.event_id}captureEvent(t,n,r){const a=Ja();if(n&&n.originalException&&UL(n.originalException))return Rt&&We.log(u6),a;const i={event_id:a,...n},l=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,i,l||r)),i.event_id}captureSession(t){typeof t.release!="string"?Rt&&We.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Ih(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;
25return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(a=>r&&a))):id(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];iG(this,t,this._integrations),n||c6(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=qde(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Rde(r,Fde(i));const a=this.sendEnvelope(r);a&&a.then(i=>this.emit("afterSendEvent",t,i),null)}sendSession(t){const n=Hde(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const a=typeof r=="number"?r:1,i=`${t}:${n}`;Rt&&We.log(`Recording outcome: "${i}"${a>1?` (${a} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+a}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const a=r.indexOf(n);a>-1&&r.splice(a,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(a=>a(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(Rt&&We.error("Error while sending envelope:",n),n)):(Rt&&We.error("Transport disabled"),id({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Afe(this,t),c6(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",a=!1;const i=n.exception&&n.exception.values;if(i){a=!0;for(const c of i){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(Ih(t,{...r&&{status:"crashed"},errors:t.errors||Number(a||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Ga(n=>{let r=0;const a=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=a,t&&r>=t&&(clearInterval(i),n(!1)))},a)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r=Kn(),a=bl()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||a.setLastEventId(t.event_id||n.event_id),dfe(i,t,n,r,this,a).then(l=>{if(l===null)return l;l.contexts={trace:nde(r),...l.contexts};const c=KW(this,r);return l.sdkProcessingMetadata={dynamicSamplingContext:c,...l.sdkProcessingMetadata},l})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(a=>a.event_id,a=>{Rt&&(a instanceof Ei&&a.logLevel==="log"?We.log(a.message):We.warn(a))})}_processEvent(t,n,r){const a=this.getOptions(),{sampleRate:i}=a,o=lG(t),l=oG(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof i>"u"?void 0:YW(i);if(l&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),Hb(new Ei(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=c==="replay_event"?"replay":c,p=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,p).then(v=>{if(v===null)throw this.recordDroppedEvent("event_processor",f,t),new Ei("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return v;const x=Ife(this,a,v,n);return Tfe(x,u)}).then(v=>{if(v===null){if(this.recordDroppedEvent("before_send",f,t),o){const N=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",N)}throw new Ei(`${u} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!o&&y&&this._updateSessionFromEvent(y,v),o){const w=v.sdkProcessingMetadata&&v.sdkProcessingMetadata.spanCountBeforeProcessing||0,N=v.spans?v.spans.length:0,S=w-N;S>0&&this.recordDroppedEvent("before_send","span",S)}const x=v.transaction_info;if(o&&x&&v.transaction!==t.transaction){const w="custom";v.transaction_info={...x,source:w}}return this.sendEvent(v,n),v}).then(null,v=>{throw v instanceof Ei?v:(this.captureException(v,{data:{__sentry__:!0},originalException:v}),new Ei(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
26Reason: ${v}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[a,i]=n.split(":");return{reason:a,category:i,quantity:r}})}_flushOutcomes(){Rt&&We.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){Rt&&We.log("No outcomes to send");return}if(!this._dsn){Rt&&We.log("No dsn provided, will not send outcomes");return}Rt&&We.log("Sending outcomes:",t);const n=Efe(t,this._options.tunnel&&fy(this._dsn));this.sendEnvelope(n)}}function Tfe(e,t){const n=`${t} must return \`null\` or a valid event.`;if($j(e))return e.then(r=>{if(!Ph(r)&&r!==null)throw new Ei(n);return r},r=>{throw new Ei(`${t} rejected with ${r}`)});if(!Ph(e)&&e!==null)throw new Ei(n);return e}function Ife(e,t,n,r){const{beforeSend:a,beforeSendTransaction:i,beforeSendSpan:o}=t;if(oG(n)&&a)return a(n,r);if(lG(n)){if(n.spans&&o){const l=[];for(const c of n.spans){const u=o(c);u?l.push(u):(HW(),e.recordDroppedEvent("before_send","span"))}n.spans=l}if(i){if(n.spans){const l=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return i(n,r)}}return n}function oG(e){return e.type===void 0}function lG(e){return e.type==="transaction"}function Ofe(e,t){t.debug===!0&&(Rt?We.enable():_d(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Kn().update(t.initialScope);const r=new e(t);return Mfe(r),r.init(),r}function Mfe(e){Kn().setClient(e)}function Rfe(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]||Promise.resolve(void 0)}function a(o){if(!n())return Hb(new Ei("Not adding Promise because buffer limit was reached."));const l=o();return t.indexOf(l)===-1&&t.push(l),l.then(()=>r(l)).then(null,()=>r(l).then(null,()=>{})),l}function i(o){return new Ga((l,c)=>{let u=t.length;if(!u)return l(!0);const d=setTimeout(()=>{o&&o>0&&l(!1)},o);t.forEach(f=>{id(f).then(()=>{--u||(clearTimeout(d),l(!0))},c)})})}return{$:t,add:a,drain:i}}const Dfe=60*1e3;function Lfe(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Dfe:r-t}function $fe(e,t){return e[t]||e.all||0}function Ffe(e,t,n=Date.now()){return $fe(e,t)>n}function zfe(e,{statusCode:t,headers:n},r=Date.now()){const a={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const l of i.trim().split(",")){const[c,u,,,d]=l.split(":",5),f=parseInt(c,10),m=(isNaN(f)?60:f)*1e3;if(!u)a.all=r+m;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";
26").includes("custom"))&&(a[p]=r+m):a[p]=r+m}else o?a.all=r+Lfe(o,r):t===429&&(a.all=r+60*1e3);return a}const Bfe=64;function Ufe(e,t,n=Rfe(e.bufferSize||Bfe)){let r={};const a=o=>n.drain(o);function i(o){const l=[];if(QL(o,(f,m)=>{const p=ZL(m);if(Ffe(r,p)){const v=d6(f,m);e.recordDroppedEvent("ratelimit_backoff",p,v)}else l.push(f)}),l.length===0)return id({});const c=Im(o[0],l),u=f=>{QL(c,(m,p)=>{const v=d6(m,p);e.recordDroppedEvent(f,ZL(p),v)})},d=()=>t({body:Dde(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&Rt&&We.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=zfe(r,f),f),f=>{throw u("network_error"),f});return n.add(d).then(f=>f,f=>{if(f instanceof Ei)return Rt&&We.error("Skipped sending event because buffer is full."),u("queue_overflow"),id({});throw f})}return{send:i,flush:a}}function d6(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function cG(e,t,n=[t],r="npm"){const a=e._metadata||{};a.sdk||(a.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Uu})),version:Uu}),e._metadata=a}function uG(e={}){const t=yn();if(!bfe()||!t)return{};const n=Ad(),r=Em(n);if(r.getTraceData)return r.getTraceData(e);const a=Kn(),i=e.span||Ns(),o=i?gde(i):Hfe(a),l=i?Tm(i):KW(t,a),c=cde(l);return LW.test(o)?{"sentry-trace":o,baggage:c}:(We.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function Hfe(e){const{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return $W(t,r,n)}const qfe=100;function cd(e,t){const n=yn(),r=bl();if(!n)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:i=qfe}=n.getOptions();if(i<=0)return;const l={timestamp:dy(),...e},c=a?_d(()=>a(l,t)):l;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let f6;const Vfe="FunctionToString",h6=new WeakMap,Wfe=(()=>({name:Vfe,setupOnce(){f6=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=aO(this),n=h6.has(yn())&&t!==void 0?t:this;return f6.apply(n,e)}}catch{}},setup(e){h6.set(e,!0)}})),Gfe=Wfe,Kfe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Yfe="InboundFilters",Xfe=((e={})=>({name:Yfe,processEvent(t,n,r){const a=r.getOptions(),i=Zfe(e,a);return Jfe(t,i)?null:t}})),Qfe=Xfe;function Zfe(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Kfe],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function Jfe(e,t){return t.ignoreInternal&&ahe(e)?(Rt&&We.warn(`Event dropped due to being internal Sentry Error.
27Event: ${ac(e)}`),!0):ehe(e,t.ignoreErrors)?(Rt&&We.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
28Event: ${ac(e)}`),!0):ohe(e)?(Rt&&We.warn(`Event dropped due to not having an error message, error type or stacktrace.
29Event: ${ac(e)}`),!0):the(e,t.ignoreTransactions)?(Rt&&We.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
30Event: ${ac(e)}`),!0):nhe(e,t.denyUrls)?(Rt&&We.warn(`Event dropped due to being matched by \`denyUrls\` option.
31Event: ${ac(e)}.
32Url: ${Vb(e)}`),!0):rhe(e,t.allowUrls)?!1:(Rt&&We.warn(`Event dropped due to not being matched by \`allowUrls\` option.
33Event: ${ac(e)}.
34Url: ${Vb(e)}`),!0)}function ehe(e,t){return e.type||!t||!t.length?!1:she(e).some(n=>Hu(n,t))}function the(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Hu(n,t):!1}function nhe(e,t){if(!t||!t.length)return!1;const n=Vb(e);return n?Hu(n,t):!1}function rhe(e,t){if(!t||!t.length)return!0;const n=Vb(e);return n?Hu(n,t):!0}function she(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function ahe(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function ihe(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Vb(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?ihe(t):null}catch{return Rt&&We.error(`Cannot extract url for event ${ac(e)}`),null}}function ohe(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}function lhe(e,t,n=250,r,a,i,o){if(!i.exception||!i.exception.values||!o||!ol(o.originalException,Error))return;const l=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;l&&(i.exception.values=che(PP(e,t,a,o.originalException,r,i.exception.values,l,0),n))}function PP(e,t,n,r,a,i,o,l){if(i.length>=n+1)return i;let c=[...i];if(ol(r[a],Error)){m6(o,l);const u=e(t,r[a]),d=c.length;p6(u,a,d,l),c=PP(e,t,n,r[a],a,[u,...c],u,d)}
34return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(ol(u,Error)){m6(o,l);const f=e(t,u),m=c.length;p6(f,`errors[${d}]`,m,l),c=PP(e,t,n,u,a,[f,...c],f,m)}}),c}function m6(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function p6(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function che(e,t){return e.map(n=>(n.value&&(n.value=rh(n.value,t)),n))}function Wu(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function uhe(e){const t="console";$c(t,e),Fc(t,dhe)}function dhe(){"console"in an&&vP.forEach(function(e){e in an.console&&Na(an.console,e,function(t){return Ub[e]=t,function(...n){Za("console",{args:n,level:e});const a=Ub[e];a&&a.apply(an.console,n)}})})}function fhe(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const hhe="Dedupe",mhe=(()=>{let e;return{name:hhe,processEvent(t){if(t.type)return t;try{if(ghe(t,e))return Rt&&We.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),phe=mhe;function ghe(e,t){return t?!!(xhe(e,t)||yhe(e,t)):!1}function xhe(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!fG(e,t)||!dG(e,t))}function yhe(e,t){const n=g6(t),r=g6(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!fG(e,t)||!dG(e,t))}function dG(e,t){let n=DL(e),r=DL(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let a=0;a<r.length;a++){const i=r[a],o=n[a];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function fG(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function g6(e){return e.exception&&e.exception.values&&e.exception.values[0]}function vhe(e,t,n,r,a="auto.http.browser"){if(!e.fetchData)return;const i=Pc()&&t(e.fetchData.url);if(e.endTimestamp&&i){const m=e.fetchData.__span;if(!m)return;const p=r[m];p&&(jhe(p,e),delete r[m]);return}const{method:o,url:l}=e.fetchData,c=whe(l),u=c?Wu(c).host:void 0,d=!!Ns(),f=i&&d?hy({name:`${o} ${l}`,attributes:{url:l,type:"fetch","http.method":o,"http.url":c,"server.address":u,[Wr]:a,[ld]:"http.client"}}):new Pm;if(e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){const m=e.args[0],p=e.args[1]||{},v=bhe(m,p,Pc()&&d?f:void 0);v&&(e.args[1]=p,p.headers=v)}return f}function bhe(e,t,n){const r=uG({span:n}),a=r["sentry-trace"],i=r.baggage;if(!a)return;const o=t.headers||(Nhe(e)?e.headers:void 0);if(o)if(She(o)){const l=new Headers(o);if(l.set("sentry-trace",a),i){const c=l.get("baggage");if(c){const u=yv(c);l.set("baggage",u?`${u},${i}`:i)}else l.set("baggage",i)}return l}else if(Array.isArray(o)){const l=[...o.filter(c=>!(Array.isArray(c)&&c[0]==="sentry-trace")).map(c=>{if(Array.isArray(c)&&c[0]==="baggage"&&typeof c[1]=="string"){const[u,d,...f]=c;return[u,yv(d),...f]}else return c}),["sentry-trace",a]];return i&&l.push(["baggage",i]),l}else{const l="baggage"in o?o.baggage:void 0;let c=[];return Array.isArray(l)?c=l.map(u=>typeof u=="string"?yv(u):u).filter(u=>u===""):l&&c.push(yv(l)),i&&c.push(i),{...o,"sentry-trace":a,baggage:c.length>0?c.join(","):void 0}}else return{...r}}function whe(e){try{return new URL(e).href}catch{return}}function jhe(e,t){if(t.response){RW(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:Br,message:"internal_error"});e.end()}function yv(e){return e.split(",").filter(t=>!t.split("=")[0].startsWith(cO)).join(",")}function Nhe(e){return typeof Request<"u"&&ol(e,Request)}function She(e){return typeof Headers<"u"&&ol(e,Headers)}function hG(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const TP=an;
34function mG(){if(!("fetch"in TP))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function IP(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function khe(){if(typeof EdgeRuntime=="string")return!0;if(!mG())return!1;if(IP(TP.fetch))return!0;let e=!1;const t=TP.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=IP(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){Lc&&We.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function pG(e,t){const n="fetch";$c(n,e),Fc(n,()=>gG(void 0,t))}function Che(e){const t="fetch-body-resolved";$c(t,e),Fc(t,()=>gG(Ahe))}function gG(e,t=!1){t&&!khe()||Na(an,"fetch",function(n){return function(...r){const a=new Error,{method:i,url:o}=Ehe(r),l={args:r,fetchData:{method:i,url:o},startTimestamp:Ms()*1e3,virtualError:a};return e||Za("fetch",{...l}),n.apply(an,r).then(async c=>(e?e(c):Za("fetch",{...l,endTimestamp:Ms()*1e3,response:c}),c),c=>{throw Za("fetch",{...l,endTimestamp:Ms()*1e3,error:c}),nO(c)&&c.stack===void 0&&(c.stack=a.stack,si(c,"framesToPop",1)),c})}})}async function _he(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),a=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:l}=await r.read();clearTimeout(o),l&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(a),r.releaseLock(),n.cancel().then(null,()=>{})}}function Ahe(e){let t;try{t=e.clone()}catch{return}_he(t,()=>{Za("fetch-body-resolved",{endTimestamp:Ms()*1e3,response:e})})}function OP(e,t){return!!e&&typeof e=="object"&&!!e[t]}function x6(e){return typeof e=="string"?e:e?OP(e,"url")?e.url:e.toString?e.toString():"":""}function Ehe(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:x6(n),method:OP(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:x6(t),method:OP(t,"method")?String(t.method).toUpperCase():"GET"}}function Phe(){return"npm"}const vv=an;function The(){const e=vv.chrome,t=e&&e.app&&e.app.runtime,n="history"in vv&&!!vv.history.pushState&&!!vv.history.replaceState;return!t&&n}const It=an;let MP=0;function xG(){return MP>0}function Ihe(){MP++,setTimeout(()=>{MP--})}function Mh(e,t={}){function n(a){return typeof a=="function"}if(!n(e))return e;try{const a=e.__sentry_wrapped__;if(a)return typeof a=="function"?a:e;if(aO(e))return e}catch{return e}const r=function(...a){try{const i=a.map(o=>Mh(o,t));return e.apply(this,i)}catch(i){throw Ihe(),oO(o=>{o.addEventProcessor(l=>(t.mechanism&&(wP(l,void 0),Th(l,t.mechanism)),l.extra={...l.extra,arguments:a},l)),yfe(i)}),i}};try{for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}catch{}EW(r,e),si(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const fo=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function fO(e,t){const n=hO(e,t),r={type:Lhe(t),value:$he(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Ohe(e,t,n,r){const a=yn(),i=a&&a.getOptions().normalizeDepth,o=Hhe(t),l={__serialized__:QW(t,i)};if(o)return{exception:{values:[fO(e,o)]},extra:l};const c={exception:{values:[{type:Lj(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Bhe(t,{isUnhandledRejection:r})}]},extra:l};if(n){const u=hO(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function qk(e,t){return{exception:{values:[fO(e,t)]}}}function hO(e,t){const n=t.stacktrace||t.stack||"",r=Rhe(t),a=Dhe(t);try{return e(n,r,a)}catch{}return[]}const Mhe=/Minified React error #\d+;/i;function Rhe(e){return e&&Mhe.test(e.message)?1:0}function Dhe(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function yG(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Lhe(e){const t=e&&e.name;return!t&&yG(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function $he(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:yG(e)&&Array.isArray(e.message)&&e.message.length==2?e.message[1]:t:"No error message"}function Fhe(e,t,n,r){const a=n&&n.syntheticException||void 0,i=mO(e,t,a,r);return Th(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),id(i)}function zhe(e,t,n="info",r,a){const i=r&&r.syntheticException||void 0,o=RP(e,t,i,a);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),id(o)}function mO(e,t,n,r,a){let i;if(CW(t)&&t.error)return qk(e,t.error);
34if($L(t)||Iue(t)){const o=t;if("stack"in t)i=qk(e,t);else{const l=o.name||($L(o)?"DOMError":"DOMException"),c=o.message?`${l}: ${o.message}`:l;i=RP(e,c,n,r),wP(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return nO(t)?qk(e,t):Ph(t)||Lj(t)?(i=Ohe(e,t,n,a),Th(i,{synthetic:!0}),i):(i=RP(e,t,n,r),wP(i,`${t}`),Th(i,{synthetic:!0}),i)}function RP(e,t,n,r){const a={};if(r&&n){const i=hO(e,n);i.length&&(a.exception={values:[{value:t,stacktrace:{frames:i}}]}),Th(a,{synthetic:!0})}if(rO(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return a.logentry={message:i,params:o},a}return a.message=t,a}function Bhe(e,{isUnhandledRejection:t}){const n=Bue(e),r=t?"promise rejection":"exception";return CW(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Lj(e)?`Event \`${Uhe(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Uhe(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Hhe(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function qhe(e,{metadata:t,tunnel:n,dsn:r}){const a={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:fy(r)}},i=Vhe(e);return Im(a,[i])}function Vhe(e){return[{type:"user_report"},e]}class Whe extends Pfe{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=It.SENTRY_SDK_SOURCE||Phe();cG(n,"browser",["browser"],r),super(n),n.sendClientReports&&It.document&&It.document.addEventListener("visibilitychange",()=>{It.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Fhe(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return zhe(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){fo&&We.warn("SDK not enabled, will not capture user feedback.");return}const n=qhe(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const pO=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ghe=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",Om=(e,t,n,r)=>{let a,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(a||0),(i||a===void 0)&&(a=t.value,t.delta=i,t.rating=Ghe(t.value,n),e(t)))}},vt=an,Khe=()=>`v4-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,my=(e=!0)=>{const t=vt.performance&&vt.performance.getEntriesByType&&vt.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},py=()=>{const e=my();return e&&e.activationStart||0},Mm=(e,t)=>{const n=my();let r="navigate";return n&&(vt.document&&vt.document.prerendering||py()>0?r="prerender":vt.document&&vt.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Khe(),navigationType:r}},Pd=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(a=>{Promise.resolve().then(()=>{t(a.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},Rm=e=>{const t=n=>{(n.type==="pagehide"||vt.document&&vt.document.visibilityState==="hidden")&&e(n)};vt.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Uj=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let vg=-1;const Yhe=()=>vt.document.visibilityState==="hidden"&&!vt.document.prerendering?0:1/0,Wb=e=>{vt.document.visibilityState==="hidden"&&vg>-1&&(vg=e.type==="visibilitychange"?e.timeStamp:0,Qhe())},Xhe=()=>{addEventListener("visibilitychange",Wb,!0),addEventListener("prerenderingchange",Wb,!0)},Qhe=()=>{removeEventListener("visibilitychange",Wb,!0),removeEventListener("prerenderingchange",Wb,!0)},Hj=()=>(vt.document&&vg<0&&(vg=Yhe(),Xhe()),{get firstHiddenTime(){return vg}}),gy=e=>{vt.document&&vt.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Zhe=[1800,3e3],Jhe=(e,t={})=>{gy(()=>{const n=Hj(),r=Mm("FCP");let a;const o=Pd("paint",l=>{l.forEach(c=>{c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-py(),0),r.entries.push(c),a(!0)))})});o&&(a=Om(e,r,Zhe,t.reportAllChanges))})},eme=[.1,.25],tme=(e,t={})=>{Jhe(Uj(()=>{const n=Mm("CLS",0);let r,a=0,i=[];const o=c=>
34{c.forEach(u=>{if(!u.hadRecentInput){const d=i[0],f=i[i.length-1];a&&d&&f&&u.startTime-f.startTime<1e3&&u.startTime-d.startTime<5e3?(a+=u.value,i.push(u)):(a=u.value,i=[u])}}),a>n.value&&(n.value=a,n.entries=i,r())},l=Pd("layout-shift",o);l&&(r=Om(e,n,eme,t.reportAllChanges),Rm(()=>{o(l.takeRecords()),r(!0)}),setTimeout(r,0))}))},nme=[100,300],rme=(e,t={})=>{gy(()=>{const n=Hj(),r=Mm("FID");let a;const i=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),a(!0))},o=c=>{c.forEach(i)},l=Pd("first-input",o);a=Om(e,r,nme,t.reportAllChanges),l&&Rm(Uj(()=>{o(l.takeRecords()),l.disconnect()}))})};let vG=0,Vk=1/0,bv=0;const sme=e=>{e.forEach(t=>{t.interactionId&&(Vk=Math.min(Vk,t.interactionId),bv=Math.max(bv,t.interactionId),vG=bv?(bv-Vk)/7+1:0)})};let DP;const ame=()=>DP?vG:performance.interactionCount||0,ime=()=>{"interactionCount"in performance||DP||(DP=Pd("event",sme,{type:"event",buffered:!0,durationThreshold:0}))},zo=[],Wk=new Map,ome=40;let lme=0;const cme=()=>ame()-lme,ume=()=>{const e=Math.min(zo.length-1,Math.floor(cme()/50));return zo[e]},Gk=10,dme=[],fme=e=>{if(dme.forEach(r=>r(e)),!(e.interactionId||e.entryType==="first-input"))return;const t=zo[zo.length-1],n=Wk.get(e.interactionId);if(n||zo.length<Gk||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Wk.set(r.id,r),zo.push(r)}zo.sort((r,a)=>a.latency-r.latency),zo.length>Gk&&zo.splice(Gk).forEach(r=>Wk.delete(r.id))}},bG=e=>{const t=vt.requestIdleCallback||vt.setTimeout;let n=-1;return e=Uj(e),vt.document&&vt.document.visibilityState==="hidden"?e():(n=t(e),Rm(e)),n},hme=[200,500],mme=(e,t={})=>{"PerformanceEventTiming"in vt&&"interactionId"in PerformanceEventTiming.prototype&&gy(()=>{ime();const n=Mm("INP");let r;const a=o=>{bG(()=>{o.forEach(fme);const l=ume();l&&l.latency!==n.value&&(n.value=l.latency,n.entries=l.entries,r())})},i=Pd("event",a,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:ome});r=Om(e,n,hme,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Rm(()=>{a(i.takeRecords()),r(!0)}))})},pme=[2500,4e3],y6={},gme=(e,t={})=>{gy(()=>{const n=Hj(),r=Mm("LCP");let a;const i=l=>{t.reportAllChanges||(l=l.slice(-1)),l.forEach(c=>{c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-py(),0),r.entries=[c],a())})},o=Pd("largest-contentful-paint",i);if(o){a=Om(e,r,pme,t.reportAllChanges);const l=Uj(()=>{y6[r.id]||(i(o.takeRecords()),o.disconnect(),y6[r.id]=!0,a(!0))});["keydown","click"].forEach(c=>{vt.document&&addEventListener(c,()=>bG(l),{once:!0,capture:!0})}),Rm(l)}})},xme=[800,1800],LP=e=>{vt.document&&vt.document.prerendering?gy(()=>LP(e)):vt.document&&vt.document.readyState!=="complete"?addEventListener("load",()=>LP(e),!0):setTimeout(e,0)},yme=(e,t={})=>{const n=Mm("TTFB"),r=Om(e,n,xme,t.reportAllChanges);LP(()=>{const a=my();a&&(n.value=Math.max(a.responseStart-py(),0),n.entries=[a],r(!0))})},bg={},Gb={};let wG,jG,NG,SG,kG;function CG(e,t=!1){return xy("cls",e,Nme,wG,t)}function vme(e,t=!1){return xy("lcp",e,kme,NG,t)}function bme(e){return xy("fid",e,Sme,jG)}function wme(e){return xy("ttfb",e,Cme,SG)}function jme(e){return xy("inp",e,_me,kG)}function Ug(e,t){return _G(e,t),Gb[e]||(Ame(e),Gb[e]=!0),AG(e,t)}function Dm(e,t){const n=bg[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(a){pO&&We.error(`Error while triggering instrumentation handler.
35Type: ${e}
36Name: ${il(r)}
37Error:`,a)}}function Nme(){return tme(e=>{Dm("cls",{metric:e}),wG=e},{reportAllChanges:!0})}function Sme(){return rme(e=>{Dm("fid",{metric:e}),jG=e})}function kme(){return gme(e=>{Dm("lcp",{metric:e}),NG=e},{reportAllChanges:!0})}function Cme(){return yme(e=>{Dm("ttfb",{metric:e}),SG=e})}function _me(){return mme(e=>{Dm("inp",{metric:e}),kG=e})}function xy(e,t,n,r,a=!1){_G(e,t);let i;return Gb[e]||(i=n(),Gb[e]=!0),r&&t({metric:r}),AG(e,t,a?i:void 0)}function Ame(e){const t={};e==="event"&&(t.durationThreshold=0),Pd(e,n=>{Dm(e,{entries:n})},t)}function _G(e,t){bg[e]=bg[e]||[],bg[e].push(t)}function AG(e,t,n){return()=>{n&&n();const r=bg[e];if(!r)return;const a=r.indexOf(t);a!==-1&&r.splice(a,1)}}function Eme(e){return"duration"in e}function Kk(e){return typeof e=="number"&&isFinite(e)}function ll(e,t,n,{...r}){const a=mn(e).start_timestamp;return a&&a>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),eG(e,()=>{const i=hy({startTime:t,...r});return i&&i.end(n),i})}function EG(e){const t=yn();if(!t)return;const{name:n,transaction:r,attributes:a,startTime:i}=e,{release:o,environment:l}=t.getOptions(),c=t.getIntegrationByName("Replay"),u=c&&c.getReplayId(),d=Kn(),f=d.getUser(),m=f!==void 0?f.email||f.id||f.ip_address:void 0;let p;try{p=d.getScopeData().contexts.profile.profile_id}catch{}const v={release:o,environment:l,user:m||void 0,profile_id:p||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":vt.navigator&&vt.navigator.userAgent,...a};return hy({name:n,attributes:v,startTime:i,experimental:{standalone:!0}})}function gO(){return vt&&vt.addEventListener&&vt.performance}function mr(e){return e/1e3}function PG(e){let t="unknown",n="unknown",r="";for(const a of e){if(a==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(a))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=a}
37return r===e&&(t=r),{name:t,version:n}}function Pme(){let e=0,t,n;if(!Ime())return;let r=!1;function a(){r||(r=!0,n&&Tme(e,t,n),i())}const i=CG(({metric:o})=>{const l=o.entries[o.entries.length-1];l&&(e=o.value,t=l)},!0);Rm(()=>{a()}),setTimeout(()=>{const o=yn();if(!o)return;const l=o.on("startNavigationSpan",()=>{a(),l&&l()}),c=Ns(),u=c&&vs(c),d=u&&mn(u);d&&d.op==="pageload"&&(n=u.spanContext().spanId)},0)}function Tme(e,t,n){pO&&We.log(`Sending CLS span (${e})`);const r=mr((sa||0)+(t&&t.startTime||0)),a=Kn().getScopeData().transactionName,i=t?ad(t.sources[0]&&t.sources[0].node):"Layout shift",o=as({[Wr]:"auto.http.browser.cls",[ld]:"ui.webvital.cls",[lO]:t&&t.duration||0,"sentry.pageload.span_id":n}),l=EG({name:i,transaction:a,attributes:o,startTime:r});l&&(l.addEvent("cls",{[zj]:"",[Bj]:e}),l.end(r))}function Ime(){try{return PerformanceObserver.supportedEntryTypes.includes("layout-shift")}catch{return!1}}const Ome=2147483647;let v6=0,ts={},Gs,wg;function Mme({recordClsStandaloneSpans:e}){const t=gO();if(t&&sa){t.mark&&vt.performance.mark("sentry-tracing-init");const n=zme(),r=Fme(),a=Bme(),i=e?Pme():$me();return()=>{n(),r(),a(),i&&i()}}return()=>{}}function Rme(){Ug("longtask",({entries:e})=>{const t=Ns();if(!t)return;const{op:n,start_timestamp:r}=mn(t);for(const a of e){const i=mr(sa+a.startTime),o=mr(a.duration);n==="navigation"&&r&&i<r||ll(t,i,i+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[Wr]:"auto.ui.browser.metrics"}})}})}function Dme(){new PerformanceObserver(t=>{const n=Ns();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const a=mr(sa+r.startTime),{start_timestamp:i,op:o}=mn(n);if(o==="navigation"&&i&&a<i)continue;const l=mr(r.duration),c={[Wr]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:f,sourceURL:m,sourceFunctionName:p,sourceCharPosition:v}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=f,m&&(c["code.filepath"]=m),p&&(c["code.function"]=p),v!==-1&&(c["browser.script.source_char_position"]=v),ll(n,a,a+l,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Lme(){Ug("event",({entries:e})=>{const t=Ns();if(t){for(const n of e)if(n.name==="click"){const r=mr(sa+n.startTime),a=mr(n.duration),i={name:ad(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[Wr]:"auto.ui.browser.metrics"}},o=AW(n.target);o&&(i.attributes["ui.component_name"]=o),ll(t,r,r+a,i)}}})}function $me(){return CG(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ts.cls={value:e.value,unit:""},wg=t)},!0)}function Fme(){return vme(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(ts.lcp={value:e.value,unit:"millisecond"},Gs=t)},!0)}function zme(){return bme(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=mr(sa),r=mr(t.startTime);ts.fid={value:e.value,unit:"millisecond"},ts["mark.fid"]={value:n+r,unit:"second"}})}function Bme(){return wme(({metric:e})=>{e.entries[e.entries.length-1]&&(ts.ttfb={value:e.value,unit:"millisecond"})})}function Ume(e,t){const n=gO();if(!n||!n.getEntries||!sa)return;const r=mr(sa),a=n.getEntries(),{op:i,start_timestamp:o}=mn(e);if(a.slice(v6).forEach(l=>{const c=mr(l.startTime),u=mr(Math.max(0,l.duration));if(!(i==="navigation"&&o&&r+c<o))switch(l.entryType){case"navigation":{qme(e,l,r);break}case"mark":case"paint":case"measure":{Hme(e,l,c,u,r);const d=Hj(),f=l.startTime<d.firstHiddenTime;l.name==="first-paint"&&f&&(ts.fp={value:l.startTime,unit:"millisecond"}),l.name==="first-contentful-paint"&&f&&(ts.fcp={value:l.startTime,unit:"millisecond"});break}case"resource":{Gme(e,l,l.name,c,u,r);break}}}),v6=Math.max(a.length-1,0),Kme(e),i==="pageload"){Xme(ts);const l=ts["mark.fid"];l&&ts.fid&&(ll(e,l.value,l.value+mr(ts.fid.value),{name:"first input delay",op:"ui.action",attributes:{[Wr]:"auto.ui.browser.metrics"}}),delete ts["mark.fid"]),(!("fcp"in ts)||!t.recordClsOnPageloadSpan)&&delete ts.cls,Object.entries(ts).forEach(([c,u])=>{Wde(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",r),e.setAttribute("performance.activationStart",py()),Yme(e)}Gs=void 0,wg=void 0,ts={}}function Hme(e,t,n,r,a){const i=my(!1),o=mr(i?i.requestStart:0),l=a+Math.max(n,o),c=a+n,u=c+r,d={[Wr]:"auto.resource.browser.metrics"};l!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=l),l<=u&&ll(e,l,u,{name:t.name,op:t.entryType,attributes:d})}function qme(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{wv(e,t,r,n)}),wv(e,t,"secureConnection",n,"TLS/SSL"),wv(e,t,"fetch",n,"cache"),wv(e,t,"domainLookup",n,"DNS"),Wme(e,t,n)}function wv(e,t,n,r,a=n){const i=Vme(n),o=t[i],l=t[`${n}Start`];!l||!o||ll(e,r+mr(l),r+mr(o),{op:`browser.${a}`,name:t.name,attributes:{[Wr]:"auto.ui.browser.metrics"}})}function Vme(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Wme(e,t,n){const r=n+mr(t.requestStart),a=n+mr(t.responseEnd),i=n+mr(t.responseStart);t.responseEnd&&(ll(e,r,a,{op:"browser.request",name:t.name,attributes:{[Wr]:"auto.ui.browser.metrics"}}),ll(e,i,a,{op:"browser.response",name:t.name,attributes:{[Wr]:"auto.ui.browser.metrics"}}))}
37function Gme(e,t,n,r,a,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Wu(n),l={[Wr]:"auto.resource.browser.metrics"};Yk(l,t,"transferSize","http.response_transfer_size"),Yk(l,t,"encodedBodySize","http.response_content_length"),Yk(l,t,"decodedBodySize","http.decoded_response_content_length");const c=t.deliveryType;c!=null&&(l["http.response_delivery_type"]=c);const u=t.renderBlockingStatus;u&&(l["resource.render_blocking_status"]=u),o.protocol&&(l["url.scheme"]=o.protocol.split(":").pop()),o.host&&(l["server.address"]=o.host),l["url.same_origin"]=n.includes(vt.location.origin);const{name:d,version:f}=PG(t.nextHopProtocol);l["network.protocol.name"]=d,l["network.protocol.version"]=f;const m=i+r,p=m+a;ll(e,m,p,{name:n.replace(vt.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:l})}function Kme(e){const t=vt.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Kk(n.rtt)&&(ts["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Kk(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Kk(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Yme(e){Gs&&(Gs.element&&e.setAttribute("lcp.element",ad(Gs.element)),Gs.id&&e.setAttribute("lcp.id",Gs.id),Gs.url&&e.setAttribute("lcp.url",Gs.url.trim().slice(0,200)),Gs.loadTime!=null&&e.setAttribute("lcp.loadTime",Gs.loadTime),Gs.renderTime!=null&&e.setAttribute("lcp.renderTime",Gs.renderTime),e.setAttribute("lcp.size",Gs.size)),wg&&wg.sources&&wg.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,ad(t.node)))}function Yk(e,t,n,r){const a=t[n];a!=null&&a<Ome&&(e[r]=a)}function Xme(e){const t=my(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Qme=1e3;let b6,$P,FP;function Zme(e){$c("dom",e),Fc("dom",Jme)}function Jme(){if(!vt.document)return;const e=Za.bind(null,"dom"),t=w6(e,!0);vt.document.addEventListener("click",t,!1),vt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const a=vt[n],i=a&&a.prototype;!i||!i.hasOwnProperty||!i.hasOwnProperty("addEventListener")||(Na(i,"addEventListener",function(o){return function(l,c,u){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},f=d[l]=d[l]||{refCount:0};if(!f.handler){const m=w6(e);f.handler=m,o.call(this,l,m,u)}f.refCount++}catch{}return o.call(this,l,c,u)}}),Na(i,"removeEventListener",function(o){return function(l,c,u){if(l==="click"||l=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},f=d[l];f&&(f.refCount--,f.refCount<=0&&(o.call(this,l,f.handler,u),f.handler=void 0,delete d[l]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return o.call(this,l,c,u)}}))})}function epe(e){if(e.type!==$P)return!1;try{if(!e.target||e.target._sentryId!==FP)return!1}catch{}return!0}function tpe(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function w6(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=npe(n);if(tpe(n.type,r))return;si(n,"_sentryCaptured",!0),r&&!r._sentryId&&si(r,"_sentryId",Ja());const a=n.type==="keypress"?"input":n.type;epe(n)||(e({event:n,name:a,global:t}),$P=n.type,FP=r?r._sentryId:void 0),clearTimeout(b6),b6=vt.setTimeout(()=>{FP=void 0,$P=void 0},Qme)}}function npe(e){try{return e.target}catch{return null}}let jv;function xO(e){const t="history";$c(t,e),Fc(t,rpe)}function rpe(){if(!The())return;const e=vt.onpopstate;vt.onpopstate=function(...n){const r=vt.location.href,a=jv;if(jv=r,Za("history",{from:a,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const a=r.length>2?r[2]:void 0;if(a){const i=jv,o=String(a);jv=o,Za("history",{from:i,to:o})}return n.apply(this,r)}}Na(vt.history,"pushState",t),Na(vt.history,"replaceState",t)}const Nb={};function spe(e){const t=Nb[e];if(t)return t;let n=vt[e];
37if(IP(n))return Nb[e]=n.bind(vt);const r=vt.document;if(r&&typeof r.createElement=="function")try{const a=r.createElement("iframe");a.hidden=!0,r.head.appendChild(a);const i=a.contentWindow;i&&i[e]&&(n=i[e]),r.head.removeChild(a)}catch(a){pO&&We.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,a)}return n&&(Nb[e]=n.bind(vt))}function j6(e){Nb[e]=void 0}const Uf="__sentry_xhr_v3__";function TG(e){$c("xhr",e),Fc("xhr",ape)}function ape(){if(!vt.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const a=new Error,i=Ms()*1e3,o=Jo(r[0])?r[0].toUpperCase():void 0,l=ipe(r[1]);if(!o||!l)return t.apply(n,r);n[Uf]={method:o,url:l,request_headers:{}},o==="POST"&&l.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Uf];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:Ms()*1e3,startTimestamp:i,xhr:n,virtualError:a};Za("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,f){const[m,p]=f,v=d[Uf];return v&&Jo(m)&&Jo(p)&&(v.request_headers[m.toLowerCase()]=p),u.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const a=n[Uf];if(!a)return t.apply(n,r);r[0]!==void 0&&(a.body=r[0]);const i={startTimestamp:Ms()*1e3,xhr:n};return Za("xhr",i),t.apply(n,r)}})}function ipe(e){if(Jo(e))return e;try{return e.toString()}catch{}}const Xk=[],Sb=new Map;function ope(){if(gO()&&sa){const t=lpe();return()=>{t()}}return()=>{}}const N6={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function lpe(){return jme(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(v=>v.duration===e.value&&N6[v.name]);if(!t)return;const{interactionId:n}=t,r=N6[t.name],a=mr(sa+t.startTime),i=mr(e.value),o=Ns(),l=o?vs(o):void 0,u=(n!=null?Sb.get(n):void 0)||l,d=u?mn(u).description:Kn().getScopeData().transactionName,f=ad(t.target),m=as({[Wr]:"auto.http.browser.inp",[ld]:`ui.interaction.${r}`,[lO]:t.duration}),p=EG({name:f,transaction:d,attributes:m,startTime:a});p&&(p.addEvent("inp",{[zj]:"millisecond",[Bj]:e.value}),p.end(a+i))})}function cpe(e){const t=({entries:n})=>{const r=Ns(),a=r&&vs(r);n.forEach(i=>{if(!Eme(i)||!a)return;const o=i.interactionId;if(o!=null&&!Sb.has(o)){if(Xk.length>10){const l=Xk.shift();Sb.delete(l)}Xk.push(o),Sb.set(o,a)}})};Ug("event",t),Ug("first-input",t)}function upe(e,t=spe("fetch")){let n=0,r=0;function a(i){const o=i.body.length;n+=o,r++;const l={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return j6("fetch"),Hb("No fetch implementation available");try{return t(e.url,l).then(c=>(n-=o,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return j6("fetch"),n-=o,r--,Hb(c)}}return Ufe(e,a)}const dpe=30,fpe=50;function zP(e,t,n,r){const a={filename:e,function:t==="<anonymous>"?sd:t,in_app:!0};return n!==void 0&&(a.lineno=n),r!==void 0&&(a.colno=r),a}const hpe=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mpe=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ppe=/\((\S*)(?::(\d+))(?::(\d+))\)/,gpe=e=>{const t=hpe.exec(e);if(t){const[,r,a,i]=t;return zP(r,sd,+a,+i)}const n=mpe.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=ppe.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[a,i]=IG(n[1]||sd,n[2]);return zP(i,a,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},xpe=[dpe,gpe],ype=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vpe=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bpe=e=>{const t=ype.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=vpe.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],a=t[1]||sd;return[a,r]=IG(a,r),zP(r,a,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},wpe=[fpe,bpe],jpe=[xpe,wpe],Npe=jW(...jpe),IG=(e,t)=>
vendor: 6,652 bytes, line 37
37{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:sd,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Nv=1024,Spe="Breadcrumbs",kpe=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Spe,setup(n){t.console&&uhe(Epe(n)),t.dom&&Zme(Ape(n,t.dom)),t.xhr&&TG(Ppe(n)),t.fetch&&pG(Tpe(n)),t.history&&xO(Ipe(n)),t.sentry&&n.on("beforeSendEvent",_pe(n))}}}),Cpe=kpe;function _pe(e){return function(n){yn()===e&&cd({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ac(n)},{event:n})}}function Ape(e,t){return function(r){if(yn()!==e)return;let a,i,o=typeof t=="object"?t.serializeAttribute:void 0,l=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;l&&l>Nv&&(fo&&We.warn(`\`dom.maxStringLength\` cannot exceed ${Nv}, but a value of ${l} was configured. Sentry will use ${Nv} instead.`),l=Nv),typeof o=="string"&&(o=[o]);try{const u=r.event,d=Ope(u)?u.target:u;a=ad(d,{keyAttrs:o,maxStringLength:l}),i=AW(d)}catch{a="<unknown>"}if(a.length===0)return;const c={category:`ui.${r.name}`,message:a};i&&(c.data={"ui.component_name":i}),cd(c,{event:r.event,name:r.name,global:r.global})}}function Epe(e){return function(n){if(yn()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:fhe(n.level),message:FL(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${FL(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;cd(r,{input:n.args,level:n.level})}}function Ppe(e){return function(n){if(yn()!==e)return;const{startTimestamp:r,endTimestamp:a}=n,i=n.xhr[Uf];if(!r||!a||!i)return;const{method:o,url:l,status_code:c,body:u}=i,d={method:o,url:l,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:a},m=hG(c);cd({category:"xhr",data:d,type:"http",level:m},f)}}function Tpe(e){return function(n){if(yn()!==e)return;const{startTimestamp:r,endTimestamp:a}=n;if(a&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:a};cd({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},l={input:n.args,response:i,startTimestamp:r,endTimestamp:a},c=hG(o.status_code);cd({category:"fetch",data:o,type:"http",level:c},l)}}}function Ipe(e){return function(n){if(yn()!==e)return;let r=n.from,a=n.to;const i=Wu(It.location.href);let o=r?Wu(r):void 0;const l=Wu(a);(!o||!o.path)&&(o=i),i.protocol===l.protocol&&i.host===l.host&&(a=l.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),cd({category:"navigation",data:{from:r,to:a}})}}function Ope(e){return!!e&&!!e.target}const Mpe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Rpe="BrowserApiErrors",Dpe=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Rpe,setupOnce(){t.setTimeout&&Na(It,"setTimeout",S6),t.setInterval&&Na(It,"setInterval",S6),t.requestAnimationFrame&&Na(It,"requestAnimationFrame",$pe),t.XMLHttpRequest&&"XMLHttpRequest"in It&&Na(XMLHttpRequest.prototype,"send",Fpe);const n=t.eventTarget;n&&(Array.isArray(n)?n:Mpe).forEach(zpe)}}}),Lpe=Dpe;function S6(e){return function(...t){const n=t[0];return t[0]=Mh(n,{mechanism:{data:{function:il(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function $pe(e){return function(t){return e.apply(this,[Mh(t,{mechanism:{data:{function:"requestAnimationFrame",handler:il(e)},handled:!1,type:"instrument"}})])}}function Fpe(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(a=>{a in n&&typeof n[a]=="function"&&Na(n,a,function(i){const o={mechanism:{data:{function:a,handler:il(i)},handled:!1,type:"instrument"}},l=aO(i);return l&&(o.mechanism.data.handler=il(l)),Mh(i,o)})}),e.apply(this,t)}}function zpe(e){const n=It[e],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Na(r,"addEventListener",function(a){return function(i,o,l){try{Bpe(o)&&(o.handleEvent=Mh(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:il(o),target:e},handled:!1,type:"instrument"}}))}catch{}return a.apply(this,[i,Mh(o,{mechanism:{data:{function:"addEventListener",handler:il(o),target:e},handled:!1,type:"instrument"}}),l])}}),Na(r,"removeEventListener",function(a){return function(i,o,l){try{const c=o.__sentry_wrapped__;c&&a.call(this,i,c,l)}catch{}return a.call(this,i,o,l)}}))}function Bpe(e){return typeof e.handleEvent=="function"}const Upe=()=>({name:"BrowserSession",setupOnce(){if(typeof It.document>"u"){fo&&We.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}i6({ignoreDuration:!0}),o6(),xO(({from:e,to:t})=>{e!==void 0&&e!==t&&(i6({ignoreDuration:!0}),o6())})}}),Hpe="GlobalHandlers",qpe=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:Hpe,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Wpe(n),k6("onerror")),t.onunhandledrejection&&(Gpe(n),k6("onunhandledrejection"))}}}),Vpe=qpe;function Wpe(e){NW(t=>{const{stackParser:n,attachStacktrace:r}=OG();if(yn()!==e||xG())return;const{msg:a,url:i,line:o,column:l,error:c}=t,u=Xpe(mO(n,c||a,void 0,r,!1),i,o,l);u.level="error",rG(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Gpe(e){SW(t=>{const{stackParser:n,attachStacktrace:r}=OG();if(yn()!==e||xG())return;const a=Kpe(t),i=sO(a)?Ype(a):mO(n,a,void 0,r,!0);i.level="error",rG(i,{originalException:a,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function Kpe(e){if(sO(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function Ype(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Xpe(e,t,n,r){const a=e.exception=e.exception||{},i=a.values=a.values||[],o=i[0]=i[0]||{},l=o.stacktrace=o.stacktrace||{},c=l.frames=l.frames||[],u=r,d=n,f=Jo(t)&&t.length>0?t:$ue();
37return c.length===0&&c.push({colno:u,filename:f,function:sd,in_app:!0,lineno:d}),e}function k6(e){fo&&We.log(`Global Handler attached: ${e}`)}function OG(){const e=yn();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Qpe=()=>({name:"HttpContext",preprocessEvent(e){if(!It.navigator&&!It.location&&!It.document)return;const t=e.request&&e.request.url||It.location&&It.location.href,{referrer:n}=It.document||{},{userAgent:r}=It.navigator||{},a={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:a};e.request=i}}),Zpe="cause",Jpe=5,ege="LinkedErrors",tge=((e={})=>{const t=e.limit||Jpe,n=e.key||Zpe;return{name:ege,preprocessEvent(r,a,i){const o=i.getOptions();lhe(fO,o.stackParser,o.maxValueLength,n,t,r,a)}}}),nge=tge;function rge(e){const t=[Qfe(),Gfe(),Lpe(),Cpe(),Vpe(),nge(),phe(),Qpe()];return e.autoSessionTracking!==!1&&t.push(Upe()),t}function sge(e={}){const t={defaultIntegrations:rge(e),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:It.SENTRY_RELEASE&&It.SENTRY_RELEASE.id?It.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function age(){const e=typeof It.window<"u"&&It;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,a=It.location&&It.location.href||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&It===It.top&&i.some(c=>a.startsWith(`${c}//`)),l=typeof e.nw<"u";return!!r&&!o&&!l}function ige(e={}){const t=sge(e);if(!t.skipBrowserExtensionCheck&&age()){_d(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}fo&&(mG()||We.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:Aue(t.stackParser||Npe),integrations:_fe(t),transport:t.transport||upe};return Ofe(Whe,n)}const C6=new WeakMap,Qk=new Map,kb={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function oge(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:a,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:l}={traceFetch:kb.traceFetch,traceXHR:kb.traceXHR,trackFetchStreamPerformance:kb.trackFetchStreamPerformance,...t},c=typeof i=="function"?i:f=>!0,u=f=>uge(f,l),d={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(m=>{if(m.op==="http.client"){const p=Qk.get(m.span_id);p&&(m.timestamp=p/1e3,Qk.delete(m.span_id))}}),f)),a&&Che(f=>{if(f.response){const m=C6.get(f.response);m&&f.endTimestamp&&Qk.set(m,f.endTimestamp)}}),pG(f=>{const m=vhe(f,c,u,d);if(f.response&&f.fetchData.__span&&C6.set(f.response,f.fetchData.__span),m){const p=MG(f.fetchData.url),v=p?Wu(p).host:void 0;m.setAttributes({"http.url":p,"server.address":v})}o&&m&&_6(m)})),r&&TG(f=>{const m=dge(f,c,u,d);o&&m&&_6(m)})}function lge(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function _6(e){const{url:t}=mn(e).data||{};if(!t||typeof t!="string")return;const n=Ug("resource",({entries:r})=>{r.forEach(a=>{lge(a)&&a.name.endsWith(t)&&(cge(a).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function Ki(e=0){return((sa||performance.timeOrigin)+e)/1e3}function cge(e){const{name:t,version:n}=PG(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),sa?[...r,["http.request.redirect_start",Ki(e.redirectStart)],["http.request.fetch_start",Ki(e.fetchStart)],["http.request.domain_lookup_start",Ki(e.domainLookupStart)],["http.request.domain_lookup_end",Ki(e.domainLookupEnd)],["http.request.connect_start",Ki(e.connectStart)],["http.request.secure_connection_start",Ki(e.secureConnectionStart)],["http.request.connection_end",Ki(e.connectEnd)],["http.request.request_start",Ki(e.requestStart)],["http.request.response_start",Ki(e.responseStart)],["http.request.response_end",Ki(e.responseEnd)]]:r}function uge(e,t){const n=It.location&&It.location.href;if(n){let r,a;try{r=new URL(e,n),a=new URL(n).origin}catch{return!1}const i=r.origin===a;return t?Hu(r.toString(),t)||i&&Hu(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?Hu(e,t):r}}function dge(e,t,n,r){const a=e.xhr,i=a&&a[Uf];if(!a||a.__sentry_own_request__||!i)return;const o=Pc()&&t(i.url);if(e.endTimestamp&&o){const f=a.__sentry_xhr_span_id__;if(!f)return;const m=r[f];m&&i.status_code!==void 0&&(RW(m,i.status_code),m.end(),delete r[f]);return}const l=MG(i.url),c=l?Wu(l).host:void 0,u=!!Ns(),d=o&&u?hy({name:`${i.method} ${i.url}`,attributes:{type:"xhr","http.method":i.method,"http.url":l,url:i.url,"server.address":c,[Wr]:"auto.http.browser",[ld]:"http.client"}}):new Pm;return a.__sentry_xhr_span_id__=d.spanContext().spanId,r[a.__sentry_xhr_span_id__]=d,n(i.url)&&fge(a,Pc()&&u?d:void 0),d}
37function fge(e,t){const{"sentry-trace":n,baggage:r}=uG({span:t});n&&hge(e,n,r)}function hge(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader("baggage",n)}catch{}}function MG(e){try{return new URL(e,It.location.origin).href}catch{return}}function mge(){It&&It.document?It.document.addEventListener("visibilitychange",()=>{const e=Ns();if(!e)return;const t=vs(e);if(It.document.hidden&&t){const n="cancelled",{op:r,status:a}=mn(t);fo&&We.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),a||t.setStatus({code:Br,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):fo&&We.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const pge="BrowserTracing",gge={...jb,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...kb},xge=((e={})=>{bde();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:a,enableStandaloneClsSpans:i},beforeStartSpan:o,idleTimeout:l,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:f,traceXHR:m,trackFetchStreamPerformance:p,shouldCreateSpanForRequest:v,enableHTTPTimings:y,instrumentPageLoad:x,instrumentNavigation:w}={...gge,...e},N=Mme({recordClsStandaloneSpans:i||!1});t&&ope(),r&&an.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Dme():n&&Rme(),a&&Lme();const S={name:void 0,source:void 0};function _(k,C){const E=C.op==="pageload",O=o?o(C):C,P=O.attributes||{};C.name!==O.name&&(P[Go]="custom",O.attributes=P),S.name=O.name,S.source=P[Go];const R=nG(O,{idleTimeout:l,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:E,beforeSpanEnd:D=>{N(),Ume(D,{recordClsOnPageloadSpan:!i})}});function T(){["interactive","complete"].includes(It.document.readyState)&&k.emit("idleSpanEnableAutoFinish",R)}return E&&It.document&&(It.document.addEventListener("readystatechange",()=>{T()}),T()),R}return{name:pge,afterAllSetup(k){let C,E=It.location&&It.location.href;function O(){C&&!mn(C).timestamp&&(fo&&We.log(`[Tracing] Finishing current active span with op: ${mn(C).op}`),C.end())}k.on("startNavigationSpan",P=>{yn()===k&&(O(),C=_(k,{op:"navigation",...P}))}),k.on("startPageLoadSpan",(P,R={})=>
37{if(yn()!==k)return;O();const T=R.sentryTrace||A6("sentry-trace"),D=R.baggage||A6("baggage"),z=hde(T,D);Kn().setPropagationContext(z),C=_(k,{op:"pageload",...P})}),k.on("spanEnd",P=>{const R=mn(P).op;if(P!==vs(P)||R!=="navigation"&&R!=="pageload")return;const T=Kn(),D=T.getPropagationContext();T.setPropagationContext({...D,sampled:D.sampled!==void 0?D.sampled:Ed(P),dsc:D.dsc||Tm(P)})}),It.location&&(x&&yge(k,{name:It.location.pathname,startTime:sa?sa/1e3:void 0,attributes:{[Go]:"url",[Wr]:"auto.pageload.browser"}}),w&&xO(({to:P,from:R})=>{if(R===void 0&&E&&E.indexOf(P)!==-1){E=void 0;return}R!==P&&(E=void 0,vge(k,{name:It.location.pathname,attributes:{[Go]:"url",[Wr]:"auto.navigation.browser"}}))})),d&&mge(),a&&bge(l,c,u,S),t&&cpe(),oge(k,{traceFetch:f,traceXHR:m,trackFetchStreamPerformance:p,tracePropagationTargets:k.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:y})}}});function yge(e,t,n){e.emit("startPageLoadSpan",t,n),Kn().setTransactionName(t.name);const r=Ns();return(r&&mn(r).op)==="pageload"?r:void 0}function vge(e,t){bl().setPropagationContext({traceId:Ac()}),Kn().setPropagationContext({traceId:Ac()}),e.emit("startNavigationSpan",t),Kn().setTransactionName(t.name);const n=Ns();return(n&&mn(n).op)==="navigation"?n:void 0}function A6(e){const t=Fue(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function bge(e,t,n,r){let a;const i=()=>{const o="ui.action.click",l=Ns(),c=l&&vs(l);if(c){const u=mn(c).op;if(["navigation","pageload"].includes(u)){fo&&We.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`);return}}if(a&&(a.setAttribute(SP,"interactionInterrupted"),a.end(),a=void 0),!r.name){fo&&We.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`);return}a=nG({name:r.name,op:o,attributes:{[Go]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};It.document&&addEventListener("click",i,{once:!1,capture:!0})}var b=uy();const X=tn(b),yO=jue({__proto__:null,default:X},[b]);function wge(e){const t={...e};return cG(t,"react"),vfe("react",{version:b.version}),ige(t)}const jge="https://[email protected]/9";wge({dsn:jge,integrations:[xge()],tracesSampleRate:0,environment:"production",sendDefaultPii:!1});var Sv={},Zk={exports:{}},Vs={},Jk={exports:{}},e2={};/**
38 * @license React
39 * scheduler.production.min.js
40 *
41 * Copyright (c) Facebook, Inc. and its affiliates.
42 *
43 * This source code is licensed under the MIT license found in the
44 * LICENSE file in the root directory of this source tree.
45 */var E6;function Nge(){return E6||(E6=1,(function(e){function t(q,B){var L=q.length;q.push(B);e:for(;0<L;){var V=L-1>>>1,K=q[V];if(0<a(K,B))q[V]=B,q[L]=K,L=V;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var B=q[0],L=q.pop();if(L!==B){q[0]=L;e:for(var V=0,K=q.length,W=K>>>1;V<W;){var ie=2*(V+1)-1,ve=q[ie],ge=ie+1,J=q[ge];if(0>a(ve,L))ge<K&&0>a(J,ve)?(q[V]=J,q[ge]=L,V=ge):(q[V]=ve,q[ie]=L,V=ie);else if(ge<K&&0>a(J,L))q[V]=J,q[ge]=L,V=ge;else break e}}return B}function a(q,B){var L=q.sortIndex-B.sortIndex;return L!==0?L:q.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,m=3,p=!1,v=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(q){for(var B=n(u);B!==null;){if(B.callback===null)r(u);else if(B.startTime<=q)r(u),B.sortIndex=B.expirationTime,t(c,B);else break;B=n(u)}}function _(q){if(y=!1,S(q),!v)if(n(c)!==null)v=!0,U(k);else{var B=n(u);B!==null&&H(_,B.startTime-q)}}function k(q,B){v=!1,y&&(y=!1,w(O),O=-1),p=!0;var L=m;try{for(S(B),f=n(c);f!==null&&(!(f.expirationTime>B)||q&&!T());){var V=f.callback;if(typeof V=="function"){f.callback=null,m=f.priorityLevel;var K=V(f.expirationTime<=B);B=e.unstable_now(),typeof K=="function"?f.callback=K:f===n(c)&&r(c),S(B)}else r(c);f=n(c)}if(f!==null)var W=!0;else{var ie=n(u);ie!==null&&H(_,ie.startTime-B),W=!1}return W}finally{f=null,m=L,p=!1}}var C=!1,E=null,O=-1,P=5,R=-1;function T(){return!(e.unstable_now()-R<P)}function D(){if(E!==null){var q=e.unstable_now();R=q;var B=!0;try{B=E(!0,q)}finally{B?z():(C=!1,E=null)}}else C=!1}var z;if(typeof N=="function")z=function(){N(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,F=I.port2;I.port1.onmessage=D,z=function(){F.postMessage(null)}}
vendor: 50,789 bytes, lines 45-58
45else z=function(){x(D,0)};function U(q){E=q,C||(C=!0,z())}function H(q,B){O=x(function(){q(e.unstable_now())},B)}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(q){q.callback=null},e.unstable_continueExecution=function(){v||p||(v=!0,U(k))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(q){switch(m){case 1:case 2:case 3:var B=3;break;default:B=m}var L=m;m=B;try{return q()}finally{m=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,B){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var L=m;m=q;try{return B()}finally{m=L}},e.unstable_scheduleCallback=function(q,B,L){var V=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?V+L:V):L=V,q){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=L+K,q={id:d++,callback:B,priorityLevel:q,startTime:L,expirationTime:K,sortIndex:-1},L>V?(q.sortIndex=L,t(u,q),n(c)===null&&q===n(u)&&(y?(w(O),O=-1):y=!0,H(_,L-V))):(q.sortIndex=K,t(c,q),v||p||(v=!0,U(k))),q},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(q){var B=m;return function(){var L=m;m=B;try{return q.apply(this,arguments)}finally{m=L}}}})(e2)),e2}var P6;function Sge(){return P6||(P6=1,Jk.exports=Nge()),Jk.exports}/**
46 * @license React
47 * react-dom.production.min.js
48 *
49 * Copyright (c) Facebook, Inc. and its affiliates.
50 *
51 * This source code is licensed under the MIT license found in the
52 * LICENSE file in the root directory of this source tree.
53 */var T6;function kge(){if(T6)return Vs;T6=1;var e=uy(),t=Sge();function n(h){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+h,j=1;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j]);return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,a={};function i(h,g){o(h,g),o(h+"Capture",g)}function o(h,g){for(a[h]=g,h=0;h<g.length;h++)r.add(g[h])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},f={};function m(h){return c.call(f,h)?!0:c.call(d,h)?!1:u.test(h)?f[h]=!0:(d[h]=!0,!1)}function p(h,g,j,A){if(j!==null&&j.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return A?!1:j!==null?!j.acceptsBooleans:(h=h.toLowerCase().slice(0,5),h!=="data-"&&h!=="aria-");default:return!1}}function v(h,g,j,A){if(g===null||typeof g>"u"||p(h,g,j,A))return!0;if(A)return!1;if(j!==null)switch(j.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function y(h,g,j,A,M,$,G){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=A,this.attributeNamespace=M,this.mustUseProperty=j,this.propertyName=h,this.type=g,this.sanitizeURL=$,this.removeEmptyString=G}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(h){x[h]=new y(h,0,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var g=h[0];x[g]=new y(g,1,!1,h[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){x[h]=new y(h,2,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){x[h]=new y(h,2,!1,h,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(h){x[h]=new y(h,3,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){x[h]=new y(h,3,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){x[h]=new y(h,4,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){x[h]=new y(h,6,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){x[h]=new y(h,5,!1,h.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function N(h){return h[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(h){var g=h.replace(w,N);x[g]=new y(g,1,!1,h,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(h){var g=h.replace(w,N);x[g]=new y(g,1,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var g=h.replace(w,N);x[g]=new y(g,1,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){x[h]=new y(h,1,!1,h.toLowerCase(),null,!1,!1)}),x.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){x[h]=new y(h,1,!1,h.toLowerCase(),null,!0,!0)});function S(h,g,j,A){var M=x.hasOwnProperty(g)?x[g]:null;(M!==null?M.type!==0:A||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(v(g,j,M,A)&&(j=null),A||M===null?m(g)&&(j===null?h.removeAttribute(g):h.setAttribute(g,""+j)):M.mustUseProperty?h[M.propertyName]=j===null?M.type===3?!1:"":j:(g=M.attributeName,A=M.attributeNamespace,j===null?h.removeAttribute(g):(M=M.type,j=M===3||M===4&&j===!0?"":""+j,A?h.setAttributeNS(A,g,j):h.setAttribute(g,j))))}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),H=Symbol.for("react.offscreen"),q=Symbol.iterator;function B(h){return h===null||typeof h!="object"?null:(h=q&&h[q]||h["@@iterator"],typeof h=="function"?h:null)}var L=Object.assign,V;function K(h){if(V===void 0)try{throw Error()}catch(j){var g=j.stack.trim().match(/\n( *(at )?)/);V=g&&g[1]||""}return`
54`+V+h}var W=!1;function ie(h,g){if(!h||W)return"";W=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(Ne){var A=Ne}Reflect.construct(h,[],g)}else{try{g.call()}catch(Ne){A=Ne}h.call(g.prototype)}else{try{throw Error()}catch(Ne){A=Ne}h()}}catch(Ne){if(Ne&&A&&typeof Ne.stack=="string"){for(var M=Ne.stack.split(`
55`),$=A.stack.split(`
56`),G=M.length-1,ee=$.length-1;1<=G&&0<=ee&&M[G]!==$[ee];)ee--;for(;1<=G&&0<=ee;G--,ee--)if(M[G]!==$[ee]){if(G!==1||ee!==1)do if(G--,ee--,0>ee||M[G]!==$[ee]){var ce=`
57`+M[G].replace(" at new "," at ");return h.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",h.displayName)),ce}while(1<=G&&0<=ee);break}}}finally{W=!1,Error.prepareStackTrace=j}return(h=h?h.displayName||h.name:"")?K(h):""}function ve(h){switch(h.tag){case 5:return K(h.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return h=ie(h.type,!1),h;case 11:return h=ie(h.type.render,!1),h;case 1:return h=ie(h.type,!0),h;default:return""}}function ge(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case E:return"Fragment";case C:return"Portal";case P:return"Profiler";case O:return"StrictMode";case z:return"Suspense";case I:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case T:return(h.displayName||"Context")+".Consumer";case R:return(h._context.displayName||"Context")+".Provider";case D:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case F:return g=h.displayName||null,g!==null?g:ge(h.type)||"Memo";case U:g=h._payload,h=h._init;try{return ge(h(g))}catch{}}return null}function J(h){var g=h.type;switch(h.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=g.render,h=h.displayName||h.name||"",g.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(g);case 8:return g===O?"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 g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ne(h){switch(typeof h){case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function Z(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function oe(h){var g=Z(h)?"checked":"value",j=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),A=""+h[g];if(!h.hasOwnProperty(g)&&typeof j<"u"&&typeof j.get=="function"&&typeof j.set=="function"){var M=j.get,$=j.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return M.call(this)},set:function(G){A=""+G,$.call(this,G)}}),Object.defineProperty(h,g,{enumerable:j.enumerable}),{getValue:function(){return A},setValue:function(G){A=""+G},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function he(h){h._valueTracker||(h._valueTracker=oe(h))}function Q(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var j=g.getValue(),A="";return h&&(A=Z(h)?h.checked?"true":"false":h.value),h=A,h!==j?(g.setValue(h),!0):!1}function ae(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}function fe(h,g){var j=g.checked;return L({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:j??h._wrapperState.initialChecked})}function Ee(h,g){var j=g.defaultValue==null?"":g.defaultValue,A=g.checked!=null?g.checked:g.defaultChecked;j=ne(g.value!=null?g.value:j),h._wrapperState={initialChecked:A,initialValue:j,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function Re(h,g){g=g.checked,g!=null&&S(h,"checked",g,!1)}function qe(h,g){Re(h,g);var j=ne(g.value),A=g.type;if(j!=null)A==="number"?(j===0&&h.value===""||h.value!=j)&&(h.value=""+j):h.value!==""+j&&(h.value=""+j);else if(A==="submit"||A==="reset"){h.removeAttribute("value");return}g.hasOwnProperty("value")?Ut(h,g.type,j):g.hasOwnProperty("defaultValue")&&Ut(h,g.type,ne(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(h.defaultChecked=!!g.defaultChecked)}function St(h,g,j){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var A=g.type;if(!(A!=="submit"&&A!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+h._wrapperState.initialValue,j||g===h.value||(h.value=g),h.defaultValue=g}j=h.name,j!==""&&(h.name=""),h.defaultChecked=!!h._wrapperState.initialChecked,j!==""&&(h.name=j)}function Ut(h,g,j){(g!=="number"||ae(h.ownerDocument)!==h)&&(j==null?h.defaultValue=""+h._wrapperState.initialValue:h.defaultValue!==""+j&&(h.defaultValue=""+j))}var Yt=Array.isArray;function Ue(h,g,j,A){if(h=h.options,g){g={};for(var M=0;M<j.length;M++)g["$"+j[M]]=!0;for(j=0;j<h.length;j++)M=g.hasOwnProperty("$"+h[j].value),h[j].selected!==M&&(h[j].selected=M),M&&A&&(h[j].defaultSelected=!0)}else{for(j=""+ne(j),g=null,M=0;M<h.length;M++){if(h[M].value===j){h[M].selected=!0,A&&(h[M].defaultSelected=!0);return}g!==null||h[M].disabled||(g=h[M])}g!==null&&(g.selected=!0)}}function wt(h,g){if(g.dangerouslySetInnerHTML!=null)throw Error(n(91));return L({},g,{value:void 0,defaultValue:void 0,children:""+h._wrapperState.initialValue})}function At(h,g){var j=g.value;if(j==null){if(j=g.children,g=g.defaultValue,j!=null){if(g!=null)throw Error(n(92));if(Yt(j)){if(1<j.length)throw Error(n(93));j=j[0]}g=j}g==null&&(g=""),j=g}h._wrapperState={initialValue:ne(j)}}function cn(h,g){var j=ne(g.value),A=ne(g.defaultValue);j!=null&&(j=""+j,j!==h.value&&(h.value=j),g.defaultValue==null&&h.defaultValue!==j&&(h.defaultValue=j)),A!=null&&(h.defaultValue=""+A)}function vn(h){var g=h.textContent;g===h._wrapperState.initialValue&&g!==""&&g!==null&&(h.value=g)}function ye(h){switch(h){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 Ae(h,g){return h==null||h==="http://www.w3.org/1999/xhtml"?ye(g):h==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":h}var st,jt=(function(h){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,j,A,M){MSApp.execUnsafeLocalFunction(function(){return h(g,j,A,M)})}:h})(function(h,g){if(h.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in h)h.innerHTML=g;else{for(st=st||document.createElement("div"),st.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=st.firstChild;h.firstChild;)h.removeChild(h.firstChild);for(;g.firstChild;)h.appendChild(g.firstChild)}});function pt(h,g){if(g){var j=h.firstChild;if(j&&j===h.lastChild&&j.nodeType===3){j.nodeValue=g;return}}h.textContent=g}var jn={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},gr=["Webkit","ms","Moz","O"];Object.keys(jn).forEach(function(h){gr.forEach(function(g){g=g+h.charAt(0).toUpperCase()+h.substring(1),jn[g]=jn[h]})});function Mn(h,g,j){return g==null||typeof g=="boolean"||g===""?"":j||typeof g!="number"||g===0||jn.hasOwnProperty(h)&&jn[h]?(""+g).trim():g+"px"}function dr(h,g){h=h.style;for(var j in g)if(g.hasOwnProperty(j)){var A=j.indexOf("--")===0,M=Mn(j,g[j],A);j==="float"&&(j="cssFloat"),A?h.setProperty(j,M):h[j]=M}}var ls=L({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 un(h,g){if(g){if(ls[h]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(n(137,h));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(n(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(n(61))}if(g.style!=null&&typeof g.style!="object")throw Error(n(62))}}function Dr(h,g){if(h.indexOf("-")===-1)return typeof g.is=="string";switch(h){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 _n=null;function oa(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var Pa=null,cs=null,Xr=null;function pe(h){if(h=Cp(h)){if(typeof Pa!="function")throw Error(n(280));var g=h.stateNode;g&&(g=_0(g),Pa(h.stateNode,h.type,g))}}function Fe(h){cs?Xr?Xr.push(h):Xr=[h]:cs=h}function Ce(){if(cs){var h=cs,g=Xr;if(Xr=cs=null,pe(h),g)for(h=0;h<g.length;h++)pe(g[h])}}function De(h,g){return h(g)}function Ke(){}var Ht=!1;function Xt(h,g,j){if(Ht)return h(g,j);Ht=!0;try{return De(h,g,j)}finally{Ht=!1,(cs!==null||Xr!==null)&&(Ke(),Ce())}}function Lt(h,g){var j=h.stateNode;if(j===null)return null;var A=_0(j);if(A===null)return null;j=A[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(A=!A.disabled)||(h=h.type,A=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!A;break e;default:h=!1}if(h)return null;if(j&&typeof j!="function")throw Error(n(231,g,typeof j));return j}var An=!1;if(l)try{var Un={};Object.defineProperty(Un,"passive",{get:function(){An=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{An=!1}function bt(h,g,j,A,M,$,G,ee,ce){var Ne=Array.prototype.slice.call(arguments,3);try{g.apply(j,Ne)}catch(Ie){this.onError(Ie)}}var ko=!1,Qr=null,Al=!1,ap=null,KN={onError:function(h){ko=!0,Qr=h}};function YN(h,g,j,A,M,$,G,ee,ce){ko=!1,Qr=null,bt.apply(KN,arguments)}function XN(h,g,j,A,M,$,G,ee,ce){if(YN.apply(this,arguments),ko){if(ko){var Ne=Qr;ko=!1,Qr=null}else throw Error(n(198));Al||(Al=!0,ap=Ne)}}function Ui(h){var g=h,j=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(j=g.return),h=g.return;while(h)}return g.tag===3?j:null}function ip(h){if(h.tag===13){var g=h.memoizedState;if(g===null&&(h=h.alternate,h!==null&&(g=h.memoizedState)),g!==null)return g.dehydrated}return null}function op(h){if(Ui(h)!==h)throw Error(n(188))}function QN(h){var g=h.alternate;if(!g){if(g=Ui(h),g===null)throw Error(n(188));return g!==h?null:h}for(var j=h,A=g;;){var M=j.return;if(M===null)break;var $=M.alternate;if($===null){if(A=M.return,A!==null){j=A;continue}break}if(M.child===$.child){for($=M.child;$;){if($===j)return op(M),h;if($===A)return op(M),g;$=$.sibling}throw Error(n(188))}if(j.return!==A.return)j=M,A=$;else{for(var G=!1,ee=M.child;ee;){if(ee===j){G=!0,j=M,A=$;break}if(ee===A){G=!0,A=M,j=$;break}ee=ee.sibling}if(!G){for(ee=$.child;ee;){if(ee===j){G=!0,j=$,A=M;break}if(ee===A){G=!0,A=$,j=M;break}ee=ee.sibling}if(!G)throw Error(n(189))}}if(j.alternate!==A)throw Error(n(190))}if(j.tag!==3)throw Error(n(188));return j.stateNode.current===j?h:g}function s0(h){return h=QN(h),h!==null?a0(h):null}function a0(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var g=a0(h);if(g!==null)return g;h=h.sibling}return null}var i0=t.unstable_scheduleCallback,o0=t.unstable_cancelCallback,ZN=t.unstable_shouldYield,l0=t.unstable_requestPaint,Xn=t.unstable_now,JN=t.unstable_getCurrentPriorityLevel,lp=t.unstable_ImmediatePriority,c0=t.unstable_UserBlockingPriority,Xd=t.unstable_NormalPriority,eS=t.unstable_LowPriority,u0=t.unstable_IdlePriority,Jc=null,Ta=null;function tS(h){if(Ta&&typeof Ta.onCommitFiberRoot=="function")try{Ta.onCommitFiberRoot(Jc,h,void 0,(h.current.flags&128)===128)}catch{}}var la=Math.clz32?Math.clz32:sS,nS=Math.log,rS=Math.LN2;function sS(h){return h>>>=0,h===0?32:31-(nS(h)/rS|0)|0}var Qd=64,Zd=4194304;function Hi(h){switch(h&-h){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 h&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Jd(h,g){var j=h.pendingLanes;if(j===0)return 0;var A=0,M=h.suspendedLanes,$=h.pingedLanes,G=j&268435455;if(G!==0){var ee=G&~M;ee!==0?A=Hi(ee):($&=G,$!==0&&(A=Hi($)))}else G=j&~M,G!==0?A=Hi(G):$!==0&&(A=Hi($));if(A===0)return 0;if(g!==0&&g!==A&&(g&M)===0&&(M=A&-A,$=g&-g,M>=$||M===16&&($&4194240)!==0))return g;if((A&4)!==0&&(A|=j&16),g=h.entangledLanes,g!==0)for(h=h.entanglements,g&=A;0<g;)j=31-la(g),M=1<<j,A|=h[j],g&=~M;return A}function aS(h,g){switch(h){case 1:case 2:case 4:return g+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 g+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 iS(h,g){for(var j=h.suspendedLanes,A=h.pingedLanes,M=h.expirationTimes,$=h.pendingLanes;0<$;){var G=31-la($),ee=1<<G,ce=M[G];ce===-1?((ee&j)===0||(ee&A)!==0)&&(M[G]=aS(ee,g)):ce<=g&&(h.expiredLanes|=ee),$&=~ee}}function eu(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function d0(){var h=Qd;return Qd<<=1,(Qd&4194240)===0&&(Qd=64),h}function cp(h){for(var g=[],j=0;31>j;j++)g.push(h);return g}function El(h,g,j){h.pendingLanes|=g,g!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,g=31-la(g),h[g]=j}function Ble(h,g){var j=h.pendingLanes&~g;h.pendingLanes=g,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=g,h.mutableReadLanes&=g,h.entangledLanes&=g,g=h.entanglements;var A=h.eventTimes;for(h=h.expirationTimes;0<j;){var M=31-la(j),$=1<<M;g[M]=0,A[M]=-1,h[M]=-1,j&=~$}}function oS(h,g){var j=h.entangledLanes|=g;for(h=h.entanglements;j;){var A=31-la(j),M=1<<A;M&g|h[A]&g&&(h[A]|=g),j&=~M}}var gn=0;function o5(h){return h&=-h,1<h?4<h?(h&268435455)!==0?16:536870912:4:1}var l5,lS,c5,u5,d5,cS=!1,f0=[],Pl=null,Tl=null,Il=null,up=new Map,dp=new Map,Ol=[],Ule="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 f5(h,g){switch(h){case"focusin":case"focusout":Pl=null;break;case"dragenter":case"dragleave":Tl=null;break;case"mouseover":case"mouseout":Il=null;break;case"pointerover":case"pointerout":up.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":dp.delete(g.pointerId)}}function fp(h,g,j,A,M,$){return h===null||h.nativeEvent!==$?(h={blockedOn:g,domEventName:j,eventSystemFlags:A,nativeEvent:$,targetContainers:[M]},g!==null&&(g=Cp(g),g!==null&&lS(g)),h):(h.eventSystemFlags|=A,g=h.targetContainers,M!==null&&g.indexOf(M)===-1&&g.push(M),h)}function Hle(h,g,j,A,M){switch(g){case"focusin":return Pl=fp(Pl,h,g,j,A,M),!0;case"dragenter":return Tl=fp(Tl,h,g,j,A,M),!0;case"mouseover":return Il=fp(Il,h,g,j,A,M),!0;case"pointerover":var $=M.pointerId;return up.set($,fp(up.get($)||null,h,g,j,A,M)),!0;case"gotpointercapture":return $=M.pointerId,dp.set($,fp(dp.get($)||null,h,g,j,A,M)),!0}return!1}function h5(h){var g=tu(h.target);if(g!==null){var j=Ui(g);if(j!==null){if(g=j.tag,g===13){if(g=ip(j),g!==null){h.blockedOn=g,d5(h.priority,function(){c5(j)});return}}else if(g===3&&j.stateNode.current.memoizedState.isDehydrated){h.blockedOn=j.tag===3?j.stateNode.containerInfo:null;return}}}h.blockedOn=null}function h0(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var j=dS(h.domEventName,h.eventSystemFlags,g[0],h.nativeEvent);if(j===null){j=h.nativeEvent;var A=new j.constructor(j.type,j);_n=A,j.target.dispatchEvent(A),_n=null}else return g=Cp(j),g!==null&&lS(g),h.blockedOn=j,!1;g.shift()}return!0}function m5(h,g,j){h0(h)&&j.delete(g)}function qle(){cS=!1,Pl!==null&&h0(Pl)&&(Pl=null),Tl!==null&&h0(Tl)&&(Tl=null),Il!==null&&h0(Il)&&(Il=null),up.forEach(m5),dp.forEach(m5)}function hp(h,g){h.blockedOn===g&&(h.blockedOn=null,cS||(cS=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qle)))}function mp(h){function g(M){return hp(M,h)}if(0<f0.length){hp(f0[0],h);for(var j=1;j<f0.length;j++){var A=f0[j];A.blockedOn===h&&(A.blockedOn=null)}}for(Pl!==null&&hp(Pl,h),Tl!==null&&hp(Tl,h),Il!==null&&hp(Il,h),up.forEach(g),dp.forEach(g),j=0;j<Ol.length;j++)A=Ol[j],A.blockedOn===h&&(A.blockedOn=null);for(;0<Ol.length&&(j=Ol[0],j.blockedOn===null);)h5(j),j.blockedOn===null&&Ol.shift()}var ef=_.ReactCurrentBatchConfig,m0=!0;function Vle(h,g,j,A){var M=gn,$=ef.transition;ef.transition=null;try{gn=1,uS(h,g,j,A)}finally{gn=M,ef.transition=$}}function Wle(h,g,j,A){var M=gn,$=ef.transition;ef.transition=null;try{gn=4,uS(h,g,j,A)}finally{gn=M,ef.transition=$}}function uS(h,g,j,A){if(m0){var M=dS(h,g,j,A);if(M===null)AS(h,g,A,p0,j),f5(h,A);else if(Hle(M,h,g,j,A))A.stopPropagation();else if(f5(h,A),g&4&&-1<Ule.indexOf(h)){for(;M!==null;){var $=Cp(M);if($!==null&&l5($),$=dS(h,g,j,A),$===null&&AS(h,g,A,p0,j),$===M)break;M=$}M!==null&&A.stopPropagation()}else AS(h,g,A,null,j)}}var p0=null;function dS(h,g,j,A){if(p0=null,h=oa(A),h=tu(h),h!==null)if(g=Ui(h),g===null)h=null;else if(j=g.tag,j===13){if(h=ip(g),h!==null)return h;h=null}else if(j===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null);return p0=h,null}function p5(h){switch(h){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(JN()){case lp:return 1;case c0:return 4;case Xd:case eS:return 16;case u0:return 536870912;default:return 16}default:return 16}}var Ml=null,fS=null,g0=null;function g5(){if(g0)return g0;var h,g=fS,j=g.length,A,M="value"in Ml?Ml.value:Ml.textContent,$=M.length;for(h=0;h<j&&g[h]===M[h];h++);var G=j-h;for(A=1;A<=G&&g[j-A]===M[$-A];A++);return g0=M.slice(h,1<A?1-A:void 0)}function x0(h){var g=h.keyCode;return"charCode"in h?(h=h.charCode,h===0&&g===13&&(h=13)):h=g,h===10&&(h=13),32<=h||h===13?h:0}function y0(){return!0}function x5(){return!1}function ca(h){function g(j,A,M,$,G){this._reactName=j,this._targetInst=M,this.type=A,this.nativeEvent=$,this.target=G,this.currentTarget=null;for(var ee in h)h.hasOwnProperty(ee)&&(j=h[ee],this[ee]=j?j($):$[ee]);return this.isDefaultPrevented=($.defaultPrevented!=null?$.defaultPrevented:$.returnValue===!1)?y0:x5,this.isPropagationStopped=x5,this}return L(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var j=this.nativeEvent;j&&(j.preventDefault?j.preventDefault():typeof j.returnValue!="unknown"&&(j.returnValue=!1),this.isDefaultPrevented=y0)},stopPropagation:function(){var j=this.nativeEvent;j&&(j.stopPropagation?j.stopPropagation():typeof j.cancelBubble!="unknown"&&(j.cancelBubble=!0),this.isPropagationStopped=y0)},persist:function(){},isPersistent:y0}),g}var tf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hS=ca(tf),pp=L({},tf,{view:0,detail:0}),Gle=ca(pp),mS,pS,gp,v0=L({},pp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xS,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==gp&&(gp&&h.type==="mousemove"?(mS=h.screenX-gp.screenX,pS=h.screenY-gp.screenY):pS=mS=0,gp=h),mS)},movementY:function(h){return"movementY"in h?h.movementY:pS}}),y5=ca(v0),Kle=L({},v0,{dataTransfer:0}),Yle=ca(Kle),Xle=L({},pp,{relatedTarget:0}),gS=ca(Xle),Qle=L({},tf,{animationName:0,elapsedTime:0,pseudoElement:0}),Zle=ca(Qle),Jle=L({},tf,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),ece=ca(Jle),tce=L({},tf,{data:0}),v5=ca(tce),nce={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rce={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"},sce={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ace(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=sce[h])?!!g[h]:!1}function xS(){return ace}var ice=L({},pp,{key:function(h){if(h.key){var g=nce[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=x0(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?rce[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xS,charCode:function(h){return h.type==="keypress"?x0(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?x0(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),oce=ca(ice),lce=L({},v0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),b5=ca(lce),cce=L({},pp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xS}),uce=ca(cce),dce=L({},tf,{propertyName:0,elapsedTime:0,pseudoElement:0}),fce=ca(dce),hce=L({},v0,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),mce=ca(hce),pce=[9,13,27,32],yS=l&&"CompositionEvent"in window,xp=null;l&&"documentMode"in document&&(xp=document.documentMode);var gce=l&&"TextEvent"in window&&!xp,w5=l&&(!yS||xp&&8<xp&&11>=xp),j5=" ",N5=!1;function S5(h,g){switch(h){case"keyup":return pce.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k5(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var nf=!1;function xce(h,g){switch(h){case"compositionend":return k5(g);case"keypress":return g.which!==32?null:(N5=!0,j5);case"textInput":return h=g.data,h===j5&&N5?null:h;default:return null}}function yce(h,g){if(nf)return h==="compositionend"||!yS&&S5(h,g)?(h=g5(),g0=fS=Ml=null,nf=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return w5&&g.locale!=="ko"?null:g.data;default:return null}}var vce={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 C5(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!vce[h.type]:g==="textarea"}function _5(h,g,j,A){Fe(A),g=S0(g,"onChange"),0<g.length&&(j=new hS("onChange","change",null,j,A),h.push({event:j,listeners:g}))}var yp=null,vp=null;function bce(h){V5(h,0)}function b0(h){var g=lf(h);if(Q(g))return h}function wce(h,g){if(h==="change")return g}var A5=!1;if(l){var vS;if(l){var bS="oninput"in document;if(!bS){var E5=document.createElement("div");E5.setAttribute("oninput","return;"),bS=typeof E5.oninput=="function"}vS=bS}else vS=!1;A5=vS&&(!document.documentMode||9<document.documentMode)}function P5(){yp&&(yp.detachEvent("onpropertychange",T5),vp=yp=null)}function T5(h){if(h.propertyName==="value"&&b0(vp)){var g=[];_5(g,vp,h,oa(h)),Xt(bce,g)}}function jce(h,g,j){h==="focusin"?(P5(),yp=g,vp=j,yp.attachEvent("onpropertychange",T5)):h==="focusout"&&P5()}function Nce(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return b0(vp)}function Sce(h,g){if(h==="click")return b0(g)}function kce(h,g){if(h==="input"||h==="change")return b0(g)}function Cce(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var mi=typeof Object.is=="function"?Object.is:Cce;function bp(h,g){if(mi(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var j=Object.keys(h),A=Object.keys(g);if(j.length!==A.length)return!1;for(A=0;A<j.length;A++){var M=j[A];if(!c.call(g,M)||!mi(h[M],g[M]))return!1}return!0}function I5(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function O5(h,g){var j=I5(h);h=0;for(var A;j;){if(j.nodeType===3){if(A=h+j.textContent.length,h<=g&&A>=g)return{node:j,offset:g-h};h=A}e:{for(;j;){if(j.nextSibling){j=j.nextSibling;break e}j=j.parentNode}j=void 0}j=I5(j)}}function M5(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?M5(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function R5(){for(var h=window,g=ae();g instanceof h.HTMLIFrameElement;){try{var j=typeof g.contentWindow.location.href=="string"}catch{j=!1}if(j)h=g.contentWindow;else break;g=ae(h.document)}return g}function wS(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g&&(g==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||g==="textarea"||h.contentEditable==="true")}function _ce(h){var g=R5(),j=h.focusedElem,A=h.selectionRange;if(g!==j&&j&&j.ownerDocument&&M5(j.ownerDocument.documentElement,j)){if(A!==null&&wS(j)){if(g=A.start,h=A.end,h===void 0&&(h=g),"selectionStart"in j)j.selectionStart=g,j.selectionEnd=Math.min(h,j.value.length);else if(h=(g=j.ownerDocument||document)&&g.defaultView||window,h.getSelection){h=h.getSelection();var M=j.textContent.length,$=Math.min(A.start,M);A=A.end===void 0?$:Math.min(A.end,M),!h.extend&&$>A&&(M=A,A=$,$=M),M=O5(j,$);var G=O5(j,A);M&&G&&(h.rangeCount!==1||h.anchorNode!==M.node||h.anchorOffset!==M.offset||h.focusNode!==G.node||h.focusOffset!==G.offset)&&(g=g.createRange(),g.setStart(M.node,M.offset),h.removeAllRanges(),$>A?(h.addRange(g),h.extend(G.node,G.offset)):(g.setEnd(G.node,G.offset),h.addRange(g)))}}for(g=[],h=j;h=h.parentNode;)h.nodeType===1&&g.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<g.length;j++)h=g[j],h.element.scrollLeft=h.left,h.element.scrollTop=h.top}}var Ace=l&&"documentMode"in document&&11>=document.documentMode,rf=null,jS=null,wp=null,NS=!1;function D5(h,g,j){var A=j.window===j?j.document:j.nodeType===9?j:j.ownerDocument;NS||rf==null||rf!==ae(A)||(A=rf,"selectionStart"in A&&wS(A)?A={start:A.selectionStart,end:A.selectionEnd}:(A=(A.ownerDocument&&A.ownerDocument.defaultView||window).getSelection(),A={anchorNode:A.anchorNode,anchorOffset:A.anchorOffset,focusNode:A.focusNode,focusOffset:A.focusOffset}),wp&&bp(wp,A)||(wp=A,A=S0(jS,"onSelect"),0<A.length&&(g=new hS("onSelect","select",null,g,j),h.push({event:g,listeners:A}),g.target=rf)))}function w0(h,g){var j={};return j[h.toLowerCase()]=g.toLowerCase(),j["Webkit"+h]="webkit"+g,j["Moz"+h]="moz"+g,j}var sf={animationend:w0("Animation","AnimationEnd"),animationiteration:w0("Animation","AnimationIteration"),animationstart:w0("Animation","AnimationStart"),transitionend:w0("Transition","TransitionEnd")},SS={},L5={};l&&(L5=document.createElement("div").style,"AnimationEvent"in window||(delete sf.animationend.animation,delete sf.animationiteration.animation,delete sf.animationstart.animation),"TransitionEvent"in window||delete sf.transitionend.transition);function j0(h){if(SS[h])return SS[h];if(!sf[h])return h;var g=sf[h],j;for(j in g)if(g.hasOwnProperty(j)&&j in L5)return SS[h]=g[j];return h}var $5=j0("animationend"),F5=j0("animationiteration"),z5=j0("animationstart"),B5=j0("transitionend"),U5=new Map,H5="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 Rl(h,g){U5.set(h,g),i(g,[h])}for(var kS=0;kS<H5.length;kS++){var CS=H5[kS],Ece=CS.toLowerCase(),Pce=CS[0].toUpperCase()+CS.slice(1);Rl(Ece,"on"+Pce)}Rl($5,"onAnimationEnd"),Rl(F5,"onAnimationIteration"),Rl(z5,"onAnimationStart"),Rl("dblclick","onDoubleClick"),Rl("focusin","onFocus"),Rl("focusout","onBlur"),Rl(B5,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jp="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(" "),Tce=new Set("cancel close invalid load scroll toggle".split(" ").concat(jp));function q5(h,g,j){var A=h.type||"unknown-event";h.currentTarget=j,XN(A,g,void 0,h),h.currentTarget=null}function V5(h,g){g=(g&4)!==0;for(var j=0;j<h.length;j++){var A=h[j],M=A.event;A=A.listeners;e:{var $=void 0;if(g)for(var G=A.length-1;0<=G;G--){var ee=A[G],ce=ee.instance,Ne=ee.currentTarget;if(ee=ee.listener,ce!==$&&M.isPropagationStopped())break e;q5(M,ee,Ne),$=ce}else for(G=0;G<A.length;G++){if(ee=A[G],ce=ee.instance,Ne=ee.currentTarget,ee=ee.listener,ce!==$&&M.isPropagationStopped())break e;q5(M,ee,Ne),$=ce}}}if(Al)throw h=ap,Al=!1,ap=null,h}function Rn(h,g){var j=g[MS];j===void 0&&(j=g[MS]=new Set);var A=h+"__bubble";j.has(A)||(W5(g,h,2,!1),j.add(A))}function _S(h,g,j){var A=0;g&&(A|=4),W5(j,h,A,g)}var N0="_reactListening"+Math.random().toString(36).slice(2);function Np(h){if(!h[N0]){h[N0]=!0,r.forEach(function(j){j!=="selectionchange"&&(Tce.has(j)||_S(j,!1,h),_S(j,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[N0]||(g[N0]=!0,_S("selectionchange",!1,g))}}function W5(h,g,j,A){switch(p5(g)){case 1:var M=Vle;break;case 4:M=Wle;break;default:M=uS}j=M.bind(null,g,j,h),M=void 0,!An||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(M=!0),A?M!==void 0?h.addEventListener(g,j,{capture:!0,passive:M}):h.addEventListener(g,j,!0):M!==void 0?h.addEventListener(g,j,{passive:M}):h.addEventListener(g,j,!1)}function AS(h,g,j,A,M){var $=A;if((g&1)===0&&(g&2)===0&&A!==null)e:for(;;){if(A===null)return;var G=A.tag;if(G===3||G===4){var ee=A.stateNode.containerInfo;if(ee===M||ee.nodeType===8&&ee.parentNode===M)break;if(G===4)for(G=A.return;G!==null;){var ce=G.tag;if((ce===3||ce===4)&&(ce=G.stateNode.containerInfo,ce===M||ce.nodeType===8&&ce.parentNode===M))return;G=G.return}for(;ee!==null;){if(G=tu(ee),G===null)return;if(ce=G.tag,ce===5||ce===6){A=$=G;continue e}ee=ee.parentNode}}A=A.return}Xt(function(){var Ne=$,Ie=oa(j),Me=[];e:{var Te=U5.get(h);if(Te!==void 0){var Ge=hS,Qe=h;switch(h){case"keypress":if(x0(j)===0)break e;case"keydown":case"keyup":Ge=oce;break;case"focusin":Qe="focus",Ge=gS;break;case"focusout":Qe="blur",Ge=gS;break;case"beforeblur":case"afterblur":Ge=gS;break;case"click":if(j.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ge=y5;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ge=Yle;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ge=uce;break;case $5:case F5:case z5:Ge=Zle;break;case B5:Ge=fce;break;case"scroll":Ge=Gle;break;case"wheel":Ge=mce;break;case"copy":case"cut":case"paste":Ge=ece;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ge=b5}var et=(g&4)!==0,fr=!et&&h==="scroll",be=et?Te!==null?Te+"Capture":null:Te;et=[];for(var ue=Ne,je;ue!==null;){je=ue;var $e=je.stateNode;if(je.tag===5&&$e!==null&&(je=$e,be!==null&&($e=Lt(ue,be),$e!=null&&et.push(Sp(ue,$e,je)))),fr)break;ue=ue.return}0<et.length&&(Te=new Ge(Te,Qe,null,j,Ie),Me.push({event:Te,listeners:et}))}}if((g&7)===0){e:{if(Te=h==="mouseover"||h==="pointerover",Ge=h==="mouseout"||h==="pointerout",Te&&j!==_n&&(Qe=j.relatedTarget||j.fromElement)&&(tu(Qe)||Qe[Co]))break e;if((Ge||Te)&&(Te=Ie.window===Ie?Ie:(Te=Ie.ownerDocument)?Te.defaultView||Te.parentWindow:window,Ge?(Qe=j.relatedTarget||j.toElement,Ge=Ne,Qe=Qe?tu(Qe):null,Qe!==null&&(fr=Ui(Qe),Qe!==fr||Qe.tag!==5&&Qe.tag!==6)&&(Qe=null)):(Ge=null,Qe=Ne),Ge!==Qe)){if(et=y5,$e="onMouseLeave",be="onMouseEnter",ue="mouse",(h==="pointerout"||h==="pointerover")&&(et=b5,$e="onPointerLeave",be="onPointerEnter",ue="pointer"),fr=Ge==null?Te:lf(Ge),je=Qe==null?Te:lf(Qe),Te=new et($e,ue+"leave",Ge,j,Ie),Te.target=fr,Te.relatedTarget=je,$e=null,tu(Ie)===Ne&&(et=new et(be,ue+"enter",Qe,j,Ie),et.target=je,et.relatedTarget=fr,$e=et),fr=$e,Ge&&Qe)t:{for(et=Ge,be=Qe,ue=0,je=et;je;je=af(je))ue++;for(je=0,$e=be;$e;$e=af($e))je++;for(;0<ue-je;)et=af(et),ue--;for(;0<je-ue;)be=af(be),je--;for(;ue--;){if(et===be||be!==null&&et===be.alternate)break t;et=af(et),be=af(be)}et=null}else et=null;Ge!==null&&G5(Me,Te,Ge,et,!1),Qe!==null&&fr!==null&&G5(Me,fr,Qe,et,!0)}}e:{if(Te=Ne?lf(Ne):window,Ge=Te.nodeName&&Te.nodeName.toLowerCase(),Ge==="select"||Ge==="input"&&Te.type==="file")var rt=wce;else if(C5(Te))if(A5)rt=kce;else{rt=Nce;var ct=jce}else(Ge=Te.nodeName)&&Ge.toLowerCase()==="input"&&(Te.type==="checkbox"||Te.type==="radio")&&(rt=Sce);if(rt&&(rt=rt(h,Ne))){_5(Me,rt,j,Ie);break e}ct&&ct(h,Te,Ne),h==="focusout"&&(ct=Te._wrapperState)&&ct.controlled&&Te.type==="number"&&Ut(Te,"number",Te.value)}switch(ct=Ne?lf(Ne):window,h){case"focusin":(C5(ct)||ct.contentEditable==="true")&&(rf=ct,jS=Ne,wp=null);break;case"focusout":wp=jS=rf=null;break;case"mousedown":NS=!0;break;case"contextmenu":case"mouseup":case"dragend":NS=!1,D5(Me,j,Ie);break;case"selectionchange":if(Ace)break;case"keydown":case"keyup":D5(Me,j,Ie)}var ut;if(yS)e:{switch(h){case"compositionstart":var kt="onCompositionStart";break e;case"compositionend":kt="onCompositionEnd";break e;case"compositionupdate":kt="onCompositionUpdate";break e}kt=void 0}else nf?S5(h,j)&&(kt="onCompositionEnd"):h==="keydown"&&j.keyCode===229&&(kt="onCompositionStart");kt&&(w5&&j.locale!=="ko"&&(nf||kt!=="onCompositionStart"?kt==="onCompositionEnd"&&nf&&(ut=g5()):(Ml=Ie,fS="value"in Ml?Ml.value:Ml.textContent,nf=!0)),ct=S0(Ne,kt),0<ct.length&&(kt=new v5(kt,h,null,j,Ie),Me.push({event:kt,listeners:ct}),ut?kt.data=ut:(ut=k5(j),ut!==null&&(kt.data=ut)))),(ut=gce?xce(h,j):yce(h,j))&&(Ne=S0(Ne,"onBeforeInput"),0<Ne.length&&(Ie=new v5("onBeforeInput","beforeinput",null,j,Ie),Me.push({event:Ie,listeners:Ne}),Ie.data=ut))}V5(Me,g)})}function Sp(h,g,j){return{instance:h,listener:g,currentTarget:j}}function S0(h,g){for(var j=g+"Capture",A=[];h!==null;){var M=h,$=M.stateNode;M.tag===5&&$!==null&&(M=$,$=Lt(h,j),$!=null&&A.unshift(Sp(h,$,M)),$=Lt(h,g),$!=null&&A.push(Sp(h,$,M))),h=h.return}return A}function af(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5);return h||null}function G5(h,g,j,A,M){for(var $=g._reactName,G=[];j!==null&&j!==A;){var ee=j,ce=ee.alternate,Ne=ee.stateNode;if(ce!==null&&ce===A)break;ee.tag===5&&Ne!==null&&(ee=Ne,M?(ce=Lt(j,$),ce!=null&&G.unshift(Sp(j,ce,ee))):M||(ce=Lt(j,$),ce!=null&&G.push(Sp(j,ce,ee)))),j=j.return}G.length!==0&&h.push({event:g,listeners:G})}var Ice=/\r\n?/g,Oce=/\u0000|\uFFFD/g;function K5(h){return(typeof h=="string"?h:""+h).replace(Ice,`
58`).replace(Oce,"")}function k0(h,g,j){if(g=K5(g),K5(h)!==g&&j)throw Error(n(425))}function C0(){}var ES=null,PS=null;function TS(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var IS=typeof setTimeout=="function"?setTimeout:void 0,Mce=typeof clearTimeout=="function"?clearTimeout:void 0,Y5=typeof Promise=="function"?Promise:void 0,Rce=typeof queueMicrotask=="function"?queueMicrotask:typeof Y5<"u"?function(h){return Y5.resolve(null).then(h).catch(Dce)}:IS;function Dce(h){setTimeout(function(){throw h})}function OS(h,g){var j=g,A=0;do{var M=j.nextSibling;if(h.removeChild(j),M&&M.nodeType===8)if(j=M.data,j==="/$"){if(A===0){h.removeChild(M),mp(g);return}A--}else j!=="$"&&j!=="$?"&&j!=="$!"||A++;j=M}while(j);mp(g)}function Dl(h){for(;h!=null;h=h.nextSibling){var g=h.nodeType;if(g===1||g===3)break;if(g===8){if(g=h.data,g==="$"||g==="$!"||g==="$?")break;if(g==="/$")return null}}return h}function X5(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="$"||j==="$!"||j==="$?"){if(g===0)return h;g--}else j==="/$"&&g++}h=h.previousSibling}return null}var of=Math.random().toString(36).slice(2),qi="__reactFiber$"+of,kp="__reactProps$"+of,Co="__reactContainer$"+of,MS="__reactEvents$"+of,Lce="__reactListeners$"+of,$ce="__reactHandles$"+of;function tu(h){var g=h[qi];if(g)return g;for(var j=h.parentNode;j;){if(g=j[Co]||j[qi]){if(j=g.alternate,g.child!==null||j!==null&&j.child!==null)for(h=X5(h);h!==null;){if(j=h[qi])return j;h=X5(h)}return g}h=j,j=h.parentNode}return null}function Cp(h){return h=h[qi]||h[Co],!h||h.tag!==5&&h.tag!==6&&h.tag!==13&&h.tag!==3?null:h}function lf(h){if(h.tag===5||h.tag===6)return h.stateNode;throw Error(n(33))}function _0(h){return h[kp]||null}var RS=[],cf=-1;function Ll(h){return{current:h}}function Dn(h){0>cf||(h.current=RS[cf],RS[cf]=null,cf--)}function En(h,g){cf++,RS[cf]=h.current,h.current=g}var $l={},us=Ll($l),zs=Ll(!1),nu=$l;function uf(h,g){var j=h.type.contextTypes;if(!j)return $l;var A=h.stateNode;if(A&&A.__reactInternalMemoizedUnmaskedChildContext===g)return A.__reactInternalMemoizedMaskedChildContext;var M={},$;for($ in j)M[$]=g[$];return A&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=g,h.__reactInternalMemoizedMaskedChildContext=M),M}function Bs(h){return h=h.childContextTypes,h!=null}function A0(){Dn(zs),Dn(us)}function Q5(h,g,j){if(us.current!==$l)throw Error(n(168));En(us,g),En(zs,j)}function Z5(h,g,j){var A=h.stateNode;if(g=g.childContextTypes,typeof A.getChildContext!="function")return j;A=A.getChildContext();for(var M in A)if(!(M in g))throw Error(n(108,J(h)||"Unknown",M));return L({},j,A)}function E0(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||$l,nu=us.current,En(us,h),En(zs,zs.current),!0}function J5(h,g,j){var A=h.stateNode;if(!A)throw Error(n(169));j?(h=Z5(h,g,nu),A.__reactInternalMemoizedMergedChildContext=h,Dn(zs),Dn(us),En(us,h)):Dn(zs),En(zs,j)}var _o=null,P0=!1,DS=!1;function eD(h){_o===null?_o=[h]:_o.push(h)}function Fce(h){P0=!0,eD(h)}function Fl(){if(!DS&&_o!==null){DS=!0;var h=0,g=gn;try{var j=_o;for(gn=1;h<j.length;h++){var A=j[h];do A=A(!0);while(A!==null)}_o=null,P0=!1}catch(M){throw _o!==null&&(_o=_o.slice(h+1)),i0(lp,Fl),M}finally{gn=g,DS=!1}}return null}var df=[],ff=0,T0=null,I0=0,Ia=[],Oa=0,ru=null,Ao=1,Eo="";function su(h,g){df[ff++]=I0,df[ff++]=T0,T0=h,I0=g}function tD(h,g,j){Ia[Oa++]=Ao,Ia[Oa++]=Eo,Ia[Oa++]=ru,ru=h;var A=Ao;h=Eo;var M=32-la(A)-1;A&=~(1<<M),j+=1;var $=32-la(g)+M;if(30<$){var G=M-M%5;$=(A&(1<<G)-1).toString(32),A>>=G,M-=G,Ao=1<<32-la(g)+M|j<<M|A,Eo=$+h}else Ao=1<<$|j<<M|A,Eo=h}function LS(h){h.return!==null&&(su(h,1),tD(h,1,0))}function $S(h){for(;h===T0;)T0=df[--ff],df[ff]=null,I0=df[--ff],df[ff]=null;for(;h===ru;)ru=Ia[--Oa],Ia[Oa]=null,Eo=Ia[--Oa],Ia[Oa]=null,Ao=Ia[--Oa],Ia[Oa]=null}var ua=null,da=null,Hn=!1,pi=null;function nD(h,g){var j=La(5,null,null,0);
vendor: 5,387 bytes, line 58
58j.elementType="DELETED",j.stateNode=g,j.return=h,g=h.deletions,g===null?(h.deletions=[j],h.flags|=16):g.push(j)}function rD(h,g){switch(h.tag){case 5:var j=h.type;return g=g.nodeType!==1||j.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(h.stateNode=g,ua=h,da=Dl(g.firstChild),!0):!1;case 6:return g=h.pendingProps===""||g.nodeType!==3?null:g,g!==null?(h.stateNode=g,ua=h,da=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(j=ru!==null?{id:Ao,overflow:Eo}:null,h.memoizedState={dehydrated:g,treeContext:j,retryLane:1073741824},j=La(18,null,null,0),j.stateNode=g,j.return=h,h.child=j,ua=h,da=null,!0):!1;default:return!1}}function FS(h){return(h.mode&1)!==0&&(h.flags&128)===0}function zS(h){if(Hn){var g=da;if(g){var j=g;if(!rD(h,g)){if(FS(h))throw Error(n(418));g=Dl(j.nextSibling);var A=ua;g&&rD(h,g)?nD(A,j):(h.flags=h.flags&-4097|2,Hn=!1,ua=h)}}else{if(FS(h))throw Error(n(418));h.flags=h.flags&-4097|2,Hn=!1,ua=h}}}function sD(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;ua=h}function O0(h){if(h!==ua)return!1;if(!Hn)return sD(h),Hn=!0,!1;var g;if((g=h.tag!==3)&&!(g=h.tag!==5)&&(g=h.type,g=g!=="head"&&g!=="body"&&!TS(h.type,h.memoizedProps)),g&&(g=da)){if(FS(h))throw aD(),Error(n(418));for(;g;)nD(h,g),g=Dl(g.nextSibling)}if(sD(h),h.tag===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(n(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="/$"){if(g===0){da=Dl(h.nextSibling);break e}g--}else j!=="$"&&j!=="$!"&&j!=="$?"||g++}h=h.nextSibling}da=null}}else da=ua?Dl(h.stateNode.nextSibling):null;return!0}function aD(){for(var h=da;h;)h=Dl(h.nextSibling)}function hf(){da=ua=null,Hn=!1}function BS(h){pi===null?pi=[h]:pi.push(h)}var zce=_.ReactCurrentBatchConfig;function _p(h,g,j){if(h=j.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(j._owner){if(j=j._owner,j){if(j.tag!==1)throw Error(n(309));var A=j.stateNode}if(!A)throw Error(n(147,h));var M=A,$=""+h;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===$?g.ref:(g=function(G){var ee=M.refs;G===null?delete ee[$]:ee[$]=G},g._stringRef=$,g)}if(typeof h!="string")throw Error(n(284));if(!j._owner)throw Error(n(290,h))}return h}function M0(h,g){throw h=Object.prototype.toString.call(g),Error(n(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h))}function iD(h){var g=h._init;return g(h._payload)}function oD(h){function g(be,ue){if(h){var je=be.deletions;je===null?(be.deletions=[ue],be.flags|=16):je.push(ue)}}function j(be,ue){if(!h)return null;for(;ue!==null;)g(be,ue),ue=ue.sibling;return null}function A(be,ue){for(be=new Map;ue!==null;)ue.key!==null?be.set(ue.key,ue):be.set(ue.index,ue),ue=ue.sibling;return be}function M(be,ue){return be=Gl(be,ue),be.index=0,be.sibling=null,be}function $(be,ue,je){return be.index=je,h?(je=be.alternate,je!==null?(je=je.index,je<ue?(be.flags|=2,ue):je):(be.flags|=2,ue)):(be.flags|=1048576,ue)}function G(be){return h&&be.alternate===null&&(be.flags|=2),be}function ee(be,ue,je,$e){return ue===null||ue.tag!==6?(ue=Ik(je,be.mode,$e),ue.return=be,ue):(ue=M(ue,je),ue.return=be,ue)}function ce(be,ue,je,$e){var rt=je.type;return rt===E?Ie(be,ue,je.props.children,$e,je.key):ue!==null&&(ue.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===U&&iD(rt)===ue.type)?($e=M(ue,je.props),$e.ref=_p(be,ue,je),$e.return=be,$e):($e=sv(je.type,je.key,je.props,null,be.mode,$e),$e.ref=_p(be,ue,je),$e.return=be,$e)}function Ne(be,ue,je,$e){return ue===null||ue.tag!==4||ue.stateNode.containerInfo!==je.containerInfo||ue.stateNode.implementation!==je.implementation?(ue=Ok(je,be.mode,$e),ue.return=be,ue):(ue=M(ue,je.children||[]),ue.return=be,ue)}function Ie(be,ue,je,$e,rt){return ue===null||ue.tag!==7?(ue=fu(je,be.mode,$e,rt),ue.return=be,ue):(ue=M(ue,je),ue.return=be,ue)}function Me(be,ue,je){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return ue=Ik(""+ue,be.mode,je),ue.return=be,ue;if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case k:return je=sv(ue.type,ue.key,ue.props,null,be.mode,je),je.ref=_p(be,null,ue),je.return=be,je;case C:return ue=Ok(ue,be.mode,je),ue.return=be,ue;case U:var $e=ue._init;return Me(be,$e(ue._payload),je)}if(Yt(ue)||B(ue))return ue=fu(ue,be.mode,je,null),ue.return=be,ue;M0(be,ue)}return null}function Te(be,ue,je,$e){var rt=ue!==null?ue.key:null;if(typeof je=="string"&&je!==""||typeof je=="number")return rt!==null?null:ee(be,ue,""+je,$e);if(typeof je=="object"&&je!==null){switch(je.$$typeof){case k:return je.key===rt?ce(be,ue,je,$e):null;case C:return je.key===rt?Ne(be,ue,je,$e):null;case U:return rt=je._init,Te(be,ue,rt(je._payload),$e)}if(Yt(je)||B(je))return rt!==null?null:Ie(be,ue,je,$e,null);M0(be,je)}return null}function Ge(be,ue,je,$e,rt){if(typeof $e=="string"&&$e!==""||typeof $e=="number")return be=be.get(je)||null,ee(ue,be,""+$e,rt);if(typeof $e=="object"&&$e!==null){switch($e.$$typeof){case k:return be=be.get($e.key===null?je:$e.key)||null,ce(ue,be,$e,rt);case C:return be=be.get($e.key===null?je:$e.key)||null,Ne(ue,be,$e,rt);case U:var ct=$e._init;return Ge(be,ue,je,ct($e._payload),rt)}if(Yt($e)||B($e))return be=be.get(je)||null,Ie(ue,be,$e,rt,null);M0(ue,$e)}return null}function Qe(be,ue,je,$e){for(var rt=null,ct=null,ut=ue,kt=ue=0,Fr=null;ut!==null&&kt<je.length;kt++){ut.index>kt?(Fr=ut,ut=null):Fr=ut.sibling;var nn=Te(be,ut,je[kt],$e);
vendor: 4,113 bytes, line 58
58if(nn===null){ut===null&&(ut=Fr);break}h&&ut&&nn.alternate===null&&g(be,ut),ue=$(nn,ue,kt),ct===null?rt=nn:ct.sibling=nn,ct=nn,ut=Fr}if(kt===je.length)return j(be,ut),Hn&&su(be,kt),rt;if(ut===null){for(;kt<je.length;kt++)ut=Me(be,je[kt],$e),ut!==null&&(ue=$(ut,ue,kt),ct===null?rt=ut:ct.sibling=ut,ct=ut);return Hn&&su(be,kt),rt}for(ut=A(be,ut);kt<je.length;kt++)Fr=Ge(ut,be,kt,je[kt],$e),Fr!==null&&(h&&Fr.alternate!==null&&ut.delete(Fr.key===null?kt:Fr.key),ue=$(Fr,ue,kt),ct===null?rt=Fr:ct.sibling=Fr,ct=Fr);return h&&ut.forEach(function(Kl){return g(be,Kl)}),Hn&&su(be,kt),rt}function et(be,ue,je,$e){var rt=B(je);if(typeof rt!="function")throw Error(n(150));if(je=rt.call(je),je==null)throw Error(n(151));for(var ct=rt=null,ut=ue,kt=ue=0,Fr=null,nn=je.next();ut!==null&&!nn.done;kt++,nn=je.next()){ut.index>kt?(Fr=ut,ut=null):Fr=ut.sibling;var Kl=Te(be,ut,nn.value,$e);if(Kl===null){ut===null&&(ut=Fr);break}h&&ut&&Kl.alternate===null&&g(be,ut),ue=$(Kl,ue,kt),ct===null?rt=Kl:ct.sibling=Kl,ct=Kl,ut=Fr}if(nn.done)return j(be,ut),Hn&&su(be,kt),rt;if(ut===null){for(;!nn.done;kt++,nn=je.next())nn=Me(be,nn.value,$e),nn!==null&&(ue=$(nn,ue,kt),ct===null?rt=nn:ct.sibling=nn,ct=nn);return Hn&&su(be,kt),rt}for(ut=A(be,ut);!nn.done;kt++,nn=je.next())nn=Ge(ut,be,kt,nn.value,$e),nn!==null&&(h&&nn.alternate!==null&&ut.delete(nn.key===null?kt:nn.key),ue=$(nn,ue,kt),ct===null?rt=nn:ct.sibling=nn,ct=nn);return h&&ut.forEach(function(vue){return g(be,vue)}),Hn&&su(be,kt),rt}function fr(be,ue,je,$e){if(typeof je=="object"&&je!==null&&je.type===E&&je.key===null&&(je=je.props.children),typeof je=="object"&&je!==null){switch(je.$$typeof){case k:e:{for(var rt=je.key,ct=ue;ct!==null;){if(ct.key===rt){if(rt=je.type,rt===E){if(ct.tag===7){j(be,ct.sibling),ue=M(ct,je.props.children),ue.return=be,be=ue;break e}}else if(ct.elementType===rt||typeof rt=="object"&&rt!==null&&rt.$$typeof===U&&iD(rt)===ct.type){j(be,ct.sibling),ue=M(ct,je.props),ue.ref=_p(be,ct,je),ue.return=be,be=ue;break e}j(be,ct);break}else g(be,ct);ct=ct.sibling}je.type===E?(ue=fu(je.props.children,be.mode,$e,je.key),ue.return=be,be=ue):($e=sv(je.type,je.key,je.props,null,be.mode,$e),$e.ref=_p(be,ue,je),$e.return=be,be=$e)}return G(be);case C:e:{for(ct=je.key;ue!==null;){if(ue.key===ct)if(ue.tag===4&&ue.stateNode.containerInfo===je.containerInfo&&ue.stateNode.implementation===je.implementation){j(be,ue.sibling),ue=M(ue,je.children||[]),ue.return=be,be=ue;break e}else{j(be,ue);break}else g(be,ue);ue=ue.sibling}ue=Ok(je,be.mode,$e),ue.return=be,be=ue}return G(be);case U:return ct=je._init,fr(be,ue,ct(je._payload),$e)}if(Yt(je))return Qe(be,ue,je,$e);if(B(je))return et(be,ue,je,$e);M0(be,je)}return typeof je=="string"&&je!==""||typeof je=="number"?(je=""+je,ue!==null&&ue.tag===6?(j(be,ue.sibling),ue=M(ue,je),ue.return=be,be=ue):(j(be,ue),ue=Ik(je,be.mode,$e),ue.return=be,be=ue),G(be)):j(be,ue)}return fr}var mf=oD(!0),lD=oD(!1),R0=Ll(null),D0=null,pf=null,US=null;function HS(){US=pf=D0=null}function qS(h){var g=R0.current;Dn(R0),h._currentValue=g}function VS(h,g,j){for(;h!==null;){var A=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,A!==null&&(A.childLanes|=g)):A!==null&&(A.childLanes&g)!==g&&(A.childLanes|=g),h===j)break;h=h.return}}function gf(h,g){D0=h,US=pf=null,h=h.dependencies,h!==null&&h.firstContext!==null&&((h.lanes&g)!==0&&(Us=!0),h.firstContext=null)}function Ma(h){var g=h._currentValue;if(US!==h)if(h={context:h,memoizedValue:g,next:null},pf===null){if(D0===null)throw Error(n(308));pf=h,D0.dependencies={lanes:0,firstContext:h}}else pf=pf.next=h;return g}var au=null;function WS(h){au===null?au=[h]:au.push(h)}function cD(h,g,j,A){var M=g.interleaved;return M===null?(j.next=j,WS(g)):(j.next=M.next,M.next=j),g.interleaved=j,Po(h,A)}function Po(h,g){h.lanes|=g;var j=h.alternate;for(j!==null&&(j.lanes|=g),j=h,h=h.return;h!==null;)h.childLanes|=g,j=h.alternate,j!==null&&(j.childLanes|=g),j=h,h=h.return;return j.tag===3?j.stateNode:null}var zl=!1;function GS(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}
vendor: 9,790 bytes, line 58
58function uD(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function To(h,g){return{eventTime:h,lane:g,tag:0,payload:null,callback:null,next:null}}function Bl(h,g,j){var A=h.updateQueue;if(A===null)return null;if(A=A.shared,(en&2)!==0){var M=A.pending;return M===null?g.next=g:(g.next=M.next,M.next=g),A.pending=g,Po(h,j)}return M=A.interleaved,M===null?(g.next=g,WS(A)):(g.next=M.next,M.next=g),A.interleaved=g,Po(h,j)}function L0(h,g,j){if(g=g.updateQueue,g!==null&&(g=g.shared,(j&4194240)!==0)){var A=g.lanes;A&=h.pendingLanes,j|=A,g.lanes=j,oS(h,j)}}function dD(h,g){var j=h.updateQueue,A=h.alternate;if(A!==null&&(A=A.updateQueue,j===A)){var M=null,$=null;if(j=j.firstBaseUpdate,j!==null){do{var G={eventTime:j.eventTime,lane:j.lane,tag:j.tag,payload:j.payload,callback:j.callback,next:null};$===null?M=$=G:$=$.next=G,j=j.next}while(j!==null);$===null?M=$=g:$=$.next=g}else M=$=g;j={baseState:A.baseState,firstBaseUpdate:M,lastBaseUpdate:$,shared:A.shared,effects:A.effects},h.updateQueue=j;return}h=j.lastBaseUpdate,h===null?j.firstBaseUpdate=g:h.next=g,j.lastBaseUpdate=g}function $0(h,g,j,A){var M=h.updateQueue;zl=!1;var $=M.firstBaseUpdate,G=M.lastBaseUpdate,ee=M.shared.pending;if(ee!==null){M.shared.pending=null;var ce=ee,Ne=ce.next;ce.next=null,G===null?$=Ne:G.next=Ne,G=ce;var Ie=h.alternate;Ie!==null&&(Ie=Ie.updateQueue,ee=Ie.lastBaseUpdate,ee!==G&&(ee===null?Ie.firstBaseUpdate=Ne:ee.next=Ne,Ie.lastBaseUpdate=ce))}if($!==null){var Me=M.baseState;G=0,Ie=Ne=ce=null,ee=$;do{var Te=ee.lane,Ge=ee.eventTime;if((A&Te)===Te){Ie!==null&&(Ie=Ie.next={eventTime:Ge,lane:0,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null});e:{var Qe=h,et=ee;switch(Te=g,Ge=j,et.tag){case 1:if(Qe=et.payload,typeof Qe=="function"){Me=Qe.call(Ge,Me,Te);break e}Me=Qe;break e;case 3:Qe.flags=Qe.flags&-65537|128;case 0:if(Qe=et.payload,Te=typeof Qe=="function"?Qe.call(Ge,Me,Te):Qe,Te==null)break e;Me=L({},Me,Te);break e;case 2:zl=!0}}ee.callback!==null&&ee.lane!==0&&(h.flags|=64,Te=M.effects,Te===null?M.effects=[ee]:Te.push(ee))}else Ge={eventTime:Ge,lane:Te,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Ie===null?(Ne=Ie=Ge,ce=Me):Ie=Ie.next=Ge,G|=Te;if(ee=ee.next,ee===null){if(ee=M.shared.pending,ee===null)break;Te=ee,ee=Te.next,Te.next=null,M.lastBaseUpdate=Te,M.shared.pending=null}}while(!0);if(Ie===null&&(ce=Me),M.baseState=ce,M.firstBaseUpdate=Ne,M.lastBaseUpdate=Ie,g=M.shared.interleaved,g!==null){M=g;do G|=M.lane,M=M.next;while(M!==g)}else $===null&&(M.shared.lanes=0);lu|=G,h.lanes=G,h.memoizedState=Me}}function fD(h,g,j){if(h=g.effects,g.effects=null,h!==null)for(g=0;g<h.length;g++){var A=h[g],M=A.callback;if(M!==null){if(A.callback=null,A=j,typeof M!="function")throw Error(n(191,M));M.call(A)}}}var Ap={},Vi=Ll(Ap),Ep=Ll(Ap),Pp=Ll(Ap);function iu(h){if(h===Ap)throw Error(n(174));return h}function KS(h,g){switch(En(Pp,g),En(Ep,h),En(Vi,Ap),h=g.nodeType,h){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:Ae(null,"");break;default:h=h===8?g.parentNode:g,g=h.namespaceURI||null,h=h.tagName,g=Ae(g,h)}Dn(Vi),En(Vi,g)}function xf(){Dn(Vi),Dn(Ep),Dn(Pp)}function hD(h){iu(Pp.current);var g=iu(Vi.current),j=Ae(g,h.type);g!==j&&(En(Ep,h),En(Vi,j))}function YS(h){Ep.current===h&&(Dn(Vi),Dn(Ep))}var Qn=Ll(0);function F0(h){for(var g=h;g!==null;){if(g.tag===13){var j=g.memoizedState;if(j!==null&&(j=j.dehydrated,j===null||j.data==="$?"||j.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var XS=[];function QS(){for(var h=0;h<XS.length;h++)XS[h]._workInProgressVersionPrimary=null;XS.length=0}var z0=_.ReactCurrentDispatcher,ZS=_.ReactCurrentBatchConfig,ou=0,Zn=null,Ar=null,Lr=null,B0=!1,Tp=!1,Ip=0,Bce=0;function ds(){throw Error(n(321))}function JS(h,g){if(g===null)return!1;for(var j=0;j<g.length&&j<h.length;j++)if(!mi(h[j],g[j]))return!1;return!0}function ek(h,g,j,A,M,$){if(ou=$,Zn=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,z0.current=h===null||h.memoizedState===null?Vce:Wce,h=j(A,M),Tp){$=0;do{if(Tp=!1,Ip=0,25<=$)throw Error(n(301));$+=1,Lr=Ar=null,g.updateQueue=null,z0.current=Gce,h=j(A,M)}while(Tp)}if(z0.current=q0,g=Ar!==null&&Ar.next!==null,ou=0,Lr=Ar=Zn=null,B0=!1,g)throw Error(n(300));return h}function tk(){var h=Ip!==0;return Ip=0,h}function Wi(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lr===null?Zn.memoizedState=Lr=h:Lr=Lr.next=h,Lr}function Ra(){if(Ar===null){var h=Zn.alternate;h=h!==null?h.memoizedState:null}else h=Ar.next;var g=Lr===null?Zn.memoizedState:Lr.next;if(g!==null)Lr=g,Ar=h;else{if(h===null)throw Error(n(310));Ar=h,h={memoizedState:Ar.memoizedState,baseState:Ar.baseState,baseQueue:Ar.baseQueue,queue:Ar.queue,next:null},Lr===null?Zn.memoizedState=Lr=h:Lr=Lr.next=h}return Lr}function Op(h,g){return typeof g=="function"?g(h):g}function nk(h){var g=Ra(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var A=Ar,M=A.baseQueue,$=j.pending;if($!==null){if(M!==null){var G=M.next;M.next=$.next,$.next=G}A.baseQueue=M=$,j.pending=null}if(M!==null){$=M.next,A=A.baseState;var ee=G=null,ce=null,Ne=$;do{var Ie=Ne.lane;if((ou&Ie)===Ie)ce!==null&&(ce=ce.next={lane:0,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null}),A=Ne.hasEagerState?Ne.eagerState:h(A,Ne.action);else{var Me={lane:Ie,action:Ne.action,hasEagerState:Ne.hasEagerState,eagerState:Ne.eagerState,next:null};ce===null?(ee=ce=Me,G=A):ce=ce.next=Me,Zn.lanes|=Ie,lu|=Ie}Ne=Ne.next}while(Ne!==null&&Ne!==$);ce===null?G=A:ce.next=ee,mi(A,g.memoizedState)||(Us=!0),g.memoizedState=A,g.baseState=G,g.baseQueue=ce,j.lastRenderedState=A}if(h=j.interleaved,h!==null){M=h;do $=M.lane,Zn.lanes|=$,lu|=$,M=M.next;while(M!==h)}else M===null&&(j.lanes=0);return[g.memoizedState,j.dispatch]}function rk(h){var g=Ra(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var A=j.dispatch,M=j.pending,$=g.memoizedState;if(M!==null){j.pending=null;var G=M=M.next;do $=h($,G.action),G=G.next;while(G!==M);mi($,g.memoizedState)||(Us=!0),g.memoizedState=$,g.baseQueue===null&&(g.baseState=$),j.lastRenderedState=$}return[$,A]}function mD(){}function pD(h,g){var j=Zn,A=Ra(),M=g(),$=!mi(A.memoizedState,M);if($&&(A.memoizedState=M,Us=!0),A=A.queue,sk(yD.bind(null,j,A,h),[h]),A.getSnapshot!==g||$||Lr!==null&&Lr.memoizedState.tag&1){if(j.flags|=2048,Mp(9,xD.bind(null,j,A,M,g),void 0,null),$r===null)throw Error(n(349));(ou&30)!==0||gD(j,g,M)}return M}function gD(h,g,j){h.flags|=16384,h={getSnapshot:g,value:j},g=Zn.updateQueue,g===null?(g={lastEffect:null,stores:null},Zn.updateQueue=g,g.stores=[h]):(j=g.stores,j===null?g.stores=[h]:j.push(h))}function xD(h,g,j,A){g.value=j,g.getSnapshot=A,vD(g)&&bD(h)}function yD(h,g,j){return j(function(){vD(g)&&bD(h)})}function vD(h){var g=h.getSnapshot;h=h.value;try{var j=g();return!mi(h,j)}catch{return!0}}function bD(h){var g=Po(h,1);g!==null&&vi(g,h,1,-1)}function wD(h){var g=Wi();return typeof h=="function"&&(h=h()),g.memoizedState=g.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Op,lastRenderedState:h},g.queue=h,h=h.dispatch=qce.bind(null,Zn,h),[g.memoizedState,h]}function Mp(h,g,j,A){return h={tag:h,create:g,destroy:j,deps:A,next:null},g=Zn.updateQueue,g===null?(g={lastEffect:null,stores:null},Zn.updateQueue=g,g.lastEffect=h.next=h):(j=g.lastEffect,j===null?g.lastEffect=h.next=h:(A=j.next,j.next=h,h.next=A,g.lastEffect=h)),h}function jD(){return Ra().memoizedState}function U0(h,g,j,A){var M=Wi();Zn.flags|=h,M.memoizedState=Mp(1|g,j,void 0,A===void 0?null:A)}function H0(h,g,j,A){var M=Ra();A=A===void 0?null:A;var $=void 0;if(Ar!==null){var G=Ar.memoizedState;if($=G.destroy,A!==null&&JS(A,G.deps)){M.memoizedState=Mp(g,j,$,A);return}}Zn.flags|=h,M.memoizedState=Mp(1|g,j,$,A)}function ND(h,g){return U0(8390656,8,h,g)}function sk(h,g){return H0(2048,8,h,g)}function SD(h,g){return H0(4,2,h,g)}function kD(h,g){return H0(4,4,h,g)}function CD(h,g){if(typeof g=="function")return h=h(),g(h),function(){g(null)};if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function _D(h,g,j){return j=j!=null?j.concat([h]):null,H0(4,4,CD.bind(null,g,h),j)}function ak(){}function AD(h,g){var j=Ra();g=g===void 0?null:g;var A=j.memoizedState;return A!==null&&g!==null&&JS(g,A[1])?A[0]:(j.memoizedState=[h,g],h)}function ED(h,g){var j=Ra();g=g===void 0?null:g;var A=j.memoizedState;return A!==null&&g!==null&&JS(g,A[1])?A[0]:(h=h(),j.memoizedState=[h,g],h)}function PD(h,g,j){return(ou&21)===0?(h.baseState&&(h.baseState=!1,Us=!0),h.memoizedState=j):(mi(j,g)||(j=d0(),Zn.lanes|=j,lu|=j,h.baseState=!0),g)}function Uce(h,g){var j=gn;gn=j!==0&&4>j?j:4,h(!0);var A=ZS.transition;ZS.transition={};try{h(!1),g()}finally{gn=j,ZS.transition=A}}function TD(){return Ra().memoizedState}function Hce(h,g,j){var A=Vl(h);if(j={lane:A,action:j,hasEagerState:!1,eagerState:null,next:null},ID(h))OD(g,j);else if(j=cD(h,g,j,A),j!==null){var M=Cs();vi(j,h,A,M),MD(j,g,A)}}function qce(h,g,j){var A=Vl(h),M={lane:A,action:j,hasEagerState:!1,eagerState:null,next:null};if(ID(h))OD(g,M);else{var $=h.alternate;if(h.lanes===0&&($===null||$.lanes===0)&&($=g.lastRenderedReducer,$!==null))try{var G=g.lastRenderedState,ee=$(G,j);if(M.hasEagerState=!0,M.eagerState=ee,mi(ee,G)){var ce=g.interleaved;ce===null?(M.next=M,WS(g)):(M.next=ce.next,ce.next=M),g.interleaved=M;return}}catch{}finally{}j=cD(h,g,M,A),j!==null&&(M=Cs(),vi(j,h,A,M),MD(j,g,A))}}function ID(h){var g=h.alternate;
vendor: 6,782 bytes, lines 58-60
58return h===Zn||g!==null&&g===Zn}function OD(h,g){Tp=B0=!0;var j=h.pending;j===null?g.next=g:(g.next=j.next,j.next=g),h.pending=g}function MD(h,g,j){if((j&4194240)!==0){var A=g.lanes;A&=h.pendingLanes,j|=A,g.lanes=j,oS(h,j)}}var q0={readContext:Ma,useCallback:ds,useContext:ds,useEffect:ds,useImperativeHandle:ds,useInsertionEffect:ds,useLayoutEffect:ds,useMemo:ds,useReducer:ds,useRef:ds,useState:ds,useDebugValue:ds,useDeferredValue:ds,useTransition:ds,useMutableSource:ds,useSyncExternalStore:ds,useId:ds,unstable_isNewReconciler:!1},Vce={readContext:Ma,useCallback:function(h,g){return Wi().memoizedState=[h,g===void 0?null:g],h},useContext:Ma,useEffect:ND,useImperativeHandle:function(h,g,j){return j=j!=null?j.concat([h]):null,U0(4194308,4,CD.bind(null,g,h),j)},useLayoutEffect:function(h,g){return U0(4194308,4,h,g)},useInsertionEffect:function(h,g){return U0(4,2,h,g)},useMemo:function(h,g){var j=Wi();return g=g===void 0?null:g,h=h(),j.memoizedState=[h,g],h},useReducer:function(h,g,j){var A=Wi();return g=j!==void 0?j(g):g,A.memoizedState=A.baseState=g,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:g},A.queue=h,h=h.dispatch=Hce.bind(null,Zn,h),[A.memoizedState,h]},useRef:function(h){var g=Wi();return h={current:h},g.memoizedState=h},useState:wD,useDebugValue:ak,useDeferredValue:function(h){return Wi().memoizedState=h},useTransition:function(){var h=wD(!1),g=h[0];return h=Uce.bind(null,h[1]),Wi().memoizedState=h,[g,h]},useMutableSource:function(){},useSyncExternalStore:function(h,g,j){var A=Zn,M=Wi();if(Hn){if(j===void 0)throw Error(n(407));j=j()}else{if(j=g(),$r===null)throw Error(n(349));(ou&30)!==0||gD(A,g,j)}M.memoizedState=j;var $={value:j,getSnapshot:g};return M.queue=$,ND(yD.bind(null,A,$,h),[h]),A.flags|=2048,Mp(9,xD.bind(null,A,$,j,g),void 0,null),j},useId:function(){var h=Wi(),g=$r.identifierPrefix;if(Hn){var j=Eo,A=Ao;j=(A&~(1<<32-la(A)-1)).toString(32)+j,g=":"+g+"R"+j,j=Ip++,0<j&&(g+="H"+j.toString(32)),g+=":"}else j=Bce++,g=":"+g+"r"+j.toString(32)+":";return h.memoizedState=g},unstable_isNewReconciler:!1},Wce={readContext:Ma,useCallback:AD,useContext:Ma,useEffect:sk,useImperativeHandle:_D,useInsertionEffect:SD,useLayoutEffect:kD,useMemo:ED,useReducer:nk,useRef:jD,useState:function(){return nk(Op)},useDebugValue:ak,useDeferredValue:function(h){var g=Ra();return PD(g,Ar.memoizedState,h)},useTransition:function(){var h=nk(Op)[0],g=Ra().memoizedState;return[h,g]},useMutableSource:mD,useSyncExternalStore:pD,useId:TD,unstable_isNewReconciler:!1},Gce={readContext:Ma,useCallback:AD,useContext:Ma,useEffect:sk,useImperativeHandle:_D,useInsertionEffect:SD,useLayoutEffect:kD,useMemo:ED,useReducer:rk,useRef:jD,useState:function(){return rk(Op)},useDebugValue:ak,useDeferredValue:function(h){var g=Ra();return Ar===null?g.memoizedState=h:PD(g,Ar.memoizedState,h)},useTransition:function(){var h=rk(Op)[0],g=Ra().memoizedState;return[h,g]},useMutableSource:mD,useSyncExternalStore:pD,useId:TD,unstable_isNewReconciler:!1};function gi(h,g){if(h&&h.defaultProps){g=L({},g),h=h.defaultProps;for(var j in h)g[j]===void 0&&(g[j]=h[j]);return g}return g}function ik(h,g,j,A){g=h.memoizedState,j=j(A,g),j=j==null?g:L({},g,j),h.memoizedState=j,h.lanes===0&&(h.updateQueue.baseState=j)}var V0={isMounted:function(h){return(h=h._reactInternals)?Ui(h)===h:!1},enqueueSetState:function(h,g,j){h=h._reactInternals;var A=Cs(),M=Vl(h),$=To(A,M);$.payload=g,j!=null&&($.callback=j),g=Bl(h,$,M),g!==null&&(vi(g,h,M,A),L0(g,h,M))},enqueueReplaceState:function(h,g,j){h=h._reactInternals;var A=Cs(),M=Vl(h),$=To(A,M);$.tag=1,$.payload=g,j!=null&&($.callback=j),g=Bl(h,$,M),g!==null&&(vi(g,h,M,A),L0(g,h,M))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var j=Cs(),A=Vl(h),M=To(j,A);M.tag=2,g!=null&&(M.callback=g),g=Bl(h,M,A),g!==null&&(vi(g,h,A,j),L0(g,h,A))}};function RD(h,g,j,A,M,$,G){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(A,$,G):g.prototype&&g.prototype.isPureReactComponent?!bp(j,A)||!bp(M,$):!0}function DD(h,g,j){var A=!1,M=$l,$=g.contextType;return typeof $=="object"&&$!==null?$=Ma($):(M=Bs(g)?nu:us.current,A=g.contextTypes,$=(A=A!=null)?uf(h,M):$l),g=new g(j,$),h.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=V0,h.stateNode=g,g._reactInternals=h,A&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=M,h.__reactInternalMemoizedMaskedChildContext=$),g}function LD(h,g,j,A){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(j,A),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(j,A),g.state!==h&&V0.enqueueReplaceState(g,g.state,null)}function ok(h,g,j,A){var M=h.stateNode;M.props=j,M.state=h.memoizedState,M.refs={},GS(h);var $=g.contextType;typeof $=="object"&&$!==null?M.context=Ma($):($=Bs(g)?nu:us.current,M.context=uf(h,$)),M.state=h.memoizedState,$=g.getDerivedStateFromProps,typeof $=="function"&&(ik(h,g,$,j),M.state=h.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof M.getSnapshotBeforeUpdate=="function"||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(g=M.state,typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount(),g!==M.state&&V0.enqueueReplaceState(M,M.state,null),$0(h,j,M,A),M.state=h.memoizedState),typeof M.componentDidMount=="function"&&(h.flags|=4194308)}function yf(h,g){try{var j="",A=g;do j+=ve(A),A=A.return;while(A);var M=j}catch($){M=`
59Error generating stack: `+$.message+`
60`+$.stack}return{value:h,source:g,stack:M,digest:null}}function lk(h,g,j){return{value:h,source:null,stack:j??null,digest:g??null}}function ck(h,g){try{console.error(g.value)}catch(j){setTimeout(function(){throw j})}}var Kce=typeof WeakMap=="function"?WeakMap:Map;function $D(h,g,j){j=To(-1,j),j.tag=3,j.payload={element:null};var A=g.value;return j.callback=function(){Z0||(Z0=!0,Sk=A),ck(h,g)},j}function FD(h,g,j){j=To(-1,j),j.tag=3;var A=h.type.getDerivedStateFromError;if(typeof A=="function"){var M=g.value;j.payload=function(){return A(M)},j.callback=function(){ck(h,g)}}var $=h.stateNode;return $!==null&&typeof $.componentDidCatch=="function"&&(j.callback=function(){ck(h,g),typeof A!="function"&&(Hl===null?Hl=new Set([this]):Hl.add(this));var G=g.stack;this.componentDidCatch(g.value,{componentStack:G!==null?G:""})}),j}function zD(h,g,j){var A=h.pingCache;if(A===null){A=h.pingCache=new Kce;var M=new Set;A.set(g,M)}else M=A.get(g),M===void 0&&(M=new Set,A.set(g,M));M.has(j)||(M.add(j),h=lue.bind(null,h,g,j),g.then(h,h))}function BD(h){do{var g;if((g=h.tag===13)&&(g=h.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return h;h=h.return}while(h!==null);return null}
vendor: 39,325 bytes, line 60
60function UD(h,g,j,A,M){return(h.mode&1)===0?(h===g?h.flags|=65536:(h.flags|=128,j.flags|=131072,j.flags&=-52805,j.tag===1&&(j.alternate===null?j.tag=17:(g=To(-1,1),g.tag=2,Bl(j,g,1))),j.lanes|=1),h):(h.flags|=65536,h.lanes=M,h)}var Yce=_.ReactCurrentOwner,Us=!1;function ks(h,g,j,A){g.child=h===null?lD(g,null,j,A):mf(g,h.child,j,A)}function HD(h,g,j,A,M){j=j.render;var $=g.ref;return gf(g,M),A=ek(h,g,j,A,$,M),j=tk(),h!==null&&!Us?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~M,Io(h,g,M)):(Hn&&j&&LS(g),g.flags|=1,ks(h,g,A,M),g.child)}function qD(h,g,j,A,M){if(h===null){var $=j.type;return typeof $=="function"&&!Tk($)&&$.defaultProps===void 0&&j.compare===null&&j.defaultProps===void 0?(g.tag=15,g.type=$,VD(h,g,$,A,M)):(h=sv(j.type,null,A,g,g.mode,M),h.ref=g.ref,h.return=g,g.child=h)}if($=h.child,(h.lanes&M)===0){var G=$.memoizedProps;if(j=j.compare,j=j!==null?j:bp,j(G,A)&&h.ref===g.ref)return Io(h,g,M)}return g.flags|=1,h=Gl($,A),h.ref=g.ref,h.return=g,g.child=h}function VD(h,g,j,A,M){if(h!==null){var $=h.memoizedProps;if(bp($,A)&&h.ref===g.ref)if(Us=!1,g.pendingProps=A=$,(h.lanes&M)!==0)(h.flags&131072)!==0&&(Us=!0);else return g.lanes=h.lanes,Io(h,g,M)}return uk(h,g,j,A,M)}function WD(h,g,j){var A=g.pendingProps,M=A.children,$=h!==null?h.memoizedState:null;if(A.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},En(bf,fa),fa|=j;else{if((j&1073741824)===0)return h=$!==null?$.baseLanes|j:j,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:h,cachePool:null,transitions:null},g.updateQueue=null,En(bf,fa),fa|=h,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},A=$!==null?$.baseLanes:j,En(bf,fa),fa|=A}else $!==null?(A=$.baseLanes|j,g.memoizedState=null):A=j,En(bf,fa),fa|=A;return ks(h,g,M,j),g.child}function GD(h,g){var j=g.ref;(h===null&&j!==null||h!==null&&h.ref!==j)&&(g.flags|=512,g.flags|=2097152)}function uk(h,g,j,A,M){var $=Bs(j)?nu:us.current;return $=uf(g,$),gf(g,M),j=ek(h,g,j,A,$,M),A=tk(),h!==null&&!Us?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~M,Io(h,g,M)):(Hn&&A&&LS(g),g.flags|=1,ks(h,g,j,M),g.child)}function KD(h,g,j,A,M){if(Bs(j)){var $=!0;E0(g)}else $=!1;if(gf(g,M),g.stateNode===null)G0(h,g),DD(g,j,A),ok(g,j,A,M),A=!0;else if(h===null){var G=g.stateNode,ee=g.memoizedProps;G.props=ee;var ce=G.context,Ne=j.contextType;typeof Ne=="object"&&Ne!==null?Ne=Ma(Ne):(Ne=Bs(j)?nu:us.current,Ne=uf(g,Ne));var Ie=j.getDerivedStateFromProps,Me=typeof Ie=="function"||typeof G.getSnapshotBeforeUpdate=="function";Me||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ee!==A||ce!==Ne)&&LD(g,G,A,Ne),zl=!1;var Te=g.memoizedState;G.state=Te,$0(g,A,G,M),ce=g.memoizedState,ee!==A||Te!==ce||zs.current||zl?(typeof Ie=="function"&&(ik(g,j,Ie,A),ce=g.memoizedState),(ee=zl||RD(g,j,ee,A,Te,ce,Ne))?(Me||typeof G.UNSAFE_componentWillMount!="function"&&typeof G.componentWillMount!="function"||(typeof G.componentWillMount=="function"&&G.componentWillMount(),typeof G.UNSAFE_componentWillMount=="function"&&G.UNSAFE_componentWillMount()),typeof G.componentDidMount=="function"&&(g.flags|=4194308)):(typeof G.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=A,g.memoizedState=ce),G.props=A,G.state=ce,G.context=Ne,A=ee):(typeof G.componentDidMount=="function"&&(g.flags|=4194308),A=!1)}else{G=g.stateNode,uD(h,g),ee=g.memoizedProps,Ne=g.type===g.elementType?ee:gi(g.type,ee),G.props=Ne,Me=g.pendingProps,Te=G.context,ce=j.contextType,typeof ce=="object"&&ce!==null?ce=Ma(ce):(ce=Bs(j)?nu:us.current,ce=uf(g,ce));var Ge=j.getDerivedStateFromProps;(Ie=typeof Ge=="function"||typeof G.getSnapshotBeforeUpdate=="function")||typeof G.UNSAFE_componentWillReceiveProps!="function"&&typeof G.componentWillReceiveProps!="function"||(ee!==Me||Te!==ce)&&LD(g,G,A,ce),zl=!1,Te=g.memoizedState,G.state=Te,$0(g,A,G,M);var Qe=g.memoizedState;ee!==Me||Te!==Qe||zs.current||zl?(typeof Ge=="function"&&(ik(g,j,Ge,A),Qe=g.memoizedState),(Ne=zl||RD(g,j,Ne,A,Te,Qe,ce)||!1)?(Ie||typeof G.UNSAFE_componentWillUpdate!="function"&&typeof G.componentWillUpdate!="function"||(typeof G.componentWillUpdate=="function"&&G.componentWillUpdate(A,Qe,ce),typeof G.UNSAFE_componentWillUpdate=="function"&&G.UNSAFE_componentWillUpdate(A,Qe,ce)),typeof G.componentDidUpdate=="function"&&(g.flags|=4),typeof G.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof G.componentDidUpdate!="function"||ee===h.memoizedProps&&Te===h.memoizedState||(g.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ee===h.memoizedProps&&Te===h.memoizedState||(g.flags|=1024),g.memoizedProps=A,g.memoizedState=Qe),G.props=A,G.state=Qe,G.context=ce,A=Ne):(typeof G.componentDidUpdate!="function"||ee===h.memoizedProps&&Te===h.memoizedState||(g.flags|=4),typeof G.getSnapshotBeforeUpdate!="function"||ee===h.memoizedProps&&Te===h.memoizedState||(g.flags|=1024),A=!1)}return dk(h,g,j,A,$,M)}function dk(h,g,j,A,M,$){GD(h,g);var G=(g.flags&128)!==0;if(!A&&!G)return M&&J5(g,j,!1),Io(h,g,$);A=g.stateNode,Yce.current=g;var ee=G&&typeof j.getDerivedStateFromError!="function"?null:A.render();return g.flags|=1,h!==null&&G?(g.child=mf(g,h.child,null,$),g.child=mf(g,null,ee,$)):ks(h,g,ee,$),g.memoizedState=A.state,M&&J5(g,j,!0),g.child}function YD(h){var g=h.stateNode;g.pendingContext?Q5(h,g.pendingContext,g.pendingContext!==g.context):g.context&&Q5(h,g.context,!1),KS(h,g.containerInfo)}function XD(h,g,j,A,M){return hf(),BS(M),g.flags|=256,ks(h,g,j,A),g.child}var fk={dehydrated:null,treeContext:null,retryLane:0};function hk(h){return{baseLanes:h,cachePool:null,transitions:null}}function QD(h,g,j){var A=g.pendingProps,M=Qn.current,$=!1,G=(g.flags&128)!==0,ee;if((ee=G)||(ee=h!==null&&h.memoizedState===null?!1:(M&2)!==0),ee?($=!0,g.flags&=-129):(h===null||h.memoizedState!==null)&&(M|=1),En(Qn,M&1),h===null)return zS(g),h=g.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?((g.mode&1)===0?g.lanes=1:h.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(G=A.children,h=A.fallback,$?(A=g.mode,$=g.child,G={mode:"hidden",children:G},(A&1)===0&&$!==null?($.childLanes=0,$.pendingProps=G):$=av(G,A,0,null),h=fu(h,A,j,null),$.return=g,h.return=g,$.sibling=h,g.child=$,g.child.memoizedState=hk(j),g.memoizedState=fk,h):mk(g,G));if(M=h.memoizedState,M!==null&&(ee=M.dehydrated,ee!==null))return Xce(h,g,G,A,ee,M,j);if($){$=A.fallback,G=g.mode,M=h.child,ee=M.sibling;var ce={mode:"hidden",children:A.children};return(G&1)===0&&g.child!==M?(A=g.child,A.childLanes=0,A.pendingProps=ce,g.deletions=null):(A=Gl(M,ce),A.subtreeFlags=M.subtreeFlags&14680064),ee!==null?$=Gl(ee,$):($=fu($,G,j,null),$.flags|=2),$.return=g,A.return=g,A.sibling=$,g.child=A,A=$,$=g.child,G=h.child.memoizedState,G=G===null?hk(j):{baseLanes:G.baseLanes|j,cachePool:null,transitions:G.transitions},$.memoizedState=G,$.childLanes=h.childLanes&~j,g.memoizedState=fk,A}return $=h.child,h=$.sibling,A=Gl($,{mode:"visible",children:A.children}),(g.mode&1)===0&&(A.lanes=j),A.return=g,A.sibling=null,h!==null&&(j=g.deletions,j===null?(g.deletions=[h],g.flags|=16):j.push(h)),g.child=A,g.memoizedState=null,A}function mk(h,g){return g=av({mode:"visible",children:g},h.mode,0,null),g.return=h,h.child=g}function W0(h,g,j,A){return A!==null&&BS(A),mf(g,h.child,null,j),h=mk(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function Xce(h,g,j,A,M,$,G){if(j)return g.flags&256?(g.flags&=-257,A=lk(Error(n(422))),W0(h,g,G,A)):g.memoizedState!==null?(g.child=h.child,g.flags|=128,null):($=A.fallback,M=g.mode,A=av({mode:"visible",children:A.children},M,0,null),$=fu($,M,G,null),$.flags|=2,A.return=g,$.return=g,A.sibling=$,g.child=A,(g.mode&1)!==0&&mf(g,h.child,null,G),g.child.memoizedState=hk(G),g.memoizedState=fk,$);if((g.mode&1)===0)return W0(h,g,G,null);if(M.data==="$!"){if(A=M.nextSibling&&M.nextSibling.dataset,A)var ee=A.dgst;return A=ee,$=Error(n(419)),A=lk($,A,void 0),W0(h,g,G,A)}if(ee=(G&h.childLanes)!==0,Us||ee){if(A=$r,A!==null){switch(G&-G){case 4:M=2;break;case 16:M=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:M=32;break;case 536870912:M=268435456;break;default:M=0}M=(M&(A.suspendedLanes|G))!==0?0:M,M!==0&&M!==$.retryLane&&($.retryLane=M,Po(h,M),vi(A,h,M,-1))}return Pk(),A=lk(Error(n(421))),W0(h,g,G,A)}return M.data==="$?"?(g.flags|=128,g.child=h.child,g=cue.bind(null,h),M._reactRetry=g,null):(h=$.treeContext,da=Dl(M.nextSibling),ua=g,Hn=!0,pi=null,h!==null&&(Ia[Oa++]=Ao,Ia[Oa++]=Eo,Ia[Oa++]=ru,Ao=h.id,Eo=h.overflow,ru=g),g=mk(g,A.children),g.flags|=4096,g)}function ZD(h,g,j){h.lanes|=g;var A=h.alternate;A!==null&&(A.lanes|=g),VS(h.return,g,j)}function pk(h,g,j,A,M){var $=h.memoizedState;$===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:A,tail:j,tailMode:M}:($.isBackwards=g,$.rendering=null,$.renderingStartTime=0,$.last=A,$.tail=j,$.tailMode=M)}function JD(h,g,j){var A=g.pendingProps,M=A.revealOrder,$=A.tail;if(ks(h,g,A.children,j),A=Qn.current,(A&2)!==0)A=A&1|2,g.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=g.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&ZD(h,j,g);else if(h.tag===19)ZD(h,j,g);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===g)break e;for(;h.sibling===null;){if(h.return===null||h.return===g)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}A&=1}if(En(Qn,A),(g.mode&1)===0)g.memoizedState=null;else switch(M){case"forwards":for(j=g.child,M=null;j!==null;)h=j.alternate,h!==null&&F0(h)===null&&(M=j),j=j.sibling;j=M,j===null?(M=g.child,g.child=null):(M=j.sibling,j.sibling=null),pk(g,!1,M,j,$);break;case"backwards":for(j=null,M=g.child,g.child=null;M!==null;){if(h=M.alternate,h!==null&&F0(h)===null){g.child=M;break}h=M.sibling,M.sibling=j,j=M,M=h}pk(g,!0,j,null,$);break;case"together":pk(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function G0(h,g){(g.mode&1)===0&&h!==null&&(h.alternate=null,g.alternate=null,g.flags|=2)}function Io(h,g,j){if(h!==null&&(g.dependencies=h.dependencies),lu|=g.lanes,(j&g.childLanes)===0)return null;if(h!==null&&g.child!==h.child)throw Error(n(153));if(g.child!==null){for(h=g.child,j=Gl(h,h.pendingProps),g.child=j,j.return=g;h.sibling!==null;)h=h.sibling,j=j.sibling=Gl(h,h.pendingProps),j.return=g;j.sibling=null}return g.child}function Qce(h,g,j){switch(g.tag){case 3:YD(g),hf();break;case 5:hD(g);break;case 1:Bs(g.type)&&E0(g);break;case 4:KS(g,g.stateNode.containerInfo);break;case 10:var A=g.type._context,M=g.memoizedProps.value;En(R0,A._currentValue),A._currentValue=M;break;case 13:if(A=g.memoizedState,A!==null)return A.dehydrated!==null?(En(Qn,Qn.current&1),g.flags|=128,null):(j&g.child.childLanes)!==0?QD(h,g,j):(En(Qn,Qn.current&1),h=Io(h,g,j),h!==null?h.sibling:null);En(Qn,Qn.current&1);break;case 19:if(A=(j&g.childLanes)!==0,(h.flags&128)!==0){if(A)return JD(h,g,j);g.flags|=128}if(M=g.memoizedState,M!==null&&(M.rendering=null,M.tail=null,M.lastEffect=null),En(Qn,Qn.current),A)break;return null;case 22:case 23:return g.lanes=0,WD(h,g,j)}return Io(h,g,j)}var eL,gk,tL,nL;eL=function(h,g){for(var j=g.child;j!==null;){if(j.tag===5||j.tag===6)h.appendChild(j.stateNode);else if(j.tag!==4&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===g)break;for(;j.sibling===null;){if(j.return===null||j.return===g)return;j=j.return}j.sibling.return=j.return,j=j.sibling}},gk=function(){},tL=function(h,g,j,A){var M=h.memoizedProps;if(M!==A){h=g.stateNode,iu(Vi.current);var $=null;switch(j){case"input":M=fe(h,M),A=fe(h,A),$=[];break;case"select":M=L({},M,{value:void 0}),A=L({},A,{value:void 0}),$=[];break;case"textarea":M=wt(h,M),A=wt(h,A),$=[];break;default:typeof M.onClick!="function"&&typeof A.onClick=="function"&&(h.onclick=C0)}un(j,A);var G;j=null;for(Ne in M)if(!A.hasOwnProperty(Ne)&&M.hasOwnProperty(Ne)&&M[Ne]!=null)if(Ne==="style"){var ee=M[Ne];for(G in ee)ee.hasOwnProperty(G)&&(j||(j={}),j[G]="")}else Ne!=="dangerouslySetInnerHTML"&&Ne!=="children"&&Ne!=="suppressContentEditableWarning"&&Ne!=="suppressHydrationWarning"&&Ne!=="autoFocus"&&(a.hasOwnProperty(Ne)?$||($=[]):($=$||[]).push(Ne,null));for(Ne in A){var ce=A[Ne];if(ee=M!=null?M[Ne]:void 0,A.hasOwnProperty(Ne)&&ce!==ee&&(ce!=null||ee!=null))if(Ne==="style")if(ee){for(G in ee)!ee.hasOwnProperty(G)||ce&&ce.hasOwnProperty(G)||(j||(j={}),j[G]="");for(G in ce)ce.hasOwnProperty(G)&&ee[G]!==ce[G]&&(j||(j={}),j[G]=ce[G])}else j||($||($=[]),$.push(Ne,j)),j=ce;else Ne==="dangerouslySetInnerHTML"?(ce=ce?ce.__html:void 0,ee=ee?ee.__html:void 0,ce!=null&&ee!==ce&&($=$||[]).push(Ne,ce)):Ne==="children"?typeof ce!="string"&&typeof ce!="number"||($=$||[]).push(Ne,""+ce):Ne!=="suppressContentEditableWarning"&&Ne!=="suppressHydrationWarning"&&(a.hasOwnProperty(Ne)?(ce!=null&&Ne==="onScroll"&&Rn("scroll",h),$||ee===ce||($=[])):($=$||[]).push(Ne,ce))}j&&($=$||[]).push("style",j);var Ne=$;(g.updateQueue=Ne)&&(g.flags|=4)}},nL=function(h,g,j,A){j!==A&&(g.flags|=4)};function Rp(h,g){if(!Hn)switch(h.tailMode){case"hidden":g=h.tail;for(var j=null;g!==null;)g.alternate!==null&&(j=g),g=g.sibling;j===null?h.tail=null:j.sibling=null;break;case"collapsed":j=h.tail;for(var A=null;j!==null;)j.alternate!==null&&(A=j),j=j.sibling;A===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:A.sibling=null}}function fs(h){var g=h.alternate!==null&&h.alternate.child===h.child,j=0,A=0;if(g)for(var M=h.child;M!==null;)j|=M.lanes|M.childLanes,A|=M.subtreeFlags&14680064,A|=M.flags&14680064,M.return=h,M=M.sibling;else for(M=h.child;M!==null;)j|=M.lanes|M.childLanes,A|=M.subtreeFlags,A|=M.flags,M.return=h,M=M.sibling;return h.subtreeFlags|=A,h.childLanes=j,g}function Zce(h,g,j){var A=g.pendingProps;switch($S(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fs(g),null;case 1:return Bs(g.type)&&A0(),fs(g),null;case 3:return A=g.stateNode,xf(),Dn(zs),Dn(us),QS(),A.pendingContext&&(A.context=A.pendingContext,A.pendingContext=null),(h===null||h.child===null)&&(O0(g)?g.flags|=4:h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,pi!==null&&(_k(pi),pi=null))),gk(h,g),fs(g),null;case 5:YS(g);var M=iu(Pp.current);if(j=g.type,h!==null&&g.stateNode!=null)tL(h,g,j,A,M),h.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!A){if(g.stateNode===null)throw Error(n(166));return fs(g),null}if(h=iu(Vi.current),O0(g)){A=g.stateNode,j=g.type;var $=g.memoizedProps;switch(A[qi]=g,A[kp]=$,h=(g.mode&1)!==0,j){case"dialog":Rn("cancel",A),Rn("close",A);break;case"iframe":case"object":case"embed":Rn("load",A);break;case"video":case"audio":for(M=0;M<jp.length;M++)Rn(jp[M],A);break;case"source":Rn("error",A);break;case"img":case"image":case"link":Rn("error",A),Rn("load",A);break;case"details":Rn("toggle",A);break;case"input":Ee(A,$),Rn("invalid",A);break;case"select":A._wrapperState={wasMultiple:!!$.multiple},Rn("invalid",A);break;case"textarea":At(A,$),Rn("invalid",A)}un(j,$),M=null;for(var G in $)if($.hasOwnProperty(G)){var ee=$[G];G==="children"?typeof ee=="string"?A.textContent!==ee&&($.suppressHydrationWarning!==!0&&k0(A.textContent,ee,h),M=["children",ee]):typeof ee=="number"&&A.textContent!==""+ee&&($.suppressHydrationWarning!==!0&&k0(A.textContent,ee,h),M=["children",""+ee]):a.hasOwnProperty(G)&&ee!=null&&G==="onScroll"&&Rn("scroll",A)}switch(j){case"input":he(A),St(A,$,!0);break;case"textarea":he(A),vn(A);break;case"select":case"option":break;default:typeof $.onClick=="function"&&(A.onclick=C0)}A=M,g.updateQueue=A,A!==null&&(g.flags|=4)}else{G=M.nodeType===9?M:M.ownerDocument,h==="http://www.w3.org/1999/xhtml"&&(h=ye(j)),h==="http://www.w3.org/1999/xhtml"?j==="script"?(h=G.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild)):typeof A.is=="string"?h=G.createElement(j,{is:A.is}):(h=G.createElement(j),j==="select"&&(G=h,A.multiple?G.multiple=!0:A.size&&(G.size=A.size))):h=G.createElementNS(h,j),h[qi]=g,h[kp]=A,eL(h,g,!1,!1),g.stateNode=h;e:{switch(G=Dr(j,A),j){case"dialog":Rn("cancel",h),Rn("close",h),M=A;break;case"iframe":case"object":case"embed":Rn("load",h),M=A;break;case"video":case"audio":for(M=0;M<jp.length;M++)Rn(jp[M],h);M=A;break;case"source":Rn("error",h),M=A;break;case"img":case"image":case"link":Rn("error",h),Rn("load",h),M=A;break;case"details":Rn("toggle",h),M=A;break;case"input":Ee(h,A),M=fe(h,A),Rn("invalid",h);break;case"option":M=A;break;case"select":h._wrapperState={wasMultiple:!!A.multiple},M=L({},A,{value:void 0}),Rn("invalid",h);break;case"textarea":At(h,A),M=wt(h,A),Rn("invalid",h);break;default:M=A}un(j,M),ee=M;for($ in ee)if(ee.hasOwnProperty($)){var ce=ee[$];$==="style"?dr(h,ce):$==="dangerouslySetInnerHTML"?(ce=ce?ce.__html:void 0,ce!=null&&jt(h,ce)):$==="children"?typeof ce=="string"?(j!=="textarea"||ce!=="")&&pt(h,ce):typeof ce=="number"&&pt(h,""+ce):$!=="suppressContentEditableWarning"&&$!=="suppressHydrationWarning"&&$!=="autoFocus"&&(a.hasOwnProperty($)?ce!=null&&$==="onScroll"&&Rn("scroll",h):ce!=null&&S(h,$,ce,G))}switch(j){case"input":he(h),St(h,A,!1);break;case"textarea":he(h),vn(h);break;case"option":A.value!=null&&h.setAttribute("value",""+ne(A.value));break;case"select":h.multiple=!!A.multiple,$=A.value,$!=null?Ue(h,!!A.multiple,$,!1):A.defaultValue!=null&&Ue(h,!!A.multiple,A.defaultValue,!0);break;default:typeof M.onClick=="function"&&(h.onclick=C0)}switch(j){case"button":case"input":case"select":case"textarea":A=!!A.autoFocus;break e;case"img":A=!0;break e;default:A=!1}}A&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return fs(g),null;case 6:if(h&&g.stateNode!=null)nL(h,g,h.memoizedProps,A);else{if(typeof A!="string"&&g.stateNode===null)throw Error(n(166));if(j=iu(Pp.current),iu(Vi.current),O0(g)){if(A=g.stateNode,j=g.memoizedProps,A[qi]=g,($=A.nodeValue!==j)&&(h=ua,h!==null))switch(h.tag){case 3:k0(A.nodeValue,j,(h.mode&1)!==0);break;case 5:h.memoizedProps.suppressHydrationWarning!==!0&&k0(A.nodeValue,j,(h.mode&1)!==0)}$&&(g.flags|=4)}else A=(j.nodeType===9?j:j.ownerDocument).createTextNode(A),A[qi]=g,g.stateNode=A}return fs(g),null;case 13:if(Dn(Qn),A=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(Hn&&da!==null&&(g.mode&1)!==0&&(g.flags&128)===0)aD(),hf(),g.flags|=98560,$=!1;else if($=O0(g),A!==null&&A.dehydrated!==null){if(h===null){if(!$)throw Error(n(318));if($=g.memoizedState,$=$!==null?$.dehydrated:null,!$)throw Error(n(317));$[qi]=g}else hf(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;fs(g),$=!1}else pi!==null&&(_k(pi),pi=null),$=!0;if(!$)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=j,g):(A=A!==null,A!==(h!==null&&h.memoizedState!==null)&&A&&(g.child.flags|=8192,(g.mode&1)!==0&&(h===null||(Qn.current&1)!==0?Er===0&&(Er=3):Pk())),g.updateQueue!==null&&(g.flags|=4),fs(g),null);case 4:return xf(),gk(h,g),h===null&&Np(g.stateNode.containerInfo),fs(g),null;case 10:return qS(g.type._context),fs(g),null;case 17:return Bs(g.type)&&A0(),fs(g),null;case 19:if(Dn(Qn),$=g.memoizedState,$===null)return fs(g),null;if(A=(g.flags&128)!==0,G=$.rendering,G===null)if(A)Rp($,!1);else{if(Er!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(G=F0(h),G!==null){for(g.flags|=128,Rp($,!1),A=G.updateQueue,A!==null&&(g.updateQueue=A,g.flags|=4),g.subtreeFlags=0,A=j,j=g.child;j!==null;)$=j,h=A,$.flags&=14680066,G=$.alternate,G===null?($.childLanes=0,$.lanes=h,$.child=null,$.subtreeFlags=0,$.memoizedProps=null,$.memoizedState=null,$.updateQueue=null,$.dependencies=null,$.stateNode=null):($.childLanes=G.childLanes,$.lanes=G.lanes,$.child=G.child,$.subtreeFlags=0,$.deletions=null,$.memoizedProps=G.memoizedProps,$.memoizedState=G.memoizedState,$.updateQueue=G.updateQueue,$.type=G.type,h=G.dependencies,$.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),j=j.sibling;return En(Qn,Qn.current&1|2),g.child}h=h.sibling}$.tail!==null&&Xn()>wf&&(g.flags|=128,A=!0,Rp($,!1),g.lanes=4194304)}else{if(!A)if(h=F0(G),h!==null){if(g.flags|=128,A=!0,j=h.updateQueue,j!==null&&(g.updateQueue=j,g.flags|=4),Rp($,!0),$.tail===null&&$.tailMode==="hidden"&&!G.alternate&&!Hn)return fs(g),null}else 2*Xn()-$.renderingStartTime>wf&&j!==1073741824&&(g.flags|=128,A=!0,Rp($,!1),g.lanes=4194304);$.isBackwards?(G.sibling=g.child,g.child=G):(j=$.last,j!==null?j.sibling=G:g.child=G,$.last=G)}return $.tail!==null?(g=$.tail,$.rendering=g,$.tail=g.sibling,$.renderingStartTime=Xn(),g.sibling=null,j=Qn.current,En(Qn,A?j&1|2:j&1),g):(fs(g),null);case 22:case 23:return Ek(),A=g.memoizedState!==null,h!==null&&h.memoizedState!==null!==A&&(g.flags|=8192),A&&(g.mode&1)!==0?(fa&1073741824)!==0&&(fs(g),g.subtreeFlags&6&&(g.flags|=8192)):fs(g),null;case 24:return null;case 25:return null}throw Error(n(156,g.tag))}function Jce(h,g){switch($S(g),g.tag){case 1:return Bs(g.type)&&A0(),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return xf(),Dn(zs),Dn(us),QS(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 5:return YS(g),null;case 13:if(Dn(Qn),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(n(340));hf()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 19:return Dn(Qn),null;case 4:return xf(),null;case 10:return qS(g.type._context),null;case 22:case 23:return Ek(),null;case 24:return null;default:return null}}var K0=!1,hs=!1,eue=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function vf(h,g){var j=h.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(A){rr(h,g,A)}else j.current=null}function xk(h,g,j){try{j()}catch(A){rr(h,g,A)}}var rL=!1;function tue(h,g){if(ES=m0,h=R5(),wS(h)){if("selectionStart"in h)var j={start:h.selectionStart,end:h.selectionEnd};else e:{j=(j=h.ownerDocument)&&j.defaultView||window;var A=j.getSelection&&j.getSelection();if(A&&A.rangeCount!==0){j=A.anchorNode;var M=A.anchorOffset,$=A.focusNode;A=A.focusOffset;try{j.nodeType,$.nodeType}catch{j=null;break e}var G=0,ee=-1,ce=-1,Ne=0,Ie=0,Me=h,Te=null;t:for(;;){for(var Ge;Me!==j||M!==0&&Me.nodeType!==3||(ee=G+M),Me!==$||A!==0&&Me.nodeType!==3||(ce=G+A),Me.nodeType===3&&(G+=Me.nodeValue.length),(Ge=Me.firstChild)!==null;)Te=Me,Me=Ge;for(;;){if(Me===h)break t;if(Te===j&&++Ne===M&&(ee=G),Te===$&&++Ie===A&&(ce=G),(Ge=Me.nextSibling)!==null)break;Me=Te,Te=Me.parentNode}Me=Ge}j=ee===-1||ce===-1?null:{start:ee,end:ce}}else j=null}j=j||{start:0,end:0}}else j=null;for(PS={focusedElem:h,selectionRange:j},m0=!1,Ye=g;Ye!==null;)if(g=Ye,h=g.child,(g.subtreeFlags&1028)!==0&&h!==null)h.return=g,Ye=h;else for(;Ye!==null;){g=Ye;try{var Qe=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(Qe!==null){var et=Qe.memoizedProps,fr=Qe.memoizedState,be=g.stateNode,ue=be.getSnapshotBeforeUpdate(g.elementType===g.type?et:gi(g.type,et),fr);be.__reactInternalSnapshotBeforeUpdate=ue}break;case 3:var je=g.stateNode.containerInfo;je.nodeType===1?je.textContent="":je.nodeType===9&&je.documentElement&&je.removeChild(je.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch($e){rr(g,g.return,$e)}if(h=g.sibling,h!==null){h.return=g.return,Ye=h;break}Ye=g.return}return Qe=rL,rL=!1,Qe}function Dp(h,g,j){var A=g.updateQueue;if(A=A!==null?A.lastEffect:null,A!==null){var M=A=A.next;do{if((M.tag&h)===h){var $=M.destroy;M.destroy=void 0,$!==void 0&&xk(g,j,$)}M=M.next}while(M!==A)}}function Y0(h,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var j=g=g.next;do{if((j.tag&h)===h){var A=j.create;j.destroy=A()}j=j.next}while(j!==g)}}function yk(h){var g=h.ref;if(g!==null){var j=h.stateNode;switch(h.tag){case 5:h=j;break;default:h=j}typeof g=="function"?g(h):g.current=h}}function sL(h){var g=h.alternate;g!==null&&(h.alternate=null,sL(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&(delete g[qi],delete g[kp],delete g[MS],delete g[Lce],delete g[$ce])),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function aL(h){return h.tag===5||h.tag===3||h.tag===4}function iL(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||aL(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function vk(h,g,j){var A=h.tag;if(A===5||A===6)h=h.stateNode,g?j.nodeType===8?j.parentNode.insertBefore(h,g):j.insertBefore(h,g):(j.nodeType===8?(g=j.parentNode,g.insertBefore(h,j)):(g=j,g.appendChild(h)),j=j._reactRootContainer,j!=null||g.onclick!==null||(g.onclick=C0));else if(A!==4&&(h=h.child,h!==null))for(vk(h,g,j),h=h.sibling;h!==null;)vk(h,g,j),h=h.sibling}function bk(h,g,j){var A=h.tag;if(A===5||A===6)h=h.stateNode,g?j.insertBefore(h,g):j.appendChild(h);else if(A!==4&&(h=h.child,h!==null))for(bk(h,g,j),h=h.sibling;h!==null;)bk(h,g,j),h=h.sibling}var Zr=null,xi=!1;function Ul(h,g,j){for(j=j.child;j!==null;)oL(h,g,j),j=j.sibling}function oL(h,g,j){if(Ta&&typeof Ta.onCommitFiberUnmount=="function")try{Ta.onCommitFiberUnmount(Jc,j)}catch{}switch(j.tag){case 5:hs||vf(j,g);case 6:var A=Zr,M=xi;Zr=null,Ul(h,g,j),Zr=A,xi=M,Zr!==null&&(xi?(h=Zr,j=j.stateNode,h.nodeType===8?h.parentNode.removeChild(j):h.removeChild(j)):Zr.removeChild(j.stateNode));break;case 18:Zr!==null&&(xi?(h=Zr,j=j.stateNode,h.nodeType===8?OS(h.parentNode,j):h.nodeType===1&&OS(h,j),mp(h)):OS(Zr,j.stateNode));break;case 4:A=Zr,M=xi,Zr=j.stateNode.containerInfo,xi=!0,Ul(h,g,j),Zr=A,xi=M;break;case 0:case 11:case 14:case 15:if(!hs&&(A=j.updateQueue,A!==null&&(A=A.lastEffect,A!==null))){M=A=A.next;do{var $=M,G=$.destroy;$=$.tag,G!==void 0&&(($&2)!==0||($&4)!==0)&&xk(j,g,G),M=M.next}while(M!==A)}Ul(h,g,j);break;case 1:if(!hs&&(vf(j,g),A=j.stateNode,typeof A.componentWillUnmount=="function"))try{A.props=j.memoizedProps,A.state=j.memoizedState,A.componentWillUnmount()}catch(ee){rr(j,g,ee)}Ul(h,g,j);break;case 21:Ul(h,g,j);break;case 22:j.mode&1?(hs=(A=hs)||j.memoizedState!==null,Ul(h,g,j),hs=A):Ul(h,g,j);break;default:Ul(h,g,j)}}function lL(h){var g=h.updateQueue;if(g!==null){h.updateQueue=null;var j=h.stateNode;j===null&&(j=h.stateNode=new eue),g.forEach(function(A){var M=uue.bind(null,h,A);j.has(A)||(j.add(A),A.then(M,M))})}}function yi(h,g){var j=g.deletions;if(j!==null)for(var A=0;A<j.length;A++){var M=j[A];try{var $=h,G=g,ee=G;e:for(;ee!==null;){switch(ee.tag){case 5:Zr=ee.stateNode,xi=!1;break e;case 3:Zr=ee.stateNode.containerInfo,xi=!0;break e;case 4:Zr=ee.stateNode.containerInfo,xi=!0;break e}ee=ee.return}if(Zr===null)throw Error(n(160));oL($,G,M),Zr=null,xi=!1;var ce=M.alternate;ce!==null&&(ce.return=null),M.return=null}catch(Ne){rr(M,g,Ne)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)cL(g,h),g=g.sibling}function cL(h,g){var j=h.alternate,A=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:if(yi(g,h),Gi(h),A&4){try{Dp(3,h,h.return),Y0(3,h)}catch(et){rr(h,h.return,et)}try{Dp(5,h,h.return)}catch(et){rr(h,h.return,et)}}break;case 1:yi(g,h),Gi(h),A&512&&j!==null&&vf(j,j.return);break;case 5:if(yi(g,h),Gi(h),A&512&&j!==null&&vf(j,j.return),h.flags&32){var M=h.stateNode;try{pt(M,"")}catch(et){rr(h,h.return,et)}}if(A&4&&(M=h.stateNode,M!=null)){var $=h.memoizedProps,G=j!==null?j.memoizedProps:$,ee=h.type,ce=h.updateQueue;if(h.updateQueue=null,ce!==null)try{ee==="input"&&$.type==="radio"&&$.name!=null&&Re(M,$),Dr(ee,G);var Ne=Dr(ee,$);for(G=0;G<ce.length;G+=2){var Ie=ce[G],Me=ce[G+1];Ie==="style"?dr(M,Me):Ie==="dangerouslySetInnerHTML"?jt(M,Me):Ie==="children"?pt(M,Me):S(M,Ie,Me,Ne)}switch(ee){case"input":qe(M,$);break;case"textarea":cn(M,$);break;case"select":var Te=M._wrapperState.wasMultiple;M._wrapperState.wasMultiple=!!$.multiple;var Ge=$.value;Ge!=null?Ue(M,!!$.multiple,Ge,!1):Te!==!!$.multiple&&($.defaultValue!=null?Ue(M,!!$.multiple,$.defaultValue,!0):Ue(M,!!$.multiple,$.multiple?[]:"",!1))}M[kp]=$}catch(et){rr(h,h.return,et)}}break;case 6:if(yi(g,h),Gi(h),A&4){if(h.stateNode===null)throw Error(n(162));M=h.stateNode,$=h.memoizedProps;try{M.nodeValue=$}catch(et){rr(h,h.return,et)}}break;case 3:if(yi(g,h),Gi(h),A&4&&j!==null&&j.memoizedState.isDehydrated)try{mp(g.containerInfo)}catch(et){rr(h,h.return,et)}break;case 4:yi(g,h),Gi(h);break;case 13:yi(g,h),Gi(h),M=h.child,M.flags&8192&&($=M.memoizedState!==null,M.stateNode.isHidden=$,!$||M.alternate!==null&&M.alternate.memoizedState!==null||(Nk=Xn())),A&4&&lL(h);break;case 22:if(Ie=j!==null&&j.memoizedState!==null,h.mode&1?(hs=(Ne=hs)||Ie,yi(g,h),hs=Ne):yi(g,h),Gi(h),A&8192){if(Ne=h.memoizedState!==null,(h.stateNode.isHidden=Ne)&&!Ie&&(h.mode&1)!==0)for(Ye=h,Ie=h.child;Ie!==null;){for(Me=Ye=Ie;Ye!==null;){switch(Te=Ye,Ge=Te.child,Te.tag){case 0:case 11:case 14:case 15:Dp(4,Te,Te.return);break;case 1:vf(Te,Te.return);var Qe=Te.stateNode;if(typeof Qe.componentWillUnmount=="function"){A=Te,j=Te.return;try{g=A,Qe.props=g.memoizedProps,Qe.state=g.memoizedState,Qe.componentWillUnmount()}catch(et){rr(A,j,et)}}break;case 5:vf(Te,Te.return);break;case 22:if(Te.memoizedState!==null){fL(Me);continue}}Ge!==null?(Ge.return=Te,Ye=Ge):fL(Me)}Ie=Ie.sibling}e:for(Ie=null,Me=h;;){if(Me.tag===5){if(Ie===null){Ie=Me;try{M=Me.stateNode,Ne?($=M.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none"):(ee=Me.stateNode,ce=Me.memoizedProps.style,G=ce!=null&&ce.hasOwnProperty("display")?ce.display:null,ee.style.display=Mn("display",G))}catch(et){rr(h,h.return,et)}}}else if(Me.tag===6){if(Ie===null)try{Me.stateNode.nodeValue=Ne?"":Me.memoizedProps}catch(et){rr(h,h.return,et)}}else if((Me.tag!==22&&Me.tag!==23||Me.memoizedState===null||Me===h)&&Me.child!==null){Me.child.return=Me,Me=Me.child;continue}if(Me===h)break e;for(;Me.sibling===null;){if(Me.return===null||Me.return===h)break e;Ie===Me&&(Ie=null),Me=Me.return}Ie===Me&&(Ie=null),Me.sibling.return=Me.return,Me=Me.sibling}}break;case 19:yi(g,h),Gi(h),A&4&&lL(h);break;case 21:break;default:yi(g,h),Gi(h)}}function Gi(h){var g=h.flags;if(g&2){try{e:{for(var j=h.return;j!==null;){if(aL(j)){var A=j;break e}j=j.return}throw Error(n(160))}switch(A.tag){case 5:var M=A.stateNode;A.flags&32&&(pt(M,""),A.flags&=-33);var $=iL(h);bk(h,$,M);break;case 3:case 4:var G=A.stateNode.containerInfo,ee=iL(h);vk(h,ee,G);break;default:throw Error(n(161))}}catch(ce){rr(h,h.return,ce)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function nue(h,g,j){Ye=h,uL(h)}function uL(h,g,j){for(var A=(h.mode&1)!==0;Ye!==null;){var M=Ye,$=M.child;if(M.tag===22&&A){var G=M.memoizedState!==null||K0;if(!G){var ee=M.alternate,ce=ee!==null&&ee.memoizedState!==null||hs;ee=K0;var Ne=hs;if(K0=G,(hs=ce)&&!Ne)for(Ye=M;Ye!==null;)G=Ye,ce=G.child,G.tag===22&&G.memoizedState!==null?hL(M):ce!==null?(ce.return=G,Ye=ce):hL(M);for(;$!==null;)Ye=$,uL($),$=$.sibling;Ye=M,K0=ee,hs=Ne}dL(h)}else(M.subtreeFlags&8772)!==0&&$!==null?($.return=M,Ye=$):dL(h)}}function dL(h){for(;Ye!==null;){var g=Ye;if((g.flags&8772)!==0){var j=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:hs||Y0(5,g);break;case 1:var A=g.stateNode;if(g.flags&4&&!hs)if(j===null)A.componentDidMount();else{var M=g.elementType===g.type?j.memoizedProps:gi(g.type,j.memoizedProps);A.componentDidUpdate(M,j.memoizedState,A.__reactInternalSnapshotBeforeUpdate)}var $=g.updateQueue;$!==null&&fD(g,$,A);break;case 3:var G=g.updateQueue;if(G!==null){if(j=null,g.child!==null)switch(g.child.tag){case 5:j=g.child.stateNode;break;case 1:j=g.child.stateNode}fD(g,G,j)}break;case 5:var ee=g.stateNode;if(j===null&&g.flags&4){j=ee;var ce=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":ce.autoFocus&&j.focus();break;case"img":ce.src&&(j.src=ce.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var Ne=g.alternate;if(Ne!==null){var Ie=Ne.memoizedState;if(Ie!==null){var Me=Ie.dehydrated;Me!==null&&mp(Me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}hs||g.flags&512&&yk(g)}catch(Te){rr(g,g.return,Te)}}if(g===h){Ye=null;break}if(j=g.sibling,j!==null){j.return=g.return,Ye=j;break}Ye=g.return}}function fL(h){for(;Ye!==null;){var g=Ye;if(g===h){Ye=null;break}var j=g.sibling;if(j!==null){j.return=g.return,Ye=j;break}Ye=g.return}}function hL(h){for(;Ye!==null;){var g=Ye;try{switch(g.tag){case 0:case 11:case 15:var j=g.return;try{Y0(4,g)}catch(ce){rr(g,j,ce)}break;case 1:var A=g.stateNode;if(typeof A.componentDidMount=="function"){var M=g.return;try{A.componentDidMount()}catch(ce){rr(g,M,ce)}}var $=g.return;try{yk(g)}catch(ce){rr(g,$,ce)}break;case 5:var G=g.return;try{yk(g)}catch(ce){rr(g,G,ce)}}}catch(ce){rr(g,g.return,ce)}if(g===h){Ye=null;break}var ee=g.sibling;if(ee!==null){ee.return=g.return,Ye=ee;break}Ye=g.return}}var rue=Math.ceil,X0=_.ReactCurrentDispatcher,wk=_.ReactCurrentOwner,Da=_.ReactCurrentBatchConfig,en=0,$r=null,xr=null,Jr=0,fa=0,bf=Ll(0),Er=0,Lp=null,lu=0,Q0=0,jk=0,$p=null,Hs=null,Nk=0,wf=1/0,Oo=null,Z0=!1,Sk=null,Hl=null,J0=!1,ql=null,ev=0,Fp=0,kk=null,tv=-1,nv=0;function Cs(){return(en&6)!==0?Xn():tv!==-1?tv:tv=Xn()}function Vl(h){return(h.mode&1)===0?1:(en&2)!==0&&Jr!==0?Jr&-Jr:zce.transition!==null?(nv===0&&(nv=d0()),nv):(h=gn,h!==0||(h=window.event,h=h===void 0?16:p5(h.type)),h)}function vi(h,g,j,A){if(50<Fp)throw Fp=0,kk=null,Error(n(185));El(h,j,A),((en&2)===0||h!==$r)&&(h===$r&&((en&2)===0&&(Q0|=j),Er===4&&Wl(h,Jr)),qs(h,A),j===1&&en===0&&(g.mode&1)===0&&(wf=Xn()+500,P0&&Fl()))}function qs(h,g){var j=h.callbackNode;iS(h,g);var A=Jd(h,h===$r?Jr:0);if(A===0)j!==null&&o0(j),h.callbackNode=null,h.callbackPriority=0;else if(g=A&-A,h.callbackPriority!==g){if(j!=null&&o0(j),g===1)h.tag===0?Fce(pL.bind(null,h)):eD(pL.bind(null,h)),Rce(function(){(en&6)===0&&Fl()}),j=null;else{switch(o5(A)){case 1:j=lp;break;case 4:j=c0;break;case 16:j=Xd;break;case 536870912:j=u0;break;default:j=Xd}j=NL(j,mL.bind(null,h))}h.callbackPriority=g,h.callbackNode=j}}function mL(h,g){if(tv=-1,nv=0,(en&6)!==0)throw Error(n(327));var j=h.callbackNode;if(jf()&&h.callbackNode!==j)return null;var A=Jd(h,h===$r?Jr:0);if(A===0)return null;if((A&30)!==0||(A&h.expiredLanes)!==0||g)g=rv(h,A);else{g=A;var M=en;en|=2;var $=xL();($r!==h||Jr!==g)&&(Oo=null,wf=Xn()+500,uu(h,g));do try{iue();break}catch(ee){gL(h,ee)}while(!0);HS(),X0.current=$,en=M,xr!==null?g=0:($r=null,Jr=0,g=Er)}if(g!==0){if(g===2&&(M=eu(h),M!==0&&(A=M,g=Ck(h,M))),g===1)throw j=Lp,uu(h,0),Wl(h,A),qs(h,Xn()),j;if(g===6)Wl(h,A);else{if(M=h.current.alternate,(A&30)===0&&!sue(M)&&(g=rv(h,A),g===2&&($=eu(h),$!==0&&(A=$,g=Ck(h,$))),g===1))throw j=Lp,uu(h,0),Wl(h,A),qs(h,Xn()),j;switch(h.finishedWork=M,h.finishedLanes=A,g){case 0:case 1:throw Error(n(345));case 2:du(h,Hs,Oo);break;case 3:if(Wl(h,A),(A&130023424)===A&&(g=Nk+500-Xn(),10<g)){if(Jd(h,0)!==0)break;if(M=h.suspendedLanes,(M&A)!==A){Cs(),h.pingedLanes|=h.suspendedLanes&M;break}h.timeoutHandle=IS(du.bind(null,h,Hs,Oo),g);break}du(h,Hs,Oo);break;case 4:if(Wl(h,A),(A&4194240)===A)break;for(g=h.eventTimes,M=-1;0<A;){var G=31-la(A);$=1<<G,G=g[G],G>M&&(M=G),A&=~$}if(A=M,A=Xn()-A,A=(120>A?120:480>A?480:1080>A?1080:1920>A?1920:3e3>A?3e3:4320>A?4320:1960*rue(A/1960))-A,10<A){h.timeoutHandle=IS(du.bind(null,h,Hs,Oo),A);break}du(h,Hs,Oo);break;case 5:du(h,Hs,Oo);break;default:throw Error(n(329))}}}return qs(h,Xn()),h.callbackNode===j?mL.bind(null,h):null}function Ck(h,g){var j=$p;return h.current.memoizedState.isDehydrated&&(uu(h,g).flags|=256),h=rv(h,g),h!==2&&(g=Hs,Hs=j,g!==null&&_k(g)),h}function _k(h){Hs===null?Hs=h:Hs.push.apply(Hs,h)}function sue(h){for(var g=h;;){if(g.flags&16384){var j=g.updateQueue;if(j!==null&&(j=j.stores,j!==null))for(var A=0;A<j.length;A++){var M=j[A],$=M.getSnapshot;M=M.value;try{if(!mi($(),M))return!1}catch{return!1}}}if(j=g.child,g.subtreeFlags&16384&&j!==null)j.return=g,g=j;else{if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function Wl(h,g){for(g&=~jk,g&=~Q0,h.suspendedLanes|=g,h.pingedLanes&=~g,h=h.expirationTimes;0<g;){var j=31-la(g),A=1<<j;h[j]=-1,g&=~A}}function pL(h){if((en&6)!==0)throw Error(n(327));jf();var g=Jd(h,0);if((g&1)===0)return qs(h,Xn()),null;var j=rv(h,g);if(h.tag!==0&&j===2){var A=eu(h);A!==0&&(g=A,j=Ck(h,A))}if(j===1)throw j=Lp,uu(h,0),Wl(h,g),qs(h,Xn()),j;if(j===6)throw Error(n(345));return h.finishedWork=h.current.alternate,h.finishedLanes=g,du(h,Hs,Oo),qs(h,Xn()),null}function Ak(h,g){var j=en;en|=1;try{return h(g)}finally{en=j,en===0&&(wf=Xn()+500,P0&&Fl())}}function cu(h){ql!==null&&ql.tag===0&&(en&6)===0&&jf();var g=en;en|=1;var j=Da.transition,A=gn;try{if(Da.transition=null,gn=1,h)return h()}finally{gn=A,Da.transition=j,en=g,(en&6)===0&&Fl()}}function Ek(){fa=bf.current,Dn(bf)}function uu(h,g){h.finishedWork=null,h.finishedLanes=0;var j=h.timeoutHandle;if(j!==-1&&(h.timeoutHandle=-1,Mce(j)),xr!==null)for(j=xr.return;j!==null;){var A=j;switch($S(A),A.tag){case 1:A=A.type.childContextTypes,A!=null&&A0();break;case 3:xf(),Dn(zs),Dn(us),QS();break;case 5:YS(A);break;case 4:xf();break;case 13:Dn(Qn);break;case 19:Dn(Qn);break;case 10:qS(A.type._context);break;case 22:case 23:Ek()}j=j.return}if($r=h,xr=h=Gl(h.current,null),Jr=fa=g,Er=0,Lp=null,jk=Q0=lu=0,Hs=$p=null,au!==null){for(g=0;g<au.length;g++)if(j=au[g],A=j.interleaved,A!==null){j.interleaved=null;var M=A.next,$=j.pending;if($!==null){var G=$.next;$.next=M,A.next=G}j.pending=A}au=null}return h}function gL(h,g){do{var j=xr;try{if(HS(),z0.current=q0,B0){for(var A=Zn.memoizedState;A!==null;){var M=A.queue;M!==null&&(M.pending=null),A=A.next}B0=!1}if(ou=0,Lr=Ar=Zn=null,Tp=!1,Ip=0,wk.current=null,j===null||j.return===null){Er=1,Lp=g,xr=null;break}e:{var $=h,G=j.return,ee=j,ce=g;if(g=Jr,ee.flags|=32768,ce!==null&&typeof ce=="object"&&typeof ce.then=="function"){var Ne=ce,Ie=ee,Me=Ie.tag;if((Ie.mode&1)===0&&(Me===0||Me===11||Me===15)){var Te=Ie.alternate;Te?(Ie.updateQueue=Te.updateQueue,Ie.memoizedState=Te.memoizedState,Ie.lanes=Te.lanes):(Ie.updateQueue=null,Ie.memoizedState=null)}var Ge=BD(G);if(Ge!==null){Ge.flags&=-257,UD(Ge,G,ee,$,g),Ge.mode&1&&zD($,Ne,g),g=Ge,ce=Ne;var Qe=g.updateQueue;if(Qe===null){var et=new Set;et.add(ce),g.updateQueue=et}else Qe.add(ce);break e}else{if((g&1)===0){zD($,Ne,g),Pk();break e}ce=Error(n(426))}}else if(Hn&&ee.mode&1){var fr=BD(G);if(fr!==null){(fr.flags&65536)===0&&(fr.flags|=256),UD(fr,G,ee,$,g),BS(yf(ce,ee));break e}}$=ce=yf(ce,ee),Er!==4&&(Er=2),$p===null?$p=[$]:$p.push($),$=G;do{switch($.tag){case 3:$.flags|=65536,g&=-g,$.lanes|=g;var be=$D($,ce,g);dD($,be);break e;case 1:ee=ce;var ue=$.type,je=$.stateNode;if(($.flags&128)===0&&(typeof ue.getDerivedStateFromError=="function"||je!==null&&typeof je.componentDidCatch=="function"&&(Hl===null||!Hl.has(je)))){$.flags|=65536,g&=-g,$.lanes|=g;var $e=FD($,ee,g);dD($,$e);break e}}$=$.return}while($!==null)}vL(j)}catch(rt){g=rt,xr===j&&j!==null&&(xr=j=j.return);continue}break}while(!0)}function xL(){var h=X0.current;return X0.current=q0,h===null?q0:h}function Pk(){(Er===0||Er===3||Er===2)&&(Er=4),$r===null||(lu&268435455)===0&&(Q0&268435455)===0||Wl($r,Jr)}function rv(h,g){var j=en;en|=2;var A=xL();($r!==h||Jr!==g)&&(Oo=null,uu(h,g));do try{aue();break}catch(M){gL(h,M)}while(!0);if(HS(),en=j,X0.current=A,xr!==null)throw Error(n(261));return $r=null,Jr=0,Er}function aue(){for(;
vendor: 4,280 bytes, line 60
60xr!==null;)yL(xr)}function iue(){for(;xr!==null&&!ZN();)yL(xr)}function yL(h){var g=jL(h.alternate,h,fa);h.memoizedProps=h.pendingProps,g===null?vL(h):xr=g,wk.current=null}function vL(h){var g=h;do{var j=g.alternate;if(h=g.return,(g.flags&32768)===0){if(j=Zce(j,g,fa),j!==null){xr=j;return}}else{if(j=Jce(j,g),j!==null){j.flags&=32767,xr=j;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{Er=6,xr=null;return}}if(g=g.sibling,g!==null){xr=g;return}xr=g=h}while(g!==null);Er===0&&(Er=5)}function du(h,g,j){var A=gn,M=Da.transition;try{Da.transition=null,gn=1,oue(h,g,j,A)}finally{Da.transition=M,gn=A}return null}function oue(h,g,j,A){do jf();while(ql!==null);if((en&6)!==0)throw Error(n(327));j=h.finishedWork;var M=h.finishedLanes;if(j===null)return null;if(h.finishedWork=null,h.finishedLanes=0,j===h.current)throw Error(n(177));h.callbackNode=null,h.callbackPriority=0;var $=j.lanes|j.childLanes;if(Ble(h,$),h===$r&&(xr=$r=null,Jr=0),(j.subtreeFlags&2064)===0&&(j.flags&2064)===0||J0||(J0=!0,NL(Xd,function(){return jf(),null})),$=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||$){$=Da.transition,Da.transition=null;var G=gn;gn=1;var ee=en;en|=4,wk.current=null,tue(h,j),cL(j,h),_ce(PS),m0=!!ES,PS=ES=null,h.current=j,nue(j),l0(),en=ee,gn=G,Da.transition=$}else h.current=j;if(J0&&(J0=!1,ql=h,ev=M),$=h.pendingLanes,$===0&&(Hl=null),tS(j.stateNode),qs(h,Xn()),g!==null)for(A=h.onRecoverableError,j=0;j<g.length;j++)M=g[j],A(M.value,{componentStack:M.stack,digest:M.digest});if(Z0)throw Z0=!1,h=Sk,Sk=null,h;return(ev&1)!==0&&h.tag!==0&&jf(),$=h.pendingLanes,($&1)!==0?h===kk?Fp++:(Fp=0,kk=h):Fp=0,Fl(),null}function jf(){if(ql!==null){var h=o5(ev),g=Da.transition,j=gn;try{if(Da.transition=null,gn=16>h?16:h,ql===null)var A=!1;else{if(h=ql,ql=null,ev=0,(en&6)!==0)throw Error(n(331));var M=en;for(en|=4,Ye=h.current;Ye!==null;){var $=Ye,G=$.child;if((Ye.flags&16)!==0){var ee=$.deletions;if(ee!==null){for(var ce=0;ce<ee.length;ce++){var Ne=ee[ce];for(Ye=Ne;Ye!==null;){var Ie=Ye;switch(Ie.tag){case 0:case 11:case 15:Dp(8,Ie,$)}var Me=Ie.child;if(Me!==null)Me.return=Ie,Ye=Me;else for(;Ye!==null;){Ie=Ye;var Te=Ie.sibling,Ge=Ie.return;if(sL(Ie),Ie===Ne){Ye=null;break}if(Te!==null){Te.return=Ge,Ye=Te;break}Ye=Ge}}}var Qe=$.alternate;if(Qe!==null){var et=Qe.child;if(et!==null){Qe.child=null;do{var fr=et.sibling;et.sibling=null,et=fr}while(et!==null)}}Ye=$}}if(($.subtreeFlags&2064)!==0&&G!==null)G.return=$,Ye=G;else e:for(;Ye!==null;){if($=Ye,($.flags&2048)!==0)switch($.tag){case 0:case 11:case 15:Dp(9,$,$.return)}var be=$.sibling;if(be!==null){be.return=$.return,Ye=be;break e}Ye=$.return}}var ue=h.current;for(Ye=ue;Ye!==null;){G=Ye;var je=G.child;if((G.subtreeFlags&2064)!==0&&je!==null)je.return=G,Ye=je;else e:for(G=ue;Ye!==null;){if(ee=Ye,(ee.flags&2048)!==0)try{switch(ee.tag){case 0:case 11:case 15:Y0(9,ee)}}catch(rt){rr(ee,ee.return,rt)}if(ee===G){Ye=null;break e}var $e=ee.sibling;if($e!==null){$e.return=ee.return,Ye=$e;break e}Ye=ee.return}}if(en=M,Fl(),Ta&&typeof Ta.onPostCommitFiberRoot=="function")try{Ta.onPostCommitFiberRoot(Jc,h)}catch{}A=!0}return A}finally{gn=j,Da.transition=g}}return!1}function bL(h,g,j){g=yf(j,g),g=$D(h,g,1),h=Bl(h,g,1),g=Cs(),h!==null&&(El(h,1,g),qs(h,g))}function rr(h,g,j){if(h.tag===3)bL(h,h,j);else for(;g!==null;){if(g.tag===3){bL(g,h,j);break}else if(g.tag===1){var A=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof A.componentDidCatch=="function"&&(Hl===null||!Hl.has(A))){h=yf(j,h),h=FD(g,h,1),g=Bl(g,h,1),h=Cs(),g!==null&&(El(g,1,h),qs(g,h));break}}g=g.return}}function lue(h,g,j){var A=h.pingCache;A!==null&&A.delete(g),g=Cs(),h.pingedLanes|=h.suspendedLanes&j,$r===h&&(Jr&j)===j&&(Er===4||Er===3&&(Jr&130023424)===Jr&&500>Xn()-Nk?uu(h,0):jk|=j),qs(h,g)}function wL(h,g){g===0&&((h.mode&1)===0?g=1:(g=Zd,Zd<<=1,(Zd&130023424)===0&&(Zd=4194304)));var j=Cs();h=Po(h,g),h!==null&&(El(h,g,j),qs(h,j))}function cue(h){var g=h.memoizedState,j=0;g!==null&&(j=g.retryLane),wL(h,j)}function uue(h,g){var j=0;switch(h.tag){case 13:var A=h.stateNode,M=h.memoizedState;M!==null&&(j=M.retryLane);break;case 19:A=h.stateNode;break;default:throw Error(n(314))}A!==null&&A.delete(g),wL(h,j)}var jL;jL=function(h,g,j){if(h!==null)if(h.memoizedProps!==g.pendingProps||zs.current)Us=!0;
vendor: 12,724 bytes, line 60
60else{if((h.lanes&j)===0&&(g.flags&128)===0)return Us=!1,Qce(h,g,j);Us=(h.flags&131072)!==0}else Us=!1,Hn&&(g.flags&1048576)!==0&&tD(g,I0,g.index);switch(g.lanes=0,g.tag){case 2:var A=g.type;G0(h,g),h=g.pendingProps;var M=uf(g,us.current);gf(g,j),M=ek(null,g,A,h,M,j);var $=tk();return g.flags|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,Bs(A)?($=!0,E0(g)):$=!1,g.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,GS(g),M.updater=V0,g.stateNode=M,M._reactInternals=g,ok(g,A,h,j),g=dk(null,g,A,!0,$,j)):(g.tag=0,Hn&&$&&LS(g),ks(null,g,M,j),g=g.child),g;case 16:A=g.elementType;e:{switch(G0(h,g),h=g.pendingProps,M=A._init,A=M(A._payload),g.type=A,M=g.tag=fue(A),h=gi(A,h),M){case 0:g=uk(null,g,A,h,j);break e;case 1:g=KD(null,g,A,h,j);break e;case 11:g=HD(null,g,A,h,j);break e;case 14:g=qD(null,g,A,gi(A.type,h),j);break e}throw Error(n(306,A,""))}return g;case 0:return A=g.type,M=g.pendingProps,M=g.elementType===A?M:gi(A,M),uk(h,g,A,M,j);case 1:return A=g.type,M=g.pendingProps,M=g.elementType===A?M:gi(A,M),KD(h,g,A,M,j);case 3:e:{if(YD(g),h===null)throw Error(n(387));A=g.pendingProps,$=g.memoizedState,M=$.element,uD(h,g),$0(g,A,null,j);var G=g.memoizedState;if(A=G.element,$.isDehydrated)if($={element:A,isDehydrated:!1,cache:G.cache,pendingSuspenseBoundaries:G.pendingSuspenseBoundaries,transitions:G.transitions},g.updateQueue.baseState=$,g.memoizedState=$,g.flags&256){M=yf(Error(n(423)),g),g=XD(h,g,A,j,M);break e}else if(A!==M){M=yf(Error(n(424)),g),g=XD(h,g,A,j,M);break e}else for(da=Dl(g.stateNode.containerInfo.firstChild),ua=g,Hn=!0,pi=null,j=lD(g,null,A,j),g.child=j;j;)j.flags=j.flags&-3|4096,j=j.sibling;else{if(hf(),A===M){g=Io(h,g,j);break e}ks(h,g,A,j)}g=g.child}return g;case 5:return hD(g),h===null&&zS(g),A=g.type,M=g.pendingProps,$=h!==null?h.memoizedProps:null,G=M.children,TS(A,M)?G=null:$!==null&&TS(A,$)&&(g.flags|=32),GD(h,g),ks(h,g,G,j),g.child;case 6:return h===null&&zS(g),null;case 13:return QD(h,g,j);case 4:return KS(g,g.stateNode.containerInfo),A=g.pendingProps,h===null?g.child=mf(g,null,A,j):ks(h,g,A,j),g.child;case 11:return A=g.type,M=g.pendingProps,M=g.elementType===A?M:gi(A,M),HD(h,g,A,M,j);case 7:return ks(h,g,g.pendingProps,j),g.child;case 8:return ks(h,g,g.pendingProps.children,j),g.child;case 12:return ks(h,g,g.pendingProps.children,j),g.child;case 10:e:{if(A=g.type._context,M=g.pendingProps,$=g.memoizedProps,G=M.value,En(R0,A._currentValue),A._currentValue=G,$!==null)if(mi($.value,G)){if($.children===M.children&&!zs.current){g=Io(h,g,j);break e}}else for($=g.child,$!==null&&($.return=g);$!==null;){var ee=$.dependencies;if(ee!==null){G=$.child;for(var ce=ee.firstContext;ce!==null;){if(ce.context===A){if($.tag===1){ce=To(-1,j&-j),ce.tag=2;var Ne=$.updateQueue;if(Ne!==null){Ne=Ne.shared;var Ie=Ne.pending;Ie===null?ce.next=ce:(ce.next=Ie.next,Ie.next=ce),Ne.pending=ce}}$.lanes|=j,ce=$.alternate,ce!==null&&(ce.lanes|=j),VS($.return,j,g),ee.lanes|=j;break}ce=ce.next}}else if($.tag===10)G=$.type===g.type?null:$.child;else if($.tag===18){if(G=$.return,G===null)throw Error(n(341));G.lanes|=j,ee=G.alternate,ee!==null&&(ee.lanes|=j),VS(G,j,g),G=$.sibling}else G=$.child;if(G!==null)G.return=$;else for(G=$;G!==null;){if(G===g){G=null;break}if($=G.sibling,$!==null){$.return=G.return,G=$;break}G=G.return}$=G}ks(h,g,M.children,j),g=g.child}return g;case 9:return M=g.type,A=g.pendingProps.children,gf(g,j),M=Ma(M),A=A(M),g.flags|=1,ks(h,g,A,j),g.child;case 14:return A=g.type,M=gi(A,g.pendingProps),M=gi(A.type,M),qD(h,g,A,M,j);case 15:return VD(h,g,g.type,g.pendingProps,j);case 17:return A=g.type,M=g.pendingProps,M=g.elementType===A?M:gi(A,M),G0(h,g),g.tag=1,Bs(A)?(h=!0,E0(g)):h=!1,gf(g,j),DD(g,A,M),ok(g,A,M,j),dk(null,g,A,!0,h,j);case 19:return JD(h,g,j);case 22:return WD(h,g,j)}throw Error(n(156,g.tag))};function NL(h,g){return i0(h,g)}function due(h,g,j,A){this.tag=h,this.key=j,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=A,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function La(h,g,j,A){return new due(h,g,j,A)}function Tk(h){return h=h.prototype,!(!h||!h.isReactComponent)}function fue(h){if(typeof h=="function")return Tk(h)?1:0;if(h!=null){if(h=h.$$typeof,h===D)return 11;if(h===F)return 14}return 2}function Gl(h,g){var j=h.alternate;return j===null?(j=La(h.tag,g,h.key,h.mode),j.elementType=h.elementType,j.type=h.type,j.stateNode=h.stateNode,j.alternate=h,h.alternate=j):(j.pendingProps=g,j.type=h.type,j.flags=0,j.subtreeFlags=0,j.deletions=null),j.flags=h.flags&14680064,j.childLanes=h.childLanes,j.lanes=h.lanes,j.child=h.child,j.memoizedProps=h.memoizedProps,j.memoizedState=h.memoizedState,j.updateQueue=h.updateQueue,g=h.dependencies,j.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},j.sibling=h.sibling,j.index=h.index,j.ref=h.ref,j}function sv(h,g,j,A,M,$){var G=2;if(A=h,typeof h=="function")Tk(h)&&(G=1);else if(typeof h=="string")G=5;else e:switch(h){case E:return fu(j.children,M,$,g);case O:G=8,M|=8;break;case P:return h=La(12,j,g,M|2),h.elementType=P,h.lanes=$,h;case z:return h=La(13,j,g,M),h.elementType=z,h.lanes=$,h;case I:return h=La(19,j,g,M),h.elementType=I,h.lanes=$,h;case H:return av(j,M,$,g);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case R:G=10;break e;case T:G=9;break e;case D:G=11;break e;case F:G=14;break e;case U:G=16,A=null;break e}throw Error(n(130,h==null?h:typeof h,""))}return g=La(G,j,g,M),g.elementType=h,g.type=A,g.lanes=$,g}function fu(h,g,j,A){return h=La(7,h,A,g),h.lanes=j,h}function av(h,g,j,A){return h=La(22,h,A,g),h.elementType=H,h.lanes=j,h.stateNode={isHidden:!1},h}function Ik(h,g,j){return h=La(6,h,null,g),h.lanes=j,h}function Ok(h,g,j){return g=La(4,h.children!==null?h.children:[],h.key,g),g.lanes=j,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}function hue(h,g,j,A,M){this.tag=g,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=cp(0),this.expirationTimes=cp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cp(0),this.identifierPrefix=A,this.onRecoverableError=M,this.mutableSourceEagerHydrationData=null}function Mk(h,g,j,A,M,$,G,ee,ce){return h=new hue(h,g,j,ee,ce),g===1?(g=1,$===!0&&(g|=8)):g=0,$=La(3,null,null,g),h.current=$,$.stateNode=h,$.memoizedState={element:A,isDehydrated:j,cache:null,transitions:null,pendingSuspenseBoundaries:null},GS($),h}function mue(h,g,j){var A=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:A==null?null:""+A,children:h,containerInfo:g,implementation:j}}function SL(h){if(!h)return $l;h=h._reactInternals;e:{if(Ui(h)!==h||h.tag!==1)throw Error(n(170));var g=h;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(Bs(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(n(171))}if(h.tag===1){var j=h.type;if(Bs(j))return Z5(h,j,g)}return g}function kL(h,g,j,A,M,$,G,ee,ce){return h=Mk(j,A,!0,h,M,$,G,ee,ce),h.context=SL(null),j=h.current,A=Cs(),M=Vl(j),$=To(A,M),$.callback=g??null,Bl(j,$,M),h.current.lanes=M,El(h,M,A),qs(h,A),h}function iv(h,g,j,A){var M=g.current,$=Cs(),G=Vl(M);return j=SL(j),g.context===null?g.context=j:g.pendingContext=j,g=To($,G),g.payload={element:h},A=A===void 0?null:A,A!==null&&(g.callback=A),h=Bl(M,g,G),h!==null&&(vi(h,M,G,$),L0(h,M,G)),G}function ov(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return h.child.stateNode;default:return h.child.stateNode}}function CL(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var j=h.retryLane;h.retryLane=j!==0&&j<g?j:g}}function Rk(h,g){CL(h,g),(h=h.alternate)&&CL(h,g)}function pue(){return null}var _L=typeof reportError=="function"?reportError:function(h){console.error(h)};function Dk(h){this._internalRoot=h}lv.prototype.render=Dk.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(n(409));iv(h,g,null,null)},lv.prototype.unmount=Dk.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;cu(function(){iv(null,h,null,null)}),g[Co]=null}};function lv(h){this._internalRoot=h}lv.prototype.unstable_scheduleHydration=function(h){if(h){var g=u5();h={blockedOn:null,target:h,priority:g};for(var j=0;j<Ol.length&&g!==0&&g<Ol[j].priority;j++);Ol.splice(j,0,h),j===0&&h5(h)}};function Lk(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function cv(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11&&(h.nodeType!==8||h.nodeValue!==" react-mount-point-unstable "))}function AL(){}function gue(h,g,j,A,M){if(M){if(typeof A=="function"){var $=A;A=function(){var Ne=ov(G);$.call(Ne)}}var G=kL(g,A,h,0,null,!1,!1,"",AL);return h._reactRootContainer=G,h[Co]=G.current,Np(h.nodeType===8?h.parentNode:h),cu(),G}for(;M=h.lastChild;)h.removeChild(M);if(typeof A=="function"){var ee=A;A=function(){var Ne=ov(ce);ee.call(Ne)}}var ce=Mk(h,0,!1,null,null,!1,!1,"",AL);return h._reactRootContainer=ce,h[Co]=ce.current,Np(h.nodeType===8?h.parentNode:h),cu(function(){iv(g,ce,j,A)}),ce}function uv(h,g,j,A,M){var $=j._reactRootContainer;if($){var G=$;if(typeof M=="function"){var ee=M;M=function(){var ce=ov(G);ee.call(ce)}}iv(g,G,h,M)}else G=gue(j,g,h,M,A);return ov(G)}l5=function(h){switch(h.tag){case 3:var g=h.stateNode;if(g.current.memoizedState.isDehydrated){var j=Hi(g.pendingLanes);j!==0&&(oS(g,j|1),qs(g,Xn()),(en&6)===0&&(wf=Xn()+500,Fl()))}break;case 13:cu(function(){var A=Po(h,1);if(A!==null){var M=Cs();vi(A,h,1,M)}}),Rk(h,1)}},lS=function(h){if(h.tag===13){var g=Po(h,134217728);if(g!==null){var j=Cs();vi(g,h,134217728,j)}Rk(h,134217728)}},c5=function(h){if(h.tag===13){var g=Vl(h),j=Po(h,g);if(j!==null){var A=Cs();vi(j,h,g,A)}Rk(h,g)}},u5=function(){return gn},d5=function(h,g){var j=gn;try{return gn=h,g()}finally{gn=j}},Pa=function(h,g,j){switch(g){case"input":if(qe(h,j),g=j.name,j.type==="radio"&&g!=null){for(j=h;j.parentNode;)j=j.parentNode;for(j=j.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<j.length;g++){var A=j[g];if(A!==h&&A.form===h.form){var M=_0(A);if(!M)throw Error(n(90));Q(A),qe(A,M)}}}break;case"textarea":cn(h,j);break;case"select":g=j.value,g!=null&&Ue(h,!!j.multiple,g,!1)}},De=Ak,Ke=cu;var xue={usingClientEntryPoint:!1,Events:[Cp,lf,_0,Fe,Ce,Ak]},zp={findFiberByHostInstance:tu,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},yue={bundleType:zp.bundleType,version:zp.version,rendererPackageName:zp.rendererPackageName,rendererConfig:zp.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(h){return h=s0(h),h===null?null:h.stateNode},findFiberByHostInstance:zp.findFiberByHostInstance||pue,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 dv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dv.isDisabled&&dv.supportsFiber)try{Jc=dv.inject(yue),Ta=dv}catch{}}return Vs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xue,Vs.createPortal=function(h,g){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lk(g))throw Error(n(200));return mue(h,g,null,j)},Vs.createRoot=function(h,g){if(!Lk(h))throw Error(n(299));var j=!1,A="",M=_L;return g!=null&&(g.unstable_strictMode===!0&&(j=!0),g.identifierPrefix!==void 0&&(A=g.identifierPrefix),g.onRecoverableError!==void 0&&(M=g.onRecoverableError)),g=Mk(h,1,!1,null,null,j,!1,A,M),h[Co]=g.current,Np(h.nodeType===8?h.parentNode:h),new Dk(g)},Vs.findDOMNode=function(h){if(h==null)return null;if(h.nodeType===1)return h;var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(n(188)):(h=Object.keys(h).join(","),Error(n(268,h)));return h=s0(g),h=h===null?null:h.stateNode,h},Vs.flushSync=function(h){return cu(h)},Vs.hydrate=function(h,g,j){if(!cv(g))throw Error(n(200));return uv(null,h,g,!0,j)},Vs.hydrateRoot=function(h,g,j){if(!Lk(h))throw Error(n(405));
60var A=j!=null&&j.hydratedSources||null,M=!1,$="",G=_L;if(j!=null&&(j.unstable_strictMode===!0&&(M=!0),j.identifierPrefix!==void 0&&($=j.identifierPrefix),j.onRecoverableError!==void 0&&(G=j.onRecoverableError)),g=kL(g,null,h,1,j??null,M,!1,$,G),h[Co]=g.current,Np(h),A)for(h=0;h<A.length;h++)j=A[h],M=j._getVersion,M=M(j._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[j,M]:g.mutableSourceEagerHydrationData.push(j,M);return new lv(g)},Vs.render=function(h,g,j){if(!cv(g))throw Error(n(200));return uv(null,h,g,!1,j)},Vs.unmountComponentAtNode=function(h){if(!cv(h))throw Error(n(40));return h._reactRootContainer?(cu(function(){uv(null,null,h,!1,function(){h._reactRootContainer=null,h[Co]=null})}),!0):!1},Vs.unstable_batchedUpdates=Ak,Vs.unstable_renderSubtreeIntoContainer=function(h,g,j,A){if(!cv(j))throw Error(n(200));if(h==null||h._reactInternals===void 0)throw Error(n(38));return uv(h,g,j,!1,A)},Vs.version="18.3.1-next-f1338f8080-20240426",Vs}var I6;function RG(){if(I6)return Zk.exports;I6=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zk.exports=kge(),Zk.exports}var O6;function Cge(){if(O6)return Sv;O6=1;var e=RG();return Sv.createRoot=e.createRoot,Sv.hydrateRoot=e.hydrateRoot,Sv}var _ge=Cge(),Td=RG();const DG=tn(Td);/**
61 * @remix-run/router v1.23.0
62 *
63 * Copyright (c) Remix Software Inc.
64 *
65 * This source code is licensed under the MIT license found in the
66 * LICENSE.md file in the root directory of this source tree.
67 *
68 * @license MIT
69 */function Hg(){return Hg=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},Hg.apply(this,arguments)}var vc;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(vc||(vc={}));const M6="popstate";function Age(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:o,hash:l}=r.location;return BP("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:Kb(a)}return Pge(t,n,null,e)}function Nr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function LG(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ege(){return Math.random().toString(36).substr(2,8)}function R6(e,t){return{usr:e.state,key:e.key,idx:t}}function BP(e,t,n,r){return n===void 0&&(n=null),Hg({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Lm(t):t,{state:n,key:t&&t.key||r||Ege()})}function Kb(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 Lm(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 Pge(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,l=vc.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(Hg({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=vc.Pop;let x=d(),w=x==null?null:x-u;u=x,c&&c({action:l,location:y.location,delta:w})}function m(x,w){l=vc.Push;let N=BP(y.location,x,w);u=d()+1;let S=R6(N,u),_=y.createHref(N);try{o.pushState(S,"",_)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(_)}i&&c&&c({action:l,location:y.location,delta:1})}function p(x,w){l=vc.Replace;let N=BP(y.location,x,w);u=d();let S=R6(N,u),_=y.createHref(N);o.replaceState(S,"",_),i&&c&&c({action:l,location:y.location,delta:0})}function v(x){let w=a.location.origin!=="null"?a.location.origin:a.location.href,N=typeof x=="string"?x:Kb(x);return N=N.replace(/ $/,"%20"),Nr(w,"No window.location.(origin|href) available to create URL for href: "+N),new URL(N,w)}let y={get action(){return l},get location(){return e(a,o)}
vendor: 2,641 bytes, line 69
69,listen(x){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(M6,f),c=x,()=>{a.removeEventListener(M6,f),c=null}},createHref(x){return t(a,x)},createURL:v,encodeLocation(x){let w=v(x);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:m,replace:p,go(x){return o.go(x)}};return y}var D6;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(D6||(D6={}));function Tge(e,t,n){return n===void 0&&(n="/"),Ige(e,t,n)}function Ige(e,t,n,r){let a=typeof t=="string"?Lm(t):t,i=vO(a.pathname||"/",n);if(i==null)return null;let o=$G(e);Oge(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=Vge(i);l=Uge(o[c],u)}return l}function $G(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(Nr(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=jc([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(Nr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),$G(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:zge(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of FG(i.path))a(i,o,c)}),t}function FG(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=FG(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Oge(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Bge(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Mge=/^:[\w-]+$/,Rge=3,Dge=2,Lge=1,$ge=10,Fge=-2,L6=e=>e==="*";function zge(e,t){let n=e.split("/"),r=n.length;return n.some(L6)&&(r+=Fge),t&&(r+=Dge),n.filter(a=>!L6(a)).reduce((a,i)=>a+(Mge.test(i)?Rge:i===""?Lge:$ge),r)}function Bge(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Uge(e,t,n){let{routesMeta:r}=e,a={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=Hge({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!f)return null;
vendor: 6,949 bytes, lines 69-78
69Object.assign(a,f.params),o.push({params:a,pathname:jc([i,f.pathname]),pathnameBase:Yge(jc([i,f.pathnameBase])),route:m}),f.pathnameBase!=="/"&&(i=jc([i,f.pathnameBase]))}return o}function Hge(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=qge(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:m,isOptional:p}=d;if(m==="*"){let y=l[f]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const v=l[f];return p&&!v?u[m]=void 0:u[m]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function qge(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),LG(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Vge(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return LG(!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 vO(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 Wge(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Lm(e):e;return{pathname:n?n.startsWith("/")?n:Gge(n,t):t,search:Xge(r),hash:Qge(a)}}function Gge(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function t2(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 Kge(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function zG(e,t){let n=Kge(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function BG(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Lm(e):(a=Hg({},e),Nr(!a.pathname||!a.pathname.includes("?"),t2("?","pathname","search",a)),Nr(!a.pathname||!a.pathname.includes("#"),t2("#","pathname","hash",a)),Nr(!a.search||!a.search.includes("#"),t2("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),f-=1;a.pathname=m.join("/")}l=f>=0?t[f]:"/"}let c=Wge(a,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const jc=e=>e.join("/").replace(/\/\/+/g,"/"),Yge=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xge=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qge=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Zge(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const UG=["post","put","patch","delete"];new Set(UG);const Jge=["get",...UG];new Set(Jge);/**
70 * React Router v6.30.1
71 *
72 * Copyright (c) Remix Software Inc.
73 *
74 * This source code is licensed under the MIT license found in the
75 * LICENSE.md file in the root directory of this source tree.
76 *
77 * @license MIT
78 */function qg(){return qg=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},qg.apply(this,arguments)}const bO=b.createContext(null),exe=b.createContext(null),Id=b.createContext(null),qj=b.createContext(null),zc=b.createContext({outlet:null,matches:[],isDataRoute:!1}),HG=b.createContext(null);function txe(e,t){let{relative:n}=t===void 0?{}:t;yy()||Nr(!1);let{basename:r,navigator:a}=b.useContext(Id),{hash:i,pathname:o,search:l}=VG(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:jc([r,o])),a.createHref({pathname:c,search:l,hash:i})}function yy(){return b.useContext(qj)!=null}function wl(){return yy()||Nr(!1),b.useContext(qj).location}function qG(e){b.useContext(Id).static||b.useLayoutEffect(e)}function qt(){let{isDataRoute:e}=b.useContext(zc);return e?mxe():nxe()}function nxe(){yy()||Nr(!1);let e=b.useContext(bO),{basename:t,future:n,navigator:r}=b.useContext(Id),{matches:a}=b.useContext(zc),{pathname:i}=wl(),o=JSON.stringify(zG(a,n.v7_relativeSplatPath)),l=b.useRef(!1);return qG(()=>{l.current=!0}),b.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=BG(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:jc([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}function wO(){let{matches:e}=b.useContext(zc),t=e[e.length-1];return t?t.params:{}}function VG(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Id),{matches:a}=b.useContext(zc),{pathname:i}=wl(),o=JSON.stringify(zG(a,r.v7_relativeSplatPath));return b.useMemo(()=>BG(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function rxe(e,t){return sxe(e,t)}function sxe(e,t,n,r){yy()||Nr(!1);let{navigator:a}=b.useContext(Id),{matches:i}=b.useContext(zc),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=wl(),d;if(t){var f;let x=typeof t=="string"?Lm(t):t;c==="/"||(f=x.pathname)!=null&&f.startsWith(c)||Nr(!1),d=x}else d=u;let m=d.pathname||"/",p=m;if(c!=="/"){let x=c.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(x.length).join("/")}let v=Tge(e,{pathname:p}),y=cxe(v&&v.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:jc([c,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:jc([c,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),i,n,r);return t&&y?b.createElement(qj.Provider,{value:{location:qg({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:vc.Pop}},y):y}function axe(){let e=hxe(),t=Zge(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application 
78Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:a},n):null,null)}const ixe=b.createElement(axe,null);class oxe extends b.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?b.createElement(zc.Provider,{value:this.props.routeContext},b.createElement(HG.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lxe(e){let{routeContext:t,match:n,children:r}=e,a=b.useContext(bO);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(zc.Provider,{value:t},r)}function cxe(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(a=n)==null?void 0:a.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Nr(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:m,errors:p}=n,v=f.route.loader&&m[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,m)=>{let p,v=!1,y=null,x=null;n&&(p=l&&f.route.id?l[f.route.id]:void 0,y=f.route.errorElement||ixe,c&&(u<0&&m===0?(pxe("route-fallback"),v=!0,x=null):u===m&&(v=!0,x=f.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,m+1)),N=()=>{let S;return p?S=y:v?S=x:f.route.Component?S=b.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=d,b.createElement(lxe,{match:f,routeContext:{outlet:d,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?b.createElement(oxe,{location:n.location,revalidation:n.revalidation,component:y,error:p,children:N(),routeC
78ontext:{outlet:null,matches:w,isDataRoute:!0}}):N()},null)}var WG=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(WG||{}),GG=(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})(GG||{});function uxe(e){let t=b.useContext(bO);return t||Nr(!1),t}function dxe(e){let t=b.useContext(exe);return t||Nr(!1),t}function fxe(e){let t=b.useContext(zc);return t||Nr(!1),t}function KG(e){let t=fxe(),n=t.matches[t.matches.length-1];return n.route.id||Nr(!1),n.route.id}function hxe(){var e;let t=b.useContext(HG),n=dxe(),r=KG();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function mxe(){let{router:e}=uxe(WG.UseNavigateStable),t=KG(GG.UseNavigateStable),n=b.useRef(!1);return qG(()=>{n.current=!0}),b.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,qg({fromRouteId:t},i)))},[e,t])}const $6={};function pxe(e,t,n){$6[e]||($6[e]=!0)}function gxe(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ft(e){Nr(!1)}function xxe(e){let{basename:t="/",children:n=null,location:r,navigationType:a=vc.Pop,navigator:i,static:o=!1,future:l}=e;yy()&&Nr(!1);let c=t.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:c,navigator:i,static:o,future:qg({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=Lm(r));let{pathname:d="/",search:f="",hash:m="",state:p=null,key:v="default"}=r,y=b.useMemo(()=>{let x=vO(d,c);return x==null?null:{location:{pathname:x,search:f,hash:m,state:p,key:v},navigationType:a}},[c,d,f,m,p,v,a]);return y==null?null:b.createElement(Id.Provider,{value:u},b.createElement(qj.Provider,{children:n,value:y}))}function yxe(e){let{children:t,location:n}=e;return rxe(UP(t),n)}new Promise(()=>{});function UP(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(r,a)=>{if(!b.isValidElement(r))return;let i=[...t,a];if(r.type===b.Fragment){n.push.apply(n,UP(r.props.children,i));return}r.type!==Ft&&Nr(!1),!r.props.index||!r.props.children||Nr(!1);let o={id:r.props.id||i.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&&(o.children=UP(r.props.children,i)),n.push(o)}),n}/**
79 * React Router DOM v6.30.1
80 *
81 * Copyright (c) Remix Software Inc.
82 *
83 * This source code is licensed under the MIT license found in the
84 * LICENSE.md file in the root directory of this source tree.
85 *
86 * @license MIT
87 */function HP(){return HP=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},HP.apply(this,arguments)}function vxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function bxe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wxe(e,t){return e.button===0&&(!t||t==="_self")&&!bxe(e)}function qP(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function jxe(e,t){let n=qP(e);return t&&t.forEach((r,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}const Nxe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Sxe="6";try{window.__reactRouterVersion=Sxe}catch{}const kxe="startTransition",F6=yO[kxe];function Cxe(e){let{basename:t,children:n,future:r,window:a}=e,i=b.useRef();i.current==null&&(i.current=Age({window:a,v5Compat:!0}));let o=i.current,[l,c]=b.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=b.useCallback(f=>{u&&F6?F6(()=>c(f)):c(f)},[c,u]);return b.useLayoutEffect(()=>o.listen(d),[o,d]),b.useEffect(()=>gxe(r),[r]),b.createElement(xxe,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const _xe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Axe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vn=b.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,m=vxe(t,Nxe),{basename:p}=b.useContext(Id),v,y=!1;if(typeof u=="string"&&Axe.test(u)&&(v=u,_xe))try{let S=new URL(window.location.href),_=u.startsWith("//")?new URL(S.protocol+u):new URL(u),k=vO(_.pathname,p);_.origin===S.origin&&k!=null?u=k+_.search+_.hash:y=!0}catch{}let x=txe(u,{relative:a}),w=Exe(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:a,viewTransition:f});function N(S){r&&r(S),S.defaultPrevented||w(S)}return b.createElement("a",HP({},m,{href:v||x,onClick:y||i?r:N,ref:n,target:c}))});var z6;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(z6||(z6={}));var B6;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(B6||(B6={}));function Exe(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=qt(),u=wl(),d=VG(e,{relative:o});return b.useCallback(f=>{if(wxe(f,n)){f.preventDefault();let m=r!==void 0?r:Kb(u)===Kb(d);c(e,{replace:m,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,a,n,e,i,o,l])}function $m(e){let t=b.useRef(qP(e)),n=b.useRef(!1),r=wl(),a=b.useMemo(()=>jxe(r.search,n.current?null:t.current),[r.search]),i=qt(),o=b.useCallback((l,c)=>{const u=qP(typeof l=="function"?l(a):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}var Od=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(){}},ud=typeof window>"u"||"Deno"in globalThis;function ps(){}function Pxe(e,t){return typeof e=="function"?e(t):e}function VP(e){return typeof e=="number"&&e>=0&&e!==1/0}function YG(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Nc(e,t){return typeof e=="function"?e(t):e}function Wa(e,t){return typeof e=="function"?e(t):e}function U6(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;
vendor: 4,355 bytes, line 87
87if(o){if(r){if(t.queryHash!==jO(o,t.options))return!1}else if(!Vg(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function H6(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(dd(t.options.mutationKey)!==dd(i))return!1}else if(!Vg(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function jO(e,t){return((t==null?void 0:t.queryKeyHashFn)||dd)(e)}function dd(e){return JSON.stringify(e,(t,n)=>WP(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Vg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Vg(e[n],t[n])):!1}function NO(e,t){if(e===t)return e;const n=q6(e)&&q6(t);if(n||WP(e)&&WP(t)){const r=n?e:Object.keys(e),a=r.length,i=n?t:Object.keys(t),o=i.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const f=n?d:i[d];(!n&&c.has(f)||n)&&e[f]===void 0&&t[f]===void 0?(l[f]=void 0,u++):(l[f]=NO(e[f],t[f]),l[f]===e[f]&&e[f]!==void 0&&u++)}return a===o&&u===a?e:l}return t}function Yb(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function q6(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function WP(e){if(!V6(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!V6(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function V6(e){return Object.prototype.toString.call(e)==="[object Object]"}function Txe(e){return new Promise(t=>{setTimeout(t,e)})}function GP(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?NO(e,t):t}function Ixe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Oxe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var SO=Symbol();function XG(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===SO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function QG(e,t){return typeof e=="function"?e(...t):!!e}var Mu,cc,mh,uW,Mxe=(uW=class extends Od{constructor(){super();Je(this,Mu);Je(this,cc);Je(this,mh);Be(this,mh,t=>{if(!ud&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){re(this,cc)||this.setEventListener(re(this,mh))}onUnsubscribe(){var t;this.hasListeners()||((t=re(this,cc))==null||t.call(this),Be(this,cc,void 0))}setEventListener(t){var n;Be(this,mh,t),(n=re(this,cc))==null||n.call(this),Be(this,cc,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){re(this,Mu)!==t&&(Be(this,Mu,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof re(this,Mu)=="boolean"?re(this,Mu):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mu=new WeakMap,cc=new WeakMap,mh=new WeakMap,uW),kO=new Mxe,ph,uc,gh,dW,Rxe=(dW=class extends Od{constructor(){super();Je(this,ph,!0);Je(this,uc);Je(this,gh);Be(this,gh,t=>{if(!ud&&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(){re(this,uc)||this.setEventListener(re(this,gh))}onUnsubscribe(){var t;this.hasListeners()||((t=re(this,uc))==null||t.call(this),Be(this,uc,void 0))}setEventListener(t){var n;Be(this,gh,t),(n=re(this,uc))==null||n.call(this),Be(this,uc,t(this.setOnline.bind(this)))}setOnline(t){re(this,ph)!==t&&(Be(this,ph,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return re(this,ph)}},ph=new WeakMap,uc=new WeakMap,gh=new WeakMap,dW),Xb=new Rxe;function KP(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}function Dxe(e){return Math.min(1e3*2**e,3e4)}function ZG(e){return(e??"online")==="online"?Xb.isOnline():!0}
vendor: 5,304 bytes, line 87
87var YP=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function JG(e){let t=!1,n=0,r;const a=KP(),i=()=>a.status!=="pending",o=y=>{var x;if(!i()){const w=new YP(y);m(w),(x=e.onCancel)==null||x.call(e,w)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>kO.isFocused()&&(e.networkMode==="always"||Xb.isOnline())&&e.canRun(),d=()=>ZG(e.networkMode)&&e.canRun(),f=y=>{i()||(r==null||r(),a.resolve(y))},m=y=>{i()||(r==null||r(),a.reject(y))},p=()=>new Promise(y=>{var x;r=w=>{(i()||u())&&y(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),v=()=>{if(i())return;let y;const x=n===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(w){y=Promise.reject(w)}Promise.resolve(y).then(f).catch(w=>{var C;if(i())return;const N=e.retry??(ud?0:3),S=e.retryDelay??Dxe,_=typeof S=="function"?S(n,w):S,k=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,w);if(t||!k){m(w);return}n++,(C=e.onFail)==null||C.call(e,n,w),Txe(_).then(()=>u()?void 0:p()).then(()=>{t?m(w):v()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(r==null||r(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?v():p().then(v),a)}}var Lxe=e=>setTimeout(e,0);function $xe(){let e=[],t=0,n=l=>{l()},r=l=>{l()},a=Lxe;const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{a=l}}}var or=$xe(),Ru,fW,eK=(fW=class{constructor(){Je(this,Ru)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),VP(this.gcTime)&&Be(this,Ru,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ud?1/0:300*1e3))}clearGcTimeout(){re(this,Ru)&&(clearTimeout(re(this,Ru)),Be(this,Ru,void 0))}},Ru=new WeakMap,fW),xh,yh,Ha,Du,zr,ry,Lu,Si,Lo,hW,Fxe=(hW=class extends eK{constructor(t){super();Je(this,Si);Je(this,xh);Je(this,yh);Je(this,Ha);Je(this,Du);Je(this,zr);Je(this,ry);Je(this,Lu);Be(this,Lu,!1),Be(this,ry,t.defaultOptions),this.setOptions(t.options),this.observers=[],Be(this,Du,t.client),Be(this,Ha,re(this,Du).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Be(this,xh,zxe(this.options)),this.state=t.state??re(this,xh),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=re(this,zr))==null?void 0:t.promise}setOptions(t){this.options={...re(this,ry),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&re(this,Ha).remove(this)}setData(t,n){const r=GP(this.state.data,t,this.options);return xt(this,Si,Lo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){xt(this,Si,Lo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=re(this,zr))==null?void 0:r.promise;return(a=re(this,zr))==null||a.cancel(t),n?n.then(ps).catch(ps):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(re(this,xh))}isActive(){return this.observers.some(t=>Wa(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===SO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Nc(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:!YG(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=re(this,zr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=re(this,zr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),re(this,Ha).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(re(this,zr)&&(re(this,Lu)?re(this,zr).cancel({revert:!0}):re(this,zr).cancelRetry()),this.scheduleGc()),re(this,Ha).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||xt(this,Si,Lo).call(this,{type:"invalidate"})}async fetch(t,n){var c,u,d,f,m,p,v,y,x,w,N,S;if(this.state.fetchStatus!=="idle"&&((c=re(this,zr))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(re(this,zr))return re(this,zr).continueRetry(),re(this,zr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const _=this.observers.find(k=>k.options.queryFn);_&&this.setOptions(_.options)}const r=new AbortController,a=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(Be(this,Lu,!0),r.signal)}
87)},i=()=>{const _=XG(this.options,n),C=(()=>{const E={client:re(this,Du),queryKey:this.queryKey,meta:this.meta};return a(E),E})();return Be(this,Lu,!1),this.options.persister?this.options.persister(_,C,this):_(C)},l=(()=>{const _={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:re(this,Du),state:this.state,fetchFn:i};return a(_),_})();(u=this.options.behavior)==null||u.onFetch(l,this),Be(this,yh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&xt(this,Si,Lo).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta}),Be(this,zr,JG({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:_=>{_ instanceof YP&&_.revert&&this.setState({...re(this,yh),fetchStatus:"idle"}),r.abort()},onFail:(_,k)=>{xt(this,Si,Lo).call(this,{type:"failed",failureCount:_,error:k})},onPause:()=>{xt(this,Si,Lo).call(this,{type:"pause"})},onContinue:()=>{xt(this,Si,Lo).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const _=await re(this,zr).start();if(_===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(_),(p=(m=re(this,Ha).config).onSuccess)==null||p.call(m,_,this),(y=(v=re(this,Ha).config).onSettled)==null||y.call(v,_,this.state.error,this),_}catch(_){if(_ instanceof YP){if(_.silent)return re(this,zr).promise;if(_.revert){if(this.state.data===void 0)throw _;return this.state.data}}throw xt(this,Si,Lo).call(this,{type:"error",error:_}),(w=(x=re(this,Ha).config).onError)==null||w.call(x,_,this),(S=(N=re(this,Ha).config).onSettled)==null||S.call(N,this.state.data,_,this),_}finally{this.scheduleGc()}}},xh=new WeakMap,yh=new WeakMap,Ha=new WeakMap,Du=new WeakMap,zr=new WeakMap,ry=new WeakMap,Lu=new WeakMap,Si=new WeakSet,Lo=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,...tK(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...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}};return Be(this,yh,t.manual?a:void 0),a;case"error":const i=t.error;return{...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),or.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),re(this,Ha).notify({query:this,type:"updated",action:t})})},hW);function tK(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ZG(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function zxe(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 Xi,mW,Bxe=(mW=class extends Od{constructor(t={}){super();Je(this,Xi);this.config=t,Be(this,Xi,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??jO(a,n);let o=this.get(i);return o||(o=new Fxe({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){re(this,Xi).has(t.queryHash)||(re(this,Xi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=re(this,Xi).get(t.queryHash);n&&(t.destroy(),n===t&&re(this,Xi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){or.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return re(this,Xi).get(t)}getAll(){return[...re(this,Xi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>U6(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>U6(t,r)):n}notify(t){or.batch(()=>
vendor: 20,439 bytes, line 87
87{this.listeners.forEach(n=>{n(t)})})}onFocus(){or.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Xi=new WeakMap,mW),Qi,_s,$u,Zi,tc,pW,Uxe=(pW=class extends eK{constructor(t){super();Je(this,Zi);Je(this,Qi);Je(this,_s);Je(this,$u);this.mutationId=t.mutationId,Be(this,_s,t.mutationCache),Be(this,Qi,[]),this.state=t.state||nK(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){re(this,Qi).includes(t)||(re(this,Qi).push(t),this.clearGcTimeout(),re(this,_s).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Be(this,Qi,re(this,Qi).filter(n=>n!==t)),this.scheduleGc(),re(this,_s).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){re(this,Qi).length||(this.state.status==="pending"?this.scheduleGc():re(this,_s).remove(this))}continue(){var t;return((t=re(this,$u))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,l,c,u,d,f,m,p,v,y,x,w,N,S,_,k,C,E,O;const n=()=>{xt(this,Zi,tc).call(this,{type:"continue"})};Be(this,$u,JG({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,R)=>{xt(this,Zi,tc).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{xt(this,Zi,tc).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>re(this,_s).canRun(this)}));const r=this.state.status==="pending",a=!re(this,$u).canStart();try{if(r)n();else{xt(this,Zi,tc).call(this,{type:"pending",variables:t,isPaused:a}),await((o=(i=re(this,_s).config).onMutate)==null?void 0:o.call(i,t,this));const R=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));R!==this.state.context&&xt(this,Zi,tc).call(this,{type:"pending",context:R,variables:t,isPaused:a})}const P=await re(this,$u).start();return await((d=(u=re(this,_s).config).onSuccess)==null?void 0:d.call(u,P,t,this.state.context,this)),await((m=(f=this.options).onSuccess)==null?void 0:m.call(f,P,t,this.state.context)),await((v=(p=re(this,_s).config).onSettled)==null?void 0:v.call(p,P,null,this.state.variables,this.state.context,this)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,P,null,t,this.state.context)),xt(this,Zi,tc).call(this,{type:"success",data:P}),P}catch(P){try{throw await((N=(w=re(this,_s).config).onError)==null?void 0:N.call(w,P,t,this.state.context,this)),await((_=(S=this.options).onError)==null?void 0:_.call(S,P,t,this.state.context)),await((C=(k=re(this,_s).config).onSettled)==null?void 0:C.call(k,void 0,P,this.state.variables,this.state.context,this)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,void 0,P,t,this.state.context)),P}finally{xt(this,Zi,tc).call(this,{type:"error",error:P})}}finally{re(this,_s).runNext(this)}}},Qi=new WeakMap,_s=new WeakMap,$u=new WeakMap,Zi=new WeakSet,tc=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),or.batch(()=>{re(this,Qi).forEach(r=>{r.onMutationUpdate(t)}),re(this,_s).notify({mutation:this,type:"updated",action:t})})},pW);function nK(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var qo,ki,sy,gW,Hxe=(gW=class extends Od{constructor(t={}){super();Je(this,qo);Je(this,ki);Je(this,sy);this.config=t,Be(this,qo,new Set),Be(this,ki,new Map),Be(this,sy,0)}build(t,n,r){const a=new Uxe({mutationCache:this,mutationId:++fv(this,sy)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){re(this,qo).add(t);const n=kv(t);if(typeof n=="string"){const r=re(this,ki).get(n);r?r.push(t):re(this,ki).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(re(this,qo).delete(t)){const n=kv(t);if(typeof n=="string"){const r=re(this,ki).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&re(this,ki).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=kv(t);if(typeof n=="string"){const r=re(this,ki).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=kv(t);if(typeof n=="string"){const a=(r=re(this,ki).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){or.batch(()=>{re(this,qo).forEach(t=>{this.notify({type:"removed",mutation:t})}),re(this,qo).clear(),re(this,ki).clear()})}getAll(){return Array.from(re(this,qo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>H6(n,r))}findAll(t={}){return this.getAll().filter(n=>H6(t,n))}notify(t){or.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return or.batch(()=>Promise.all(t.map(n=>n.continue().catch(ps))))}},qo=new WeakMap,ki=new WeakMap,sy=new WeakMap,gW);function kv(e){var t;return(t=e.options.scope)==null?void 0:t.id}function W6(e){return{onFetch:(t,n)=>{var d,f,m,p,v;const r=t.options,a=(m=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:m.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const x=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},w=XG(t.options,t.fetchOptions),N=async(S,_,k)=>{if(y)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const E=(()=>{const T={client:t.client,queryKey:t.queryKey,pageParam:_,direction:k?"backward":"forward",meta:t.options.meta};return x(T),T})(),O=await w(E),{maxPages:P}=t.options,R=k?Oxe:Ixe;return{pages:R(S.pages,O,P),pageParams:R(S.pageParams,_,P)}};if(a&&i.length){const S=a==="backward",_=S?qxe:G6,k={pages:i,pageParams:o},C=_(r,k);l=await N(k,C,S)}else{const S=e??i.length;do{const _=c===0?o[0]??r.initialPageParam:G6(r,l);if(c>0&&_==null)break;l=await N(l,_),c++}while(c<S)}return l};t.options.persister?t.fetchFn=()=>{var y,x;return(x=(y=t.options).persister)==null?void 0:x.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function G6(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 qxe(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 sr,dc,fc,vh,bh,hc,wh,jh,xW,Vxe=(xW=class{constructor(e={}){Je(this,sr);Je(this,dc);Je(this,fc);Je(this,vh);Je(this,bh);Je(this,hc);Je(this,wh);Je(this,jh);Be(this,sr,e.queryCache||new Bxe),Be(this,dc,e.mutationCache||new Hxe),Be(this,fc,e.defaultOptions||{}),Be(this,vh,new Map),Be(this,bh,new Map),Be(this,hc,0)}mount(){fv(this,hc)._++,re(this,hc)===1&&(Be(this,wh,kO.subscribe(async e=>{e&&(await this.resumePausedMutations(),re(this,sr).onFocus())})),Be(this,jh,Xb.subscribe(async e=>{e&&(await this.resumePausedMutations(),re(this,sr).onOnline())})))}unmount(){var e,t;fv(this,hc)._--,re(this,hc)===0&&((e=re(this,wh))==null||e.call(this),Be(this,wh,void 0),(t=re(this,jh))==null||t.call(this),Be(this,jh,void 0))}isFetching(e){return re(this,sr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return re(this,dc).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=re(this,sr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=re(this,sr).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Nc(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return re(this,sr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=re(this,sr).get(r.queryHash),i=a==null?void 0:a.state.data,o=Pxe(t,i);if(o!==void 0)return re(this,sr).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return or.batch(()=>re(this,sr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=re(this,sr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=re(this,sr);or.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=re(this,sr);return or.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=or.batch(()=>re(this,sr).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(ps).catch(ps)}invalidateQueries(e,t={}){return or.batch(()=>(re(this,sr).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=or.batch(()=>re(this,sr).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(ps)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ps)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=re(this,sr).build(this,t);return n.isStaleByTime(Nc(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ps).catch(ps)}fetchInfiniteQuery(e){return e.behavior=W6(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ps).catch(ps)}ensureInfiniteQueryData(e){return e.behavior=W6(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Xb.isOnline()?re(this,dc).resumePausedMutations():Promise.resolve()}getQueryCache(){return re(this,sr)}getMutationCache(){return re(this,dc)}getDefaultOptions(){return re(this,fc)}setDefaultOptions(e){Be(this,fc,e)}setQueryDefaults(e,t){re(this,vh).set(dd(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...re(this,vh).values()],n={};return t.forEach(r=>{Vg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){re(this,bh).set(dd(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...re(this,bh).values()],n={};return t.forEach(r=>{Vg(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...re(this,fc).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jO(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===SO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...re(this,fc).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){re(this,sr).clear(),re(this,dc).clear()}},sr=new WeakMap,dc=new WeakMap,fc=new WeakMap,vh=new WeakMap,bh=new WeakMap,hc=new WeakMap,wh=new WeakMap,jh=new WeakMap,xW),Ks,Qt,ay,As,Fu,Nh,Vo,mc,iy,Sh,kh,zu,Bu,pc,Ch,pn,ig,XP,QP,ZP,JP,eT,tT,nT,rK,yW,CO=(yW=class extends Od{constructor(t,n){super();Je(this,pn);Je(this,Ks);Je(this,Qt);Je(this,ay);Je(this,As);Je(this,Fu);Je(this,Nh);Je(this,Vo);Je(this,mc);Je(this,iy);Je(this,Sh);Je(this,kh);Je(this,zu);Je(this,Bu);Je(this,pc);Je(this,Ch,new Set);this.options=n,Be(this,Ks,t),Be(this,mc,null),Be(this,Vo,KP()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(re(this,Qt).addObserver(this),K6(re(this,Qt),this.options)?xt(this,pn,ig).call(this):this.updateResult(),xt(this,pn,JP).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rT(re(this,Qt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rT(re(this,Qt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,xt(this,pn,eT).call(this),xt(this,pn,tT).call(this),re(this,Qt).removeObserver(this)}setOptions(t){const n=this.options,r=re(this,Qt);if(this.options=re(this,Ks).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Wa(this.options.enabled,re(this,Qt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");xt(this,pn,nT).call(this),re(this,Qt).setOptions(this.options),n._defaulted&&!Yb(this.options,n)&&re(this,Ks).getQueryCache().notify({type:"observerOptionsUpdated",query:re(this,Qt),observer:this});const a=this.hasListeners();a&&Y6(re(this,Qt),r,this.options,n)&&xt(this,pn,ig).call(this),this.updateResult(),a&&(re(this,Qt)!==r||Wa(this.options.enabled,re(this,Qt))!==Wa(n.enabled,re(this,Qt))||Nc(this.options.staleTime,re(this,Qt))!==Nc(n.staleTime,re(this,Qt)))&&xt(this,pn,XP).call(this);const i=xt(this,pn,QP).call(this);a&&(re(this,Qt)!==r||Wa(this.options.enabled,re(this,Qt))!==Wa(n.enabled,re(this,Qt))||i!==re(this,pc))&&xt(this,pn,ZP).call(this,i)}getOptimisticResult(t){const n=re(this,Ks).getQueryCache().build(re(this,Ks),t),r=this.createResult(n,t);return Gxe(this,r)&&(Be(this,As,r),Be(this,Nh,this.options),Be(this,Fu,re(this,Qt).state)),r}getCurrentResult(){return re(this,As)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&!this.options.experimental_prefetchInRender&&re(this,Vo).status==="pending"&&re(this,Vo).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,a))})}trackProp(t){re(this,Ch).add(t)}getCurrentQuery(){return re(this,Qt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=re(this,Ks).defaultQueryOptions(t),r=re(this,Ks).getQueryCache().build(re(this,Ks),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return xt(this,pn,ig).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),re(this,As)))}createResult(t,n){var P;const r=re(this,Qt),a=this.options,i=re(this,As),o=re(this,Fu),l=re(this,Nh),u=t!==r?t.state:re(this,ay),{state:d}=t;let f={...d},m=!1,p;if(n._optimisticResults){const R=this.hasListeners(),T=!R&&K6(t,n),D=R&&Y6(t,r,n,a);(T||D)&&(f={...f,...tK(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:x}=f;p=f.data;let w=!1;if(n.placeholderData!==void 0&&p===void 0&&x==="pending"){let R;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(R=i.data,w=!0):R=typeof n.placeholderData=="function"?n.placeholderData((P=re(this,kh))==null?void 0:P.state.data,re(this,kh)):n.placeholderData,R!==void 0&&(x="success",p=GP(i==null?void 0:i.data,R,n),m=!0)}if(n.select&&p!==void 0&&!w)if(i&&p===(o==null?void 0:o.data)&&n.select===re(this,iy))p=re(this,Sh);else try{Be(this,iy,n.select),p=n.select(p),p=GP(i==null?void 0:i.data,p,n),Be(this,Sh,p),Be(this,mc,null)}catch(R){Be(this,mc,R)}re(this,mc)&&(v=re(this,mc),p=re(this,Sh),y=Date.now(),x="error");const N=f.fetchStatus==="fetching",S=x==="pending",_=x==="error",k=S&&N,C=p!==void 0,O={status:x,fetchStatus:f.fetchStatus,isPending:S,isSuccess:x==="success",isError:_,isInitialLoading:k,isLoading:k,data:p,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:N,isRefetching:N&&!S,isLoadingError:_&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:_&&C,isStale:_O(t,n),refetch:this.refetch,promise:re(this,Vo),isEnabled:Wa(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=z=>{O.status==="error"?z.reject(O.error):O.data!==void 0&&z.resolve(O.data)},T=()=>{const z=Be(this,Vo,O.promise=KP());R(z)},D=re(this,Vo);switch(D.status){case"pending":t.queryHash===r.queryHash&&R(D);break;case"fulfilled":(O.status==="error"||O.data!==D.value)&&T();break;case"rejected":(O.status!=="error"||O.error!==D.reason)&&T();break}}return O}updateResult(){const t=re(this,As),n=this.createResult(re(this,Qt),this.options);if(Be(this,Fu,re(this,Qt).state),Be(this,Nh,this.options),re(this,Fu).data!==void 0&&Be(this,kh,re(this,Qt)),Yb(n,t))return;Be(this,As,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!re(this,Ch).size)return!0;const o=new Set(i??re(this,Ch));return this.options.throwOnError&&o.add("error"),Object.keys(re(this,As)).some(l=>{const c=l;return re(this,As)[c]!==t[c]&&o.has(c)})};xt(this,pn,rK).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&xt(this,pn,JP).call(this)}},Ks=new WeakMap,Qt=new WeakMap,ay=new WeakMap,As=new WeakMap,Fu=new WeakMap,Nh=new WeakMap,Vo=new WeakMap,mc=new WeakMap,iy=new WeakMap,Sh=new WeakMap,kh=new WeakMap,zu=new WeakMap,Bu=new WeakMap,pc=new WeakMap,Ch=new WeakMap,pn=new WeakSet,ig=function(t){xt(this,pn,nT).call(this);let n=re(this,Qt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ps)),n},XP=function(){xt(this,pn,eT).call(this);const t=Nc(this.options.staleTime,re(this,Qt));if(ud||re(this,As).isStale||!VP(t))return;const r=YG(re(this,As).dataUpdatedAt,t)+1;Be(this,zu,setTimeout(()=>{re(this,As).isStale||this.updateResult()},r))},QP=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(re(this,Qt)):this.options.refetchInterval)??!1},ZP=function(t){xt(this,pn,tT).call(this),Be(this,pc,t),!(ud||Wa(this.options.enabled,re(this,Qt))===!1||!VP(re(this,pc))||re(this,pc)===0)&&Be(this,Bu,setInterval(()=>{(this.options.refetchIntervalInBackground||kO.isFocused())&&xt(this,pn,ig).call(this)},re(this,pc)))},JP=function(){xt(this,pn,XP).call(this),xt(this,pn,ZP).call(this,xt(this,pn,QP).call(this))},eT=function(){re(this,zu)&&(clearTimeout(re(this,zu)),Be(this,zu,void 0))},tT=function(){re(this,Bu)&&(clearInterval(re(this,Bu)),Be(this,Bu,void 0))},nT=function(){const t=re(this,Ks).getQueryCache().build(re(this,Ks),this.options);if(t===re(this,Qt))return;const n=re(this,Qt);Be(this,Qt,t),Be(this,ay,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},rK=function(t){or.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(re(this,As))}),re(this,Ks).getQueryCache().notify({query:re(this,Qt),type:"observerResultsUpdated"})})},yW);function Wxe(e,t){return Wa(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function K6(e,t){return Wxe(e,t)||e.state.data!==void 0&&rT(e,t,t.refetchOnMount)}function rT(e,t,n){if(Wa(t.enabled,e)!==!1&&Nc(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&_O(e,t)}return!1}function Y6(e,t,n,r){return(e!==t||Wa(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&_O(e,n)}function _O(e,t){return Wa(t.enabled,e)!==!1&&e.isStaleByTime(Nc(t.staleTime,e))}function Gxe(e,t){return!Yb(e.getCurrentResult(),t)}function X6(e,t){const n=new Set(t);return e.filter(r=>!n.has(r))}function Kxe(e,t,n){const r=e.slice(0);return r[t]=n,r}var _h,qa,Ah,Eh,Va,gc,oy,ly,cy,is,sT,aT,iT,oT,lT,vW,Yxe=(vW=class extends Od{constructor(t,n,r){super();Je(this,is);Je(this,_h);Je(this,qa);Je(this,Ah);Je(this,Eh);Je(this,Va);Je(this,gc);Je(this,oy);Je(this,ly);Je(this,cy,[]);Be(this,_h,t),Be(this,Eh,r),Be(this,Ah,[]),Be(this,Va,[]),Be(this,qa,[]),this.setQueries(n)}
87onSubscribe(){this.listeners.size===1&&re(this,Va).forEach(t=>{t.subscribe(n=>{xt(this,is,oT).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,re(this,Va).forEach(t=>{t.destroy()})}setQueries(t,n){Be(this,Ah,t),Be(this,Eh,n),or.batch(()=>{const r=re(this,Va),a=xt(this,is,iT).call(this,re(this,Ah));Be(this,cy,a),a.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions));const i=a.map(c=>c.observer),o=i.map(c=>c.getCurrentResult()),l=i.some((c,u)=>c!==r[u]);r.length===i.length&&!l||(Be(this,Va,i),Be(this,qa,o),this.hasListeners()&&(X6(r,i).forEach(c=>{c.destroy()}),X6(i,r).forEach(c=>{c.subscribe(u=>{xt(this,is,oT).call(this,c,u)})}),xt(this,is,lT).call(this)))})}getCurrentResult(){return re(this,qa)}getQueries(){return re(this,Va).map(t=>t.getCurrentQuery())}getObservers(){return re(this,Va)}getOptimisticResult(t,n){const r=xt(this,is,iT).call(this,t),a=r.map(i=>i.observer.getOptimisticResult(i.defaultedQueryOptions));return[a,i=>xt(this,is,aT).call(this,i??a,n),()=>xt(this,is,sT).call(this,a,r)]}},_h=new WeakMap,qa=new WeakMap,Ah=new WeakMap,Eh=new WeakMap,Va=new WeakMap,gc=new WeakMap,oy=new WeakMap,ly=new WeakMap,cy=new WeakMap,is=new WeakSet,sT=function(t,n){return n.map((r,a)=>{const i=t[a];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,o=>{n.forEach(l=>{l.observer.trackProp(o)})})})},aT=function(t,n){return n?((!re(this,gc)||re(this,qa)!==re(this,ly)||n!==re(this,oy))&&(Be(this,oy,n),Be(this,ly,re(this,qa)),Be(this,gc,NO(re(this,gc),n(t)))),re(this,gc)):t},iT=function(t){const n=new Map(re(this,Va).map(a=>[a.options.queryHash,a])),r=[];return t.forEach(a=>{const i=re(this,_h).defaultQueryOptions(a),o=n.get(i.queryHash);o?r.push({defaultedQueryOptions:i,observer:o}):r.push({defaultedQueryOptions:i,observer:new CO(re(this,_h),i)})}),r},oT=function(t,n){const r=re(this,Va).indexOf(t);r!==-1&&(Be(this,qa,Kxe(re(this,qa),r,n)),xt(this,is,lT).call(this))},lT=function(){var t;if(this.hasListeners()){const n=re(this,gc),r=xt(this,is,sT).call(this,re(this,qa),re(this,cy)),a=xt(this,is,aT).call(this,r,(t=re(this,Eh))==null?void 0:t.combine);n!==a&&or.batch(()=>{this.listeners.forEach(i=>{i(re(this,qa))})})}},vW),xc,yc,Ys,Wo,al,Cb,cT,bW,Xxe=(bW=class extends Od{constructor(n,r){super();Je(this,al);Je(this,xc);Je(this,yc);Je(this,Ys);Je(this,Wo);Be(this,xc,n),this.setOptions(r),this.bindMethods(),xt(this,al,Cb).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=re(this,xc).defaultMutationOptions(n),Yb(this.options,r)||re(this,xc).getMutationCache().notify({type:"observerOptionsUpdated",mutation:re(this,Ys),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&dd(r.mutationKey)!==dd(this.options.mutationKey)?this.reset():((a=re(this,Ys))==null?void 0:a.state.status)==="pending"&&re(this,Ys).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=re(this,Ys))==null||n.removeObserver(this)}onMutationUpdate(n){xt(this,al,Cb).call(this),xt(this,al,cT).call(this,n)}getCurrentResult(){return re(this,yc)}reset(){var n;(n=re(this,Ys))==null||n.removeObserver(this),Be(this,Ys,void 0),xt(this,al,Cb).call(this),xt(this,al,cT).call(this)}mutate(n,r){var a;return Be(this,Wo,r),(a=re(this,Ys))==null||a.removeObserver(this),Be(this,Ys,re(this,xc).getMutationCache().build(re(this,xc),this.options)),re(this,Ys).addObserver(this),re(this,Ys).execute(n)}},xc=new WeakMap,yc=new WeakMap,Ys=new WeakMap,Wo=new WeakMap,al=new WeakSet,Cb=function(){var r;const n=((r=re(this,Ys))==null?void 0:r.state)??nK();Be(this,yc,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},cT=function(n){or.batch(()=>{var r,a,i,o,l,c,u,d;if(re(this,Wo)&&this.hasListeners()){const f=re(this,yc).variables,m=re(this,yc).context;(n==null?void 0:n.type)==="success"?((a=(r=re(this,Wo)).onSuccess)==null||a.call(r,n.data,f,m),(o=(i=re(this,Wo)).onSettled)==null||o.call(i,n.data,null,f,m)):(n==null?void 0:n.type)==="error"&&((c=(l=re(this,Wo)).onError)==null||c.call(l,n.error,f,m),(d=(u=re(this,Wo)).onSettled)==null||d.call(u,void 0,n.error,f,m))}
87this.listeners.forEach(f=>{f(re(this,yc))})})},bW),sK=b.createContext(void 0),AO=e=>{const t=b.useContext(sK);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Qxe=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(sK.Provider,{value:e,children:t})),aK=b.createContext(!1),iK=()=>b.useContext(aK);aK.Provider;function Zxe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jxe=b.createContext(Zxe()),oK=()=>b.useContext(Jxe),lK=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},cK=e=>{b.useEffect(()=>{e.clearReset()},[e])},uK=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||QG(n,[e.error,r])),dK=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},fK=(e,t)=>e.isLoading&&e.isFetching&&!t,uT=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Qb=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function eye({queries:e,...t},n){const r=AO(),a=iK(),i=oK(),o=b.useMemo(()=>e.map(y=>{const x=r.defaultQueryOptions(y);return x._optimisticResults=a?"isRestoring":"optimistic",x}),[e,r,a]);o.forEach(y=>{dK(y),lK(y,i)}),cK(i);const[l]=b.useState(()=>new Yxe(r,o,t)),[c,u,d]=l.getOptimisticResult(o,t.combine),f=!a&&t.subscribed!==!1;b.useSyncExternalStore(b.useCallback(y=>f?l.subscribe(or.batchCalls(y)):ps,[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setQueries(o,t)},[o,t,l]);const p=c.some((y,x)=>uT(o[x],y))?c.flatMap((y,x)=>{const w=o[x];if(w){const N=new CO(r,w);if(uT(w,y))return Qb(w,N,i);fK(y,a)&&Qb(w,N,i)}return[]}):[];if(p.length>0)throw Promise.all(p);const v=c.find((y,x)=>{const w=o[x];return w&&uK({result:y,errorResetBoundary:i,throwOnError:w.throwOnError,query:r.getQueryCache().get(w.queryHash),suspense:w.suspense})});if(v!=null&&v.error)throw v.error;return u(d())}function tye(e,t,n){var f,m,p,v,y;const r=iK(),a=oK(),i=AO(),o=i.defaultQueryOptions(e);(m=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||m.call(f,o),o._optimisticResults=r?"isRestoring":"optimistic",dK(o),lK(o,a),cK(a);const l=!i.getQueryCache().get(o.queryHash),[c]=b.useState(()=>new t(i,o)),u=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const w=d?c.subscribe(or.batchCalls(x)):ps;return c.updateResult(),w},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),b.useEffect(()=>{c.setOptions(o)},[o,c]),uT(o,u))throw Qb(o,c,a);if(uK({result:u,errorResetBoundary:a,throwOnError:o.throwOnError,query:i.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((v=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||v.call(p,o,u),o.experimental_prefetchInRender&&!ud&&fK(u,r)){const x=l?Qb(o,c,a):(y=i.getQueryCache().get(o.queryHash))==null?void 0:y.promise;x==null||x.catch(ps).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function hK(e,t){return tye(e,CO)}function mK(e,t){const n=AO(),[r]=b.useState(()=>new Xxe(n,e));b.useEffect(()=>{r.setOptions(e)},[r,e]);const a=b.useSyncExternalStore(b.useCallback(o=>r.subscribe(or.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=b.useCallback((o,l)=>{r.mutate(o,l).catch(ps)},[r]);if(a.error&&QG(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}const n2="privion_access_token",r2="privion_refresh_token";class zf extends Error{constructor(n,r){super(r.message);Nf(this,"status");Nf(this,"data");this.name="ApiError",this.status=n,this.data=r}}const hn={getAccessToken:()=>localStorage.getItem(n2),setAccessToken:e=>localStorage.setItem(n2,e),getRefreshToken:()=>localStorage.getItem(r2),setRefreshToken:e=>localStorage.setItem(r2,e),clearTokens:()=>{localStorage.removeItem(n2),localStorage.removeItem(r2)},hasTokens:()=>!!(hn.getAccessToken()&&hn.getRefreshToken())},Ls="https://api.privion-agents.ai";function Q6(e,t){const n=new URL(e,Ls);return t&&Object.entries(t).forEach(([r,a])=>{a!=null&&n.searchParams.append(r,String(a))}),n.toString()}class nye{constructor(){Nf(this,"isRefreshing",!1);Nf(this,"failedQueue",[])}async request(t,n={}){const{method:r="GET",headers:a={},body:i,params:o,signal:l,requiresAuth:c=!0}=n,u=Q6(t,o),d={"Content-Type":"application/json",...a};c&&hn.getAccessToken()&&(d.Authorization=`Bearer ${hn.getAccessToken()}`);const f={method:r,headers:d,signal:l};i&&r!=="GET"&&(i instanceof FormData?(delete d["Content-Type"],f.body=i):f.body=JSON.stringify(i));try{const m=await fetch(u,f);return await this.handleResponse(m,t,n)}catch(m){if(m instanceof zf&&m.status===401&&c)return this.handleTokenRefresh(t,
87n);throw m}}async handleResponse(t,n,r){const a=t.headers.get("content-type"),i=a==null?void 0:a.includes("application/json");if(!t.ok){let o;try{o=i?await t.json():{status:"error",message:t.statusText||"Unknown error occurred"}}catch{o={status:"error",message:"Failed to parse error response"}}const l=new zf(t.status,o);throw t.status===401&&r.requiresAuth!==!1,l}if(t.status===204||!i)return{};try{return await t.json()}catch{throw new zf(500,{status:"error",message:"Failed to parse response JSON"})}}async handleTokenRefresh(t,n){const r=hn.getRefreshToken();if(!r)throw console.log("No refresh token available, triggering session expiry"),hn.clearTokens(),window.dispatchEvent(new CustomEvent("auth:session-expired",{detail:{reason:"no-refresh-token"}})),new zf(401,{status:"error",message:"Session expired. Please sign in again."});if(this.isRefreshing)return new Promise((a,i)=>{this.failedQueue.push({resolve:a,reject:i})});this.isRefreshing=!0;try{console.log("Attempting token refresh...");const a=await fetch(Q6("/api/auth/refresh"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refresh:r})});if(!a.ok)throw console.log("Token refresh failed with status:",a.status),new Error("Token refresh failed");const{access:i}=await a.json();return hn.setAccessToken(i),console.log("Token refreshed successfully"),this.failedQueue.forEach(({resolve:o})=>{o(this.request(t,n))}),this.failedQueue=[],this.request(t,n)}catch(a){throw console.log("Token refresh failed:",a),hn.clearTokens(),this.failedQueue.forEach(({reject:i})=>i(a)),this.failedQueue=[],window.dispatchEvent(new CustomEvent("auth:session-expired",{detail:{reason:"refresh-failed"}})),new zf(401,{status:"error",message:"Session expired. Please sign in again."})}finally{this.isRefreshing=!1}}async get(t,n){return this.request(t,{...n,method:"GET"})}async post(t,n,r){return this.request(t,{...r,method:"POST",body:n})}async put(t,n,r){return this.request(t,{...r,method:"PUT",body:n})}async patch(t,n,r){return this.request(t,{...r,method:"PATCH",body:n})}async delete(t,n){return this.request(t,{...n,method:"DELETE"})}}const Et=new nye;class rye{async getTiers(){return Et.get("/api/auth/tiers",{requiresAuth:!1})}async login(t){const n=await Et.post("/api/auth/pair",t,{requiresAuth:!1});return hn.setAccessToken(n.access),hn.setRefreshToken(n.refresh),n}async logout(){try{hn.clearTokens()}catch{hn.clearTokens()}}async refreshToken(){const t=hn.getRefreshToken();if(!t)throw hn.clearTokens(),window.dispatchEvent(new CustomEvent("auth:session-expired",{detail:{reason:"no-refresh-token-service"}})),new Error("Session expired. Please sign in again.");const n=await Et.post("/api/auth/refresh",{refresh:t},{requiresAuth:!1});return n.access&&hn.setAccessToken(n.access),n}async verifyToken(t){try{const n=t||hn.getAccessToken();return n?(await Et.post("/api/auth/verify",{token:n},{requiresAuth:!1}),!0):!1}catch{return!1}}async getCurrentUser(){return Et.get("/api/auth/me")}isAuthenticated(){return hn.hasTokens()}getAccessToken(){return hn.getAccessToken()}getRefreshToken(){return hn.getRefreshToken()}async checkSession(){if(!this.isAuthenticated())return!1;try{return await this.getCurrentUser(),!0}catch{try{return await this.refreshToken(),!0}catch{return hn.clearTokens(),!1}}}async initializeAuth(){try{if(!this.isAuthenticated())return null;try{return await this.getCurrentUser()}catch{return await this.refreshToken(),await this.getCurrentUser()}}catch{return hn.clearTokens(),null}}async updateProfile(t){return Et.put("/api/auth/me",t)}async changePassword(t){return Et.post("/api/auth/change-password",t)}async register(t){return Et.post("/api/auth/register",t,{requiresAuth:!1})}async verifyEmail(t){return Et.post("/api/auth/verify-email",t,{requiresAuth:!1})}async resendVerification(t){return Et.post("/api/auth/resend-verification",t,{requiresAuth:!1})}}const qn=new rye,sye=1,aye=1e6;let s2=0;function iye(){return s2=(s2+1)%Number.MAX_SAFE_INTEGER,s2.toString()}const a2=new Map,Z6=e=>{if(a2.has(e))return;const t=setTimeout(()=>{a2.delete(e),jg({type:"REMOVE_TOAST",toastId:e})},aye);a2.set(e,t)},oye=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,sye)};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;
87return n?Z6(n):e.toasts.forEach(r=>{Z6(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)}}},_b=[];let Ab={toasts:[]};function jg(e){Ab=oye(Ab,e),_b.forEach(t=>{t(Ab)})}function pK({...e}){const t=iye(),n=a=>jg({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>jg({type:"DISMISS_TOAST",toastId:t});return jg({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:n}}function _t(){const[e,t]=b.useState(Ab);return b.useEffect(()=>(_b.push(t),()=>{const n=_b.indexOf(t);n>-1&&_b.splice(n,1)}),[e]),{...e,toast:pK,dismiss:n=>jg({type:"DISMISS_TOAST",toastId:n})}}const gK=b.createContext(void 0),Cv=e=>{var l;let t=e.username||e.email.split("@")[0];e.first_name&&e.last_name?t=`${e.first_name} ${e.last_name}`:e.first_name&&(t=e.first_name);let n="user";e.is_superuser&&(n="super_admin");const a=e.email.split("@")[1].split(".")[0],o=(c=>{const u=c.split("@")[1];return u.includes("water")||u.includes("utilities")?"water-treatment":u.includes("health")||u.includes("medical")||u.includes("hospital")?"healthcare":u.includes("manufacturing")||u.includes("factory")||u.includes("plant")?"manufacturing":u.includes("edu")||u.includes("university")||u.includes("college")?"education":u.includes("gov")?"government":"general"})(e.email);return{id:e.id.toString(),email:e.email,name:t,firstName:e.first_name,lastName:e.last_name,role:n,organization:a,industry:o,username:e.username,is_active:e.is_active,is_staff:!1,is_superuser:e.is_superuser,canCreateAgents:e.is_superuser||((l=e.tier_info)==null?void 0:l.limits.can_create_agents),tier_info:e.tier_info,subscription_info:e.subscription_info??null,companyProfile:{companyName:a,industry:o}}},lye=({children:e})=>{const[t,n]=b.useState(null),[r,a]=b.useState(!0),[i,o]=b.useState(!1),l=localStorage.getItem("disable_session_expiry")==="true";b.useEffect(()=>{c()},[]),b.useEffect(()=>{const E=async P=>{const{reason:R}=P.detail||{};if(l){console.log("Session expired but automatic handling is disabled");return}try{console.log("Attempting silent session refresh..."),await x(),console.log("Session refreshed successfully");return}catch(T){console.log("Silent session refresh failed:",T),o(!0),n(null),pK({title:"Session Expired",description:"Your session has expired. You can continue working, but some features may be limited. Sign in again when ready.",variant:"destructive",duration:15e3})}};window.addEventListener("auth:session-expired",E);const O=setInterval(async()=>{if(t&&!l)try{console.log("Proactive token refresh..."),await x(),console.log("Proactive token refresh successful")}catch(P){console.log("Proactive token refresh failed:",P)}},480*1e3);return()=>{window.removeEventListener("auth:session-expired",E),clearInterval(O)}},[t,l]);const c=async()=>{a(!0);try{const E=await qn.initializeAuth();if(E){const O=Cv(E);n(O)}else qn.isAuthenticated()&&await qn.logout()}catch(E){console.error("Auth initialization error:",E),qn.isAuthenticated()&&await qn.logout()}finally{a(!1)}},u=async(E,O,P)=>{a(!0);try{if(await qn.login({email:E,password:O,turnstile_token:P})){const T=await qn.getCurrentUser(),D=Cv(T);return n(D),a(!1),!0}return a(!1),!1}catch(R){return console.error("Sign in error:",R),a(!1),!1}},d=async E=>f(E),f=async E=>{a(!0);try{return await qn.register(E),a(!1),!0}catch(O){return console.error("Registration error:",O),a(!1),!1}},m=async(E,O,P)=>{a(!0);try{return await qn.verifyEmail({email:E,code:O,turnstile_token:P}),a(!1),!0}catch(R){return console.error("Email verification error:",R),a(!1),!1}},p=async E=>{a(!0);try{return await qn.resendVerification({email:E}),a(!1),!0}catch(O){return console.error("Resend verification error:",O),a(!1),!1}},v=async()=>{try{await qn.logout()}catch(E){console.error("Sign out error:",E)}finally{n(null),window.location.reload()}},y=async()=>{try{const E=await qn.getCurrentUser(),O=Cv(E);n(O)}catch(E){if(console.error("Refresh user error:",E),E instanceof zf&&E.status===401)return;await v()}},x=async()=>{try{const E=await qn.initializeAuth();if(E){const O=Cv(E);n(O)}else qn.isAuthenticated()&&(await qn.logout(),n(null))}catch(E){console.error("Auth reinitialization error:",E),qn.isAuthenticated()&&(await qn.logout(),n(null))}},w=E=>E?["super_admin","admin","plant_manager","compliance_officer","production_supervisor","facility_manager"].includes(E.role)||E.is_superuser:!1,N=!!t&&qn.isAuthenticated(),C={user:t,isAuthenticated:N,isLoading:r,sessionExpired:i,signIn:u,signUp:d,signOut:v,hasGovernanceAccess:w,refreshUser:y,reinitializeAuth:x,clearSessionExpired:()=>{o(!1)},toggleSessionExpiryHandling:()=>{const E=localStorage.getItem("disable_session_expiry")==="true";localStorage.setItem("disable_session_expiry",(!E).toString()),window.location.reload()},isSessionExpiryDisabled:l,silentRefresh:async()=>{try{return console.log("Manual silent refresh triggered..."),await x(),console.log("Manual silent refresh successful"),!0}catch(E){return console.log("Manual silent refresh failed:",E),!1}},register:f,verifyEmail:m,resendVerification:p};return s.jsx(gK.Provider,{value:C,children:e})},nr=()=>{const e=b.useContext(gK);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};function J6(e,t){if(typeof e=="function")return e(t);
vendor: 10,468 bytes, line 87
87e!=null&&(e.current=t)}function Vj(...e){return t=>{let n=!1;const r=e.map(a=>{const i=J6(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():J6(e[a],null)}}}}function gt(...e){return b.useCallback(Vj(...e),e)}function Tc(e){const t=uye(e),n=b.forwardRef((r,a)=>{const{children:i,...o}=r,l=b.Children.toArray(i),c=l.find(fye);if(c){const u=c.props.children,d=l.map(f=>f===c?b.Children.count(u)>1?b.Children.only(null):b.isValidElement(u)?u.props.children:null:f);return s.jsx(t,{...o,ref:a,children:b.isValidElement(u)?b.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var cye=Tc("Slot");function uye(e){const t=b.forwardRef((n,r)=>{const{children:a,...i}=n;if(b.isValidElement(a)){const o=mye(a),l=hye(i,a.props);return a.type!==b.Fragment&&(l.ref=r?Vj(r,o):o),b.cloneElement(a,l)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var xK=Symbol("radix.slottable");function dye(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=xK,t}function fye(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===xK}function hye(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function mye(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function yK(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=yK(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mt(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=yK(e))&&(r&&(r+=" "),r+=t);return r}const e$=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,t$=Mt,vy=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return t$(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const d=n==null?void 0:n[u],f=i==null?void 0:i[u];if(d===null)return null;const m=e$(d)||e$(f);return a[u][m]}),l=n&&Object.entries(n).reduce((u,d)=>{let[f,m]=d;return m===void 0||(u[f]=m),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:f,className:m,...p}=d;return Object.entries(p).every(v=>{let[y,x]=v;return Array.isArray(x)?x.includes({...i,...l}[y]):{...i,...l}[y]===x})?[...u,f,m]:u},[]);return t$(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)},EO="-",pye=e=>{const t=xye(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(EO);return l[0]===""&&l.length!==1&&l.shift(),vK(l,t)||gye(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},vK=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),a=r?vK(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(EO);return(o=t.validators.find(({validator:l})=>l(i)))==null?void 0:o.classGroupId},n$=/^\[(.+)\]$/,gye=e=>{if(n$.test(e)){const t=n$.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xye=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return vye(Object.entries(e.classGroups),n).forEach(([i,o])=>{dT(o,r,i,t)}),r},dT=(e,t,n,r)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:r$(t,a);i.classGroupId=n;return}if(typeof a=="function"){if(yye(a)){dT(a(r),t,n,r);return}t.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{dT(o,r$(t,i),n,r)})})},r$=(e,t)=>{let n=e;return t.split(EO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},yye=e=>e.isThemeGetter,vye=(e,t)=>t?e.map(([n,r])=>{const a=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,l])=>[t+o,l])):i);return[n,a]}):e,bye=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},bK="!",wye=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,a=t[0],i=t.length,o=l=>{const c=[];let u=0,d=0,f;for(let x=0;x<l.length;x++){let w=l[x];if(u===0){if(w===a&&(r||l.slice(x,x+i)===t)){c.push(l.slice(d,x)),d=x+i;continue}if(w==="/"){f=x;continue}}w==="["?u++:w==="]"&&u--}const m=c.length===0?l:l.substring(d),p=m.startsWith(bK),v=p?m.substring(1):m,y=f&&f>d?f-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:y}};return n?l=>n({className:l,parseClassName:o}):o},jye=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},Nye=e=>({cache:bye(e.cacheSize),parseClassName:wye(e),...pye(e)}),Sye=/\s+/,kye=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=t,i=[],o=e.trim().split(Sye);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:p}=n(u);let v=!!p,y=r(v?m.substring(0,p):m);if(!y){if(!v){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}v=!1}const x=jye(d).join(":"),w=f?x+bK:x,N=w+y;if(i.includes(N))continue;i.push(N);const S=a(y,v);for(let _=0;_<S.length;++_){const k=S[_];i.push(w+k)}l=u+(l.length>0?" "+l:l)}return l};function Cye(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=wK(t))&&(r&&(r+=" "),r+=n);return r}const wK=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=wK(e[r]))&&(n&&(n+=" "),n+=t);return n};function _ye(e,...t){let n,r,a,i=o;function o(c){const u=t.reduce((d,f)=>f(d),e());return n=Nye(u),r=n.cache.get,a=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=kye(c,n);return a(c,d),d}return function(){return i(Cye.apply(null,arguments))}}const Ln=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},jK=/^\[(?:([a-z-]+):)?(.+)\]$/i,Aye=/^\d+\/\d+$/,Eye=new Set(["px","full","screen"]),Pye=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tye=/\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$/,Iye=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Oye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Mye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mo=e=>sh(e)||Eye.has(e)||Aye.test(e),Yl=e=>Fm(e,"length",Uye),sh=e=>!!e&&!Number.isNaN(Number(e)),i2=e=>Fm(e,"number",sh),Up=e=>!!e&&Number.isInteger(Number(e)),Rye=e=>e.endsWith("%")&&sh(e.slice(0,-1)),$t=e=>jK.test(e),Xl=e=>Pye.test(e),Dye=new Set(["length","size","percentage"]),Lye=e=>Fm(e,Dye,NK),$ye=e=>Fm(e,"position",NK),Fye=new Set(["image","url"]),zye=e=>Fm(e,Fye,qye),Bye=e=>Fm(e,"",Hye),Hp=()=>!0,Fm=(e,t,n)=>{const r=jK.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Uye=e=>Tye.test(e)&&!Iye.test(e),NK=()=>!1,Hye=e=>Oye.test(e),qye=e=>Mye.test(e),Vye=()=>{const e=Ln("colors"),t=Ln("spacing"),n=Ln("blur"),r=Ln("brightness"),a=Ln("borderColor"),i=Ln("borderRadius"),o=Ln("borderSpacing"),l=Ln("borderWidth"),c=Ln("contrast"),u=Ln("grayscale"),d=Ln("hueRotate"),f=Ln("invert"),m=Ln("gap"),p=Ln("gradientColorStops"),v=Ln("gradientColorStopPositions"),y=Ln("inset"),x=Ln("margin"),w=Ln("opacity"),N=Ln("padding"),S=Ln("saturate"),_=Ln("scale"),k=Ln("sepia"),C=Ln("skew"),E=Ln("space"),O=Ln("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",$t,t],D=()=>[$t,t],z=()=>["",Mo,Yl],I=()=>["auto",sh,$t],F=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>["start","end","center","between","around","evenly","stretch"],B=()=>["","0",$t],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[sh,$t];return{cacheSize:500,separator:":",theme:{colors:[Hp],spacing:[Mo,Yl],blur:["none","",Xl,$t],brightness:V(),borderColor:[e],borderRadius:["none","","full",Xl,$t],borderSpacing:D(),borderWidth:z(),contrast:V(),grayscale:B(),hueRotate:V(),invert:B(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Rye,Yl],inset:T(),margin:T(),opacity:V(),padding:D(),saturate:V(),scale:V(),sepia:B(),skew:V(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",$t]}],container:["container"],columns:[{columns:[Xl]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...F(),$t]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}
vendor: 9,951 bytes, line 87
87],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Up,$t]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",$t]}],grow:[{grow:B()}],shrink:[{shrink:B()}],order:[{order:["first","last","none",Up,$t]}],"grid-cols":[{"grid-cols":[Hp]}],"col-start-end":[{col:["auto",{span:["full",Up,$t]},$t]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[Hp]}],"row-start-end":[{row:["auto",{span:[Up,$t]},$t]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",$t]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",$t]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...q()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...q(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...q(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[N]}],px:[{px:[N]}],py:[{py:[N]}],ps:[{ps:[N]}],pe:[{pe:[N]}],pt:[{pt:[N]}],pr:[{pr:[N]}],pb:[{pb:[N]}],pl:[{pl:[N]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",$t,t]}],"min-w":[{"min-w":[$t,t,"min","max","fit"]}],"max-w":[{"max-w":[$t,t,"none","full","min","max","fit","prose",{screen:[Xl]},Xl]}],h:[{h:[$t,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[$t,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[$t,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[$t,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Xl,Yl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",i2]}],"font-family":[{font:[Hp]}],"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",$t]}],"line-clamp":[{"line-clamp":["none",sh,i2]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mo,$t]}],"list-image":[{"list-image":["none",$t]}],"list-style-type":[{list:["none","disc","decimal",$t]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mo,Yl]}],"underline-offset":[{"underline-offset":["auto",Mo,$t]}],"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:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$t]}],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",$t]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F(),$ye]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Lye]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zye]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...U(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:U()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...U()]}],"outline-offset":[{"outline-offset":[Mo,$t]}],"outline-w":[{outline:[Mo,Yl]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Mo,Yl]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Xl,Bye]}],"shadow-color":[{shadow:[Hp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Xl,$t]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[k]}],"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":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",$t]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",$t]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",$t]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[Up,$t]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",$t]}],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",$t]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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"]}
87],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",$t]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mo,Yl,i2]}],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"]}}},Wye=_ye(Vye);function He(...e){return Wye(Mt(e))}function Wg(e){return{openai:"OpenAI",anthropic:"Anthropic",cohere:"Cohere",google:"Google",huggingface:"HuggingFace",mistral:"Mistral",meta:"Meta",together:"Together AI"}[e.toLowerCase()]||e.charAt(0).toUpperCase()+e.slice(1)}const SK=vy("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline","mobile-primary":"mobile-btn-primary","mobile-secondary":"mobile-btn-secondary","mobile-ghost":"mobile-btn-ghost",glow:"glow-button text-white hover:scale-105 active:scale-95 transition-all duration-200"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","mobile-default":"h-12 px-6 text-base mobile-touch-target","mobile-sm":"h-10 px-4 text-sm mobile-touch-target","mobile-lg":"h-14 px-8 text-lg mobile-touch-target","mobile-icon":"h-12 w-12 mobile-touch-target"}},defaultVariants:{variant:"default",size:"default"}}),Y=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...a},i)=>{const o=r?cye:"button";return s.jsx(o,{className:He(SK({variant:t,size:n,className:e})),ref:i,...a})});Y.displayName="Button";const Gye=vy("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 le({className:e,variant:t,...n}){return s.jsx("div",{className:He(Gye({variant:t}),e),...n})}function Oe(e,t,{checkForDefaultPrevented:n=!0}={}
vendor: 43,385 bytes, line 87
87){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Kye(e,t){const n=b.createContext(t),r=i=>{const{children:o,...l}=i,c=b.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function a(i){const o=b.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Mr(e,t=[]){let n=[];function r(i,o){const l=b.createContext(o),c=n.length;n=[...n,o];const u=f=>{var w;const{scope:m,children:p,...v}=f,y=((w=m==null?void 0:m[e])==null?void 0:w[c])||l,x=b.useMemo(()=>v,Object.values(v));return s.jsx(y.Provider,{value:x,children:p})};u.displayName=i+"Provider";function d(f,m){var y;const p=((y=m==null?void 0:m[e])==null?void 0:y[c])||l,v=b.useContext(p);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,d]}const a=()=>{const i=n.map(o=>b.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[r,Yye(a,...t)]}function Yye(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Xye=yO[" useInsertionEffect ".trim().toString()]||cr;function $s({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,o]=Qye({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:a;{const d=b.useRef(e!==void 0);b.useEffect(()=>{const f=d.current;f!==l&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${l?"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.`),d.current=l},[l,r])}const u=b.useCallback(d=>{var f;if(l){const m=Zye(d)?d(e):d;m!==e&&((f=o.current)==null||f.call(o,m))}else i(d)},[l,e,i,o]);return[c,u]}function Qye({defaultProp:e,onChange:t}){const[n,r]=b.useState(e),a=b.useRef(n),i=b.useRef(t);return Xye(()=>{i.current=t},[t]),b.useEffect(()=>{var o;a.current!==n&&((o=i.current)==null||o.call(i,n),a.current=n)},[n,a]),[n,r,i]}function Zye(e){return typeof e=="function"}var Jye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=Jye.reduce((e,t)=>{const n=Tc(`Primitive.${t}`),r=b.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function PO(e,t){e&&Td.flushSync(()=>e.dispatchEvent(t))}function zm(e){const t=e+"CollectionProvider",[n,r]=Mr(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=y=>{const{scope:x,children:w}=y,N=X.useRef(null),S=X.useRef(new Map).current;return s.jsx(a,{scope:x,itemMap:S,collectionRef:N,children:w})};o.displayName=t;const l=e+"CollectionSlot",c=Tc(l),u=X.forwardRef((y,x)=>{const{scope:w,children:N}=y,S=i(l,w),_=gt(x,S.collectionRef);return s.jsx(c,{ref:_,children:N})});u.displayName=l;const d=e+"CollectionItemSlot",f="data-radix-collection-item",m=Tc(d),p=X.forwardRef((y,x)=>{const{scope:w,children:N,...S}=y,_=X.useRef(null),k=gt(x,_),C=i(d,w);return X.useEffect(()=>(C.itemMap.set(_,{ref:_,...S}),()=>void C.itemMap.delete(_))),s.jsx(m,{[f]:"",ref:k,children:N})});p.displayName=d;function v(y){const x=i(e+"CollectionConsumer",y);return X.useCallback(()=>{const N=x.collectionRef.current;if(!N)return[];const S=Array.from(N.querySelectorAll(`[${f}]`));return Array.from(x.itemMap.values()).sort((C,E)=>S.indexOf(C.ref.current)-S.indexOf(E.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:o,Slot:u,ItemSlot:p},v,r]}var e0e=b.createContext(void 0);function Md(e){const t=b.useContext(e0e);return e||t||"ltr"}function lr(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function t0e(e,t=globalThis==null?void 0:globalThis.document){const n=lr(e);b.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var n0e="DismissableLayer",fT="dismissableLayer.update",r0e="dismissableLayer.pointerDownOutside",s0e="dismissableLayer.focusOutside",s$,kK=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rd=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=b.useContext(kK),[d,f]=b.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),v=gt(t,E=>f(E)),y=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(x),N=d?y.indexOf(d):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,_=N>=w,k=i0e(E=>{const O=E.target,P=[...u.branches].some(R=>R.contains(O));!_||P||(a==null||a(E),o==null||o(E),E.defaultPrevented||l==null||l())},m),C=o0e(E=>{const O=E.target;[...u.branches].some(R=>R.contains(O))||(i==null||i(E),o==null||o(E),E.defaultPrevented||l==null||l())},m);return t0e(E=>{N===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&l&&(E.preventDefault(),l()))},m),b.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(s$=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),a$(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=s$)}},[d,m,n,u]),b.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),a$())},[d,u]),b.useEffect(()=>{const E=()=>p({});return document.addEventListener(fT,E),()=>document.removeEventListener(fT,E)},[]),s.jsx(Ve.div,{...c,ref:v,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:Oe(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Oe(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Oe(e.onPointerDownCapture,k.onPointerDownCapture)})});Rd.displayName=n0e;var a0e="DismissableLayerBranch",CK=b.forwardRef((e,t)=>{const n=b.useContext(kK),r=b.useRef(null),a=gt(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),s.jsx(Ve.div,{...e,ref:a})});CK.displayName=a0e;function i0e(e,t=globalThis==null?void 0:globalThis.document){const n=lr(e),r=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const i=l=>{if(l.target&&!r.current){let c=function(){_K(r0e,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function o0e(e,t=globalThis==null?void 0:globalThis.document){const n=lr(e),r=b.useRef(!1);return b.useEffect(()=>{const a=i=>{i.target&&!r.current&&_K(s0e,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function a$(){const e=new CustomEvent(fT);document.dispatchEvent(e)}function _K(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?PO(a,i):a.dispatchEvent(i)}var l0e=Rd,c0e=CK,o2=0;function Wj(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??i$()),document.body.insertAdjacentElement("beforeend",e[1]??i$()),o2++,()=>{o2===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),o2--}},[])}function i$(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var l2="focusScope.autoFocusOnMount",c2="focusScope.autoFocusOnUnmount",o$={bubbles:!1,cancelable:!0},u0e="FocusScope",by=b.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=b.useState(null),u=lr(a),d=lr(i),f=b.useRef(null),m=gt(t,y=>c(y)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let y=function(S){if(p.paused||!l)return;const _=S.target;l.contains(_)?f.current=_:nc(f.current,{select:!0})},x=function(S){if(p.paused||!l)return;const _=S.relatedTarget;_!==null&&(l.contains(_)||nc(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const k of S)k.removedNodes.length>0&&nc(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",x);const N=new MutationObserver(w);return l&&N.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),N.disconnect()}}},[r,l,p.paused]),b.useEffect(()=>{if(l){c$.add(p);const y=document.activeElement;if(!l.contains(y)){const w=new CustomEvent(l2,o$);l.addEventListener(l2,u),l.dispatchEvent(w),w.defaultPrevented||(d0e(g0e(AK(l)),{select:!0}),document.activeElement===y&&nc(l))}return()=>{l.removeEventListener(l2,u),setTimeout(()=>{const w=new CustomEvent(c2,o$);l.addEventListener(c2,d),l.dispatchEvent(w),w.defaultPrevented||nc(y??document.body,{select:!0}),l.removeEventListener(c2,d),c$.remove(p)},0)}}},[l,u,d,p]);const v=b.useCallback(y=>{if(!n&&!r||p.paused)return;const x=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,w=document.activeElement;if(x&&w){const N=y.currentTarget,[S,_]=f0e(N);S&&_?!y.shiftKey&&w===_?(y.preventDefault(),n&&nc(S,{select:!0})):y.shiftKey&&w===S&&(y.preventDefault(),n&&nc(_,{select:!0})):w===N&&y.preventDefault()}},[n,r,p.paused]);return s.jsx(Ve.div,{tabIndex:-1,...o,ref:m,onKeyDown:v})});by.displayName=u0e;function d0e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nc(r,{select:t}),document.activeElement!==n)return}function f0e(e){const t=AK(e),n=l$(t,e),r=l$(t.reverse(),e);return[n,r]}function AK(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function l$(e,t){for(const n of e)if(!h0e(n,{upTo:t}))return n}function h0e(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 m0e(e){return e instanceof HTMLInputElement&&"select"in e}function nc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&m0e(e)&&t&&e.select()}}var c$=p0e();function p0e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=u$(e,t),e.unshift(t)},remove(t){var n;e=u$(e,t),(n=e[0])==null||n.resume()}}}function u$(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function g0e(e){return e.filter(t=>t.tagName!=="A")}var x0e=yO[" useId ".trim().toString()]||(()=>{}),y0e=0;function na(e){const[t,n]=b.useState(x0e());return cr(()=>{n(r=>r??String(y0e++))},[e]),t?`radix-${t}`:""}const v0e=["top","right","bottom","left"],Ic=Math.min,va=Math.max,Zb=Math.round,_v=Math.floor,ro=e=>({x:e,y:e}),b0e={left:"right",right:"left",bottom:"top",top:"bottom"},w0e={start:"end",end:"start"};function hT(e,t,n){return va(e,Ic(t,n))}function cl(e,t){return typeof e=="function"?e(t):e}function ul(e){return e.split("-")[0]}function Bm(e){return e.split("-")[1]}function TO(e){return e==="x"?"y":"x"}function IO(e){return e==="y"?"height":"width"}const j0e=new Set(["top","bottom"]);function eo(e){return j0e.has(ul(e))?"y":"x"}function OO(e){return TO(eo(e))}function N0e(e,t,n){n===void 0&&(n=!1);const r=Bm(e),a=OO(e),i=IO(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Jb(o)),[o,Jb(o)]}function S0e(e){const t=Jb(e);return[mT(e),t,mT(t)]}function mT(e){return e.replace(/start|end/g,t=>w0e[t])}const d$=["left","right"],f$=["right","left"],k0e=["top","bottom"],C0e=["bottom","top"];function _0e(e,t,n){switch(e){case"top":case"bottom":return n?t?f$:d$:t?d$:f$;case"left":case"right":return t?k0e:C0e;default:return[]}}function A0e(e,t,n,r){const a=Bm(e);let i=_0e(ul(e),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(mT)))),i}function Jb(e){return e.replace(/left|right|bottom|top/g,t=>b0e[t])}function E0e(e){return{top:0,right:0,bottom:0,left:0,...e}}function EK(e){return typeof e!="number"?E0e(e):{top:e,right:e,bottom:e,left:e}}function ew(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function h$(e,t,n){let{reference:r,floating:a}=e;const i=eo(t),o=OO(t),l=IO(o),c=ul(t),u=i==="y",d=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,m=r[l]/2-a[l]/2;let p;switch(c){case"top":p={x:d,y:r.y-a.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-a.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Bm(t)){case"start":p[o]-=m*(n&&u?-1:1);break;case"end":p[o]+=m*(n&&u?-1:1);break}return p}const P0e=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:d,y:f}=h$(u,r,c),m=r,p={},v=0;for(let y=0;y<l.length;y++){const{name:x,fn:w}=l[y],{x:N,y:S,data:_,reset:k}=await w({x:d,y:f,initialPlacement:r,placement:m,strategy:a,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=N??d,f=S??f,p={...p,[x]:{...p[x],..._}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(m=k.placement),k.rects&&(u=k.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):k.rects),{x:d,y:f}=h$(u,m,c)),y=-1)}return{x:d,y:f,placement:m,strategy:a,middlewareData:p}};async function Gg(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:m=!1,padding:p=0}=cl(t,e),v=EK(p),x=l[m?f==="floating"?"reference":"floating":f],w=ew(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(x)))==null||n?x:x.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),N=f==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),_=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},k=ew(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:S,strategy:c}):N);return{top:(w.top-k.top+v.top)/_.y,bottom:(k.bottom-w.bottom+v.bottom)/_.y,left:(w.left-k.left+v.left)/_.x,right:(k.right-w.right+v.right)/_.x}}const T0e=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=cl(e,t)||{};if(u==null)return{};const f=EK(d),m={x:n,y:r},p=OO(a),v=IO(p),y=await o.getDimensions(u),x=p==="y",w=x?"top":"left",N=x?"bottom":"right",S=x?"clientHeight":"clientWidth",_=i.reference[v]+i.reference[p]-m[p]-i.floating[v],k=m[p]-i.reference[p],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let E=C?C[S]:0;(!E||!await(o.isElement==null?void 0:o.isElement(C)))&&(E=l.floating[S]||i.floating[v]);const O=_/2-k/2,P=E/2-y[v]/2-1,R=Ic(f[w],P),T=Ic(f[N],P),D=R,z=E-y[v]-T,I=E/2-y[v]/2+O,F=hT(D,I,z),U=!c.arrow&&Bm(a)!=null&&I!==F&&i.reference[v]/2-(I<D?R:T)-y[v]/2<0,H=U?I<D?I-D:I-z:0;return{[p]:m[p]+H,data:{[p]:F,centerOffset:I-F-H,...U&&{alignmentOffset:H}},reset:U}}}),I0e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:y=!0,...x}=cl(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=ul(a),N=eo(l),S=ul(l)===l,_=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=m||(S||!y?[Jb(l)]:S0e(l)),C=v!=="none";!m&&C&&k.push(...A0e(l,y,v,_));const E=[l,...k],O=await Gg(t,x),P=[];let R=((r=i.flip)==null?void 0:r.overflows)||[];if(d&&P.push(O[w]),f){const I=N0e(a,o,_);P.push(O[I[0]],O[I[1]])}if(R=[...R,{placement:a,overflows:P}],!P.every(I=>I<=0)){var T,D;const I=(((T=i.flip)==null?void 0:T.index)||0)+1,F=E[I];if(F&&(!(f==="alignment"?N!==eo(F):!1)||R.every(q=>eo(q.placement)===N?q.overflows[0]>0:!0)))return{data:{index:I,overflows:R},reset:{placement:F}};let U=(D=R.filter(H=>H.overflows[0]<=0).sort((H,q)=>H.overflows[1]-q.overflows[1])[0])==null?void 0:D.placement;if(!U)switch(p){case"bestFit":{var z;const H=(z=R.filter(q=>{if(C){const B=eo(q.placement);return B===N||B==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(B=>B>0).reduce((B,L)=>B+L,0)]).sort((q,B)=>q[1]-B[1])[0])==null?void 0:z[0];H&&(U=H);break}case"initialPlacement":U=l;break}if(a!==U)return{reset:{placement:U}}}return{}}}};function m$(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function p$(e){return v0e.some(t=>e[t]>=0)}const O0e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=cl(e,t);switch(r){case"referenceHidden":{const i=await Gg(t,{...a,elementContext:"reference"}),o=m$(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:p$(o)}}}case"escaped":{const i=await Gg(t,{...a,altBoundary:!0}),o=m$(i,n.floating);return{data:{escapedOffsets:o,escaped:p$(o)}}}default:return{}}}}},PK=new Set(["left","top"]);async function M0e(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=ul(n),l=Bm(n),c=eo(n)==="y",u=PK.has(o)?-1:1,d=i&&c?-1:1,f=cl(t,e);let{mainAxis:m,crossAxis:p,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(p=l==="end"?v*-1:v),c?{x:p*d,y:m*u}:{x:m*u,y:p*d}}const R0e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await M0e(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},D0e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:l={fn:x=>{let{x:w,y:N}=x;return{x:w,y:N}}},...c}=cl(e,t),u={x:n,y:r},d=await Gg(t,c),f=eo(ul(a)),m=TO(f);let p=u[m],v=u[f];if(i){const x=m==="y"?"top":"left",w=m==="y"?"bottom":"right",N=p+d[x],S=p-d[w];p=hT(N,p,S)}if(o){const x=f==="y"?"top":"left",w=f==="y"?"bottom":"right",N=v+d[x],S=v-d[w];v=hT(N,v,S)}const y=l.fn({...t,[m]:p,[f]:v});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[m]:i,[f]:o}}}}}},L0e=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=cl(e,t),d={x:n,y:r},f=eo(a),m=TO(f);let p=d[m],v=d[f];const y=cl(l,t),x=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const S=m==="y"?"height":"width",_=i.reference[m]-i.floating[S]+x.mainAxis,k=i.reference[m]+i.reference[S]-x.mainAxis;p<_?p=_:p>k&&(p=k)}if(u){var w,N;const S=m==="y"?"width":"height",_=PK.has(ul(a)),k=i.reference[f]-i.floating[S]+(_&&((w=o.offset)==null?void 0:w[f])||0)+(_?0:x.crossAxis),C=i.reference[f]+i.reference[S]+(_?0:((N=o.offset)==null?void 0:N[f])||0)-(_?x.crossAxis:0);v<k?v=k:v>C&&(v=C)}return{[m]:p,[f]:v}}}},$0e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=cl(e,t),d=await Gg(t,u),f=ul(a),m=Bm(a),p=eo(a)==="y",{width:v,height:y}=i.floating;let x,w;f==="top"||f==="bottom"?(x=f,w=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,x=m==="end"?"top":"bottom");const N=y-d.top-d.bottom,S=v-d.left-d.right,_=Ic(y-d[x],N),k=Ic(v-d[w],S),C=!t.middlewareData.shift;let E=_,O=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=N),C&&!m){const R=va(d.left,0),T=va(d.right,0),D=va(d.top,0),z=va(d.bottom,0);p?O=v-2*(R!==0||T!==0?R+T:va(d.left,d.right)):E=y-2*(D!==0||z!==0?D+z:va(d.top,d.bottom))}await c({...t,availableWidth:O,availableHeight:E});const P=await o.getDimensions(l.floating);return v!==P.width||y!==P.height?{reset:{rects:!0}}:{}}}};function Gj(){return typeof window<"u"}function Um(e){return TK(e)?(e.nodeName||"").toLowerCase():"#document"}function Sa(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vo(e){var t;return(t=(TK(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function TK(e){return Gj()?e instanceof Node||e instanceof Sa(e).Node:!1}function Di(e){return Gj()?e instanceof Element||e instanceof Sa(e).Element:!1}function ho(e){return Gj()?e instanceof HTMLElement||e instanceof Sa(e).HTMLElement:!1}function g$(e){return!Gj()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sa(e).ShadowRoot}const F0e=new Set(["inline","contents"]);function wy(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Li(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!F0e.has(a)}const z0e=new Set(["table","td","th"]);function B0e(e){return z0e.has(Um(e))}const U0e=[":popover-open",":modal"];function Kj(e){return U0e.some(t=>{try{return e.matches(t)}catch{return!1}})}const H0e=["transform","translate","scale","rotate","perspective"],q0e=["transform","translate","scale","rotate","perspective","filter"],V0e=["paint","layout","strict","content"];function MO(e){const t=RO(),n=Di(e)?Li(e):e;return H0e.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)||q0e.some(r=>(n.willChange||"").includes(r))||V0e.some(r=>(n.contain||"").includes(r))}function W0e(e){let t=Oc(e);for(;ho(t)&&!Rh(t);){if(MO(t))return t;if(Kj(t))return null;t=Oc(t)}return null}function RO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const G0e=new Set(["html","body","#document"]);function Rh(e){return G0e.has(Um(e))}function Li(e){return Sa(e).getComputedStyle(e)}function Yj(e){return Di(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Oc(e){if(Um(e)==="html")return e;const t=e.assignedSlot||e.parentNode||g$(e)&&e.host||vo(e);return g$(t)?t.host:t}function IK(e){const t=Oc(e);return Rh(t)?e.ownerDocument?e.ownerDocument.body:e.body:ho(t)&&wy(t)?t:IK(t)}function Kg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=IK(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),o=Sa(a);if(i){const l=pT(o);return t.concat(o,o.visualViewport||[],wy(a)?a:[],l&&n?Kg(l):[])}return t.concat(a,Kg(a,[],n))}function pT(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function OK(e){const t=Li(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ho(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:r,l=Zb(n)!==i||Zb(r)!==o;return l&&(n=i,r=o),{width:n,height:r,$:l}}function DO(e){return Di(e)?e:e.contextElement}function ah(e){const t=DO(e);if(!ho(t))return ro(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=OK(t);let o=(i?Zb(n.width):n.width)/r,l=(i?Zb(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const K0e=ro(0);function MK(e){const t=Sa(e);return!RO()||!t.visualViewport?K0e:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Y0e(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Sa(e)?!1:t}function fd(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=DO(e);let o=ro(1);t&&(r?Di(r)&&(o=ah(r)):o=ah(e));const l=Y0e(i,n,r)?MK(i):ro(0);let c=(a.left+l.x)/o.x,u=(a.top+l.y)/o.y,d=a.width/o.x,f=a.height/o.y;if(i){const m=Sa(i),p=r&&Di(r)?Sa(r):r;let v=m,y=pT(v);for(;y&&r&&p!==v;){const x=ah(y),w=y.getBoundingClientRect(),N=Li(y),S=w.left+(y.clientLeft+parseFloat(N.paddingLeft))*x.x,_=w.top+(y.clientTop+parseFloat(N.paddingTop))*x.y;c*=x.x,u*=x.y,d*=x.x,f*=x.y,c+=S,u+=_,v=Sa(y),y=pT(v)}}return ew({width:d,height:f,x:c,y:u})}function Xj(e,t){const n=Yj(e).scrollLeft;return t?t.left+n:fd(vo(e)).left+n}function RK(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Xj(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function X0e(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",o=vo(r),l=t?Kj(t.floating):!1;if(r===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=ro(1);const d=ro(0),f=ho(r);if((f||!f&&!i)&&((Um(r)!=="body"||wy(o))&&(c=Yj(r)),ho(r))){const p=fd(r);u=ah(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const m=o&&!f&&!i?RK(o,c):ro(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-c.scrollTop*u.y+d.y+m.y}}function Q0e(e){return Array.from(e.getClientRects())}function Z0e(e){const t=vo(e),n=Yj(e),r=e.ownerDocument.body,a=va(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=va(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Xj(e);const l=-n.scrollTop;return Li(r).direction==="rtl"&&(o+=va(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:l}}const x$=25;function J0e(e,t){const n=Sa(e),r=vo(e),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const d=RO();(!d||d&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const u=Xj(r);if(u<=0){const d=r.ownerDocument,f=d.body,m=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,v=Math.abs(r.clientWidth-f.clientWidth-p);v<=x$&&(i-=v)}else u<=x$&&(i+=u);return{width:i,height:o,x:l,y:c}}const eve=new Set(["absolute","fixed"]);function tve(e,t){const n=fd(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ho(e)?ah(e):ro(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=r*i.y;return{width:o,height:l,x:c,y:u}}function y$(e,t,n){let r;if(t==="viewport")r=J0e(e,n);else if(t==="document")r=Z0e(vo(e));else if(Di(t))r=tve(t,n);else{const a=MK(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ew(r)}function DK(e,t){const n=Oc(e);return n===t||!Di(n)||Rh(n)?!1:Li(n).position==="fixed"||DK(n,t)}function nve(e,t){const n=t.get(e);if(n)return n;let r=Kg(e,[],!1).filter(l=>Di(l)&&Um(l)!=="body"),a=null;const i=Li(e).position==="fixed";let o=i?Oc(e):e;for(;Di(o)&&!Rh(o);){const l=Li(o),c=MO(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&eve.has(a.position)||wy(o)&&!c&&DK(e,o))?r=r.filter(d=>d!==o):a=l,o=Oc(o)}return t.set(e,r),r}function rve(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[...n==="clippingAncestors"?Kj(t)?[]:nve(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const f=y$(t,d,a);return u.top=va(f.top,u.top),u.right=Ic(f.right,u.right),u.bottom=Ic(f.bottom,u.bottom),u.left=va(f.left,u.left),u},y$(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function sve(e){const{width:t,height:n}=OK(e);return{width:t,height:n}}function ave(e,t,n){const r=ho(t),a=vo(t),i=n==="fixed",o=fd(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=ro(0);function u(){c.x=Xj(a)}if(r||!r&&!i)if((Um(t)!=="body"||wy(a))&&(l=Yj(t)),r){const p=fd(t,!0,i,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else a&&u();i&&!r&&a&&u();const d=a&&!r&&!i?RK(a,l):ro(0),f=o.left+l.scrollLeft-c.x-d.x,m=o.top+l.scrollTop-c.y-d.y;return{x:f,y:m,width:o.width,height:o.height}}function u2(e){return Li(e).position==="static"}function v$(e,t){if(!ho(e)||Li(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vo(e)===n&&(n=n.ownerDocument.body),n}function LK(e,t){const n=Sa(e);if(Kj(e))return n;if(!ho(e)){let a=Oc(e);for(;a&&!Rh(a);){if(Di(a)&&!u2(a))return a;a=Oc(a)}return n}let r=v$(e,t);for(;r&&B0e(r)&&u2(r);)r=v$(r,t);return r&&Rh(r)&&u2(r)&&!MO(r)?n:r||W0e(e)||n}const ive=async function(e){const t=this.getOffsetParent||LK,n=this.getDimensions,r=await n(e.floating);return{reference:ave(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ove(e){return Li(e).direction==="rtl"}const lve={convertOffsetParentRelativeRectToViewportRelativeRect:X0e,getDocumentElement:vo,getClippingRect:rve,getOffsetParent:LK,getElementRects:ive,getClientRects:Q0e,getDimensions:sve,getScale:ah,isElement:Di,isRTL:ove};function $K(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cve(e,t){let n=null,r;const a=vo(e);function i(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:d,top:f,width:m,height:p}=u;if(l||t(),!m||!p)return;const v=_v(f),y=_v(a.clientWidth-(d+m)),x=_v(a.clientHeight-(f+p)),w=_v(d),S={rootMargin:-v+"px "+-y+"px "+-x+"px "+-w+"px",threshold:va(0,Ic(1,c))||1};let _=!0;function k(C){const E=C[0].intersectionRatio;if(E!==c){if(!_)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},1e3)}E===1&&!$K(u,e.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(k,{...S,root:a.ownerDocument})}catch{n=new IntersectionObserver(k,S)}n.observe(e)}return o(!0),i}function uve(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=DO(e),d=a||i?[...u?Kg(u):[],...Kg(t)]:[];d.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=u&&l?cve(u,n):null;let m=-1,p=null;o&&(p=new ResizeObserver(w=>{let[N]=w;N&&N.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),u&&!c&&p.observe(u),p.observe(t));let v,y=c?fd(e):null;c&&x();function x(){const w=fd(e);y&&!$K(y,w)&&n(),y=w,v=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(N=>{a&&N.removeEventListener("scroll",n),i&&N.removeEventListener("resize",n)}),f==null||f(),(w=p)==null||w.disconnect(),p=null,c&&cancelAnimationFrame(v)}}const dve=R0e,fve=D0e,hve=I0e,mve=$0e,pve=O0e,b$=T0e,gve=L0e,xve=(e,t,n)=>{const r=new Map,a={platform:lve,...n},i={...a.platform,_c:r};return P0e(e,t,{...a,platform:i})};var yve=typeof document<"u",vve=function(){},Eb=yve?b.useLayoutEffect:vve;function tw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;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(!tw(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!tw(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function FK(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function w$(e,t){const n=FK(e);return Math.round(t*n)/n}function d2(e){const t=b.useRef(e);return Eb(()=>{t.current=e}),t}function bve(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,p]=b.useState(r);tw(m,r)||p(r);const[v,y]=b.useState(null),[x,w]=b.useState(null),N=b.useCallback(q=>{q!==C.current&&(C.current=q,y(q))},[]),S=b.useCallback(q=>{q!==E.current&&(E.current=q,w(q))},[]),_=i||v,k=o||x,C=b.useRef(null),E=b.useRef(null),O=b.useRef(d),P=c!=null,R=d2(c),T=d2(a),D=d2(u),z=b.useCallback(()=>{if(!C.current||!E.current)return;const q={placement:t,strategy:n,middleware:m};T.current&&(q.platform=T.current),xve(C.current,E.current,q).then(B=>{const L={...B,isPositioned:D.current!==!1};I.current&&!tw(O.current,L)&&(O.current=L,Td.flushSync(()=>{f(L)}))})},[m,t,n,T,D]);Eb(()=>{u===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(q=>({...q,isPositioned:!1})))},[u]);const I=b.useRef(!1);Eb(()=>(I.current=!0,()=>{I.current=!1}),[]),Eb(()=>{if(_&&(C.current=_),k&&(E.current=k),_&&k){if(R.current)return R.current(_,k,z);z()}},[_,k,z,R,P]);const F=b.useMemo(()=>({reference:C,floating:E,setReference:N,setFloating:S}),[N,S]),U=b.useMemo(()=>({reference:_,floating:k}),[_,k]),H=b.useMemo(()=>{const q={position:n,left:0,top:0};if(!U.floating)return q;const B=w$(U.floating,d.x),L=w$(U.floating,d.y);return l?{...q,transform:"translate("+B+"px, "+L+"px)",...FK(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:B,top:L}},[n,l,U.floating,d.x,d.y]);return b.useMemo(()=>({...d,update:z,refs:F,elements:U,floatingStyles:H}),[d,z,F,U,H])}const wve=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?b$({element:r.current,padding:a}).fn(n):{}:r?b$({element:r,padding:a}).fn(n):{}}}},jve=(e,t)=>({...dve(e),options:[e,t]}),Nve=(e,t)=>({...fve(e),options:[e,t]}),Sve=(e,t)=>({...gve(e),options:[e,t]}),kve=(e,t)=>({...hve(e),options:[e,t]}),Cve=(e,t)=>({...mve(e),options:[e,t]}),_ve=(e,t)=>({...pve(e),options:[e,t]}),Ave=(e,t)=>({...wve(e),options:[e,t]});var Eve="Arrow",zK=b.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return s.jsx(Ve.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});zK.displayName=Eve;var Pve=zK;function Qj(e){const[t,n]=b.useState(void 0);return cr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var LO="Popper",[BK,Bc]=Mr(LO),[Tve,UK]=BK(LO),HK=e=>{const{__scopePopper:t,children:n}=e,[r,a]=b.useState(null);return s.jsx(Tve,{scope:t,anchor:r,onAnchorChange:a,children:n})};HK.displayName=LO;var qK="PopperAnchor",VK=b.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=UK(qK,n),o=b.useRef(null),l=gt(t,o),c=b.useRef(null);return b.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||o.current,u!==c.current&&i.onAnchorChange(c.current)}),r?null:s.jsx(Ve.div,{...a,ref:l})});VK.displayName=qK;var $O="PopperContent",[Ive,Ove]=BK($O),WK=b.forwardRef((e,t)=>{var J,ne,Z,oe,he,Q;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:v,...y}=e,x=UK($O,n),[w,N]=b.useState(null),S=gt(t,ae=>N(ae)),[_,k]=b.useState(null),C=Qj(_),E=(C==null?void 0:C.width)??0,O=(C==null?void 0:C.height)??0,P=r+(i!=="center"?"-"+i:""),R=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(u)?u:[u],D=T.length>0,z={padding:R,boundary:T.filter(Rve),altBoundary:D},{refs:I,floatingStyles:F,placement:U,isPositioned:H,middlewareData:q}=bve({strategy:"fixed",placement:P,whileElementsMounted:(...ae)=>uve(...ae,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[jve({mainAxis:a+O,alignmentAxis:o}),c&&Nve({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Sve():void 0,...z}),c&&kve({...z}),Cve({...z,apply:({elements:ae,rects:fe,availableWidth:Ee,availableHeight:Re})=>{const{width:qe,height:St}=fe.reference,Ut=ae.floating.style;Ut.setProperty("--radix-popper-available-width",`${Ee}px`),Ut.setProperty("--radix-popper-available-height",`${Re}px`),Ut.setProperty("--radix-popper-anchor-width",`${qe}px`),Ut.setProperty("--radix-popper-anchor-height",`${St}px`)}}),_&&Ave({element:_,padding:l}),Dve({arrowWidth:E,arrowHeight:O}),m&&_ve({strategy:"referenceHidden",...z})]}),[B,L]=YK(U),V=lr(v);cr(()=>{H&&(V==null||V())},[H,V]);const K=(J=q.arrow)==null?void 0:J.x,W=(ne=q.arrow)==null?void 0:ne.y,ie=((Z=q.arrow)==null?void 0:Z.centerOffset)!==0,[ve,ge]=b.useState();return cr(()=>{w&&ge(window.getComputedStyle(w).zIndex)},[w]),s.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:H?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[(oe=q.transformOrigin)==null?void 0:oe.x,(he=q.transformOrigin)==null?void 0:he.y].join(" "),...((Q=q.hide)==null?void 0:Q.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Ive,{scope:n,placedSide:B,onArrowChange:k,arrowX:K,arrowY:W,shouldHideArrow:ie,children:s.jsx(Ve.div,{"data-side":B,"data-align":L,...y,ref:S,style:{...y.style,animation:H?void 0:"none"}})})})});WK.displayName=$O;var GK="PopperArrow",Mve={top:"bottom",right:"left",bottom:"top",left:"right"},KK=b.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=Ove(GK,r),o=Mve[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(Pve,{...a,ref:n,style:{...a.style,display:"block"}})})});KK.displayName=GK;function Rve(e){return e!==null}var Dve=e=>({name:"transformOrigin",options:e,fn(t){var x,w,N;const{placement:n,rects:r,middlewareData:a}=t,o=((x=a.arrow)==null?void 0:x.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=YK(n),f={start:"0%",center:"50%",end:"100%"}[d],m=(((w=a.arrow)==null?void 0:w.x)??0)+l/2,p=(((N=a.arrow)==null?void 0:N.y)??0)+c/2;let v="",y="";return u==="bottom"?(v=o?f:`${m}px`,y=`${-c}px`):u==="top"?(v=o?f:`${m}px`,y=`${r.floating.height+c}px`):u==="right"?(v=`${-c}px`,y=o?f:`${p}px`):u==="left"&&(v=`${r.floating.width+c}px`,y=o?f:`${p}px`),{data:{x:v,y}}}});function YK(e){const[t,n="center"]=e.split("-");return[t,n]}var Zj=HK,jy=VK,Jj=WK,e1=KK,Lve="Portal",Dd=b.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[a,i]=b.useState(!1);cr(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?DG.createPortal(s.jsx(Ve.div,{...r,ref:t}),o):null});Dd.displayName=Lve;function $ve(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var Cr=e=>{const{present:t,children:n}=e,r=Fve(t),a=typeof n=="function"?n({present:r.isPresent}):b.Children.only(n),i=gt(r.ref,zve(a));return typeof n=="function"||r.isPresent?b.cloneElement(a,{ref:i}):null};Cr.displayName="Presence";function Fve(e){const[t,n]=b.useState(),r=b.useRef(null),a=b.useRef(e),i=b.useRef("none"),o=e?"mounted":"unmounted",[l,c]=$ve(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const u=Av(r.current);i.current=l==="mounted"?u:"none"},[l]),cr(()=>{const u=r.current,d=a.current;if(d!==e){const m=i.current,p=Av(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),cr(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=p=>{const y=Av(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&y&&(c("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=p=>{p.target===t&&(i.current=Av(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:b.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Av(e){return(e==null?void 0:e.animationName)||"none"}function zve(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var f2="rovingFocusGroup.onEntryFocus",Bve={bubbles:!1,cancelable:!0},Ny="RovingFocusGroup",[gT,XK,Uve]=zm(Ny),[Hve,t1]=Mr(Ny,[Uve]),[qve,Vve]=Hve(Ny),QK=b.forwardRef((e,t)=>s.jsx(gT.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(gT.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Wve,{...e,ref:t})})}));QK.displayName=Ny;var Wve=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,m=b.useRef(null),p=gt(t,m),v=Md(i),[y,x]=$s({prop:o,defaultProp:l??null,onChange:c,caller:Ny}),[w,N]=b.useState(!1),S=lr(u),_=XK(n),k=b.useRef(!1),[C,E]=b.useState(0);return b.useEffect(()=>{const O=m.current;if(O)return O.addEventListener(f2,S),()=>O.removeEventListener(f2,S)},[S]),s.jsx(qve,{scope:n,orientation:r,dir:v,loop:a,currentTabStopId:y,onItemFocus:b.useCallback(O=>x(O),[x]),onItemShiftTab:b.useCallback(()=>N(!0),[]),onFocusableItemAdd:b.useCallback(()=>E(O=>O+1),[]),onFocusableItemRemove:b.useCallback(()=>E(O=>O-1),[]),children:s.jsx(Ve.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Oe(e.onMouseDown,()=>{k.current=!0}),onFocus:Oe(e.onFocus,O=>{const P=!k.current;if(O.target===O.currentTarget&&P&&!w){const R=new CustomEvent(f2,Bve);if(O.currentTarget.dispatchEvent(R),!R.defaultPrevented){const T=_().filter(U=>U.focusable),D=T.find(U=>U.active),z=T.find(U=>
vendor: 9,001 bytes, lines 87-102
87U.id===y),F=[D,z,...T].filter(Boolean).map(U=>U.ref.current);eY(F,d)}}k.current=!1}),onBlur:Oe(e.onBlur,()=>N(!1))})})}),ZK="RovingFocusGroupItem",JK=b.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:o,...l}=e,c=na(),u=i||c,d=Vve(ZK,n),f=d.currentTabStopId===u,m=XK(n),{onFocusableItemAdd:p,onFocusableItemRemove:v,currentTabStopId:y}=d;return b.useEffect(()=>{if(r)return p(),()=>v()},[r,p,v]),s.jsx(gT.ItemSlot,{scope:n,id:u,focusable:r,active:a,children:s.jsx(Ve.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:Oe(e.onMouseDown,x=>{r?d.onItemFocus(u):x.preventDefault()}),onFocus:Oe(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:Oe(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const w=Yve(x,d.orientation,d.dir);if(w!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let S=m().filter(_=>_.focusable).map(_=>_.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const _=S.indexOf(x.currentTarget);S=d.loop?Xve(S,_+1):S.slice(_+1)}setTimeout(()=>eY(S))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:y!=null}):o})})});JK.displayName=ZK;var Gve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Kve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yve(e,t,n){const r=Kve(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Gve[r]}function eY(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Xve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var tY=QK,nY=JK,Qve=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sf=new WeakMap,Ev=new WeakMap,Pv={},h2=0,rY=function(e){return e&&(e.host||rY(e.parentNode))},Zve=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=rY(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})},Jve=function(e,t,n,r){var a=Zve(t,Array.isArray(e)?e:[e]);Pv[n]||(Pv[n]=new WeakMap);var i=Pv[n],o=[],l=new Set,c=new Set(a),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};a.forEach(u);var d=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(m){if(l.has(m))d(m);else try{var p=m.getAttribute(r),v=p!==null&&p!=="false",y=(Sf.get(m)||0)+1,x=(i.get(m)||0)+1;Sf.set(m,y),i.set(m,x),o.push(m),y===1&&v&&Ev.set(m,!0),x===1&&m.setAttribute(n,"true"),v||m.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",m,w)}})};return d(t),l.clear(),h2++,function(){o.forEach(function(f){var m=Sf.get(f)-1,p=i.get(f)-1;Sf.set(f,m),i.set(f,p),m||(Ev.has(f)||f.removeAttribute(r),Ev.delete(f)),p||f.removeAttribute(n)}),h2--,h2||(Sf=new WeakMap,Sf=new WeakMap,Ev=new WeakMap,Pv={})}},n1=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Qve(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Jve(r,a,n,"aria-hidden")):function(){return null}},wn=function(){return wn=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wn.apply(this,arguments)};function Sy(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function r1(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Gu="right-scroll-bar-position",Ku="width-before-scroll-bar",ebe="with-scroll-bars-hidden",tbe="--removed-body-scroll-bar-size";function m2(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function nbe(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var rbe=typeof window<"u"?b.useLayoutEffect:b.useEffect,j$=new WeakMap;function s1(e,t){var n=nbe(null,function(r){return e.forEach(function(a){return m2(a,r)})});return rbe(function(){var r=j$.get(n);if(r){var a=new Set(r),i=new Set(e),o=n.current;a.forEach(function(l){i.has(l)||m2(l,null)}),i.forEach(function(l){a.has(l)||m2(l,o)})}j$.set(n,e)},[e]),n}function sbe(e){return e}function abe(e,t){t===void 0&&(t=sbe);var n=[],r=!1,a={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(i){var o=t(i,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(r=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var d=o;o=[],d.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return a}function a1(e){e===void 0&&(e={});var t=abe(null);return t.options=wn({async:!0,ssr:!1},e),t}var sY=function(e){var t=e.sideCar,n=Sy(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 b.createElement(r,wn({},n))};sY.isSideCarExport=!0;function i1(e,t){return e.useMedium(t),sY}var aY=a1(),p2=function(){},o1=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:p2,onWheelCapture:p2,onTouchMoveCapture:p2}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,N=w===void 0?"div":w,S=e.gapMode,_=Sy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,C=s1([n,t]),E=wn(wn({},_),a);return b.createElement(b.Fragment,null,d&&b.createElement(k,{sideCar:aY,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:S}),o?b.cloneElement(b.Children.only(l),wn(wn({},E),{ref:C})):b.createElement(N,wn({},E,{className:c,ref:C}),l))});o1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};o1.classNames={fullWidth:Ku,zeroRight:Gu};var ibe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function obe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ibe();return t&&e.setAttribute("nonce",t),e}function lbe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cbe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ube=function(){var e=0,t=null;return{add:function(n){e==0&&(t=obe())&&(lbe(t,n),cbe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},dbe=function(){var e=ube();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ky=function(){var e=dbe(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},fbe={left:0,top:0,right:0,gap:0},g2=function(e){return parseInt(e||"",10)||0},hbe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[g2(n),g2(r),g2(a)]},mbe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fbe;var t=hbe(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])}},pbe=ky(),ih="data-scroll-locked",gbe=function(e,t,n,r){var a=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
88  .`.concat(ebe,` {
89   overflow: hidden `).concat(r,`;
90   padding-right: `).concat(l,"px ").concat(r,`;
91  }
92  body[`).concat(ih,`] {
93    overflow: hidden `).concat(r,`;
94    overscroll-behavior: contain;
95    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
96    padding-left: `.concat(a,`px;
97    padding-top: `).concat(i,`px;
98    padding-right: `).concat(o,`px;
99    margin-left:0;
100    margin-top:0;
101    margin-right: `).concat(l,"px ").concat(r,`;
102    `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
102")].filter(Boolean).join(""),`
103  }
104  
105  .`).concat(Gu,` {
106    right: `).concat(l,"px ").concat(r,`;
107  }
108  
109  .`).concat(Ku,` {
110    margin-right: `).concat(l,"px ").concat(r,`;
111  }
112  
113  .`).concat(Gu," .").concat(Gu,` {
114    right: 0 `).concat(r,`;
115  }
116  
117  .`).concat(Ku," .").concat(Ku,` {
118    margin-right: 0 `).concat(r,`;
119  }
120  
121  body[`).concat(ih,`] {
122    `).concat(tbe,": ").concat(l,`px;
123  }
124`)},N$=function(){var e=parseInt(document.body.getAttribute(ih)||"0",10);return isFinite(e)?e:0},xbe=function(){b.useEffect(function(){return document.body.setAttribute(ih,(N$()+1).toString()),function(){var e=N$()-1;e<=0?document.body.removeAttribute(ih):document.body.setAttribute(ih,e.toString())}},[])},l1=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;xbe();var i=b.useMemo(function(){return mbe(a)},[a]);return b.createElement(pbe,{styles:gbe(i,!t,a,n?"":"!important")})},xT=!1;if(typeof window<"u")try{var Tv=Object.defineProperty({},"passive",{get:function(){return xT=!0,!0}});window.addEventListener("test",Tv,Tv),window.removeEventListener("test",Tv,Tv)}catch{xT=!1}var kf=xT?{passive:!1}:!1,ybe=function(e){return e.tagName==="TEXTAREA"},iY=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ybe(e)&&n[t]==="visible")},vbe=function(e){return iY(e,"overflowY")},bbe=function(e){return iY(e,"overflowX")},S$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=oY(e,r);if(a){var i=lY(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wbe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},jbe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},oY=function(e,t){return e==="v"?vbe(t):bbe(t)},lY=function(e,t){return e==="v"?wbe(t):jbe(t)},Nbe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Sbe=function(e,t,n,r,a){var i=Nbe(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,f=0,m=0;do{if(!l)break;var p=lY(e,l),v=p[0],y=p[1],x=p[2],w=y-x-i*v;(v||w)&&oY(e,l)&&(f+=w,m+=v);var N=l.parentNode;l=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Iv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},k$=function(e){return[e.deltaX,e.deltaY]},C$=function(e){return e&&"current"in e?e.current:e},kbe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cbe=function(e){return`
125  .block-interactivity-`.concat(e,` {pointer-events: none;}
126  .allow-interactivity-`).concat(e,` {pointer-events: all;}
127`)},_be=0,Cf=[];function Abe(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(_be++)[0],i=b.useState(ky)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var y=r1([e.lockRef.current],(e.shards||[]).map(C$),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=b.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=Iv(y),N=n.current,S="deltaX"in y?y.deltaX:N[0]-w[0],_="deltaY"in y?y.deltaY:N[1]-w[1],k,C=y.target,E=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in y&&E==="h"&&C.type==="range")return!1;var O=S$(E,C);if(!O)return!0;if(O?k=E:(k=E==="v"?"h":"v",O=S$(E,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(S||_)&&(r.current=k),!k)return!0;var P=r.current||k;return Sbe(P,x,y,P==="h"?S:_)},[]),c=b.useCallback(function(y){var x=y;if(!(!Cf.length||Cf[Cf.length-1]!==i)){var w="deltaY"in x?k$(x):Iv(x),N=t.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&kbe(k.delta,w)})[0];if(N&&N.should){x.cancelable&&x.preventDefault();return}
vendor: 13,873 bytes, line 127
127if(!N){var S=(o.current.shards||[]).map(C$).filter(Boolean).filter(function(k){return k.contains(x.target)}),_=S.length>0?l(x,S[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(y,x,w,N){var S={name:y,delta:x,target:w,should:N,shadowParent:Ebe(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=b.useCallback(function(y){n.current=Iv(y),r.current=void 0},[]),f=b.useCallback(function(y){u(y.type,k$(y),y.target,l(y,e.lockRef.current))},[]),m=b.useCallback(function(y){u(y.type,Iv(y),y.target,l(y,e.lockRef.current))},[]);b.useEffect(function(){return Cf.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,kf),document.addEventListener("touchmove",c,kf),document.addEventListener("touchstart",d,kf),function(){Cf=Cf.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,kf),document.removeEventListener("touchmove",c,kf),document.removeEventListener("touchstart",d,kf)}},[]);var p=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:Cbe(a)}):null,p?b.createElement(l1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ebe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pbe=i1(aY,Abe);var cY=b.forwardRef(function(e,t){return b.createElement(o1,wn({},e,{ref:t,sideCar:Pbe}))});cY.classNames=o1.classNames;var yT=["Enter"," "],Tbe=["ArrowDown","PageUp","Home"],uY=["ArrowUp","PageDown","End"],Ibe=[...Tbe,...uY],Obe={ltr:[...yT,"ArrowRight"],rtl:[...yT,"ArrowLeft"]},Mbe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Cy="Menu",[Yg,Rbe,Dbe]=zm(Cy),[Ld,dY]=Mr(Cy,[Dbe,Bc,t1]),c1=Bc(),fY=t1(),[Lbe,$d]=Ld(Cy),[$be,_y]=Ld(Cy),hY=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:o=!0}=e,l=c1(t),[c,u]=b.useState(null),d=b.useRef(!1),f=lr(i),m=Md(a);return b.useEffect(()=>{const p=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),s.jsx(Zj,{...l,children:s.jsx(Lbe,{scope:t,open:n,onOpenChange:f,content:c,onContentChange:u,children:s.jsx($be,{scope:t,onClose:b.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:m,modal:o,children:r})})})};hY.displayName=Cy;var Fbe="MenuAnchor",FO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=c1(n);return s.jsx(jy,{...a,...r,ref:t})});FO.displayName=Fbe;var zO="MenuPortal",[zbe,mY]=Ld(zO,{forceMount:void 0}),pY=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=$d(zO,t);return s.jsx(zbe,{scope:t,forceMount:n,children:s.jsx(Cr,{present:n||i.open,children:s.jsx(Dd,{asChild:!0,container:a,children:r})})})};pY.displayName=zO;var ei="MenuContent",[Bbe,BO]=Ld(ei),gY=b.forwardRef((e,t)=>{const n=mY(ei,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=$d(ei,e.__scopeMenu),o=_y(ei,e.__scopeMenu);return s.jsx(Yg.Provider,{scope:e.__scopeMenu,children:s.jsx(Cr,{present:r||i.open,children:s.jsx(Yg.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(Ube,{...a,ref:t}):s.jsx(Hbe,{...a,ref:t})})})})}),Ube=b.forwardRef((e,t)=>{const n=$d(ei,e.__scopeMenu),r=b.useRef(null),a=gt(t,r);return b.useEffect(()=>{const i=r.current;if(i)return n1(i)},[]),s.jsx(UO,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Hbe=b.forwardRef((e,t)=>{const n=$d(ei,e.__scopeMenu);return s.jsx(UO,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),qbe=Tc("MenuContent.ScrollLock"),UO=b.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:p,disableOutsideScroll:v,...y}=e,x=$d(ei,n),w=_y(ei,n),N=c1(n),S=fY(n),_=Rbe(n),[k,C]=b.useState(null),E=b.useRef(null),O=gt(t,E,x.onContentChange),P=b.useRef(0),R=b.useRef(""),T=b.useRef(0),D=b.useRef(null),z=b.useRef("right"),I=b.useRef(0),F=v?cY:b.Fragment,U=v?{as:qbe,allowPinchZoom:!0}:void 0,H=B=>{var J,ne;const L=R.current+B,V=_().filter(Z=>!Z.disabled),K=document.activeElement,W=(J=V.find(Z=>Z.ref.current===K))==null?void 0:J.textValue,ie=V.map(Z=>Z.textValue),ve=nwe(ie,L,W),ge=(ne=V.find(Z=>Z.textValue===ve))==null?void 0:ne.ref.current;(function Z(oe){R.current=oe,window.clearTimeout(P.current),oe!==""&&(P.current=window.setTimeout(()=>Z(""),1e3))})(L),ge&&setTimeout(()=>ge.focus())};b.useEffect(()=>()=>window.clearTimeout(P.current),[]),Wj();const q=b.useCallback(B=>{var V,K;return z.current===((V=D.current)==null?void 0:V.side)&&swe(B,(K=D.current)==null?void 0:K.area)},[]);return s.jsx(Bbe,{scope:n,searchRef:R,onItemEnter:b.useCallback(B=>{q(B)&&B.preventDefault()},[q]),onItemLeave:b.useCallback(B=>{var L;q(B)||((L=E.current)==null||L.focus(),C(null))},[q]),onTriggerLeave:b.useCallback(B=>{q(B)&&B.preventDefault()},[q]),pointerGraceTimerRef:T,onPointerGraceIntentChange:b.useCallback(B=>{D.current=B},[]),children:s.jsx(F,{...U,children:s.jsx(by,{asChild:!0,trapped:a,onMountAutoFocus:Oe(i,B=>{var L;B.preventDefault(),(L=E.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(Rd,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:m,onDismiss:p,children:s.jsx(tY,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:C,onEntryFocus:Oe(c,B=>{w.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Jj,{role:"menu","aria-orientation":"vertical","data-state":IY(x.open),"data-radix-menu-content":"",dir:w.dir,...N,...y,ref:O,style:{outline:"none",...y.style},onKeyDown:Oe(y.onKeyDown,B=>{const V=B.target.closest("[data-radix-menu-content]")===B.currentTarget,K=B.ctrlKey||B.altKey||B.metaKey,W=B.key.length===1;V&&(B.key==="Tab"&&B.preventDefault(),!K&&W&&H(B.key));const ie=E.current;if(B.target!==ie||!Ibe.includes(B.key))return;B.preventDefault();const ge=_().filter(J=>!J.disabled).map(J=>J.ref.current);uY.includes(B.key)&&ge.reverse(),ewe(ge)}),onBlur:Oe(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(P.current),R.current="")}),onPointerMove:Oe(e.onPointerMove,Xg(B=>{const L=B.target,V=I.current!==B.clientX;if(B.currentTarget.contains(L)&&V){const K=B.clientX>I.current?"right":"left";z.current=K,I.current=B.clientX}}))})})})})})})});gY.displayName=ei;var Vbe="MenuGroup",HO=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ve.div,{role:"group",...r,ref:t})});HO.displayName=Vbe;var Wbe="MenuLabel",xY=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ve.div,{...r,ref:t})});xY.displayName=Wbe;var nw="MenuItem",_$="menu.itemSelect",u1=b.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=b.useRef(null),o=_y(nw,e.__scopeMenu),l=BO(nw,e.__scopeMenu),c=gt(t,i),u=b.useRef(!1),d=()=>{const f=i.current;if(!n&&f){const m=new CustomEvent(_$,{bubbles:!0,cancelable:!0});f.addEventListener(_$,p=>r==null?void 0:r(p),{once:!0}),PO(f,m),m.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(yY,{...a,ref:c,disabled:n,onClick:Oe(e.onClick,d),onPointerDown:f=>{var m;(m=e.onPointerDown)==null||m.call(e,f),u.current=!0},onPointerUp:Oe(e.onPointerUp,f=>{var m;u.current||(m=f.currentTarget)==null||m.click()}),onKeyDown:Oe(e.onKeyDown,f=>{const m=l.searchRef.current!=="";n||m&&f.key===" "||yT.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});u1.displayName=nw;var yY=b.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,o=BO(nw,n),l=fY(n),c=b.useRef(null),u=gt(t,c),[d,f]=b.useState(!1),[m,p]=b.useState("");return b.useEffect(()=>{const v=c.current;v&&p((v.textContent??"").trim())},[i.children]),s.jsx(Yg.ItemSlot,{scope:n,disabled:r,textValue:a??m,children:s.jsx(nY,{asChild:!0,...l,focusable:!r,children:s.jsx(Ve.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:Oe(e.onPointerMove,Xg(v=>{r?o.onItemLeave(v):(o.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Oe(e.onPointerLeave,Xg(v=>o.onItemLeave(v))),onFocus:Oe(e.onFocus,()=>f(!0)),onBlur:Oe(e.onBlur,()=>f(!1))})})})}),Gbe="MenuCheckboxItem",vY=b.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return s.jsx(SY,{scope:e.__scopeMenu,checked:n,children:s.jsx(u1,{role:"menuitemcheckbox","aria-checked":rw(n)?"mixed":n,...a,ref:t,"data-state":VO(n),onSelect:Oe(a.onSelect,()=>r==null?void 0:r(rw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});vY.displayName=Gbe;var bY="MenuRadioGroup",[Kbe,Ybe]=Ld(bY,{value:void 0,onValueChange:()=>{}}),wY=b.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=lr(r);return s.jsx(Kbe,{scope:e.__scopeMenu,value:n,onValueChange:i,children:s.jsx(HO,{...a,ref:t})})});wY.displayName=bY;var jY="MenuRadioItem",NY=b.forwardRef((e,t)=>{const{value:n,...r}=e,a=Ybe(jY,e.__scopeMenu),i=n===a.value;return s.jsx(SY,{scope:e.__scopeMenu,checked:i,children:s.jsx(u1,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":VO(i),onSelect:Oe(r.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,n)},{checkForDefaultPrevented:!1})})})});NY.displayName=jY;var qO="MenuItemIndicator",[SY,Xbe]=Ld(qO,{checked:!1}),kY=b.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=Xbe(qO,n);return s.jsx(Cr,{present:r||rw(i.checked)||i.checked===!0,children:s.jsx(Ve.span,{...a,ref:t,"data-state":VO(i.checked)})})});kY.displayName=qO;var Qbe="MenuSeparator",CY=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(Ve.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});CY.displayName=Qbe;var Zbe="MenuArrow",_Y=b.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=c1(n);return s.jsx(e1,{...a,...r,ref:t})});_Y.displayName=Zbe;var Jbe="MenuSub",[Frt,AY]=Ld(Jbe),og="MenuSubTrigger",EY=b.forwardRef((e,t)=>{const n=$d(og,e.__scopeMenu),r=_y(og,e.__scopeMenu),a=AY(og,e.__scopeMenu),i=BO(og,e.__scopeMenu),o=b.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=i,u={__scopeMenu:e.__scopeMenu},d=b.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return b.useEffect(()=>d,[d]),b.useEffect(()=>{const f=l.current;return()=>{window.clearTimeout(f),c(null)}},[l,c]),s.jsx(FO,{asChild:!0,...u,children:s.jsx(yY,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":IY(n.open),...e,ref:Vj(t,a.onTriggerChange),onClick:f=>{var m;(m=e.onClick)==null||m.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Oe(e.onPointerMove,Xg(f=>{i.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:Oe(e.onPointerLeave,Xg(f=>{var p,v;d();const m=(p=n.content)==null?void 0:p.getBoundingClientRect();if(m){const y=(v=n.content)==null?void 0:v.dataset.side,x=y==="right",w=x?-5:5,N=m[x?"left":"right"],S=m[x?"right":"left"];i.onPointerGraceIntentChange({area:[{x:f.clientX+w,y:f.clientY},{x:N,y:m.top},{x:S,y:m.top},{x:S,y:m.bottom},{x:N,y:m.bottom}],side:y}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(f),f.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Oe(e.onKeyDown,f=>{var p;const m=i.searchRef.current!=="";e.disabled||m&&f.key===" "||Obe[r.dir].includes(f.key)&&(n.onOpenChange(!0),(p=n.content)==null||p.focus(),f.preventDefault())})})})});EY.displayName=og;var PY="MenuSubContent",TY=b.forwardRef((e,t)=>{const n=mY(ei,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=$d(ei,e.__scopeMenu),o=_y(ei,e.__scopeMenu),l=AY(PY,e.__scopeMenu),c=b.useRef(null),u=gt(t,c);return s.jsx(Yg.Provider,{scope:e.__scopeMenu,children:s.jsx(Cr,{present:r||i.open,children:s.jsx(Yg.Slot,{scope:e.__scopeMenu,children:s.jsx(UO,{id:l.contentId,"aria-labelledby":l.triggerId,...a,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;o.isUsingKeyboardRef.current&&((f=c.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:Oe(e.onFocusOutside,d=>{d.target!==l.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Oe(e.onEscapeKeyDown,d=>{o.onClose(),d.preventDefault()}),onKeyDown:Oe(e.onKeyDown,d=>{var p;const f=d.currentTarget.contains(d.target),m=Mbe[o.dir].includes(d.key);f&&m&&(i.onOpenChange(!1),(p=l.trigger)==null||p.focus(),d.preventDefault())})})})})})});TY.displayName=PY;function IY(e){return e?"open":"closed"}function rw(e){return e==="indeterminate"}function VO(e){return rw(e)?"indeterminate":e?"checked":"unchecked"}function ewe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function twe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function nwe(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=twe(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function rwe(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;
vendor: 4,111 bytes, line 127
127o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,f=c.x,m=c.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(a=!a)}return a}function swe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return rwe(n,t)}function Xg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var awe=hY,iwe=FO,owe=pY,lwe=gY,cwe=HO,uwe=xY,dwe=u1,fwe=vY,hwe=wY,mwe=NY,pwe=kY,gwe=CY,xwe=_Y,ywe=EY,vwe=TY,d1="DropdownMenu",[bwe]=Mr(d1,[dY]),Fs=dY(),[wwe,OY]=bwe(d1),MY=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=Fs(t),u=b.useRef(null),[d,f]=$s({prop:a,defaultProp:i??!1,onChange:o,caller:d1});return s.jsx(wwe,{scope:t,triggerId:na(),triggerRef:u,contentId:na(),open:d,onOpenChange:f,onOpenToggle:b.useCallback(()=>f(m=>!m),[f]),modal:l,children:s.jsx(awe,{...c,open:d,onOpenChange:f,dir:r,modal:l,children:n})})};MY.displayName=d1;var RY="DropdownMenuTrigger",DY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=OY(RY,n),o=Fs(n);return s.jsx(iwe,{asChild:!0,...o,children:s.jsx(Ve.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Vj(t,i.triggerRef),onPointerDown:Oe(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(i.onOpenToggle(),i.open||l.preventDefault())}),onKeyDown:Oe(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&i.onOpenToggle(),l.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});DY.displayName=RY;var jwe="DropdownMenuPortal",LY=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Fs(t);return s.jsx(owe,{...r,...n})};LY.displayName=jwe;var $Y="DropdownMenuContent",FY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=OY($Y,n),i=Fs(n),o=b.useRef(!1);return s.jsx(lwe,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:Oe(e.onCloseAutoFocus,l=>{var c;o.current||(c=a.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Oe(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!a.modal||d)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});FY.displayName=$Y;var Nwe="DropdownMenuGroup",Swe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(cwe,{...a,...r,ref:t})});Swe.displayName=Nwe;var kwe="DropdownMenuLabel",zY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(uwe,{...a,...r,ref:t})});zY.displayName=kwe;var Cwe="DropdownMenuItem",BY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(dwe,{...a,...r,ref:t})});BY.displayName=Cwe;var _we="DropdownMenuCheckboxItem",UY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(fwe,{...a,...r,ref:t})});UY.displayName=_we;var Awe="DropdownMenuRadioGroup",Ewe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(hwe,{...a,...r,ref:t})});Ewe.displayName=Awe;var Pwe="DropdownMenuRadioItem",HY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(mwe,{...a,...r,ref:t})});HY.displayName=Pwe;var Twe="DropdownMenuItemIndicator",qY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(pwe,{...a,...r,ref:t})});qY.displayName=Twe;var Iwe="DropdownMenuSeparator",VY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(gwe,{...a,...r,ref:t})});VY.displayName=Iwe;var Owe="DropdownMenuArrow",Mwe=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(xwe,{...a,...r,ref:t})});Mwe.displayName=Owe;var Rwe="DropdownMenuSubTrigger",WY=b.forwardRef((e,t)=>
vendor: 6,862 bytes, lines 127-207
127{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(ywe,{...a,...r,ref:t})});WY.displayName=Rwe;var Dwe="DropdownMenuSubContent",GY=b.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Fs(n);return s.jsx(vwe,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});GY.displayName=Dwe;var Lwe=MY,$we=DY,Fwe=LY,KY=FY,YY=zY,XY=BY,QY=UY,ZY=HY,JY=qY,eX=VY,tX=WY,nX=GY;/**
128 * @license lucide-react v0.462.0 - ISC
129 *
130 * This source code is licensed under the ISC license.
131 * See the LICENSE file in the root directory of this source tree.
132 */const zwe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rX=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
133 * @license lucide-react v0.462.0 - ISC
134 *
135 * This source code is licensed under the ISC license.
136 * See the LICENSE file in the root directory of this source tree.
137 */var Bwe={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"};/**
138 * @license lucide-react v0.462.0 - ISC
139 *
140 * This source code is licensed under the ISC license.
141 * See the LICENSE file in the root directory of this source tree.
142 */const Uwe=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:o,...l},c)=>b.createElement("svg",{ref:c,...Bwe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:rX("lucide",a),...l},[...o.map(([u,d])=>b.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
143 * @license lucide-react v0.462.0 - ISC
144 *
145 * This source code is licensed under the ISC license.
146 * See the LICENSE file in the root directory of this source tree.
147 */const Se=(e,t)=>{const n=b.forwardRef(({className:r,...a},i)=>b.createElement(Uwe,{ref:i,iconNode:t,className:rX(`lucide-${zwe(e)}`,r),...a}));return n.displayName=`${e}`,n};/**
148 * @license lucide-react v0.462.0 - ISC
149 *
150 * This source code is licensed under the ISC license.
151 * See the LICENSE file in the root directory of this source tree.
152 */const Yu=Se("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
153 * @license lucide-react v0.462.0 - ISC
154 *
155 * This source code is licensed under the ISC license.
156 * See the LICENSE file in the root directory of this source tree.
157 */const sX=Se("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
158 * @license lucide-react v0.462.0 - ISC
159 *
160 * This source code is licensed under the ISC license.
161 * See the LICENSE file in the root directory of this source tree.
162 */const ai=Se("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
163 * @license lucide-react v0.462.0 - ISC
164 *
165 * This source code is licensed under the ISC license.
166 * See the LICENSE file in the root directory of this source tree.
167 */const Bt=Se("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
168 * @license lucide-react v0.462.0 - ISC
169 *
170 * This source code is licensed under the ISC license.
171 * See the LICENSE file in the root directory of this source tree.
172 */const aX=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
173 * @license lucide-react v0.462.0 - ISC
174 *
175 * This source code is licensed under the ISC license.
176 * See the LICENSE file in the root directory of this source tree.
177 */const sw=Se("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"}]]);/**
178 * @license lucide-react v0.462.0 - ISC
179 *
180 * This source code is licensed under the ISC license.
181 * See the LICENSE file in the root directory of this source tree.
182 */const Dh=Se("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"}]]);/**
183 * @license lucide-react v0.462.0 - ISC
184 *
185 * This source code is licensed under the ISC license.
186 * See the LICENSE file in the root directory of this source tree.
187 */const Hwe=Se("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
188 * @license lucide-react v0.462.0 - ISC
189 *
190 * This source code is licensed under the ISC license.
191 * See the LICENSE file in the root directory of this source tree.
192 */const so=Se("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"}]]);/**
193 * @license lucide-react v0.462.0 - ISC
194 *
195 * This source code is licensed under the ISC license.
196 * See the LICENSE file in the root directory of this source tree.
197 */const Sn=Se("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"}]]);/**
198 * @license lucide-react v0.462.0 - ISC
199 *
200 * This source code is licensed under the ISC license.
201 * See the LICENSE file in the root directory of this source tree.
202 */const iX=Se("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
203 * @license lucide-react v0.462.0 - ISC
204 *
205 * This source code is licensed under the ISC license.
206 * See the LICENSE file in the root directory of this source tree.
207 */const oX=Se("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"}
207],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
208 * @license lucide-react v0.462.0 - ISC
209 *
210 * This source code is licensed under the ISC license.
211 * See the LICENSE file in the root directory of this source tree.
212 */const dl=Se("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
213 * @license lucide-react v0.462.0 - ISC
214 *
215 * This source code is licensed under the ISC license.
216 * See the LICENSE file in the root directory of this source tree.
217 */const qwe=Se("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/**
218 * @license lucide-react v0.462.0 - ISC
219 *
220 * This source code is licensed under the ISC license.
221 * See the LICENSE file in the root directory of this source tree.
222 */const Qg=Se("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
223 * @license lucide-react v0.462.0 - ISC
224 *
225 * This source code is licensed under the ISC license.
226 * See the LICENSE file in the root directory of this source tree.
227 */const Vwe=Se("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
228 * @license lucide-react v0.462.0 - ISC
229 *
230 * This source code is licensed under the ISC license.
231 * See the LICENSE file in the root directory of this source tree.
232 */const lX=Se("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"}]]);/**
233 * @license lucide-react v0.462.0 - ISC
234 *
235 * This source code is licensed under the ISC license.
236 * See the LICENSE file in the root directory of this source tree.
237 */const el=Se("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"}]]);/**
238 * @license lucide-react v0.462.0 - ISC
239 *
240 * This source code is licensed under the ISC license.
241 * See the LICENSE file in the root directory of this source tree.
242 */const Wwe=Se("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",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]);/**
243 * @license lucide-react v0.462.0 - ISC
244 *
245 * This source code is licensed under the ISC license.
246 * See the LICENSE file in the root directory of this source tree.
247 */const mo=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
248 * @license lucide-react v0.462.0 - ISC
249 *
250 * This source code is licensed under the ISC license.
251 * See the LICENSE file in the root directory of this source tree.
252 */const po=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
253 * @license lucide-react v0.462.0 - ISC
254 *
255 * This source code is licensed under the ISC license.
256 * See the LICENSE file in the root directory of this source tree.
257 */const f1=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
258 * @license lucide-react v0.462.0 - ISC
259 *
260 * This source code is licensed under the ISC license.
261 * See the LICENSE file in the root directory of this source tree.
262 */const ao=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
263 * @license lucide-react v0.462.0 - ISC
264 *
265 * This source code is licensed under the ISC license.
266 * See the LICENSE file in the root directory of this source tree.
267 */const cX=Se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
268 * @license lucide-react v0.462.0 - ISC
269 *
270 * This source code is licensed under the ISC license.
271 * See the LICENSE file in the root directory of this source tree.
272 */const Xa=Se("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"}]]);/**
273 * @license lucide-react v0.462.0 - ISC
274 *
275 * This source code is licensed under the ISC license.
276 * See the LICENSE file in the root directory of this source tree.
277 */const Pe=Se("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
278 * @license lucide-react v0.462.0 - ISC
279 *
280 * This source code is licensed under the ISC license.
281 * See the LICENSE file in the root directory of this source tree.
282 */const Sc=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
283 * @license lucide-react v0.462.0 - ISC
284 *
285 * This source code is licensed under the ISC license.
286 * See the LICENSE file in the root directory of this source tree.
287 */const Gwe=Se("CircleDot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);/**
288 * @license lucide-react v0.462.0 - ISC
289 *
290 * This source code is licensed under the ISC license.
291 * See the LICENSE file in the root directory of this source tree.
292 */const Ko=Se("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
293 * @license lucide-react v0.462.0 - ISC
294 *
295 * This source code is licensed under the ISC license.
296 * See the LICENSE file in the root directory of this source tree.
297 */const aw=Se("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
298 * @license lucide-react v0.462.0 - ISC
299 *
300 * This source code is licensed under the ISC license.
301 * See the LICENSE file in the root directory of this source tree.
302 */const Ay=Se("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"}]]);/**
303 * @license lucide-react v0.462.0 - ISC
304 *
305 * This source code is licensed under the ISC license.
306 * See the LICENSE file in the root directory of this source tree.
307 */const Kwe=Se("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
308 * @license lucide-react v0.462.0 - ISC
309 *
310 * This source code is licensed under the ISC license.
311 * See the LICENSE file in the root directory of this source tree.
312 */const Ywe=Se("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"}]]);/**
313 * @license lucide-react v0.462.0 - ISC
314 *
315 * This source code is licensed under the ISC license.
316 * See the LICENSE file in the root directory of this source tree.
317 */const zn=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
318 * @license lucide-react v0.462.0 - ISC
319 *
320 * This source code is licensed under the ISC license.
321 * See the LICENSE file in the root directory of this source tree.
322 */const Xwe=Se("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
323 * @license lucide-react v0.462.0 - ISC
324 *
325 * This source code is licensed under the ISC license.
326 * See the LICENSE file in the root directory of this source tree.
327 */const Ey=Se("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
328 * @license lucide-react v0.462.0 - ISC
329 *
330 * This source code is licensed under the ISC license.
331 * See the LICENSE file in the root directory of this source tree.
332 */const Zg=Se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
333 * @license lucide-react v0.462.0 - ISC
334 *
335 * This source code is licensed under the ISC license.
336 * See the LICENSE file in the root directory of this source tree.
337 */const uX=Se("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
338 * @license lucide-react v0.462.0 - ISC
339 *
340 * This source code is licensed under the ISC license.
341 * See the LICENSE file in the root directory of this source tree.
342 */const Qwe=Se("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
343 * @license lucide-react v0.462.0 - ISC
344 *
345 * This source code is licensed under the ISC license.
346 * See the LICENSE file in the root directory of this source tree.
347 */const Zwe=Se("Container",[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]]);/**
348 * @license lucide-react v0.462.0 - ISC
349 *
350 * This source code is licensed under the ISC license.
351 * See the LICENSE file in the root directory of this source tree.
352 */const Jwe=Se("Cookie",[["path",{d:"M12 2a10 10 0 1 0 10 10 4 4 0 0 1-5-5 4 4 0 0 1-5-5",key:"laymnq"}],["path",{d:"M8.5 8.5v.01",key:"ue8clq"}],["path",{d:"M16 15.5v.01",key:"14dtrp"}],["path",{d:"M12 12v.01",key:"u5ubse"}],["path",{d:"M11 17v.01",key:"1hyl5a"}],["path",{d:"M7 14v.01",key:"uct60s"}]]);/**
353 * @license lucide-react v0.462.0 - ISC
354 *
355 * This source code is licensed under the ISC license.
356 * See the LICENSE file in the root directory of this source tree.
357 */const Xu=Se("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"}]]);/**
358 * @license lucide-react v0.462.0 - ISC
359 *
360 * This source code is licensed under the ISC license.
361 * See the LICENSE file in the root directory of this source tree.
362 */const iw=Se("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"}
362],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
363 * @license lucide-react v0.462.0 - ISC
364 *
365 * This source code is licensed under the ISC license.
366 * See the LICENSE file in the root directory of this source tree.
367 */const ii=Se("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
368 * @license lucide-react v0.462.0 - ISC
369 *
370 * This source code is licensed under the ISC license.
371 * See the LICENSE file in the root directory of this source tree.
372 */const Gr=Se("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"}]]);/**
373 * @license lucide-react v0.462.0 - ISC
374 *
375 * This source code is licensed under the ISC license.
376 * See the LICENSE file in the root directory of this source tree.
377 */const Rs=Se("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
378 * @license lucide-react v0.462.0 - ISC
379 *
380 * This source code is licensed under the ISC license.
381 * See the LICENSE file in the root directory of this source tree.
382 */const h1=Se("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
383 * @license lucide-react v0.462.0 - ISC
384 *
385 * This source code is licensed under the ISC license.
386 * See the LICENSE file in the root directory of this source tree.
387 */const WO=Se("Droplets",[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]);/**
388 * @license lucide-react v0.462.0 - ISC
389 *
390 * This source code is licensed under the ISC license.
391 * See the LICENSE file in the root directory of this source tree.
392 */const eje=Se("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/**
393 * @license lucide-react v0.462.0 - ISC
394 *
395 * This source code is licensed under the ISC license.
396 * See the LICENSE file in the root directory of this source tree.
397 */const dX=Se("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
398 * @license lucide-react v0.462.0 - ISC
399 *
400 * This source code is licensed under the ISC license.
401 * See the LICENSE file in the root directory of this source tree.
402 */const Zs=Se("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"}]]);/**
403 * @license lucide-react v0.462.0 - ISC
404 *
405 * This source code is licensed under the ISC license.
406 * See the LICENSE file in the root directory of this source tree.
407 */const Lh=Se("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
408 * @license lucide-react v0.462.0 - ISC
409 *
410 * This source code is licensed under the ISC license.
411 * See the LICENSE file in the root directory of this source tree.
412 */const pr=Se("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"}]]);/**
413 * @license lucide-react v0.462.0 - ISC
414 *
415 * This source code is licensed under the ISC license.
416 * See the LICENSE file in the root directory of this source tree.
417 */const GO=Se("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"}]]);/**
418 * @license lucide-react v0.462.0 - ISC
419 *
420 * This source code is licensed under the ISC license.
421 * See the LICENSE file in the root directory of this source tree.
422 */const tje=Se("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"}]]);/**
423 * @license lucide-react v0.462.0 - ISC
424 *
425 * This source code is licensed under the ISC license.
426 * See the LICENSE file in the root directory of this source tree.
427 */const rn=Se("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"}]]);/**
428 * @license lucide-react v0.462.0 - ISC
429 *
430 * This source code is licensed under the ISC license.
431 * See the LICENSE file in the root directory of this source tree.
432 */const m1=Se("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
433 * @license lucide-react v0.462.0 - ISC
434 *
435 * This source code is licensed under the ISC license.
436 * See the LICENSE file in the root directory of this source tree.
437 */const fX=Se("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]);/**
438 * @license lucide-react v0.462.0 - ISC
439 *
440 * This source code is licensed under the ISC license.
441 * See the LICENSE file in the root directory of this source tree.
442 */const A$=Se("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
443 * @license lucide-react v0.462.0 - ISC
444 *
445 * This source code is licensed under the ISC license.
446 * See the LICENSE file in the root directory of this source tree.
447 */const ow=Se("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
448 * @license lucide-react v0.462.0 - ISC
449 *
450 * This source code is licensed under the ISC license.
451 * See the LICENSE file in the root directory of this source tree.
452 */const bs=Se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
453 * @license lucide-react v0.462.0 - ISC
454 *
455 * This source code is licensed under the ISC license.
456 * See the LICENSE file in the root directory of this source tree.
457 */const $h=Se("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/**
458 * @license lucide-react v0.462.0 - ISC
459 *
460 * This source code is licensed under the ISC license.
461 * See the LICENSE file in the root directory of this source tree.
462 */const nje=Se("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}
462]]);/**
463 * @license lucide-react v0.462.0 - ISC
464 *
465 * This source code is licensed under the ISC license.
466 * See the LICENSE file in the root directory of this source tree.
467 */const rje=Se("HardHat",[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]]);/**
468 * @license lucide-react v0.462.0 - ISC
469 *
470 * This source code is licensed under the ISC license.
471 * See the LICENSE file in the root directory of this source tree.
472 */const sje=Se("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/**
473 * @license lucide-react v0.462.0 - ISC
474 *
475 * This source code is licensed under the ISC license.
476 * See the LICENSE file in the root directory of this source tree.
477 */const Jg=Se("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
478 * @license lucide-react v0.462.0 - ISC
479 *
480 * This source code is licensed under the ISC license.
481 * See the LICENSE file in the root directory of this source tree.
482 */const aje=Se("Hotel",[["path",{d:"M10 22v-6.57",key:"1wmca3"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M12 7h.01",key:"1ivr5q"}],["path",{d:"M14 15.43V22",key:"1q2vjd"}],["path",{d:"M15 16a5 5 0 0 0-6 0",key:"o9wqvi"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M16 7h.01",key:"1kdx03"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 7h.01",key:"1vti4s"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]]);/**
483 * @license lucide-react v0.462.0 - ISC
484 *
485 * This source code is licensed under the ISC license.
486 * See the LICENSE file in the root directory of this source tree.
487 */const KO=Se("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/**
488 * @license lucide-react v0.462.0 - ISC
489 *
490 * This source code is licensed under the ISC license.
491 * See the LICENSE file in the root directory of this source tree.
492 */const hX=Se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
493 * @license lucide-react v0.462.0 - ISC
494 *
495 * This source code is licensed under the ISC license.
496 * See the LICENSE file in the root directory of this source tree.
497 */const Qs=Se("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
498 * @license lucide-react v0.462.0 - ISC
499 *
500 * This source code is licensed under the ISC license.
501 * See the LICENSE file in the root directory of this source tree.
502 */const ije=Se("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
503 * @license lucide-react v0.462.0 - ISC
504 *
505 * This source code is licensed under the ISC license.
506 * See the LICENSE file in the root directory of this source tree.
507 */const YO=Se("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"}]]);/**
508 * @license lucide-react v0.462.0 - ISC
509 *
510 * This source code is licensed under the ISC license.
511 * See the LICENSE file in the root directory of this source tree.
512 */const mX=Se("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"}]]);/**
513 * @license lucide-react v0.462.0 - ISC
514 *
515 * This source code is licensed under the ISC license.
516 * See the LICENSE file in the root directory of this source tree.
517 */const pX=Se("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
518 * @license lucide-react v0.462.0 - ISC
519 *
520 * This source code is licensed under the ISC license.
521 * See the LICENSE file in the root directory of this source tree.
522 */const Qu=Se("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
523 * @license lucide-react v0.462.0 - ISC
524 *
525 * This source code is licensed under the ISC license.
526 * See the LICENSE file in the root directory of this source tree.
527 */const kr=Se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
528 * @license lucide-react v0.462.0 - ISC
529 *
530 * This source code is licensed under the ISC license.
531 * See the LICENSE file in the root directory of this source tree.
532 */const ur=Se("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"}]]);/**
533 * @license lucide-react v0.462.0 - ISC
534 *
535 * This source code is licensed under the ISC license.
536 * See the LICENSE file in the root directory of this source tree.
537 */const XO=Se("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"}]]);/**
538 * @license lucide-react v0.462.0 - ISC
539 *
540 * This source code is licensed under the ISC license.
541 * See the LICENSE file in the root directory of this source tree.
542 */const Aa=Se("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
543 * @license lucide-react v0.462.0 - ISC
544 *
545 * This source code is licensed under the ISC license.
546 * See the LICENSE file in the root directory of this source tree.
547 */const oje=Se("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
548 * @license lucide-react v0.462.0 - ISC
549 *
550 * This source code is licensed under the ISC license.
551 * See the LICENSE file in the root directory of this source tree.
552 */const lje=Se("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
553 * @license lucide-react v0.462.0 - ISC
554 *
555 * This source code is licensed under the ISC license.
556 * See the LICENSE file in the root directory of this source tree.
557 */const cje=Se("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/**
558 * @license lucide-react v0.462.0 - ISC
559 *
560 * This source code is licensed under the ISC license.
561 * See the LICENSE file in the root directory of this source tree.
562 */const E$=Se("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"}]]);/**
563 * @license lucide-react v0.462.0 - ISC
564 *
565 * This source code is licensed under the ISC license.
566 * See the LICENSE file in the root directory of this source tree.
567 */const gX=Se("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
568 * @license lucide-react v0.462.0 - ISC
569 *
570 * This source code is licensed under the ISC license.
571 * See the LICENSE file in the root directory of this source tree.
572 */const di=Se("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
573 * @license lucide-react v0.462.0 - ISC
574 *
575 * This source code is licensed under the ISC license.
576 * See the LICENSE file in the root directory of this source tree.
577 */const uje=Se("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
578 * @license lucide-react v0.462.0 - ISC
579 *
580 * This source code is licensed under the ISC license.
581 * See the LICENSE file in the root directory of this source tree.
582 */const xX=Se("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
583 * @license lucide-react v0.462.0 - ISC
584 *
585 * This source code is licensed under the ISC license.
586 * See the LICENSE file in the root directory of this source tree.
587 */const yX=Se("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
588 * @license lucide-react v0.462.0 - ISC
589 *
590 * This source code is licensed under the ISC license.
591 * See the LICENSE file in the root directory of this source tree.
592 */const lw=Se("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
593 * @license lucide-react v0.462.0 - ISC
594 *
595 * This source code is licensed under the ISC license.
596 * See the LICENSE file in the root directory of this source tree.
597 */const QO=Se("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/**
598 * @license lucide-react v0.462.0 - ISC
599 *
600 * This source code is licensed under the ISC license.
601 * See the LICENSE file in the root directory of this source tree.
602 */const P$=Se("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
603 * @license lucide-react v0.462.0 - ISC
604 *
605 * This source code is licensed under the ISC license.
606 * See the LICENSE file in the root directory of this source tree.
607 */const cw=Se("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
608 * @license lucide-react v0.462.0 - ISC
609 *
610 * This source code is licensed under the ISC license.
611 * See the LICENSE file in the root directory of this source tree.
612 */const vX=Se("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
613 * @license lucide-react v0.462.0 - ISC
614 *
615 * This source code is licensed under the ISC license.
616 * See the LICENSE file in the root directory of this source tree.
617 */const Mc=Se("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/**
618 * @license lucide-react v0.462.0 - ISC
619 *
620 * This source code is licensed under the ISC license.
621 * See the LICENSE file in the root directory of this source tree.
622 */const bX=Se("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-.
6221-.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"}]]);/**
623 * @license lucide-react v0.462.0 - ISC
624 *
625 * This source code is licensed under the ISC license.
626 * See the LICENSE file in the root directory of this source tree.
627 */const Vr=Se("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
628 * @license lucide-react v0.462.0 - ISC
629 *
630 * This source code is licensed under the ISC license.
631 * See the LICENSE file in the root directory of this source tree.
632 */const dje=Se("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
633 * @license lucide-react v0.462.0 - ISC
634 *
635 * This source code is licensed under the ISC license.
636 * See the LICENSE file in the root directory of this source tree.
637 */const Fn=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
638 * @license lucide-react v0.462.0 - ISC
639 *
640 * This source code is licensed under the ISC license.
641 * See the LICENSE file in the root directory of this source tree.
642 */const fje=Se("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);/**
643 * @license lucide-react v0.462.0 - ISC
644 *
645 * This source code is licensed under the ISC license.
646 * See the LICENSE file in the root directory of this source tree.
647 */const ss=Se("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"}]]);/**
648 * @license lucide-react v0.462.0 - ISC
649 *
650 * This source code is licensed under the ISC license.
651 * See the LICENSE file in the root directory of this source tree.
652 */const wX=Se("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
653 * @license lucide-react v0.462.0 - ISC
654 *
655 * This source code is licensed under the ISC license.
656 * See the LICENSE file in the root directory of this source tree.
657 */const p1=Se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
658 * @license lucide-react v0.462.0 - ISC
659 *
660 * This source code is licensed under the ISC license.
661 * See the LICENSE file in the root directory of this source tree.
662 */const uw=Se("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
663 * @license lucide-react v0.462.0 - ISC
664 *
665 * This source code is licensed under the ISC license.
666 * See the LICENSE file in the root directory of this source tree.
667 */const jX=Se("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"}]]);/**
668 * @license lucide-react v0.462.0 - ISC
669 *
670 * This source code is licensed under the ISC license.
671 * See the LICENSE file in the root directory of this source tree.
672 */const hje=Se("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/**
673 * @license lucide-react v0.462.0 - ISC
674 *
675 * This source code is licensed under the ISC license.
676 * See the LICENSE file in the root directory of this source tree.
677 */const Fh=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
678 * @license lucide-react v0.462.0 - ISC
679 *
680 * This source code is licensed under the ISC license.
681 * See the LICENSE file in the root directory of this source tree.
682 */const Hm=Se("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"}]]);/**
683 * @license lucide-react v0.462.0 - ISC
684 *
685 * This source code is licensed under the ISC license.
686 * See the LICENSE file in the root directory of this source tree.
687 */const Fd=Se("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
688 * @license lucide-react v0.462.0 - ISC
689 *
690 * This source code is licensed under the ISC license.
691 * See the LICENSE file in the root directory of this source tree.
692 */const Kt=Se("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
693 * @license lucide-react v0.462.0 - ISC
694 *
695 * This source code is licensed under the ISC license.
696 * See the LICENSE file in the root directory of this source tree.
697 */const Ji=Se("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"}]]);/**
698 * @license lucide-react v0.462.0 - ISC
699 *
700 * This source code is licensed under the ISC license.
701 * See the LICENSE file in the root directory of this source tree.
702 */const mje=Se("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
702y:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
703 * @license lucide-react v0.462.0 - ISC
704 *
705 * This source code is licensed under the ISC license.
706 * See the LICENSE file in the root directory of this source tree.
707 */const it=Se("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"}]]);/**
708 * @license lucide-react v0.462.0 - ISC
709 *
710 * This source code is licensed under the ISC license.
711 * See the LICENSE file in the root directory of this source tree.
712 */const pje=Se("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/**
713 * @license lucide-react v0.462.0 - ISC
714 *
715 * This source code is licensed under the ISC license.
716 * See the LICENSE file in the root directory of this source tree.
717 */const gje=Se("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/**
718 * @license lucide-react v0.462.0 - ISC
719 *
720 * This source code is licensed under the ISC license.
721 * See the LICENSE file in the root directory of this source tree.
722 */const xje=Se("SkipBack",[["polygon",{points:"19 20 9 12 19 4 19 20",key:"o2sva"}],["line",{x1:"5",x2:"5",y1:"19",y2:"5",key:"1ocqjk"}]]);/**
723 * @license lucide-react v0.462.0 - ISC
724 *
725 * This source code is licensed under the ISC license.
726 * See the LICENSE file in the root directory of this source tree.
727 */const yje=Se("SkipForward",[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]]);/**
728 * @license lucide-react v0.462.0 - ISC
729 *
730 * This source code is licensed under the ISC license.
731 * See the LICENSE file in the root directory of this source tree.
732 */const vje=Se("Slack",[["rect",{width:"3",height:"8",x:"13",y:"2",rx:"1.5",key:"diqz80"}],["path",{d:"M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5",key:"183iwg"}],["rect",{width:"3",height:"8",x:"8",y:"14",rx:"1.5",key:"hqg7r1"}],["path",{d:"M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5",key:"76g71w"}],["rect",{width:"8",height:"3",x:"14",y:"13",rx:"1.5",key:"1kmz0a"}],["path",{d:"M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5",key:"jc4sz0"}],["rect",{width:"8",height:"3",x:"2",y:"8",rx:"1.5",key:"1omvl4"}],["path",{d:"M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5",key:"16f3cl"}]]);/**
733 * @license lucide-react v0.462.0 - ISC
734 *
735 * This source code is licensed under the ISC license.
736 * See the LICENSE file in the root directory of this source tree.
737 */const bje=Se("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
738 * @license lucide-react v0.462.0 - ISC
739 *
740 * This source code is licensed under the ISC license.
741 * See the LICENSE file in the root directory of this source tree.
742 */const ws=Se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
743 * @license lucide-react v0.462.0 - ISC
744 *
745 * This source code is licensed under the ISC license.
746 * See the LICENSE file in the root directory of this source tree.
747 */const bc=Se("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"}]]);/**
748 * @license lucide-react v0.462.0 - ISC
749 *
750 * This source code is licensed under the ISC license.
751 * See the LICENSE file in the root directory of this source tree.
752 */const NX=Se("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
753 * @license lucide-react v0.462.0 - ISC
754 *
755 * This source code is licensed under the ISC license.
756 * See the LICENSE file in the root directory of this source tree.
757 */const ZO=Se("Star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);/**
758 * @license lucide-react v0.462.0 - ISC
759 *
760 * This source code is licensed under the ISC license.
761 * See the LICENSE file in the root directory of this source tree.
762 */const JO=Se("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/**
763 * @license lucide-react v0.462.0 - ISC
764 *
765 * This source code is licensed under the ISC license.
766 * See the LICENSE file in the root directory of this source tree.
767 */const g1=Se("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
768 * @license lucide-react v0.462.0 - ISC
769 *
770 * This source code is licensed under the ISC license.
771 * See the LICENSE file in the root directory of this source tree.
772 */const wje=Se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
773 * @license lucide-react v0.462.0 - ISC
774 *
775 * This source code is licensed under the ISC license.
776 * See the LICENSE file in the root directory of this source tree.
777 */const ex=Se("TestTube",[["path",{d:"M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2",key:"125lnx"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M14.5 16h-5",key:"1ox875"}]]);/**
778 * @license lucide-react v0.462.0 - ISC
779 *
780 * This source code is licensed under the ISC license.
781 * See the LICENSE file in the root directory of this source tree.
782 */const jje=Se("Thermometer",[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]);/**
783 * @license lucide-react v0.462.0 - ISC
784 *
785 * This source code is licensed under the ISC license.
786 * See the LICENSE file in the root directory of this source tree.
787 */const Nje=Se("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
788 * @license lucide-react v0.462.0 - ISC
789 *
790 * This source code is licensed under the ISC license.
791 * See the LICENSE file in the root directory of this source tree.
792 */const SX=Se("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
793 * @license lucide-react v0.462.0 - ISC
794 *
795 * This source code is licensed under the ISC license.
796 * See the LICENSE file in the root directory of this source tree.
797 */const oi=Se("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"}]]);/**
798 * @license lucide-react v0.462.0 - ISC
799 *
800 * This source code is licensed under the ISC license.
801 * See the LICENSE file in the root directory of this source tree.
802 */const fl=Se("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"}]]);/**
803 * @license lucide-react v0.462.0 - ISC
804 *
805 * This source code is licensed under the ISC license.
806 * See the LICENSE file in the root directory of this source tree.
807 */const ln=Se("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"}]]);/**
808 * @license lucide-react v0.462.0 - ISC
809 *
810 * This source code is licensed under the ISC license.
811 * See the LICENSE file in the root directory of this source tree.
812 */const Sje=Se("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/**
813 * @license lucide-react v0.462.0 - ISC
814 *
815 * This source code is licensed under the ISC license.
816 * See the LICENSE file in the root directory of this source tree.
817 */const Js=Se("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
818 * @license lucide-react v0.462.0 - ISC
819 *
820 * This source code is licensed under the ISC license.
821 * See the LICENSE file in the root directory of this source tree.
822 */const kX=Se("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/**
823 * @license lucide-react v0.462.0 - ISC
824 *
825 * This source code is licensed under the ISC license.
826 * See the LICENSE file in the root directory of this source tree.
827 */const li=Se("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
828 * @license lucide-react v0.462.0 - ISC
829 *
830 * This source code is licensed under the ISC license.
831 * See the LICENSE file in the root directory of this source tree.
832 */const kje=Se("UsersRound",[["path",{d:"M18 21a8 8 0 0 0-16 0",key:"3ypg7q"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}],["path",{d:"M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3",key:"10s06x"}]]);/**
833 * @license lucide-react v0.462.0 - ISC
834 *
835 * This source code is licensed under the ISC license.
836 * See the LICENSE file in the root directory of this source tree.
837 */const Bn=Se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
838 * @license lucide-react v0.462.0 - ISC
839 *
840 * This source code is licensed under the ISC license.
841 * See the LICENSE file in the root directory of this source tree.
842 */const Cje=Se("UtensilsCrossed",[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]]);/**
843 * @license lucide-react v0.462.0 - ISC
844 *
845 * This source code is licensed under the ISC license.
846 * See the LICENSE file in the root directory of this source tree.
847 */const CX=Se("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/**
848 * @license lucide-react v0.462.0 - ISC
849 *
850 * This source code is licensed under the ISC license.
851 * See the LICENSE file in the root directory of this source tree.
852 */const hl=Se("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
853 * @license lucide-react v0.462.0 - ISC
854 *
855 * This source code is licensed under the ISC license.
856 * See the LICENSE file in the root directory of this source tree.
857 */const jr=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
858 * @license lucide-react v0.462.0 - ISC
859 *
860 * This source code is licensed under the ISC license.
861 * See the LICENSE file in the root directory of this source tree.
862 */const Ot=Se("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"}]]),lg=Lwe,cg=$we,_je=b.forwardRef(({className:e,inset:t,children:n,...r},a)=>s.jsxs(tX,{ref:a,className:He("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,s.jsx(ao,{className:"ml-auto h-4 w-4"})]}));_je.displayName=tX.displayName;const Aje=b.forwardRef(({className:e,...t},n)=>s.jsx(nX,{ref:n,className:He("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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),...t}));Aje.displayName=nX.displayName;const Hf=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(Fwe,{children:s.jsx(KY,{ref:r,sideOffset:t,className:He("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 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",e),...n})}));Hf.displayName=KY.displayName;const xa=b.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(XY,{ref:r,className:He("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));xa.displayName=XY.displayName;const Eje=b.forwardRef(({className:e,children:t,checked:n,...r},a)=>s.jsxs(QY,{ref:a,className:He("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(JY,{children:s.jsx(mo,{className:"h-4 w-4"})})}),t]}));Eje.displayName=QY.displayName;const Pje=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(ZY,{ref:r,className:He("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(JY,{children:s.jsx(Kwe,{className:"h-2 w-2 fill-current"})})}),t]}));Pje.displayName=ZY.displayName;const _X=b.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(YY,{ref:r,className:He("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));_X.displayName=YY.displayName;const pa=b.forwardRef(({className:e,...t},n)=>s.jsx(eX,{ref:n,className:He("-mx-1 my-1 h-px bg-muted",e),...t}));pa.displayName=eX.displayName;var vT=function(e,t){return vT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},vT(e,t)};function Py(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");vT(e,t);function n(){this.constructor=e}
862e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var tx=function(){return tx=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},tx.apply(this,arguments)};function Tje(e,t){t===void 0&&(t={});var n=t.insertAt;if(!(typeof document>"u")){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",n==="top"&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}var Ije=`/*
863  code is extracted from Calendly's embed stylesheet: https://assets.calendly.com/assets/external/widget.css
864*/
865
866.calendly-inline-widget,
867.calendly-inline-widget *,
868.calendly-badge-widget,
869.calendly-badge-widget *,
870.calendly-overlay,
871.calendly-overlay * {
872  font-size: 16px;
873  line-height: 1.2em;
874}
875
876.calendly-inline-widget {
877  min-width: 320px;
878  height: 630px;
879}
880
881.calendly-inline-widget iframe,
882.calendly-badge-widget iframe,
883.calendly-overlay iframe {
884  display: inline;
885  width: 100%;
886  height: 100%;
887}
888
889.calendly-popup-content {
890  position: relative;
891}
892
893.calendly-popup-content.calendly-mobile {
894  -webkit-overflow-scrolling: touch;
895  overflow-y: auto;
896}
897
898.calendly-overlay {
899  position: fixed;
900  top: 0;
901  left: 0;
902  right: 0;
903  bottom: 0;
904  overflow: hidden;
905  z-index: 9999;
906  background-color: #a5a5a5;
907  background-color: rgba(31, 31, 31, 0.4);
908}
909
910.calendly-overlay .calendly-close-overlay {
911  position: absolute;
912  top: 0;
913  left: 0;
914  right: 0;
915  bottom: 0;
916}
917
918.calendly-overlay .calendly-popup {
919  box-sizing: border-box;
920  position: absolute;
921  top: 50%;
922  left: 50%;
923  -webkit-transform: translateY(-50%) translateX(-50%);
924  transform: translateY(-50%) translateX(-50%);
925  width: 80%;
926  min-width: 900px;
927  max-width: 1000px;
928  height: 90%;
929  max-height: 680px;
930}
931
932@media (max-width: 975px) {
933  .calendly-overlay .calendly-popup {
934    position: fixed;
935    top: 50px;
936    left: 0;
937    right: 0;
938    bottom: 0;
939    -webkit-transform: none;
940    transform: none;
941    width: 100%;
942    height: auto;
943    min-width: 0;
944    max-height: none;
945  }
946}
947
948.calendly-overlay .calendly-popup .calendly-popup-content {
949  height: 100%;
950}
951
952.calendly-overlay .calendly-popup-close {
953  position: absolute;
954  top: 25px;
955  right: 25px;
956  color: #fff;
957  width: 19px;
958  height: 19px;
959  cursor: pointer;
960  background: url(https://assets.calendly.com/assets/external/close-icon.svg)
961    no-repeat;
962  background-size: contain;
963}
964
965@media (max-width: 975px) {
966  .calendly-overlay .calendly-popup-close {
967    top: 15px;
968    right: 15px;
969  }
970}
971
972.calendly-badge-widget {
973  position: fixed;
974  right: 20px;
975  bottom: 15px;
976  z-index: 9998;
977}
978
979.calendly-badge-widget .calendly-badge-content {
980  display: table-cell;
981  width: auto;
982  height: 45px;
983  padding: 0 30px;
984  border-radius: 25px;
985  box-shadow: rgba(0, 0, 0, 0.25) 0 2px 5px;
986  font-family: sans-serif;
987  text-align: center;
988  vertical-align: middle;
989  font-weight: bold;
990  font-size: 14px;
991  color: #fff;
992  cursor: pointer;
993}
994
995.calendly-badge-widget .calendly-badge-content.calendly-white {
996  color: #666a73;
997}
998
999.calendly-badge-widget .calendly-badge-content span {
1000  display: block;
1001  font-size: 12px;
1002}
1003
1004.calendly-spinner {
1005  position: absolute;
1006  top: 50%;
1007  left: 0;
1008  right: 0;
1009  -webkit-transform: translateY(-50%);
1010  transform: translateY(-50%);
1011  text-align: center;
1012  z-index: -1;
1013}
1014
1015.calendly-spinner > div {
1016  display: inline-block;
1017  width: 18px;
1018  height: 18px;
1019  background-color: #e1e1e1;
1020  border-radius: 50%;
1021  vertical-align: middle;
1022  -webkit-animation: calendly-bouncedelay 1.4s infinite ease-in-out;
1023  animation: calendly-bouncedelay 1.4s infinite ease-in-out;
1024  -webkit-animation-fill-mode: both;
1025  animation-fill-mode: both;
1026}
1027
1028.calendly-spinner .calendly-bounce1 {
1029  -webkit-animation-delay: -0.32s;
1030  animation-delay: -0.32s;
1031}
1032
1033.calendly-spinner .calendly-bounce2 {
1034  -webkit-animation-delay: -0.16s;
1035  animation-delay: -0.16s;
1036}
1037
1038@-webkit-keyframes calendly-bouncedelay {
1039  0%,
1040  80%,
1041  100% {
1042    -webkit-transform: scale(0);
1043    transform: scale(0);
1044  }
1045
1046  40% {
1047    -webkit-transform: scale(1);
1048    transform: scale(1);
1049  }
1050}
1051
1052@keyframes calendly-bouncedelay {
1053  0%,
1054  80%,
1055  100% {
1056    -webkit-transform: scale(0);
1057    transform: scale(0);
1058  }
1059
1060  40% {
1061    -webkit-transform: scale(1);
1062    transform: scale(1);
1063  }
1064}
1065`;Tje(Ije);function x2(e){return e.charAt(0)==="#"?e.slice(1):e}function Oje(e){return e!=null&&e.primaryColor&&(e.primaryColor=x2(e.primaryColor)),e!=null&&e.textColor&&(e.textColor=x2(e.textColor)),e!=null&&e.backgroundColor&&(e.backgroundColor=x2(e.backgroundColor)),e}var T$;(function(e){e.PROFILE_PAGE_VIEWED="calendly.profile_page_viewed",e.EVENT_TYPE_VIEWED="calendly.event_type_viewed",e.DATE_AND_TIME_SELECTED="calendly.date_and_time_selected",e.EVENT_SCHEDULED="calendly.event_scheduled",e.PAGE_HEIGHT="calendly.page_height"})(T$||(T$={}));var AX=function(e){var t=e.url,n=e.prefill,r=n===void 0?{}:n,a=e.pageSettings,i=a===void 0?{}:a,o=e.utm,l=o===void 0?{}:o,c=e.embedType,u=Oje(i),d=u.backgroundColor,f=u.hideEventTypeDetails,m=u.hideLandingPageDetails,p=u.primaryColor,v=u.textColor,y=u.hideGdprBanner,x=r.customAnswers,w=r.date,N=r.email,S=r.firstName,_=r.guests,k=r.lastName,C=r.location,E=r.name,O=l.utmCampaign,P=l.utmContent,R=l.utmMedium,T=l.utmSource,D=l.utmTerm,z=l.salesforce_uuid,I=t.indexOf("?"),F=I>-1,U=t.slice(I+1),H=F?t.slice(0,I):t,q=[F?U:null,d?"background_color=".concat(d):null,f?"hide_event_type_details=1":null,m?"hide_landing_page_details=1":null,p?"primary_color=".concat(p):null,v?"text_color=".concat(v):null,y?"hide_gdpr_banner=1":null,E?"name=".concat(encodeURIComponent(E)):null,C?"location=".concat(encodeURIComponent(C)):null,S?"first_name=".concat(encodeURIComponent(S)):null,k?"last_name=".concat(encodeURIComponent(k)):null,_?"guests=".concat(_.map(encodeURIComponent).join(",")):null,N?"email=".concat(encodeURIComponent(N)):null,w&&w instanceof Date?"date=".concat(Mje(w)):null,O?"utm_campaign=".concat(encodeURIComponent(O)):null,P?"utm_content=".concat(encodeURIComponent(P)):null,R?"utm_medium=".concat(encodeURIComponent(R)):null,T?"utm_source=".concat(encodeURIComponent(T)):null,D?"utm_term=".concat(encodeURIComponent(D)):null,z?"salesforce_uuid=".concat(encodeURIComponent(z)):null,c?"embed_type=".concat(c):null,"embed_domain=1"].concat(x?Dje(
1065x):[]).filter(function(B){return B!==null}).join("&");return"".concat(H,"?").concat(q)},Mje=function(e){var t=e.getMonth()+1,n=e.getDate(),r=e.getFullYear();return[r,t<10?"0".concat(t):t,n<10?"0".concat(n):n].join("-")},Rje=/^a\d{1,2}$/,Dje=function(e){var t=Object.keys(e).filter(function(n){return n.match(Rje)});return t.length?t.map(function(n){return"".concat(n,"=").concat(encodeURIComponent(e[n]))}):[]},EX=(function(e){Py(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.render=function(){return b.createElement("div",{className:"calendly-spinner"},b.createElement("div",{className:"calendly-bounce1"}),b.createElement("div",{className:"calendly-bounce2"}),b.createElement("div",{className:"calendly-bounce3"}))},t})(b.Component),Lje="calendly-inline-widget",$je=(function(e){Py(t,e);function t(n){var r=e.call(this,n)||this;return r.state={isLoading:!0},r.onLoad=r.onLoad.bind(r),r}return t.prototype.onLoad=function(){this.setState({isLoading:!1})},t.prototype.render=function(){var n=AX({url:this.props.url,pageSettings:this.props.pageSettings,prefill:this.props.prefill,utm:this.props.utm,embedType:"Inline"}),r=this.props.LoadingSpinner||EX;return b.createElement("div",{className:this.props.className||Lje,style:this.props.styles||{}},this.state.isLoading&&b.createElement(r,null),b.createElement("iframe",{width:"100%",height:"100%",frameBorder:"0",title:this.props.iframeTitle||"Calendly Scheduling Page",onLoad:this.onLoad,src:n}))},t})(b.Component),Fje=(function(e){Py(t,e);function t(n){var r=e.call(this,n)||this;return r.state={isLoading:!0},r.onLoad=r.onLoad.bind(r),r}return t.prototype.onLoad=function(){this.setState({isLoading:!1})},t.prototype.render=function(){var n=AX({url:this.props.url,pageSettings:this.props.pageSettings,prefill:this.props.prefill,utm:this.props.utm,embedType:"Inline"}),r=this.props.LoadingSpinner||EX;return b.createElement(b.Fragment,null,this.state.isLoading&&b.createElement(r,null),b.createElement("iframe",{width:"100%",height:"100%",frameBorder:"0",title:this.props.iframeTitle||"Calendly Scheduling Page",onLoad:this.onLoad,src:n}))},t})(b.Component),PX=(function(e){if(!e.open)return null;if(!e.rootElement)throw new Error("[react-calendly]: PopupModal rootElement property cannot be undefined");return Td.createPortal(b.createElement("div",{className:"calendly-overlay"},b.createElement("div",{onClick:e.onModalClose,className:"calendly-close-overlay"}),b.createElement("div",{className:"calendly-popup"},b.createElement("div",{className:"calendly-popup-content"},b.createElement(Fje,tx({},e)))),b.createElement("button",{className:"calendly-popup-close",onClick:e.onModalClose,"aria-label":"Close modal",style:{display:"block",border:"none",padding:0}})),e.rootElement)});(function(e){Py(t,e);function t(n){var r=e.call(this,n)||this;return r.state={isOpen:!1},r.onClick=r.onClick.bind(r),r.onClose=r.onClose.bind(r),r}return t.prototype.onClick=function(n){n.preventDefault(),this.setState({isOpen:!0})},t.prototype.onClose=function(n){n.stopPropagation(),this.setState({isOpen:!1})},t.prototype.render=function(){return b.createElement(b.Fragment,null,b.createElement("button",{onClick:this.onClick,style:this.props.styles||{},className:this.props.className||""},this.props.text),b.createElement(PX,tx({},this.props,{open:this.state.isOpen,onModalClose:this.onClose,rootElement:this.props.rootElement})))},t})(b.Component);(function(e){Py(t,e);function t(n){var r=e.call(this,n)||this;return r.state={isOpen:!1},r.onClick=r.onClick.bind(r),r.onClose=r.onClose.bind(r),r}return t.prototype.onClick=function(){this.setState({isOpen:!0})},t.prototype.onClose=function(n){n.stopPropagation(),this.setState({isOpen:!1})},t.prototype.render=function(){return b.createElement("div",{className:"calendly-badge-widget",onClick:this.onClick},b.createElement("div",{className:"calendly-badge-content",style:{background:this.props.color||"#00a2ff",color:this.props.textColor||"#ffffff"}},this.props.text||"Schedule time with me",this.props.branding&&b.createElement("span",null,"powered by Calendly")),b.createElement(PX,tx({},this.props,{open:this.state.isOpen,onModalClose:this.onClose,rootElement:this.props.rootElement})))},t})(b.Component);const Uc=({isOpen:e,onClose:t,url:n="https://calendly.com/flo-ops/privion-onboarding?month=2025-09"})=>e?s.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[s.jsx("div",{className:"absolute inset-0 bg-black/80 backdrop-blur-sm",onClick:t}),s.jsxs("div",{className:"relative bg-white rounded-lg shadow-xl w-full max-w-4xl h-[600px] m-4 overflow-hidden",children:[s.jsxs("div",{className:"flex justify-between items-center p-4 border-b bg-gray-50",children:[s.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Get Started with Privi
1065on"}),s.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-700 text-xl font-bold w-8 h-8 flex items-center justify-center rounded-full hover:bg-gray-200",children:"×"})]}),s.jsx("div",{className:"h-[536px]",children:s.jsx($je,{url:n,styles:{height:"100%",width:"100%"},pageSettings:{backgroundColor:"ffffff",hideEventTypeDetails:!1,hideLandingPageDetails:!1,primaryColor:"00a2ff",textColor:"4d5055"},utm:{utmCampaign:"Privion Website",utmSource:"Website",utmMedium:"Popup"}})})]})]}):null,zje=()=>{const{user:e,signOut:t}=nr(),n=qt(),{toast:r}=_t(),a=()=>{t(),r({title:"Signed out",description:"You've been successfully signed out."}),n("/")},i=u=>u.split(" ").map(d=>d[0]).join("").toUpperCase().slice(0,2),o=u=>({"Legal Services":{icon:it,color:"text-blue-600"},Healthcare:{icon:it,color:"text-green-600"},"Higher Education":{icon:it,color:"text-purple-600"},Government:{icon:it,color:"text-red-600"}})[u]||{icon:dl,color:"text-gray-600"};if(!e)return null;const l=o(e.industry),c=l.icon;return s.jsxs(lg,{children:[s.jsx(cg,{asChild:!0,children:s.jsx(Y,{variant:"ghost",className:"relative h-10 w-10 rounded-full bg-gradient-to-r from-blue-600 to-purple-600 text-white hover:from-blue-700 hover:to-purple-700",children:e.avatar?s.jsx("img",{className:"h-10 w-10 rounded-full",src:e.avatar,alt:e.name}):s.jsx("span",{className:"text-sm font-medium",children:i(e.name)})})}),s.jsxs(Hf,{className:"w-64",align:"end",forceMount:!0,children:[s.jsx(_X,{className:"font-normal",children:s.jsxs("div",{className:"flex flex-col space-y-2",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("p",{className:"text-sm font-medium leading-none",children:e.name}),s.jsx(c,{className:`h-4 w-4 ${l.color}`})]}),s.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:e.email}),s.jsxs("div",{className:"flex flex-col space-y-1",children:[s.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.role," at ",e.organization]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:e.industry})]})]})}),s.jsx(pa,{}),s.jsxs(xa,{onClick:()=>n("/dashboard"),children:[s.jsx(li,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Dashboard"})]}),s.jsxs(xa,{onClick:()=>n("/account-profile"),children:[s.jsx(Kt,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Account Settings"})]}),s.jsx(pa,{}),s.jsxs(xa,{onClick:a,children:[s.jsx(XO,{className:"mr-2 h-4 w-4"}),s.jsx("span",{children:"Sign out"})]})]})]})};var TX=a1(),y2=function(){},x1=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:y2,onWheelCapture:y2,onTouchMoveCapture:y2}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,N=w===void 0?"div":w,S=e.gapMode,_=Sy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,C=s1([n,t]),E=wn(wn({},_),a);return b.createElement(b.Fragment,null,d&&b.createElement(k,{sideCar:TX,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:S}),o?b.cloneElement(b.Children.only(l),wn(wn({},E),{ref:C})):b.createElement(N,wn({},E,{className:c,ref:C}),l))});x1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};x1.classNames={fullWidth:Ku,zeroRight:Gu};var bT=!1;if(typeof window<"u")try{var Ov=Object.defineProperty({},"passive",{get:function(){return bT=!0,!0}});window.addEventListener("test",Ov,Ov),window.removeEventListener("test",Ov,Ov)}catch{bT=!1}var _f=bT?{passive:!1}:!1,Bje=function(e){return e.tagName==="TEXTAREA"},IX=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Bje(e)&&n[t]==="visible")},Uje=function(e){return IX(e,"overflowY")},Hje=function(e){return IX(e,"overflowX")},I$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=OX(e,r);if(a){var i=MX(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qje=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Vje=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]}
vendor: 4,376 bytes, lines 1065-1068
1065,OX=function(e,t){return e==="v"?Uje(t):Hje(t)},MX=function(e,t){return e==="v"?qje(t):Vje(t)},Wje=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gje=function(e,t,n,r,a){var i=Wje(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,f=0,m=0;do{if(!l)break;var p=MX(e,l),v=p[0],y=p[1],x=p[2],w=y-x-i*v;(v||w)&&OX(e,l)&&(f+=w,m+=v);var N=l.parentNode;l=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Mv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},O$=function(e){return[e.deltaX,e.deltaY]},M$=function(e){return e&&"current"in e?e.current:e},Kje=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yje=function(e){return`
1066  .block-interactivity-`.concat(e,` {pointer-events: none;}
1067  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1068`)},Xje=0,Af=[];function Qje(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(Xje++)[0],i=b.useState(ky)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var y=r1([e.lockRef.current],(e.shards||[]).map(M$),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=b.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=Mv(y),N=n.current,S="deltaX"in y?y.deltaX:N[0]-w[0],_="deltaY"in y?y.deltaY:N[1]-w[1],k,C=y.target,E=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in y&&E==="h"&&C.type==="range")return!1;var O=I$(E,C);if(!O)return!0;if(O?k=E:(k=E==="v"?"h":"v",O=I$(E,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(S||_)&&(r.current=k),!k)return!0;var P=r.current||k;return Gje(P,x,y,P==="h"?S:_)},[]),c=b.useCallback(function(y){var x=y;if(!(!Af.length||Af[Af.length-1]!==i)){var w="deltaY"in x?O$(x):Mv(x),N=t.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&Kje(k.delta,w)})[0];if(N&&N.should){x.cancelable&&x.preventDefault();return}if(!N){var S=(o.current.shards||[]).map(M$).filter(Boolean).filter(function(k){return k.contains(x.target)}),_=S.length>0?l(x,S[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(y,x,w,N){var S={name:y,delta:x,target:w,should:N,shadowParent:Zje(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=b.useCallback(function(y){n.current=Mv(y),r.current=void 0},[]),f=b.useCallback(function(y){u(y.type,O$(y),y.target,l(y,e.lockRef.current))},[]),m=b.useCallback(function(y){u(y.type,Mv(y),y.target,l(y,e.lockRef.current))},[]);b.useEffect(function(){return Af.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,_f),document.addEventListener("touchmove",c,_f),document.addEventListener("touchstart",d,_f),function(){Af=Af.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,_f),document.removeEventListener("touchmove",c,_f),document.removeEventListener("touchstart",d,_f)}},[]);var p=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:Yje(a)}):null,p?b.createElement(l1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zje(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jje=i1(TX,Qje);var RX=b.forwardRef(function(e,t){return b.createElement(x1,wn({},e,{ref:t,sideCar:Jje}))});RX.classNames=x1.classNames;var y1="Dialog",[DX]=Mr(y1),[e1e,$i]=DX(y1),LX=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=b.useRef(null),c=b.useRef(null),[u,d]=$s({prop:r,defaultProp:a??!1,onChange:i,caller:y1});return s.jsx(e1e,{scope:t,triggerRef:l,contentRef:c,contentId:na(),titleId:na(),descriptionId:na(),open:u,onOpenChange:d,onOpenToggle:b.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};LX.displayName=y1;var $X="DialogTrigger",FX=b.forwardRef((e,t)=>
vendor: 5,552 bytes, lines 1068-1072
1068{const{__scopeDialog:n,...r}=e,a=$i($X,n),i=gt(t,a.triggerRef);return s.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":nM(a.open),...r,ref:i,onClick:Oe(e.onClick,a.onOpenToggle)})});FX.displayName=$X;var eM="DialogPortal",[t1e,zX]=DX(eM,{forceMount:void 0}),BX=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=$i(eM,t);return s.jsx(t1e,{scope:t,forceMount:n,children:b.Children.map(r,o=>s.jsx(Cr,{present:n||i.open,children:s.jsx(Dd,{asChild:!0,container:a,children:o})}))})};BX.displayName=eM;var dw="DialogOverlay",UX=b.forwardRef((e,t)=>{const n=zX(dw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=$i(dw,e.__scopeDialog);return i.modal?s.jsx(Cr,{present:r||i.open,children:s.jsx(r1e,{...a,ref:t})}):null});UX.displayName=dw;var n1e=Tc("DialogOverlay.RemoveScroll"),r1e=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(dw,n);return s.jsx(RX,{as:n1e,allowPinchZoom:!0,shards:[a.contentRef],children:s.jsx(Ve.div,{"data-state":nM(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),hd="DialogContent",HX=b.forwardRef((e,t)=>{const n=zX(hd,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=$i(hd,e.__scopeDialog);return s.jsx(Cr,{present:r||i.open,children:i.modal?s.jsx(s1e,{...a,ref:t}):s.jsx(a1e,{...a,ref:t})})});HX.displayName=hd;var s1e=b.forwardRef((e,t)=>{const n=$i(hd,e.__scopeDialog),r=b.useRef(null),a=gt(t,n.contentRef,r);return b.useEffect(()=>{const i=r.current;if(i)return n1(i)},[]),s.jsx(qX,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:Oe(e.onFocusOutside,i=>i.preventDefault())})}),a1e=b.forwardRef((e,t)=>{const n=$i(hd,e.__scopeDialog),r=b.useRef(!1),a=b.useRef(!1);return s.jsx(qX,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),qX=b.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=$i(hd,n),c=b.useRef(null),u=gt(t,c);return Wj(),s.jsxs(s.Fragment,{children:[s.jsx(by,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(Rd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":nM(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(i1e,{titleId:l.titleId}),s.jsx(l1e,{contentRef:c,descriptionId:l.descriptionId})]})]})}),tM="DialogTitle",VX=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(tM,n);return s.jsx(Ve.h2,{id:a.titleId,...r,ref:t})});VX.displayName=tM;var WX="DialogDescription",GX=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(WX,n);return s.jsx(Ve.p,{id:a.descriptionId,...r,ref:t})});GX.displayName=WX;var KX="DialogClose",YX=b.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=$i(KX,n);return s.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>a.onOpenChange(!1))})});YX.displayName=KX;function nM(e){return e?"open":"closed"}var XX="DialogTitleWarning",[zrt,QX]=Kye(XX,{contentName:hd,titleName:tM,docsSlug:"dialog"}),i1e=({titleId:e})=>{const t=QX(XX),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1069
1070If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1071
1072For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},o1e="DialogDescriptionWarning",l1e=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${QX(o1e).contentName}}.`;return b.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},c1e=LX,u1e=FX,d1e=BX,ZX=UX,JX=HX,eQ=VX,tQ=GX,f1e=YX;const qm=c1e,nQ=u1e,h1e=d1e,rQ=b.forwardRef(({className:e,...t},n)=>s.jsx(ZX,{ref:n,className:He("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}));rQ.displayName=ZX.displayName;const zd=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(h1e,{children:[s.jsx(rQ,{}),s.jsxs(JX,{ref:r,className:He("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:rou
1072nded-lg",e),...n,children:[t,s.jsxs(f1e,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(jr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));zd.displayName=JX.displayName;const Bd=({className:e,...t})=>s.jsx("div",{className:He("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bd.displayName="DialogHeader";const Ud=b.forwardRef(({className:e,...t},n)=>s.jsx(eQ,{ref:n,className:He("text-lg font-semibold leading-none tracking-tight",e),...t}));Ud.displayName=eQ.displayName;const rM=b.forwardRef(({className:e,...t},n)=>s.jsx(tQ,{ref:n,className:He("text-sm text-muted-foreground",e),...t}));rM.displayName=tQ.displayName;const _e=b.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:He("flex h-10 w-full rounded-md border-2 border-gray-300 dark:border-gray-500 bg-white/90 dark:bg-gray-800/90 px-3 py-2 text-base text-gray-900 dark:text-gray-100 ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus-visible:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200 md:text-sm shadow-sm",e),ref:r,...n}));_e.displayName="Input";var m1e="Label",sQ=b.forwardRef((e,t)=>s.jsx(Ve.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sQ.displayName=m1e;var aQ=sQ;const p1e=vy("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-gray-800 dark:text-gray-200"),de=b.forwardRef(({className:e,...t},n)=>s.jsx(aQ,{ref:n,className:He(p1e(),e),...t}));de.displayName=aQ.displayName;var g1e=({as:e="div",...t},n)=>s.jsx(e,{...t,ref:n}),x1e=b.forwardRef(g1e),y1e="https://challenges.cloudflare.com/turnstile/v0/api.js",sM="cf-turnstile-script",v1e="cf-turnstile",aM="onloadTurnstileCallback",iQ=e=>!!document.getElementById(e),b1e=({render:e="explicit",onLoadCallbackName:t=aM,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:o,onError:l,crossOrigin:c=""}={}})=>{let u=i||sM;if(iQ(u))return;let d=document.createElement("script");d.id=u,d.src=`${y1e}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${d.src}"]`)&&(d.defer=!!r,d.async=!!a,n&&(d.nonce=n),c&&(d.crossOrigin=c),l&&(d.onerror=l,delete window[t]),(o==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(d))},hu={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function w1e(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function j1e(e=sM){let[t,n]=b.useState(!1);return b.useEffect(()=>{let r=()=>{iQ(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var Ng="unloaded",oQ,N1e=new Promise((e,t)=>{oQ={resolve:e,reject:t},Ng==="ready"&&e(void 0)}),R$=(e=aM)=>(Ng==="unloaded"&&(Ng="loading",window[e]=()=>{oQ.resolve(),Ng="ready",delete window[e]}),N1e),zh=b.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:o,onExpire:l,onError:c,onBeforeInteractive:u,onAfterInteractive:d,onUnsupported:f,onTimeout:m,onLoadScript:p,id:v,style:y,as:x="div",injectScript:w=!0,rerenderOnCallbackChange:N=!1,...S}=e,_=r.size,k=b.useCallback(()=>typeof _>"u"?{}:r.execution==="execute"?hu.invisible:r.appearance==="interaction-only"?hu.interactionOnly:hu[_],[r.execution,_,r.appearance]),[C,E]=b.useState(k()),O=b.useRef(null),[P,R]=b.useState(!1),T=b.useRef(void 0),D=b.useRef(!1),z=v||v1e,I=b.useRef({onSuccess:o,onError:c,onExpire:l,onBeforeInteractive:u,onAfterInteractive:d,onUnsupported:f,onTimeout:m});b.useEffect(()=>{N||(I.current={onSuccess:o,onError:c,onExpire:l,onBeforeInteractive:u,onAfterInteractive:d,onUnsupported:f,onTimeout:m})});let F=(n==null?void 0:n.id)||sM,U=j1e(F),H=(n==null?void 0:n.onLoadCallbackName)||aM,q=r.appearance||"always",B=b.useMemo(()=>({sitekey:a,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:w1e(_),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:V=>{var K,W;D.current=!0,N?o==null||o(V):(W=(K=I.current).onSuccess)==null||W.call(K,V)},"error-callback":N?c:(...V)=>{var K,W;return(W=(K=I.current).onError)==null?void 0:W.call(K,...V)},"expired-callback":N?l:(...V)=>{var K,W;return(W=(K=I.current).onExpire)==null?void 0:W.call(K,...V)},"before-interactive-callback":N?u:(...V)=>{var K,W;return(W=(K=I.current).onBeforeInteractive)==null?void 0:W.call(K,...V)},"after-interactive-callback":N?d:(...V)=>{var K,W;return(W=(K=I.current).onAfterInteractive)==null?void 0:W.call(K,...V)},"unsupported-callback":N?f:(...V)=>{var K,W;return(W=(K=I.current).onUnsupported)==null?void 0:W.call(K,...V)},"timeout-callback":N?m:(...V)=>{var K,W;return(W=(K=I.current).onTimeout)==null?void 0:W.call(K,...V)}}
1072),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,a,_,N,N?o:null,N?c:null,N?l:null,N?u:null,N?d:null,N?f:null,N?m:null]),L=b.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return b.useEffect(function(){w&&!P&&(R$(H),b1e({onLoadCallbackName:H,scriptOptions:{...n,id:F}}))},[w,P,n,F,H]),b.useEffect(function(){Ng!=="ready"&&R$(H).then(()=>R(!0)).catch(console.error)},[H]),b.useEffect(function(){if(!O.current||!P)return;let V=!1;return(async()=>{if(V||!O.current)return;let K=window.turnstile.render(O.current,B);T.current=K,T.current&&(i==null||i(T.current))})(),()=>{V=!0,T.current&&(window.turnstile.remove(T.current),D.current=!1)}},[z,P,B]),b.useImperativeHandle(t,()=>{let{turnstile:V}=window;return{getResponse(){if(!(V!=null&&V.getResponse)||!T.current||!L()){console.warn("Turnstile has not been loaded");return}return V.getResponse(T.current)},async getResponsePromise(K=3e4,W=100){return new Promise((ie,ve)=>{let ge,J=async()=>{if(D.current&&window.turnstile&&T.current)try{let ne=window.turnstile.getResponse(T.current);return ge&&clearTimeout(ge),ne?ie(ne):ve(new Error("No response received"))}catch(ne){return ge&&clearTimeout(ge),console.warn("Failed to get response",ne),ve(new Error("Failed to get response"))}ge||(ge=setTimeout(()=>{ge&&clearTimeout(ge),ve(new Error("Timeout"))},K)),await new Promise(ne=>setTimeout(ne,W)),await J()};J()})},reset(){if(!(V!=null&&V.reset)||!T.current||!L()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&E(hu.invisible);try{D.current=!1,V.reset(T.current)}catch(K){console.warn(`Failed to reset Turnstile widget ${T}`,K)}},remove(){if(!(V!=null&&V.remove)||!T.current||!L()){console.warn("Turnstile has not been loaded");return}E(hu.invisible),D.current=!1,V.remove(T.current),T.current=null},render(){if(!(V!=null&&V.render)||!O.current||!L()||T.current){console.warn("Turnstile has not been loaded or container not found");return}let K=V.render(O.current,B);return T.current=K,T.current&&(i==null||i(T.current)),r.execution!=="execute"&&E(_?hu[_]:{}),K},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!(V!=null&&V.execute)||!O.current||!T.current||!L()){console.warn("Turnstile has not been loaded or container not found");return}V.execute(O.current,B),E(_?hu[_]:{})},isExpired(){return!(V!=null&&V.isExpired)||!T.current||!L()?(console.warn("Turnstile has not been loaded"),!1):V.isExpired(T.current)}}},[T,r.execution,_,B,O,L,P,i]),b.useEffect(()=>{if(P||!U)return;if(window.turnstile){R(!0);return}let V=setInterval(()=>{window.turnstile&&(R(!0),clearInterval(V))},50);return()=>{clearInterval(V)}},[P,U]),b.useEffect(()=>{E(k())},[r.execution,_,q]),b.useEffect(()=>{!U||typeof p!="function"||p()},[U]),s.jsx(x1e,{ref:O,as:x,id:z,style:{...C,...y},...S})});zh.displayName="Turnstile";const S1e=({isOpen:e,onClose:t})=>{const[n,r]=b.useState(""),[a,i]=b.useState(""),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(!1),[m,p]=b.useState(""),[v,y]=b.useState("loading"),[x,w]=b.useState(null),N=b.useRef(null),{signIn:S}=nr(),{toast:_}=_t(),k=qt(),C=()=>{const O=sessionStorage.getItem("authReturnUrl");return O?(sessionStorage.removeItem("authReturnUrl"),O):"/dashboard"},E=async O=>{var P,R,T;O.preventDefault(),w(null),m||w({text:" CAPTCHA not completed. Your login may be flagged as suspicious.",type:"warning"}),u(!0);try{if(await S(n,a,m)){_({title:"Welcome back!",description:"You've successfully signed in to your account."}),t();const z=C();k(z),(P=N.current)==null||P.reset(),p(""),y("loading"),w(null)}else _({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"}),(R=N.current)==null||R.reset(),p(""),y("loading")}catch{_({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"}),(T=N.current)==null||T.reset(),p(""),y("loading")}finally{u(!1)}};return s.jsx(qm,{open:e,onOpenChange:t,children:s.jsxs(zd,{className:"sm:max-w-md",children:[s.jsx(Bd,{children:s.jsx(Ud,{className:"text-2xl font-bold text-center",children:"Sign In to Privi
1072on"})}),s.jsxs("form",{onSubmit:E,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"email",type:"email",placeholder:"Enter your email",value:n,onChange:O=>r(O.target.value.toLowerCase()),className:"pl-10",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ur,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"password",type:o?"text":"password",placeholder:"Enter your password",value:a,onChange:O=>i(O.target.value),className:"pl-10 pr-10",required:!0}),s.jsx("button",{type:"button",onClick:()=>l(!o),className:"absolute right-3 top-3 text-gray-400 hover:text-gray-600",children:o?s.jsx(Lh,{className:"h-4 w-4"}):s.jsx(pr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2 my-2",children:[s.jsx(zh,{ref:N,siteKey:"0x4AAAAAACd8BHWKs0K2ODll",onLoad:()=>y("ready"),onSuccess:O=>{p(O),y("ready"),w(null),console.log("CAPTCHA completed successfully")},onError:()=>{var O;y("error"),p(""),(O=N.current)==null||O.reset(),w({text:"CAPTCHA verification failed. Please refresh the page.",type:"error"}),console.error("CAPTCHA error")},onExpire:()=>{p(""),w({text:"CAPTCHA expired. Please complete it again.",type:"warning"}),console.log("CAPTCHA token expired")},options:{theme:"auto"}}),s.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${v==="ready"&&m?"bg-green-500":v==="error"?"bg-red-500":"bg-yellow-500 animate-pulse"}`}),s.jsx("span",{children:v==="ready"&&m?"CAPTCHA verified":v==="error"?"CAPTCHA unavailable":"CAPTCHA loading..."})]})]}),x&&s.jsx("div",{className:`text-sm font-medium ${x.type==="warning"?"text-yellow-600":"text-red-500"}`,children:x.text}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("input",{type:"checkbox",id:"remember",checked:d,onChange:O=>f(O.target.checked),className:"rounded border-gray-300"}),s.jsx(de,{htmlFor:"remember",className:"text-sm",children:"Remember me"})]}),s.jsx(Y,{variant:"link",className:"text-sm p-0",children:"Forgot password?"})]}),s.jsxs(Y,{type:"submit",className:"w-full",disabled:c,children:[c&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Sign In"]})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"text-sm text-gray-600",children:"Don't have an account? "}),s.jsx(Vn,{to:"/register",className:"text-sm text-primary hover:underline",children:"Sign up"})]})]})})},xn=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState(!1),[a,i]=b.useState(!1),{isAuthenticated:o,signOut:l}=nr(),c=qt(),u=wl(),{toast:d}=_t(),f=async()=>{try{await l(),d({title:"Signed out successfully",description:"You have been signed out of your account."}),c("/")}catch(x){console.error("Sign out error:",x)}},m=[{path:"/dashboard",label:"Platform Overview",icon:s.jsx(el,{className:"h-4 w-4"})},{path:"/resources",label:"Resources",icon:s.jsx(Dh,{className:"h-4 w-4"})},{path:"/pricing",label:"Pricing",icon:s.jsx(Rs,{className:"h-4 w-4"})},{path:"/deployment",label:"Deployment Services",icon:s.jsx(Ot,{className:"h-4 w-4"})}],p=[{path:"/dashboard",label:"Dashboard",icon:s.jsx(el,{className:"h-4 w-4"})},{path:"/agent-builder/new",label:"Agent Builder",icon:s.jsx(so,{className:"h-4 w-4"})},{path:"/resources",label:"Resources",icon:s.jsx(Dh,{className:"h-4 w-4"})},{path:"/pricing",label:"Pricing",icon:s.jsx(Rs,{className:"h-4 w-4"})},{path:"/deployment",label:"Deployment Services",icon:s.jsx(Ot,{className:"h-4 w-4"})},{path:"/account-profile",label:"Settings",icon:s.jsx(Kt,{className:"h-4 w-4"})}],v=[{path:"/faq",label:"FAQ",icon:s.jsx(Ko,{className:"h-4 w-4"}),isExternal:!1},{path:"https://calendly.com/flo-ops/privion-onboarding",label:"Contact our support",icon:s.jsx(Qg,{className:"h-4 w-4"}),isExternal:!0},{path:"/contact-us",label:"Contact us",icon:s.jsx(Ko,{className:"h-4 w-4"}),isExternal:!1}],y=x=>u.pathname===x||u.pathname.startsWith(x+"/");return s.jsxs(s.Fragment,{children:[s.jsx("nav",{className:"fixed top-0 left-0 right-0 z-50 bg-white/95 dar
1072k:bg-slate-900/95 backdrop-blur-sm border-b border-[hsl(var(--nav-gradient-start)/0.2)] dark:border-[hsl(var(--nav-gradient-end)/0.3)]",children:s.jsx("div",{className:"container mx-auto px-6",children:s.jsxs("div",{className:"flex items-center justify-between h-16",children:[s.jsxs(Vn,{to:"/",className:"flex items-center space-x-2",children:[s.jsx("img",{src:"/lovable-uploads/e498381a-164f-438e-a314-a08cf3313d3b.png?v=real",alt:"Privion Logo",className:"w-8 h-8 object-contain",onError:x=>{var w;x.currentTarget.style.display="none",(w=x.currentTarget.nextElementSibling)==null||w.classList.remove("hidden")}}),s.jsx("span",{className:"text-xl font-bold gradient-text",children:"Privion"})]}),s.jsx("div",{className:"flex items-center gap-4",children:o?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"hidden md:flex items-center gap-3",children:p.map(x=>s.jsx(Vn,{to:x.path,children:s.jsxs(Y,{variant:y(x.path)?"secondary":"ghost",className:`flex items-center gap-2 ${y(x.path)?"bg-gradient-to-r from-[hsl(var(--nav-gradient-start))] to-[hsl(var(--nav-gradient-end))] text-white":"text-gray-600 dark:text-gray-300 hover:bg-gradient-to-r hover:from-[hsl(var(--nav-gradient-start)/0.1)] hover:to-[hsl(var(--nav-gradient-end)/0.1)]"}`,children:[x.icon,x.label,x.badge&&s.jsx(le,{className:"ml-1 nav-gradient text-white text-xs",children:x.badge})]})},x.path))}),s.jsx("div",{className:"hidden md:flex",children:s.jsxs(lg,{children:[s.jsx(cg,{asChild:!0,children:s.jsxs(Y,{variant:"ghost",className:"flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:bg-gradient-to-r hover:from-[hsl(var(--nav-gradient-start)/0.1)] hover:to-[hsl(var(--nav-gradient-end)/0.1)]",children:[s.jsx(Ko,{className:"h-4 w-4"}),s.jsx(po,{className:"h-3 w-3"})]})}),s.jsx(Hf,{align:"end",className:"z-50 w-48 bg-white/95 dark:bg-slate-800/95 backdrop-blur-sm border border-gray-200 dark:border-slate-700 shadow-xl",children:v.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>{x.isExternal?i(!0):c(x.path)},children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label})]})}),w<v.length-1&&s.jsx(pa,{})]},x.path))})]})}),s.jsx("div",{className:"hidden md:flex",children:s.jsx(zje,{})}),s.jsxs(lg,{children:[s.jsx(cg,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"md:hidden",children:s.jsx(E$,{className:"h-5 w-5"})})}
1072),s.jsxs(Hf,{align:"end",className:"z-50 w-56 bg-white/95 dark:bg-slate-800/95 backdrop-blur-sm border border-gray-200 dark:border-slate-700 shadow-xl md:hidden",children:[p.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>c(x.path),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label}),x.badge&&s.jsx(le,{className:"ml-auto nav-gradient text-white text-xs",children:x.badge})]})}),w<p.length-1&&s.jsx(pa,{})]},x.path)),s.jsx(pa,{}),v.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>{x.isExternal?i(!0):c(x.path)},children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label})]})}),w<v.length-1&&s.jsx(pa,{})]},x.path)),s.jsx(pa,{}),s.jsx(xa,{className:"cursor-pointer",onClick:f,children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsx(XO,{className:"h-4 w-4"}),s.jsx("span",{children:"Sign out"})]})})]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"hidden md:flex items-center gap-3",children:m.map(x=>s.jsx(Vn,{to:x.path,children:s.jsxs(Y,{variant:y(x.path)?"secondary":"ghost",className:`flex items-center gap-2 ${y(x.path)?"bg-gradient-to-r from-[hsl(var(--nav-gradient-start))] to-[hsl(var(--nav-gradient-end))] text-white":"text-gray-600 dark:text-gray-300 hover:bg-gradient-to-r hover:from-[hsl(var(--nav-gradient-start)/0.1)] hover:to-[hsl(var(--nav-gradient-end)/0.1)]"}`,children:[x.icon,x.label,x.badge&&s.jsx(le,{className:"ml-1 nav-gradient text-white text-xs",children:x.badge})]})},x.path))}),s.jsx("div",{className:"hidden md:flex",children:s.jsxs(lg,{children:[s.jsx(cg,{asChild:!0,children:s.jsxs(Y,{variant:"ghost",className:"flex items-center gap-2 text-gray-600 dark:text-gray-300 hover:bg-gradient-to-r hover:from-[hsl(var(--nav-gradient-start)/0.1)] hover:to-[hsl(var(--nav-gradient-end)/0.1)]",children:[s.jsx(Ko,{className:"h-4 w-4"}),s.jsx(po,{className:"h-3 w-3"})]})}),s.jsx(Hf,{align:"end",className:"z-50 w-48 bg-white/95 dark:bg-slate-800/95 backdrop-blur-sm border border-gray-200 dark:border-slate-700 shadow-xl",children:v.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>{x.isExternal?i(!0):c(x.path)},children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label})]})}),w<v.length-1&&s.jsx(pa,{})]},x.path))})]})}),s.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[s.jsx(Y,{variant:"ghost",onClick:()=>r(!0),className:"text-gray-600 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-slate-800",children:"Sign In"}),s.jsxs(Y,{onClick:()=>i(!0),className:"nav-gradient hover:nav-gradient-hover text-white shadow-lg",children:[s.jsx(it,{className:"h-4 w-4 mr-2"}),"Request Access"]})]}),s.jsxs(lg,{children:[s.jsx(cg,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"md:hidden",children:s.jsx(E$,{className:"h-5 w-5"})})}
1072),s.jsxs(Hf,{align:"end",className:"z-50 w-56 bg-white/95 dark:bg-slate-800/95 backdrop-blur-sm border border-gray-200 dark:border-slate-700 shadow-xl md:hidden",children:[m.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>c(x.path),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label}),x.badge&&s.jsx(le,{className:"ml-auto nav-gradient text-white text-xs",children:x.badge})]})}),w<m.length-1&&s.jsx(pa,{})]},x.path)),s.jsx(pa,{}),v.map((x,w)=>s.jsxs("div",{children:[s.jsx(xa,{className:"cursor-pointer",onClick:()=>{x.isExternal?i(!0):c(x.path)},children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[x.icon,s.jsx("span",{children:x.label})]})}),w<v.length-1&&s.jsx(pa,{})]},x.path)),s.jsx(pa,{}),s.jsx(xa,{className:"cursor-pointer",onClick:()=>r(!0),children:s.jsx("div",{className:"flex items-center gap-2 w-full",children:s.jsx("span",{children:"Sign In"})})}),s.jsx(xa,{className:"cursor-pointer",onClick:()=>i(!0),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsx(ii,{className:"h-4 w-4"}),s.jsx("span",{children:"Get Started"})]})})]})]})]})})]})})}),s.jsx(S1e,{isOpen:n,onClose:()=>r(!1),onOpenCalendly:()=>{r(!1),i(!0)}}),s.jsx(Uc,{isOpen:a,onClose:()=>i(!1)})]})},k1e={small:"/lovable-uploads/57cd5b5e-e744-4ff5-b9d9-40809266209d.png?v=real",medium:"/lovable-uploads/e498381a-164f-438e-a314-a08cf3313d3b.png?v=real",large:"/lovable-uploads/64126210-905e-41a8-9b3b-9a2ba15fa281.png?v=real"},Rv={small:"h-6 w-6",medium:"h-8 w-8",large:"h-12 w-12"},wr=({variant:e="default",size:t="medium",className:n,animated:r=!0})=>{const[a,i]=b.useState(!1),[o,l]=b.useState(!1),c=k1e[t];b.useEffect(()=>{console.log("🔷 Logo: Loading Privion hexagonal P logo:",c),i(!1),l(!1)},[c]);const u=f=>{console.error("❌ Logo: Failed to load Privion logo:",f),i(!0)},d=()=>{console.log("✅ Logo: Successfully loaded Privion logo"),l(!0),i(!1)};return a?s.jsx("div",{className:He("flex items-center justify-center bg-gradient-to-br from-blue-500 to-cyan-600 rounded-full text-white font-bold shadow-md",Rv[t],r&&"transition-transform duration-200 hover:scale-110",n),children:s.jsx("span",{className:"text-xs",children:"P"})}):s.jsxs("div",{className:He("flex items-center justify-center overflow-hidden",Rv[t],r&&"transition-transform duration-200 hover:scale-110",n),children:[s.jsx("img",{src:c,alt:"Privion Logo",className:He("object-contain",Rv[t]),onError:u,onLoad:d}),!o&&!a&&s.jsx("div",{className:He("absolute inset-0 flex items-center justify-center bg-gray-100 dark:bg-gray-800 rounded-full animate-pulse",Rv[t]),children:s.jsx("span",{className:"text-xs text-gray-400",children:"P"})})]})},Cn=()=>s.jsx("footer",{className:"border-t border-border/40 glass-effect-enhanced mt-20",children:s.jsxs("div",{className:"container mx-auto px-4 py-12",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(wr,{variant:"compact",size:"medium",animated:!0}),s.jsx("span",{className:"font-bold text-xl gradient-text",children:"Privion"})]}),s.jsx("p",{className:"text-sm text-readable-muted",children:"Operational AI for engineering-led manufacturing, OEMs, and industrial automation organizations."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"font-semibold gradient-text",children:"Product"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Vn,{to:"/faq",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"FAQ"}),s.jsx(Vn,{to:"/resources",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Resources"}),s.jsx(Vn,{to:"/pricing",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Pricing"}),s.jsx(Vn,{to:"/contact-us",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Contact Us"}),s.jsx(Vn,{to:"/deployment",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Deployment"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"font-semibold gradient-text",children:"Legal"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(Vn,{to:"/privacy-policy",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Privacy Policy"}),s.jsx(Vn,{to:"/terms-of-service",className:"block text-sm text-readable-muted hover:text-cyber-cyan transition-colors",children:"Terms of Service"})]})]})]}),s.jsx("div",{className:"border-t border-border/40 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center",children:s.jsxs("div",{className:"text-sm text-muted-foreground mb-4 md:mb-0",children:["© ",new Date().getFullYear()," Privion L.L.
1072C. All rights reserved."]})})]})});function nx(e,[t,n]){return Math.min(n,Math.max(t,e))}function v1(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var lQ=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"}),C1e="VisuallyHidden",b1=b.forwardRef((e,t)=>s.jsx(Ve.span,{...e,ref:t,style:{...lQ,...e.style}}));b1.displayName=C1e;var _1e=b1,cQ=a1(),v2=function(){},w1=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:v2,onWheelCapture:v2,onTouchMoveCapture:v2}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,N=w===void 0?"div":w,S=e.gapMode,_=Sy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,C=s1([n,t]),E=wn(wn({},_),a);return b.createElement(b.Fragment,null,d&&b.createElement(k,{sideCar:cQ,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:S}),o?b.cloneElement(b.Children.only(l),wn(wn({},E),{ref:C})):b.createElement(N,wn({},E,{className:c,ref:C}),l))});w1.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};w1.classNames={fullWidth:Ku,zeroRight:Gu};var wT=!1;if(typeof window<"u")try{var Dv=Object.defineProperty({},"passive",{get:function(){return wT=!0,!0}});window.addEventListener("test",Dv,Dv),window.removeEventListener("test",Dv,Dv)}catch{wT=!1}var Ef=wT?{passive:!1}:!1,A1e=function(e){return e.tagName==="TEXTAREA"},uQ=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!A1e(e)&&n[t]==="visible")},E1e=function(e){return uQ(e,"overflowY")},P1e=function(e){return uQ(e,"overflowX")},D$=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=dQ(e,r);if(a){var i=fQ(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},T1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},I1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dQ=function(e,t){return e==="v"?E1e(t):P1e(t)},fQ=function(e,t){return e==="v"?T1e(t):I1e(t)},O1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},M1e=function(e,t,n,r,a){var i=O1e(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,f=0,m=0;do{if(!l)break;var p=fQ(e,l),v=p[0],y=p[1],x=p[2],w=y-x-i*v;(v||w)&&dQ(e,l)&&(f+=w,m+=v);var N=l.parentNode;l=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},Lv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},L$=function(e){return[e.deltaX,e.deltaY]},$$=function(e){return e&&"current"in e?e.current:e},R1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},D1e=function(e){return`
1073  .block-interactivity-`.concat(e,` {pointer-events: none;}
1074  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1075`)},L1e=0,Pf=[];function $1e(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(L1e++)[0],i=b.useState(ky)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var y=r1([e.lockRef.current],(e.shards||[]).map($$),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=b.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=Lv(y),N=n.current,S="deltaX"in y?y.deltaX:N[0]-w[0],_="deltaY"in y?y.deltaY:N[1]-w[1],k,C=y.target,E=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in y&&E==="h"&&C.type==="range")return!1;var O=D$(E,C);if(!O)return!0;
vendor: 4,162 bytes, line 1075
1075if(O?k=E:(k=E==="v"?"h":"v",O=D$(E,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(S||_)&&(r.current=k),!k)return!0;var P=r.current||k;return M1e(P,x,y,P==="h"?S:_)},[]),c=b.useCallback(function(y){var x=y;if(!(!Pf.length||Pf[Pf.length-1]!==i)){var w="deltaY"in x?L$(x):Lv(x),N=t.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&R1e(k.delta,w)})[0];if(N&&N.should){x.cancelable&&x.preventDefault();return}if(!N){var S=(o.current.shards||[]).map($$).filter(Boolean).filter(function(k){return k.contains(x.target)}),_=S.length>0?l(x,S[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(y,x,w,N){var S={name:y,delta:x,target:w,should:N,shadowParent:F1e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=b.useCallback(function(y){n.current=Lv(y),r.current=void 0},[]),f=b.useCallback(function(y){u(y.type,L$(y),y.target,l(y,e.lockRef.current))},[]),m=b.useCallback(function(y){u(y.type,Lv(y),y.target,l(y,e.lockRef.current))},[]);b.useEffect(function(){return Pf.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Ef),document.addEventListener("touchmove",c,Ef),document.addEventListener("touchstart",d,Ef),function(){Pf=Pf.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ef),document.removeEventListener("touchmove",c,Ef),document.removeEventListener("touchstart",d,Ef)}},[]);var p=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:D1e(a)}):null,p?b.createElement(l1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function F1e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const z1e=i1(cQ,$1e);var hQ=b.forwardRef(function(e,t){return b.createElement(w1,wn({},e,{ref:t,sideCar:z1e}))});hQ.classNames=w1.classNames;var B1e=[" ","Enter","ArrowUp","ArrowDown"],U1e=[" ","Enter"],md="Select",[j1,N1,H1e]=zm(md),[Vm]=Mr(md,[H1e,Bc]),S1=Bc(),[q1e,Hc]=Vm(md),[V1e,W1e]=Vm(md),mQ=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:d,autoComplete:f,disabled:m,required:p,form:v}=e,y=S1(t),[x,w]=b.useState(null),[N,S]=b.useState(null),[_,k]=b.useState(!1),C=Md(u),[E,O]=$s({prop:r,defaultProp:a??!1,onChange:i,caller:md}),[P,R]=$s({prop:o,defaultProp:l,onChange:c,caller:md}),T=b.useRef(null),D=x?v||!!x.closest("form"):!0,[z,I]=b.useState(new Set),F=Array.from(z).map(U=>U.props.value).join(";");return s.jsx(Zj,{...y,children:s.jsxs(q1e,{required:p,scope:t,trigger:x,onTriggerChange:w,valueNode:N,onValueNodeChange:S,valueNodeHasChildren:_,onValueNodeHasChildrenChange:k,contentId:na(),value:P,onValueChange:R,open:E,onOpenChange:O,dir:C,triggerPointerDownPosRef:T,disabled:m,children:[s.jsx(j1.Provider,{scope:t,children:s.jsx(V1e,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(U=>{I(H=>new Set(H).add(U))},[]),onNativeOptionRemove:b.useCallback(U=>{I(H=>{const q=new Set(H);return q.delete(U),q})},[]),children:n})}),D?s.jsxs($Q,{"aria-hidden":!0,required:p,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:U=>R(U.target.value),disabled:m,form:v,children:[P===void 0?s.jsx("option",{value:""}):null,Array.from(z)]},F):null]})})};mQ.displayName=md;var pQ="SelectTrigger",gQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,i=S1(n),o=Hc(pQ,n),l=o.disabled||r,c=gt(t,o.onTriggerChange),u=N1(n),d=b.useRef("touch"),[f,m,p]=zQ(y=>{const x=u().filter(S=>!S.disabled),w=x.find(S=>S.value===o.value),N=BQ(x,y,w);N!==void 0&&o.onValueChange(N.value)}),v=y=>{l||(o.onOpenChange(!0),p()),y&&(o.triggerPointerDownPosRef.current={x:Math.round(y.pageX),y:Math.round(y.pageY)})};return s.jsx(jy,{asChild:!0,...i,children:s.jsx(Ve.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":FQ(o.value)?"":void 0,...a,ref:c,onClick:Oe(a.onClick,y=>
vendor: 14,303 bytes, line 1075
1075{y.currentTarget.focus(),d.current!=="mouse"&&v(y)}),onPointerDown:Oe(a.onPointerDown,y=>{d.current=y.pointerType;const x=y.target;x.hasPointerCapture(y.pointerId)&&x.releasePointerCapture(y.pointerId),y.button===0&&y.ctrlKey===!1&&y.pointerType==="mouse"&&(v(y),y.preventDefault())}),onKeyDown:Oe(a.onKeyDown,y=>{const x=f.current!=="";!(y.ctrlKey||y.altKey||y.metaKey)&&y.key.length===1&&m(y.key),!(x&&y.key===" ")&&B1e.includes(y.key)&&(v(),y.preventDefault())})})})});gQ.displayName=pQ;var xQ="SelectValue",yQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:o="",...l}=e,c=Hc(xQ,n),{onValueNodeHasChildrenChange:u}=c,d=i!==void 0,f=gt(t,c.onValueNodeChange);return cr(()=>{u(d)},[u,d]),s.jsx(Ve.span,{...l,ref:f,style:{pointerEvents:"none"},children:FQ(c.value)?s.jsx(s.Fragment,{children:o}):i})});yQ.displayName=xQ;var G1e="SelectIcon",vQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return s.jsx(Ve.span,{"aria-hidden":!0,...a,ref:t,children:r||"▼"})});vQ.displayName=G1e;var K1e="SelectPortal",bQ=e=>s.jsx(Dd,{asChild:!0,...e});bQ.displayName=K1e;var pd="SelectContent",wQ=b.forwardRef((e,t)=>{const n=Hc(pd,e.__scopeSelect),[r,a]=b.useState();if(cr(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?Td.createPortal(s.jsx(jQ,{scope:e.__scopeSelect,children:s.jsx(j1.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(NQ,{...e,ref:t})});wQ.displayName=pd;var ji=10,[jQ,qc]=Vm(pd),Y1e="SelectContentImpl",X1e=Tc("SelectContent.RemoveScroll"),NQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:v,hideWhenDetached:y,avoidCollisions:x,...w}=e,N=Hc(pd,n),[S,_]=b.useState(null),[k,C]=b.useState(null),E=gt(t,J=>_(J)),[O,P]=b.useState(null),[R,T]=b.useState(null),D=N1(n),[z,I]=b.useState(!1),F=b.useRef(!1);b.useEffect(()=>{if(S)return n1(S)},[S]),Wj();const U=b.useCallback(J=>{const[ne,...Z]=D().map(Q=>Q.ref.current),[oe]=Z.slice(-1),he=document.activeElement;for(const Q of J)if(Q===he||(Q==null||Q.scrollIntoView({block:"nearest"}),Q===ne&&k&&(k.scrollTop=0),Q===oe&&k&&(k.scrollTop=k.scrollHeight),Q==null||Q.focus(),document.activeElement!==he))return},[D,k]),H=b.useCallback(()=>U([O,S]),[U,O,S]);b.useEffect(()=>{z&&H()},[z,H]);const{onOpenChange:q,triggerPointerDownPosRef:B}=N;b.useEffect(()=>{if(S){let J={x:0,y:0};const ne=oe=>{var he,Q;J={x:Math.abs(Math.round(oe.pageX)-(((he=B.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(oe.pageY)-(((Q=B.current)==null?void 0:Q.y)??0))}},Z=oe=>{J.x<=10&&J.y<=10?oe.preventDefault():S.contains(oe.target)||q(!1),document.removeEventListener("pointermove",ne),B.current=null};return B.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",Z,{capture:!0})}}},[S,q,B]),b.useEffect(()=>{const J=()=>q(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[q]);const[L,V]=zQ(J=>{const ne=D().filter(he=>!he.disabled),Z=ne.find(he=>he.ref.current===document.activeElement),oe=BQ(ne,J,Z);oe&&setTimeout(()=>oe.ref.current.focus())}),K=b.useCallback((J,ne,Z)=>{const oe=!F.current&&!Z;(N.value!==void 0&&N.value===ne||oe)&&(P(J),oe&&(F.current=!0))},[N.value]),W=b.useCallback(()=>S==null?void 0:S.focus(),[S]),ie=b.useCallback((J,ne,Z)=>{const oe=!F.current&&!Z;(N.value!==void 0&&N.value===ne||oe)&&T(J)},[N.value]),ve=r==="popper"?jT:SQ,ge=ve===jT?{side:l,sideOffset:c,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:m,collisionPadding:p,sticky:v,hideWhenDetached:y,avoidCollisions:x}:{};return s.jsx(jQ,{scope:n,content:S,viewport:k,onViewportChange:C,itemRefCallback:K,selectedItem:O,onItemLeave:W,itemTextRefCallback:ie,focusSelectedItem:H,selectedItemText:R,position:r,isPositioned:z,searchRef:L,children:s.jsx(hQ,{as:X1e,allowPinchZoom:!0,children:s.jsx(by,{asChild:!0,trapped:N.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:Oe(a,J=>{var ne;(ne=N.trigger)==null||ne.focus({preventScroll:!0}),J.preventDefault()}),children:s.jsx(Rd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:s.jsx(ve,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:J=>J.preventDefault(),...w,...ge,onPlaced:()=>I(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Oe(w.onKeyDown,J=>{const ne=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!ne&&J.key.length===1&&V(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let oe=D().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(J.key)&&(oe=oe.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const he=J.target,Q=oe.indexOf(he);oe=oe.slice(Q+1)}setTimeout(()=>U(oe)),J.preventDefault()}})})})})})})});NQ.displayName=Y1e;var Q1e="SelectItemAlignedPosition",SQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,i=Hc(pd,n),o=qc(pd,n),[l,c]=b.useState(null),[u,d]=b.useState(null),f=gt(t,E=>d(E)),m=N1(n),p=b.useRef(!1),v=b.useRef(!0),{viewport:y,selectedItem:x,selectedItemText:w,focusSelectedItem:N}=o,S=b.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&y&&x&&w){const E=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),P=i.valueNode.getBoundingClientRect(),R=w.getBoundingClientRect();if(i.dir!=="rtl"){const he=R.left-O.left,Q=P.left-he,ae=E.left-Q,fe=E.width+ae,Ee=Math.max(fe,O.width),Re=window.innerWidth-ji,qe=nx(Q,[ji,Math.max(ji,Re-Ee)]);l.style.minWidth=fe+"px",l.style.left=qe+"px"}else{const he=O.right-R.right,Q=window.innerWidth-P.right-he,ae=window.innerWidth-E.right-Q,fe=E.width+ae,Ee=Math.max(fe,O.width),Re=window.innerWidth-ji,qe=nx(Q,[ji,Math.max(ji,Re-Ee)]);l.style.minWidth=fe+"px",l.style.right=qe+"px"}const T=m(),D=window.innerHeight-ji*2,z=y.scrollHeight,I=window.getComputedStyle(u),F=parseInt(I.borderTopWidth,10),U=parseInt(I.paddingTop,10),H=parseInt(I.borderBottomWidth,10),q=parseInt(I.paddingBottom,10),B=F+U+z+q+H,L=Math.min(x.offsetHeight*5,B),V=window.getComputedStyle(y),K=parseInt(V.paddingTop,10),W=parseInt(V.paddingBottom,10),ie=E.top+E.height/2-ji,ve=D-ie,ge=x.offsetHeight/2,J=x.offsetTop+ge,ne=F+U+J,Z=B-ne;if(ne<=ie){const he=T.length>0&&x===T[T.length-1].ref.current;l.style.bottom="0px";const Q=u.clientHeight-y.offsetTop-y.offsetHeight,ae=Math.max(ve,ge+(he?W:0)+Q+H),fe=ne+ae;l.style.height=fe+"px"}else{const he=T.length>0&&x===T[0].ref.current;l.style.top="0px";const ae=Math.max(ie,F+y.offsetTop+(he?K:0)+ge)+Z;l.style.height=ae+"px",y.scrollTop=ne-ie+y.offsetTop}l.style.margin=`${ji}px 0`,l.style.minHeight=L+"px",l.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[m,i.trigger,i.valueNode,l,u,y,x,w,i.dir,r]);cr(()=>S(),[S]);const[_,k]=b.useState();cr(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const C=b.useCallback(E=>{E&&v.current===!0&&(S(),N==null||N(),v.current=!1)},[S,N]);return s.jsx(J1e,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:s.jsx(Ve.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});SQ.displayName=Q1e;var Z1e="SelectPopperPosition",jT=b.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=ji,...i}=e,o=S1(n);return s.jsx(Jj,{...o,...i,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...i.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)"}})});jT.displayName=Z1e;var[J1e,iM]=Vm(pd,{}),NT="SelectViewport",kQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...a}=e,i=qc(NT,n),o=iM(NT,n),l=gt(t,i.onViewportChange),c=b.useRef(0);return s.jsxs(s.Fragment,{children:[s.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}),s.jsx(j1.Slot,{scope:n,children:s.jsx(Ve.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Oe(a.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&f){const p=Math.abs(c.current-d.scrollTop);if(p>0){const v=window.innerHeight-ji*2,y=parseFloat(f.style.minHeight),x=parseFloat(f.style.height),w=Math.max(y,x);if(w<v){const N=w+p,S=Math.min(v,N),_=N-S;f.style.height=S+"px",f.style.bottom==="0px"&&(d.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});kQ.displayName=NT;var CQ="SelectGroup",[eNe,tNe]=Vm(CQ),nNe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=na();return s.jsx(eNe,{scope:n,id:a,children:s.jsx(Ve.div,{role:"group","aria-labelledby":a,...r,ref:t})})});nNe.displayName=CQ;var _Q="SelectLabel",AQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=tNe(_Q,n);return s.jsx(Ve.div,{id:a.id,...r,ref:t})});AQ.displayName=_Q;var fw="SelectItem",[rNe,EQ]=Vm(fw),PQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...o}=e,l=Hc(fw,n),c=qc(fw,n),u=l.value===r,[d,f]=b.useState(i??""),[m,p]=b.useState(!1),v=gt(t,N=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,N,r,a)}),y=na(),x=b.useRef("touch"),w=()=>{a||(l.onValueChange(r),l.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 s.jsx(rNe,{scope:n,value:r,disabled:a,textId:y,isSelected:u,onItemTextChange:b.useCallback(N=>{f(S=>S||((N==null?void 0:N.textContent)??"").trim())},[]),children:s.jsx(j1.ItemSlot,{scope:n,value:r,disabled:a,textValue:d,children:s.jsx(Ve.div,{role:"option","aria-labelledby":y,"data-highlighted":m?"":void 0,"aria-selected":u&&m,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:v,onFocus:Oe(o.onFocus,()=>p(!0)),onBlur:Oe(o.onBlur,()=>p(!1)),onClick:Oe(o.onClick,()=>{x.current!=="mouse"&&w()}),onPointerUp:Oe(o.onPointerUp,()=>{x.current==="mouse"&&w()}),onPointerDown:Oe(o.onPointerDown,N=>{x.current=N.pointerType}),onPointerMove:Oe(o.onPointerMove,N=>{var S;x.current=N.pointerType,a?(S=c.onItemLeave)==null||S.call(c):x.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Oe(o.onPointerLeave,N=>{var S;N.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:Oe(o.onKeyDown,N=>{var _;((_=c.searchRef)==null?void 0:_.current)!==""&&N.key===" "||(U1e.includes(N.key)&&w(),N.key===" "&&N.preventDefault())})})})})});PQ.displayName=fw;var ug="SelectItemText",TQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:a,...i}=e,o=Hc(ug,n),l=qc(ug,n),c=EQ(ug,n),u=W1e(ug,n),[d,f]=b.useState(null),m=gt(t,w=>f(w),c.onItemTextChange,w=>{var N;return(N=l.itemTextRefCallback)==null?void 0:N.call(l,w,c.value,c.disabled)}),p=d==null?void 0:d.textContent,v=b.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:y,onNativeOptionRemove:x}=u;return cr(()=>(y(v),()=>x(v)),[y,x,v]),s.jsxs(s.Fragment,{children:[s.jsx(Ve.span,{id:c.textId,...i,ref:m}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Td.createPortal(i.children,o.valueNode):null]})});TQ.displayName=ug;var IQ="SelectItemIndicator",OQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return EQ(IQ,n).isSelected?s.jsx(Ve.span,{"aria-hidden":!0,...r,ref:t}):null});OQ.displayName=IQ;var ST="SelectScrollUpButton",MQ=b.forwardRef((e,t)=>{const n=qc(ST,e.__scopeSelect),r=iM(ST,e.__scopeSelect),[a,i]=b.useState(!1),o=gt(t,r.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(DQ,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});MQ.displayName=ST;var kT="SelectScrollDownButton",RQ=b.forwardRef((e,t)=>{const n=qc(kT,e.__scopeSelect),r=iM(kT,e.__scopeSelect),[a,i]=b.useState(!1),o=gt(t,r.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;i(d)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?s.jsx(DQ,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});RQ.displayName=kT;var DQ=b.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,i=qc("SelectScrollButton",n),o=b.useRef(null),l=N1(n),c=b.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),cr(()=>{var d;const u=l().find(f=>f.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),s.jsx(Ve.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Oe(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Oe(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Oe(a.onPointerLeave,()=>{c()})})}),sNe="SelectSeparator",LQ=b.forwardRef((e,t)=>
vendor: 4,702 bytes, line 1075
1075{const{__scopeSelect:n,...r}=e;return s.jsx(Ve.div,{"aria-hidden":!0,...r,ref:t})});LQ.displayName=sNe;var CT="SelectArrow",aNe=b.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,a=S1(n),i=Hc(CT,n),o=qc(CT,n);return i.open&&o.position==="popper"?s.jsx(e1,{...a,...r,ref:t}):null});aNe.displayName=CT;var iNe="SelectBubbleInput",$Q=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const a=b.useRef(null),i=gt(r,a),o=v1(t);return b.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const f=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[o,t]),s.jsx(Ve.select,{...n,style:{...lQ,...n.style},ref:i,defaultValue:t})});$Q.displayName=iNe;function FQ(e){return e===""||e===void 0}function zQ(e){const t=lr(e),n=b.useRef(""),r=b.useRef(0),a=b.useCallback(o=>{const l=n.current+o;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),i=b.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function BQ(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=oNe(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function oNe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lNe=mQ,UQ=gQ,cNe=yQ,uNe=vQ,dNe=bQ,HQ=wQ,fNe=kQ,qQ=AQ,VQ=PQ,hNe=TQ,mNe=OQ,WQ=MQ,GQ=RQ,KQ=LQ;const dt=lNe,ft=cNe,ot=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(UQ,{ref:r,className:He("flex h-10 w-full items-center justify-between rounded-md border-2 border-gray-300 dark:border-gray-500 bg-white/90 dark:bg-gray-800/90 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 ring-offset-background placeholder:text-gray-500 dark:placeholder:text-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 focus:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 transition-all duration-200 shadow-sm",e),...n,children:[t,s.jsx(uNe,{asChild:!0,children:s.jsx(po,{className:"h-4 w-4 opacity-50"})})]}));ot.displayName=UQ.displayName;const YQ=b.forwardRef(({className:e,...t},n)=>s.jsx(WQ,{ref:n,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(cX,{className:"h-4 w-4"})}));YQ.displayName=WQ.displayName;const XQ=b.forwardRef(({className:e,...t},n)=>s.jsx(GQ,{ref:n,className:He("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(po,{className:"h-4 w-4"})}));XQ.displayName=GQ.displayName;const lt=b.forwardRef(({className:e,children:t,position:n="popper",...r},a)=>s.jsx(dNe,{children:s.jsxs(HQ,{ref:a,className:He("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border-2 border-gray-300 dark:border-gray-500 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-lg 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:[s.jsx(YQ,{}),s.jsx(fNe,{className:He("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(XQ,{})]})}));lt.displayName=HQ.displayName;const pNe=b.forwardRef(({className:e,...t},n)=>s.jsx(qQ,{ref:n,className:He("py-1.5 pl-8 pr-2 text-sm font-semibold text-gray-900 dark:text-gray-100",e),...t}));pNe.displayName=qQ.displayName;const me=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(VQ,{ref:r,className:He("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-gray-900 dark:text-gray-100 outline-none focus:bg-blue-50 dark:focus:bg-blue-900/20 focus:text-blue-900 dark:focus:text-blue-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 hover:bg-gray-50 dark:hover:bg-gray-700/50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(mNe,{children:s.jsx(mo,{className:"h-4 w-4"})})}),s.jsx(hNe,{children:t})]}));me.displayName=VQ.displayName;const gNe=b.forwardRef(({className:e,...t},n)=>s.jsx(KQ,{ref:n,className:He("-mx-1 my-1 h-px bg-gray-200 dark:bg-gray-600",e),...t}));
1075gNe.displayName=KQ.displayName;const Ty=({isOpen:e,onClose:t})=>{const[n,r]=b.useState({firstName:"",lastName:"",email:"",company:"",role:"",teamSize:"",urgency:""}),[a,i]=b.useState(!1),{toast:o}=_t(),l=async c=>{c.preventDefault(),i(!0),setTimeout(()=>{o({title:"Demo Request Received! 📅",description:"Our team will contact you within 24 hours to schedule your personalized demo."}),i(!1),t(),r({firstName:"",lastName:"",email:"",company:"",role:"",teamSize:"",urgency:""})},1500)};return s.jsx(qm,{open:e,onOpenChange:t,children:s.jsxs(zd,{className:"glass-effect-dark max-w-md mx-auto",children:[s.jsxs(Bd,{className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center mb-4",children:[s.jsx(Qg,{className:"h-8 w-8 text-primary-foreground ai-glow mr-2"}),s.jsx(Ud,{className:"text-2xl font-bold gradient-text gradient-text-dark",children:"Request Demo Access"}),s.jsx(zn,{className:"h-4 w-4 text-cyber-blue animate-pulse ml-2"})]}),s.jsx(rM,{className:"text-primary-foreground/80",children:"Get a personalized demo of Privion tailored to your organization's needs"})]}),s.jsxs("form",{onSubmit:l,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"firstName",className:"text-sm font-medium",children:"First Name"}),s.jsx(_e,{id:"firstName",value:n.firstName,onChange:c=>r(u=>({...u,firstName:c.target.value})),required:!0,className:"glass-effect-dark text-primary-foreground"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"lastName",className:"text-sm font-medium",children:"Last Name"}),s.jsx(_e,{id:"lastName",value:n.lastName,onChange:c=>r(u=>({...u,lastName:c.target.value})),required:!0,className:"glass-effect-dark text-primary-foreground"})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"email",className:"text-sm font-medium",children:"Work Email"}),s.jsx(_e,{id:"email",type:"email",value:n.email,onChange:c=>r(u=>({...u,email:c.target.value})),required:!0,className:"glass-effect-dark text-primary-foreground"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"company",className:"text-sm font-medium",children:"Organization"}),s.jsx(_e,{id:"company",value:n.company,onChange:c=>r(u=>({...u,company:c.target.value})),required:!0,className:"glass-effect-dark text-primary-foreground"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"role",className:"text-sm font-medium",children:"Your Role"}),s.jsxs(dt,{value:n.role,onValueChange:c=>r(u=>({...u,role:c})),children:[s.jsx(ot,{className:"glass-effect-dark text-primary-foreground",children:s.jsx(ft,{placeholder:"Select your role"})}),s.jsxs(lt,{className:"glass-effect-dark text-primary-foreground",children:[s.jsx(me,{value:"cio",children:"CIO / CTO"}),s.jsx(me,{value:"it-director",children:"IT Director"}),s.jsx(me,{value:"admin",children:"Administrator"}),s.jsx(me,{value:"legal-counsel",children:"Legal Counsel"}),s.jsx(me,{value:"compliance",children:"Compliance Officer"}),s.jsx(me,{value:"other",children:"Other"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"teamSize",className:"text-sm font-medium",children:"Organization Size"}),s.jsxs(dt,{value:n.teamSize,onValueChange:c=>r(u=>({...u,teamSize:c})),children:[s.jsx(ot,{className:"glass-effect-dark text-primary-foreground",children:s.jsx(ft,{placeholder:"Select organization size"})}),s.jsxs(lt,{className:"glass-effect-dark text-primary-foreground",children:[s.jsx(me,{value:"1-50",children:"1-50 employees"}),s.jsx(me,{value:"51-200",children:"51-200 employees"}),s.jsx(me,{value:"201-1000",children:"201-1000 employees"}),s.jsx(me,{value:"1000+",children:"1000+ employees"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"urgency",className:"text-sm font-medium",children:"Timeline"}),s.jsxs(dt,{value:n.urgency,onValueChange:c=>r(u=>({...u,urgency:c})),children:[s.jsx(ot,{className:"glass-effect-dark text-primary-foreground",children:s.jsx(ft,{placeholder:"When do you need this?"})}),s.jsxs(lt,{className:"glass-effect-dark text-primary-foreground",children:[s.jsx(me,{value:"asap",children:"ASAP"}),s.jsx(me,{value:"this-quarter",children:"This quarter"}),s.jsx(me,{value:"next-quarter",children:"Next quarter"}),s.jsx(me,{value:"exploring",children:"Just exploring"})]})]})]}),s.jsx(Y,{type:"submit",disabled:a,className:"w-full bg-gradient-to-r from-blue-600 to-cyan-600 hover:from-blue-700 hover:to-cyan-700 text-white border-0 shadow-lg ai-glow-hover font-semibold transition-all duration-300 transform hover:scale-105",children:a?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Scheduling Demo..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Qg,{className:"w-4 h-4 mr-2"}),"Request Personalized Demo"]})})]}),s.jsx("div",{className:"text-center text-sm text-primary-foreground
1075/60 mt-4",children:"🎯 Tailored demo • ⚡ 24hr response • 🔒 Compliance-focused"})]})})};var xNe=e=>{switch(e){case"success":return bNe;case"info":return jNe;case"warning":return wNe;case"error":return NNe;default:return null}},yNe=Array(12).fill(0),vNe=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},yNe.map((n,r)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),bNe=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),wNe=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.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"})),jNe=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),NNe=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.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"})),SNe=X.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"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),kNe=()=>{let[e,t]=X.useState(document.hidden);return X.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},_T=1,CNe=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,a=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:_T++,i=this.toasts.find(l=>l.id===a),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:n}),{...l,...e,id:a,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:a}),a},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)=>
1075this.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(),a=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],X.isValidElement(c))a=!1,this.create({id:n,type:"default",message:c});else if(ANe(c)&&!c.ok){a=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){a=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){a=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;a&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||_T++;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}},Xs=new CNe,_Ne=(e,t)=>{let n=(t==null?void 0:t.id)||_T++;return Xs.addToast({title:e,...t,id:n}),n},ANe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ENe=_Ne,PNe=()=>Xs.toasts,TNe=()=>Xs.getActiveToasts(),INe=Object.assign(ENe,{success:Xs.success,info:Xs.info,warning:Xs.warning,error:Xs.error,custom:Xs.custom,message:Xs.message,promise:Xs.promise,dismiss:Xs.dismiss,loading:Xs.loading},{getHistory:PNe,getToasts:TNe});function ONe(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))}ONe(`: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;
1075left: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}
1075: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%);
1075--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%)}
1076`);function $v(e){return e.label!==void 0}var MNe=3,RNe="32px",DNe="16px",F$=4e3,LNe=356,$Ne=14,FNe=20,zNe=200;function bi(...e){return e.filter(Boolean).join(" ")}function BNe(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var UNe=e=>{var t,n,r,a,i,o,l,c,u,d,f;let{invert:m,toast:p,unstyled:v,interacting:y,setHeights:x,visibleToasts:w,heights:N,index:S,toasts:_,expanded:k,removeToast:C,defaultRichColors:E,closeButton:O,style:P,cancelButtonStyle:R,actionButtonStyle:T,className:D="",descriptionClassName:z="",duration:I,position:F,gap:U,loadingIcon:H,expandByDefault:q,classNames:B,icons:L,closeButtonAriaLabel:V="Close toast",pauseWhenPageIsHidden:K}=e,[W,ie]=X.useState(null),[ve,ge]=X.useState(null),[J,ne]=X.useState(!1),[Z,oe]=X.useState(!1),[he,Q]=X.useState(!1),[ae,fe]=X.useState(!1),[Ee,Re]=X.useState(!1),[qe,St]=X.useState(0),[Ut,Yt]=X.useState(0),Ue=X.useRef(p.duration||I||F$),wt=X.useRef(null),At=X.useRef(null),cn=S===0,vn=S+1<=w,ye=p.type,Ae=p.dismissible!==!1,st=p.className||"",jt=p.descriptionClassName||"",pt=X.useMemo(()=>N.findIndex(Ce=>Ce.toastId===p.id)||0,[N,p.id]),jn=X.useMemo(()=>{var Ce;return(Ce=p.closeButton)!=null?Ce:O},[p.closeButton,O]),gr=X.useMemo(()=>p.duration||I||F$,[p.duration,I]),Mn=X.useRef(0),dr=X.useRef(0),ls=X.useRef(0),un=X.useRef(null),[Dr,_n]=F.split("-"),oa=X.useMemo(()=>N.reduce((Ce,De,Ke)=>Ke>
1076=pt?Ce:Ce+De.height,0),[N,pt]),Pa=kNe(),cs=p.invert||m,Xr=ye==="loading";dr.current=X.useMemo(()=>pt*U+oa,[pt,oa]),X.useEffect(()=>{Ue.current=gr},[gr]),X.useEffect(()=>{ne(!0)},[]),X.useEffect(()=>{let Ce=At.current;if(Ce){let De=Ce.getBoundingClientRect().height;return Yt(De),x(Ke=>[{toastId:p.id,height:De,position:p.position},...Ke]),()=>x(Ke=>Ke.filter(Ht=>Ht.toastId!==p.id))}},[x,p.id]),X.useLayoutEffect(()=>{if(!J)return;let Ce=At.current,De=Ce.style.height;Ce.style.height="auto";let Ke=Ce.getBoundingClientRect().height;Ce.style.height=De,Yt(Ke),x(Ht=>Ht.find(Xt=>Xt.toastId===p.id)?Ht.map(Xt=>Xt.toastId===p.id?{...Xt,height:Ke}:Xt):[{toastId:p.id,height:Ke,position:p.position},...Ht])},[J,p.title,p.description,x,p.id]);let pe=X.useCallback(()=>{oe(!0),St(dr.current),x(Ce=>Ce.filter(De=>De.toastId!==p.id)),setTimeout(()=>{C(p)},zNe)},[p,C,x,dr]);X.useEffect(()=>{if(p.promise&&ye==="loading"||p.duration===1/0||p.type==="loading")return;let Ce;return k||y||K&&Pa?(()=>{if(ls.current<Mn.current){let De=new Date().getTime()-Mn.current;Ue.current=Ue.current-De}ls.current=new Date().getTime()})():Ue.current!==1/0&&(Mn.current=new Date().getTime(),Ce=setTimeout(()=>{var De;(De=p.onAutoClose)==null||De.call(p,p),pe()},Ue.current)),()=>clearTimeout(Ce)},[k,y,p,ye,K,Pa,pe]),X.useEffect(()=>{p.delete&&pe()},[pe,p.delete]);function Fe(){var Ce,De,Ke;return L!=null&&L.loading?X.createElement("div",{className:bi(B==null?void 0:B.loader,(Ce=p==null?void 0:p.classNames)==null?void 0:Ce.loader,"sonner-loader"),"data-visible":ye==="loading"},L.loading):H?X.createElement("div",{className:bi(B==null?void 0:B.loader,(De=p==null?void 0:p.classNames)==null?void 0:De.loader,"sonner-loader"),"data-visible":ye==="loading"},H):X.createElement(vNe,{className:bi(B==null?void 0:B.loader,(Ke=p==null?void 0:p.classNames)==null?void 0:Ke.loader),visible:ye==="loading"})}return X.createElement("li",{tabIndex:0,ref:At,className:bi(D,st,B==null?void 0:B.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[ye],(n=p==null?void 0:p.classNames)==null?void 0:n[ye]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:E,"data-styled":!(p.jsx||p.unstyled||v),"data-mounted":J,"data-promise":!!p.promise,"data-swiped":Ee,"data-removed":Z,"data-visible":vn,"data-y-position":Dr,"data-x-position":_n,"data-index":S,"data-front":cn,"data-swiping":he,"data-dismissible":Ae,"data-type":ye,"data-invert":cs,"data-swipe-out":ae,"data-swipe-direction":ve,"data-expanded":!!(k||q&&J),style:{"--index":S,"--toasts-before":S,"--z-index":_.length-S,"--offset":`${Z?qe:dr.current}px`,"--initial-height":q?"auto":`${Ut}px`,...P,...p.style},onDragEnd:()=>{Q(!1),ie(null),un.current=null},onPointerDown:Ce=>{Xr||!Ae||(wt.current=new Date,St(dr.current),Ce.target.setPointerCapture(Ce.pointerId),Ce.target.tagName!=="BUTTON"&&(Q(!0),un.current={x:Ce.clientX,y:Ce.clientY}))},onPointerUp:()=>{var Ce,De,Ke,Ht;if(ae||!Ae)return;un.current=null;let Xt=Number(((Ce=At.current)==null?void 0:Ce.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lt=Number(((De=At.current)==null?void 0:De.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),An=new Date().getTime()-((Ke=wt.current)==null?void 0:Ke.getTime()),Un=W==="x"?Xt:Lt,bt=Math.abs(Un)/An;if(Math.abs(Un)>=FNe||bt>.11){St(dr.current),(Ht=p.onDismiss)==null||Ht.call(p,p),ge(W==="x"?Xt>0?"right":"left":Lt>0?"down":"up"),pe(),fe(!0),Re(!1);return}Q(!1),ie(null)},onPointerMove:Ce=>{var De,Ke,Ht,Xt;if(!un.current||!Ae||((De=window.getSelection())==null?void 0:De.toString().length)>0)return;let Lt=Ce.clientY-un.current.y,An=Ce.clientX-un.current.x,Un=(Ke=e.swipeDirections)!=null?Ke:BNe(F);!W&&(Math.abs(An)>1||Math.abs(Lt)>1)&&ie(Math.abs(An)>Math.abs(Lt)?"x":"y");let bt={x:0,y:0};W==="y"?(Un.includes("top")||Un.includes("bottom"))&&(Un.includes("top")&&Lt<0||Un.includes("bottom")&&Lt>0)&&(bt.y=Lt):W==="x"&&(Un.includes("left")||Un.includes("right"))&&(Un.includes("left")&&An<0||Un.includes("right")&&An>0)&&(bt.x=An),(Math.abs(bt.x)>0||Math.abs(bt.y)>0)&&Re(!0),(Ht=At.current)==null||Ht.style.setProperty("--swipe-amount-x",`${bt.x}px`),(Xt=At.current)==null||Xt.style.setProperty("--swipe-amount-y",`${bt.y}px`)}},jn&&!p.jsx?X.createElement("button",{"aria-label":V,"data-disabled":Xr,"data-close-button":!0,onClick:Xr||!Ae?(
1076)=>{}:()=>{var Ce;pe(),(Ce=p.onDismiss)==null||Ce.call(p,p)},className:bi(B==null?void 0:B.closeButton,(a=p==null?void 0:p.classNames)==null?void 0:a.closeButton)},(i=L==null?void 0:L.close)!=null?i:SNe):null,p.jsx||b.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:X.createElement(X.Fragment,null,ye||p.icon||p.promise?X.createElement("div",{"data-icon":"",className:bi(B==null?void 0:B.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Fe():null,p.type!=="loading"?p.icon||(L==null?void 0:L[ye])||xNe(ye):null):null,X.createElement("div",{"data-content":"",className:bi(B==null?void 0:B.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},X.createElement("div",{"data-title":"",className:bi(B==null?void 0:B.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?X.createElement("div",{"data-description":"",className:bi(z,jt,B==null?void 0:B.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),b.isValidElement(p.cancel)?p.cancel:p.cancel&&$v(p.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:Ce=>{var De,Ke;$v(p.cancel)&&Ae&&((Ke=(De=p.cancel).onClick)==null||Ke.call(De,Ce),pe())},className:bi(B==null?void 0:B.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,b.isValidElement(p.action)?p.action:p.action&&$v(p.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||T,onClick:Ce=>{var De,Ke;$v(p.action)&&((Ke=(De=p.action).onClick)==null||Ke.call(De,Ce),!Ce.defaultPrevented&&pe())},className:bi(B==null?void 0:B.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function z$(){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 HNe(e,t){let n={};return[e,t].forEach((r,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",l=i?DNe:RNe;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=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[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}b.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:m,style:p,visibleToasts:v=MNe,toastOptions:y,dir:x=z$(),gap:w=$Ne,loadingIcon:N,icons:S,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:k}=e,[C,E]=X.useState([]),O=X.useMemo(()=>Array.from(new Set([r].concat(C.filter(K=>K.position).map(K=>K.position)))),[C,r]),[P,R]=X.useState([]),[T,D]=X.useState(!1),[z,I]=X.useState(!1),[F,U]=X.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=X.useRef(null),q=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=X.useRef(null),L=X.useRef(!1),V=X.useCallback(K=>{E(W=>{var ie;return(ie=W.find(ve=>ve.id===K.id))!=null&&ie.delete||Xs.dismiss(K.id),W.filter(({id:ve})=>ve!==K.id)})},[]);return X.useEffect(()=>Xs.subscribe(K=>{if(K.dismiss){E(W=>W.map(ie=>ie.id===K.id?{...ie,delete:!0}:ie));return}setTimeout(()=>{DG.flushSync(()=>{E(W=>{let ie=W.findIndex(ve=>ve.id===K.id);return ie!==-1?[...W.slice(0,ie),{...W[ie],...K},...W.slice(ie+1)]:[K,...W]})})})}),[]),X.useEffect(()=>{if(d!=="system"){U(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?U("dark"):U("light")),typeof window>"u")return;let K=window.matchMedia("(prefers-color-scheme: dark)");try{K.addEventListener("change",({matches:W})=>{U(W?"dark":"light")})}catch{K.addListener(({matches:ie})=>{try{U(ie?"dark":"light")}catch(ve){console.error(ve)}})}},[d]),X.useEffect(()=>{C.length<=1&&D(!1)},[C]),X.useEffect(()=>{let K=W=>{var ie,ve;a.every(ge=>
1076W[ge]||W.code===ge)&&(D(!0),(ie=H.current)==null||ie.focus()),W.code==="Escape"&&(document.activeElement===H.current||(ve=H.current)!=null&&ve.contains(document.activeElement))&&D(!1)};return document.addEventListener("keydown",K),()=>document.removeEventListener("keydown",K)},[a]),X.useEffect(()=>{if(H.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,L.current=!1)}},[H.current]),X.createElement("section",{ref:t,"aria-label":`${_} ${q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((K,W)=>{var ie;let[ve,ge]=K.split("-");return C.length?X.createElement("ol",{key:K,dir:x==="auto"?z$():x,tabIndex:-1,ref:H,className:l,"data-sonner-toaster":!0,"data-theme":F,"data-y-position":ve,"data-lifted":T&&C.length>1&&!i,"data-x-position":ge,style:{"--front-toast-height":`${((ie=P[0])==null?void 0:ie.height)||0}px`,"--width":`${LNe}px`,"--gap":`${w}px`,...p,...HNe(c,u)},onBlur:J=>{L.current&&!J.currentTarget.contains(J.relatedTarget)&&(L.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||L.current||(L.current=!0,B.current=J.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{z||D(!1)},onDragEnd:()=>D(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},C.filter(J=>!J.position&&W===0||J.position===K).map((J,ne)=>{var Z,oe;return X.createElement(UNe,{key:J.id,icons:S,index:ne,toast:J,defaultRichColors:f,duration:(Z=y==null?void 0:y.duration)!=null?Z:m,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:n,visibleToasts:v,closeButton:(oe=y==null?void 0:y.closeButton)!=null?oe:o,interacting:z,position:K,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:V,toasts:C.filter(he=>he.position==J.position),heights:P.filter(he=>he.position==J.position),setHeights:R,expandByDefault:i,gap:w,loadingIcon:N,expanded:T,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const b2=["Run inside your controlled environment","Use only authorized knowledge sources","Enforce scope, permissions, and access boundaries","Maintain auditability and traceable outputs","Never retrain external models on your data"],qNe=["Standards validation during engineering reviews","Clause-level citations from licensed documentation","Configuration verification before production","Compliance checks during project execution","Controlled knowledge access across departments"],VNe=["Public AI tools are unacceptable","Licensed documentation must remain protected","Compliance exposure is a real risk","Engineering accuracy impacts revenue or safety","Knowledge continuity matters long-term"],WNe=["ANSI","ISO","IEC","ASME","EPA"],GNe=["Trained on your uploaded documentation","Clause-level citations, no hallucinations","Role-based access per department"],KNe=["Order entry via email PO feedback loop","Quote generation inside legacy software (no API needed)","Scoped, documented, and fully controlled by your team"],YNe=[{label:"Order Intake Automation — AI transforms incomplete purchase orders into executable data.",src:"https://www.youtube.com/embed/Z9LcCPzeLXQ?si=31zIWA9GR-gU4Hn8"},{label:"RAG Agent in Action — querying SOPs and ANSI specs in real time",src:"https://www.youtube.com/embed/uBjsC3bNj7o"},{label:"Workflow Execution — AI automates tasks inside enterprise and legacy systems, with or without APIs.",src:"https://www.youtube.com/embed/QwYT7_rgKG4?si=2DY4QP8JHGqjehMt"}],XNe=[{icon:s.jsx(GO,{className:"h-8 w-8 text-amber-400 stroke-[1.5]"}),title:"Manufacturers & Industrial OEMs",description:"Product configuration validation, quality documentation access, and engineering knowledge retention across your entire operation."},{icon:s.jsx(Qwe,{className:"h-8 w-8 text-cyber-blue stroke-[1.5]"}),title:"Engineering & Design Firms",description:"Controlled access to licensed standards and project-specific documentation with clause-level source citations."},{icon:s.jsx(iw,{className:"h-8 w-8 text-purple-400 stroke-[1.5]"}),title:"Systems Integrators & Automation Providers",description:"Fast, accurate access across vendor documentation, commissioning guidance, and engineering-sales alignment."}],QNe=[{icon:zn,stat:"4.5 hrs/week",line:"per engineer spent hunting documentation — not doing engineering"},{icon:rn,stat:"15–20 hrs/week",line:"burned on manual entry, POs, and quotes your team shouldn't be touching"}],ZNe=[{icon:s.jsx(Fd,{className:"h-5 w-5"}),text:"Private cloud, hybrid, or on-prem deployment"},{icon:s.jsx(ur,{className:"h-5 w-5"}),text:"Role-based authentication and strict access control"},{icon:s.jsx(tje,{className:"h-5 w-5"}),text:"Licensed standards and proprietary documentation support"},{icon:s.jsx(it,{className:"h-5 w-5"}),text:"No cross-customer data reuse"},{icon:s.jsx(Gr,{className:"h-5 w-5"}),text:"Customer data remains fully under customer control"}],JNe=()=>{const{isAuthenticated:e}=nr();qt();const[t,n]=b.useState(!1),[r,a]=b.useState(!1),i=()=>{a(!0),INe.success("Opening booking calendar")};return s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-neon-blue/30 rounded-full floating"}),s.jsx("div",{className:"absolute top-3/4 right-1/4 w-1 h-1 bg-electric-blue/40 rounded-full floating stagger-delay-1"}),s.jsx("div",{className:"absolute top-1/2 left-3/4 w-1.5 h-1.5 bg-neon-cyan/20 rounded-full floating stagger-delay-2"}),s.jsx("div",{className:"absolute top-1/3 left-0 w-px h-32 bg-gradient-to-b from-transparent via-neon-blue/20 to-transparent parallax-slow"}),s.jsx("div",{className:"absolute bottom-1/4 right-0 w-px h-24 bg-gradient-to-b from-transparent via-neon-blue/20 to-transparent parallax-medium"})]}),s.jsx(xn,{}),s.jsxs("main",{className:"relative z-10",children:[s.jsxs("section",{className:"min-h-screen flex items-center justify-center px-4 sm:px-6 lg:px-8 relative pt-24 sm:pt-32 pb-20 -mt-8",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden",children:[s.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-gradient-to-r from-neon-blue/10 via-electric-blue/8 to-neon-cyan/10 rounded-full blur-3xl animate-[cyberPulse_8s_ease-in-out_infinite]"}),s.jsx("div",{className:"absolute top-1/3 left-1/4 w-[400px] h-[400px] bg-gradient-to-br from-electric-blue/5 to-neon-cyan/5 rounded-full blur-2xl animate-[float_12s_ease-in-out_infinite_reverse]"}),s.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-[300px] h-[300px] bg-gradient-to-tl from-neon-blue/8 to-electric-blue/6 rounded-full blur-2xl animate-[float_10s_ease-in-out_infinite]"})]}),s.jsx("div",{className:"text-center max-w-6xl mx-auto relative z-10",children:s.jsxs("div",{className:"space-y-8",children:[s.jsx("br",{}),s.jsxs("h1",{className:"font-bebas text-5xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-normal text-white leading-tight tracking-widest",children:["YOUR STANDARDS.",s.jsx("br",{}),"YOUR SYSTEMS.",s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-cyber-blue bg-clip-text text-transparent text-shimmer inline-block",children:"AI THAT ENFORCES BOTH."})]}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg lg:text-xl text-gray-300 max-w-4xl mx-auto leading-relaxed px-4 mb-8",children:"Privion deploys inside your environment — trained on  your licensed standards, running on your infrastru
1076cture,  answerable to your compliance team. No public AI. No IP exposure. No guessing."}),s.jsxs("div",{className:"hero-fade-up flex flex-col sm:flex-row justify-center items-center gap-4 mb-10",style:{"--hero-delay":"0.3s"},children:[s.jsx(Y,{variant:"default",size:"lg",asChild:!0,className:"font-inter font-semibold px-6 py-4 sm:px-10 sm:py-7 text-base sm:text-xl rounded-full bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white hover:opacity-90 transition-all shadow-lg shadow-cyber-blue/25 hover:shadow-xl hover:shadow-cyber-blue/35 hover:scale-105 w-full sm:w-auto",children:s.jsxs(Vn,{to:"/deployment",children:["See It Running in Your Environment",s.jsx(Bt,{className:"ml-2 h-6 w-6"})]})}),s.jsx(Y,{variant:"outline",size:"lg",asChild:!0,className:"font-inter font-semibold px-6 py-4 sm:px-10 sm:py-7 text-base sm:text-xl rounded-full bg-white text-cyber-blue border-cyber-blue/50 hover:bg-white hover:text-cyber-blue hover:border-cyber-blue/50 hover:scale-105 transition-all w-full sm:w-auto",children:s.jsxs(Vn,{to:"/pricing",children:["View Subscription Plans",s.jsx(Bt,{className:"ml-2 h-6 w-6"})]})})]}),s.jsxs("div",{className:"hero-fade-up",style:{"--hero-delay":"0.45s"},children:[s.jsx("p",{className:"font-inter text-sm text-gray-500 mb-3 tracking-wide uppercase",children:"Supports licensed documentation from"}),s.jsx("div",{className:"flex flex-wrap justify-center items-center gap-6",children:WNe.map(o=>s.jsx("span",{className:"font-inter text-lg font-semibold text-white opacity-80",children:o},o))})]})]})})]}),s.jsx("section",{className:"pt-0 -pb-1 px-4 sm:px-6 lg:px-8 relative -mt-12",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:s.jsx("div",{className:"text-center mb-2",children:s.jsx("p",{className:"font-inter text-sm sm:text-base text-gray-400 tracking-wide",children:"Used by engineering teams across manufacturing, automation, and design-build."})})})}),s.jsx("div",{className:"text-center space-y-6 mb-0",children:s.jsx("section",{className:"pt-2 pb-16 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-transparent via-white/[0.02] to-transparent",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-10",children:QNe.map((o,l)=>s.jsxs("div",{className:"p-6 rounded-xl bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 backdrop-blur-sm hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] flex flex-col",children:[s.jsx("div",{className:"flex items-center gap-3 mb-4",children:s.jsx("div",{className:"w-10 h-10 rounded-full bg-cyber-blue/20 flex items-center justify-center",children:s.jsx(o.icon,{className:"h-5 w-5 text-cyber-blue"})})}),s.jsx("p",{className:"font-bebas text-4xl text-white tracking-wide mb-2",children:o.stat}),s.jsx("p",{className:"font-inter text-base text-gray-300 mb-3",children:o.line}),s.jsx("p",{className:"font-inter text-sm text-gray-500 italic",children:"Multiply that by your headcount."})]},l))}),s.jsx("div",{className:"text-center p-6 rounded-xl bg-gradient-to-r from-red-500/10 to-amber-500/10 border border-red-500/20",children:s.jsxs("p",{className:"font-inter text-lg text-white font-semibold",children:["The cost isn't inconvenience.",s.jsx("br",{}),"It's rework, liability, and the knowledge walking out the door with your next retirement."]})})]})})}),s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-12 tracking-wide",children:"Two Ways to Deploy Privion"}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"p-6 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-500/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] flex flex-col",children:[s.jsx("span",{className:"inline-block self-start font-inter text-xs font-semibold uppercase tracking-wider text-cyber-blue bg-cyber-blue/10 px-3 py-1 rounded-full mb-4",children:"Subscription"}),s.jsx("h3",{className:"font-inter text-lg sm:text-xl md:text-2xl font-semibold text-white mb-3",children:"Your Documents, Answering Questions in Real Time"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 mb-6",children:"Upload your SOPs, ANSI specs, compliance docs, and standards libraries. Privion's RAG agents give your team instant, cited answers — no more digging through folders or waiting on an expert."}),s.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:GNe.map((o,l)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Pe,{className:"h-5 w-5 text-cyber-blue flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"font-inter text-sm text-gray-300",children:o})]},l))}),s.jsx(Y,{variant:"outline",asChild:!0,className:"font-inter border-cyber-blue/50 text-cyber-blue bg-white hover:scale-105 hover:bg-white hover:text-cyber-blue hover:border-cyber-blue/50 transition-all w-full",children:s.jsxs(Vn,{to:"/pricing",children:["See Pricing",s.jsx(Bt,{className:"ml-2 h-4 w-4"})]})})]}),s.jsxs("div",{className:"p-6 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-500/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] flex flex-col relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyber-blue/5 to-transparent pointer-events-none mb-8"}),s.jsxs("div",{className:"relative flex flex-col flex-1",children:[s.jsx("span",{className:"inline-block self-start font-inter text-xs font-semibold uppercase tracking-wider text-neon-cyan bg-neon-cyan/10 px-3 py-1 rounded-full mb-4",children:"Custom Engagement"}),s.jsx("h3",{className:"font-inter text-lg sm:text-xl md:text-2xl font-semibold text-white mb-3",children:"Custom Automations That Run Inside Your Systems"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 mb-6",children:"Need AI that doesn't just answer — but acts? We deploy scalable workflow agents directly into your existing tools. No API required. We automate around legacy systems when needed."}),s.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:KNe.map((o,l)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Pe,{className:"h-5 w-5 text-neon-cyan flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"font-inter text-sm text-gray-300",children:o})]},l))}),s.jsx(Y,{asChild:!0,className:"font-inter bg-gradient-to-r from-cyber-blue to-electric-blue text-white hover:opacity-90 w-full",children:s.jsxs(Vn,{to:"/deployment",children:["Book a Scoping Call",s.jsx(Bt,{className:"ml-2 h-4 w-4"})]})})]})]})]})]}),s.jsx("section",{className:"py-12 px-4 sm:px-6 lg:px-8 border-t border-white/10",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("p",{className:"font-inter text-sm text-gray-400 text-center mb-8 uppercase tracking-wider",children:"Built for Regulated, Production-Grade Env
1076ironments"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-4 mb-8",children:ZNe.map((o,l)=>s.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-lg bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 backdrop-blur-sm hover:border-cyan-400 transition-all duration-300",children:[s.jsx("div",{className:"text-cyber-blue flex-shrink-0",children:o.icon}),s.jsx("span",{className:"font-inter text-sm text-gray-300",children:o.text})]},l))}),s.jsx("p",{className:"font-inter text-base text-gray-400 text-center max-w-3xl mx-auto",children:"Privion is designed for organizations where compliance, accuracy, and IP protection are non-negotiable."})]})}),s.jsxs("div",{className:"max-w-6xl mx-auto mt-24",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-3 tracking-wide",children:"See Privion Working in Real Environments"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 text-center mb-12 max-w-3xl mx-auto",children:"These are not demos of what AI could do. These are workflows already running."}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:YNe.map((o,l)=>s.jsxs("div",{className:"flex flex-col",children:[s.jsx("div",{className:"aspect-video rounded-xl overflow-hidden border border-white/10 bg-black/30",children:s.jsx("iframe",{src:o.src,title:o.label,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"w-full h-full"})}),s.jsx("p",{className:"font-inter text-sm text-gray-400 mt-3",children:o.label})]},l))})]}),s.jsx("section",{className:"py-16 px-4 sm:px-6 lg:px-8 mt-20",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-4 tracking-wide",children:"Privion Enforces What Your Team Cannot Afford to Get Wrong"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-300 text-center mb-10 max-w-3xl mx-auto",children:"Every output is traceable. Every answer is sourced. Every agent operates within boundaries your compliance team defines — not what a public AI decides."}),s.jsxs("div",{className:"p-6 rounded-xl bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 backdrop-blur-sm mb-8",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[s.jsx(it,{className:"h-6 w-6 text-cyber-blue"}),s.jsx("h3",{className:"font-inter font-semibold text-white text-lg",children:"Privion agents:"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:b2.map((o,l)=>s.jsxs("div",{className:`flex items-center gap-3 p-3 rounded-lg bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] ${l===b2.length-1&&b2.length%2!==0?"md:col-span-2 md:justify-center":""}`,children:[s.jsx(Pe,{className:"h-5 w-5 text-cyber-blue flex-shrink-0"}),s.jsx("span",{className:"font-inter text-base text-gray-300",children:o})]},l))})]}),s.jsx("div",{className:"text-center space-y-3",children:s.jsx("p",{className:"font-inter text-base text-gray-400",children:"Configured without custom software development. Deployed without operational risk."})})]})}),s.jsx("section",{className:"py-16 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("p",{className:"font-inter text-xs sm:text-sm text-gray-400 text-center mb-3 uppercase tracking-wider",children:"How Privion Creates Value"}),s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-10 tracking-wide",children:"Prevent Mistakes Before They Happen"}),s.jsxs("div",{className:"p-6 rounded-xl bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 backdrop-blur-sm mb-8",children:[s.jsx("p",{className:"font-inter text-base text-gray-300 text-left mb-5",children:"Privion enables:"}),s.jsx("div",{className:"space-y-3",children:qNe.map((o,l)=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] ",children:[s.jsx(Pe,{className:"h-5 w-5 text-cyber-blue flex-shrink-0"}),s.jsx("span",{className:"font-inter text-base text-gray-300",children:o})]},l))})]}),s.jsxs("div",{className:"text-center p-6 rounded-xl bg-gradient-to-r from-cyber-blue/10 to-electric-blue/10 border border-cyber-blue/30",children:[s.jsx("div",{className:"flex items-center justify-center gap-2 mb-2",children:s.jsx(g1,{className:"h-5 w-5 text-cyber-blue"})}),s.jsx("p",{className:"font-inter text-lg text-gray-300",children:'The goal is not "faster answers."'}),s.jsx("p",{className:"font-inter text-lg text-white font-semibold",children:"The goal is safer decisions."})]})]})}),s.jsx("section",{className:"py-16 px-4 sm:px-6 lg:px-8 bg-white/[0.02]",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-3 tracking-wide",children:"Purpose-Built for Engineering-Led Organizations"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 text-center mb-12",children:"Privion intentionally focuses on environments where accuracy directly impacts operations."}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-8",children:XNe.map((o,l)=>s.jsxs("div",{className:"p-6 rounded-xl p-6 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-500/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] flex flex-col",children:[s.jsx("div",{className:"text-white mb-4",children:o.icon}),s.jsx("h3",{className:"font-inter text-lg font-semibold text-white mb-2",children:o.title}),s.jsx("p",{className:"font-inter text-sm text-gray-400 mb-4 flex-1",children:o.description}),s.jsxs(Vn,{to:"/deployment",className:"font-inter text-sm text-cyber-blue hover:text-electric-blue inline-flex items-center gap-1 transition-colors",children:["Learn more ",s.jsx(Bt,{className:"h-3.5 w-3.5"})]})]},l))}),s.jsx("p",{className:"font-inter text-sm text-gray-500 text-center",children:"Also deployed in EPC firms, water utilities, and industrial automation environments."})]})}),s.jsx("section",{className:"py-16 px-4 sm:px-6 lg:px-8 ",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white tracking-wide mb-6",children:"One Controlled Knowledge Foundation. Multiple Purpose-Built Agents."}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 text-center mb-10 max-w-3xl mx-auto",children:"Engineering organizations rely on technical accuracy across departments. Privion deploys role-specific agents configured around permissions and operational boundaries."})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8",children:[s.jsxs("div",{className:"p-5 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-blue-500/20 flex items-center justify-center",children:s.jsx(Kt,{className:"h-6 w-6 text-blue-400"})})}),s.jsx("h3",{className:"font-inter text-base font-semibold text-white mb-2",children:"Engineering"}),s.jsx("p",{className:"font-inter text-sm text-gray-400",children:"Standards, specifications, te
1076chnical documentation"})]}),s.jsxs("div",{className:"p-5 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-green-500/20 flex items-center justify-center",children:s.jsx(Rs,{className:"h-6 w-6 text-green-400"})})}),s.jsx("h3",{className:"font-inter text-base font-semibold text-white mb-2",children:"Sales"}),s.jsx("p",{className:"font-inter text-sm text-gray-400",children:"Configuration validation, compatibility, proposal support"})]}),s.jsxs("div",{className:"p-5 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-yellow-500/20 flex items-center justify-center",children:s.jsx(hl,{className:"h-6 w-6 text-yellow-400"})})}),s.jsx("h3",{className:"font-inter text-base font-semibold text-white mb-2",children:"Service & Field Teams"}),s.jsx("p",{className:"font-inter text-sm text-gray-400",children:"Manuals, troubleshooting, operational playbooks"})]}),s.jsxs("div",{className:"p-5 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"w-12 h-12 rounded-full bg-purple-500/20 flex items-center justify-center",children:s.jsx(Ywe,{className:"h-6 w-6 text-purple-400"})})}),s.jsx("h3",{className:"font-inter text-base font-semibold text-white mb-2",children:"Operations & Compliance"}),s.jsx("p",{className:"font-inter text-sm text-gray-400",children:"SOPs, regulatory documentation, reporting support"})]})]}),s.jsxs("div",{className:"text-center p-6 rounded-xl bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx("p",{className:"font-inter text-lg text-white font-semibold",children:"Each agent operates within defined boundaries."}),s.jsx("p",{className:"font-inter text-base text-gray-400 mt-1",children:"No uncontrolled access. No open-ended AI drift."})]})]})}),s.jsx("section",{className:"py-16 px-4 sm:px-6 lg:px-8 bg-white/[0.02]",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white text-center mb-4 tracking-wide",children:"Built for Production Use — Not AI Experiments"}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-400 text-center mb-10",children:"Organizations choose Privion when:"}),s.jsx("div",{className:"space-y-3 max-w-2xl mx-auto mb-10",children:VNe.map((o,l)=>s.jsxs("div",{className:"flex items-center gap-3 p-4 rounded-lg bg-blue-950/20 backdrop-blur-sm border border-blue-900/30 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] text-center",children:[s.jsx(mje,{className:"h-5 w-5 text-cyber-blue flex-shrink-0"}),s.jsx("span",{className:"font-inter text-base text-gray-300 ",children:o})]},l))}),s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"font-inter text-lg text-white font-semibold",children:"Privion focuses on operational reliability — not AI novelty."})})]})}),s.jsx("section",{className:"py-12 px-4 sm:px-6 lg:px-8 border-t border-white/10",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(GO,{className:"h-8 w-8 text-gray-500"})}),s.jsx("p",{className:"font-inter text-base text-gray-400 mb-3",children:"Privion is deployed by engineering-led and manufacturing organizations managing licensed standards, proprietary workflows, and regulated documentation environments."}),s.jsx("p",{className:"font-inter text-lg text-white font-semibold",children:"Built to ship. Built to scale. Built to control risk."})]})}),s.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8 relative",children:s.jsx("div",{className:"max-w-5xl mx-auto text-center",children:s.jsxs("div",{className:"space-y-8",children:[s.jsxs("h2",{className:"font-bebas text-3xl sm:text-4xl md:text-4xl lg:text-5xl text-white tracking-wide",children:["WHAT WORKFLOW IS YOUR TEAM STILL DOING",s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-cyber-blue bg-clip-text text-transparent text-shimmer inline-block",children:"MANUALLY?"})]}),s.jsx("p",{className:"font-inter text-sm sm:text-base md:text-lg text-gray-300 max-w-4xl mx-auto leading-relaxed",children:"Work directly with our team to design and deploy secure operational AI tailored to your standards, systems, and infrastru
1076cture."}),s.jsx("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-4",children:s.jsxs(Y,{variant:"default",size:"lg",onClick:i,className:"font-inter font-semibold px-10 py-6 rounded-lg bg-gradient-to-r from-cyber-blue to-electric-blue text-white",children:[s.jsx("span",{children:"Schedule a Discovery Call"}),s.jsx(Bt,{className:"ml-2 h-5 w-5"})]})}),s.jsx("br",{}),s.jsx(Vn,{to:"/pricing",className:"font-inter text-sm text-gray-400 hover:text-cyber-blue transition-colors",children:"Or start with a subscription agent →"})]})})})]}),s.jsx(Cn,{}),s.jsx(Ty,{isOpen:t,onClose:()=>n(!1)}),s.jsx(Uc,{isOpen:r,onClose:()=>a(!1)})]})};class eSe{constructor(){Nf(this,"baseURL","/api")}async submitContactForm(t){return await Et.post("/api/contact/",t,{requiresAuth:!1})}async validateAgentName(t){return await Et.get(`${this.baseURL}/agent/validate_name`,{params:{name:t}})}async createAgent(t){return await Et.post(`${this.baseURL}/agent/`,t)}async updateAgent(t,n){return await Et.patch(`${this.baseURL}/agent/${t}`,n)}async getAgent(t){return await Et.get(`${this.baseURL}/agent/${t}`)}async getPublicAgent(t){return await Et.get(`${this.baseURL}/agent/${t}/public`,{requiresAuth:!1})}async getCustomAgent(){return await Et.get(`${this.baseURL}/custom/retrieve-by-subdomain`)}async getCustomAgentPublic(){return await Et.get(`${this.baseURL}/custom/retrieve-by-subdomain/public`,{requiresAuth:!1})}async deleteAgent(t){return await Et.delete(`${this.baseURL}/agent/${t}`)}async listAgents(t=1,n=20,r){const a={page:t,page_size:n};return r&&(a.search=r),await Et.get(`${this.baseURL}/agent/`,{params:a})}async getGlobalAgentStats(){return await Et.get(`${this.baseURL}/agent/stats`)}async deployAgent(t){return this.updateAgent(t,{is_deployed:!0})}async undeployAgent(t){return this.updateAgent(t,{is_deployed:!1})}async uploadKnowledge(t,n,r=!1){const a=new FormData;return n.forEach(i=>{a.append("files",i)}),await Et.post(`${this.baseURL}/agent/${t}/knowledge`,a,{params:{process:r},headers:{"Content-Type":"multipart/form-data"}})}async presignKnowledgeUpload(t,n){return await Et.post(`${this.baseURL}/agent/${t}/knowledge/presign`,{files:n})}async finalizeKnowledgeUpload(t,n,r=!0){return await Et.post(`${this.baseURL}/agent/${t}/knowledge/finalize`,n,{params:{process:r}})}async uploadKnowledgeViaPresign(t,n,r=!0,a){const i=n.map(d=>({filename:d.name,content_type:d.type||"application/octet-stream",size:typeof d.size=="number"?d.size:null})),o=await this.presignKnowledgeUpload(t,i);if(!o.items||o.items.length!==n.length)throw new Error("Presign response mismatch: items do not match selected files");let l=0;const c=n.length;await Promise.all(n.map(async(d,f)=>{var y;const m=o.items[f],p={"Content-Type":d.type||"application/octet-stream",...m.headers||{}};(y=hn.getAccessToken)==null||y.call(hn);const v=await fetch(m.upload_url,{method:"PUT",headers:p,body:d});if(!v.ok){const x=await v.text().catch(()=>"");throw new Error(x||`S3 upload failed (${v.status}) for ${d.name}`)}l+=1,a==null||a(l,c)}));const u={items:o.items.map((d,f)=>({key:d.key,file_name:n[f].name,content_type:n[f].type||"application/octet-stream",size:typeof n[f].size=="number"?n[f].size:null}))};return await this.finalizeKnowledgeUpload(t,u,r)}async uploadWebPage(t,n,r=!1,a,i){const o={urls:[n],crawl:r,update_frequency:i||"dont_refetch"};return a!==void 0&&(o.max_requests=a),await Et.post(`${this.baseURL}/agent/${t}/knowledge/web`,o)}async uploadYouTubeVideo(t,n){return await Et.post(`${this.baseURL}/agent/${t}/knowledge/youtube`,{urls:[n]})}async getAgentKnowledge(t,n=1,r=20){return await Et.get(`${this.baseURL}/agent/${t}/knowledge`,{params:{page:n,page_size:r}})}async processKnowledge(t){return await Et.post(`${this.baseURL}/agent/${t}/knowledge/process`)}async deleteKnowledge(t,n){return await Et.delete(`${this.baseURL}/agent/${t}/knowledge/${n}`)}async deleteCrawledUrl(t,n,r){return await Et.delete(`${this.baseURL}/agent/${t}/knowledge/${n}/crawled/${r}`)}async deleteAllKnowledge(t){return await Et.delete(`${this.baseURL}/agent/${t}/all-knowledge/`)}async updateKnowledgeFrequency(t,n,r){await Et.patch(`${this.baseURL}
1076/agent/${t}/knowledge/${n}`,{update_frequency:r})}async queryAgent(t,n,r){return await Et.post(`${this.baseURL}/agent/${t}/query`,{query:n,session_id:r})}async queryAgentStream(t,n,r,a){var d,f,m,p,v,y;const i=`${Ls}${this.baseURL}/agent/${t}/query-streamed`,o={Accept:"text/event-stream","Content-Type":"application/json"},l=(d=hn.getAccessToken)==null?void 0:d.call(hn);l&&(o.Authorization=`Bearer ${l}`);let c=null,u;try{if(c=await fetch(i,{method:"POST",headers:o,body:JSON.stringify({query:n,session_id:r})}),!c.ok){const S=await c.text();throw new Error(S||`Request failed with status ${c.status}`)}if((f=a.onOpen)==null||f.call(a),u=(m=c.body)==null?void 0:m.getReader(),!u)throw new Error("Streaming not supported in this environment");const x=new TextDecoder("utf-8");let w="";const N=S=>{var k,C,E,O,P,R,T,D;w+=S;const _=w.split(`
1077
1078`);w=_.pop()||"";for(const z of _){const I=z.split(`
1079`);let F="",U=[];for(const B of I)B.startsWith("event:")?F=B.slice(6).trim():B.startsWith("data:")&&U.push(B.slice(5).trimStart());const H=U.join(`
1080`);if(!H)continue;if(H==="[DONE]")return"DONE";let q;try{q=JSON.parse(H)}catch{(k=a.onToken)==null||k.call(a,H);continue}switch((C=a.onEvent)==null||C.call(a,q),F){case"meta":(E=a.onMeta)==null||E.call(a,q);break;case"status":(O=a.onStatus)==null||O.call(a,q.name,q.data);break;case"delta":q.text&&((P=a.onToken)==null||P.call(a,q.text));break;case"tool_event":(R=a.onToolEvent)==null||R.call(a,q);break;case"final":return(T=a.onFinal)==null||T.call(a,q),"DONE";default:{const B=q.token??q.text??q.content??q.answer??null;B&&((D=a.onToken)==null||D.call(a,String(B)))}}}return"CONTINUE"};for(;;){const{value:S,done:_}=await u.read();if(_)break;const k=x.decode(S,{stream:!0});if(N(k)==="DONE")break}(p=a.onDone)==null||p.call(a)}catch(x){throw(v=a.onError)==null||v.call(a,x instanceof Error?x:new Error(String(x))),x}finally{try{u==null||u.releaseLock(),(y=c==null?void 0:c.body)==null||y.cancel()}catch{}}}async getLLMModels(t=1,n=20){return await Et.get(`${this.baseURL}/llm/models`,{params:{page:t,page_size:n}})}async getEmbeddingModels(t=1,n=20){return await Et.get(`${this.baseURL}/llm/embedding-models`,{params:{page:t,page_size:n}})}async getConversations(t,n=1,r=20){return await Et.get(`${this.baseURL}/agent/${t}/conversations`,{params:{page:n,page_size:r}})}async getConversation(t,n){return await Et.get(`${this.baseURL}/agent/${t}/conversations/${n}`)}async downloadConversationsCSV(t){var u;const n=`${Ls}/api/agent/${t}/conversations/csv-export`,r={Accept:"text/csv"},a=(u=hn.getAccessToken)==null?void 0:u.call(hn);a&&(r.Authorization=`Bearer ${a}`);const i=await fetch(n,{method:"GET",headers:r});if(!i.ok){const d=await i.text();throw new Error(d||"Failed to download CSV")}const o=await i.blob();let l=`agent-${t}-conversations.csv`;const c=i.headers.get("content-disposition");if(c&&c.includes("filename")){const d=c.match(/filename\*=UTF-8''([^;]+)|filename="?([^";]+)"?/i),f=decodeURIComponent((d==null?void 0:d[1])||(d==null?void 0:d[2])||"");f&&(l=f)}return{blob:o,filename:l}}async createAgentFromBuilderConfig(t){const n={name:t.agentConfig.name||"Unnamed Agent",prompt:t.agentConfig.purpose||"AI Assistant",description:t.agentConfig.description||null,input_text_hint:t.agentConfig.input_text_hint||null,communication_style:this.mapToneToCommunicationStyle(t.agentConfig.tone),converstation_starter:t.agentConfig.conversationStarters||null,conversation_closer:t.agentConfig.endingMessage||null,logo:t.brandingConfig.logoUrl||null,base_color:t.brandingConfig.primaryColor||null,is_deployed:!1,llm_model_id:t.agentConfig.llm_model_id||null,embedding_model_id:t.agentConfig.embedding_model_id||null};return this.createAgent(n)}async updateAgentFromBuilderConfig(t,n){const r={name:n.agentConfig.name,prompt:n.agentConfig.purpose,description:n.agentConfig.description,input_text_hint:n.agentConfig.input_text_hint,communication_style:this.mapToneToCommunicationStyle(n.agentConfig.tone),converstation_starter:n.agentConfig.conversationStarters,conversation_closer:n.agentConfig.endingMessage,logo:n.brandingConfig.logoUrl,base_color:n.brandingConfig.primaryColor,llm_model_id:n.agentConfig.llm_model_id,embedding_model_id:n.agentConfig.embedding_model_id};return this.updateAgent(t,r)}mapToneToCommunicationStyle(t){switch(t){case"professional":case"formal":return"formal";case"friendly":case"casual":return"informal";case"concise":case"brief":return"concise";case"detailed":case"comprehensive":return"detailed";default:return"formal"}}}const Pt=new eSe,tSe=Object.freeze(Object.defineProperty({__proto__:null,agentAPIService:Pt,default:Pt},Symbol.toStringTag,{value:"Module"})),B$={name:"",email:"",number:"",message:""};function nSe(){qt();const[e,t]=b.useState(B$),[n,r]=b.useState(!1),[a,i]=b.useState(""),[o,l]=b.useState(""),[c,u]=b.useState(""),[d,f]=b.useState("loading"),m=b.useRef(null),p=y=>{t({...e,[y.target.name]:y.target.value}),l(""),i("")},v=async y=>{var x;y.preventDefault(),l(""),i(""),c||l("CAPTCHA not completed. The form will still be sent but may be marked as spam."),r(!0);try{const w=await Pt.submitContactForm({...e,turnstile_token:c});w.success?(i("Your message has been sent. Our team will reach out to you shortly!"),t(B$),(x=m.current)==null||x.reset(),u(""),f("loading")):l(w.detail||w.message||"There was an error. Please try again.")}catch{l("There was an error. Please try again.")}finally{r(!1)}};return s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"absolute top-20 left-2 z-20 sm:top-10 sm:left-4 md:top-20 md:left-8",children:s.jsxs("button",{"aria-label":"Back to Home",type:"button",tabIndex:0,onClick:()=>{window.location.href="/"},className:"flex items-center justify-center bg-transparent border border-white text-gray-300 hover:bg-gradient-to-br hover:from-blue-950/30 hover:to-slate-900/30 hover:border-blue-400/60 hover:text-white transition-all duration-300 text-base px-3 py-2 rounded-lg min-w-0 
1080w-auto active:scale-95 focus:outline-none focus:ring-2 focus:ring-cyber-blue/60 select-none",style:{minWidth:0,fontWeight:500,touchAction:"manipulation"},children:[s.jsx(ai,{className:"h-5 w-5"}),s.jsx("span",{className:"hidden sm:inline ml-2",children:"Back to Home"})]})}),s.jsxs("main",{className:"flex flex-col items-center justify-center px-4 py-16 min-h-[80vh] font-inter",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bebas text-white text-center mb-10 drop-shadow-lg tracking-widest mt-16 md:mt-24",children:"Let's Connect"}),s.jsxs("form",{onSubmit:v,className:"w-full max-w-lg bg-slate-900/60 backdrop-blur-md rounded-2xl p-8 shadow-xl flex flex-col gap-6 font-inter transition-transform duration-200 hover:scale-[1.015]",children:[s.jsxs("div",{className:"flex flex-col gap-2 font-inter",children:[s.jsx("label",{htmlFor:"name",className:"text-white font-semibold font-inter",children:"Name"}),s.jsx("input",{id:"name",name:"name",type:"text",required:!0,minLength:4,maxLength:25,value:e.name,onChange:p,className:"transition-all duration-200 bg-slate-800/80 border border-slate-700 rounded-lg px-4 py-3 text-white focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/30 hover:border-cyan-400 outline-none font-inter hover:scale-[1.01]",placeholder:"Your full name"})]}),s.jsxs("div",{className:"flex flex-col gap-2 font-inter",children:[s.jsx("label",{htmlFor:"email",className:"text-white font-semibold font-inter",children:"Email"}),s.jsx("input",{id:"email",name:"email",type:"email",required:!0,value:e.email,onChange:p,className:"transition-all duration-200 bg-slate-800/80 border border-slate-700 rounded-lg px-4 py-3 text-white focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/30 hover:border-cyan-400 outline-none font-inter hover:scale-[1.01]",placeholder:"[email protected]"})]}),s.jsxs("div",{className:"flex flex-col gap-2 font-inter",children:[s.jsx("label",{htmlFor:"number",className:"text-white font-semibold font-inter",children:"Phone (optional)"}),s.jsx("input",{id:"number",name:"number",type:"text",maxLength:20,value:e.number,onChange:p,className:"transition-all duration-200 bg-slate-800/80 border border-slate-700 rounded-lg px-4 py-3 text-white focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/30 hover:border-cyan-400 outline-none font-inter hover:scale-[1.01]",placeholder:"Phone number"})]}),s.jsxs("div",{className:"flex flex-col gap-2 font-inter",children:[s.jsx("label",{htmlFor:"message",className:"text-white font-semibold font-inter",children:"Message"}),s.jsx("textarea",{id:"message",name:"message",required:!0,minLength:10,maxLength:808,value:e.message,onChange:p,className:"transition-all duration-200 bg-slate-800/80 border border-slate-700 rounded-lg px-4 py-3 text-white focus:border-cyan-400 focus:ring-2 focus:ring-cyan-400/30 hover:border-cyan-400 outline-none min-h-[120px] font-inter hover:scale-[1.01]",placeholder:"How can we help you?"})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2 my-4",children:[s.jsx(zh,{ref:m,siteKey:"0x4AAAAAACd8BHWKs0K2ODll",onLoad:()=>f("ready"),onSuccess:y=>{u(y),f("ready"),console.log("CAPTCHA completed successfully")},onError:()=>{var y;f("error"),u(""),(y=m.current)==null||y.reset(),console.error("CAPTCHA error - continuing without verification"),l("CAPTCHA verification failed, please refresh the page")},onExpire:()=>{u(""),console.log("CAPTCHA token expired")},options:{theme:"auto"}}),s.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${d==="ready"&&c?"bg-green-500":d==="error"?"bg-red-500":"bg-yellow-500 animate-pulse"}`}),s.jsx("span",{children:d==="ready"&&c?"CAPTCHA verified":d==="error"?"CAPTCHA unavailable (form will still send)":"CAPTCHA loading..."})]})]}),o&&s.jsx("div",{className:`text-sm font-medium font-inter ${o.includes("⚠️")?"text-yellow-400":"text-red-400"}`,children:o}),a&&s.jsx("div",{className:"text-green-400 text-sm font-medium font-inter",children:a}),s.jsx("button",{type:"submit",disabled:n,className:"mt-2 w-full py-3 rounded-lg font-bold text-lg bg-gradient-to-r from-cyan-500 to-cyber-blue-500 text-white shadow-md hover:from-cyan-400 hover:to-cyber-blue-400 transition-all duration-300 focus:outline-none focus:ring-2 focus:ring-cyan-400/50 disabled:opacity-60 font-inter",children:n?"Sending...":"Send message"})]})]}),s.jsx(Cn,{})]})}const te=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));
1080te.displayName="Card";const xe=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("flex flex-col space-y-1.5 p-6",e),...t}));xe.displayName="CardHeader";const we=b.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:He("text-2xl font-semibold leading-none tracking-tight",e),...t}));we.displayName="CardTitle";const nt=b.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:He("text-sm text-muted-foreground",e),...t}));nt.displayName="CardDescription";const se=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("p-6 pt-0",e),...t}));se.displayName="CardContent";const rSe=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("flex items-center p-6 pt-0",e),...t}));rSe.displayName="CardFooter";const Ds=b.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:He("flex min-h-[80px] w-full rounded-md border-2 border-gray-300 dark:border-gray-500 bg-white/90 dark:bg-gray-800/90 px-3 py-2 text-base text-gray-900 dark:text-gray-100 ring-offset-background placeholder:text-gray-500 dark:placeholder:text-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus-visible:border-blue-500 disabled:cursor-not-allowed disabled:opacity-50 transition-all duration-200 md:text-sm shadow-sm resize-vertical",e),ref:n,...t}));Ds.displayName="Textarea";const sSe=()=>{const e=qt(),[t,n]=b.useState(""),[r,a]=b.useState(""),[i,o]=b.useState([]),[l,c]=b.useState({fullName:"",companyName:"",workEmail:"",additionalRequirements:""}),u=[{id:"higher-ed",title:"Higher Education",description:"FERPA-compliant systems for universities and colleges",icon:$h,color:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200"},{id:"healthcare",title:"Healthcare / Provider",description:"HIPAA-secure patient information systems",icon:Jg,color:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200"},{id:"corporate-hr",title:"Corporate HR",description:"Employee knowledge and HR automation",icon:dl,color:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200"},{id:"government",title:"Government / Public Sector",description:"Citizen services and policy compliance",icon:mX,color:"bg-cyber-blue/20 text-cyber-blue dark:bg-cyber-blue/30 dark:text-electric-blue"},{id:"custom",title:"Custom",description:"Tailored solution for your specific needs",icon:dl,color:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-200"}],d=[{value:"pilot",label:"< 100",estimate:"$15K-30K/year"},{value:"small",label:"100-500",estimate:"$45K-75K/year"},{value:"medium",label:"500-2,000",estimate:"$120K-250K/year"},{value:"large",label:"2,000-10,000",estimate:"$350K-800K/year"},{value:"enterprise",label:"10,000+",estimate:"$1M+/year"}],f=[{id:"soc2",label:"SOC 2",description:"Security and availability controls"},{id:"hipaa",label:"HIPAA",description:"Healthcare data protection"},{id:"gdpr",label:"GDPR",description:"European data privacy regulation"},{id:"ferpa",label:"FERPA",description:"Educational records privacy"},{id:"fisma",label:"FISMA",description:"Federal information security"}],m=y=>{o(x=>x.includes(y)?x.filter(w=>w!==y):[...x,y])},p=()=>{console.log("Form submitted:",{selectedUseCase:t,selectedUsers:r,selectedCompliance:i,formData:l}),e("/dashboard")},v=()=>{const y=d.find(x=>x.value===r);return(y==null?void 0:y.estimate)||"Contact for pricing"};return s.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[s.jsx(xn,{}),s.jsx("div",{className:"pt-20 pb-8",children:s.jsxs("div",{className:"container mx-auto px-6 max-w-4xl",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-4",children:"Get Started with Privion Enterprise"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 text-lg",children:"Start your evaluation or schedule a demo to see what Privion can do for your organization."})]}),s.jsxs("div",{className:"space-y-8",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Contact Information"}),s.jsx(nt,{children:"Tell us about yourself and your organization"})]}),s.jsxs(se,{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"fullName",children:"Full name"}),s.jsx(_e,{id:"fullName",value:l.fullName,onChange:y=>c({...l,fullName:y.target.value}),placeholder:"John Smith"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"companyName",children:"Company name"}),s.jsx(_e,{id:"companyName",value:l.companyName,onChange:y=>c({...l,companyName:y.target.value}),placeholder:"University of Excellence"})]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(de,{htmlFor:"workEmail",children:"Work email"}),s.jsx(_e,{id:"workEmail",type:"email",value:l.workEmail,onChange:y=>c({...l,workEmail:y.target.value}),placeholder:"[email protected]"})]})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Use case template"}),s.jsx(nt,{children:"Select the template that best matches your organization"})]}),s.jsx(se,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map(y=>{const x=y.icon;return s.jsxs("button",{onClick:()=>n(y.id),className:`p-4 rounded-lg border-2 text-left transition-all hover:shadow-md ${t===y.id?"border-blue-500 bg-blue-50 dark:bg-blue-950":"border-gray-200 dark:border-gray-700 hover:border-gray-300"}`,children:[s.jsx(x,{className:"h-8 w-8 text-blue-600 mb-3"}),s.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:y.title}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:y.description})]},y.id)})})})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Interested in"}),s.jsx(nt,{children:"What are you looking to implement?"})]}),s.jsxs(se,{children:[s.jsxs(dt,{value:r,onValueChange:a,children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select user count"})}),s.jsx(lt,{children:d.map(y=>s.jsx(me,{value:y.value,children:s.jsx("div",{className:"flex items-center justify-between w-full",children:s.jsxs("span",{children:[y.label," users"]})})},y.value))})]}),r&&s.jsx("div",{className:"mt-3 p-3 bg-blue-50 dark:bg-blue-950 rounded-lg",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Rs,{className:"h-4 w-4 text-blue-600"}),s.jsxs("span",{className:"text-sm font-medium text-blue-800 dark:text-blue-200",children:["Estimated annual range: ",v()]})]})})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Compliance needs"}),s.jsx(nt,{children:"Select all that apply to your organization"})]}),s.jsx(se,{children:s.jsx("div",{className:"space-y-2",children:f.map(y=>s.jsx("button",{onClick:()=>m(y.id),className:`w-full p-3 rounded-lg border text-left transition-all ${i.includes(y.id)?"border-blue-500 bg-blue-50 dark:bg-blue-950":"border-gray-200 dark:border-gray-700 hover:border-gray-300"}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:y.label}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:y.description})]}),i.includes(y.id)&&s.jsx(le,{className:"bg-blue-600 text-white",children:"Selected"})]})},y.id))})})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Additional requirements"}),s.jsx(nt,{children:"Tell us about any specific needs or use cases"})]}),s.jsx(se,{children:s.jsx(Ds,{value:l.additionalRequirements,onChange:y=>c({...l,additionalRequirements:y.target.value}),placeholder:"Describe any specific integration needs, compliance requirements, or use cases...",rows:4})})]}),s.jsx(te,{children:s.jsx(se,{className:"pt-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Y,{onClick:p,size:"lg",className:"bg-blue-600 hover:bg-blue-700 text-white px-12",children:"Schedule my enterprise consultation"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-4",children:"Enterprise-ready compliance: SOC 2 • HIPAA • FERPA • GDPR • ISO 27001"})]})})})]})]})}),s.jsx(Cn,{})]})},aSe="modulepreload",iSe=function(e){return"/"+e},U$={}
vendor: 9,056 bytes, line 1080
1080,oSe=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let o=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=o(n.map(u=>{if(u=iSe(u),u in U$)return;U$[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const m=document.createElement("link");if(m.rel=d?"stylesheet":aSe,d||(m.as="script"),m.crossOrigin="",m.href=u,c&&m.setAttribute("nonce",c),document.head.appendChild(m),d)return new Promise((p,v)=>{m.addEventListener("load",p),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return a.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};var[k1]=Mr("Tooltip",[Bc]),C1=Bc(),QQ="TooltipProvider",lSe=700,AT="tooltip.open",[cSe,oM]=k1(QQ),ZQ=e=>{const{__scopeTooltip:t,delayDuration:n=lSe,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=e,o=b.useRef(!0),l=b.useRef(!1),c=b.useRef(0);return b.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(cSe,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:b.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:b.useCallback(u=>{l.current=u},[]),disableHoverableContent:a,children:i})};ZQ.displayName=QQ;var rx="Tooltip",[uSe,Iy]=k1(rx),JQ=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:l}=e,c=oM(rx,e.__scopeTooltip),u=C1(t),[d,f]=b.useState(null),m=na(),p=b.useRef(0),v=o??c.disableHoverableContent,y=l??c.delayDuration,x=b.useRef(!1),[w,N]=$s({prop:r,defaultProp:a??!1,onChange:E=>{E?(c.onOpen(),document.dispatchEvent(new CustomEvent(AT))):c.onClose(),i==null||i(E)},caller:rx}),S=b.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),_=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,N(!0)},[N]),k=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,N(!1)},[N]),C=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,N(!0),p.current=0},y)},[y,N]);return b.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),s.jsx(Zj,{...u,children:s.jsx(uSe,{scope:t,contentId:m,open:w,stateAttribute:S,trigger:d,onTriggerChange:f,onTriggerEnter:b.useCallback(()=>{c.isOpenDelayedRef.current?C():_()},[c.isOpenDelayedRef,C,_]),onTriggerLeave:b.useCallback(()=>{v?k():(window.clearTimeout(p.current),p.current=0)},[k,v]),onOpen:_,onClose:k,disableHoverableContent:v,children:n})})};JQ.displayName=rx;var ET="TooltipTrigger",eZ=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Iy(ET,n),i=oM(ET,n),o=C1(n),l=b.useRef(null),c=gt(t,l,a.onTriggerChange),u=b.useRef(!1),d=b.useRef(!1),f=b.useCallback(()=>u.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),s.jsx(jy,{asChild:!0,...o,children:s.jsx(Ve.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:c,onPointerMove:Oe(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),d.current=!0)}),onPointerLeave:Oe(e.onPointerLeave,()=>{a.onTriggerLeave(),d.current=!1}),onPointerDown:Oe(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Oe(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:Oe(e.onBlur,a.onClose),onClick:Oe(e.onClick,a.onClose)})})});eZ.displayName=ET;var lM="TooltipPortal",[dSe,fSe]=k1(lM,{forceMount:void 0}),tZ=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:a}=e,i=Iy(lM,t);return s.jsx(dSe,{scope:t,forceMount:n,children:s.jsx(Cr,{present:n||i.open,children:s.jsx(Dd,{asChild:!0,container:a,children:r})})})};tZ.displayName=lM;var Bh="TooltipContent",nZ=b.forwardRef((e,t)=>{const n=fSe(Bh,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=e,o=Iy(Bh,e.__scopeTooltip);return s.jsx(Cr,{present:r||o.open,children:o.disableHoverableContent?s.jsx(rZ,{side:a,...i,ref:t}):s.jsx(hSe,{side:a,...i,ref:t})})}),hSe=b.forwardRef((e,t)=>{const n=Iy(Bh,e.__scopeTooltip),r=oM(Bh,e.__scopeTooltip),a=b.useRef(null),i=gt(t,a),[o,l]=b.useState(null),{trigger:c,onClose:u}=n,d=a.current,{onPointerInTransitChange:f}=r,m=b.useCallback(()=>{l(null),f(!1)},[f]),p=b.useCallback((v,y)=>{const x=v.currentTarget,w={x:v.clientX,y:v.clientY},N=ySe(w,x.getBoundingClientRect()),S=vSe(w,N),_=bSe(y.getBoundingClientRect()),k=jSe([...S,..._]);l(k),f(!0)},[f]);return b.useEffect(()=>()=>m(),[m]),b.useEffect(()=>{if(c&&d){const v=x=>p(x,d),y=x=>p(x,c);return c.addEventListener("pointerleave",v),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",y)}}},[c,d,p,m]),b.useEffect(()=>{if(o){const v=y=>{const x=y.target,w={x:y.clientX,y:y.clientY},N=(c==null?void 0:c.contains(x))||(d==null?void 0:d.contains(x)),S=!wSe(w,o);N?m():S&&(m(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[c,d,o,u,m]),s.jsx(rZ,{...e,ref:i})}),[mSe,pSe]=k1(rx,{isInside:!1}),gSe=dye("TooltipContent"),rZ=b.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...l}=e,c=Iy(Bh,n),u=C1(n),{onClose:d}=c;return b.useEffect(()=>(document.addEventListener(AT,d),()=>document.removeEventListener(AT,d)),[d]),b.useEffect(()=>{if(c.trigger){const f=m=>{const p=m.target;p!=null&&p.contains(c.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[c.trigger,d]),s.jsx(Rd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:s.jsxs(Jj,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(gSe,{children:r}),s.jsx(mSe,{scope:n,isInside:!0,children:s.jsx(_1e,{id:c.contentId,role:"tooltip",children:a||r})})]})})});nZ.displayName=Bh;var sZ="TooltipArrow",xSe=b.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,a=C1(n);return pSe(sZ,n).isInside?null:s.jsx(e1,{...a,...r,ref:t})});xSe.displayName=sZ;function ySe(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function vSe(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 bSe(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function wSe(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,o=t.length-1;i<t.length;o=i++){const l=t[i],c=t[o],u=l.x,d=l.y,f=c.x,m=c.y;d>r!=m>r&&n<(f-u)*(r-d)/(m-d)+u&&(a=!a)}return a}function jSe(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),NSe(t)}function NSe(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const a=e[r];for(;t.length>=2;){const i=t[t.length-1],o=t[t.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const a=e[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}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 SSe=ZQ,kSe=JQ,CSe=eZ,_Se=tZ,aZ=nZ;const iZ=SSe,mu=kSe,pu=CSe,ASe=_Se,rc=b.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(ASe,{children:s.jsx(aZ,{ref:r,sideOffset:t,className:He("z-[9999] 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
1080de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));rc.displayName=aZ.displayName;function rs({className:e,...t}){return s.jsx("div",{className:He("animate-pulse rounded-md bg-muted",e),...t})}const ESe=vy("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),ti=b.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:He(ESe({variant:t}),e),...n}));ti.displayName="Alert";const PSe=b.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:He("mb-1 font-medium leading-none tracking-tight",e),...t}));PSe.displayName="AlertTitle";const ni=b.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:He("text-sm [&_p]:leading-relaxed",e),...t}));ni.displayName="AlertDescription";const oZ=()=>{const[e,t]=b.useState([]),[n,r]=b.useState(!0),[a,i]=b.useState(null),[o,l]=b.useState(0),[c,u]=b.useState(1),[d,f]=b.useState(!1),{toast:m}=_t(),p=b.useCallback(async()=>{try{i(null),await new Promise(k=>setTimeout(k,100)),r(!0);const _=await Pt.listAgents(1,20);t(_.results),l(_.count),u(1),f(_.next!==null)}catch(_){console.error("Error fetching agents:",_),i(_.message||"Failed to fetch agents"),t([])}finally{r(!1)}},[]),v=b.useCallback(async()=>{if(!(!d||n))try{const _=c+1,k=await Pt.listAgents(_,20);t(C=>[...C,...k.results]),u(_),f(k.next!==null)}catch(_){console.error("Error loading more agents:",_),m({title:"Error",description:"Failed to load more agents",variant:"destructive"})}},[c,d,n,m]),y=b.useCallback(async _=>{try{const k=await Pt.createAgent(_);return t(C=>[k,...C]),l(C=>C+1),m({title:"Success",description:"Agent created successfully"}),k}catch(k){return console.error("Error creating agent:",k),i(k.message||"Failed to create agent"),m({title:"Error",description:k.message||"Failed to create agent",variant:"destructive"}),null}},[m]),x=b.useCallback(async(_,k)=>{try{const C=await Pt.updateAgent(_,k);return t(E=>E.map(O=>O.id===_?C:O)),m({title:"Success",description:"Agent updated successfully"}),C}catch(C){return console.error("Error updating agent:",C),i(C.message||"Failed to update agent"),m({title:"Error",description:C.message||"Failed to update agent",variant:"destructive"}),null}},[m]),w=b.useCallback(async _=>{try{return await Pt.deleteAgent(_),t(k=>k.filter(C=>C.id!==_)),l(k=>k-1),m({title:"Success",description:"Agent deleted successfully"}),!0}catch(k){return console.error("Error deleting agent:",k),i(k.message||"Failed to delete agent"),m({title:"Error",description:k.message||"Failed to delete agent",variant:"destructive"}),!1}},[m]),N=b.useCallback(async _=>{try{const k=await Pt.deployAgent(_);return t(C=>C.map(E=>E.id===_?k:E)),m({title:"Success",description:"Agent deployed successfully"}),k}catch(k){return console.error("Error deploying agent:",k),i(k.message||"Failed to deploy agent"),m({title:"Error",description:k.message||"Failed to deploy agent",variant:"destructive"}),null}},[m]),S=b.useCallback(async _=>{try{const k=await Pt.undeployAgent(_);return t(C=>C.map(E=>E.id===_?k:E)),m({title:"Success",description:"Agent undeployed successfully"}),k}catch(k){return console.error("Error undeploying agent:",k),i(k.message||"Failed to undeploy agent"),m({title:"Error",description:k.message||"Failed to undeploy agent",variant:"destructive"}),null}},[m]);return b.useEffect(()=>{p()},[p]),{agents:e,loading:n,error:a,refreshAgents:p,createAgent:y,updateAgent:x,deleteAgent:w,deployAgent:N,undeployAgent:S,total:o,hasMore:d,loadMore:v}},lZ=()=>{const[e,t]=b.useState({isConnected:!1,isLoading:!0,error:null,lastChecked:null}),n=async()=>{try{t(r=>({...r,isLoading:!0,error:null})),await Et.get("/api/openapi.json",{requiresAuth:!1}),t({isConnected:!0,isLoading:!1,error:null,lastChecked:new Date})}catch(r){t({isConnected:!1,isLoading:!1,error:r.message||"Failed to connect to API",lastChecked:new Date})}};return b.useEffect(()=>{n();const r=NaN,a=Number.isFinite(r)&&r>0?r:3e5;let i;return a>0&&(i=window.setInterval(n,a)),()=>{i&&clearInterval(i)}},[]),{...e,checkHealth:n}},TSe=()=>{const{user:e,isAuthenticated:t}=nr(),n=()=>{var v,y,x;const d=t&&e&&(e.industry||((v=e.companyProfile)==null?void 0:v.industry))||"Water Treatment",f=t&&e?e.organization||((y=e.companyProfile)==null?void 0:y.companyName)||"Your Organization":"Demo Water Treatment Facility";t&&((x=e==null?void 0:e.companyProfile)!=null&&x.customDomain);const m={"Water Treatment":{agents:[{name:`${f} Daily Chlorine Check Agent`,description:"Automates chlorine residual testing protocols and EPA compliance documentation",conversations:r(),analytics:{totalConversations:3241,averageResolutionTime:1.8,satisfactionScore:4.8,commonQuestions:["What are today's chlorine residual readings?","How do I document pH adjustments?","Where is the emergency shutdown procedure?","When is the next SCADA calibration due?"]}},{name:"MIL-SPEC Documentation Agent",description:"AI agent trained on military specification standards and technical documentation",deploymentUrl:"https://mil-spec-document-agent-client.privion-agents.ai/agent-preview/",conversations:r(),analytics:{totalConversations:1847,averageResolutionTime:2.1,satisfactionScore:4.7,commonQuestions:["What are the requirements for MIL-STD-810?","How do I interpret MIL-PRF specifications?","Where can I find the latest revision of a spec?","What testing is required for qualification?"]}}]},"Higher Education":{agents:[{name:`${f} Student Support Agent`,description:"Helps students with course registration, financial aid, and campus resources",conversations:a(),analytics:{totalConversations:2847,averageResolutionTime:3.2,satisfactionScore:4.6,commonQuestions:["How do I register for classes?","What financial aid is available?","Where is the library?","How do I access my transcripts?"]}},{name:`${f} Faculty Assistant`,description:"Assists faculty with administrative tasks and student inquiries",conversations:o(),analytics:{totalConversations:1234,averageResolutionTime:2.8,satisfactionScore:4.8,commonQuestions:["How do I submit grades?","Where are teaching resources?","How do I request classroom equipment?","What are the parking policies?"]}}]},Healthcare:{agents:[{name:`${f} Patient Portal Assistant`,description:"Helps patients schedule appointments and access health information",conversations:i(),analytics:{totalConversations:4521,averageResolutionTime:2.1,satisfactionScore:4.7,commonQuestions:["How do I schedule an appointment?","Where can I view my test results?","What insurance do you accept?","How do I refill prescriptions?"]}}]},"Legal Services":{agents:[{name:`${f} Client Services Agent`,description:"Assists clients with case status, document requests, and scheduling",conversations:l(),analytics:{totalConversations:1842,averageResolutionTime:2.8,satisfactionScore:4.5,commonQuestions:["What is the status of my case?","How do I schedule a consultation?","What documents do I need to provide?","What are your billing policies?"]}}]}};return(m[d]||m["Water Treatment"]).agents.map((w,N)=>({id:`mock_agent_${N}`,category:"operational-compliance",...w,deploymentUrl:w.deploymentUrl,analytics:{...w.analytics,peakH
1080ours:c(),monthlyTrends:u()}}))},r=()=>[{id:"conv_1",timestamp:new Date(Date.now()-3600*1e3),user:"Mike T. (Plant Operator)",resolved:!0,satisfaction:5,messages:[{role:"user",content:"Need to log the 8 AM chlorine residual readings for distribution system. Testing at points 1, 3, and 7.",timestamp:new Date(Date.now()-3600*1e3)},{role:"agent",content:"I'll help you log those chlorine readings. Please provide the ppm values for monitoring points 1, 3, and 7. I'll automatically check them against EPA minimum requirements (0.2 ppm) and update the daily compliance log.",timestamp:new Date(Date.now()-3600*1e3+15e3)},{role:"user",content:"Point 1: 0.8 ppm, Point 3: 0.6 ppm, Point 7: 0.3 ppm. All within range.",timestamp:new Date(Date.now()-3600*1e3+3e4)},{role:"agent",content:"Perfect! All readings are above the 0.2 ppm minimum. I've logged these in the compliance database and updated the SCADA trending charts. Next reading due at 2 PM. Would you like me to set a reminder?",timestamp:new Date(Date.now()-3600*1e3+45e3)}]}],a=()=>[{id:"conv_1",timestamp:new Date(Date.now()-7200*1e3),user:"Sarah M.",resolved:!0,satisfaction:5,messages:[{role:"user",content:"Hi, I need help registering for my spring semester classes. The system seems to be giving me an error.",timestamp:new Date(Date.now()-7200*1e3)},{role:"agent",content:"I can help you with registration! What error message are you seeing when you try to register?",timestamp:new Date(Date.now()-7200*1e3+3e4)},{role:"user",content:`It says "Hold on account - Financial Aid Office" and won't let me proceed.`,timestamp:new Date(Date.now()-7200*1e3+6e4)},{role:"agent",content:"That hold typically means you need to complete your financial aid verification. You can resolve this by visiting the Financial Aid Office in Student Services Building, Room 201, or by uploading the required documents to your student portal. Would you like me to show you what documents are needed?",timestamp:new Date(Date.now()-7200*1e3+9e4)}]}],i=()=>[{id:"conv_1",timestamp:new Date(Date.now()-3600*1e3),user:"John D.",resolved:!0,satisfaction:5,messages:[{role:"user",content:"I need to schedule a follow-up appointment with Dr. Smith.",timestamp:new Date(Date.now()-3600*1e3)},{role:"agent",content:"I can help you schedule that appointment. Dr. Smith has availability next week. What type of appointment is this for?",timestamp:new Date(Date.now()-3600*1e3+2e4)}]}],o=()=>[{id:"conv_1",timestamp:new Date(Date.now()-10800*1e3),user:"Prof. Johnson",resolved:!0,satisfaction:4,messages:[{role:"user",content:"I need to submit final grades for my Chemistry 101 course. Where do I access the grading system?",timestamp:new Date(Date.now()-10800*1e3)},{role:"agent",content:"You can access the grading system through the Faculty Portal. The deadline for final grades is December 20th at 5 PM. Would you like me to walk you through the submission process?",timestamp:new Date(Date.now()-10800*1e3+4e4)}]}],l=()=>[{id:"conv_1",timestamp:new Date(Date.now()-14400*1e3),user:"Maria L.",resolved:!0,satisfaction:4,messages:[{role:"user",content:"I need to apply for a business license. What documents do I need?",timestamp:new Date(Date.now()-14400*1e3)},{role:"agent",content:"For a business license, you'll need: 1) Completed application form, 2) Business plan, 3) Proof of location, and 4) Fee payment. The process typically takes 2-3 weeks. Would you like me to send you the application form?",timestamp:new Date(Date.now()-14400*1e3+6e4)}]}],c=()=>Array.from({length:24},(d,f)=>({hour:f,count:Math.floor(Math.random()*100)+10})),u=()=>["Jan","Feb","Mar","Apr","May","Jun"].map(f=>({month:f,conversations:Math.floor(Math.random()*1e3)+500,satisfaction:4+Math.random()*1}));return{mockAgents:n(),generateIndustryMockData:n}},H$=768,q$=480;function _1(){const[e,t]=b.useState(!1),[n,r]=b.useState(!1);return b.useEffect(()=>{const a=()=>{t(window.innerWidth<H$),r(window.innerWidth<q$)};a();const i=window.matchMedia(`(max-width: ${H$-1}px)`),o=window.matchMedia(`(max-width: ${q$-1}px)`),l=()=>a();return i.addEventListener("change",l),o.addEventListener("change",l),()=>{i.removeEventListener("change",l),o.removeEventListener("change",l)}},[]),{isMobile:e,isSmallMobile:n}}const Vc=()=>{const{user:e}=nr(),t=e==null?void 0:e.tier_info,n=u=>{if(!t)return!1;if(e!=null&&e.is_superuser)return!0;const d=t.limits[u];return typeof d=="boolean"?d:!1},r=u=>{if(!t)return 0;if(e!=null&&e.is_superuser)return-1;const d=t.limits[u];return typeof d=="number"?d:0},a=(u,d)=>{if(!t)return!1;if(e!=null&&e.is_superuser)return!0;const f=r(u);return f===-1?!0:d<f}
1080,i=(t==null?void 0:t.tier_level)===0,o=(t==null?void 0:t.tier_level)===1,l=(t==null?void 0:t.tier_level)===2,c=(t==null?void 0:t.tier_level)===3;return{tierInfo:t,can:n,limit:r,checkLimit:a,isFreeTier:i,isBasicTier:o,isProTier:l,isEnterpriseTier:c,tierLevel:(t==null?void 0:t.tier_level)||0,tierName:(t==null?void 0:t.tier_name)||"Free"}},cZ=({className:e,...t})=>s.jsx("nav",{role:"navigation","aria-label":"pagination",className:He("mx-auto flex w-full justify-center",e),...t});cZ.displayName="Pagination";const uZ=b.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,className:He("flex flex-row items-center gap-1",e),...t}));uZ.displayName="PaginationContent";const dg=b.forwardRef(({className:e,...t},n)=>s.jsx("li",{ref:n,className:He("",e),...t}));dg.displayName="PaginationItem";const A1=({className:e,isActive:t,size:n="icon",...r})=>s.jsx("a",{"aria-current":t?"page":void 0,className:He(SK({variant:t?"outline":"ghost",size:n}),e),...r});A1.displayName="PaginationLink";const dZ=({className:e,...t})=>s.jsxs(A1,{"aria-label":"Go to previous page",size:"default",className:He("gap-1 pl-2.5",e),...t,children:[s.jsx(f1,{className:"h-4 w-4"}),s.jsx("span",{children:"Previous"})]});dZ.displayName="PaginationPrevious";const fZ=({className:e,...t})=>s.jsxs(A1,{"aria-label":"Go to next page",size:"default",className:He("gap-1 pr-2.5",e),...t,children:[s.jsx("span",{children:"Next"}),s.jsx(ao,{className:"h-4 w-4"})]});fZ.displayName="PaginationNext";const hZ=({className:e,...t})=>s.jsxs("span",{"aria-hidden":!0,className:He("flex h-9 w-9 items-center justify-center",e),...t,children:[s.jsx(dX,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"More pages"})]});hZ.displayName="PaginationEllipsis";const cM=b.createContext({});function uM(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const dM=typeof window<"u",mZ=dM?b.useLayoutEffect:b.useEffect,E1=b.createContext(null);function fM(e,t){e.indexOf(t)===-1&&e.push(t)}function hM(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ml=(e,t,n)=>n>t?t:n<e?e:n;let mM=()=>{};const pl={},pZ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function gZ(e){return typeof e=="object"&&e!==null}const xZ=e=>/^0[^.\s]+$/u.test(e);function pM(e){let t;return()=>(t===void 0&&(t=e()),t)}const ri=e=>e,ISe=(e,t)=>n=>t(e(n)),Oy=(...e)=>e.reduce(ISe),sx=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class gM{constructor(){this.subscriptions=[]}add(t){return fM(this.subscriptions,t),()=>hM(this.subscriptions,t)}notify(t,n,r){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,r);else for(let i=0;i<a;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const io=e=>e*1e3,oo=e=>e/1e3;function yZ(e,t){return t?e*(1e3/t):0}const vZ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,OSe=1e-7,MSe=12;function RSe(e,t,n,r,a){let i,o,l=0;do o=t+(n-t)/2,i=vZ(o,r,a)-e,i>0?n=o:t=o;while(Math.abs(i)>OSe&&++l<MSe);return o}function My(e,t,n,r){if(e===t&&n===r)return ri;const a=i=>RSe(i,0,1,e,n);return i=>i===0||i===1?i:vZ(a(i),t,r)}const bZ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,wZ=e=>t=>1-e(1-t),jZ=My(.33,1.53,.69,.99),xM=wZ(jZ),NZ=bZ(xM),SZ=e=>(e*=2)<1?.5*xM(e):.5*(2-Math.pow(2,-10*(e-1))),yM=e=>1-Math.sin(Math.acos(e)),kZ=wZ(yM),CZ=bZ(yM),DSe=My(.42,0,1,1),LSe=My(0,0,.58,1),_Z=My(.42,0,.58,1),$Se=e=>Array.isArray(e)&&typeof e[0]!="number",AZ=e=>Array.isArray(e)&&typeof e[0]=="number",FSe={linear:ri,easeIn:DSe,easeInOut:_Z,easeOut:LSe,circIn:yM,circInOut:CZ,circOut:kZ,backIn:xM,backInOut:NZ,backOut:jZ,anticipate:SZ},zSe=e=>typeof e=="string",V$=e=>{if(AZ(e)){mM(e.length===4);const[t,n,r,a]=e;return My(t,n,r,a)}else if(zSe(e))return FSe[e];return e},Fv=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function BSe(e,t){let n=new Set,r=new Set,a=!1,i=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function c(d){o.has(d)&&(u.schedule(d),e()),d(l)}const u={schedule:(d,f=!1,m=!1)=>{const v=m&&a?n:r;return f&&o.add(d),v.has(d)||v.add(d),d},cancel:d=>
vendor: 3,445 bytes, line 1080
1080{r.delete(d),o.delete(d)},process:d=>{if(l=d,a){i=!0;return}a=!0,[n,r]=[r,n],n.forEach(c),n.clear(),a=!1,i&&(i=!1,u.process(d))}};return u}const USe=40;function EZ(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Fv.reduce((S,_)=>(S[_]=BSe(i),S),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:f,preRender:m,render:p,postRender:v}=o,y=()=>{const S=pl.useManualTiming?a.timestamp:performance.now();n=!1,pl.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(S-a.timestamp,USe),1)),a.timestamp=S,a.isProcessing=!0,l.process(a),c.process(a),u.process(a),d.process(a),f.process(a),m.process(a),p.process(a),v.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(y))},x=()=>{n=!0,r=!0,a.isProcessing||e(y)};return{schedule:Fv.reduce((S,_)=>{const k=o[_];return S[_]=(C,E=!1,O=!1)=>(n||x(),k.schedule(C,E,O)),S},{}),cancel:S=>{for(let _=0;_<Fv.length;_++)o[Fv[_]].cancel(S)},state:a,steps:o}}const{schedule:Wn,cancel:Rc,state:ns,steps:w2}=EZ(typeof requestAnimationFrame<"u"?requestAnimationFrame:ri,!0);let Pb;function HSe(){Pb=void 0}const ea={now:()=>(Pb===void 0&&ea.set(ns.isProcessing||pl.useManualTiming?ns.timestamp:performance.now()),Pb),set:e=>{Pb=e,queueMicrotask(HSe)}},PZ=e=>t=>typeof t=="string"&&t.startsWith(e),vM=PZ("--"),qSe=PZ("var(--"),bM=e=>qSe(e)?VSe.test(e.split("/*")[0].trim()):!1,VSe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Wm={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ax={...Wm,transform:e=>ml(0,1,e)},zv={...Wm,default:1},Sg=e=>Math.round(e*1e5)/1e5,wM=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WSe(e){return e==null}const GSe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,jM=(e,t)=>n=>!!(typeof n=="string"&&GSe.test(n)&&n.startsWith(e)||t&&!WSe(n)&&Object.prototype.hasOwnProperty.call(n,t)),TZ=(e,t,n)=>r=>{if(typeof r!="string")return r;const[a,i,o,l]=r.match(wM);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},KSe=e=>ml(0,255,e),j2={...Wm,transform:e=>Math.round(KSe(e))},Au={test:jM("rgb","red"),parse:TZ("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+j2.transform(e)+", "+j2.transform(t)+", "+j2.transform(n)+", "+Sg(ax.transform(r))+")"};function YSe(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}const PT={test:jM("#"),parse:YSe,transform:Au.transform},Ry=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),sc=Ry("deg"),lo=Ry("%"),Nt=Ry("px"),XSe=Ry("vh"),QSe=Ry("vw"),W$={...lo,parse:e=>lo.parse(e)/100,transform:e=>lo.transform(e*100)},qf={test:jM("hsl","hue"),parse:TZ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+lo.transform(Sg(t))+", "+lo.transform(Sg(n))+", "+Sg(ax.transform(r))+")"},br={test:e=>Au.test(e)||PT.test(e)||qf.test(e),parse:e=>Au.test(e)?Au.parse(e):qf.test(e)?qf.parse(e):PT.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Au.transform(e):qf.transform(e),getAnimatableNone:e=>{const t=br.parse(e);return t.alpha=0,br.transform(t)}}
vendor: 1,770 bytes, line 1080
1080,ZSe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function JSe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(wM))==null?void 0:t.length)||0)+(((n=e.match(ZSe))==null?void 0:n.length)||0)>0}const IZ="number",OZ="color",eke="var",tke="var(",G$="${}",nke=/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 ix(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const l=t.replace(nke,c=>(br.test(c)?(r.color.push(i),a.push(OZ),n.push(br.parse(c))):c.startsWith(tke)?(r.var.push(i),a.push(eke),n.push(c)):(r.number.push(i),a.push(IZ),n.push(parseFloat(c))),++i,G$)).split(G$);return{values:n,split:l,indexes:r,types:a}}function MZ(e){return ix(e).values}function RZ(e){const{split:t,types:n}=ix(e),r=t.length;return a=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],a[o]!==void 0){const l=n[o];l===IZ?i+=Sg(a[o]):l===OZ?i+=br.transform(a[o]):i+=a[o]}return i}}const rke=e=>typeof e=="number"?0:br.test(e)?br.getAnimatableNone(e):e;function ske(e){const t=MZ(e);return RZ(e)(t.map(rke))}const Dc={test:JSe,parse:MZ,createTransformer:RZ,getAnimatableNone:ske};function N2(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 ake({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let a=0,i=0,o=0;if(!t)a=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;a=N2(c,l,e+1/3),i=N2(c,l,e),o=N2(c,l,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function hw(e,t){return n=>n>0?t:e}const Jn=(e,t,n)=>
vendor: 9,828 bytes, line 1080
1080e+(t-e)*n,S2=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},ike=[PT,Au,qf],oke=e=>ike.find(t=>t.test(e));function K$(e){const t=oke(e);if(!t)return!1;let n=t.parse(e);return t===qf&&(n=ake(n)),n}const Y$=(e,t)=>{const n=K$(e),r=K$(t);if(!n||!r)return hw(e,t);const a={...n};return i=>(a.red=S2(n.red,r.red,i),a.green=S2(n.green,r.green,i),a.blue=S2(n.blue,r.blue,i),a.alpha=Jn(n.alpha,r.alpha,i),Au.transform(a))},TT=new Set(["none","hidden"]);function lke(e,t){return TT.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function cke(e,t){return n=>Jn(e,t,n)}function NM(e){return typeof e=="number"?cke:typeof e=="string"?bM(e)?hw:br.test(e)?Y$:fke:Array.isArray(e)?DZ:typeof e=="object"?br.test(e)?Y$:uke:hw}function DZ(e,t){const n=[...e],r=n.length,a=e.map((i,o)=>NM(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=a[o](i);return n}}function uke(e,t){const n={...e,...t},r={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(r[a]=NM(e[a])(e[a],t[a]));return a=>{for(const i in r)n[i]=r[i](a);return n}}function dke(e,t){const n=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],o=e.indexes[i][r[i]],l=e.values[o]??0;n[a]=l,r[i]++}return n}const fke=(e,t)=>{const n=Dc.createTransformer(t),r=ix(e),a=ix(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?TT.has(e)&&!a.values.length||TT.has(t)&&!r.values.length?lke(e,t):Oy(DZ(dke(r,a),a.values),n):hw(e,t)};function LZ(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Jn(e,t,n):NM(e)(e,t)}const hke=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Wn.update(t,n),stop:()=>Rc(t),now:()=>ns.isProcessing?ns.timestamp:ea.now()}},$Z=(e,t,n=10)=>{let r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=Math.round(e(i/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},mw=2e4;function SM(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mw;)t+=n,r=e.next(t);return t>=mw?1/0:t}function mke(e,t=100,n){const r=n({...e,keyframes:[0,t]}),a=Math.min(SM(r),mw);return{type:"keyframes",ease:i=>r.next(a*i).value/t,duration:oo(a)}}const pke=5;function FZ(e,t,n){const r=Math.max(t-pke,0);return yZ(n-e(r),t-r)}const ar={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},k2=.001;function gke({duration:e=ar.duration,bounce:t=ar.bounce,velocity:n=ar.velocity,mass:r=ar.mass}){let a,i,o=1-t;o=ml(ar.minDamping,ar.maxDamping,o),e=ml(ar.minDuration,ar.maxDuration,oo(e)),o<1?(a=u=>{const d=u*o,f=d*e,m=d-n,p=IT(u,o),v=Math.exp(-f);return k2-m/p*v},i=u=>{const f=u*o*e,m=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),y=IT(Math.pow(u,2),o);return(-a(u)+k2>0?-1:1)*((m-p)*v)/y}):(a=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-k2+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=yke(a,i,l);if(e=io(e),isNaN(c))return{stiffness:ar.stiffness,damping:ar.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const xke=12;function yke(e,t,n){let r=n;for(let a=1;a<xke;a++)r=r-e(r)/t(r);return r}function IT(e,t){return e*Math.sqrt(1-t*t)}const vke=["duration","bounce"],bke=["stiffness","damping","mass"];function X$(e,t){return t.some(n=>e[n]!==void 0)}function wke(e){let t={velocity:ar.velocity,stiffness:ar.stiffness,damping:ar.damping,mass:ar.mass,isResolvedFromDuration:!1,...e};if(!X$(e,bke)&&X$(e,vke))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),a=r*r,i=2*ml(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:ar.mass,stiffness:a,damping:i}}else{const n=gke(e);t={...t,...n,mass:ar.mass},t.isResolvedFromDuration=!0}return t}function pw(e=ar.visualDuration,t=ar.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:m,isResolvedFromDuration:p}=wke({...n,velocity:-oo(n.velocity||0)}),v=m||0,y=u/(2*Math.sqrt(c*d)),x=o-i,w=oo(Math.sqrt(c/d)),N=Math.abs(x)<5;r||(r=N?ar.restSpeed.granular:ar.restSpeed.default),a||(a=N?ar.restDelta.granular:ar.restDelta.default);let S;if(y<1){const k=IT(w,y);S=C=>{const E=Math.exp(-y*w*C);return o-E*((v+y*w*x)/k*Math.sin(k*C)+x*Math.cos(k*C))}}else if(y===1)S=k=>o-Math.exp(-w*k)*(x+(v+w*x)*k);else{const k=w*Math.sqrt(y*y-1);S=C=>{const E=Math.exp(-y*w*C),O=Math.min(k*C,300);return o-E*((v+y*w*x)*Math.sinh(O)+k*x*Math.cosh(O))/k}}const _={calculatedDuration:p&&f||null,next:k=>{const C=S(k);if(p)l.done=k>=f;else{let E=k===0?v:0;y<1&&(E=k===0?io(v):FZ(S,k,C));const O=Math.abs(E)<=r,P=Math.abs(o-C)<=a;l.done=O&&P}return l.value=l.done?o:C,l},toString:()=>{const k=Math.min(SM(_),mw),C=$Z(E=>_.next(k*E).value,k,30);return k+"ms "+C},toTransition:()=>{}};return _}pw.applyToOptions=e=>{const t=mke(e,100,pw);return e.ease=t.ease,e.duration=io(t.duration),e.type="keyframes",e};function OT({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],m={done:!1,value:f},p=O=>l!==void 0&&O<l||c!==void 0&&O>c,v=O=>l===void 0?c:c===void 0||Math.abs(l-O)<Math.abs(c-O)?l:c;let y=n*t;const x=f+y,w=o===void 0?x:o(x);w!==x&&(y=w-f);const N=O=>-y*Math.exp(-O/r),S=O=>w+N(O),_=O=>{const P=N(O),R=S(O);m.done=Math.abs(P)<=u,m.value=m.done?w:R};let k,C;const E=O=>{p(m.value)&&(k=O,C=pw({keyframes:[m.value,v(m.value)],velocity:FZ(S,O,m.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return E(0),{calculatedDuration:null,next:O=>{let P=!1;return!C&&k===void 0&&(P=!0,_(O),E(O)),k!==void 0&&O>=k?C.next(O-k):(!P&&_(O),m)}}}function jke(e,t,n){const r=[],a=n||pl.mix||LZ,i=e.length-1;for(let o=0;o<i;o++){let l=a(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||ri:t;l=Oy(c,l)}r.push(l)}return r}function Nke(e,t,{clamp:n=!0,ease:r,mixer:a}={}){const i=e.length;if(mM(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=jke(t,r,a),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const m=sx(e[f],e[f+1],d);return l[f](m)};return n?d=>u(ml(e[0],e[i-1],d)):u}function Ske(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=sx(0,t,r);e.push(Jn(n,1,a))}}function kke(e){const t=[0];return Ske(t,e.length-1),t}function Cke(e,t){return e.map(n=>n*t)}function _ke(e,t){return e.map(()=>t||_Z).splice(0,e.length-1)}function kg({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const a=$Se(r)?r.map(V$):V$(r),i={done:!1,value:t[0]},o=Cke(n&&n.length===t.length?n:kke(t),e),l=Nke(o,t,{ease:Array.isArray(a)?a:_ke(t,a)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const Ake=e=>e!==null;function kM(e,{repeat:t,repeatType:n="loop"},r,a=1){const i=e.filter(Ake),l=a<0||t&&n!=="loop"&&t%2===1?0:i.length-1;return!l||r===void 0?i[l]:r}const Eke={decay:OT,inertia:OT,tween:kg,keyframes:kg,spring:pw};function zZ(e){typeof e.type=="string"&&(e.type=Eke[e.type])}class CM{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 Pke=e=>e/100;class _M extends CM{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,a;const{motionValue:n}=this.options;n&&n.updatedAt!==ea.now()&&this.tick(ea.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(r=this.options).onStop)==null||a.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;zZ(t);const{type:n=kg,repeat:r=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=t;let{keyframes:l}=t;const c=n||kg;c!==kg&&typeof l[0]!="number"&&(this.mixKeyframes=Oy(Pke,LZ(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});i==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=SM(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(r+1)-a,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:a,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:m,repeatDelay:p,type:v,onUpdate:y,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const w=this.currentTime-u*(this.playbackSpeed>=0?1:-1),N=this.playbackSpeed>=0?w<0:w>a;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let S=this.currentTime,_=r;if(f){const O=Math.min(this.currentTime,a)/l;let P=Math.floor(O),R=O%1;!R&&O>=1&&(R=1),R===1&&P--,P=Math.min(P,f+1),!!(P%2)&&(m==="reverse"?(R=1-R,p&&(R-=p/l)):m==="mirror"&&(_=o)),S=ml(0,1,R)*l}const k=N?{done:!1,value:d[0]}:_.next(S);i&&(k.value=i(k.value));let{done:C}=k;!N&&c!==null&&(C=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&v!==OT&&(k.value=kM(d,this.options,x,this.speed)),y&&y(k.value),E&&this.finish(),
1080k}then(t,n){return this.finished.then(t,n)}get duration(){return oo(this.calculatedDuration)}get time(){return oo(this.currentTime)}set time(t){var n;t=io(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(ea.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=oo(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=hke,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(i=(a=this.options).onPlay)==null||i.call(a);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(ea.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 Tke(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Eu=e=>e*180/Math.PI,MT=e=>{const t=Eu(Math.atan2(e[1],e[0]));return RT(t)},Ike={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:MT,rotateZ:MT,skewX:e=>Eu(Math.atan(e[1])),skewY:e=>Eu(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},RT=e=>(e=e%360,e<0&&(e+=360),e),Q$=MT,Z$=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),J$=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Oke={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Z$,scaleY:J$,scale:e=>(Z$(e)+J$(e))/2,rotateX:e=>RT(Eu(Math.atan2(e[6],e[5]))),rotateY:e=>RT(Eu(Math.atan2(-e[2],e[0]))),rotateZ:Q$,rotate:Q$,skewX:e=>Eu(Math.atan(e[4])),skewY:e=>Eu(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function DT(e){return e.includes("scale")?1:0}function LT(e,t){if(!e||e==="none")return DT(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,a;if(n)r=Oke,a=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Ike,a=l}if(!a)return DT(t);const i=r[t],o=a[1].split(",").map(Rke);return typeof i=="function"?i(o):o[i]}const Mke=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return LT(n,t)};function Rke(e){return parseFloat(e.trim())}const Gm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Km=new Set(Gm),eF=e=>e===Wm||e===Nt,Dke=new Set(["x","y","z"]),Lke=Gm.filter(e=>!Dke.has(e));function $ke(e){const t=[];return Lke.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Zu={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})=>LT(t,"x"),y:(e,{transform:t})=>LT(t,"y")};Zu.translateX=Zu.x;Zu.translateY=Zu.y;const Ju=new Set;let $T=!1,FT=!1,zT=!1;function BZ(){if(FT){const e=Array.from(Ju).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const a=$ke(r);a.length&&(n.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const a=n.get(r);a&&a.forEach(([i,o])=>{var l;(l=r.getValue(i))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}
vendor: 1,419 bytes, line 1080
1080FT=!1,$T=!1,Ju.forEach(e=>e.complete(zT)),Ju.clear()}function UZ(){Ju.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(FT=!0)})}function Fke(){zT=!0,UZ(),BZ(),zT=!1}class AM{constructor(t,n,r,a,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=a,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Ju.add(this),$T||($T=!0,Wn.read(UZ),Wn.resolveKeyframes(BZ))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),o=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),a&&i===void 0&&a.set(t[0])}Tke(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ju.delete(this)}cancel(){this.state==="scheduled"&&(Ju.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const zke=e=>e.startsWith("--");function Bke(e,t,n){zke(t)?e.style.setProperty(t,n):e.style[t]=n}const Uke=pM(()=>window.ScrollTimeline!==void 0),Hke={};function qke(e,t){const n=pM(e);return()=>Hke[t]??n()}const HZ=qke(()=>{try{document.createElement("div").animate({opacity:0}
1080,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),fg=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,tF={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:fg([0,.65,.55,1]),circOut:fg([.55,0,1,.45]),backIn:fg([.31,.01,.66,-.59]),backOut:fg([.33,1.53,.69,.99])};function qZ(e,t){if(e)return typeof e=="function"?HZ()?$Z(e,t):"ease-out":AZ(e)?fg(e):Array.isArray(e)?e.map(n=>qZ(n,t)||tF.easeOut):tF[e]}function Vke(e,t,n,{delay:r=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const f=qZ(l,a);Array.isArray(f)&&(d.easing=f);const m={delay:r,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(d,m)}function VZ(e){return typeof e=="function"&&"applyToOptions"in e}function Wke({type:e,...t}){return VZ(e)&&HZ()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class Gke extends CM{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:a,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!i,this.allowFlatten=o,this.options=t,mM(typeof t.type!="string");const u=Wke(t);this.animation=Vke(n,r,a,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=kM(a,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):Bke(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(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 t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}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 oo(Number(t))}get time(){return oo(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=io(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 Number(this.animation.startTime)}set startTime(t){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&&Uke()?(this.animation.timeline=t,ri):n(this)}}const WZ={anticipate:SZ,backInOut:NZ,circInOut:CZ};function Kke(e){return e in WZ}function Yke(e){typeof e.ease=="string"&&Kke(e.ease)&&(e.ease=WZ[e.ease])}const nF=10;class Xke extends Gke{constructor(t){Yke(t),zZ(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:a,element:i,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new _M({...o,autoplay:!1}),c=io(this.finishedTime??this.time);n.setWithVelocity(l.sample(c-nF).value,l.sample(c).value,nF),l.stop()}}const rF=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Dc.test(e)||e==="0")&&!e.startsWith("url("));function Qke(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 Zke(e,t,n,r){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=rF(a,t),l=rF(i,t);return!o||!l?!1:Qke(e)||(n==="spring"||VZ(n))&&r}function BT(e){e.duration=0,e.type}const Jke=new Set(["opacity","clipPath","filter","transform"]),e2e=pM(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function t2e(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:a,damping:i,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return e2e()&&n&&Jke.has(n)&&(n!=="transform"||!u)&&!c&&!r&&a!=="mirror"&&i!==0&&o!=="inertia"}const n2e=40;class r2e extends CM{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:
1080o="loop",keyframes:l,name:c,motionValue:u,element:d,...f}){var v;super(),this.stop=()=>{var y,x;this._animation&&(this._animation.stop(),(y=this.stopTimeline)==null||y.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=ea.now();const m={autoplay:t,delay:n,type:r,repeat:a,repeatDelay:i,repeatType:o,name:c,motionValue:u,element:d,...f},p=(d==null?void 0:d.KeyframeResolver)||AM;this.keyframeResolver=new p(l,(y,x,w)=>this.onKeyframesResolved(y,x,m,!w),c,u,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(t,n,r,a){this.keyframeResolver=void 0;const{name:i,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=ea.now(),Zke(t,i,o,l)||((pl.instantAnimations||!c)&&(d==null||d(kM(t,r,n))),t[0]=t[t.length-1],BT(r),r.repeat=0);const m={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>n2e?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},p=!u&&t2e(m)?new Xke({...m,element:m.motionValue.owner.current}):new _M(m);p.finished.then(()=>this.notifyFinished()).catch(ri),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}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(),Fke()),this._animation}get duration(){return this.animation.duration}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()}}const s2e=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function a2e(e){const t=s2e.exec(e);if(!t)return[,];const[,n,r,a]=t;return[`--${n??r}`,a]}function GZ(e,t,n=1){const[r,a]=a2e(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return pZ(o)?parseFloat(o):o}return bM(a)?GZ(a,t,n+1):a}function EM(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const KZ=new Set(["width","height","top","left","right","bottom",...Gm]),i2e={test:e=>e==="auto",parse:e=>e},YZ=e=>t=>t.test(e),XZ=[Wm,Nt,lo,sc,QSe,XSe,i2e],sF=e=>XZ.find(YZ(e));function o2e(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xZ(e):!0}const l2e=new Set(["brightness","contrast","saturate","opacity"]);function c2e(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(wM)||[];if(!r)return e;const a=n.replace(r,"");let i=l2e.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const u2e=/\b([a-z-]*)\(.*?\)/gu,UT={...Dc,getAnimatableNone:e=>{const t=e.match(u2e);return t?t.map(c2e).join(" "):e}},aF={...Wm,transform:Math.round},d2e={rotate:sc,rotateX:sc,rotateY:sc,rotateZ:sc,scale:zv,scaleX:zv,scaleY:zv,scaleZ:zv,skew:sc,skewX:sc,skewY:sc,distance:Nt,translateX:Nt,translateY:Nt,translateZ:Nt,x:Nt,y:Nt,z:Nt,perspective:Nt,transformPerspective:Nt,opacity:ax,originX:W$,originY:W$,originZ:Nt},PM={borderWidth:Nt,borderTopWidth:Nt,borderRightWidth:Nt,borderBottomWidth:Nt,borderLeftWidth:Nt,borderRadius:Nt,radius:Nt,borderTopLeftRadius:Nt,borderTopRightRadius:Nt,borderBottomRightRadius:Nt,borderBottomLeftRadius:Nt,width:Nt,maxWidth:Nt,height:Nt,maxHeight:Nt,top:Nt,right:Nt,bottom:Nt,left:Nt,padding:Nt,paddingTop:Nt,paddingRight:Nt,paddingBottom:Nt,paddingLeft:Nt,margin:Nt,marginTop:Nt,marginRight:Nt,marginBottom:Nt,marginLeft:Nt,backgroundPositionX:Nt,backgroundPositionY:Nt,...d2e,zIndex:aF,fillOpacity:ax,strokeOpacity:ax,numOctaves:aF},f2e={...PM,color:br,backgroundColor:br,outlineColor:br,fill:br,stroke:br,borderColor:br,borderTopColor:br,borderRightColor:br,borderBottomColor:br,borderLeftColor:br,filter:UT,WebkitFilter:UT},QZ=e=>f2e[e];function ZZ(e,t){let n=QZ(e);return n!==UT&&(n=Dc),n.getAnimatableNone?n.getAnimatableNone(t):void 0}
vendor: 13,140 bytes, lines 1080-1088
1080const h2e=new Set(["auto","none","0"]);function m2e(e,t,n){let r=0,a;for(;r<e.length&&!a;){const i=e[r];typeof i=="string"&&!h2e.has(i)&&ix(i).values.length&&(a=e[r]),r++}if(a&&n)for(const i of t)e[i]=ZZ(n,a)}class p2e extends AM{constructor(t,n,r,a,i){super(t,n,r,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),bM(u))){const d=GZ(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!KZ.has(r)||t.length!==2)return;const[a,i]=t,o=sF(a),l=sF(i);if(o!==l)if(eF(o)&&eF(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else Zu[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||o2e(t[a]))&&r.push(a);r.length&&m2e(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=Zu[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const i=r.length-1,o=r[i];r[i]=Zu[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function g2e(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const a=(n==null?void 0:n[e])??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const JZ=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function eJ(e){return gZ(e)&&"offsetHeight"in e}const iF=30,x2e=e=>!isNaN(parseFloat(e));class y2e{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var i;const a=ea.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ea.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=x2e(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 gM);const r=this.events[t].add(n);return t==="change"?()=>{r(),Wn.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=ea.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>iF)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,iF);return yZ(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 Uh(e,t){return new y2e(e,t)}const{schedule:TM}=EZ(queueMicrotask,!1),Ni={x:!1,y:!1};function tJ(){return Ni.x||Ni.y}function v2e(e){return e==="x"||e==="y"?Ni[e]?null:(Ni[e]=!0,()=>{Ni[e]=!1}):Ni.x||Ni.y?null:(Ni.x=Ni.y=!0,()=>{Ni.x=Ni.y=!1})}function nJ(e,t){const n=g2e(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[n,a,()=>r.abort()]}function oF(e){return!(e.pointerType==="touch"||tJ())}function b2e(e,t,n={}){const[r,a,i]=nJ(e,n),o=l=>{if(!oF(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=f=>{oF(f)&&(u(f),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,a)};return r.forEach(l=>{l.addEventListener("pointerenter",o,a)}),i}const rJ=(e,t)=>t?e===t?!0:rJ(e,t.parentElement):!1,IM=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,w2e=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function j2e(e){return w2e.has(e.tagName)||e.tabIndex!==-1}const Tb=new WeakSet;function lF(e){return t=>{t.key==="Enter"&&e(t)}}function C2(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const N2e=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=lF(()=>{if(Tb.has(n))return;C2(n,"down");const a=lF(()=>{C2(n,"up")}),i=()=>C2(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function cF(e){return IM(e)&&!tJ()}function S2e(e,t,n={}){const[r,a,i]=nJ(e,n),o=l=>{const c=l.currentTarget;if(!cF(l))return;Tb.add(c);const u=t(c,l),d=(p,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),Tb.has(c)&&Tb.delete(c),cF(p)&&typeof u=="function"&&u(p,{success:v})},f=p=>{d(p,c===window||c===document||n.useGlobalTarget||rJ(c,p.target))},m=p=>{d(p,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",m,a)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,a),eJ(l)&&(l.addEventListener("focus",u=>N2e(u,a)),!j2e(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),i}function sJ(e){return gZ(e)&&"ownerSVGElement"in e}function k2e(e){return sJ(e)&&e.tagName==="svg"}const xs=e=>!!(e&&e.getVelocity),C2e=[...XZ,br,Dc],_2e=e=>C2e.find(YZ(e)),OM=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class A2e extends b.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,a=eJ(r)&&r.offsetWidth||0,i=this.props.sizeRef.current;i.height=n.offsetHeight||0,i.width=n.offsetWidth||0,i.top=n.offsetTop,i.left=n.offsetLeft,i.right=a-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function E2e({children:e,isPresent:t,anchorX:n,root:r}){const a=b.useId(),i=b.useRef(null),o=b.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=b.useContext(OM);return b.useInsertionEffect(()=>{const{width:c,height:u,top:d,left:f,right:m}=o.current;if(t||!i.current||!c||!u)return;const p=n==="left"?`left: ${f}`:`right: ${m}`;i.current.dataset.motionPopId=a;const v=document.createElement("style");l&&(v.nonce=l);const y=r??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`
1081          [data-motion-pop-id="${a}"] {
1082            position: absolute !important;
1083            width: ${c}px !important;
1084            height: ${u}px !important;
1085            ${p}px !important;
1086            top: ${d}px !important;
1087          }
1088        `),()=>{y.contains(v)&&y.removeChild(v)}},[t]),s.jsx(A2e,{isPresent:t,childRef:i,sizeRef:o,children:b.cloneElement(e,{ref:i})})}const P2e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:a,presenceAffectsLayout:i,mode:o,anchorX:l,root:c})=>{const u=uM(T2e),d=b.useId();let f=!0,m=b.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:a,onExitComplete:p=>{u.set(p,!0);for(const v of u.values())if(!v)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[n,u,r]);return i&&f&&(m={...m}),b.useMemo(()=>{u.forEach((p,v)=>u.set(v,!1))},[n]),b.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=s.jsx(E2e,{isPresent:n,anchorX:l,root:c,children:e})),s.jsx(E1.Provider,{value:m,children:e})};function T2e(){return new Map}function aJ(e=!0){const t=b.useContext(E1);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:a}=t,i=b.useId();b.useEffect(()=>{if(e)return a(i)},[e]);const o=b.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Bv=e=>e.key||"";function uF(e){const t=[];return b.Children.forEach(e,n=>{b.isValidElement(n)&&t.push(n)}),t}const ci=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:i="sync",propagate:o=!1,anchorX:l="left",root:c})=>{const[u,d]=aJ(o),f=b.useMemo(()=>uF(e),[e]),m=o&&!u?[]:f.map(Bv),p=b.useRef(!0),v=b.useRef(f),y=uM(()=>new Map),[x,w]=b.useState(f),[N,S]=b.useState(f);mZ(()=>{p.current=!1,v.current=f;for(let C=0;C<N.length;C++){const E=Bv(N[C]);m.includes(E)?y.delete(E):y.get(E)!==!0&&y.set(E,!1)}},[N,m.length,m.join("-")]);const _=[];if(f!==x){let C=[...f];for(let E=0;E<N.length;E++){const O=N[E],P=Bv(O);m.includes(P)||(C.splice(E,0,O),_.push(O))}return i==="wait"&&_.length&&(C=_),S(uF(C)),w(f),null}const{forceRender:k}=b.useContext(cM);return s.jsx(s.Fragment,{children:N.map(C=>{const E=Bv(C),O=o&&!u?!1:f===N||m.includes(E),P=()=>{if(y.has(E))y.set(E,!0);else return;let R=!0;y.forEach(T=>{T||(R=!1)}),R&&(k==null||k(),S(v.current),o&&(d==null||d()),r&&r())};return s.jsx(P2e,{isPresent:O,initial:!p.current||n?void 0:!1,custom:t,presenceAffectsLayout:a,mode:i,root:c,onExitComplete:O?void 0:P,anchorX:l,children:C},E)})})},iJ=b.createContext({strict:!1}),dF={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"]},Hh={};for(const e in dF)Hh[e]={isEnabled:t=>dF[e].some(n=>!!t[n])};function I2e(e){for(const t in e)Hh[t]={...Hh[t],...e[t]}}const O2e=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 gw(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||O2e.has(e)}let oJ=e=>!gw(e);function M2e(e){typeof e=="function"&&(oJ=t=>t.startsWith("on")?!gw(t):e(t))}try{M2e(require("@emotion/is-prop-valid").default)}catch{}function R2e(e,t,n){const r={};for(const a in e)a==="values"&&typeof e.values=="object"||(oJ(a)||n===!0&&gw(a)||!t&&!gw(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}const P1=b.createContext({});function T1(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ox(e){return typeof e=="string"||Array.isArray(e)}const MM=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],RM=["initial",...MM];function I1(e){return T1(e.animate)||RM.some(t=>ox(e[t]))}function lJ(e){return!!(I1(e)||e.variants)}function D2e(e,t){if(I1(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ox(n)?n:void 0,animate:ox(r)?r:void 0}}return e.inherit!==!1?t:{}}function L2e(e){const{initial:t,animate:n}=D2e(e,b.useContext(P1));return b.useMemo(()=>({initial:t,animate:n}),[fF(t),fF(n)])}function fF(e){return Array.isArray(e)?e.join(" "):e}const lx={};function $2e(e){for(const t in e)lx[t]=e[t],vM(t)&&(lx[t].isCSSVariable=!0)}function cJ(e,{layout:t,layoutId:n}){return Km.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lx[e]||e==="opacity")}const F2e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z2e=Gm.length;function B2e(e,t,n){let r="",a=!0;for(let i=0;i<z2e;i++){const o=Gm[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=JZ(l,PM[o]);if(!c){a=!1;const d=F2e[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}
vendor: 5,198 bytes, line 1088
1088function DM(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Km.has(c)){o=!0;continue}else if(vM(c)){a[c]=u;continue}else{const d=JZ(u,PM[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=B2e(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const LM=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uJ(e,t,n){for(const r in t)!xs(t[r])&&!cJ(r,n)&&(e[r]=t[r])}function U2e({transformTemplate:e},t){return b.useMemo(()=>{const n=LM();return DM(n,t,e),Object.assign({},n.vars,n.style)},[t])}function H2e(e,t){const n=e.style||{},r={};return uJ(r,n,e),Object.assign(r,U2e(e,t)),r}function q2e(e,t){const n={},r=H2e(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 V2e={offset:"stroke-dashoffset",array:"stroke-dasharray"},W2e={offset:"strokeDashoffset",array:"strokeDasharray"};function G2e(e,t,n=1,r=0,a=!0){e.pathLength=1;const i=a?V2e:W2e;e[i.offset]=Nt.transform(-r);const o=Nt.transform(t),l=Nt.transform(n);e[i.array]=`${o} ${l}`}function dJ(e,{attrX:t,attrY:n,attrScale:r,pathLength:a,pathSpacing:i=1,pathOffset:o=0,...l},c,u,d){if(DM(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m}=e;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&G2e(f,a,i,o,!1)}const fJ=()=>({...LM(),attrs:{}}),hJ=e=>typeof e=="string"&&e.toLowerCase()==="svg";function K2e(e,t,n,r){const a=b.useMemo(()=>{const i=fJ();return dJ(i,t,hJ(r),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};uJ(i,e.style,e),a.style={...i,...a.style}}return a}const Y2e=["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 $M(e){return typeof e!="string"||e.includes("-")?!1:!!(Y2e.indexOf(e)>-1||/[A-Z]/u.test(e))}function X2e(e,t,n,{latestValues:r},a,i=!1){const l=($M(e)?K2e:q2e)(t,r,a,e),c=R2e(t,typeof e=="string",i),u=e!==b.Fragment?{...c,...l,ref:n}:{},{children:d}=t,f=b.useMemo(()=>xs(d)?d.get():d,[d]);return b.createElement(e,{...u,children:f})}function hF(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function FM(e,t,n,r){if(typeof t=="function"){const[a,i]=hF(r);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=hF(r);t=t(n!==void 0?n:e.custom,a,i)}return t}function Ib(e){return xs(e)?e.get():e}function Q2e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,a){return{latestValues:Z2e(n,r,a,e),renderState:t()}}function Z2e(e,t,n,r){const a={},i=r(e,{});for(const m in i)a[m]=Ib(i[m]);let{initial:o,animate:l}=e;const c=I1(e),u=lJ(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!T1(f)){const m=Array.isArray(f)?f:[f];for(let p=0;p<m.length;p++){const v=FM(e,m[p]);if(v){const{transitionEnd:y,transition:x,...w}=v;for(const N in w){let S=w[N];if(Array.isArray(S)){const _=d?S.length-1:0;S=S[_]}S!==null&&(a[N]=S)}for(const N in y)a[N]=y[N]}}}return a}const mJ=e=>(t,n)=>{const r=b.useContext(P1),a=b.useContext(E1),i=()=>Q2e(e,t,r,a);return n?i():uM(i)};function zM(e,t,n){var i;const{style:r}=e,a={};for(const o in r)(xs(r[o])||t.style&&xs(t.style[o])||cJ(o,e)||((i=n==null?void 0:n.getValue(o))==null?void 0:i.liveStyle)!==void 0)&&(a[o]=r[o]);return a}const J2e=mJ({scrapeMotionValuesFromProps:zM,createRenderState:LM});function pJ(e,t,n){const r=zM(e,t,n);for(const a in e)if(xs(e[a])||xs(t[a])){const i=Gm.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[i]=e[a]}return r}const eCe=mJ({scrapeMotionValuesFromProps:pJ,createRenderState:fJ}),tCe=Symbol.for("motionComponentSymbol");function Vf(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function nCe(e,t,n){return b.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Vf(n)&&(n.current=r))},[t])}const BM=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),rCe="framerAppearId",gJ="data-"+BM(rCe),xJ=b.createContext({});function sCe(e,t,n,r,a){var y,x;const{visualElement:i}=b.useContext(P1),o=b.useContext(iJ),l=b.useContext(E1),c=b.useContext(OM).reducedMotion,u=b.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}
vendor: 20,383 bytes, line 1088
1088));const d=u.current,f=b.useContext(xJ);d&&!d.projection&&a&&(d.type==="html"||d.type==="svg")&&aCe(u.current,n,a,f);const m=b.useRef(!1);b.useInsertionEffect(()=>{d&&m.current&&d.update(n,l)});const p=n[gJ],v=b.useRef(!!p&&!((y=window.MotionHandoffIsComplete)!=null&&y.call(window,p))&&((x=window.MotionHasOptimisedAnimation)==null?void 0:x.call(window,p)));return mZ(()=>{d&&(m.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),v.current&&d.animationState&&d.animationState.animateChanges())}),b.useEffect(()=>{d&&(!v.current&&d.animationState&&d.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)==null||w.call(window,p)}),v.current=!1),d.enteringChildren=void 0)}),d}function aCe(e,t,n,r){const{layoutId:a,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:yJ(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||l&&Vf(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function yJ(e){if(e)return e.options.allowProjection!==!1?e.projection:yJ(e.parent)}function _2(e,{forwardMotionProps:t=!1}={},n,r){n&&I2e(n);const a=$M(e)?eCe:J2e;function i(l,c){let u;const d={...b.useContext(OM),...l,layoutId:iCe(l)},{isStatic:f}=d,m=L2e(l),p=a(l,f);if(!f&&dM){oCe();const v=lCe(d);u=v.MeasureLayout,m.visualElement=sCe(e,p,d,r,v.ProjectionNode)}return s.jsxs(P1.Provider,{value:m,children:[u&&m.visualElement?s.jsx(u,{visualElement:m.visualElement,...d}):null,X2e(e,l,nCe(p,m.visualElement,c),p,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=b.forwardRef(i);return o[tCe]=e,o}function iCe({layoutId:e}){const t=b.useContext(cM).id;return t&&e!==void 0?t+"-"+e:e}function oCe(e,t){b.useContext(iJ).strict}function lCe(e){const{drag:t,layout:n}=Hh;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function cCe(e,t){if(typeof Proxy>"u")return _2;const n=new Map,r=(i,o)=>_2(i,o,e,t),a=(i,o)=>r(i,o);return new Proxy(a,{get:(i,o)=>o==="create"?r:(n.has(o)||n.set(o,_2(o,void 0,e,t)),n.get(o))})}function vJ({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function uCe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function dCe(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 A2(e){return e===void 0||e===1}function HT({scale:e,scaleX:t,scaleY:n}){return!A2(e)||!A2(t)||!A2(n)}function Nu(e){return HT(e)||bJ(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bJ(e){return mF(e.x)||mF(e.y)}function mF(e){return e&&e!=="0%"}function xw(e,t,n){const r=e-n,a=t*r;return n+a}function pF(e,t,n,r,a){return a!==void 0&&(e=xw(e,a,r)),xw(e,n,r)+t}function qT(e,t=0,n=1,r,a){e.min=pF(e.min,t,n,r,a),e.max=pF(e.max,t,n,r,a)}function wJ(e,{x:t,y:n}){qT(e.x,t.translate,t.scale,t.originPoint),qT(e.y,n.translate,n.scale,n.originPoint)}const gF=.999999999999,xF=1.0000000000001;function fCe(e,t,n,r=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,o;for(let l=0;l<a;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Gf(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wJ(e,o)),r&&Nu(i.latestValues)&&Gf(e,i.latestValues))}t.x<xF&&t.x>gF&&(t.x=1),t.y<xF&&t.y>gF&&(t.y=1)}function Wf(e,t){e.min=e.min+t,e.max=e.max+t}function yF(e,t,n,r,a=.5){const i=Jn(e.min,e.max,a);qT(e,t,n,i,r)}function Gf(e,t){yF(e.x,t.x,t.scaleX,t.scale,t.originX),yF(e.y,t.y,t.scaleY,t.scale,t.originY)}function jJ(e,t){return vJ(dCe(e.getBoundingClientRect(),t))}function hCe(e,t,n){const r=jJ(e,n),{scroll:a}=t;return a&&(Wf(r.x,a.offset.x),Wf(r.y,a.offset.y)),r}const vF=()=>({translate:0,scale:1,origin:0,originPoint:0}),Kf=()=>({x:vF(),y:vF()}),bF=()=>({min:0,max:0}),hr=()=>({x:bF(),y:bF()}),VT={current:null},NJ={current:!1};function mCe(){if(NJ.current=!0,!!dM)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>VT.current=e.matches;e.addEventListener("change",t),t()}else VT.current=!1}const pCe=new WeakMap;function gCe(e,t,n){for(const r in t){const a=t[r],i=n[r];if(xs(a))e.addValue(r,a);else if(xs(i))e.addValue(r,Uh(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(r);e.addValue(r,Uh(o!==void 0?o:a,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const wF=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class xCe{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=AM,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 m=ea.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Wn.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=I1(n),this.isVariantNode=lJ(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const p=f[m];c[m]!==void 0&&xs(p)&&p.set(c[m])}}mount(t){var n;this.current=t,pCe.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,a)=>this.bindToMotionValue(a,r)),NJ.current||mCe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:VT.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),Rc(this.notifyUpdate),Rc(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=Km.has(t);r&&this.onBindTransform&&this.onBindTransform();const a=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Wn.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i&&i(),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 Hh){const n=Hh[t];if(!n)continue;const{isEnabled:r,Feature:a}=n;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):hr()}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<wF.length;r++){const a=wF[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=gCe(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=Uh(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"&&(pZ(r)||xZ(r))?r=parseFloat(r):!_2e(r)&&Dc.test(n)&&(r=ZZ(t,n)),this.setBaseTarget(t,xs(r)?r.get():r)),xs(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var i;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=FM(this.props,n,(i=this.presenceContext)==null?void 0:i.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!xs(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new gM),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){TM.render(this.render)}}class SJ extends xCe{constructor(){super(...arguments),this.KeyframeResolver=p2e}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[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;xs(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kJ(e,{style:t,vars:n},r,a){const i=e.style;let o;for(o in t)i[o]=t[o];a==null||a.applyProjectionStyles(i,r);for(o in n)i.setProperty(o,n[o])}function yCe(e){return window.getComputedStyle(e)}class vCe extends SJ{constructor(){super(...arguments),this.type="html",this.renderInstance=kJ}readValueFromInstance(t,n){var r;if(Km.has(n))return(r=this.projection)!=null&&r.isProjecting?DT(n):Mke(t,n);{const a=yCe(t),i=(vM(n)?a.getPropertyValue(n):a[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return jJ(t,n)}build(t,n,r){DM(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return zM(t,n,r)}}const CJ=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"]);function bCe(e,t,n,r){kJ(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(CJ.has(a)?a:BM(a),t.attrs[a])}class wCe extends SJ{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Km.has(n)){const r=QZ(n);return r&&r.default||0}return n=CJ.has(n)?n:BM(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return pJ(t,n,r)}build(t,n,r){dJ(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,a){bCe(t,n,r,a)}mount(t){this.isSVGTag=hJ(t.tagName),super.mount(t)}}const jCe=(e,t)=>$M(e)?new wCe(t):new vCe(t,{allowProjection:e!==b.Fragment});function oh(e,t,n){const r=e.getProps();return FM(r,t,n!==void 0?n:r.custom,e)}const WT=e=>Array.isArray(e);function NCe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Uh(n))}function SCe(e){return WT(e)?e[e.length-1]||0:e}function kCe(e,t){const n=oh(e,t);let{transitionEnd:r={},transition:a={},...i}=n||{};i={...i,...r};for(const o in i){const l=SCe(i[o]);NCe(e,o,l)}}function CCe(e){return!!(xs(e)&&e.add)}function GT(e,t){const n=e.getValue("willChange");if(CCe(n))return n.add(t);if(!n&&pl.WillChange){const r=new pl.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function _J(e){return e.props[gJ]}const _Ce=e=>e!==null;function ACe(e,{repeat:t,repeatType:n="loop"},r){const a=e.filter(_Ce),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return a[i]}const ECe={type:"spring",stiffness:500,damping:25,restSpeed:10},PCe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),TCe={type:"keyframes",duration:.8},ICe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},OCe=(e,{keyframes:t})=>t.length>2?TCe:Km.has(e)?e.startsWith("scale")?PCe(t[1]):ECe:ICe;function MCe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const UM=(e,t,n,r={},a,i)=>o=>{const l=EM(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-io(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:a};MCe(l)||Object.assign(d,OCe(e,d)),d.duration&&(d.duration=io(d.duration)),d.repeatDelay&&(d.repeatDelay=io(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(BT(d),d.delay===0&&(f=!0)),(pl.instantAnimations||pl.skipAnimations)&&(f=!0,BT(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,f&&!i&&t.get()!==void 0){const m=ACe(d.keyframes,l);if(m!==void 0){Wn.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new _M(d):new r2e(d)};function RCe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function AJ(e,t,{delay:n=0,transitionOverride:r,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(i=r);const c=[],u=a&&e.animationState&&e.animationState.getState()[a];for(const d in l){const f=e.getValue(d,e.latestValues[d]??null),m=l[d];if(m===void 0||u&&RCe(u,d))continue;const p={delay:n,...EM(i||{},d)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===v&&!p.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const w=_J(e);if(w){const N=window.MotionHandoffAnimation(w,d,Wn);N!==null&&(p.startTime=N,y=!0)}}GT(e,d),f.start(UM(d,f,m,e.shouldReduceMotion&&KZ.has(d)?{type:!1}:p,e,y));const x=f.animation;x&&c.push(x)}return o&&Promise.all(c).then(()=>{Wn.update(()=>{o&&kCe(e,o)})}),c}function EJ(e,t,n,r=0,a=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(i,o):a===1?i*r:l-i*r}function KT(e,t,n={}){var c;const r=oh(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(a=n.transitionOverride);const i=r?()=>Promise.all(AJ(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:m}=a;return DCe(e,t,u,d,f,m,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[u,d]=l==="beforeChildren"?[i,o]:[o,i];return u().then(()=>d())}else return Promise.all([i(),o(n.delay)])}function DCe(e,t,n=0,r=0,a=0,i=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(KT(c,t,{...o,delay:n+(typeof r=="function"?0:r)+EJ(e.variantChildren,c,r,a,i)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function LCe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const a=t.map(i=>KT(e,i,n));r=Promise.all(a)}else if(typeof t=="string")r=KT(e,t,n);else{const a=typeof t=="function"?oh(e,t,n.custom):t;r=Promise.all(AJ(e,a,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function PJ(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 $Ce=RM.length;function TJ(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?TJ(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<$Ce;n++){const r=RM[n],a=e.props[r];(ox(a)||a===!1)&&(t[r]=a)}return t}const FCe=[...MM].reverse(),zCe=MM.length;function BCe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>LCe(e,n,r)))}function UCe(e){let t=BCe(e),n=jF(),r=!0;const a=c=>(u,d)=>{var m;const f=oh(e,d,c==="exit"?(m=e.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:p,transitionEnd:v,...y}=f;u={...u,...y,...v}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,d=TJ(e.parent)||{},f=[],m=new Set;let p={},v=1/0;for(let x=0;x<zCe;x++){const w=FCe[x],N=n[w],S=u[w]!==void 0?u[w]:d[w],_=ox(S),k=w===c?N.isActive:null;k===!1&&(v=x);let C=S===d[w]&&S!==u[w]&&_;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),N.protectedKeys={...p},!N.isActive&&k===null||!S&&!N.prevProp||T1(S)||typeof S=="boolean")continue;const E=HCe(N.prevProp,S);let O=E||w===c&&N.isActive&&!C&&_||x>v&&_,P=!1;const R=Array.isArray(S)?S:[S];let T=R.reduce(a(w),{});k===!1&&(T={});const{prevResolvedValues:D={}}=N,z={...D,...T},I=H=>{O=!0,m.has(H)&&(P=!0,m.delete(H)),N.needsAnimating[H]=!0;const q=e.getValue(H);q&&(q.liveStyle=!1)};for(const H in z){const q=T[H],B=D[H];if(p.hasOwnProperty(H))continue;let L=!1;WT(q)&&WT(B)?L=!PJ(q,B):L=q!==B,L?q!=null?I(H):m.add(H):q!==void 0&&m.has(H)?I(H):N.protectedKeys[H]=!0}N.prevProp=S,N.prevResolvedValues=T,N.isActive&&(p={...p,...T}),r&&e.blockInitialAnimation&&(O=!1);const F=C&&E;O&&(!F||P)&&f.push(...R.map(H=>{const q={type:w};if(typeof H=="string"&&r&&!F&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,L=oh(B,H);if(B.enteringChildren&&L){const{delayChildren:V}=L.transition||{};q.delay=EJ(B.enteringChildren,e,V)}}return{animation:H,options:q}}))}if(m.size){const x={};if(typeof u.initial!="boolean"){const w=oh(e,Array.isArray(u.initial)?u.initial[0]:u.initial);w&&w.transition&&(x.transition=w.transition)}m.forEach(w=>{const N=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),x[w]=N??null}),f.push({animation:x})}let y=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function l(c,u){var f;if(n[c].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(m=>{var p;return(p=m.animationState)==null?void 0:p.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const m in n)n[m].protectedKeys={};return d}
vendor: 14,375 bytes, line 1088
1088return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=jF(),r=!0}}}function HCe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!PJ(t,e):!1}function gu(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jF(){return{animate:gu(!0),whileInView:gu(),whileHover:gu(),whileTap:gu(),whileDrag:gu(),whileFocus:gu(),exit:gu()}}class Wc{constructor(t){this.isMounted=!1,this.node=t}update(){}}class qCe extends Wc{constructor(t){super(t),t.animationState||(t.animationState=UCe(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();T1(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 VCe=0;class WCe extends Wc{constructor(){super(...arguments),this.id=VCe++}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 a=this.node.animationState.setActive("exit",!t);n&&!t&&a.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 GCe={animation:{Feature:qCe},exit:{Feature:WCe}};function cx(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Dy(e){return{point:{x:e.pageX,y:e.pageY}}}const KCe=e=>t=>IM(t)&&e(t,Dy(t));function Cg(e,t,n,r){return cx(e,t,KCe(n),r)}const IJ=1e-4,YCe=1-IJ,XCe=1+IJ,OJ=.01,QCe=0-OJ,ZCe=0+OJ;function Ps(e){return e.max-e.min}function JCe(e,t,n){return Math.abs(e-t)<=n}function NF(e,t,n,r=.5){e.origin=r,e.originPoint=Jn(t.min,t.max,e.origin),e.scale=Ps(n)/Ps(t),e.translate=Jn(n.min,n.max,e.origin)-e.originPoint,(e.scale>=YCe&&e.scale<=XCe||isNaN(e.scale))&&(e.scale=1),(e.translate>=QCe&&e.translate<=ZCe||isNaN(e.translate))&&(e.translate=0)}function _g(e,t,n,r){NF(e.x,t.x,n.x,r?r.originX:void 0),NF(e.y,t.y,n.y,r?r.originY:void 0)}function SF(e,t,n){e.min=n.min+t.min,e.max=e.min+Ps(t)}function e_e(e,t,n){SF(e.x,t.x,n.x),SF(e.y,t.y,n.y)}function kF(e,t,n){e.min=t.min-n.min,e.max=e.min+Ps(t)}function Ag(e,t,n){kF(e.x,t.x,n.x),kF(e.y,t.y,n.y)}function Ua(e){return[e("x"),e("y")]}const MJ=({current:e})=>e?e.ownerDocument.defaultView:null,CF=(e,t)=>Math.abs(e-t);function t_e(e,t){const n=CF(e.x,t.x),r=CF(e.y,t.y);return Math.sqrt(n**2+r**2)}class RJ{constructor(t,n,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:i=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=P2(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,v=t_e(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!v)return;const{point:y}=m,{timestamp:x}=ns;this.history.push({...y,timestamp:x});const{onStart:w,onMove:N}=this.handlers;p||(w&&w(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),N&&N(this.lastMoveEvent,m)},this.handlePointerMove=(m,p)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=E2(p,this.transformPagePoint),Wn.update(this.updatePoint,!0)},this.handlePointerUp=(m,p)=>{this.end();const{onEnd:v,onSessionEnd:y,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=P2(m.type==="pointercancel"?this.lastMoveEventInfo:E2(p,this.transformPagePoint),this.history);this.startEvent&&v&&v(m,w),y&&y(m,w)},!IM(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=a||window;const l=Dy(t),c=E2(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=ns;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=n;f&&f(t,P2(c,this.history)),this.removeListeners=Oy(Cg(this.contextWindow,"pointermove",this.handlePointerMove),Cg(this.contextWindow,"pointerup",this.handlePointerUp),Cg(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Rc(this.updatePoint)}}function E2(e,t){return t?{point:t(e.point)}:e}function _F(e,t){return{x:e.x-t.x,y:e.y-t.y}}function P2({point:e},t){return{point:e,delta:_F(e,DJ(t)),offset:_F(e,n_e(t)),velocity:r_e(t,.1)}}function n_e(e){return e[0]}function DJ(e){return e[e.length-1]}function r_e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=DJ(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>io(t)));)n--;if(!r)return{x:0,y:0};const i=oo(a.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function s_e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Jn(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Jn(n,e,r.max):Math.min(e,n)),e}function AF(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 a_e(e,{top:t,left:n,bottom:r,right:a}){return{x:AF(e.x,n,a),y:AF(e.y,t,r)}}function EF(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 i_e(e,t){return{x:EF(e.x,t.x),y:EF(e.y,t.y)}}function o_e(e,t){let n=.5;const r=Ps(e),a=Ps(t);return a>r?n=sx(t.min,t.max-r,e.min):r>a&&(n=sx(e.min,e.max-a,t.min)),ml(0,1,n)}function l_e(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 YT=.35;function c_e(e=YT){return e===!1?e=0:e===!0&&(e=YT),{x:PF(e,"left","right"),y:PF(e,"top","bottom")}}function PF(e,t,n){return{min:TF(e,t),max:TF(e,n)}}function TF(e,t){return typeof e=="number"?e:e[t]||0}const u_e=new WeakMap;class d_e{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=hr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Dy(f).point)},o=(f,m)=>{const{drag:p,dragPropagation:v,onDragStart:y}=this.getProps();if(p&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=v2e(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ua(w=>{let N=this.getAxisMotionValue(w).get()||0;if(lo.test(N)){const{projection:S}=this.visualElement;if(S&&S.layout){const _=S.layout.layoutBox[w];_&&(N=Ps(_)*(parseFloat(N)/100))}}this.originPoint[w]=N}),y&&Wn.postRender(()=>y(f,m)),GT(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},l=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:p,dragDirectionLock:v,onDirectionLock:y,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:w}=m;if(v&&this.currentDirection===null){this.currentDirection=f_e(w),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",m.point,w),this.updateAxis("y",m.point,w),this.visualElement.render(),x&&x(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Ua(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new RJ(t,{onSessionStart:i,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:MJ(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,a=n||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!a||!r)return;const{velocity:o}=a;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Wn.postRender(()=>l(r,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:a}=this.getProps();if(!r||!Uv(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=s_e(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,a=this.constraints;t&&Vf(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=a_e(r.layoutBox,t):this.constraints=!1,this.elastic=c_e(n),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Ua(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=l_e(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vf(t))return!1;const r=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=hCe(r,a.root,this.visualElement.getTransformPagePoint());let o=i_e(a.layout.layoutBox,i);if(n){const l=n(uCe(o));this.hasMutatedConstraints=!!l,l&&(o=vJ(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Ua(d=>{if(!Uv(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const m=a?200:1e6,p=a?40:1e7,v={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return GT(this.visualElement,t),r.start(UM(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ua(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ua(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(),a=r[n];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ua(n=>{const{drag:r}=this.getProps();if(!Uv(n,r,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:l}=a.layout.layoutBox[n];i.set(t[n]-Jn(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Vf(n)||!r||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};Ua(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();a[o]=o_e({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ua(o=>{if(!Uv(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(Jn(c,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;u_e.set(this.visualElement,this);const t=this.visualElement.current,n=Cg(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Vf(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Wn.read(r);const o=cx(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Ua(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())}));return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=YT,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Uv(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function f_e(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class h_e extends Wc{constructor(t){super(t),this.removeGroupControls=ri,this.removeListeners=ri,this.controls=new d_e(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ri}unmount(){this.removeGroupControls(),this.removeListeners()}}const IF=e=>(t,n)=>{e&&Wn.postRender(()=>e(t,n))};class m_e extends Wc{constructor(){super(...arguments),this.removePointerDownListener=ri}onPointerDown(t){this.session=new RJ(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:MJ(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:IF(t),onStart:IF(n),onMove:r,onEnd:(i,o)=>{delete this.session,a&&Wn.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=Cg(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ob={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function OF(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const qp={correct:(e,t)=>
vendor: 13,157 bytes, line 1088
1088{if(!t.target)return e;if(typeof e=="string")if(Nt.test(e))e=parseFloat(e);else return e;const n=OF(e,t.target.x),r=OF(e,t.target.y);return`${n}% ${r}%`}},p_e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,a=Dc.parse(e);if(a.length>5)return r;const i=Dc.createTransformer(e),o=typeof a[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;a[0+o]/=l,a[1+o]/=c;const u=Jn(l,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}};let T2=!1;class g_e extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:a}=this.props,{projection:i}=t;$2e(x_e),i&&(n.group&&n.group.add(i),r&&r.register&&a&&r.register(i),T2&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ob.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:a,isPresent:i}=this.props,{projection:o}=r;return o&&(o.isPresent=i,T2=!0,a||t.layoutDependency!==n||n===void 0||t.isPresent!==i?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Wn.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),TM.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:a}=t;T2=!0,a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function LJ(e){const[t,n]=aJ(),r=b.useContext(cM);return s.jsx(g_e,{...e,layoutGroup:r,switchLayoutGroup:b.useContext(xJ),isPresent:t,safeToRemove:n})}const x_e={borderRadius:{...qp,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:qp,borderTopRightRadius:qp,borderBottomLeftRadius:qp,borderBottomRightRadius:qp,boxShadow:p_e};function y_e(e,t,n){const r=xs(e)?e:Uh(e);return r.start(UM("",r,t,n)),r.animation}const v_e=(e,t)=>e.depth-t.depth;class b_e{constructor(){this.children=[],this.isDirty=!1}add(t){fM(this.children,t),this.isDirty=!0}remove(t){hM(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(v_e),this.isDirty=!1,this.children.forEach(t)}}function w_e(e,t){const n=ea.now(),r=({timestamp:a})=>{const i=a-n;i>=t&&(Rc(r),e(i-t))};return Wn.setup(r,!0),()=>Rc(r)}const $J=["TopLeft","TopRight","BottomLeft","BottomRight"],j_e=$J.length,MF=e=>typeof e=="string"?parseFloat(e):e,RF=e=>typeof e=="number"||Nt.test(e);function N_e(e,t,n,r,a,i){a?(e.opacity=Jn(0,n.opacity??1,S_e(r)),e.opacityExit=Jn(t.opacity??1,0,k_e(r))):i&&(e.opacity=Jn(t.opacity??1,n.opacity??1,r));for(let o=0;o<j_e;o++){const l=`border${$J[o]}Radius`;let c=DF(t,l),u=DF(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||RF(c)===RF(u)?(e[l]=Math.max(Jn(MF(c),MF(u),r),0),(lo.test(u)||lo.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Jn(t.rotate||0,n.rotate||0,r))}function DF(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const S_e=FJ(0,.5,kZ),k_e=FJ(.5,.95,ri);function FJ(e,t,n){return r=>r<e?0:r>t?1:n(sx(e,t,r))}function LF(e,t){e.min=t.min,e.max=t.max}function $a(e,t){LF(e.x,t.x),LF(e.y,t.y)}function $F(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function FF(e,t,n,r,a){return e-=t,e=xw(e,1/n,r),a!==void 0&&(e=xw(e,1/a,r)),e}function C_e(e,t=0,n=1,r=.5,a,i=e,o=e){if(lo.test(t)&&(t=parseFloat(t),t=Jn(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Jn(i.min,i.max,r);e===i&&(l-=t),e.min=FF(e.min,t,n,l,a),e.max=FF(e.max,t,n,l,a)}function zF(e,t,[n,r,a],i,o){C_e(e,t[n],t[r],t[a],t.scale,i,o)}const __e=["x","scaleX","originX"],A_e=["y","scaleY","originY"];function BF(e,t,n,r){zF(e.x,t,__e,n?n.x:void 0,r?r.x:void 0),zF(e.y,t,A_e,n?n.y:void 0,r?r.y:void 0)}function UF(e){return e.translate===0&&e.scale===1}function zJ(e){return UF(e.x)&&UF(e.y)}function HF(e,t){return e.min===t.min&&e.max===t.max}function E_e(e,t){return HF(e.x,t.x)&&HF(e.y,t.y)}function qF(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function BJ(e,t){return qF(e.x,t.x)&&qF(e.y,t.y)}function VF(e){return Ps(e.x)/Ps(e.y)}function WF(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class P_e{constructor(){this.members=[]}add(t){fM(this.members,t),t.scheduleRender()}remove(t){if(hM(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(a=>t===a);if(n===0)return!1;let r;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){r=i;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(),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:a}=t.options;a===!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)}}function T_e(e,t,n){let r="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((a||i||o)&&(r=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:m,skewX:p,skewY:v}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),p&&(r+=`skewX(${p}deg) `),v&&(r+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const I2=["","X","Y","Z"],I_e=1e3;let O_e=0;function O2(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function UJ(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=_J(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Wn,!(a||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&UJ(r)}function HJ({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(o={},l=t==null?void 0:t()){this.id=O_e++,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.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(D_e),this.nodes.forEach(z_e),this.nodes.forEach(B_e),this.nodes.forEach(L_e)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new b_e)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new gM),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=sJ(o)&&!k2e(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=0;const m=()=>this.root.updateBlockedByResize=!1;Wn.read(()=>{f=window.innerWidth}),e(o,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,d&&d(),d=w_e(m,250),Ob.hasAnimatedSinceResize&&(Ob.hasAnimatedSinceResize=!1,this.nodes.forEach(YF)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||u.getDefaultTransition()||W_e,{onLayoutAnimationStart:y,onLayoutAnimationComplete:x}=u.getProps(),w=!this.targetLayout||!BJ(this.targetLayout,p),N=!f&&m;if(this.options.layoutRoot||this.resumeFrom||N||f&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const S={...EM(v,"layout"),onPlay:y,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S),this.setAnimationOrigin(d,N)}else f||YF(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Rc(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(U_e),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&UJ(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(GF);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(KF);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(F_e),this.nodes.forEach(M_e),this.nodes.forEach(R_e)):this.nodes.forEach(KF),this.clearAllSnapshots();const l=ea.now();ns.delta=ml(0,1e3/60,l-ns.timestamp),ns.timestamp=l,ns.isProcessing=!0,w2.update.process(ns),w2.preRender.process(ns),w2.render.process(ns),ns.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,TM.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($_e),this.sharedNodes.forEach(H_e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ps(this.snapshot.measuredBox.x)&&!Ps(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 o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=hr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);
vendor: 18,977 bytes, line 1088
1088this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!zJ(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||Nu(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),G_e(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return hr();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(K_e))){const{scroll:d}=this.root;d&&(Wf(l.x,d.offset.x),Wf(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=hr();if($a(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:m}=d;d!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&$a(l,o),Wf(l.x,f.offset.x),Wf(l.y,f.offset.y))}return l}applyTransform(o,l=!1){const c=hr();$a(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Gf(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Nu(d.latestValues)&&Gf(c,d.latestValues)}return Nu(this.latestValues)&&Gf(c,this.latestValues),c}removeTransform(o){const l=hr();$a(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Nu(u.latestValues))continue;HT(u.latestValues)&&u.updateSnapshot();const d=hr(),f=u.measurePageBox();$a(d,f),BF(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Nu(this.latestValues)&&BF(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==ns.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var m;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=ns.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=hr(),this.relativeTargetOrigin=hr(),Ag(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),$a(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=hr(),this.targetWithTransforms=hr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),e_e(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$a(this.target,this.layout.layoutBox),wJ(this.target,this.targetDelta)):$a(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=hr(),this.relativeTargetOrigin=hr(),Ag(this.relativeTargetOrigin,this.target,p.target),$a(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||HT(this.parent.latestValues)||bJ(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var v;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===ns.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=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||d))return;$a(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;fCe(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=hr());const{target:p}=o;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():($F(this.prevProjectionDelta.x,this.projectionDelta.x),$F(this.prevProjectionDelta.y,this.projectionDelta.y)),_g(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!WF(this.projectionDelta.x,this.prevProjectionDelta.x)||!WF(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Kf(),this.projectionDelta=Kf(),this.projectionDeltaWithTransform=Kf()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Kf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=hr(),p=c?c.source:void 0,v=this.layout?this.layout.source:void 0,y=p!==v,x=this.getStack(),w=!x||x.members.length<=1,N=!!(y&&!w&&this.options.crossfade===!0&&!this.path.some(V_e));this.animationProgress=0;let S;this.mixTargetDelta=_=>{const k=_/1e3;XF(f.x,o.x,k),XF(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ag(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),q_e(this.relativeTarget,this.relativeTargetOrigin,m,k),S&&E_e(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=hr()),$a(S,this.relativeTarget)),y&&(this.animationValues=d,N_e(d,u,this.latestValues,k,N,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(Rc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wn.update(()=>{Ob.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Uh(0)),this.currentAnimation=y_e(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(I_e),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&qJ(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||hr();const f=Ps(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const m=Ps(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+m}$a(l,c),Gf(l,d),_g(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new P_e),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&O2("z",o,u,this.animationValues);for(let d=0;d<I2.length;d++)O2(`rotate${I2[d]}`,o,u,this.animationValues),O2(`skew${I2[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Ib(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Ib(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Nu(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=T_e(this.projectionDeltaWithTransform,this.treeScale,d);c&&(f=c(d,f)),o.transform=f;const{x:m,y:p}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${p.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in lx){if(d[v]===void 0)continue;const{correct:y,applyTo:x,isCSSVariable:w}=lx[v],N=f==="none"?d[v]:y(d[v],u);if(x){const S=x.length;for(let _=0;_<S;_++)o[x[_]]=N}else w?this.options.visualElement.renderState.vars[v]=N:o[v]=N}this.options.layoutId&&(o.pointerEvents=u===this?Ib(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(GF),this.root.sharedNodes.clear()}}}function M_e(e){e.updateLayout()}function R_e(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:a}=e.layout,{animationType:i}=e.options,o=t.source!==e.layout.source;i==="size"?Ua(f=>{const m=o?t.measuredBox[f]:t.layoutBox[f],p=Ps(m);m.min=r[f].min,m.max=m.min+p}):qJ(i,t.layoutBox,r)&&Ua(f=>{const m=o?t.measuredBox[f]:t.layoutBox[f],p=Ps(r[f]);m.max=m.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=Kf();_g(l,r,t.layoutBox);const c=Kf();o?_g(c,e.applyTransform(a,!0),t.measuredBox):_g(c,r,t.layoutBox);const u=!zJ(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:p}=f;if(m&&p){const v=hr();Ag(v,t.layoutBox,m.layoutBox);const y=hr();Ag(y,r,p.layoutBox),BJ(v,y)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function D_e(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 L_e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $_e(e){e.clearSnapshot()}function GF(e){e.clearMeasurements()}function KF(e){e.isLayoutDirty=!1}function F_e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function YF(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function z_e(e){e.resolveTargetDelta()}function B_e(e){e.calcProjection()}function U_e(e){e.resetSkewAndRotation()}function H_e(e){e.removeLeadSnapshot()}function XF(e,t,n){e.translate=Jn(t.translate,0,n),e.scale=Jn(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function QF(e,t,n,r){e.min=Jn(t.min,n.min,r),e.max=Jn(t.max,n.max,r)}function q_e(e,t,n,r){QF(e.x,t.x,n.x,r),QF(e.y,t.y,n.y,r)}function V_e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const W_e={duration:.45,ease:[.4,0,.1,1]},ZF=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),JF=ZF("applewebkit/")&&!ZF("chrome/")?Math.round:ri;function e8(e){e.min=JF(e.min),e.max=JF(e.max)}function G_e(e){e8(e.x),e8(e.y)}function qJ(e,t,n){return e==="position"||e==="preserve-aspect"&&!JCe(VF(t),VF(n),.2)}function K_e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const Y_e=HJ({attachResizeListener:(e,t)=>cx(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),M2={current:void 0},VJ=HJ({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!M2.current){const e=new Y_e({});e.mount(window),e.setOptions({layoutScroll:!0}),M2.current=e}return M2.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),X_e={pan:{Feature:m_e},drag:{Feature:h_e,ProjectionNode:VJ,MeasureLayout:LJ}};function t8(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=r[a];i&&Wn.postRender(()=>i(t,Dy(t)))}class Q_e extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=b2e(t,(n,r)=>(t8(this.node,r,"Start"),a=>t8(this.node,a,"End"))))}unmount(){}}class Z_e extends Wc{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=Oy(cx(this.node.current,"focus",()=>this.onFocus()),cx(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function n8(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 a="onTap"+(n==="End"?"":n),i=r[a];i&&Wn.postRender(()=>i(t,Dy(t)))}class J_e extends Wc{mount(){const{current:t}=this.node;t&&(this.unmount=S2e(t,(n,r)=>(n8(this.node,r,"Start"),(a,{success:i})=>n8(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const XT=new WeakMap,R2=new WeakMap,eAe=e=>{const t=XT.get(e.target);t&&t(e)},tAe=e=>{e.forEach(eAe)};function nAe({root:e,...t}){const n=e||document;R2.has(n)||R2.set(n,{});const r=R2.get(n),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(tAe,{root:e,...t})),r[a]}function rAe(e,t,n){const r=nAe(t);return XT.set(e,n),r.observe(e),()=>{XT.delete(e),r.unobserve(e)}}const sAe={some:0,all:1};class aAe extends Wc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:a="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:sAe[a]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),m=u?d:f;m&&m(c)};return rAe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(iAe(t,n))&&this.startObserver()}unmount(){}}function iAe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const oAe={inView:{Feature:aAe},tap:{Feature:J_e},focus:{Feature:Z_e},hover:{Feature:Q_e}},lAe={layout:{ProjectionNode:VJ,MeasureLayout:LJ}},cAe={...GCe,...oAe,...X_e,...lAe},Gt=cCe(cAe,jCe),uAe=({agent:e,index:t,shouldShowDemo:n,handleEdit:r,handlePreview:a,handleDeploy:i,handleDelete:o,isMobile:l,getStatusColor:c,getStatusIcon:u,hasWritePermission:d},f)=>s.jsx(Gt.div,{ref:f,layout:!0,initial:{opacity:0,scale:.95}
1088,animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.2,ease:"easeOut",delay:Math.min(t*.05,.3)},style:{willChange:"transform, opacity"},children:s.jsxs(te,{className:"group hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border border-slate-200/50 dark:border-slate-700/50 h-full flex flex-col",children:[n&&s.jsx("div",{className:"absolute top-2 right-2 z-10",children:s.jsx(le,{className:"bg-primary/20 text-primary-foreground text-xs",children:"Live"})}),s.jsx(xe,{className:"pb-3",children:s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-primary-foreground font-semibold text-sm shadow-sm",style:{backgroundColor:e.base_color||"#3B82F6"},children:e.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-readable text-sm leading-tight",children:e.name}),s.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[s.jsx(le,{variant:e.is_deployed?"default":"secondary",className:`text-xs ${e.is_deployed?c("deployed"):""}`,children:s.jsxs("div",{className:"flex items-center space-x-1",children:[u(e),s.jsx("span",{children:e.is_deployed?"Deployed":"Draft"})]})}),n&&s.jsxs(le,{variant:"outline",className:"text-xs",children:[s.jsx(ZO,{className:"h-3 w-3 mr-1"}),"Industry"]})]})]})]})})}),s.jsxs(se,{className:"pt-0 space-y-4 flex-1 flex flex-col",children:[s.jsx("div",{className:"flex-1",children:s.jsx("p",{className:"text-xs text-readable-muted line-clamp-2",children:e.prompt})}),s.jsx("div",{className:"grid grid-cols-2 gap-3 text-xs",children:s.jsxs("div",{className:"flex items-center space-x-1 text-readable-subtle",children:[s.jsx(Sn,{className:"h-3 w-3"}),s.jsxs("span",{children:[e.conversation_count||0," chats"]})]})}),e.communication_style&&s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-xs text-readable-subtle",children:"Style:"}),s.jsx(le,{variant:"outline",className:"text-xs capitalize",children:e.communication_style})]}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>a(e),className:"w-full hover:bg-primary/10 hover:text-primary-foreground",children:[s.jsx(pr,{className:"h-4 w-4 mr-1"}),n?"Try Live Demo":"Preview"]}),s.jsxs("div",{className:`flex gap-2 ${l?"flex-col":""}`,children:[s.jsxs(Y,{variant:"outline",size:l?"default":"sm",onClick:()=>r(e.id),disabled:!d,className:`${l?"w-full":"flex-1"} hover:bg-primary/10 hover:text-primary-foreground min-h-[44px]`,children:[s.jsx(NX,{className:"h-4 w-4 mr-1"}),n?"Try Edit":"Edit"]}),!n&&s.jsxs(Y,{variant:"outline",size:l?"default":"sm",onClick:()=>i(e),disabled:!d,className:`${l?"w-full":""} hover:bg-primary/10 hover:text-primary-foreground min-h-[44px]`,children:[s.jsx(Ot,{className:"h-4 w-4 mr-1"}),e.is_deployed?"Undeploy":"Deploy"]}),s.jsxs(Y,{variant:"outline",size:l?"default":"sm",onClick:()=>o(e.id),disabled:!d,className:`${l?"w-full":""} hover:bg-destructive/10 hover:text-destructive min-h-[44px]`,children:[s.jsx(oi,{className:"h-4 w-4 mr-1"}),l?"Delete":""]})]})]})]})}),QT=b.memo(b.forwardRef(uAe));QT.displayName="AgentCard";const WJ=b.memo(e=>{var he,Q;const{searchResults:t,searchActive:n,renderSearchBar:r}=e,{agents:a,loading:i,error:o,refreshAgents:l,deleteAgent:c,deployAgent:u,undeployAgent:d,total:f,hasMore:m,loadMore:p}=oZ(),{isConnected:v}=lZ(),{mockAgents:y}=TSe(),{user:x,isAuthenticated:w}=nr(),{isMobile:N}=_1(),S=qt(),{toast:_}=_t(),{checkLimit:k}=Vc(),[C,E]=b.useState(!1),[O,P]=b.useState(1),R=20,T=!w,D=!w||((x==null?void 0:x.canCreateAgents)??!1),z=b.useMemo(()=>n&&t?t:w?a:y.map((ae,fe)=>({id:fe+1,name:ae.name,prompt:ae.description||"AI Assistant for your organization",communication_style:"formal",converstation_starter:["How can I help you today?"],conversation_closer:"Thank you for using our service!",is_deployed:!0,base_color:["#3b82f6","#8b5cf6","#10b981","#f59e0b","#ef4444"][fe]||"#3b82f6",logo:null,llm_model:null,embedding_model:null,created_at:new Date(Date.now()-fe*24*60*60*1e3).toISOString(),updated_at:new Date(Date.now()-fe*60*60*1e3).toISOString(),user_id:1,document_count:Math.floor(Math.random()*20),conversation_count:Math.floor(Math.random()*100),last_activity:new Date(Date.now()-fe*2*60*60*1e3).toISOString(),deploymentUrl:ae.deploymentUrl})),[w,y,a,t,n]),I=!k("max_agents",z.length),F=b.useMemo(()=>
1088{if(T){const Ee=Number.isFinite(z.length)?z.length:0,Re=Math.ceil(Ee/R);return Number.isFinite(Re)&&Re>0?Re:1}const ae=Number.isFinite(f)?Number(f):z.length,fe=Math.ceil(ae/R);return!Number.isFinite(fe)||fe<=0?1:fe},[z.length,T,f,R]),U=b.useMemo(()=>{const ae=Number.isFinite(F)&&F>0?Math.floor(F):1;if(ae<=1)return[1];if(ae<=7)return Array.from({length:ae},(qe,St)=>St+1);const fe=[1],Ee=Math.max(2,O-1),Re=Math.min(ae-1,O+1);Ee>2&&fe.push("ellipsis-left");for(let qe=Ee;qe<=Re;qe+=1)fe.push(qe);return Re<ae-1&&fe.push("ellipsis-right"),fe.push(ae),fe},[O,F]);b.useEffect(()=>{const ae=Math.max(1,Math.ceil(z.length/R)),fe=Number.isFinite(F)&&F>0?Math.floor(F):1,Ee=T?ae:fe;O>Ee&&P(Ee)},[z.length,O,T,F,R]),b.useEffect(()=>{if(T)return;const ae=O*R;z.length<ae&&m&&p()},[z.length,O,m,p,T]);const H=b.useMemo(()=>{const ae=(O-1)*R;return z.slice(ae,ae+R)},[z,O,R]),[q,B]=b.useState(0),L=b.useRef(null);b.useEffect(()=>{if(!N||!L.current)return;const fe=L.current.children.item(q);fe&&typeof fe.scrollIntoView=="function"&&fe.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},[q,N,H.length]),b.useEffect(()=>{B(0)},[N,H.length]);const V=ae=>{ae<1||ae>F||ae===O||P(ae)},K=(x==null?void 0:x.industry)||((he=x==null?void 0:x.companyProfile)==null?void 0:he.industry)||"Water Treatment",W=(x==null?void 0:x.organization)||((Q=x==null?void 0:x.companyProfile)==null?void 0:Q.companyName)||"Your Organization",ie=ae=>ae==="deployed"||ae==="live"?"bg-primary text-primary-foreground":ae==="in-progress"?"bg-primary/80 text-primary-foreground":ae==="complete"?"bg-primary text-primary-foreground":"bg-muted text-foreground",ve=ae=>ae.is_deployed?s.jsx(Pe,{className:"h-4 w-4"}):s.jsx(zn,{className:"h-4 w-4"}),ge=ae=>{if(T){_({title:"Demo Mode",description:"Sign in to create and edit real agents for your organization!",duration:4e3});return}S(`/agent-edit/${ae}`)},J=async ae=>{if(T){_({title:"Demo Mode",description:"Sign in to manage your agents.",duration:3e3});return}await c(ae)},ne=async ae=>{if(T){_({title:"Demo Mode",description:"Sign in to deploy your agents.",duration:3e3});return}ae.is_deployed?await d(ae.id):await u(ae.id)},Z=ae=>{if(T){const fe=ae.deploymentUrl||"https://dashboard.privion-agents.ai/agent-preview/5";window.open(fe,"_blank");return}S(`/agent-preview/${ae.id}`)},oe=()=>{if(D){if(T){E(!0);return}if(!k("max_agents",z.length)){_({title:"Limit Reached",description:"You have reached the maximum number of agents for your tier. Please upgrade to create more.",variant:"destructive",action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>S("/pricing"),children:"Upgrade"})});return}S("/agent-builder")}};return i?s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-white",children:"AI Agents"}),s.jsx("p",{className:"text-white/80",children:"Loading your agents..."})]})}),s.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",style:{minHeight:"400px"},children:[1,2,3].map(ae=>s.jsxs(te,{className:"h-[320px]",children:[s.jsxs(xe,{children:[s.jsx(rs,{className:"h-6 w-3/4"}),s.jsx(rs,{className:"h-4 w-1/2"})]}),s.jsxs(se,{children:[s.jsx(rs,{className:"h-4 w-full mb-2"}),s.jsx(rs,{className:"h-4 w-2/3 mb-4"}),s.jsx(rs,{className:"h-8 w-full mb-2"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(rs,{className:"h-8 flex-1"}),s.jsx(rs,{className:"h-8 w-16"})]})]})]},`skeleton-${ae}`))})]}):o&&w?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-white",children:"AI Agents"}),s.jsx("p",{className:"text-white/80",children:"Connection Issue"})]}),s.jsxs(Y,{onClick:oe,disabled:!D,className:"flex items-center gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Create Agent"]})]}),s.jsxs(ti,{variant:"destructive",children:[s.jsx(ln,{className:"h-4 w-4"}),s.jsx(ni,{children:s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"font-medium",children:"Unable to connect to your agent management service"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"We're having trouble connecting to the backend. Please try refreshing or contact support if the issue persists."}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:l,className:"mt-2",children:[s.jsx(ss,{className:"h-4 w-4 mr-1"}),"Try Again"]})]})})]})]}):!i&&z.length===0&&n?s.jsxs("div",{className:"space-y-6",children:[r&&s.jsx("div",{className:"mb-2",children:r()}),s.jsx(te,{className:"text-center py-12",children:s.jsxs(se,{children:[s.jsx(Sn,{className:"h-16 w-16 mx-auto text-readable-subtle mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-readable mb-2",children:"No results found for your search"}),s.jsx("p",{className:"text-readable-muted mb-4 max-w-md mx-auto",children:"Try a different search term or create a new agent."}),s.jsxs(Y,{onClick:oe,disabled:!D,className:"flex items-center gap-2 mx-auto",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Create Agent",!T&&I&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})]})})]}):!i&&z.length===0&&w?s.jsxs("div",{className:"space-y-6",children:[r&&s.jsx("div",{className:"mb-2",children:r()}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold text-white",children:"AI Agents"}),s.jsx("p",{className:"text-white/80",children:"No agents found - create one to get started"})]}),s.jsxs(Y,{onClick:oe,disabled:!D,className:"flex items-center gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Create Agent"]})]}),s.jsx(te,{className:"text-center py-12",children:s.jsxs(se,{children:[s.jsx(Sn,{className:"h-16 w-16 mx-auto text-readable-subtle mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-readable mb-2",children:"You don't have any AI agents yet"}),s.jsx("p",{className:"text-readable-muted mb-4 max-w-md mx-auto",children:"Ready to get started? Create your first AI agent to automate customer support, knowledge management, or any custom workflow for your organization."}),s.jsxs(Y,{onClick:oe,disabled:!D,className:"flex items-center gap-2 mx-auto",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Create Your First Agent",!T&&I&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})]})})]}):s.jsxs("div",{className:"space-y-6",children:[r&&s.jsx("div",{className:"mb-2",children:r()}),s.jsxs("div",{className:"flex flex-col gap-2 mb-2",children:[s.jsxs("div",{className:"flex flex-col items-center text-center sm:text-left sm:items-start",children:[s.jsx("h2",{className:"text-2xl font-bold text-white",children:T?`${W} AI Agents`:"AI Agents"}),!T&&s.jsx("p",{className:"text-white/80",children:`Manage your AI agents (${f} total)`})]}),s.jsx("div",{className:"flex flex-col items-center gap-2 mt-2 sm:flex-row sm:justify-end sm:items-center sm:gap-2",children:s.jsxs("div",{className:"flex gap-2",children:[!T&&s.jsxs(Y,{variant:"outline",size:"sm",onClick:l,children:[s.jsx(ss,{className:"h-4 w-4 mr-1"}),"Refresh"]}),s.jsxs(Y,{onClick:oe,disabled:!D,className:"flex items-center gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),T?"Try Builder":"Create Agent",!T&&I&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})]})})]}),N?s.jsxs("div",{className:"relative w-full",style:{minHeight:"400px"},children:[s.jsx("button",{type:"button","aria-label":"Anterior",className:"absolute left-0 top-1/2 -translate-y-1/2 z-10 bg-white/80 dark:bg-black/60 rounded-full p-2 shadow-md disabled:opacity-30",style:{display:H.length>1?"block":"none"},disabled:q===0,onClick:()=>B(ae=>Math.max(0,ae-1)),children:s.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M15 19l-7-7 7-7"})})}),s.jsx("div",{ref:L,className:"flex overflow-x-auto gap-4 pb-2 snap-x snap-mandatory scrollbar-hide",style:{scrollBehavior:"smooth"},children:s.jsx(ci,{mode:"popLayout",initial:!1,children:H.map((ae,fe)=>s.jsx("div",{className:`min-w-[90vw] max-w-xs snap-center flex-shrink-0 ${fe===q?"":"op
1088acity-80"}`,children:s.jsx(QT,{agent:ae,index:fe,shouldShowDemo:T,handleEdit:ge,handlePreview:Z,handleDeploy:ne,handleDelete:J,isMobile:N,getStatusColor:ie,getStatusIcon:ve,hasWritePermission:D})},`agent-carousel-${ae.id}`))})}),s.jsx("button",{type:"button","aria-label":"Siguiente",className:"absolute right-0 top-1/2 -translate-y-1/2 z-10 bg-white/80 dark:bg-black/60 rounded-full p-2 shadow-md disabled:opacity-30",style:{display:H.length>1?"block":"none"},disabled:q===H.length-1,onClick:()=>B(ae=>Math.min(H.length-1,ae+1)),children:s.jsx("svg",{width:"24",height:"24",fill:"none",stroke:"currentColor",strokeWidth:"2",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M9 5l7 7-7 7"})})}),H.length>1&&s.jsx("div",{className:"flex justify-center gap-1 mt-2",children:H.map((ae,fe)=>s.jsx("span",{className:`inline-block w-2 h-2 rounded-full ${q===fe?"bg-primary":"bg-gray-400/40 dark:bg-gray-600/40"}`,style:{transition:"background 0.2s"},onClick:()=>B(fe)},`dot-${fe}`))})]}):s.jsx("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",style:{minHeight:"400px"},children:s.jsx(ci,{mode:"popLayout",initial:!1,children:H.map((ae,fe)=>s.jsx(QT,{agent:ae,index:fe,shouldShowDemo:T,handleEdit:ge,handlePreview:Z,handleDeploy:ne,handleDelete:J,isMobile:N,getStatusColor:ie,getStatusIcon:ve,hasWritePermission:D},`agent-${ae.id}`))})}),Number.isFinite(F)&&F>1&&s.jsx("div",{className:"flex justify-center pt-4",children:s.jsx(cZ,{className:"w-auto text-white",children:s.jsxs(uZ,{className:"text-white",children:[s.jsx(dg,{className:"text-white",children:s.jsx(dZ,{href:"#",onClick:ae=>{ae.preventDefault(),V(O-1)},className:O===1?"pointer-events-none opacity-50":"text-white"})}),U.map(ae=>ae==="ellipsis-left"||ae==="ellipsis-right"?s.jsx(dg,{children:s.jsx(hZ,{})},ae):s.jsx(dg,{className:"text-white",children:s.jsx(A1,{href:"#",isActive:ae===O,className:ae===O?"text-black":"text-white",onClick:fe=>{fe.preventDefault(),V(ae)},children:ae})},`page-${ae}`)),s.jsx(dg,{children:s.jsx(fZ,{href:"#",onClick:ae=>{ae.preventDefault(),V(O+1)},className:O===F?"pointer-events-none opacity-50 ":"text-white"})})]})})}),T&&s.jsx(te,{className:"bg-gradient-to-r from-primary/10 to-primary/5 border-primary/20",children:s.jsx(se,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(ii,{className:"h-6 w-6 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-foreground",children:!v&&w?"API Demo Mode":`Interactive ${K} Demo`}),s.jsx("p",{className:"text-sm text-muted-foreground",children:!v&&w?"Backend API unavailable - showing sample agents. All interactions are simulated.":"You're viewing a live demo. All interactions work but data isn't saved."})]})]}),!w&&s.jsxs(Y,{onClick:oe,className:"bg-primary hover:bg-primary/90",children:[s.jsx(SX,{className:"h-4 w-4 mr-2"}),"Try the Builder"]})]})})}),s.jsx(Uc,{isOpen:C,onClose:()=>E(!1)})]})});WJ.displayName="EnhancedAgentManagement";const dAe=({showDetails:e=!1,className:t=""})=>{const{isConnected:n,isLoading:r,error:a,lastChecked:i,checkHealth:o}=lZ(),l=()=>r?s.jsx(zn,{className:"h-3 w-3 animate-pulse"}):n?s.jsx(Pe,{className:"h-3 w-3"}):s.jsx(ln,{className:"h-3 w-3"}),c=()=>r?"secondary":n?"default":"destructive";return s.jsxs("div",{className:`flex items-center gap-2 ${t}`,children:[s.jsx(le,{variant:c(),className:"flex items-center gap-1",children:l()}),e&&s.jsxs(s.Fragment,{children:[s.jsx(Y,{variant:"outline",size:"sm",onClick:o,disabled:r,className:"h-7 px-2",children:s.jsx(ss,{className:`h-3 w-3 ${r?"animate-spin":""}`})}),a&&s.jsx("span",{className:"text-xs text-red-600 dark:text-red-400 max-w-xs truncate",children:a}),i&&s.jsxs("span",{className:"text-xs text-primary-foreground",children:["Last checked: ",i.toLocaleTimeString()]})]})]})};function fAe(e){return Object.prototype.toString.call(e)==="[object Object]"}function r8(e){return fAe(e)||Array.isArray(e)}function hAe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function HM(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const a=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==i?!1:n.every(o=>{const l=e[o],c=t[o];return typeof l=="function"?`${l}`==`${c}`:!r8(l)||!r8(c)?l===c:HM(l,c)})}function s8(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function mAe(e,t){if(e.length!==t.length)return!1;const n=s8(e),r=s8(t);return n.every((a,i)=>{const o=r[i];return HM(a,o)})}function qM(e){return typeof e=="number"}function ZT(e){return typeof e=="string"}function O1(e){return typeof e=="boolean"}function a8(e){return Object.prototype.toString.call(e)==="[object Object]"}function er(e){return Math.abs(e)}
vendor: 18,411 bytes, line 1088
1088function VM(e){return Math.sign(e)}function Eg(e,t){return er(e-t)}function pAe(e,t){if(e===0||t===0||er(e)<=er(t))return 0;const n=Eg(er(e),er(t));return er(n/e)}function gAe(e){return Math.round(e*100)/100}function ux(e){return dx(e).map(Number)}function Oi(e){return e[Ly(e)]}function Ly(e){return Math.max(0,e.length-1)}function WM(e,t){return t===Ly(e)}function i8(e,t=0){return Array.from(Array(e),(n,r)=>t+r)}function dx(e){return Object.keys(e)}function GJ(e,t){return[e,t].reduce((n,r)=>(dx(r).forEach(a=>{const i=n[a],o=r[a],l=a8(i)&&a8(o);n[a]=l?GJ(i,o):o}),n),{})}function JT(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function xAe(e,t){const n={start:r,center:a,end:i};function r(){return 0}function a(c){return i(c)/2}function i(c){return t-c}function o(c,u){return ZT(e)?n[e](c):e(t,c,u)}return{measure:o}}function fx(){let e=[];function t(a,i,o,l={passive:!0}){let c;if("addEventListener"in a)a.addEventListener(i,o,l),c=()=>a.removeEventListener(i,o,l);else{const u=a;u.addListener(o),c=()=>u.removeListener(o)}return e.push(c),r}function n(){e=e.filter(a=>a())}const r={add:t,clear:n};return r}function yAe(e,t,n,r){const a=fx(),i=1e3/60;let o=null,l=0,c=0;function u(){a.add(e,"visibilitychange",()=>{e.hidden&&v()})}function d(){p(),a.clear()}function f(x){if(!c)return;o||(o=x,n(),n());const w=x-o;for(o=x,l+=w;l>=i;)n(),l-=i;const N=l/i;r(N),c&&(c=t.requestAnimationFrame(f))}function m(){c||(c=t.requestAnimationFrame(f))}function p(){t.cancelAnimationFrame(c),o=null,l=0,c=0}function v(){o=null,l=0}return{init:u,destroy:d,start:m,stop:p,update:n,render:r}}function vAe(e,t){const n=t==="rtl",r=e==="y",a=r?"y":"x",i=r?"x":"y",o=!r&&n?-1:1,l=d(),c=f();function u(v){const{height:y,width:x}=v;return r?y:x}function d(){return r?"top":n?"right":"left"}function f(){return r?"bottom":n?"left":"right"}function m(v){return v*o}return{scroll:a,cross:i,startEdge:l,endEdge:c,measureSize:u,direction:m}}function gd(e=0,t=0){const n=er(e-t);function r(u){return u<e}function a(u){return u>t}function i(u){return r(u)||a(u)}function o(u){return i(u)?r(u)?e:t:u}function l(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:o,reachedAny:i,reachedMax:a,reachedMin:r,removeOffset:l}}function KJ(e,t,n){const{constrain:r}=gd(0,e),a=e+1;let i=o(t);function o(m){return n?er((a+m)%a):r(m)}function l(){return i}function c(m){return i=o(m),f}function u(m){return d().set(l()+m)}function d(){return KJ(e,l(),n)}const f={get:l,set:c,add:u,clone:d};return f}function bAe(e,t,n,r,a,i,o,l,c,u,d,f,m,p,v,y,x,w,N){const{cross:S,direction:_}=e,k=["INPUT","SELECT","TEXTAREA"],C={passive:!1},E=fx(),O=fx(),P=gd(50,225).constrain(p.measure(20)),R={mouse:300,touch:400},T={mouse:500,touch:600},D=v?43:25;let z=!1,I=0,F=0,U=!1,H=!1,q=!1,B=!1;function L(Q){if(!N)return;function ae(Ee){(O1(N)||N(Q,Ee))&&ge(Ee)}const fe=t;E.add(fe,"dragstart",Ee=>Ee.preventDefault(),C).add(fe,"touchmove",()=>{},C).add(fe,"touchend",()=>{}).add(fe,"touchstart",ae).add(fe,"mousedown",ae).add(fe,"touchcancel",ne).add(fe,"contextmenu",ne).add(fe,"click",Z,!0)}function V(){E.clear(),O.clear()}function K(){const Q=B?n:t;O.add(Q,"touchmove",J,C).add(Q,"touchend",ne).add(Q,"mousemove",J,C).add(Q,"mouseup",ne)}function W(Q){const ae=Q.nodeName||"";return k.includes(ae)}function ie(){return(v?T:R)[B?"mouse":"touch"]}function ve(Q,ae){const fe=f.add(VM(Q)*-1),Ee=d.byDistance(Q,!v).distance;return v||er(Q)<P?Ee:x&&ae?Ee*.5:d.byIndex(fe.get(),0).distance}function ge(Q){const ae=JT(Q,r);B=ae,q=v&&ae&&!Q.buttons&&z,z=Eg(a.get(),o.get())>=2,!(ae&&Q.button!==0)&&(W(Q.target)||(U=!0,i.pointerDown(Q),u.useFriction(0).useDuration(0),a.set(o),K(),I=i.readPoint(Q),F=i.readPoint(Q,S),m.emit("pointerDown")))}function J(Q){if(!JT(Q,r)&&Q.touches.length>=2)return ne(Q);const fe=i.readPoint(Q),Ee=i.readPoint(Q,S),Re=Eg(fe,I),qe=Eg(Ee,F);if(!H&&!B&&(!Q.cancelable||(H=Re>qe,!H)))return ne(Q);const St=i.pointerMove(Q);Re>y&&(q=!0),u.useFriction(.3).useDuration(.75),l.start(),a.add(_(St)),Q.preventDefault()}function ne(Q){const fe=d.byDistance(0,!1).index!==f.get(),Ee=i.pointerUp(Q)*ie(),Re=ve(_(Ee),fe),qe=pAe(Ee,Re),St=D-10*qe,Ut=w+qe/50;H=!1,U=!1,O.clear(),u.useDuration(St).useFriction(Ut),c.distance(Re,!v),B=!1,m.emit("pointerUp")}function Z(Q){q&&(Q.stopPropagation(),Q.preventDefault(),q=!1)}function oe(){return U}return{init:L,destroy:V,pointerDown:oe}}function wAe(e,t){let r,a;function i(f){return f.timeStamp}function o(f,m){const v=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(JT(f,t)?f:f.touches[0])[v]}function l(f){return r=f,a=f,o(f)}function c(f){const m=o(f)-o(a),p=i(f)-i(r)>170;return a=f,p&&(r=f),m}function u(f){if(!r||!a)return 0;const m=o(a)-o(r),p=i(f)-i(r),v=i(f)-i(a)>170,y=m/p;return p&&!v&&er(y)>.1?y:0}return{pointerDown:l,pointerMove:c,pointerUp:u,readPoint:o}}function jAe(){function e(n){const{offsetTop:r,offsetLeft:a,offsetWidth:i,offsetHeight:o}=n;return{top:r,right:a+i,bottom:r+o,left:a,width:i,height:o}}return{measure:e}}function NAe(e){function t(r){return e*(r/100)}return{measure:t}}function SAe(e,t,n,r,a,i,o){const l=[e].concat(r);let c,u,d=[],f=!1;function m(x){return a.measureSize(o.measure(x))}function p(x){if(!i)return;u=m(e),d=r.map(m);function w(N){for(const S of N){if(f)return;const _=S.target===e,k=r.indexOf(S.target),C=_?u:d[k],E=m(_?e:r[k]);if(er(E-C)>=.5){x.reInit(),t.emit("resize");break}}}c=new ResizeObserver(N=>{(O1(i)||i(x,N))&&w(N)}),n.requestAnimationFrame(()=>{l.forEach(N=>c.observe(N))})}function v(){f=!0,c&&c.disconnect()}return{init:p,destroy:v}}function kAe(e,t,n,r,a,i){let o=0,l=0,c=a,u=i,d=e.get(),f=0;function m(){const C=r.get()-e.get(),E=!c;let O=0;return E?(o=0,n.set(r),e.set(r),O=C):(n.set(e),o+=C/c,o*=u,d+=o,e.add(o),O=d-f),l=VM(O),f=d,k}function p(){const C=r.get()-t.get();return er(C)<.001}function v(){return c}function y(){return l}function x(){return o}function w(){return S(a)}function N(){return _(i)}function S(C){return c=C,k}function _(C){return u=C,k}const k={direction:y,duration:v,velocity:x,seek:m,settled:p,useBaseFriction:N,useBaseDuration:w,useFriction:_,useDuration:S};return k}function CAe(e,t,n,r,a){const i=a.measure(10),o=a.measure(50),l=gd(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function d(p){if(!u())return;const v=e.reachedMin(t.get())?"min":"max",y=er(e[v]-t.get()),x=n.get()-t.get(),w=l.constrain(y/o);n.subtract(x*w),!p&&er(x)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){c=!p}return{shouldConstrain:u,constrain:d,toggleActive:f}}function _Ae(e,t,n,r,a){const i=gd(-t+e,0),o=f(),l=d(),c=m();function u(v,y){return Eg(v,y)<=1}function d(){const v=o[0],y=Oi(o),x=o.lastIndexOf(v),w=o.indexOf(y)+1;return gd(x,w)}function f(){return n.map((v,y)=>{const{min:x,max:w}=i,N=i.constrain(v),S=!y,_=WM(n,y);return S?w:_||u(x,N)?x:u(w,N)?w:N}).map(v=>parseFloat(v.toFixed(3)))}function m(){if(t<=e+a)return[i.max];if(r==="keepSnaps")return o;const{min:v,max:y}=l;return o.slice(v,y)}return{snapsContained:c,scrollContainLimit:l}}function AAe(e,t,n){const r=t[0],a=n?r-e:Oi(t);return{limit:gd(a,r)}}function EAe(e,t,n,r){const i=t.min+.1,o=t.max+.1,{reachedMin:l,reachedMax:c}=gd(i,o);function u(m){return m===1?c(n.get()):m===-1?l(n.get()):!1}function d(m){if(!u(m))return;const p=e*(m*-1);r.forEach(v=>v.add(p))}return{loop:d}}function PAe(e){const{max:t,length:n}=e;function r(i){const o=i-t;return n?o/-n:0}return{get:r}}function TAe(e,t,n,r,a){const{startEdge:i,endEdge:o}=e,{groupSlides:l}=a,c=f().map(t.measure),u=m(),d=p();function f(){return l(r).map(y=>Oi(y)[o]-y[0][i]).map(er)}function m(){return r.map(y=>n[i]-y[i]).map(y=>-er(y))}function p(){return l(u).map(y=>y[0]).map((y,x)=>y+c[x])}return{snaps:u,snapsAligned:d}}function IAe(e,t,n,r,a,i){const{groupSlides:o}=a,{min:l,max:c}=r,u=d();function d(){const m=o(i),p=!e||t==="keepSnaps";return n.length===1?[i]:p?m:m.slice(l,c).map((v,y,x)=>{const w=!y,N=WM(x,y);if(w){const S=Oi(x[0])+1;return i8(S)}if(N){const S=Ly(i)-Oi(x)[0]+1;return i8(S,Oi(x)[0])}return v})}return{slideRegistry:u}}function OAe(e,t,n,r,a){const{reachedAny:i,removeOffset:o,constrain:l}=r;function c(v){return v.concat().sort((y,x)=>er(y)-er(x))[0]}function u(v){const y=e?o(v):l(v),x=t.map((N,S)=>({diff:d(N-y,0),index:S})).sort((N,S)=>er(N.diff)-er(S.diff)),{index:w}=x[0];return{index:w,distance:y}}function d(v,y){const x=[v,v+n,v-n];if(!e)return v;if(!y)return c(x);const w=x.filter(N=>VM(N)===y);return w.length?c(w):Oi(x)-n}function f(v,y){const x=t[v]-a.get(),w=d(x,y);return{index:v,distance:w}}function m(v,y){const x=a.get()+v,{index:w,distance:N}=u(x),S=!e&&i(x);if(!y||S)return{index:w,distance:v};const _=t[w]-N,k=v+d(_,0);return{index:w,distance:k}}return{byDistance:m,byIndex:f,shortcut:d}}function MAe(e,t,n,r,a,i,o){function l(f){const m=f.distance,p=f.index!==t.get();i.add(m),m&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function c(f,m){const p=a.byDistance(f,m);l(p)}function u(f,m){const p=t.clone().set(f),v=a.byIndex(p.get(),m);l(v)}return{distance:c,index:u}}function RAe(e,t,n,r,a,i,o,l){const c={passive:!0,capture:!0};let u=0;function d(p){if(!l)return;function v(y){if(new Date().getTime()-u>10)return;o.emit("slideFocusStart"),e.scrollLeft=0;const N=n.findIndex(S=>S.includes(y));qM(N)&&(a.useDuration(0),r.index(N,0),o.emit("slideFocus"))}i.add(document,"keydown",f,!1),t.forEach((y,x)=>{i.add(y,"focus",w=>{(O1(l)||l(p,w))&&v(x)},c)})}function f(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:d}}function hg(e){let t=e;function n(){return t}function r(c){t=o(c)}function a(c){t+=o(c)}function i(c){t-=o(c)}function o(c){return qM(c)?c:c.get()}return{get:n,set:r,add:a,subtract:i}}function YJ(e,t){const n=e.scroll==="x"?o:l,r=t.style;let a=null,i=!1;function o(m){return`translate3d(${m}px,0px,0px)`}function l(m){return`translate3d(0px,${m}px,0px)`}function c(m){if(i)return;const p=gAe(e.direction(m));p!==a&&(r.transform=n(p),a=p)}function u(m){i=!m}function d(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:d,to:c,toggleActive:u}}function DAe(e,t,n,r,a,i,o,l,c){const d=ux(a),f=ux(a).reverse(),m=w().concat(N());function p(E,O){return E.reduce((P,R)=>P-a[R],O)}function v(E,O){return E.reduce((P,R)=>p(P,O)>0?P.concat([R]):P,[])}function y(E){return i.map((O,P)=>({start:O-r[P]+.5+E,end:O+t-.5+E}))}function x(E,O,P){const R=y(O);return E.map(T=>{const D=P?0:-n,z=P?n:0,I=P?"end":"start",F=R[T][I];return{index:T,loopPoint:F,slideLocation:hg(-1),translate:YJ(e,c[T]),target:()=>l.get()>F?D:z}})}function w(){const E=o[0],O=v(f,E);return x(O,n,!1)}function N(){const E=t-o[0]-1,O=v(d,E);return x(O,-n,!0)}function S(){return m.every(({index:E})=>{const O=d.filter(P=>P!==E);return p(O,t)<=.1})}function _(){m.forEach(E=>{const{target:O,translate:P,slideLocation:R}=E,T=O();T!==R.get()&&(P.to(T),R.set(T))})}function k(){m.forEach(E=>E.translate.clear())}return{canLoop:S,clear:k,loop:_,loopPoints:m}}function LAe(e,t,n){let r,a=!1;function i(c){if(!n)return;function u(d){for(const f of d)if(f.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(d=>{a||(O1(n)||n(c,d))&&u(d)}),r.observe(e,{childList:!0})}function o(){r&&r.disconnect(),a=!0}return{init:i,destroy:o}}function $Ae(e,t,n,r){const a={};let i=null,o=null,l,c=!1;function u(){l=new IntersectionObserver(v=>{c||(v.forEach(y=>{const x=t.indexOf(y.target);a[x]=y}),i=null,o=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(v=>l.observe(v))}function d(){l&&l.disconnect(),c=!0}function f(v){return dx(a).reduce((y,x)=>{const w=parseInt(x),{isIntersecting:N}=a[w];return(v&&N||!v&&!N)&&y.push(w),y},[])}function m(v=!0){if(v&&i)return i;if(!v&&o)return o;const y=f(v);return v&&(i=y),v||(o=y),y}return{init:u,destroy:d,get:m}}function FAe(e,t,n,r,a,i){const{measureSize:o,startEdge:l,endEdge:c}=e,u=n[0]&&a,d=v(),f=y(),m=n.map(o),p=x();function v(){if(!u)return 0;const N=n[0];return er(t[l]-N[l])}function y(){if(!u)return 0;const N=i.getComputedStyle(Oi(r));return parseFloat(N.getPropertyValue(`margin-${c}`))}function x(){return n.map((N,S,_)=>{const k=!S,C=WM(_,S);return k?m[S]+d:C?m[S]+f:_[S+1][l]-N[l]}).map(er)}return{slideSizes:m,slideSizesWithGaps:p,startGap:d,endGap:f}}function zAe(e,t,n,r,a,i,o,l,c){const{startEdge:u,endEdge:d,direction:f}=e,m=qM(n);function p(w,N){return ux(w).filter(S=>S%N===0).map(S=>w.slice(S,S+N))}function v(w){return w.length?ux(w).reduce((N,S,_)=>{const k=Oi(N)||0,C=k===0,E=S===Ly(w),O=a[u]-i[k][u],P=a[u]-i[S][d],R=!r&&C?f(o):0,T=!r&&E?f(l):0,D=er(P-T-(O+R));return _&&D>t+c&&N.push(S),E&&N.push(w.length),N},[]).map((N,S,_)=>{const k=Math.max(_[S-1]||0);return w.slice(k,N)}):[]}function y(w){return m?p(w,n):v(w)}return{groupSlides:y}}function BAe(e,t,n,r,a,i,o){const{align:l,axis:c,direction:u,startIndex:d,loop:f,duration:m,dragFree:p,dragThreshold:v,inViewThreshold:y,slidesToScroll:x,skipSnaps:w,containScroll:N,watchResize:S,watchSlides:_,watchDrag:k,watchFocus:C}=i,E=2,O=jAe(),P=O.measure(t),R=n.map(O.measure),T=vAe(c,u),D=T.measureSize(P),z=NAe(D),I=xAe(l,D),F=!f&&!!N,U=f||!!N,{slideSizes:H,slideSizesWithGaps:q,startGap:B,endGap:L}=FAe(T,P,R,n,U,a),V=zAe(T,D,x,f,P,R,B,L,E),{snaps:K,snapsAligned:W}=TAe(T,I,P,R,V),ie=-Oi(K)+Oi(q),{snapsContained:ve,scrollContainLimit:ge}=_Ae(D,ie,W,N,E),J=F?ve:W,{limit:ne}=AAe(ie,J,f),Z=KJ(Ly(J),d,f),oe=Z.clone(),he=ux(n),Q=({dragHandler:pt,scrollBody:jn,scrollBounds:gr,options:{loop:Mn}})=>{Mn||gr.constrain(pt.pointerDown()),jn.seek()},ae=({scrollBody:pt,translate:jn,location:gr,offsetLocation:Mn,previousLocation:dr,scrollLooper:ls,slideLooper:un,dragHandler:Dr,animation:_n,eventHandler:oa,scrollBounds:Pa,options:{loop:cs}},Xr)=>{const pe=pt.settled(),Fe=!Pa.shouldConstrain(),Ce=cs?pe:pe&&Fe,De=Ce&&!Dr.pointerDown();De&&_n.stop();const Ke=gr.get()*Xr+dr.get()*(1-Xr);Mn.set(Ke),cs&&(ls.loop(pt.direction()),un.loop()),jn.to(Mn.get()),De&&oa.emit("settle"),Ce||oa.emit("scroll")},fe=yAe(r,a,()=>Q(jt),pt=>ae(jt,pt)),Ee=.68,Re=J[Z.get()],qe=hg(Re),St=hg(Re),Ut=hg(Re),Yt=hg(Re),Ue=kAe(qe,Ut,St,Yt,m,Ee),wt=OAe(f,J,ie,ne,Yt),At=MAe(fe,Z,oe,Ue,wt,Yt,o),cn=PAe(ne),vn=fx(),ye=$Ae(t,n,o,y),{slideRegistry:Ae}=IAe(F,N,J,ge,V,he),st=RAe(e,n,Ae,At,Ue,vn,o,C),jt={ownerDocument:r,ownerWindow:a,eventHandler:o,containerRect:P,slideRects:R,animation:fe,axis:T,dragHandler:bAe(T,e,r,a,Yt,wAe(T,a),qe,fe,At,Ue,wt,Z,o,z,p,v,w,Ee,k),eventStore:vn,percentOfView:z,index:Z,indexPrevious:oe,limit:ne,location:qe,offsetLocation:Ut,previousLocation:St,options:i,resizeHandler:SAe(t,o,a,n,T,S,O),scrollBody:Ue,scrollBounds:CAe(ne,Ut,Yt,Ue,z),scrollLooper:EAe(ie,ne,Ut,[qe,Ut,St,Yt]),scrollProgress:cn,scrollSnapList:J.map(cn.get),scrollSnaps:J,scrollTarget:wt,scrollTo:At,slideLooper:DAe(T,D,ie,H,q,K,J,Ut,n),slideFocus:st,slidesHandler:LAe(t,o,_),slidesInView:ye,slideIndexes:he,slideRegistry:Ae,slidesToScroll:V,target:Yt,translate:YJ(T,t)};return jt}function UAe(){let e={},t;function n(u){t=u}function r(u){return e[u]||[]}function a(u){return r(u).forEach(d=>d(t,u)),c}function i(u,d){return e[u]=r(u).concat([d]),c}function o(u,d){return e[u]=r(u).filter(f=>f!==d),c}function l(){e={}}const c={init:n,emit:a,off:o,on:i,clear:l};return c}const HAe={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function qAe(e){function t(i,o){return GJ(i,o||{})}function n(i){const o=i.breakpoints||{},l=dx(o).filter(c=>e.matchMedia(c).matches).map(c=>o[c]).reduce((c,u)=>t(c,u),{});return t(i,l)}function r(i){return i.map(o=>dx(o.breakpoints||{})).reduce((o,l)=>o.concat(l),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function VAe(e){let t=[];function n(i,o){return t=o.filter(({options:l})=>e.optionsAtMedia(l).active!==!1),t.forEach(l=>l.init(i,e)),o.reduce((l,c)=>Object.assign(l,{[c.name]:c}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function yw(e,t,n){const r=e.ownerDocument,a=r.defaultView,i=qAe(a),o=VAe(i),l=fx(),c=UAe(),{mergeOptions:u,optionsAtMedia:d,optionsMediaQueries:f}=i,{on:m,off:p,emit:v}=c,y=T;let x=!1,w,N=u(HAe,yw.globalOptions),S=u(N),_=[],k,C,E;function O(){const{container:he,slides:Q}=S;C=(ZT(he)?e.querySelector(he):he)||e.children[0];const fe=ZT(Q)?C.querySelectorAll(Q):Q;E=[].slice.call(fe||C.children)}function P(he){const Q=BAe(e,C,E,r,a,he,c);if(he.loop&&!Q.slideLooper.canLoop()){const ae=Object.assign({},he,{loop:!1});return P(ae)}return Q}function R(he,Q){x||(N=u(N,he),S=d(N),_=Q||_,O(),w=P(S),f([N,..._.map(({options:ae})=>ae)]).forEach(ae=>l.add(ae,"change",T)),S.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(oe),w.eventHandler.init(oe),w.resizeHandler.init(oe),w.slidesHandler.init(oe),w.options.loop&&w.slideLooper.loop(),C.offsetParent&&E.length&&w.dragHandler.init(oe),k=o.init(oe,_)))}function T(he,Q){const ae=V();D(),R(u({startIndex:ae},he),Q),c.emit("reInit")}function D(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),o.destroy(),l.clear()}function z(){x||(x=!0,l.clear(),D(),c.emit("destroy"),c.clear())}function I(he,Q,ae){!S.active||x||(w.scrollBody.useBaseFriction().useDuration(Q===!0?0:S.duration),w.scrollTo.index(he,ae||0))}function F(he){const Q=w.index.add(1).get();I(Q,he,-1)}function U(he){const Q=w.index.add(-1).get();I(Q,he,1)}function H(){return w.index.add(1).get()!==V()}function q(){return w.index.add(-1).get()!==V()}function B(){return w.scrollSnapList}function L(){return w.scrollProgress.get(w.offsetLocation.get())}function V(){return w.index.get()}function K(){return w.indexPrevious.get()}function W(){return w.slidesInView.get()}function ie(){return w.slidesInView.get(!1)}function ve(){return k}function ge(){return w}function J(){return e}function ne(){return C}function Z(){return E}const oe={canScrollNext:H,canScrollPrev:q,containerNode:ne,internalEngine:ge,destroy:z,off:p,on:m,emit:v,plugins:ve,previousScrollSnap:K,reInit:y,rootNode:J,scrollNext:F,scrollPrev:U,scrollProgress:L,scrollSnapList:B,scrollTo:I,selectedScrollSnap:V,slideNo
1088des:Z,slidesInView:W,slidesNotInView:ie};return R(t,n),setTimeout(()=>c.emit("init"),0),oe}yw.globalOptions=void 0;function GM(e={},t=[]){const n=b.useRef(e),r=b.useRef(t),[a,i]=b.useState(),[o,l]=b.useState(),c=b.useCallback(()=>{a&&a.reInit(n.current,r.current)},[a]);return b.useEffect(()=>{HM(n.current,e)||(n.current=e,c())},[e,c]),b.useEffect(()=>{mAe(r.current,t)||(r.current=t,c())},[t,c]),b.useEffect(()=>{if(hAe()&&o){yw.globalOptions=GM.globalOptions;const u=yw(o,n.current,r.current);return i(u),()=>u.destroy()}else i(void 0)},[o,i]),[l,a]}GM.globalOptions=void 0;const XJ=b.createContext(null);function M1(){const e=b.useContext(XJ);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const KM=b.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:r,className:a,children:i,...o},l)=>{const[c,u]=GM({...t,axis:e==="horizontal"?"x":"y"},r),[d,f]=b.useState(!1),[m,p]=b.useState(!1),v=b.useCallback(N=>{N&&(f(N.canScrollPrev()),p(N.canScrollNext()))},[]),y=b.useCallback(()=>{u==null||u.scrollPrev()},[u]),x=b.useCallback(()=>{u==null||u.scrollNext()},[u]),w=b.useCallback(N=>{N.key==="ArrowLeft"?(N.preventDefault(),y()):N.key==="ArrowRight"&&(N.preventDefault(),x())},[y,x]);return b.useEffect(()=>{!u||!n||n(u)},[u,n]),b.useEffect(()=>{if(u)return v(u),u.on("reInit",v),u.on("select",v),()=>{u==null||u.off("select",v)}},[u,v]),s.jsx(XJ.Provider,{value:{carouselRef:c,api:u,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:y,scrollNext:x,canScrollPrev:d,canScrollNext:m},children:s.jsx("div",{ref:l,onKeyDownCapture:w,className:He("relative",a),role:"region","aria-roledescription":"carousel",...o,children:i})})});KM.displayName="Carousel";const YM=b.forwardRef(({className:e,...t},n)=>{const{carouselRef:r,orientation:a}=M1();return s.jsx("div",{ref:r,className:"overflow-hidden",children:s.jsx("div",{ref:n,className:He("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});YM.displayName="CarouselContent";const Bo=b.forwardRef(({className:e,...t},n)=>{const{orientation:r}=M1();return s.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:He("min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})});Bo.displayName="CarouselItem";const QJ=b.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},a)=>{const{orientation:i,scrollPrev:o,canScrollPrev:l}=M1();return s.jsxs(Y,{ref:a,variant:t,size:n,className:He("absolute  h-8 w-8 rounded-full",i==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...r,children:[s.jsx(ai,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Previous slide"})]})});QJ.displayName="CarouselPrevious";const ZJ=b.forwardRef(({className:e,variant:t="outline",size:n="icon",...r},a)=>{const{orientation:i,scrollNext:o,canScrollNext:l}=M1();return s.jsxs(Y,{ref:a,variant:t,size:n,className:He("absolute h-8 w-8 rounded-full",i==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:o,...r,children:[s.jsx(Bt,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Next slide"})]})});ZJ.displayName="CarouselNext";const WAe=()=>{const[e,t]=b.useState(null),[n,r]=b.useState(!0),[a,i]=b.useState(null);return b.useEffect(()=>{(async()=>{try{r(!0),i(null);const l=await Pt.getGlobalAgentStats();t(l)}catch(l){console.error("Error fetching global agent stats:",l),i(l.message||"Failed to fetch global statistics")}finally{r(!1)}})()},[]),{stats:e,loading:n,error:a}},GAe=()=>{var H,q,B;const{user:e,isAuthenticated:t}=nr();qt(),_t();const{loading:n,total:r,refreshAgents:a}=oZ(),[i,o]=b.useState(""),[l,c]=b.useState(!1),[u,d]=b.useState(null),f=b.useRef(null),{isMobile:m}=_1(),[p,v]=b.useState(),[y,x]=b.useState(!1),[w,N]=b.useState(!1),[S,_]=b.useState({documents:!1,messages:!1,conversations:!1,tokens:!1,hoursSaved:!1,moneySaved:!1,agentsDeployed:!1}),{stats:k,loading:C}=WAe(),E=JSON.parse(localStorage.getItem("onboardingData")||"{}"),O=(e==null?void 0:e.industry)||E.industry||"water-treatment",P=(e==null?void 0:e.organization)||E.organizationName||"Springfield Water Treatment Plant";b.useEffect(()=>{if(!p)return;const L=()=>
1088{x(p.canScrollPrev()),N(p.canScrollNext())};return L(),p.on("select",L),()=>{p.off("select",L)}},[p]);const R=()=>{p&&p.scrollPrev()},T=()=>{p&&p.scrollNext()},D=L=>{m&&_(V=>({...V,[L]:!V[L]}))},z=(L,V)=>{_(K=>({...K,[L]:V}))},I=()=>t?`Welcome back${e!=null&&e.name?`, ${e.name}`:""}!`:"Live Industrial Operations Dashboard",F=()=>t?`${P} • ${O.replace("-"," ").replace(/\b\w/g,L=>L.toUpperCase())} Dashboard`:s.jsxs(s.Fragment,{children:["Our AI agents support industrial teams — from water treatment SOPs to standards-driven design",s.jsx("br",{}),"and operations. Explore how this fits your workflow"]}),U=async L=>{L.preventDefault()};return b.useEffect(()=>{if(f.current&&clearTimeout(f.current),!i.trim()){d([]),c(!1);return}c(!0),f.current=setTimeout(async()=>{try{const L=await(await oSe(async()=>{const{agentAPIService:V}=await Promise.resolve().then(()=>tSe);return{agentAPIService:V}},void 0)).agentAPIService.listAgents(1,20,i);d(L.results)}catch{d([])}finally{c(!1)}},400)},[i]),s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-20 left-10 w-2 h-2 bg-cyber-blue/30 rounded-full floating",style:{animationDelay:"0s"}}),s.jsx("div",{className:"absolute top-40 right-20 w-1 h-1 bg-electric-blue/40 rounded-full floating",style:{animationDelay:"2s"}}),s.jsx("div",{className:"absolute bottom-32 left-1/4 w-3 h-3 bg-neon-cyan/20 rounded-full floating",style:{animationDelay:"4s"}}),s.jsx("div",{className:"absolute bottom-20 right-1/3 w-1.5 h-1.5 bg-cyber-blue/25 rounded-full floating",style:{animationDelay:"1s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsxs("div",{className:"container mx-auto px-6 py-8 max-w-7xl",children:[s.jsxs("div",{className:"mb-8 stagger-fade-in",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("h1",{className:"text-4xl font-bold gradient-text gradient-text-dark cyber-glow-hover",children:I()}),!t&&s.jsx("div",{className:"flex items-center gap-2",children:s.jsxs(le,{className:"button-gradient text-primary-foreground animate-pulse cyber-glow",children:[s.jsx("div",{className:"w-2 h-2 bg-primary-foreground rounded-full mr-2 animate-pulse"}),"Live Demo"]})})]}),s.jsxs("div",{className:"flex items-center gap-4 stagger-delay-1",children:[s.jsx("p",{className:"text-primary-foreground text-lg",children:F()}),s.jsx(dAe,{showDetails:t})]})]}),t&&s.jsxs("div",{className:"mb-8 stagger-fade-in",children:[s.jsx("h2",{className:"text-2xl font-bold text-primary-foreground mb-4",children:"Statistics Overview"}),s.jsx(iZ,{delayDuration:0,children:s.jsx(KM,{setApi:v,opts:{align:"start",loop:!1,slidesToScroll:m?1:4},className:"w-full",children:s.jsxs("div",{className:"relative px-12",children:[s.jsxs(YM,{className:"-ml-4",children:[s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Agents Deployed"}),s.jsxs(mu,{open:S.agentsDeployed,onOpenChange:L=>z("agentsDeployed",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("agentsDeployed"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"All agents deployed"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:n?s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(kr,{className:"h-3 w-3 animate-spin text-cyan-400"}),s.jsx("span",{className:"text-sm text-slate-400",children:"..."})]}):s.jsx("span",{className:"text-2xl font-bold text-white",children:r.toLocaleString()})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Tokens"}),s.jsxs(mu,{open:S.tokens,onOpenChange:L=>
1088z("tokens",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("tokens"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Count of all the tokens consumed"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":((H=k==null?void 0:k.total_tokens)==null?void 0:H.toLocaleString())||0})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Hours Saved"}),s.jsxs(mu,{open:S.hoursSaved,onOpenChange:L=>z("hoursSaved",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("hoursSaved"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Hours saved = (query * 3 minutes saved ) / 60"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":((q=k==null?void 0:k.estimated_time_saved_hours)==null?void 0:q.toFixed(1))||"0"})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Money Saved"}),s.jsxs(mu,{open:S.moneySaved,onOpenChange:L=>z("moneySaved",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("moneySaved"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Money saved = hours saved * hourly rate 25/hr"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":`$${((B=k==null?void 0:k.estimated_value_usd)==null?void 0:B.toFixed(2))||"0.00"}`})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Documents"}),s.jsxs(mu,{open:S.documents,onOpenChange:L=>z("documents",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("documents"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Count of all displayed documents"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":(k==null?void 0:k.document_count)||0})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Messages"}),s.jsxs(mu,{open:S.messages,onOpenChange:L=>z("messages",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("messages"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Count of all the messages"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":(k==null?void 0:k.message_count)||0})})]})}),s.jsx(Bo,{className:"pl-4 md:basis-1/2 lg:basis-1/4",children:s.jsxs(te,{className:"bg-slate-900/40 backdrop-blur-sm border-slate-700/50 hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx(xe,{className:"pb-2 pt-4 px-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-sm text-slate-200",children:"Conversations"}),s.jsxs(mu,{open:S.conversations,onOpenChange:L=>
1088z("conversations",L),children:[s.jsx(pu,{asChild:!0,children:s.jsx("button",{className:"border-0 bg-transparent p-0",onClick:()=>D("conversations"),type:"button",children:s.jsx(Qs,{className:"h-3.5 w-3.5 text-slate-400 cursor-help md:cursor-help cursor-pointer"})})}),s.jsx(rc,{children:s.jsx("p",{children:"Count of all the conversations"})})]})]})}),s.jsx(se,{className:"pb-4 px-4",children:s.jsx("span",{className:"text-2xl font-bold text-white",children:C?"...":(k==null?void 0:k.conversation_count)||0})})]})})]}),s.jsx(Y,{variant:"outline",size:"icon",className:"absolute left-0 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",onClick:R,disabled:!y,children:s.jsx(f1,{className:"h-4 w-4"})}),s.jsx(Y,{variant:"outline",size:"icon",className:"absolute right-0 top-1/2 -translate-y-1/2 h-8 w-8 rounded-full",onClick:T,disabled:!w,children:s.jsx(ao,{className:"h-4 w-4"})})]})})})]}),s.jsx("div",{className:"mt-6",children:s.jsx(WJ,{searchResults:u??void 0,searchActive:!!i,renderSearchBar:t?()=>s.jsxs("form",{onSubmit:U,className:"mb-8 flex items-center gap-3 stagger-fade-in",children:[s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-cyan-400",children:s.jsxs("svg",{width:"22",height:"22",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 24 24",children:[s.jsx("circle",{cx:"11",cy:"11",r:"8"}),s.jsx("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),s.jsx("input",{type:"text",value:i,onChange:L=>o(L.target.value),placeholder:"Search agents...",className:"input input-bordered pl-10 h-10 w-full max-w-xs bg-slate-900/40 text-white border-cyan-400 focus:border-cyan-500 focus:ring-cyan-500 rounded-lg",style:{maxWidth:"320px",minWidth:"180px"},autoComplete:"off"})]}),s.jsx(Y,{type:"submit",disabled:l,className:"button-gradient h-10 px-6 text-base",children:l?"Searching...":"Search"}),i&&s.jsx(Y,{type:"button",variant:"outline",onClick:()=>{o(""),d(null),a()},className:"h-10",children:"Clear"})]}):void 0})})]})}),s.jsx(Cn,{})]})};var R1="Collapsible",[KAe,JJ]=Mr(R1),[YAe,XM]=KAe(R1),eee=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:i,onOpenChange:o,...l}=e,[c,u]=$s({prop:r,defaultProp:a??!1,onChange:o,caller:R1});return s.jsx(YAe,{scope:n,disabled:i,contentId:na(),open:c,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),children:s.jsx(Ve.div,{"data-state":eR(c),"data-disabled":i?"":void 0,...l,ref:t})})});eee.displayName=R1;var tee="CollapsibleTrigger",QM=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=XM(tee,n);return s.jsx(Ve.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":eR(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:Oe(e.onClick,a.onOpenToggle)})});QM.displayName=tee;var ZM="CollapsibleContent",JM=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=XM(ZM,e.__scopeCollapsible);return s.jsx(Cr,{present:n||a.open,children:({present:i})=>s.jsx(XAe,{...r,ref:t,present:i})})});JM.displayName=ZM;var XAe=b.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...i}=e,o=XM(ZM,n),[l,c]=b.useState(r),u=b.useRef(null),d=gt(t,u),f=b.useRef(0),m=f.current,p=b.useRef(0),v=p.current,y=o.open||l,x=b.useRef(y),w=b.useRef(void 0);return b.useEffect(()=>{const N=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(N)},[]),cr(()=>{const N=u.current;if(N){w.current=w.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const S=N.getBoundingClientRect();f.current=S.height,p.current=S.width,x.current||(N.style.transitionDuration=w.current.transitionDuration,N.style.animationName=w.current.animationName),c(r)}},[o.open,r]),s.jsx(Ve.div,{"data-state":eR(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!y,...i,ref:d,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:y&&a})});function eR(e){return e?"open":"closed"}var nee=eee,QAe=QM,ZAe=JM;const vw=nee,bw=QM,ww=JM,o8=[{id:"plant-knowledge",name:"Plant Knowledge & Spec Lookup Agent",description:"OEM & technical documentation specialist for equipment specs, materials, and process standards",category:"engineering",template:`Identity
1089- Name: Plant Knowledge Agent
1090- Role/Persona: OEM & technical documentation specialist
1091- Domain Expertise: Manufacturing — equipment specs, materials, process standards, ISO/ASTM/ANSI norms
1092
1093Do
1094- Retrieve OEM equipment specs, datasheets, and tolerance tables from public manufacturer sites
1095- Answer questions about material grades, thread standards (UNC/UNF), and GD&T callouts
1096- Summarize ISO/ASTM/ANSI standards relevant to a given process or component
1097- Look up compatible replacement parts and cross-reference part numbers
1098- Surface process parameter recommendations from publicly available technical documentation
1099
1100Don't (Guardrails)
1101- Never approve a material substitution without engineering sign-off
1102- Never confirm regulatory compliance as final — always recommend qualified review
1103- Never provide specs for safety-critical components (pressure vessels, lifting equipment) as sole authority
1104
1105Response Style
1106- Tone: Technical
1107- Format: Bullets + tables
1108- Language: English/Spanish
1109
1110Call-to-Action (Dynamic Closure)
1111- Ask the agent to pull a comparison table of specs, then export or share with your engineering team.
1112
1113Example Q&A
1114- Q: What is the torque specification for M12 class 10.9 bolts in a flange joint application?
1115- A: For M12 class 10.9 bolts, the standard dry torque spec is approximately 109 Nm (80 ft-lb). If using a lubricated fastener or thread-locking compound, reduce by 15–20%. Always verify against your engineering drawing or applicable standard (e.g., VDI 2230). Shall I pull the full torque table for M8 through M20 class 10.9?`,placeholders:[]},{id:"equipment-troubleshooter",name:"Equipment & Process Troubleshooter",description:"Maintenance & process engineering specialist for CNC, PLC, conveyors, hydraulics, and welding systems",category:"maintenance",template:`Identity
1116- Name: Equipment Troubleshooter
1117- Role/Persona: Maintenance & process engineering specialist
1118- Domain Expertise: Manufacturing — CNC, PLC, conveyors, hydraulics, pneumatics, welding systems
1119
1120Do
1121- Guide technicians through symptom-based fault diagnosis using structured decision trees
1122- Interpret alarm codes and fault messages from common PLCs (Allen-Bradley, Siemens, Fanuc)
1123- Suggest root-cause hypotheses for process deviations (dimensional drift, surface finish issues, weld defects)
1124- Provide step-by-step isolation procedures to narrow down mechanical, electrical, or pneumatic faults
1125- Reference relevant PM schedules and suggest whether the issue warrants a CAPA or unplanned work order
1126
1127Don't (Guardrails)
1128- Never authorize equipment restart after a safety trip — require technician physical inspection first
1129- Never override machine interlocks or safety PLCs under any guidance
1130- Never diagnose electrical faults beyond low-voltage control circuits without licensed electrician involvement
1131
1132Response Style
1133- Tone: Direct + Technical
1134- Format: Numbered steps + checklists
1135- Language: English/Spanish
1136
1137Call-to-Action (Dynamic Closure)
1138- Log the fault and resolution in your CMMS. If unresolved, escalate to a qualified maintenance technician or OEM support.
1139
1140Example Q&A
1141- Q: Our CNC lathe is throwing a Fanuc alarm 414 — spindle drive fault. What do I check first?
1142- A: Fanuc 414 is a spindle motor overheat or drive fault. Start here: 1) Check spindle drive cooling fan — confirm it is spinning freely. 2) Inspect drive cabinet ambient temp — should be under 45°C. 3) Check spindle load % at alarm time in your macro history. 4) Inspect spindle motor cooling (air-cooled: clear debris; liquid-cooled: verify flow). 5) Check drive fault LED on the spindle amplifier for a secondary code. If the alarm clears on reset and recurs under load, suspect motor bearing wear or drive IGBT degradation — log a work order and tag out if recurrence is frequent.`,placeholders:[]},{id:"operations-support",name:"Internal Operations Support Agent",description:"Plant floor and operations support coordinator for shift operations, tooling, and safety reminders",category:"operations",template:`Identity
1143- Name: Operations Support Agent
1144- Role/Persona: Plant floor and operations support coordinator
1145- Domain Expertise: Manufacturing — shift operations, internal resource requests, tooling, safety reminders
1146
1147Do
1148- Answer shift handoff questions and summarize production status from internal reports
1149- Help operators locate tooling, consumables, and spare parts in the warehouse or tool crib
1150- Guide employees through internal request processes (maintenance tickets, PPE requests, overtime forms)
1151- Provide quick-reference safety reminders for specific machine areas or chemical handling zones
1152- Assist with reading and navigating work instructions, SOPs, or traveler documents
1153
1154Don't (Guardrails)
1155- Never approve production schedule changes without supervisor confirmation
1156- Never provide personal employee information or payroll data
1157- Never override shift assignments or safety isolation tags through agent action alone
1158
1159Response Style
1160- Tone: Friendly + Direct
1161- Format: Short bullets + clear steps
1162- Language: Bilingual EN/ES
1163
1164Call-to-Action (Dynamic Closure)
1165- Submit your request through the internal ticketing system or ERP portal. The agent can pre-fill the form for you.
1166
1167Example Q&A
1168- Q: ¿Dónde puedo encontrar los insertos de carburo para el torno CNC del turno de noche?
1169- A: Los insertos de carburo para los tornos CNC están en el almacén de herramientas, pasillo B, estante 3. Busca la caja etiquetada CNMG 432 — Grado P25. Si el inventario está bajo, puedes abrir una solicitud de reposición directamente en el sistema ERP. ¿Necesitas el número de parte para hacer el pedido?`,placeholders:[]},{id:"supplier-onboarding",name:"Supplier & Vendor Onboarding Assistant",description:"Procurement & supplier qual
1169ification coordinator for vendor intake, compliance documentation, and PPAP",category:"procurement",template:`Identity
1170- Name: Supplier Onboarding Assistant
1171- Role/Persona: Procurement & supplier qualification coordinator
1172- Domain Expertise: Manufacturing — vendor intake, supplier qualification, compliance documentation, PPAP
1173
1174Do
1175- Guide new suppliers through the qualification checklist (insurance certs, W-9/W-8, quality certs, NDA)
1176- Collect and route required documents: ISO 9001 certs, PPAP, first-article inspection reports, capacity statements
1177- Answer supplier questions about delivery lead times, EDI requirements, and PO acknowledgment procedures
1178- Flag missing documentation and send automated follow-up reminders
1179- Onboard subcontractors with OSHA safety orientation materials and site access requirements
1180
1181Don't (Guardrails)
1182- Never approve a supplier for production use — that requires procurement and quality manager sign-off
1183- Never commit to pricing, payment terms, or delivery dates on behalf of the company
1184- Never share proprietary product drawings or BOM details during initial intake
1185
1186Response Style
1187- Tone: Friendly + Professional
1188- Format: Steps + checklists
1189- Language: Bilingual EN/ES
1190
1191Call-to-Action (Dynamic Closure)
1192- Complete and submit your supplier qualification packet. The agent will confirm receipt and notify the procurement team for review.
1193
1194Example Q&A
1195- Q: We are a new CNC machining shop applying to be a Tier 2 supplier. What documents do you need from us?
1196- A: Welcome! To get started as a Tier 2 supplier, we will need: completed supplier registration form, current ISO 9001:2015 certificate, certificate of insurance (general liability + workers comp), W-9 form, capacity statement (machine list, shifts, lead times), and a sample PPAP capability or first-article experience summary. I can send you the intake packet now. Which document would you like to start with?`,placeholders:[]},{id:"document-control",name:"Engineering Document Control Assistant",description:"Document control and quality systems specialist for SOPs, BOMs, ECOs, and revision control",category:"quality",template:`Identity
1197- Name: Document Control Assistant
1198- Role/Persona: Document control and quality systems specialist
1199- Domain Expertise: Manufacturing — SOPs, work instructions, BOMs, ECOs, inspection records, revision control
1200
1201Do
1202- Review SOPs and work instructions for completeness, version control compliance, and formatting standards
1203- Cross-check BOMs against drawing revisions and flag part number or revision mismatches
1204- Process Engineering Change Orders (ECOs) by verifying affected documents, approvals, and affected part list
1205- Flag missing signatures, outdated rev levels, or documents past their scheduled review date
1206- Summarize NCR content and suggest applicable disposition categories
1207
1208Don't (Guardrails)
1209- Never approve or release a document — human engineering or QA sign-off is always required
1210- Never make edits directly to controlled documents without an authorized ECO
1211- Never confirm a BOM is production-ready without cross-checking against the master ERP record
1212
1213Response Style
1214- Tone: Formal + Technical
1215- Format: Checklists + structured bullets
1216- Language: English
1217
1218Call-to-Action (Dynamic Closure)
1219- Submit the reviewed document for engineering or quality manager approval. Log the revision in your QMS and close the ECO.
1220
1221Example Q&A
1222- Q: I have a work instruction at revision C but the drawing it references is at revision E. Is that a problem?
1223- A: Yes — that is a version control gap and an audit finding risk. You should: 1) Open an ECO to update the work instruction to reflect Rev E drawing changes. 2) Identify what changed between Rev C and Rev E. 3) Determine if the process steps are still valid or require revision. 4) Re-route the updated work instruction for approval before releasing to the floor. Shall I help you draft the ECO initiation form?`,placeholders:[]},{id:"compliance-monitor",name:"Compliance Monitoring Agent",description:"EHS and quality compliance specialist for OSHA, ISO 9001/14001/45001, EPA, ITAR, RoHS, and REACH",category:"compliance",template:`Identity
1224- Name: Compliance Monitor
1225- Role/Persona: EHS and quality compliance specialist
1226- Domain Expertise: Manufacturing — OSHA, ISO 9001/14001/45001, EPA, ITAR, RoHS, REACH
1227
1228Do
1229- Monitor and summarize OSHA, EPA, and ISO audit requirements relevant to the plant's processes
1230- Generate pre-audit readiness checklists for ISO 9001, ISO 14001, and OSHA walkthroughs
1231- Alert teams to upcoming regulatory deadlines (permit renewals, training recertifications, calibration due dates)
1232- Cross-reference internal procedures against applicable regulatory standards and flag gaps
1233- Summarize recent OSHA citations or EPA enforcement actions in the relevant industry for benchmarking
1234
1235Don't (Guardrails)
1236- Never issue a compliance clearance or sign-off — requires a qualified EHS professional or auditor
1237- Never provide legal interpretation of regulatory text — refer to legal counsel for compliance rulings
1238- Never dismiss a compliance flag without human review, even if it appears minor
1239
1240Response Style
1241- Tone: Formal
1242- Format: Checklists + alert summaries
1243- Language: English
1244
1245Call-to-Action (Dynamic Closure)
1246- Log the compliance gap in your corrective action system (CAPA) and assign an owner with a due date for resolution.
1247
1248Example Q&A
1249- Q: Our ISO 9001 surveillance audit is in 6 weeks. What should we be checking?
1250- A: Six weeks is a solid runway. Priority checklist: Internal audit — confirm at least one full cycle is complete with findings tracked. CAPA log — all open items must have owners and current status. Management review — verify the most recent meeting is documented. Calibration records — pull all certs and flag overdue instruments. Document control — spot-check 5 to 10 SOPs for current rev levels. Customer feedback — confirm complaint log is current. Want a full clause-by-clause readiness checklist for ISO 9001:2015?`,placeholders:[]},{id:"vendor-contracts",name:"Procurement & Vendor Contract Assistant",description:"Procurement and commercial contracts analyst for supplier agreements, POs, and SLAs",category:"procurement",template:`Identity
1251- Name: Vendor Contract Assistant
1252- Role/Persona: Procurement and commercial contracts analyst
1253- Domain Expertise: Manufacturing — supplier agreements, POs, service contracts, tooling agreements, SLAs
1254
1255Do
1256- Review supplier agreements for missing SLA terms, delivery penalties, and quality acceptance criteria
1257- Identify non-standard payment terms, automatic renewal clauses, and liability cap exposure
1258- Summarize key commercial terms: price, delivery, warranty, IP ownership, change order process
1259- Flag ITAR, export control, or confidentiality provisions that require legal review
1260- Compare incoming PO terms against standard master supply agreement to identify deviations
1261
1262Don't (Guardrails)
1263- Never provide legal advice or confirm that contract terms are legally enforceable
1264- Never authorize contract execution or commit to terms on behalf of the company
1265- Never redline or modify contract language without attorney or authorized procurement manager review
1266
1267Response Style
1268- Tone: Formal
1269- Format: Bullets + structured summaries
1270- Language: English
1271
1272Call-to-Action (Dynamic Closure)
1273- Route the reviewed contract to legal counsel and the procurement manager for final approval before signature.
1274
1275Example Q&A
1276- Q: A supplier sent us a contract with net-90 payment terms and an automatic annual renewal clause. Should we be concerned?
1277- A: Both terms warrant attention. Net-90 payment terms: if your standard is net-30 or net-45, this extends your cash cycle significantly — negotiate to align with your AP policy. Automatic renewal clause: check the notice period required to opt out (typically 30 to 90 days before the anniversary) — if missed you may be locked in for another term. Recommended actions: flag both for procurement manager review, request redline to net-45 and a 60-day opt-out window, and add to your renewal calendar with a 120-day advance alert. Shall I summarize the full contract risk areas for routing to legal?`,placeholders:[]},{id:"audit-risk",name:"Audit & Risk Assessment Agent",description:"Quality and safety audit specialist for FMEA, CAPA, safety audits, and risk registers",category:"quality",template:`Identity
1278- Name: Audit & Risk Agent
1279- Role/Persona: Quality and safety audit specialist
1280- Domain Expertise: Manufacturing — FMEA, CAPA, safety audits, production quality audits, risk registers
1281
1282Do
1283- Generate structured audit checklists for production floor, quality system, and EHS safety walkthroughs
1284- Support FMEA by helping identify potential failure modes and severity rankings
1285- Summarize audit findings into a prioritized corrective action list with recommended owners
1286- Track open CAPA items and flag any that are overdue or escalating in severity
1287- Help teams prepare risk registers for new equipment installations or process changes
1288
1289Don't (Guardrails)
1290- Never close a CAPA without verification of effectiveness — requires qualified quality or EHS review
1291- Never assign a risk as acceptable without management acknowledgment and documented rationale
1292- Never conduct a safety audit as a substitute for a qualified industrial hygienist or safety officer on-site
1293
1294Response Style
1295- Tone: Direct + Formal
1296- Format: Checklists + risk matrix tables
1297- Language: English
1298
1299Call-to-Action (Dynamic Closure)
1300- Document all findings in the CAPA system, assign severity and priority ratings, and schedule a follow-up audit date.
1301
1302Example Q&A
1303- Q: We are installing a new robotic welding cell. What risks should be in our pre-launch risk assessment?
1304- A: Your risk register should cover: Safety risks — arc flash and UV radiation exposure, pinch points and collision zones, fume extraction adequacy vs OSHA PELs for manganese and hexavalent chromium, fire and spatter containment. Quality risks — fixture repeatability and part locating consistency (Cpk targets), weld parameter variability (wire feed, voltage, travel speed), first-article inspection plan. Operational risks — operator training and certification, PM schedule for torch and liner components, process FMEA for high-cycle sequences. Want me to generate a full FMEA template or pre-launch safety checklist for the cell?`,placeholders:[]}],JAe=`Privion Agent Setup Template
1305
1306Identity
1307• Name: What's the agent called?
1308• Role/Persona: What type of expert is it?
1309• Domain Expertise: Industry or topic focus
1310
1311Do
1312• List the main tasks this agent can perform
1313• Example: "Answer HR policy questions," "Summarize training materials"
1314
1315Don't (Guardrails)
1316• List things the agent should never do or say
1317• Example: "No legal advice," "No personal health diagnosis"
1318
1319Response Style
1320• Tone: Formal, Friendly, Empathetic, Technical, Casual
1321• Format: Bullets, Steps, Paragraphs
1322• Language: English, Spanish, Bilingual
1323
1324Call-to-Action (Closure)
1325• What should the agent encourage the user to do at the end?
1326• Example: "Schedule a meeting," "Download this guide"
1327
1328Example Q&A
1329• Q: Sample user question
1330• A: Sample agent response`,l8={"plant-knowledge":bs,"equipment-troubleshooter":hl,"o
1330perations-support":sje,"supplier-onboarding":Bn,"document-control":rn,"compliance-monitor":it,"vendor-contracts":hje,"audit-risk":Pe},tR=({currentPurpose:e,onPurposeChange:t})=>{const[n,r]=b.useState(null),[a,i]=b.useState(!1),[o,l]=b.useState(!1),c=f=>{t(f.template),r(f),i(!1)},u=f=>{const m=o8.find(p=>p.id===f);m&&(r(m),t(m.template))},d=n?l8[n.id]:rn;return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ws,{className:"h-4 w-4 text-purple-500"}),s.jsx("span",{className:"text-sm font-medium",children:"Template (Optional)"})]}),n&&s.jsx(le,{variant:"outline",className:"text-xs",children:n.name})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(dt,{onValueChange:u,children:[s.jsx(ot,{className:"flex-1 h-9 text-sm",children:s.jsx(ft,{placeholder:"Choose a template to get started"})}),s.jsx(lt,{className:"z-50",children:o8.map(f=>{const m=l8[f.id]||Ko;return s.jsx(me,{value:f.id,className:"py-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(m,{className:"h-4 w-4"}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:f.name}),s.jsx("span",{className:"text-xs text-muted-foreground line-clamp-1",children:f.description})]})]})},f.id)})})]}),n&&s.jsxs(qm,{open:a,onOpenChange:i,children:[s.jsx(nQ,{asChild:!0,children:s.jsx(Y,{variant:"outline",size:"sm",className:"h-9 px-3",children:s.jsx(pr,{className:"h-4 w-4"})})}),s.jsxs(zd,{className:"max-w-4xl max-h-[80vh] overflow-hidden",children:[s.jsxs(Bd,{children:[s.jsxs(Ud,{className:"flex items-center gap-2",children:[s.jsx(d,{className:"h-5 w-5"}),n.name]}),s.jsx(rM,{children:n.description})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx(Ds,{value:n.template,readOnly:!0,className:"text-sm font-mono bg-gray-50 dark:bg-gray-900 border-gray-300 dark:border-gray-600 resize-none",rows:20}),n.placeholders.length>0&&s.jsxs("div",{className:"p-3 bg-blue-50 dark:bg-blue-950/30 rounded-lg",children:[s.jsx("p",{className:"text-sm text-blue-800 dark:text-blue-200 mb-2 font-medium",children:"Remember to customize these placeholders:"}),s.jsx("div",{className:"flex flex-wrap gap-1",children:n.placeholders.map((f,m)=>s.jsx(le,{variant:"secondary",className:"text-xs",children:f},m))})]}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(Y,{variant:"outline",onClick:()=>i(!1),children:"Cancel"}),s.jsx(Y,{onClick:()=>c(n),children:"Apply This Template"})]})]})]})]})]})]}),s.jsx(vw,{open:o,onOpenChange:l,children:s.jsxs(te,{className:"border-border/50",children:[s.jsx(bw,{asChild:!0,children:s.jsx(xe,{className:"cursor-pointer hover:bg-muted/50 transition-colors py-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ko,{className:"h-4 w-4 text-purple-500"}),s.jsx(we,{className:"text-sm font-medium",children:"Prompt Structure Guide"}),s.jsx(le,{variant:"outline",className:"text-xs",children:"Reference"})]}),s.jsx(Gt.div,{animate:{rotate:o?180:0},transition:{duration:.2},children:s.jsx(po,{className:"h-4 w-4 text-muted-foreground"})})]})})}),s.jsx(ww,{children:s.jsx(se,{className:"pt-0 pb-4",children:s.jsx(Ds,{value:JAe,readOnly:!0,className:"text-xs font-mono bg-muted/30 border-border resize-none",rows:15})})})]})})]})},eEe=({onDemoCreated:e})=>{const[t,n]=b.useState(1),[r,a]=b.useState(!1),{toast:i}=_t(),[o,l]=b.useState({name:"",purpose:"",industry:"",primaryColor:"#3B82F6",logoUrl:""}),c=[{value:"legal",label:"Legal Services",compliance:["State Bar","ABA","GDPR"]},{value:"consulting",label:"Management Consulting",compliance:["SOC 2","ISO 27001"]},{value:"fintech",label:"Financial Technology",compliance:["SOX","PCI-DSS","GDPR"]},{value:"professional-services",label:"Professional Services",compliance:["SOC 2","GDPR"]},{value:"healthcare",label:"Healthcare Services",compliance:["HIPAA","HITECH"]},{value:"accounting",label:"Accounting & Tax",compliance:["PCAOB","SOX"]},{value:"real-estate",label:"Real Estate",compliance:["RESPA","Fair Housing"]}],u=p=>{var y;const v=(y=p.target.files)==null?void 0:y[0];if(v){const x=URL.createObjectURL(v);l(w=>({...w,logoUrl:x})),i({description:"Logo uploaded successfully!",duration:2e3})}},d=()=>{t===1&&o.name?n(2):t===2&&o.purpose?n(3):t===3&&n(4)},f=async()=>{o.industry&&(a(!0),setTimeout(()=>{a(!1),e(o),i({description:"🎉 Your interactive demo is ready! Test it and share with your team.",duration:3e3})},2e3))},m=c.find(p=>p.value===o.industry);return s.jsxs("div",{className:"max-w-2xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("div",{className:"flex items-center justify-center mb-4",children:[s.jsx(wr,{variant:"waving",size:"large",className:"mr-3"}),s.jsx("h1",{className:"text-3xl font-bold text-white",children:"Build My First Agent"}),s.jsx(ws,{className:"h-6 w-6 text-cyber-blue animate-pulse ml-3"})]}
1330),s.jsx("p",{className:"text-lg text-blue-200",children:"Quick setup, powerful results"}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mt-4",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${t>=1?"bg-blue-500":"bg-gray-600"}`}),s.jsx("div",{className:`w-3 h-3 rounded-full ${t>=2?"bg-blue-500":"bg-gray-600"}`}),s.jsx("div",{className:`w-3 h-3 rounded-full ${t>=3?"bg-blue-500":"bg-gray-600"}`}),s.jsx("div",{className:`w-3 h-3 rounded-full ${t>=4?"bg-blue-500":"bg-gray-600"}`})]})]}),s.jsx(te,{className:"bg-white/10 backdrop-blur-sm border-blue-400/30",children:s.jsx(se,{children:s.jsx(ci,{mode:"wait",children:s.jsxs(Gt.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},children:[t===1&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(wr,{variant:"compact",size:"medium"}),s.jsx("h3",{className:"text-xl font-semibold text-white",children:"What should we call your agent?"})]}),s.jsx("p",{className:"text-cyan-200",children:"Give your AI assistant a name that reflects your brand"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"agentName",className:"text-base font-medium text-white",children:"Agent Name"}),s.jsx(_e,{id:"agentName",value:o.name,onChange:p=>l(v=>({...v,name:p.target.value})),placeholder:"e.g., LegalFlow Assistant, ConsultBot Pro",className:"mt-2 text-lg h-12 bg-white/10 border-white/20 text-white placeholder:text-gray-300",autoFocus:!0})]}),s.jsxs(Y,{onClick:d,disabled:!o.name.trim(),className:"w-full h-12 text-lg flex items-center justify-center gap-2 bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white",children:["Next Step",s.jsx(Bt,{className:"w-5 h-5"})]})]}),t===2&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(wr,{variant:"compact",size:"medium"}),s.jsxs("h3",{className:"text-xl font-semibold text-white",children:["What will ",o.name," specialize in?"]})]}),s.jsx("p",{className:"text-cyan-200",children:"Choose from proven agent templates designed for professional services"})]}),s.jsx("div",{className:"max-h-[500px] overflow-y-auto",children:s.jsx(tR,{currentPurpose:o.purpose,onPurposeChange:p=>l(v=>({...v,purpose:p}))})}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(Y,{variant:"outline",onClick:()=>n(1),className:"h-12",children:"Back"}),s.jsxs(Y,{onClick:d,disabled:!o.purpose,className:"h-12 flex items-center justify-center gap-2 bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white",children:["Next Step",s.jsx(Bt,{className:"w-5 h-5"})]})]})]}),t===3&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(wr,{variant:"compact",size:"medium"}),s.jsx("h3",{className:"text-xl font-semibold text-white",children:"Add Your Brand Identity"})]}),s.jsx("p",{className:"text-cyan-200",children:"Upload your logo for a personalized experience"})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-base font-medium mb-3 block text-white",children:"Company Logo (Optional)"}),s.jsx("div",{className:"relative group",children:s.jsxs("div",{className:"border-2 border-dashed border-white/30 rounded-xl text-center hover:border-cyber-blue transition-all duration-300 cursor-pointer",children:[s.jsx("input",{type:"file",accept:"image/*",onChange:u,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),o.logoUrl?s.jsxs("div",{className:"flex items-center justify-center gap-3",children:[s.jsx("img",{src:o.logoUrl,alt:"Uploaded logo",className:"h-12 w-12 object-cover rounded"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-green-600",children:"Logo uploaded!"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Click to change"})]})]}):s.jsxs("div",{children:[s.jsx(hX,{className:"h-8 w-8 text-gray-400 mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:"Upload your logo for branding"}),s.jsxs(Y,{variant:"outline",size:"sm",type:"button",children:[s.jsx(Js,{className:"w-4 h-4 mr-2"}),"Choose File"]})]})]})})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-base font-medium text-white",children:"Brand Color"}),s.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[s.jsx(_e,{type:"color",value:o.primaryColor,onChange:p=>l(v=>({...v,primaryColor:p.target.value})),className:"h-12 w-20 p-1"}),s.jsx("div",{className:"flex-1",children:s.jsx("div",{className:"h-8 rounded border",style:{backgroundColor:o.primaryColor}})})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(Y,{variant:"outline",onClick:()=>n(2),className:"h-12",children:"Back"}),s.jsxs(Y,{onClick:d,className:"h-12 flex items-center justify-center gap-2 bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white",children:["Next Step",s.jsx(Bt,{className:"w-5 h-5"})]})]})]}),t===4&&s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(wr,{variant:"compact",size:"medium"}),s.jsx("h3",{className:"text-xl font-semibold text-white",children:"Choose Your Industry"})]}),s.jsx("p",{className:"text-cyan-200",children:"Select your industry for compliance and templates"})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-base font-medium text-white",children:"Industry"}),s.jsxs(dt,{value:o.industry,onValueChange:p=>l(v=>({...v,industry:p})),children:[s.jsx(ot,{className:"mt-2 h-12 bg-white/10 border-white/20 text-white",children:s.jsx(ft,{placeholder:"Select your industry"})}),s.jsx(lt,{children:c.map(p=>s.jsx(me,{value:p.value,className:"py-3",children:s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:p.label}),s.jsxs("div",{className:"text-xs text-gray-500",children:[p.compliance.join(", ")," Compliant"]})]})},p.value))})]})]}),m&&s.jsxs("div",{className:"bg-blue-500/20 border border-blue-400/30 rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(it,{className:"h-4 w-4 text-blue-400"}),s.jsx("h4",{className:"font-medium text-white",children:"Industry Compliance Included"})]}),s.jsxs("p",{className:"text-sm text-blue-200",children:["Your ",m.label.toLowerCase()," agent will include ",m.compliance.join(" & ")," compliance features automatically."]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsx(Y,{variant:"outline",onClick:()=>n(3),className:"h-12",children:"Back"}),s.jsx(Y,{onClick:f,disabled:!o.industry||r,className:"h-12 bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 text-white flex items-center justify-center gap-2",children:r?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Generating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(wr,{variant:"shield",size:"small",animated:!1}),s.jsx(Ot,{className:"w-5 h-5"}),"Create Demo"]})})]})]})]},t)})})})]})};var D1="Tabs",[tEe]=Mr(D1,[t1]),ree=t1(),[nEe,nR]=tEe(D1),see=b.forwardRef((e,t)=>
vendor: 4,335 bytes, line 1330
1330{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=Md(l),[f,m]=$s({prop:r,onChange:a,defaultProp:i??"",caller:D1});return s.jsx(nEe,{scope:n,baseId:na(),value:f,onValueChange:m,orientation:o,dir:d,activationMode:c,children:s.jsx(Ve.div,{dir:d,"data-orientation":o,...u,ref:t})})});see.displayName=D1;var aee="TabsList",iee=b.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,i=nR(aee,n),o=ree(n);return s.jsx(tY,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:s.jsx(Ve.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});iee.displayName=aee;var oee="TabsTrigger",lee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=e,o=nR(oee,n),l=ree(n),c=dee(o.baseId,r),u=fee(o.baseId,r),d=r===o.value;return s.jsx(nY,{asChild:!0,...l,focusable:!a,active:d,children:s.jsx(Ve.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:Oe(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?o.onValueChange(r):f.preventDefault()}),onKeyDown:Oe(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(r)}),onFocus:Oe(e.onFocus,()=>{const f=o.activationMode!=="manual";!d&&!a&&f&&o.onValueChange(r)})})})});lee.displayName=oee;var cee="TabsContent",uee=b.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...o}=e,l=nR(cee,n),c=dee(l.baseId,r),u=fee(l.baseId,r),d=r===l.value,f=b.useRef(d);return b.useEffect(()=>{const m=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(m)},[]),s.jsx(Cr,{present:a||d,children:({present:m})=>s.jsx(Ve.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:m&&i})})});uee.displayName=cee;function dee(e,t){return`${e}-trigger-${t}`}function fee(e,t){return`${e}-content-${t}`}var rEe=see,hee=iee,mee=lee,pee=uee;const os=rEe,Kr=b.forwardRef(({className:e,...t},n)=>s.jsx(hee,{ref:n,className:He("inline-flex h-12 items-center justify-center rounded-lg bg-card/50 backdrop-blur-sm border border-border/50 p-1 text-foreground shadow-lg z-20 relative",e),...t}));Kr.displayName=hee.displayName;const at=b.forwardRef(({className:e,...t},n)=>s.jsx(mee,{ref:n,className:He("inline-flex items-center justify-center whitespace-nowrap rounded-md px-4 py-2.5 text-sm font-medium transition-all duration-200 cursor-pointer z-30 relative","text-muted-foreground hover:text-foreground hover:bg-muted/50","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyber-blue focus-visible:ring-offset-2","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-cyber-blue data-[state=active]:text-primary-foreground data-[state=active]:shadow-md data-[state=active]:border-cyber-blue/20","border border-transparent hover:border-border/30",e),...t}));at.displayName=mee.displayName;const Ze=b.forwardRef(({className:e,...t},n)=>s.jsx(pee,{ref:n,className:He("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ze.displayName=pee.displayName;function sEe(e,t){return b.useReducer((n,r)=>t[n][r]??n,e)}var rR="ScrollArea",[gee]=Mr(rR),[aEe,fi]=gee(rR),xee=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...o}=e,[l,c]=b.useState(null),[u,d]=b.useState(null),[f,m]=b.useState(null),[p,v]=b.useState(null),[y,x]=b.useState(null),[w,N]=b.useState(0),[S,_]=b.useState(0),[k,C]=b.useState(!1),[E,O]=b.useState(!1),P=gt(t,T=>c(T)),R=Md(a);return s.jsx(aEe,{scope:n,type:r,dir:R,scrollHideDelay:i,scrollArea:l,viewport:u,onViewportChange:d,content:f,onContentChange:m,scrollbarX:p,onScrollbarXChange:v,scrollbarXEnabled:k,onScrollbarXEnabledChange:C,scrollbarY:y,onScrollbarYChange:x,scrollbarYEnabled:E,onScrollbarYEnabledChange:O,onCornerWidthChange:N,onCornerHeightChange:_,children:s.jsx(Ve.div,{dir:R,...o,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});xee.displayName=rR;var yee="ScrollAreaViewport",vee=b.forwardRef((e,t)=>
vendor: 4,121 bytes, line 1330
1330{const{__scopeScrollArea:n,children:r,nonce:a,...i}=e,o=fi(yee,n),l=b.useRef(null),c=gt(t,l,o.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),s.jsx(Ve.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});vee.displayName=yee;var bo="ScrollAreaScrollbar",sR=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=fi(bo,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,l=e.orientation==="horizontal";return b.useEffect(()=>(l?i(!0):o(!0),()=>{l?i(!1):o(!1)}),[l,i,o]),a.type==="hover"?s.jsx(iEe,{...r,ref:t,forceMount:n}):a.type==="scroll"?s.jsx(oEe,{...r,ref:t,forceMount:n}):a.type==="auto"?s.jsx(bee,{...r,ref:t,forceMount:n}):a.type==="always"?s.jsx(aR,{...r,ref:t}):null});sR.displayName=bo;var iEe=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=fi(bo,e.__scopeScrollArea),[i,o]=b.useState(!1);return b.useEffect(()=>{const l=a.scrollArea;let c=0;if(l){const u=()=>{window.clearTimeout(c),o(!0)},d=()=>{c=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return l.addEventListener("pointerenter",u),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(c),l.removeEventListener("pointerenter",u),l.removeEventListener("pointerleave",d)}}},[a.scrollArea,a.scrollHideDelay]),s.jsx(Cr,{present:n||i,children:s.jsx(bee,{"data-state":i?"visible":"hidden",...r,ref:t})})}),oEe=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=fi(bo,e.__scopeScrollArea),i=e.orientation==="horizontal",o=$1(()=>c("SCROLL_END"),100),[l,c]=sEe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return b.useEffect(()=>{if(l==="idle"){const u=window.setTimeout(()=>c("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[l,a.scrollHideDelay,c]),b.useEffect(()=>{const u=a.viewport,d=i?"scrollLeft":"scrollTop";if(u){let f=u[d];const m=()=>{const p=u[d];f!==p&&(c("SCROLL"),o()),f=p};return u.addEventListener("scroll",m),()=>u.removeEventListener("scroll",m)}},[a.viewport,i,c,o]),s.jsx(Cr,{present:n||l!=="hidden",children:s.jsx(aR,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Oe(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:Oe(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),bee=b.forwardRef((e,t)=>{const n=fi(bo,e.__scopeScrollArea),{forceMount:r,...a}=e,[i,o]=b.useState(!1),l=e.orientation==="horizontal",c=$1(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?u:d)}},10);return qh(n.viewport,c),qh(n.content,c),s.jsx(Cr,{present:r||i,children:s.jsx(aR,{"data-state":i?"visible":"hidden",...a,ref:t})})}),aR=b.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,a=fi(bo,e.__scopeScrollArea),i=b.useRef(null),o=b.useRef(0),[l,c]=b.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=kee(l.viewport,l.content),d={...r,sizes:l,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:m=>i.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function f(m,p){return hEe(m,o.current,l,p)}return n==="horizontal"?s.jsx(lEe,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const m=a.viewport.scrollLeft,p=c8(m,l,a.dir);i.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:m=>{a.viewport&&(a.viewport.scrollLeft=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollLeft=f(m,a.dir))}}):n==="vertical"?s.jsx(cEe,{...d,ref:t,onThumbPositionChange:()=>{if(a.viewport&&i.current){const m=a.viewport.scrollTop,p=c8(m,l);i.current.style.transform=`translate3d(0, ${p}px, 0)`}}
vendor: 9,619 bytes, line 1330
1330,onWheelScroll:m=>{a.viewport&&(a.viewport.scrollTop=m)},onDragScroll:m=>{a.viewport&&(a.viewport.scrollTop=f(m))}}):null}),lEe=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=fi(bo,e.__scopeScrollArea),[o,l]=b.useState(),c=b.useRef(null),u=gt(t,c,i.onScrollbarXChange);return b.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(jee,{"data-orientation":"horizontal",...a,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":L1(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),_ee(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Nw(o.paddingLeft),paddingEnd:Nw(o.paddingRight)}})}})}),cEe=b.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...a}=e,i=fi(bo,e.__scopeScrollArea),[o,l]=b.useState(),c=b.useRef(null),u=gt(t,c,i.onScrollbarYChange);return b.useEffect(()=>{c.current&&l(getComputedStyle(c.current))},[c]),s.jsx(jee,{"data-orientation":"vertical",...a,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":L1(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(i.viewport){const m=i.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),_ee(m,f)&&d.preventDefault()}},onResize:()=>{c.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Nw(o.paddingTop),paddingEnd:Nw(o.paddingBottom)}})}})}),[uEe,wee]=gee(bo),jee=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:d,onResize:f,...m}=e,p=fi(bo,n),[v,y]=b.useState(null),x=gt(t,P=>y(P)),w=b.useRef(null),N=b.useRef(""),S=p.viewport,_=r.content-r.viewport,k=lr(d),C=lr(c),E=$1(f,10);function O(P){if(w.current){const R=P.clientX-w.current.left,T=P.clientY-w.current.top;u({x:R,y:T})}}return b.useEffect(()=>{const P=R=>{const T=R.target;(v==null?void 0:v.contains(T))&&k(R,_)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[S,v,_,k]),b.useEffect(C,[r,C]),qh(v,E),qh(p.content,E),s.jsx(uEe,{scope:n,scrollbar:v,hasThumb:a,onThumbChange:lr(i),onThumbPointerUp:lr(o),onThumbPositionChange:C,onThumbPointerDown:lr(l),children:s.jsx(Ve.div,{...m,ref:x,style:{position:"absolute",...m.style},onPointerDown:Oe(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),w.current=v.getBoundingClientRect(),N.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),O(P))}),onPointerMove:Oe(e.onPointerMove,O),onPointerUp:Oe(e.onPointerUp,P=>{const R=P.target;R.hasPointerCapture(P.pointerId)&&R.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=N.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),jw="ScrollAreaThumb",Nee=b.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=wee(jw,e.__scopeScrollArea);return s.jsx(Cr,{present:n||a.hasThumb,children:s.jsx(dEe,{ref:t,...r})})}),dEe=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...a}=e,i=fi(jw,n),o=wee(jw,n),{onThumbPositionChange:l}=o,c=gt(t,f=>o.onThumbChange(f)),u=b.useRef(void 0),d=$1(()=>{u.current&&(u.current(),u.current=void 0)},100);return b.useEffect(()=>{const f=i.viewport;if(f){const m=()=>{if(d(),!u.current){const p=mEe(f,l);u.current=p,l()}};return l(),f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,d,l]),s.jsx(Ve.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Oe(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),v=f.clientX-p.left,y=f.clientY-p.top;o.onThumbPointerDown({x:v,y})}),onPointerUp:Oe(e.onPointerUp,o.onThumbPointerUp)})});Nee.displayName=jw;var iR="ScrollAreaCorner",See=b.forwardRef((e,t)=>{const n=fi(iR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?s.jsx(fEe,{...e,ref:t}):null});See.displayName=iR;var fEe=b.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,a=fi(iR,n),[i,o]=b.useState(0),[l,c]=b.useState(0),u=!!(i&&l);return qh(a.scrollbarX,()=>{var f;const d=((f=a.scrollbarX)==null?void 0:f.offsetHeight)||0;a.onCornerHeightChange(d),c(d)}),qh(a.scrollbarY,()=>{var f;const d=((f=a.scrollbarY)==null?void 0:f.offsetWidth)||0;a.onCornerWidthChange(d),o(d)}),u?s.jsx(Ve.div,{...r,ref:t,style:{width:i,height:l,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Nw(e){return e?parseInt(e,10):0}function kee(e,t){const n=e/t;return isNaN(n)?0:n}function L1(e){const t=kee(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function hEe(e,t,n,r="ltr"){const a=L1(n),i=a/2,o=t||i,l=a-o,c=n.scrollbar.paddingStart+o,u=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Cee([c,u],f)(e)}function c8(e,t,n="ltr"){const r=L1(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-a,o=t.content-t.viewport,l=i-r,c=n==="ltr"?[0,o]:[o*-1,0],u=nx(e,c);return Cee([0,o],[0,l])(u)}function Cee(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function _ee(e,t){return e>0&&e<t}var mEe=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){const i={left:e.scrollLeft,top:e.scrollTop},o=n.left!==i.left,l=n.top!==i.top;(o||l)&&t(),n=i,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function $1(e,t){const n=lr(e),r=b.useRef(0);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),b.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function qh(e,t){const n=lr(t);cr(()=>{let r=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,n])}var Aee=xee,pEe=vee,gEe=See;const js=b.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Aee,{ref:r,className:He("relative overflow-hidden",e),...n,children:[s.jsx(pEe,{className:"h-full w-full rounded-[inherit]",children:t}),s.jsx(Eee,{}),s.jsx(gEe,{})]}));js.displayName=Aee.displayName;const Eee=b.forwardRef(({className:e,orientation:t="vertical",...n},r)=>s.jsx(sR,{ref:r,orientation:t,className:He("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:s.jsx(Nee,{className:"relative flex-1 rounded-full bg-border"})}));Eee.displayName=sR.displayName;const u8={"water-treatment":{industry:"Water Treatment",challenges:["Manual data logging and compliance reporting","Emergency response coordination","Regulatory compliance tracking","Equipment maintenance scheduling","Water quality monitoring"],conversationStarters:["How do I handle a chlorine residual alarm?","What are the daily startup procedures?","Help me understand turbidity readings","What should I do if pH is out of range?","How do I create compliance reports?","Walk me through emergency shutdown procedures"],capabilityMapping:{compliance:["Automated reporting","Real-time monitoring","Audit trails"],automation:["Smart alarms","Automated workflows","Predictive maintenance"],integration:["SCADA integration","Lab systems","Regulatory databases"]},complianceRequirements:["EPA Safe Drinking Water Act","State water quality standards","AWWA guidelines"],commonQuestions:["How does Privion integrate with our SCADA system?","Can it automate our compliance reporting?","What training is required for operators?","How quickly can we deploy this?"],privionSolutions:["Real-time SCADA integration for live data monitoring","Automated compliance report generation","Smart alarm management with contextual guidance","Digital SOPs with step-by-step procedures"]},healthcare:{industry:"Healthcare",challenges:["Patient data privacy and security","Clinical workflow optimization","Regulatory compliance (HIPAA)","Staff training and onboarding","Emergency response protocols"],conversationStarters:["How do I access patient records securely?","What are the infection control procedures?","Help me with medication administration protocols","How do I handle a medical emergency?","What are the HIPAA compliance requirements?"],capabilityMapping:{security:["HIPAA compliance","Data encryption","Access controls"],automation:["Clinical workflows","Alert management","Documentation"],integration:["EHR systems","Medical devices","Lab systems"]},complianceRequirements:["HIPAA","FDA regulations","Joint Commission standards"],commonQuestions:["How does Privion ensure HIPAA compliance?","Can it integrate with our EHR system?","What about patient data security?","How does it help with clinical workflows?"],privionSolutions:["HIPAA-compliant AI with end-to-e
1330nd encryption","Seamless EHR integration for clinical data","Automated clinical decision support","Real-time protocol guidance for staff"]},manufacturing:{industry:"Manufacturing",challenges:["Production line optimization","Quality control and assurance","Equipment maintenance","Safety compliance","Supply chain coordination"],conversationStarters:["How do I troubleshoot line stoppage?","What are the quality control checkpoints?","Help me with preventive maintenance schedules","How do I handle a safety incident?","What are the production targets today?"],capabilityMapping:{automation:["Production optimization","Quality monitoring","Maintenance scheduling"],integration:["MES systems","ERP integration","IoT sensors"],analytics:["Production metrics","Quality analytics","Predictive maintenance"]},complianceRequirements:["ISO 9001","OSHA safety standards","Industry-specific regulations"],commonQuestions:["How does Privion integrate with our MES system?","Can it help optimize production efficiency?","What about predictive maintenance capabilities?","How does it ensure quality compliance?"],privionSolutions:["Real-time MES integration for production data","Predictive maintenance with IoT sensor data","Automated quality control workflows","Smart safety incident reporting and response"]}},xEe=[{id:"scada-integration",title:"SCADA Integration",description:"Real-time integration with SCADA systems for live operational data",category:"integration",industryRelevance:["water-treatment","manufacturing","energy"],benefits:["Live data access from control systems","Automated alarm management","Historical data analysis","Predictive maintenance alerts"],implementation:"Direct API integration with major SCADA platforms (Wonderware, Ignition, etc.)"},{id:"compliance-automation",title:"Automated Compliance Reporting",description:"Generate regulatory reports automatically from operational data",category:"compliance",industryRelevance:["water-treatment","healthcare","manufacturing"],benefits:["Eliminate manual data entry","99.9% accuracy in reporting","Real-time compliance monitoring","Audit trail documentation"],implementation:"Pre-built templates for EPA, FDA, and industry-specific regulations"},{id:"smart-workflows",title:"Intelligent Workflow Automation",description:"AI-powered process automation that learns from your operations",category:"automation",industryRelevance:["healthcare","manufacturing","water-treatment"],benefits:["Reduce manual tasks by 70%","Consistent process execution","Error reduction and quality improvement","Adaptive learning from user behavior"],implementation:"No-code workflow builder with AI-suggested optimizations"},{id:"security-framework",title:"Enterprise Security & Privacy",description:"Military-grade security with industry-specific compliance",category:"security",industryRelevance:["healthcare","government","financial"],benefits:["Zero-trust security architecture","End-to-end encryption","HIPAA/SOX/GDPR compliance","Role-based access controls"],implementation:"Built-in security frameworks with automated compliance monitoring"},{id:"predictive-analytics",title:"Predictive Analytics & Insights",description:"AI-powered analytics that predict issues before they occur",category:"analytics",industryRelevance:["manufacturing","water-treatment","energy"],benefits:["Prevent equipment failures","Optimize operational efficiency","Reduce maintenance costs by 30%","Data-driven decision making"],implementation:"Machine learning models trained on operational data patterns"}],yEe=e=>{var c;const[t,n]=b.useState([]),r=b.useCallback(()=>u8[e.agentData.industry]||u8["water-treatment"],[e.agentData.industry]),a=b.useCallback(()=>xEe.filter(u=>u.industryRelevance.includes(e.agentData.industry)),[e.agentData.industry]),i=b.useCallback(u=>{const d=r(),f=a(),m=u.toLowerCase();if(m.includes("privion")||m.includes("how does this work")){const p=f[Math.floor(Math.random()*f.length)];return{content:`Great question about Privion! Here's how we can help with that:
1331
1332**${p.title}**
1333${p.description}
1334
1335Key benefits for your ${d.industry} operations:
1336${p.benefits.map(v=>`• ${v}`).join(`
1337`)}
1338
1339**Implementation:** ${p.implementation}
1340
1341Would you like to know more about our other capabilities or see how this integrates with your current systems?`,type:"privion-education"}}return m.includes("procedure")||m.includes("how do i")?{content:`Here's the step-by-step procedure for ${u.toLowerCase()}:
1342
13431. **Safety First**: Verify all safety protocols are in place
13442. **System Check**: Confirm system status and readings
13453. **Execute Procedure**: Follow the established SOP guidelines
13464. **Document**: Log all actions and observations
13475. **Verify**: Confirm successful completion
1348
1349This is exactly what Privion automates for you - turning these manual processes into intelligent, guided workflows. Would you like to see how our automation works?`,type:"procedure-guidance"}:m.includes("compliance")||m.includes("report")?{content:`For ${d.industry} compliance, here's what you need to know:
1350
1351**Required Standards:**
1352${d.complianceRequirements.map(p=>`• ${p}`).join(`
1353`)}
1354
1355**Privion's Automated Solution:**
1356• Generate reports automatically from your operational data
1357• Ensure 100% accuracy and completeness
1358• Maintain audit trails for all activities
1359• Real-time compliance monitoring and alerts
1360
1361This eliminates hours of manual work and reduces compliance risk. Want to see a sample automated report?`,type:"compliance-guidance"}:{content:`I understand you're asking about ${u.toLowerCase()}. Based on common ${d.industry} challenges, here's what I recommend:
1362
1363**Immediate Action:**
1364${d.challenges[0]} - This is where Privion's AI can provide real-time guidance and automation.
1365
1366**Why This Matters:**
1367In ${d.industry}, this type of issue typically requires manual intervention and documentation. With Privion, we automate the entire process while ensuring compliance.
1368
1369**Next Steps:**
1370Would you like to see how Privion handles this specific scenario, or do you have questions about our implementation process?`,type:"intelligent-response"}},[r,a]),o=b.useCallback(()=>{var f;const u=((f=e.intelligenceConfig)==null?void 0:f.conversationStarters)||[];return u.length>0?u:r().conversationStarters},[(c=e.intelligenceConfig)==null?void 0:c.conversationStarters,r]),l=b.useCallback(()=>[...r().commonQuestions,"How does Privion work?","What makes Privion different?","Can you show me the ROI calculator?","How quickly can we implement this?"],[r]);return{generateSmartResponse:i,getConversationStarters:o,getPrivionQuestions:l,getIndustryIntelligence:r,getRelevantCapabilities:a,conversationHistory:t,setConversationHistory:n}},vEe=({demoConfig:e,onAnalyticsUpdate:t})=>{if(!e||!e.agentData)return console.log("IntelligentDemoChat: demoConfig not ready",e),s.jsxs("div",{className:"h-[85vh] flex flex-col items-center justify-center border-2 border-gray-200 dark:border-gray-700 rounded-lg",children:[s.jsx(kr,{className:"h-8 w-8 animate-spin text-blue-500 mb-4"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Loading intelligent demo..."})]});console.log("IntelligentDemoChat: Rendering with demoConfig",e);const[n,r]=b.useState([]),[a,i]=b.useState(""),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(!0),[m,p]=b.useState(!1),v=b.useRef(null),y=b.useRef(null),x=b.useRef(null),w=b.useRef(Date.now()),{generateSmartResponse:N,getConversationStarters:S,getPrivionQuestions:_,getIndustryIntelligence:k}=yEe(e),C=S(),E=_(),O=k();console.log("IntelligentDemoChat: Intelligence data",O),console.log("IntelligentDemoChat: Conversation starters",C),b.useEffect(()=>{console.log("IntelligentDemoChat: Setting up welcome message");const I={id:"welcome",content:`Hi! I'm ${e.agentData.name}, your AI assistant for ${e.agentData.purpose.toLowerCase()}. 
1371
1372I'm powered by **Privion's intelligent platform** and I know all your ${O.industry.toLowerCase()} procedures, compliance requirements, and can help with real-time operational guidance.
1373
1374**What I can help with:**
1375• Step-by-step procedures and troubleshooting
1376• Compliance reporting and regulatory guidance  
1377• Emergency response protocols
1378• Explaining how Privion works and its capabilities
1379
1380What would you like to know?`,isUser:!1,timestamp:new Date,type:"intelligent-response"};r([I]),console.log("IntelligentDemoChat: Welcome message set")},[e,O]),b.useEffect(()=>{const I=y.current;if(!I)return;const F=()=>{const{scrollTop:U,scrollHeight:H,clientHeight:q}=I,L=H-U-q<150;f(L),p(!L&&n.length>2)};return I.addEventListener("scroll",F,{passive:!0}),()=>I.removeEventListener("scroll",F)},[n.length]);const P=b.useCallback((I=!1,F=0)=>{v.current&&setTimeout(()=>{var U;(I||d)&&((U=v.current)==null||U.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))},F)},[d]);b.useEffect(()=>{n.length>1&&P(!1,200)},[n,P]),b.useEffect(()=>{const I=Date.now()-w.current;t==null||t({conversationDepth:n.length,engagementTime:Math.floor(I/1e3)})},[n,t]);const R=b.useCallback(async(I,F=!1)=>{const U=I||a.trim();if(!U)return;console.log("IntelligentDemoChat: Sending message",U);const H={id:Date.now().toString(),content:U,isUser:!0,timestamp:new Date};r(q=>[...q,H]),i(""),l(!0),F&&x.current&&setTimeout(()=>{var q;return(q=x.current)==null?void 0:q.focus()},100),P(!0,300),setTimeout(()=>{console.log("IntelligentDemoChat: Generating response for",U);const q=N(U);console.log("IntelligentDemoChat: Generated response",q);const B={id:(Date.now()+1).toString(),content:q.content,isUser:!1,timestamp:new Date,type:q.type};r(L=>[...L,B]),l(!1)},1500)},[a,P,N]),T=b.useCallback(I=>
1380{I.key==="Enter"&&!I.shiftKey&&(I.preventDefault(),R())},[R]),D=b.useCallback(I=>{i(I.target.value)},[]),z=I=>{switch(I){case"privion-education":return s.jsxs(le,{variant:"secondary",className:"mb-3 bg-purple-100 text-purple-700",children:[s.jsx(Sn,{className:"h-3 w-3 mr-1"}),"Privion Platform"]});case"compliance-guidance":return s.jsx(le,{variant:"secondary",className:"mb-3 bg-green-100 text-green-700",children:"✅ Compliance"});case"procedure-guidance":return s.jsx(le,{variant:"secondary",className:"mb-3 bg-blue-100 text-blue-700",children:"📋 Procedure"});default:return null}};return s.jsxs("div",{className:"h-[85vh] flex flex-col border-2 border-gray-200 dark:border-gray-700 rounded-lg relative",children:[s.jsxs("div",{className:"flex items-center gap-3 p-4 border-b-2 border-gray-200 dark:border-gray-700 bg-gradient-to-r from-white to-gray-50 dark:from-gray-800 dark:to-gray-900 flex-shrink-0",children:[e.branding.logoUrl?s.jsx("img",{src:e.branding.logoUrl,alt:"Company logo",className:"h-10 w-10 object-cover rounded-full"}):s.jsx("div",{className:"h-10 w-10 rounded-full flex items-center justify-center text-white font-bold text-sm",style:{backgroundColor:e.branding.primaryColor},children:e.branding.companyName.charAt(0)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"font-semibold text-base truncate",children:e.agentData.name}),s.jsxs("p",{className:"text-xs text-gray-600 dark:text-gray-400 flex items-center gap-1",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-500 rounded-full animate-pulse"}),"Powered by Privion • ",O.industry," Expert"]})]}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>u(!c),className:"border-purple-300 text-purple-700 hover:bg-purple-50 text-xs px-3 py-2 flex-shrink-0",children:[s.jsx(Ko,{className:"h-3 w-3 mr-1"}),"About Privion"]})]}),s.jsxs("div",{ref:y,className:"flex-1 overflow-y-auto p-6 space-y-8 scroll-smooth min-h-0",style:{scrollBehavior:"smooth",WebkitOverflowScrolling:"touch"},children:[n.map((I,F)=>s.jsx("div",{className:`flex ${I.isUser?"justify-end":"justify-start"} opacity-0 animate-fade-in`,style:{animationDelay:`${Math.min(F*100,500)}ms`,animationFillMode:"forwards"},children:s.jsxs("div",{className:`max-w-[88%] ${I.isUser?"text-white rounded-br-sm p-5 rounded-2xl shadow-sm":"bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded-bl-sm p-5 rounded-2xl border border-gray-200 dark:border-gray-700 shadow-sm"}`,style:I.isUser?{backgroundColor:e.branding.primaryColor}:{},children:[!I.isUser&&z(I.type),s.jsx("div",{className:"whitespace-pre-line leading-relaxed text-sm",children:I.content})]})},I.id)),o&&s.jsx("div",{className:"flex justify-start opacity-0 animate-fade-in",style:{animationFillMode:"forwards"},children:s.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-5 rounded-2xl rounded-bl-sm border border-gray-200 dark:border-gray-700 shadow-sm",children:s.jsxs("div",{className:"flex space-x-2",children:[s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})}),s.jsx("div",{ref:v})]}),m&&s.jsx(Y,{onClick:()=>P(!0),className:"absolute right-6 bottom-44 rounded-full w-12 h-12 p-0 shadow-lg z-20 opacity-0 animate-fade-in hover:scale-105 transition-all duration-200",style:{backgroundColor:e.branding.primaryColor,animationFillMode:"forwards"},children:s.jsx(sX,{className:"h-5 w-5 text-white"})}),n.length<=2&&!c&&s.jsxs("div",{className:"px-6 pb-4 border-t-2 border-gray-200 dark:border-gray-700 pt-4 bg-gray-50/50 dark:bg-gray-900/50 flex-shrink-0",children:[s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4 flex items-center gap-2",children:[s.jsx(ws,{className:"h-4 w-4"}),"Try asking about real ",O.industry.toLowerCase()," scenarios:"]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:C.slice(0,4).map((I,F)=>s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>R(I,!0),className:"text-sm hover:bg-gray-100 dark:hover:bg-gray-800 border-gray-200 dark:border-gray-700 h-auto py-3 px-4 text-left justify-start whitespace-normal transition-all duration-200 hover:scale-[1.02] hover:shadow-sm",children:I},F))})]}),c&&s.jsxs("div",{className:"px-6 pb-4 border-t-2 border-gray-200 dark:border-gray-700 pt-4 bg-purple-50 dark:bg-purple-950/20 flex-shrink-0",children:[s.jsxs("p",{className:"text-sm text-purple-600 dar
1380k:text-purple-400 mb-4 flex items-center gap-2",children:[s.jsx(Sn,{className:"h-4 w-4"}),"Learn about Privion's capabilities:"]}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:E.slice(0,4).map((I,F)=>s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>{R(I,!0),u(!1)},className:"text-sm border-purple-300 text-purple-700 hover:bg-purple-100 dark:border-purple-700 dark:text-purple-300 h-auto py-3 px-4 text-left justify-start whitespace-normal transition-all duration-200 hover:scale-[1.02] hover:shadow-sm",children:I},F))})]}),s.jsx("div",{className:"border-t-2 border-gray-200 dark:border-gray-700 p-4 bg-white dark:bg-gray-800 flex-shrink-0",children:s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx(_e,{ref:x,type:"text",placeholder:`Ask ${e.agentData.name} about ${O.industry.toLowerCase()} operations or Privion capabilities...`,value:a,onChange:D,onKeyDown:T,className:"flex-1 h-11 text-base border-2 border-gray-200 dark:border-gray-600 rounded-lg px-4 focus:border-blue-500 dark:focus:border-blue-400 focus:ring-2 focus:ring-blue-500/20 transition-all duration-200 bg-white dark:bg-gray-900",disabled:o,autoComplete:"off"}),s.jsx(Y,{onClick:()=>R(),style:{backgroundColor:e.branding.primaryColor},className:"text-white px-5 h-11 rounded-lg transition-all duration-200 hover:scale-105 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:scale-100",disabled:!a.trim()||o,children:s.jsx(Hm,{className:"h-4 w-4"})})]})})]})},bEe=()=>{const e=b.useCallback(n=>{var l;const r=`demo-${Date.now()}`,a=n.name.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,""),i={id:r,companySlug:a,industry:n.industry,function:"customer-service",agentData:{name:n.name,purpose:n.purpose,industry:n.industry,primaryColor:n.primaryColor,logoUrl:n.logoUrl,conversationStarters:n.conversationStarters||[]},branding:{primaryColor:n.primaryColor,secondaryColor:"#8B5CF6",logoUrl:n.logoUrl||"",companyName:((l=n.name.split("-")[0])==null?void 0:l.trim())||n.name.split(" ")[0]||"Your Company"},intelligenceConfig:{industryKnowledge:[],conversationStarters:n.conversationStarters||[],capabilityFocus:[],complianceBadges:[]},analytics:{views:0,engagementTime:0,conversationDepth:0,leadScore:0,lastAccessed:new Date}},o=`${window.location.origin}/demo/${a}/${r}`;return{demoConfig:i,demoUrl:o}},[]),t=b.useCallback((n,r)=>{console.log(`Updating demo ${n} analytics:`,r)},[]);return{createDemo:e,updateDemoAnalytics:t}},wEe=({agentData:e,onAdvancedBuilder:t})=>{const[n,r]=b.useState("demo"),[a,i]=b.useState(""),[o,l]=b.useState(!1),[c,u]=b.useState(null),[d,f]=b.useState(""),{toast:m}=_t(),{isAuthenticated:p}=nr(),{createDemo:v,updateDemoAnalytics:y}=bEe();X.useEffect(()=>{if(e){console.log("EnhancedInteractiveDemoExperience: Creating demo with agentData",e);const{demoConfig:S,demoUrl:_}=v({...e,conversationStarters:e.conversationStarters||[]});console.log("EnhancedInteractiveDemoExperience: Created demoConfig",S),u(S),f(_)}},[e,v]);const x=()=>{d&&(navigator.clipboard.writeText(d),m({title:"Demo Link Copied!",description:"Share this link with your team to show them what's possible"}))},w=S=>{c&&y(c.id,S)};if(!c)return console.log("EnhancedInteractiveDemoExperience: Waiting for demoConfig..."),s.jsx("div",{className:"flex items-center justify-center p-8",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto mb-4"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Setting up your intelligent demo..."})]})});console.log("EnhancedInteractiveDemoExperience: Rendering with demoConfig",c);const N={conversations:247,satisfaction:4.8,responseTime:"0.8s",resolution:"94%"};return s.jsxs("div",{className:"space-y-6 pb-8",children:[s.jsx(te,{className:"glass-effect-dark border-cyber-blue/40",children:s.jsxs(xe,{className:"text-center",children:[s.jsx("div",{className:"flex items-center justify-center gap-4 mb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[e.logoUrl?s.jsx("img",{src:e.logoUrl,alt:"Agent logo",className:"h-12 w-12 object-cover rounded"}):s.jsx("div",{className:"h-12 w-12 rounded flex items-center justify-center text-white font-bold",style:{backgroundColor:e.primaryColor},children:e.name.charAt(0)}),s.jsxs("div",{className:"text-left",children:[s.jsxs(we,{className:"text-2xl flex items-center gap-2 text-white",children:[e.name,s.jsx(wr,{variant:"compact",size:"small"})]}),s.jsxs("p",{className:"text-cyan-300 font-medium flex items-center gap-2",children:["✅ Smart Demo Ready",s.jsx(Sn,{className:"h-4 w-4"}),"Powered by Privion"]})]})]})}),s.jsxs("div",{className:"flex justify-center gap-4 mt-6",children:[s.jsxs(le,{variant:"secondary",className:"bg-neon-cyan/20 text-neon-cyan border-neon-cyan/30",children:[s.jsx(it,{className:"h-3 w-3 mr-1"}),"Industry Compliant"]}),s.jsxs(le,{variant:"secondary",className:"bg-electric-blue/20 text-electric-blue border-electric-blue/30",children:[s.jsx(Sn,{className:"h-3 w-3 mr-1"}),"AI-Powered Intelligence"]}),s.jsxs(le,{variant:"secondary",className:"bg-cyber-blue/20 text-cyber-blue border-cyber-blue/30",children:[s.jsx(Ji,{className:"h-3 w-3 mr-1"}),"Shareable Link Ready"]})]}),s.jsxs("div",{className:"mt-4 p-3 bg-cyber-blue/10 rounded-lg border border-cyber-blue/30",children:[s.jsx("p",{className:"text-sm font-medium text-white mb-2",children:"Your Personalized Demo URL:"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("code",{className:"flex-1 text-xs bg-black/30 text-cyan-300 p-2 rounded border border-white/20 font-mono",children:d}),s.jsxs(Y,{size:"sm",onClick:x,variant:"outline",children:[s.jsx(Ji,{className:"h-3 w-3 mr-1"}),"Copy"]}),s.jsxs(Y,{size:"sm",onClick:()=>window.open(d,"_blank"),variant:"outline",children:[s.jsx(Zs,{className:"h-3 w-3 mr-1"}),"Open"]})]})]})]})}),s.jsx("div",{className:"w-full",children:s.jsxs(os,{value:n,onValueChange:r,className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-3 mb-6",children:[s.jsxs(at,{value:"demo",className:"flex items-center gap-2 text-xs sm:text-sm",children:[s.jsx(di,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Smart Demo"}),s.jsx("span",{className:"sm:hidden",children:"Demo"})]}),s.jsxs(at,{value:"analytics",className:"flex items-center gap-2 text-xs sm:text-sm",children:[s.jsx(el,{className:"h-4 w-4"}),s.jsx("span",{className:"hidden sm:inline",children:"Analytics"}),s.jsx("span",{className:"sm:hidden",children:"Stats"})]}),s.jsxs(at,{value:"share",className:"flex items-center gap-2 text-xs sm:text-sm",children:[s.jsx(Ji,{className:"h-4 w-4"}),"Share"]})]}),s.jsxs("div",{className:"space-y-6 max-h-[85vh] overflow-hidden",children:[s.jsx(Ze,{value:"demo",className:"mt-0 h-full",children:s.jsx("div",{className:"max-h-[82vh]",children:s.jsx(vEe,{demoConfig:c,onAnalyticsUpdate:w})})}),s.jsx(Ze,{value:"analytics",className:"mt-0",children:s.jsx(js,{className:"max-h-[82vh]",children:s.jsxs(te,{className:"glass-effect-dark border-cyber-blue/30",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(el,{className:"h-5 w-5 text-blue-500"}),"Mock Analytics Dashboard",s.jsx(wr,{variant:"compact",size:"small"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Here's what your analytics would look like in production"})]}),s.jsxs(se,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsxs("div",{className:"text-center bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600 dar
1380k:text-blue-400",children:N.conversations}),s.jsx("p",{className:"text-sm text-blue-600 dark:text-blue-400",children:"Conversations"})]}),s.jsxs("div",{className:"text-center bg-green-50 dark:bg-green-900/20 rounded-lg",children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:[N.satisfaction,"/5"]}),s.jsx("p",{className:"text-sm text-green-600 dark:text-green-400",children:"Satisfaction"})]}),s.jsxs("div",{className:"text-center bg-purple-50 dark:bg-purple-900/20 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-purple-600 dark:text-purple-400",children:N.responseTime}),s.jsx("p",{className:"text-sm text-purple-600 dark:text-purple-400",children:"Response Time"})]}),s.jsxs("div",{className:"text-center bg-orange-50 dark:bg-orange-900/20 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-orange-600 dark:text-orange-400",children:N.resolution}),s.jsx("p",{className:"text-sm text-orange-600 dark:text-orange-400",children:"Resolution Rate"})]})]}),s.jsx("div",{className:"mt-6 bg-gray-50 dark:bg-gray-800/50 rounded-lg",children:s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 text-center",children:"📊 This is simulated data. Real analytics include conversation flows, user satisfaction surveys, and detailed performance metrics."})})]})]})})}),s.jsx(Ze,{value:"share",className:"mt-0",children:s.jsx(js,{className:"max-h-[82vh]",children:s.jsxs(te,{className:"glass-effect-dark border-cyber-blue/30",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Ji,{className:"h-5 w-5 text-blue-500"}),"Enhanced Demo Sharing",s.jsx(wr,{variant:"compact",size:"small"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Share this intelligent demo with your team and stakeholders"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 rounded-lg border border-green-200 dark:border-green-800",children:[s.jsx("h4",{className:"font-medium text-green-800 dark:text-green-300 mb-2",children:"🚀 Smart Demo Features:"}),s.jsxs("ul",{className:"text-sm text-green-700 dark:text-green-400 space-y-1",children:[s.jsx("li",{children:"• Industry-specific intelligent responses"}),s.jsx("li",{children:"• Built-in Privion capability education"}),s.jsx("li",{children:"• Branded experience with your company colors"}),s.jsx("li",{children:"• Real-time engagement analytics"}),s.jsx("li",{children:"• Lead qualification through conversation analysis"})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{onClick:x,className:"flex-1",children:[s.jsx(Ji,{className:"h-4 w-4 mr-2"}),"Copy Demo Link"]}),s.jsxs(Y,{variant:"outline",className:"flex-1",children:[s.jsx(fje,{className:"h-4 w-4 mr-2"}),"Generate QR Code"]})]})]})]})})})]})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mt-12 pt-8 border-t border-gray-200 dark:border-gray-700",children:s.jsx(te,{className:"glass-effect-dark border-cyber-blue/40",children:s.jsxs(se,{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Qg,{className:"h-6 w-6 text-green-500"}),s.jsx("h3",{className:"font-semibold text-lg",children:p?"Deploy Your Agent":"Schedule Demo"}),s.jsx(wr,{variant:"compact",size:"small"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:p?"Your agent is ready to deploy to production environments.":"Book a 15-minute call to see the full platform and discuss your specific needs."}),s.jsxs(Y,{variant:"outline",className:"w-full flex items-center justify-center gap-2",style:p?{backgroundColor:e.primaryColor,color:"white"}:{},children:[p?"Deploy Agent":"Schedule Meeting",s.jsx(Bt,{className:"h-4 w-4"})]})]})})}),s.jsx(te,{className:"glass-effect-dark border-electric-blue/40",children:s.jsx(se,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(wr,{variant:"compact",size:"small"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:"Need more customization?"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Switch to advanced builder for full configuration options"})]})]}),s.jsx(Y,{variant:"outline",onClick:t,className:"border-purple-300 text-purple-700 hover:bg-purple-50 dark:border-purple-700 dark:text-purple-300 dark:hover:bg-purple-900/20",children:"Advanced Builder"})]})})})]})},jEe=()=>{const e=qt(),{toast:t}=_t(),{isAuthenticated:n,user:r}=nr(),[a,i]=b.useState(null);b.useEffect(()=>{n&&e("/agent-builder/new")},[n,e]);const o=()=>{t({title:"Ready to Build for Real?",description:"Sign up to access the full agent builder with production features",variant:"default",duration:5e3})},l=c=>{i(c),t({description:"🎉 Your intelligent demo is ready! Test the smart capabilities and share with your team.",duration:3e3})};return n?null:s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-blue-400 rounded-full animate-pulse opacity-60"}),s.jsx("div",{className:"absolute top-3/4 right-1/3 w-1 h-1 bg-blue-400 rounded-full animate-ping opacity-40"}),s.jsx("div",{className:"absolute bottom-1/4 left-2/3 w-3 h-3 bg-blue-500 rounded-full animate-bounce opacity-30",style:{animationDelay:"1s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"relative z-10 pt-16 sm:pt-20 pb-8",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs(Y,{variant:"outline",onClick:()=>e("/"),className:"border-white/30 text-white hover:bg-white/20 bg-white/10 backdrop-blur-sm",children:[s.jsx(ai,{className:"h-4 w-4 mr-2"}),"Back to Home"]}),s.jsx("div",{className:"bg-white/10 backdrop-blur-sm px-4 py-2 rounded-full border border-blue-400/30",children:s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Sn,{className:"h-4 w-4 text-blue-400"}),s.jsx("span",{className:"font-inter font-medium text-blue-400",children:"DEMO MODE"}),s.jsx("span",{className:"text-white/80 font-inter",children:"• No signup required"})]})})]}),s.jsx("div",{className:"mb-8 sm:mb-12",children:a?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsxs("h2",{className:"text-2xl font-bold text-white mb-2 flex items-center justify-center gap-2",children:["🎉 Your Demo is Ready!",s.jsx(Sn,{className:"h-6 w-6 text-blue-400"})]}),s.jsx("p",{className:"text-blue-200",children:"Test it below and share with your team"})]}),s.jsx(wEe,{agentData:a,onAdvancedBuilder:o})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[s.jsx(wr,{variant:"default",size:"large"}),s.jsx("div",{children:s.jsxs("h1",{className:"font-bebas text-4xl sm:text-5xl lg:text-6xl text-white mb-4 tracking-wide",children:["BUILD YOUR",s.jsx("span",{className:"bg-gradient-to-r from-blue-500 to-blue-600 bg-clip-text text-transparent",children:"DEMO"})]})})]}),s.jsxs("div",{className:"flex items-center justify-center gap-6 text-sm text-blue-300",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Sn,{className:"h-4 w-4 text-blue-400"}),s.jsx("span",{children:"Smart AI"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ws,{className:"h-4 w-4 text-blue-400"}),s.jsx("span",{children:"Easy setup"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Bn,{className:"h-4 w-4 text-blue-400"}),s.jsx("span",{children:"Share instantly"})]})]})]}),s.jsx(eEe,{onDemoCreated:l})]})})]})}),s.jsx(Cn,{})]})};var F1="Switch",[NEe]=Mr(F1),[SEe,kEe]=NEe(F1),Pee=b.forwardRef((e,t)=>
1380{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c="on",onCheckedChange:u,form:d,...f}=e,[m,p]=b.useState(null),v=gt(t,S=>p(S)),y=b.useRef(!1),x=m?d||!!m.closest("form"):!0,[w,N]=$s({prop:a,defaultProp:i??!1,onChange:u,caller:F1});return s.jsxs(SEe,{scope:n,checked:w,disabled:l,children:[s.jsx(Ve.button,{type:"button",role:"switch","aria-checked":w,"aria-required":o,"data-state":Mee(w),"data-disabled":l?"":void 0,disabled:l,value:c,...f,ref:v,onClick:Oe(e.onClick,S=>{N(_=>!_),x&&(y.current=S.isPropagationStopped(),y.current||S.stopPropagation())})}),x&&s.jsx(Oee,{control:m,bubbles:!y.current,name:r,value:c,checked:w,required:o,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});Pee.displayName=F1;var Tee="SwitchThumb",Iee=b.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,a=kEe(Tee,n);return s.jsx(Ve.span,{"data-state":Mee(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Iee.displayName=Tee;var CEe="SwitchBubbleInput",Oee=b.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...a},i)=>{const o=b.useRef(null),l=gt(o,i),c=v1(n),u=Qj(t);return b.useEffect(()=>{const d=o.current;if(!d)return;const f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(c!==n&&p){const v=new Event("click",{bubbles:r});p.call(d,n),d.dispatchEvent(v)}},[c,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:l,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Oee.displayName=CEe;function Mee(e){return e?"checked":"unchecked"}var Ree=Pee,_Ee=Iee;const Dt=b.forwardRef(({className:e,...t},n)=>s.jsx(Ree,{className:He("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-gray-300 dark:border-gray-500 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-gray-200 dark:data-[state=unchecked]:bg-gray-700 shadow-sm",e),...t,ref:n,children:s.jsx(_Ee,{className:He("pointer-events-none block h-5 w-5 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Dt.displayName=Ree.displayName;var oR="Progress",lR=100,[AEe]=Mr(oR),[EEe,PEe]=AEe(oR),Dee=b.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=TEe,...o}=e;(a||a===0)&&!d8(a)&&console.error(IEe(`${a}`,"Progress"));const l=d8(a)?a:lR;r!==null&&!f8(r,l)&&console.error(OEe(`${r}`,"Progress"));const c=f8(r,l)?r:null,u=Sw(c)?i(c,l):void 0;return s.jsx(EEe,{scope:n,value:c,max:l,children:s.jsx(Ve.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":Sw(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Fee(c,l),"data-value":c??void 0,"data-max":l,...o,ref:t})})});Dee.displayName=oR;var Lee="ProgressIndicator",$ee=b.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=PEe(Lee,n);return s.jsx(Ve.div,{"data-state":Fee(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});$ee.displayName=Lee;function TEe(e,t){return`${Math.round(e/t*100)}%`}function Fee(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Sw(e){return typeof e=="number"}function d8(e){return Sw(e)&&!isNaN(e)&&e>0}function f8(e,t){return Sw(e)&&!isNaN(e)&&e<=t&&e>=0}function IEe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${lR}\`.`}function OEe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1381  - a positive number
1382  - less than the value passed to \`max\` (or ${lR} if no \`max\` prop is set)
1383  - \`null\` or \`undefined\` if the progress is indeterminate.
1384
1385Defaulting to \`null\`.`}var zee=Dee,MEe=$ee;const qr=b.forwardRef(({className:e,value:t,...n},r)=>s.jsx(zee,{ref:r,className:He("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:s.jsx(MEe,{className:"h-full w-full flex-1 bg-gradient-to-r from-blue-600 to-purple-600 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));qr.displayName=zee.displayName;const REe=({getTabProgress:e})=>s.jsxs("div",{className:"relative text-center",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-blue-600/10 via-purple-600/10 to-cyan-600/10 rounded-2xl sm:rounded-3xl blur-3xl"}),s.jsxs("div",{className:"relative glass-effect glass-effect-dark rounded-2xl sm:rounded-3xl p-6 sm:p-8 lg:p-12 border border-white/20 dark:border-gray-700/30",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("h1",{className:"font-bebas text-4xl sm:text-5xl md:text-6xl lg:text-7xl xl:text-8xl font-normal mb-6 text-white leading-tight tracking-widest",children:["AI AGENT",s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent animate-[cyberGradientShift_6s_ease-in-out_infinite]",children:"BUILDER."})]}),s.jsx("p",{className:"font-inter text-lg sm:text-xl text-gray-300 mb-8 max-w-2xl mx-auto font-light leading-relaxed",children:"Deploy enterprise AI instantly. Military-grade security included."}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-4 mb-8",children:[s.jsx("div",{className:"glass-effect px-4 py-2 rounded-full border border-cyber-blue/30 backdrop-blur-sm",children:s.jsx("span",{className:"text-cyber-blue font-inter font-medium",children:"Easy Deployment"})}),s.jsx("div",{className:"glass-effect px-4 py-2 rounded-full border border-neon-blue/30 backdrop-blur-sm",children:s.jsx("span",{className:"text-neon-blue font-inter font-medium",children:"Instant Setup"})}),s.jsx("div",{className:"glass-effect px-4 py-2 rounded-full border border-electric-blue/30 backdrop-blur-sm",children:s.jsx("span",{className:"text-electric-blue font-inter font-medium",children:"No Code Required"})})]})]}),s.jsxs("div",{className:"max-w-xs sm:max-w-md mx-auto",children:[s.jsxs("div",{className:"flex justify-between text-sm text-gray-300 mb-2",children:[s.jsx("span",{className:"font-inter",children:"Configuration Progress"}),s.jsxs("span",{className:"font-inter font-medium text-cyber-blue",children:[Math.round(e()),"%"]})]}),s.jsx(qr,{value:e(),className:"h-2 ai-glow bg-gray-800/50"})]})]})]}),DEe=({activeTab:e,onTabChange:t,progress:n,completedTabs:r})=>{const[a,i]=b.useState(!1),o=[{id:"basics",label:"Basics",icon:Kt,category:"setup"},{id:"branding",label:"Branding",icon:QO,category:"setup"},{id:"knowledge",label:"Knowledge",icon:Dh,category:"config"},{id:"apis",label:"APIs",icon:Ot,category:"config"},{id:"memory",label:"Memory",icon:Sn,category:"advanced"},{id:"permissions",label:"Permissions",icon:it,category:"advanced"},{id:"test-chat",label:"Test Chat",icon:di,category:"deploy"},{id:"review",label:"Review",icon:Sc,category:"deploy"}],l={setup:{label:"Setup",color:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300"},config:{label:"Configuration",color:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300"},advanced:{label:"Advanced",color:"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-300"},deploy:{label:"Deploy",color:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300"}},c=o.reduce((u,d)=>(u[d.category]||(u[d.category]=[]),u[d.category].push(d),u),{});return s.jsx(te,{className:"md:hidden mb-6 glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:s.jsx(se,{className:"p-4",children:s.jsxs(vw,{open:a,onOpenChange:i,children:[s.jsx(bw,{asChild:!0,children:s.jsxs("div",{className:"flex items-center justify-between cursor-pointer",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("h3",{className:"font-semibold text-gray-800 dark:text-white",children:"Agent Builder"}
1385),s.jsxs(le,{variant:"secondary",className:"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300",children:[Math.round(n),"% Complete"]})]}),s.jsx(Gt.div,{animate:{rotate:a?180:0},transition:{duration:.2},children:s.jsx(po,{className:"h-5 w-5 text-gray-500"})})]})}),s.jsx(ww,{className:"mt-4",children:s.jsx("div",{className:"space-y-4",children:Object.entries(c).map(([u,d])=>s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(le,{variant:"outline",className:`text-xs ${l[u].color}`,children:l[u].label}),s.jsx("div",{className:"flex-1 h-px bg-gray-200 dark:bg-gray-700"})]}),s.jsx("div",{className:"grid grid-cols-2 gap-2",children:d.map(f=>{const m=f.icon,p=e===f.id,v=r.includes(f.id);return s.jsx(Gt.div,{whileTap:{scale:.95},whileHover:{scale:1.02},children:s.jsxs(Y,{variant:p?"default":"ghost",size:"sm",onClick:()=>t(f.id),className:`w-full justify-start h-12 p-3 relative ${p?"bg-gradient-to-r from-blue-500 to-purple-500 text-white hover:from-blue-600 hover:to-purple-600":"hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsx(m,{className:"h-4 w-4 flex-shrink-0"}),s.jsx("span",{className:"text-sm font-medium truncate",children:f.label}),v&&!p&&s.jsx(Gt.div,{initial:{scale:0},animate:{scale:1},className:"w-2 h-2 bg-green-400 rounded-full ml-auto flex-shrink-0"})]}),p&&s.jsx(Gt.div,{layoutId:"activeIndicator",className:"absolute inset-0 rounded border-2 border-white/30",transition:{type:"spring",stiffness:300,damping:30}})]})},f.id)})})]},u))})})]})})})},LEe=e=>s.jsx(DEe,{...e}),h8={"water-treatment":{industry:"Water Treatment",compliance:["EPA","SDWA","CWA","OSHA","State Health Dept"],authorized:[{id:"wt-auth-1",text:"Answer questions about daily water quality parameters and routine operations",category:"authorized",severity:"important",compliance:["EPA","SDWA"],editable:!0},{id:"wt-auth-2",text:"Provide information about equipment maintenance schedules and procedures",category:"authorized",severity:"important",compliance:["OSHA"],editable:!0},{id:"wt-auth-3",text:"Help with standard operating procedures and safety protocols",category:"authorized",severity:"important",editable:!0},{id:"wt-auth-4",text:"Assist with regulatory compliance documentation and reporting",category:"authorized",severity:"important",compliance:["EPA","State Health Dept"],editable:!0}],restricted:[{id:"wt-rest-1",text:"Override emergency shutdown procedures or safety protocols",category:"restricted",severity:"critical",compliance:["OSHA"],editable:!1},{id:"wt-rest-2",text:"Make decisions about water quality violations or public health notices",category:"restricted",severity:"critical",compliance:["EPA","SDWA","State Health Dept"],editable:!1},{id:"wt-rest-3",text:"Authorize chemical dosing changes without proper operator approval",category:"restricted",severity:"critical",compliance:["EPA","OSHA"],editable:!1},{id:"wt-rest-4",text:"Provide emergency response instructions without certified operator oversight",category:"restricted",severity:"critical",compliance:["OSHA"],editable:!0}],uncertainty:[{id:"wt-unc-1",text:"Direct operators to contact certified water treatment professional",category:"uncertainty",severity:"critical",editable:!0},{id:"wt-unc-2",text:"Escalate safety concerns to plant management immediately",category:"uncertainty",severity:"critical",compliance:["OSHA"],editable:!0},{id:"wt-unc-3",text:"Refer regulatory questions to compliance officer or state authorities",category:"uncertainty",severity:"important",compliance:["EPA","State Health Dept"],editable:!0}]},healthcare:{industry:"Healthcare",compliance:["HIPAA","HITECH","FDA"],authorized:[{id:"hc-auth-1",text:"Provide general health information and wellness tips",category:"authorized",severity:"important",compliance:["HIPAA"],editable:!0},{id:"hc-auth-2",text:"Schedule appointments and check availability",category:"authorized",severity:"important",editable:!0},{id:"hc-auth-3",text:"Answer questions about facility services and locations",category:"authorized",severity:"important",editable:!0}],restricted:[{id:"hc-rest-1",text:"Provide medical diagnosis or treatment recommendations",category:"restricted",severity:"critical",compliance:["HIPAA","FDA"],editable:!0},{id:"hc-rest-2",text:"Access or share Protected Health Information (PHI)",category:"restricted",severity:"critical",compliance:["HIPAA"],editable:!1},{id:"hc-rest-3",text:"Prescribe medications or dosage recommendations",category:"restricted",severity:"critical",compliance:["FDA"],editable:!0}],uncertainty:[{id:"hc-unc-1",text:"Direct patients to consult with their healthcare provider",category:"uncertainty",severity:"critical",compliance:["HIPAA"],editable:!0}]},legal:{industry:"Legal Services",compliance:["State Bar Rules","ABA Model Rules","GDPR"],authorized:[{id:"legal-auth-1",text:"Provide general legal information and resources",category:"authorized",severity:"important",editable:!0},{id:"legal-auth-2",text:"Help with document templates and forms",category:"authorized",severity:"important",editable:!0},{id:"legal-auth-3",text:"Schedule consultations and case status updates",category:"authorized",severity:"important",editable:!0}],restricted:[{id:"legal-rest-1",text:"Provide specific legal advice or representation",category:"restricted",severity:"critical",compliance:["State Bar Rules"],editable:!1},{id:"legal-rest-2",text:"Create attorney-client privilege relationships",category:"restricted",severity:"critical",compliance:["ABA Model Rules"],editable:!1},{id:"legal-rest-3",text:"Share confidential client information",category:"restricted",severity:"critical",compliance:["ABA Model Rules","GDPR"],editable:!1}],uncertainty:[{id:"legal-unc-1",text:"Recommend consulting with a qualified attorney",category:"uncertainty",severity:"critical",editable:!0}]},education:{industry:"Higher Education",compliance:["FERPA","ADA","Title IX"],authorized:[{id:"edu-auth-1",text:"Answer questions about courses and programs",category:"authorized",severity:"important",editable:!0},{id:"edu-auth-2",text:"Provide campus information and resources",category:"authorized",severity:"important",editable:!0},{id:"edu-auth-3",text:"Help with academic planning and course selection",category:"authorized",severity:"important",editable:!0}],restricted:[{id:"edu-rest-1",text:"Access or share student educational records",category:"restricted",severity:"critical",compliance:["FERPA"],editable:!1},{id:"edu-rest-2",text:"Provide personal counseling or mental health services",category:"restricted",severity:"critical",editable:!0},{id:"edu-rest-3",text:"Make admissions or financial aid decisions",category:"restricted",severity:"critical",editable:!0}],uncertainty:[{id:"edu-unc-1",text:"Direct students to appropriate department or advisor",category:"uncertainty",severity:"important",editable:!0}]},financial:{industry:"Financial Services",compliance:["SOX","PCI-DSS","GDPR","CCPA"],authorized:[{id:"fin-auth-1",text:"Provide general financial education and resources",category:"authorized",severity:"important",editable:!0},{id:"fin-auth-2",text:"Help with account information and transactions",category:"authorized",severity:"important",compliance:["PCI-DSS"],editable:!0}],restricted:[{id:"fin-rest-1",text:"Provide investment advice or recommendations",category:"restricted",severity:"critical",compliance:["SOX"],editable:!1},{id:"fin-rest-2",text:"Process financial transactions without proper authentication",category:"restricted",severity:"critical",compliance:["PCI-DSS"],editable:!1}],uncertainty:[{id:"fin-unc-1",text:"Recommend consulting with a certified financial advisor",category:"uncertainty",severity:"critical",editable:!0}]},"customer-service":{industry:"Customer Service",compliance:["GDPR","CCPA"],authorized:[{id:"cs-auth-1",text:"Answer customer questions about products and services",category:"authorized",severity:"important",editable:!0},{id:"cs-auth-2",text:"Provide order status and tracking information",category:"authorized",severity:"important",editable:!0},{id:"cs-auth-3",text:"Help with basic troubleshooting and support",category:"authorized",severity:"important",editable:!0}],restricted:[{id:"cs-rest-1",text:"Process refunds or make financial commitments",category:"restricted",severity:"critical",editable:!0},{id:"cs-rest-2",text:"Share customer personal information with third parties",category:"restricted",severity:"critical",compliance:["GDPR","CCPA"],editable:!1}],uncertainty:[{id:"cs-unc-1",text:"Escalate complex issues to human supp
1385ort agents",category:"uncertainty",severity:"important",editable:!0}]}},$Ee=e=>h8[e]||h8["water-treatment"],FEe=({selectedIndustry:e,onIndustryChange:t})=>{var a;const n=qt(),r=[{id:"water-treatment",name:"Water Treatment",icon:s.jsx(WO,{className:"h-4 w-4"}),compliance:["EPA","SDWA","CWA","OSHA"],featured:!0,industryPage:"/"},{id:"healthcare",name:"Healthcare",icon:s.jsx(Jg,{className:"h-4 w-4"}),compliance:["HIPAA","HITECH","FDA"],industryPage:"/industries/healthcare"},{id:"higher-education",name:"Higher Education",icon:s.jsx($h,{className:"h-4 w-4"}),compliance:["FERPA","ADA","Title IX"],industryPage:"/industries/higher-education"},{id:"manufacturing",name:"Manufacturing",icon:s.jsx(uX,{className:"h-4 w-4"}),compliance:["ISO","OSHA","CMMS"],industryPage:"/industries/manufacturing"},{id:"government",name:"Government",icon:s.jsx(oX,{className:"h-4 w-4"}),compliance:["FedRAMP","SOC 2","NIST"],industryPage:"/industries/government"},{id:"legal",name:"Legal Services",icon:s.jsx(jX,{className:"h-4 w-4"}),compliance:["State Bar","ABA Model Rules"],industryPage:null},{id:"financial",name:"Financial Services",icon:s.jsx(Rs,{className:"h-4 w-4"}),compliance:["SOX","PCI-DSS"],industryPage:null},{id:"management-consulting",name:"Management Consulting",icon:s.jsx(iX,{className:"h-4 w-4"}),compliance:["SOC 2","ISO 27001"],industryPage:null},{id:"fintech",name:"Financial Technology",icon:s.jsx(Wwe,{className:"h-4 w-4"}),compliance:["SOX","PCI-DSS","GDPR"],industryPage:null},{id:"professional-services",name:"Professional Services",icon:s.jsx(Bn,{className:"h-4 w-4"}),compliance:["SOC 2","GDPR"],industryPage:null},{id:"accounting",name:"Accounting & Tax",icon:s.jsx(qwe,{className:"h-4 w-4"}),compliance:["PCAOB","SOX"],industryPage:null},{id:"real-estate",name:"Real Estate",icon:s.jsx(KO,{className:"h-4 w-4"}),compliance:["RESPA","Fair Housing"],industryPage:null},{id:"insurance",name:"Insurance Services",icon:s.jsx(it,{className:"h-4 w-4"}),compliance:["NAIC","SOX"],industryPage:null},{id:"human-resources",name:"Human Resources",icon:s.jsx(kje,{className:"h-4 w-4"}),compliance:["GDPR","EEOC"],industryPage:null},{id:"marketing",name:"Marketing & Advertising",icon:s.jsx(lje,{className:"h-4 w-4"}),compliance:["GDPR","CCPA"],industryPage:null},{id:"it-services",name:"IT & Technology Services",icon:s.jsx(yX,{className:"h-4 w-4"}),compliance:["SOC 2","ISO 27001"],industryPage:null},{id:"construction",name:"Construction & Engineering",icon:s.jsx(rje,{className:"h-4 w-4"}),compliance:["OSHA","ISO"],industryPage:null},{id:"retail",name:"Retail & E-commerce",icon:s.jsx(gje,{className:"h-4 w-4"}),compliance:["PCI-DSS","GDPR"],industryPage:null},{id:"hospitality",name:"Hospitality & Tourism",icon:s.jsx(oje,{className:"h-4 w-4"}),compliance:["PCI-DSS","GDPR"],industryPage:null},{id:"energy",name:"Energy & Utilities",icon:s.jsx(Ot,{className:"h-4 w-4"}),compliance:["NERC","EPA"],industryPage:null},{id:"transportation",name:"Transportation & Logistics",icon:s.jsx(Sje,{className:"h-4 w-4"}),compliance:["DOT","FMCSA"],industryPage:null},{id:"telecommunications",name:"Telecommunications",icon:s.jsx(Mc,{className:"h-4 w-4"}),compliance:["FCC","GDPR"],industryPage:null},{id:"consulting",name:"Consulting Services",icon:s.jsx(pX,{className:"h-4 w-4"}),compliance:["SOC 2","GDPR"],industryPage:null},{id:"media",name:"Media & Entertainment",icon:s.jsx(Vwe,{className:"h-4 w-4"}),compliance:["GDPR","CCPA"],industryPage:null},{id:"automotive",name:"Automotive",icon:s.jsx(lX,{className:"h-4 w-4"}),compliance:["ISO","OSHA"],industryPage:null},{id:"aerospace",name:"Aerospace & Defense",icon:s.jsx(bX,{className:"h-4 w-4"}),compliance:["ITAR","NIST"],industryPage:null},{id:"education",name:"Education & Training",icon:s.jsx(Dh,{className:"h-4 w-4"}),compliance:["FERPA","GDPR"],industryPage:null},{id:"medical-devices",name:"Medical Devices",icon:s.jsx(JO,{className:"h-4 w-4"}),compliance:["FDA","ISO 13485"],industryPage:null},{id:"customer-service",name:"Customer Service",icon:s.jsx(gX,{className:"h-4 w-4"}),compliance:["GDPR","CCPA"],industryPage:null}];return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Choose Industry Template"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:"Select your industry to load appropriate compliance guardrails and best practices."})]}),s.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ga
1385p-3",children:r.map(i=>s.jsxs(te,{className:`cursor-pointer transition-all duration-200 relative ${e===i.id?"ring-2 ring-blue-500 bg-blue-50 dark:bg-blue-950/30":"hover:bg-gray-50 dark:hover:bg-gray-800/50"} ${i.featured?"border-2 border-blue-200 dark:border-blue-800":""}`,onClick:()=>t(i.id),children:[i.featured&&s.jsx(le,{className:"absolute -top-2 -right-2 bg-blue-500 text-white text-xs",children:"Featured"}),s.jsx(se,{children:s.jsxs("div",{className:"flex flex-col items-center text-center gap-2",children:[s.jsx("div",{className:`rounded-lg ${e===i.id?"bg-blue-100 text-blue-600 dark:bg-blue-900/50 dark:text-blue-400":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400"}`,children:i.icon}),s.jsxs("div",{className:"space-y-1",children:[s.jsx("h4",{className:"font-medium text-xs leading-tight",children:i.name}),i.industryPage&&s.jsx(Y,{variant:"ghost",size:"sm",className:"h-5 px-1 text-xs",onClick:o=>{o.stopPropagation(),n(i.industryPage)},children:"Learn More"})]})]})})]},i.id))}),e&&s.jsxs("div",{className:"flex items-center justify-between bg-green-50 dark:bg-green-950/30 rounded-lg border border-green-200 dark:border-green-800",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full"}),s.jsxs("span",{className:"text-sm font-medium text-green-700 dark:text-green-300",children:[(a=r.find(i=>i.id===e))==null?void 0:a.name," template loaded"]})]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>t("customer-service"),className:"text-green-700 dark:text-green-300 hover:bg-green-100 dark:hover:bg-green-900/50",children:"Change Template"})]})]})},D2=({title:e,icon:t,guardrails:n,colorClass:r,onAddGuardrail:a,onEditGuardrail:i,onRemoveGuardrail:o})=>{const[l,c]=b.useState(!1),[u,d]=b.useState(""),[f,m]=b.useState(null),[p,v]=b.useState(""),y=()=>{u.trim()&&(a(u.trim()),d(""),c(!1))},x=S=>{S.editable&&(m(S.id),v(S.text))},w=()=>{f&&p.trim()&&(i(f,p.trim()),m(null),v(""))},N=()=>{m(null),v("")};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[t,s.jsx("h4",{className:`font-medium ${r}`,children:e}),s.jsx(le,{variant:"outline",className:"text-xs",children:n.length})]}),s.jsxs(Y,{size:"sm",variant:"ghost",onClick:()=>c(!0),className:"text-xs",children:[s.jsx(Fn,{className:"h-3 w-3 mr-1"}),"Add new"]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(ci,{children:n.map(S=>s.jsx(Gt.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"group",children:f===S.id?s.jsxs("div",{className:"flex items-center gap-2 p-3 bg-gray-50 dark:bg-gray-800/50 rounded-lg border",children:[s.jsx(_e,{value:p,onChange:_=>v(_.target.value),className:"flex-1 text-sm",onKeyDown:_=>{_.key==="Enter"&&w(),_.key==="Escape"&&N()}}),s.jsx(Y,{size:"sm",onClick:w,children:s.jsx(mo,{className:"h-3 w-3"})}),s.jsx(Y,{size:"sm",variant:"ghost",onClick:N,children:s.jsx(jr,{className:"h-3 w-3"})})]}):s.jsxs("div",{className:"flex items-start justify-between gap-2 p-3 rounded-lg border border-gray-200/50 dark:border-gray-700/50 hover:bg-gray-50/50 dark:hover:bg-gray-800/30 transition-colors",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm",children:S.text}),s.jsxs("div",{className:"flex gap-2 mt-1",children:[s.jsx(le,{variant:"secondary",className:"text-xs",children:S.severity}),S.compliance&&s.jsx(le,{variant:"outline",className:"text-xs",children:S.compliance.join(", ")})]})]}),s.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[S.editable&&s.jsx(Y,{size:"sm",variant:"ghost",onClick:()=>x(S),className:"h-7 w-7 p-0",children:s.jsx(vX,{className:"h-3 w-3"})}),S.id.startsWith("custom-")&&s.jsx(Y,{size:"sm",variant:"ghost",onClick:()=>o(S.id),className:"h-7 w-7 p-0 text-red-500 hover:text-red-600",children:s.jsx(oi,{className:"h-3 w-3"})})]})]})},S.id))}),s.jsx(ci,{children:l&&s.jsxs(Gt.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2 p-3 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800",children:[s.jsx(_e,{value:u,onChange:S=>d(S.target.value),placeholder:`Add new ${e.toLowerCase()} guardrail...`,className:"flex-1 text-sm",onKeyDown:S=>{S.key==="Enter"&&y(),S.key==="Escape"&&c(!1)},autoFocus:!0}),s.jsx(Y,{size:"sm",onClick:y,disabled:!u.trim(),children:s.jsx(mo,{className:"h-3 w-3"})}),s.jsx(Y,{size:"sm",variant:"ghost",onClick:()=>c(!1),children:s.jsx(jr,{className:"h-3 w-3"})})]})})]})]})},zEe=({category:e,customGuardrails:t,onGuardrailsChange:n})=>{const[r,a]=b.useState(e),i=$Ee(r),o=[...i.authorized,...i.restricted,...i.uncertainty,...t],l=o.filter(v=>v.category==="authorized"),c=o.filter(v=>v.category==="restricted"),u=o.filter(v=>v.category==="uncertainty"),d=v=>{a(v),n([])},f=(v,y)=>{const w={id:`custom-${Date.now()}-${Math.random().toString(36).substr(2,9)}`,text:y,category:v,severity:"important",editable:!0};n([...t,w])},m=(v,y)=>{const x=t.map(w=>w.id===v?{...w,text:y}:w);n(x)},p=v=>{n(t.filter(y=>y.id!==v))};return s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(xe,{className:"sm:p-6",children:s.jsxs(we,{className:"flex items-center gap-3 text-lg sm:text-xl",children:[s.jsx(it,{className:"h-5 w-5 sm:h-6 sm:w-6 text-purple-500"}),"AI Agent Guardrails"]})}),s.jsxs(se,{className:"space-y-8 sm:p-6",children:[s.jsx(FEe,{selectedIndustry:r,onIndustryChange:d}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx(D2,{title:"Authorized Tasks",icon:s.jsx(Pe,{className:"h-4 w-4 text-green-500"}),guardrails:l,colorClass:"text-green-600 dark:text-green-400",onAddGuardrail:v=>f("authorized",v),onEditGuardrail:m,onRemoveGuardrail:p}),s.jsx(D2,{title:"Restricted Actions",icon:s.jsx(Ay,{className:"h-4 w-4 text-red-500"}),guardrails:c,colorClass:"text-red-600 dark:text-red-400",onAddGuardrail:v=>f("restricted",v),onEditGuardrail:m,onRemoveGuardrail:p}),s.jsx(D2,{title:"Uncertainty Protocol",icon:s.jsx(ln,{className:"h-4 w-4 text-orange-500"}
1385),guardrails:u,colorClass:"text-orange-600 dark:text-orange-400",onAddGuardrail:v=>f("uncertainty",v),onEditGuardrail:m,onRemoveGuardrail:p})]})]})]})},BEe=({sources:e,onSourcesChange:t,onUpload:n,isUploading:r=!1})=>{const[a,i]=b.useState(!1),{checkLimit:o}=Vc(),l=qt(),{toast:c}=_t(),u=async y=>{if(!y)return;const x=Array.from(y);if(!o("max_documents_per_agent",e.length+x.length)){c({title:"Upload Limit Reached",description:"You have reached the maximum number of documents for your tier. Please upgrade to upload more.",variant:"destructive",action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>l("/pricing"),children:"Upgrade"})});return}if(n){const w=x.map((N,S)=>({id:`file-${Date.now()}-${S}`,name:N.name,type:N.type,size:N.size,status:"uploading"}));t([...e,...w]);try{if(await n(x)){const S=[...e,...w].map(_=>w.find(k=>k.id===_.id)?{..._,status:"ready"}:_);t(S)}else{const S=[...e,...w].map(_=>w.find(k=>k.id===_.id)?{..._,status:"error"}:_);t(S)}}catch(N){console.error("Upload failed:",N);const S=[...e,...w].map(_=>w.find(k=>k.id===_.id)?{..._,status:"error"}:_);t(S)}}else{const w=x.map((N,S)=>({id:`file-${Date.now()}-${S}`,name:N.name,type:N.type,size:N.size,status:"uploading"}));
1385t([...e,...w]),w.forEach((N,S)=>{setTimeout(()=>{const _=[...e,...w].map(k=>k.id===N.id?{...k,status:"ready"}:k);t(_)},1e3+S*500)})}},d=y=>{y.preventDefault(),i(!1),u(y.dataTransfer.files)},f=y=>{y.preventDefault(),i(!0)},m=y=>{y.preventDefault(),i(!1)},p=y=>{t(e.filter(x=>x.id!==y))},v=y=>{if(y===0)return"0 Bytes";const x=1024,w=["Bytes","KB","MB","GB"],N=Math.floor(Math.log(y)/Math.log(x));return parseFloat((y/Math.pow(x,N)).toFixed(2))+" "+w[N]};return s.jsxs(te,{className:"glass-effect glass-effect-dark border-purple-200 dark:border-purple-800",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2 text-lg",children:[s.jsx(rn,{className:"h-5 w-5 text-purple-500"}),"Knowledge Sources"]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Upload your water treatment documentation to train your agent"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:`border-2 border-dashed rounded-lg p-6 text-center transition-all duration-200 ${r?"border-blue-400 bg-blue-50 dark:bg-blue-900/20 cursor-not-allowed":a?"border-purple-400 bg-purple-50 dark:bg-purple-900/20":"border-gray-300 dark:border-gray-600 hover:border-purple-300 dark:hover:border-purple-700"}`,onDrop:r?void 0:d,onDragOver:r?void 0:f,onDragLeave:r?void 0:m,children:[r?s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-3"}):s.jsx(Js,{className:"h-8 w-8 text-gray-400 mx-auto mb-3"}),s.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:r?"Uploading files...":"Drop your files here or click to browse"}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-4",children:"Upload SOPs, procedures, training manuals, safety protocols, and operational guides"}),s.jsx("input",{type:"file",multiple:!0,accept:".pdf,.doc,.docx,.txt,.md",className:"hidden",id:"file-upload",onChange:y=>u(y.target.files),disabled:r}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>{var y;return!r&&((y=document.getElementById("file-upload"))==null?void 0:y.click())},disabled:r,className:"border-purple-300 text-purple-700 hover:bg-purple-50 dark:border-purple-700 dark:text-purple-300 disabled:opacity-50 disabled:cursor-not-allowed",children:r?"Uploading...":"Browse Files"})]}),e.length===0&&s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4",children:[s.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:"Example documents to upload:"}),s.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[s.jsx("li",{children:"• Daily chlorine check procedures"}),s.jsx("li",{children:"• Emergency shutdown protocols"}),s.jsx("li",{children:"• Equipment maintenance schedules"}),s.jsx("li",{children:"• Water quality testing guidelines"}),s.jsx("li",{children:"• Safety and compliance documentation"})]})]}),e.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("h4",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:["Uploaded Documents (",e.length,")"]}),e.map(y=>s.jsxs(Gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex items-center justify-between p-3 bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(rn,{className:"h-4 w-4 text-purple-500"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:y.name}),y.size&&s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:v(y.size)})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[y.status==="uploading"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-purple-500 border-t-transparent rounded-full animate-spin"}),s.jsx("span",{className:"text-xs text-gray-500",children:"Uploading..."})]}),y.status==="processing"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-4 h-4 border-2 border-yellow-500 border-t-transparent roun
1385ded-full animate-spin"}),s.jsx("span",{className:"text-xs text-gray-500",children:"Processing..."})]}),y.status==="ready"&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-500"}),s.jsx(le,{variant:"secondary",className:"text-xs bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300",children:"Ready"})]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>p(y.id),className:"h-8 w-8 p-0 text-gray-400 hover:text-red-500",children:s.jsx(oi,{className:"h-3 w-3"})})]})]},y.id))]}),s.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 rounded-lg p-3",children:s.jsxs("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:["💡 ",s.jsx("strong",{children:"Tip:"})," Upload your plant's documentation so your agent can provide accurate, facility-specific answers about procedures, safety protocols, and operational guidelines."]})})]})]})},UEe=()=>{const[e,t]=b.useState([]),[n,r]=b.useState([]),[a,i]=b.useState(!0),[o,l]=b.useState(!0),[c,u]=b.useState(null),[d,f]=b.useState(null),m=async()=>{try{i(!0),u(null);const y=await Pt.getLLMModels(1,100);t(y.results)}catch(y){console.error("Error fetching LLM models:",y),u(y instanceof Error?y.message:"Failed to fetch LLM models")}finally{i(!1)}},p=async()=>{try{l(!0),f(null);const y=await Pt.getEmbeddingModels(1,100);r(y.results)}catch(y){console.error("Error fetching embedding models:",y),f(y instanceof Error?y.message:"Failed to fetch embedding models")}finally{l(!1)}},v=()=>{m(),p()};return b.useEffect(()=>{m(),p()},[]),{llmModels:e,embeddingModels:n,isLoadingLLM:a,isLoadingEmbedding:o,errorLLM:c,errorEmbedding:d,refetchModels:v}},HEe=({config:e,onConfigChange:t,knowledgeSources:n=[],onKnowledgeSourcesChange:r=()=>{},isSimpleMode:a=!1})=>{var q,B;const{can:i}=Vc(),o=qt(),l=i("can_choose_models"),[c,u]=b.useState(!1),[d,f]=b.useState(!1),[m,p]=b.useState(""),[v,y]=b.useState(null),[x,w]=b.useState(""),{llmModels:N,embeddingModels:S,isLoadingLLM:_,isLoadingEmbedding:k,errorLLM:C,errorEmbedding:E}=UEe(),O=[{value:"customer-service",label:"Customer Support"},{value:"healthcare",label:"Healthcare Assistant"},{value:"legal",label:"Legal Services"},{value:"education",label:"Academic Advisor"},{value:"financial",label:"Financial Services"},{value:"custom",label:"Custom"}],P=L=>{t({customGuardrails:L})},R=L=>({"customer-service":{tone:"friendly-professional",endingMessage:"Is there anything else I can help you with today?",purpose:"Provide exceptional customer support with quick, accurate responses and empathetic service",description:"A helpful customer service agent that provides quick and accurate responses to customer inquiries",input_text_hint:"How can I help you today?",conversationStarters:["I need help with my order","How can I return an item?","What are your business hours?","I have a billing question"]},healthcare:{tone:"empathetic",endingMessage:"Please don't hesitate to reach out if you have any other questions about your health.",purpose:"Assist patients with healthcare information while maintaining HIPAA compliance and medical accuracy",description:"A healthcare assistant that helps patients with appointments, insurance questions, and general health information",input_text_hint:"What can I help you with regarding your healthcare?",conversationStarters:["How do I schedule an appointment?","What insurance do you accept?","I need help understanding my test results","What are your visiting hours?"]},legal:{tone:"professional",endingMessage:"Please let me know if you need clarification on any legal matters.",purpose:"Provide legal guidance and document assistance while maintaining attorney-client privilege",description:"A professional legal assistant that helps with legal guidance, document preparation, and case information",input_text_hint:"What legal matter can I assist you with?",conversationStarters:["I need help with contract review","What are the filing requirements?","How do I prepare for my case?","What documents do I need?"]}})[L]||{},T=L=>{const V=R(L);t({category:L,...V})},D=e.conversationStarters||[],z=()=>{if(m.trim()){const L=[...D,m.trim()];t({conversationStarters:L}),p("")}},I=L=>{const V=D.filter((K,W)=>W!==L);t({conversationStarters:V})},F=L=>{y(L),w(D[L])},U=()=>
1385{if(v!==null&&x.trim()){const L=[...D];L[v]=x.trim(),t({conversationStarters:L}),y(null),w("")}},H=()=>{y(null),w("")};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{className:"relative p-4 sm:p-6",children:[s.jsx("div",{className:"absolute top-4 right-4",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),s.jsx("span",{className:"text-xs text-muted-foreground hidden sm:inline",children:"AI Ready"})]})}),s.jsxs(we,{className:"flex items-center gap-3 text-lg sm:text-xl",children:[s.jsx(Ot,{className:"h-5 w-5 sm:h-6 sm:w-6 text-blue-500"}),"Essential Configuration"]}),s.jsx(nt,{className:"text-sm sm:text-base",children:"Get started with the basics - we'll help with smart defaults"})]}),s.jsxs(se,{className:"space-y-4 sm:space-y-6 p-4 sm:p-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(de,{htmlFor:"agentName",className:"text-sm font-medium flex items-center gap-2",children:[s.jsx("span",{className:"text-red-500",children:"*"}),"Agent Name"]}),s.jsx(_e,{id:"agentName",value:e.name,onChange:L=>t({name:L.target.value}),placeholder:"Support Assistant",className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow transition-all duration-300 h-11 sm:h-10",required:!0})]}),s.jsx(tR,{currentPurpose:e.purpose,onPurposeChange:L=>t({purpose:L})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(de,{htmlFor:"purpose",className:"text-sm font-medium flex items-center gap-2",children:[s.jsx("span",{className:"text-red-500",children:"*"}),"Purpose & Instructions",s.jsx(le,{variant:"outline",className:"text-xs",children:"Main Focus"})]}),s.jsx(Ds,{id:"purpose",value:e.purpose,onChange:L=>t({purpose:L.target.value}),placeholder:"Define your agent's role, capabilities, and instructions. Be specific about what it should do, how it should respond, and any important guidelines it should follow. This is where most of your agent's configuration goes.",rows:10,className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow transition-all duration-300 resize-none text-sm leading-relaxed",required:!0}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"💡 Most of your agent's behavior and knowledge instructions go here. Be detailed and specific."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(de,{htmlFor:"description",className:"text-sm font-medium flex items-center gap-2",children:[s.jsx("span",{className:"text-red-500",children:"*"}),"Agent Description"]}),s.jsx(Ds,{id:"description",value:e.description,onChange:L=>t({description:L.target.value}),placeholder:"Brief description of what this agent does and its key capabilities",rows:3,className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow transition-all duration-300 resize-none",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(de,{htmlFor:"llmModel",className:"text-sm font-medium flex items-center gap-2",children:[s.jsx("span",{className:"text-red-500",children:"*"}),"LLM Model",!l&&s.jsx(ur,{className:"h-3 w-3 text-muted-foreground"})]}),!l&&s.jsx(le,{variant:"outline",className:"text-[10px] h-5 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:()=>o("/pricing"),children:"Upgrade"})]}),s.jsxs(dt,{disabled:!l,value:((q=e.llm_model_id)==null?void 0:q.toString())||"",onValueChange:L=>t({llm_model_id:L?parseInt(L):null}),children:[s.jsx(ot,{className:`bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow h-11 sm:h-10 ${l?"":"opacity-70"}`,children:_?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kr,{className:"h-4 w-4 animate-spin"}),s.jsx("span",{children:"Loading models..."})]}):s.jsx(ft,{placeholder:l?"Select LLM model":"Default Model (GPT-4o mini)"})}),s.jsx(lt,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 z-50",children:C?s.jsxs("div",{className:"p-3 text-red-500 flex items-center gap-2",children:[s.jsx(Xa,{className:"h-4 w-4"}),s.jsx("span",{className:"text-sm",children:"Failed to load models"})]}):N.map(L=>s.jsx(me,{value:L.id.toString(),className:"py-3 sm:py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:L.name}),s.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[Wg(L.provider)," • ",L.model_id]})]})},L.id))})]}),C&&s.jsxs("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[s.jsx(Xa,{className:"h-3 w-3"}),C]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(de,{htmlFor:"embeddingModel",className:"text-sm font-medium flex items-center gap-2",children:[s.jsx("span",{className:"text-red-500",children:"*"}),"Embedding Model",!l&&s.jsx(ur,{className:"h-3 w-3 text-muted-foreground"})]}),!l&&s.jsx(le,{variant:"outline",className:"text-[10px] h-5 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:()=>o("/pricing"),children:"Upgrade"})]}),s.jsxs(dt,{disabled:!l,value:((B=e.embedding_model_id)==null?void 0:B.toString())||"",onValueChange:L=>t({embedding_model_id:L?parseInt(L):null}),children:[s.jsx(ot,{className:`bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow h-11 sm:h-10 ${l?"":"opacity-70"}`,children:k?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kr,{className:"h-4 w-4 animate-spin"}),s.jsx("span",{children:"Loading models..."})]}):s.jsx(ft,{placeholder:l?"Select embedding model":"Default Model (text-embedding-3-small)"})}),s.jsx(lt,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 z-50",children:E?s.jsxs("div",{className:"p-3 text-red-500 flex items-center gap-2",children:[s.jsx(Xa,{className:"h-4 w-4"}),s.jsx("span",{className:"text-sm",children:"Failed to load models"})]}):S.map(L=>s.jsx(me,{value:L.id.toString(),className:"py-3 sm:py-2",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:L.name}),s.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[Wg(L.provider)," • ",L.model_id]})]})},L.id))})]}),E&&s.jsxs("p",{className:"text-xs text-red-500 flex items-center gap-1",children:[s.jsx(Xa,{className:"h-3 w-3"}),E]})]})]})]})]}),a&&s.jsx(BEe,{sources:n,onSourcesChange:r}),s.jsx(vw,{open:c,onOpenChange:u,children:s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(bw,{asChild:!0,children:s.jsx(xe,{className:"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Kt,{className:"h-5 w-5 text-purple-500"}),s.jsx(we,{className:"text-lg",children:"Advanced Options"}),s.jsx(le,{variant:"outline",children:"Optional"})]}),s.jsx(Gt.div,{animate:{rotate:c?180:0},transition:{duration:.2},children:s.jsx(po,{className:"h-5 w-5 text-gray-500"})})]})})}),s.jsx(ww,{children:s.jsxs(se,{className:"pt-0 space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"input_text_hint",className:"text-sm font-medium",children:"Input Text Hint"}),s.jsx(_e,{id:"input_text_hint",value:e.input_text_hint||"",onChange:L=>t({input_text_hint:L.target.value}),placeholder:"Type your question here...",className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow transition-all duration-300 h-11 sm:h-10"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"category",className:"text-sm font-medium",children:"Agent Category"}),s.jsxs(dt,{value:e.category,onValueChange:L=>T(L),children:[s.jsx(ot,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow h-11 sm:h-10",children:s.jsx(ft,{})}),s.jsx(lt,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 z-50",children:O.map(L=>s.jsx(me,{value:L.value,className:"py-3 sm:py-2",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:L.label}),R(L.value)&&s.jsxs(le,{variant:"secondary",className:"text-xs",children:[s.jsx(ws,{className:"h-2 w-2 mr-1"}),"Smart"]})]})},L.value))})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 lg:gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"tone",className:"text-sm font-medium",children:"Communication Style"}),s.jsxs(dt,{value:e.tone,onValueChange:L=>t({tone:L}),children:[s.jsx(ot,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 h-11 sm:h-10",children:s.jsx(ft,{})}),s.jsxs(lt,{className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 z-50",children:[s.jsx(me,{value:"professional",className:"py-3 sm:py-2",children:"Professional"}),s.jsx(me,{value:"friendly-professional",className:"py-3 sm:py-2",children:"Friendly & Professional"}),s.jsx(me,{value:"casual",className:"py-3 sm:py-2",children:"Casual & Approachable"}),s.jsx(me,{value:"empathetic",className:"py-3 sm:py-2",children:"Empathetic & Caring"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"ending",className:"text-sm font-medium",children:"Conversation Closer"}),s.jsx(_e,{id:"ending",value:e.endingMessage,onChange:L=>t({endingMessage:L.target.value}),placeholder:"How else can I help you today?",className:"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400 focus:ai-glow h-11 sm:h-10"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs(de,{className:"text-sm font-medium flex items-center gap-2",children:[s.jsx(ws,{className:"h-4 w-4 text-blue-500"}),"Conversation Starters"]}),s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 mt-1",children:"These will appear in your live demo and test chat - customize them for your use case"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(_e,{value:m,onChange:L=>p(L.target.value),placeholder:"Add a conversation starter...",className:"flex-1",onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),z())}}),s.jsx(Y,{onClick:z,disabled:!m.trim(),size:"sm",className:"bg-blue-500 hover:bg-blue-600",children:s.jsx(Fn,{className:"h-4 w-4"})})]}),D.length>0&&s.jsx("div",{className:"space-y-2",children:D.map((L,V)=>s.jsx("div",{className:"flex items-center gap-2 p-3 bg-gray-50 dark:bg-gray-800 rounded-lg border",children:v===V?s.jsxs(s.Fragment,{children:[s.jsx(_e,{value:x,onChange:K=>w(K.target.value),className:"flex-1",onKeyDown:K=>{K.key==="Enter"?(K.preventDefault(),U()):K.key==="Escape"&&H()},autoFocus:!0}),s.jsx(Y,{onClick:U,size:"sm",variant:"outline",children:"Save"}),s.jsx(Y,{onClick:H,size:"sm",variant:"outline",children:"Cancel"})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"flex-1 text-sm",children:L}),s.jsx(Y,{onClick:()=>F(V),size:"sm",variant:"ghost",className:"h-8 w-8 p-0",children:s.jsx(NX,{className:"h-3 w-3"})}),s.jsx(Y,{onClick:()=>I(V),size:"sm",variant:"ghost",className:"h-8 w-8 p-0 text-red-500 hover:text-red-700",children:s.jsx(oi,{className:"h-3 w-3"})})]})},V))}),D.length===0&&s.jsx("div",{className:"text-center p-4 border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg",children:s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"No conversation starters added yet. Add some to help users get started!"})})]})]})})]})}),s.jsx(vw,{open:d,onOpenChange:f,children:s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(bw,{asChild:!0,children:s.jsx(xe,{className:"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Sn,{className:"h-5 w-5 text-green-500"}),s.jsx(we,{className:"text-lg",children:"Compliance & Security"}),s.jsx(le,{variant:"outline",className:"bg-green-50 text-green-700 border-green-200",children:"Industry Standards"})]}),s.jsx(Gt.div,{animate:{rotate:d?180:0},transition:{duration:.2},children:s.jsx(po,{className:"h-5 w-5 text-gray-500"})})]})})}),s.jsx(ww,{children:s.jsx(se,{className:"pt-0",children:s.jsx(zEe,{category:e.category,customGuardrails:e.customGuardrails||[],onGuardrailsChange:P})})})]})})]})},qEe=e=>s.jsx(HEe,{...e}),VEe=({config:e,onConfigChange:t})=>{const{can:n}=Vc(),r=qt(),a=n("can_custom_branding"),i=({children:o,title:l="Premium Feature"})=>a?s.jsx(s.Fragment,{children:o}):s.jsxs("div",{className:"relative group",children:[s.jsx("div",{className:"absolute inset-0 z-20 bg-background/60 backdrop-blur-[2px] flex items-center justify-center rounded-lg transition-all duration-300",children:s.jsxs("div",{className:"text-center p-6 bg-card border shadow-lg rounded-xl transform scale-100 opacity-100 transition-all duration-300",children:[s.jsx(ii,{className:"h-10 w-10 text-yellow-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:l}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[200px] mx-auto",children:"Upgrade your plan to unlock custom branding and remove Privion references."}),s.jsx(Y,{onClick:()=>r("/pricing"),className:"bg-gradient-to-r from-yellow-500 to-orange-500 text-white border-0",children:"Upgrade Now"})]})}),s.jsx("div",{className:"opacity-40 pointer-events-none filter blur-[2px] select-none",children:o})]});return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(ii,{className:"h-6 w-6 text-cyber-blue"}),"Brand Identity & Logo"]}),s.jsx(nt,{children:"Upload your logo and customize the visual appearance of your AI agent"})]}),s.jsx(se,{className:"space-y-6",children:s.jsx(i,{children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium mb-3 block",children:"Company Logo"}),s.jsx("div",{className:"relative group",children:s.jsxs("div",{className:"border-2 border-dashed border-white/30 dark:border-gray-700/50 rounded-xl text-center glass-effect glass-effect-dark hover:border-cyber-blue/50 dark:hover:border-cyber-blue/50 transition-all duration-300 cursor-pointer",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-cyber-blue/5 to-electric-blue/5 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"relative inline-block mb-4",children:[s.jsx(hX,{className:"h-12 w-12 text-muted-foreground group-hover:text-cyber-blue transition-colors duration-300"}),s.jsx("div",{className:"absolute -inset-3 bg-cyber-blue/20 rounded-full blur-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Drop your logo here or click to browse"}),s.jsxs(Y,{variant:"outline",size:"sm",className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(Js,{className:"w-4 h-4 mr-2"}),"Upload Logo"]})]})]})})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium mb-3 block",children:"Company Name"}),s.jsx(_e,{value:e.companyName,onChange:o=>t({...e,companyNa
1385me:o.target.value}),placeholder:"Your Company Name",className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 focus:ai-glow"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium mb-3 block",children:"Favicon"}),s.jsx("div",{className:"relative group",children:s.jsxs("div",{className:"border-2 border-dashed border-white/30 dark:border-gray-700/50 rounded-xl text-center glass-effect glass-effect-dark hover:border-blue-400/50 dark:hover:border-blue-500/50 transition-all duration-300 cursor-pointer",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/5 to-cyan-500/5 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsxs("div",{className:"relative",children:[s.jsx(bs,{className:"h-8 w-8 text-muted-foreground group-hover:text-blue-500 transition-colors duration-300 mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Upload Favicon"}),s.jsxs(Y,{variant:"outline",size:"sm",className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(Js,{className:"w-3 h-3 mr-2"}),"Browse"]})]})]})})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-lg border border-blue-200/30 dark:border-blue-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(pr,{className:"h-4 w-4 text-blue-500"}),s.jsx(de,{className:"text-sm font-medium",children:"Logo Preview"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[e.logoUrl?s.jsx("img",{src:e.logoUrl,alt:"Logo",className:"h-8 w-8 rounded object-cover"}):s.jsx("div",{className:"h-8 w-8 rounded flex items-center justify-center text-white font-bold text-sm",style:{backgroundColor:e.primaryColor},children:(e.companyName||"AI").charAt(0)}),s.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:e.companyName||"Your Company Name"})]})]})]})]})})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(QO,{className:"h-6 w-6 text-cyan-500"}),"Brand Colors & Theme"]}),s.jsx(nt,{children:"Customize your brand colors for consistent visual identity"})]}),s.jsx(se,{className:"space-y-6",children:s.jsxs(i,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{className:"text-sm font-medium",children:"Primary Color"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg border-2 border-white/20 dark:border-gray-700/30 cursor-pointer ai-glow-hover",style:{backgroundColor:e.primaryColor}}),s.jsx(_e,{type:"color",value:e.primaryColor,onChange:o=>t({...e,primaryColor:o.target.value}),className:"w-16 h-12 p-1 glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30"}),s.jsx(_e,{value:e.primaryColor,onChange:o=>t({...e,primaryColor:o.target.value}),className:"flex-1 glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{className:"text-sm font-medium",children:"Secondary Color"}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg border-2 border-white/20 dark:border-gray-700/30 cursor-pointer ai-glow-hover",style:{backgroundColor:e.secondaryColor}}),s.jsx(_e,{type:"color",value:e.secondaryColor,onChange:o=>t({...e,secondaryColor:o.target.value}),className:"w-16 h-12 p-1 glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30"}),s.jsx(_e,{value:e.secondaryColor,onChange:o=>t({...e,secondaryColor:o.target.value}),className:"flex-1 glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx(de,{className:"text-sm font-medium",children:"Quick Colors"}),s.jsx("div",{className:"grid grid-cols-6 gap-2",children:["#3B82F6","#8B5CF6","#10B981","#F59E0B","#EF4444","#06B6D4","#84CC16","#F97316"].map(o=>s.jsx("button",{onClick:()=>t({...e,primaryColor:o}),className:"w-10 h-10 rounded-lg border-2 border-white/20 dark:border-gray-700/30 hover:scale-110 transition-transform",style:{backgroundColor:o}},o))})]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(bs,{className:"h-6 w-6 text-green-500"}),"Custom Domain & URL"]}),s.jsx(nt,{children:"Configure your custom domain for a fully white-labeled experience"})]}),s.jsx(se,{className:"space-y-6",children:s.jsx(i,{children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{className:"text-sm font-medium",children:"Custom Domain"}),s.jsx(_e,{value:e.customDomain,onChange:o=>t({...e,customDomain:o.target.value}),placeholder:"chat.yourcompany.com",className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 focus:ai-glow"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your custom domain or subdomain"})]})}),s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-lg border border-blue-200/30 dark:border-blue-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Kt,{className:"h-5 w-5 text-blue-500"}),s.jsx(de,{className:"text-sm font-medium",children:"DNS Configuration"})]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsx("div",{className:"p-2 bg-black/20 dark:bg-white/5 rounded font-mono text-xs",children:"CNAME: chat → agent-platform.com"}),s.jsx("div",{className:"p-2 bg-black/20 dark:bg-white/5 rounded font-mono text-xs",children:"A: @ → 192.168.1.1"})]}),s.jsxs(Y,{variant:"outline",size:"sm",className:"mt-3 w-full glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:[s.jsx(Zs,{className:"w-4 h-4 mr-2"}),"DNS Setup Guide"]})]})})]})})})]}),s.jsx(te,{className:"glass-effect glass-effect-dark border-cyber-blue/30 dark:border-cyber-blue/30 ai-glow-hover",children:s.jsx(se,{children:s.jsxs("div",{className:"text-center space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(di,{className:"h-5 w-5 text-cyber-blue"}),s.jsx("h3",{className:"text-lg font-semibold",children:"Ready to see your agent in action?"})]}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Your branding changes will be applied in the Preview & Test tab"}),s.jsx(Gt.div,{whileHover:{scale:1.02},whileTap:{scale:.98},children:s.jsxs(Y,{size:"lg",className:"bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90 text-white border-0 shadow-lg",children:[s.jsx(ws,{className:"h-4 w-4 mr-2"}),"Preview Your Agent",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})})]})})})]})},WEe=({agentName:e,onNext:t})=>s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("div",{className:"text-6xl",children:"🚀"}),s.jsxs("h2",{className:"text-2xl font-bold",children:["Connect ",e," to Slack"]}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Your AI agent will be able to respond to messages, answer questions, and help your team directly in Slack channels."})]}),s.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[s.jsx(te,{children:s.jsxs(se,{className:"p-4 text-center space-y-2",children:[s.jsx(zn,{className:"h-8 w-8 text-blue-500 mx-auto"}),s.jsx("h3",{className:"font-semibold",children:"5 Minutes Setup"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Qu
1385ick and easy configuration process"})]})}),s.jsx(te,{children:s.jsxs(se,{className:"p-4 text-center space-y-2",children:[s.jsx(Bn,{className:"h-8 w-8 text-green-500 mx-auto"}),s.jsx("h3",{className:"font-semibold",children:"Team Collaboration"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Available in all your Slack channels"})]})}),s.jsx(te,{children:s.jsxs(se,{className:"p-4 text-center space-y-2",children:[s.jsx(Ot,{className:"h-8 w-8 text-purple-500 mx-auto"}),s.jsx("h3",{className:"font-semibold",children:"Instant Responses"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"24/7 AI-powered assistance"})]})})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"What you'll need:"}),s.jsxs("ul",{className:"space-y-1 text-sm",children:[s.jsx("li",{children:"• Admin access to your Slack workspace"}),s.jsx("li",{children:"• 5 minutes to create and configure a Slack app"}),s.jsx("li",{children:"• Your agent will be ready to help your team!"})]})]}),s.jsx("div",{className:"flex justify-center",children:s.jsxs(Y,{onClick:t,size:"lg",className:"gap-2",children:["Let's Get Started",s.jsx(Bt,{className:"h-4 w-4"})]})})]}),GEe=({agentName:e,onNext:t,onBack:n})=>{const{toast:r}=_t(),[a,i]=b.useState(!1),o={_metadata:{major_version:2,minor_version:1},display_information:{name:e,description:`Your secure, private AI assistant - ${e}`,background_color:"#0A0F24"},features:{bot_user:{display_name:e,always_online:!0}},oauth_config:{redirect_urls:["https://yourdomain.com/api/slack/oauth/callback"],scopes:{bot:["chat:write","chat:write.public","app_mentions:read","channels:history","groups:history","im:history","files:write","files:read","channels:join","reactions:write","users:read","users:read.email"]}},settings:{interactivity:{is_enabled:!0,request_url:"https://yourdomain.com/api/slack/interactivity"},event_subscriptions:{request_url:"https://yourdomain.com/api/slack/events",bot_events:["app_mention","message.im","message.groups","message.channels"]},socket_mode_enabled:!1}},l=()=>{navigator.clipboard.writeText(JSON.stringify(o,null,2)),i(!0),r({title:"Copied!",description:"Slack app manifest copied to clipboard"}),setTimeout(()=>i(!1),3e3)};return s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Create Your Slack App"}),s.jsxs("p",{className:"text-muted-foreground",children:["We'll guide you through creating a Slack app for ",e]})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[s.jsx("span",{className:"bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center text-sm",children:"1"}),"Open Slack App Creation"]})}),s.jsxs(se,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click the button below to open Slack's app creation page in a new tab."}),s.jsxs(Y,{className:"w-full gap-2",onClick:()=>window.open("https://api.slack.com/apps","_blank"),children:[s.jsx(Zs,{className:"h-4 w-4"}),"Open Slack App Creation"]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[s.jsx("span",{className:"bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center text-sm",children:"2"}),"Create From Manifest"]})}),s.jsxs(se,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:'Click "Create New App" → "From an app manifest"'}),s.jsx("div",{className:"bg-yellow-50 dark:bg-yellow-950/20 p-3 rounded border-l-4 border-yellow-400",children:s.jsx("p",{className:"text-sm",children:"💡 Choose your workspace when prompted"})})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[s.jsx("span",{className:"bg-blue-600 text-white rounded-full w-6 h-6 flex items-center justify-center text-sm",children:"3"}),"Copy This Manifest"]})}),s.jsxs(se,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Copy the manifest below and paste it into Slack:"}),s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-gray-100 dark:bg-gray-800 p-4 rounded text-xs overflow-auto max-h-64 border",children:JSON.stringify(o,null,2)}),s.jsx(Y,{size:"sm",className:"absolute top-2 right-2 gap-1",onClick:l,variant:a?"default":"outline",children:a?s.jsxs(s.Fragment,{children:[s.jsx(Pe,{className:"h-3 w-3"}),"Copied"]}):s.jsxs(s.Fragment,{children:[s.jsx(Xu,{className:"h-3 w-3"}),"Copy"]})})]}),s.jsx("div",{className:"bg-green-50 dark:bg-green-950/20 p-3 rounded border-l-4 border-green-400",children:s.jsxs("p",{className:"text-sm",children:["✅ This manifest is pre-configured for ",e]})})]})]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Qu
1385ick Steps Summary:"}),s.jsxs("ol",{className:"space-y-1 text-sm list-decimal list-inside",children:[s.jsx("li",{children:"Open Slack app creation (button above)"}),s.jsx("li",{children:'Click "Create New App" → "From an app manifest"'}),s.jsx("li",{children:"Select your workspace"}),s.jsx("li",{children:"Paste the manifest (copy button above)"}),s.jsx("li",{children:'Click "Create" and then come back here!'})]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(Y,{variant:"outline",onClick:n,className:"gap-2",children:[s.jsx(ai,{className:"h-4 w-4"}),"Back"]}),s.jsxs(Y,{onClick:t,className:"gap-2",children:["App Created, Next Step",s.jsx(Bt,{className:"h-4 w-4"})]})]})]})},Mb=b.forwardRef(({label:e,description:t,error:n,success:r,onInteraction:a,required:i,className:o,...l},c)=>{const[u,d]=b.useState(!1),[f,m]=b.useState(!1),p=x=>{var w;d(!0),f||(m(!0),a==null||a()),(w=l.onFocus)==null||w.call(l,x)},v=x=>{var w;d(!1),(w=l.onBlur)==null||w.call(l,x)},y=x=>{var w;f||(m(!0),a==null||a()),(w=l.onChange)==null||w.call(l,x)};return s.jsxs("div",{className:"space-y-2",children:[e&&s.jsxs(de,{htmlFor:l.id,className:"flex items-center gap-2 text-gray-800 dark:text-gray-200 font-medium",children:[e,i&&s.jsx("span",{className:"text-red-500 text-sm",children:"*"}),r&&s.jsx(Pe,{className:"h-4 w-4 text-green-500"}),n&&s.jsx(Xa,{className:"h-4 w-4 text-red-500"})]}),s.jsx(_e,{ref:c,className:He("transition-all duration-200",u&&"ring-2 ring-blue-500/20 border-blue-500 shadow-md",r&&"border-green-400 bg-green-50/50 dark:bg-green-950/20",n&&"border-red-400 bg-red-50/50 dark:bg-red-950/20",f&&!n&&!r&&"border-blue-300 dark:border-blue-600",o),onFocus:p,onBlur:v,onChange:y,...l}),t&&s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:t}),n&&s.jsxs("p",{className:"text-sm text-red-600 dark:text-red-400 flex items-center gap-1",children:[s.jsx(Xa,{className:"h-4 w-4"}),n]})]})});Mb.displayName="EnhancedInput";const KEe=({config:e,onConfigUpdate:t,onNext:n,onBack:r})=>{const[a,i]=b.useState(!1),o=e.clientId&&e.clientSecret&&e.signingSecret,l=(c,u)=>{t({[c]:u})};return s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Add Your Slack App Credentials"}),s.jsx("p",{className:"text-muted-foreground",children:"Copy these 3 pieces of information from your newly created Slack app"})]}),s.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-lg flex items-center justify-between",children:["Where to Find These",s.jsxs(Y,{size:"sm",variant:"outline",className:"gap-1",onClick:()=>window.open("https://api.slack.com/apps","_blank"),children:[s.jsx(Zs,{className:"h-3 w-3"}),"Open Slack Apps"]})]})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"font-semibold text-sm",children:"Step 1: Go to Your App"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click on your newly created app from the apps list"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"font-semibold text-sm",children:"Step 2: Find Basic Information"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:'Go to "Settings" → "Basic Information" in the left sidebar'})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"font-semibold text-sm",children:"Step 3: Copy App Credentials"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:'Scroll down to "App Credentials" section and copy each value'})]}),s.jsx("div",{className:"bg-yellow-50 dark:bg-yellow-950/20 p-3 rounded border-l-4 border-yellow-400",children:s.jsx("p",{className:"text-sm",children:"💡 Keep the Slack tab open - you'll need it for the next step too!"})})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>i(!a),className:"gap-1",children:[a?s.jsx(Lh,{className:"h-3 w-3"}):s.jsx(pr,{className:"h-3 w-3"}
1385),a?"Hide":"Show"," Values"]}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Toggle to ",a?"hide":"show"," your entered values"]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-lg",children:"Enter Your Credentials"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsx(Mb,{label:"Client ID",description:"Found in App Credentials section",placeholder:"1234567890.1234567890",value:e.clientId,onChange:c=>l("clientId",c.target.value),type:a?"text":"password"}),s.jsx(Mb,{label:"Client Secret",description:"Click 'Show' next to Client Secret",placeholder:"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",value:e.clientSecret,onChange:c=>l("clientSecret",c.target.value),type:a?"text":"password"}),s.jsx(Mb,{label:"Signing Secret",description:"Found in App Credentials section",placeholder:"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0",value:e.signingSecret,onChange:c=>l("signingSecret",c.target.value),type:a?"text":"password"}),o&&s.jsx("div",{className:"bg-green-50 dark:bg-green-950/20 p-3 rounded border-l-4 border-green-400",children:s.jsx("p",{className:"text-sm",children:"✅ All credentials entered - ready to test connection!"})})]})]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(Y,{variant:"outline",onClick:r,className:"gap-2",children:[s.jsx(ai,{className:"h-4 w-4"}),"Back"]}),s.jsxs(Y,{onClick:n,disabled:!o,className:"gap-2",children:["Test Connection",s.jsx(Bt,{className:"h-4 w-4"})]})]})]})},YEe=({config:e,onConfigUpdate:t,onFinish:n,onBack:r})=>{const[a,i]=b.useState(!1),[o,l]=b.useState("pending"),{toast:c}=_t(),u=async()=>{i(!0),l("pending");try{await new Promise(p=>setTimeout(p,2e3)),e.clientId&&e.clientSecret&&e.signingSecret?(l("success"),t({isConnected:!0}),c({title:"Connection Successful!",description:"Your Slack app is properly configured and connected."})):(l("error"),c({title:"Connection Failed",description:"Please check your credentials and try again.",variant:"destructive"}))}catch{l("error"),c({title:"Connection Error",description:"Unable to test connection. Please try again.",variant:"destructive"})}finally{i(!1)}};b.useEffect(()=>{u()},[]);const f=(()=>{switch(o){case"pending":return{icon:s.jsx(kr,{className:"h-8 w-8 text-blue-500 animate-spin"}),title:"Testing Connection...",description:"Validating your Slack app credentials",color:"border-blue-200 bg-blue-50 dark:bg-blue-950/20"};case"success":return{icon:s.jsx(Pe,{className:"h-8 w-8 text-green-500"}),title:"Connection Successful!",description:"Your Slack app is properly configured and ready to use",color:"border-green-200 bg-green-50 dark:bg-green-950/20"};case"error":return{icon:s.jsx(Xa,{className:"h-8 w-8 text-red-500"}),title:"Connection Failed",description:"Please check your credentials and try again",color:"border-red-200 bg-red-50 dark:bg-red-950/20"};default:return null}})();return s.jsxs("div",{className:"space-y-6 p-6",children:[s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("h2",{className:"text-xl font-bold",children:"Testing Your Connection"}),s.jsx("p",{className:"text-muted-foreground",children:"We're verifying that everything is set up correctly"})]}),s.jsx(te,{className:`${f==null?void 0:f.color} border-2`,children:s.jsxs(se,{className:"p-8 text-center space-y-4",children:[f==null?void 0:f.icon,s.jsx("h3",{className:"text-xl font-semibold",children:f==null?void 0:f.title}),s.jsx("p",{className:"text-muted-foreground",children:f==null?void 0:f.description}),o==="error"&&s.jsxs(Y,{onClick:u,disabled:a,className:"gap-2",children:[a&&s.jsx(kr,{className:"h-4 w-4 animate-spin"}),"Try Again"]})]})}),o==="success"&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-lg",children:"🎉 You're All Set!"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsx("p",{className:"text-sm",children:"Your Slack integration is now active. Here's what happens next:"}),s.jsxs("ul",{className:"space-y-2 text-sm",children:[s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-500 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Your agent can now respond to mentions in Slack channels"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-500 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Direct messages to your agent will be answered automatically"})]}),s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-500 mt-0.5 flex-shrink-0"}),s.jsx("span",{children:"Team members can ask questions and get instant AI-powered responses"})]})]})]})]}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 rounded-lg p-4",children:[s.jsx("h3",{className:"font-semibold mb-2",children:"Next Steps:"}),s.jsxs("ul",{className:"space-y-1 text-sm",children:[s.jsx("li",{children:"• Install the app to your Slack workspace"}),s.jsx("li",{children:"• Invite the bot to channels where you want it active"}),s.jsx("li",{children:"• Try mentioning your agent to test it out!"})]})]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsxs(Y,{variant:"outline",onClick:r,className:"gap-2",children:[s.jsx(ai,{className:"h-4 w-4"}),"Back"]}),o==="success"&&s.jsxs(Y,{onClick:n,className:"gap-2",children:["Finis
1385h Setup",s.jsx(Pe,{className:"h-4 w-4"})]})]})]})},Bee=({isOpen:e,onClose:t,agentName:n,onConfigSave:r})=>{const[a,i]=b.useState(1),[o,l]=b.useState({clientId:"",clientSecret:"",signingSecret:"",isConnected:!1}),{toast:c}=_t(),u=4,d=a/u*100,f=["Getting Started","Create Slack App","Add Credentials","Test Connection"],m=()=>{a<u&&i(a+1)},p=()=>{a>1&&i(a-1)},v=w=>{l(N=>({...N,...w}))},y=()=>{r(o),c({title:"Success!",description:"Your Slack integration is now configured and connected."}),t()},x=()=>{switch(a){case 1:return s.jsx(WEe,{agentName:n,onNext:m});case 2:return s.jsx(GEe,{agentName:n,onNext:m,onBack:p});case 3:return s.jsx(KEe,{config:o,onConfigUpdate:v,onNext:m,onBack:p});case 4:return s.jsx(YEe,{config:o,onConfigUpdate:v,onFinish:y,onBack:p});default:return null}};return s.jsx(qm,{open:e,onOpenChange:t,children:s.jsxs(zd,{className:"max-w-4xl h-[80vh] flex flex-col",children:[s.jsx(Bd,{children:s.jsxs(Ud,{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-blue-600 rounded-lg flex items-center justify-center",children:"💬"}),"Connect ",n," to Slack"]})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm text-muted-foreground",children:[s.jsxs("span",{children:["Step ",a," of ",u,": ",f[a-1]]}),s.jsxs("span",{children:[Math.round(d),"% complete"]})]}),s.jsx(qr,{value:d,className:"h-2"})]}),s.jsx("div",{className:"flex-1 overflow-y-auto",children:x()})]})})},Uee=({isOpen:e,onClose:t,onSave:n})=>{const[r,a]=b.useState("parameters"),[i,o]=b.useState({name:"",method:"GET",url:"",description:"",authentication:{type:"none",apiKey:"",headerName:"Authorization"}}),[l,c]=b.useState([]),[u,d]=b.useState([]),[f,m]=b.useState(null),[p,v]=b.useState(!1),{toast:y}=_t(),x=()=>{const P={id:Date.now().toString(),source:"query",key:"",type:"string",value:"",required:!1,description:""};c([...l,P])},w=(P,R)=>{c(l.map(T=>T.id===P?{...T,...R}:T))},N=P=>{c(l.filter(R=>R.id!==P))},S=()=>{const P={id:Date.now().toString(),key:"",value:""};d([...u,P])},_=(P,R)=>{d(u.map(T=>T.id===P?{...T,...R}:T))},k=P=>{d(u.filter(R=>R.id!==P))},C=async()=>{v(!0);try{await new Promise(R=>setTimeout(R,2e3));const P={status:200,statusText:"OK",headers:{"content-type":"application/json"},data:{success:!0,message:"API connection successful",timestamp:new Date().toISOString()}};m(P),y({title:"Connection Test Successful",description:"Your API endpoint is responding correctly."})}catch{m({status:500,error:"Connection failed",message:"Could not connect to the API endpoint"}),y({title:"Connection Test Failed",description:"Please check your configuration and try again.",variant:"destructive"})}finally{v(!1)}},E=()=>{const P=`curl -X ${i.method} "${i.url}"`;navigator.clipboard.writeText(P),y({description:"cURL command copied to clipboard"})},O=()=>{const P={...i,parameters:l,headers:u,id:Date.now().toString(),createdAt:new Date().toISOString()};n(P),y({title:"API Action Created",description:`${i.name} has been added to your configuration.`}),t()};return s.jsx(qm,{open:e,onOpenChange:t,children:s.jsxs(zd,{className:"max-w-5xl h-[85vh] flex flex-col bg-white/95 dark:bg-gray-900/95 backdrop-blur-xl border-2 border-white/20 dark:border-gray-700/30 shadow-2xl",children:[s.jsx(Bd,{children:s.jsxs(Ud,{className:"flex items-center gap-3 text-gray-900 dark:text-white",children:[s.jsx("div",{className:"w-8 h-8 bg-cyber-blue rounded-lg flex items-center justify-center",children:s.jsx(Zg,{className:"h-4 w-4 text-white"})}),"Create API Action"]})}),s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsxs(os,{value:r,onValueChange:a,className:"h-full flex flex-col",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-4 mb-4 bg-white/80 dark:bg-gray-800/80 border border-gray-200/50 dark:border-gray-700/50",children:[s.jsxs(at,{value:"parameters",className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-700 data-[state=active]:text-gray-900 dark:data-[state=active]:text-white",children:[s.jsx(Kt,{className:"h-4 w-4"}),"Parameters"]}),s.jsxs(at,{value:"headers",className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-700 data-[state=active]:text-gray-900 dark:data-[state=active]:text-white",children:[s.jsx(Zg,{className:"h-4 w-4"}),"Headers"]}),s.jsxs(at,{value:"auth",className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-700 data-[state=active]:text-gray-900 dark:data-[state=active]:text-white",children:[s.jsx(YO,{className:"h-4 w-4"}),"Authentication"]}),s.jsxs(at,{value:"testing",className:"flex items-center gap-2 text-gray-700 dark:text-gray-200 data-[state=active]:bg-white dark:data-[state=active]:bg-gray-700 data-[state=active]:text-gray-900 dark:data-[state=active]:text-white",children:[s.jsx(ex,{className:"h-4 w-4"}),"Testing"]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s.jsxs(Ze,{value:"parameters",className:"space-y-6 mt-0",children:[s.jsxs(te,{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm border-2 border-white/30 dark:border-gray-700/40 shadow-lg",children:[s.jsx(xe,{children:s.jsx(we,{className:"text-gray-900 dark:text-white",children:"Basic Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"Action Name"}),s.jsx(_e,{placeholder:"e.g., Get User Profile",value:i.name,onChange:P=>o({...i,name:P.target.value}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"Method"}),s.jsxs(dt,{value:i.method,onValueChange:P=>o({...i,method:P}),children:[s.jsx(ot,{className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"GET",children:"GET"}),s.jsx(me,{value:"POST",children:"POST"}),s.jsx(me,{value:"PUT",children:"PUT"}),s.jsx(me,{value:"DELETE",children:"DELETE"}),s.jsx(me,{value:"PATCH",children:"PATCH"})]})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"API Endpoint URL"}),s.jsx(_e,{placeholder:"https://api.example.com/users/{id}",value:i.url,onChange:P=>o({...i,url:P.target.value}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"Description"}),s.jsx(Ds,{placeholder:"What this API action does...",value:i.description,onChange:P=>o({...i,description:P.target.value}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"})]})]})]}),s.jsxs(te,{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm border-2 border-white/30 dark:border-gray-700/40 shadow-lg",children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-gray-900 dark:text-white",children:"Parameters"}),s.jsxs(Y,{onClick:x,size:"sm",className:"gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Add Parameter"]})]})}),s.jsx(se,{children:l.length===0?s.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-300 bg-gray-50/50 dark:bg-gray-700/30 rounded-lg border border-gray-200/50 dark:border-gray-600/50",children:'No parameters yet. Click "Add Parameter" to get started.'}):s.jsx("div",{className:"space-y-4",children:l.map(P=>s.jsx("div",{className:"bg-white/60 dark:bg-gray-700/60 backdrop-blur-sm rounded-lg border-2 border-gray-200/50 dark:border-gray-600/50",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 gap-4 items-center",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-xs text-gray-700 dark:text-gray-200 font-medium",children:"Source"}),s.jsxs(dt,{value:P.source,onValueChange:R=>w(P.id,{source:R}),children:[s.jsx(ot,{className:"h-8 bg-white dark:bg-gray-600 text-gray-900 dark:text-white",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"path",children:"Path"}),s.jsx(me,{value:"query",children:"Query"}),s.jsx(me,{value:"body",children:"Body"}),s.jsx(me,{value:"header",children:"Header"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-xs text-gray-700 dark:text-gray-200 font-medium",children:"Key"}),s.jsx(_e,{placeholder:"parameter_name",value:P.key,onChange:R=>w(P.id,{key:R.target.value}),className:"h-8 bg-white dark:bg-gray-600 text-gray-900 dark:text-white"})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-xs text-gray-700 dark:text-gray-200 font-medium",children:"Type"}),s.jsxs(dt,{value:P.type,onValueChange:R=>w(P.id,{type:R}),children:[s.jsx(ot,{className:"h-8 bg-white dark:bg-gray-600 text-gray-900 dark:text-white",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"string",children:"String"}),s.jsx(me,{value:"number",children:"Number"}),s.jsx(me,{value:"boolean",children:"Boolean"}),s.jsx(me,{value:"object",children:"Object"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-xs text-gray-700 dark:text-gray-200 font-medium",children:"Default Value"}),s.jsx(_e,{placeholder:"default value",value:P.value,onChange:R=>w(P.id,{value:R.target.value}),className:"h-8 bg-white dark:bg-gray-600 text-gray-900 dark:text-white"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Dt,{checked:P.required,onCheckedChange:R=>w(P.id,{required:R})}),s.jsx(de,{className:"text-xs text-gray-700 dark:text-gray-200 font-medium",children:"Required"})]}),s.jsx("div",{className:"flex justify-end",children:s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>N(P.id),className:"h-8 w-8 p-0 text-red-500 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20",children:s.jsx(oi,{className:"h-4 w-4"})})})]})},P.id))})})]})]}),s.jsx(Ze,{value:"headers",className:"space-y-6 mt-0",children:s.jsxs(te,{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm border-2 border-white/30 dark:border-gray-700/40 shadow-lg",children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-gray-900 dark:text-white",children:"Custom Headers"}),s.jsxs(Y,{onClick:S,size:"sm",className:"gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Add Header"]})]})}),s.jsx(se,{children:u.length===0?s.jsx("div",{className:"text-center py-8 text-gray-600 dark:text-gray-300 bg-gray-50/50 dark:bg-gray-700/30 rounded-lg border border-gray-200/50 dark:border-gray-600/50",children:"No custom headers. Add headers for special requirements."}):s.jsx("div",{className:"space-y-4",children:u.map(P=>s.jsxs("div",{className:"flex gap-4 items-center",children:[s.jsx(_e,{placeholder:"Header name",value:P.key,onChange:R=>_(P.id,{key:R.target.value}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"}),s.jsx(_e,{placeholder:"Header value",value:P.value,onChange:R=>_(P.id,{value:R.target.value}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>k(P.id),className:"text-red-500 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-900/20",children:s.jsx(oi,{className:"h-4 w-4"})})]},P.id))})})]})}),s.jsx(Ze,{value:"auth",className:"space-y-6 mt-0",children:s.jsxs(te,{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm border-2 border-white/30 dark:border-gray-700/40 shadow-lg",children:[s.jsx(xe,{children:s.jsx(we,{className:"text-gray-900 dark:text-white",children:"Authentication"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"Authentication Type"}),s.jsxs(dt,{value:i.authentication.type,onValueChange:P=>o({...i,authentication:{...i.authentication,type:P}}),children:[s.jsx(ot,{className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"none",children:"No Authentication"}),s.jsx(me,{value:"api-key",children:"API Key"}),s.jsx(me,{value:"bearer",children:"Bearer Token"}),s.jsx(me,{value:"basic",children:"Basic Auth"})]})]})]}),i.authentication.type!=="none"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"API Key / Token"}),s.jsx(_e,{type:"password",placeholder:"Enter your API key or token",value:i.authentication.apiKey,onChange:P=>o({...i,authentication:{...i.authentication,apiKey:P.target.value}}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-gray-700 dark:text-gray-200 font-medium",children:"Header Name"}),s.jsx(_e,{placeholder:"Authorization",value:i.authentication.headerName,onChange:P=>o({...i,authentication:{...i.authentication,headerName:P.target.value}}),className:"bg-white/70 dark:bg-gray-700/70 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"})]})]})]})]})}),s.jsx(Ze,{value:"testing",className:"space-y-6 mt-0",children:s.jsxs(te,{className:"bg-white/80 dark:bg-gray-800/80 backdrop-blur-sm border-2 border-white/30 dark:border-gray-700/40 shadow-lg",children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-gray-900 dark:text-white",children:"Test Your API"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{variant:"outline",onClick:E,size:"sm",className:"gap-2 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700",children:[s.jsx(Xu,{className:"h-4 w-4"}),"Copy as cURL"]}),s.jsxs(Y,{onClick:C,disabled:p||!i.url,size:"sm",className:"gap-2",children:[s.jsx(Vr,{className:"h-4 w-4"}),p?"Testing...":"Run Test"]})]})]})}),s.jsxs(se,{children:[f&&s.jsxs("div",{className:"bg-white/60 dark:bg-gray-700/60 backdrop-blur-sm rounded-lg border-2 border-gray-200/50 dark:border-gray-600/50",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[f.status<400?s.jsx(Pe,{className:"h-5 w-5 text-green-500"}):s.jsx(Xa,{className:"h-5 w-5 text-red-500"}),s.jsxs(le,{variant:f.status<400?"default":"destructive",children:[f.status," ",f.statusText]})]}),s.jsx("pre",{className:"text-sm bg-gray-900/90 text-green-400 rounded-lg overflow-auto border border-gray-300 dark:border-gray-600",children:JSON.stringify(f,null,2)})]}),!f&&!p&&s.jsxs("div",{className:"text-center py-12 px-6 text-gray-700 dark:text-gray-200 bg-gradient-to-br from-gray-50/80 to-gray-100/80 dark:from-gray-700/50 dark:to-gray-800/50 rounded-lg border-2 border-gray-200/50 dark:border-gray-600/50",children:[s.jsx(ex,{className:"h-12 w-12 mx-auto mb-4 text-gray-400 dark:text-gray-500"}),s.jsx("p",{className:"text-lg font-medium mb-2",children:"Ready to Test"}),s.jsx("p",{className:"text-sm opacity-80",children:'Configure your API above and click "Run Test" to see the results.'})]})]})]})})]})]})}),s.jsxs("div",{className:"flex justify-between pt-4 border-t-2 border-gray-200/50 dark:border-gray-700/50",children:[s.jsx(Y,{variant:"outline",onClick:t,className:"border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700",children:"Cancel"}),s.jsxs(Y,{onClick:O,disabled:!i.name||!i.url,className:"gap-2",children:[s.jsx(Pe,{className:"h-4 w-4"}
1385),"Save API Action"]})]})]})})},XEe=({config:e,onConfigChange:t,agentName:n="Your Agent"})=>{const[r,a]=b.useState(!1),[i,o]=b.useState(!1),[l,c]=b.useState([]),{can:u}=Vc(),d=qt(),{toast:f}=_t(),m=u("can_webhooks"),[p,v]=b.useState({clientId:"",clientSecret:"",signingSecret:"",isConnected:!1}),y=[{id:"azure-ad",name:"Azure AD",category:"Authentication",description:"User authentication",icon:"🔐",connected:!0},{id:"google-calendar",name:"Google Calendar",category:"Productivity",description:"Scheduling integration",icon:"📅",connected:!1},{id:"slack",name:"Slack",category:"Communication",description:"Team notifications",icon:"💬",connected:p.isConnected},{id:"twilio-sms",name:"Twilio SMS",category:"Communication",description:"SMS messaging and alerts",icon:"📱",connected:!0},{id:"aveva-wonderware",name:"AVEVA Wonderware",category:"SCADA/HMI",description:"Industrial automation and monitoring",icon:"⚙️",connected:!0},{id:"osisoft-pi",name:"OSIsoft PI System",category:"Historian",description:"Real-time data collection and analysis",icon:"📊",connected:!1},{id:"canvas-lms",name:"Canvas LMS",category:"Education",description:"Learning management system",icon:"📚",connected:!1},{id:"blackboard",name:"Blackboard",category:"Education",description:"Course management platform",icon:"🎓",connected:!1},{id:"turnitin",name:"Turnitin",category:"Education",description:"Plagiarism detection tool",icon:"🔍",connected:!1},{id:"panopto",name:"Panopto",category:"Education",description:"Video platform for learning",icon:"🎬",connected:!1},{id:"kaltura",name:"Kaltura",category:"Education",description:"Educational media platform",icon:"📽️",connected:!1},{id:"zoom",name:"Zoom",category:"Education",description:"Virtual classroom solution",icon:"📹",connected:!1},{id:"ms-teams",name:"Microsoft Teams",category:"Education",description:"Collaborative learning platform",icon:"👨‍👩‍👧‍👦",connected:!1},{id:"banner",name:"Banner",category:"Education",description:"Student information system",icon:"👨‍🎓",connected:!1},{id:"peoplesoft",name:"PeopleSoft",category:"Education",description:"Campus management system",icon:"🏫",connected:!1}],x=[{time:"2 min ago",action:"AVEVA Wonderware data sync successful",status:"success"},{time:"5 min ago",action:"Azure AD authentication verified",status:"success"},{time:"12 min ago",action:"Twilio SMS alert sent",status:"info"},{time:"18 min ago",action:"Google Calendar sync attempted",status:"warning"},{time:"25 min ago",action:"OSIsoft PI data collection active",status:"success"}],w=()=>
1385{if(!m){f({title:"Premium Feature",description:"Upgrade your plan to enable Webhooks and API integrations.",action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>d("/pricing"),children:"Upgrade"})});return}o(!0)},N=C=>{C==="slack"&&a(!0)},S=C=>{v(C)},_=C=>{c([...l,C])},k=[{id:"webhook",title:"Create Webhook",description:"Set up incoming webhooks for real-time events",icon:"🪝",color:"from-blue-500/20 to-cyan-500/20",borderColor:"border-blue-500/30"},{id:"rest-api",title:"Add REST API",description:"Connect to external REST APIs and services",icon:"🔌",color:"from-green-500/20 to-emerald-500/20",borderColor:"border-green-500/30"},{id:"custom",title:"Custom Integration",description:"Build a custom API integration from scratch",icon:"⚙️",color:"from-cyber-blue/20 to-electric-blue/20",borderColor:"border-cyber-blue/30"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(lw,{className:"h-6 w-6 text-blue-500"}),"MCP Connectors"]}),s.jsx(nt,{children:"Connect your AI agent with external platforms and services"})]}),s.jsx(se,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:y.map(C=>s.jsxs("div",{className:"group relative glass-effect glass-effect-dark rounded-xl border border-white/20 dark:border-gray-700/30 hover:border-blue-400/50 dark:hover:border-blue-500/50 transition-all duration-300 cursor-pointer ai-glow-hover",onClick:()=>N(C.id),children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/5 to-cyber-blue/5 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex items-start justify-between mb-4",children:[s.jsx("div",{className:"text-3xl",children:C.icon}),s.jsxs("div",{className:"flex items-center gap-2",children:[C.connected?s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}):s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full"}),s.jsx(le,{className:`text-xs ${C.category==="CRM"?"bg-blue-600/20 text-blue-400":C.category==="Authentication"?"bg-green-600/20 text-green-400":C.category==="Productivity"?"bg-cyber-blue/20 text-cyber-blue":C.category==="Commerce"?"bg-orange-600/20 text-orange-400":C.category==="Automation"?"bg-yellow-600/20 text-yellow-400":C.category==="Communication"?"bg-blue-600/20 text-blue-400":C.category==="SCADA/HMI"?"bg-red-600/20 text-red-400":C.category==="Historian"?"bg-indigo-600/20 text-indigo-400":C.category==="Education"?"bg-teal-600/20 text-teal-400":"bg-cyan-600/20 text-cyan-400"}`,children:C.category})]})]}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:C.name}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:C.description}),s.jsx(Y,{variant:C.connected?"outline":"default",size:"sm",className:"w-full glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",onClick:E=>{E.stopPropagation(),N(C.id)},children:C.connected?"Configure":"Connect"})]})]},C.id))})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Yu,{className:"h-6 w-6 text-green-500"}),"API Monitor Dashboard"]}),s.jsx(nt,{children:"Real-time monitoring of your API connections and performance"})]}),s.jsxs(se,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6 mb-8",children:[s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-xl border border-blue-200/30 dark:border-blue-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(lw,{className:"h-5 w-5 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Active Connections"})]}),s.jsx("div",{className:"text-3xl font-bold text-blue-600 dark:text-blue-400",children:e.activeConnections})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-xl border border-green-200/30 dark:border-green-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Ot,{className:"h-5 w-5 text-green-500"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"API Calls Today"})]}),s.jsx("div",{className:"text-3xl font-bold text-green-600 dark:text-green-400",children:e.apiCallsToday.toLocaleStr
1385ing()})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-xl border border-cyber-blue/30 dark:border-cyber-blue/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(fl,{className:"h-5 w-5 text-cyber-blue"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"})]}),s.jsxs("div",{className:"text-3xl font-bold text-cyber-blue dark:text-electric-blue",children:[e.successRate,"%"]})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-xl border border-orange-200/30 dark:border-orange-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx(Ey,{className:"h-5 w-5 text-orange-500"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Avg Response"})]}),s.jsxs("div",{className:"text-3xl font-bold text-orange-600 dark:text-orange-400",children:[e.avgResponseTime,"ms"]})]})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-xl border border-gray-200/30 dark:border-gray-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(Yu,{className:"h-5 w-5 text-gray-500"}),s.jsx("h3",{className:"font-semibold",children:"Recent Activity"})]}),s.jsx("div",{className:"space-y-3",children:x.map((C,E)=>s.jsxs("div",{className:"flex items-center gap-3 p-3 glass-effect glass-effect-dark rounded-lg",children:[s.jsxs("div",{className:"flex-shrink-0",children:[C.status==="success"&&s.jsx(Pe,{className:"h-4 w-4 text-green-500"}),C.status==="warning"&&s.jsx(Xa,{className:"h-4 w-4 text-yellow-500"}),C.status==="info"&&s.jsx(Yu,{className:"h-4 w-4 text-blue-500"})]}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-sm",children:C.action}),s.jsx("p",{className:"text-xs text-muted-foreground",children:C.time})]})]},E))})]})]})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Kt,{className:"h-6 w-6 text-cyber-blue"}),"API Configuration"]}),s.jsx(nt,{children:"Create custom API actions and configure endpoints for your agent"})]}),s.jsx(se,{children:l.length===0?s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center py-8",children:[s.jsx("div",{className:"w-16 h-16 bg-cyber-blue/20 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx(Kt,{className:"h-8 w-8 text-cyber-blue"})}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Create Your First API Action"}),s.jsx("p",{className:"text-muted-foreground mb-6 max-w-md mx-auto",children:"Connect your agent to external APIs, webhooks, and services to extend its capabilities"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:k.map(C=>s.jsxs("div",{className:`group relative glass-effect glass-effect-dark rounded-xl border ${C.borderColor} hover:border-opacity-100 transition-all duration-300 cursor-pointer ai-glow-hover`,onClick:()=>w(),children:[s.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${C.color} rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300`}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex justify-between items-start mb-4",children:[s.jsx("div",{className:"text-4xl",children:C.icon}),!m&&s.jsx(le,{variant:"outline",className:"bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:E=>{E.stopPropagation(),d("/pricing")},children:"Upgrade"})]}),s.jsx("h3",{className:"font-semibold text-lg mb-2",children:C.title}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:C.description}),s.jsx(Y,{size:"sm",className:"w-full glass-effect glass-effect-dark",children:m?"Get Started":"Upgrade to Unlock"})]})]},C.id))}),s.jsx("div",{className:"text-center",children:s.jsxs(Y,{onClick:w,className:"gap-2 bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Create Custom API Action",!m&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})})]}):s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsx("h3",{className:"font-semibold",children:"Your API Actions"}),s.jsxs(Y,{onClick:w,size:"sm",className:"gap-2",children:[s.jsx(Fn,{className:"h-4 w-4"}),"Add Action",!m&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})]}),s.jsx("div",{className:"grid gap-4",children:l.map((C,E)=>{var O;return s.jsx("div",{className:"glass-effect glass-effect-dark rounded-lg border border-white/10",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:C.name}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:[C.method," ",C.url]})]}),s.jsxs(le,{variant:"outline",children:[((O=C.parameters)==null?void 0:O.length)||0," params"]})]})},E)})})]})})]}),s.jsx(Bee,{isOpen:r,onClose:()=>a(!1),agentName:n,onConfigSave:S}),s.jsx(Uee,{isOpen:i,onClose:()=>o(!1),onSave:_})]})},QEe=({config:e,onConfigChange:t})=>{const n=[{value:"stateless",label:"Stateless",description:"No conversation memory"},{value:"session",label:"Session",description:"Remember within session"},{value:"long-term",label:"Long-term",description:"Persistent memory"}],r=[{value:"session-only",label:"Session only"},{value:"24-hours",label:"24 hours"},{value:"7-days",label:"7 days"},{value:"30-days",label:"30 days"},{value:"90-days",label:"90 days"},{value:"1-year",label:"1 year"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(iw,{className:"h-6 w-6 text-purple-500"}),"AI Memory & Processing Engine"]}),s.jsx(nt,{children:"Configure how your agent learns, remembers, and processes information"})]}),s.jsxs(se,{className:"space-y-8",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:[s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium mb-3 block",children:"Memory Architecture"}),s.jsxs(dt,{value:e.memoryType,onValueChange:a=>t({memoryType:a}),children:[s.jsx(ot,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:s.jsx(ft,{})}),s.jsx(lt,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:n.map(a=>s.jsx(me,{value:a.value,children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"font-medium",children:a.label}),s.jsx("span",{className:"text-xs text-muted-foreground",children:a.description})]})},a.value))})]})]}),s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium mb-3 block",children:"Data Retention Policy"}),s.jsxs(dt,{value:e.retentionWindow,onValueChange:a=>t({retentionWindow:a}),children:[s.jsx(ot,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:s.jsx(ft,{})}),s.jsx(lt,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30",children:r.map(a=>s.jsx(me,{value:a.value,children:a.label},a.value))})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-lg border border-blue-200/30 dark:border-blue-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx(lw,{className:"h-5 w-5 text-blue-500"}),s.jsx(de,{className:"text-sm font-medium",children:"Processing Stats"})]}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Memory Usage:"}),s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"12.4 MB"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Response Time:"}
vendor: 4,514 bytes, line 1385
1385),s.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:"~240ms"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-muted-foreground",children:"Accuracy Score:"}),s.jsx("span",{className:"text-purple-600 dark:text-purple-400",children:"97.8%"})]})]})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-lg border border-green-200/30 dark:border-green-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[s.jsx(ur,{className:"h-5 w-5 text-green-500"}),s.jsx(de,{className:"text-sm font-medium",children:"Security Status"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),s.jsx("span",{className:"text-sm text-green-600 dark:text-green-400",children:"Encrypted Private Cloud"})]})]})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{className:"flex items-center justify-between glass-effect glass-effect-dark rounded-lg border border-purple-200/30 dark:border-purple-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(pr,{className:"h-5 w-5 text-purple-500"}),s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium",children:"PII Auto-Masking"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Automatically detect and mask sensitive data"})]})]}),s.jsx(Dt,{checked:e.piiMasking,onCheckedChange:a=>t({piiMasking:a}),className:"data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-purple-600 data-[state=checked]:to-blue-600"})]}),s.jsxs("div",{className:"flex items-center justify-between glass-effect glass-effect-dark rounded-lg border border-blue-200/30 dark:border-blue-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(it,{className:"h-5 w-5 text-blue-500"}),s.jsxs("div",{children:[s.jsx(de,{className:"text-sm font-medium",children:"Advanced Audit Logging"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Comprehensive activity monitoring"})]})]}),s.jsx(Dt,{checked:e.auditLogs,onCheckedChange:a=>t({auditLogs:a}),className:"data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-blue-600 data-[state=checked]:to-purple-600"})]})]}),s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-lg border border-green-200/30 dark:border-green-700/30",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx(it,{className:"h-6 w-6 text-green-500"}),s.jsx(de,{className:"text-lg font-semibold",children:"Enterprise Compliance"})]}),s.jsxs("div",{className:"flex flex-wrap gap-3 mb-4",children:[s.jsx(le,{className:"bg-gradient-to-r from-green-600 to-blue-600 text-white border-0 ai-glow",children:"SOC 2 Type II"}),s.jsx(le,{className:"bg-gradient-to-r from-blue-600 to-purple-600 text-white border-0 ai-glow",children:"HIPAA"}),s.jsx(le,{className:"bg-gradient-to-r from-purple-600 to-pink-600 text-white border-0 ai-glow",children:"GDPR"}),s.jsx(le,{className:"bg-gradient-to-r from-orange-600 to-red-600 text-white border-0 ai-glow",children:"FERPA"})]}),s.jsxs(Y,{variant:"outline",size:"sm",className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 hover:ai-glow",children:[s.jsx(it,{className:"w-4 h-4 mr-2"}),"Configure GDPR Controls"]})]})]})]})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Ot,{className:"h-6 w-6 text-yellow-500"}),"AI Processing Engine"]}),s.jsx(nt,{children:"Select your AI processing architecture and capabilities"})]}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"glass-effect glass-effect-dark border-2 border-blue-300/50 dark:border-blue-700/50 rounded-xl ai-glow",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-blue-600 to-purple-600 rounded-full flex items-center justify-center",children:s.jsx(iw,{className:"h-6 w-6 text-white"})}),s.jsx("div",{className:"absolute -inset-1 bg-blue-500/30 rounded-full blur-sm animate-pulse"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-lg text-blue-600 dar
1385k:text-blue-400",children:"Private Cloud LLM"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Enterprise-grade security & compliance"}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"}),s.jsx("span",{className:"text-xs text-green-600 dark:text-green-400",children:"Active & Optimized"})]})]})]}),s.jsx(Dt,{checked:!0,className:"data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-blue-600 data-[state=checked]:to-purple-600"})]})}),s.jsx("div",{className:"glass-effect glass-effect-dark border border-gray-300/30 dark:border-gray-700/50 rounded-xl",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-gradient-to-r from-gray-400 to-gray-600 rounded-full flex items-center justify-center opacity-60",children:s.jsx(lw,{className:"h-6 w-6 text-white"})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-lg text-muted-foreground",children:"Hybrid Mode"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Enhanced capabilities with external APIs"}),s.jsx("div",{className:"text-xs text-orange-600 dark:text-orange-400 mt-1",children:"Requires additional compliance review"})]})]}),s.jsx(Dt,{checked:!1})]})})]})})]})]})},ZEe=({config:e,onConfigChange:t})=>{const n=[{key:"admins",title:"System Administrators",desc:"Full access to manage and configure all aspects",icon:it,color:"red",checked:!0},{key:"contributors",title:"Content Contributors",desc:"Can edit knowledge base and training data",icon:Gr,color:"blue",checked:!0},{key:"viewers",title:"End Users",desc:"Can interact with and use the AI agent",icon:pr,color:"green",checked:!0},{key:"piiMasking",title:"PII Data Masking",desc:"Automatically mask personally identifiable information",icon:ur,color:"purple",checked:e.piiMasking}];return s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Bn,{className:"h-6 w-6 text-indigo-500"}),"Access Control & Permissions"]}),s.jsx(nt,{children:"Configure who can access, modify, and manage this AI agent"})]}),s.jsx(se,{className:"space-y-8",children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:n.map(({key:r,title:a,desc:i,icon:o,color:l,checked:c})=>s.jsx("div",{className:`p-6 glass-effect glass-effect-dark rounded-xl border border-${l}-200/30 dark:border-${l}-700/30`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:`w-12 h-12 bg-gradient-to-r from-${l}-500 to-${l}-600 rounded-full flex items-center justify-center`,children:s.jsx(o,{className:"h-6 w-6 text-white"})}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-lg",children:a}),s.jsx("div",{className:"text-sm text-muted-foreground",children:i})]})]}),s.jsx(Dt,{checked:r==="piiMasking"?e.piiMasking:c,onCheckedChange:u=>{r==="piiMasking"&&t({piiMasking:u})},className:`data-[state=checked]:bg-gradient-to-r data-[state=checked]:from-${l}-600 data-[state=checked]:to-${l}-700`})]})},r))})})]})})},JEe=({agentData:e})=>{const[t,n]=b.useState([]),[r,a]=b.useState(""),[i,o]=b.useState(!1),l=b.useRef(null),c=["How do I check chlorine residuals correctly?","What should I do if pH is out of range?","Walk me through the daily startup procedure","Help me understand turbidity readings"];b.useEffect(()=>{const m={id:"welcome",content:`Hi! I'm ${e.name}, your AI assistant for ${e.purpose.toLowerCase()}. I know all your plant's procedures and can help with everything from daily checks to emergency responses. What would you like help with today?`,isUser:!1,timestamp:new Date};n([m])},[e.name,e.purpose]),b.useEffect(()=>{var m;(m=l.current)==null||m.scrollIntoView({behavior:"smooth"})},[t]);const u=m=>`Great question about ${m.toLowerCase()}! Here's the step-by-step process I recommend:
1386
13871. **Safety First**: Always check that safety equipment is in place
13882. **Take Initial Readings**: Record baseline measurements 
13893. **Follow SOP Guidelines**: I'll walk you through each step
13904. **Document Everything**: I'll help you create the compliance report
1391
1392Would you like me to go deeper into any of these steps?`,d=async m=>{const p=m||r;if(!p.trim())return;const v={id:Date.now().toString(),content:p,isUser:!0,timestamp:new Date};n(y=>[...y,v]),a(""),o(!0),setTimeout(()=>{const y={id:(Date.now()+1).toString(),content:u(p),isUser:!1,timestamp:new Date};n(x=>[...x,y]),o(!1)},1500)},f=m=>{m.key==="Enter"&&d()};return s.jsxs("div",{className:"h-[75vh] flex flex-col",children:[s.jsxs("div",{className:"flex items-center gap-3 p-4 border-b bg-gradient-to-r from-white to-gray-50 dark:from-gray-800 dark:to-gray-900",children:[e.logoUrl?s.jsx("img",{src:e.logoUrl,alt:"Agent logo",className:"h-10 w-10 object-cover rounded-full"}):s.jsx("div",{className:"h-10 w-10 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{backgroundColor:e.primaryColor},children:e.name.charAt(0)}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-lg",children:e.name}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 flex items-center gap-1",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"Online • ",e.purpose]})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[t.map(m=>s.jsx("div",{className:`flex ${m.isUser?"justify-end":"justify-start"}`,children:s.jsx("div",{className:`max-w-[80%] p-3 rounded-2xl ${m.isUser?"text-white rounded-br-sm":"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100 rounded-bl-sm"}`,style:m.isUser?{backgroundColor:e.primaryColor}:{},children:s.jsx("div",{className:"whitespace-pre-line",children:m.content})})},m.id)),i&&s.jsx("div",{className:"flex justify-start",children:s.jsx("div",{className:"bg-gray-100 dark:bg-gray-800 p-3 rounded-2xl rounded-bl-sm",children:s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})}),s.jsx("div",{ref:l})]}),t.length<=2&&s.jsxs("div",{className:"px-4 pb-2",children:[s.jsxs("p",{className:"text-xs text-gray-500 mb-2 flex items-center gap-1",children:[s.jsx(ws,{className:"h-3 w-3"}),"Try asking about real water treatment scenarios:"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:c.map((m,p)=>s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>d(m),className:"text-sm hover:bg-gray-50 dark:hover:bg-gray-800 border-gray-200 dark:border-gray-700",children:m},p))})]}),s.jsx("div",{className:"border-t p-4",children:s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(_e,{type:"text",placeholder:`Ask ${e.name} about water treatment procedures...`,value:r,onChange:m=>a(m.target.value),onKeyDown:f,className:"flex-1"}),s.jsx(Y,{onClick:()=>d(),style:{backgroundColor:e.primaryColor},className:"text-white px-6",disabled:!r.trim(),children:s.jsx(Hm,{className:"h-4 w-4"})})]})})]})},Hee=({agentData:e})=>{const[t,n]=b.useState(!1),[r,a]=b.useState(!1),[i,o]=b.useState({webWidget:0,slack:25,api:60}),{toast:l}=_t(),c=()=>{o(f=>({...f,webWidget:100}
1392)),l({title:"🚀 Web Widget Deployed!",description:"Your agent is now live on your website. Integration code has been generated.",duration:4e3})},u=f=>{o(m=>({...m,slack:100})),l({title:"✅ Slack Bot Connected!",description:"Your agent is now active in your Slack workspace.",duration:4e3})},d=f=>{o(m=>({...m,api:100})),l({title:"🔌 API Endpoint Created!",description:"Your agent API is now ready for integration.",duration:4e3})};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("h2",{className:"text-2xl font-bold mb-2",children:["Deploy ",e.name]}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Choose how you want to make your agent available to users"})]}),s.jsxs("div",{className:"grid grid-cols-1 gap-6",children:[s.jsxs(te,{className:"border-2 hover:border-blue-300 transition-all duration-300 cursor-pointer group",children:[s.jsxs(xe,{className:"pb-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-blue-100 dark:bg-blue-900/30 rounded-xl flex items-center justify-center",children:s.jsx(bs,{className:"h-6 w-6 text-blue-600"})}),s.jsxs("div",{children:[s.jsxs(we,{className:"text-xl flex items-center gap-2",children:["Web Widget",i.webWidget===100&&s.jsx(Pe,{className:"h-5 w-5 text-green-500"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Add a chat widget to your website for instant customer support"})]})]}),s.jsx(le,{variant:"outline",className:"text-xs",children:i.webWidget===100?"Active":"Ready"})]}),i.webWidget>0&&i.webWidget<100&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-xs text-gray-600",children:[s.jsx("span",{children:"Setup Progress"}),s.jsxs("span",{children:[i.webWidget,"%"]})]}),s.jsx(qr,{value:i.webWidget,className:"h-2"})]})]}),s.jsxs(se,{className:"pt-0",children:[s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg mb-4",children:[s.jsxs("div",{className:"font-mono text-sm text-gray-700 dark:text-gray-300",children:["chat.",e.name.toLowerCase().replace(/\s+/g,""),".com"]}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:"Embeddable script ready • 5-minute setup"})]}),s.jsxs(Y,{onClick:c,className:"w-full",style:{backgroundColor:e.primaryColor},disabled:i.webWidget===100,children:[i.webWidget===100?"View Integration Code":"Deploy Web Widget",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})]}),s.jsxs(te,{className:"border-2 hover:border-purple-300 transition-all duration-300 cursor-pointer group",children:[s.jsxs(xe,{className:"pb-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-purple-100 dark:bg-purple-900/30 rounded-xl flex items-center justify-center",children:s.jsx(di,{className:"h-6 w-6 text-purple-600"})}),s.jsxs("div",{children:[s.jsxs(we,{className:"text-xl flex items-center gap-2",children:["Slack Bot",i.slack===100&&s.jsx(Pe,{className:"h-5 w-5 text-green-500"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Deploy as a Slack bot with full workspace integration"})]})]}),s.jsx(le,{variant:"outline",className:"text-xs",children:i.slack===100?"Connected":`${i.slack}% Setup`})]}),i.slack>0&&i.slack<100&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-xs text-gray-600",children:[s.jsx("span",{children:"Configuration Progress"}),s.jsxs("span",{children:[i.slack,"%"]})]}),s.jsx(qr,{value:i.slack,className:"h-2"})]})]}),s.jsxs(se,{className:"pt-0",children:[s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg mb-4",children:[s.jsxs("div",{className:"font-mono text-sm text-gray-700 dark:text-gray-300",children:["@",e.name.toLowerCase().replace(/\s+/g,"")]}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:i.slack===100?"Active in workspace • Ready for @mentions":"Multi-step setup • OAuth & permissions"})]}),s.jsx(Y,{onClick:()=>n(!0),variant:"outline",className:"w-full border-purple-300 text-purple-700 hover:bg-purple-50 group-hover:bg-purple-50",children:i.slack===100?s.jsxs(s.Fragment,{children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Manage Slack Integration"]}):s.jsxs(s.Fragment,{children:["Continue Setup",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})})]})]}),s.jsxs(te,{className:"border-2 hover:border-green-300 transition-all duration-300 cursor-pointer group",children:[s.jsxs(xe,{className:"pb-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-12 h-12 bg-green-100 dark:bg-green-900/30 rounded-xl flex items-center justify-center",children:s.jsx(Ot,{className:"h-6 w-6 text-green-600"})}),s.jsxs("div",{children:[s.jsxs(we,{className:"text-xl flex items-center gap-2",children:["API Access",i.api===100&&s.jsx(Pe,{className:"h-5 w-5 text-green-500"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Programmatic access with custom endpoints and workflows"})]})]}),s.jsx(le,{variant:"outline",className:"text-xs",children:i.api===100?"Live":`${i.api}% Setup`})]}),i.api>0&&i.api<100&&s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-xs text-gray-600",children:[s.jsx("span",{children:"API Configuration"}),s.jsxs("span",{children:[i.api,"%"]})]}),s.jsx(qr,{value:i.api,className:"h-2"})]})]}),s.jsxs(se,{className:"pt-0",children:[s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg mb-4",children:[s.jsx("div",{className:"font-mono text-sm text-gray-700 dark:text-gray-300",children:"api.yourdomain.com/v1/agent"}),s.jsx("div",{className:"text-xs text-gray-500 mt-1",children:i.api===100?"REST API • Authentication enabled • Rate limiting active":"Advanced configuration • Custom actions • Webhooks"})]}),s.jsx(Y,{onClick:()=>a(!0),variant:"outline",className:"w-full border-green-300 text-green-700 hover:bg-green-50 group-hover:bg-green-50",children:i.api===100?s.jsxs(s.Fragment,{children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Manage API Configuration"]}
1392):s.jsxs(s.Fragment,{children:["Configure API Access",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})})]})]})]}),s.jsx(te,{className:"bg-gradient-to-r from-green-50 to-blue-50 dark:from-green-900/20 dark:to-blue-900/20 border-green-200",children:s.jsxs(se,{className:"p-4 text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(Pe,{className:"h-5 w-5 text-green-600"}),s.jsx("span",{className:"font-medium text-green-800 dark:text-green-300",children:"Enterprise-Ready Deployment Options"})]}),s.jsx("p",{className:"text-sm text-green-700 dark:text-green-400",children:"Your agent supports multiple deployment methods with advanced configuration, monitoring, and security features."})]})}),s.jsx(Bee,{isOpen:t,onClose:()=>n(!1),agentName:e.name,onConfigSave:u}),s.jsx(Uee,{isOpen:r,onClose:()=>a(!1),onSave:d})]})},ePe=({agentConfig:e,brandingConfig:t,smartTemplates:n=[],agentData:r,onAdvancedBuilder:a})=>{const[i,o]=b.useState("test");return s.jsxs("div",{className:"space-y-6 pb-8",children:[s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsx(xe,{className:"text-center",children:s.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[r.logoUrl?s.jsx("img",{src:r.logoUrl,alt:"Agent logo",className:"h-12 w-12 object-cover rounded-full"}):s.jsx("div",{className:"h-12 w-12 rounded-full flex items-center justify-center text-white font-bold text-lg",style:{backgroundColor:r.primaryColor},children:r.name.charAt(0)}),s.jsxs("div",{className:"text-left",children:[s.jsxs(we,{className:"text-2xl flex items-center gap-2",children:[r.name,s.jsx(wr,{variant:"compact",size:"small"})]}),s.jsx("p",{className:"text-blue-600 dark:text-blue-400 font-medium",children:r.purpose})]})]})})}),s.jsxs(os,{value:i,onValueChange:o,className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-2 mb-6 h-12",children:[s.jsxs(at,{value:"test",className:"flex items-center gap-2 text-base",children:[s.jsx(ex,{className:"h-4 w-4"}),"Test Your Agent"]}),s.jsxs(at,{value:"deploy",className:"flex items-center gap-2 text-base",children:[s.jsx(wX,{className:"h-4 w-4"}),"Deploy Live"]})]}),s.jsx(Ze,{value:"test",className:"mt-0",children:s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{className:"p-0",children:s.jsx(JEe,{agentData:r})})})}),s.jsx(Ze,{value:"deploy",className:"mt-0",children:s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{children:s.jsx(Hee,{agentData:r})})})})]}),s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsx(se,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(wr,{variant:"compact",size:"small"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium",children:"Ready for the full platform?"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"SCADA integration, team management, advanced workflows, and enterprise deployment"})]})]}),s.jsxs(Y,{variant:"outline",onClick:a,className:"border-blue-300 text-blue-700 hover:bg-blue-50 dark:border-blue-700 dark:text-blue-300 dark:hover:bg-blue-900/20",children:["Advanced Mode",s.jsx(Bt,{className:"h-4 w-4 ml-1"})]})]})})})]})},tPe=()=>{const[e,t]=b.useState({visitedTabs:new Set(["basics"]),fieldInteractions:new Set,completedSections:new Set,lastActiveTab:"basics",timeSpentPerTab:{}}),[n,r]=b.useState(Date.now()),a=b.useCallback(u=>{t(d=>{const f=Date.now()-n,m={...d.timeSpentPerTab,[d.lastActiveTab]:(d.timeSpentPerTab[d.lastActiveTab]||0)+f};return{...d,visitedTabs:new Set([...d.visitedTabs,u]),lastActiveTab:u,timeSpentPerTab:m}}),r(Date.now())},[n]),i=b.useCallback((u,d=!0)=>{t(f=>({...f,fieldInteractions:new Set([...f.fieldInteractions,u])}))},[]),o=b.useCallback(u=>{t(d=>({...d,completedSections:new Set([...d.completedSections,u])}))},[]),l=b.useCallback((u,d,f,m)=>{var x,w,N,S;const p=new Set;(x=u.name)!=null&&x.trim()&&((w=u.purpose)!=null&&w.trim())&&p.add("basics"),((N=d.companyName)!=null&&N.trim()||(S=d.logoUrl)!=null&&S.trim())&&p.add("branding"),f.length>0&&p.add("knowledge"),(m.mcpConnectors.length>0||m.apiEndpoints.length>0||m.webhooks.length>0)&&p.add("apis"),(e.fieldInteractions.has("memoryType")||e.fieldInteractions.has("retentionWindow"))&&p.add("memory"),(e.fieldInteractions.has("piiMasking")||e.fieldInteractions.has("auditLogs"))&&p.add("permissions"),p.size>=3&&p.add("review");const v=Array.from(e.completedSections).sort(),y=Array.from(p).sort();return JSON.stringify(v)!==JSON.stringify(y)&&t(_=>({..._,completedSections:p})),p},[e.fieldInteractions,e.completedSections]),c=b.useCallback((u,d,f,m)=>{l(u,d,f,m);let p=0;const v=100,y={basics:20,branding:15,knowledge:15,apis:15,memory:15,permissions:10,review:10},x=Math.min(100,(u.name?40:0)+(u.purpose?40:0)+(e.fieldInteractions.has("category")?10:0)+(e.fieldInteractions.has("tone")?10:0));p+=x/100*y.basics;const w=Math.min(100,(d.companyName?30:0)+(d.logoUrl?25:0)+(e.fieldInteractions.has("primaryColor")?20:0)+(e.fieldInteractions.has("secondaryColor")?15:0)+(d.customDomain?10:0));p+=w/100*y.branding;const N=f.length>0?100:0;p+=N/100*y.knowledge;const S=m.mcpConnectors.length>0||m.apiEndpoints.length>0||m.webhooks.length>0?100:0;p+=S/100*y.apis;const _=e.fieldInteractions.has("memoryType")||e.fieldInteractions.has("retentionWindow")?100:0;p+=_/100*y.memory;const k=e.fieldInteractions.has("piiMasking")||e.fieldInteractions.has("auditLogs")?100:0;p+=k/100*y.permissions;const C=p>=40?100:0;return p+=C/100*y.review,Math.min(p,v)},[e,l]);return{progressState:e,trackTabVisit:a,trackFieldInteraction:i,markSectionComplete:o,calculateProgress:c}},L2="lovable_agents",qee=()=>{const[e,t]=b.useState([]),n=b.useCallback(()=>{try{const l=localStorage.getItem(L2);if(l){const u=JSON.parse(l).map(d=>({...d,metadata:{...d.metadata,createdAt:new Date(d.metadata.createdAt),lastModified:new Date(d.metadata.lastModified)}}));return t(u),u}}catch(l){console.error("Failed to load agents from storage:",l)}return[]},[]),r=b.useCallback((l,c,u=0)=>{try{const d=n(),f=new Date;let m;if(c){const p=d.findIndex(v=>v.metadata.id===c);if(p>=0)m={...d[p],...l,metadata:{...d[p].metadata,name:l.agentConfig.name||"Unnamed Agent",lastModified:f,completionPercentage:u,status:u>=100?"complete":u>0?"in-progress":"draft"}},d[p]=m;else throw new Error("Agent not found")}else{const p=`agent_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;m={metadata:{id:p,name:l.agentConfig.name||"New Agent",status:u>=100?"complete":u>0?"in-progress":"draft",createdAt:f,lastModified:f,completionPercentage:u},...l},d.push(m),c=p}return localStorage.setItem(L2,JSON.stringify(d)),t(d),c}catch(d){throw console.error("Failed to save agent:",d),d}},[n]),a=b.useCallback(l=>n().find(u=>u.metadata.id===l)||null,[n]),i=b.useCallback(l=>{try{const u=n().filter(d=>d.metadata.id!==l);localStorage.setItem(L2,JSON.stringify(u)),t(u)}catch(c){console.error("Failed to delete agent:",c)}},[n]),o=b.useCallback(l=>{const c=a(l);if(!c)throw new Error("Source agent not found");const u={agentConfig:{...c.agentConfig,name:`${c.agentConfig.name} (Copy)`},brandingConfig:{...c.brandingConfig},knowledgeSources:[...c.knowledgeSources],apiConfig:{...c.apiConfig}};return r(u)},[a,r]);return b.useEffect(()=>{n()},[n]),{agents:e,saveAgent:r,loadAgent:a,deleteAgent:i,duplicateAgent:o,loadAgents:n}},nPe=(e,t=2e3,n=0,r)=>{const[a,i]=b.useState({isSaving:!1,lastSaved:null,hasUnsavedChanges:!1,agentId:r||null}),{toast:o}=_t(),{saveAgent:l}
vendor: 14,496 bytes, line 1392
1392=qee(),c=b.useCallback(async()=>{i(f=>({...f,isSaving:!0}));try{const f=l(e,a.agentId||void 0,n);return i(m=>({...m,isSaving:!1,lastSaved:new Date,hasUnsavedChanges:!1,agentId:f})),o({description:"Changes saved automatically",duration:2e3}),f}catch(f){throw i(m=>({...m,isSaving:!1})),o({description:"Failed to save changes",variant:"destructive",duration:3e3}),f}},[e,a.agentId,n,l,o]);b.useEffect(()=>{if(!a.hasUnsavedChanges)return;const f=setTimeout(c,t);return()=>clearTimeout(f)},[e,c,t,a.hasUnsavedChanges]);const u=b.useCallback(()=>{i(f=>({...f,hasUnsavedChanges:!0}))},[]),d=b.useCallback(async()=>await c(),[c]);return{autoSaveState:a,markAsChanged:u,saveData:c,forceSave:d}},rPe=({isComplete:e,isActive:t,hasInteraction:n,label:r,progress:a=0})=>{const o=e?"complete":n?"inProgress":"notStarted";return s.jsxs(Gt.div,{className:"flex items-center gap-2",initial:{scale:.9,opacity:.7},animate:{scale:t?1.05:1,opacity:o==="complete"?1:o==="inProgress"?.9:.7},transition:{duration:.2},children:[s.jsx(Gt.div,{animate:{rotate:e?360:0,scale:e?1.1:1},transition:{duration:.5},children:o==="complete"?s.jsx(Pe,{className:"h-4 w-4 text-green-500"}):o==="inProgress"?s.jsx(zn,{className:"h-4 w-4 text-orange-500"}):s.jsx(wr,{variant:"compact",size:"small",animated:!1,className:"h-4 w-4 opacity-60"})}),s.jsx("span",{className:`text-sm ${o==="complete"?"text-green-600 font-medium":o==="inProgress"?"text-orange-600 font-medium":"text-gray-500"}`,children:r}),a>0&&a<100&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",Math.round(a),"%)"]})]})};function _r(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=_r(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var sPe={value:()=>{}};function z1(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Rb(n)}function Rb(e){this._=e}function aPe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",a=n.indexOf(".");if(a>=0&&(r=n.slice(a+1),n=n.slice(0,a)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Rb.prototype=z1.prototype={constructor:Rb,on:function(e,t){var n=this._,r=aPe(e+"",n),a,i=-1,o=r.length;if(arguments.length<2){for(;++i<o;)if((a=(e=r[i]).type)&&(a=iPe(n[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<o;)if(a=(e=r[i]).type)n[a]=m8(n[a],e.name,t);else if(t==null)for(a in n)n[a]=m8(n[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Rb(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var n=new Array(a),r=0,a,i;r<a;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,a=i.length;r<a;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],a=0,i=r.length;a<i;++a)r[a].value.apply(t,n)}};function iPe(e,t){for(var n=0,r=e.length,a;n<r;++n)if((a=e[n]).name===t)return a.value}function m8(e,t,n){for(var r=0,a=e.length;r<a;++r)if(e[r].name===t){e[r]=sPe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var e4="http://www.w3.org/1999/xhtml";const p8={svg:"http://www.w3.org/2000/svg",xhtml:e4,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function B1(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),p8.hasOwnProperty(t)?{space:p8[t],local:e}:e}function oPe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===e4&&t.documentElement.namespaceURI===e4?t.createElement(e):t.createElementNS(n,e)}}function lPe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Vee(e){var t=B1(e);return(t.local?lPe:oPe)(t)}function cPe(){}function cR(e){return e==null?cPe:function(){return this.querySelector(e)}}function uPe(e){typeof e!="function"&&(e=cR(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,l=r[a]=new Array(o),c,u,d=0;d<o;++d)(c=i[d])&&(u=e.call(c,c.__data__,d,i))&&("__data__"in c&&(u.__data__=c.__data__),l[d]=u);return new Ea(r,this._parents)}function dPe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function fPe(){return[]}function Wee(e){return e==null?fPe:function(){return this.querySelectorAll(e)}}function hPe(e){return function(){return dPe(e.apply(this,arguments))}}function mPe(e){typeof e=="function"?e=hPe(e):e=Wee(e);for(var t=this._groups,n=t.length,r=[],a=[],i=0;i<n;++i)for(var o=t[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(r.push(e.call(c,c.__data__,u,o)),a.push(c));return new Ea(r,a)}function Gee(e){return function(){return this.matches(e)}}function Kee(e){return function(t){return t.matches(e)}}var pPe=Array.prototype.find;function gPe(e){return function(){return pPe.call(this.children,e)}}function xPe(){return this.firstElementChild}function yPe(e){return this.select(e==null?xPe:gPe(typeof e=="function"?e:Kee(e)))}var vPe=Array.prototype.filter;function bPe(){return Array.from(this.children)}function wPe(e){return function(){return vPe.call(this.children,e)}}function jPe(e){return this.selectAll(e==null?bPe:wPe(typeof e=="function"?e:Kee(e)))}function NPe(e){typeof e!="function"&&(e=Gee(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,l=r[a]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Ea(r,this._parents)}function Yee(e){return new Array(e.length)}function SPe(){return new Ea(this._enter||this._groups.map(Yee),this._parents)}function kw(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}kw.prototype={constructor:kw,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function kPe(e){return function(){return e}}function CPe(e,t,n,r,a,i){for(var o=0,l,c=t.length,u=i.length;o<u;++o)(l=t[o])?(l.__data__=i[o],r[o]=l):n[o]=new kw(e,i[o]);for(;o<c;++o)(l=t[o])&&(a[o]=l)}function _Pe(e,t,n,r,a,i,o){var l,c,u=new Map,d=t.length,f=i.length,m=new Array(d),p;for(l=0;l<d;++l)(c=t[l])&&(m[l]=p=o.call(c,c.__data__,l,t)+"",u.has(p)?a[l]=c:u.set(p,c));for(l=0;l<f;++l)p=o.call(e,i[l],l,i)+"",(c=u.get(p))?(r[l]=c,c.__data__=i[l],u.delete(p)):n[l]=new kw(e,i[l]);for(l=0;l<d;++l)(c=t[l])&&u.get(m[l])===c&&(a[l]=c)}function APe(e){return e.__data__}function EPe(e,t){if(!arguments.length)return Array.from(this,APe);var n=t?_Pe:CPe,r=this._parents,a=this._groups;typeof e!="function"&&(e=kPe(e));for(var i=a.length,o=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var d=r[u],f=a[u],m=f.length,p=PPe(e.call(d,d&&d.__data__,u,r)),v=p.length,y=l[u]=new Array(v),x=o[u]=new Array(v),w=c[u]=new Array(m);n(d,f,y,x,w,p,t);for(var N=0,S=0,_,k;N<v;++N)if(_=y[N]){for(N>=S&&(S=N+1);!(k=x[S])&&++S<v;);_._next=k||null}}return o=new Ea(o,r),o._enter=l,o._exit=c,o}function PPe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function TPe(){return new Ea(this._exit||this._groups.map(Yee),this._parents)}function IPe(e,t,n){var r=this.enter(),a=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),n==null?i.remove():n(i),r&&a?r.merge(a).order():a}function OPe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,a=n.length,i=r.length,o=Math.min(a,i),l=new Array(a),c=0;c<o;++c)for(var u=n[c],d=r[c],f=u.length,m=l[c]=new Array(f),p,v=0;v<f;++v)(p=u[v]||d[v])&&(m[v]=p);for(;c<a;++c)l[c]=n[c];return new Ea(l,this._parents)}function MPe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],a=r.length-1,i=r[a],o;--a>=0;)(o=r[a])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function RPe(e){e||(e=DPe);function t(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var n=this._groups,r=n.length,a=new Array(r),i=0;i<r;++i){for(var o=n[i],l=o.length,c=a[i]=new Array(l),u,d=0;d<l;++d)(u=o[d])&&(c[d]=u);c.sort(t)}return new Ea(a,this._parents).order()}function DPe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function LPe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function $Pe(){return Array.from(this)}function FPe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length;a<i;++a){var o=r[a];if(o)return o}return null}function zPe(){let e=0;for(const t of this)++e;return e}function BPe(){return!this.node()}function UPe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var a=t[n],i=0,o=a.length,l;i<o;++i)(l=a[i])&&e.call(l,l.__data__,i,a);return this}function HPe(e){return function(){this.removeAttribute(e)}}function qPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VPe(e,t){return function(){this.setAttribute(e,t)}}function WPe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function GPe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function KPe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function YPe(e,t){var n=B1(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?qPe:HPe:typeof t=="function"?n.local?KPe:GPe:n.local?WPe:VPe)(n,t))}function Xee(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function XPe(e){return function(){this.style.removeProperty(e)}}function QPe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ZPe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function JPe(e,t,n){return arguments.length>1?this.each((t==null?XPe:typeof t=="function"?ZPe:QPe)(e,t,n??"")):Vh(this.node(),e)}function Vh(e,t){return e.style.getPropertyValue(t)||Xee(e).getComputedStyle(e,null).getPropertyValue(t)}function eTe(e){return function(){delete this[e]}}function tTe(e,t){return function(){this[e]=t}}function nTe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function rTe(e,t){return arguments.length>1?this.each((t==null?eTe:typeof t=="function"?nTe:tTe)(e,t)):this.node()[e]}function Qee(e){return e.trim().split(/^|\s+/)}function uR(e){return e.classList||new Zee(e)}function Zee(e){this._node=e,this._names=Qee(e.getAttribute("class")||"")}Zee.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Jee(e,t){for(var n=uR(e),r=-1,a=t.length;++r<a;)n.add(t[r])}function ete(e,t){for(var n=uR(e),r=-1,a=t.length;++r<a;)n.remove(t[r])}function sTe(e){return function(){Jee(this,e)}}function aTe(e){return function(){ete(this,e)}}function iTe(e,t){return function(){(t.apply(this,arguments)?Jee:ete)(this,e)}}function oTe(e,t){var n=Qee(e+"");if(arguments.length<2){for(var r=uR(this.node()),a=-1,i=n.length;++a<i;)if(!r.contains(n[a]))return!1;return!0}return this.each((typeof t=="function"?iTe:t?sTe:aTe)(n,t))}function lTe(){this.textContent=""}function cTe(e){return function(){this.textContent=e}}function uTe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function dTe(e){return arguments.length?this.each(e==null?lTe:(typeof e=="function"?uTe:cTe)(e)):this.node().textContent}function fTe(){this.innerHTML=""}function hTe(e){return function(){this.innerHTML=e}}function mTe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function pTe(e){return arguments.length?this.each(e==null?fTe:(typeof e=="function"?mTe:hTe)(e)):this.node().innerHTML}function gTe(){this.nextSibling&&this.parentNode.appendChild(this)}function xTe(){return this.each(gTe)}function yTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function vTe(){return this.each(yTe)}function bTe(e){var t=typeof e=="function"?e:Vee(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function wTe(){return null}function jTe(e,t){var n=typeof e=="function"?e:Vee(e),r=t==null?wTe:typeof t=="function"?t:cR(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function NTe(){var e=this.parentNode;e&&e.removeChild(this)}function STe(){return this.each(NTe)}function kTe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function CTe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _Te(e){return this.select(e?CTe:kTe)}function ATe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ETe(e){return function(t){e.call(this,t,this.__data__)}}function PTe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function TTe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,a=t.length,i;n<a;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function ITe(e,t,n){return function(){var r=this.__on,a,i=ETe(t);if(r){for(var o=0,l=r.length;o<l;++o)if((a=r[o]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=t;return}}this.addEventListener(e.type,i,n),a={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(a):this.__on=[a]}}function OTe(e,t,n){var r=PTe(e+""),a,i=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,d;c<u;++c)for(a=0,d=l[c];a<i;++a)if((o=r[a]).type===d.type&&o.name===d.name)return d.value}return}for(l=t?ITe:TTe,a=0;a<i;++a)this.each(l(r[a],t,n));return this}
vendor: 40,622 bytes, line 1392
1392function tte(e,t,n){var r=Xee(e),a=r.CustomEvent;typeof a=="function"?a=new a(t,n):(a=r.document.createEvent("Event"),n?(a.initEvent(t,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function MTe(e,t){return function(){return tte(this,e,t)}}function RTe(e,t){return function(){return tte(this,e,t.apply(this,arguments))}}function DTe(e,t){return this.each((typeof t=="function"?RTe:MTe)(e,t))}function*LTe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],a=0,i=r.length,o;a<i;++a)(o=r[a])&&(yield o)}var nte=[null];function Ea(e,t){this._groups=e,this._parents=t}function $y(){return new Ea([[document.documentElement]],nte)}function $Te(){return this}Ea.prototype=$y.prototype={constructor:Ea,select:uPe,selectAll:mPe,selectChild:yPe,selectChildren:jPe,filter:NPe,data:EPe,enter:SPe,exit:TPe,join:IPe,merge:OPe,selection:$Te,order:MPe,sort:RPe,call:LPe,nodes:$Pe,node:FPe,size:zPe,empty:BPe,each:UPe,attr:YPe,style:JPe,property:rTe,classed:oTe,text:dTe,html:pTe,raise:xTe,lower:vTe,append:bTe,insert:jTe,remove:STe,clone:_Te,datum:ATe,on:OTe,dispatch:DTe,[Symbol.iterator]:LTe};function wa(e){return typeof e=="string"?new Ea([[document.querySelector(e)]],[document.documentElement]):new Ea([[e]],nte)}function FTe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ci(e,t){if(e=FTe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const zTe={passive:!1},hx={capture:!0,passive:!1};function $2(e){e.stopImmediatePropagation()}function lh(e){e.preventDefault(),e.stopImmediatePropagation()}function rte(e){var t=e.document.documentElement,n=wa(e).on("dragstart.drag",lh,hx);"onselectstart"in t?n.on("selectstart.drag",lh,hx):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ste(e,t){var n=e.document.documentElement,r=wa(e).on("dragstart.drag",null);t&&(r.on("click.drag",lh,hx),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Hv=e=>()=>e;function t4(e,{sourceEvent:t,subject:n,target:r,identifier:a,active:i,x:o,y:l,dx:c,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}t4.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function BTe(e){return!e.ctrlKey&&!e.button}function UTe(){return this.parentNode}function HTe(e,t){return t??{x:e.x,y:e.y}}function qTe(){return navigator.maxTouchPoints||"ontouchstart"in this}function ate(){var e=BTe,t=UTe,n=HTe,r=qTe,a={},i=z1("start","drag","end"),o=0,l,c,u,d,f=0;function m(_){_.on("mousedown.drag",p).filter(r).on("touchstart.drag",x).on("touchmove.drag",w,zTe).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(_,k){if(!(d||!e.call(this,_,k))){var C=S(this,t.call(this,_,k),_,k,"mouse");C&&(wa(_.view).on("mousemove.drag",v,hx).on("mouseup.drag",y,hx),rte(_.view),$2(_),u=!1,l=_.clientX,c=_.clientY,C("start",_))}}function v(_){if(lh(_),!u){var k=_.clientX-l,C=_.clientY-c;u=k*k+C*C>f}a.mouse("drag",_)}function y(_){wa(_.view).on("mousemove.drag mouseup.drag",null),ste(_.view,u),lh(_),a.mouse("end",_)}function x(_,k){if(e.call(this,_,k)){var C=_.changedTouches,E=t.call(this,_,k),O=C.length,P,R;for(P=0;P<O;++P)(R=S(this,E,_,k,C[P].identifier,C[P]))&&($2(_),R("start",_,C[P]))}}function w(_){var k=_.changedTouches,C=k.length,E,O;for(E=0;E<C;++E)(O=a[k[E].identifier])&&(lh(_),O("drag",_,k[E]))}function N(_){var k=_.changedTouches,C=k.length,E,O;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),E=0;E<C;++E)(O=a[k[E].identifier])&&($2(_),O("end",_,k[E]))}function S(_,k,C,E,O,P){var R=i.copy(),T=Ci(P||C,k),D,z,I;if((I=n.call(_,new t4("beforestart",{sourceEvent:C,target:m,identifier:O,active:o,x:T[0],y:T[1],dx:0,dy:0,dispatch:R}),E))!=null)return D=I.x-T[0]||0,z=I.y-T[1]||0,function F(U,H,q){var B=T,L;switch(U){case"start":a[O]=F,L=o++;break;case"end":delete a[O],--o;case"drag":T=Ci(q||H,k),L=o;break}R.call(U,_,new t4(U,{sourceEvent:H,subject:I,target:m,identifier:O,active:L,x:T[0]+D,y:T[1]+z,dx:T[0]-B[0],dy:T[1]-B[1],dispatch:R}),E)}}return m.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Hv(!!_),m):e},m.container=function(_){return arguments.length?(t=typeof _=="function"?_:Hv(_),m):t},m.subject=function(_){return arguments.length?(n=typeof _=="function"?_:Hv(_),m):n},m.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:Hv(!!_),m):r},m.on=function(){var _=i.on.apply(i,arguments);return _===i?m:_},m.clickDistance=function(_){return arguments.length?(f=(_=+_)*_,m):Math.sqrt(f)},m}function dR(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ite(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Fy(){}var mx=.7,Cw=1/mx,ch="\\s*([+-]?\\d+)\\s*",px="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",co="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",VTe=/^#([0-9a-f]{3,8})$/,WTe=new RegExp(`^rgb\\(${ch},${ch},${ch}\\)$`),GTe=new RegExp(`^rgb\\(${co},${co},${co}\\)$`),KTe=new RegExp(`^rgba\\(${ch},${ch},${ch},${px}\\)$`),YTe=new RegExp(`^rgba\\(${co},${co},${co},${px}\\)$`),XTe=new RegExp(`^hsl\\(${px},${co},${co}\\)$`),QTe=new RegExp(`^hsla\\(${px},${co},${co},${px}\\)$`),g8={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};dR(Fy,xd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x8,formatHex:x8,formatHex8:ZTe,formatHsl:JTe,formatRgb:y8,toString:y8});function x8(){return this.rgb().formatHex()}function ZTe(){return this.rgb().formatHex8()}function JTe(){return ote(this).formatHsl()}function y8(){return this.rgb().formatRgb()}function xd(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=VTe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?v8(t):n===3?new ta(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qv(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=WTe.exec(e))?new ta(t[1],t[2],t[3],1):(t=GTe.exec(e))?new ta(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KTe.exec(e))?qv(t[1],t[2],t[3],t[4]):(t=YTe.exec(e))?qv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=XTe.exec(e))?j8(t[1],t[2]/100,t[3]/100,1):(t=QTe.exec(e))?j8(t[1],t[2]/100,t[3]/100,t[4]):g8.hasOwnProperty(e)?v8(g8[e]):e==="transparent"?new ta(NaN,NaN,NaN,0):null}function v8(e){return new ta(e>>16&255,e>>8&255,e&255,1)}function qv(e,t,n,r){return r<=0&&(e=t=n=NaN),new ta(e,t,n,r)}function e4e(e){return e instanceof Fy||(e=xd(e)),e?(e=e.rgb(),new ta(e.r,e.g,e.b,e.opacity)):new ta}function n4(e,t,n,r){return arguments.length===1?e4e(e):new ta(e,t,n,r??1)}function ta(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}dR(ta,n4,ite(Fy,{brighter(e){return e=e==null?Cw:Math.pow(Cw,e),new ta(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?mx:Math.pow(mx,e),new ta(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ta(ed(this.r),ed(this.g),ed(this.b),_w(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:b8,formatHex:b8,formatHex8:t4e,formatRgb:w8,toString:w8}));function b8(){return`#${Pu(this.r)}${Pu(this.g)}${Pu(this.b)}`}function t4e(){return`#${Pu(this.r)}${Pu(this.g)}${Pu(this.b)}${Pu((isNaN(this.opacity)?1:this.opacity)*255)}`}function w8(){const e=_w(this.opacity);return`${e===1?"rgb(":"rgba("}${ed(this.r)}, ${ed(this.g)}, ${ed(this.b)}${e===1?")":`, ${e})`}`}function _w(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ed(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pu(e){return e=ed(e),(e<16?"0":"")+e.toString(16)}function j8(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ti(e,t,n,r)}function ote(e){if(e instanceof Ti)return new Ti(e.h,e.s,e.l,e.opacity);if(e instanceof Fy||(e=xd(e)),!e)return new Ti;if(e instanceof Ti)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(n-r)/l+(n<r)*6:n===i?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+a:2-i-a,o*=60):l=c>0&&c<1?0:o,new Ti(o,l,c,e.opacity)}function n4e(e,t,n,r){return arguments.length===1?ote(e):new Ti(e,t,n,r??1)}function Ti(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}dR(Ti,n4e,ite(Fy,{brighter(e){return e=e==null?Cw:Math.pow(Cw,e),new Ti(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?mx:Math.pow(mx,e),new Ti(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,a=2*n-r;return new ta(F2(e>=240?e-240:e+120,a,r),F2(e,a,r),F2(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new Ti(N8(this.h),Vv(this.s),Vv(this.l),_w(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=_w(this.opacity);return`${e===1?"hsl(":"hsla("}${N8(this.h)}, ${Vv(this.s)*100}%, ${Vv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function N8(e){return e=(e||0)%360,e<0?e+360:e}function Vv(e){return Math.max(0,Math.min(1,e||0))}function F2(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 fR=e=>()=>e;function r4e(e,t){return function(n){return e+n*t}}function s4e(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 a4e(e){return(e=+e)==1?lte:function(t,n){return n-t?s4e(t,n,e):fR(isNaN(t)?n:t)}}function lte(e,t){var n=t-e;return n?r4e(e,n):fR(isNaN(e)?t:e)}const Aw=(function e(t){var n=a4e(t);function r(a,i){var o=n((a=n4(a)).r,(i=n4(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),u=lte(a.opacity,i.opacity);return function(d){return a.r=o(d),a.g=l(d),a.b=c(d),a.opacity=u(d),a+""}}return r.gamma=e,r})(1);function i4e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),a;return function(i){for(a=0;a<n;++a)r[a]=e[a]*(1-i)+t[a]*i;return r}}function o4e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function l4e(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,a=new Array(r),i=new Array(n),o;for(o=0;o<r;++o)a[o]=tl(e[o],t[o]);for(;o<n;++o)i[o]=t[o];return function(l){for(o=0;o<r;++o)i[o]=a[o](l);return i}}function c4e(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Pi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function u4e(e,t){var n={},r={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=tl(e[a],t[a]):r[a]=t[a];return function(i){for(a in n)r[a]=n[a](i);return r}}var r4=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,z2=new RegExp(r4.source,"g");function d4e(e){return function(){return e}}function f4e(e){return function(t){return e(t)+""}}function cte(e,t){var n=r4.lastIndex=z2.lastIndex=0,r,a,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=r4.exec(e))&&(a=z2.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(r=r[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Pi(r,a)})),n=z2.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?f4e(c[0].x):d4e(t):(t=c.length,function(u){for(var d=0,f;d<t;++d)l[(f=c[d]).i]=f.x(u);return l.join("")})}function tl(e,t){var n=typeof t,r;return t==null||n==="boolean"?fR(t):(n==="number"?Pi:n==="string"?(r=xd(t))?(t=r,Aw):cte:t instanceof xd?Aw:t instanceof Date?c4e:o4e(t)?i4e:Array.isArray(t)?l4e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?u4e:Pi)(e,t)}function hR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var S8=180/Math.PI,s4={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ute(e,t,n,r,a,i){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*S8,skewX:Math.atan(c)*S8,scaleX:o,scaleY:l}}var Wv;function h4e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?s4:ute(t.a,t.b,t.c,t.d,t.e,t.f)}function m4e(e){return e==null||(Wv||(Wv=document.createElementNS("http://www.w3.org/2000/svg","g")),Wv.setAttribute("transform",e),!(e=Wv.transform.baseVal.consolidate()))?s4:(e=e.matrix,ute(e.a,e.b,e.c,e.d,e.e,e.f))}function dte(e,t,n,r){function a(u){return u.length?u.pop()+" ":""}function i(u,d,f,m,p,v){if(u!==f||d!==m){var y=p.push("translate(",null,t,null,n);v.push({i:y-4,x:Pi(u,f)},{i:y-2,x:Pi(d,m)})}else(f||m)&&p.push("translate("+f+t+m+n)}function o(u,d,f,m){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),m.push({i:f.push(a(f)+"rotate(",null,r)-2,x:Pi(u,d)})):d&&f.push(a(f)+"rotate("+d+r)}function l(u,d,f,m){u!==d?m.push({i:f.push(a(f)+"skewX(",null,r)-2,x:Pi(u,d)}):d&&f.push(a(f)+"skewX("+d+r)}function c(u,d,f,m,p,v){if(u!==f||d!==m){var y=p.push(a(p)+"scale(",null,",",null,")");v.push({i:y-4,x:Pi(u,f)},{i:y-2,x:Pi(d,m)})}else(f!==1||m!==1)&&p.push(a(p)+"scale("+f+","+m+")")}return function(u,d){var f=[],m=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,m),o(u.rotate,d.rotate,f,m),l(u.skewX,d.skewX,f,m),c(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,m),u=d=null,function(p){for(var v=-1,y=m.length,x;++v<y;)f[(x=m[v]).i]=x.x(p);return f.join("")}}}var p4e=dte(h4e,"px, ","px)","deg)"),g4e=dte(m4e,", ",")",")"),x4e=1e-12;function k8(e){return((e=Math.exp(e))+1/e)/2}function y4e(e){return((e=Math.exp(e))-1/e)/2}function v4e(e){return((e=Math.exp(2*e))-1)/(e+1)}const Db=(function e(t,n,r){function a(i,o){var l=i[0],c=i[1],u=i[2],d=o[0],f=o[1],m=o[2],p=d-l,v=f-c,y=p*p+v*v,x,w;if(y<x4e)w=Math.log(m/u)/t,x=function(E){return[l+E*p,c+E*v,u*Math.exp(t*E*w)]};else{var N=Math.sqrt(y),S=(m*m-u*u+r*y)/(2*u*n*N),_=(m*m-u*u-r*y)/(2*m*n*N),k=Math.log(Math.sqrt(S*S+1)-S),C=Math.log(Math.sqrt(_*_+1)-_);w=(C-k)/t,x=function(E){var O=E*w,P=k8(k),R=u/(n*N)*(P*v4e(t*O+k)-y4e(k));return[l+R*p,c+R*v,u*P/k8(t*O+k)]}}return x.duration=w*1e3*t/Math.SQRT2,x}return a.rho=function(i){var o=Math.max(.001,+i),l=o*o,c=l*l;return e(o,l,c)},a})(Math.SQRT2,2,4);function b4e(e,t){t===void 0&&(t=e,e=tl);for(var n=0,r=t.length-1,a=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(a,a=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return i[l](o-l)}}var Wh=0,mg=0,Vp=0,fte=1e3,Ew,pg,Pw=0,yd=0,U1=0,gx=typeof performance=="object"&&performance.now?performance:Date,hte=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function mR(){return yd||(hte(w4e),yd=gx.now()+U1)}function w4e(){yd=0}function Tw(){this._call=this._time=this._next=null}Tw.prototype=mte.prototype={constructor:Tw,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?mR():+n)+(t==null?0:+t),!this._next&&pg!==this&&(pg?pg._next=this:Ew=this,pg=this),this._call=e,this._time=n,a4()},stop:function(){this._call&&(this._call=null,this._time=1/0,a4())}};function mte(e,t,n){var r=new Tw;return r.restart(e,t,n),r}function j4e(){mR(),++Wh;for(var e=Ew,t;e;)(t=yd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Wh}function C8(){yd=(Pw=gx.now())+U1,Wh=mg=0;try{j4e()}finally{Wh=0,S4e(),yd=0}}function N4e(){var e=gx.now(),t=e-Pw;t>fte&&(U1-=t,Pw=e)}function S4e(){for(var e,t=Ew,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ew=n);pg=e,a4(r)}function a4(e){if(!Wh){mg&&(mg=clearTimeout(mg));var t=e-yd;t>24?(e<1/0&&(mg=setTimeout(C8,e-gx.now()-U1)),Vp&&(Vp=clearInterval(Vp))):(Vp||(Pw=gx.now(),Vp=setInterval(N4e,fte)),Wh=1,hte(C8))}}function _8(e,t,n){var r=new Tw;return t=t==null?0:+t,r.restart(a=>{r.stop(),e(a+t)},t,n),r}var k4e=z1("start","end","cancel","interrupt"),C4e=[],pte=0,A8=1,i4=2,Lb=3,E8=4,o4=5,$b=6;function H1(e,t,n,r,a,i){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;_4e(e,n,{name:t,index:r,group:a,on:k4e,tween:C4e,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:pte})}function pR(e,t){var n=Fi(e,t);if(n.state>pte)throw new Error("too late; already scheduled");return n}function wo(e,t){var n=Fi(e,t);if(n.state>Lb)throw new Error("too late; already running");return n}function Fi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _4e(e,t,n){var r=e.__transition,a;r[t]=n,n.timer=mte(i,0,n.time);function i(u){n.state=A8,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var d,f,m,p;if(n.state!==A8)return c();for(d in r)if(p=r[d],p.name===n.name){if(p.state===Lb)return _8(o);p.state===E8?(p.state=$b,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[d]):+d<t&&(p.state=$b,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[d])}if(_8(function(){n.state===Lb&&(n.state=E8,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=i4,n.on.call("start",e,e.__data__,n.index,n.group),n.state===i4){for(n.state=Lb,a=new Array(m=n.tween.length),d=0,f=-1;d<m;++d)(p=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(a[++f]=p);a.length=f+1}}function l(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=o4,1),f=-1,m=a.length;++f<m;)a[f].call(e,d);n.state===o4&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=$b,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function Fb(e,t){var n=e.__transition,r,a,i=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){i=!1;continue}a=r.state>i4&&r.state<o4,r.state=$b,r.timer.stop(),r.on.call(a?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}i&&delete e.__transition}}function A4e(e){return this.each(function(){Fb(this,e)})}function E4e(e,t){var n,r;return function(){var a=wo(this,e),i=a.tween;if(i!==n){r=n=i;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}a.tween=r}}function P4e(e,t,n){var r,a;if(typeof n!="function")throw new Error;return function(){var i=wo(this,e),o=i.tween;if(o!==r){a=(r=o).slice();for(var l={name:t,value:n},c=0,u=a.length;c<u;++c)if(a[c].name===t){a[c]=l;break}c===u&&a.push(l)}i.tween=a}}function T4e(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fi(this.node(),n).tween,a=0,i=r.length,o;a<i;++a)if((o=r[a]).name===e)return o.value;return null}return this.each((t==null?E4e:P4e)(n,e,t))}function gR(e,t,n){var r=e._id;return e.each(function(){var a=wo(this,r);(a.value||(a.value={}))[t]=n.apply(this,arguments)}),function(a){return Fi(a,r).value[t]}}function gte(e,t){var n;return(typeof t=="number"?Pi:t instanceof xd?Aw:(n=xd(t))?(t=n,Aw):cte)(e,t)}function I4e(e){return function(){this.removeAttribute(e)}}function O4e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function M4e(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttribute(e);return o===a?null:o===r?i:i=t(r=o,n)}}function R4e(e,t,n){var r,a=n+"",i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===a?null:o===r?i:i=t(r=o,n)}}function D4e(e,t,n){var r,a,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,l)))}}function L4e(e,t,n){var r,a,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,l)))}}function $4e(e,t){var n=B1(e),r=n==="transform"?g4e:gte;return this.attrTween(e,typeof t=="function"?(n.local?L4e:D4e)(n,r,gR(this,"attr."+e,t)):t==null?(n.local?O4e:I4e)(n):(n.local?R4e:M4e)(n,r,t))}function F4e(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function z4e(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function B4e(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&z4e(e,i)),n}return a._value=t,a}function U4e(e,t){var n,r;function a(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&F4e(e,i)),n}return a._value=t,a}function H4e(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=B1(e);return this.tween(n,(r.local?B4e:U4e)(r,t))}function q4e(e,t){return function(){pR(this,e).delay=+t.apply(this,arguments)}}function V4e(e,t){return t=+t,function(){pR(this,e).delay=t}}function W4e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?q4e:V4e)(t,e)):Fi(this.node(),t).delay}function G4e(e,t){return function(){wo(this,e).duration=+t.apply(this,arguments)}}function K4e(e,t){return t=+t,function(){wo(this,e).duration=t}}function Y4e(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?G4e:K4e)(t,e)):Fi(this.node(),t).duration}function X4e(e,t){if(typeof t!="function")throw new Error;return function(){wo(this,e).ease=t}}function Q4e(e){var t=this._id;return arguments.length?this.each(X4e(t,e)):Fi(this.node(),t).ease}function Z4e(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;wo(this,e).ease=n}}function J4e(e){if(typeof e!="function")throw new Error;return this.each(Z4e(this._id,e))}function eIe(e){typeof e!="function"&&(e=Gee(e));for(var t=this._groups,n=t.length,r=new Array(n),a=0;a<n;++a)for(var i=t[a],o=i.length,l=r[a]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new gl(r,this._parents,this._name,this._id)}function tIe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,a=n.length,i=Math.min(r,a),o=new Array(r),l=0;l<i;++l)for(var c=t[l],u=n[l],d=c.length,f=o[l]=new Array(d),m,p=0;p<d;++p)(m=c[p]||u[p])&&(f[p]=m);for(;l<r;++l)o[l]=t[l];return new gl(o,this._parents,this._name,this._id)}function nIe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function rIe(e,t,n){var r,a,i=nIe(t)?pR:wo;return function(){var o=i(this,e),l=o.on;l!==r&&(a=(r=l).copy()).on(t,n),o.on=a}}function sIe(e,t){var n=this._id;return arguments.length<2?Fi(this.node(),n).on.on(e):this.each(rIe(n,e,t))}function aIe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function iIe(){return this.on("end.remove",aIe(this._id))}function oIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=cR(e));for(var r=this._groups,a=r.length,i=new Array(a),o=0;o<a;++o)for(var l=r[o],c=l.length,u=i[o]=new Array(c),d,f,m=0;m<c;++m)(d=l[m])&&(f=e.call(d,d.__data__,m,l))&&("__data__"in d&&(f.__data__=d.__data__),u[m]=f,H1(u[m],t,n,m,u,Fi(d,n)));return new gl(i,this._parents,t,n)}function lIe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wee(e));for(var r=this._groups,a=r.length,i=[],o=[],l=0;l<a;++l)for(var c=r[l],u=c.length,d,f=0;f<u;++f)if(d=c[f]){for(var m=e.call(d,d.__data__,f,c),p,v=Fi(d,n),y=0,x=m.length;y<x;++y)(p=m[y])&&H1(p,t,n,y,m,v);i.push(m),o.push(d)}return new gl(i,o,t,n)}var cIe=$y.prototype.constructor;function uIe(){return new cIe(this._groups,this._parents)}function dIe(e,t){var n,r,a;return function(){var i=Vh(this,e),o=(this.style.removeProperty(e),Vh(this,e));return i===o?null:i===n&&o===r?a:a=t(n=i,r=o)}}function xte(e){return function(){this.style.removeProperty(e)}}function fIe(e,t,n){var r,a=n+"",i;return function(){var o=Vh(this,e);return o===a?null:o===r?i:i=t(r=o,n)}}function hIe(e,t,n){var r,a,i;return function(){var o=Vh(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),Vh(this,e))),o===c?null:o===r&&c===a?i:(a=c,i=t(r=o,l))}}function mIe(e,t){var n,r,a,i="style."+t,o="end."+i,l;return function(){var c=wo(this,e),u=c.on,d=c.value[i]==null?l||(l=xte(t)):void 0;(u!==n||a!==d)&&(r=(n=u).copy()).on(o,a=d),c.on=r}}function pIe(e,t,n){var r=(e+="")=="transform"?p4e:gte;return t==null?this.styleTween(e,dIe(e,r)).on("end.style."+e,xte(e)):typeof t=="function"?this.styleTween(e,hIe(e,r,gR(this,"style."+e,t))).each(mIe(this._id,e)):this.styleTween(e,fIe(e,r,t),n).on("end.style."+e,null)}function gIe(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function xIe(e,t,n){var r,a;function i(){var o=t.apply(this,arguments);return o!==a&&(r=(a=o)&&gIe(e,o,n)),r}return i._value=t,i}function yIe(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,xIe(e,t,n??""))}function vIe(e){return function(){this.textContent=e}}function bIe(e){return function(){var t=e(this);this.textContent=t??""}}function wIe(e){return this.tween("text",typeof e=="function"?bIe(gR(this,"text",e)):vIe(e==null?"":e+""))}function jIe(e){return function(t){this.textContent=e.call(this,t)}}function NIe(e){var t,n;function r(){var a=e.apply(this,arguments);return a!==n&&(t=(n=a)&&jIe(a)),t}return r._value=e,r}function SIe(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,NIe(e))}function kIe(){for(var e=this._name,t=this._id,n=yte(),r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var d=Fi(c,t);H1(c,e,n,u,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new gl(r,this._parents,e,n)}function CIe(){var e,t,n=this,r=n._id,a=n.size();return new Promise(function(i,o){var l={value:o},c={value:function(){--a===0&&i()}};n.each(function(){var u=wo(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),a===0&&i()})}var _Ie=0;function gl(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function yte(){return++_Ie}var Ro=$y.prototype;gl.prototype={constructor:gl,select:oIe,selectAll:lIe,selectChild:Ro.selectChild,selectChildren:Ro.selectChildren,filter:eIe,merge:tIe,selection:uIe,transition:kIe,call:Ro.call,nodes:Ro.nodes,node:Ro.node,size:Ro.size,empty:Ro.empty,each:Ro.each,on:sIe,attr:$4e,attrTween:H4e,style:pIe,styleTween:yIe,text:wIe,textTween:SIe,remove:iIe,tween:T4e,delay:W4e,duration:Y4e,ease:Q4e,easeVarying:J4e,end:CIe,[Symbol.iterator]:Ro[Symbol.iterator]};function AIe(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var EIe={time:null,delay:0,duration:250,ease:AIe};function PIe(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function TIe(e){var t,n;e instanceof gl?(t=e._id,e=e._name):(t=yte(),(n=EIe).time=mR(),e=e==null?null:e+"");for(var r=this._groups,a=r.length,i=0;i<a;++i)for(var o=r[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&H1(c,e,t,u,o,n||PIe(c,t));return new gl(r,this._parents,e,t)}$y.prototype.interrupt=A4e;$y.prototype.transition=TIe;const Gv=e=>()=>e;function IIe(e,{sourceEvent:t,target:n,transform:r,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:a}})}function Yo(e,t,n){this.k=e,this.x=t,this.y=n}Yo.prototype={constructor:Yo,scale:function(e){return e===1?this:new Yo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Yo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var q1=new Yo(1,0,0);vte.prototype=Yo.prototype;function vte(e){for(;!e.__zoom;)if(!(e=e.parentNode))return q1;return e.__zoom}function B2(e){e.stopImmediatePropagation()}function Wp(e){e.preventDefault(),e.stopImmediatePropagation()}function OIe(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function MIe(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function P8(){return this.__zoom||q1}function RIe(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function DIe(){return navigator.maxTouchPoints||"ontouchstart"in this}function LIe(e,t,n){var r=e.invertX(t[0][0])-n[0][0],a=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function bte(){var e=OIe,t=MIe,n=LIe,r=RIe,a=DIe,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=Db,u=z1("start","zoom","end"),d,f,m,p=500,v=150,y=0,x=10;function w(I){I.property("__zoom",P8).on("wheel.zoom",O,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",R).filter(a).on("touchstart.zoom",T).on("touchmove.zoom",D).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(I,F,U,H){var q=I.selection?I.selection():I;q.property("__zoom",P8),I!==q?k(I,F,U,H):q.interrupt().each(function(){C(this,arguments).event(H).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},w.scaleBy=function(I,F,U,H){w.scaleTo(I,function(){var q=this.__zoom.k,B=typeof F=="function"?F.apply(this,arguments):F;return q*B},U,H)},w.scaleTo=function(I,F,U,H){w.transform(I,function(){var q=t.apply(this,arguments),B=this.__zoom,L=U==null?_(q):typeof U=="function"?U.apply(this,arguments):U,V=B.invert(L),K=typeof F=="function"?F.apply(this,arguments):F;return n(S(N(B,K),L,V),q,o)},U,H)},w.translateBy=function(I,F,U,H){w.transform(I,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof U=="function"?U.apply(this,arguments):U),t.apply(this,arguments),o)},null,H)},w.translateTo=function(I,F,U,H,q){w.transform(I,function(){var B=t.apply(this,arguments),L=this.__zoom,V=H==null?_(B):typeof H=="function"?H.apply(this,arguments):H;return n(q1.translate(V[0],V[1]).scale(L.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof U=="function"?-U.apply(this,arguments):-U),B,o)},H,q)};function N(I,F){return F=Math.max(i[0],Math.min(i[1],F)),F===I.k?I:new Yo(F,I.x,I.y)}function S(I,F,U){var H=F[0]-U[0]*I.k,q=F[1]-U[1]*I.k;return H===I.x&&q===I.y?I:new Yo(I.k,H,q)}function _(I){return[(+I[0][0]+ +I[1][0])/2,(+I[0][1]+ +I[1][1])/2]}function k(I,F,U,H){I.on("start.zoom",function(){C(this,arguments).event(H).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(H).end()}).tween("zoom",function(){var q=this,B=arguments,L=C(q,B).event(H),V=t.apply(q,B),K=U==null?_(V):typeof U=="function"?U.apply(q,B):U,W=Math.max(V[1][0]-V[0][0],V[1][1]-V[0][1]),ie=q.__zoom,ve=typeof F=="function"?F.apply(q,B):F,ge=c(ie.invert(K).concat(W/ie.k),ve.invert(K).concat(W/ve.k));return function(J){if(J===1)J=ve;else{var ne=ge(J),Z=W/ne[2];J=new Yo(Z,K[0]-ne[0]*Z,K[1]-ne[1]*Z)}L.zoom(null,J)}})}function C(I,F,U){return!U&&I.__zooming||new E(I,F)}function E(I,F){this.that=I,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(I,F),this.taps=0}E.prototype={event:function(I){return I&&(this.sourceEvent=I),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(I,F){return this.mouse&&I!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&I!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&I!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(I){var F=wa(this.that).datum();u.call(I,this.that,new IIe(I,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:u}),F)}};function O(I,...F){if(!e.apply(this,arguments))return;var U=C(this,F).event(I),H=this.__zoom,q=Math.max(i[0],Math.min(i[1],H.k*Math.pow(2,r.apply(this,arguments)))),B=Ci(I);if(U.wheel)(U.mouse[0][0]!==B[0]||U.mouse[0][1]!==B[1])&&(U.mouse[1]=H.invert(U.mouse[0]=B)),clearTimeout(U.wheel);else{if(H.k===q)return;U.mouse=[B,H.invert(B)],Fb(this),U.start()}Wp(I),U.wheel=setTimeout(L,v),U.zoom("mouse",n(S(N(H,q),U.mouse[0],U.mouse[1]),U.extent,o));function L(){U.wheel=null,U.end()}}function P(I,...F){if(m||!e.apply(this,arguments))return;var U=I.currentTarget,H=C(this,F,!0).event(I),q=wa(I.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",W,!0),B=Ci(I,U),L=I.clientX,V=I.clientY;rte(I.view),B2(I),H.mouse=[B,this.__zoom.invert(B)],Fb(this),H.start();function K(ie){if(Wp(ie),!H.moved){var ve=ie.clientX-L,ge=ie.clientY-V;H.moved=ve*ve+ge*ge>y}H.event(ie).zoom("mouse",n(S(H.that.__zoom,H.mouse[0]=Ci(ie,U),H.mouse[1]),H.extent,o))}function W(ie){q.on("mousemove.zoom mouseup.zoom",null),ste(ie.view,H.moved),Wp(ie),H.event(ie).end()}}function R(I,...F){if(e.apply(this,arguments)){var U=this.__zoom,H=Ci(I.changedTouches?I.changedTouches[0]:I,this),q=U.invert(H),B=U.k*(I.shiftKey?.5:2),L=n(S(N(U,B),H,q),t.apply(this,F),o);Wp(I),l>0?wa(this).transition().duration(l).call(k,L,H,I):wa(this).call(w.transform,L,H,I)}}function T(I,...F){if(e.apply(this,arguments)){var U=I.touches,H=U.length,q=C(this,F,I.changedTouches.length===H).event(I),B,L,V,K;for(B2(I),L=0;L<H;++L)V=U[L],K=Ci(V,this),K=[K,this.__zoom.invert(K),V.identifier],q.touch0?!q.touch1&&q.touch0[2]!==K[2]&&(q.touch1=K,q.taps=0):(q.touch0=K,B=!0,q.taps=1+!!d);d&&(d=clearTimeout(d)),B&&(q.taps<2&&(f=K[0],d=setTimeout(function(){d=null},p)),Fb(this),q.start())}}function D(I,...F){if(this.__zooming){var U=C(this,F).event(I),H=I.changedTouches,q=H.length,B,L,V,K;for(Wp(I),B=0;B<q;++B)L=H[B],V=Ci(L,this),U.touch0&&U.touch0[2]===L.identifier?U.touch0[0]=V:U.touch1&&U.touch1[2]===L.identifier&&(U.touch1[0]=V);if(L=U.that.__zoom,U.touch1){var W=U.touch0[0],ie=U.touch0[1],ve=U.touch1[0],ge=U.touch1[1],J=(J=ve[0]-W[0])*J+(J=ve[1]-W[1])*J,ne=(ne=ge[0]-ie[0])*ne+(ne=ge[1]-ie[1])*ne;L=N(L,Math.sqrt(J/ne)),V=[(W[0]+ve[0])/2,(W[1]+ve[1])/2],K=[(ie[0]+ge[0])/2,(ie[1]+ge[1])/2]}else if(U.touch0)V=U.touch0[0],K=U.touch0[1];else return;U.zoom("touch",n(S(L,V,K),U.extent,o))}}function z(I,...F){if(this.__zooming){var U=C(this,F).event(I),H=I.changedTouches,q=H.length,B,L;for(B2(I),m&&clearTimeout(m),m=setTimeout(function(){m=null},p),B=0;B<q;++B)L=H[B],U.touch0&&U.touch0[2]===L.identifier?delete U.touch0:U.touch1&&U.touch1[2]===L.identifier&&delete U.touch1;if(U.touch1&&!U.touch0&&(U.touch0=U.touch1,delete U.touch1),U.touch0)U.touch0[1]=this.__zoom.invert(U.touch0[0]);else if(U.end(),U.taps===2&&(L=Ci(L,this),Math.hypot(f[0]-L[0],f[1]-L[1])<x)){var V=wa(this).on("dblclick.zoom");V&&V.apply(this,arguments)}}}return w.wheelDelta=function(I){return arguments.length?(r=typeof I=="function"?I:Gv(+I),w):r},w.filter=function(I){return arguments.length?(e=typeof I=="function"?I:Gv(!!I),w):e},w.touchable=function(I){return arguments.length?(a=typeof I=="function"?I:Gv(!!I),w):a},w.extent=function(I){return arguments.length?(t=typeof I=="function"?I:Gv([[+I[0][0],+I[0][1]],[+I[1][0],+I[1][1]]]),w):t},w.scaleExtent=function(I){return arguments.length?(i[0]=+I[0],i[1]=+I[1],w):[i[0],i[1]]},w.translateExtent=function(I){return arguments.length?(o[0][0]=+I[0][0],o[1][0]=+I[1][0],o[0][1]=+I[0][1],o[1][1]=+I[1][1],w):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},w.constrain=function(I){return arguments.length?(n=I,w):n},w.duration=function(I){return arguments.length?(l=+I,w):l},w.interpolate=function(I){return arguments.length?(c=I,w):c},w.on=function(){var I=u.on.apply(u,arguments);return I===u?w:I},w.clickDistance=function(I){return arguments.length?(y=(I=+I)*I,w):Math.sqrt(y)},w.tapDistance=function(I){return arguments.length?(x=+I,w):x},w}const go={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>
1392`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},xx=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],wte=["Enter"," ","Escape"],jte={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Gh;(function(e){e.Strict="strict",e.Loose="loose"})(Gh||(Gh={}));var td;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(td||(td={}));var yx;(function(e){e.Partial="partial",e.Full="full"})(yx||(yx={}));const Nte={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var oc;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(oc||(oc={}));var Iw;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Iw||(Iw={}));var tt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(tt||(tt={}));const T8={[tt.Left]:tt.Right,[tt.Right]:tt.Left,[tt.Top]:tt.Bottom,[tt.Bottom]:tt.Top};function Ste(e){return e===null?null:e?"valid":"invalid"}const kte=e=>"id"in e&&"source"in e&&"target"in e,$Ie=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),xR=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zy=(e,t=[0,0])=>{const{width:n,height:r}=jl(e),a=e.origin??t,i=n*a[0],o=r*a[1];return{x:e.position.x-i,y:e.position.y-o}},FIe=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,a)=>{const i=typeof a=="string";let o=!t.nodeLookup&&!i?a:void 0;t.nodeLookup&&(o=i?t.nodeLookup.get(a):xR(a)?a:t.nodeLookup.get(a.id));const l=o?Ow(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return V1(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return W1(n)},By=(e,t={})=>{if(e.size===0)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach(r=>{if(t.filter===void 0||t.filter(r)){const a=Ow(r);n=V1(n,a)}}),W1(n)},yR=(e,t,[n,r,a]=[0,0,1],i=!1,o=!1)=>{const l={...Hy(t,[n,r,a]),width:t.width/a,height:t.height/a},c=[];for(const u of e.values()){const{measured:d,selectable:f=!0,hidden:m=!1}=u;if(o&&!f||m)continue;const p=d.width??u.width??u.initialWidth??null,v=d.height??u.height??u.initialHeight??null,y=vx(l,Yh(u)),x=(p??0)*(v??0),w=i&&y>0;(!u.internals.handleBounds||w||y>=x||u.dragging)&&c.push(u)}return c},zIe=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function BIe(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(a=>a.id)):null;return e.forEach(a=>{a.measured.width&&a.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!a.hidden)&&(!r||r.has(a.id))&&n.set(a.id,a)}),n}
1392async function UIe({nodes:e,width:t,height:n,panZoom:r,minZoom:a,maxZoom:i},o){if(e.size===0)return Promise.resolve(!0);const l=BIe(e,o),c=By(l),u=vR(c,t,n,(o==null?void 0:o.minZoom)??a,(o==null?void 0:o.maxZoom)??i,(o==null?void 0:o.padding)??.1);return await r.setViewport(u,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function Cte({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:a,onError:i}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},d=o.origin??r;let f=o.extent||a;if(o.extent==="parent"&&!o.expandParent)if(!l)i==null||i("005",go.error005());else{const p=l.measured.width,v=l.measured.height;p&&v&&(f=[[c,u],[c+p,u+v]])}else l&&Xh(o.extent)&&(f=[[o.extent[0][0]+c,o.extent[0][1]+u],[o.extent[1][0]+c,o.extent[1][1]+u]]);const m=Xh(f)?vd(t,f,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(i==null||i("015",go.error015())),{position:{x:m.x-c+(o.measured.width??0)*d[0],y:m.y-u+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function HIe({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:a}){const i=new Set(e.map(m=>m.id)),o=[];for(const m of n){if(m.deletable===!1)continue;const p=i.has(m.id),v=!p&&m.parentId&&o.find(y=>y.id===m.parentId);(p||v)&&o.push(m)}const l=new Set(t.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),d=zIe(o,c);for(const m of c)l.has(m.id)&&!d.find(v=>v.id===m.id)&&d.push(m);if(!a)return{edges:d,nodes:o};const f=await a({nodes:o,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:o}:{edges:[],nodes:[]}:f}const Kh=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),vd=(e={x:0,y:0},t,n)=>({x:Kh(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Kh(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function _te(e,t,n){const{width:r,height:a}=jl(n),{x:i,y:o}=n.internals.positionAbsolute;return vd(e,[[i,o],[i+r,o+a]],t)}const I8=(e,t,n)=>e<t?Kh(Math.abs(e-t),1,t)/t:e>n?-Kh(Math.abs(e-n),1,t)/t:0,Ate=(e,t,n=15,r=40)=>{const a=I8(e.x,r,t.width-r)*n,i=I8(e.y,r,t.height-r)*n;return[a,i]},V1=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),l4=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),W1=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Yh=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=xR(e)?e.internals.positionAbsolute:zy(e,t);return{x:n,y:r,width:((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Ow=(e,t=[0,0])=>{var a,i;const{x:n,y:r}=xR(e)?e.internals.positionAbsolute:zy(e,t);return{x:n,y:r,x2:n+(((a=e.measured)==null?void 0:a.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},Ete=(e,t)=>W1(V1(l4(e),l4(t))),vx=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},O8=e=>Ii(e.width)&&Ii(e.height)&&Ii(e.x)&&Ii(e.y),Ii=e=>!isNaN(e)&&isFinite(e),qIe=(e,t)=>{},Uy=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Hy=({x:e,y:t},[n,r,a],i=!1,o=[1,1])=>{const l={x:(e-n)/a,y:(t-r)/a};return i?Uy(l,o):l},Mw=({x:e,y:t},[n,r,a])=>({x:e*a+n,y:t*a+r});function Tf(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function VIe(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Tf(e,n),a=Tf(e,t);return{top:r,right:a,bottom:r,left:a,x:a*2,y:r*2}}if(typeof e=="object"){const r=Tf(e.top??e.y??0,n),a=Tf(e.bottom??e.y??0,n),i=Tf(e.left??e.x??0,t),o=Tf(e.right??e.x??0,t);return{top:r,right:o,bottom:a,left:i,x:i+o,y:r+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function WIe(e,t,n,r,a,i){const{x:o,y:l}=Mw(e,[t,n,r]),{x:c,y:u}=Mw({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=a-c,f=i-u;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(f)}}const vR=(e,t,n,r,a,i)=>{const o=VIe(i,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,u=Math.min(l,c),d=Kh(u,r,a),f=e.x+e.width/2,m=e.y+e.height/2,p=t/2-f*d,v=n/2-m*d,y=WIe(e,p,v,d,t,n),x={left:Math.min(y.left-o.left,0),top:Math.min(y.top-o.top,0),right:Math.min(y.right-o.right,0),bottom:Math.min(y.bottom-o.bottom,0)};return{x:p-x.left+x.right,y:v-x.top+x.bottom,zoom:d}},bx=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Xh(e){return e!=null&&e!=="parent"}function jl(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Pte(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Tte(e,t={width:0,height:0},n,r,a){const i={...e},o=r.get(n);if(o){const l=o.origin||a;i.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function M8(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function GIe(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function KIe(e){return{...jte,...e||{}}}
1392function Pg(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:a}){const{x:i,y:o}=to(e),l=Hy({x:i-((a==null?void 0:a.left)??0),y:o-((a==null?void 0:a.top)??0)},r),{x:c,y:u}=n?Uy(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const bR=e=>({width:e.offsetWidth,height:e.offsetHeight}),Ite=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},YIe=["INPUT","SELECT","TEXTAREA"];function Ote(e){var r,a;const t=((a=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:a[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:YIe.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Mte=e=>"clientX"in e,to=(e,t)=>{var i,o;const n=Mte(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},R8=(e,t,n,r,a)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:a,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...bR(o)}})};function Rte({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:a,sourceControlY:i,targetControlX:o,targetControlY:l}){const c=e*.125+a*.375+o*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,d=Math.abs(c-e),f=Math.abs(u-t);return[c,u,d,f]}function Kv(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function D8({pos:e,x1:t,y1:n,x2:r,y2:a,c:i}){switch(e){case tt.Left:return[t-Kv(t-r,i),n];case tt.Right:return[t+Kv(r-t,i),n];case tt.Top:return[t,n-Kv(n-a,i)];case tt.Bottom:return[t,n+Kv(a-n,i)]}}function Dte({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:a,targetPosition:i=tt.Top,curvature:o=.25}){const[l,c]=D8({pos:n,x1:e,y1:t,x2:r,y2:a,c:o}),[u,d]=D8({pos:i,x1:r,y1:a,x2:e,y2:t,c:o}),[f,m,p,v]=Rte({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${e},${t} C${l},${c} ${u},${d} ${r},${a}`,f,m,p,v]}function Lte({sourceX:e,sourceY:t,targetX:n,targetY:r}){const a=Math.abs(n-e)/2,i=n<e?n+a:n-a,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[i,l,a,o]}function XIe({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r,elevateOnSelect:a=!1}){if(r!==void 0)return r;const i=a&&n?1e3:0,o=Math.max(e.parentId?e.internals.z:0,t.parentId?t.internals.z:0);return i+o}function QIe({sourceNode:e,targetNode:t,width:n,height:r,transform:a}){const i=V1(Ow(e),Ow(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const o={x:-a[0]/a[2],y:-a[1]/a[2],width:n/a[2],height:r/a[2]};return vx(o,W1(i))>0}const ZIe=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,JIe=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),$te=(e,t)=>{if(!e.source||!e.target)return t;let n;return kte(e)?n={...e}:n={...e,id:ZIe(e)},JIe(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function Fte({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[a,i,o,l]=Lte({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,a,i,o,l]}const L8={[tt.Left]:{x:-1,y:0},[tt.Right]:{x:1,y:0},[tt.Top]:{x:0,y:-1},[tt.Bottom]:{x:0,y:1}},eOe=({source:e,sourcePosition:t=tt.Bottom,target:n})=>t===tt.Left||t===tt.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},$8=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function tOe({source:e,sourcePosition:t=tt.Bottom,target:n,targetPosition:r=tt.Top,center:a,offset:i,stepPosition:o}){const l=L8[t],c=L8[r],u={x:e.x+l.x*i,y:e.y+l.y*i},d={x:n.x+c.x*i,y:n.y+c.y*i},f=eOe({source:u,sourcePosition:t,target:d}),m=f.x!==0?"x":"y",p=f[m];let v=[],y,x;const w={x:0,y:0},N={x:0,y:0},[,,S,_]=Lte({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[m]*c[m]===-1){m==="x"?(y=a.x??u.x+(d.x-u.x)*o,x=a.y??(u.y+d.y)/2):(y=a.x??(u.x+d.x)/2,x=a.y??u.y+(d.y-u.y)*o);const C=[{x:y,y:u.y},{x:y,y:d.y}],E=[{x:u.x,y:x},{x:d.x,y:x}];l[m]===p?v=m==="x"?C:E:v=m==="x"?E:C}else{const C=[{x:u.x,y:d.y}],E=[{x:d.x,y:u.y}];if(m==="x"?v=l.x===p?E:C:v=l.y===p?C:E,t===r){const D=Math.abs(e[m]-n[m]);if(D<=i){const z=Math.min(i-1,i-D);l[m]===p?w[m]=(u[m]>e[m]?-1:1)*z:N[m]=(d[m]>n[m]?-1:1)*z}}if(t!==r){const D=m==="x"?"y":"x",z=l[m]===c[D],I=u[D]>d[D],F=u[D]<d[D];(l[m]===1&&(!z&&I||z&&F)||l[m]!==1&&(!z&&F||z&&I))&&(v=m==="x"?C:E)}const O={x:u.x+w.x,y:u.y+w.y},P={x:d.x+N.x,y:d.y+N.y},R=Math.max(Math.abs(O.x-v[0].x),Math.abs(P.x-v[0].x)),T=Math.max(Math.abs(O.y-v[0].y),Math.abs(P.y-v[0].y));R>=T?(y=(O.x+P.x)/2,x=v[0].y):(y=v[0].x,x=(O.y+P.y)/2)}return[[e,{x:u.x+w.x,y:u.y+w.y},...v,{x:d.x+N.x,y:d.y+N.y},n],y,x,S,_]}function nOe(e,t,n,r){const a=Math.min($8(e,t)/2,$8(t,n)/2,r),{x:i,y:o}=t;if(e.x===i&&i===n.x||e.y===o&&o===n.y)return`L${i} ${o}`;if(e.y===o){const u=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${i+a*u},${o}Q ${i},${o} ${i},${o+a*d}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${o+a*c}Q ${i},${o} ${i+a*l},${o}`}function c4({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:a,targetPosition:i=tt.Top,borderRadius:o=5,centerX:l,centerY:c,offset:u=20,stepPosition:d=.5}){const[f,m,p,v,y]=tOe({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:a},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:d});return[f.reduce((w,N,S)=>{let _="";return S>0&&S<f.length-1?_=nOe(f[S-1],N,f[S+1],o):_=`${S===0?"M":"L"}${N.x} ${N.y}`,w+=_,w},""),m,p,v,y]}function F8(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function rOe(e){var f;const{sourceNode:t,targetNode:n}=e;if(!F8(t)||!F8(n))return null;const r=t.internals.handleBounds||z8(t.handles),a=n.internals.handleBounds||z8(n.handles),i=B8((r==null?void 0:r.source)??[],e.sourceHandle),o=B8(e.connectionMode===Gh.Str
1392ict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),e.targetHandle);if(!i||!o)return(f=e.onError)==null||f.call(e,"008",go.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||tt.Bottom,c=(o==null?void 0:o.position)||tt.Top,u=wx(t,i,l),d=wx(n,o,c);return{sourceX:u.x,sourceY:u.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:c}}function z8(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function wx(e,t,n=tt.Left,r=!1){const a=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??jl(e);if(r)return{x:a+o/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case tt.Top:return{x:a+o/2,y:i};case tt.Right:return{x:a+o,y:i+l/2};case tt.Bottom:return{x:a+o/2,y:i+l};case tt.Left:return{x:a,y:i+l/2}}}function B8(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function u4(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function sOe(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:a}){const i=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||a].forEach(c=>{if(c&&typeof c=="object"){const u=u4(c,t);i.has(u)||(o.push({id:u,color:c.color||n,...c}),i.add(u))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const wR={nodeOrigin:[0,0],nodeExtent:xx,elevateNodesOnSelect:!0,defaults:{}},aOe={...wR,checkEquality:!0};function jR(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function iOe(e,t,n){const r=jR(wR,n);for(const a of e.values())if(a.parentId)NR(a,e,t,r);else{const i=zy(a,r.nodeOrigin),o=Xh(a.extent)?a.extent:r.nodeExtent,l=vd(i,o,jl(a));a.internals.positionAbsolute=l}}function d4(e,t,n,r){var c,u;const a=jR(aOe,r);let i=e.length>0;const o=new Map(t),l=a!=null&&a.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const d of e){let f=o.get(d.id);if(a.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const m=zy(d,a.nodeOrigin),p=Xh(d.extent)?d.extent:a.nodeExtent,v=vd(m,p,jl(d));f={...a.defaults,...d,measured:{width:(c=d.measured)==null?void 0:c.width,height:(u=d.measured)==null?void 0:u.height},internals:{positionAbsolute:v,handleBounds:d.measured?f==null?void 0:f.internals.handleBounds:void 0,z:zte(d,l),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(i=!1),d.parentId&&NR(f,t,n,r)}return i}function oOe(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function NR(e,t,n,r){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:o}=jR(wR,r),l=e.parentId,c=t.get(l);if(!c){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}oOe(e,n);const u=a?1e3:0,{x:d,y:f,z:m}=lOe(e,c,i,o,u),{positionAbsolute:p}=e.internals,v=d!==p.x||f!==p.y;(v||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:v?{x:d,y:f}:p,z:m}})}function zte(e,t){return(Ii(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function lOe(e,t,n,r,a){const{x:i,y:o}=t.internals.positionAbsolute,l=jl(e),c=zy(e,n),u=Xh(e.extent)?vd(c,e.extent,l):c;let d=vd({x:i+u.x,y:o+u.y},r,l);e.extent==="parent"&&(d=_te(d,l,t));const f=zte(e,a),m=t.internals.z??0;return{x:d.x,y:d.y,z:m>=f?m+1:f}}function SR(e,t,n,r=[0,0]){var o;const a=[],i=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((o=i.get(l.parentId))==null?void 0:o.expandedRect)??Yh(c),d=Ete(u,l.rect);i.set(l.parentId,{expandedRect:d,parent:c})}return i.size>0&&i.forEach(({expandedRect:l,parent:c},u)=>{var S;const d=c.internals.positionAbsolute,f=jl(c),m=c.origin??r,p=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,v=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,y=Math.max(f.width,Math.round(l.width)),x=Math.max(f.height,Math.round(l.height)),w=(y-f.width)*m[0],N=(x-f.height)*m[1];(p>0||v>0||w||N)&&(a.push({id:u,type:"position",position:{x:c.position.x-p+w,y:c.position.y-v+N}}
1392),(S=n.get(u))==null||S.forEach(_=>{e.some(k=>k.id===_.id)||a.push({id:_.id,type:"position",position:{x:_.position.x+p,y:_.position.y+v}})})),(f.width<l.width||f.height<l.height||p||v)&&a.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:y+(p?m[0]*p-w:0),height:x+(v?m[1]*v-N:0)}})}),a}function cOe(e,t,n,r,a,i){const o=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!o)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(o),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(const m of e.values()){const p=t.get(m.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}const v=bR(m.nodeElement),y=p.measured.width!==v.width||p.measured.height!==v.height;if(!!(v.width&&v.height&&(y||!p.internals.handleBounds||m.force))){const w=m.nodeElement.getBoundingClientRect(),N=Xh(p.extent)?p.extent:i;let{positionAbsolute:S}=p.internals;p.parentId&&p.extent==="parent"?S=_te(S,v,t.get(p.parentId)):N&&(S=vd(S,N,v));const _={...p,measured:v,internals:{...p.internals,positionAbsolute:S,handleBounds:{source:R8("source",m.nodeElement,w,d,p.id),target:R8("target",m.nodeElement,w,d,p.id)}}};t.set(p.id,_),p.parentId&&NR(_,t,n,{nodeOrigin:a}),l=!0,y&&(c.push({id:p.id,type:"dimensions",dimensions:v}),p.expandParent&&p.parentId&&f.push({id:p.id,parentId:p.parentId,rect:Yh(_,a)}))}}if(f.length>0){const m=SR(f,t,n,a);c.push(...m)}return{changes:c,updatedInternals:l}}async function uOe({delta:e,panZoom:t,transform:n,translateExtent:r,width:a,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[a,i]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function U8(e,t,n,r,a,i){let o=a;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${a}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(n,t)),i){o=`${a}-${e}-${i}`;const u=r.get(o)||new Map;r.set(o,u.set(n,t))}}function Bte(e,t,n){e.clear(),t.clear();for(const r of n){const{source:a,target:i,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:a,target:i,sourceHandle:o,targetHandle:l},u=`${a}-${o}--${i}-${l}`,d=`${i}-${l}--${a}-${o}`;U8("source",c,d,e,a,o),U8("target",c,u,e,i,l),t.set(r.id,r)}}function Ute(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Ute(n,t):!1}function H8(e,t,n){var a;let r=e;do{if((a=r==null?void 0:r.matches)!=null&&a.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function dOe(e,t,n,r){const a=new Map;for(const[i,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!Ute(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(i);l&&a.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return a}function U2({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,l,c;const a=[];for(const[u,d]of t){const f=(o=n.get(u))==null?void 0:o.internals.userNode;f&&a.push({...f,position:d.position,dragging:r})}if(!e)return[a[0],a];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:r}:a[0],a]}function fOe({dragItems:e,snapGrid:t,x:n,y:r}){const a=e.values().next().value;if(!a)return null;const i={x:n-a.distance.x,y:r-a.distance.y},o=Uy(i,t);return{x:o.x-i.x,y:o.y-i.y}}function hOe({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:a}){let i={x:null,y:null},o=0,l=new Map,c=!1,u={x:0,y:0},d=null,f=!1,m=null,p=!1,v=!1,y=null;function x({noDragClassName:N,handleSelector:S,domNode:_,isSelectable:k,nodeId:C,nodeClickDistance:E=0}){m=wa(_);function O({x:D,y:z}
1392){const{nodeLookup:I,nodeExtent:F,snapGrid:U,snapToGrid:H,nodeOrigin:q,onNodeDrag:B,onSelectionDrag:L,onError:V,updateNodePositions:K}=t();i={x:D,y:z};let W=!1;const ie=l.size>1,ve=ie&&F?l4(By(l)):null,ge=ie&&H?fOe({dragItems:l,snapGrid:U,x:D,y:z}):null;for(const[J,ne]of l){if(!I.has(J))continue;let Z={x:D-ne.distance.x,y:z-ne.distance.y};H&&(Z=ge?{x:Math.round(Z.x+ge.x),y:Math.round(Z.y+ge.y)}:Uy(Z,U));let oe=null;if(ie&&F&&!ne.extent&&ve){const{positionAbsolute:ae}=ne.internals,fe=ae.x-ve.x+F[0][0],Ee=ae.x+ne.measured.width-ve.x2+F[1][0],Re=ae.y-ve.y+F[0][1],qe=ae.y+ne.measured.height-ve.y2+F[1][1];oe=[[fe,Re],[Ee,qe]]}const{position:he,positionAbsolute:Q}=Cte({nodeId:J,nextPosition:Z,nodeLookup:I,nodeExtent:oe||F,nodeOrigin:q,onError:V});W=W||ne.position.x!==he.x||ne.position.y!==he.y,ne.position=he,ne.internals.positionAbsolute=Q}if(v=v||W,!!W&&(K(l,!0),y&&(r||B||!C&&L))){const[J,ne]=U2({nodeId:C,dragItems:l,nodeLookup:I});r==null||r(y,l,J,ne),B==null||B(y,J,ne),C||L==null||L(y,ne)}}async function P(){if(!d)return;const{transform:D,panBy:z,autoPanSpeed:I,autoPanOnNodeDrag:F}=t();if(!F){c=!1,cancelAnimationFrame(o);return}const[U,H]=Ate(u,d,I);(U!==0||H!==0)&&(i.x=(i.x??0)-U/D[2],i.y=(i.y??0)-H/D[2],await z({x:U,y:H})&&O(i)),o=requestAnimationFrame(P)}function R(D){var ie;const{nodeLookup:z,multiSelectionActive:I,nodesDraggable:F,transform:U,snapGrid:H,snapToGrid:q,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:V,unselectNodesAndEdges:K}=t();f=!0,(!B||!k)&&!I&&C&&((ie=z.get(C))!=null&&ie.selected||K()),k&&B&&C&&(e==null||e(C));const W=Pg(D.sourceEvent,{transform:U,snapGrid:H,snapToGrid:q,containerBounds:d});if(i=W,l=dOe(z,F,W,C),l.size>0&&(n||L||!C&&V)){const[ve,ge]=U2({nodeId:C,dragItems:l,nodeLookup:z});n==null||n(D.sourceEvent,l,ve,ge),L==null||L(D.sourceEvent,ve,ge),C||V==null||V(D.sourceEvent,ge)}}const T=ate().clickDistance(E).on("start",D=>{const{domNode:z,nodeDragThreshold:I,transform:F,snapGrid:U,snapToGri
1392d:H}=t();d=(z==null?void 0:z.getBoundingClientRect())||null,p=!1,v=!1,y=D.sourceEvent,I===0&&R(D),i=Pg(D.sourceEvent,{transform:F,snapGrid:U,snapToGrid:H,containerBounds:d}),u=to(D.sourceEvent,d)}).on("drag",D=>{const{autoPanOnNodeDrag:z,transform:I,snapGrid:F,snapToGrid:U,nodeDragThreshold:H,nodeLookup:q}=t(),B=Pg(D.sourceEvent,{transform:I,snapGrid:F,snapToGrid:U,containerBounds:d});if(y=D.sourceEvent,(D.sourceEvent.type==="touchmove"&&D.sourceEvent.touches.length>1||C&&!q.has(C))&&(p=!0),!p){if(!c&&z&&f&&(c=!0,P()),!f){const L=B.xSnapped-(i.x??0),V=B.ySnapped-(i.y??0);Math.sqrt(L*L+V*V)>H&&R(D)}(i.x!==B.xSnapped||i.y!==B.ySnapped)&&l&&f&&(u=to(D.sourceEvent,d),O(B))}}).on("end",D=>{if(!(!f||p)&&(c=!1,f=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:z,updateNodePositions:I,onNodeDragStop:F,onSelectionDragStop:U}=t();if(v&&(I(l,!1),v=!1),a||F||!C&&U){const[H,q]=U2({nodeId:C,dragItems:l,nodeLookup:z,dragging:!1});a==null||a(D.sourceEvent,l,H,q),F==null||F(D.sourceEvent,H,q),C||U==null||U(D.sourceEvent,q)}}}).filter(D=>{const z=D.target;return!D.button&&(!N||!H8(z,`.${N}`,_))&&(!S||H8(z,S,_))});m.call(T)}function w(){m==null||m.on(".drag",null)}return{update:x,destroy:w}}function mOe(e,t,n){const r=[],a={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())vx(a,Yh(i))>0&&r.push(i);return r}const pOe=250;function gOe(e,t,n,r){var l,c;let a=[],i=1/0;const o=mOe(e,n,t+pOe);for(const u of o){const d=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of d){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:p}=wx(u,f,f.position,!0),v=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(p-e.y,2));v>t||(v<i?(a=[{...f,x:m,y:p}],i=v):v===i&&a.push({...f,x:m,y:p}))}}if(!a.length)return null;if(a.length>1){const u=r.type==="source"?"target":"source";return a.find(d=>d.type===u)??a[0]}return a[0]}function Hte(e,t,n,r,a,i=!1){var u,d,f;
1392const o=r.get(e);if(!o)return null;const l=a==="strict"?(u=o.internals.handleBounds)==null?void 0:u[t]:[...((d=o.internals.handleBounds)==null?void 0:d.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],c=(n?l==null?void 0:l.find(m=>m.id===n):l==null?void 0:l[0])??null;return c&&i?{...c,...wx(o,c,c.position,!0)}:c}function qte(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function xOe(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Vte=()=>!0;function yOe(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:a,edgeUpdaterType:i,isTarget:o,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:d,flowId:f,panBy:m,cancelConnection:p,onConnectStart:v,onConnect:y,onConnectEnd:x,isValidConnection:w=Vte,onReconnectEnd:N,updateConnection:S,getTransform:_,getFromHandle:k,autoPanSpeed:C,dragThreshold:E=1,handleDomNode:O}){const P=Ite(e.target);let R=0,T;const{x:D,y:z}=to(e),I=qte(i,O),F=l==null?void 0:l.getBoundingClientRect();let U=!1;if(!F||!I)return;const H=Hte(a,I,r,c,t);if(!H)return;let q=to(e,F),B=!1,L=null,V=!1,K=null;function W(){if(!d||!F)return;const[he,Q]=Ate(q,F,C);m({x:he,y:Q}),R=requestAnimationFrame(W)}const ie={...H,nodeId:a,type:I,position:H.position},ve=c.get(a);let J={inProgress:!0,isValid:null,from:wx(ve,ie,tt.Left,!0),fromHandle:ie,fromPosition:ie.position,fromNode:ve,to:q,toHandle:null,toPosition:T8[ie.position],toNode:null};function ne(){U=!0,S(J),v==null||v(e,{nodeId:a,handleId:r,handleType:I})}E===0&&ne();function Z(he){if(!U){const{x:Ee,y:Re}=to(he),qe=Ee-D,St=Re-z;if(!(qe*qe+St*St>E*E))return;ne()}if(!k()||!ie){oe(he);return}const Q=_();q=to(he,F),T=gOe(Hy(q,Q,!1,[1,1]),n,c,ie),B||(W(),B=!0);const ae=Wte(he,{handle:T,connectionMode:t,fromNodeId:a,fromHandleId:r,fromType:o?"target":"source",isValidConnection:w,doc:P,lib:u,flowId:f,nodeLookup:c});K=ae.handleDomNode,L=ae.connection,V=xOe(!!T,ae.isValid);const fe={...J,isValid:V,to:ae.toHandle&&V?Mw({x:ae.toHandle.x,y:ae.toHandle.y},Q):q,toHandle:ae.toHandle,toPosition:V&&ae.toHandle?ae.toHandle.position:T8[ie.position],toNode:ae.toHandle?c.get(ae.toHandle.nodeId):null};V&&T&&J.toHandle&&fe.toHandle&&J.toHandle.type===fe.toHandle.type&&J.toHandle.nodeId===fe.toHandle.nodeId&&J.toHandle.id===fe.toHandle.id&&J.to.x===fe.to.x&&J.to.y===fe.to.y||(S(fe),J=fe)}function oe(he){if(U){(T||K)&&L&&V&&(y==null||y(L));const{inProgress:Q,...ae}=J,fe={...ae,toPosition:J.toHandle?J.toPosition:null};x==null||x(he,fe),i&&(N==null||N(he,fe))}p(),cancelAnimationFrame(R),B=!1,V=!1,L=null,K=null,P.removeEventListener("mousemove",Z),P.removeEventListener("mouseup",oe),P.removeEventListener("touchmove",Z),P.removeEventListener("touchend",oe)}P.addEventListener("mousemove",Z),P.addEventListener("mouseup",oe),P.addEventListener("touchmove",Z),P.addEventListener("touchend",oe)}function Wte(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:a,fromType:i,doc:o,lib:l,flowId:c,isValidConnection:u=Vte,nodeLookup:d}){const f=i==="target",m=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:v}=to(e),y=o.elementFromPoint(p,v),x=y!=null&&y.classList.contains(`${l}-flow__handle`)?y:m,w={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const N=qte(void 0,x),S=x.getAttribute("data-nodeid"),_=x.getAttribute("data-handleid"),k=x.classList.contains("connectable"),C=x.classList.contains("connectableend");if(!S||!N)return w;const E={source:f?S:r,sourceHandle:f?_:a,target:f?r:S,targetHandle:f?a:_};w.connection=E;const P=k&&C&&(n===Gh.Strict?f&&N==="source"||!f&&N==="target":S!==r||_!==a);w.isValid=P&&u(E),w.toHandle=Hte(S,N,_,d,n,!0)}return w}const f4={onPointerDown:yOe,isValid:Wte};function vOe({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const a=wa(e);function i({translateExtent:l,width:c,height:u,zoomStep:d=1,pannable:f=!0,zoomable:m=!0,inversePan:p=!1}){const v=S=>{if(S.sourceEvent.type!=="wheel"||!t)return;const _=n(),k=S.sourceEvent.ctrlKey&&bx()?10:1,C=-S.sourceEvent.deltaY*(S.sourceEvent.deltaMode===1?.05:S.sourceEvent.deltaMode?
13921:.002)*d,E=_[2]*Math.pow(2,C*k);t.scaleTo(E)};let y=[0,0];const x=S=>{(S.sourceEvent.type==="mousedown"||S.sourceEvent.type==="touchstart")&&(y=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY])},w=S=>{const _=n();if(S.sourceEvent.type!=="mousemove"&&S.sourceEvent.type!=="touchmove"||!t)return;const k=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY],C=[k[0]-y[0],k[1]-y[1]];y=k;const E=r()*Math.max(_[2],Math.log(_[2]))*(p?-1:1),O={x:_[0]-C[0]*E,y:_[1]-C[1]*E},P=[[0,0],[c,u]];t.setViewportConstrained({x:O.x,y:O.y,zoom:_[2]},P,l)},N=bte().on("start",x).on("zoom",f?w:null).on("zoom.wheel",m?v:null);a.call(N,{})}function o(){a.on("zoom",null)}return{update:i,destroy:o,pointer:Ci}}const bOe=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,G1=e=>({x:e.x,y:e.y,zoom:e.k}),H2=({x:e,y:t,zoom:n})=>q1.translate(e,t).scale(n),Yf=(e,t)=>e.target.closest(`.${t}`),Gte=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),wOe=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,q2=(e,t=0,n=wOe,r=()=>{})=>{const a=typeof t=="number"&&t>0;return a||r(),a?e.transition().duration(t).ease(n).on("end",r):e},Kte=e=>{const t=e.ctrlKey&&bx()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function jOe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:a,panOnScrollSpeed:i,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return d=>{if(Yf(d,t))return!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&o){const x=Ci(d),w=Kte(d),N=f*Math.pow(2,w);r.scaleTo(n,N,x,d);return}const m=d.deltaMode===1?20:1;let p=a===td.Vertical?0:d.deltaX*m,v=a===td.Horizontal?0:d.deltaY*m;!bx()&&d.shiftKey&&a!==td.Vertical&&(p=d.deltaY*m,v=0),r.translateBy(n,-(p/f)*i,-(v/f)*i,{internal:!0});const y=G1(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling||(e.isPanScrolling=!0,l==null||l(d,y)),e.isPanScrolling&&(c==null||c(d,y),e.panScrollTimeout=setTimeout(()=>{u==null||u(d,y),e.isPanScrolling=!1},150))}}function NOe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,a){const i=r.type==="wheel",o=!t&&i&&!r.ctrlKey,l=Yf(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,a)}}function SOe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,o,l;if((i=r.sourceEvent)!=null&&i.internal)return;const a=G1(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=a,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,a))}}function kOe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:a}){return i=>{var o,l;e.usedRightMouseButton=!!(n&&Gte(t,e.mouseButton??0)),(o=i.sourceEvent)!=null&&o.sync||r([i.transform.x,i.transform.y,i.transform.k]),a&&!((l=i.sourceEvent)!=null&&l.internal)&&(a==null||a(i.sourceEvent,G1(i.transform)))}}function COe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:a,onPaneContextMenu:i}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&Gte(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&i(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),a&&bOe(e.prevViewport,o.transform))){const c=G1(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{a==null||a(o.sourceEvent,c)},n?150:0)}}}function _Oe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:a,zoomOnDoubleClick:i,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:u}){return d=>{var v;const f=e||t,m=n&&d.ctrlKey;if(d.button===1&&d.type==="mousedown"&&(Yf(d,`${u}-flow__node`)||Yf(d,`${u}-flow__edge`)))return!0;if(!r&&!f&&!a&&!i&&!n||o||Yf(d,l)&&d.type==="wheel"||Yf(d,c)&&(d.type!=="wheel"||a&&d.type==="wheel"&&!e)||!n&&d.ctrlKey&&d.type==="wheel")return!1;if(!n&&d.type==="touchstart"&&((v=d.touches)==null?void 0:v.length)>1)return d.preventDefault(),!1;if(!f&&!a&&!m&&d.type==="wheel"||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const p=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||d.type==="wheel")&&p}}function AOe({domNode:e,minZoom:t,maxZoom:n,paneClickDistance:r,translateExtent:a,viewport:i,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:u}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},f=e.getBoundingClientRect(),m=bte().clickDistance(!Ii(r)||r<0?0:r).scaleExtent([t,n]).translateExtent(a),p=wa(e).call(m);S({x:i.x,y:i.y,zoom:Kh(i.zoom,t,n)},[[0,0],[f.width,f.height]],a);const v=p.on("wheel.zoom"),y=p.on("dblclick.zoom");m.wheelDelta(Kte);function x(D,z){return p?new Promise(I=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?tl:Db).transform(q2(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function w({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:I,userSelectionActive:F,panOnScroll:U,panOnDrag:H,panOnScrollMode:q,panOnScrollSpeed:B,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:K,zoomOnDoubleClick:W,zoomActivationKeyPressed:ie,lib:ve,onTransformChange:ge}){F&&!d.isZoomingOrPanning&&N();const ne=U&&!ie&&!F?jOe({zoomPanValues:d,noWheelClassName:D,d3Selection:p,d3Zoom:m,panOnScrollMode:q,panOnScrollSpeed:B,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:c}):NOe({noWheelClassName:D,preventScrolling:L,d3ZoomHandler:v});if(p.on("wheel.zoom",ne,{passive:!1}),!F){const oe=SOe({zoomPanValues:d,onDraggingChange:u,onPanZoomStart:l});m.on("start",oe);const he=kOe({zoomPanValues:d,panOnDrag:H,onPaneContextMenu:!!I,onPanZoom:o,onTransformChange:ge});m.on("zoom",he);const Q=COe({zoomPanValues:d,panOnDrag:H,panOnScroll:U,onPaneContextMenu:I,onPanZoomEnd:c,onDraggingChange:u});m.on("end",Q)}const Z=_Oe({zoomActivationKeyPressed:ie,panOnDrag:H,zoomOnScroll:K,panOnScroll:U,zoomOnDoubleClick:W,zoomOnPinch:V,userSelectionActive:F,noPanClassName:z,noWheelClassName:D,lib:ve});m.filter(Z),W?p.on("dblclick.zoom",y):p.on("dblclick.zoom",null)}function N(){m.on("zoom",null)}async function S(D,z,I){const F=H2(D),U=m==null?void 0:m.constrain()(F,z,I);return U&&await x(U),new Promise(H=>H(U))}async function _(D,z){const I=H2(D);return await x(I,z),new Promise(F=>F(I))}function k(D){if(p){const z=H2(D),I=p.property("__zoom");(I.k!==D.zoom||I.x!==D.x||I.y!==D.y)&&(m==null||m.transform(p,z,null,{sync:!0}))}}function C(){const D=p?vte(p.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function E(D,z){return p?new Promise(I=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?tl:Db).scaleTo(q2(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function O(D,z){return p?new Promise(I=>{m==null||m.interpolate((z==null?void 0:z.interpolate)==="linear"?tl:Db).scaleBy(q2(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>I(!0)),D)}):Promise.resolve(!1)}function P(D){m==null||m.scaleExtent(D)}function R(D){m==null||m.translateExtent(D)}function T(D){const z=!Ii(D)||D<0?0:D;m==null||m.clickDistance(z)}return{update:w,destroy:N,setViewport:_,setViewportConstrained:S,getViewport:C,scaleTo:E,scaleBy:O,setScaleExtent:P,setTranslateExtent:R,syncViewport:k,setClickDistance:T}}var Qh;(function(e){e.Line="line",e.Handle="handle"})(Qh||(Qh={}));function EOe({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:a,affectsY:i}){const o=e-t,l=n-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&a&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function POe(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),a=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:a}}function Ql(e,t){return Math.max(0,t-e)}function Zl(e,t){return Math.max(0,e-t)}function Yv(e,t,n){return Math.max(0,t-e,e-n)}function q8(e,t){return e?!t:t}function TOe(e,t,n,r,a,i,o,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:d,isVertical:f}=t,m=d&&f,{xSnapped:p,ySnapped:v}=n,{minWidth:y,maxWidth:x,minHeight:w,maxHeight:N}=r,{x:S,y:_,width:k,height:C,aspectRatio:E}=e;let O=Math.floor(d?p-e.pointerX:0),P=Math.floor(f?v-e.pointerY:0);const R=k+(c?-O:O),T=C+(u?-P:P),D=-i[0]*k,z=-i[1]*C;let I=Yv(R,y,x),F=Yv(T,w,N);if(o){let q=0,B=0;c&&O<0?q=Ql(S+O+D,o[0][0]):!c&&O>0&&(q=Zl(S+R+D,o[1][0])),u&&P<0?B=Ql(_+P+z,o[0][1]):!u&&P>0&&(B=Zl(_+T+z,o[1][1])),I=Math.max(I,q),F=Math.max(F,B)}if(l){let q=0,B=0;c&&O>0?q=Zl(S+O,l[0][0]):!c&&O<0&&(q=Ql(S+R,l[1][0])),u&&P>0?B=Zl(_+P,l[0][1]):!u&&P<0&&(B=Ql(_+T,l[1][1])),I=Math.max(I,q),F=Math.max(F,B)}if(a){if(d){const q=Yv(R/E,w,N)*E;if(I=Math.max(I,q),o){let B=0;!c&&!u||c&&!u&&m?B=Zl(_+z+R/E,o[1][1])*E:B=Ql(_+z+(c?O:-O)/E,o[0][1])*E,I=Math.max(I,B)}if(l){let B=0;!c&&!u||c&&!u&&m?B=Ql(_+R/E,l[1][1])*E:B=Zl(_+(c?O:-O)/E,l[0][1])*E,I=Math.max(I,B)}}if(f){const q=Yv(T*E,y,x)/E;if(F=Math.max(F,q),o){let B=0;!c&&!u||u&&!c&&m?B=Zl(S+T*E+D,o[1][0])/E:B=Ql(S+(u?P:-P)*E+D,o[0][0])/E,F=Math.max(F,B)}if(l){let B=0;!c&&!u||u&&!c&&m?B=Ql(S+T*E,l[1][0])/E:B=Zl(S+(u?P:-P)*E,l[0][0])/E,F=Math.max(F,B)}}}P=P+(P<0?F:-F),O=O+(O<0?I:-I),a&&(m?R>T*E?P=(q8(c,u)?-O:O)/E:O=(q8(c,u)?-P:P)*E:d?(P=O/E,u=c):(O=P*E,c=u));const U=c?S+O:S,H=u?_+P:_;return{width:k+(c?-O:O),height:C+(u?-P:P),x:i[0]*O*(c?-1:1)+U,y:i[1]*P*(u?-1:1)+H}}const Yte={width:0,height:0,x:0,y:0},IOe={...Yte,pointerX:0,pointerY:0,aspectRatio:1};function OOe(e){return[[0,0],[e.measured.width,e.measured.height]]}function MOe(e,t,n){const r=t.position.x+e.position.x,a=t.position.y+e.position.y,i=e.measured.width??0,o=e.measured.height??0,l=n[0]*i,c=n[1]*o;return[[r-l,a-c],[r+i-l,a+o-c]]}function ROe({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:a}){const i=wa(e);function o({controlPosition:c,boundaries:u,keepAspectRatio:d,resizeDirection:f,onResizeStart:m,onResize:p,onResizeEnd:v,shouldResize:y}){let x={...Yte},w={...IOe};
1392const N=POe(c);let S,_=null,k=[],C,E,O;const P=ate().on("start",R=>{const{nodeLookup:T,transform:D,snapGrid:z,snapToGrid:I,nodeOrigin:F,paneDomNode:U}=n();if(S=T.get(t),!S)return;_=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:q}=Pg(R.sourceEvent,{transform:D,snapGrid:z,snapToGrid:I,containerBounds:_});x={width:S.measured.width??0,height:S.measured.height??0,x:S.position.x??0,y:S.position.y??0},w={...x,pointerX:H,pointerY:q,aspectRatio:x.width/x.height},C=void 0,S.parentId&&(S.extent==="parent"||S.expandParent)&&(C=T.get(S.parentId),E=C&&S.extent==="parent"?OOe(C):void 0),k=[],O=void 0;for(const[B,L]of T)if(L.parentId===t&&(k.push({id:B,position:{...L.position},extent:L.extent}),L.extent==="parent"||L.expandParent)){const V=MOe(L,S,L.origin??F);O?O=[[Math.min(V[0][0],O[0][0]),Math.min(V[0][1],O[0][1])],[Math.max(V[1][0],O[1][0]),Math.max(V[1][1],O[1][1])]]:O=V}m==null||m(R,{...x})}).on("drag",R=>{const{transform:T,snapGrid:D,snapToGrid:z,nodeOrigin:I}=n(),F=Pg(R.sourceEvent,{transform:T,snapGrid:D,snapToGrid:z,containerBounds:_}),U=[];if(!S)return;const{x:H,y:q,width:B,height:L}=x,V={},K=S.origin??I,{width:W,height:ie,x:ve,y:ge}=TOe(w,N,F,u,d,K,E,O),J=W!==B,ne=ie!==L,Z=ve!==H&&J,oe=ge!==q&&ne;if(!Z&&!oe&&!J&&!ne)return;if((Z||oe||K[0]===1||K[1]===1)&&(V.x=Z?ve:x.x,V.y=oe?ge:x.y,x.x=V.x,x.y=V.y,k.length>0)){const fe=ve-H,Ee=ge-q;for(const Re of k)Re.position={x:Re.position.x-fe+K[0]*(W-B),y:Re.position.y-Ee+K[1]*(ie-L)},U.push(Re)}if((J||ne)&&(V.width=J&&(!f||f==="horizontal")?W:x.width,V.height=ne&&(!f||f==="vertical")?ie:x.height,x.width=V.width,x.height=V.height),C&&S.expandParent){const fe=K[0]*(V.width??0);V.x&&V.x<fe&&(x.x=fe,w.x=w.x-(V.x-fe));const Ee=K[1]*(V.height??0);V.y&&V.y<Ee&&(x.y=Ee,w.y=w.y-(V.y-Ee))}const he=EOe({width:x.width,prevWidth:B,height:x.height,prevHeight:L,affectsX:N.affectsX,affectsY:N.affectsY}),Q={...x,direction:he};(y==null?void 0:y(R,Q))!==!1&&(p==null||p(R,Q),r(V,U))}).on("end",R=>
1392{v==null||v(R,{...x}),a==null||a({...x})});i.call(P)}function l(){i.on(".drag",null)}return{update:o,destroy:l}}var V2={exports:{}},W2={},G2={exports:{}},K2={};/**
1393 * @license React
1394 * use-sync-external-store-shim.production.js
1395 *
1396 * Copyright (c) Meta Platforms, Inc. and affiliates.
1397 *
1398 * This source code is licensed under the MIT license found in the
1399 * LICENSE file in the root directory of this source tree.
1400 */var V8;function DOe(){if(V8)return K2;V8=1;var e=uy();function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,o=e.useDebugValue;function l(f,m){var p=m(),v=r({inst:{value:p,getSnapshot:m}}),y=v[0].inst,x=v[1];return i(function(){y.value=p,y.getSnapshot=m,c(y)&&x({inst:y})},[f,p,m]),a(function(){return c(y)&&x({inst:y}),f(function(){c(y)&&x({inst:y})})},[f]),o(p),p}function c(f){var m=f.getSnapshot;f=f.value;try{var p=m();return!n(f,p)}catch{return!0}}function u(f,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:l;return K2.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,K2}var W8;function Xte(){return W8||(W8=1,G2.exports=DOe()),G2.exports}/**
1401 * @license React
1402 * use-sync-external-store-shim/with-selector.production.js
1403 *
1404 * Copyright (c) Meta Platforms, Inc. and affiliates.
1405 *
1406 * This source code is licensed under the MIT license found in the
1407 * LICENSE file in the root directory of this source tree.
1408 */var G8;function LOe(){if(G8)return W2;G8=1;var e=uy(),t=Xte();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return W2.useSyncExternalStoreWithSelector=function(u,d,f,m,p){var v=i(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=l(function(){function w(C){if(!N){if(N=!0,S=C,C=m(C),p!==void 0&&y.hasValue){var E=y.value;if(p(E,C))return _=E}return _=C}if(E=_,r(S,C))return E;var O=m(C);return p!==void 0&&p(E,O)?(S=C,E):(S=C,_=O)}var N=!1,S,_,k=f===void 0?null:f;return[function(){return w(d())},k===null?void 0:function(){return w(k())}]},[d,f,m,p]);var x=a(u,v[0],v[1]);return o(function(){y.hasValue=!0,y.value=x},[x]),c(x),x},W2}var K8;function $Oe(){return K8||(K8=1,V2.exports=LOe()),V2.exports}var FOe=$Oe();const zOe=tn(FOe),BOe={},Y8=e=>{let t;const n=new Set,r=(d,f)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const p=t;t=f??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(v=>v(t,p))}},a=()=>t,c={setState:r,getState:a,getInitialState:()=>u,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(BOe?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,a,c);return c},UOe=e=>e?Y8(e):Y8,{useDebugValue:HOe}=X,{useSyncExternalStoreWithSelector:qOe}=zOe,VOe=e=>e;function Qte(e,t=VOe,n){const r=qOe(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return HOe(r),r}const X8=(e,t)=>{const n=UOe(e),r=(a,i=t)=>Qte(n,a,i);return Object.assign(r,n),r},WOe=(e,t)=>e?X8(e,t):X8;function tr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const K1=b.createContext(null),GOe=K1.Provider,Zte=go.error001();function Jt(e,t){const n=b.useContext(K1);if(n===null)throw new Error(Zte);return Qte(n,e,t)}function Yn(){const e=b.useContext(K1);if(e===null)throw new Error(Zte);return b.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Q8={display:"none"},KOe={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jte="react-flow__node-desc",ene="react-flow__edge-desc",YOe="react-flow__aria-live",XOe=e=>e.ariaLiveMessage,QOe=e=>e.ariaLabelConfig;function ZOe({rfId:e}){const t=Jt(XOe);return s.jsx("div",{id:`${YOe}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:KOe,children:t})}function JOe({rfId:e,disableKeyboardA11y:t}){const n=Jt(QOe);return s.jsxs(s.Fragment,{children:[s.jsx("div",{id:`${Jte}-${e}`,style:Q8,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),s.jsx("div",{id:`${ene}-${e}`,style:Q8,children:n["edge.a11yDescription.default"]}),!t&&s.jsx(ZOe,{rfId:e})]})}const Y1=b.forwardRef(({position:e="top-left",children:t,className:n,style:r,...a},i)=>{const o=`${e}`.split("-");return s.jsx("div",{className:_r(["react-flow__panel",n,...o]),style:r,ref:i,...a,children:t})});Y1.displayName="Panel";function eMe({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:s.jsx(Y1,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:s.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const tMe=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Xv=e=>e.id;function nMe(e,t){return tr(e.selectedNodes.map(Xv),t.selectedNodes.map(Xv))&&tr(e.selectedEdges.map(Xv),t.selectedEdges.map(Xv))}function rMe({onSelectionChange:e}){const t=Yn(),{selectedNodes:n,selectedEdges:r}=Jt(tMe,nMe);return b.useEffect(()=>{const a={nodes:n,edges:r};
1408e==null||e(a),t.getState().onSelectionChangeHandlers.forEach(i=>i(a))},[n,r,e]),null}const sMe=e=>!!e.onSelectionChangeHandlers;function aMe({onSelectionChange:e}){const t=Jt(sMe);return e||t?s.jsx(rMe,{onSelectionChange:e}):null}const tne=[0,0],iMe={x:0,y:0,zoom:1},oMe=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","ariaLabelConfig"],Z8=[...oMe,"rfId"],lMe=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),J8={translateExtent:xx,nodeOrigin:tne,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function cMe(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:a,setTranslateExtent:i,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c,setPaneClickDistance:u}=Jt(lMe,tr),d=Yn();b.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{f.current=J8,l()}),[]);const f=b.useRef(J8);return b.useEffect(()=>{for(const m of Z8){const p=e[m],v=f.current[m];p!==v&&(typeof e[m]>"u"||(m==="nodes"?t(p):m==="edges"?n(p):m==="minZoom"?r(p):m==="maxZoom"?a(p):m==="translateExtent"?i(p):m==="nodeExtent"?o(p):m==="paneClickDistance"?u(p):m==="ariaLabelConfig"?d.setState({ariaLabelConfig:KIe(p)}):m==="fitView"?d.setState({fitViewQueued:p}):m==="fitViewOptions"?d.setState({fitViewOptions:p}):d.setState({[m]:p})))}f.current=e},Z8.map(m=>e[m])),null}function ez(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function uMe(e){var r;const[t,n]=b.useState(e==="system"?null:e);return b.useEffect(()=>{if(e!=="system"){n(e);return}const a=ez(),i=()=>n(a!=null&&a.matches?"dark":"light");return i(),a==null||a.addEventListener("change",i),()=>{a==null||a.removeEventListener("change",i)}},[e]),t!==null?t:(r=ez())!=null&&r.matches?"dark":"light"}const tz=typeof document<"u"?document:null;function jx(e=null,t={target:tz,actInsideInputWithModifier:!0}){const[n,r]=b.useState(!1),a=b.useRef(!1),i=b.useRef(new Set([])),[o,l]=b.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",`
1409`).replace(`
1410
1411`,`
1412+`).split(`
1413`)),d=u.reduce((f,m)=>f.concat(...m),[]);return[u,d]}return[[],[]]},[e]);return b.useEffect(()=>{const c=(t==null?void 0:t.target)??tz,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=p=>{var x,w;if(a.current=p.ctrlKey||p.metaKey||p.shiftKey||p.altKey,(!a.current||a.current&&!u)&&Ote(p))return!1;const y=rz(p.code,l);if(i.current.add(p[y]),nz(o,i.current,!1)){const N=((w=(x=p.composedPath)==null?void 0:x.call(p))==null?void 0:w[0])||p.target,S=(N==null?void 0:N.nodeName)==="BUTTON"||(N==null?void 0:N.nodeName)==="A";t.preventDefault!==!1&&(a.current||!S)&&p.preventDefault(),r(!0)}},f=p=>{const v=rz(p.code,l);nz(o,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(p[v]),p.key==="Meta"&&i.current.clear(),a.current=!1},m=()=>{i.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",d),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",d),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function nz(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(a=>t.has(a)))}function rz(e,t){return t.includes(e)?"code":"key"}const dMe=()=>{const e=Yn();return b.useMemo(()=>({zoomIn:t=>
1413{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,a,i],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??a,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:a,minZoom:i,maxZoom:o,panZoom:l}=e.getState(),c=vR(t,r,a,i,o,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:a,snapToGrid:i,domNode:o}=e.getState();if(!o)return t;const{x:l,y:c}=o.getBoundingClientRect(),u={x:t.x-l,y:t.y-c}
1413,d=n.snapGrid??a,f=n.snapToGrid??i;return Hy(u,r,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:a,y:i}=r.getBoundingClientRect(),o=Mw(t,n);return{x:o.x+a,y:o.y+i}}}),[])};function nne(e,t){const n=[],r=new Map,a=[];for(const i of e)if(i.type==="add"){a.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const o=r.get(i.id);o?o.push(i):r.set(i.id,[i])}for(const i of t){const o=r.get(i.id);if(!o){n.push(i);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...i};for(const c of o)fMe(c,l);n.push(l)}return a.length&&a.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function fMe(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured??(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function rne(e,t){return nne(e,t)}function sne(e,t){return nne(e,t)}function Su(e,t){return{id:e,type:"select",selected:t}}function Xf(e,t=new Set,n=!1){const r=[];for(const[a,i]of e){const o=t.has(a);!(i.selected===void 0&&!o)&&i.selected!==o&&(n&&(i.selected=o),r.push(Su(i.id,o)))}return r}function sz({items:e=[],lookup:t}){var a;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,o]of e.entries()){const l=t.get(o.id),c=((a=l==null?void 0:l.internals)==null?void 0:a.userNode)??l;c!==void 0&&c!==o&&n.push({id:o.id,item:o,type:"replace"}),c===void 0&&n.push({item:o,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function az(e){return{id:e.id,type:"remove"}}const iz=e=>$Ie(e),hMe=e=>kte(e);function ane(e){return b.forwardRef(e)}const mMe=typeof window<"u"?b.useLayoutEffect:b.useEffect;function oz(e){const[t,n]=b.useState(BigInt(0)),[r]=b.useState(()=>pMe(()=>n(a=>a+BigInt(1))));return mMe(()=>{const a=r.get();a.length&&(e(a),r.reset())},[t]),r}function pMe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const ine=b.createContext(null);function gMe({children:e}){const t=Yn(),n=b.useCallback(l=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:d,onNodesChange:f,nodeLookup:m,fitViewQueued:p}=t.getState();let v=c;for(const x of l)v=typeof x=="function"?x(v):x;const y=sz({items:v,lookup:m});d&&u(v),y.length>0?f==null||f(y):p&&window.requestAnimationFrame(()=>{const{fitViewQueued:x,nodes:w,setNodes:N}=t.getState();x&&N(w)})},[]),r=oz(n),a=b.useCallback(l=>{const{edges:c=[],setEdges:u,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:m}=t.getState();let p=c;for(const v of l)p=typeof v=="function"?v(p):v;d?u(p):f&&f(sz({items:p,lookup:m}))},[]),i=oz(a),o=b.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return s.jsx(ine.Provider,{value:o,children:e})}function xMe(){const e=b.useContext(ine);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const yMe=e=>!!e.panZoom;function kR(){const e=dMe(),t=Yn(),n=xMe(),r=Jt(yMe),a=b.useMemo(()=>{const i=f=>t.getState().nodeLookup.get(f),o=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},c=f=>{var w,N;const{nodeLookup:m,nodeOrigin:p}=t.getState(),v=iz(f)?f:m.get(f.id),y=v.parentId?Tte(v.position,v.measured,v.parentId,m,p):v.position,x={...v,position:y,width:((w=v.measured)==null?void 0:w.width)??v.width,height:((N=v.measured)==null?void 0:N.height)??v.height};return Yh(x)},u=(f,m,p={replace:!1})=>{o(v=>v.map(y=>{if(y.id===f){const x=typeof m=="function"?m(y):m;return p.replace&&iz(x)?x:{...y,...x}}return y}))},d=(f,m,p={replace:!1})=>{l(v=>v.map(y=>{if(y.id===f){const x=typeof m=="function"?m(y):m;return p.replace&&hMe(x)?x:{...y,...x}}return y}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=i(f))==null?void 0:m.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(m=>({...m}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:o,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];n.nodeQueue.push(p=>[...p,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];n.edgeQueue.push(p=>[...p,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:p}=t.getState(),[v,y,x]=p;return{nodes:f.map(w=>({...w})),edges:m.map(w=>({...w})),viewport:{x:v,y,zoom:x}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:p,edges:v,onNodesDelete:y,onEdgesDelete:x,triggerNodeChanges:w,triggerEdgeChanges:N,onDelete:S,onBeforeDelete:_}=t.getState(),{nodes:k,edges:C}=await HIe({nodesToRemove:f,edgesToRemove:m,nodes:p,edges:v,onBeforeDelete:_}),E=C.length>0,O=k.length>0;if(E){const P=C.map(az);x==null||x(C),N(P)}if(O){const P=k.map(az);y==null||y(k),w(P)}return(O||E)&&(S==null||S({nodes:k,edges:C})),{deletedNodes:k,deletedEdges:C}},getIntersectingNodes:(f,m=!0,p)=>{const v=O8(f),y=v?f:c(f),x=p!==void 0;return y?(p||t.getState().nodes).filter(w=>{const N=t.getState().nodeLookup.get(w.id);if(N&&!v&&(w.id===f.id||!N.internals.positionAbsolute))return!1;const S=Yh(x?w:N),_=vx(S,y);return m&&_>0||_>=S.width*S.height||_>=y.width*y.height}):[]},isNodeIntersecting:(f,m,p=!0)=>{const y=O8(f)?f:c(f);if(!y)return!1;const x=vx(y,m);return p&&x>0||x>=y.width*y.height},updateNode:u,updateNodeData:(f,m,p={replace:!1})=>{u(f,v=>{const y=typeof m=="function"?m(v):m;return p.replace?{...v,data:y}:{...v,data:{...v.data,...y}}},p)},updateEdge:d,updateEdgeData:(f,m,p={replace:!1})=>{d(f,v=>{const y=typeof m=="function"?m(v):m;return p.replace?{...v,data:y}:{...v,data:{...v.data,...y}}},p)}
1413,getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:p}=t.getState();return FIe(f,{nodeLookup:m,nodeOrigin:p})},getHandleConnections:({type:f,id:m,nodeId:p})=>{var v;return Array.from(((v=t.getState().connectionLookup.get(`${p}-${f}${m?`-${m}`:""}`))==null?void 0:v.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:p})=>{var v;return Array.from(((v=t.getState().connectionLookup.get(`${p}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:v.values())??[])},fitView:async f=>{const m=t.getState().fitViewResolver??GIe();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),n.nodeQueue.push(p=>[...p]),m.promise}}},[]);return b.useMemo(()=>({...a,...e,viewportInitialized:r}),[r])}const lz=e=>e.selected,vMe=typeof window<"u"?window:void 0;function bMe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Yn(),{deleteElements:r}=kR(),a=jx(e,{actInsideInputWithModifier:!1}),i=jx(t,{target:vMe});b.useEffect(()=>{if(a){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(lz),edges:o.filter(lz)}),n.setState({nodesSelectionActive:!1})}},[a]),b.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function wMe(e){const t=Yn();b.useEffect(()=>{const n=()=>{var a,i;if(!e.current)return!1;const r=bR(e.current);(r.height===0||r.width===0)&&((i=(a=t.getState()).onError)==null||i.call(a,"004",go.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const X1={position:"absolute",width:"100%",height:"100%",top:0,left:0},jMe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function NMe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:a=.5,panOnScrollMode:i=td.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:u,minZoom:d,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:p=!0,children:v,noWheelClassName:y,noPanClassName:x,onViewportChange:w,isControlledViewport:N,paneClickDistance:S}){const _=Yn(),k=b.useRef(null),{userSelectionActive:C,lib:E}=Jt(jMe,tr),O=jx(m),P=b.useRef();wMe(k);const R=b.useCallback(T=>{w==null||w({x:T[0],y:T[1],zoom:T[2]}),N||_.setState({transform:T})},[w,N]);return b.useEffect(()=>{if(k.current){P.current=AOe({domNode:k.current,minZoom:d,maxZoom:f,translateExtent:u,viewport:c,paneClickDistance:S,onDraggingChange:I=>_.setState({paneDragging:I}),onPanZoomStart:(I,F)=>{const{onViewportChangeStart:U,onMoveStart:H}=_.getState();H==null||H(I,F),U==null||U(F)},onPanZoom:(I,F)=>{const{onViewportChange:U,onMove:H}=_.getState();H==null||H(I,F),U==null||U(F)},onPanZoomEnd:(I,F)=>{const{onViewportChangeEnd:U,onMoveEnd:H}=_.getState();H==null||H(I,F),U==null||U(F)}});const{x:T,y:D,zoom:z}=P.current.getViewport();return _.setState({panZoom:P.current,transform:[T,D,z],domNode:k.current.closest(".react-flow")}),()=>{var I;(I=P.current)==null||I.destroy()}}},[]),b.useEffect(()=>{var T;(T=P.current)==null||T.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:a,panOnScrollMode:i,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:O,preventScrolling:p,noPanClassName:x,userSelectionActive:C,noWheelClassName:y,lib:E,onTransformChange:R})},[e,t,n,r,a,i,o,l,O,p,x,C,y,E,R]),s.jsx("div",{className:"react-flow__renderer",ref:k,style:X1,children:v})}const SMe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function kMe(){const{userSelectionActive:e,userSelectionRect:t}=Jt(SMe,tr);return e&&t?s.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Y2=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},CMe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function _Me({isSelecting:e,selectionKeyPressed:t,selectionMode:n=yx.Full,panOnDrag:r,selectionOnDrag:a,onSelectionStart:i,onSelectionEnd:o,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:m,children:p}){const v=Yn(),{userSelectionActive:y,elementsSelectable:x,dragging:w,connectionInProgress:N}=Jt(CMe,tr),S=x&&(e||y),_=b.useRef(null),k=b.useRef(),C=b.useRef(new Set),E=b.useRef(new Set),O=b.useRef(!1),P=b.useRef(!1),R=H=>{if(O.current||N){O.current=!1;return}l==null||l(H),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},T=H=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){H.preventDefault();return}c==null||c(H)},D=u?H=>u(H):void 0,z=H=>{var K,W;
1413const{resetSelectedElements:q,domNode:B}=v.getState();if(k.current=B==null?void 0:B.getBoundingClientRect(),!x||!e||H.button!==0||H.target!==_.current||!k.current)return;(W=(K=H.target)==null?void 0:K.setPointerCapture)==null||W.call(K,H.pointerId),P.current=!0,O.current=!1;const{x:L,y:V}=to(H.nativeEvent,k.current);q(),v.setState({userSelectionRect:{width:0,height:0,startX:L,startY:V,x:L,y:V}}),i==null||i(H)},I=H=>{const{userSelectionRect:q,transform:B,nodeLookup:L,edgeLookup:V,connectionLookup:K,triggerNodeChanges:W,triggerEdgeChanges:ie,defaultEdgeOptions:ve}=v.getState();if(!k.current||!q)return;O.current=!0;const{x:ge,y:J}=to(H.nativeEvent,k.current),{startX:ne,startY:Z}=q,oe={startX:ne,startY:Z,x:ge<ne?ge:ne,y:J<Z?J:Z,width:Math.abs(ge-ne),height:Math.abs(J-Z)},he=C.current,Q=E.current;C.current=new Set(yR(L,oe,B,n===yx.Partial,!0).map(fe=>fe.id)),E.current=new Set;const ae=(ve==null?void 0:ve.selectable)??!0;for(const fe of C.current){const Ee=K.get(fe);if(Ee)for(const{edgeId:Re}of Ee.values()){const qe=V.get(Re);qe&&(qe.selectable??ae)&&E.current.add(Re)}}if(!M8(he,C.current)){const fe=Xf(L,C.current,!0);W(fe)}if(!M8(Q,E.current)){const fe=Xf(V,E.current);ie(fe)}v.setState({userSelectionRect:oe,userSelectionActive:!0,nodesSelectionActive:!1})},F=H=>{var B,L;if(H.button!==0||!P.current)return;(L=(B=H.target)==null?void 0:B.releasePointerCapture)==null||L.call(B,H.pointerId);const{userSelectionRect:q}=v.getState();!y&&q&&H.target===_.current&&(R==null||R(H)),v.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:C.current.size>0}),o==null||o(H),(t||a)&&(O.current=!1),P.current=!1},U=r===!0||Array.isArray(r)&&r.includes(0);return s.jsxs("div",{className:_r(["react-flow__pane",{draggable:U,dragging:w,selection:e}]),onClick:S?void 0:Y2(R,_),onContextMenu:Y2(T,_),onWheel:Y2(D,_),onPointerEnter:S?void 0:d,onPointerDown:S?z:f,onPointerMove:S?I:f,onPointerUp:S?F:void 0,onPointerLeave:m,ref:_,style:X1,children:[p,s.jsx(kMe,{})]})}function h4({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:o,nodeLookup:l,onError:c}=t.getState(),u=l.get(e);if(!u){c==null||c("012",go.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&o)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):a([e])}function one({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:a,isSelectable:i,nodeClickDistance:o}){const l=Yn(),[c,u]=b.useState(!1),d=b.useRef();return b.useEffect(()=>{d.current=hOe({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{h4({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),b.useEffect(()=>{var f,m;if(t)(f=d.current)==null||f.destroy();else if(e.current)return(m=d.current)==null||m.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:a,nodeClickDistance:o}),()=>{var p;(p=d.current)==null||p.destroy()}},[n,r,t,i,e,a]),c}const AMe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function lne(){const e=Yn();return b.useCallback(n=>{const{nodeExtent:r,snapToGrid:a,snapGrid:i,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:u,nodeOrigin:d}=e.getState(),f=new Map,m=AMe(o),p=a?i[0]:5,v=a?i[1]:5,y=n.direction.x*p*n.factor,x=n.direction.y*v*n.factor;for(const[,w]of u){if(!m(w))continue;let N={x:w.internals.positionAbsolute.x+y,y:w.internals.positionAbsolute.y+x};a&&(N=Uy(N,i));const{position:S,positionAbsolute:_}=Cte({nodeId:w.id,nextPosition:N,nodeLookup:u,nodeExtent:r,nodeOrigin:d,onError:l});w.position=S,w.internals.positionAbsolute=_,f.set(w.id,w)}c(f)},[])}const CR=b.createContext(null),EMe=CR.Provider;CR.Consumer;const cne=()=>b.useContext(CR),PMe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),TMe=(e,t,n)=>r=>{const{connectionClickStartHandle:a,connectionMode:i,connection:o}=r,{fromHandle:l,toHandle:c,isValid:u}=o,d=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,isPossibleEndHandle:i===Gh.Str
1413ict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!a,valid:d&&u}};function IMe({type:e="source",position:t=tt.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:o,onConnect:l,children:c,className:u,onMouseDown:d,onTouchStart:f,...m},p){var F,U;const v=o||null,y=e==="target",x=Yn(),w=cne(),{connectOnClick:N,noPanClassName:S,rfId:_}=Jt(PMe,tr),{connectingFrom:k,connectingTo:C,clickConnecting:E,isPossibleEndHandle:O,connectionInProcess:P,clickConnectionInProcess:R,valid:T}=Jt(TMe(w,v,e),tr);w||(U=(F=x.getState()).onError)==null||U.call(F,"010",go.error010());const D=H=>{const{defaultEdgeOptions:q,onConnect:B,hasDefaultEdges:L}=x.getState(),V={...q,...H};if(L){const{edges:K,setEdges:W}=x.getState();W($te(V,K))}B==null||B(V),l==null||l(V)},z=H=>{if(!w)return;const q=Mte(H.nativeEvent);if(a&&(q&&H.button===0||!q)){const B=x.getState();f4.onPointerDown(H.nativeEvent,{handleDomNode:H.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:y,handleId:v,nodeId:w,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:B.onConnectEnd,updateConnection:B.updateConnection,onConnect:D,isValidConnection:n||B.isValidConnection,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}q?d==null||d(H):f==null||f(H)},I=H=>{const{onClickConnectStart:q,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:V,isValidConnection:K,lib:W,rfId:ie,nodeLookup:ve,connection:ge}=x.getState();if(!w||!L&&!a)return;if(!L){q==null||q(H.nativeEvent,{nodeId:w,handleId:v,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:w,type:e,id:v}});return}const J=Ite(H.target),ne=n||K,{connection:Z,isValid:oe}=f4.isValid(H.nativeEvent,{handle:{nodeId:w,id:v,type:e},connectionMode:V,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:ne,flowId:ie,doc:J,lib:W,nodeLookup:ve});oe&&Z&&D(Z);const he=structuredClone(ge);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,B==null||B(H,he),x.setState({connectionClickStartHandle:null})};return s.jsx("div",{"data-handleid":v,"data-nodeid":w,"data-handlepos":t,"data-id":`${_}-${w}-${v}-${e}`,className:_r(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",S,u,{source:!y,target:y,connectable:r,connectablestart:a,connectableend:i,clickconnecting:E,connectingfrom:k,connectingto:C,valid:T,connectionindicator:r&&(!P||O)&&(P||R?i:a)}]),onMouseDown:z,onTouchStart:z,onClick:N?I:void 0,ref:p,...m,children:c})}const ra=b.memo(ane(IMe));function OMe({data:e,isConnectable:t,sourcePosition:n=tt.Bottom}){return s.jsxs(s.Fragment,{children:[e==null?void 0:e.label,s.jsx(ra,{type:"source",position:n,isConnectable:t})]})}function MMe({data:e,isConnectable:t,targetPosition:n=tt.Top,sourcePosition:r=tt.Bottom}){return s.jsxs(s.Fragment,{children:[s.jsx(ra,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,s.jsx(ra,{type:"source",position:r,isConnectable:t})]})}function RMe(){return null}function DMe({data:e,isConnectable:t,targetPosition:n=tt.Top}){return s.jsxs(s.Fragment,{children:[s.jsx(ra,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Rw={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},cz={input:OMe,default:MMe,output:DMe,group:RMe};function LMe(e){var t,n,r,a;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((a=e.style)==null?void 0:a.height)}}const $Me=e=>{const{width:t,height:n,x:r,y:a}=By(e.nodeLookup,{filter:i=>!!i.selected});return{width:Ii(t)?t:null,height:Ii(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${a}px)`}};function FMe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Yn(),{width:a,height:i,transformString:o,userSelectionActive:l}=Jt($Me,tr),c=lne(),u=b.useRef(null);if(b.useEffect(()=>{var m;n||(m=u.current)==null||m.focus({preventScroll:!0})},[n]),one({nodeRef:u}),l||!a||!i)return null;const d=e?m=>{const p=r.getState().nodes.filter(v=>v.selected);e(m,p)}:void 0,f=m=>{Object.prototype.hasOwnProperty.call(Rw,m.key)&&(m.preventDefault(),c({direction:Rw[m.key],factor:m.shiftKey?4:1}))};return s.jsx("div",{className:_r(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:s.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:a,height:i}})})}const uz=typeof window<"u"?window:void 0,zMe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function une({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:d,selectionMode:f,onSelectionStart:m,onSelectionEnd:p,multiSelectionKeyCode:v,panActivationKeyCode:y,zoomActivationKeyCode:x,elementsSelectable:w,zoomOnScroll:N,zoomOnPinch:S,panOnScroll:_,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:E,panOnDrag:O,defaultViewport:P,translateExtent:R,minZ
1413oom:T,maxZoom:D,preventScrolling:z,onSelectionContextMenu:I,noWheelClassName:F,noPanClassName:U,disableKeyboardA11y:H,onViewportChange:q,isControlledViewport:B}){const{nodesSelectionActive:L,userSelectionActive:V}=Jt(zMe),K=jx(u,{target:uz}),W=jx(y,{target:uz}),ie=W||O,ve=W||_,ge=d&&ie!==!0,J=K||V||ge;return bMe({deleteKeyCode:c,multiSelectionKeyCode:v}),s.jsx(NMe,{onPaneContextMenu:i,elementsSelectable:w,zoomOnScroll:N,zoomOnPinch:S,panOnScroll:ve,panOnScrollSpeed:k,panOnScrollMode:C,zoomOnDoubleClick:E,panOnDrag:!K&&ie,defaultViewport:P,translateExtent:R,minZoom:T,maxZoom:D,zoomActivationKeyCode:x,preventScrolling:z,noWheelClassName:F,noPanClassName:U,onViewportChange:q,isControlledViewport:B,paneClickDistance:l,children:s.jsxs(_Me,{onSelectionStart:m,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:o,panOnDrag:ie,isSelecting:!!J,selectionMode:f,selectionKeyPressed:K,selectionOnDrag:ge,children:[e,L&&s.jsx(FMe,{onSelectionContextMenu:I,noPanClassName:U,disableKeyboardA11y:H})]})})}une.displayName="FlowRenderer";const BMe=b.memo(une),UMe=e=>t=>e?yR(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function HMe(e){return Jt(b.useCallback(UMe(e),[e]),tr)}const qMe=e=>e.updateNodeInternals;function VMe(){const e=Jt(qMe),[t]=b.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(a=>{const i=a.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:a.target,force:!0})}),e(r)}));return b.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function WMe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const a=Yn(),i=b.useRef(null),o=b.useRef(null),l=b.useRef(e.sourcePosition),c=b.useRef(e.targetPosition),u=b.useRef(t),d=n&&!!e.internals.handleBounds;return b.useEffect(()=>{i.current&&!e.hidden&&(!d||o.current!==i.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(i.current),o.current=i.current)},[d,e.hidden]),b.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),b.useEffect(()=>{if(i.current){const f=u.current!==t,m=l.current!==e.sourcePosition,p=c.current!==e.targetPosition;(f||m||p)&&(u.current=t,l.current=e.sourcePosition,c.current=e.targetPosition,a.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function GMe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:a,onContextMenu:i,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:u,nodesFocusable:d,resizeObserver:f,noDragClassName:m,noPanClassName:p,disableKeyboardA11y:v,rfId:y,nodeTypes:x,nodeClickDistance:w,onError:N}){const{node:S,internals:_,isParent:k}=Jt(ne=>{const Z=ne.nodeLookup.get(e),oe=ne.parentLookup.has(e);return{node:Z,internals:Z.internals,isParent:oe}},tr);let C=S.type||"default",E=(x==null?void 0:x[C])||cz[C];E===void 0&&(N==null||N("003",go.error003(C)),C="default",E=(x==null?void 0:x.default)||cz.default);const O=!!(S.draggable||l&&typeof S.draggable>"u"),P=!!(S.selectable||c&&typeof S.selectable>"u"),R=!!(S.connectable||u&&typeof S.connectable>"u"),T=!!(S.focusable||d&&typeof S.focusable>"u"),D=Yn(),z=Pte(S),I=WMe({node:S,nodeType:C,hasDimensions:z,resizeObserver:f}),F=one({nodeRef:I,disabled:S.hidden||!O,noDragClassName:m,handleSelector:S.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:w}),U=lne();if(S.hidden)return null;const H=jl(S),q=LMe(S),B=P||O||t||n||r||a,L=n?ne=>n(ne,{..._.userNode}):void 0,V=r?ne=>r(ne,{..._.userNode}):void 0,K=a?ne=>a(ne,{..._.userNode}):void 0,W=i?ne=>i(ne,{..._.userNode}):void 0,ie=o?ne=>o(ne,{..._.userNode}):void 0,ve=ne=>{const{selectNodesOnDrag:Z,nodeDragThreshold:oe}=D.getState();P&&(!Z||!O||oe>0)&&h4({id:e,store:D,nodeRef:I}),t&&t(ne,{..._.userNode})},ge=ne=>{if(!(Ote(ne.nativeEvent)||v)){if(wte.includes(ne.key)&&P){const Z=ne.key==="Escape";h4({id:e,store:D,unselect:Z,nodeRef:I})}else if(O&&S.selected&&Object.prototype.hasOwnProperty.call(Rw,ne.key)){ne.preventDefault();const{ariaLabelConfig:Z}=D.getState();D.setState({ariaLiveMessage:Z["node.a11yDescription.ariaLiveMessage"]({direction:ne.key.replace("Arrow","").toLowerCase(),x:~~_.positionAbsolute.x,y:~~_.positionAbsolute.y})}),U({direction:Rw[ne.key],factor:ne.shiftKey?4:1})}}},J=()=>{var fe;if(v||!((fe=I.current)!=null&&fe.matches(":focus-visible")))return;const{transform:ne,width:Z,height:oe,autoPanOnNodeFocus:he,setCenter:Q}=D.getState();if(!he)return;yR(new Map([[e,S]]),{x:0,y:0,width:Z,height:oe},ne,!0).length>0||Q(S.position.x+H.width/2,S.position.y+H.height/2,{zoom:ne[2]})};return s.jsx("div",{className:_r(["react-flow__node",`react-flow__node-${C}`,{[p]:O},S.className,{selected:S.selected,selectable:P,parent:k,draggable:O,dragging:F}]),ref:I,style:{zIndex:_.z,transform:`translate(${_.positionAbsolute.x}px,${_.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:z?"visible":"hidden",...S.style,...q},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:V,onMouseLeave:K,onContextMenu:W,onClick:ve,onDoubleClick:ie,onKeyDown:T?ge:void 0,tabIndex:T?0:void 0,onFocus:T?J:void 0,role:S.ariaRole??(T?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${Jte}-${y}`,"aria-label":S.ariaLabel,...S.domAttributes,children:s.jsx(EMe,{value:e,children:s.jsx(E,{id:e,data:S.data,t
1413ype:C,positionAbsoluteX:_.positionAbsolute.x,positionAbsoluteY:_.positionAbsolute.y,selected:S.selected??!1,selectable:P,draggable:O,deletable:S.deletable??!0,isConnectable:R,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:F,dragHandle:S.dragHandle,zIndex:_.z,parentId:S.parentId,...H})})})}const KMe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function dne(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,onError:i}=Jt(KMe,tr),o=HMe(e.onlyRenderVisibleElements),l=VMe();return s.jsx("div",{className:"react-flow__nodes",style:X1,children:o.map(c=>s.jsx(GMe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:a,nodeClickDistance:e.nodeClickDistance,onError:i},c))})}dne.displayName="NodeRenderer";const YMe=b.memo(dne);function XMe(e){return Jt(b.useCallback(n=>{if(!e)return n.edges.map(a=>a.id);const r=[];if(n.width&&n.height)for(const a of n.edges){const i=n.nodeLookup.get(a.source),o=n.nodeLookup.get(a.target);i&&o&&QIe({sourceNode:i,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(a.id)}return r},[e]),tr)}const QMe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return s.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},ZMe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return s.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},dz={[Iw.Arrow]:QMe,[Iw.ArrowClosed]:ZMe};function JMe(e){const t=Yn();return b.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(dz,e)?dz[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",go.error009(e)),null)},[e])}const eRe=({id:e,type:t,color:n,width:r=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=JMe(t);return c?s.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:s.jsx(c,{color:n,strokeWidth:o})}):null},fne=({defaultColor:e,rfId:t})=>{const n=Jt(i=>i.edges),r=Jt(i=>i.defaultEdgeOptions),a=b.useMemo(()=>sOe(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return a.length?s.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:s.jsx("defs",{children:a.map(i=>s.jsx(eRe,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};fne.displayName="MarkerDefinitions";var tRe=b.memo(fne);function hne({x:e,y:t,label:n,labelStyle:r,labelShowBg:a=!0,labelBgStyle:i,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:u,...d}){const[f,m]=b.useState({x:1,y:0,width:0,height:0}),p=_r(["react-flow__edge-textwrapper",u]),v=b.useRef(null);return b.useEffect(()=>{if(v.current){const y=v.current.getBBox();m({x:y.x,y:y.y,width:y.width,height:y.height})}},[n]),n?s.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:p,visibility:f.width?"visible":"hidden",...d,children:[a&&s.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),s.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:v,style:r,children:n}),c]}):null}hne.displayName="EdgeText";const nRe=b.memo(hne);function Q1({path:e,labelX:t,labelY:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:u=20,...d}){return s.jsxs(s.Fragment,{children:[s.jsx("path",{...d,d:e,fill:"none",className:_r(["react-flow__edge-path",d.className])}),u?s.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&Ii(t)&&Ii(n)?s.jsx(nRe,{x:t,y:n,label:r,labelStyle:a,labelShowBg:i,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function fz({pos:e,x1:t,y1:n,x2:r,y2:a}){return e===tt.Left||e===tt.Right?[.5*(t+r),n]:[t,.5*(n+a)]}function mne({sourceX:e,sourceY:t,sourcePosition:n=tt.Bottom,targetX:r,targetY:a,targetPosition:i=tt.Top}){const[o,l]=fz({pos:n,x1:e,y1:t,x2:r,y2:a}),[c,u]=fz({pos:i,x1:r,y1:a,x2:e,y2:t}),[d,f,m,p]=Rte({sourceX:e,sourceY:t,targetX:r,targetY:a,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${o},${l} ${c},${u} ${r},${a}`,d,f,m,p]}function pne(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:o,targetPosition:l,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:p,style:v,markerEnd:y,markerStart:x,interactionWidth:w})=>{const[N,S,_]=mne({sourceX:n,sourceY:r,sourcePosition:o,targetX:a,targetY:i,targetPosition:l}),k=e.isInternal?void 0:t;return s.jsx(Q1,{id:k,path:N,labelX:S,labelY:_,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:p,style:v,markerEnd:y,markerStart:x,interactionWidth:w})})}
1413const rRe=pne({isInternal:!1}),gne=pne({isInternal:!0});rRe.displayName="SimpleBezierEdge";gne.displayName="SimpleBezierEdgeInternal";function xne(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,sourcePosition:p=tt.Bottom,targetPosition:v=tt.Top,markerEnd:y,markerStart:x,pathOptions:w,interactionWidth:N})=>{const[S,_,k]=c4({sourceX:n,sourceY:r,sourcePosition:p,targetX:a,targetY:i,targetPosition:v,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),C=e.isInternal?void 0:t;return s.jsx(Q1,{id:C,path:S,labelX:_,labelY:k,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:y,markerStart:x,interactionWidth:N})})}const yne=xne({isInternal:!1}),vne=xne({isInternal:!0});yne.displayName="SmoothStepEdge";vne.displayName="SmoothStepEdgeInternal";function bne(e){return b.memo(({id:t,...n})=>{var a;const r=e.isInternal?void 0:t;return s.jsx(yne,{...n,id:r,pathOptions:b.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(a=n.pathOptions)==null?void 0:a.offset])})})}const sRe=bne({isInternal:!1}),wne=bne({isInternal:!0});sRe.displayName="StepEdge";wne.displayName="StepEdgeInternal";function jne(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:p,markerStart:v,interactionWidth:y})=>{const[x,w,N]=Fte({sourceX:n,sourceY:r,targetX:a,targetY:i}),S=e.isInternal?void 0:t;return s.jsx(Q1,{id:S,path:x,labelX:w,labelY:N,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:m,markerEnd:p,markerStart:v,interactionWidth:y})})}const aRe=jne({isInternal:!1}),Nne=jne({isInternal:!0});aRe.displayName="StraightEdge";Nne.displayName="StraightEdgeInternal";function Sne(e){return b.memo(({id:t,sourceX:n,sourceY:r,targetX:a,targetY:i,sourcePosition:o=tt.Bottom,targetPosition:l=tt.Top,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:p,style:v,markerEnd:y,markerStart:x,pathOptions:w,interactionWidth:N})=>{const[S,_,k]=Dte({sourceX:n,sourceY:r,sourcePosition:o,targetX:a,targetY:i,targetPosition:l,curvature:w==null?void 0:w.curvature}),C=e.isInternal?void 0:t;return s.jsx(Q1,{id:C,path:S,labelX:_,labelY:k,label:c,labelStyle:u,labelShowBg:d,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:p,style:v,markerEnd:y,markerStart:x,interactionWidth:N})})}const iRe=Sne({isInternal:!1}),kne=Sne({isInternal:!0});iRe.displayName="BezierEdge";kne.displayName="BezierEdgeInternal";const hz={default:kne,straight:Nne,step:wne,smoothstep:vne,simplebezier:gne},mz={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},oRe=(e,t,n)=>n===tt.Left?e-t:n===tt.Right?e+t:e,lRe=(e,t,n)=>n===tt.Top?e-t:n===tt.Bottom?e+t:e,pz="react-flow__edgeupdater";function gz({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:a,onMouseEnter:i,onMouseOut:o,type:l}){return s.jsx("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:o,className:_r([pz,`${pz}-${l}`]),cx:oRe(t,r,e),cy:lRe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function cRe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:a,targetX:i,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:u,onReconnectStart:d,onReconnectEnd:f,setReconnecting:m,setUpdateHover:p}){const v=Yn(),y=(_,k)=>{if(_.button!==0)return;const{autoPanOnConnect:C,domNode:E,isValidConnection:O,connectionMode:P,connectionRadius:R,lib:T,onConnectStart:D,onConnectEnd:z,cancelConnection:I,nodeLookup:F,rfId:U,panBy:H,updateConnection:q}=v.getState(),B=k.type==="target",L=(W,ie)=>{m(!1),f==null||f(W,n,k.type,ie)},V=W=>u==null?void 0:u(n,W),K=(W,ie)=>{m(!0),d==null||d(_,n,k.type),D==null||D(W,ie)};f4.onPointerDown(_.nativeEvent,{autoPanOnConnect:C,connectionMode:P,connectionRadius:R,domNode:E,handleId:k.id,nodeId:k.nodeId,nodeLookup:F,isTarget:B,edgeUpdaterType:k.type,lib:T,flowId:U,cancelConnection:I,panBy:H,isValidConnection:O,onConnect:V,onConnectStart:K,onConnectEnd:z,onReconnectEnd:L,updateConnection:q,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.getState().connectionDragThreshold,handleDomNo
1413de:_.currentTarget})},x=_=>y(_,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=_=>y(_,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),N=()=>p(!0),S=()=>p(!1);return s.jsxs(s.Fragment,{children:[(e===!0||e==="source")&&s.jsx(gz,{position:l,centerX:r,centerY:a,radius:t,onMouseDown:x,onMouseEnter:N,onMouseOut:S,type:"source"}),(e===!0||e==="target")&&s.jsx(gz,{position:c,centerX:i,centerY:o,radius:t,onMouseDown:w,onMouseEnter:N,onMouseOut:S,type:"target"})]})}function uRe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:a,onDoubleClick:i,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,reconnectRadius:d,onReconnect:f,onReconnectStart:m,onReconnectEnd:p,rfId:v,edgeTypes:y,noPanClassName:x,onError:w,disableKeyboardA11y:N}){let S=Jt(Q=>Q.edgeLookup.get(e));const _=Jt(Q=>Q.defaultEdgeOptions);S=_?{..._,...S}:S;let k=S.type||"default",C=(y==null?void 0:y[k])||hz[k];C===void 0&&(w==null||w("011",go.error011(k)),k="default",C=(y==null?void 0:y.default)||hz.default);const E=!!(S.focusable||t&&typeof S.focusable>"u"),O=typeof f<"u"&&(S.reconnectable||n&&typeof S.reconnectable>"u"),P=!!(S.selectable||r&&typeof S.selectable>"u"),R=b.useRef(null),[T,D]=b.useState(!1),[z,I]=b.useState(!1),F=Yn(),{zIndex:U,sourceX:H,sourceY:q,targetX:B,targetY:L,sourcePosition:V,targetPosition:K}=Jt(b.useCallback(Q=>{const ae=Q.nodeLookup.get(S.source),fe=Q.nodeLookup.get(S.target);if(!ae||!fe)return{zIndex:S.zIndex,...mz};const Ee=rOe({id:e,sourceNode:ae,targetNode:fe,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:Q.connectionMode,onError:w});return{zIndex:XIe({selected:S.selected,zIndex:S.zIndex,sourceNode:ae,targetNode:fe,elevateOnSelect:Q.elevateEdgesOnSelect}),...Ee||mz}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex]),tr),W=b.useMemo(()=>S.markerStart?`url('#${u4(S.markerStart,v)}')`:void 0,[S.markerStart,v]),ie=b.useMemo(()=>S.markerEnd?`url('#${u4(S.markerEnd,v)}')`:void 0,[S.markerEnd,v]);if(S.hidden||H===null||q===null||B===null||L===null)return null;const ve=Q=>{var Re;const{addSelectedEdges:ae,unselectNodesAndEdges:fe,multiSelectionActive:Ee}=F.getState();P&&(F.setState({nodesSelectionActive:!1}),S.selected&&Ee?(fe({nodes:[],edges:[S]}),(Re=R.current)==null||Re.blur()):ae([e])),a&&a(Q,S)},ge=i?Q=>{i(Q,{...S})}:void 0,J=o?Q=>{o(Q,{...S})}:void 0,ne=l?Q=>{l(Q,{...S})}:void 0,Z=c?Q=>{c(Q,{...S})}:void 0,oe=u?Q=>{u(Q,{...S})}:void 0,he=Q=>{var ae;if(!N&&wte.includes(Q.key)&&P){const{unselectNodesAndEdges:fe,addSelectedEdges:Ee}=F.getState();Q.key==="Escape"?((ae=R.current)==null||ae.blur(),fe({edges:[S]})):Ee([e])}};return s.jsx("svg",{style:{zIndex:U},children:s.jsxs("g",{className:_r(["react-flow__edge",`react-flow__edge-${k}`,S.className,x,{selected:S.selected,animated:S.animated,inactive:!P&&!a,updating:T,selectable:P}]),onClick:ve,onDoubleClick:ge,onContextMenu:J,onMouseEnter:ne,onMouseMove:Z,onMouseLeave:oe,onKeyDown:E?he:void 0,tabIndex:E?0:void 0,role:S.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":E?`${ene}-${v}`:void 0,ref:R,...S.domAttributes,children:[!z&&s.jsx(C,{id:e,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:P,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:H,sourceY:q,targetX:B,targetY:L,sourcePosition:V,targetPosition:K,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:W,markerEnd:ie,pathOptions:"pathOptions"in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),O&&s.jsx(cRe,{edge:S,isReconnectable:O,reconnectRadius:d,onReconnect:f,onReconnectStart:m,onReconnectEnd:p,sourceX:H,sourceY:q,targetX:B,targetY:L,sourcePosition:V,targetPosition:K,setUpdateHover:D,setReconnecting:I})]})})}const dRe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Cne({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:a,onReconnect:i,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:p,onReconnectEnd:v,disableKeyboardA11y:y}){const{edgesFocusable:x,edgesReconnectable:w,elementsSelectable:N,onError:S}=Jt(dRe,tr),_=XMe(t);return s.jsxs("div",{className:"react-flow__edges",children:[s.jsx(tRe,{defaultColor:e,rfId:n}),_.map(k=>s.jsx(uRe,{id:k,edgesFocusable:x,edgesReconnectable:w,elementsSelectable:N,noPanClassName:a,onReconnect:i,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,reconnectRadius:f,onDoubleClick:m,onReconnectStart:p,onReconnectEnd:v,rfId:n,onError:S,edgeTypes:r,disableKeyboardA11y:y},k))]})}Cne.displayName="EdgeRenderer";const fRe=b.memo(Cne),hRe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function mRe({children:e}){const t=Jt(hRe);return s.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function pRe(e){const t=kR(),n=b.useRef(!1);b.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)}
1413,[e,t.viewportInitialized])}const gRe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function xRe(e){const t=Jt(gRe),n=Yn();return b.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function yRe(e){return e.connection.inProgress?{...e.connection,to:Hy(e.connection.to,e.transform)}:{...e.connection}}function vRe(e){return yRe}function bRe(e){const t=vRe();return Jt(t,tr)}const wRe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function jRe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:a,width:i,height:o,isValid:l,inProgress:c}=Jt(wRe,tr);return!(i&&a&&c)?null:s.jsx("svg",{style:e,width:i,height:o,className:"react-flow__connectionline react-flow__container",children:s.jsx("g",{className:_r(["react-flow__connection",Ste(l)]),children:s.jsx(_ne,{style:t,type:n,CustomComponent:r,isValid:l})})})}const _ne=({style:e,type:t=oc.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:a,from:i,fromNode:o,fromHandle:l,fromPosition:c,to:u,toNode:d,toHandle:f,toPosition:m}=bRe();if(!a)return;if(n)return s.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:c,toPosition:m,connectionStatus:Ste(r),toNode:d,toHandle:f});let p="";const v={sourceX:i.x,sourceY:i.y,sourcePosition:c,targetX:u.x,targetY:u.y,targetPosition:m};switch(t){case oc.Bezier:[p]=Dte(v);break;case oc.SimpleBezier:[p]=mne(v);break;case oc.Step:[p]=c4({...v,borderRadius:0});break;case oc.SmoothStep:[p]=c4(v);break;default:[p]=Fte(v)}return s.jsx("path",{d:p,fill:"none",className:"react-flow__connection-path",style:e})};_ne.displayName="ConnectionLine";const NRe={};function xz(e=NRe){b.useRef(e),Yn(),b.useEffect(()=>{},[e])}function SRe(){Yn(),b.useRef(!1),b.useEffect(()=>{},[])}function Ane({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:a,onNodeDoubleClick:i,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:p,connectionLineType:v,connectionLineStyle:y,connectionLineComponent:x,connectionLineContainerStyle:w,selectionKeyCode:N,selectionOnDrag:S,selectionMode:_,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:E,deleteKeyCode:O,onlyRenderVisibleElements:P,elementsSelectable:R,defaultViewport:T,translateExtent:D,minZoom:z,maxZoom:I,preventScrolling:F,defaultMarkerColor:U,zoomOnScroll:H,zoomOnPinch:q,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:V,zoomOnDoubleClick:K,panOnDrag:W,onPaneClick:ie,onPaneMouseEnter:ve,onPaneMouseMove:ge,onPaneMouseLeave:J,onPaneScroll:ne,onPaneContextMenu:Z,paneClickDistance:oe,nodeClickDistance:he,onEdgeContextMenu:Q,onEdgeMouseEnter:ae,onEdgeMouseMove:fe,onEdgeMouseLeave:Ee,reconnectRadius:Re,onReconnect:qe,onReconnectStart:St,onReconnectEnd:Ut,noDragClassName:Yt,noWheelClassName:Ue,noPanClassName:wt,disableKeyboardA11y:At,nodeExtent:cn,rfId:vn,viewport:ye,onViewportChange:Ae}){return xz(e),xz(t),SRe(),pRe(n),xRe(ye),s.jsx(BMe,{onPaneClick:ie,onPaneMouseEnter:ve,onPaneMouseMove:ge,onPaneMouseLeave:J,onPaneContextMenu:Z,onPaneScroll:ne,paneClickDistance:oe,deleteKeyCode:O,selectionKeyCode:N,selectionOnDrag:S,selectionMode:_,onSelectionStart:m,onSelectionEnd:p,multiSelectionKeyCode:k,panActivationKeyCode:C,zoomActivationKeyCode:E,elementsSelectable:R,zoomOnScroll:H,zoomOnPinch:q,zoomOnDoubleClick:K,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:V,panOnDrag:W,defaultViewport:T,translateExtent:D,minZoom:z,maxZoom:I,onSelectionContextMenu:f,preventScrolling:F,noDragClassName:Yt,noWheelClassName:Ue,noPanClassName:wt,disableKeyboardA11y:At,onViewportChange:Ae,isControlledViewport:!!ye,children:s.jsxs(mRe,{children:[s.jsx(fRe,{edgeTypes:t,onEdgeClick:a,onEdgeDoubleClick:o,onReconnect:qe,onReconnectStart:St,onReconnectEnd:Ut,onlyRenderVisibleElements:P,onEdgeContextMenu:Q,onEdgeMouseEnter:ae,onEdgeMouseMove:fe,onEdgeMouseLeave:Ee,reconnectRadius:Re,defaultMarkerColor:U,noPanClassName:wt,disableKeyboardA11y:At,rfId:vn}),s.jsx(jRe,{style:y,type:v,component:x,containerStyle:w}),s.jsx("div",{className:"react-flow__edgelabel-renderer"}),s.jsx(YMe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:d,nodeClickDistance:he,onlyRenderVisibleElements:P,noPanClassName:wt,noDragClassName:Yt,disableKeyboardA11y:At,nodeExtent:cn,rfId:vn}),s.jsx("div",{className:"react-flow__viewport-portal"})]})})}
1413Ane.displayName="GraphView";const kRe=b.memo(Ane),yz=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:u=2,nodeOrigin:d,nodeExtent:f}={})=>{const m=new Map,p=new Map,v=new Map,y=new Map,x=r??t??[],w=n??e??[],N=d??[0,0],S=f??xx;Bte(v,y,x);const _=d4(w,m,p,{nodeOrigin:N,nodeExtent:S,elevateNodesOnSelect:!1});let k=[0,0,1];if(o&&a&&i){const C=By(m,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:E,y:O,zoom:P}=vR(C,a,i,c,u,(l==null?void 0:l.padding)??.1);k=[E,O,P]}return{rfId:"1",width:0,height:0,transform:k,nodes:w,nodesInitialized:_,nodeLookup:m,parentLookup:p,edges:x,edgeLookup:y,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:xx,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Gh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...Nte},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:qIe,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:jte}},CRe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f})=>WOe((m,p)=>{async function v(){const{nodeLookup:y,panZoom:x,fitViewOptions:w,fitViewResolver:N,width:S,height:_,minZoom:k,maxZoom:C}=p();
1413x&&(await UIe({nodes:y,width:S,height:_,panZoom:x,minZoom:k,maxZoom:C},w),N==null||N.resolve(!0),m({fitViewResolver:null}))}return{...yz({nodes:e,edges:t,width:a,height:i,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:r}),setNodes:y=>{const{nodeLookup:x,parentLookup:w,nodeOrigin:N,elevateNodesOnSelect:S,fitViewQueued:_}=p(),k=d4(y,x,w,{nodeOrigin:N,nodeExtent:f,elevateNodesOnSelect:S,checkEquality:!0});_&&k?(v(),m({nodes:y,nodesInitialized:k,fitViewQueued:!1,fitViewOptions:void 0})):m({nodes:y,nodesInitialized:k})},setEdges:y=>{const{connectionLookup:x,edgeLookup:w}=p();Bte(x,w,y),m({edges:y})},setDefaultNodesAndEdges:(y,x)=>{if(y){const{setNodes:w}=p();w(y),m({hasDefaultNodes:!0})}if(x){const{setEdges:w}=p();w(x),m({hasDefaultEdges:!0})}},updateNodeInternals:y=>{const{triggerNodeChanges:x,nodeLookup:w,parentLookup:N,domNode:S,nodeOrigin:_,nodeExtent:k,debug:C,fitViewQueued:E}=p(),{changes:O,updatedInternals:P}=cOe(y,w,N,S,_,k);P&&(iOe(w,N,{nodeOrigin:_,nodeExtent:k}),E?(v(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(O==null?void 0:O.length)>0&&(C&&console.log("React Flow: trigger node changes",O),x==null||x(O)))},updateNodePositions:(y,x=!1)=>{const w=[],N=[],{nodeLookup:S,triggerNodeChanges:_}=p();for(const[k,C]of y){const E=S.get(k),O=!!(E!=null&&E.expandParent&&(E!=null&&E.parentId)&&(C!=null&&C.position)),P={id:k,type:"position",position:O?{x:Math.max(0,C.position.x),y:Math.max(0,C.position.y)}:C.position,dragging:x};O&&E.parentId&&w.push({id:k,parentId:E.parentId,rect:{...C.internals.positionAbsolute,width:C.measured.width??0,height:C.measured.height??0}}),N.push(P)}if(w.length>0){const{parentLookup:k,nodeOrigin:C}=p(),E=SR(w,S,k,C);N.push(...E)}_(N)},triggerNodeChanges:y=>{const{onNodesChange:x,setNodes:w,nodes:N,hasDefaultNodes:S,debug:_}=p();if(y!=null&&y.length){if(S){const k=rne(y,N);w(k)}_&&console.log("React Flow: trigger node changes",y),x==null||x(y)}},triggerEdgeChanges:y=>{const{onEdgesChange:x,setEdges:w,edges:N,hasDefaultEdges:S,debug:_}=p();if(y!=null&&y.length){if(S){const k=sne(y,N);w(k)}_&&console.log("React Flow: trigger edge changes",y),x==null||x(y)}},addSelectedNodes:y=>{const{multiSelectionActive:x,edgeLookup:w,nodeLookup:N,triggerNodeChanges:S,triggerEdgeChanges:_}=p();if(x){const k=y.map(C=>Su(C,!0));S(k);return}S(Xf(N,new Set([...y]),!0)),_(Xf(w))},addSelectedEdges:y=>{const{multiSelectionActive:x,edgeLookup:w,nodeLookup:N,triggerNodeChanges:S,triggerEdgeChanges:_}=p();if(x){const k=y.map(C=>Su(C,!0));_(k);return}_(Xf(w,new Set([...y]))),S(Xf(N,new Set,!0))},unselectNodesAndEdges:({nodes:y,edges:x}={})=>{const{edges:w,nodes:N,nodeLookup:S,triggerNodeChanges:_,triggerEdgeChanges:k}=p(),C=y||N,E=x||w,O=C.map(R=>{const T=S.get(R.id);return T&&(T.selected=!1),Su(R.id,!1)}),P=E.map(R=>Su(R.id,!1));_(O),k(P)},setMinZoom:y=>{const{panZoom:x,maxZoom:w}=p();x==null||x.setScaleExtent([y,w]),m({minZoom:y})},setMaxZoom:y=>
1413{const{panZoom:x,minZoom:w}=p();x==null||x.setScaleExtent([w,y]),m({maxZoom:y})},setTranslateExtent:y=>{var x;(x=p().panZoom)==null||x.setTranslateExtent(y),m({translateExtent:y})},setPaneClickDistance:y=>{var x;(x=p().panZoom)==null||x.setClickDistance(y)},resetSelectedElements:()=>{const{edges:y,nodes:x,triggerNodeChanges:w,triggerEdgeChanges:N,elementsSelectable:S}=p();if(!S)return;const _=x.reduce((C,E)=>E.selected?[...C,Su(E.id,!1)]:C,[]),k=y.reduce((C,E)=>E.selected?[...C,Su(E.id,!1)]:C,[]);w(_),N(k)},setNodeExtent:y=>{const{nodes:x,nodeLookup:w,parentLookup:N,nodeOrigin:S,elevateNodesOnSelect:_,nodeExtent:k}=p();y[0][0]===k[0][0]&&y[0][1]===k[0][1]&&y[1][0]===k[1][0]&&y[1][1]===k[1][1]||(d4(x,w,N,{nodeOrigin:S,nodeExtent:y,elevateNodesOnSelect:_,checkEquality:!1}),m({nodeExtent:y}))},panBy:y=>{const{transform:x,width:w,height:N,panZoom:S,translateExtent:_}=p();return uOe({delta:y,panZoom:S,transform:x,translateExtent:_,width:w,height:N})},setCenter:async(y,x,w)=>{const{width:N,height:S,maxZoom:_,panZoom:k}=p();if(!k)return Promise.resolve(!1);const C=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:_;return await k.setViewport({x:N/2-y*C,y:S/2-x*C,zoom:C},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...Nte}})},updateConnection:y=>{m({connection:y})},reset:()=>m({...yz()})}},Object.is);function _Re({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:a,initialHeight:i,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:u,nodeOrigin:d,nodeExtent:f,children:m}){const[p]=b.useState(()=>CRe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:a,height:i,fitView:u,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:d,nodeExtent:f}));return s.jsx(GOe,{value:p,children:s.jsx(gMe,{children:m})})}function ARe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:a,width:i,height:o,fitView:l,fitViewOptions:c,minZoom:u,maxZoom:d,nodeOrigin:f,nodeExtent:m}){return b.useContext(K1)?s.jsx(s.Fragment,{children:e}):s.jsx(_Re,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:a,initialWidth:i,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:d,nodeOrigin:f,nodeExtent:m,children:e})}const ERe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function PRe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:a,nodeTypes:i,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:m,onConnect:p,onConnectStart:v,onConnectEnd:y,onClickConnectStart:x,onClickConnectEnd:w,onNodeMouseEnter:N,onNodeMouseMove:S,onNodeMouseLeave:_,onNodeContextMenu:k,onNodeDoubleClick:C,onNodeDragStart:E,onNodeDrag:O,onNodeDragStop:P,onNodesDelete:R,onEdgesDelete:T,onDelete:D,onSelectionChange:z,onSelectionDragStart:I,onSelectionDrag:F,onSelectionDragStop:U,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:B,onBeforeDelete:L,connectionMode:V,connectionLineType:K=oc.Bezier,connectionLineStyle:W,connectionLineComponent:ie,connectionLineContainerStyle:ve,deleteKeyCode:ge="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:ne=!1,selectionMode:Z=yx.Full,panActivationKeyCode:oe="Space",multiSelectionKeyCode:he=bx()?"Meta":"Control",zoomActivationKeyCode:Q=bx()?"Meta":"Control",snapToGrid:ae,snapGrid:fe,onlyRenderVisibleElements:Ee=!1,selectNodesOnDrag:Re,nodesDraggable:qe,autoPanOnNodeFocus:St,nodesConnectable:Ut,nodesFocusable:Yt,nodeOrigin:Ue=tne,edgesFocusable:wt,edgesReconnectable:At,elementsSelectable:cn=!0,defaultViewport:vn=iMe,minZoom:ye=.5,maxZoom:Ae=2,translateExtent:st=xx,preventScrolling:jt=!0,nodeExtent:pt,defaultMarkerColor:jn="#b1b1b7",zoomOnScroll:gr=!0,zoomOnPinch:Mn=!0,panOnScroll:dr=!1,panOnScrollSpeed:ls=.5,panOnScrollMode:un=td.Free,zoomOnDoubleClick:Dr=!0,panOnDrag:_n=!0,onPaneClick:oa,onPaneMouseEnter:Pa,onPaneMouseMove:cs,onPaneMouseLeave:Xr,onPaneScroll:pe,onPaneContextMenu:Fe,paneClickDistance:Ce=0,nodeClickDistance:De=0,children:Ke,onReconnect:Ht,onReconnectStart:Xt,onReconnectEnd:Lt,onEdgeContextMenu:An,onEdgeDoubleClick:Un,onEdgeMouseEnter:bt,onEdgeMouseMove:ko,onEdgeMouseLeave:Qr,reconnectRadius:Al=10,onNodesChange:ap,onEdgesChange:KN,noDragClassName:YN="nodrag",noWheelClassName:XN="nowheel",noPanClassName:Ui="nopan",fitView:ip,fitViewOptions:op,connectOnClick:QN,attributionPosition:s0,proOptions:a0,defaultEdgeOptions:i0,elevateNodesOnSelect:o0,elevateEdgesOnSelect:ZN,disableKeyboardA11y:l0=!1,autoPanOnConnect:Xn,autoPanOnNodeDrag:JN,autoPanSpeed:lp,connectionRadius:c0,isValidConnection:Xd,onError:eS,style:u0,id:Jc,nodeDragThreshold:Ta,connectionDragThreshold:tS,viewport:la,onViewportChange:nS,width:rS,height:sS,colorMode:Qd="light",debug:Zd,onScroll:Hi,ariaLabelConfig:Jd,...aS},iS){const eu=Jc||"1",d0=uMe(Qd),cp=b.useCallback(El=>{El.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Hi==null||Hi(El)},[Hi]);return s.jsx("div",{"data-testid":"rf__wrapper",...aS,onScroll:cp,style:{...u0,...ERe},ref:iS,className:_r(["react-flow",a,d0]),id:Jc,role:"application",children:s.jsxs(ARe,{nodes:e,edges:t,width:rS,height:sS,fitView:ip,fitViewOptions:op,minZoom:ye,maxZoom:Ae,nodeOrigin:Ue,nodeExtent:pt,children:[s.jsx(kRe,{onInit:u,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:N,onNodeMouseMove:S,onNodeMouseLeave:_,onNodeContextMenu:k,onNodeDoubleClick:C,nodeTypes:i,edgeTypes:o,connectionLineType:K,connectionLineStyle:W,connectionLineComponent:ie,connectionLineContainerStyle:ve,selectionKeyCode:J,selectionOnDrag:ne,selectionMode:Z,deleteKeyCode:ge,multiSelectionKeyCode:he,panActivationKeyCode:oe,zoomActivationKeyCode:Q,onlyRenderVisibleElements:Ee,defaultViewport:vn,translateExtent:st,minZoom:ye,maxZoom:Ae,preventScrolling:jt,zoomOnScroll:gr,zoomOnPinch:Mn,zoomOnDoubleClick:Dr,panOnScroll:dr,panOnScrollSpeed:ls,panOnScrollMode:un,panOnDrag:_n,onPaneClick:oa,onPaneMouseEnter:Pa,onPaneMouseMove:cs,onPaneMouseLeave:Xr,onPaneScroll:pe,onPaneContextMenu:Fe,paneClickDistance:Ce,nodeClickDistance:De,onSelectionContextMenu:H,onSelectionStart:q,onSelectionEnd:B,onReconnect:Ht,onReconnectStart:Xt,onReconnectEnd:Lt,onEdgeContextMenu:An,onEdgeDoubleClick:Un,onEdgeMouseEnter:bt,onEdgeMouseMove:ko,onEdgeMouseLeave:Qr,reconnectRadius:Al,defaultMarkerColor:jn,noDragClassName:YN,noWheelClassName:XN,noPanClassName:Ui,rfId:eu,disableKeyboardA11y:l0,nodeExtent:pt,viewport:la,onViewportChange:nS}),s.jsx(cMe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:v,onConnectEnd:y,onClickConnectStart:x,onClickConnectEnd:w,nodesDraggable:qe,autoPanOnNodeFocus:St,nodesConnectable:Ut,nodesFocusable:Yt,edgesFocusable:wt,edgesReconnectable:At,elementsSelectable:cn,elevateNodesOnSelect:o0,elevateEdgesOnSelect:ZN,minZoom:ye,maxZoom:Ae,nodeExtent:pt,onNodesChange:ap,onEdgesChange:KN,snapToGri
1413d:ae,snapGrid:fe,connectionMode:V,translateExtent:st,connectOnClick:QN,defaultEdgeOptions:i0,fitView:ip,fitViewOptions:op,onNodesDelete:R,onEdgesDelete:T,onDelete:D,onNodeDragStart:E,onNodeDrag:O,onNodeDragStop:P,onSelectionDrag:F,onSelectionDragStart:I,onSelectionDragStop:U,onMove:d,onMoveStart:f,onMoveEnd:m,noPanClassName:Ui,nodeOrigin:Ue,rfId:eu,autoPanOnConnect:Xn,autoPanOnNodeDrag:JN,autoPanSpeed:lp,onError:eS,connectionRadius:c0,isValidConnection:Xd,selectNodesOnDrag:Re,nodeDragThreshold:Ta,connectionDragThreshold:tS,onBeforeDelete:L,paneClickDistance:Ce,debug:Zd,ariaLabelConfig:Jd}),s.jsx(aMe,{onSelectionChange:z}),Ke,s.jsx(eMe,{proOptions:a0,position:s0}),s.jsx(JOe,{rfId:eu,disableKeyboardA11y:l0})]})})}var TRe=ane(PRe);function IRe(e){const[t,n]=b.useState(e),r=b.useCallback(a=>n(i=>rne(a,i)),[]);return[t,n,r]}function ORe(e){const[t,n]=b.useState(e),r=b.useCallback(a=>n(i=>sne(a,i)),[]);return[t,n,r]}function MRe({dimensions:e,lineWidth:t,variant:n,className:r}){return s.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:_r(["react-flow__background-pattern",n,r])})}function RRe({radius:e,className:t}){return s.jsx("circle",{cx:e,cy:e,r:e,className:_r(["react-flow__background-pattern","dots",t])})}var kc;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(kc||(kc={}));const DRe={[kc.Dots]:1,[kc.Lines]:1,[kc.Cross]:6},LRe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Ene({id:e,variant:t=kc.Dots,gap:n=20,size:r,lineWidth:a=1,offset:i=0,color:o,bgColor:l,style:c,className:u,patternClassName:d}){const f=b.useRef(null),{transform:m,patternId:p}=Jt(LRe,tr),v=r||DRe[t],y=t===kc.Dots,x=t===kc.Cross,w=Array.isArray(n)?n:[n,n],N=[w[0]*m[2]||1,w[1]*m[2]||1],S=v*m[2],_=Array.isArray(i)?i:[i,i],k=x?[S,S]:N,C=[_[0]*m[2]||1+k[0]/2,_[1]*m[2]||1+k[1]/2],E=`${p}${e||""}`;return s.jsxs("svg",{className:_r(["react-flow__background",u]),style:{...c,...X1,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[s.jsx("pattern",{id:E,x:m[0]%N[0],y:m[1]%N[1],width:N[0],height:N[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${C[0]},-${C[1]})`,children:y?s.jsx(RRe,{radius:S/2,className:d}):s.jsx(MRe,{dimensions:k,lineWidth:a,variant:t,className:d})}),s.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}Ene.displayName="Background";const $Re=b.memo(Ene);function FRe(){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:s.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function zRe(){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:s.jsx("path",{d:"M0 0h32v4.2H0z"})})}function BRe(){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:s.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function URe(){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:s.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function HRe(){return s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:s.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Qv({children:e,className:t,...n}){return s.jsx("button",{type:"button",className:_r(["react-flow__controls-button",t]),...n,children:e})}const qRe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Pne({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:u,children:d,position:f="bottom-left",orientation:m="vertical","aria-label":p}){const v=Yn(),{isInteractive:y,minZoomReached:x,maxZoomReached:w,ariaLabelConfig:N}=Jt(qRe,tr),{zoomIn:S,zoomOut:_,fitView:k}=kR(),C=()=>{S(),i==null||i()},E=()=>{_(),o==null||o()},O=()=>{k(a),l==null||l()},P=()=>{v.setState({nodesDraggable:!y,nodesConnectable:!y,elementsSelectable:!y}),c==null||c(!y)},R=m==="horizontal"?"horizontal":"vertical";return s.jsxs(Y1,{className:_r(["react-flow__controls",R,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":p??N["controls.ariaLabel"],children:[t&&s.jsxs(s.Fragment,{children:[s.jsx(Qv,{onClick:C,className:"react-flow__controls-zoomin",title:N["controls.zoomIn.ariaLabel"],"aria-label":N["controls.zoomIn.ariaLabel"],disabled:w,children:s.jsx(FRe,{})}),s.jsx(Qv,{onClick:E,className:"react-flow__controls-zoomout",title:N["controls.zoomOut.ariaLabel"],"aria-label":N["controls.zoomOut.ariaLabel"],disabled:x,children:s.jsx(zRe,{})})]}),n&&s.jsx(Qv,{className:"react-flow__controls-fitview",onClick:O,title:N["controls.fitView.ariaLabel"],"aria-label":N["controls.fitView.ariaLabel"],children:s.jsx(BRe,{})}),r&&s.jsx(Qv,{className:"react-flow__controls-interactive",onClick:P,title:N["controls.interactive.ariaLabel"],"aria-label":N["controls.interactive.ariaLabel"],children:y?s.jsx(HRe,{}):s.jsx(URe,{})}),d]})}Pne.displayName="Controls";const VRe=b.memo(Pne);function WRe({id:e,x:t,y:n,width:r,height:a,style:i,color:o,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,selected:m,onClick:p}){const{background:v,backgroundColor:y}=i||{},x=o||v||y;return s.jsx("rect",{className:_r(["react-flow__minimap-node",{selected:m},u]),x:t,y:n,rx:d,ry:d,width:r,height:a,style:{fill:x,stroke:l,strokeWidth:c},shapeRendering:f,onClick:p?w=>p(w,e):void 0})}const GRe=b.memo(WRe),KRe=e=>e.nodes.map(t=>
1413t.id),X2=e=>e instanceof Function?e:()=>e;function YRe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:a,nodeComponent:i=GRe,onClick:o}){const l=Jt(KRe,tr),c=X2(t),u=X2(e),d=X2(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return s.jsx(s.Fragment,{children:l.map(m=>s.jsx(QRe,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:a,NodeComponent:i,onClick:o,shapeRendering:f},m))})}function XRe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:a,nodeStrokeWidth:i,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:u,x:d,y:f,width:m,height:p}=Jt(v=>{const{internals:y}=v.nodeLookup.get(e),x=y.userNode,{x:w,y:N}=y.positionAbsolute,{width:S,height:_}=jl(x);return{node:x,x:w,y:N,width:S,height:_}},tr);return!u||u.hidden||!Pte(u)?null:s.jsx(l,{x:d,y:f,width:m,height:p,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:a,strokeColor:n(u),strokeWidth:i,shapeRendering:o,onClick:c,id:u.id})}const QRe=b.memo(XRe);var ZRe=b.memo(YRe);const JRe=200,e3e=150,t3e=e=>!e.hidden,n3e=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Ete(By(e.nodeLookup,{filter:t3e}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},r3e="react-flow__minimap-desc";function Tne({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:u,maskStrokeColor:d,maskStrokeWidth:f,position:m="bottom-right",onClick:p,onNodeClick:v,pannable:y=!1,zoomable:x=!1,ariaLabel:w,inversePan:N,zoomStep:S=1,offsetScale:_=5}){const k=Yn(),C=b.useRef(null),{boundingRect:E,viewBB:O,rfId:P,panZoom:R,translateExtent:T,flowWidth:D,flowHeight:z,ariaLabelConfig:I}=Jt(n3e,tr),F=(e==null?void 0:e.width)??JRe,U=(e==null?void 0:e.height)??e3e,H=E.width/F,q=E.height/U,B=Math.max(H,q),L=B*F,V=B*U,K=_*B,W=E.x-(L-E.width)/2-K,ie=E.y-(V-E.height)/2-K,ve=L+K*2,ge=V+K*2,J=`${r3e}-${P}`,ne=b.useRef(0),Z=b.useRef();ne.current=B,b.useEffect(()=>{if(C.current&&R)return Z.current=vOe({domNode:C.current,panZoom:R,getTransform:()=>k.getState().transform,getViewScale:()=>ne.current}),()=>{var ae;(ae=Z.current)==null||ae.destroy()}},[R]),b.useEffect(()=>{var ae;(ae=Z.current)==null||ae.update({translateExtent:T,width:D,height:z,inversePan:N,pannable:y,zoomStep:S,zoomable:x})},[y,x,N,S,T,D,z]);const oe=p?ae=>{var Re;const[fe,Ee]=((Re=Z.current)==null?void 0:Re.pointer(ae))||[0,0];p(ae,{x:fe,y:Ee})}:void 0,he=v?b.useCallback((ae,fe)=>{const Ee=k.getState().nodeLookup.get(fe).internals.userNode;v(ae,Ee)},[]):void 0,Q=w??I["minimap.ariaLabel"];return s.jsx(Y1,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*B:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:_r(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:s.jsxs("svg",{width:F,height:U,viewBox:`${W} ${ie} ${ve} ${ge}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:C,onClick:oe,children:[Q&&s.jsx("title",{id:J,children:Q}),s.jsx(ZRe,{onClick:he,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:o,nodeComponent:l}),s.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-K},${ie-K}h${ve+K*2}v${ge+K*2}h${-ve-K*2}z
1414        M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Tne.displayName="MiniMap";const s3e=b.memo(Tne),a3e=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,i3e={[Qh.Line]:"right",[Qh.Handle]:"bottom-right"};function o3e({nodeId:e,position:t,variant:n=Qh.Handle,className:r,style:a=void 0,children:i,color:o,minWidth:l=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:p=!0,shouldResize:v,onResizeStart:y,onResize:x,onResizeEnd:w}
1414){const N=cne(),S=typeof e=="string"?e:N,_=Yn(),k=b.useRef(null),C=n===Qh.Handle,E=Jt(b.useCallback(a3e(C&&p),[C,p]),tr),O=b.useRef(null),P=t??i3e[n];b.useEffect(()=>{if(!(!k.current||!S))return O.current||(O.current=ROe({domNode:k.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:T,transform:D,snapGrid:z,snapToGrid:I,nodeOrigin:F,domNode:U}=_.getState();return{nodeLookup:T,transform:D,snapGrid:z,snapToGrid:I,nodeOrigin:F,paneDomNode:U}},onChange:(T,D)=>{const{triggerNodeChanges:z,nodeLookup:I,parentLookup:F,nodeOrigin:U}=_.getState(),H=[],q={x:T.x,y:T.y},B=I.get(S);if(B&&B.expandParent&&B.parentId){const L=B.origin??U,V=T.width??B.measured.width??0,K=T.height??B.measured.height??0,W={id:B.id,parentId:B.parentId,rect:{width:V,height:K,...Tte({x:T.x??B.position.x,y:T.y??B.position.y},{width:V,height:K},B.parentId,I,L)}},ie=SR([W],I,F,U);H.push(...ie),q.x=T.x?Math.max(L[0]*V,T.x):void 0,q.y=T.y?Math.max(L[1]*K,T.y):void 0}if(q.x!==void 0&&q.y!==void 0){const L={id:S,type:"position",position:{...q}};H.push(L)}if(T.width!==void 0&&T.height!==void 0){const V={id:S,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:T.width,height:T.height}};H.push(V)}for(const L of D){const V={...L,type:"position"};H.push(V)}z(H)},onEnd:({width:T,height:D})=>{const z={id:S,type:"dimensions",resizing:!1,dimensions:{width:T,height:D}};_.getState().triggerNodeChanges([z])}})),O.current.update({controlPosition:P,boundaries:{minWidth:l,minHeight:c,maxWidth:u,maxHeight:d},keepAspectRatio:f,resizeDirection:m,onResizeStart:y,onResize:x,onResizeEnd:w,shouldResize:v}),()=>{var T;(T=O.current)==null||T.destroy()}},[P,l,c,u,d,f,y,x,w,v]);const R=P.split("-");return s.jsx("div",{className:_r(["react-flow__resize-control","nodrag",...R,n,r]),ref:k,style:{...a,scale:E,...o&&{[C?"backgroundColor":"borderColor"]:o}},children:i})}b.memo(o3e);const qy=e=>{switch(e){case"trigger":return s.jsx(Ot,{className:"w-4 h-4"});case"agent":return s.jsx(so,{className:"w-4 h-4"});case"action":return s.jsx(Kt,{className:"w-4 h-4"});case"decision":return s.jsx(ow,{className:"w-4 h-4"});case"integration":return s.jsx(Qu,{className:"w-4 h-4"});default:return s.jsx(Kt,{className:"w-4 h-4"})}},l3e=b.memo(({data:e})=>s.jsxs("div",{className:"px-4 py-2 shadow-md rounded-md bg-gradient-to-r from-green-400 to-green-600 text-white border-2 border-green-300",children:[s.jsx(ra,{type:"source",position:tt.Bottom,className:"w-3 h-3"}),s.jsxs("div",{className:"flex items-center gap-2",children:[qy("trigger"),s.jsx("div",{className:"text-sm font-semibold",children:e.label})]}),e.description&&s.jsx("div",{className:"text-xs opacity-80 mt-1",children:e.description})]})),c3e=b.memo(({data:e})=>s.jsxs("div",{className:"px-4 py-2 shadow-md rounded-md bg-gradient-to-r from-blue-400 to-blue-600 text-white border-2 border-blue-300",children:[s.jsx(ra,{type:"target",position:tt.Top,className:"w-3 h-3"}),s.jsx(ra,{type:"source",position:tt.Bottom,className:"w-3 h-3"}),s.jsxs("div",{className:"flex items-center gap-2",children:[qy("agent"),s.jsx("div",{className:"text-sm font-semibold",children:e.label})]}),e.description&&s.jsx("div",{className:"text-xs opacity-80 mt-1",children:e.description})]})),u3e=b.memo(({data:e})=>s.jsxs("div",{className:"px-4 py-2 shadow-md rounded-md bg-gradient-to-r from-cyber-blue to-electric-blue text-white border-2 border-cyber-blue/30",children:[s.jsx(ra,{type:"target",position:tt.Top,className:"w-3 h-3"}),s.jsx(ra,{type:"source",position:tt.Bottom,className:"w-3 h-3"}),s.jsxs("div",{className:"flex items-center gap-2",children:[qy("action"),s.jsx("div",{className:"text-sm font-semibold",children:e.label})]}),e.description&&s.jsx("div",{className:"text-xs opacity-80 mt-1",children:e.description})]})),d3e=b.memo(({data:e})=>s.jsxs("div",{className:"px-4 py-2 shadow-md rounded-md bg-gradient-to-r from-orange-400 to-orange-600 text-white border-2 border-orange-300",children:[s.jsx(ra,{type:"target",position:tt.Top,className:"w-3 h-3"}),s.jsx(ra,{type:"source",position:tt.Left,className:"w-3 h-3"}),s.jsx(ra,{type:"source",position:tt.Right,className:"w-3 h-3"}),s.jsxs("div",{className:"flex items-center gap-2",children:[qy("decision"),s.jsx("div",{className:"text-sm font-semibold",children:e.label})]}),e.description&&s.jsx("div",{className:"text-xs opacity-80 mt-1",children:e.description})]})),f3e=b.memo(({data:e})=>s.jsxs("div",{className:"px-4 py-2 shadow-md rounded-md bg-gradient-to-r from-gray-400 to-gray-600 text-white border-2 border-gray-300",children:[s.jsx(ra,{type:"target",position:tt.Top,className:"w-3 h-3"}),s.jsx(ra,{type:"source",position:tt.Bottom,className:"w-3 h-3"}),s.jsxs("div",{className:"flex items-center gap-2",children:[qy("integration"),s.jsx("div",{className:"text-sm font-semibold",children:e.label})]}),e.description&&s.jsx("div",{className:"text-xs opacity-80 mt-1",children:e.description})]})),h3e={trigger:l3e,agent:c3e,action:u3e,decision:d3e,integration:f3e},m3e=[{category:"Triggers",nodes:[{type:"trigger",label:"Customer Message",icon:Ot,description:"Triggered when customer sends a message"},{type:"trigger",label:"Schedule",icon:Ot,description:"Time-based trigger"},{type:"trigger",label:"Form Submit",icon:Ot,description:"When a form is submitted"}]},{category:"Agents",nodes:[{type:"agent",label:"Customer Service",icon:so,description:"Handle customer inquiries"},{type:"agent",label:"HR Assistant",icon:so,description:"HR-related tasks"},{type:"agent",label:"Sales Bot",icon:so,description:"Sales and lead qualification"}]},{category:"Actions",nodes:[{type:"action",label:"Send Email",icon:Kt,description:"Send automated email"},{type:"action",label:"Create Ticket",icon:Kt,description:"Create support ticket"},{type:"action",label:"Update Database",icon:Kt,description:"Update records"}]},{category:"Logic",nodes:[{type:"decision",label:"Condition",icon:ow,description:"Branch based on conditions"},{type:"decision",label:"Priority Check",icon:ow,description:"Check message priority"}]},{category:"Integrations",nodes:[{type:"integration",label:"Slack",icon:Qu,description:"Send to Slack channel"},{type:"integration",label:"CRM",icon:Qu,description:"Update CRM system"},{type:"integration",label:"Zapier",icon:Qu,description:"Trigger Zapier webhook"}]}],p3e=({onAddNode:e})=>s.jsxs(te,{className:"w-64 h-full overflow-y-auto",children:[s.jsx(xe,{children:s.jsx(we,{className:"text-lg",children:"Workflow N
1414odes"})}),s.jsx(se,{className:"space-y-4",children:m3e.map(t=>s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-sm text-gray-700 dark:text-gray-300 mb-2",children:t.category}),s.jsx("div",{className:"space-y-2",children:t.nodes.map((n,r)=>{const a=n.icon;return s.jsx(Y,{variant:"outline",size:"sm",className:"w-full justify-start h-auto p-2",onClick:()=>e(n.type,n.label,n.description),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[s.jsx(a,{className:"w-4 h-4"}),s.jsxs("div",{className:"text-left",children:[s.jsx("div",{className:"font-medium text-xs",children:n.label}),n.description&&s.jsx("div",{className:"text-xs text-gray-500 truncate",children:n.description})]})]})},`${n.type}-${r}`)})})]},t.category))})]}),g3e=[{id:"customer-support",name:"Customer Support Flow",description:"Standard customer support workflow",category:"support",icon:"🎧",nodes:[{id:"trigger-1",type:"trigger",position:{x:100,y:50},data:{label:"Customer Message",description:"New customer inquiry"}},{id:"agent-1",type:"agent",position:{x:100,y:150},data:{label:"Customer Service",description:"Initial response agent"}},{id:"decision-1",type:"decision",position:{x:100,y:250},data:{label:"Escalation Check",description:"Check if escalation needed"}},{id:"agent-2",type:"agent",position:{x:250,y:350},data:{label:"Senior Support",description:"Escalated support agent"}}],edges:[{id:"e1",source:"trigger-1",target:"agent-1"},{id:"e2",source:"agent-1",target:"decision-1"},{id:"e3",source:"decision-1",target:"agent-2"}]},{id:"hr-onboarding",name:"HR Onboarding",description:"Employee onboarding workflow",category:"hr",icon:"👤",nodes:[{id:"trigger-1",type:"trigger",position:{x:100,y:50},data:{label:"New Employee",description:"New hire started"}},{id:"agent-1",type:"agent",position:{x:100,y:150},data:{label:"HR Assistant",description:"Welcome and setup"}},{id:"action-1",type:"action",position:{x:100,y:250},data:{label:"Send Welcome Kit",description:"Email welcome materials"}}],edges:[{id:"e1",source:"trigger-1",target:"agent-1"},{id:"e2",source:"agent-1",target:"action-1"}]}],x3e=({workflowName:e,onWorkflowNameChange:t,onSave:n,onLoadTemplate:r})=>{const[a,i]=b.useState(!1),{toast:o}=_t(),l=c=>{r(c.nodes,c.edges),t(c.name),i(!1),o({description:`Loaded template: ${c.name}`,duration:2e3})};return s.jsx(te,{className:"border-b rounded-none",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx(_e,{value:e,onChange:c=>t(c.target.value),className:"w-64",placeholder:"Workflow name"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Y,{onClick:n,size:"sm",children:[s.jsx(uw,{className:"w-4 h-4 mr-2"}),"Save"]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(Vr,{className:"w-4 h-4 mr-2"}),"Test"]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>i(!a),children:[s.jsx(Js,{className:"w-4 h-4 mr-2"}),"Templates"]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(p1,{className:"w-4 h-4 mr-2"}),"Clear"]})]})]}),a&&s.jsx("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:g3e.map(c=>s.jsx(te,{className:"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800",onClick:()=>l(c),children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("span",{className:"text-2xl",children:c.icon}),s.jsx("h3",{className:"font-semibold",children:c.name})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:c.description})]})},c.id))})]})})},y3e=({initialNodes:e=[],initialEdges:t=[],onSave:n})=>{const[r,a,i]=IRe(e),[o,l,c]=ORe(t),[u,d]=b.useState("New Workflow"),f=b.useCallback(y=>l(x=>$te(y,x)),[l]),m=b.useCallback((y,x,w)=>{const N={id:`${y}-${Date.now()}`,type:y,position:{x:Math.random()*400,y:Math.random()*400},data:{label:x,description:w}};a(S=>S.concat(N))},[a]),p=b.useCallback(()=>{n&&n(r,o)},[r,o,n]),v=b.useCallback((y,x)=>{a(y),l(x)},[a,l]);return s.jsxs("div",{className:"h-full flex",children:[s.jsx(p3e,{onAddNode:m}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx(x3e,{workflowName:u,onWorkflowNameChange:d,onSave:p,onLoadTemplate:v}),s.jsx("div",{className:"flex-1",children:s.jsxs(TRe,{nodes:r,edges:o,onNodesChange:i,onEdgesChange:c,onConnect:f,nodeTypes:h3e,fitView:!0,style:{backgroundColor:"#f8fafc"},children:[s.jsx(VRe,{}),s.jsx(s3e,{}),s.jsx($Re,{gap:12,size:1})]})})]})]})},v3e=({agentId:e,smartTemplates:t=[]})=>{const[n,r]=b.useState([]),[a,i]=b.useState(null),[o,l]=b.useState(!1),{toast:c}=_t();b.useEffect(()=>{const y=t.filter(x=>x.orchestrationEnabled).map(x=>{var S;const w=x.steps.map((_,k)=>({id:`${x.id}-step-${k}`,type:"action",position:{x:100+k*200,y:100},data:{label:_.description,config:{orchestrationActions:_.orchestrationActions}}})),N=w.slice(0,-1).map((_,k)=>({id:`${x.id}-edge-${k}`,source:_.id,target:w[k+1].id}));return{id:`workflow-${x.id}`,name:`${x.title} Workflow`,description:`Auto-generated from Smart Template: ${x.description}
1414`,nodes:w,edges:N,triggers:[(S=w[0])==null?void 0:S.id].filter(Boolean),isActive:!1,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),createdBy:"system",complianceChecks:{piiDetection:!0,auditLogging:!0,accessControl:!0}}});r(x=>{const w=x.map(S=>S.id),N=y.filter(S=>!w.includes(S.id));return[...x,...N]})},[t]);const u=()=>{i(null),l(!0)},d=(v,y)=>{const x={id:(a==null?void 0:a.id)||`workflow-${Date.now()}`,name:(a==null?void 0:a.name)||"New Workflow",description:(a==null?void 0:a.description)||"Agent workflow",nodes:v,edges:y,triggers:v.filter(w=>w.type==="trigger").map(w=>w.id),isActive:!1,createdAt:(a==null?void 0:a.createdAt)||new Date().toISOString(),updatedAt:new Date().toISOString(),createdBy:"current-user",complianceChecks:{piiDetection:!0,auditLogging:!0,accessControl:!0}};r(a?w=>w.map(N=>N.id===x.id?x:N):w=>[...w,x]),l(!1),c({description:"Workflow saved successfully!",duration:2e3})},f=v=>{i(v),l(!0)},m=v=>{r(y=>y.map(x=>x.id===v?{...x,isActive:!x.isActive}:x)),c({description:"Workflow status updated",duration:2e3})},p=v=>{r(y=>y.filter(x=>x.id!==v)),c({description:"Workflow deleted",duration:2e3})};return o?s.jsx("div",{className:"h-96",children:s.jsx(y3e,{initialNodes:(a==null?void 0:a.nodes)||[],initialEdges:(a==null?void 0:a.edges)||[],onSave:d})}):s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold",children:"Agent Workflows"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Create drag-and-drop workflows for agent collaboration and automation"})]}),s.jsxs(Y,{onClick:u,children:[s.jsx(Fn,{className:"w-4 h-4 mr-2"}),"Create Workflow"]})]}),n.length===0?s.jsx(te,{children:s.jsx(se,{className:"flex flex-col items-center justify-center py-12",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Workflows Yet"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Create your first workflow to enable agent collaboration and automation"}),s.jsxs(Y,{onClick:u,children:[s.jsx(Fn,{className:"w-4 h-4 mr-2"}),"Create Your First Workflow"]})]})})}):s.jsx("div",{className:"grid gap-4",children:n.map(v=>s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[v.name,s.jsx(le,{variant:v.isActive?"default":"secondary",children:v.isActive?"Active":"Inactive"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:v.description})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>m(v.id),children:v.isActive?s.jsx(cw,{className:"w-4 h-4"}):s.jsx(Vr,{className:"w-4 h-4"})}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>f(v),children:s.jsx(Kt,{className:"w-4 h-4"})}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>p(v.id),children:s.jsx(oi,{className:"w-4 h-4"})})]})]})}),s.jsx(se,{children:s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("span",{children:[v.nodes.length," nodes"]}),s.jsxs("span",{children:[v.edges.length," connections"]}),s.jsxs("span",{children:[v.triggers.length," triggers"]}),s.jsxs("span",{children:["Updated ",new Date(v.updatedAt).toLocaleDateString()]})]})})]},v.id))})]})},vz=[{id:"scada-api-call",type:"api-call",name:"SCADA Data Collection",description:"Collect and validate data from SCADA systems",config:{endpoint:"scada/readings",validation:!0},icon:"⚙️"},{id:"database-save",type:"data-storage",name:"Save to Database",description:"Store step data in compliance database",config:{table:"compliance_logs",audit:!0},icon:"💾"},{id:"supervisor-alert",type:"notification",name:"Supervisor Alert",description:"Send notification to supervisor",config:{urgency:"normal",method:"email+sms"},icon:"🚨"},{id:"calendar-schedule",type:"api-call",name:"Schedule Event",description:"Create calendar event or appointment",config:{calendar:"google",duration:30},icon:"📅"},{id:"compliance-report",type:"report-generation",name:"Generate Report",description:"Auto-generate compliance or audit report",config:{format:"pdf",template:"standard"},icon:"📊"},{id:"threshold-check",type:"validation",name:"Threshold Validation",description:"Check values against regulatory thresholds",config:{autoEscalate:!0,tolerance:.1},icon:"⚡"}],b3e=({template:e,onSave:t,onCancel:n})=>{const[r,a]=b.useState(e||{id:"",title:"",description:"",category:"Water Quality",steps:[{id:"1",description:"",orchestrationActions:[]}],orchestrationEnabled:!1,preBuiltTemplate:!1}),[i,o]=b.useState(!1),l=()=>{const p={id:Date.now().toString(),description:"",orchestrationActions:[]};a(v=>({...v,steps:[...v.steps,p]}))},c=(p,v)=>{a(y=>({...y,steps:y.steps.map(x=>x.id===p?{...x,description:v}:x)}))},u=(p,v)=>{a(y=>({...y,steps:y.steps.map(x=>x.id===p?{...x,orchestrationActions:[...x.orchestrationActions,v]}:x)}))},d=(p,v)=>{a(y=>({...y,steps:y.steps.map(x=>x.id===p?{...x,orchestrationActions:x.orchestrationActions.filter(w=>w.id!==v)}:x)}))},f=p=>{a(v=>({...v,steps:v.steps.filter(y=>y.id!==p)}))},m=()=>{t({...r,id:r.id||Date.now().toString()})};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-5 w-5 text-blue-500"}
1414),"Smart Task Template Builder"]})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"title",children:"Template Title"}),s.jsx(_e,{id:"title",value:r.title,onChange:p=>a(v=>({...v,title:p.target.value})),placeholder:"e.g., Daily Chlorine Residual Check"})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"category",children:"Category"}),s.jsxs(dt,{value:r.category,onValueChange:p=>a(v=>({...v,category:p})),children:[s.jsx(ot,{children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"Water Quality",children:"Water Quality"}),s.jsx(me,{value:"HVAC",children:"HVAC"}),s.jsx(me,{value:"HR",children:"HR"}),s.jsx(me,{value:"Safety",children:"Safety"}),s.jsx(me,{value:"Maintenance",children:"Maintenance"})]})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"description",children:"Description"}),s.jsx(_e,{id:"description",value:r.description,onChange:p=>a(v=>({...v,description:p.target.value})),placeholder:"Brief description of this workflow"})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Dt,{id:"orchestration",checked:r.orchestrationEnabled,onCheckedChange:p=>a(v=>({...v,orchestrationEnabled:p}))}),s.jsx(de,{htmlFor:"orchestration",children:"Enable Smart Orchestration"}),s.jsx(le,{variant:"secondary",children:"Auto-generates workflow nodes"})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{children:"Task Steps"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{onClick:()=>o(!i),variant:"outline",size:"sm",children:[s.jsx(pr,{className:"h-4 w-4 mr-1"}),i?"Hide":"Preview"," Flow"]}),s.jsxs(Y,{onClick:l,size:"sm",children:[s.jsx(Fn,{className:"h-4 w-4 mr-1"}),"Add Step"]})]})]})}),s.jsx(se,{children:s.jsx("div",{className:"space-y-4",children:r.steps.map((p,v)=>s.jsx("div",{className:"border rounded-lg p-4 space-y-3",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-blue-100 dark:bg-blue-900 text-blue-600 dark:text-blue-400 rounded-full flex items-center justify-center text-sm font-medium flex-shrink-0",children:v+1}),s.jsxs("div",{className:"flex-1 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(_e,{value:p.description,onChange:y=>c(p.id,y.target.value),placeholder:`Step ${v+1} description...`,className:"flex-1"}),r.steps.length>1&&s.jsx(Y,{onClick:()=>f(p.id),variant:"ghost",size:"sm",children:s.jsx(oi,{className:"h-4 w-4"})})]}),r.orchestrationEnabled&&s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{className:"text-sm font-medium",children:"Smart Actions for this step:"}),p.orchestrationActions.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:p.orchestrationActions.map(y=>s.jsxs(le,{variant:"secondary",className:"flex items-center gap-1",children:[s.jsx("span",{children:y.icon}),y.name,s.jsx("button",{onClick:()=>d(p.id,y.id),className:"ml-1 text-red-500 hover:text-red-700",children:"×"})]},y.id))}),s.jsxs(dt,{onValueChange:y=>{const x=vz.find(w=>w.id===y);x&&u(p.id,x)},children:[s.jsx(ot,{className:"w-full",children:s.jsx(ft,{placeholder:"+ Add smart action"})}),s.jsx(lt,{children:vz.map(y=>s.jsx(me,{value:y.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:y.icon}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:y.name}),s.jsx("div",{className:"text-xs text-gray-500",children:y.description})]})]})},y.id))})]})]})]})]})},p.id))})})]}),i&&r.orchestrationEnabled&&s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Kt,{className:"h-5 w-5 text-purple-500"}),"Orchestration Flow Preview"]})}),s.jsx(se,{children:s.jsx("div",{className:"space-y-4",children:r.steps.map((p,v)=>s.jsxs("div",{className:"flex items-center gap-4 p-3 border rounded-lg",children:[s.jsx("div",{className:"w-8 h-8 bg-blue-100 dark:bg-blue-900 text-blue-600 dark:text-blue-400 rounded-full flex items-center justify-center text-sm font-medium",children:v+1}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-medium",children:p.description||`Step ${v+1}`}),p.orchestrationActions.length>0&&s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Will trigger: ",p.orchestrationActions.map(y=>
1414y.name).join(", ")]})]}),p.orchestrationActions.length>0&&s.jsxs("div",{className:"flex items-center gap-1 text-green-600",children:[s.jsx(Bt,{className:"h-4 w-4"}),s.jsxs("span",{className:"text-sm",children:[p.orchestrationActions.length," action(s)"]})]})]},p.id))})})]}),s.jsxs("div",{className:"flex justify-end gap-3",children:[s.jsx(Y,{onClick:n,variant:"outline",children:"Cancel"}),s.jsx(Y,{onClick:m,disabled:!r.title||!r.description,children:"Save Smart Template"})]})]})},w3e=[{id:"chlorine-check",title:"Daily Chlorine Residual Check",description:"Monitor and log chlorine levels across distribution system",category:"Water Quality",orchestrationEnabled:!0,preBuiltTemplate:!0,steps:[{id:"1",description:"Collect water samples from designated monitoring points",orchestrationActions:[{id:"location-verify",type:"validation",name:"Location Verification",description:"GPS verification of sampling location",config:{gpsRequired:!0},icon:"📍"}]},{id:"2",description:"Test chlorine residual levels using DPD colorimetric method",orchestrationActions:[{id:"scada-reading",type:"api-call",name:"SCADA Data Sync",description:"Sync with SCADA systems for comparison",config:{endpoint:"scada/chlorine",realtime:!0},icon:"⚙️"}]},{id:"3",description:"Record readings in compliance monitoring log",orchestrationActions:[{id:"database-log",type:"data-storage",name:"Compliance Logging",description:"Store in regulatory database",config:{table:"water_quality_logs",audit:!0},icon:"💾"}]},{id:"4",description:"Compare results against regulatory standards (0.2-4.0 mg/L)",orchestrationActions:[{id:"threshold-check",type:"validation",name:"Regulatory Compliance",description:"Auto-check against EPA standards",config:{min:.2,max:4,autoAlert:!0},icon:"⚡"}]},{id:"5",description:"Generate daily compliance report",orchestrationActions:[{id:"report-gen",type:"report-generation",name:"Auto-Report Generation",description:"Generate and submit regulatory report",config:{format:"pdf",recipients:["supervisor","regulatory"]},icon:"📊"}]}]},{id:"hvac-maintenance",title:"Monthly HVAC System Check",description:"Comprehensive HVAC system inspection and maintenance",category:"HVAC",orchestrationEnabled:!0,preBuiltTemplate:!0,steps:[{id:"1",description:"Check air filter condition and replace if needed",orchestrationActions:[{id:"inventory-check",type:"api-call",name:"Inventory Management",description:"Check filter inventory and auto-order",config:{system:"cmms",autoOrder:!0},icon:"📦"}]},{id:"2",description:"Inspect and clean condenser coils",orchestrationActions:[{id:"maintenance-log",type:"data-storage",name:"Maintenance Logging",description:"Log maintenance activities in CMMS",config:{system:"cmms",workOrder:!0},icon:"🔧"}]},{id:"3",description:"Test thermostat calibration and settings",orchestrationActions:[{id:"scada-sync",type:"api-call",name:"Building Automation Sync",description:"Sync with BAS for temperature data",config:{system:"bas",dataPoints:["temp","humidity"]},icon:"🌡️"}]}]},{id:"employee-onboarding",title:"New Employee Onboarding",description:"Complete HR onboarding workflow for new hires",category:"HR",orchestrationEnabled:!0,preBuiltTemplate:!0,steps:[{id:"1",description:"Collect employee personal information and documents",orchestrationActions:[{id:"hr-system",type:"data-storage",name:"HR System Integration",description:"Store in HR management system",config:{system:"workday",encryption:!0},icon:"👤"}]},{id:"2",description:"Set up system accounts and access permissions",orchestrationActions:[{id:"ad-account",type:"api-call",name:"Active Directory Setup",description:"Create AD account and assign permissions",config:{system:"ad",roleBasedAccess:!0},icon:"🔐"}]},{id:"3",description:"Schedule orientation and training sessions",orchestrationActions:[{id:"calendar-booking",type:"api-call",name:"Calendar Integration",description:"Schedule sessions in company calendar",config:{system:"outlook",duration:240},icon:"📅"}]}]}],j3e=({onSelectTemplate:e,isSimpleMode:t=!1})=>{const n=a=>{switch(a){case"Water Quality":return s.jsx(WO,{className:"h-5 w-5 text-blue-500"});case"HVAC":return s.jsx(jje,{className:"h-5 w-5 text-orange-500"});case"HR":return s.jsx(Bn,{className:"h-5 w-5 text-green-500"});case"Safety":return s.jsx(it,{className:"h-5 w-5 text-red-500"});case"Maintenance":return s.jsx(hl,{className:"h-5 w-5 text-purple-500"});default:return s.jsx(Pe,{className:"h-5 w-5 text-gray-500"})}},r=a=>{e(a),t&&console.log(`Template "${a.title}" added to agent for testing`)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Pre-Built Smart Templates"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Ready-to-use templates with built-in orchestration for common workflows"})]}),t&&s.jsx(te,{className:"border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-900/20",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Qs,{className:"h-5 w-5 text-blue-500 mt-0.5 flex-shrink-0"}),s.jsxs("div",{className:"text-sm",children:[s.jsx("p",{className:"font-medium text-blue-800 dark:text-blue-200 mb-2",children:"🚀 Simple Mode: Quick Template Integration"}),s.jsxs("div",{className:"space-y-2 text-blue-700 dark:text-blue-300",children:[s.jsx("p",{children:"• Templates instantly add smart capabilities to your agent"}),s.jsxs("p",{children:["• Test them immediately in the ",s.jsx("strong",{children:"Preview & Test tab"})]}),s.jsxs("p",{children:["• For custom workflows and API connections → ",s.jsx("strong",{children:"Switch to Advanced Mode"})]})]})]})]})})}),s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:w3e.map(a=>s.jsxs(te,{className:"hover:shadow-md transition-shadow border-2 hover:border-blue-200 dark:hover:border-blue-800",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[n(a.category),s.jsxs("div",{children:[s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[a.title,t&&s.jsx(ZO,{className:"h-4 w-4 text-yellow-500"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:a.description})]})]}),s.jsx(le,{variant:"secondary",className:"flex-shrink-0",children:a.category})]})}),s.jsx(se,{className:"pt-0",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Pe,{className:"h-4 w-4"}),a.steps.length," steps"]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ot,{className:"h-4 w-4"}),a.steps.reduce((i,o)=>i+o.orchestrationActions.length,0)," smart actions"]})]}),t&&s.jsxs("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg",children:[s.jsx("p",{className:"text-xs text-green-700 dark:text-green-300 font-medium mb-1",children:"✅ Ready for Simple Mode"}),s.jsxs("p",{className:"text-xs text-green-600 dark:text-green-400",children:["This template will add ",a.steps.length," guided steps to your agent's capabilities"]})]}),s.jsxs("div",{className:"text-xs",children:[s.jsx("p",{className:"font-medium mb-2",children:"Smart Actions Include:"}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[a.steps.slice(0,3).map((i,o)=>i.orchestrationActions.map((l,c)=>s.jsxs(le,{variant:"outline",className:"text-xs",children:[l.icon," ",l.name]},`${o}-${c}`))),a.steps.length>3&&s.jsxs(le,{variant:"outline",className:"text-xs",children:["+",a.steps.reduce((i,o)=>i+o.orchestrationActions.length,0)-3," more"]})]})]}),s.jsxs(Y,{onClick:()=>r(a),className:"w-full flex items-center justify-center gap-2",size:"sm",variant:t?"default":"outline",children:[t&&s.jsx(Fn,{className:"h-3 w-3"}),t?"Add to My Agent":"Use This Template",t&&s.jsx(Bt,{className:"h-3 w-3"})]})]})})]},a.id))}),t&&s.jsx(te,{className:"border-purple-200 dark:border-purple-800 bg-purple-50/50 dark:bg-purple-900/20",children:s.jsxs(se,{className:"p-4 text-center",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-2",children:[s.jsx(hl,{className:"h-5 w-5 text-purple-600"}),s.jsx("p",{className:"font-medium text-purple-700 dark:text-purple-300",children:"Want More Control?"})]}),s.jsxs("p",{className:"text-sm text-purple-700 dark:text-purple-300",children:["💡 Create custom templates, connect your own APIs, and build complex workflows in ",s.jsx("strong",{children:"Advanced Mode"})]})]})})]})},N3e=({sources:e,onSourcesChange:t,smartTemplates:n=[],onSmartTemplatesChange:r})=>
1414{const[a,i]=b.useState(!1),[o,l]=b.useState(),c=[{type:"upload",title:"Upload Files",description:"Provide documents, PDFs, or text files",icon:Js},{type:"connect",title:"Connect Data Sources",description:"Integrate with databases or APIs",icon:Qu},{type:"urls",title:"Public URLs",description:"Crawl websites or documentation",icon:bs}],u=p=>{let v;o?v=n.map(y=>y.id===p.id?p:y):v=[...n,p],r&&r(v),i(!1),l(void 0)},d=p=>{l(p),i(!0)},f=()=>{l(void 0),i(!0)},m=()=>{i(!1),l(void 0)};return a?s.jsx(b3e,{template:o,onSave:u,onCancel:m}):s.jsxs("div",{className:"space-y-6",children:[s.jsx(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Gr,{className:"h-6 w-6 text-cyan-500"}),"Knowledge & Smart Task Hub"]}),s.jsx(nt,{children:"Connect your data sources and configure intelligent task workflows with automatic orchestration"})]})}),s.jsxs(os,{defaultValue:"knowledge",className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-3",children:[s.jsxs(at,{value:"knowledge",className:"flex items-center gap-2",children:[s.jsx(Gr,{className:"h-4 w-4"}),"Knowledge Sources"]}),s.jsxs(at,{value:"smart-tasks",className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-4 w-4"}),"Smart Templates"]}),s.jsxs(at,{value:"library",className:"flex items-center gap-2",children:[s.jsx(bc,{className:"h-4 w-4"}),"Template Library"]})]}),s.jsxs(Ze,{value:"knowledge",className:"space-y-6",children:[s.jsx(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:s.jsx(se,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:c.map(p=>{const v=p.icon;return s.jsxs("div",{className:"group relative glass-effect glass-effect-dark rounded-xl border-2 border-dashed border-white/30 dark:border-gray-700/50 hover:border-blue-400/50 dark:hover:border-blue-500/50 transition-all duration-300 cursor-pointer ai-glow-hover",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-blue-500/5 to-purple-500/5 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsxs("div",{className:"relative text-center",children:[s.jsxs("div",{className:"relative inline-block mb-4",children:[s.jsx(v,{className:"h-12 w-12 text-blue-500 group-hover:text-blue-400 transition-colors duration-300"}),s.jsx("div",{className:"absolute -inset-2 bg-blue-500/20 rounded-full blur-md opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),s.jsx("h3",{className:"font-semibold text-foreground mb-2 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",children:p.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:p.description})]})]},p.type)})})})}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-white/20 dark:border-gray-700/30 ai-glow-hover",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-3",children:[s.jsx(Js,{className:"h-6 w-6 text-green-500"}),"Training Data Upload"]}),s.jsx(nt,{children:"Upload documents, files, or connect to your knowledge base"})]}),s.jsx(se,{children:s.jsx("div",{className:"relative group",children:s.jsxs("div",{className:"border-2 border-dashed border-white/30 dark:border-gray-700/50 rounded-xl p-12 text-center glass-effect glass-effect-dark hover:border-green-400/50 dark:hover:border-green-500/50 transition-all duration-300 cursor-pointer",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-green-500/5 to-blue-500/5 rounded-xl opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"relative inline-block mb-4",children:[s.jsx(Js,{className:"h-16 w-16 text-muted-foreground group-hover:text-green-500 transition-colors duration-300"}),s.jsx("div",{className:"absolute -inset-3 bg-green-500/20 rounded-full blur-lg opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),s.jsx("p",{className:"text-muted-foreground mb-4 text-lg",children:"Drag and drop files here, or"}),s.jsxs(Y,{className:"bg-gradient-to-r from-green-600 to-blue-600 hover:from-green-700 hover:to-blue-700 ai-glow-hover",children:[s.jsx(Js,{className:"w-4 h-4 mr-2"}),"Browse Files"]})]})]})})})]})]}),s.jsxs(Ze,{value:"smart-tasks",className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold",children:"Your Smart Task Templates"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Templates with automatic orchestration and workflow integration"})]}),s.jsxs(Y,{onClick:f,children:[s.jsx(Fn,{className:"h-4 w-4 mr-2"}),"Create Smart Template"]})]}),n.length===0?s.jsx(te,{children:s.jsx(se,{className:"flex flex-col items-center justify-center py-12",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Ot,{className:"h-12 w-12 text-blue-500 mx-auto mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Smart Templates Yet"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Create intelligent task templates that automatically trigger orchestration actions"}),s.jsxs(Y,{onClick:f,children:[s.jsx(Fn,{className:"h-4 w-4 mr-2"}),"Create Your First Smart Template"]})]})})}):s.jsx("div",{className:"grid gap-4",children:n.map(p=>s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[p.orchestrationEnabled&&s.jsx(Ot,{className:"h-4 w-4 text-blue-500"}),p.title]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:p.description})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(le,{variant:"secondary",children:p.category}),p.orchestrationEnabled&&s.jsx(le,{variant:"default",children:"Smart Actions"})]})]})}),s.jsx(se,{children:s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("span",{children:[p.steps.length," steps"]}),p.orchestrationEnabled&&s.jsxs("span",{children:[p.steps.reduce((v,y)=>v+y.orchestrationActions.length,0)," smart actions"]}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>l(p),children:"Edit"})]})})]}
1414,p.id))})]}),s.jsx(Ze,{value:"library",className:"space-y-6",children:s.jsx(j3e,{onSelectTemplate:d})})]})]})},S3e=({agentData:e,onDeploy:t})=>{const{toast:n}=_t(),r=[{id:"web-widget",name:"Web Widget",description:"Embed on your website with customizable chat widget",icon:bs,status:"ready",features:["Custom branding","HTTPS secure","Mobile responsive"],estimatedTime:"2 minutes",complexity:"simple"},{id:"mobile-app",name:"Mobile App",description:"Native mobile integration for iOS and Android",icon:bje,status:"ready",features:["Push notifications","Offline mode","Native UI"],estimatedTime:"5 minutes",complexity:"medium"},{id:"slack-integration",name:"Slack Bot",description:"Deploy directly to your Slack workspace",icon:di,status:"pending",features:["Channel integration","Direct messages","Slash commands"],estimatedTime:"3 minutes",complexity:"simple"},{id:"scada-integration",name:"SCADA Integration",description:"Connect to industrial control systems",icon:Gr,status:"configured",features:["Real-time monitoring","Alert management","Data visualization"],estimatedTime:"10 minutes",complexity:"advanced"},{id:"api-endpoint",name:"API Endpoint",description:"REST API for custom integrations",icon:Ot,status:"ready",features:["Authentication","Rate limiting","Documentation"],estimatedTime:"1 minute",complexity:"medium"},{id:"dashboard",name:"Admin Dashboard",description:"Monitor and manage your agent",icon:yX,status:"ready",features:["Analytics","User management","Configuration"],estimatedTime:"2 minutes",complexity:"simple"}],a=c=>{switch(c){case"ready":return s.jsx(Pe,{className:"h-4 w-4 text-green-500"});case"pending":return s.jsx(zn,{className:"h-4 w-4 text-yellow-500"});case"configured":return s.jsx(Kt,{className:"h-4 w-4 text-blue-500"});default:return s.jsx(Xa,{className:"h-4 w-4 text-gray-400"})}},i=c=>{switch(c){case"ready":return"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/30";case"pending":return"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950/30";case"configured":return"border-blue-200 bg-blue-50 dark:border-blue-800 dark:bg-blue-950/30";default:return"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800"}},o=c=>{switch(c){case"simple":return"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-300";case"medium":return"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-300";case"advanced":return"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-300";default:return"bg-gray-100 text-gray-700 dark:bg-gray-900/30 dark:text-gray-300"}},l=c=>{c.status==="pending"?n({title:"Setup Required",description:`${c.name} requires additional configuration. Redirecting to setup...`,duration:3e3}):n({title:"Deployment Started",description:`${e.name} is being deployed to ${c.name}. ETA: ${c.estimatedTime}`,duration:4e3}),t(c.id)};return s.jsxs("div",{className:"space-y-6",children:[s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-5 w-5 text-blue-500"}),"Deployment Options for ",e.name]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Choose how you want to deploy your AI agent. Multiple options can be enabled simultaneously."})]})}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map((c,u)=>{const d=c.icon;return s.jsx(Gt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.1},children:s.jsxs(te,{className:`h-full transition-all duration-200 hover:shadow-lg cursor-pointer ${i(c.status)}`,children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"p-2 rounded-lg text-white",style:{backgroundColor:e.primaryColor},children:s.jsx(d,{className:"h-4 w-4"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-sm",children:c.name}),s.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[a(c.status),s.jsx("span",{className:"text-xs text-gray-500 capitalize",children:c.status})]})]})]}),s.jsx(le,{variant:"outline",className:`text-xs ${o(c.complexity)}`,children:c.complexity})]})}),s.jsxs(se,{className:"pt-0 space-y-3",children:[s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400 line-clamp-2",children:c.description}),s.jsxs("div",{className:"space-y-1",children:[c.features.slice(0,2).map((f,m)=>s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Pe,{className:"h-3 w-3 text-green-500 flex-shrink-0"}),s.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-400",children:f})]},m)),c.features.length>2&&s.jsxs("div",{className:"text-xs text-gray-500",children:["+",c.features.length-2," more features"]})]}),s.jsxs("div",{className:"flex items-center justify-between pt-2",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(zn,{className:"h-3 w-3 text-gray-400"}),s.jsx("span",{className:"text-xs text-gray-500",children:c.estimatedTime})]}),s.jsxs(Y,{size:"sm",onClick:()=>l(c),className:`text-xs h-7 ${c.status==="ready"?"bg-green-500 hover:bg-green-600 text-white":c.status==="configured"?"bg-blue-500 hover:bg-blue-600 text-white":"bg-yellow-500 hover:bg-yellow-600 text-white"}`,children:[c.status==="ready"?"Deploy":c.status==="configured"?"Configure":"Setup",s.jsx(Bt,{className:"h-3 w-3 ml-1"})]})]})]})]})},c.id)})}),s.jsx(te,{className:"glass-effect glass-effect-dark border-purple-200 dark:border-purple-800",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-purple-100 dar
1414k:bg-purple-900/30 rounded-lg",children:s.jsx(Ot,{className:"h-4 w-4 text-purple-600"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-medium text-sm",children:"Quick Deploy All"}),s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:"Deploy to web widget, API endpoint, and dashboard simultaneously"})]}),s.jsx(Y,{size:"sm",style:{backgroundColor:e.primaryColor},className:"text-white",onClick:()=>{n({title:"Multi-Deployment Started",description:"Deploying to multiple channels. This will take about 5 minutes.",duration:5e3})},children:"Deploy All"})]})})})]})},k3e=({agentConfig:e,brandingConfig:t,onDeploy:n})=>{const[r,a]=b.useState("configure"),[i,o]=b.useState(null),[l,c]=b.useState(0),[u,d]=b.useState("idle"),[f,m]=b.useState(""),[p,v]=b.useState(null),{toast:y}=_t();b.useEffect(()=>{const k=localStorage.getItem("organizationConfig");if(k){const C=JSON.parse(k);o(C),m(C.deploymentMode),v(C)}},[]);const x={name:e.name||"AI Agent",purpose:e.purpose||"AI Assistant",industry:e.category||"customer-service",primaryColor:t.primaryColor||"#3B82F6",logoUrl:t.logoUrl},w=k=>{const C={"private-cloud":{name:"Private Cloud",icon:s.jsx(Ey,{className:"h-5 w-5"}),description:"Enterprise cloud infrastructure",color:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-300",features:["Dedicated resources","Enterprise SLA","Auto-scaling"]},hybrid:{name:"Hybrid",icon:s.jsx(Fd,{className:"h-5 w-5"}),description:"Cloud + on-premises blend",color:"bg-cyber-blue/20 text-cyber-blue dark:bg-cyber-blue/30 dark:text-electric-blue",features:["Data sovereignty","Flexible scaling","Compliance control"]},"local-server":{name:"Local Server",icon:s.jsx(Gr,{className:"h-5 w-5"}),description:"Complete on-premises control",color:"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300",features:["Full data control","Air-gapped option","Zero cloud dependency"]}};return C[k]||C["private-cloud"]},N=k=>({"llama3-8b":{name:"LLaMA 3 8B",provider:"Meta"},"llama3-70b":{name:"LLaMA 3 70B",provider:"Meta"},"mistral-7b":{name:"Mistral 7B",provider:"Mistral AI"},"mixtral-8x7b":{name:"Mixtral 8x7B",provider:"Mistral AI"},"phi3-mini":{name:"Phi-3 Mini",provider:"Microsoft"},"custom-open-source":{name:"Custom Open-Source",provider:"Various"}})[k]||{name:k,provider:"Unknown"},S=async()=>{if(!i){y({title:"Configuration Required",description:"Please complete organization setup first in System Setup.",variant:"destructive"});return}d("deploying"),a("deploying");const k=[{progress:15,message:"Initializing deployment environment..."},{progress:30,message:`Setting up ${w(f).name} infrastructure...`},{progress:45,message:"Configuring security policies and compliance..."},{progress:60,message:`Deploying ${N(i.defaultLLM).name} model...`},{progress:75,message:"Establishing secure connections..."},{progress:90,message:"Testing agent functionality..."},{progress:100,message:"Deployment complete!"}];for(const C of k)await new Promise(E=>setTimeout(E,2e3)),c(C.progress),y({description:C.message,duration:2e3});d("success"),a("success"),n&&n({agentId:`agent-${Date.now()}`,deploymentMode:f,configuration:i,timestamp:new Date().toISOString()})},_=()=>{y({title:"Redirecting to System Setup",description:"Complete your organization configuration first.",duration:3e3}),window.location.href="/system-setup"};return r==="success"?s.jsxs(Gt.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-6",children:[s.jsx(te,{className:"bg-gradient-to-r from-green-50 to-blue-50 dark:from-green-900/20 dark:to-blue-900/20 border-green-200",children:s.jsxs(se,{className:"text-center",children:[s.jsx(Gt.div,{initial:{scale:0},animate:{scale:1},transition:{delay:.2},className:"mb-4",children:s.jsx("div",{className:"w-16 h-16 bg-green-100 dark:bg-green-900/30 rounded-full flex items-center justify-center mx-auto",children:s.jsx(Pe,{className:"h-8 w-8 text-green-600"})})}),s.jsxs("h2",{className:"text-2xl font-bold text-gray-900 dark:text-white mb-2",children:["🎉 ",x.name," Successfully Deployed!"]}),s.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:["Your AI agent is now live using your organization's ",w(f).name," configuration."]}),s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[s.jsxs(le,{className:w(f).color,children:[w(f).icon,s.jsx("span",{className:"ml-1",children:w(f).name})]}),s.jsxs(le,{variant:"outline",children:[s.jsx(ws,{className:"h-3 w-3 mr-1"}),N(i==null?void 0:i.defaultLLM).name]}),s.jsxs(le,{variant:"outline",children:[s.jsx(it,{className:"h-3 w-3 mr-1"}),"Enterprise Ready"]})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("p",{children:["Model: ",N(i==null?void 0:i.defaultLLM).name," by ",Wg(N(i==null?void 0:i.defaultLLM).provider)]}),s.jsx("p",{children:"Deployed with organization security policies and compliance controls"})]})]})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(we,{className:"text-base flex items-center gap-2",children:[s.jsx(bs,{className:"h-4 w-4 text-blue-500"}),"Web Integration"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Widget Code"}),s.jsx(le,{variant:"outline",className:"text-xs",children:"Ready"})]}),s.jsx("div",{className:"bg-gray-50 dark:bg-gray-800 p-2 rounded text-xs font-mono",children:'<script src="https://agent.privion.ai/embed.js">'}),s.jsxs(Y,{size:"sm",variant:"outline",className:"w-full",children:[s.jsx(Zs,{className:"h-3 w-3 mr-1"}),"Copy Integration Code"]})]})})]}),s.jsxs(te,{children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(we,{className:"text-base flex items-center gap-2",children:[s.jsx(Ot,{className:"h-4 w-4 text-green-500"}),"API Access"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Endpoint"}),s.jsx(le,{variant:"outline",className:"text-xs",children:"Active"})]}),s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-2 rounded text-xs font-mono",children:["api.privion.ai/v1/agents/",x.name.toLowerCase()]}),s.jsxs(Y,{size:"sm",variant:"outline",className:"w-full",children:[s.jsx(Zs,{className:"h-3 w-3 mr-1"}),"View API Docs"]})]})})]}),s.jsxs(te,{children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(we,{className:"text-base flex items-center gap-2",children:[s.jsx(it,{className:"h-4 w-4 text-cyber-blue"}),"Security & Compliance"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Compliance"}),s.jsx(le,{variant:"outline",className:"text-xs",children:"Enterprise"})]}),s.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400",children:[w(f).description,", enterprise encryption, audit logs active"]}),s.jsxs(Y,{size:"sm",variant:"outline",className:"w-full",children:[s.jsx(Kt,{className:"h-3 w-3 mr-1"}),"Security Dashboard"]})]})})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{children:"What's Next?"})}),s.jsx(se,{children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs(Y,{className:"justify-start h-auto",variant:"outline",children:[s.jsxs("div",{className:"text-left",children:[s.jsx("div",{className:"font-medium",children:"Monitor Performance"}),s.jsx("div",{className:"text-xs text-gray-500",children:"View analytics and user interactions"})]}),s.jsx(Bt,{className:"h-4 w-4 ml-auto"})]}),s.jsxs(Y,{className:"justify-start h-auto",variant:"outline",children:[s.jsxs("div",{className:"text-left",children:[s.jsx("div",{className:"font-medium",children:"Create Another Agent"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Build more specialized AI assistants"})]}),s.jsx(Bt,{className:"h-4 w-4 ml-auto"})]})]})})]})]}):r==="deploying"?s.jsx(Gt.div,{initial:{opacity:0}
1414,animate:{opacity:1},className:"space-y-6",children:s.jsx(te,{children:s.jsxs(se,{className:"text-center",children:[s.jsx("div",{className:"w-16 h-16 bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center mx-auto mb-4",children:s.jsx("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin"})}),s.jsxs("h2",{className:"text-2xl font-bold mb-2",children:["Deploying ",x.name]}),s.jsxs("p",{className:"text-gray-600 dark:text-gray-400 mb-2",children:["Using ",w(f).name," with ",N(i==null?void 0:i.defaultLLM).name]}),s.jsx("p",{className:"text-sm text-gray-500 mb-6",children:"Setting up with enterprise-grade infrastructure and security..."}),s.jsxs("div",{className:"max-w-md mx-auto",children:[s.jsxs("div",{className:"flex justify-between text-sm text-gray-600 mb-2",children:[s.jsx("span",{children:"Deployment Progress"}),s.jsxs("span",{children:[l,"%"]})]}),s.jsx(qr,{value:l,className:"h-3"})]})]})})}):s.jsxs("div",{className:"space-y-6",children:[i?s.jsx(te,{className:"bg-blue-50 dark:bg-blue-950/30 border-blue-200",children:s.jsx(se,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-blue-100 dark:bg-blue-900/30 rounded-lg",children:w(i.deploymentMode).icon}),s.jsxs("div",{children:[s.jsxs("h4",{className:"font-medium text-blue-900 dark:text-blue-100",children:["Organization Configuration: ",w(i.deploymentMode).name]}),s.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:["Model: ",N(i.defaultLLM).name," • Configured by ",i.configuredBy," •",new Date(i.configuredAt).toLocaleDateString()]})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(le,{variant:"outline",className:"text-blue-700 border-blue-300",children:"Active"}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:_,children:[s.jsx(Kt,{className:"h-3 w-3 mr-1"}),"Modify"]})]})]})})}):s.jsx(te,{className:"bg-yellow-50 dark:bg-yellow-950/30 border-yellow-200",children:s.jsx(se,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-yellow-100 dark:bg-yellow-900/30 rounded-lg",children:s.jsx(hl,{className:"h-4 w-4 text-yellow-600"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-medium text-yellow-900 dark:text-yellow-100",children:"Organization Setup Required"}),s.jsx("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"Complete your organization-wide deployment configuration to enable advanced deployment options."})]})]}),s.jsxs(Y,{onClick:_,className:"bg-yellow-600 hover:bg-yellow-700",children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Configure Now"]})]})})}),s.jsxs(os,{defaultValue:"simple",className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-2",children:[s.jsx(at,{value:"simple",children:"Quick Deploy"}),s.jsx(at,{value:"advanced",children:"Advanced Configuration"})]}),s.jsx(Ze,{value:"simple",className:"mt-6",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(Hee,{agentData:x}),s.jsx(te,{children:s.jsxs(se,{className:"text-center",children:[s.jsxs(Y,{onClick:S,disabled:u==="deploying"||!i,className:"bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90 text-white px-8 py-3 text-lg",children:[u==="deploying"?"Deploying...":"Deploy Agent Now",s.jsx(Bt,{className:"h-5 w-5 ml-2"})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-2",children:i?`Deploy with ${w(f).name} configuration and enterprise security`:"Complete organization setup to enable deployment"})]})})]})}),s.jsx(Ze,{value:"advanced",className:"mt-6",children:s.jsx(S3e,{agentData:x,onDeploy:k=>{y({title:"Advanced Deployment",description:`Configuring ${k} deployment option with organization settings...`,duration:3e3})}})})]})]})},bz=()=>{const{agentId:e}=wO(),t=qt(),{toast:n}=_t(),{user:r,isAuthenticated:a}=nr(),{loadAgent:i}=qee(),[o,l]=b.useState("basics"),[c,u]=b.useState(!!e),[d,f]=b.useState(!0),[m,p]=b.useState({name:"",purpose:"",description:"",input_text_hint:"",category:"customer-service",memoryType:"session",retentionWindow:"30-days",piiMasking:!0,auditLogs:!0,tone:"professional",endingMessage:"",customGuardrails:[],conversationStarters:[],llm_model_id:null,embedding_model_id:null}),[v,y]=b.useState({primaryColor:"#3B82F6",secondaryColor:"#8B5CF6",logoUrl:"",companyName:"",customCss:"",whiteLabel:!1,favicon:"",customDomain:""}),[x,w]=b.useState([]),[N,S]=b.useState([]),[_,k]=b.useState({mcpConnectors:[],apiEndpoints:[],webhooks:[],rateLimits:{requestsPerMinute:100,burstLimit:200},monitoring:{enabled:!0,alertThreshold:95,logLevel:"info"},activeConnections:3,apiCallsToday:1247,successRate:99.2,avgResponseTime:145}),{progressState:C,trackTabVisit:E,trackFieldInteraction:O,calculateProgress:P}=tPe(),R=P(m,v,x,_),{autoSaveState:T,markAsChanged:D}=nPe({agentConfig:m,brandingConfig:v,knowledgeSources:x,apiConfig:_}
1414,2e3,R,e),F=d?[{id:"basics",label:"Agent Setup",description:"Name and purpose of your agent"},{id:"branding",label:"Appearance",description:"Colors and branding"},{id:"preview",label:"Preview & Test",description:"See your agent in action"},{id:"review",label:"Deploy",description:"Launch your agent"}]:[{id:"basics",label:"Agent Setup",description:"Core agent configuration"},{id:"branding",label:"Appearance",description:"Visual customization"},{id:"knowledge",label:"Knowledge",description:"Data sources and training"},{id:"smart-actions",label:"Smart Actions",description:"Connect to other tools"},{id:"learning",label:"Learning",description:"Memory and conversation history"},{id:"security",label:"Security",description:"Access control and permissions"},{id:"tasks",label:"Tasks",description:"Automated workflows"},{id:"preview",label:"Preview & Test",description:"Complete interactive preview"},{id:"review",label:"Deploy",description:"Launch and manage"}];b.useEffect(()=>{a||(t("/"),n({description:"Please sign in to access the advanced agent builder",variant:"destructive",duration:3e3}))},[a,t,n]),b.useEffect(()=>{if(e&&c&&a){const W=i(e);W?(p(W.agentConfig),y(W.brandingConfig),w(W.knowledgeSources),k(W.apiConfig),n({description:`Loaded agent: ${W.metadata.name}`,duration:2e3})):(n({description:"Agent not found, creating new agent",variant:"destructive",duration:3e3}),t("/agent-builder/new")),u(!1)}},[e,c,a,i,t,n]);const U=W=>{l(W),E(W)},H=W=>{p(ie=>({...ie,...W})),D(),Object.keys(W).forEach(ie=>{O(ie,W[ie]!==void 0)})},q=W=>{y(ie=>({...ie,...W})),D(),Object.keys(W).forEach(ie=>{O(ie,W[ie]!==void 0)})},B=W=>{S(W),D()},L=()=>{const W=!d;f(W),o==="preview"||l(o==="test-chat"||o==="experience"?"preview":"basics"),n({description:`Switched to ${W?"Advanced":"Simple"} mode`,duration:2e3})},V=Array.from(C.completedSections);if(!a)return null;if(c)return s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-blue-50/30 to-cyan-50/20 dark:from-gray-900 dark:via-blue-950/30 dark:to-cyan-950/20 flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"}),s.jsx("p",{className:"text-slate-600 dark:text-slate-400",children:"Loading agent..."})]})});const K={name:m.name||"My AI Agent",purpose:m.purpose||"AI Assistant",industry:m.category||"customer-service",primaryColor:v.primaryColor};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-gray-50 via-blue-50/30 to-cyan-50/20 dark:from-gray-900 dark:via-blue-950/30 dark:to-cyan-950/20",children:[s.jsx(xn,{}),s.jsx("div",{className:"pt-16 sm:pt-20 pb-8",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 max-w-6xl",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs(Y,{variant:"outline",onClick:()=>t("/dashboard"),className:"backdrop-blur-sm bg-white/60 dark:bg-slate-800/60 border-white/30 hover:bg-white/80",children:[s.jsx(ai,{className:"h-4 w-4 mr-2"}),"Back to Dashboard"]}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 p-2 bg-white/60 dark:bg-slate-800/60 backdrop-blur-sm rounded-lg border border-white/30",children:[s.jsx("span",{className:"text-sm font-medium",children:"Simple"}),s.jsx(Dt,{checked:!d,onCheckedChange:L}),s.jsxs("span",{className:"text-sm font-medium flex items-center gap-1",children:[s.jsx(Kt,{className:"h-3 w-3"}),"Advanced"]})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Welcome ",r==null?void 0:r.name]})]})]}),s.jsxs("div",{className:"mb-8 sm:mb-12",children:[s.jsx(REe,{getTabProgress:()=>R}),s.jsx(Gt.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-center mt-4",children:s.jsx(le,{variant:d?"default":"secondary",className:"mb-2",children:d?s.jsx(s.Fragment,{children:"🎯 Simple Mode - Easy 4-step setup"}):s.jsx(s.Fragment,{children:"⚙️ Advanced Mode - Full technical control"})})}),T.isSaving&&s.jsx(Gt.div,{initial:{opacity:0,y:-10}
1414,animate:{opacity:1,y:0},className:"text-center mt-2",children:s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-blue-100 dark:bg-blue-900/30 rounded-full text-sm text-blue-700 dark:text-blue-300",children:[s.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"}),"Saving changes..."]})}),e&&s.jsx(Gt.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"text-center mt-2",children:s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-green-100 dark:bg-green-900/30 rounded-full text-sm text-green-700 dark:text-green-300",children:[s.jsx(ws,{className:"h-3 w-3"}),"Editing: ",m.name||"Unnamed Agent"]})})]}),s.jsx(LEe,{activeTab:o,onTabChange:U,progress:R,completedTabs:V}),s.jsx(te,{className:"glass-effect glass-effect-dark ai-glow-hover",children:s.jsx(se,{className:"p-4 sm:p-6 md:p-8",children:s.jsxs(os,{value:o,onValueChange:U,className:"w-full",children:[s.jsx(Kr,{className:`hidden md:grid w-full mb-8 bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm ${d?"grid-cols-4":"grid-cols-9"}`,children:F.map(W=>s.jsx(at,{value:W.id,className:"data-[state=active]:bg-blue-500 data-[state=active]:text-white relative text-xs",title:W.description,children:s.jsxs("div",{className:"flex items-center gap-1",children:[W.label,V.includes(W.id)&&s.jsx(Gt.div,{initial:{scale:0},animate:{scale:1},className:"w-2 h-2 bg-green-400 rounded-full"})]})},W.id))}),s.jsx("div",{className:"hidden md:flex justify-center gap-2 mb-6 flex-wrap",children:F.map(W=>s.jsx(rPe,{isComplete:V.includes(W.id),isActive:o===W.id,hasInteraction:C.visitedTabs.has(W.id),label:W.label},W.id))}),s.jsx(Ze,{value:"basics",children:s.jsx(qEe,{config:m,onConfigChange:H,knowledgeSources:x,onKnowledgeSourcesChange:w,isSimpleMode:d})}),s.jsx(Ze,{value:"branding",children:s.jsx(VEe,{config:v,onConfigChange:q})}),!d&&s.jsxs(s.Fragment,{children:[s.jsx(Ze,{value:"knowledge",children:s.jsx(N3e,{sources:x,onSourcesChange:w,smartTemplates:N,onSmartTemplatesChange:B})}),s.jsx(Ze,{value:"smart-actions",children:s.jsx(XEe,{config:_,onConfigChange:k,agentName:m.name||"Your Agent"})}),s.jsx(Ze,{value:"learning",children:s.jsx(QEe,{config:m,onConfigChange:H})}),s.jsx(Ze,{value:"security",children:s.jsx(ZEe,{config:m,onConfigChange:H})}),s.jsx(Ze,{value:"tasks",children:s.jsx(v3e,{agentId:e,smartTemplates:N})})]}),s.jsx(Ze,{value:"preview",children:s.jsx(ePe,{agentConfig:m,brandingConfig:v,smartTemplates:N,agentData:K,onAdvancedBuilder:()=>{d&&(f(!1),n({description:"Switched to Advanced Mode for full control",duration:2e3}))}})}),s.jsx(Ze,{value:"review",children:s.jsx(k3e,{agentConfig:m,brandingConfig:v,onDeploy:W=>{console.log("Agent deployed:",W),n({title:"🚀 Deployment Started",description:`${m.name} is being deployed with enterprise configuration.`,duration:4e3})}})})]})})})]})})]})};var C3e="Separator",wz="horizontal",_3e=["horizontal","vertical"],Ine=b.forwardRef((e,t)=>{const{decorative:n,orientation:r=wz,...a}=e,i=A3e(r)?r:wz,l=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return s.jsx(Ve.div,{"data-orientation":i,...l,...a,ref:t})});Ine.displayName=C3e;function A3e(e){return _3e.includes(e)}var One=Ine;const nd=b.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},a)=>s.jsx(One,{ref:a,decorative:n,orientation:t,className:He("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));nd.displayName=One.displayName;var Z1="Checkbox",[E3e]=Mr(Z1),[P3e,_R]=E3e(Z1);function T3e(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:o,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:f}=e,[m,p]=$s({prop:n,defaultProp:a??!1,onChange:c,caller:Z1}),[v,y]=b.useState(null),[x,w]=b.useState(null),N=b.useRef(!1),S=v?!!o||!!v.closest("form"):!0,_={checked:m,disabled:i,setChecked:p,control:v,setControl:y,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:N,required:u,defaultChecked:Cc(a)?!1:a,isFormControl:S,bubbleInput:x,setBubbleInput:w};return s.jsx(P3e,{scope:t,..._,children:I3e(f)?f(_):r})}var Mne="CheckboxTrigger",Rne=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:o,disabled:l,checked:c,required:u,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:m,isFormControl:p,bubbleInput:v}=_R(Mne,e),y=gt(a,d),x=b.useRef(c);return b.useEffect(()=>{const w=i==null?void 0:i.form;if(w){const N=()=>f(x.current);return w.addEventListener("reset",N),()=>w.removeEventListener("reset",N)}},[i,f]),s.jsx(Ve.button,{type:"button",role:"checkbox","aria-checked":Cc(c)?"mixed":c,"aria-required":u,"data-state":zne(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:y,onKeyDown:Oe(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Oe(n,w=>{f(N=>Cc(N)?!0:!N),v&&p&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})})});Rne.displayName=Mne;var AR=b.forwardRef((e,t)=>
1414{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:o,disabled:l,value:c,onCheckedChange:u,form:d,...f}=e;return s.jsx(T3e,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:l,required:o,onCheckedChange:u,name:r,form:d,value:c,internal_do_not_use_render:({isFormControl:m})=>s.jsxs(s.Fragment,{children:[s.jsx(Rne,{...f,ref:t,__scopeCheckbox:n}),m&&s.jsx(Fne,{__scopeCheckbox:n})]})})});AR.displayName=Z1;var Dne="CheckboxIndicator",Lne=b.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=_R(Dne,n);return s.jsx(Cr,{present:r||Cc(i.checked)||i.checked===!0,children:s.jsx(Ve.span,{"data-state":zne(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});Lne.displayName=Dne;var $ne="CheckboxBubbleInput",Fne=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:o,required:l,disabled:c,name:u,value:d,form:f,bubbleInput:m,setBubbleInput:p}=_R($ne,e),v=gt(n,p),y=v1(i),x=Qj(r);b.useEffect(()=>{const N=m;if(!N)return;const S=window.HTMLInputElement.prototype,k=Object.getOwnPropertyDescriptor(S,"checked").set,C=!a.current;if(y!==i&&k){const E=new Event("click",{bubbles:C});N.indeterminate=Cc(i),k.call(N,Cc(i)?!1:i),N.dispatchEvent(E)}},[m,y,i,a]);const w=b.useRef(Cc(i)?!1:i);return s.jsx(Ve.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??w.current,required:l,disabled:c,name:u,value:d,form:f,...t,tabIndex:-1,ref:v,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Fne.displayName=$ne;function I3e(e){return typeof e=="function"}function Cc(e){return e==="indeterminate"}function zne(e){return Cc(e)?"indeterminate":e?"checked":"unchecked"}const Bne=b.forwardRef(({className:e,...t},n)=>s.jsx(AR,{ref:n,className:He("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(Lne,{className:He("flex items-center justify-center text-current"),children:s.jsx(mo,{className:"h-4 w-4"})})}));Bne.displayName=AR.displayName;const Zv=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",O3e=e=>{const t=/((https?:\/\/|www\.)[^\s<]+[^\s<.,:;"')\]\}])/gi,n=[];let r=0,a,i=0;for(;(a=t.exec(e))!==null;){const o=a.index,l=t.lastIndex;o>r&&n.push(e.slice(r,o));const c=a[0],u=c.startsWith("http")?c:`http://${c}`;n.push(s.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 underline break-words",children:c},`link-${i++}`)),r=l}return r<e.length&&n.push(e.slice(r)),s.jsx("span",{className:"whitespace-pre-wrap break-words",children:n})},M3e=({agent:e})=>{var O;const[t,n]=b.useState([]),[r,a]=b.useState(""),[i,o]=b.useState(!1),[l,c]=b.useState(null),[u,d]=b.useState(null),[f,m]=b.useState(null),p=b.useRef(null),v=b.useRef(null),[y,x]=b.useState(!0),{toast:w}=_t(),N=()=>{var R,T;const P=(R=v.current)==null?void 0:R.querySelector("[data-radix-scroll-area-viewport]");if(P){P.scrollTo({top:P.scrollHeight,behavior:"smooth"});return}(T=p.current)==null||T.scrollIntoView({behavior:"smooth"})};b.useEffect(()=>{const P=v.current;if(!P)return;const R=P.querySelector("[data-radix-scroll-area-viewport]");if(!R)return;const T=()=>{const D=R.scrollHeight-(R.scrollTop+R.clientHeight);x(D<=80)};return T(),R.addEventListener("scroll",T,{passive:!0}),()=>R.removeEventListener("scroll",T)},[]),b.useEffect(()=>{y&&N()},[t,y]),b.useEffect(()=>{if(t.length===0){const P=`Hello! I'm ${e.name}.`,R=e.description?` ${e.description}`:` ${e.prompt}`;n([{id:"welcome",role:"assistant",content:P+R,timestamp:new Date}])}},[e,t.length]);const S=async()=>{if(!r.trim()||i)return;if(!Number.isFinite(e.id)||!Number.isInteger(e.id)){w({title:"Invalid agent",description:"Agent ID is invali
1414d — cannot query this agent.",variant:"destructive"});return}const P={id:Date.now().toString(),role:"user",content:r.trim(),timestamp:new Date};n(R=>[...R,P]),a(""),o(!0);try{const R=(Date.now()+1).toString(),T={id:R,role:"assistant",content:"",timestamp:new Date};n(D=>[...D,T]),d(R),await Pt.queryAgentStream(e.id,P.content,l||void 0,{onMeta:D=>{l||c(D.session_id)},onStatus:(D,z)=>{const I={retrieve_start:"Searching knowledge base...",retrieve_end:(z==null?void 0:z.doc_count)===0?"No relevant documents found":`Found ${(z==null?void 0:z.doc_count)??"?"} relevant documents`,generate_start:"Generating response..."};m(I[D]??D)},onToken:D=>{n(z=>z.map(I=>I.id===R?{...I,content:(I.content||"")+D}:I))},onFinal:D=>{var z;l||c(D.session_id),m(null),(z=D.results)!=null&&z.answer&&n(I=>I.map(F=>F.id===R?{...F,content:D.results.answer}:F))},onError:D=>{console.error("Streaming error:",D),n(z=>z.map(I=>I.id===R?{...I,content:`I encountered an error: ${D.message}`}:I)),m(null)},onDone:()=>{}})}catch(R){console.error("Testing error:",R);const T={id:(Date.now()+1).toString(),role:"assistant",content:`I'm sorry, I encountered an error: ${R.message||"Unknown error"}`,timestamp:new Date};n(D=>[...D,T]),w({title:"Testing Error",description:R.message||"Failed to get response from agent",variant:"destructive"})}finally{o(!1),d(null),m(null)}},_=P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),S())},k=P=>{a(P)},C=()=>{const P=`Hello! I'm ${e.name}.`,R=e.description?` ${e.description}`:` ${e.prompt}`;n([{id:"welcome",role:"assistant",content:P+R,timestamp:new Date}]),c(null)},E=((O=e.converstation_starter)==null?void 0:O.length)>0?e.converstation_starter:["Hello, how can you help me?","What services do you provide?","Can you tell me about your capabilities?","What kind of questions can I ask you?"];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center text-white font-semibold overflow-hidden",style:{backgroundColor:e.base_color||"#3B82F6"},children:Zv(e.logo)?s.jsx("img",{src:Zv(e.logo),alt:`${e.name} logo`,className:"w-full h-full object-contain bg-white/20 rounded-full p-1",onError:P=>{P.target.style.display="none";const R=P.target.parentElement;R&&(R.innerHTML=e.name.charAt(0).toUpperCase())}}):e.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1",children:[s.jsx("span",{className:"text-lg font-semibold",children:e.name}),s.jsx(le,{variant:e.is_deployed?"default":"secondary",className:"ml-2",children:e.is_deployed?"Deployed":"Draft"})]}),s.jsx(Y,{variant:"outline",size:"sm",onClick:C,children:"Clear Chat"})]})}),e.description&&s.jsx(se,{children:s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-white mb-1",children:"Description"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:e.description})]})})]}),s.jsxs(te,{className:"flex flex-col h-[500px]",children:[s.jsx(xe,{className:"pb-3 flex-shrink-0",children:s.jsxs(we,{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"flex items-center space-x-2",children:[s.jsx(ex,{className:"h-5 w-5"}),s.jsx("span",{children:"Test Agent"})]}),s.jsxs(le,{variant:"outline",className:"text-xs",children:["Session: ",l?l.slice(-8):"New"]})]})}),s.jsxs(se,{className:"flex flex-col flex-1 p-0 min-h-0",children:[s.jsx(js,{ref:v,className:"flex-1 p-4",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(ci,{children:t.map(P=>s.jsx(Gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:`flex ${P.role==="user"?"justify-end":"justify-start"}`,children:s.jsx("div",{className:`max-w-[80%] rounded-lg p-3 ${P.role==="user"?"text-white":"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100"}`,style:P.role==="user"?{backgroundColor:e.base_color||"#3B82F6"}:{},children:s.jsxs("div",{className:"flex items-start space-x-2",children:[P.role==="assistant"?s.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center text-white text-xs font-semibold mt-0.5 flex-shrink-0 overflow-hidden",style:{backgroundColor:e.base_color||"#3B82F6"},children:Zv(e.logo)?s.jsx("img",{src:Zv(e.logo),alt:"Agent",className:"w-full h-full object-contain bg-white/20 rounded-full",onError:R=>{R.target.style.display="none";const T=R.target.parentElement;T&&(T.innerHTML='<svg class="h-3 w-3" fill="currentColor" viewBox="0 0 24 24">
1414<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>')}}):s.jsx(so,{className:"h-3 w-3"})}):s.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center text-white text-xs font-semibold mt-0.5 flex-shrink-0",style:{backgroundColor:e.base_color||"#3B82F6"},children:s.jsx(li,{className:"h-3 w-3"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-sm",children:O3e(P.content)}),u===P.id&&i&&s.jsxs("div",{className:"mt-2 space-y-1",children:[f&&s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:f}),s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-500 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})]}),s.jsx("p",{className:`text-xs mt-1 ${P.role==="user"?"opacity-75":"text-gray-500 dark:text-gray-400"}`,children:P.timestamp.toLocaleTimeString()})]})]})})},P.id))}),s.jsx("div",{ref:p})]})}),s.jsx("div",{className:"border-t p-4 flex-shrink-0 bg-white dark:bg-gray-900",children:s.jsxs("div",{className:"flex space-x-2",children:[s.jsx(_e,{value:r,onChange:P=>a(P.target.value),onKeyPress:_,placeholder:"Type your message...",disabled:i,className:"flex-1"}),s.jsx(Y,{onClick:S,disabled:!r.trim()||i,size:"sm",style:{backgroundColor:e.base_color||"#3B82F6"},className:"text-white hover:opacity-90",children:i?s.jsx(kr,{className:"h-4 w-4 animate-spin"}):s.jsx(Hm,{className:"h-4 w-4"})})]})})]})]}),t.length<=1&&s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-sm",children:"Suggested Test Queries"})}),s.jsx(se,{children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:E.map((P,R)=>s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>k(P),className:"text-left justify-start h-auto p-3 whitespace-normal break-words",children:[s.jsx(di,{className:"h-3 w-3 mr-2 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-xs leading-relaxed",children:P})]},R))})})]})]})};function Une(e){if(e==null)return null;const t=Number(e);return!Number.isFinite(t)||!Number.isInteger(t)?null:t}var Hne=["PageUp","PageDown"],qne=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Vne={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Ym="Slider",[m4,R3e,D3e]=zm(Ym),[Wne]=Mr(Ym,[D3e]),[L3e,J1]=Wne(Ym),Gne=b.forwardRef((e,t)=>{const{name:n,min:r=0,max:a=100,step:i=1,orientation:o="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:d,onValueChange:f=()=>{},onValueCommit:m=()=>{},inverted:p=!1,form:v,...y}=e,x=b.useRef(new Set),w=b.useRef(0),S=o==="horizontal"?$3e:F3e,[_=[],k]=$s({prop:d,defaultProp:u,onChange:T=>{var z;(z=[...x.current][w.current])==null||z.focus(),f(T)}}),C=b.useRef(_);function E(T){const D=q3e(_,T);R(T,D)}function O(T){R(T,w.current)}function P(){const T=C.current[w.current];_[w.current]!==T&&m(_)}function R(T,D,{commit:z}={commit:!1}){const I=K3e(i),F=Y3e(Math.round((T-r)/i)*i+r,I),U=nx(F,[r,a]);k((H=[])=>{const q=U3e(H,U,D);if(G3e(q,c*i)){w.current=q.indexOf(U);const B=String(q)!==String(H);return B&&z&&m(q),B?q:H}else return H})}return s.jsx(L3e,{scope:e.__scopeSlider,name:n,disabled:l,min:r,max:a,valueIndexToChangeRef:w,thumbs:x.current,values:_,orientation:o,form:v,children:s.jsx(m4.Provider,{scope:e.__scopeSlider,children:s.jsx(m4.Slot,{scope:e.__scopeSlider,children:s.jsx(S,{"aria-disabled":l,"data-disabled":l?"":void 0,...y,ref:t,onPointerDown:Oe(y.onPointerDown,()=>{l||(C.current=_)}),min:r,max:a,inverted:p,onSlideStart:l?void 0:E,onSlideMove:l?void 0:O,onSlideEnd:l?void 0:P,onHomeKeyDown:()=>!l&&R(r,0,{commit:!0}),onEndKeyDown:()=>!l&&R(a,_.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:D})=>{if(!l){const F=Hne.includes(T.key)||T.shiftKey&&qne.includes(T.key)?10:1,U=w.
1414current,H=_[U],q=i*F*D;R(H+q,U,{commit:!0})}}})})})})});Gne.displayName=Ym;var[Kne,Yne]=Wne(Ym,{startEdge:"left",endEdge:"right",size:"width",direction:1}),$3e=b.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:i,onSlideStart:o,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=e,[f,m]=b.useState(null),p=gt(t,S=>m(S)),v=b.useRef(void 0),y=Md(a),x=y==="ltr",w=x&&!i||!x&&i;function N(S){const _=v.current||f.getBoundingClientRect(),k=[0,_.width],E=ER(k,w?[n,r]:[r,n]);return v.current=_,E(S-_.left)}return s.jsx(Kne,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:s.jsx(Xne,{dir:y,"data-orientation":"horizontal",...d,ref:p,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:S=>{const _=N(S.clientX);o==null||o(_)},onSlideMove:S=>{const _=N(S.clientX);l==null||l(_)},onSlideEnd:()=>{v.current=void 0,c==null||c()},onStepKeyDown:S=>{const k=Vne[w?"from-left":"from-right"].includes(S.key);u==null||u({event:S,direction:k?-1:1})}})})}),F3e=b.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:i,onSlideMove:o,onSlideEnd:l,onStepKeyDown:c,...u}=e,d=b.useRef(null),f=gt(t,d),m=b.useRef(void 0),p=!a;function v(y){const x=m.current||d.current.getBoundingClientRect(),w=[0,x.height],S=ER(w,p?[r,n]:[n,r]);return m.current=x,S(y-x.top)}return s.jsx(Kne,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:s.jsx(Xne,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:y=>{const x=v(y.clientY);i==null||i(x)},onSlideMove:y=>{const x=v(y.clientY);o==null||o(x)},onSlideEnd:()=>{m.current=void 0,l==null||l()},onStepKeyDown:y=>{const w=Vne[p?"from-bottom":"from-top"].includes(y.key);c==null||c({event:y,direction:w?-1:1})}})})}),Xne=b.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:i,onHomeKeyDown:o,onEndKeyDown:l,onStepKeyDown:c,...u}=e,d=J1(Ym,n);return s.jsx(Ve.span,{...u,ref:t,onKeyDown:Oe(e.onKeyDown,f=>{f.key==="Home"?(o(f),f.preventDefault()):f.key==="End"?(l(f),f.preventDefault()):Hne.concat(qne).includes(f.key)&&(c(f),f.preventDefault())}),onPointerDown:Oe(e.onPointerDown,f=>{const m=f.target;m.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(m)?m.focus():r(f)}),onPointerMove:Oe(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&a(f)}),onPointerUp:Oe(e.onPointerUp,f=>{const m=f.target;m.hasPointerCapture(f.pointerId)&&(m.releasePointerCapture(f.pointerId),i(f))})})}),Qne="SliderTrack",Zne=b.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=J1(Qne,n);return s.jsx(Ve.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});Zne.displayName=Qne;var p4="SliderRange",Jne=b.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=J1(p4,n),i=Yne(p4,n),o=b.useRef(null),l=gt(t,o),c=a.values.length,u=a.values.map(m=>nre(m,a.min,a.max)),d=c>1?Math.min(...u):0,f=100-Math.max(...u);return s.jsx(Ve.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:l,style:{...e.style,[i.startEdge]:d+"%",[i.endEdge]:f+"%"}})});Jne.displayName=p4;var g4="SliderThumb",ere=b.forwardRef((e,t)=>{const n=R3e(e.__scopeSlider),[r,a]=b.useState(null),i=gt(t,l=>a(l)),o=b.useMemo(()=>r?n().findIndex(l=>l.ref.current===r):-1,[n,r]);return s.jsx(z3e,{...e,ref:i,index:o})}),z3e=b.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...i}=e,o=J1(g4,n),l=Yne(g4,n),[c,u]=b.useState(null),d=gt(t,N=>u(N)),f=c?o.form||!!c.closest("form"):!0,m=Qj(c),p=o.values[r],v=p===void 0?0:nre(p,o.min,o.max),y=H3e(r,o.values.length),x=m==null?void 0:m[l.size],w=x?V3e(x,v,l.direction):0;return b.useEffect(()=>{if(c)return o.thumbs.add(c),()=>{o.thumbs.delete(c)}},[c,o.thumbs]),s.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${v}% + ${w}px)`},children:[s.jsx(m4.ItemSlot,{scope:e.__scopeSlider,children:s.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||y,"aria-valuemin":o.min,"aria-valuenow":p,"aria-valuemax":o.max,"aria-orientation":o.orientation,"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,tabIndex:o.disabled?void 0:0,...i,ref:d,style:p===void 0?{display:"none"}:e.style,onFocus:Oe(e.onFocus,()=>{o.valueIndexToChangeRef.current=r})})}),f&&s.jsx(tre,{name:a??(o.name?o.name+(o.values.length>1?"[]":""):void 0),form:o.form,value:p},r)]})});ere.displayName=g4;var B3e="RadioBubbleInput",tre=b.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const a=b.useRef(null),i=gt(a,r),o=v1(t);return b.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&d){const f=new Event("input",{bubbles:!0});d.call(l,t),l.dispatchEvent(f)}},[o,t]),s.jsx(Ve.input,{style:{display:"none"},...n,ref:i,defaultValue:t})});tre.displayName=B3e;function U3e(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,i)=>a-i)}function nre(e,t,n){const i=100/(n-t)*(e-t);return nx(i,[0,100])}function H3e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function q3e(e,t){if(e.length===1)return 0;const n=e.map(a=>
1414Math.abs(a-t)),r=Math.min(...n);return n.indexOf(r)}function V3e(e,t,n){const r=e/2,i=ER([0,50],[0,r]);return(r-i(t)*n)*n}function W3e(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function G3e(e,t){if(t>0){const n=W3e(e);return Math.min(...n)>=t}return!0}function ER(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function K3e(e){return(String(e).split(".")[1]||"").length}function Y3e(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var rre=Gne,X3e=Zne,Q3e=Jne,Z3e=ere;const PR=b.forwardRef(({className:e,...t},n)=>s.jsxs(rre,{ref:n,className:He("relative flex w-full touch-none select-none items-center",e),...t,children:[s.jsx(X3e,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:s.jsx(Q3e,{className:"absolute h-full bg-primary"})}),s.jsx(Z3e,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));PR.displayName=rre.displayName;const J3e=({config:e,onConfigChange:t})=>{const[n,r]=b.useState(""),[a,i]=b.useState(""),o=b.useRef(null),l=b.useRef(null),{can:c}=Vc(),u=qt(),{toast:d}=_t(),f=c("can_require_login"),m=N=>{t({allowed_users:e.allowed_users.filter(S=>S!==N)})},p=N=>{t({allowed_domains:e.allowed_domains.filter(S=>S!==N)})},v=()=>{const N=n.split(/[,\n]/).map(S=>S.trim().toLowerCase()).filter(S=>S&&S.includes("@")&&!e.allowed_users.includes(S));N.length>0&&(t({allowed_users:[...e.allowed_users,...N]}),r(""))},y=()=>{const N=a.split(/[,\n]/).map(S=>S.trim().toLowerCase()).filter(S=>S&&!S.includes("@")&&!e.allowed_domains.includes(S));N.length>0&&(t({allowed_domains:[...e.allowed_domains,...N]}),i(""))},x=(N,S)=>{const _=new FileReader;_.onload=k=>{var O;const C=(O=k.target)==null?void 0:O.result;if(!C)return;const E=C.split(/[,\n]/).map(P=>P.trim().toLowerCase()).filter(P=>P.length>0);if(S==="users"){const P=E.filter(R=>R.includes("@")&&!e.allowed_users.includes(R));P.length>0&&t({allowed_users:[...e.allowed_users,...P]})}else{const P=E.filter(R=>!R.includes("@")&&!e.allowed_domains.includes(R));P.length>0&&t({allowed_domains:[...e.allowed_domains,...P]})}},_.readAsText(N)},w=(N,S)=>{var k;const _=(k=N.target.files)==null?void 0:k[0];_&&x(_,S),N.target.value=""};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:`relative ${f?"":"min-h-[200px]"}`,children:[!f&&s.jsx("div",{className:"absolute inset-0 z-20 bg-background/60 backdrop-blur-[2px] flex items-center justify-center rounded-lg transition-all duration-300",children:s.jsxs("div",{className:"text-center p-6 bg-card border shadow-lg rounded-xl transform scale-100 opacity-100 transition-all duration-300",children:[s.jsx(ii,{className:"h-10 w-10 text-yellow-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:"Premium Feature"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[200px] mx-auto",children:"Upgrade your plan to enable login protection for your agents."}),s.jsx(Y,{onClick:()=>u("/pricing"),className:"bg-gradient-to-r from-yellow-500 to-orange-500 text-white border-0",children:"Upgrade Now"})]})}),s.jsxs("div",{className:`flex items-center justify-between p-4 rounded-lg border border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-900/50 ${f?"":"op
1414acity-40 pointer-events-none filter blur-[2px] select-none"}`,children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("div",{className:"w-10 h-10 bg-gradient-to-r from-blue-500 to-blue-600 rounded-full flex items-center justify-center",children:s.jsx(ur,{className:"h-5 w-5 text-white"})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"font-semibold",children:"Require Login"}),!f&&s.jsx(le,{variant:"outline",className:"text-[10px] h-5 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:()=>u("/pricing"),children:"Upgrade"})]}),s.jsx("div",{className:"text-sm text-muted-foreground",children:e.login_required?"Only authenticated users can access this agent":"Anyone can access this agent (public)"})]})]}),s.jsx("div",{onClick:()=>{f||d({title:"Premium Feature",description:"Upgrade your plan to enable login protection for your agents.",action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>u("/pricing"),children:"Upgrade"})})},children:s.jsx(Dt,{checked:e.login_required,disabled:!f,onCheckedChange:N=>{t({login_required:N})}})})]})]}),e.login_required&&s.jsx("div",{className:"p-4 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Qs,{className:"h-5 w-5 text-blue-600 dark:text-blue-400 mt-0.5"}),s.jsxs("div",{className:"text-sm text-blue-800 dark:text-blue-200",children:[s.jsx("p",{className:"font-medium mb-1",children:"How access control works:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[s.jsx("li",{children:"If no allowlists are set, any logged-in user can access"}),s.jsx("li",{children:"If allowlists are set, only users matching the criteria can access"}),s.jsx("li",{children:"Email matching is case-insensitive"}),s.jsx("li",{children:"Domain matching applies to the entire email domain (e.g., @company.com)"})]})]})]})}),e.login_required&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(Aa,{className:"h-4 w-4"}),"Allowed Email Addresses"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"file",ref:o,className:"hidden",accept:".csv,.txt",onChange:N=>w(N,"users")}),s.jsxs(Y,{variant:"outline",size:"sm",className:"h-8 gap-1",onClick:()=>{var N;return(N=o.current)==null?void 0:N.click()},children:[s.jsx(Js,{className:"h-3.5 w-3.5"}),"Load CSV"]})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Add specific email addresses that can access this agent. Leave empty to allow all authenticated users."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Ds,{value:n,onChange:N=>r(N.target.value),placeholder:"[email protected], [email protected] (one per line or comma-separated)",rows:3,className:"flex-1",onKeyDown:N=>{N.key==="Enter"&&(N.ctrlKey||N.metaKey)&&(N.preventDefault(),v())}}),s.jsx(Y,{onClick:v,disabled:!n.trim(),variant:"outline",className:"self-start",children:"Add"})]}),e.allowed_users.length>0&&s.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:e.allowed_users.map(N=>s.jsxs(le,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[s.jsx(Aa,{className:"h-3 w-3"}),N,s.jsx("button",{onClick:()=>m(N),className:"ml-1 hover:bg-gray-300 dark:hover:bg-gray-700 rounded-full p-0.5",children:s.jsx(jr,{className:"h-3 w-3"})})]},N))})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(bs,{className:"h-4 w-4"}),"Allowed Email Domains"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("input",{type:"file",ref:l,className:"hidden",accept:".csv,.txt",onChange:N=>w(N,"domains")}),s.jsxs(Y,{variant:"outline",size:"sm",className:"h-8 gap-1",onClick:()=>{var N;return(N=l.current)==null?void 0:N.click()},children:[s.jsx(Js,{className:"h-3.5 w-3.5"}),"Load CSV"]})]})]}),s.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:"Add email domains (e.g., company.com) to allow all users from those domains. Leave empty to allow all authenticated users."}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Ds,{value:a,onChange:N=>i(N.target.value),placeholder:"company.com, partner.com (one per line or comma-separated)",rows:3,className:"flex-1",onKeyDown:N=>
1414{N.key==="Enter"&&(N.ctrlKey||N.metaKey)&&(N.preventDefault(),y())}}),s.jsx(Y,{onClick:y,disabled:!a.trim(),variant:"outline",className:"self-start",children:"Add"})]}),e.allowed_domains.length>0&&s.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:e.allowed_domains.map(N=>s.jsxs(le,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[s.jsx(bs,{className:"h-3 w-3"}),"@",N,s.jsx("button",{onClick:()=>p(N),className:"ml-1 hover:bg-gray-300 dark:hover:bg-gray-700 rounded-full p-0.5",children:s.jsx(jr,{className:"h-3 w-3"})})]},N))})]}),e.allowed_users.length>0||e.allowed_domains.length>0?s.jsx("div",{className:"p-4 bg-green-50 dark:bg-green-950/30 rounded-lg border border-green-200 dark:border-green-800",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Bn,{className:"h-5 w-5 text-green-600 dark:text-green-400 mt-0.5"}),s.jsxs("div",{className:"text-sm text-green-800 dark:text-green-200",children:[s.jsx("p",{className:"font-medium mb-1",children:"Access Summary:"}),s.jsxs("ul",{className:"list-disc list-inside space-y-1 ml-2",children:[e.allowed_users.length>0&&s.jsxs("li",{children:[e.allowed_users.length," specific email",e.allowed_users.length!==1?"s":""," allowed"]}),e.allowed_domains.length>0&&s.jsxs("li",{children:[e.allowed_domains.length," domain",e.allowed_domains.length!==1?"s":""," allowed"]}),s.jsx("li",{children:"Users matching either criteria will have access"})]})]})]})}):s.jsx("div",{className:"p-4 bg-amber-50 dark:bg-amber-950/30 rounded-lg border border-amber-200 dark:border-amber-800",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Qs,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5"}),s.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[s.jsx("p",{className:"font-medium",children:"No restrictions set"}),s.jsx("p",{children:"Any authenticated user can access this agent."})]})]})})]})]})},e5e=e=>{const t=(e||"").toLowerCase();return t.includes("openai")?"https://cdn.simpleicons.org/openai/412991":t.includes("anthropic")||t.includes("claude")?"https://cdn.simpleicons.org/anthropic/000000":t.includes("google")||t.includes("gemini")?"https://cdn.simpleicons.org/google/4285F4":t.includes("groq")?"https://groq.com/wp-content/uploads/2024/03/PBG-mark1-color.svg":t.includes("azure")||t.includes("microsoft")?"https://cdn.simpleicons.org/microsoftazure/0078D4":t.includes("meta")||t.includes("llama")?"https://cdn.simpleicons.org/meta/0668E1":t.includes("mistral")?"https://mistral.ai/images/logo_hubc88c4ece131b91c7cb753f40e9e1cc5_2589_256x0_resize_q97_h2_lanczos_3.webp":t.includes("cohere")?"https://cdn.simpleicons.org/cohere/000000":t.includes("ollama")?"https://cdn.simpleicons.org/ollama/000000":""},Jv=({provider:e,className:t="h-4 w-4"})=>{const n=e5e(e),[r,a]=b.useState(!1);return!n||r?s.jsx(Gwe,{className:t}):s.jsx("img",{src:n,alt:`${e} logo`,className:`${t} object-contain`,onError:()=>a(!0)})},t5e=({formData:e,setFormData:t,availableModels:n,isCreationMode:r,formatProviderName:a,newConversationStarter:i,setNewConversationStarter:o,addConversationStarter:l,removeConversationStarter:c,setHasUnsavedChanges:u,activeTab:d,onTabChange:f})=>{var T,D,z;const{can:m}=Vc(),p=qt(),{toast:v}=_t(),y=m("can_webhooks"),x=m("can_send_summary_emails"),[w,N]=b.useState(!1),[S,_]=b.useState(!1),[k,C]=b.useState(""),E=b.useRef(null),[O,P]=b.useState(e.name);b.useEffect(()=>{var I;if(E.current&&clearTimeout(E.current),!((I=e.name)!=null&&I.trim())){N(!1),_(!1),C("");return}return _(!0),E.current=window.setTimeout(async()=>{const F=e.name.trim(),U=F.toLowerCase(),H=O.trim().toLowerCase(),q=k.trim().toLowerCase();try{const B=await Pt.validateAgentName(U);N(B.exists),B.exists&&U!==q&&U!==H?(v({title:"Duplicate Name",description:B.message||"You cannot create 2 agents with the same name",variant:"destructive"}),C(F)):B.exists||C("")}catch(B){console.error("Error validating name:",B),N(!1)}finally{F===e.name.trim()&&_(!1)}},400),()=>{E.current&&clearTimeout(E.current)}},[e.name,k,v,O]);const R=I=>{v({title:"Premium Feature",description:`Upgrade your plan to enable ${I}.`,action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>p("/pricing"),children:"Upgrade"})})};return s.jsxs(os,{defaultValue:"config",value:d,onValueChange:f,className:"w-full space-y-4",children:[s.jsxs(Kr,{className:"w-full justify-start h-auto flex-wrap p-0 bg-transparent gap-2 border-0",children:[s.jsxs(at,{value:"config",className:"flex items-center gap-2 text-white/60 hover:text-white hover:bg-white/5 data-[state=active]:bg-white/10 data-[state=active]:text-white",children:[s.jsx(Kt,{className:"h-4 w-4"}),s.jsx("span",{children:"Configuration"})]}),s.jsxs(at,{value:"purpose",className:"flex items-center gap-2 text-white/60 hover:text-white hover:bg-white/5 data-[state=active]:bg-white/10 data-[state=active]:text-white",children:[s.jsx(rn,{className:"h-4 w-4"}),s.jsx("span",{children:"Purpose & Instructions"})]}),s.jsxs(at,{value:"business",className:"flex items-center gap-2 text-white/60 hover:text-white hover:bg-white/5 data-[state=active]:bg-white/10 data-[state=active]:text-white",children:[s.jsx(ws,{className:"h-4 w-4"}),s.jsx("span",{children:"Business & Flows"})]}),s.jsxs(at,{value:"access",className:"flex items-center gap-2 text-white/60 hover:text-white hover:bg-white/5 data-[state=active]:bg-white/10 data-[state=active]:text-white",children:[s.jsx(ur,{className:"h-4 w-4"}),s.jsx("span",{children:"Access Permissions"})]})]}),s.jsx(Ze,{value:"config",className:"border rounded-lg p-6 bg-card space-y-4 mt
1414-2",children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs(de,{htmlFor:"name",children:["Agent Name *",S&&s.jsx("span",{className:"ml-2 text-xs text-blue-500",children:"Checking..."})]}),s.jsx(_e,{id:"name",value:e.name,onChange:I=>{t(F=>({...F,name:I.target.value})),u(!0)},placeholder:"Enter agent name",required:!0,className:w&&e.name.trim().toLowerCase()!==O.trim().toLowerCase()?"border-red-500 focus-visible:ring-red-500":""}),w&&e.name.trim().toLowerCase()!==O.trim().toLowerCase()&&s.jsx("p",{className:"text-xs text-red-500 mt-1",children:"You cannot create 2 agents with the same name."})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"description",children:"Description *"}),s.jsx(Ds,{id:"description",value:e.description,onChange:I=>t(F=>({...F,description:I.target.value})),placeholder:"A brief description of the agent's purpose and capabilities.",rows:6,required:!0})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"input_text_hint",children:"Input Text Hint"}),s.jsx(_e,{id:"input_text_hint",value:e.input_text_hint,onChange:I=>t(F=>({...F,input_text_hint:I.target.value})),placeholder:"An example of how users might interact with the agent."})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"llm_model",children:"Language Model *"}),s.jsxs(dt,{value:((T=e.llm_model_id)==null?void 0:T.toString())||"",onValueChange:I=>t(F=>({...F,llm_model_id:I?parseInt(I):null})),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select language model",children:e.llm_model_id&&(()=>{const I=n.llm.find(F=>F.id===e.llm_model_id);if(I)return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Jv,{provider:I.provider,className:"h-4 w-4"}),s.jsxs("span",{children:[I.name," (",a(I.provider),")"]})]})})()})}),s.jsx(lt,{children:n.llm.map(I=>s.jsx(me,{value:I.id.toString(),children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Jv,{provider:I.provider,className:"h-4 w-4"}),s.jsxs("span",{children:[I.name," (",a(I.provider),")"]})]})},I.id))})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"embedding_model",children:"Embedding Model *"}),s.jsxs(dt,{value:((D=e.embedding_model_id)==null?void 0:D.toString())||"",onValueChange:I=>t(F=>({...F,embedding_model_id:I?parseInt(I):null})),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select embedding model",children:e.embedding_model_id&&(()=>{const I=n.embedding.find(F=>F.id===e.embedding_model_id);if(I)return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Jv,{provider:I.provider,className:"h-4 w-4"}),s.jsxs("span",{children:[I.name," (",a(I.provider),")"]})]})})()})}),s.jsx(lt,{children:n.embedding.map(I=>s.jsx(me,{value:I.id.toString(),children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Jv,{provider:I.provider,className:"h-4 w-4"}),s.jsxs("span",{children:[I.name," (",a(I.provider),")"]})]})},I.id))})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"communication_style",children:"Communication Style"}),s.jsxs(dt,{value:e.communication_style,onValueChange:I=>t(F=>({...F,communication_style:I}
1414)),children:[s.jsx(ot,{children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"formal",children:"Formal"}),s.jsx(me,{value:"informal",children:"Informal"}),s.jsx(me,{value:"concise",children:"Concise"}),s.jsx(me,{value:"detailed",children:"Detailed"})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(de,{children:"Conversation Starters"}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:[e.converstation_starter.length,"/4"]}),!r&&s.jsx(le,{variant:"secondary",className:"text-xs",children:"Auto-saved"})]})]}),s.jsxs("div",{className:"flex space-x-2",children:[s.jsx(_e,{value:i,onChange:I=>o(I.target.value),placeholder:"Add a conversation starter...",onKeyPress:I=>I.key==="Enter"&&l(),disabled:e.converstation_starter.length>=4}),s.jsx(Y,{onClick:l,size:"sm",disabled:e.converstation_starter.length>=4||!i.trim(),children:s.jsx(Fn,{className:"h-4 w-4"})})]}),s.jsx("div",{className:"space-y-2",children:e.converstation_starter.map((I,F)=>s.jsxs("div",{className:"flex items-center justify-between p-3 dark:bg-gray-800 rounded-lg",children:[s.jsx("span",{className:"text-sm",children:I}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>c(F),children:s.jsx(jr,{className:"h-4 w-4"})})]},F))})]}),s.jsx(nd,{}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{className:"flex items-center justify-between",children:s.jsxs("div",{className:"space-y-0.5 flex-1",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(de,{className:"text-base",children:"Creativity"})}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Adjust the creativity level of the agent's responses. Higher values produce more diverse and unexpected outputs."})]})}),s.jsxs("div",{className:"space-y-3 pl-4 border-l-2 border-primary/20",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm font-medium",children:"Creativity Level"}),s.jsx("span",{className:"text-sm font-mono tabular-nums text-muted-foreground",children:((z=e.temperature)==null?void 0:z.toFixed(1))??"0.7"})]}),s.jsx(PR,{value:[e.temperature??.7],min:.1,max:2,step:.1,onValueChange:([I])=>{t(F=>({...F,temperature:Math.round(I*10)/10})),u(!0)}}),s.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[s.jsx("span",{children:"0.1 (Precise)"}),s.jsx("span",{children:"2.0 (Creative)"})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Temperature controls the randomness of the model's output. Range: 0.1 - 2.0."})]})]})]})}),s.jsx(Ze,{value:"purpose",className:"border rounded-lg p-6 bg-card mt-2",children:s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx(de,{htmlFor:"prompt",children:"Agent Purpose & Instructions *"}),s.jsx(tR,{currentPurpose:e.prompt,onPurposeChange:I=>t(F=>({...F,prompt:I}))}),s.jsx(Ds,{id:"prompt",value:e.prompt,onChange:I=>t(F=>({...F,prompt:I.target.value})),placeholder:"Describe what this agent should do...",rows:22,required:!0})]})})}),s.jsxs(Ze,{value:"business",className:`border rounded-lg p-6 bg-card mt-2 relative ${!y&&!x?"min-h-[250px]":""}`,children:[!y&&!x&&s.jsx("div",{className:"absolute inset-0 z-20 bg-background/60 backdrop-blur-[2px] flex items-center justify-center rounded-lg transition-all duration-300",children:s.jsxs("div",{className:"text-center p-6 bg-card border shadow-lg rounded-xl transform scale-100 opacity-100 transition-all duration-300",children:[s.jsx(ii,{className:"h-10 w-10 text-yellow-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:"Premium Feature"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[200px] mx-auto",children:"Upgrade your plan to unlock email reports and webhook integrations."}),s.jsx(Y,{onClick:()=>p("/pricing"),className:"bg-gradient-to-r from-yellow-500 to-orange-500 text-white border-0",children:"Upgrade Now"})]})}),s.jsxs("div",{className:!y&&!x?"opacity-40 pointer-events-none filter blur-[2px] select-none space-y-6":"space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(de,{htmlFor:"summary_email_sent",className:"text-base",children:"Enable Email Reports"}),!x&&s.jsx(le,{variant:"outline",className:"text-[10px] h-5 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:()=>p("/pricing"),children:"Upgrade"})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Send summary reports to you via email after each conversation when users provide their contact information."})]}),s.jsx("div",{onClick:()=>!x&&R("Email Reports"),children:s.jsx(Dt,{id:"summary_email_sent",checked:e.summary_email_sent,disabled:!x,onCheckedChange:I=>t(F=>({...F,summary_email_sent:I}
1414))})})]}),e.summary_email_sent&&s.jsxs("div",{className:"space-y-2 pl-4 border-l-2 border-primary/20",children:[s.jsx(de,{htmlFor:"summary_email_sent_to",children:"Custom Email Address (Optional)"}),s.jsx(_e,{id:"summary_email_sent_to",type:"email",value:e.summary_email_sent_to,onChange:I=>t(F=>({...F,summary_email_sent_to:I.target.value})),placeholder:"[email protected]"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave empty to use your account email address."})]})]}),s.jsx(nd,{}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(de,{htmlFor:"webhook_enabled",className:"text-base",children:"Enable Webhook Integration"}),!y&&s.jsx(le,{variant:"outline",className:"text-[10px] h-5 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 cursor-pointer",onClick:()=>p("/pricing"),children:"Upgrade"})]}),e.webhook_last_status&&s.jsxs(le,{variant:"outline",className:`ml-2 ${e.webhook_last_status>=200&&e.webhook_last_status<300?"bg-green-100 text-green-800 border-green-200 dark:bg-green-900/30 dark:text-green-300 dark:border-green-800":"bg-red-100 text-red-800 border-red-200 dark:bg-red-900/30 dark:text-red-300 dark:border-red-800"}`,children:[e.webhook_last_status>=200&&e.webhook_last_status<300?"Success":"Error"," (",e.webhook_last_status,")"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Send conversation summaries to your custom API endpoint for integration with your systems."})]}),s.jsx("div",{onClick:()=>!y&&R("Webhook Integration"),children:s.jsx(Dt,{id:"webhook_enabled",checked:e.webhook_enabled,disabled:!y,onCheckedChange:I=>t(F=>({...F,webhook_enabled:I}))})})]}),e.webhook_enabled&&s.jsxs("div",{className:"space-y-4 pl-4 border-l-2 border-primary/20",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"webhook_url",className:"text-sm font-medium",children:"Webhook URL *"}),s.jsx(_e,{id:"webhook_url",type:"url",value:e.webhook_url,onChange:I=>t(F=>({...F,webhook_url:I.target.value})),placeholder:"https://api.example.com/webhooks/conversations",required:e.webhook_enabled}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"The endpoint where conversation data will be sent."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"webhook_method",className:"text-sm font-medium",children:"HTTP Method"}),s.jsxs(dt,{value:e.webhook_method,onValueChange:I=>t(F=>({...F,webhook_method:I})),children:[s.jsx(ot,{id:"webhook_method",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"POST",children:"POST"}),s.jsx(me,{value:"PUT",children:"PUT"}),s.jsx(me,{value:"PATCH",children:"PATCH"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"The HTTP method to use when sending data to your endpoint."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(de,{className:"text-sm font-medium",children:"Custom Headers (Optional)"}),s.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>{t(I=>({...I,webhook_headers:[...I.webhook_headers,{key:"",value:""}]}))},className:"h-8",children:[s.jsx(Fn,{className:"h-3 w-3 mr-1"}),"Add Header"]})]}),e.webhook_headers.length>0&&s.jsx("div",{className:"space-y-2",children:e.webhook_headers.map((I,F)=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(_e,{placeholder:"Header name (e.g., Authorization)",value:I.key,onChange:U=>{const H=[...e.webhook_headers];H[F].key=U.target.value,t(q=>({...q,webhook_headers:H}))},className:"flex-1"}),s.jsx(_e,{placeholder:"Header value (e.g., Bearer token123)",value:I.value,onChange:U=>{const H=[...e.webhook_headers];H[F].value=U.target.value,t(q=>({...q,webhook_headers:H}))},className:"flex-1",type:"password"}),s.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>{const U=e.webhook_headers.filter((H,q)=>q!==F);t(H=>({...H,webhook_headers:U}))},className:"shrink-0",children:s.jsx(jr,{className:"h-4 w-4"})})]},F))}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Add authentication tokens, API keys, or other custom headers required by your endpoint."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"webhook_custom_body",className:"text-sm font-medium",children:"Custom Body (Optional)"}),s.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"Define a custom JSON body for your webhook. Use the variables below to insert dynamic content."}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:["VISITOR_NAME","VISITOR_MAIL","VISITOR_PHONE","VISITOR_INTEREST","VISITOR_INTENT","EXTRA_NOTES","CONVERSATION_ID"].map(I=>s.jsx(le,{variant:"outline",className:"cursor-pointer hover:bg-primary/10 transition-colors",onClick:()=>{const F=document.getElementById("webhook_custom_body");if(F){const U=F.selectionStart,H=F.selectionEnd,q=e.webhook_custom_body,B=q.substring(0,U),L=q.substring(H,q.length),V=`{{${I}}}`,K=B+V+L;t(W=>({...W,webhook_custom_body:K})),setTimeout(()=>{F.focus(),F.setSelectionRange(U+V.length,U+V.length)},0)}else t(U=>({...U,webhook_custom_body:U.webhook_custom_body+`{{${I}}}`}))},children:I},I))}),s.jsx(Ds,{id:"webhook_custom_body",value:e.webhook_custom_body,onChange:I=>t(F=>({...F,webhook_custom_body:I.target.value})),placeholder:`{
1415  "name": "{{VISITOR_NAME}}",
1416  "email": "{{VISITOR_MAIL}}",
1417  "message": "User interested in {{VISITOR_INTEREST}}"
1418}`,className:"font-mono text-xs min-h-[150px]"})]})]})]}),s.jsx(nd,{}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"space-y-0.5 flex-1",children:[s.jsx("div",{className:"flex items-center gap-2",children:s.jsx(de,{htmlFor:"mcp_enabled",className:"text-base",children:"Enable MCP (Model Context Protocol)"})}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Connect your agent to MCP servers to extend its capabilities with external tools and apps."})]}),s.jsx(Dt,{id:"mcp_enabled",checked:e.mcp_enabled,onCheckedChange:I=>{t(F=>({...F,mcp_enabled:I})),u(!0)}})]}),e.mcp_enabled&&s.jsxs("div",{className:"space-y-3 pl-4 border-l-2 border-primary/20",children:[e.mcp_servers.map((I,F)=>s.jsxs("div",{className:"space-y-3 p-4 border rounded-lg bg-background/50",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-sm font-medium text-muted-foreground",children:["Server ",F+1]}),s.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t(U=>({...U,mcp_servers:U.mcp_servers.filter((H,q)=>q!==F)})),u(!0)},children:s.jsx(jr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(de,{className:"text-xs",children:"Name *"}),s.jsx(_e,{placeholder:"e.g. crm_server",value:I.name,onChange:U=>{const H=U.target.value.replace(/\s/g,"_");t(q=>({...q,mcp_servers:q.mcp_servers.map((B,L)=>L===F?{...B,name:H}:B)})),u(!0)}}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Unique identifier, no spaces (e.g. crm_server)"})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsx(de,{className:"text-xs",children:"URL *"}),s.jsx(_e,{type:"url",placeholder:"https://mcp.example.com/sse",value:I.url,onChange:U=>{t(H=>({...H,mcp_servers:H.mcp_servers.map((q,B)=>B===F?{...q,url:U.target.value}:q)})),u(!0)}})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(de,{className:"text-xs",children:"Headers (Optional)"}),s.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:()=>{t(U=>({...U,mcp_servers:U.mcp_servers.map((H,q)=>q===F?{...H,headers:[...H.headers,{key:"",value:""}]}
1418:H)})),u(!0)},className:"h-7 text-xs",children:[s.jsx(Fn,{className:"h-3 w-3 mr-1"}),"Add Header"]})]}),I.headers.map((U,H)=>s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(_e,{placeholder:"e.g. Authorization",value:U.key,onChange:q=>{t(B=>({...B,mcp_servers:B.mcp_servers.map((L,V)=>V===F?{...L,headers:L.headers.map((K,W)=>W===H?{...K,key:q.target.value}:K)}:L)})),u(!0)},className:"flex-1"}),s.jsx(_e,{placeholder:"e.g. Bearer token123",value:U.value,onChange:q=>{t(B=>({...B,mcp_servers:B.mcp_servers.map((L,V)=>V===F?{...L,headers:L.headers.map((K,W)=>W===H?{...K,value:q.target.value}:K)}:L)})),u(!0)},className:"flex-1",type:"password"}),s.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>{t(q=>({...q,mcp_servers:q.mcp_servers.map((B,L)=>L===F?{...B,headers:B.headers.filter((V,K)=>K!==H)}:B)})),u(!0)},className:"shrink-0",children:s.jsx(jr,{className:"h-4 w-4"})})]},H))]})]},F)),s.jsxs(Y,{type:"button",variant:"outline",size:"sm",disabled:e.mcp_servers.length>=10,onClick:()=>{t(I=>({...I,mcp_servers:[...I.mcp_servers,{name:"",url:"",headers:[]}]})),u(!0)},className:"w-full",children:[s.jsx(Fn,{className:"h-4 w-4 mr-2"}),"Add Server",e.mcp_servers.length>0?` (${e.mcp_servers.length}/10)`:""]}),e.mcp_servers.length===0&&s.jsx("p",{className:"text-xs text-amber-500",children:"At least one MCP server is required when MCP is enabled."})]})]})]})]}),s.jsx(Ze,{value:"access",className:"border rounded-lg p-6 bg-card mt-2",children:s.jsx(J3e,{config:{login_required:e.login_required,allowed_users:e.allowed_users,allowed_domains:e.allowed_domains},onConfigChange:I=>{t(F=>({...F,...I})),u(!0)}})})]})},jz=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",n5e=e=>{switch(e){case"web":return{icon:Zs,label:"Web Page",color:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300"};case"youtube":return{icon:Vr,label:"YouTube Video",color:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};case"file":default:return{icon:rn,label:"File",color:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}}},r5e=e=>{switch((e||"").toLowerCase()){case"processed":case"complete":case"completed":return{label:"Complete",color:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300"};case"processing":case"in_progress":case"uploading":case"queued":return{label:"In Progress",color:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300"};case"failed":case"error":return{label:"Failed",color:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300"};default:return{label:e||"Unknown",color:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300"}}},Nz=e=>{switch(e){case"daily":return"Daily";case"weekly":return"Weekly";case"monthly":return"Monthly";case"dont_refetch":case"none":default:return null}},eb=e=>{const t={};return e.forEach(n=>{n.key&&n.value&&(t[n.key]=n.value)}),t},tb=e=>e?Object.entries(e).map(([t,n])=>({key:t,value:n})):[],s5e=({onUpload:e,onUploadWebPage:t,onUploadYouTube:n,isUploading:r})=>{const[a,i]=b.useState(!1),[o,l]=b.useState("files"),[c,u]=b.useState(""),[d,f]=b.useState(""),[m,p]=b.useState(!1),[v,y]=b.useState(10),[x,w]=b.useState("dont_refetch"),N=b.useRef(null),S=async P=>{if(!P||P.length===0)return;const R=Array.from(P);try{await e(R)}finally{if(N.current)N.current.value="";else{const T=document.getElementById("knowledge-file-upload");T&&(T.value="")}}},_=P=>{P.preventDefault(),i(!1),S(P.dataTransfer.files)},k=P=>{P.preventDefault(),i(!0)},C=P=>{P.preventDefault(),i(!1)},E=async P=>{P.preventDefault(),c.trim()&&(await t(c.trim(),m,v,x),u(""),p(!1),y(10),w("dont_refetch"))},O=async P=>{P.preventDefault(),d.trim()&&(await n(d.trim()),f(""))};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex space-x-1 bg-muted p-1 rounded-lg",children:[s.jsxs("button",{onClick:()=>l("files"),className:`flex-1 py-2 px-3 text-sm font-medium rounded-md transition-colors ${o==="files"?"bg-primary/10 text-primary shadow-sm":"text-muted-foreground hover:text-primary hover:bg-primary/5"}`,children:[s.jsx(rn,{className:"h-4 w-4 inline mr-2"}),"Files"]}),s.jsxs("button",{onClick:()=>l("web"),className:`flex-1 py-2 px-3 text-sm font-medium rounded-md transition-colors ${o==="web"?"bg-primary/10 text-primary shadow-sm":"text-muted-foreground hover:text-primary hover:bg-primary/5"}`,children:[s.jsx(Zs,{className:"h-4 w-4 inline mr-2"}),"Web Pages"]}),s.jsxs("button",{onClick:()=>l("youtube"),className:`flex-1 py-2 px-3 text-sm font-medium rounded-md transition-colors ${o==="youtube"?"bg-primary/10 text-primary shadow-sm":"text-muted-foreground hover:text-primary hover:bg-primary/5"}`,children:[s.jsx(Vr,{className:"h-4 w-4 inline mr-2"}),"YouTube"]})]}),o==="files"&&s.jsxs("div",{className:`border-2 border-dashed rounded-lg p-6 text-center transition-colors ${a?"border-primary bg-primary/10":"border-border hover:border-primary/50"} ${r?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"}`,onDrop:_,onDragOver:k,onDragLeave:C,onClick:()=>
1418{if(r)return;const P=N.current||document.getElementById("knowledge-file-upload");P&&(P.value="",P.click())},children:[s.jsx(Xwe,{className:`h-12 w-12 mx-auto mb-4 ${a?"text-primary":"text-muted-foreground"}`}),s.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:r?"Uploading documents...":"Upload Knowledge Documents"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:a?"Drop your files here":"Drag and drop files here, or click to browse"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Supported formats: PDF, DOC, DOCX, TXT, MD, CSV, XLS, XLSX, JSON, XML, PPT, PPTX, MP3, WAV, PNG, JPEG, GIF, BMP. Max file size: 500MB"}),s.jsx("input",{id:"knowledge-file-upload",type:"file",multiple:!0,accept:".pdf,.doc,.docx,.txt,.md,.csv,.xls,.xlsx,.json,.xml,.ppt,.pptx,.mp3,.wav,.png,.jpeg,.gif,.bmp",className:"hidden",ref:N,onChange:async P=>{await S(P.target.files),P.currentTarget.value=""},disabled:r})]}),o==="web"&&s.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-6",children:[s.jsx(Zs,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),s.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:"Add Web Page Content"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Enter a URL to extract and process content from a web page"}),s.jsxs("form",{onSubmit:E,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"web-url",className:"sr-only",children:"Web Page URL"}),s.jsx(_e,{id:"web-url",type:"url",value:c,onChange:P=>u(P.target.value),placeholder:"https://example.com/page",disabled:r,required:!0})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx(Bne,{id:"crawl-web-page",checked:m,onCheckedChange:P=>p(P===!0),disabled:r}),s.jsxs("div",{className:"space-y-1 leading-none",children:[s.jsx(de,{htmlFor:"crawl-web-page",className:"text-sm font-medium cursor-pointer",children:"Crawl entire website"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"When enabled, the system will automatically discover and process linked pages within the same domain."})]})]}),m&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"max-requests",className:"text-sm font-medium",children:"Maximum requests to Crawl"}),s.jsxs(dt,{value:v.toString(),onValueChange:P=>y(parseInt(P)),disabled:r,children:[s.jsx(ot,{id:"max-requests",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"10",children:"10 pages"}),s.jsx(me,{value:"20",children:"20 pages"}),s.jsx(me,{value:"50",children:"50 pages"}),s.jsx(me,{value:"100",children:"100 pages"}),s.jsx(me,{value:"200",children:"200 pages"}),s.jsx(me,{value:"500",children:"500 pages"}),s.jsx(me,{value:"1000",children:"1000 pages"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Limit the number of requests to crawl from the website"})]}),s.jsxs(ti,{className:"bg-amber-50 dark:bg-amber-950/20 border-amber-200 dark:border-amber-900",children:[s.jsx(Qs,{className:"h-4 w-4 text-amber-600 dark:text-amber-500"}),s.jsxs(ni,{className:"text-amber-800 dark:text-amber-300 text-xs",children:[s.jsx("strong",{children:"Note:"})," The crawling process will continue in the background and may take several minutes depending on the website size. You'll see new pages appear as they are processed."]})]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"update-frequency-web",className:"text-sm font-medium",children:"Update Frequency"}),s.jsxs(dt,{value:x,onValueChange:P=>w(P),disabled:r,children:[s.jsx(ot,{id:"update-frequency-web",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"dont_refetch",children:"Don't refetch"}),s.jsx(me,{value:"daily",children:"Daily"}),s.jsx(me,{value:"weekly",children:"Weekly"}),s.jsx(me,{value:"monthly",children:"Monthly"})]})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"How often to automatically re-fetch and update this content"})]}),s.jsx(Y,{type:"submit",disabled:r||!c.trim(),className:"w-full",children:r?s.jsxs(s.Fragment,{children:[s.jsx(ss,{className:"h-4 w-4 mr-2 animate-spin"}),"Processing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Zs,{className:"h-4 w-4 mr-2"}),m?"Add & Crawl Website":"Add Web Page"]})})]})]}),o==="youtube"&&s.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-6",children:[s.jsx(Vr,{className:"h-12 w-12 mx-auto mb-4 text-muted-foreground"}),s.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:"Add YouTube Video Content"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Enter a YouTube URL to extract and process video content and transcripts"}),s.jsxs("form",{onSubmit:O,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"youtube-url",className:"sr-only",children:"YouTube URL"}),s.jsx(_e,{id:"youtube-url",type:"url",value:d,onChange:P=>f(P.target.value),placeholder:"https://www.youtube.com/watch?v=...",disabled:r,required:!0})]}),s.jsx(Y,{type:"submit",disabled:r||!d.trim(),className:"w-full",children:r?s.jsxs(s.Fragment,{children:[s.jsx(ss,{className:"h-4 w-4 mr-2 animate-spin"}),"Processing..."]}):s.jsxs(s.Fragment,{children:[s.jsx(Vr,{className:"h-4 w-4 mr-2"}),"Add YouTube Video"]})})]})]})]})},sre=()=>{const{agentId:e}=wO(),t=qt(),{toast:n}=_t(),{isAuthenticated:r,isLoading:a,user:i}
1418=nr(),{can:o}=Vc();b.useEffect(()=>{!a&&r&&!((i==null?void 0:i.canCreateAgents)??!1)&&(n({title:"Access Denied",description:"You do not have permission to create or edit agents.",variant:"destructive"}),t("/dashboard"))},[a,r,i,t,n]);const[l,c]=$m(),u=l.get("tab")||"settings",d=l.get("subTab")||"config",f=Math.max(1,parseInt(l.get("page")||"1")),m=parseInt(l.get("pageSize")||"10"),p=[5,10,20,50].includes(m)?m:10,[v,y]=b.useState(u),[x,w]=b.useState(d),N=!e,[S,_]=b.useState(!N),[k,C]=b.useState(!1),[E,O]=b.useState(!1),[P,R]=b.useState(null),[T,D]=b.useState({name:"",prompt:"",description:"",input_text_hint:"",communication_style:"formal",converstation_starter:[],conversation_closer:"",logo:"",base_color:"#3B82F6",text_color:"#000000",is_deployed:!1,llm_model_id:null,embedding_model_id:null,summary_email_sent:!1,summary_email_sent_to:"",webhook_enabled:!1,webhook_url:"",webhook_method:"POST",webhook_headers:[],webhook_custom_body:"",webhook_last_status:null,login_required:!1,allowed_users:[],allowed_domains:[],mcp_enabled:!1,mcp_servers:[],creativity_enabled:!0,temperature:null}),[z,I]=b.useState([]),[F,U]=b.useState({currentPage:f,pageSize:p,totalCount:0,hasNext:!1,hasPrevious:!1,loading:!1}),[H,q]=b.useState({llm:[],embedding:[]}),[B,L]=b.useState(""),[V,K]=b.useState(null),[W,ie]=b.useState(!1),[ve,ge]=b.useState("idle"),[J,ne]=b.useState(0),[Z,oe]=b.useState(!1),[he,Q]=b.useState(!1),[ae,fe]=b.useState(!1),[Ee,Re]=b.useState(!1),[qe,St]=b.useState(!1),[Ut,Yt]=b.useState(new Set),[Ue,wt]=b.useState(null),[At,cn]=b.useState(!1);b.useEffect(()=>{var Fe,Ce,De,Ke,Ht,Xt,Lt;if(N){const An=T.name.trim()!==""||T.prompt.trim()!==""||T.description.trim()!==""||T.input_text_hint.trim()!==""||T.communication_style!=="formal"||T.conversation_closer.trim()!==""||T.logo.trim()!==""||T.base_color!=="#3B82F6"||T.text_color!=="#FFFFFF"||T.converstation_starter.length>0||T.llm_model_id!==null||T.embedding_model_id!==null||T.summary_email_sent!==!1||T.summary_email_sent_to.trim()!==""||T.webhook_enabled!==!1||T.webhook_url.trim()!==""||T.webhook_method!=="POST"||T.webhook_headers.length>0||T.webhook_custom_body.trim()!==""||T.mcp_enabled!==!1||T.mcp_servers.length>0||T.temperature!==null||T.login_required!==!1||T.allowed_users.length>0||T.allowed_domains.length>0;Q(An);return}if(!P){Q(!1);return}const pe=T.name!==P.name||T.prompt!==P.prompt||T.description!==(P.description||"")||T.input_text_hint!==(P.input_text_hint||"")||T.communication_style!==P.communication_style||T.conversation_closer!==(P.conversation_closer||"")||T.logo!==(P.logo||"")||T.base_color!==(P.base_color||"#3B82F6")||T.text_color!==(P.text_color||"#FFFFFF")||T.is_deployed!==P.is_deployed||T.llm_model_id!==(((Fe=P.llm_model)==null?void 0:Fe.id)||null)||T.embedding_model_id!==(((Ce=P.embedding_model)==null?void 0:Ce.id)||null)||JSON.stringify(T.converstation_starter)!==JSON.stringify(P.converstation_starter)||T.summary_email_sent!==(P.summary_email_sent||!1)||T.summary_email_sent_to!==(P.summary_email_sent_to||"")||T.webhook_enabled!==(((De=P.webhook_summary)==null?void 0:De.enabled)||!1)||T.webhook_url!==(((Ke=P.webhook_summary)==null?void 0:Ke.url)||"")||T.webhook_method!==(((Ht=P.webhook_summary)==null?void 0:Ht.method)||"POST")||JSON.stringify(T.webhook_headers)!==JSON.stringify(tb((Xt=P.webhook_summary)==null?void 0:Xt.headers))||T.webhook_custom_body!==(((Lt=P.webhook_summary)==null?void 0:Lt.custom_body)||"")||T.login_required!==(P.login_required||!1)||JSON.stringify(T.allowed_users)!==JSON.stringify(P.allowed_users||[])||JSON.stringify(T.allowed_domains)!==JSON.stringify(P.allowed_domains||[])||T.mcp_enabled!==(P.mcp_enabled||!1)||JSON.stringify(T.mcp_servers)!==JSON.stringify((P.mcp_servers||[]).map(An=>({name:An.name,url:An.url,headers:tb(An.headers)})))||T.creativity_enabled!==(P.is_activated_temperature||!1)||T.temperature!==(P.temperature??null);Q(pe)},[T,P,N]),b.useEffect(()=>{if(N){vn();return}const pe=Une(e);if(pe===null||!r)return;(async()=>{var Ce,De,Ke,Ht,Xt,Lt,An,Un;try{_(!0),K(null);const bt=await Pt.getAgent(pe);R(bt);const ko=jz(bt.logo);D({name:bt.name,prompt:bt.prompt,description:bt.description||"",input_text_hint:bt.input_text_hint||"",communication_style:bt.communication_style,converstation_starter:bt.converstation_starter||[],conversation_closer:bt.conversation_closer||"",logo:ko,base_color:bt.base_color||"#3B82F6",text_color:bt.text_color||"#FFFFFF",is_deployed:bt.is_deployed,llm_model_id:((Ce=bt.llm_model)==null?void 0:Ce.id)||null,embedding_model_id:((De=bt.embedding_model)==null?void 0:De.id)||null,summary_email_sent:bt.summary_email_sent||!1,summary_email_sent_to:bt.summary_email_sent_to||"",webhook_enabled:((Ke=bt.webhook_summary)==null?void 0:Ke.enabled)||!1,webhook_url:((Ht=bt.webhook_summary)==null?void 0:Ht.url)||"",webhook_method:((Xt=bt.webhook_summary)==null?void 0:Xt.method)||"POST",webhook_headers:tb((Lt=bt.webhook_summary)==null?void 0:Lt.headers),webhook_custom_body:((An=bt.webhook_summary)==null?void 0:An.custom_body)||"",webhook_last_status:((Un=bt.webhook_summary)==null?void 0:Un.last_status)||null,login_required:bt.login_required||!1,allowed_users:bt.allowed_users||[],allowed_domains:bt.allowed_domains||[],mcp_enabled:bt.mcp_enabled||!1,mcp_servers:(bt.mcp_servers||[]).map(Qr=>({name:Qr.name,url:Qr.url,headers:tb(Qr.headers)})),creativity_enabled:!0,temperature:bt.temperature??null});try{const Qr=await Pt.getAgentKnowledge(pe,f,p);I(Qr.results),U(Al=>({...Al,currentPage:f,totalCount:Qr.count,hasNext:!!Qr.next,hasPrevious:!!Qr.previous}))}catch(Qr){console.warn("Could not load knowledge documents:",Qr)}await vn()}catch(bt){console.error("Failed to load agent:",bt),K(bt.message||"Failed to load agent"),n({title:"Error",description:"Failed to load agent data",variant:"destructive"})}finally{_(!1)}})()},[e,r,n,N,f,p]),b.useEffect(()=>
1418{const pe=new URLSearchParams(l);pe.set("tab",v),v==="settings"?pe.set("subTab",x):pe.delete("subTab"),v==="knowledge"?(pe.set("page",String(F.currentPage)),pe.set("pageSize",String(F.pageSize))):(pe.delete("page"),pe.delete("pageSize")),c(pe,{replace:!0})},[v,x,F.currentPage,F.pageSize]),b.useEffect(()=>{N&&(v==="testing"||v==="deployment")&&y("settings")},[N,v]);const vn=async()=>{try{const[pe,Fe]=await Promise.all([Pt.getLLMModels(),Pt.getEmbeddingModels()]);q({llm:pe.results,embedding:Fe.results})}catch(pe){console.warn("Could not load models:",pe)}},ye=async()=>{if(!T.name.trim()||!T.prompt.trim()||!T.llm_model_id||!T.embedding_model_id){n({title:"Validation Error",description:"Agent name, purpose, language model, and embedding model are required",variant:"destructive"});return}if(T.mcp_enabled){if(T.mcp_servers.length===0){n({title:"Validation Error",description:"MCP is enabled but no servers have been added. Add at least one MCP server or disable MCP.",variant:"destructive"});return}if(T.mcp_servers.find(Fe=>!Fe.name.trim()||!Fe.url.trim())){n({title:"Validation Error",description:"Each MCP server requires both a name and a URL.",variant:"destructive"});return}}try{O(!0);const pe={name:T.name,prompt:T.prompt,description:T.description,input_text_hint:T.input_text_hint,communication_style:T.communication_style,converstation_starter:T.converstation_starter,conversation_closer:T.conversation_closer,logo:T.logo||null,base_color:T.base_color,text_color:T.text_color,is_deployed:T.is_deployed,llm_model_id:T.llm_model_id,embedding_model_id:T.embedding_model_id,summary_email_sent:T.summary_email_sent,summary_email_sent_to:T.summary_email_sent_to||null,webhook_summary:T.webhook_enabled?{enabled:T.webhook_enabled,url:T.webhook_url||null,method:T.webhook_method,headers:T.webhook_headers.length>0?eb(T.webhook_headers):null,custom_body:T.webhook_custom_body||null}:null,login_required:T.login_required,allowed_users:T.allowed_users,allowed_domains:T.allowed_domains,mcp_enabled:T.mcp_enabled||!1,mcp_servers:T.mcp_enabled?T.mcp_servers.map(Ce=>({name:Ce.name,url:Ce.url,headers:eb(Ce.headers)})):[],is_activated_temperature:!0,temperature:T.temperature??.7},Fe=await Pt.createAgent(pe);R(Fe),Q(!1),n({title:"Success",description:"Agent created successfully!"}),t(`/agent-edit/${Fe.id}`,{replace:!0})}catch(pe){console.error("Failed to create agent:",pe),n({title:"Error",description:pe.message||"Failed to create agent",variant:"destructive"})}finally{O(!1)}},Ae=async()=>{if(P){if(T.mcp_enabled){if(T.mcp_servers.length===0){n({title:"Validation Error",description:"MCP is enabled but no servers have been added. Add at least one MCP server or disable MCP.",variant:"destructive"});return}if(T.mcp_servers.find(Fe=>!Fe.name.trim()||!Fe.url.trim())){n({title:"Validation Error",description:"Each MCP server requires both a name and a URL.",variant:"destructive"});return}}try{C(!0);const pe={name:T.name,prompt:T.prompt,description:T.description,input_text_hint:T.input_text_hint,communication_style:T.communication_style,converstation_starter:T.converstation_starter,conversation_closer:T.conversation_closer,logo:T.logo||null,base_color:T.base_color,text_color:T.text_color,is_deployed:T.is_deployed,llm_model_id:T.llm_model_id,embedding_model_id:T.embedding_model_id,summary_email_sent:T.summary_email_sent,summary_email_sent_to:T.summary_email_sent_to||null,webhook_summary:T.webhook_enabled?{enabled:T.webhook_enabled,url:T.webhook_url||null,method:T.webhook_method,headers:T.webhook_headers.length>0?eb(T.webhook_headers):null,custom_body:T.webhook_custom_body||null}:null,login_required:T.login_required,allowed_users:T.allowed_users,allowed_domains:T.allowed_domains,mcp_enabled:T.mcp_enabled||!1,mcp_servers:T.mcp_enabled?T.mcp_servers.map(Ce=>({name:Ce.name,url:Ce.url,headers:eb(Ce.headers)})):[],is_activated_temperature:!0,temperature:T.temperature??.7},Fe=await Pt.updateAgent(P.id,pe);R(Fe),Q(!1),n({title:"Success",description:"Agent updated successfully"})}catch(pe){console.error("Failed to update agent:",pe),n({title:"Error",description:pe.message||"Failed to update agent",variant:"destructive"})}finally{C(!1)}}},st=async()=>
1418{if(P)try{const pe=!T.is_deployed,Fe=pe?await Pt.deployAgent(P.id):await Pt.undeployAgent(P.id);R(Fe),D(Ce=>({...Ce,is_deployed:Fe.is_deployed})),n({title:"Success",description:`Agent ${pe?"deployed":"undeployed"} successfully`})}catch(pe){n({title:"Error",description:pe.message||"Failed to update deployment status",variant:"destructive"})}},jt=async()=>{if(B.trim()){if(T.converstation_starter.length>=4){n({title:"Limit Reached",description:"You can only have a maximum of 4 conversation starters",variant:"destructive"});return}const pe=[...T.converstation_starter,B.trim()];if(D(Fe=>({...Fe,converstation_starter:pe})),L(""),P&&!N)try{const Fe={converstation_starter:pe},Ce=await Pt.updateAgent(P.id,Fe);R(Ce),n({title:"Success",description:"Conversation starter added successfully"})}catch(Fe){console.error("Failed to update conversation starters:",Fe),n({title:"Error",description:"Failed to save conversation starter",variant:"destructive"}),D(Ce=>({...Ce,converstation_starter:Ce.converstation_starter.filter(De=>De!==B.trim())}))}}},pt=async pe=>{const Fe=[...T.converstation_starter],Ce=T.converstation_starter.filter((De,Ke)=>Ke!==pe);if(D(De=>({...De,converstation_starter:Ce})),P&&!N)try{const De={converstation_starter:Ce},Ke=await Pt.updateAgent(P.id,De);R(Ke),n({title:"Success",description:"Conversation starter removed successfully"})}catch(De){console.error("Failed to update conversation starters:",De),n({title:"Error",description:"Failed to remove conversation starter",variant:"destructive"}),D(Ke=>({...Ke,converstation_starter:Fe}))}},jn=async pe=>{if(P)try{await Pt.deleteKnowledge(P.id,pe),await _n(F.currentPage),n({title:"Success",description:"Knowledge document deleted successfully"})}catch(Fe){n({title:"Error",description:Fe.message||"Failed to delete knowledge document",variant:"destructive"})}},gr=async(pe,Fe)=>{if(P)try{await Pt.deleteCrawledUrl(P.id,pe,Fe),await _n(F.currentPage),n({title:"Success",description:"Crawled URL deleted successfully"})}catch(Ce){n({title:"Error",description:Ce.message||"Failed to delete crawled URL",variant:"destructive"})}},Mn=async pe=>{if(!P)return n({title:"Note",description:"Please create the agent first before uploading a logo",variant:"default"}),!1;const Fe=2*1024*1024;if(pe.size>Fe)return n({title:"File Too Large",description:"Logo file must be smaller than 2MB",variant:"destructive"}),!1;if(!["image/png","image/jpeg","image/jpg","image/svg+xml","image/webp"].includes(pe.type))return n({title:"Invalid File Type",description:"Please upload a PNG, JPG, SVG, or WebP file",variant:"destructive"}),!1;try{oe(!0);const De=new FormData;De.append("file",pe);const Ke=await Et.request(`/api/agent/${P.id}/upload-logo`,{method:"POST",body:De,headers:{}}),Ht=Ke.logo_url||Ke.url||Ke.logo;if(!Ht)throw new Error("No logo URL returned from server");const Xt=jz(Ht);return D(Lt=>({...Lt,logo:Xt})),P&&R(Lt=>Lt?{...Lt,logo:Xt}:null),n({title:"Success",description:"Logo uploaded successfully"}),!0}catch(De){return console.error("Failed to upload logo:",De),n({title:"Error",description:De.message||"Failed to upload logo",variant:"destructive"}),!1}finally{oe(!1)}},dr=async pe=>{if(!P)return n({title:"Note",description:"Please create the agent first before uploading knowledge documents",variant:"default"}),!1;const Fe=500*1024*1024,Ce=pe.filter(De=>typeof De.size=="number"&&De.size>Fe);if(Ce.length>0){const De=Ce.slice(0,5).map(Ke=>Ke.name).join(", ");return n({title:"File Too Large",description:`${Ce.length>1?"Some files":"This file"} exceed(s) the 500MB limit: ${De}${Ce.length>5?", …":""}`,variant:"destructive"}),!1}try{ie(!0),ge("uploading"),ne(0);const De=await Pt.uploadKnowledgeViaPresign(P.id,pe,!0,(Ht,Xt)=>{const Lt=Xt>0?Ht/Xt:1;ne(Math.max(5,Math.min(95,Math.round(Lt*100))))}),Ke=await Pt.getAgentKnowledge(P.id,1,10);return I(Ke.results),U(Ht=>({...Ht,currentPage:1,totalCount:Ke.count,hasNext:!!Ke.next,hasPrevious:!!Ke.previous})),ne(100),ge("done"),n({title:"Success",description:`${De.processed_count} documents uploaded and processed successfully`}),!0}catch(De){return console.error("Failed to upload knowledge:",De),n({title:"Error",description:De.message||"Failed to upload knowledge documents",variant:"destructive"}),!1}finally{ie(!1),ve!=="done"&&ge("done")}},ls=async(pe,Fe,Ce,De)=>{if(!P)return n({title:"Note",description:"Please create the agent first before adding web page content",variant:"default"}),!1;try{ie(!0),ge("uploading"),ne(0);const Ke=await Pt.uploadWebPage(P.id,pe,Fe,Fe?Ce:void 0,De),Ht=await Pt.getAgentKnowledge(P.id,1,10);return I(Ht.results),U(Xt=>({...Xt,currentPage:1,totalCount:Ht.count,hasNext:!!Ht.next,hasPrevious:!!Ht.previous})),ge("done"),n({title:"Success",description:Fe?"Website crawling initiated. This may take several minutes to complete.":"Web page content added and processed successfully"}),!0}catch(Ke){return console.error("Failed to upload web page:",Ke),n({title:"Error",description:Ke.message||"Failed to add web page content",variant:"destructive"}),!1}finally{ie(!1),ve!=="done"&&ge("done")}},un=async pe=>{if(!P)return n({title:"Note",description:"Please create the agent first before adding YouTube content",variant:"default"}),!1;try{ie(!0),ge("uploading"),ne(0);const Fe=await Pt.uploadYouTubeVideo(P.id,pe),Ce=await Pt.getAgentKnowledge(P.id,1,10);return I(Ce.results),U(De=>({...De,currentPage:1,totalCount:Ce.count,hasNext:!!Ce.next,hasPrevious:!!Ce.previous})),ge("done"),n({title:"Success",description:"YouTube video content added and processed successfully"}),!0}catch(Fe){return console.error("Failed to upload YouTube video:",Fe),n({title:"Error",description:Fe.message||"Failed to add YouTube video content",variant:"destructive"}),!1}finally{ie(!1),ve!=="done"&&ge("done")}},Dr=async(pe,Fe)=>{if(P)try{cn(!0),await Pt.updateKnowledgeFrequency(P.id,pe,Fe),I(Ce=>Ce.map(De=>De.id===pe?{...De,update_frequency:Fe}:De)),wt(null),n({title:"Success",description:"Update frequency changed successfully"})}catch(Ce){console.error("Failed to update frequency:",Ce),n({title:"Error",description:Ce.message||"Failed to update frequency",variant:"destructive"})}finally{cn(!1)}},_n=async(pe,Fe)=>{if(P)try{U(Ke=>({...Ke,loading:!0}));const Ce=Fe||F.pageSize,De=await Pt.getAgentKnowledge(P.id,pe,Ce);I(De.results),U(Ke=>({...Ke,currentPage:pe,pageSize:Ce,totalCount:De.count,hasNext:!!De.next,hasPrevious:!!De.previous,loading:!1}))}catch(Ce){console.warn("Failed to load knowledge documents page:",Ce),n({title:"Error",description:"Failed to load knowledge documents",variant:"destructive"}),U(De=>({...De,loading:!1}))}},oa=async()=>
1418{if(P)try{Re(!0);const pe=await Pt.getAgentKnowledge(P.id,1,10);I(pe.results),U(Fe=>({...Fe,currentPage:1,totalCount:pe.count,hasNext:!!pe.next,hasPrevious:!!pe.previous}))}catch(pe){console.warn("Failed to refresh knowledge documents:",pe),n({title:"Error",description:"Failed to refresh knowledge documents",variant:"destructive"})}finally{Re(!1)}},Pa=async()=>{if(P)try{St(!0);const{blob:pe,filename:Fe}=await Pt.downloadConversationsCSV(P.id),Ce=URL.createObjectURL(pe),De=document.createElement("a");De.href=Ce,De.download=Fe,document.body.appendChild(De),De.click(),De.remove(),URL.revokeObjectURL(Ce),n({title:"Success",description:"CSV downloaded successfully"})}catch(pe){n({title:"Error",description:(pe==null?void 0:pe.message)||"Failed to download CSV",variant:"destructive"})}finally{St(!1)}},cs=pe=>{Yt(Fe=>{const Ce=new Set(Fe);return Ce.has(pe)?Ce.delete(pe):Ce.add(pe),Ce})},Xr=pe=>{switch(pe.toLowerCase()){case"completed":return{label:"Completed",color:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",icon:Pe};case"pending":case"processing":return{label:pe==="processing"?"Processing":"Pending",color:"bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-300",icon:ss};case"failed":return{label:"Failed",color:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",icon:ln};default:return{label:pe,color:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",icon:Qs}}};return b.useEffect(()=>{a||r||(t("/"),n({description:"Please sign in to access the agent builder",variant:"destructive"}))},[r,a,t,n]),S?s.jsxs("div",{className:"min-h-screen cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16 relative z-10",children:s.jsx("div",{className:"container mx-auto px-6 py-8 max-w-6xl",children:s.jsxs("div",{className:"space-y-6",children:[s.jsx(rs,{className:"h-8 w-64"}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsx("div",{className:"lg:col-span-2 space-y-6",children:s.jsxs(te,{className:"glass-effect glass-effect-dark holographic-border",children:[s.jsx(xe,{children:s.jsx(rs,{className:"h-6 w-48"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsx(rs,{className:"h-10 w-full"}),s.jsx(rs,{className:"h-24 w-full"}),s.jsx(rs,{className:"h-10 w-full"})]})]})}),s.jsx("div",{className:"space-y-6",children:s.jsxs(te,{className:"glass-effect glass-effect-dark holographic-border",children:[s.jsx(xe,{children:s.jsx(rs,{className:"h-6 w-32"})}),s.jsx(se,{children:s.jsx(rs,{className:"h-20 w-full"})})]})})]})]})})})]}):V||!P&&!N?s.jsxs("div",{className:"min-h-screen cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16 relative z-10",children:s.jsxs("div",{className:"container mx-auto px-6 py-8 max-w-4xl",children:[s.jsxs(ti,{variant:"destructive",className:"glass-effect glass-effect-dark border-red-500/30",children:[s.jsx(ln,{className:"h-4 w-4"}),s.jsx(ni,{children:V||"Agent not found"})]}),s.jsxs(Y,{variant:"outline",onClick:()=>t("/dashboard"),className:"mt-4 glass-effect glass-effect-dark border-cyber-blue/30 hover:bg-cyber-blue/10",children:[s.jsx(ai,{className:"h-4 w-4 mr-2"}),"Back to Dashboard"]})]})})]}):s.jsxs("div",{className:"min-h-screen cinematic-bg overflow-x-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-20 left-20 w-2 h-2 bg-cyber-blue/20 rounded-full floating"}),s.jsx("div",{className:"absolute top-40 right-32 w-1 h-1 bg-electric-blue/30 rounded-full floating",style:{animationDelay:"2s"}}),s.jsx("div",{className:"absolute bottom-32 left-1/4 w-1.5 h-1.5 bg-neon-cyan/25 rounded-full floating",style:{animationDelay:"4s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16 relative z-10 overflow-x-hidden",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-8  overflow-x-hidden",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between mb-8 space-y-4 sm:sp
1418ace-y-0",children:[s.jsxs("div",{className:"flex items-center space-x-4 min-w-0",children:[s.jsxs(Y,{variant:"outline",onClick:()=>t("/dashboard"),className:"flex items-center space-x-2 glass-effect glass-effect-dark border-cyber-blue/30 hover:bg-cyber-blue/10 shrink-0",children:[s.jsx(ai,{className:"h-4 w-4"}),s.jsx("span",{className:"text-white hidden sm:inline",children:"Back to Dashboard"}),s.jsx("span",{className:"text-white sm:hidden",children:"Back"})]}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("h1",{className:"text-2xl sm:text-3xl font-bold gradient-text gradient-text-dark flex items-center space-x-3 cyber-glow",children:N?s.jsxs(s.Fragment,{children:[s.jsx(ws,{className:"h-6 h-8 sm:h-8 w-6 sm:w-8 text-cyber-blue"}),s.jsx("span",{className:"truncate",children:"Create Agent"})]}):s.jsxs(s.Fragment,{children:[s.jsx(vX,{className:"h-6 h-8 sm:h-8 w-6 sm:w-8 text-cyber-blue"}),s.jsx("span",{className:"truncate",children:"Edit Agent"})]})}),s.jsx("p",{className:"text-white/80 text-sm sm:text-base truncate",children:N?"Build a new intelligent agent":`Modify settings for "${P==null?void 0:P.name}"`})]})]}),s.jsxs("div",{className:"flex items-center space-x-3",children:[!N&&P&&s.jsx(le,{variant:P.is_deployed?"default":"secondary",className:`text-sm  ${P.is_deployed?"bg-primary text-primary-foreground":"glass-effect  "}`,children:P.is_deployed?s.jsxs(s.Fragment,{children:[s.jsx(Pe,{className:"h-3 w-3 mr-1"}),"Deployed"]}):s.jsxs(s.Fragment,{children:[s.jsx(ln,{className:"h-3 w-3 mr-1"}),"Draft"]})}),N?s.jsx(Y,{onClick:ye,disabled:E||!T.name.trim()||!T.prompt.trim()||!T.llm_model_id||!T.embedding_model_id,className:"glow-button text-white",children:E?s.jsxs(s.Fragment,{children:[s.jsx(ss,{className:"h-4 w-4 mr-2 animate-spin"}),"Creating..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ws,{className:"h-4 w-4 mr-2"}),"Create Agent"]})}):s.jsx(Y,{onClick:Ae,disabled:k||!he,className:`${he?"glow-button text-white":"glass-effect glass-effect-dark border-cyber-blue/30"} ${!he&&!k?"opacity-50":""}`,children:k?s.jsxs(s.Fragment,{children:[s.jsx(ss,{className:"h-4 w-4 mr-2 animate-spin"}),"Saving..."]}):he?s.jsxs(s.Fragment,{children:[s.jsx(uw,{className:"h-4 w-4 mr-2"}),"Save Changes"]}):s.jsxs(s.Fragment,{children:[s.jsx(Pe,{className:"h-4 w-4 mr-2"}),"All Changes Saved"]})})]})]}),s.jsxs(os,{value:v,onValueChange:pe=>y(pe),className:"space-y-6",children:[s.jsxs(Kr,{className:"glass-effect glass-effect-dark holographic-border grid w-full grid-cols-5",children:[s.jsxs(at,{value:"settings",className:"flex items-center space-x-1 sm:space-x-2 text-white/70 data-[state=active]:bg-cyber-blue/20 data-[state=active]:text-cyber-blue",children:[s.jsx(Kt,{className:"h-3 w-3 sm:h-4 sm:w-4"}),s.jsx("span",{className:"text-xs sm:text-sm",children:"Settings"})]}),s.jsxs(at,{value:"branding",className:"flex items-center space-x-1 sm:space-x-2 text-white/70 data-[state=active]:bg-cyber-blue/20 data-[state=active]:text-cyber-blue",children:[s.jsx(QO,{className:"h-3 w-3 sm:h-4 sm:w-4"}),s.jsx("span",{className:"text-xs sm:text-sm",children:"Branding"})]}),s.jsxs(at,{value:"knowledge",className:"flex items-center space-x-1 sm:space-x-2 text-white/70 data-[state=active]:bg-cyber-blue/20 data-[state=active]:text-cyber-blue",children:[s.jsx(Gr,{className:"h-3 w-3 sm:h-4 sm:w-4"}),s.jsxs("span",{className:"text-xs sm:text-sm",children:[s.jsx("span",{className:"sm:hidden",children:"Know"}),s.jsx("span",{className:"hidden sm:inline",children:"Knowledge"})]})]}),s.jsxs(at,{value:"testing",className:"flex items-center space-x-1 sm:space-x-2 text-white/70 data-[state=active]:bg-cyber-blue/20 data-[state=active]:text-cyber-blue",disabled:N,children:[s.jsx(ex,{className:"h-3 w-3 sm:h-4 sm:w-4"}),s.jsx("span",{className:"text-xs sm:text-sm",children:"Test"})]}),s.jsxs(at,{value:"deployment",className:"flex items-center space-x-1 sm:space-x-2 text-white/70 data-[state=active]:bg-cyber-blue/20 data-[state=active]:text-cyber-blue",disabled:N,children:[s.jsx(wX,{className:"h-3 w-3 sm:h-4 sm:w-4"}),s.jsx("span",{className:"text-xs sm:text-sm",children:"Deploy"})]})]}),s.jsx(Ze,{value:"settings",className:"space-y-6",children:s.jsx(t5e,{formData:T,setFormData:D,availableModels:H,isCreationMode:N,formatProviderName:Wg,newConversationStarter:B,setNewConversationStarter:L,addConversationStarter:jt,removeConversationStarter:pt,setHasUnsavedChanges:Q,activeTab:x,onTabChange:w})}),s.jsx(Ze,{value:"branding",className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:["Visual Branding",!o("can_custom_branding")&&s.jsx(ur,{className:"h-4 w-4 text-muted-foreground"})]})}
1418),s.jsxs(se,{className:"space-y-4 relative",children:[!o("can_custom_branding")&&s.jsx("div",{className:"absolute inset-0 z-20 bg-background/60 backdrop-blur-[2px] flex items-center justify-center rounded-lg transition-all duration-300",children:s.jsxs("div",{className:"text-center p-6 bg-card border shadow-lg rounded-xl transform scale-100 opacity-100 transition-all duration-300",children:[s.jsx(ii,{className:"h-10 w-10 text-yellow-500 mx-auto mb-3"}),s.jsx("h3",{className:"font-bold text-lg mb-2",children:"Premium Feature"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4 max-w-[200px] mx-auto",children:"Upgrade your plan to unlock custom branding and remove Privion references."}),s.jsx(Y,{onClick:()=>t("/pricing"),className:"bg-gradient-to-r from-yellow-500 to-orange-500 text-white border-0",children:"Upgrade Now"})]})}),s.jsxs("div",{className:o("can_custom_branding")?"space-y-4":"opacity-40 pointer-events-none filter blur-[2px] select-none space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"base_color",children:"Primary Color"}),s.jsxs("div",{className:"flex space-x-2 items-center",children:[s.jsx(_e,{id:"base_color",type:"color",value:T.base_color,onChange:pe=>D(Fe=>({...Fe,base_color:pe.target.value})),className:"w-16 h-10"}),s.jsx(_e,{value:T.base_color,onChange:pe=>D(Fe=>({...Fe,base_color:pe.target.value})),placeholder:"#3B82F6"})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"text_color",children:"Text Color"}),s.jsxs("div",{className:"flex space-x-2 items-center",children:[s.jsx(_e,{id:"text_color",type:"color",value:T.text_color,onChange:pe=>D(Fe=>({...Fe,text_color:pe.target.value})),className:"w-16 h-10"}),s.jsx(_e,{value:T.text_color,onChange:pe=>D(Fe=>({...Fe,text_color:pe.target.value})),placeholder:"#FFFFFF"})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-1 gap-6",children:s.jsxs("div",{children:[s.jsx(de,{htmlFor:"logo",children:"Logo Upload"}),N&&!P?s.jsx("div",{className:"p-4 border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg text-center",children:s.jsx("div",{className:"text-sm text-foreground",children:"Create your agent first to upload a logo"})}):s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:`border-2 border-dashed rounded-lg p-4 text-center transition-colors ${Z?"border-blue-500 bg-blue-50 dark:bg-blue-950/20 cursor-not-allowed":"border-gray-300 dark:border-gray-600 hover:border-gray-400 dark:hover:border-gray-500 cursor-pointer"}`,onClick:()=>{var pe;return!Z&&((pe=document.getElementById("logo-upload"))==null?void 0:pe.click())},children:[s.jsx(Js,{className:`h-8 w-8 mx-auto mb-2 ${Z?"text-blue-500":"text-gray-400"}`}),s.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-white mb-1",children:Z?"Uploading logo...":"Upload Logo"}),s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:"PNG, JPG, SVG, WebP up to 2MB"})]}),s.jsx("input",{id:"logo-upload",type:"file",accept:"image/png,image/jpeg,image/jpg,image/svg+xml,image/webp",className:"hidden",onChange:async pe=>{var Ce;const Fe=(Ce=pe.target.files)==null?void 0:Ce[0];Fe&&(await Mn(Fe),pe.target.value="")},disabled:Z}),T.logo&&s.jsxs("div",{className:"flex items-center justify-between p-3 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{className:"flex items-center space-x-3",children:[s.jsx("div",{className:"w-10 h-10 bg-white rounded border flex items-center justify-center overflow-hidden",children:s.jsx("img",{src:T.logo,alt:"Current logo",className:"w-full h-full object-contain",onError:pe=>{pe.target.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/></svg>'}})}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-white",children:"Current logo"}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 truncate max-w-[500px]",title:T.logo,
1418children:T.logo})]})]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>{D(pe=>({...pe,logo:""})),P&&!N&&Ae()},className:"text-red-600 hover:text-red-700 hover:bg-red-50 dark:hover:bg-red-950/30",children:s.jsx(jr,{className:"h-4 w-4"})})]})]})]})}),s.jsxs("div",{className:"p-4 border rounded-lg",children:[s.jsx(de,{children:"Preview"}),s.jsx("div",{className:"mt-2 p-4 rounded-lg",style:{backgroundColor:`${T.base_color}20`},children:s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx("div",{className:"w-12 h-12 rounded-full flex items-center justify-center font-semibold overflow-hidden relative",style:{backgroundColor:T.base_color,color:T.text_color},children:T.logo?s.jsxs(s.Fragment,{children:[s.jsx("img",{src:T.logo,alt:"Agent logo",className:"w-full h-full object-cover rounded-full",onError:pe=>{pe.target.style.display="none";const Fe=pe.target.nextElementSibling;Fe&&(Fe.style.display="block")}}),s.jsx("span",{className:"absolute inset-0 flex items-center justify-center font-semibold",style:{display:"none",color:T.text_color},children:T.name.charAt(0).toUpperCase()})]}):T.name.charAt(0).toUpperCase()}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",style:{color:T.text_color},children:T.name||"Agent Name"}),s.jsx("p",{className:"text-sm",style:{color:T.text_color},children:T.logo?"Custom logo with brand colors":"Default avatar with your selected colors"})]})]})})]})]})]})]})}),s.jsxs(Ze,{value:"knowledge",className:"space-y-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{children:"Upload Knowledge Documents"})}),s.jsxs(se,{children:[(ve==="uploading"||ve==="processing")&&s.jsxs("div",{className:"mb-4",children:[s.jsx("div",{className:"w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2",children:s.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all",style:{width:`${J}%`}})}),s.jsx("p",{className:"text-xs mt-1 text-white/70",children:ve==="uploading"?"Uploading files…":`Processing documents: ${J}%`})]}),N&&!P?s.jsxs(ti,{children:[s.jsx(Qs,{className:"h-4 w-4"}),s.jsx(ni,{children:"Create your agent first to upload knowledge documents. You can add documents after creation."})]}):s.jsx(s5e,{onUpload:dr,onUploadWebPage:ls,onUploadYouTube:un,isUploading:W})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(we,{children:["Existing Documents (",F.totalCount,")"]}),s.jsxs("div",{className:"flex items-center space-x-3",children:[!N&&F.totalCount>0&&s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(de,{htmlFor:"page-size",className:"text-sm",children:"Show:"}),s.jsxs(dt,{value:F.pageSize.toString(),onValueChange:pe=>{const Fe=parseInt(pe);_n(1,Fe)},children:[s.jsx(ot,{className:"w-20 h-8",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"5",children:"5"}),s.jsx(me,{value:"10",children:"10"}),s.jsx(me,{value:"20",children:"20"}),s.jsx(me,{value:"50",children:"50"})]})]})]}),!N&&s.jsxs(Y,{variant:"outline",size:"sm",onClick:oa,disabled:Ee,className:"flex items-center space-x-2",children:[s.jsx(ss,{className:`h-4 w-4 mr-2 ${Ee?"animate-spin":""}`}),s.jsx("span",{children:"Refresh"})]})]})]})}),s.jsxs(se,{children:[z.length===0?s.jsxs("div",{className:"text-center py-8",children:[s.jsx(Gr,{className:"h-16 w-16 mx-auto text-gray-400 mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"No knowledge documents yet"}),s.jsx("p",{className:"text-foreground",children:N?"Create your agent first, then upload documents to give it knowledge about specific topics.":"Upload documents above to give your agent knowledge about specific topics."})]}):s.jsx("div",{className:"space-y-3",children:F.loading?s.jsx("div",{className:"space-y-3",children:Array.from({length:3},(pe,Fe)=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex-1 space-y-2",children:[s.jsx(rs,{className:"h-4 w-48"}),s.jsx(rs,{className:"h-3 w-32"})]}),s.jsx(rs,{className:"h-8 w-8"})]},Fe))}):z.map(pe=>{const Fe=n5e(pe.document_type),Ce=Fe.icon,De=r5e(pe.status),Ke=["processing","in_progress","uploading","queued"].includes((pe.status||"").toLowerCase()),Ht=Ut.has(pe.id),Xt=pe.crawled&&pe.crawled_urls&&pe.crawled_urls.length>0;return s.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[Xt&&s.jsx("button",{onClick:()=>cs(pe.id),className:"p-0.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors","aria-label":Ht?"Collapse crawled URLs":"Expand crawled URLs",children:Ht?s.jsx(ao,{className:"h-4 w-4 text-gray-500 rotate-90 transition-transform"}):s.jsx(ao,{className:"h-4 w-4 text-gray-500 transition-transform"})}),s.jsx(Ce,{className:"h-4 w-4 text-gray-500"}),s.jsx("h4",{className:"font-medium truncate",children:pe.file_name})]}),s.jsxs(le,{className:`text-xs flex items-center ${De.color}`,children:[["processing","in_progress","uploading","queued"].includes((pe.status||"").toLowerCase())&&s.jsx(ss,{className:"h-3 w-3 mr-1 animate-spin"}),De.label]}),s.jsx(le,{className:`text-xs ${Fe.color}`,children:Fe.label}),pe.update_frequency&&Nz(pe.update_frequency)&&s.jsxs(le,{variant:"outline",className:"text-xs bg-purple-50 text-purple-700 border-purple-200 dark:bg-purple-900/30 dark:text-purple-300 dark:border-purple-800",children:[s.jsx(ss,{className:"h-3 w-3 mr-1"}),Nz(pe.update_frequency)]}),Xt&&s.jsxs(le,{variant:"outline",className:"text-xs",children:[pe.crawled_urls.length," ",pe.crawled_urls.length===1?"page":"pages"]})]}),s.jsxs("p",{className:"text-sm ",children:[pe.file_type,pe.created_datetime&&s.jsxs(s.Fragment,{children:[" • Uploaded ",new Date(pe.created_datetime).toLocaleDateString()]})]}),pe.url&&(pe.document_type==="web"||pe.document_type==="youtube")&&s.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[s.jsx(Zs,{className:"h-3 w-3 text-gray-400"}),s.jsx("a",{href:pe.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 dar
1418k:text-blue-400 hover:underline truncate max-w-[300px]",title:pe.url,children:pe.url})]}),pe.content_summary&&s.jsx("p",{className:"text-xs text-gray-500 mt-1 line-clamp-2",children:pe.content_summary}),pe.error_message&&s.jsx("p",{className:"text-xs text-red-500 mt-1",children:pe.error_message})]}),s.jsxs("div",{className:"flex items-center space-x-2 ml-4",children:[pe.document_type==="web"&&Ue===pe.id?s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(dt,{value:pe.update_frequency||"dont_refetch",onValueChange:Lt=>Dr(pe.id,Lt),disabled:At,children:[s.jsx(ot,{className:"h-8 w-36 text-xs",children:s.jsx(ft,{})}),s.jsxs(lt,{children:[s.jsx(me,{value:"dont_refetch",children:"Don't refetch"}),s.jsx(me,{value:"daily",children:"Daily"}),s.jsx(me,{value:"weekly",children:"Weekly"}),s.jsx(me,{value:"monthly",children:"Monthly"})]})]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>wt(null),disabled:At,className:"h-8 px-2",children:s.jsx(jr,{className:"h-3 w-3"})})]}):pe.document_type==="web"&&!Ke?s.jsxs(Y,{variant:"ghost",size:"sm",onClick:()=>wt(pe.id),className:"text-xs h-8",title:"Change update frequency",children:[s.jsx(ss,{className:"h-3 w-3 mr-1"}),"Edit Frequency"]}):null,Xt&&s.jsxs(Y,{variant:"ghost",size:"sm",onClick:()=>cs(pe.id),className:"text-xs",children:[Ht?"Hide":"Show"," Pages"]}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>jn(pe.id),disabled:Ke,className:Ke?"opacity-50 cursor-not-allowed":"hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950/30",children:s.jsx(oi,{className:"h-4 w-4"})})]})]}),Xt&&Ht&&s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/30 border-t px-4 py-3",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[s.jsx("div",{className:"h-px flex-1 bg-gray-300 dark:bg-gray-600"}),s.jsxs("span",{className:"text-xs font-medium text-gray-600 dark:text-gray-400",children:["Crawled Pages (",pe.crawled_urls.length,")"]}),s.jsx("div",{className:"h-px flex-1 bg-gray-300 dark:bg-gray-600"})]}),s.jsx("div",{className:"space-y-2 ml-6",children:pe.crawled_urls.map(Lt=>{const An=Xr(Lt.status),Un=An.icon,bt=["pending","processing"].includes(Lt.status);return s.jsxs("div",{className:"flex items-start space-x-3 p-3 bg-white dark:bg-gray-800 rounded-md border border-gray-200 dark:border-gray-700",children:[s.jsx("div",{className:"flex-shrink-0 mt-0.5",children:s.jsx("div",{className:"w-1 h-1 bg-gray-400 rounded-full"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[s.jsx(Zs,{className:"h-3 w-3 text-gray-400 flex-shrink-0"}),s.jsx("a",{href:Lt.url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 dark:text-blue-400 hover:underline truncate",title:Lt.url,children:Lt.url})]}),s.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[s.jsxs(le,{className:`text-xs flex items-center ${An.color}`,children:[s.jsx(Un,{className:`h-3 w-3 mr-1 ${bt?"animate-spin":""}`}),An.label]}),Lt.updated_datetime&&s.jsxs("span",{className:"text-xs text-gray-500",children:["Updated ",new Date(Lt.updated_datetime).toLocaleString()]})]})]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>gr(pe.id,Lt.id),disabled:bt,className:`flex-shrink-0 ${bt?"opacity-50 cursor-not-allowed":"hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950/30"}`,title:bt?"Cannot delete while processing":"Delete crawled URL",children:s.jsx(oi,{className:"h-3 w-3"})})]},Lt.id)})})]})]},pe.id)})}),F.totalCount>F.pageSize&&s.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[s.jsxs("div",{className:"text-sm text-white/70",children:["Showing ",(F.currentPage-1)*F.pageSize+1," to"," ",Math.min(F.currentPage*F.pageSize,F.totalCount)," of"," ",F.totalCount," documents"]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>_n(F.currentPage-1),disabled:!F.hasPrevious||F.loading,className:"flex items-center space-x-1",children:[s.jsx(f1,{className:"h-4 w-4"}),s.jsx("span",{children:"Previous"})]}),s.jsx("div",{className:"flex items-center space-x-1",children:Array.from({length:Math.min(5,Math.ceil(F.totalCount/F.pageSize))},(pe,Fe)=>{const Ce=Fe+1,De=Ce===F.currentPage;return s.jsx(Y,{variant:De?"default":"outline",size:"sm",onClick:()=>_n(Ce),disabled:F.loading,className:"w-8 h-8 p-0",children:Ce},Ce)})}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>_n(F.currentPage+1),disabled:!F.hasNext||F.loading,className:"flex items-center space-x-1",children:[s.jsx("span",{children:"Next"}),s.jsx(ao,{className:"h-4 w-4"})]})]})]})]})]})]}),!N&&s.jsx(Ze,{value:"testing",className:"space-y-6",children:s.jsx(M3e,{agent:P})}),!N&&P&&s.jsx(Ze,{value:"deployment",className:"space-y-6",children:s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{children:"Deployment Status"})}),s.jsxs(se,{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Current Status"}),s.jsx("p",{className:"text-sm ",children:P.is_deployed?"Your agent is live and accessible to users":"Your agent is in draft mode and n
1418ot accessible to users"})]}),s.jsxs("div",{className:"flex items-center space-x-4",children:[s.jsx(le,{variant:P.is_deployed?"default":"secondary",className:"text-sm",children:P.is_deployed?"Deployed":"Draft"}),s.jsx(Dt,{checked:T.is_deployed,onCheckedChange:st})]})]}),P.is_deployed&&s.jsxs(ti,{children:[s.jsx(Pe,{className:"h-4 w-4"}),s.jsx(ni,{children:"Your agent is live! Users can interact with it using the configured settings."})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Agent Preview"}),s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg dark:bg-gray-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Test Your Agent"}),s.jsx("p",{className:"text-sm ",children:"Open the agent preview to test how users will interact with it"})]}),s.jsxs(Y,{variant:"outline",onClick:()=>window.open(`/agent-preview/${P.id}`,"_blank"),className:"flex items-center space-x-2",children:[s.jsx(Zs,{className:"h-4 w-4"}),s.jsx("span",{children:"Open Preview"})]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Share"}),s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg dark:bg-gray-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Share Your Agent"}),s.jsx("p",{className:"text-sm ",children:"Get a shareable link or embed code for your website"})]}),s.jsxs(qm,{open:ae,onOpenChange:fe,children:[s.jsx(nQ,{asChild:!0,children:s.jsxs(Y,{variant:"outline",size:"sm",className:"flex items-center",children:[s.jsx(Ji,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:"Share"})]})}),s.jsxs(zd,{className:"max-w-2xl max-h-[85vh] overflow-y-auto",children:[s.jsx(Bd,{children:s.jsxs(Ud,{className:"flex items-center space-x-2",children:[s.jsx(Ji,{className:"h-5 w-5"}),s.jsxs("span",{children:["Share Agent: ",P.name]})]})}),s.jsxs("div",{className:"space-y-6 pt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(de,{className:"text-sm font-medium",children:"Preview Link"}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>{const pe=P.full_domain?`https://${P.full_domain}/agent-preview/`:`/agent-preview/${P.id}`;window.open(pe,"_blank")},children:[s.jsx(Zs,{className:"h-4 w-4 mr-1"}),"Test Preview"]})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(_e,{value:P.full_domain?`https://${P.full_domain}/agent-preview/`:`${window.location.origin}/agent-preview/${P.id}`,readOnly:!0,className:"flex-1 font-mono text-sm"}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>{const pe=P.full_domain?`https://${P.full_domain}/agent-preview/`:`${window.location.origin}/agent-preview/${P.id}`;navigator.clipboard.writeText(pe),n({description:"Link copied to clipboard!",duration:2e3})},children:s.jsx(Xu,{className:"h-4 w-4"})})]}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Share this link for users to chat with your agent directly"})]}),s.jsx(nd,{}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(de,{className:"text-sm font-medium flex items-center space-x-2",children:[s.jsx(Zg,{className:"h-4 w-4"}),s.jsx("span",{children:"Embed Code (iframe)"})]}),s.jsx(Ds,{value:P.full_domain?`<iframe src="https://${P.full_domain}/agent-preview/" height="800px" width="100%" frameborder="0" title="${P.name}"></iframe>`:`<iframe src="${window.location.origin}/agent-preview/${P.id}" height="800px" width="100%" frameborder="0" title="${P.name}"></iframe>`,readOnly:!0,className:"font-mono text-sm h-20 resize-none"}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Embed this agent chat directly in your website"}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>{const pe=P.full_domain?`<iframe src="https://${P.full_domain}/agent-preview/" height="800px" width="100%" frameborder="0" title="${P.name}"></iframe>`:`<iframe src="${window.location.origin}/agent-preview/${P.id}" height="800px" width="100%" frameborder="0" title="${P.name}"></iframe>`;navigator.clipboard.writeText(pe),n({description:"Embed code copied to clipboard!",duration:2e3})},children:[s.jsx(Xu,{className:"h-4 w-4 mr-1"}),"Copy Code"]})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(de,{className:"text-sm font-medium flex items-center space-x-2",children:[s.jsx(Zg,{className:"h-4 w-4"}),s.jsx("span",{children:"Web Widget"})]}),s.jsx(Ds,{value:P.full_domain?`<script
1419  src="https://${P.full_domain}/agent-widget.js"
1420  data-agent-id="${P.id}"
1421  data-base-url="https://${P.full_domain}"
1422  data-position="bottom-right"
1423  data-color="${T.base_color||"#3B82F6"}"
1424  data-text-color="#FFFFFF"
1425  data-button-text=""
1426  data-z-index="2147483000"
1427  data-mode="iframe"
1428  data-size="md"
1429  data-open="false"
1430><\/script>`:`<script
1431  src="${window.location.origin}/agent-widget.js"
1432  data-agent-id="${P.id}"
1433  data-base-url="${window.location.origin}"
1434  data-position="bottom-right"
1435  data-color="${T.base_color||"#3B82F6"}"
1436  data-text-color="#FFFFFF"
1437  data-button-text=""
1438  data-z-index="2147483000"
1439  data-mode="iframe"
1440  data-size="md"
1441  data-open="false"
1442><\/script>`,readOnly:!0,className:"font-mono text-sm h-20 resize-none"}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Paste before the closing </body> tag to add a floating chat button."}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>{const pe=P.full_domain?`<script
1443  src="https://${P.full_domain}/agent-widget.js"
1444  data-agent-id="${P.id}"
1445  data-base-url="https://${P.full_domain}"
1446  data-position="bottom-right"
1447  data-color="${T.base_color||"#3B82F6"}"
1448  data-button-text=""
1449  data-z-index="2147483000"
1450  data-mode="iframe"
1451  data-size="md"
1452  data-open="false"
1453><\/script>`:`<script
1454  src="${window.location.origin}/agent-widget.js"
1455  data-agent-id="${P.id}"
1456  data-base-url="${window.location.origin}"
1457  data-position="bottom-right"
1458  data-color="${T.base_color||"#3B82F6"}"
1459  data-button-text=""
1460  data-z-index="2147483000"
1461  data-mode="iframe"
1462  data-size="md"
1463  data-open="false"
1464><\/script>`;navigator.clipboard.writeText(pe),n({description:"Widget snippet copied to clipboard!",duration:2e3})},children:[s.jsx(Xu,{className:"h-4 w-4 mr-1"}),"Copy Snippet"]})]})]}),s.jsx(nd,{}),s.jsxs("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-4 rounded-lg",children:[s.jsx("h4",{className:"text-sm font-medium text-blue-900 dark:text-blue-100 mb-2",children:"Usage Guidelines"}),s.jsxs("ul",{className:"text-xs text-blue-700 dark:text-blue-200 space-y-1",children:[s.jsx("li",{children:"• No authentication required for users to interact with shared agents"}),s.jsx("li",{children:"• Agent responses are powered by your configured knowledge and settings"}),s.jsx("li",{children:"• Iframe embeds are responsive and work on any website"}),s.jsx("li",{children:"• Usage analytics are available in your dashboard"})]})]})]})]})]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Export"}),s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg dark:bg-gray-800/50",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:"Conversations CSV"}),s.jsx("p",{className:"text-sm ",children:"Download all conversations for this agent as a CSV file"})]}),s.jsxs(Y,{onClick:()=>
1464{if(!o("can_csv_export")){n({title:"Premium Feature",description:"Upgrade your plan to export conversation data.",action:s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>t("/pricing"),children:"Upgrade"})});return}Pa()},disabled:qe,className:"flex items-center space-x-2",children:[!o("can_csv_export")&&s.jsx(ur,{className:"h-4 w-4 mr-2"}),qe?s.jsx(ss,{className:"h-4 w-4 mr-2 animate-spin"}):s.jsx(h1,{className:"h-4 w-4 mr-2"}),s.jsx("span",{children:qe?"Preparing…":"Download CSV"}),!o("can_csv_export")&&s.jsx(le,{variant:"outline",className:"ml-2 bg-amber-100 text-amber-800 border-amber-200 dark:bg-amber-900/30 dark:text-amber-300 dark:border-amber-800 pointer-events-none",children:"Upgrade"})]})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h4",{className:"font-medium",children:"Agent Information"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Created:"}),s.jsx("p",{className:"",children:new Date(P.created_at).toLocaleDateString()})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Last Updated:"}),s.jsx("p",{className:"",children:new Date(P.updated_at).toLocaleDateString()})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Conversations:"}),s.jsx("p",{className:"",children:P.conversation_count||0})]}),s.jsxs("div",{children:[s.jsx("span",{className:"font-medium",children:"Documents:"}),s.jsx("p",{className:"",children:P.document_count||0})]})]})]})]})]})})]})]})}),s.jsx(Cn,{})]})},Sz=()=>s.jsx(sre,{});function a5e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const i5e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o5e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,l5e={};function kz(e,t){return(l5e.jsx?o5e:i5e).test(e)}const c5e=/[ \t\n\f\r]/g;function u5e(e){return typeof e=="object"?e.type==="text"?Cz(e.value):!1:Cz(e)}function Cz(e){return e.replace(c5e,"")===""}class Vy{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vy.prototype.normal={};Vy.prototype.property={};Vy.prototype.space=void 0;function are(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Vy(n,r,t)}function x4(e){return e.toLowerCase()}class aa{constructor(t,n){this.attribute=n,this.property=t}}aa.prototype.attribute="";aa.prototype.booleanish=!1;aa.prototype.boolean=!1;aa.prototype.commaOrSpaceSeparated=!1;aa.prototype.commaSeparated=!1;aa.prototype.defined=!1;aa.prototype.mustUseProperty=!1;aa.prototype.number=!1;aa.prototype.overloadedBoolean=!1;aa.prototype.property="";aa.prototype.spaceSeparated=!1;aa.prototype.space=void 0;let d5e=0;const zt=Hd(),yr=Hd(),y4=Hd(),Le=Hd(),Pn=Hd(),uh=Hd(),ha=Hd();function Hd(){return 2**++d5e}const v4=Object.freeze(Object.defineProperty({__proto__:null,boolean:zt,booleanish:yr,commaOrSpaceSeparated:ha,commaSeparated:uh,number:Le,overloadedBoolean:y4,spaceSeparated:Pn},Symbol.toStringTag,{value:"Module"})),Q2=Object.keys(v4);class TR extends aa{constructor(t,n,r,a){let i=-1;if(super(t,n),_z(this,"space",a),typeof r=="number")for(;++i<Q2.length;){const o=Q2[i];_z(this,Q2[i],(r&v4[o])===v4[o])}}}TR.prototype.defined=!0;function _z(e,t,n){n&&(e[t]=n)}function Xm(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new TR(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[x4(r)]=r,n[x4(i.attribute)]=r}return new Vy(t,n,e.space)}const ire=Xm({properties:{ariaActiveDescendant:null,ariaAtomic:yr,ariaAutoComplete:null,ariaBusy:yr,ariaChecked:yr,ariaColCount:Le,ariaColIndex:Le,ariaColSpan:Le,ariaControls:Pn,ariaCurrent:null,ariaDescribedBy:Pn,ariaDetails:null,ariaDisabled:yr,ariaDropEffect:Pn,ariaErrorMessage:null,ariaExpanded:yr,ariaFlowTo:Pn,ariaGrabbed:yr,ariaHasPopup:null,ariaHidden:yr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Pn,ariaLevel:Le,ariaLive:null,ariaModal:yr,ariaMultiLine:yr,ariaMultiSelectable:yr,ariaOrientation:null,ariaOwns:Pn,ariaPlaceholder:null,ariaPosInSet:Le,ariaPressed:yr,ariaReadOnly:yr,ariaRelevant:null,ariaRequired:yr,ariaRoleDescription:Pn,ariaRowCount:Le,ariaRowIndex:Le,ariaRowSpan:Le,ariaSelected:yr,ariaSetSize:Le,ariaSort:null,ariaValueMax:Le,ariaValueMin:Le,ariaValueNow:Le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ore(e,t){return t in e?e[t]:t}function lre(e,t){return ore(e,t.toLowerCase())}const f5e=Xm({attributes:{acceptcharset:"accept-charset",classname:"
1464class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:uh,acceptCharset:Pn,accessKey:Pn,action:null,allow:null,allowFullScreen:zt,allowPaymentRequest:zt,allowUserMedia:zt,alt:null,as:null,async:zt,autoCapitalize:null,autoComplete:Pn,autoFocus:zt,autoPlay:zt,blocking:Pn,capture:null,charSet:null,checked:zt,cite:null,className:Pn,cols:Le,colSpan:null,content:null,contentEditable:yr,controls:zt,controlsList:Pn,coords:Le|uh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:zt,defer:zt,dir:null,dirName:null,disabled:zt,download:y4,draggable:yr,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:zt,formTarget:null,headers:Pn,height:Le,hidden:y4,high:Le,href:null,hrefLang:null,htmlFor:Pn,httpEquiv:Pn,id:null,imageSizes:null,imageSrcSet:null,inert:zt,inputMode:null,integrity:null,is:null,isMap:zt,itemId:null,itemProp:Pn,itemRef:Pn,itemScope:zt,itemType:Pn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:zt,low:Le,manifest:null,max:null,maxLength:Le,media:null,method:null,min:null,minLength:Le,multiple:zt,muted:zt,name:null,nonce:null,noModule:zt,noValidate:zt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:zt,optimum:Le,pattern:null,ping:Pn,placeholder:null,playsInline:zt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:zt,referrerPolicy:null,rel:Pn,required:zt,reversed:zt,rows:Le,rowSpan:Le,sandbox:Pn,scope:null,scoped:zt,seamless:zt,selected:zt,shadowRootClonable:zt,shadowRootDelegatesFocus:zt,shadowRootMode:null,shape:null,size:Le,sizes:null,slot:null,span:Le,spellCheck:yr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Le,step:null,style:null,tabIndex:Le,target:null,title:null,translate:null,type:null,typeMustMatch:zt,useMap:null,value:yr,width:Le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Pn,axis:null,background:null,bgColor:null,border:Le,borderColor:null,bottomMargin:Le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:zt,declare:zt,event:null,face:null,frame:null,frameBorder:null,hSpace:Le,leftMargin:Le,link:null,longDesc:null,lowSrc:null,marginHeight:Le,marginWidth:Le,noResize:zt,noHref:zt,noShade:zt,noWrap:zt,object:null,profile:null,prompt:null,rev:null,rightMargin:Le,rules:null,scheme:null,scrolling:yr,standby:null,summary:null,text:null,topMargin:Le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:zt,disableRemotePlayback:zt,prefix:null,property:null,results:Le,security:null,unselectable:null},space:"html",transform:lre}),h5e=Xm({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
1464dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ha,accentHeight:Le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Le,amplitude:Le,arabicForm:null,ascent:Le,attributeName:null,attributeType:null,azimuth:Le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Le,by:null,calcMode:null,capHeight:Le,className:Pn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
1464dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Le,diffuseConstant:Le,direction:null,display:null,dur:null,divisor:Le,dominantBaseline:null,download:zt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Le,enableBackground:null,end:null,event:null,exponent:Le,externalResourcesRequired:null,fill:null,fillOpacity:Le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:uh,g2:uh,glyphName:uh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Le,horizOriginX:Le,horizOriginY:Le,id:null,ideographic:Le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Le,k:Le,k1:Le,k2:Le,k3:Le,k4:Le,kernelMatrix:ha,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Le,overlineThickness:Le,paintOrder:null,panose1:null,path:null,pathLength:Le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Pn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Le,pointsAtY:Le,pointsAtZ:Le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ha,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ha,rev:ha,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ha,requiredFeatures:ha,requiredFonts:ha,requiredFormats:ha,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Le,specularExponent:Le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Le,strikethroughThickness:Le,string:null,stroke:null,strokeDashArray:ha,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Le,strokeOpacity:Le,strokeWidth:null,style:null,surfaceScale:Le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ha,tabIndex:Le,tableValues:null,target:null,targetX:Le,targetY:Le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ha,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Le,underlineThickness:Le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Le,values:null,vAlphabetic:Le,vMathematical:Le,vectorEffect:null,vHanging:Le,vIdeographic:Le,version:null,vertAdvY:Le,vertOriginX:Le,vertOriginY:Le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ore}),cre=Xm({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 3,013 bytes, lines 1464-1465
1464,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ure=Xm({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lre}),dre=Xm({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),m5e={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},p5e=/[A-Z]/g,Az=/-[a-z]/g,g5e=/^data[-\w.:]+$/i;function x5e(e,t){const n=x4(t);let r=t,a=aa;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&g5e.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Az,v5e);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Az.test(i)){let o=i.replace(p5e,y5e);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}a=TR}return new a(r,t)}function y5e(e){return"-"+e.toLowerCase()}function v5e(e){return e.charAt(1).toUpperCase()}const b5e=are([ire,f5e,cre,ure,dre],"html"),IR=are([ire,h5e,cre,ure,dre],"svg");function w5e(e){return e.join(" ").trim()}var If={},Z2,Ez;function j5e(){if(Ez)return Z2;Ez=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
1465`,u="/",d="*",f="",m="comment",p="declaration";Z2=function(y,x){if(typeof y!="string")throw new TypeError("First argument must be a string");if(!y)return[];x=x||{};var w=1,N=1;function S(z){var I=z.match(t);I&&(w+=I.length);var F=z.lastIndexOf(c);N=~F?z.length-F:N+z.length}function _(){var z={line:w,column:N};return function(I){return I.position=new k(z),O(),I}}function k(z){this.start=z,this.end={line:w,column:N},this.source=x.source}k.prototype.content=y;function C(z){var I=new Error(x.source+":"+w+":"+N+": "+z);if(I.reason=z,I.filename=x.source,I.line=w,I.column=N,I.source=y,!x.silent)throw I}function E(z){var I=z.exec(y);if(I){var F=I[0];return S(F),y=y.slice(F.length),I}}function O(){E(n)}function P(z){var I;for(z=z||[];I=R();)I!==!1&&z.push(I);return z}function R(){var z=_();if(!(u!=y.charAt(0)||d!=y.charAt(1))){for(var I=2;f!=y.charAt(I)&&(d!=y.charAt(I)||u!=y.charAt(I+1));)++I;if(I+=2,f===y.charAt(I-1))return C("End of comment missing");var F=y.slice(2,I-2);return N+=2,S(F),y=y.slice(I),N+=2,z({type:m,comment:F})}}function T(){var z=_(),I=E(r);if(I){if(R(),!E(a))return C("property missing ':'");var F=E(i),U=z({type:p,property:v(I[0].replace(e,f)),value:F?v(F[0].replace(e,f)):f});return E(o),U}}function D(){var z=[];P(z);for(var I;I=T();)I!==!1&&(z.push(I),P(z));return z}return O(),D()};function v(y){return y?y.replace(l,f):f}return Z2}var Pz;
vendor: 1,922 bytes, line 1465
1465function N5e(){if(Pz)return If;Pz=1;var e=If&&If.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(If,"__esModule",{value:!0}),If.default=n;var t=e(j5e());function n(r,a){var i=null;if(!r||typeof r!="string")return i;var o=(0,t.default)(r),l=typeof a=="function";return o.forEach(function(c){if(c.type==="declaration"){var u=c.property,d=c.value;l?a(u,d,c):d&&(i=i||{},i[u]=d)}}),i}return If}var Gp={},Tz;function S5e(){if(Tz)return Gp;Tz=1,Object.defineProperty(Gp,"__esModule",{value:!0}),Gp.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},o=function(u,d){return d.toUpperCase()},l=function(u,d){return"".concat(d,"-")},c=function(u,d){return d===void 0&&(d={}),i(u)?u:(u=u.toLowerCase(),d.reactCompat?u=u.replace(a,l):u=u.replace(r,l),u.replace(t,o))};return Gp.camelCase=c,Gp}var Kp,Iz;function k5e(){if(Iz)return Kp;Iz=1;var e=Kp&&Kp.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(N5e()),n=S5e();function r(a,i){var o={};return!a||typeof a!="string"||(0,t.default)(a,function(l,c){l&&c&&(o[(0,n.camelCase)(l,i)]=c)}),o}return r.default=r,Kp=r,Kp}var C5e=k5e();const _5e=tn(C5e),fre=hre("end"),OR=hre("start");function hre(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function A5e(e){const t=OR(e),n=fre(e);if(t&&n)return{start:t,end:n}}function Tg(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Oz(e.position):"start"in e||"end"in e?Oz(e):"line"in e||"column"in e?b4(e):""}function b4(e){return Mz(e&&e.line)+":"+Mz(e&&e.column)}function Oz(e){return b4(e&&e.start)+"-"+b4(e&&e.end)}function Mz(e){return e&&typeof e=="number"?e:1}
vendor: 1,928 bytes, line 1465
1465class Ss extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},o=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(o=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=l?l.line:void 0,this.name=Tg(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ss.prototype.file="";Ss.prototype.name="";Ss.prototype.reason="";Ss.prototype.message="";Ss.prototype.stack="";Ss.prototype.column=void 0;Ss.prototype.line=void 0;Ss.prototype.ancestors=void 0;Ss.prototype.cause=void 0;Ss.prototype.fatal=void 0;Ss.prototype.place=void 0;Ss.prototype.ruleId=void 0;Ss.prototype.source=void 0;const MR={}.hasOwnProperty,E5e=new Map,P5e=/[A-Z]/g,T5e=new Set(["table","tbody","thead","tfoot","tr"]),I5e=new Set(["td","th"]),mre="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function O5e(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=B5e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 6,360 bytes, line 1465
1465if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=z5e(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?IR:b5e,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=pre(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function pre(e,t,n){if(t.type==="element")return M5e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return R5e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return L5e(e,t,n);if(t.type==="mdxjsEsm")return D5e(e,t);if(t.type==="root")return $5e(e,t,n);if(t.type==="text")return F5e(e,t)}function M5e(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=IR,e.schema=a),e.ancestors.push(t);const i=xre(e,t.tagName,!1),o=U5e(e,t);let l=DR(e,t);return T5e.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!u5e(c):!0})),gre(e,o,i,t),RR(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function R5e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Nx(e,t.position)}function D5e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nx(e,t.position)}function L5e(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=IR,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:xre(e,t.name,!0),o=H5e(e,t),l=DR(e,t);return gre(e,o,i,t),RR(o,l),e.ancestors.pop(),e.schema=r,e.create(t,i,o,n)}function $5e(e,t,n){const r={};return RR(r,DR(e,t)),e.create(t,e.Fragment,r,n)}function F5e(e,t){return t.value}function gre(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function RR(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function z5e(e,t,n){return r;function r(a,i,o,l){const u=Array.isArray(o.children)?n:t;return l?u(i,o,l):u(i,o)}}function B5e(e,t){return n;function n(r,a,i,o){const l=Array.isArray(i.children),c=OR(r);return t(a,i,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function U5e(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&MR.call(t.properties,a)){const i=q5e(e,a,t.properties[a]);if(i){const[o,l]=i;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&I5e.has(t.tagName)?r=l:n[o]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function H5e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const o=i.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Nx(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else Nx(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function DR(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:E5e;for(;++r<t.children.length;){const i=t.children[r];let o;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=a.get(c)||0;o=c+"-"+u,a.set(c,u+1)}}const l=pre(e,i,o);l!==void 0&&n.push(l)}return n}function q5e(e,t,n){const r=x5e(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?a5e(n):w5e(n)),r.property==="style"){let a=typeof n=="object"?n:V5e(e,String(n));return e.stylePropertyNameCase==="css"&&(a=W5e(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?m5e[r.property]||r.property:r.attribute,n]}}function V5e(e,t){try{return _5e(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Ss("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=mre+"#cannot-parse-style-attribute",a}}function xre(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,o;for(;++i<a.length;){const l=kz(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=o}else r=kz(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return MR.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Nx(e)}function Nx(e,t){const n=new Ss("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=mre+"#cannot-handle-mdx-estrees-without-createevaluater",n}function W5e(e){const t={};let n;for(n in e)MR.call(e,n)&&(t[G5e(n)]=e[n]);return t}function G5e(e){let t=e.replace(P5e,K5e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function K5e(e){return"-"+e.toLowerCase()}const J2={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Y5e={};function LR(e,t){const n=Y5e,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yre(e,r,a)}function yre(e,t,n){if(X5e(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Rz(e.children,t,n)}return Array.isArray(e)?Rz(e,t,n):""}function Rz(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=yre(e[a],t,n);return r.join("")}function X5e(e){return!!(e&&typeof e=="object")}const Dz=document.createElement("i");function $R(e){const t="&"+e+";";Dz.innerHTML=t;const n=Dz.textContent;
vendor: 13,053 bytes, line 1465
1465return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ka(e,t,n,r){const a=e.length;let i=0,o;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);i<r.length;)o=r.slice(i,i+1e4),o.unshift(t,0),e.splice(...o),i+=1e4,t+=1e4}function Ka(e,t){return e.length>0?(ka(e,e.length,0,t),e):t}const Lz={}.hasOwnProperty;function vre(e){const t={};let n=-1;for(;++n<e.length;)Q5e(t,e[n]);return t}function Q5e(e,t){let n;for(n in t){const a=(Lz.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){Lz.call(a,o)||(a[o]=[]);const l=i[o];Z5e(a[o],Array.isArray(l)?l:l?[l]:[])}}}function Z5e(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ka(e,0,0,r)}function bre(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Es=Gc(/[A-Za-z]/),ys=Gc(/[\dA-Za-z]/),J5e=Gc(/[#-'*+\--9=?A-Z^-~]/);function Dw(e){return e!==null&&(e<32||e===127)}const w4=Gc(/\d/),eDe=Gc(/[\dA-Fa-f]/),tDe=Gc(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function kn(e){return e!==null&&(e<0||e===32)}function Wt(e){return e===-2||e===-1||e===32}const eN=Gc(new RegExp("\\p{P}|\\p{S}","u")),bd=Gc(/\s/);function Gc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Qm(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let o="";if(i===37&&ys(e.charCodeAt(n+1))&&ys(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(o=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(o=String.fromCharCode(i,l),a=1):o="�"}else o=String.fromCharCode(i);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+a+1,o=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return o;function o(c){return Wt(c)?(e.enter(n),l(c)):t(c)}function l(c){return Wt(c)&&i++<a?(e.consume(c),l):(e.exit(n),t(c))}}const nDe={tokenize:rDe};function rDe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Zt(e,t,"linePrefix")}function a(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ht(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),o)}}const sDe={tokenize:aDe},$z={tokenize:iDe};function aDe(e){const t=this,n=[];let r=0,a,i,o;return l;function l(S){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,c,u)(S)}return u(S)}function c(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&N();const _=t.events.length;let k=_,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}w(r);let E=_;for(;E<t.events.length;)t.events[E][1].end={...C},E++;return ka(t.events,k+1,0,t.events.slice(_)),t.events.length=E,u(S)}return l(S)}function u(S){if(r===n.length){if(!a)return m(S);if(a.currentConstruct&&a.currentConstruct.concrete)return v(S);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check($z,d,f)(S)}function d(S){return a&&N(),w(r),m(S)}function f(S){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,v(S)}function m(S){return t.containerState={},e.attempt($z,p,v)(S)}function p(S){return r++,n.push([t.currentConstruct,t.containerState]),m(S)}function v(S){if(S===null){a&&N(),w(0),e.consume(S);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),y(S)}function y(S){if(S===null){x(e.exit("chunkFlow"),!0),w(0),e.consume(S);return}return ht(S)?(e.consume(S),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(S),y)}function x(S,_){const k=t.sliceStream(S);if(_&&k.push(null),S.previous=i,i&&(i.next=S),i=S,a.defineSkip(S.start),a.write(k),t.parser.lazy[S.start.line]){let C=a.events.length;for(;C--;)if(a.events[C][1].start.offset<o&&(!a.events[C][1].end||a.events[C][1].end.offset>o))return;const E=t.events.length;let O=E,P,R;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(P){R=t.events[O][1].end;break}P=!0}for(w(r),C=E;C<t.events.length;)t.events[C][1].end={...R},C++;ka(t.events,O+1,0,t.events.slice(E)),t.events.length=C}}function w(S){let _=n.length;for(;_-- >S;){const k=n[_];t.containerState=k[1],k[0].exit.call(t,e)}n.length=S}function N(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function iDe(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zh(e){if(e===null||kn(e)||bd(e))return 1;if(eN(e))return 2}function tN(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const j4={name:"attention",resolveAll:oDe,tokenize:lDe};function oDe(e,t){let n=-1,r,a,i,o,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},m={...e[n][1].start};Fz(f,-c),Fz(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Ka(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Ka(u,[["enter",a,t],["enter",o,t],["exit",o,t],["enter",i,t]]),u=Ka(u,tN(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Ka(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Ka(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ka(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lDe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Zh(r);let i;return o;function o(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=Zh(c),f=!d||d===2&&a||n.includes(c),m=!a||a===2&&d||n.includes(r);return u._open=!!(i===42?f:f&&(a||!m)),u._close=!!(i===42?m:m&&(d||!f)),t(c)}}function Fz(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cDe={name:"autolink",tokenize:uDe};function uDe(e,t,n){let r=0;return a;function a(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Es(p)?(e.consume(p),o):p===64?n(p):u(p)}function o(p){return p===43||p===45||p===46||ys(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ys(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Dw(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),d):J5e(p)?(e.consume(p),u):n(p)}function d(p){return ys(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):m(p)}function m(p){if((p===45||ys(p))&&r++<63){const v=p===45?m:f;return e.consume(p),v}return n(p)}}const Wy={partial:!0,tokenize:dDe};function dDe(e,t,n){return r;function r(i){return Wt(i)?Zt(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ht(i)?t(i):n(i)}}const wre={continuation:{tokenize:hDe},exit:mDe,name:"blockQuote",tokenize:fDe};function fDe(e,t,n){const r=this;return a;function a(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),i}return n(o)}function i(o){return Wt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function hDe(e,t,n){const r=this;return a;function a(o){return Wt(o)?Zt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):i(o)}function i(o){return e.attempt(wre,t,n)(o)}}function mDe(e){e.exit("blockQuote")}const jre={name:"characterEscape",tokenize:pDe};function pDe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return tDe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Nre={name:"characterReference",tokenize:gDe};function gDe(e,t,n){const r=this;let a=0,i,o;return l;function l(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),c}function c(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,o=ys,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=eDe,d):(e.enter("characterReferenceValue"),i=7,o=w4,d(f))}function d(f){if(f===59&&a){const m=e.exit("characterReferenceValue");return o===ys&&!$R(r.sliceSerialize(m))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&a++<i?(e.consume(f),d):n(f)}}const zz={partial:!0,tokenize:yDe},Bz={concrete:!0,name:"codeFenced",tokenize:xDe};function xDe(e,t,n){const r=this,a={partial:!0,tokenize:k};let i=0,o=0,l;return c;function c(C){return u(C)}function u(C){const E=r.events[r.events.length-1];return i=E&&E[1].type==="linePrefix"?E[2].sliceSerialize(E[1],!0).length:0,l=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(o++,e.consume(C),d):o<3?n(C):(e.exit("codeFencedFenceSequence"),Wt(C)?Zt(e,f,"whitespace")(C):f(C))}function f(C){return C===null||ht(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(zz,y,_)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||ht(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(C)):Wt(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,p,"whitespace")(C)):C===96&&C===l?n(C):(e.consume(C),m)}function p(C){return C===null||ht(C)?f(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===null||ht(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(C)):C===96&&C===l?n(C):(e.consume(C),v)}function y(C){return e.attempt(a,_,x)(C)}function x(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),w}function w(C){return i>0&&Wt(C)?Zt(e,N,"linePrefix",i+1)(C):N(C)}function N(C){return C===null||ht(C)?e.check(zz,y,_)(C):(e.enter("codeFlowValue"),S(C))}function S(C){return C===null||ht(C)?(e.exit("codeFlowValue"),N(C)):(e.consume(C),S)}function _(C){return e.exit("codeFenced"),t(C)}function k(C,E,O){let P=0;return R;function R(F){return C.enter("lineEnding"),C.consume(F),C.exit("lineEnding"),T}function T(F){return C.enter("codeFencedFence"),Wt(F)?Zt(C,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):D(F)}function D(F){return F===l?(C.enter("codeFencedFenceSequence"),z(F)):O(F)}function z(F){return F===l?(P++,C.consume(F),z):P>=o?(C.exit("codeFencedFenceSequence"),Wt(F)?Zt(C,I,"whitespace")(F):I(F)):O(F)}function I(F){return F===null||ht(F)?(C.exit("codeFencedFence"),E(F)):O(F)}}}function yDe(e,t,n){const r=this;return a;function a(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const eC={name:"codeIndented",tokenize:bDe},vDe={partial:!0,tokenize:wDe};function bDe(e,t,n){const r=this;return a;
vendor: 5,071 bytes, line 1465
1465function a(u){return e.enter("codeIndented"),Zt(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):ht(u)?e.attempt(vDe,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||ht(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function wDe(e,t,n){const r=this;return a;function a(o){return r.parser.lazy[r.now().line]?n(o):ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):Zt(e,i,"linePrefix",5)(o)}function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):ht(o)?a(o):n(o)}}const jDe={name:"codeText",previous:SDe,resolve:NDe,tokenize:kDe};function NDe(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function SDe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kDe(e,t,n){let r=0,a,i;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),r++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(i=e.enter("codeTextSequence"),a=0,d(f)):ht(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||ht(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),a++,d):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",u(f))}}class CDe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Yp(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Yp(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yp(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Yp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yp(this.left,n.reverse())}}}function Yp(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Sre(e){const t={};let n=-1,r,a,i,o,l,c,u;const d=new CDe(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_De(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(o=d.get(i),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(a&&(d.get(a)[1].type="lineEndingBlank"),o[1].type="lineEnding",a=i);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;a&&(r[1].end={...d.get(a)[1].start},l=d.slice(a,n),l.unshift(r),d.splice(a,n-a+1,l))}}return ka(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function _De(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let d,f,m=-1,p=n,v=0,y=0;const x=[y];for(;p;){for(;e.get(++a)[1]!==p;);i.push(a),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&o.defineSki
vendor: 18,649 bytes, line 1465
1465p(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(y=m+1,x.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):x.pop(),m=x.length;m--;){const w=l.slice(x[m],x[m+1]),N=i.pop();c.push([N,N+w.length-1]),e.splice(N,2,w)}for(c.reverse(),m=-1;++m<c.length;)u[v+c[m][0]]=v+c[m][1],v+=c[m][1]-c[m][0]-1;return u}const ADe={resolve:PDe,tokenize:TDe},EDe={partial:!0,tokenize:IDe};function PDe(e){return Sre(e),e}function TDe(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(l)}function a(l){return l===null?i(l):ht(l)?e.check(EDe,o,i)(l):(e.consume(l),a)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function IDe(e,t,n){const r=this;return a;function a(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Zt(e,i,"linePrefix")}function i(o){if(o===null||ht(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function kre(e,t,n,r,a,i,o,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return f;function f(w){return w===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(w),e.exit(i),m):w===null||w===32||w===41||Dw(w)?n(w):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(w))}function m(w){return w===62?(e.enter(i),e.consume(w),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(l),m(w)):w===null||w===60||ht(w)?n(w):(e.consume(w),w===92?v:p)}function v(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function y(w){return!d&&(w===null||w===41||kn(w))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(w)):d<u&&w===40?(e.consume(w),d++,y):w===41?(e.consume(w),d--,y):w===null||w===32||w===40||Dw(w)?n(w):(e.consume(w),w===92?x:y)}function x(w){return w===40||w===41||w===92?(e.consume(w),y):y(w)}}function Cre(e,t,n,r,a,i){const o=this;let l=0,c;return u;function u(p){return e.enter(r),e.enter(a),e.consume(p),e.exit(a),e.enter(i),d}function d(p){return l>999||p===null||p===91||p===93&&!c||p===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(i),e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):ht(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||ht(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!Wt(p)),p===92?m:f)}function m(p){return p===91||p===92||p===93?(e.consume(p),l++,f):f(p)}}function _re(e,t,n,r,a,i){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(a),e.consume(m),e.exit(a),o=m===40?41:m,c):n(m)}function c(m){return m===o?(e.enter(a),e.consume(m),e.exit(a),e.exit(r),t):(e.enter(i),u(m))}function u(m){return m===o?(e.exit(i),c(o)):m===null?n(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),Zt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===o||m===null||ht(m)?(e.exit("chunkString"),u(m)):(e.consume(m),m===92?f:d)}function f(m){return m===o||m===92?(e.consume(m),d):d(m)}}function Ig(e,t){let n;return r;function r(a){return ht(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):Wt(a)?Zt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const ODe={name:"definition",tokenize:RDe},MDe={partial:!0,tokenize:DDe};function RDe(e,t,n){const r=this;let a;return i;function i(p){return e.enter("definition"),o(p)}function o(p){return Cre.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return a=Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return kn(p)?Ig(e,u)(p):u(p)}function u(p){return kre(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(MDe,f,f)(p)}function f(p){return Wt(p)?Zt(e,m,"whitespace")(p):m(p)}function m(p){return p===null||ht(p)?(e.exit("definition"),r.parser.defined.push(a),t(p)):n(p)}}function DDe(e,t,n){return r;function r(l){return kn(l)?Ig(e,a)(l):n(l)}function a(l){return _re(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return Wt(l)?Zt(e,o,"whitespace")(l):o(l)}function o(l){return l===null||ht(l)?t(l):n(l)}}const LDe={name:"hardBreakEscape",tokenize:$De};function $De(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ht(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const FDe={name:"headingAtx",resolve:zDe,tokenize:BDe};function zDe(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ka(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function BDe(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&r++<6?(e.consume(d),o):d===null||kn(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||ht(d)?(e.exit("atxHeading"),t(d)):Wt(d)?Zt(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||kn(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const UDe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Uz=["pre","script","style","textarea"],HDe={concrete:!0,name:"htmlFlow",resolveTo:WDe,tokenize:GDe},qDe={partial:!0,tokenize:YDe},VDe={partial:!0,tokenize:KDe};function WDe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function GDe(e,t,n){const r=this;let a,i,o,l,c;return u;function u(W){return d(W)}function d(W){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(W),f}function f(W){return W===33?(e.consume(W),m):W===47?(e.consume(W),i=!0,y):W===63?(e.consume(W),a=3,r.interrupt?t:L):Es(W)?(e.consume(W),o=String.fromCharCode(W),x):n(W)}function m(W){return W===45?(e.consume(W),a=2,p):W===91?(e.consume(W),a=5,l=0,v):Es(W)?(e.consume(W),a=4,r.interrupt?t:L):n(W)}function p(W){return W===45?(e.consume(W),r.interrupt?t:L):n(W)}function v(W){const ie="CDATA[";return W===ie.charCodeAt(l++)?(e.consume(W),l===ie.length?r.interrupt?t:D:v):n(W)}function y(W){return Es(W)?(e.consume(W),o=String.fromCharCode(W),x):n(W)}function x(W){if(W===null||W===47||W===62||kn(W)){const ie=W===47,ve=o.toLowerCase();return!ie&&!i&&Uz.includes(ve)?(a=1,r.interrupt?t(W):D(W)):UDe.includes(o.toLowerCase())?(a=6,ie?(e.consume(W),w):r.interrupt?t(W):D(W)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(W):i?N(W):S(W))}return W===45||ys(W)?(e.consume(W),o+=String.fromCharCode(W),x):n(W)}function w(W){return W===62?(e.consume(W),r.interrupt?t:D):n(W)}function N(W){return Wt(W)?(e.consume(W),N):R(W)}function S(W){return W===47?(e.consume(W),R):W===58||W===95||Es(W)?(e.consume(W),_):Wt(W)?(e.consume(W),S):R(W)}function _(W){return W===45||W===46||W===58||W===95||ys(W)?(e.consume(W),_):k(W)}function k(W){return W===61?(e.consume(W),C):Wt(W)?(e.consume(W),k):S(W)}function C(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(e.consume(W),c=W,E):Wt(W)?(e.consume(W),C):O(W)}function E(W){return W===c?(e.consume(W),c=null,P):W===null||ht(W)?n(W):(e.consume(W),E)}function O(W){return W===null||W===34||W===39||W===47||W===60||W===61||W===62||W===96||kn(W)?k(W):(e.consume(W),O)}function P(W){return W===47||W===62||Wt(W)?S(W):n(W)}function R(W){return W===62?(e.consume(W),T):n(W)}function T(W){return W===null||ht(W)?D(W):Wt(W)?(e.consume(W),T):n(W)}function D(W){return W===45&&a===2?(e.consume(W),U):W===60&&a===1?(e.consume(W),H):W===62&&a===4?(e.consume(W),V):W===63&&a===3?(e.consume(W),L):W===93&&a===5?(e.consume(W),B):ht(W)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(qDe,K,z)(W)):W===null||ht(W)?(e.exit("htmlFlowData"),z(W)):(e.consume(W),D)}function z(W){return e.check(VDe,I,K)(W)}function I(W){return e.enter("lineEnding"),e.consume(W),e.exit("lineEnding"),F}function F(W){return W===null||ht(W)?z(W):(e.enter("htmlFlowData"),D(W))}function U(W){return W===45?(e.consume(W),L):D(W)}function H(W){return W===47?(e.consume(W),o="",q):D(W)}function q(W){if(W===62){const ie=o.toLowerCase();return Uz.includes(ie)?(e.consume(W),V):D(W)}return Es(W)&&o.length<8?(e.consume(W),o+=String.fromCharCode(W),q):D(W)}function B(W){return W===93?(e.consume(W),L):D(W)}function L(W){return W===62?(e.consume(W),V):W===45&&a===2?(e.consume(W),L):D(W)}function V(W){return W===null||ht(W)?(e.exit("htmlFlowData"),K(W)):(e.consume(W),V)}function K(W){return e.exit("htmlFlow"),t(W)}}function KDe(e,t,n){const r=this;return a;function a(o){return ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):n(o)}function i(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function YDe(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Wy,t,n)}}const XDe={name:"htmlText",tokenize:QDe};function QDe(e,t,n){const r=this;let a,i,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),k):L===63?(e.consume(L),S):Es(L)?(e.consume(L),O):n(L)}function u(L){return L===45?(e.consume(L),d):L===91?(e.consume(L),i=0,v):Es(L)?(e.consume(L),N):n(L)}function d(L){return L===45?(e.consume(L),p):n(L)}function f(L){return L===null?n(L):L===45?(e.consume(L),m):ht(L)?(o=f,H(L)):(e.consume(L),f)}function m(L){return L===45?(e.consume(L),p):f(L)}function p(L){return L===62?U(L):L===45?m(L):f(L)}function v(L){const V="CDATA[";return L===V.charCodeAt(i++)?(e.consume(L),i===V.length?y:v):n(L)}function y(L){return L===null?n(L):L===93?(e.consume(L),x):ht(L)?(o=y,H(L)):(e.consume(L),y)}function x(L){return L===93?(e.consume(L),w):y(L)}function w(L){return L===62?U(L):L===93?(e.consume(L),w):y(L)}function N(L){return L===null||L===62?U(L):ht(L)?(o=N,H(L)):(e.consume(L),N)}function S(L){return L===null?n(L):L===63?(e.consume(L),_):ht(L)?(o=S,H(L)):(e.consume(L),S)}function _(L){return L===62?U(L):S(L)}function k(L){return Es(L)?(e.consume(L),C):n(L)}function C(L){return L===45||ys(L)?(e.consume(L),C):E(L)}function E(L){return ht(L)?(o=E,H(L)):Wt(L)?(e.consume(L),E):U(L)}function O(L){return L===45||ys(L)?(e.consume(L),O):L===47||L===62||kn(L)?P(L):n(L)}function P(L){return L===47?(e.consume(L),U):L===58||L===95||Es(L)?(e.consume(L),R):ht(L)?(o=P,H(L)):Wt(L)?(e.consume(L),P):U(L)}function R(L){return L===45||L===46||L===58||L===95||ys(L)?(e.consume(L),R):T(L)}function T(L){return L===61?(e.consume(L),D):ht(L)?(o=T,H(L)):Wt(L)?(e.consume(L),T):P(L)}function D(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),a=L,z):ht(L)?(o=D,H(L)):Wt(L)?(e.consume(L),D):(e.consume(L),I)}function z(L){return L===a?(e.consume(L),a=void 0,F):L===null?n(L):ht(L)?(o=z,H(L)):(e.consume(L),z)}function I(L){return L===null||L===34||L===39||L===60||L===61||L===96?n(L):L===47||L===62||kn(L)?P(L):(e.consume(L),I)}function F(L){return L===47||L===62||kn(L)?P(L):n(L)}function U(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),t):n(L)}function H(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),q}function q(L){return Wt(L)?Zt(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),o(L)}}const FR={name:"labelEnd",resolveAll:tLe,resolveTo:nLe,tokenize:rLe},ZDe={tokenize:sLe},JDe={tokenize:aLe},eLe={tokenize:iLe};function tLe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&ka(e,0,e.length,n),e}function nLe(e,t){let n=e.length,r=0,a,i,o,l;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(o=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[o][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=Ka(l,e.slice(i+1,i+r+3)),l=Ka(l,[["enter",d,t]]),l=Ka(l,tN(t.parser.constructs.insideSpan.null,e.slice(i+r+4,o-3),t)),l=Ka(l,[["exit",d,t],e[o-2],e[o-1],["exit",u,t]]),l=Ka(l,e.slice(o+1)),l=Ka(l,[["exit",c,t]]),ka(e,i,e.length,l),e}function rLe(e,t,n){const r=this;let a=r.events.length,i,o;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return l;function l(m){return i?i._inactive?f(m):(o=r.parser.defined.includes(Mi(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(ZDe,d,o?d:f)(m):m===91?e.attempt(JDe,d,o?u:f)(m):o?d(m):f(m)}function u(m){return e.attempt(eLe,d,f)(m)}function d(m){return t(m)}function f(m){return i._balanced=!0,n(m)}}function sLe(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return kn(f)?Ig(e,i)(f):i(f)}function i(f){return f===41?d(f):kre(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return kn(f)?Ig(e,c)(f):d(f)}function l(f){return n(f)}function c(f){return f===34||f===39||f===40?_re(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return kn(f)?Ig(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function aLe(e,t,n){const r=this;return a;function a(l){return Cre.call(r,e,i,o,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(Mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function iLe(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const oLe={name:"labelStartImage",resolveAll:FR.resolveAll,tokenize:lLe};function lLe(e,t,n){const r=this;return a;function a(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const cLe={name:"labelStartLink",resolveAll:FR.resolveAll,tokenize:uLe};function uLe(e,t,n){const r=this;return a;function a(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),i}function i(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const tC={name:"lineEnding",tokenize:dLe};function dLe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}const zb={name:"thematicBreak",tokenize:fLe};function fLe(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),o(u)}function o(u){return a=u,l(u)}function l(u){return u===a?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||ht(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===a?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Wt(u)?Zt(e,l,"whitespace")(u):l(u))}}const Ws={continuation:{tokenize:gLe},exit:yLe,name:"list",tokenize:pLe},hLe={partial:!0,tokenize:vLe},mLe={partial:!0,tokenize:xLe};function pLe(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,o=0;return l;function l(p){const v=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:w4(p)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(zb,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return w4(p)&&++o<10?(e.consume(p),c):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Wy,r.interrupt?n:d,e.attempt(hLe,m,f))}
vendor: 5,418 bytes, line 1465
1465function d(p){return r.containerState.initialBlankLine=!0,i++,m(p)}function f(p){return Wt(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),m):n(p)}function m(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function gLe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Wy,a,i);function a(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!Wt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mLe,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt(Ws,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function xLe(e,t,n){const r=this;return Zt(e,a,"listItemIndent",r.containerState.size+1);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(i):n(i)}}function yLe(e){e.exit(this.containerState.type)}function vLe(e,t,n){const r=this;return Zt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const o=r.events[r.events.length-1];return!Wt(i)&&o&&o[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Hz={name:"setextUnderline",resolveTo:bLe,tokenize:wLe};function bLe(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",o,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function wLe(e,t,n){const r=this;let a;return i;function i(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),a=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===a?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Wt(u)?Zt(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||ht(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const jLe={tokenize:NLe};function NLe(e){const t=this,n=e.attempt(Wy,r,e.attempt(this.parser.constructs.flowInitial,a,Zt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(ADe,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const SLe={resolveAll:Ere()},kLe=Are("string"),CLe=Are("text");function Are(e){return{resolveAll:Ere(e==="text"?_Le:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,o,l);return o;function o(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const f=a[d];let m=-1;if(f)for(;++m<f.length;){const p=f[m];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function Ere(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function _Le(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,o=-1,l=0,c;for(;i--;){const u=a[i];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?o:r.start._bufferIndex+o,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const ALe={42:Ws,43:Ws,45:Ws,48:Ws,49:Ws,50:Ws,51:Ws,52:Ws,53:Ws,54:Ws,55:Ws,56:Ws,57:Ws,62:wre},ELe={91:ODe},PLe={[-2]:eC,[-1]:eC,32:eC},TLe={35:FDe,42:zb,45:[Hz,zb],60:HDe,61:Hz,95:zb,96:Bz,126:Bz},ILe={38:Nre,92:jre},OLe={[-5]:tC,[-4]:tC,[-3]:tC,33:oLe,38:Nre,42:j4,60:[cDe,XDe],91:cLe,92:[LDe,jre],93:FR,95:j4,96:jDe},MLe={null:[j4,SLe]},RLe={null:[42,95]},DLe={null:[]},LLe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RLe,contentInitial:ELe,disable:DLe,document:ALe,flow:TLe,flowInitial:PLe,insideSpan:MLe,string:ILe,text:OLe},Symbol.toStringTag,{value:"Module"}));function $Le(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 19,335 bytes, lines 1465-1471
1465olumn:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let o=[],l=[];const c={attempt:E(k),check:E(C),consume:N,enter:S,exit:_,interrupt:E(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:v,parser:e,previous:null,sliceSerialize:m,sliceStream:p,write:f};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function f(T){return o=Ka(o,T),x(),o[o.length-1]!==null?[]:(O(t,0),u.events=tN(i,u.events,u),u.events)}function m(T,D){return zLe(p(T),D)}function p(T){return FLe(o,T)}function v(){const{_bufferIndex:T,_index:D,line:z,column:I,offset:F}=r;return{_bufferIndex:T,_index:D,line:z,column:I,offset:F}}function y(T){a[T.line]=T.column,R()}function x(){let T;for(;r._index<o.length;){const D=o[r._index];if(typeof D=="string")for(T=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===T&&r._bufferIndex<D.length;)w(D.charCodeAt(r._bufferIndex));else w(D)}}function w(T){d=d(T)}function N(T){ht(T)?(r.line++,r.column=1,r.offset+=T===-3?2:1,R()):T!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=T}function S(T,D){const z=D||{};return z.type=T,z.start=v(),u.events.push(["enter",z,u]),l.push(z),z}function _(T){const D=l.pop();return D.end=v(),u.events.push(["exit",D,u]),D}function k(T,D){O(T,D.from)}function C(T,D){D.restore()}function E(T,D){return z;function z(I,F,U){let H,q,B,L;return Array.isArray(I)?K(I):"tokenize"in I?K([I]):V(I);function V(ge){return J;function J(ne){const Z=ne!==null&&ge[ne],oe=ne!==null&&ge.null,he=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(oe)?oe:oe?[oe]:[]];return K(he)(ne)}}function K(ge){return H=ge,q=0,ge.length===0?U:W(ge[q])}function W(ge){return J;function J(ne){return L=P(),B=ge,ge.partial||(u.currentConstruct=ge),ge.name&&u.parser.constructs.disable.null.includes(ge.name)?ve():ge.tokenize.call(D?Object.assign(Object.create(u),D):u,c,ie,ve)(ne)}}function ie(ge){return T(B,L),F}function ve(ge){return L.restore(),++q<H.length?W(H[q]):U}}}function O(T,D){T.resolveAll&&!i.includes(T)&&i.push(T),T.resolve&&ka(u.events,D,u.events.length-D,T.resolve(u.events.slice(D),u)),T.resolveTo&&(u.events=T.resolveTo(u.events,u))}function P(){const T=v(),D=u.previous,z=u.currentConstruct,I=u.events.length,F=Array.from(l);return{from:I,restore:U};function U(){r=T,u.previous=D,u.currentConstruct=z,u.events.length=I,l=F,R()}}function R(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function FLe(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let o;if(n===a)o=[e[n].slice(r,i)];else{if(o=e.slice(n,a),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}i>0&&o.push(e[a].slice(0,i))}return o}function zLe(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let o;if(typeof i=="string")o=i;else switch(i){case-5:{o="\r";break}case-4:{o=`
1466`;break}case-3:{o=`\r
1467`;break}case-2:{o=t?" ":"	";break}case-1:{if(!t&&a)continue;o=" ";break}default:o=String.fromCharCode(i)}a=i===-2,r.push(o)}return r.join("")}function BLe(e){const r={constructs:vre([LLe,...(e||{}).extensions||[]]),content:a(nDe),defined:[],document:a(sDe),flow:a(jLe),lazy:{},string:a(kLe),text:a(CLe)};return r;function a(i){return o;function o(l){return $Le(r,i,l)}}}function ULe(e){for(;!Sre(e););return e}const qz=/[\0\t\n\r]/g;function HLe(){let e=1,t="",n=!0,r;return a;function a(i,o,l){const c=[];let u,d,f,m,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(o||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(qz.lastIndex=f,u=qz.exec(i),m=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(m),!u){t=i.slice(f);break}if(p===10&&f===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),f<m&&(c.push(i.slice(f,m)),e+=m-f),p){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}f=m+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const qLe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VLe(e){return e.replace(qLe,WLe)}function WLe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return bre(n.slice(i?2:1),i?16:10)}return $R(n)||e}const Pre={}.hasOwnProperty;function GLe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),KLe(n)(ULe(BLe(n).document().write(HLe()(e,t,!0))))}function KLe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ut),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(Ee),blockQuote:i(oe),characterEscape:P,characterReference:P,codeFenced:i(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:i(he,o),codeText:i(Q,o),codeTextData:P,data:P,codeFlowValue:P,definition:i(ae),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:i(fe),hardBreakEscape:i(Re),hardBreakTrailing:i(Re),htmlFlow:i(qe,o),htmlFlowData:P,htmlText:i(qe,o),htmlTextData:P,image:i(St),label:o,link:i(Ut),listItem:i(Ue),listItemValue:m,listOrdered:i(Yt,f),listUnordered:i(Yt),paragraph:i(wt),reference:W,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:i(Ee),strong:i(At),thematicBreak:i(vn)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:Z,autolinkProtocol:ne,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:ge,characterReference:J,codeFenced:c(x),codeFencedFence:y,codeFencedFenceInfo:p,codeFencedFenceMeta:v,codeFlowValue:R,codeIndented:c(w),codeText:c(F),codeTextData:R,data:R,definition:c(),definitionDestinationString:_,definitionLabelString:N,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(z),htmlFlowData:R,htmlText:c(I),htmlTextData:R,image:c(H),label:B,labelText:q,lineEnding:T,link:c(U),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:L,resourceTitleString:V,resource:K,setextHeading:c(O),setextHeadingLineSequence:E,setextHeadingText:C,strong:c(),thematicBreak:c()}};Tre(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ye){let Ae={type:"root",children:[]};const st={stack:[Ae],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:d,data:n},jt=[];let pt=-1;for(;++pt<ye.length;)if(ye[pt][1].type==="listOrdered"||ye[pt][1].type==="listUnordered")if(ye[pt][0]==="enter")jt.push(pt);else{const jn=jt.pop();pt=a(ye,jn,pt)}for(pt=-1;++pt<ye.length;){const jn=t[ye[pt][0]];Pre.call(jn,ye[pt][1].type)&&jn[ye[pt][1].type].call(Object.assign({sliceSerialize:ye[pt][2].sliceSerialize},st),ye[pt][1])}if(st.tokenStack.length>0){const jn=st.tokenStack[st.tokenStack.length-1];(jn[1]||Vz).call(st,void 0,jn[0])}for(Ae.position={start:Jl(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Jl(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},pt=-1;++pt<t.transforms.length;)Ae=t.transforms[pt](Ae)||Ae;return Ae}function a(ye,Ae,st){let jt=Ae-1,pt=-1,jn=!1,gr,Mn,dr,ls;for(;++jt<=st;){const un=ye[jt];switch(un[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{un[0]==="enter"?pt++:pt--,ls=void 0;break}case"lineEndingBlank":{un[0]==="enter"&&(gr&&!ls&&!pt&&!dr&&(dr=jt),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!pt&&un[0]==="enter"&&un[1].type==="listItemPrefix"||pt===-1&&un[0]==="exit"&&(un[1].type==="listUnordered"||un[1].type==="listOrdered")){if(gr){let Dr=jt;for(Mn=void 0;Dr--;){const _n=ye[Dr];if(_n[1].type==="lineEnding"||_n[1].type==="lineEndingBlank"){if(_n[0]==="exit")continue;Mn&&(ye[Mn][1].type="lineEndingBlank",jn=!0),_n[1].type="lineEnding",Mn=Dr}else if(!(_n[1].type==="linePrefix"||_n[1].type==="blockQuotePrefix"||_n[1].type==="blockQuotePrefixWhitespace"||_n[1].type==="blockQuoteMarker"||_n[1].type==="listItemIndent"))break}dr&&(!Mn||dr<Mn)&&(gr._spread=!0),gr.end=Object.assign({},Mn?ye[Mn][1].start:un[1].end),ye.splice(Mn||jt,0,["exit",gr,un[2]]),jt++,st++}if(un[1].type==="listItemPrefix"){const Dr={type:"listItem",_spread:!1,start:Object.assign({},un[1].start),end:void 0};gr=Dr,ye.splice(jt,0,["enter",Dr,un[2]]),jt++,st++,dr=void 0,ls=!0}}}return ye[Ae][1]._spread=jn,st}function i(ye,Ae){return st;function st(jt){l.call(this,ye(jt),jt),Ae&&Ae.call(this,jt)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(ye,Ae,st){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([Ae,st||void 0]),ye.position={start:Jl(Ae.start),end:void 0}}function c(ye){return Ae;function Ae(st){ye&&ye.call(this,st),u.call(this,st)}}function u(ye,Ae){const st=this.stack.pop(),jt=this.tokenStack.pop();if(jt)jt[0].type!==ye.type&&(Ae?Ae.call(this,ye,jt[0]):(jt[1]||Vz).call(this,ye,jt[0]));else throw new Error("Cannot close `"+ye.type+"` ("+Tg({start:ye.start,end:ye.end})+"): it’s not open");st.position.end=Jl(ye.end)}function d(){return LR(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m(ye){if(this.data.expectingFirstListItemValue){const Ae=this.stack[this.stack.length-2];Ae.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function p(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.lang=ye}function v(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.meta=ye}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ye.replace(/(\r?\n|\r)$/g,"")}function N(ye){const Ae=this.resume(),st=this.stack[this.stack.length-1];st.label=Ae,st.identifier=Mi(this.sliceSerialize(ye)).toLowerCase()}function S(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=ye}function _(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=ye}function k(ye){const Ae=this.stack[this.stack.length-1];if(!Ae.depth){const st=this.sliceSerialize(ye).length;Ae.depth=st}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function E(ye){const Ae=this.stack[this.stack.length-1];Ae.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function P(ye){const st=this.stack[this.stack.length-1].children;let jt=st[st.length-1];(!jt||jt.type!=="text")&&(jt=cn(),jt.position={start:Jl(ye.start),end:void 0},st.push(jt)),this.stack.push(jt)}function R(ye){const Ae=this.stack.pop();Ae.value+=this.sliceSerialize(ye),Ae.position.end=Jl(ye.end)}function T(ye){const Ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const st=Ae.children[Ae.children.length-1];st.position.end=Jl(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ae.type)&&(P.call(this,ye),R.call(this,ye))}function D(){this.data.atHardBreak=!0}function z(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ye}function I(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ye}function F(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.value=ye}function U(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Ae,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function H(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const Ae=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=Ae,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function q(ye){const Ae=this.sliceSerialize(ye),st=this.stack[this.stack.length-2];st.label=VLe(Ae),st.identifier=Mi(Ae).toLowerCase()}function B(){const ye=this.stack[this.stack.length-1],Ae=this.resume(),st=this.stack[this.stack.length-1];if(this.data.inReference=!0,st.type==="link"){const jt=ye.children;st.children=jt}else st.alt=Ae}function L(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.url=ye}function V(){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.title=ye}function K(){this.data.inReference=void 0}function W(){this.data.referenceType="collapsed"}function ie(ye){const Ae=this.resume(),st=this.stack[this.stack.length-1];st.label=Ae,st.identifier=Mi(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function ve(ye){this.data.characterReferenceType=ye.type}function ge(ye){const Ae=this.sliceSerialize(ye),st=this.data.characterReferenceType;let jt;st?(jt=bre(Ae,st==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):jt=$R(Ae);const pt=this.stack[this.stack.length-1];pt.value+=jt}function J(ye){const Ae=this.stack.pop();Ae.position.end=Jl(ye.end)}function ne(ye){R.call(this,ye);const Ae=this.stack[this.stack.length-1];Ae.url=this.sliceSerialize(ye)}function Z(ye){R.call(this,ye);const Ae=this.stack[this.stack.length-1];Ae.url="mailto:"+this.sliceSerialize(ye)}function oe(){return{type:"blockquote",children:[]}}function he(){return{type:"code",lang:null,meta:null,value:""}}function Q(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function Ee(){return{type:"heading",depth:0,children:[]}}function Re(){return{type:"break"}}function qe(){return{type:"html",value:""}}function St(){return{type:"image",title:null,url:"",alt:null}}function Ut(){return{type:"link",title:null,url:"",children:[]}}function Yt(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function Ue(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function wt(){return{type:"paragraph",children:[]}}function At(){return{type:"strong",children:[]}}function cn(){return{type:"text",value:""}}function vn(){return{type:"thematicBreak"}}}function Jl(e){return{line:e.line,column:e.column,offset:e.offset}}function Tre(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Tre(e,r):YLe(e,r)}}function YLe(e,t){let n;for(n in t)if(Pre.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Vz(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Tg({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tg({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tg({start:t.start,end:t.end})+") is still open")}function XLe(e){const t=this;t.parser=n;function n(r){return GLe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function QLe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function ZLe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
1468`}]}function JLe(e,t){const n=t.value?t.value+`
1469`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function e6e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function t6e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n6e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Qm(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function r6e(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s6e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ire(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const o=a[a.length-1];return o&&o.type==="text"?o.value+=r:a.push({type:"text",value:r}),a}function a6e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ire(e,t);const a={src:Qm(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function i6e(e,t){const n={src:Qm(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function o6e(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function l6e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ire(e,t);const a={href:Qm(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function c6e(e,t){const n={href:Qm(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function u6e(e,t,n){const r=e.all(t),a=n?d6e(n):Ore(t),i={},o=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(a||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
1470`}),d.type==="element"&&d.tagName==="p"&&!a?o.push(...d.children):o.push(d)}const c=r[r.length-1];c&&(a||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
1471`});const u={type:"element",tagName:"li",properties:i,children:o};
vendor: 4,483 bytes, line 1471
1471return e.patch(t,u),e.applyData(t,u)}function d6e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ore(n[r])}return t}function Ore(e){const t=e.spread;return t??e.children.length>1}function f6e(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const o=r[a];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function h6e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function m6e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function p6e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function g6e(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),a.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=OR(t.children[1]),c=fre(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),a.push(o)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function x6e(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const f=t.children[c],m={},p=o?o[c]:void 0;p&&(m.align=p);let v={type:"element",tagName:i,properties:m,children:[]};f&&(v.children=e.all(f),e.patch(f,v),v=e.applyData(f,v)),u.push(v)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function y6e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Wz=9,Gz=32;function v6e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Kz(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Kz(t.slice(a),a>0,!1)),i.join("")}function Kz(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===Wz||i===Gz;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===Wz||i===Gz;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function b6e(e,t){const n={type:"text",value:v6e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function w6e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const j6e={blockquote:QLe,break:ZLe,code:JLe,delete:e6e,emphasis:t6e,footnoteReference:n6e,heading:r6e,html:s6e,imageReference:a6e,image:i6e,inlineCode:o6e,linkReference:l6e,link:c6e,listItem:u6e,list:f6e,paragraph:h6e,root:m6e,strong:p6e,table:g6e,tableCell:y6e,tableRow:x6e,text:b6e,thematicBreak:w6e,toml:nb,yaml:nb,definition:nb,footnoteDefinition:nb};function nb(){}const Mre=-1,nN=0,Og=1,Lw=2,zR=3,BR=4,UR=5,HR=6,Rre=7,Dre=8,Yz=typeof self=="object"?self:globalThis,N6e=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,o]=t[a];switch(i){case nN:case Mre:return n(o,a);case Og:{const l=n([],a);for(const c of o)l.push(r(c));return l}case Lw:{const l=n({},a);for(const[c,u]of o)l[r(c)]=r(u);return l}case zR:return n(new Date(o),a);case BR:{const{source:l,flags:c}=o;return n(new RegExp(l,c),a)}case UR:{const l=n(new Map,a);for(const[c,u]of o)l.set(r(c),r(u));return l}case HR:{const l=n(new Set,a);for(const c of o)l.add(r(c));return l}case Rre:{const{name:l,message:c}=o;return n(new Yz[l](c),a)}case Dre:return n(BigInt(o),a);case"BigInt":return n(Object(BigInt(o)),a);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new Yz[i](o),a)};return r},Xz=e=>N6e(new Map,e)(0),Of="",{toString:S6e}={},{keys:k6e}=Object,Xp=e=>{const t=typeof e;if(t!=="object"||!e)return[nN,t];const n=S6e.call(e).slice(8,-1);switch(n){case"Array":return[Og,Of];case"Object":return[Lw,Of];case"Date":return[zR,Of];case"RegExp":return[BR,Of];case"Map":return[UR,Of];case"Set":return[HR,Of];case"DataView":return[Og,n]}return n.includes("Array")?[Og,n]:n.includes("Error")?[Rre,n]:[Lw,n]}
vendor: 5,618 bytes, lines 1471-1473
1471,rb=([e,t])=>e===nN&&(t==="function"||t==="symbol"),C6e=(e,t,n,r)=>{const a=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},i=o=>{if(n.has(o))return n.get(o);let[l,c]=Xp(o);switch(l){case nN:{let d=o;switch(c){case"bigint":l=Dre,d=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return a([Mre],o)}return a([l,d],o)}case Og:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),a([c,[...m]],o)}const d=[],f=a([l,d],o);for(const m of o)d.push(i(m));return f}case Lw:{if(c)switch(c){case"BigInt":return a([c,o.toString()],o);case"Boolean":case"Number":case"String":return a([c,o.valueOf()],o)}if(t&&"toJSON"in o)return i(o.toJSON());const d=[],f=a([l,d],o);for(const m of k6e(o))(e||!rb(Xp(o[m])))&&d.push([i(m),i(o[m])]);return f}case zR:return a([l,o.toISOString()],o);case BR:{const{source:d,flags:f}=o;return a([l,{source:d,flags:f}],o)}case UR:{const d=[],f=a([l,d],o);for(const[m,p]of o)(e||!(rb(Xp(m))||rb(Xp(p))))&&d.push([i(m),i(p)]);return f}case HR:{const d=[],f=a([l,d],o);for(const m of o)(e||!rb(Xp(m)))&&d.push(i(m));return f}}const{message:u}=o;return a([l,{name:c,message:u}],o)};return i},Qz=(e,{json:t,lossy:n}={})=>{const r=[];return C6e(!(t||n),!!t,new Map,r)(e),r},$w=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Xz(Qz(e,t)):structuredClone(e):(e,t)=>Xz(Qz(e,t));function _6e(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function A6e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function E6e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_6e,r=e.options.footnoteBackLabel||A6e,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),m=Qm(f.toLowerCase());let p=0;const v=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++p<=y;){v.length>0&&v.push({type:"text",value:" "});let N=typeof n=="string"?n:n(c,p);typeof N=="string"&&(N={type:"text",value:N}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const x=d[d.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const N=x.children[x.children.length-1];N&&N.type==="text"?N.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...v)}else d.push(...v);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(d,!0)};e.patch(u,w),l.push(w)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...$w(o),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
1472`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
1473`}]}}const rN=(function(e){if(e==null)return O6e;if(typeof e=="function")return sN(e);if(typeof e=="object")return Array.isArray(e)?P6e(e):T6e(e);if(typeof e=="string")return I6e(e);throw new Error("Expected function, string, or object as test")});function P6e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rN(e[n]);return sN(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function T6e(e){const t=e;return sN(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function I6e(e){return sN(t);function t(n){return n&&n.type===e}}function sN(e){return t;function t(n,r,a){return!!(M6e(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function O6e(){return!0}function M6e(e){return e!==null&&typeof e=="object"&&"type"in e}const Lre=[],R6e=!0,N4=!1,D6e="skip";function $re(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=rN(a),o=r?-1:1;l(e,void 0,[])();function l(c,u,d){const f=c&&typeof c=="object"?c:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return m;function m(){let p=Lre,v,y,x;if((!t||i(c,u,d[d.length-1]||void 0))&&(p=L6e(n(c,d)),p[0]===N4))return p;if("children"in c&&c.children){const w=c;if(w.children&&p[0]!==D6e)for(y=(r?w.children.length:-1)+o,x=d.concat(w);y>-1&&y<w.children.length;){const N=w.children[y];if(v=l(N,y,x)(),v[0]===N4)return v;y=typeof v[1]=="number"?v[1]:y+o}}return p}}}function L6e(e){return Array.isArray(e)?e:typeof e=="number"?[R6e,e]:e==null?Lre:[e]}function qR(e,t,n,r){let a,i,o;typeof t=="function"&&typeof n!="function"?(i=void 0,o=t,a=n):(i=t,o=n,a=r),$re(e,i,l,a);function l(c,u){const d=u[u.length-1],f=d?d.children.indexOf(c):void 0;return o(c,f,d)}}const S4={}.hasOwnProperty,$6e={};function F6e(e,t){const n=t||$6e,r=new Map,a=new Map,i=new Map,o={...j6e,...n.handlers},l={all:u,applyData:B6e,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:o,one:c,options:n,patch:z6e,wrap:H6e};return qR(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:a,m=String(d.identifier).toUpperCase();f.has(m)||f.set(m,d)}}),l;function c(d,f){const m=d.type,p=l.handlers[m];if(S4.call(l.handlers,m)&&p)return p(l,d,f);
vendor: 11,518 bytes, lines 1473-1477
1473if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in d){const{children:y,...x}=d,w=$w(x);return w.children=l.all(d),w}return $w(d)}return(l.options.unknownHandler||U6e)(l,d,f)}function u(d){const f=[];if("children"in d){const m=d.children;let p=-1;for(;++p<m.length;){const v=l.one(m[p],d);if(v){if(p&&m[p-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=Zz(v.value)),!Array.isArray(v)&&v.type==="element")){const y=v.children[0];y&&y.type==="text"&&(y.value=Zz(y.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function z6e(e,t){e.position&&(t.position=A5e(e))}function B6e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&i&&Object.assign(n.properties,$w(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function U6e(e,t){const n=t.data||{},r="value"in t&&!(S4.call(n,"hProperties")||S4.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function H6e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
1474`});++r<e.length;)r&&n.push({type:"text",value:`
1475`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
1476`}),n}function Zz(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Jz(e,t){const n=F6e(e,t),r=n.one(e,void 0),a=E6e(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
1477`},a),i}function q6e(e,t){return e&&"run"in e?async function(n,r){const a=Jz(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Jz(n,{file:r,...e||t})}}function eB(e){if(e)throw e}var nC,tB;function V6e(){if(tB)return nC;tB=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var d=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!d&&!f)return!1;var m;for(m in u);return typeof m>"u"||e.call(u,m)},o=function(u,d){n&&d.name==="__proto__"?n(u,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):u[d.name]=d.newValue},l=function(u,d){if(d==="__proto__")if(e.call(u,d)){if(r)return r(u,d).value}else return;return u[d]};return nC=function c(){var u,d,f,m,p,v,y=arguments[0],x=1,w=arguments.length,N=!1;for(typeof y=="boolean"&&(N=y,y=arguments[1]||{},x=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});x<w;++x)if(u=arguments[x],u!=null)for(d in u)f=l(y,d),m=l(u,d),y!==m&&(N&&m&&(i(m)||(p=a(m)))?(p?(p=!1,v=f&&a(f)?f:[]):v=f&&i(f)?f:{},o(y,{name:d,newValue:c(N,v,m)})):typeof m<"u"&&o(y,{name:d,newValue:m}));return y},nC}var W6e=V6e();const rC=tn(W6e);function k4(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)}function G6e(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const o=a.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...a);function l(c,...u){const d=e[++i];let f=-1;if(c){o(c);return}for(;++f<a.length;)(u[f]===null||u[f]===void 0)&&(u[f]=a[f]);a=u,d?K6e(d,l)(...u):o(null,...u)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function K6e(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(a);try{c=e.apply(this,o)}catch(u){const d=u;if(l&&n)throw d;return a(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,a):c instanceof Error?a(c):i(c))}function a(o,...l){n||(n=!0,t(o,...l))}function i(o){a(null,o)}}const Yi={basename:Y6e,dirname:X6e,extname:Q6e,join:Z6e,sep:"/"};function Y6e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Gy(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else o<0&&(i=!0,o=a+1),l>-1&&(e.codePointAt(a)===t.codePointAt(l--)?l<0&&(r=a):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function X6e(e){if(Gy(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Q6e(e){Gy(e);let t=e.length,n=-1,r=0,a=-1,i=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Z6e(...e){let t=-1,n;for(;++t<e.length;)Gy(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":J6e(n)}function J6e(e){Gy(e);const t=e.codePointAt(0)===47;let n=e$e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function e$e(e,t){let n="",r=0,a=-1,i=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(a===o-1||i===1))if(a!==o-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),a=o,i=0;continue}}else if(n.length>0){n="",r=0,a=o,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,o):n=e.slice(a+1,o),r=o-a-1;a=o,i=0}else l===46&&i>-1?i++:i=-1}return n}function Gy(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const t$e={cwd:n$e};function n$e(){return"/"}function C4(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function r$e(e){if(typeof e=="string")e=new URL(e);else if(!C4(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return s$e(e)}function s$e(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const sC=["history","path","basename","stem","extname","dirname"];class Fre{constructor(t){let n;t?C4(t)?n={path:t}:typeof t=="string"||a$e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":t$e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<sC.length;){const i=sC[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)sC.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Yi.basename(this.path):void 0}set basename(t){iC(t,"basename"),aC(t,"basename"),this.path=Yi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Yi.dirname(this.path):void 0}set dirname(t){nB(this.basename,"dirname"),this.path=Yi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Yi.extname(this.path):void 0}set extname(t){if(aC(t,"extname"),nB(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Yi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){C4(t)&&(t=r$e(t)),iC(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Yi.basename(this.path,this.extname):void 0}set stem(t){iC(t,"stem"),aC(t,"stem"),this.path=Yi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Ss(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function aC(e,t){if(e&&e.includes(Yi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Yi.sep+"`")}function iC(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function nB(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function a$e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const i$e=(function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),o$e={}.hasOwnProperty;class VR extends i$e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=G6e()}copy(){const t=new VR;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(rC(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(cC("data",this.frozen),this.namespace[t]=n,this):o$e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(cC("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=sb(t),r=this.parser||this.Parser;return oC("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),oC("process",this.parser||this.Parser),lC("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,o){const l=sb(t),c=r.parse(l);r.run(c,l,function(d,f,m){if(d||!f||!m)return u(d);const p=f,v=r.stringify(p,m);u$e(v)?m.value=v:m.result=v,u(d,m)});function u(d,f){d||!f?o(d):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),oC("processSync",this.parser||this.Parser),lC("processSync",this.compiler||this.Compiler),this.process(t,a),sB("processSync","process",n),r;function a(i,o){n=!0,eB(i),r=o}}run(t,n,r){rB(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(o,l){const c=sb(n);a.run(t,c,u);function u(d,f,m){const p=f||t;d?l(d):o?o(p):r(void 0,p,m)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),sB("runSync","run",r),a;function i(o,l){eB(o),a=l,r=!0}}stringify(t,n){this.freeze();const r=sb(n),a=this.compiler||this.Compiler;
vendor: 4,150 bytes, line 1477
1477return lC("stringify",a),rB(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(cC("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;c(d,f)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(a.settings=rC(!0,a.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let f=-1,m=-1;for(;++f<r.length;)if(r[f][0]===u){m=f;break}if(m===-1)r.push([u,...d]);else if(d.length>0){let[p,...v]=d;const y=r[m][1];k4(y)&&k4(p)&&(p=rC(!0,y,p)),r[m]=[u,p,...v]}}}}const l$e=new VR().freeze();function oC(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function lC(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function cC(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rB(e){if(!k4(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sB(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function sb(e){return c$e(e)?e:new Fre(e)}function c$e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function u$e(e){return typeof e=="string"||d$e(e)}function d$e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const f$e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",aB=[],iB={allowDangerousHtml:!0},h$e=/^(https?|ircs?|mailto|xmpp)$/i,m$e=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function p$e(e){const t=g$e(e),n=x$e(e);return y$e(t.runSync(t.parse(n),n),e)}function g$e(e){const t=e.rehypePlugins||aB,n=e.remarkPlugins||aB,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...iB}:iB;return l$e().use(XLe).use(n).use(q6e,r).use(t)}function x$e(e){const t=e.children||"",n=new Fre;return typeof t=="string"&&(n.value=t),n}function y$e(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||v$e;for(const d of m$e)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+f$e+d.id,void 0);return qR(e,u),O5e(e,{Fragment:s.Fragment,components:a,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(d,f,m){if(d.type==="raw"&&m&&typeof f=="number")return o?m.children.splice(f,1):m.children[f]={type:"text",value:d.value},f;
vendor: 6,144 bytes, lines 1477-1478
1477if(d.type==="element"){let p;for(p in J2)if(Object.hasOwn(J2,p)&&Object.hasOwn(d.properties,p)){const v=d.properties[p],y=J2[p];(y===null||y.includes(d.tagName))&&(d.properties[p]=c(String(v||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(d,f,m)),p&&m&&typeof f=="number")return l&&d.children?m.children.splice(f,1,...d.children):m.children.splice(f,1),f}}}function v$e(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||h$e.test(e.slice(0,t))?e:""}function oB(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}function b$e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function w$e(e,t,n){const a=rN((n||{}).ignore||[]),i=j$e(t);let o=-1;for(;++o<i.length;)$re(e,"text",l);function l(u,d){let f=-1,m;for(;++f<d.length;){const p=d[f],v=m?m.children:void 0;if(a(p,v?v.indexOf(p):void 0,m))return;m=p}if(m)return c(u,d)}function c(u,d){const f=d[d.length-1],m=i[o][0],p=i[o][1];let v=0;const x=f.children.indexOf(u);let w=!1,N=[];m.lastIndex=0;let S=m.exec(u.value);for(;S;){const _=S.index,k={index:S.index,input:S.input,stack:[...d,u]};let C=p(...S,k);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?m.lastIndex=_+1:(v!==_&&N.push({type:"text",value:u.value.slice(v,_)}),Array.isArray(C)?N.push(...C):C&&N.push(C),v=_+S[0].length,w=!0),!m.global)break;S=m.exec(u.value)}return w?(v<u.value.length&&N.push({type:"text",value:u.value.slice(v)}),f.children.splice(x,1,...N)):N=[u],x+N.length}}function j$e(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const a=n[r];t.push([N$e(a[0]),S$e(a[1])])}return t}function N$e(e){return typeof e=="string"?new RegExp(b$e(e),"g"):e}function S$e(e){return typeof e=="function"?e:function(){return e}}const uC="phrasing",dC=["autolink","link","image","label"];function k$e(){return{transforms:[I$e],enter:{literalAutolink:_$e,literalAutolinkEmail:fC,literalAutolinkHttp:fC,literalAutolinkWww:fC},exit:{literalAutolink:T$e,literalAutolinkEmail:P$e,literalAutolinkHttp:A$e,literalAutolinkWww:E$e}}}function C$e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:uC,notInConstruct:dC},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:uC,notInConstruct:dC},{character:":",before:"[ps]",after:"\\/",inConstruct:uC,notInConstruct:dC}]}}function _$e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function fC(e){this.config.enter.autolinkProtocol.call(this,e)}function A$e(e){this.config.exit.autolinkProtocol.call(this,e)}function E$e(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function P$e(e){this.config.exit.autolinkEmail.call(this,e)}function T$e(e){this.exit(e)}function I$e(e){w$e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,O$e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M$e]],{ignore:["link","linkReference"]})}function O$e(e,t,n,r,a){let i="";if(!zre(a)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!R$e(n)))return!1;const o=D$e(n+r);if(!o[0])return!1;const l={type:"link",title:null,url:i+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function M$e(e,t,n,r){return!zre(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function R$e(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function D$e(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const a=oB(e,"(");let i=oB(e,")");for(;r!==-1&&a>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function zre(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||bd(n)||eN(n))&&(!t||n!==47)}Bre.peek=V$e;function L$e(){this.buffer()}function $$e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function F$e(){this.buffer()}function z$e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function B$e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U$e(e){this.exit(e)}function H$e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q$e(e){this.exit(e)}function V$e(){return"["}function Bre(e,t,n,r){const a=n.createTracker(r);let i=a.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return i+=a.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),o(),i+=a.move("]"),i}function W$e(){return{enter:{gfmFootnoteCallString:L$e,gfmFootnoteCall:$$e,gfmFootnoteDefinitionLabelString:F$e,gfmFootnoteDefinition:z$e},exit:{gfmFootnoteCallString:B$e,gfmFootnoteCall:U$e,gfmFootnoteDefinitionLabelString:H$e,gfmFootnoteDefinition:q$e}}}function G$e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bre},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,a,i,o){const l=i.createTracker(o);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?`
1478`:" ")+i.indentLines(i.containerFlow(r,l.current()),t?Ure:K$e))),u(),c}}function K$e(e,t,n){return t===0?e:Ure(e,t,n)}function Ure(e,t,n){return(n?"":"    ")+e}const Y$e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hre.peek=eFe;
vendor: 8,893 bytes, lines 1478-1490
1478function X$e(){return{canContainEols:["delete"],enter:{strikethrough:Z$e},exit:{strikethrough:J$e}}}function Q$e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Y$e}],handlers:{delete:Hre}}}function Z$e(e){this.enter({type:"delete",children:[]},e)}function J$e(e){this.exit(e)}function Hre(e,t,n,r){const a=n.createTracker(r),i=n.enter("strikethrough");let o=a.move("~~");return o+=n.containerPhrasing(e,{...a.current(),before:o,after:"~"}),o+=a.move("~~"),i(),o}function eFe(){return"~"}function tFe(e){return e.length}function nFe(e,t){const n=t||{},r=(n.align||[]).concat(),a=n.stringLength||tFe,i=[],o=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const y=[],x=[];let w=-1;for(e[d].length>u&&(u=e[d].length);++w<e[d].length;){const N=rFe(e[d][w]);if(n.alignDelimiters!==!1){const S=a(N);x[w]=S,(c[w]===void 0||S>c[w])&&(c[w]=S)}y.push(N)}o[d]=y,l[d]=x}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)i[f]=lB(r[f]);else{const y=lB(r);for(;++f<u;)i[f]=y}f=-1;const m=[],p=[];for(;++f<u;){const y=i[f];let x="",w="";y===99?(x=":",w=":"):y===108?x=":":y===114&&(w=":");let N=n.alignDelimiters===!1?1:Math.max(1,c[f]-x.length-w.length);const S=x+"-".repeat(N)+w;n.alignDelimiters!==!1&&(N=x.length+N+w.length,N>c[f]&&(c[f]=N),p[f]=N),m[f]=S}o.splice(1,0,m),l.splice(1,0,p),d=-1;const v=[];for(;++d<o.length;){const y=o[d],x=l[d];f=-1;const w=[];for(;++f<u;){const N=y[f]||"";let S="",_="";if(n.alignDelimiters!==!1){const k=c[f]-(x[f]||0),C=i[f];C===114?S=" ".repeat(k):C===99?k%2?(S=" ".repeat(k/2+.5),_=" ".repeat(k/2-.5)):(S=" ".repeat(k/2),_=S):_=" ".repeat(k)}n.delimiterStart!==!1&&!f&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&N==="")&&(n.delimiterStart!==!1||f)&&w.push(" "),n.alignDelimiters!==!1&&w.push(S),w.push(N),n.alignDelimiters!==!1&&w.push(_),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&w.push("|")}v.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return v.join(`
1479`)}function rFe(e){return e==null?"":String(e)}function lB(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function sFe(e,t,n,r){const a=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const o=n.indentLines(n.containerFlow(e,i.current()),aFe);return a(),o}function aFe(e,t,n){return">"+(n?"":" ")+e}function iFe(e,t){return cB(e,t.inConstruct,!0)&&!cB(e,t.notInConstruct,!1)}function cB(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uB(e,t,n,r){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
1480`&&iFe(n.stack,n.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
1481`}function oFe(e,t){const n=String(e);let r=n.indexOf(t),a=r,i=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===a?++i>o&&(o=i):i=1,a=r+t.length,r=n.indexOf(t,a);return o}function lFe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function cFe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function uFe(e,t,n,r){const a=cFe(n),i=e.value||"",o=a==="`"?"GraveAccent":"Tilde";if(lFe(e,n)){const f=n.enter("codeIndented"),m=n.indentLines(i,dFe);return f(),m}const l=n.createTracker(r),c=a.repeat(Math.max(oFe(i,a)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const f=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:`
1482`,encode:["`"],...l.current()})),f()}return d+=l.move(`
1483`),i&&(d+=l.move(i+`
1484`)),d+=l.move(c),u(),d}function dFe(e,t,n){return(n?"":"    ")+e}function WR(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fFe(e,t,n,r){const a=WR(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
1485`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),o(),u}function hFe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Sx(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Fw(e,t,n){const r=Zh(e),a=Zh(t);return r===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qre.peek=mFe;function qre(e,t,n,r){const a=hFe(n),i=n.enter("emphasis"),o=n.createTracker(r),l=o.move(a);let c=o.move(n.containerPhrasing(e,{after:a,before:l,...o.current()}));const u=c.charCodeAt(0),d=Fw(r.before.charCodeAt(r.before.length-1),u,a);d.inside&&(c=Sx(u)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Fw(r.after.charCodeAt(0),f,a);m.inside&&(c=c.slice(0,-1)+Sx(f));const p=o.move(a);return i(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+p}function mFe(e,t,n){return n.options.emphasis||"*"}function pFe(e,t){let n=!1;return qR(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,N4}),!!((!e.depth||e.depth<3)&&LR(e)&&(t.options.setext||n))}function gFe(e,t,n,r){const a=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(pFe(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),m=n.containerPhrasing(e,{...i.current(),before:`
1486`,after:`
1487`});return f(),d(),m+`
1488`+(a===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
1489`))+1))}const o="#".repeat(a),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(o+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
1490`,...i.current()});return/^[\t ]/.test(u)&&(u=Sx(u.charCodeAt(0))+u.slice(1)),u=u?o+" "+u:o,n.options.closeAtx&&(u+=" "+o),c(),l(),u}Vre.peek=xFe;function Vre(e){return e.value||""}function xFe(){return"<"}Wre.peek=yFe;function Wre(e,t,n,r){const a=WR(n),i=a==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+a),u+=c.move(n.safe(e.title,{before:u,after:a,...c.current()})),u+=c.move(a),l()),u+=c.move(")"),o(),u}function yFe(){return"!"}Gre.peek=vFe;function Gre(e,t,n,r){const a=e.referenceType,i=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),a==="full"||!u||u!==f?c+=l.move(f+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function vFe(){return"!"}Kre.peek=bFe;function Kre(e,t,n){let r=e.value||"",a="`",i=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const o=n.unsafe[i],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return a+r+a}function bFe(){return"`"}function Yre(e,t){const n=LR(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Xre.peek=wFe;function Xre(e,t,n,r){const a=WR(n),i=a==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let l,c;if(Yre(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">
1490"),l(),n.stack=d,f}l=n.enter("link"),c=n.enter("label");let u=o.move("[");return u+=o.move(n.containerPhrasing(e,{before:u,after:"](",...o.current()})),u+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=o.move("<"),u+=o.move(n.safe(e.url,{before:u,after:">",...o.current()})),u+=o.move(">")):(c=n.enter("destinationRaw"),u+=o.move(n.safe(e.url,{before:u,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=o.move(" "+a),u+=o.move(n.safe(e.title,{before:u,after:a,...o.current()})),u+=o.move(a),c()),u+=o.move(")"),l(),u}function wFe(e,t,n){return Yre(e,n)?"<":"["}Qre.peek=jFe;function Qre(e,t,n,r){const a=e.referenceType,i=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return o(),n.stack=d,i(),a==="full"||!u||u!==f?c+=l.move(f+"]"):a==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function jFe(){return"["}function GR(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function NFe(e){const t=GR(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function SFe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Zre(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kFe(e,t,n,r){const a=n.enter("list"),i=n.bulletCurrent;let o=e.ordered?SFe(n):GR(n);const l=e.ordered?o==="."?")":".":NFe(n);let c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Zre(n)===o&&d){let f=-1;for(;++f<e.children.length;){const m=e.children[f];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const u=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=i,a(),u}function CFe(e){const t=e.options.listItemIndent||"one";
vendor: 5,510 bytes, lines 1490-1492
1490if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _Fe(e,t,n,r){const a=CFe(n);let i=n.bulletCurrent||GR(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let o=i.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(o-i.length)),l.shift(o);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(f,m,p){return m?(p?"":" ".repeat(o))+f:(p?i:i+" ".repeat(o-i.length))+f}}function AFe(e,t,n,r){const a=n.enter("paragraph"),i=n.enter("phrasing"),o=n.containerPhrasing(e,r);return i(),a(),o}const EFe=rN(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function PFe(e,t,n,r){return(e.children.some(function(o){return EFe(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function TFe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Jre.peek=IFe;function Jre(e,t,n,r){const a=TFe(n),i=n.enter("strong"),o=n.createTracker(r),l=o.move(a+a);let c=o.move(n.containerPhrasing(e,{after:a,before:l,...o.current()}));const u=c.charCodeAt(0),d=Fw(r.before.charCodeAt(r.before.length-1),u,a);d.inside&&(c=Sx(u)+c.slice(1));const f=c.charCodeAt(c.length-1),m=Fw(r.after.charCodeAt(0),f,a);m.inside&&(c=c.slice(0,-1)+Sx(f));const p=o.move(a+a);return i(),n.attentionEncodeSurroundingInfo={after:m.outside,before:d.outside},l+c+p}function IFe(e,t,n){return n.options.strong||"*"}function OFe(e,t,n,r){return n.safe(e.value,r)}function MFe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function RFe(e,t,n){const r=(Zre(n)+(n.options.ruleSpaces?" ":"")).repeat(MFe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ese={blockquote:sFe,break:uB,code:uFe,definition:fFe,emphasis:qre,hardBreak:uB,heading:gFe,html:Vre,image:Wre,imageReference:Gre,inlineCode:Kre,link:Xre,linkReference:Qre,list:kFe,listItem:_Fe,paragraph:AFe,root:PFe,strong:Jre,text:OFe,thematicBreak:RFe};function DFe(){return{enter:{table:LFe,tableData:dB,tableHeader:dB,tableRow:FFe},exit:{codeText:zFe,table:$Fe,tableData:hC,tableHeader:hC,tableRow:hC}}}function LFe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $Fe(e){this.exit(e),this.data.inTable=void 0}function FFe(e){this.enter({type:"tableRow",children:[]},e)}function hC(e){this.exit(e)}function dB(e){this.enter({type:"tableCell",children:[]},e)}function zFe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BFe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BFe(e,t){return t==="|"?t:e}function UFe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,a=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
1491`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:o,tableCell:c,tableRow:l}};function o(p,v,y,x){return u(d(p,y,x),p.align)}function l(p,v,y,x){const w=f(p,y,x),N=u([w]);return N.slice(0,N.indexOf(`
1492`))}function c(p,v,y,x){const w=y.enter("tableCell"),N=y.enter("phrasing"),S=y.containerPhrasing(p,{...x,before:i,after:i});return N(),w(),S}function u(p,v){return nFe(p,{align:v,alignDelimiters:r,padding:n,stringLength:a})}function d(p,v,y){const x=p.children;let w=-1;const N=[],S=v.enter("table");for(;++w<x.length;)N[w]=f(x[w],v,y);return S(),N}function f(p,v,y){const x=p.children;let w=-1;const N=[],S=v.enter("tableRow");for(;++w<x.length;)N[w]=c(x[w],p,v,y);return S(),N}function m(p,v,y){let x=ese.inlineCode(p,v,y);return y.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function HFe(){return{exit:{taskListCheckValueChecked:fB,taskListCheckValueUnchecked:fB,paragraph:VFe}}}function qFe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:WFe}}}function fB(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function VFe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const a=t.children;let i=-1,o;for(;++i<a.length;){const l=a[i];if(l.type==="paragraph"){o=l;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function WFe(e,t,n,r){const a=e.children[0],i=typeof e.checked=="boolean"&&a&&a.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(o);let c=ese.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+o}}
vendor: 6,515 bytes, line 1492
1492function GFe(){return[k$e(),W$e(),X$e(),DFe(),HFe()]}function KFe(e){return{extensions:[C$e(),G$e(e),Q$e(),UFe(e),qFe()]}}const YFe={tokenize:t8e,partial:!0},tse={tokenize:n8e,partial:!0},nse={tokenize:r8e,partial:!0},rse={tokenize:s8e,partial:!0},XFe={tokenize:a8e,partial:!0},sse={name:"wwwAutolink",tokenize:JFe,previous:ise},ase={name:"protocolAutolink",tokenize:e8e,previous:ose},Nl={name:"emailAutolink",tokenize:ZFe,previous:lse},jo={};function QFe(){return{text:jo}}let xu=48;for(;xu<123;)jo[xu]=Nl,xu++,xu===58?xu=65:xu===91&&(xu=97);jo[43]=Nl;jo[45]=Nl;jo[46]=Nl;jo[95]=Nl;jo[72]=[Nl,ase];jo[104]=[Nl,ase];jo[87]=[Nl,sse];jo[119]=[Nl,sse];function ZFe(e,t,n){const r=this;let a,i;return o;function o(f){return!_4(f)||!lse.call(r,r.previous)||KR(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(f))}function l(f){return _4(f)?(e.consume(f),l):f===64?(e.consume(f),c):n(f)}function c(f){return f===46?e.check(XFe,d,u)(f):f===45||f===95||ys(f)?(i=!0,e.consume(f),c):d(f)}function u(f){return e.consume(f),a=!0,c}function d(f){return i&&a&&Es(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function JFe(e,t,n){const r=this;return a;function a(o){return o!==87&&o!==119||!ise.call(r,r.previous)||KR(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(YFe,e.attempt(tse,e.attempt(nse,i),n),n)(o))}function i(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function e8e(e,t,n){const r=this;let a="",i=!1;return o;function o(f){return(f===72||f===104)&&ose.call(r,r.previous)&&!KR(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(f),e.consume(f),l):n(f)}function l(f){if(Es(f)&&a.length<5)return a+=String.fromCodePoint(f),e.consume(f),l;if(f===58){const m=a.toLowerCase();if(m==="http"||m==="https")return e.consume(f),c}return n(f)}function c(f){return f===47?(e.consume(f),i?u:(i=!0,c)):n(f)}function u(f){return f===null||Dw(f)||kn(f)||bd(f)||eN(f)?n(f):e.attempt(tse,e.attempt(nse,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function t8e(e,t,n){let r=0;return a;function a(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),a):o===46&&r===3?(e.consume(o),i):n(o)}function i(o){return o===null?n(o):t(o)}}function n8e(e,t,n){let r,a,i;return o;function o(u){return u===46||u===95?e.check(rse,c,l)(u):u===null||kn(u)||bd(u)||u!==45&&eN(u)?c(u):(i=!0,e.consume(u),o)}function l(u){return u===95?r=!0:(a=r,r=void 0),e.consume(u),o}function c(u){return a||r||!i?n(u):t(u)}}function r8e(e,t){let n=0,r=0;return a;function a(o){return o===40?(n++,e.consume(o),a):o===41&&r<n?i(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rse,t,i)(o):o===null||kn(o)||bd(o)?t(o):(e.consume(o),a)}function i(o){return o===41&&r++,e.consume(o),a}}function s8e(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),a):l===60||l===null||kn(l)||bd(l)?t(l):n(l)}function a(l){return l===null||l===40||l===91||kn(l)||bd(l)?t(l):r(l)}function i(l){return Es(l)?o(l):n(l)}function o(l){return l===59?(e.consume(l),r):Es(l)?(e.consume(l),o):n(l)}}function a8e(e,t,n){return r;function r(i){return e.consume(i),a}function a(i){return ys(i)?n(i):t(i)}}function ise(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kn(e)}function ose(e){return!Es(e)}function lse(e){return!(e===47||_4(e))}function _4(e){return e===43||e===45||e===46||e===95||ys(e)}function KR(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const i8e={tokenize:m8e,partial:!0};function o8e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:d8e,continuation:{tokenize:f8e},exit:h8e}},text:{91:{name:"gfmFootnoteCall",tokenize:u8e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:l8e,resolveTo:c8e}}}}function l8e(e,t,n){const r=this;let a=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;a--;){const c=r.events[a][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const u=Mi(r.sliceSerialize({start:o.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function c8e(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function u8e(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,o;return l;function l(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),c}function c(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(i>999||f===93&&!o||f===null||f===91||kn(f))return n(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return a.includes(Mi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return kn(f)||(o=!0),i++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}
vendor: 1,234 bytes, line 1492
1492}function d8e(e,t,n){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,o=0,l;return c;function c(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(v)}function d(v){if(o>999||v===93&&!l||v===null||v===91||kn(v))return n(v);if(v===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Mi(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return kn(v)||(l=!0),o++,e.consume(v),v===92?f:d}function f(v){return v===91||v===92||v===93?(e.consume(v),o++,d):d(v)}function m(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),a.includes(i)||a.push(i),Zt(e,p,"gfmFootnoteDefinitionWhitespace")):n(v)}function p(v){return t(v)}}function f8e(e,t,n){return e.check(Wy,t,e.attempt(i8e,t,n))}
vendor: 5,331 bytes, line 1492
1492function h8e(e){e.exit("gfmFootnoteDefinition")}function m8e(e,t,n){const r=this;return Zt(e,a,"gfmFootnoteDefinitionIndent",5);function a(i){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(i):n(i)}}function p8e(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:a};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function a(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let u=c;for(;u--;)if(o[u][0]==="exit"&&o[u][1].type==="strikethroughSequenceTemporary"&&o[u][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[u][1].end.offset-o[u][1].start.offset){o[c][1].type="strikethroughSequence",o[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[u][1].start),end:Object.assign({},o[c][1].end)},f={type:"strikethroughText",start:Object.assign({},o[u][1].end),end:Object.assign({},o[c][1].start)},m=[["enter",d,l],["enter",o[u][1],l],["exit",o[u][1],l],["enter",f,l]],p=l.parser.constructs.insideSpan.null;p&&ka(m,m.length,0,tN(p,o.slice(u+1,c),l)),ka(m,m.length,0,[["exit",f,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),ka(o,u-1,c-u+3,m),c=u+m.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function i(o,l,c){const u=this.previous,d=this.events;let f=0;return m;function m(v){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(v):(o.enter("strikethroughSequenceTemporary"),p(v))}function p(v){const y=Zh(u);if(v===126)return f>1?c(v):(o.consume(v),f++,p);if(f<2&&!n)return c(v);const x=o.exit("strikethroughSequenceTemporary"),w=Zh(v);return x._open=!w||w===2&&!!y,x._close=!y||y===2&&!!w,l(v)}}}class g8e{constructor(){this.map=[]}add(t,n,r){x8e(this,t,n,r)}consume(t){if(this.map.sort(function(i,o){return i[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let a=r.pop();for(;a;){for(const i of a)t.push(i);a=r.pop()}this.map.length=0}}function x8e(e,t,n,r){let a=0;if(!(n===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...r);return}a+=1}e.map.push([t,n,r])}}function y8e(e,t){let n=!1;const r=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function v8e(){return{flow:{null:{name:"table",tokenize:b8e,resolveAll:w8e}}}}function b8e(e,t,n){const r=this;let a=0,i=0,o;return l;function l(R){let T=r.events.length-1;for(;T>-1;){const I=r.events[T][1].type;if(I==="lineEnding"||I==="linePrefix")T--;else break}const D=T>-1?r.events[T][1].type:null,z=D==="tableHead"||D==="tableRow"?C:c;return z===C&&r.parser.lazy[r.now().line]?n(R):z(R)}function c(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(o=!0,i+=1),d(R)}function d(R){return R===null?n(R):ht(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),p):n(R):Wt(R)?Zt(e,d,"whitespace")(R):(i+=1,o&&(o=!1,a+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),o=!0,d):(e.enter("data"),f(R)))}function f(R){return R===null||R===124||kn(R)?(e.exit("data"),d(R)):(e.consume(R),R===92?m:f)}function m(R){return R===92||R===124?(e.consume(R),f):f(R)}function p(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),o=!1,Wt(R)?Zt(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):v(R))}function v(R){return R===45||R===58?x(R):R===124?(o=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),y):k(R)}function y(R){return Wt(R)?Zt(e,x,"whitespace")(R):x(R)}function x(R){return R===58?(i+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),w):R===45?(i+=1,w(R)):R===null||ht(R)?_(R):k(R)}function w(R){return R===45?(e.enter("tableDelimiterFiller"),N(R)):k(R)}function N(R){return R===45?(e.consume(R),N):R===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(R))}function S(R){return Wt(R)?Zt(e,_,"whitespace")(R):_(R)}function _(R){return R===124?v(R):R===null||ht(R)?!o||a!==i?k(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):k(R)}function k(R){return n(R)}function C(R){return e.enter("tableRow"),E(R)}function E(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),E):R===null||ht(R)?(e.exit("tableRow"),t(R)):Wt(R)?Zt(e,E,"whitespace")(R):(e.enter("data"),O(R))}function O(R){return R===null||R===124||kn(R)?(e.exit("data"),E(R)):(e.consume(R),R===92?P:O)}function P(R){return R===92||R===124?(e.consume(R),O):O(R)}}function w8e(e,t){let n=-1,r=!0,a=0,i=[0,0,0,0],o=[0,0,0,0],l=!1,
vendor: 6,142 bytes, line 1492
1492c=0,u,d,f;const m=new g8e;for(;++n<e.length;){const p=e[n],v=p[1];p[0]==="enter"?v.type==="tableHead"?(l=!1,c!==0&&(hB(m,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},m.add(n,0,[["enter",u,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},m.add(n,0,[["enter",d,t]])),a=v.type==="tableDelimiterRow"?2:d?3:1):a&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(i[1]!==0&&(o[0]=o[1],f=ab(m,t,i,a,void 0,f),i=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(o[0]=o[1],f=ab(m,t,i,a,void 0,f)),i=o,o=[i[1],n,0,0])):v.type==="tableHead"?(l=!0,c=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(c=n,i[1]!==0?(o[0]=o[1],f=ab(m,t,i,a,n,f)):o[1]!==0&&(f=ab(m,t,o,a,n,f)),a=0):a&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&hB(m,t,c,u,d),m.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=y8e(t.events,n))}return e}function ab(e,t,n,r,a,i){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},Bf(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Bf(t.events,n[1]);if(i={type:o,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Bf(t.events,n[2]),d=Bf(t.events,n[3]),f={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const m=t.events[n[2]],p=t.events[n[3]];if(m[1].end=Object.assign({},p[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,y=n[3]-n[2]-1;e.add(v,y,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return a!==void 0&&(i.end=Object.assign({},Bf(t.events,a)),e.add(a,0,[["exit",i,t]]),i=void 0),i}function hB(e,t,n,r,a){const i=[],o=Bf(t.events,n);a&&(a.end=Object.assign({},o),i.push(["exit",a,t])),r.end=Object.assign({},o),i.push(["exit",r,t]),e.add(n+1,0,i)}function Bf(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const j8e={name:"tasklistCheck",tokenize:S8e};function N8e(){return{text:{91:j8e}}}function S8e(e,t,n){const r=this;return a;function a(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return kn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return ht(c)?t(c):Wt(c)?e.check({tokenize:k8e},t,n)(c):n(c)}}function k8e(e,t,n){return Zt(e,r,"whitespace");function r(a){return a===null?n(a):t(a)}}function C8e(e){return vre([QFe(),o8e(),p8e(e),v8e(),N8e()])}const _8e={};function A8e(e){const t=this,n=e||_8e,r=t.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(C8e(n)),i.push(GFe()),o.push(KFe(n))}const yu=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",E8e=e=>{const t=/(https?:\/\/[\w\-._~:/?#[\]@!$&'()*+,;=%]+)/gi;return e.split(t).map((r,a)=>r.match(t)?s.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 underline break-all",children:r},a):s.jsx("span",{style:{whiteSpace:"pre-wrap"},children:r},a))},P8e=({content:e})=>s.jsx("div",{className:"text-sm lg:text-base leading-relaxed break-words",children:s.jsx(p$e,{remarkPlugins:[A8e],components:{a:({node:t,...n})=>s.jsx("a",{className:"text-blue-600 underline break-all",target:"_blank",rel:"noopener noreferrer",...n}),code:({node:t,className:n,children:r,...a})=>typeof n=="string"&&n.includes("language-")?s.jsx("pre",{className:"bg-gray-900 text-gray-100 p-3 rounded-md overflow-x-auto",children:s.jsx("code",{className:n,...a,children:r})}):s.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded",...a,children:r}),p:({node:t,...n})=>s.jsx("p",{className:"mb-2 whitespace-pre-wrap",...n}),ul:({node:t,...n})=>s.jsx("ul",{className:"list-disc pl-6 mb-2",...n}),ol:({node:t,...n})=>s.jsx("ol",{className:"list-decimal pl-6 mb-2",...n}),li:({node:t,...n})=>s.jsx("li",{className:"mb-1",...n}),h1:({node:t,...n})=>s.jsx("h1",{className:"text-lg font-semibold mb-2",...n}),h2:({node:t,...n})=>s.jsx("h2",{className:"text-base font-semibold mb-2",...n}),h3:({node:t,...n})=>s.jsx("h3",{className:"text-base font-medium mb-2",...n}),blockquote:({node:t,...n})=>s.jsx("blockquote",{className:"border-l-4 pl-3 italic text-gray-600 dark:text-gray-300 mb-2",...n}),table:({node:t,...n})=>s.jsx("div",{className:"overflow-x-auto",children:s.jsx("table",{className:"min-w-full border-collapse",...n})}),th:({node:t,...n})=>s.jsx("th",{className:"border px-2 py-1",...n}),td:({node:t,...n})=>s.jsx("td",{className:"border px-2 py-1",...n})},children:e})}),mC=()=>{var ge;const{agentId:e}=wO(),t=qt(),{user:n,signOut:r}=nr(),[a,i]=b.useState(null),[o,l]=b.useState(!0),[c,u]=b.useState(null),[d,f]=b.useState([]),[m,p]=b.useState(""),[v,y]=b.useState(!1),[x,w]=b.useState(null),[N,S]=b.useState(!1),[_,k]=b.useState(null),[C,E]=b.useState([]),[O,P]=b.useState(null),R=b.useRef(null),T=b.useRef(null);_t();const D=b.useRef(null),z=b.useRef(null),I=b.useRef(!0),F=J=>{let ne=document.querySelector("link[rel='icon']");ne||(ne=document.createElement("link"),ne.rel="icon",document.head.appendChild(ne)),ne.href=J;let Z=document.querySelector("link[rel='shortcut icon']");Z||(Z=document.createElement("link"),Z.rel="shortcut icon",document.head.appendChild(Z)),Z.href=J};b.useEffect(()=>{var ne,Z;if(D.current==null){const oe=((ne=document.querySelector("link[rel='icon']"))==null?void 0:ne.href)||((
1492Z=document.querySelector("link[rel='shortcut icon']"))==null?void 0:Z.href)||"/favicon.ico";D.current=oe}const J=yu(a==null?void 0:a.logo);return J&&F(J),()=>{D.current&&F(D.current)}},[a==null?void 0:a.logo]),b.useEffect(()=>(z.current==null&&(z.current=document.title),a!=null&&a.name&&(document.title=a.name),()=>{z.current&&(document.title=z.current)}),[a==null?void 0:a.name]);const U=()=>{if(!a)return;const J=`Hello! I'm ${a.name}.`,ne=a.description?` ${a.description}`:` ${a.prompt}`;f([{id:"welcome",role:"assistant",content:J+ne,timestamp:new Date}]),w(null)},H=window!==window.parent,q=()=>{var ne,Z;const J=(ne=T.current)==null?void 0:ne.querySelector("[data-radix-scroll-area-viewport]");if(J){const oe=H?"auto":"smooth";requestAnimationFrame(()=>{J.scrollTo({top:J.scrollHeight,behavior:oe})});return}(Z=R.current)==null||Z.scrollIntoView({behavior:H?"auto":"smooth",block:"nearest",inline:"nearest"})};b.useEffect(()=>{if(I.current){I.current=!1;return}q()},[d]),b.useEffect(()=>{if(H)return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",window.scrollTo(0,0),()=>{document.body.style.overflow="",document.documentElement.style.overflow=""}},[H]),b.useEffect(()=>{(async()=>{var ne,Z,oe,he;try{l(!0),u(null);const Q=Une(e),ae=Q!==null?await Pt.getAgent(Q):await Pt.getCustomAgent();console.log("Agent colors:",{base_color:ae.base_color,text_color:ae.text_color}),i(ae);const fe=`Hello! I'm ${ae.name}.`,Ee=ae.description?` ${ae.description}`:` ${ae.prompt}`;f([{id:"welcome",role:"assistant",content:fe+Ee,timestamp:new Date}])}catch(Q){if(console.error("Failed to load agent:",Q),(Q==null?void 0:Q.status)===401){const ae=window.location.pathname+window.location.search;sessionStorage.setItem("authReturnUrl",ae),e&&sessionStorage.setItem("agentAccessContext",JSON.stringify({agentId:e,returnUrl:ae})),t("/login");return}if((Q==null?void 0:Q.status)===403){const ae=((ne=Q==null?void 0:Q.data)==null?void 0:ne.message)||(Q==null?void 0:Q.message)||"Access denied",fe=window.location.pathname+window.location.search;let Ee=e||"",Re=((Z=Q==null?void 0:Q.data)==null?void 0:Z.agent_name)||"this agent";if(!Ee)try{const qe=await Pt.getCustomAgentPublic();qe&&qe.id&&(Ee=qe.id.toString(),Re=qe.name||Re)}catch(qe){console.error("Failed to fetch public agent info:",qe);const St=((oe=Q==null?void 0:Q.data)==null?void 0:oe.agent_id)||((he=Q==null?void 0:Q.data)==null?void 0:he.id);St&&(Ee=String(St))}sessionStorage.setItem("accessDeniedContext",JSON.stringify({id:Ee,name:Re,returnUrl:fe,error:ae})),t(`/access-denied?agentId=${Ee}&agentName=${encodeURIComponent(Re)}&returnUrl=${encodeURIComponent(fe)}&error=${encodeURIComponent(ae)}`);return}u("Agent not found or unavailable")}finally{l(!1)}})()},[e,t]);const B=async J=>{const ne=(J??m).trim();if(!ne||v||!a)return;const Z={id:Date.now().toString(),role:"user",content:ne,timestamp:new Date};f(oe=>[...oe,Z]),p(""),y(!0),E([]);try{const oe=(Date.now()+1).toString(),he={id:oe,role:"assistant",content:"",timestamp:new Date};f(Q=>[...Q,he]),k(oe),await Pt.queryAgentStream(a.id,ne,x||void 0,{onMeta:Q=>{x||w(Q.session_id)},onStatus:(Q,ae)=>{const fe={retrieve_start:"Searching knowledge base...",retrieve_end:(ae==null?void 0:ae.doc_count)===0?"No relevant documents found":`Found ${(ae==null?void 0:ae.doc_count)??"?"} relevant documents`,generate_start:"Generating response..."};P(fe[Q]??Q)},onToolEvent:Q=>{E(ae=>[...ae,{type:Q.type,tool:Q.tool,output:Q.output?String(Q.output):void 0}])},onToken:Q=>{f(ae=>ae.map(fe=>fe.id===oe?{...fe,content:(fe.content||"")+Q}:fe))},onFinal:Q=>{var ae;x||w(Q.session_id),P(null),(ae=Q.results)!=null&&ae.answer&&f(fe=>fe.map(Ee=>Ee.id===oe?{...Ee,content:Q.results.answer}:Ee))},onError:Q=>{console.error("Streaming error:",Q),f(ae=>ae.map(fe=>fe.id===oe?{...fe,content:"I couldn't fetch that info right now — mind trying again in a moment?"}:fe)),k(null),E([]),P(null)}})}catch(oe){console.error("Chat error:",oe),(Date.now()+1).toString()}finally{y(!1),k(null),E([]),P(null)}},L=J=>{J.key==="Enter"&&!J.shiftKey&&(J.preventDefault(),B())},V=J=>{B(J)};if(o)return s.jsx("div",{className:"h-screen w-full bg-white dark:bg-gray-900 flex items-center justify-center",children:s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Loading agent..."})]})});if(c||!a)return s.jsx("div",{className:"h-screen w-full bg-white dark:bg-gray-900 flex items-center justify-center p-4",children:s.jsxs("div",{className:"text-center max-w-sm",children:[s.jsx(so,{className:"h-12 w-12 mx-auto text-gray-400 mb-4"}),s.jsx("h3",{className:"text-lg font-medium text-gray-900 dark:text-white mb-2",children:"Agent Unavailable"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:c||"The requested agent could not be found."})]})});const K=((ge=a.converstation_starter)==null?void 0:ge.length)>0?a.converstation_starter:["Hello, how can you help me?","What services do you provide?","Can you tell me about your capabilities?","What kind of questions can I ask you?"],W=_?d.find(J=>J.id===_):null,ie=!!(W&&W.content&&W.content.trim().length>0),ve=v&&!ie;return s.jsxs("div",{className:`h-screen h-[100dvh] h-[100svh] w-full flex flex-col overflow-hidden min-h-0 bg-white dark:bg-gray-900 ${H?"":"max-w-md md:max-w-full mx-auto lg:max-w-4xl xl:max-w-6xl 2xl:max-w-7xl lg:rou
1492nded-xl lg:border lg:border-gray-200 dark:lg:border-gray-700 lg:shadow-sm overflow-hidden"}`,children:[s.jsxs("div",{className:"flex flex-col gap-3 p-3 lg:p-4 border-b relative z-10 shrink-0 sm:flex-row sm:items-center sm:justify-between",style:{backgroundColor:a.base_color||"#3B82F6",borderColor:"transparent"},children:[s.jsxs("div",{className:"flex items-center space-x-3 lg:space-x-4 flex-1 min-w-0",children:[s.jsx("div",{className:"w-8 h-8 lg:w-10 lg:h-10 rounded-full flex items-center justify-center text-white font-semibold overflow-hidden flex-shrink-0",style:{backgroundColor:a.base_color||"#3B82F6"},children:yu(a.logo)?s.jsx("img",{src:yu(a.logo),alt:`${a.name} logo`,className:"w-full h-full object-cover rounded-full",onError:J=>{J.target.style.display="none";const ne=J.target.parentElement;ne&&(ne.innerHTML=a.name.charAt(0).toUpperCase())}}):a.name.charAt(0).toUpperCase()}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h1",{className:"font-semibold text-sm lg:text-base truncate",style:{color:a.text_color||"#FFFFFF"},children:a.name}),s.jsxs("div",{className:"flex items-center space-x-1",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse flex-shrink-0"}),s.jsx("span",{className:"text-xs lg:text-sm",style:{color:a.text_color||"#FFFFFF",opacity:.8},children:"Online"})]}),!H&&s.jsx("p",{className:"hidden lg:block text-xs mt-1 truncate",style:{color:a.text_color||"#FFFFFF",opacity:.7},children:a.description||a.prompt})]})]}),s.jsxs("div",{className:"flex items-center space-x-2 sm:space-x-1",children:[s.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-white/30 px-2.5 py-1 text-[11px] lg:text-xs max-w-[180px] sm:max-w-[220px]",style:{color:a.text_color||"#FFFFFF"},children:[s.jsx(li,{className:"h-3 w-3 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:(n==null?void 0:n.email)||"Guest"})]}),n&&s.jsx(Y,{variant:"ghost",size:"sm",onClick:r,className:"h-7 w-7 p-0 border border-transparent hover:border-white/30 transition-colors",style:{color:a.text_color||"#FFFFFF"},title:"Log out",children:s.jsx(XO,{className:"h-3.5 w-3.5"})}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:U,className:"text-xs lg:text-sm border transition-colors",style:{color:a.text_color||"#FFFFFF",borderColor:a.text_color||"#FFFFFF",backgroundColor:"transparent"},onMouseEnter:J=>{J.currentTarget.style.backgroundColor=a.text_color||"#FFFFFF",J.currentTarget.style.color=a.base_color||"#3B82F6",J.currentTarget.style.opacity="0.9"},onMouseLeave:J=>{J.currentTarget.style.backgroundColor="transparent",J.currentTarget.style.color=a.text_color||"#FFFFFF",J.currentTarget.style.opacity="1"},children:"Clear chat"})]})]}),!N&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:`flex-1 min-h-0 overflow-hidden bg-gray-50 dark:bg-gray-800 ${H?"":"lg:bg-gray-25 lg:dark:bg-gray-850"}`,children:s.jsx(js,{className:"h-full",ref:T,children:s.jsxs("div",{className:"p-3 lg:p-6 space-y-3 lg:space-y-4 max-w-md md:max-w-full lg:max-w-4xl xl:max-w-6xl 2xl:max-w-7xl mx-auto",children:[s.jsx(ci,{children:d.map(J=>J.role==="assistant"&&J.id===_&&(!J.content||J.content.trim().length===0)?null:s.jsx(Gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:`flex ${J.role==="user"?"justify-end":"justify-start"}`,children:s.jsxs("div",{className:`flex items-start space-x-2 lg:space-x-3 max-w-[85%] lg:max-w-[70%] ${J.role==="user"?"flex-row-reverse space-x-reverse lg:space-x-reverse":""}`,children:[s.jsx("div",{className:"w-6 h-6 lg:w-8 lg:h-8 rounded-full flex items-center justify-center text-white text-xs lg:text-sm font-semibold flex-shrink-0 overflow-hidden",style:{backgroundColor:a.base_color||"#3B82F6"},children:J.role==="assistant"?yu(a.logo)?s.jsx("img",{src:yu(a.logo),alt:"Agent",className:"w-full h-full object-cover rounded-full",onError:ne=>{ne.target.style.display="none";const Z=ne.target.parentElement;Z&&(Z.innerHTML='<svg class="h-3 w-3 lg:h-4 lg:w-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>')}}):s.jsx(so,{className:"h-3 w-3 lg:h-4 lg:w-4"}):s.jsx(li,{className:"h-3 w-3 lg:h-4 lg:w-4"})}),s.jsxs("div",{className:`rounded-2xl px-3 py-2 lg:px-4 lg:py-3 ${J.role==="user"?"rounded-br-md":"bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 border border-gray-200 dark:border-gray-600 rounded-bl-md shadow-sm"}`,style:J.role==="user"?{backgroundColor:a.base_color||"#3B82F6",color:a.text_color||"#FFFFFF"}:{},children:[J.role==="assistant"?s.jsx(P8e,{content:J.content}):s.jsx("div",{className:"text-sm lg:text-base leading-relaxed break-words",children:E8e(J.content)}),(J.role==="user"||J.content&&J.content.trim().length>0)&&s.jsx("p",{className:`text-xs lg:text-sm mt-1 ${J.role==="user"?"":"text-gray-400 dark:text-gray-500"}`,style:J.role==="user"?{color:a.text_color||"#FFFFFF",opacity:.7}:{},children:J.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})},J.id))}),ve&&s.jsx(Gt.div,{initial:{opacity:0,y:10}
1492,animate:{opacity:1,y:0},className:"flex justify-start",children:s.jsxs("div",{className:"flex items-start space-x-2 lg:space-x-3 max-w-[85%] lg:max-w-[70%]",children:[s.jsx("div",{className:"w-6 h-6 lg:w-8 lg:h-8 rounded-full flex items-center justify-center text-white text-xs lg:text-sm font-semibold flex-shrink-0 overflow-hidden",style:{backgroundColor:a.base_color||"#3B82F6"},children:yu(a.logo)?s.jsx("img",{src:yu(a.logo),alt:"Agent",className:"w-full h-full object-cover rounded-full",onError:J=>{J.target.style.display="none";const ne=J.target.parentElement;ne&&(ne.innerHTML='<svg class="h-3 w-3 lg:h-4 lg:w-4" fill="currentColor" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>')}}):s.jsx(so,{className:"h-3 w-3 lg:h-4 lg:w-4"})}),s.jsxs("div",{className:"bg-white dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-2xl rounded-bl-md px-3 py-2 lg:px-4 lg:py-3 shadow-sm min-w-[80px]",children:[C.length>0&&s.jsx("div",{className:"mb-2 space-y-1",children:C.map((J,ne)=>s.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:J.type==="tool_start"?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-blue-400 animate-pulse"}),s.jsx("span",{className:"text-blue-500 font-medium",children:"Running:"}),s.jsx("span",{className:"text-gray-600 dark:text-gray-300 truncate max-w-[180px]",children:J.tool})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-green-400"}),s.jsx("span",{className:"text-green-600 font-medium",children:"Done:"}),s.jsxs("span",{className:"text-gray-600 dark:text-gray-300 truncate max-w-[180px]",children:[J.tool,J.output?` → ${J.output}`:""]})]})},ne))}),O&&s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:O}),s.jsxs("div",{className:"flex space-x-1",children:[s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce"}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})]})]})}),d.length<=1&&s.jsxs("div",{className:"space-y-2 lg:space-y-3 mt-4 lg:mt-6",children:[s.jsx("p",{className:"text-xs lg:text-sm text-gray-500 dark:text-gray-400 px-1",children:"Try asking:"}),s.jsx("div",{className:"grid gap-2 lg:gap-3 lg:grid-cols-2",children:K.slice(0,4).map((J,ne)=>s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>V(J),className:"w-full text-left justify-start items-start h-auto p-2 lg:p-3 text-xs lg:text-sm bg-white dark:bg-gray-700 border-gray-200 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-600 shadow-sm",children:[s.jsx(di,{className:"h-3 w-3 lg:h-4 lg:w-4 mr-2 flex-shrink-0"}
1492),s.jsx("span",{className:"flex-1 min-w-0 whitespace-normal break-words",children:J})]},ne))})]}),s.jsx("div",{ref:R})]})})}),s.jsxs("div",{className:"border-t border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 p-3 lg:p-4 shrink-0",children:[s.jsxs("div",{className:"flex items-center space-x-2 lg:space-x-3 max-w-md md:max-w-full lg:max-w-4xl xl:max-w-6xl 2xl:max-w-7xl mx-auto",children:[s.jsx(_e,{value:m,onChange:J=>p(J.target.value),onKeyPress:L,onFocus:J=>{H&&(J.target.scrollIntoView=()=>{})},placeholder:a.input_text_hint?a.input_text_hint:`Message ${a.name}...`,disabled:v,className:"flex-1 rounded-full lg:rounded-lg border-gray-300 dark:border-gray-600 text-[16px] sm:text-base bg-gray-50 dark:bg-gray-800 focus:bg-white dark:focus:bg-gray-700 lg:h-12"}),s.jsx(Y,{onClick:()=>B(),disabled:!m.trim()||v,size:"sm",className:"rounded-full w-8 h-8 lg:w-12 lg:h-12 p-0 text-white hover:opacity-90 flex-shrink-0",style:{backgroundColor:a.base_color||"#3B82F6"},children:v?s.jsx(kr,{className:"h-4 w-4 lg:h-5 lg:w-5 animate-spin"}):s.jsx(Hm,{className:"h-4 w-4 lg:h-5 lg:w-5"})})]}),s.jsx("p",{className:"mt-3 text-center text-[10px] lg:text-xs text-gray-400 dark:text-gray-500 max-w-md md:max-w-full lg:max-w-4xl xl:max-w-6xl 2xl:max-w-7xl mx-auto",children:"This AI chat can make mistakes. Consider checking important information."})]})]})]})},T8e=({onPromptSubmit:e,onVoiceInput:t,className:n=""})=>{const[r,a]=b.useState(""),[i,o]=b.useState(!1),[l,c]=b.useState([{id:"chlorine-agent",label:"Chlorine Monitor",type:"agent",active:!1},{id:"north-plant",label:"North Plant",type:"location",active:!1},{id:"day-shift",label:"Day Shift",type:"operator",active:!1},{id:"high-severity",label:"High",type:"severity",active:!1},{id:"medium-severity",label:"Medium",type:"severity",active:!1}]),u=m=>{m.preventDefault(),r.trim()&&(e(r,l.filter(p=>p.active)),a(""),o(!1))},d=m=>{c(p=>p.map(v=>v.id===m?{...v,active:!v.active}:v))},f=m=>{switch(m){case"agent":return"bg-blue-500/20 text-blue-300 border-blue-500";case"location":return"bg-violet-500/20 text-violet-300 border-violet-500";case"operator":return"bg-green-500/20 text-green-300 border-green-500";case"severity":return"bg-orange-500/20 text-orange-300 border-orange-500";default:return"bg-gray-500/20 text-gray-300 border-gray-500"}};return s.jsx(te,{className:`sticky top-4 z-50 backdrop-blur-xl bg-slate-900/95 border-slate-700 ${n}`,children:s.jsxs("form",{onSubmit:u,className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(_e,{value:r,onChange:m=>{a(m.target.value),m.target.value&&!i&&o(!0)},placeholder:"Ask anything or run an SOP…",className:"bg-slate-800 border-slate-600 text-white placeholder-slate-400 pr-12 text-lg"}),s.jsx(Fh,{className:"absolute right-3 top-1/2 -translate-y-1/2 h-5 w-5 text-slate-400"})]}),t&&s.jsx(Y,{type:"button",variant:"outline",size:"icon",onClick:t,className:"bg-slate-800 border-slate-600 hover:bg-slate-700",children:s.jsx(xX,{className:"h-4 w-4 text-slate-300"})}),s.jsx(Y,{type:"button",variant:"outline",size:"icon",onClick:()=>o(!i),className:"bg-slate-800 border-slate-600 hover:bg-slate-700",children:s.jsx(m1,{className:"h-4 w-4 text-slate-300"})}),s.jsxs(Y,{type:"submit",className:"bg-gradient-to-r from-blue-600 to-violet-600 hover:from-blue-700 hover:to-violet-700",children:[s.jsx(Ot,{className:"h-4 w-4 mr-2"}),"Go"]})]}),s.jsx(ci,{children:i&&s.jsx(Gt.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:s.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:l.map(m=>s.jsx(le,{variant:"outline",className:`cursor-pointer transition-all ${m.active?f(m.type):"bg-slate-800 text-slate-400 border-slate-600 hover:bg-slate-700"}`,onClick:()=>d(m.id),children:m.label},m.id))})})})]})})},I8e=({result:e,onMarkAsIssue:t,onRunAgain:n,onAddToTracker:r,className:a=""})=>{const i=c=>{switch(c){case"confirmed":return s.jsxs(le,{className:"bg-green-500/20 text-green-300 border-green-500",children:[s.jsx(Pe,{className:"h-3 w-3 mr-1"}),"Confirmed"]});case"skipped":return s.jsxs(le,{className:"bg-orange-500/20 text-orange-300 border-orange-500",children:[s.jsx(ln,{className:"h-3 w-3 mr-1"}),"Skipped Step"]});case"delayed":return s.jsxs(le,{className:"bg-yellow-500/20 text-yellow-300 border-yellow-500",children:[s.jsx(zn,{className:"h-3 w-3 mr-1"}),"Delayed"]});case"failed":return s.jsxs(le,{className:"bg-red-500/20 text-red-300 border-red-500",children:[s.jsx(ln,{className:"h-3 w-3 mr-1"}),"Failed"]});default:return s.jsx(le,{variant:"outline",children:"Unknown"})}},o=c=>{switch(c){case"confirmed":return"bg-green-500";case"skipped":return"bg-orange-500";case"delayed":return"bg-yellow-500";case"failed":return"bg-red-500";default:return"bg-gray-500"}},l=e.stepsCompleted/e.totalSteps*100;return s.jsx(Gt.div,{initial:{opacity:0,y:20}
1492,animate:{opacity:1,y:0},className:a,children:s.jsxs(te,{className:"bg-slate-900/50 border-slate-700 hover:border-slate-600 transition-all",children:[s.jsxs(xe,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-white text-lg",children:e.title}),i(e.status)]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-slate-400",children:[s.jsx("span",{children:e.operator}),s.jsx("span",{children:"•"}),s.jsx("span",{children:e.location}),s.jsx("span",{children:"•"}),s.jsx("span",{children:e.timestamp.toLocaleTimeString()})]})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{className:"text-slate-300",children:"Progress"}),s.jsxs("span",{className:"text-slate-300",children:[e.stepsCompleted,"/",e.totalSteps," steps"]})]}),s.jsx("div",{className:"w-full bg-slate-800 rounded-full h-2",children:s.jsx("div",{className:`h-2 rounded-full transition-all ${o(e.status)}`,style:{width:`${l}%`}})})]}),s.jsx("p",{className:"text-slate-300 text-sm",children:e.details}),e.anomalies&&e.anomalies.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h4",{className:"text-sm font-medium text-orange-300",children:"Anomalies Detected"}),s.jsx("div",{className:"space-y-1",children:e.anomalies.map((c,u)=>s.jsx("div",{className:"text-xs text-orange-200 bg-orange-500/10 p-2 rounded border border-orange-500/20",children:c},u))})]}),s.jsxs("div",{className:"flex gap-2 pt-2",children:[s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>t(e.id),className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:[s.jsx(fX,{className:"h-3 w-3 mr-1"}),"Mark as Issue"]}),s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>n(e.id),className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:[s.jsx(p1,{className:"h-3 w-3 mr-1"}),"Run Again"]}),s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>r(e.id),className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:[s.jsx(Fn,{className:"h-3 w-3 mr-1"}),"Add to Tracker"]})]})]})]})})},O8e=({suggestions:e,onActionClick:t,agentName:n="AI Assistant",className:r=""})=>{const a=o=>{switch(o){case"notify":return s.jsx(sw,{className:"h-4 w-4"});case"restart":return s.jsx(p1,{className:"h-4 w-4"});case"report":return s.jsx(rn,{className:"h-4 w-4"});case"escalate":return s.jsx(li,{className:"h-4 w-4"});default:return s.jsx(Ot,{className:"h-4 w-4"})}},i=o=>{switch(o){case"critical":return"bg-red-500/20 text-red-300 border-red-500";case"high":return"bg-orange-500/20 text-orange-300 border-orange-500";case"medium":return"bg-yellow-500/20 text-yellow-300 border-yellow-500";case"low":return"bg-blue-500/20 text-blue-300 border-blue-500";default:return"bg-gray-500/20 text-gray-300 border-gray-500"}};return s.jsxs(te,{className:`bg-slate-900/50 border-slate-700 ${r}`,children:[s.jsx(xe,{className:"pb-3",children:s.jsxs(we,{className:"text-white flex items-center gap-2",children:[s.jsx(Sn,{className:"h-5 w-5 text-blue-400"}),n," Suggestions"]})}),s.jsx(se,{className:"space-y-3",children:e.length===0?s.jsxs("div",{className:"text-center py-8 text-slate-400",children:[s.jsx(Ot,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),s.jsx("p",{children:"No suggestions at this time"}),s.jsx("p",{className:"text-xs",children:"Actions will appear based on SOP results"})]}):e.map((o,l)=>s.jsx(Gt.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:l*.1},children:s.jsxs("div",{className:"p-3 bg-slate-800/50 rounded-lg border border-slate-700 hover:border-slate-600 transition-all",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[a(o.type),s.jsx("span",{className:"text-white font-medium text-sm",children:o.title})]}),s.jsx(le,{variant:"outline",className:`text-xs ${i(o.priority)}`,children:o.priority})]}),s.jsx("p",{className:"text-slate-300 text-xs mb-3",children:o.description}),o.target&&s.jsxs("div",{className:"text-xs text-slate-400 mb-2",children:["Target: ",s.jsx("span",{className:"text-slate-300",children:o.target})]}),s.jsx(Y,{size:"sm",onClick:()=>t(o),className:"w-full bg-gradient-to-r from-blue-600 to-violet-600 hover:from-blue-700 hover:to-violet-700 text-white",children:"Execute Action"})]})},o.id))})]})},M8e=e=>{const n=new Date().getTime()-e.getTime(),r=Math.floor(n/(1e3*60)),a=Math.floor(r/60),i=Math.floor(a/24);return r<1?"Just now":r<60?`${r} minutes ago`:a<24?`${a} hours ago`:i===1?"Yesterday":`${i} days ago`},R8e=({isOpen:e,onClose:t,className:n=""})=>{const[r,a]=b.useState("onboarding"),[i,o]=b.useState(!1),l=[{id:"1",title:"Connect SCADA System",completed:!0,description:"Integrate your SCADA system for real-time monitoring",priority:"high"},{id:"2",title:"Setup Compliance Templates",completed:!1,description:"Configure EPA and state compliance reporting templates",priority:"high"},{id:"3",title:"Train Operators on AI Assistant",completed:!1,description:"Schedule training sessions for your operations team",priority:"medium"},{id:"4",title:"Configure Alert Thresholds",completed:!0,description:"Set up custom alert thresholds for your facility",priority:"medium"}],c=[{id:"1",title:"Chlorine Residual SOP Review",type:"sop",status:"pending",createdAt:new Date(Date.now()-1e3*60*60*2),urgency:"high"},{id:"2",title:"Monthly Compliance Report",type:"compliance",status:"in-review",createdAt:new Date(Date.now()-1e3*60*60*24),urgency:"medium"}],u=l.filter(v=>v.completed).length,d=l.length,f=u/d*100,m=()=>{o(!0)},p=()=>{console.log("Escalating to analyst...")};return s.jsxs(ci,{children:[e&&s.jsx(Gt.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"tween",duration:.3},className:`fixed right-0 top-0 h-full w-96 bg-slate-900 border-l border-slate-700 z-50 ${n}`,children:s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"p-4 border-b border-slate-700",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ii,{className:"h-5 w-5 text-violet-400"}),s.jsx("h2",{className:"text-lg font-semibold text-white",children:"Success Center"})]}),s.jsx(Y,{variant:"ghost",size:"icon",onClick:t,className:"text-slate-400 hover:text-white",children:s.jsx(jr,{className:"h-4 w-4"})})]})}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsxs(os,{value:r,onValueChange:a,className:"flex-1 flex flex-col",children:[s.jsxs(Kr,{className:"mx-4 mt-4 grid grid-cols-4 bg-slate-800",children:[s.jsx(at,{value:"onboarding",className:"text-xs",children:"Setup"}),s.jsx(at,{value:"reviews",className:"text-xs",children:"Reviews"}),s.jsx(at,{value:"roi",className:"text-xs",children:"ROI"}),s.jsx(at,{value:"audits",className:"text-xs",children:"Audits"})]}),s.jsxs("div",{className:"flex-1 overflow-hidden",children:[s.jsx(Ze,{value:"onboarding",className:"h-full m-0 p-4",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("span",{className:"text-sm text-slate-300",children:"Setup Progress"}),s.jsxs("span",{className:"text-sm text-slate-300",children:[u,"/",d]})]}),s.jsx("div",{className:"w-full bg-slate-700 rounded-full h-2",children:s.jsx("div",{className:"bg-gradient-to-r from-blue-500 to-violet-500 h-2 rounded-full transition-all",style:{width:`${f}%`}})})]})}),s.jsx(js,{className:"h-64",children:s.jsx("div",{className:"space-y-3",children:l.map(v=>s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsx(se,{className:"p-3",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"pt-1",children:v.completed?s.jsx(bc,{className:"h-4 w-4 text-green-400"}):s.jsx("div",{className:"h-4 w-4 border border-slate-500 rounded"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"text-sm font-medium text-white",children:v.title}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:v.description}),s.jsxs(le,{variant:"outline",className:`mt-2 text-xs ${v.priority==="high"?"border-red-500 text-red-300":v.priority==="medium"?"border-yellow-500 text-yellow-300":"border-blue-500 text-blue-300"}`,children:[v.priority," priority"]})]})]})})},v.id))})})]})}),s.jsx(Ze,{value:"reviews",className:"h-full m-0 p-4",children:s.jsx(js,{className:"h-full",children:s.jsx("div",{className:"space-y-3",children:c.map(v
1492=>s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsx(se,{className:"p-3",children:s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"text-sm font-medium text-white",children:v.title}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(le,{variant:"outline",className:"text-xs",children:v.type}),s.jsx(le,{variant:"outline",className:`text-xs ${v.status==="pending"?"border-yellow-500 text-yellow-300":v.status==="in-review"?"border-blue-500 text-blue-300":"border-green-500 text-green-300"}`,children:v.status})]}),s.jsxs("p",{className:"text-xs text-slate-400 mt-1",children:[s.jsx(zn,{className:"h-3 w-3 inline mr-1"}),M8e(v.createdAt)]})]})})})},v.id))})})}),s.jsx(Ze,{value:"roi",className:"h-full m-0 p-4",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(fl,{className:"h-4 w-4 text-green-400"}),s.jsx("span",{className:"text-sm font-medium text-white",children:"Monthly Savings"})]}),s.jsx("div",{className:"text-2xl font-bold text-green-400",children:"$12,450"}),s.jsx("p",{className:"text-xs text-slate-400",children:"15% improvement over last month"})]})}),s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(el,{className:"h-4 w-4 text-blue-400"}),s.jsx("span",{className:"text-sm font-medium text-white",children:"Efficiency Gains"})]}),s.jsx("div",{className:"text-2xl font-bold text-blue-400",children:"23%"}),s.jsx("p",{className:"text-xs text-slate-400",children:"Reduction in manual oversight"})]})})]})}),s.jsx(Ze,{value:"audits",className:"h-full m-0 p-4",children:s.jsx("div",{className:"space-y-4",children:s.jsx(te,{className:"bg-slate-800 border-slate-700",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"text-sm font-medium text-white",children:"Next Audit"}),s.jsx("p",{className:"text-xs text-slate-400",children:"EPA Compliance Review"})]}),s.jsx(le,{className:"bg-orange-500/20 text-orange-300 border-orange-500",children:"Due in 7 days"})]})})})})})]})]}),s.jsxs("div",{className:"p-4 border-t border-slate-700 space-y-2",children:[s.jsxs(Y,{onClick:m,className:"w-full bg-gradient-to-r from-blue-600 to-violet-600 hover:from-blue-700 hover:to-violet-700 text-white",children:[s.jsx(Mc,{className:"h-4 w-4 mr-2"}),"Book Optimization Call"]}),s.jsxs(Y,{variant:"outline",onClick:p,className:"w-full bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:[s.jsx(di,{className:"h-4 w-4 mr-2"}),"Escalate to Analyst"]})]})]})]})}),s.jsx(Uc,{isOpen:i,onClose:()=>o(!1),url:"https://calendly.com/privion-optimization"})]})},D8e=({onRefreshSOP:e,onCallOpsLead:t,onShareReport:n,className:r=""})=>{const[a,i]=b.useState(!1),o=[{icon:s.jsx(p1,{className:"h-4 w-4"}),label:"Refresh SOP",action:e,color:"bg-blue-600 hover:bg-blue-700"},{icon:s.jsx(Mc,{className:"h-4 w-4"}),label:"Call Ops Lead",action:t,color:"bg-green-600 hover:bg-green-700"},{icon:s.jsx(Ji,{className:"h-4 w-4"}),label:"Share Report",action:n,color:"bg-purple-600 hover:bg-purple-700"}];return s.jsxs("div",{className:`fixed bottom-6 right-6 z-50 flex flex-col items-end space-y-2 ${r}`,children:[s.jsx(ci,{children:a&&s.jsx("div",{className:"space-y-2",children:o.map((l,c)=>s.jsx(Gt.div,{initial:{opacity:0,scale:0,y:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:0,y:20},transition:{delay:c*.1},children:s.jsxs(Y,{size:"sm",onClick:()=>{l.action(),i(!1)},className:`${l.color} text-white shadow-lg min-h-[44px] px-4`,children:[l.icon,s.jsx("span",{className:"ml-2 whitespace-nowrap",children:l.label})]})},c))})}),s.jsx(Y,{size:"icon",onClick:()=>i(!a),className:"bg-gradient-to-r from-blue-600 to-violet-600 hover:from-blue-700 hover:to-violet-700 text-white shadow-lg w-12 h-12 rounded-full",children:s.jsx(Gt.div,{animate:{rotate:a?45:0},transition:{duration:.2},children:a?s.jsx(jr,{className:"h-5 w-5"}):s.jsx(Fn,{className:"h-5 w-5"})})})]})},L8e=({sopTitle:e,steps:t,onStepClick:n,onPlayback:r,className:a=""})=>{const[i,o]=b.useState(!1),[l,c]=b.useState([0]),u=(p,v)=>{if(v)return s.jsx(ln,{className:"h-4 w-4 text-orange-400"});switch(p){case"completed":return s.jsx(Pe,{className:"h-4 w-4 text-green-400"});case"skipped":return s.jsx(ln,{className:"h-4 w-4 text-orange-400"});case"delayed":return s.jsx(zn,{className:"h-4 w-4 text-yellow-400"});default:return s.jsx("div",{className:"h-4 w-4 border-2 border-slate-500 rounded-full"})}},d=(p,v)=>{if(v)return"border-orange-500";switch(p){case"completed":return"border-green-500";case"skipped":return"border-orange-500";case"delayed":return"border-yellow-500";default:return"border-slate-600"}},f=t.filter(p=>p.status==="completed").length,m=t.filter(p=>p.hasAnomaly).length;return s.jsxs(te,{className:`bg-slate-900/50 border-slate-700 ${a}`,children:[s.jsxs(xe,{className:"pb-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(we,{className:"text-white text-lg",children:e}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Y,{size:"sm",variant:"outline",onClick:r,className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:[s.jsx(Vr,{className:"h-3 w-3 mr-1"}),"Playback"]}),s.jsx(Y,{size:"sm",variant:"ghost",onClick:()=>o(!i),className:"text-slate-400 hover:text-white",children:i?s.jsx(cX,{className:"h-4 w-4"}):s.jsx(po,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm",children:[s.jsxs(le,{variant:"outline",className:"bg-green-500/20 text-green-300 border-green-500",children:[f,"/",t.length," completed"]}),m>0&&s.jsxs(le,{variant:"outline",className:"bg-orange-500/20 text-orange-300 border-orange-500",children:[m," anomalies"]})]})]}),s.jsx(ci,{children:i&&s.jsx(Gt.div,{initial:{height:0,opacity:0}
1492,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-xs text-slate-400",children:[s.jsx("span",{children:"Timeline"}),s.jsxs("span",{children:["Step ",Math.floor(l[0]/100*t.length)+1," of ",t.length]})]}),s.jsx(PR,{value:l,onValueChange:c,max:100,step:1,className:"w-full"})]}),s.jsx(js,{className:"h-64",children:s.jsx("div",{className:"space-y-2",children:t.map((p,v)=>s.jsx(Gt.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:v*.05},className:`p-3 bg-slate-800/50 rounded-lg border cursor-pointer hover:bg-slate-800 transition-all ${d(p.status,p.hasAnomaly)}`,onClick:()=>n(p.id),children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"pt-1",children:u(p.status,p.hasAnomaly)}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"text-sm font-medium text-white truncate",children:p.title}),s.jsx("span",{className:"text-xs text-slate-400",children:p.timestamp.toLocaleTimeString()})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx("span",{className:"text-xs text-slate-400",children:p.operator}),s.jsx("span",{className:"text-xs text-slate-500",children:"•"}),s.jsxs("span",{className:"text-xs text-slate-400",children:[p.duration,"s"]})]}),p.notes&&s.jsx("p",{className:"text-xs text-slate-300 mt-1",children:p.notes})]})]})},p.id))})})]})})})]})},$8e=({title:e,description:t,ctaText:n,onSignUp:r,metrics:a=[],showAfterDelay:i=5e3})=>{const[o,l]=b.useState(!1),[c,u]=b.useState(!1),{toast:d}=_t();b.useEffect(()=>{const p=setTimeout(()=>{c||l(!0)},i);return()=>clearTimeout(p)},[i,c]);const f=()=>{r(),d({title:"Ready to Get Started?",description:"Create your account to unlock all features and build real agents!",duration:4e3})},m=()=>{l(!1),u(!0)};return c?null:s.jsx(ci,{children:o&&s.jsx(Gt.div,{initial:{opacity:0}
1492,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",children:s.jsx(Gt.div,{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.95,opacity:0},className:"max-w-2xl w-full",children:s.jsxs(te,{className:"border-0 shadow-2xl bg-gradient-to-br from-white to-blue-50 dark:from-slate-800 dark:to-slate-900",children:[s.jsxs(xe,{className:"relative",children:[s.jsx(Y,{variant:"ghost",size:"icon",onClick:m,className:"absolute right-4 top-4 h-8 w-8",children:s.jsx(jr,{className:"h-4 w-4"})}),s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"p-2 bg-gradient-to-r from-blue-500 to-purple-500 rounded-lg",children:s.jsx(ii,{className:"h-6 w-6 text-white"})}),s.jsxs("div",{children:[s.jsx(we,{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:e}),s.jsxs(le,{className:"bg-gradient-to-r from-orange-500 to-red-500 text-white",children:[s.jsx(ws,{className:"h-3 w-3 mr-1"}),"Limited Time Demo"]})]})]}),s.jsx("p",{className:"text-gray-600 dark:text-gray-300 text-lg",children:t})]}),s.jsxs(se,{className:"space-y-6",children:[a.length>0&&s.jsx("div",{className:"grid grid-cols-3 gap-4",children:a.map((p,v)=>s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"flex justify-center mb-2",children:p.icon}),s.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:p.value}),s.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:p.label})]},v))}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs(Y,{onClick:f,size:"lg",className:"w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white text-lg py-6",children:[s.jsx(ii,{className:"h-5 w-5 mr-2"}),n,s.jsx(Bt,{className:"h-5 w-5 ml-2"})]}),s.jsxs("div",{className:"text-center text-sm text-gray-500 dark:text-gray-400",children:[s.jsx("span",{className:"font-medium",children:"14-day free trial"})," • No credit card required"]})]})]})]})})})})},F8e=()=>{const[e,t]=b.useState([]),[n,r]=b.useState([]),[a,i]=b.useState(!1),{isMobile:o}=_1(),{toast:l}=_t(),{isAuthenticated:c}=nr();b.useEffect(()=>{const x=[{id:"1",title:"Chlorine Residual Check - North Plant",status:"skipped",timestamp:new Date,operator:"Sarah M.",location:"North Treatment Plant",details:"Routine chlorine residual verification in distribution system",stepsCompleted:4,totalSteps:6,anomalies:["Step 5 skipped: Manual verification at sampling point"]},{id:"2",title:"Daily Water Quality Report",status:"confirmed",timestamp:new Date(Date.now()-18e5),operator:"Mike J.",location:"South Treatment Plant",details:"Daily compliance monitoring and reporting",stepsCompleted:8,totalSteps:8}],w=[{id:"1",type:"notify",title:"Notify Shift Supervisor",description:"Alert supervisor about skipped chlorine verification step",target:"Sarah M. - Shift Supervisor",priority:"high",context:{sopId:"1",issue:"skipped_step"}},{id:"2",type:"restart",title:"Restart SOP?",description:"Re-run chlorine residual check with full verification",priority:"medium",context:{sopId:"1"}},{id:"3",type:"report",title:"Generate Weekly Report",description:"Compile weekly compliance and efficiency metrics",priority:"low"}];t(x),r(w)},[]);const u=(x,w)=>{console.log("Prompt submitted:",x,w),l({title:"Processing Request",description:`Analyzing: "${x}" with ${w.length} filters applied`,duration:3e3}),setTimeout(()=>{const N={id:Date.now().toString(),title:`AI Response: ${x.slice(0,30)}...`,status:Math.random()>.5?"confirmed":"delayed",timestamp:new Date,operator:"AI Assistant",location:"System Generated",details:`Processed request: ${x}`,stepsCompleted:Math.floor(Math.random()*8)+1,totalSteps:8};t(S=>[N,...S])},2e3)},d=()=>{l({title:"Voice Input",description:"Voice-to-action feature coming soon!",duration:3e3})},f=x=>{console.log("Action clicked:",x),l({title:"Action Executed",description:`${x.title} has been initiated`,duration:3e3}),r(w=>w.filter(N=>N.id!==x.id))},m=(x,w)=>{console.log(`${x} for result ${w}`),l({title:"Action Completed",description:`${x} has been applied to the SOP result`,duration:2e3})},p=x=>{l({title:x,description:`${x} feature executed`,duration:2e3})},v=()=>{l({title:"Ready for AI Operations?",description:"Join the AI revolution in operational excellence!",duration:5e3})},y=[{label:"Operational Efficiency",value:"87%",icon:s.jsx(Sn,{className:"h-6 w-6 text-blue-500"})},{label:"Cost Reduction",value:"$25K/mo",icon:s.jsx(Rs,{className:"h-6 w-6 text-green-500"})},{label:"Response Time",value:"< 2 min",icon:s.jsx(zn,{className:"h-6 w-6 text-cyber-blue"})}];return s.jsxs("div",{className:"min-h-screen bg-slate-950",children:[s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsxs("div",{className:"container mx-auto px-6 py-8 max-w-7xl",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("h1",{className:"text-3xl font-bold text-white",children:c?"Agentic Operations Center":"AI Operations Center - Live Demo"}),!c&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(le,{className:"bg-gradient-to-r from-green-500 to-blue-500 text-white animate-pulse",children:[s.jsx("div",{className:"w-2 h-2 bg-white rounded-full mr-2 animate-pulse"}),"Live AI"]}),s.jsxs(le,{className:"bg-gradient-to-r from-cyber-blue to-electric-blue text-white",children:[s.jsx(Ot,{className:"h-3 w-3 mr-1"}),"Real-time"]})]})]}),s.jsx("p",{className:"text-slate-400",children:c?"AI-first SOP management and compliance monitoring":"Experience AI-driven operations • Real SOPs • Live monitoring"}),!c&&s.jsx("div",{className:"mt-4",children:s.jsx(te,{className:"bg-gradient-to-r from-blue-950/50 to-cyan-950/50 border-blue-800",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("p",{className:"text-blue-200 font-medium flex items-center gap-2",children:[s.jsx(Sn,{className:"h-4 w-4"}),"You're experiencing live AI operations in action"]}),s.jsx("p",{className:"text-blue-300 text-sm mt-1",children:"Watch AI manage SOPs, detect anomalies, and suggest actions automatically"})]}),s.jsxs(Y,{onClick:()=>l({title:"Sign up to unlock",description:"Get full AI operations for your facility"}),className:"bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90 text-white",children:[s.jsx(ii,{className:"h-4 w-4 mr-2"}),"Unlock for Your Team",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})})})})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(le,{className:"bg-blue-500/20 text-blue-300 border-blue-500",children:[s.jsx(ii,{className:"h-3 w-3 mr-1"}),c?"Pro Mode":"Demo Mode"]}),s.jsx(Y,{variant:"outline",size:"icon",onClick:()=>i(!0),className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:s.jsx(Kt,{className:"h-4 w-4"})}),s.jsx(Y,{variant:"outline",size:"icon",className:"bg-slate-800 border-slate-600 hover:bg-slate-700 text-slate-300",children:s.jsx(sw,{className:"h-4 w-4"})})]})]}),s.jsx(T8e,{onPromptSubmit:u,onVoiceInput:d,className:"mb-8"}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-xl font-semibold text-white",children:"Recent SOP Results"}),!c&&s.jsxs(le,{className:"bg-orange-500/20 text-orange-300 border-orange-500",children:[s.jsx(Bn,{className:"h-3 w-3 mr-1"}),"Live Operations"]})]}),e.length===0?s.jsx("div",{className:"text-center py-12 text-slate-400",children:s.jsx("p",{children:"No results yet. Submit a prompt to get started!"})}):e.map(x=>s.jsx(I8e,{result:x,onMarkAsIssue:w=>m("Mark as Issue",w),onRunAgain:w=>m("Run Again",w),onAddToTracker:w=>m("Add to Tracker",w)},x.id))]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(O8e,{suggestions:n,onActionClick:f,agentName:"Water Treatment AI"}),e.length>0&&s.jsx(L8e,{sopTitle:"Live SOP Monitoring",steps:[{id:"1",title:"Initialize System Check",status:"completed",timestamp:new Date(Date.now()-1e3*60*10),operator:"System",duration:30},{id:"2",title:"Verify Chlorine Levels",status:"skipped",timestamp:new Date(Date.now()-1e3*60*5),operator:"Sarah M.",duration:45,hasAnomaly:!0,notes:"Manual verification bypassed"},{id:"3",title:"Record Measurements",status:"completed",timestamp:new Date,operator:"Sarah M.",duration:60}],onStepClick:x=>console.log("Step clicked:",x),onPlayback:()=>l({title:"Playback",description:"SOP playback started"})})]})]})]})}),o&&s.jsx(D8e,{onRefreshSOP:()=>p("Refresh SOP"),onCallOpsLead:()=>p("Call Ops Lead"),onShareReport:()=>p("Share Report")}),s.jsx(R8e,{isOpen:a,onClose:()=>i(!1)}),!c&&s.jsx($8e,{title:"Deploy AI Operations Like This",description:"Transform your facility with AI that manages SOPs, detects issues, and optimizes operations 24/7.",ctaText:"Start AI Operations Trial",onSignUp:v,metrics:y,showAfterDelay:1e4}),s.jsx(Cn,{})]})},z8e=({onSendMessage:e,disabled:t})=>{const[n,r]=b.useState(""),[a,i]=b.useState(!1),[o,l]=b.useState([]),[c,u]=b.useState(!1),d=b.useRef(null),f=b.useRef(null),{toast:m}=_t(),p=N=>{N.preventDefault(),(n.trim()||o.length>0)&&!t&&(e(n.trim(),o),r(""),l([]))},v=N=>{N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),p(N))},y=async()=>
1492{if(a)i(!1);else try{const N=await navigator.mediaDevices.getUserMedia({audio:!0});i(!0),setTimeout(()=>{i(!1),r(n+" [Voice input: transcription would appear here]"),N.getTracks().forEach(S=>S.stop()),m({description:"Voice recorded and transcribed",duration:2e3})},3e3)}catch{m({description:"Could not access microphone",variant:"destructive",duration:2e3})}},x=N=>{const S=Array.from(N.target.files||[]);l(_=>[..._,...S]),u(!0),setTimeout(()=>{u(!1),m({description:`${S.length} file(s) processed and ready`,duration:2e3})},2e3)},w=N=>{l(S=>S.filter((_,k)=>k!==N))};return s.jsxs("div",{className:"space-y-2",children:[o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((N,S)=>s.jsxs("div",{className:"flex items-center gap-2 bg-blue-50 dark:bg-blue-900/20 px-2 py-1 rounded text-sm border-2 border-blue-200 dark:border-blue-800",children:[s.jsx(P$,{className:"h-3 w-3"}),s.jsx("span",{className:"truncate max-w-32",children:N.name}),s.jsx(Y,{variant:"ghost",size:"sm",className:"h-auto p-0 text-gray-500",onClick:()=>w(S),children:"×"})]},S))}),s.jsx("div",{className:"border-2 border-gray-300 dark:border-gray-600 rounded-lg p-2 bg-white dark:bg-gray-800",children:s.jsxs("form",{onSubmit:p,className:"flex gap-2 items-end",children:[s.jsxs("div",{className:"flex-1 relative",children:[s.jsx(Ds,{ref:d,value:n,onChange:N=>r(N.target.value),onKeyDown:v,placeholder:"Type, speak, or upload files... (Enter to send, Shift+Enter for new line)",disabled:t,className:"min-h-[44px] max-h-32 resize-none border-0 focus:ring-0 bg-transparent pr-24",rows:1}),s.jsxs("div",{className:"absolute right-2 bottom-2 flex gap-1",children:[s.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>{var N;return(N=f.current)==null?void 0:N.click()},disabled:t||c,children:c?s.jsx(kr,{className:"h-4 w-4 animate-spin"}):s.jsx(P$,{className:"h-4 w-4"})}),s.jsx(Y,{type:"button",variant:"ghost",size:"sm",className:`h-8 w-8 p-0 ${a?"text-red-500":""}`,onClick:y,disabled:t,children:a?s.jsx(uje,{className:"h-4 w-4"}):s.jsx(xX,{className:"h-4 w-4"})})]})]}),s.jsx(Y,{type:"submit",disabled:!n.trim()&&o.length===0||t,className:"px-4 py-2 h-11 border-2 border-blue-500 dark:border-blue-400",children:t?s.jsx(kr,{className:"h-4 w-4 animate-spin"}):s.jsx(Hm,{className:"h-4 w-4"})})]})}),s.jsx("input",{ref:f,type:"file",multiple:!0,className:"hidden",onChange:x,accept:".pdf,.doc,.docx,.txt,.jpg,.jpeg,.png,.mp3,.wav"})]})};var cse=a1(),pC=function(){},aN=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:pC,onWheelCapture:pC,onTouchMoveCapture:pC}),a=r[0],i=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,m=e.sideCar,p=e.noRelative,v=e.noIsolation,y=e.inert,x=e.allowPinchZoom,w=e.as,N=w===void 0?"div":w,S=e.gapMode,_=Sy(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=m,C=s1([n,t]),E=wn(wn({},_),a);return b.createElement(b.Fragment,null,d&&b.createElement(k,{sideCar:cse,removeScrollBar:u,shards:f,noRelative:p,noIsolation:v,inert:y,setCallbacks:i,allowPinchZoom:!!x,lockRef:n,gapMode:S}),o?b.cloneElement(b.Children.only(l),wn(wn({},E),{ref:C})):b.createElement(N,wn({},E,{className:c,ref:C}),l))});aN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};aN.classNames={fullWidth:Ku,zeroRight:Gu};var A4=!1;if(typeof window<"u")try{var ib=Object.defineProperty({},"passive",{get:function(){return A4=!0,!0}});window.addEventListener("test",ib,ib),window.removeEventListener("test",ib,ib)}catch{A4=!1}var Mf=A4?{passive:!1}:!1,B8e=function(e){return e.tagName==="TEXTAREA"},use=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!B8e(e)&&n[t]==="visible")},U8e=function(e){return use(e,"overflowY")},H8e=function(e){return use(e,"overflowX")},mB=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=dse(e,r);if(a){var i=fse(e,r),o=i[1],l=i[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},q8e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V8e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},dse=function(e,t){return e==="v"?U8e(t):H8e(t)},fse=function(e,t){return e==="v"?q8e(t):V8e(t)},W8e=function(e,t){return e==="h"&&t==="rtl"?-1:1},G8e=function(e,t,n,r,a){var i=W8e(e,window.getComputedStyle(t).direction),o=i*r,l=n.target,c=t.contains(l),u=!1,d=o>0,f=0,m=0;do{if(!l)break;var p=fse(e,l),v=p[0],y=p[1],x=p[2],w=y-x-i*v;(v||w)&&dse(e,l)&&(f+=w,m+=v);var N=l.parentNode;l=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&Math.abs(f)<1||!d&&Math.abs(m)<1)&&(u=!0),u},ob=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pB=function(e){return[e.deltaX,e.deltaY]},gB=function(e){return e&&"current"in e?e.current:e},K8e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Y8e=function(e){return`
1493  .block-interactivity-`.concat(e,` {pointer-events: none;}
1494  .allow-interactivity-`).concat(e,` {pointer-events: all;}
1495`)},X8e=0,Rf=[];function Q8e(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),a=b.useState(X8e++)[0],i=b.useState(ky)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));
vendor: 4,220 bytes, line 1495
1495var y=r1([e.lockRef.current],(e.shards||[]).map(gB),!0).filter(Boolean);return y.forEach(function(x){return x.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),y.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=b.useCallback(function(y,x){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!o.current.allowPinchZoom;var w=ob(y),N=n.current,S="deltaX"in y?y.deltaX:N[0]-w[0],_="deltaY"in y?y.deltaY:N[1]-w[1],k,C=y.target,E=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in y&&E==="h"&&C.type==="range")return!1;var O=mB(E,C);if(!O)return!0;if(O?k=E:(k=E==="v"?"h":"v",O=mB(E,C)),!O)return!1;if(!r.current&&"changedTouches"in y&&(S||_)&&(r.current=k),!k)return!0;var P=r.current||k;return G8e(P,x,y,P==="h"?S:_)},[]),c=b.useCallback(function(y){var x=y;if(!(!Rf.length||Rf[Rf.length-1]!==i)){var w="deltaY"in x?pB(x):ob(x),N=t.current.filter(function(k){return k.name===x.type&&(k.target===x.target||x.target===k.shadowParent)&&K8e(k.delta,w)})[0];if(N&&N.should){x.cancelable&&x.preventDefault();return}if(!N){var S=(o.current.shards||[]).map(gB).filter(Boolean).filter(function(k){return k.contains(x.target)}),_=S.length>0?l(x,S[0]):!o.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(y,x,w,N){var S={name:y,delta:x,target:w,should:N,shadowParent:Z8e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),d=b.useCallback(function(y){n.current=ob(y),r.current=void 0},[]),f=b.useCallback(function(y){u(y.type,pB(y),y.target,l(y,e.lockRef.current))},[]),m=b.useCallback(function(y){u(y.type,ob(y),y.target,l(y,e.lockRef.current))},[]);b.useEffect(function(){return Rf.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:m}),document.addEventListener("wheel",c,Mf),document.addEventListener("touchmove",c,Mf),document.addEventListener("touchstart",d,Mf),function(){Rf=Rf.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Mf),document.removeEventListener("touchmove",c,Mf),document.removeEventListener("touchstart",d,Mf)}},[]);var p=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:Y8e(a)}):null,p?b.createElement(l1,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Z8e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const J8e=i1(cse,Q8e);var hse=b.forwardRef(function(e,t){return b.createElement(aN,wn({},e,{ref:t,sideCar:J8e}))});hse.classNames=aN.classNames;var iN="Popover",[mse]=Mr(iN,[Bc]),Ky=Bc(),[eze,Kc]=mse(iN),pse=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=Ky(t),c=b.useRef(null),[u,d]=b.useState(!1),[f,m]=$s({prop:r,defaultProp:a??!1,onChange:i,caller:iN});return s.jsx(Zj,{...l,children:s.jsx(eze,{scope:t,contentId:na(),triggerRef:c,open:f,onOpenChange:m,onOpenToggle:b.useCallback(()=>m(p=>!p),[m]),hasCustomAnchor:u,onCustomAnchorAdd:b.useCallback(()=>d(!0),[]),onCustomAnchorRemove:b.useCallback(()=>d(!1),[]),modal:o,children:n})})};pse.displayName=iN;var gse="PopoverAnchor",tze=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Kc(gse,n),i=Ky(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return b.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(jy,{...i,...r,ref:t})});tze.displayName=gse;var xse="PopoverTrigger",yse=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Kc(xse,n),i=Ky(n),o=gt(t,a.triggerRef),l=s.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Nse(a.open),...r,ref:o,onClick:Oe(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(jy,{asChild:!0,...i,children:l})});yse.displayName=xse;var YR="PopoverPortal",[nze,rze]=mse(YR,{forceMount:void 0}),vse=e=>{const{__scopePopover:t,forceMount:n,children:r,container:a}=e,i=Kc(YR,t);return s.jsx(nze,{scope:t,forceMount:n,children:s.jsx(Cr,{present:n||i.open,children:s.jsx(Dd,{asChild:!0,container:a,children:r})})})};vse.displayName=YR;var Jh="PopoverContent",bse=b.forwardRef((e,t)=>
1495{const n=rze(Jh,e.__scopePopover),{forceMount:r=n.forceMount,...a}=e,i=Kc(Jh,e.__scopePopover);return s.jsx(Cr,{present:r||i.open,children:i.modal?s.jsx(aze,{...a,ref:t}):s.jsx(ize,{...a,ref:t})})});bse.displayName=Jh;var sze=Tc("PopoverContent.RemoveScroll"),aze=b.forwardRef((e,t)=>{const n=Kc(Jh,e.__scopePopover),r=b.useRef(null),a=gt(t,r),i=b.useRef(!1);return b.useEffect(()=>{const o=r.current;if(o)return n1(o)},[]),s.jsx(hse,{as:sze,allowPinchZoom:!0,children:s.jsx(wse,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Oe(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Oe(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Oe(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),ize=b.forwardRef((e,t)=>{const n=Kc(Jh,e.__scopePopover),r=b.useRef(!1),a=b.useRef(!1);return s.jsx(wse,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),wse=b.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...f}=e,m=Kc(Jh,n),p=Ky(n);return Wj(),s.jsx(by,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:s.jsx(Rd,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:d,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:s.jsx(Jj,{"data-state":Nse(m.open),role:"dialog",id:m.contentId,...p,...f,ref:t,style:{...f.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)"}})})})}),jse="PopoverClose",oze=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Kc(jse,n);return s.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,()=>a.onOpenChange(!1))})});oze.displayName=jse;var lze="PopoverArrow",cze=b.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,a=Ky(n);return s.jsx(e1,{...a,...r,ref:t})});cze.displayName=lze;function Nse(e){return e?"open":"closed"}var uze=pse,dze=yse,fze=vse,Sse=bse;const XR=uze,QR=dze,oN=b.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},a)=>s.jsx(fze,{children:s.jsx(Sse,{ref:a,align:t,sideOffset:n,className:He("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})}));oN.displayName=Sse.displayName;const hze=({toolName:e,isVerified:t=!0,riskLevel:n="low",onPreview:r,onApprove:a,isDryRun:i=!1})=>{const o=()=>{switch(n){case"high":return"text-red-600 border-red-200 bg-red-50";case"medium":return"text-yellow-600 border-yellow-200 bg-yellow-50";default:return"text-green-600 border-green-200 bg-green-50"}},l=()=>{switch(n){case"high":return s.jsx(ln,{className:"h-3 w-3"});case"medium":return s.jsx(pr,{className:"h-3 w-3"});default:return s.jsx(Pe,{className:"h-3 w-3"})}};return e?s.jsxs(XR,{children:[s.jsx(QR,{asChild:!0,children:s.jsxs(le,{variant:"outline",className:`flex items-center gap-1 cursor-pointer ${o()}`,children:[l(),t?"Verified Tool":"Unverified",i&&s.jsx("span",{className:"text-xs",children:"(Preview)"})]})}),s.jsx(oN,{className:"w-80",align:"start",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-4 w-4"}),s.jsx("h4",{className:"font-semibold",children:"Tool Security Info"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium",children:"Tool: "}),s.jsx("span",{className:"text-sm",children:e})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium",children:"Status: "}),s.jsx(le,{variant:t?"default":"destructive",className:"text-xs",children:t?"Verified & Approved":"Unverified"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm font-medium",children:"Risk Level: "}),s.jsx(le,{variant:"outline",className:`text-xs ${o()}`,children:n.toUpperCase()})]}),i&&s.jsxs("div",{className:"p-2 bg-blue-50 dark:bg-blue-900/20 rounded border",children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[s.jsx(pr,{className:"h-3 w-3 text-blue-600"}),s.jsx("span",{className:"text-xs font-medium text-blue-800 dark:text-blue-200",children:"Dry Run Mode"})]}),s.jsx("p",{className:"text-xs text-blue-700 dark:text-blue-300",children:"This action will be simulated first for safety"})]})]}),(r||a)&&s.jsxs("div",{className:"flex gap-2 pt-2 border-t",children:[r&&s.jsxs(Y,{size:"sm",variant:"outline",onClick:r,className:"flex-1",children:[s.jsx(pr,{className:"h-3 w-3 mr-1"}),"Preview"]}),a&&s.jsxs(Y,{size:"sm",onClick:a,className:"flex-1",children:[s.jsx(ur,{className:"h-3 w-3 mr-1"}),"Approve"]})]})]})})]}):null},mze=({memoryContext:e})=>{const[t,n]=b.useState(!1),a=(()=>{var c,u,d;const i=((c=e.userMemory)==null?void 0:c.length)||0,o=((u=e.institutionalMemory)==null?void 0:u.length)||0,l=((d=e.taskMemory)==null?void 0:d.length)||0;return i+o+l})();return a===0&&!e.resumedFromSession?null:s.jsxs(XR,{open:t,onOpenChange:n,children:[s.jsx(QR,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"sm",className:"h-auto p-1",children:s.jsxs(le,{variant:"secondary",className:"flex items-center gap-1 text-xs",children:[s.jsx(Sn,{className:"h-3 w-3"}),e.resumedFromSession?"Resumed":`${a} memories`]})})}),s.jsx(oN,{className:"w-80",align:"start",children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Sn,{className:"h-4 w-4"}),s.jsx("h4",{className:"font-semibold",children:"Active Memory"})]}),e.resumedFromSession&&s.jsxs("div",{className:"flex items-center gap-2 p-2 bg-blue-50 dark:bg-blue-900/20 rounded",children:[s.jsx(zn,{className:"h-3 w-3 text-blue-600"}),s.jsx("span",{className:"text-xs text-blue-800 dark:text-blue-200",children:"Conversation resumed from previous session"})]}),e.userMemory&&e.userMemory.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[s.jsx(li,{className:"h-3 w-3"}),s.jsxs("span",{className:"text-xs font-medium",children:["Personal (",e.userMemory.length,")"]})]}),s.jsx("div",{className:"space-y-1",children:e.userMemory.slice(0,2).map((i,o)=>s.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 pl-4",children:["• ",i.key,": ",String(i.value).substring(0,30),"..."]},o))})]}),e.institutionalMemory&&e.institutionalMemory.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[s.jsx(dl,{className:"h-3 w-3"}),s.jsxs("span",{className:"text-xs font-medium",children:["Institutional (",e.institutionalMemory.length,")"]})]}),s.jsx("div",{className:"space-y-1",children:e.institutionalMemory.slice(0,2).map((i,o)=>s.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 pl-4",children:["• ",i.title]},o))})]}),e.taskMemory&&e.taskMemory.length>0&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[s.jsx(Pe,{className:"h-3 w-3"}),s.jsxs("span",{className:"text-xs font-medium",children:["Tasks (",e.taskMemory.length,")"]})]}),s.jsx("div",{className:"space-y-1",children:e.taskMemory.slice(0,2).map((i,o)=>s.jsxs("div",{className:"text-xs text-gray-600 dark:text-gray-400 pl-4",children:["• ",i.description," (",
1495i.status,")"]},o))})]})]})})]})},pze=e=>{switch(e){case"schedule":return s.jsx(Qg,{className:"h-4 w-4"});case"document":return s.jsx(rn,{className:"h-4 w-4"});case"workflow":return s.jsx(CX,{className:"h-4 w-4"});case"form":return s.jsx(bc,{className:"h-4 w-4"});default:return s.jsx(li,{className:"h-4 w-4"})}},gze=({action:e,onAction:t})=>s.jsx(te,{className:"mt-2 border-l-4 border-l-blue-500 hover:shadow-md transition-shadow",children:s.jsx(se,{className:"p-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[pze(e.type),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"font-medium text-sm",children:e.title}),e.description&&s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:e.description})]})]}),s.jsx(Y,{size:"sm",variant:e.primary?"default":"outline",onClick:()=>t(e.id,e.data),className:"ml-2",children:e.primary?"Do It":"View"})]})})}),kse=({message:e,onActionClick:t,onShare:n,onBranch:r})=>{const[a,i]=b.useState(!1),[o,l]=b.useState(!1),c=async()=>{await navigator.clipboard.writeText(e.content),l(!0),setTimeout(()=>l(!1),2e3)},u=()=>{switch(e.status){case"sending":return s.jsx(zn,{className:"h-3 w-3 animate-spin"});case"sent":return s.jsx(Pe,{className:"h-3 w-3"});case"error":return s.jsx(Xa,{className:"h-3 w-3 text-red-500"});default:return null}},d=f=>new Intl.DateTimeFormat("en-US",{hour:"2-digit",minute:"2-digit",hour12:!0}).format(f);return s.jsxs(Gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.3},className:He("group relative flex gap-3 p-4 rounded-lg transition-all duration-200",e.isUser?"bg-blue-50 dark:bg-blue-950/30 ml-8":"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700"),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[s.jsxs("div",{className:"flex-1 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:e.isUser?"You":"AI Assistant"}),s.jsx("span",{className:"text-xs text-gray-500",children:d(e.timestamp)}),u()]}),s.jsxs("div",{className:"flex items-center gap-1",children:[e.securityContext&&s.jsx(hze,{toolName:e.securityContext.toolName,isVerified:e.securityContext.isVerified,riskLevel:e.securityContext.riskLevel,isDryRun:e.securityContext.isDryRun}),e.memoryContext&&s.jsx(mze,{memoryContext:e.memoryContext})]})]}),s.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:s.jsx("p",{className:"text-gray-800 dark:text-gray-200 whitespace-pre-wrap",children:e.content})}),e.attachments&&e.attachments.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:e.attachments.map(f=>s.jsxs(le,{variant:"outline",className:"text-xs",children:["📎 ",f.name]},f.id))}),e.workflowState&&s.jsxs("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded border border-blue-200 dark:border-blue-800",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-blue-600"}),s.jsxs("span",{className:"text-sm font-medium text-blue-800 dark:text-blue-200",children:["Workflow Status: ",e.workflowState.status]})]}),e.workflowState.nextActions&&s.jsxs("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:["Next: ",e.workflowState.nextActions.join(", ")]})]}),e.actions&&e.actions.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:e.actions.map((f,m)=>s.jsx(gze,{action:f,onAction:()=>t==null?void 0:t(f.id,f)},m))})]}),a&&!e.isUser&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsxs(XR,{children:[s.jsx(QR,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",children:s.jsx(dX,{className:"h-3 w-3"})})}),s.jsx(oN,{className:"w-48",align:"end",children:s.jsxs("div",{className:"space-y-1",children:[s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:c,children:[s.jsx(Xu,{className:"h-3 w-3 mr-2"}),o?"Copied!":"Copy"]}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:n,children:[s.jsx(Ji,{className:"h-3 w-3 mr-2"}),"Share"]}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start",onClick:r,children:[s.jsx(ow,{className:"h-3 w-3 mr-2"}),"Branch"]}),s.jsx("div",{className:"border-t my-1"}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-green-600",children:[s.jsx(SX,{className:"h-3 w-3 mr-2"}),"Helpful"]}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-red-600",children:[s.jsx(Nje,{className:"h-3 w-3 mr-2"}),"Not helpful"]})]})})]})})]})},xze=({messages:e,onActionClick:t,onShare:n,onBranch:r})=>s.jsx(js,{className:"h-full",children:s.jsx("div",{className:"p-4 space-y-4 pb-32",children:e.length===0?s.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400 mt-8",children:[s.jsx(di,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),s.jsx("p",{className:"text-lg font-medium mb-2",children:"General Assistant"}),s.jsx("p",{children:"Ask me anything. I can help with questions or start tasks for you."})]}):e.map(a=>s.jsx(kse,{message:a,onActionClick:t,onShare:n,onBranch:r},a.id))})}),yze=[{id:"client-onboarding",title:"New Client Onboarding",description:"Complete client setup process including documentation and account creation",category:"Business",steps:8,estimatedTime:"45 min",icon:s.jsx(Bn,{className:"h-5 w-5"})}
1495,{id:"employee-setup",title:"Employee Setup",description:"HR onboarding workflow for new team members",category:"HR",steps:12,estimatedTime:"60 min",icon:s.jsx(dl,{className:"h-5 w-5"})},{id:"document-review",title:"Document Review Process",description:"Structured document analysis and approval workflow",category:"Legal",steps:6,estimatedTime:"30 min",icon:s.jsx(rn,{className:"h-5 w-5"})}],vze=({onStartTask:e,smartTemplates:t=[],activeTask:n})=>{const[r,a]=b.useState("all"),i=t.map(u=>({id:u.id,title:u.title,description:u.description,category:u.category,steps:u.steps.length,estimatedTime:`${u.steps.length*5} min`,icon:s.jsx(bc,{className:"h-5 w-5"}),isSmartTemplate:!0,orchestrationEnabled:u.orchestrationEnabled})),o=[...yze,...i],l=["all",...Array.from(new Set(o.map(u=>u.category)))],c=r==="all"?o:o.filter(u=>u.category===r);return s.jsx(js,{className:"h-full",children:s.jsx("div",{className:"p-4 space-y-4 pb-32",children:n?s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx(bc,{className:"h-12 w-12 mx-auto mb-4 opacity-50 text-green-600"}),s.jsx("p",{className:"text-lg font-medium mb-2",children:"Active Task"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:n.title})]}),s.jsxs(te,{className:"border-2 border-gray-200 dark:border-gray-700",children:[s.jsxs(xe,{children:[s.jsx(we,{className:"text-xl",children:n.title}),s.jsxs(nt,{children:["Current step: ",n.currentStep]})]}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[s.jsx("span",{children:"Progress"}),s.jsxs("span",{children:[n.progress,"%"]})]}),s.jsx(qr,{value:n.progress,className:"w-full"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Y,{variant:"outline",size:"sm",children:"Previous Step"}),s.jsx(Y,{size:"sm",children:"Next Step"}),s.jsx(Y,{variant:"destructive",size:"sm",children:"Cancel Task"})]})]})})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx(bc,{className:"h-12 w-12 mx-auto mb-4 opacity-50 text-blue-600"}),s.jsx("p",{className:"text-lg font-medium mb-2",children:"Task Workflows"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Choose a workflow. I'll walk you through each step."})]}),s.jsx("div",{className:"flex gap-2 mb-4",children:l.map(u=>s.jsx(Y,{variant:r===u?"default":"outline",size:"sm",onClick:()=>a(u),className:"capitalize",children:u},u))}),s.jsx("div",{className:"grid gap-4",children:c.map(u=>s.jsxs(te,{className:"hover:shadow-md transition-shadow cursor-pointer border-2 border-gray-200 dark:border-gray-700",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[u.icon,s.jsxs("div",{children:[s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[u.title,u.isSmartTemplate&&s.jsx(le,{variant:"secondary",className:"text-xs",children:"Smart Template"}),u.orchestrationEnabled&&s.jsx(le,{variant:"default",className:"text-xs",children:"Auto Actions"})]}),s.jsx(nt,{className:"mt-1",children:u.description})]})]}),s.jsx(le,{variant:"secondary",children:u.category})]})}),s.jsx(se,{className:"pt-0",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(bc,{className:"h-4 w-4"}),u.steps," steps"]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(zn,{className:"h-4 w-4"}),u.estimatedTime]}),u.orchestrationEnabled&&s.jsx("div",{className:"flex items-center gap-1 text-blue-600",children:s.jsx("span",{className:"text-xs",children:"⚡ Smart Actions"})})]}),s.jsx(Y,{onClick:()=>e(u.id,u.isSmartTemplate),children:"Start Task"})]})})]},u.id))})]})})})};var bze=Xte();function wze(){return bze.useSyncExternalStore(jze,()=>!0,()=>!1)}function jze(){return()=>{}}var ZR="Avatar",[Nze]=Mr(ZR),[Sze,Cse]=Nze(ZR),_se=b.forwardRef((e,t)=>
vendor: 4,871 bytes, line 1495
1495{const{__scopeAvatar:n,...r}=e,[a,i]=b.useState("idle");return s.jsx(Sze,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:s.jsx(Ve.span,{...r,ref:t})})});_se.displayName=ZR;var Ase="AvatarImage",Ese=b.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,o=Cse(Ase,n),l=kze(r,i),c=lr(u=>{a(u),o.onImageLoadingStatusChange(u)});return cr(()=>{l!=="idle"&&c(l)},[l,c]),l==="loaded"?s.jsx(Ve.img,{...i,ref:t,src:r}):null});Ese.displayName=Ase;var Pse="AvatarFallback",Tse=b.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=Cse(Pse,n),[o,l]=b.useState(r===void 0);return b.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>l(!0),r);return()=>window.clearTimeout(c)}},[r]),o&&i.imageLoadingStatus!=="loaded"?s.jsx(Ve.span,{...a,ref:t}):null});Tse.displayName=Pse;function xB(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function kze(e,{referrerPolicy:t,crossOrigin:n}){const r=wze(),a=b.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[o,l]=b.useState(()=>xB(i,e));return cr(()=>{l(xB(i,e))},[i,e]),cr(()=>{const c=f=>()=>{l(f)};if(!i)return;const u=c("loaded"),d=c("error");return i.addEventListener("load",u),i.addEventListener("error",d),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",d)}},[i,n,t]),o}var Ise=_se,Ose=Ese,Mse=Tse;const E4=b.forwardRef(({className:e,...t},n)=>s.jsx(Ise,{ref:n,className:He("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));E4.displayName=Ise.displayName;const Cze=b.forwardRef(({className:e,...t},n)=>s.jsx(Ose,{ref:n,className:He("aspect-square h-full w-full",e),...t}));Cze.displayName=Ose.displayName;const P4=b.forwardRef(({className:e,...t},n)=>s.jsx(Mse,{ref:n,className:He("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));P4.displayName=Mse.displayName;const gC=[{id:"hr-bot",name:"HR Specialist",role:"Human Resources Expert",description:"Handles employee onboarding, benefits, policies, and HR compliance",expertise:["Employee Onboarding","Benefits Administration","HR Policies","Compliance"],icon:s.jsx(Bn,{className:"h-5 w-5"}),color:"bg-green-100 text-green-800",isOnline:!0},{id:"it-bot",name:"IT Specialist",role:"Technical Systems Expert",description:"Manages system access, software setup, and technical troubleshooting",expertise:["System Access","Software Setup","Security Protocols","Technical Support"],icon:s.jsx(Zg,{className:"h-5 w-5"}),color:"bg-blue-100 text-blue-800",isOnline:!0},{id:"finance-bot",name:"Finance Specialist",role:"Financial Operations Expert",description:"Handles expense approvals, budget allocation, and financial compliance",expertise:["Expense Processing","Budget Management","Financial Reporting","Approvals"],icon:s.jsx(Rs,{className:"h-5 w-5"}),color:"bg-yellow-100 text-yellow-800",isOnline:!0},{id:"compliance-bot",name:"Compliance Specialist",role:"Legal & Regulatory Expert",description:"Ensures regulatory compliance, manages documentation, and handles audits",expertise:["Regulatory Compliance","Legal Documentation","Audit Management","Risk Assessment"],icon:s.jsx(it,{className:"h-5 w-5"}),color:"bg-red-100 text-red-800",isOnline:!1}],_ze=[{id:"employee-onboarding",title:"Employee Onboarding",description:"Complete end-to-end new hire process",agents:["hr-bot","it-bot","finance-bot"],steps:["HR Documentation","System Access Setup","Expense Account Creation"]},{id:"vendor-setup",title:"Vendor Setup",description:"New vendor registration and approval",agents:["finance-bot","compliance-bot"],steps:["Financial Verification","Compliance Check","Contract Review"]},{id:"policy-review",title:"Policy Review & Update",description:"Cross-departmental policy coordination",agents:["hr-bot","compliance-bot","it-bot"],steps:["Policy Assessment","Compliance Review","Technical Implementation"]}],Aze=({messages:e,activeAgent:t,onAgentSwitch:n,onActionClick:r,onShare:a,onBranch:i})=>{const o=gC.find(c=>c.id===t),l=e[t]||[];return s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsxs("div",{className:"border-b-2 border-gray-300 dark:border-gray-600 p-4 flex-shrink-0",children:[s.jsxs("div",{className:"text-center mb-4",children:[s.jsxs("div",{className:"flex items-center justify-center gap-2 mb-3",children:[s.jsx(Bn,{className:"h-8 w-8 text-cyber-blue"}),s.jsx(Bt,{className:"h-4 w-4 text-gray-400"}),s.jsx(Pe,{className:"h-6 w-6 text-green-600"})]}),s.jsx("p",{className:"text-lg font-semibold",children:"Specialist Coordination"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Seamless handoffs between expert agents for complex processes"})]}),s.jsxs("div",{className:"mb-4",children:[s.jsx("p",{className:"text-sm font-medium mb-2",children:"Qu
1495ick Start Workflows:"}),s.jsx("div",{className:"grid gap-2",children:_ze.map(c=>s.jsx(te,{className:"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors border-2 border-gray-200 dark:border-gray-700",children:s.jsx(se,{className:"p-3",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"font-medium text-sm",children:c.title}),s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:c.description})]}),s.jsx("div",{className:"flex -space-x-1",children:c.agents.map(u=>{const d=gC.find(f=>f.id===u);return s.jsx(E4,{className:"h-6 w-6 border-2 border-white",children:s.jsx(P4,{className:(d==null?void 0:d.color)||"bg-gray-100",children:d==null?void 0:d.icon})},u)})})]})})},c.id))})]}),s.jsx(os,{value:t,onValueChange:n,children:s.jsx(Kr,{className:"grid w-full grid-cols-2 lg:grid-cols-4 border-2 border-gray-300 dark:border-gray-500",children:gC.map(c=>s.jsxs(at,{value:c.id,className:"flex items-center gap-1 text-xs",disabled:!c.isOnline,children:[c.icon,s.jsx("span",{className:"hidden sm:inline",children:c.name.split(" ")[0]}),!c.isOnline&&s.jsx("span",{className:"w-2 h-2 bg-gray-400 rounded-full ml-1"})]},c.id))})})]}),o&&s.jsx("div",{className:"p-4 border-b-2 border-gray-300 dark:border-gray-600 flex-shrink-0",children:s.jsxs(te,{className:"border-2 border-gray-200 dark:border-gray-700",children:[s.jsx(xe,{className:"pb-3",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(E4,{children:s.jsx(P4,{className:o.color,children:o.icon})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs(we,{className:"text-lg flex items-center gap-2",children:[o.name,o.isOnline?s.jsxs(le,{variant:"secondary",className:"bg-green-100 text-green-800",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full mr-1 animate-pulse"}),"Available"]}):s.jsx(le,{variant:"secondary",className:"bg-gray-100 text-gray-600",children:"Offline"})]}),s.jsx(nt,{children:o.description})]})]})}),s.jsx(se,{className:"pt-0",children:s.jsx("div",{className:"flex flex-wrap gap-1",children:o.expertise.map(c=>s.jsx(le,{variant:"outline",className:"text-xs",children:c},c))})})]})}),s.jsx(js,{className:"flex-1",children:s.jsx("div",{className:"p-4 space-y-4 pb-32",children:l.length===0?s.jsxs("div",{className:"text-center text-gray-500 dark:text-gray-400 mt-8",children:[s.jsx("div",{className:"mb-4",children:o==null?void 0:o.icon}),s.jsx("p",{className:"text-lg font-medium mb-2",children:o==null?void 0:o.name}),s.jsxs("p",{className:"mb-4",children:["I specialize in ",o==null?void 0:o.expertise.join(", ").toLowerCase()]}),s.jsx("div",{className:"bg-blue-50 dark:bg-blue-950/20 p-4 rounded-lg border-2 border-blue-200 dark:border-blue-800",children:s.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:["💡 ",s.jsx("strong",{children:"Pro Tip:"})," I can coordinate with other specialists automatically. Just describe your process and I'll handle the handoffs!"]})})]}):l.map(c=>s.jsx(kse,{message:c,onActionClick:r,onShare:a,onBranch:i},c.id))})})]})},Eze=({memoryContext:e,onClearMemory:t,onDismiss:n})=>{const a=(()=>{var c,u,d;const i=((c=e.userMemory)==null?void 0:c.length)||0,o=((u=e.institutionalMemory)==null?void 0:u.length)||0,l=((d=e.taskMemory)==null?void 0:d.length)||0;return i+o+l})();return a===0&&!e.resumedFromSession?null:s.jsxs(ti,{className:"border-blue-200 bg-blue-50 dark:bg-blue-900/20 dark:border-blue-800",children:[s.jsx(Sn,{className:"h-4 w-4 text-blue-600"}),s.jsxs(ni,{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[s.jsx("span",{className:"text-blue-800 dark:text-blue-200",children:e.resumedFromSession?"Using information from your previous session":`Using context from ${a} stored memories`}),s.jsxs("div",{className:"flex gap-1",children:[e.userMemory&&e.userMemory.length>0&&s.jsxs(le,{variant:"outline",className:"text-xs bg-white/50",children:[s.jsx(li,{className:"h-2 w-2 mr-1"}),e.userMemory.length," personal"]}),e.institutionalMemory&&e.institutionalMemory.length>0&&s.jsxs(le,{variant:"outline",className:"text-xs bg-white/50",children:[s.jsx(dl,{className:"h-2 w-2 mr-1"}),e.institutionalMemory.length," institutional"]}),e.taskMemory&&e.taskMemory.length>0&&s.jsxs(le,{variant:"outline",className:"text-xs bg-white/50",children:[s.jsx(zn,{className:"h-2 w-2 mr-1"}),e.taskMemory.length," task"]})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(it,{className:"h-3 w-3 text-green-600"}),s.jsx("span",{className:"text-xs text-green-700 dark:text-green-400 mr-2",children:"GDPR Compliant"}),s.jsx(Y,{size:"sm",variant:"outline",onClick:t,className:"text-xs h-6 px-2",children:"Clear Memory"}),s.jsx(Y,{size:"sm",variant:"ghost",onClick:n,className:"h-6 w-6 p-0",children:s.jsx(jr,{className:"h-3 w-3"})})]})]})]})},Pze=({onCapabilitySelect:e})=>{const t=[{id:"workflow-automation",title:"Workflow Automation",description:"Multi-step process orchestration with approval chains",icon:s.jsx(CX,{className:"h-5 w-5"}),category:"automation",status:"active",badge:"LIVE"},{id:"security-compliance",title:"Security & Compliance",description:"Real-time security monitoring and compliance validation",icon:s.jsx(it,{className:"h-5 w-5"}),category:"security",status:"active",badge:"SOC2"},{id:"system-integration",title:"System Integration",description:"Enterprise system connectors and API orchestration",icon:s.jsx(Gr,{className:"h-5 w-5"}),category:"integration",status:"configured",badge:"12 ACTIVE"},{id:"multi-agent-coordination",title:"Multi-Agent Coordination",description:"Specialist agent handoffs and expertise routing",icon:s.jsx(Bn,{className:"h-5 w-5"}),category:"intelligence",status:"available"},{id:"analytics-intelligence",title:"Analytics Intelligence",description:"Real-time insights and predictive analytics",icon:s.jsx(el,{className:"h-5 w-5"}),category:"intelligence",status:"active",badge:"AI-POWERED"}
1495,{id:"governance-controls",title:"Governance Controls",description:"Policy enforcement and audit trail management",icon:s.jsx(Kt,{className:"h-5 w-5"}),category:"security",status:"configured"}],n=a=>{switch(a){case"automation":return"hsl(var(--cyber-blue))";case"security":return"hsl(var(--cyber-electric))";case"integration":return"hsl(var(--neon-cyan))";case"intelligence":return"hsl(var(--powerful-cyan))";default:return"hsl(var(--cyber-blue))"}},r=a=>{switch(a){case"active":return s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full animate-pulse"});case"configured":return s.jsx("div",{className:"w-2 h-2 bg-blue-400 rounded-full"});case"available":return s.jsx("div",{className:"w-2 h-2 bg-gray-400 rounded-full"})}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-white",children:"Enterprise Capabilities"}),s.jsx("p",{className:"text-sm text-gray-400 font-mono",children:"SYSTEM.STATUS: OPERATIONAL"})]}),s.jsxs(le,{variant:"outline",className:"border-green-400/50 text-green-400 bg-green-400/10",children:[s.jsx(Sc,{className:"h-3 w-3 mr-1"}),"ALL SYSTEMS GO"]})]}),s.jsx("div",{className:"grid gap-3",children:t.map(a=>s.jsx(te,{className:"bg-gray-900/50 border-gray-700/50 hover:border-gray-600/50 transition-all duration-200 hover:bg-gray-900/70 cursor-pointer group",onClick:()=>e(a.id),children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-start justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 rounded-lg bg-gray-800/50 group-hover:bg-gray-800/70 transition-colors",style:{borderLeft:`3px solid ${n(a.category)}`},children:a.icon}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium text-white text-sm",children:a.title}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:a.description})]})]}),r(a.status)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-gray-500 uppercase",children:a.category}),a.badge&&s.jsx(le,{variant:"outline",className:"text-xs px-2 py-0.5 h-auto border-gray-600/50 text-gray-300",children:a.badge})]}),s.jsx(Y,{variant:"ghost",size:"sm",className:"h-8 px-3 text-xs hover:bg-gray-800/50 text-gray-400 hover:text-white",children:"ACTIVATE"})]})]})},a.id))}),s.jsx("div",{className:"mt-6 p-3 bg-gray-900/30 rounded-lg border border-gray-700/30",children:s.jsxs("div",{className:"flex items-center gap-2 text-xs font-mono text-gray-400",children:[s.jsx(ur,{className:"h-3 w-3"}),s.jsx("span",{children:"SECURE ENCLAVE: ACTIVE"}),s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full animate-pulse"}),s.jsx("span",{children:"LIVE"})]})]})})]})},Tze=({onSuggestionSelect:e})=>{const t=[{id:"workflow-optimization",type:"insight",title:"Workflow Bottleneck Detected",description:"Approval process taking 40% longer than baseline",confidence:94,priority:"high",icon:s.jsx(fl,{className:"h-4 w-4"})},{id:"security-alert",type:"warning",title:"Unusual Access Pattern",description:"Multiple login attempts from new location",confidence:87,priority:"high",icon:s.jsx(ln,{className:"h-4 w-4"})},{id:"efficiency-gain",type:"opportunity",title:"Automation Opportunity",description:"Repetitive task detected - can be automated",confidence:78,priority:"medium",icon:s.jsx(Ot,{className:"h-4 w-4"})},{id:"team-collaboration",type:"action",title:"Team Handoff Required",description:"This task requires Finance team expertise",confidence:91,priority:"medium",icon:s.jsx(Bn,{className:"h-4 w-4"})}],n=a=>{switch(a){case"insight":return"text-blue-400 border-blue-400/30 bg-blue-400/10";case"action":return"text-green-400 border-green-400/30 bg-green-400/10";case"warning":return"text-yellow-400 border-yellow-400/30 bg-yellow-400/10";case"opportunity":return"text-purple-400 border-purple-400/30 bg-purple-400/10"}},r=a=>{switch(a){case"high":return s.jsx("div",{className:"w-2 h-2 bg-red-400 rounded-full animate-pulse"});case"medium":return s.jsx("div",{className:"w-2 h-2 bg-yellow-400 rounded-full"});case"low":return s.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"})}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-white",children:"Intelligence Center"}),s.jsx("p",{className:"text-sm text-gray-400 font-mono",children:"AI.INSIGHTS: ACTIVE_MONITORING"})]}),s.jsxs(le,{variant:"outline",className:"border-purple-400/50 text-purple-400 bg-purple-400/10",children:[s.jsx(Sn,{className:"h-3 w-3 mr-1"}),"AI ACTIVE"]})]}),s.jsx(te,{className:"bg-gray-900/50 border-gray-700/50 mb-4",children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(g1,{className:"h-4 w-4 text-cyan-400"}),s.jsx("span",{className:"text-sm font-medium text-white",children:"Current Context"})]}),s.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Analyzing employee onboarding workflow patterns across HR, IT, and Finance departments"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"flex-1 bg-gray-800/50 rounded-full h-2",children:s.jsx("div",{className:"bg-cyan-400 h-2 rounded-full",style:{width:"67%"}})}),s.jsx("span",{className:"text-xs font-mono text-gray-400",children:"67% ANALYZED"})]})]})}),s.jsx("div",{className:"space-y-3",children:t.map(a=>s.jsx(te,{className:"bg-gray-900/50 border-gray-700/50 hover:border-gray-600/50 transition-all duration-200 hover:bg-gray-900/70 cursor-pointer group",onClick:()=>e(a.id),children:s.jsxs("div",{className:"p-3",children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:`p-1.5 rounded ${n(a.type)}`,children:a.icon}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h4",{className:"text-sm font-medium text-white",children:a.title}),s.jsx("p",{className:"text-xs text-gray-400 mt-1",children:a.description})]})]}),r(a.priority)]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs font-mono text-gray-500 uppercase",children:a.type}),s.jsxs(le,{variant:"outline",className:"text-xs px-2 py-0.5 h-auto border-gray-600/50 text-gray-400",children:[a.confidence,"% CONF"]})]}),s.jsx(Bt,{className:"h-3 w-3 text-gray-500 group-hover:text-gray-300 transition-colors"})]})]})},a.id))}),s.jsx(te,{className:"bg-gray-900/30 border-gray-700/30 mt-6",children:s.jsxs("div",{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(pX,{className:"h-4 w-4 text-yellow-400"}),s.jsx("span",{className:"text-sm font-medium text-white",children:"Qu
1495ick Actions"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-xs hover:bg-gray-800/50 text-gray-300 hover:text-white",children:[s.jsx(Ot,{className:"h-3 w-3 mr-2"}),"Run System Diagnostics"]}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-xs hover:bg-gray-800/50 text-gray-300 hover:text-white",children:[s.jsx(Bn,{className:"h-3 w-3 mr-2"}),"Coordinate Specialists"]}),s.jsxs(Y,{variant:"ghost",size:"sm",className:"w-full justify-start text-xs hover:bg-gray-800/50 text-gray-300 hover:text-white",children:[s.jsx(fl,{className:"h-3 w-3 mr-2"}),"Generate Analytics Report"]})]})]})}),s.jsx("div",{className:"mt-4 p-3 bg-gray-900/20 rounded-lg border border-gray-700/20",children:s.jsxs("div",{className:"flex items-center justify-between text-xs font-mono text-gray-400",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"h-3 w-3"}),s.jsx("span",{children:"LAST_UPDATE: 2.3s ago"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full animate-pulse"}),s.jsx("span",{children:"MONITORING"})]})]})})]})},xC={apiEndpoint:"https://your-backend-api.com/api/chat",headers:{},requestPayload:{}},Ize=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState(null);return{sendMessage:async i=>{t(!0),r(null);try{const o=await fetch(xC.apiEndpoint,{method:"POST",headers:{"Content-Type":"application/json",...xC.headers},body:JSON.stringify({message:i,...xC.requestPayload})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);const l=await o.json();return l.response||l.message||l.content||"No response received"}catch(o){const l=o instanceof Error?o.message:"Unknown error occurred";throw r(l),new Error(l)}finally{t(!1)}},isLoading:e,error:n}},Oze=()=>{const[e,t]=b.useState(!1),[n,r]=b.useState({userMemory:[],institutionalMemory:[],taskMemory:[]}),a=b.useCallback(()=>({userMemory:[{type:"preference",key:"session_id",value:`session_${Date.now()}`,timestamp:new Date}],institutionalMemory:[],taskMemory:[]}),[]),i=b.useCallback((d,f)=>{try{const m=localStorage.getItem("taskProgress")||"{}",p=JSON.parse(m);p[d]={...f,lastUpdated:new Date().toISOString()},localStorage.setItem("taskProgress",JSON.stringify(p)),console.log("Task progress saved:",d,f)}catch(m){console.error("Failed to save task progress:",m)}},[]),o=b.useCallback(d=>{try{const f=localStorage.getItem("taskProgress")||"{}";return JSON.parse(f)[d]||null}catch(f){return console.error("Failed to get task progress:",f),null}},[]),l=b.useCallback((d,f)=>{r(m=>({...m,userMemory:[...m.userMemory||[],{type:"preference",key:d,value:f,timestamp:new Date}]}))},[]),c=b.useCallback((d,f)=>{r(m=>({...m,userMemory:[...m.userMemory||[],{type:"setting",key:d,value:f,timestamp:new Date}]}))},[]),u=b.useCallback(()=>{r({userMemory:[],institutionalMemory:[],taskMemory:[]}),localStorage.removeItem("taskProgress")},[]);return{memoryContext:n,generateMemoryContext:a,saveTaskProgress:i,getTaskProgress:o,updateUserPreference:l,updateSessionData:c,clearMemory:u,showResumePrompt:e,setShowResumePrompt:t}},Mze=()=>{const e=b.useCallback(n=>{const r=n.toLowerCase(),a=["workflow","process","step","onboard","setup","configure","complete","finish","start","begin","checklist","guide","procedure","instructions","how to","walk me through"],i=["hr","human resources","payroll","benefits","employee","it support","technical","computer","software","system","finance","accounting","budget","expense","invoice","compliance","legal","regulation","audit","policy"],o=["hello","hi","help","question","ask","tell me","what is","explain","information","general"],l=a.filter(y=>r.includes(y)).length,c=i.filter(y=>r.includes(y)).length,u=o.filter(y=>r.includes(y)).length,d=Math.max(l,c,u);if(d===0)return{intent:"general",confidence:.3,suggestedTab:"chat",reasoning:"No specific intent detected, defaulting to general chat"};let f="chat",m="general",p="";l===d&&l>0?(f="tasks",m="task_workflow",p=`Detected ${l} task-related keywords, suggesting structured workflow`):c===d&&c>0?(f="multi-agent",m="specialized_assistance",p=`Detected ${c} specialist keywords, suggesting expert agent`):(f="chat",m="general_conversation",p="General conversation detected, staying in chat mode");const v=Math.min(.9,d*.2+.3);return{intent:m,confidence:v,suggestedTab:f,reasoning:p}},[]),t=b.useCallback(n=>{const r=n.toLowerCase();return r.includes("hr")||r.includes("payroll")||r.includes("benefits")||r.includes("employee")?"hr-bot":r.includes("it")||r.includes("technical")||r.includes("computer")||r.includes("software")?"it-bot":r.includes("finance")||r.includes("budget")||r.includes("expense")||r.includes("invoice")?"finance-bot":r.includes("compliance")||r.includes("legal")||r.includes("regulation")||r.includes("audit")?"compliance-bot":"hr-bot"},[]);return{analyzeIntent:e,getRecommendedAgent:t}},Rze=()=>{var ge,J,ne;const[e,t]=b.useState({chat:[],tasks:[],"multi-agent":{}}),[n,r]=b.useState("chat"),[a,i]=b.useState("hr-bot"),[o,l]=b.useState(null),[c,u]=b.useState(!1),[d,f]=b.useState(!0),[m,p]=b.useState(null),[v,y]=b.useState(!1),[x,w]=b.useState(null);b.useRef(null);const{sendMessage:N,isLoading:S,error:_}=Ize(),{generateMemoryContext:k,saveTaskProgress:C,showResumePrompt:E,setShowResumePrompt:O,clearMemory:P}=Oze(),{analyzeIntent:R}
1495=Mze();_1();const{toast:T}=_t(),D=Z=>{const oe=[["onboard","access","account"],["employee","system","setup"],["payroll","expense","reimburse"],["benefits","cost","budget"],["software","license","cost"],["system","purchase","approval"],["audit","hr","policy"],["regulation","it","security"],["compliance","finance","report"]],he=Z.toLowerCase();for(const ae of oe)if(ae.every(fe=>he.includes(fe)))return!0;return["hr","it","finance","legal","compliance","accounting"].filter(ae=>he.includes(ae)).length>=2},z=Z=>{const oe=Z.toLowerCase();return oe.includes("onboard")&&(oe.includes("access")||oe.includes("system"))?"Employee onboarding involves HR and IT expertise. I can connect you with specialists for seamless coordination.":oe.includes("expense")&&oe.includes("policy")?"Expense policies involve HR and Finance coordination. Let me connect you with both specialists.":oe.includes("compliance")&&oe.includes("audit")?"Compliance audits require multiple department coordination. I can orchestrate specialist handoffs.":"This involves multiple expertise areas. Would you like me to coordinate with specialist agents?"},I=(Z,oe)=>{const he=[];return oe==="chat"&&((Z.toLowerCase().includes("task")||Z.toLowerCase().includes("workflow"))&&he.push({id:"switch-to-tasks",type:"quick-action",title:"View Tasks",description:"Switch to task workflows",icon:"list",primary:!0}),D(Z)&&he.push({id:"suggest-multi-agent",type:"quick-action",title:"Get Specialist Help",description:"Connect with expert agents",icon:"users",primary:!1})),oe==="tasks"&&he.push({id:"save-progress",type:"quick-action",title:"Save Progress",description:"Bookmark current step",icon:"bookmark"}),he},F=async(Z,oe)=>{const he=R(Z);he.confidence>.7&&he.suggestedTab!==n&&T({description:`This seems like a ${he.suggestedTab} question. Switch tabs for better assistance.`,duration:4e3}),D(Z)&&!v&&(w(z(Z)),setTimeout(()=>{T({title:"Multiple Expertise Detected",description:"This might benefit from specialist coordination. Check the suggestion below.",duration:6e3})},2e3));const Q=H(),ae={id:Date.now().toString(),content:Z,isUser:!0,timestamp:new Date,status:"sent",attachments:oe==null?void 0:oe.map(Ee=>({id:Math.random().toString(),name:Ee.name,type:Ee.type,size:Ee.size,url:URL.createObjectURL(Ee),processed:!1}))},fe={id:(Date.now()+1).toString(),content:"",isUser:!1,timestamp:new Date,status:"sending"};q([...Q,ae,fe]);try{const Ee=await N(Z),Re=I(Ee,n),qe=k(),St=U(Z),Ut=St?{toolName:St,isVerified:!0,riskLevel:"low",isDryRun:!1}:void 0;q(Yt=>Yt.map(Ue=>Ue.id===fe.id?{...Ue,content:Ee,status:"sent",actions:Re,memoryContext:qe,securityContext:Ut,workflowState:n==="tasks"&&Re.length>0?{status:"initiated",nextActions:Re.map(wt=>wt.title)}:void 0}:Ue))}catch{q(Re=>Re.map(qe=>qe.id===fe.id?{...qe,content:"Sorry, I encountered an error. Please try again.",status:"error"}:qe))}},U=Z=>{const oe=["database","payment","email","calendar","api"];for(const he of oe)if(Z.toLowerCase().includes(he))return he.charAt(0).toUpperCase()+he.slice(1)+" Tool";return null},H=()=>n==="multi-agent"?e["multi-agent"][a]||[]:e[n],q=Z=>{t(n==="multi-agent"?oe=>({...oe,"multi-agent":{...oe["multi-agent"],[a]:typeof Z=="function"?Z(oe["multi-agent"][a]||[]):Z}}):oe=>({...oe,[n]:typeof Z=="function"?Z(oe[n]):Z}))},B=(Z,oe)=>{if(console.log("Action clicked:",Z,oe),Z==="switch-to-tasks"){r("tasks");return}if(Z==="suggest-multi-agent"){y(!0),T({title:"Specialist Help Available",description:"Multi-Agent tab is now available for expert coordination.",duration:4e3});return}if(T({description:`Action "${Z}" executed successfully`,duration:2e3}),n==="tasks"&&(oe==null?void 0:oe.type)==="tutoring"){const he={id:Date.now().toString(),content:"✅ Task step completed! Moving to next step...",isUser:!1,timestamp:new Date,status:"sent"};q(Q=>[...Q,he])}},L=Z=>{const oe={id:Z,title:"New Client Onboarding",progress:0,currentStep:"Collect initial information",completedSteps:[]};l(oe),C(Z,oe),T({description:`Started ${oe.title}`,duration:3e3}),(Z.includes("onboard")||Z.includes("multi")||Z.includes("complex"))&&setTimeout(()=>{w("This onboarding process involves HR, IT, and Finance coordination. Would you like specialist handoffs?")},3e3);const he={id:Date.now().toString(),content:`🚀 Let's start with ${oe.title}!
1496
1497First, I'll need to collect some initial information. What's the client's company name?`,isUser:!1,timestamp:new Date,status:"sent",memoryContext:k()};q([he])},V=()=>{t(n==="multi-agent"?Z=>({...Z,"multi-agent":{...Z["multi-agent"],[a]:[]}}):Z=>({...Z,[n]:[]}))},K=()=>{P(),f(!1),T({description:"Memory cleared successfully",duration:2e3})},W=Z=>{const oe={id:"welcome",isUser:!1,timestamp:new Date,status:"sent",memoryContext:k()};switch(Z){case"chat":return{...oe,content:"👋 Hi! I'm your general AI assistant. Ask me anything or type 'start onboarding' to begin a task."};case"tasks":return{...oe,content:"📋 Welcome to Task Workflows! Choose a structured process above and I'll guide you through each step."};case"multi-agent":return{...oe,content:"🤖 Welcome to Specialist Coordination! I'll connect you with expert agents and manage handoffs based on your needs."};
1497default:return{...oe,content:"👋 Welcome! How can I help you today?"}}};b.useEffect(()=>{H().length===0&&q([W(n)])},[n,a]);const ie=k(),ve=ie&&((((ge=ie.userMemory)==null?void 0:ge.length)||0)>0||(((J=ie.institutionalMemory)==null?void 0:J.length)||0)>0||(((ne=ie.taskMemory)==null?void 0:ne.length)||0)>0||ie.resumedFromSession);return s.jsxs("div",{className:"flex h-screen max-h-screen bg-gradient-to-br from-gray-950 via-gray-900 to-gray-950 text-gray-100",children:[s.jsxs("div",{className:"w-80 border-r border-gray-700/50 bg-gray-900/30 backdrop-blur-sm flex flex-col",children:[s.jsxs("div",{className:"p-6 border-b border-gray-700/50",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[s.jsx("div",{className:"p-2 bg-gradient-to-r from-cyan-500 to-blue-600 rounded-lg",children:s.jsx(wje,{className:"h-5 w-5 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-white",children:"PRIVION"}),s.jsx("p",{className:"text-xs text-gray-400 font-mono",children:"ENTERPRISE.AI.PLATFORM"})]})]}),s.jsxs(te,{className:"bg-gray-900/50 border-gray-700/50 p-3",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Yu,{className:"h-4 w-4 text-green-400"}),s.jsx("span",{className:"text-sm font-medium text-white",children:"System Status"})]}),s.jsx(le,{variant:"outline",className:"border-green-400/50 text-green-400 bg-green-400/10 text-xs",children:"OPERATIONAL"})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 text-xs font-mono",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-green-400 font-semibold",children:"99.9%"}),s.jsx("div",{className:"text-gray-500",children:"UPTIME"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-cyan-400 font-semibold",children:"2.3ms"}),s.jsx("div",{className:"text-gray-500",children:"LATENCY"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-blue-400 font-semibold",children:"12"}),s.jsx("div",{className:"text-gray-500",children:"ACTIVE"})]})]})]})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:s.jsx(Pze,{onCapabilitySelect:Z=>{T({title:"Capability Activated",description:`Initializing ${Z.replace("-"," ")} module...`,duration:3e3})}})})]}),s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsxs("div",{className:"border-b border-gray-700/50 bg-gray-900/20 backdrop-blur-sm p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-gray-800/50 rounded-lg",children:s.jsx(Sn,{className:"h-5 w-5 text-cyan-400"})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-lg font-semibold text-white",children:"Mission Control"}),s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx("span",{className:"text-gray-400 font-mono",children:"SESSION.ID:"}),s.jsxs("span",{className:"text-cyan-400 font-mono",children:["PRIV-",Date.now().toString().slice(-6)]}),s.jsx(nd,{orientation:"vertical",className:"h-4 bg-gray-600"}),s.jsx("span",{className:"text-gray-400 font-mono",children:"MODE:"}),s.jsx(le,{variant:"outline",className:"border-cyan-400/50 text-cyan-400 bg-cyan-400/10 text-xs font-mono",children:n==="multi-agent"?"MULTI_AGENT":n.toUpperCase()})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[c&&s.jsxs(le,{variant:"outline",className:"border-green-400/50 text-green-400 bg-green-400/10",children:[s.jsx(ur,{className:"h-3 w-3 mr-1"}),"SECURE"]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>u(!c),className:"text-gray-400 hover:text-white",children:s.jsx(it,{className:"h-4 w-4"})}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:V,className:"text-gray-400 hover:text-red-400",children:s.jsx(oi,{className:"h-4 w-4"})})]})]}),x&&!v&&s.jsxs(ti,{className:"border border-cyan-400/30 bg-cyan-400/10 mb-3",children:[s.jsx(Bn,{className:"h-4 w-4 text-cyan-400"}),s.jsxs(ni,{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-200",children:x}),s.jsxs("div",{className:"flex gap-2 ml-2",children:[s.jsx(Y,{size:"sm",className:"bg-gradient-to-r from-cyan-500 to-blue-600 hover:from-cyan-600 hover:to-blue-700 text-white",onClick:()=>
1497{y(!0),w(null),T({description:"Specialist coordination activated!",duration:3e3})},children:"ACTIVATE"}),s.jsx(Y,{variant:"outline",size:"sm",className:"border-gray-600 text-gray-300 hover:bg-gray-800",onClick:()=>w(null),children:"DISMISS"})]})]})]}),ve&&d&&s.jsx("div",{className:"mb-3",children:s.jsx(Eze,{memoryContext:ie,onClearMemory:K,onDismiss:()=>f(!1)})}),E&&s.jsxs(ti,{className:"border border-blue-400/30 bg-blue-400/10 mb-3",children:[s.jsx(Qs,{className:"h-4 w-4 text-blue-400"}),s.jsxs(ni,{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-gray-200",children:"Resume previous session?"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Y,{size:"sm",className:"bg-gradient-to-r from-blue-500 to-cyan-600 text-white",onClick:()=>O(!1),children:"RESUME"}),s.jsx(Y,{variant:"outline",size:"sm",className:"border-gray-600 text-gray-300 hover:bg-gray-800",onClick:()=>O(!1),children:"START FRESH"})]})]})]})]}),s.jsx("div",{className:"p-4",children:s.jsxs(os,{value:n,onValueChange:Z=>r(Z),children:[s.jsxs(Kr,{className:`grid w-full ${v?"grid-cols-3":"grid-cols-2"} bg-gray-800/50 border border-gray-600/50`,children:[s.jsxs(at,{value:"chat",className:"flex items-center gap-2 data-[state=active]:bg-gradient-to-r data-[state=active]:from-cyan-500 data-[state=active]:to-blue-600 data-[state=active]:text-white",children:[s.jsx(di,{className:"h-4 w-4"}),s.jsx("span",{className:"font-mono",children:"GENERAL"})]}),s.jsxs(at,{value:"tasks",className:"flex items-center gap-2 data-[state=active]:bg-gradient-to-r data-[state=active]:from-cyan-500 data-[state=active]:to-blue-600 data-[state=active]:text-white",children:[s.jsx(bc,{className:"h-4 w-4"}),s.jsx("span",{className:"font-mono",children:"WORKFLOWS"}),s.jsx(le,{variant:"outline",className:"ml-1 border-cyan-400/50 text-cyan-400 bg-cyan-400/10 text-xs px-1",children:"ENTERPRISE"})]}),v&&s.jsxs(at,{value:"multi-agent",className:"flex items-center gap-2 data-[state=active]:bg-gradient-to-r data-[state=active]:from-cyan-500 data-[state=active]:to-blue-600 data-[state=active]:text-white",children:[s.jsx(Bn,{className:"h-4 w-4"}),s.jsx("span",{className:"font-mono",children:"SPECIALISTS"})]})]}),s.jsxs("div",{className:"flex-1 mt-4",children:[s.jsx(Ze,{value:"chat",className:"h-full m-0",children:s.jsx("div",{className:"h-[60vh] overflow-y-auto",children:s.jsx(xze,{messages:H(),onActionClick:B,onShare:()=>T({description:"Sharing functionality coming soon!"}),onBranch:()=>T({description:"Conversation branching coming soon!"})})})}),s.jsx(Ze,{value:"tasks",className:"h-full m-0",children:s.jsx("div",{className:"h-[60vh] overflow-y-auto",children:s.jsx(vze,{onStartTask:L,activeTask:o})})}),v&&s.jsx(Ze,{value:"multi-agent",className:"h-full m-0",children:s.jsx("div",{className:"h-[60vh] overflow-y-auto",children:s.jsx(Aze,{messages:e["multi-agent"],activeAgent:a,onAgentSwitch:i,onActionClick:B,onShare:()=>T({description:"Sharing functionality coming soon!"}),onBranch:()=>T({description:"Conversation branching coming soon!"})})})})]})]})}),s.jsxs("div",{className:"border-t border-gray-700/50 bg-gray-900/20 backdrop-blur-sm p-4",children:[s.jsx(z8e,{onSendMessage:F,disabled:S}),_&&s.jsxs("p",{className:"text-red-400 mt-2 text-sm font-mono",children:["SYSTEM.ERROR: ",_]})]})]}),s.jsx("div",{className:"w-80 border-l border-gray-700/50 bg-gray-900/30 backdrop-blur-sm flex flex-col",children:s.jsx("div",{className:"p-6",children:s.jsx(Tze,{onSuggestionSelect:Z=>{T({title:"Intelligence Activated",description:`Processing ${Z.replace("-"," ")} suggestion...`,duration:3e3})}})})})]})},Dze=()=>s.jsxs("div",{className:"min-h-screen flex flex-col",children:[s.jsx("div",{className:"flex-1",children:s.jsx(Rze,{})}),s.jsx(Cn,{})]}),Lze=({currentStep:e,onStepUpdate:t,configuration:n})=>{var y;const[r,a]=b.useState({}),[i,o]=b.useState(0),l=(x,w)=>{const N={...r,[x]:w};a(N),t(N),c(N)},c=x=>{let w=0;x.instanceType==="large"&&(w+=500),x.instanceType==="xlarge"&&(w+=1e3),x.autoScale&&(w+=200),x.redundancy==="multi-az"&&(w+=300),o(w)},v=[()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Ey,{className:"h-12 w-12 mx-auto text-blue-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Select Cloud Provider"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Choose your preferred cloud infrastru
1497cture provider"})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{id:"aws",name:"Amazon Web Services",features:["Global reach","Enterprise SLA","Advanced security"]},{id:"gcp",name:"Google Cloud Platform",features:["AI/ML optimized","Cost effective","Fast networking"]},{id:"azure",name:"Microsoft Azure",features:["Enterprise integration","Hybrid ready","Compliance"]}].map(x=>s.jsx(te,{className:`cursor-pointer transition-all ${(r.provider||"")===x.id?"border-blue-500 bg-blue-50 dark:bg-blue-950":"hover:border-gray-300"}`,onClick:()=>l("provider",x.id),children:s.jsxs(se,{className:"p-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:x.name}),s.jsx("div",{className:"space-y-1",children:x.features.map((w,N)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-600",children:[s.jsx(Pe,{className:"h-3 w-3 text-green-500"}),w]},N))})]})},x.id))}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"region",children:"Region"}),s.jsxs(dt,{onValueChange:x=>l("region",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select region"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"us-east-1",children:"US East (N. Virginia)"}),s.jsx(me,{value:"us-west-2",children:"US West (Oregon)"}),s.jsx(me,{value:"eu-west-1",children:"Europe (Ireland)"}),s.jsx(me,{value:"ap-southeast-1",children:"Asia Pacific (Singapore)"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"vpc",children:"VPC ID (Optional)"}),s.jsx(_e,{placeholder:"vpc-xxxxxxxx",onChange:x=>l("vpcId",x.target.value)})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Fd,{className:"h-12 w-12 mx-auto text-blue-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Infrastructure Configuration"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure compute resources and scaling options"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Instance Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Instance Type"}),s.jsxs(dt,{onValueChange:x=>l("instanceType",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select instance type"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"medium",children:"Medium (4 vCPU, 16GB RAM)"}),s.jsx(me,{value:"large",children:"Large (8 vCPU, 32GB RAM)"}),s.jsx(me,{value:"xlarge",children:"X-Large (16 vCPU, 64GB RAM)"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Storage Type"}),s.jsxs(dt,{onValueChange:x=>l("storageType",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select storage"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"gp3",children:"General Purpose SSD (gp3)"}),s.jsx(me,{value:"io2",children:"Provisioned IOPS SSD (io2)"}),s.jsx(me,{value:"sc1",children:"Cold HDD (sc1)"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{htmlFor:"storage-size",children:"Storage Size (GB)"}),s.jsx(_e,{type:"number",placeholder:"1000",onChange:x=>l("storageSize",x.target.value)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Scaling & Availability"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Auto-scaling"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Automatically scale based on demand"})]}),s.jsx(Dt,{onCheckedChange:x=>l("autoScale",x)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Redundancy"}),s.jsxs(dt,{onValueChange:x=>l("redundancy",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select redundancy"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"single-az",children:"Single AZ"}),s.jsx(me,{value:"multi-az",children:"Multi-AZ"}),s.jsx(me,{value:"multi-region",children:"Multi-Region"})]})]})]}),s.jsxs("div",{className:"p-4 bg-blue-50 dark:bg-blue-950 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Rs,{className:"h-4 w-4 text-blue-600"}),s.jsx("span",{className:"font-medium",children:"Estimated Monthly Cost"})]}),s.jsxs("p",{className:"text-2xl font-bold text-blue-600",children:["$",i]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Base infrastru
1497cture cost"})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(it,{className:"h-12 w-12 mx-auto text-blue-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Network & Security"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure network settings and security controls"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Network Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{htmlFor:"subnet",children:"Subnet CIDR"}),s.jsx(_e,{placeholder:"10.0.1.0/24",onChange:x=>l("subnetCidr",x.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Public IP"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Enable public internet access"})]}),s.jsx(Dt,{onCheckedChange:x=>l("publicIp",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Load Balancer"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Distribute traffic across instances"})]}),s.jsx(Dt,{onCheckedChange:x=>l("loadBalancer",x)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Security Groups"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Allowed IP Ranges"}),s.jsx(_e,{placeholder:"0.0.0.0/0 (or specific ranges)",onChange:x=>l("allowedIps",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"SSL Certificate"}),s.jsxs(dt,{onValueChange:x=>l("sslCert",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select SSL option"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"acm",children:"AWS Certificate Manager"}),s.jsx(me,{value:"custom",children:"Custom Certificate"}),s.jsx(me,{value:"none",children:"No SSL"})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"WAF Protection"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Web Application Firewall"})]}),s.jsx(Dt,{onCheckedChange:x=>l("waf",x)})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(it,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Security & Access Control"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure authentication and authorization"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Authentication"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"IAM Role ARN"}),s.jsx(_e,{placeholder:"arn:aws:iam::123456789012:role/PrivionRole",onChange:x=>l("iamRole",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Access Key ID"}),s.jsx(_e,{placeholder:"AKIAIOSFODNN7EXAMPLE",onChange:x=>l("accessKeyId",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Secret Access Key"}),s.jsx(_e,{type:"password",placeholder:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",onChange:x=>l("secretKey",x.target.value)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Compliance"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"SOC 2 Compliance"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Enable SOC 2 audit logging"})]}),s.jsx(Dt,{onCheckedChange:x=>l("soc2",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"GDPR Compliance"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Enable GDPR data protection"})]}),s.jsx(Dt,{onCheckedChange:x=>l("gdpr",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Encryption at Rest"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Encrypt all stored data"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("encryptionAtRest",x)})]})]})]})]})]}),()=>{var x,w,N,S,_,k,C;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Pe,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Configuration Review"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Review your private cloud configuration before deployment"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Infrastru
1497cture Summary"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Provider:"}),s.jsx(le,{children:((x=n.cloud_provider)==null?void 0:x.provider)||"Not selected"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Region:"}),s.jsx("span",{children:((w=n.cloud_provider)==null?void 0:w.region)||"Not selected"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Instance Type:"}),s.jsx("span",{children:((N=n.infrastructure)==null?void 0:N.instanceType)||"Not selected"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Auto-scaling:"}),s.jsx("span",{children:(S=n.infrastructure)!=null&&S.autoScale?"Enabled":"Disabled"})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Security Summary"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Encryption:"}),s.jsx(le,{variant:"outline",className:"text-green-600",children:"Enabled"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"WAF:"}),s.jsx(le,{variant:"outline",children:(_=n.network)!=null&&_.waf?"Enabled":"Disabled"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Compliance:"}),s.jsxs("div",{className:"flex gap-1",children:[((k=n.security)==null?void 0:k.soc2)&&s.jsx(le,{variant:"outline",className:"text-xs",children:"SOC 2"}),((C=n.security)==null?void 0:C.gdpr)&&s.jsx(le,{variant:"outline",className:"text-xs",children:"GDPR"})]})]})]})]})]}),s.jsx(te,{className:"bg-green-50 dark:bg-green-950 border-green-200",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-600"}),s.jsx("span",{className:"font-medium text-green-800 dark:text-green-300",children:"Ready for Deployment"})]}),s.jsx("p",{className:"text-sm text-green-700 dark:text-green-400",children:"Your private cloud configuration is complete and ready for deployment. Estimated setup time: 15-20 minutes."})]})})]})}];return s.jsx(iZ,{children:s.jsx("div",{className:"space-y-6",children:(y=v[e])==null?void 0:y.call(v)})})},$ze=({currentStep:e,onStepUpdate:t,configuration:n})=>{var m;const[r,a]=b.useState({}),i=(p,v)=>{const y={...r,[p]:v};a(y),t(y)},f=[()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Gr,{className:"h-12 w-12 mx-auto text-purple-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Data Boundaries"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Define where sensitive data stays and what can be processed in the cloud"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-base flex items-center gap-2",children:[s.jsx(Gr,{className:"h-4 w-4"}),"Local Data (On-Premises)"]})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Vector Database Path"}),s.jsx(_e,{placeholder:"/opt/privion/vectordb",onChange:p=>i("vectorDbPath",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Data Classifications"}),s.jsx("div",{className:"space-y-2",children:["PII","Financial","Healthcare","Confidential"].map(p=>s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:p}),s.jsx(Dt,{onCheckedChange:v=>i(`localData_${p.toLowerCase()}`,v)})]},p))})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Retention Policy (Days)"}),s.jsx(_e,{type:"number",placeholder:"365",onChange:p=>i("retentionDays",p.target.value)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"text-base flex items-center gap-2",children:[s.jsx(Ey,{className:"h-4 w-4"}),"Cloud Processing"]})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Inference Endpoint"}),s.jsx(_e,{placeholder:"https://api.privion.ai/v1/inference",onChange:p=>i("inferenceEndpoint",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Allowed Operations"}),s.jsx("div",{className:"space-y-2",children:["Text Generation","Summarization","Translation","Analysis"].map(p=>s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:p}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:v=>i(`cloudOp_${p.toLowerCase().replace(" ","_")}`,v)})]},p))})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Data Anonymization"}),s.jsxs(dt,{onValueChange:p=>i("anonymization",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select level"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"none",children:"No Anonymization"}),s.jsx(me,{value:"basic",children:"Basic (Remove PII)"}),s.jsx(me,{value:"advanced",children:"Advanced (K-Anonymity)"}),s.jsx(me,{value:"differential",children:"Differential Privacy"})]})]})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(it,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Secure Tunnel Configuration"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Set up encrypted communication between on-premises and cloud"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"VPN Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Tunnel Type"}),s.jsxs(dt,{onValueChange:p=>i("tunnelType",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select tunnel type"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"ipsec",children:"IPSec VPN"}),s.jsx(me,{value:"wireguard",children:"WireGuard"}),s.jsx(me,{value:"openvpn",children:"OpenVPN"}),s.jsx(me,{value:"aws-vpn",children:"AWS VPN Gateway"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Local Gateway IP"}),s.jsx(_e,{placeholder:"192.168.1.1",onChange:p=>i("localGatewayIp",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Remote Gateway IP"}),s.jsx(_e,{placeholder:"52.123.45.67",onChange:p=>i("remoteGatewayIp",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Pre-shared Key"}),s.jsx(_e,{type:"password",placeholder:"Enter PSK",onChange:p=>i("presharedKey",p.target.value)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Encryption Settings"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Encryption Algorithm"}),s.jsxs(dt,{onValueChange:p=>i("encryption",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select encryption"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"aes-256",children:"AES-256-GCM"}),s.jsx(me,{value:"aes-128",children:"AES-128-GCM"}),s.jsx(me,{value:"chacha20",children:"ChaCha20-Poly1305"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Key Exchange"}),s.jsxs(dt,{onValueChange:p=>i("keyExchange",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select key exchange"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"ecdh",children:"ECDH P-256"}),s.jsx(me,{value:"dh",children:"Diffie-Hellman Group 14"}),s.jsx(me,{value:"x25519",children:"X25519"})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Perfect Forward Secrecy"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Rotate keys automatically"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:p=>i("perfectForwardSecrecy",p)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Key Rotation Interval (Hours)"}),s.jsx(_e,{type:"number",placeholder:"24",onChange:p=>i("keyRotationHours",p.target.value)})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Ot,{className:"h-12 w-12 mx-auto text-yellow-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Data Synchronization Rules"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure how data flows between local and cloud systems"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Sync Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Sync Frequency"}),s.jsxs(dt,{onValueChange:p=>i("syncFrequency",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select frequency"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"realtime",children:"Real-time"}),s.jsx(me,{value:"hourly",children:"Hourly"}),s.jsx(me,{value:"daily",children:"Daily"}),s.jsx(me,{value:"manual",children:"Manual"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Batch Size"}),s.jsx(_e,{type:"number",placeholder:"1000",onChange:p=>i("batchSize",p.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Rate Limit (Requests/sec)"}),s.jsx(_e,{type:"number",placeholder:"100",onChange:p=>i("rateLimit",p.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Bidirectional Sync"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Allow cloud-to-local updates"})]}),s.jsx(Dt,{onCheckedChange:p=>i("bidirectionalSync",p)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Conflict Resolution"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Conflict Strategy"}),s.jsxs(dt,{onValueChange:p=>i("conflictStrategy",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select strategy"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"local-wins",children:"Local Wins"}),s.jsx(me,{value:"cloud-wins",children:"Cloud Wins"}),s.jsx(me,{value:"timestamp",children:"Latest Timestamp"}),s.jsx(me,{value:"manual",children:"Manual Resolution"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Backup Strategy"}),s.jsxs(dt,{onValueChange:p=>i("backupStrategy",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select backup"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"local-only",children:"Local Only"}),s.jsx(me,{value:"cloud-only",children:"Cloud Only"}),s.jsx(me,{value:"both",children:"Both Local & Cloud"}),s.jsx(me,{value:"none",children:"No Backup"})]})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Versioning"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Keep version history"})]}),s.jsx(Dt,{onCheckedChange:p=>i("versioning",p)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Max Versions"}),s.jsx(_e,{type:"number",placeholder:"10",onChange:p=>i("maxVersions",p.target.value)})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(ur,{className:"h-12 w-12 mx-auto text-red-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Compliance Mapping"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure compliance controls and audit requirements"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Compliance Standards"})}),s.jsx(se,{className:"space-y-4",children:[{id:"hipaa",name:"HIPAA",description:"Healthcare data protection"},{id:"gdpr",name:"GDPR",description:"EU data privacy regulation"},{id:"sox",name:"SOX",description:"Financial reporting compliance"}
1497,{id:"pci",name:"PCI DSS",description:"Payment card industry"}].map(p=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{children:[s.jsx(de,{children:p.name}),s.jsx("p",{className:"text-sm text-gray-600",children:p.description})]}),s.jsx(Dt,{onCheckedChange:v=>i(`compliance_${p.id}`,v)})]},p.id))})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Audit Controls"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Audit Log Location"}),s.jsxs(dt,{onValueChange:p=>i("auditLogLocation",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select location"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"local-only",children:"Local Only"}),s.jsx(me,{value:"cloud-only",children:"Cloud Only"}),s.jsx(me,{value:"both",children:"Both Locations"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Log Retention (Days)"}),s.jsx(_e,{type:"number",placeholder:"2555",onChange:p=>i("logRetentionDays",p.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Real-time Monitoring"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Monitor compliance violations"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:p=>i("realtimeMonitoring",p)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Alert Threshold"}),s.jsxs(dt,{onValueChange:p=>i("alertThreshold",p),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select threshold"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"low",children:"Low Sensitivity"}),s.jsx(me,{value:"medium",children:"Medium Sensitivity"}),s.jsx(me,{value:"high",children:"High Sensitivity"})]})]})]})]})]})]})]}),()=>{var p,v,y,x,w,N,S,_,k;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Pe,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Hybrid Configuration Review"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Review your hybrid deployment configuration"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Data Flow Summary"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Local Database:"}),s.jsx(le,{children:((p=n.data_boundaries)==null?void 0:p.vectorDbPath)||"Not configured"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Cloud Endpoint:"}),s.jsx(le,{variant:"outline",children:((v=n.data_boundaries)==null?void 0:v.inferenceEndpoint)||"Not configured"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Sync Frequency:"}),s.jsx(le,{children:((y=n.sync_rules)==null?void 0:y.syncFrequency)||"Not configured"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Tunnel Type:"}),s.jsx(le,{children:((x=n.secure_tunnel)==null?void 0:x.tunnelType)||"Not configured"})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Security & Compliance"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Encryption:"}),s.jsx(le,{variant:"outline",className:"text-green-600",children:((w=n.secure_tunnel)==null?void 0:w.encryption)||"AES-256"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Compliance:"}),s.jsxs("div",{className:"flex gap-1",children:[((N=n.compliance)==null?void 0:N.compliance_hipaa)&&s.jsx(le,{variant:"outline",className:"text-xs",children:"HIPAA"}),((S=n.compliance)==null?void 0:S.compliance_gdpr)&&s.jsx(le,{variant:"outline",className:"text-xs",children:"GDPR"}),((_=n.compliance)==null?void 0:_.compliance_sox)&&s.jsx(le,{variant:"outline",className:"text-xs",children:"SOX"})]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Audit Logs:"}),s.jsx(le,{variant:"outline",children:((k=n.compliance)==null?void 0:k.auditLogLocation)||"Not configured"})]})]})]})]}),s.jsx(te,{className:"bg-purple-50 dark:bg-purple-950 border-purple-200",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-purple-600"}),s.jsx("span",{className:"font-medium text-purple-800 dark:text-purple-300",children:"Hybrid Setup Ready"})]}),s.jsx("p",{className:"text-sm text-purple-700 dark:text-purple-400",children:"Your hybrid configuration balances security with cloud capabilities. Estimated setup time: 25-30 minutes."})]})})]})}];return s.jsx("div",{className:"space-y-6",children:(m=f[e])==null?void 0:m.call(f)})},Fze=({currentStep:e,onStepUpdate:t,configuration:n})=>{var y;const[r,a]=b.useState({}),[i,o]=b.useState(0),l=(x,w)=>{const N={...r,[x]:w};a(N),t(N),e===0&&c(N)},c=x=>{let w=0;const N=parseInt(x.cpuCores)||0,S=parseInt(x.ramGb)||0,_=parseInt(x.storageGb)||
14970,k=x.hasGpu===!0;N>=16?w+=25:N>=8?w+=15:N>=4&&(w+=10),S>=64?w+=25:S>=32?w+=20:S>=16?w+=15:S>=8&&(w+=10),_>=1e3?w+=20:_>=500?w+=15:_>=250&&(w+=10),k&&(w+=30),o(Math.min(w,100))},v=[()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Fd,{className:"h-12 w-12 mx-auto text-blue-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Hardware Assessment"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Assess your local server hardware for optimal AI performance"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"System Specifications"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(iw,{className:"h-4 w-4"}),"CPU Cores"]}),s.jsx(_e,{type:"number",placeholder:"8",onChange:x=>l("cpuCores",x.target.value)})]}),s.jsxs("div",{children:[s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(cje,{className:"h-4 w-4"}),"RAM (GB)"]}),s.jsx(_e,{type:"number",placeholder:"32",onChange:x=>l("ramGb",x.target.value)})]}),s.jsxs("div",{children:[s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(nje,{className:"h-4 w-4"}),"Storage (GB)"]}),s.jsx(_e,{type:"number",placeholder:"500",onChange:x=>l("storageGb",x.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Dedicated GPU"}),s.jsx("p",{className:"text-sm text-gray-600",children:"NVIDIA GPU with CUDA support"})]}),s.jsx(Dt,{onCheckedChange:x=>l("hasGpu",x)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"GPU Model (if applicable)"}),s.jsxs(dt,{onValueChange:x=>l("gpuModel",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select GPU"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"rtx4090",children:"RTX 4090"}),s.jsx(me,{value:"rtx4080",children:"RTX 4080"}),s.jsx(me,{value:"rtx3090",children:"RTX 3090"}),s.jsx(me,{value:"rtx3080",children:"RTX 3080"}),s.jsx(me,{value:"a100",children:"A100"}),s.jsx(me,{value:"v100",children:"V100"}),s.jsx(me,{value:"other",children:"Other"})]})]})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Hardware Assessment"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"mb-4",children:[s.jsxs("div",{className:"text-3xl font-bold text-blue-600",children:[i,"%"]}),s.jsx("p",{className:"text-sm text-gray-600",children:"Performance Score"})]}),s.jsx(qr,{value:i,className:"h-3 mb-4"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"CPU Performance"}),s.jsx(le,{variant:(r.cpuCores||0)>=8?"default":"secondary",children:(r.cpuCores||0)>=8?"Good":"Limited"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Memory Capacity"}),s.jsx(le,{variant:(r.ramGb||0)>=32?"default":"secondary",children:(r.ramGb||0)>=32?"Excellent":(r.ramGb||0)>=16?"Good":"Limited"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"Storage Space"}),s.jsx(le,{variant:(r.storageGb||0)>=500?"default":"secondary",children:(r.storageGb||0)>=500?"Sufficient":"Limited"})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-sm",children:"GPU Acceleration"}),s.jsx(le,{variant:r.hasGpu?"default":"secondary",children:r.hasGpu?"Available":"Not Available"})]})]}),i<50&&s.jsxs("div",{className:"p-3 bg-yellow-50 dark:bg-yellow-950 rounded-lg border border-yellow-200",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx(ln,{className:"h-4 w-4 text-yellow-600"}),s.jsx("span",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200",children:"Hardware Recommendations"})]}),s.jsx("p",{className:"text-xs text-yellow-700 dark:text-yellow-300",children:"Consider upgrading to at least 16GB RAM and 8 CPU cores for optimal performance."})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Zwe,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Container Configuration"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Set up Docker containers for your AI agents"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Docker Setup"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 border-2 border-dashed border-gray-300 rounded-lg text-center",children:[s.jsx(Js,{className:"h-8 w-8 mx-auto text-gray-400 mb-2"}),s.jsx("p",{className:"text-sm text-gray-600 mb-2",children:"Upload Docker Compose File"}),s.jsx(Y,{variant:"outline",size:"sm",children:"Browse Files"}),s.jsx("p",{className:"text-xs text-gray-500 mt-2",children:"Or use our default configuration"})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Container Registry"}),s.jsxs(dt,{onValueChange:x=>l("containerRegistry",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select registry"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"docker-hub",children:"Docker Hub"}),s.jsx(me,{value:"ghcr",children:"GitHub Container Registry"}),s.jsx(me,{value:"private",children:"Private Registry"}),s.jsx(me,{value:"local",children:"Local Build"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Container Memory Limit (GB)"}
1497),s.jsx(_e,{type:"number",placeholder:"8",onChange:x=>l("containerMemory",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"CPU Limit (Cores)"}),s.jsx(_e,{type:"number",placeholder:"4",onChange:x=>l("containerCpu",x.target.value)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Network & Storage"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Host Port"}),s.jsx(_e,{type:"number",placeholder:"8080",onChange:x=>l("hostPort",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Data Volume Path"}),s.jsx(_e,{placeholder:"/opt/privion/data",onChange:x=>l("dataVolumePath",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Log Volume Path"}),s.jsx(_e,{placeholder:"/opt/privion/logs",onChange:x=>l("logVolumePath",x.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Auto-restart"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Restart containers on failure"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("autoRestart",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Health Checks"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Monitor container health"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("healthChecks",x)})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Sn,{className:"h-12 w-12 mx-auto text-purple-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"AI Model Installation"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Select and configure AI models for local deployment"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Available Models"})}),s.jsx(se,{className:"space-y-4",children:[{id:"llama3-8b",name:"LLaMA 3 8B",size:"16GB",performance:"High",recommended:i>=70},{id:"llama3-70b",name:"LLaMA 3 70B",size:"140GB",performance:"Excellent",recommended:i>=90},{id:"mistral-7b",name:"Mistral 7B",size:"14GB",performance:"Good",recommended:i>=60},{id:"phi3-mini",name:"Phi-3 Mini",size:"4GB",performance:"Fast",recommended:i>=40}].map(x=>s.jsx("div",{className:`p-3 border rounded-lg ${x.recommended?"border-green-200 bg-green-50 dark:bg-green-950":"border-gray-200"}`,children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(de,{children:x.name}),x.recommended&&s.jsx(le,{variant:"default",className:"text-xs",children:"Recommended"})]}),s.jsxs("div",{className:"flex gap-2 mt-1",children:[s.jsxs(le,{variant:"outline",className:"text-xs",children:["Size: ",x.size]}),s.jsx(le,{variant:"outline",className:"text-xs",children:x.performance})]})]}),s.jsx(Dt,{disabled:!x.recommended,onCheckedChange:w=>l(`model_${x.id}`,w)})]})},x.id))})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Model Configuration"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Model Storage Path"}),s.jsx(_e,{placeholder:"/opt/privion/models",onChange:x=>l("modelStoragePath",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Max Context Length"}),s.jsxs(dt,{onValueChange:x=>l("maxContextLength",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select context length"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"2048",children:"2,048 tokens"}),s.jsx(me,{value:"4096",children:"4,096 tokens"}),s.jsx(me,{value:"8192",children:"8,192 tokens"}),s.jsx(me,{value:"16384",children:"16,384 tokens"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Batch Size"}),s.jsx(_e,{type:"number",placeholder:"1",onChange:x=>l("batchSize",x.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"GPU Acceleration"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Use GPU for inference"})]}),s.jsx(Dt,{disabled:!r.hasGpu,onCheckedChange:x=>l("useGpu",x)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Model Update Schedule"}),s.jsxs(dt,{onValueChange:x=>l("updateSchedule",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select schedule"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"never",children:"Never (Manual)"}),s.jsx(me,{value:"weekly",children:"Weekly"}),s.jsx(me,{value:"monthly",children:"Monthly"}),s.jsx(me,{value:"quarterly",children:"Quarterly"})]})]})]})]})]})]})]}),()=>s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(it,{className:"h-12 w-12 mx-auto text-red-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Security Hardening"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Configure security settings for your local deployment"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Access Control"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Admin Email"}),s.jsx(_e,{type:"email",placeholder:"[email protected]",onChange:x=>l("adminEmail",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"API Key"}),s.jsx(_e,{type:"password",placeholder:"Generate secure API key",onChange:x=>l("apiKey",x.target.value)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Allowed IP Ranges"}),s.jsx(_e,{placeholder:"192.168.1.0/24, 10.0.0.0/8",onChange:x=>l("allowedIps",x.target.value)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"TLS Encryption"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Encrypt all c
1497ommunications"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("tlsEncryption",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Rate Limiting"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Limit requests per minute"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("rateLimiting",x)})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"System Security"})}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Firewall Configuration"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Configure iptables rules"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("firewall",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Intrusion Detection"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Monitor for threats"})]}),s.jsx(Dt,{onCheckedChange:x=>l("intrusionDetection",x)})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(de,{children:"Audit Logging"}),s.jsx("p",{className:"text-sm text-gray-600",children:"Log all system activities"})]}),s.jsx(Dt,{defaultChecked:!0,onCheckedChange:x=>l("auditLogging",x)})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Backup Schedule"}),s.jsxs(dt,{onValueChange:x=>l("backupSchedule",x),children:[s.jsx(ot,{children:s.jsx(ft,{placeholder:"Select backup frequency"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"hourly",children:"Hourly"}),s.jsx(me,{value:"daily",children:"Daily"}),s.jsx(me,{value:"weekly",children:"Weekly"}),s.jsx(me,{value:"monthly",children:"Monthly"})]})]})]}),s.jsxs("div",{children:[s.jsx(de,{children:"Backup Location"}),s.jsx(_e,{placeholder:"/backup/privion",onChange:x=>l("backupLocation",x.target.value)})]})]})]})]})]}),()=>{var x,w,N,S,_,k,C,E;return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsx(Pe,{className:"h-12 w-12 mx-auto text-green-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Local Server Configuration Review"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Review your local server deployment configuration"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Hardware Summary"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Performance Score:"}),s.jsxs(le,{variant:i>=70?"default":"secondary",children:[i,"%"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"CPU Cores:"}),s.jsx("span",{children:((x=n.hardware)==null?void 0:x.cpuCores)||"Not specified"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"RAM:"}),s.jsxs("span",{children:[((w=n.hardware)==null?void 0:w.ramGb)||"Not specified","GB"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Storage:"}),s.jsxs("span",{children:[((N=n.hardware)==null?void 0:N.storageGb)||"Not specified","GB"]})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"GPU:"}),s.jsx(le,{variant:(S=n.hardware)!=null&&S.hasGpu?"default":"secondary",children:(_=n.hardware)!=null&&_.hasGpu?"Available":"Not Available"})]})]})]}),s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Configuration Summary"})}),s.jsxs(se,{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Container Registry:"}),s.jsx("span",{children:((k=n.containers)==null?void 0:k.containerRegistry)||"Not configured"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Selected Models:"}),s.jsx("div",{className:"flex gap-1 flex-wrap",children:Object.entries(n.models||{}).filter(([O,P])=>O.startsWith("model_")&&P).map(([O])=>s.jsx(le,{variant:"outline",className:"text-xs",children:O.replace("model_","").toUpperCase()},O))})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"Admin Email:"}),s.jsx("span",{children:((C=n.security)==null?void 0:C.adminEmail)||"Not configured"})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{children:"TLS Encryption:"}),s.jsx(le,{variant:"outline",className:"text-green-600",children:((E=n.security)==null?void 0:E.tlsEncryption)!==!1?"Enabled":"Disabled"})]})]})]})]}),s.jsx(te,{className:"bg-blue-50 dark:bg-blue-950 border-blue-200",children:s.jsxs(se,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Pe,{className:"h-4 w-4 text-blue-600"}),s.jsx("span",{className:"font-medium text-blue-800 dark:text-blue-300",children:"Local Deployment Ready"})]}),s.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-400",children:"Your local server configuration provides complete control and air-gapped security. Estimated setup time: 30-45 minutes."})]})})]})}];return s.jsx("div",{className:"space-y-6",children:(y=v[e])==null?void 0:y.call(v)})},Rse=({deploymentMode:e,onComplete:t,onBack:n})=>{const[r,a]=b.useState(0),[i,o]=b.useState({}),[l,c]=b.useState("idle"),d=(()=>{switch(e){case"private-cloud":return[{title:"Cloud Provider",description:"Select your cloud infrastru
1497cture"},{title:"Infrastructure",description:"Configure compute and storage"},{title:"Network",description:"Set up networking and security"},{title:"Security",description:"Configure access controls"},{title:"Review",description:"Review and validate configuration"}];case"hybrid":return[{title:"Data Boundaries",description:"Define data separation rules"},{title:"Secure Tunnel",description:"Configure secure connections"},{title:"Sync Rules",description:"Set up data synchronization"},{title:"Compliance",description:"Configure compliance mapping"},{title:"Review",description:"Review and validate configuration"}];case"local-server":return[{title:"Hardware",description:"Assess system requirements"},{title:"Containers",description:"Configure containerization"},{title:"Models",description:"Install AI models"},{title:"Security",description:"Harden security settings"},{title:"Review",description:"Review and validate configuration"}];default:return[]}})(),f=d[r],m=()=>{r<d.length-1&&a(r+1)},p=()=>{r>0&&a(r-1)},v=N=>{o(S=>({...S,[f.title.toLowerCase().replace(" ","_")]:N}))},y=()=>{switch(e){case"private-cloud":return s.jsx(Lze,{currentStep:r,onStepUpdate:v,configuration:i});case"hybrid":return s.jsx($ze,{currentStep:r,onStepUpdate:v,configuration:i});case"local-server":return s.jsx(Fze,{currentStep:r,onStepUpdate:v,configuration:i});default:return s.jsx("div",{children:"Select a deployment mode"})}},x=r===d.length-1,w=(r+1)/d.length*100;return s.jsxs("div",{className:"space-y-6",children:[s.jsx(te,{children:s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs(we,{className:"text-lg",children:[e.replace("-"," ").replace(/\b\w/g,N=>N.toUpperCase())," Configuration"]}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Step ",r+1," of ",d.length,": ",f==null?void 0:f.title]})]}),s.jsxs(le,{variant:"outline",children:[Math.round(w),"% Complete"]})]}),s.jsx("div",{className:"mt-4",children:s.jsx(qr,{value:w,className:"h-2"})})]})}),s.jsx("div",{className:"flex items-center justify-between",children:s.jsx("div",{className:"flex items-center space-x-2",children:d.map((N,S)=>s.jsxs("div",{className:`flex items-center ${S<d.length-1?"flex-1":""}`,children:[s.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium ${S<r?"bg-cyber-blue text-white":S===r?"bg-electric-blue text-white":"bg-gray-200 text-gray-600"}`,children:S<r?s.jsx(mo,{className:"h-4 w-4"}):S+1}),s.jsxs("div",{className:"ml-2",children:[s.jsx("p",{className:"text-sm font-medium",children:N.title}),s.jsx("p",{className:"text-xs text-gray-500",children:N.description})]}),S<d.length-1&&s.jsx("div",{className:"flex-1 h-px bg-gray-200 mx-4"})]},S))})}),s.jsx(te,{children:s.jsx(se,{className:"p-6",children:y()})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(Y,{variant:"outline",onClick:r===0?n:p,className:"flex items-center gap-2",children:[s.jsx(f1,{className:"h-4 w-4"}),r===0?"Back to Selection":"Previous"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[l==="error"&&s.jsxs("div",{className:"flex items-center gap-2 text-red-600",children:[s.jsx(ln,{className:"h-4 w-4"}),s.jsx("span",{className:"text-sm",children:"Configuration validation failed"})]}),x?s.jsxs(Y,{onClick:()=>t(i),className:"flex items-center gap-2 bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90",disabled:l==="validating",children:[l==="validating"?"Validating...":"Complete Setup",s.jsx(mo,{className:"h-4 w-4"})]}):s.jsxs(Y,{onClick:m,className:"flex items-center gap-2",children:["Next",s.jsx(ao,{className:"h-4 w-4"})]})]})]})]})},zze=({onLoadTemplate:e,currentConfiguration:t})=>{const{toast:n}=_t(),[r,a]=b.useState(""),[i,o]=b.useState([{id:"healthcare-hipaa",name:"Healthcare HIPAA Compliant",description:"HIPAA-compliant hybrid deployment for healthcare organizations",industry:"Healthcare",deploymentMode:"hybrid",configuration:{compliance:{hipaa:!0,gdpr:!1,sox:!1},security:{encryption:"aes-256",auditLogging:!0},deployment:{mode:"hybrid"}},createdAt:"2024-01-15",isBuiltIn:!0},{id:"finance-sox",name:"Financial Services SOX",description:"SOX-compliant private cloud for financial institutions",industry:"Finance",deploymentMode:"private-cloud",configuration:{compliance:{
1497sox:!0,gdpr:!0,hipaa:!1},security:{encryption:"aes-256",waf:!0,rateLimiting:!0},deployment:{mode:"private-cloud",provider:"aws"}},createdAt:"2024-01-15",isBuiltIn:!0},{id:"government-fedramp",name:"Government FedRAMP",description:"FedRAMP-ready configuration for government agencies",industry:"Government",deploymentMode:"local-server",configuration:{compliance:{fedramp:!0,gdpr:!1},security:{encryption:"aes-256",intrusionDetection:!0,auditLogging:!0},deployment:{mode:"local-server",airGapped:!0}},createdAt:"2024-01-15",isBuiltIn:!0},{id:"education-ferpa",name:"Education FERPA",description:"FERPA-compliant setup for educational institutions",industry:"Education",deploymentMode:"hybrid",configuration:{compliance:{ferpa:!0,gdpr:!0},security:{encryption:"aes-256",accessControl:!0},deployment:{mode:"hybrid"}},createdAt:"2024-01-15",isBuiltIn:!0}]),l=v=>{switch(v.toLowerCase()){case"healthcare":return s.jsx(Jg,{className:"h-4 w-4 text-red-500"});case"finance":return s.jsx(dl,{className:"h-4 w-4 text-green-500"});case"government":return s.jsx(it,{className:"h-4 w-4 text-blue-500"});case"education":return s.jsx($h,{className:"h-4 w-4 text-blue-500"});default:return s.jsx(dl,{className:"h-4 w-4 text-gray-500"})}},c=v=>{switch(v){case"private-cloud":return"bg-electric-blue/20 text-cyber-blue dark:bg-cyber-blue/30 dark:text-electric-blue";case"hybrid":return"bg-cyber-cyan/20 text-cyber-blue dark:bg-cyber-blue/20 dark:text-cyber-cyan";case"local-server":return"bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-300";default:return"bg-gray-100 text-gray-700 dark:bg-gray-900 dark:text-gray-300"}},u=()=>{if(!r.trim()){n({title:"Template Name Required",description:"Please enter a name for your template",variant:"destructive"});return}if(!t){n({title:"No Configuration",description:"Please complete a configuration before saving",variant:"destructive"});return}const v={id:`custom-${Date.now()}`,name:r,description:`Custom configuration saved on ${new Date().toLocaleDateString()}`,industry:"Custom",deploymentMode:t.deploymentMode||"private-cloud",configuration:t,createdAt:new Date().toISOString(),isBuiltIn:!1};o(y=>[...y,v]),a(""),n({title:"Template Saved",description:`Configuration template "${r}" has been saved successfully`})},d=v=>{e(v),n({title:"Template Loaded",description:`Configuration template "${v.name}" has been loaded`})},f=v=>{const y=i.find(x=>x.id===v);if(y!=null&&y.isBuiltIn){n({title:"Cannot Delete",description:"Built-in templates cannot be deleted",variant:"destructive"});return}o(x=>x.filter(w=>w.id!==v)),n({title:"Template Deleted",description:"Configuration template has been deleted"})},m=v=>{const y=JSON.stringify(v,null,2),x=new Blob([y],{type:"application/json"}),w=URL.createObjectURL(x),N=document.createElement("a");N.href=w,N.download=`${v.name.replace(/\s+/g,"-").toLowerCase()}-template.json`,document.body.appendChild(N),N.click(),document.body.removeChild(N),URL.revokeObjectURL(w),n({title:"Template Exported",description:"Configuration template has been downloaded"})},p=v=>{var w;const y=(w=v.target.files)==null?void 0:w[0];if(!y)return;const x=new FileReader;x.onload=N=>{var S;try{const _=JSON.parse((S=N.target)==null?void 0:S.result);_.id=`imported-${Date.now()}`,_.isBuiltIn=!1,o(k=>[...k,_]),n({title:"Template Imported",description:`Configuration template "${_.name}" has been imported`})}catch{n({title:"Import Failed",description:"Invalid template file format",variant:"destructive"})}},x.readAsText(y)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(uw,{className:"h-5 w-5"}),"Configuration Templates"]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Save, load, and manage configuration templates for quick deployment setup"})]}),s.jsx(se,{children:s.jsxs("div",{className:"flex gap-4 mb-4",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx(de,{htmlFor:"template-name",children:"Save Current Configuration"}),s.jsx(_e,{id:"template-name",placeholder:"Enter template name",value:r,onChange:v=>a(v.target.value)})]}),s.jsxs("div",{className:"flex items-end gap-2",children:[s.jsxs(Y,{onClick:u,className:"flex items-center gap-2",children:[s.jsx(u
1497w,{className:"h-4 w-4"}),"Save"]}),s.jsxs(Y,{variant:"outline",className:"flex items-center gap-2",children:[s.jsx(Js,{className:"h-4 w-4"}),s.jsx("input",{type:"file",accept:".json",onChange:p,className:"absolute inset-0 opacity-0 cursor-pointer"}),"Import"]})]})]})})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map(v=>s.jsxs(te,{className:"hover:shadow-md transition-shadow",children:[s.jsx(xe,{className:"pb-3",children:s.jsx("div",{className:"flex items-start justify-between",children:s.jsxs("div",{className:"flex items-center gap-2",children:[l(v.industry),s.jsxs("div",{children:[s.jsx(we,{className:"text-base",children:v.name}),s.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[s.jsx(le,{variant:"outline",className:"text-xs",children:v.industry}),s.jsx(le,{className:`text-xs ${c(v.deploymentMode)}`,children:v.deploymentMode.replace("-"," ")}),v.isBuiltIn&&s.jsx(le,{variant:"secondary",className:"text-xs",children:"Built-in"})]})]})]})})}),s.jsxs(se,{children:[s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-4",children:v.description}),s.jsxs("div",{className:"text-xs text-gray-500 mb-4",children:["Created: ",new Date(v.createdAt).toLocaleDateString()]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{size:"sm",onClick:()=>d(v),className:"flex items-center gap-1",children:[s.jsx(Xu,{className:"h-3 w-3"}),"Load"]}),s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>m(v),className:"flex items-center gap-1",children:[s.jsx(h1,{className:"h-3 w-3"}),"Export"]}),!v.isBuiltIn&&s.jsxs(Y,{size:"sm",variant:"outline",onClick:()=>f(v.id),className:"flex items-center gap-1 text-red-600 hover:text-red-700",children:[s.jsx(oi,{className:"h-3 w-3"}),"Delete"]})]})]})]},v.id))})]})},Bze=({configuration:e,deploymentMode:t,onValidationComplete:n})=>{_t();const[r,a]=b.useState(!1),[i,o]=b.useState([]),[l,c]=b.useState(0),[u,d]=b.useState(0),f=async()=>{a(!0),c(0);const k=[],C=[{name:"Infrastructure",progress:20},{name:"Security",progress:40},{name:"Compliance",progress:60},{name:"Connectivity",progress:80},{name:"Cost Analysis",progress:100}];for(const O of C){await new Promise(R=>setTimeout(R,1e3)),c(O.progress);const P=await m(O.name);k.push(...P)}o(k),a(!1);const E=k.some(O=>O.status==="error");n(!E,k)},m=async k=>{const C=[];switch(k){case"Infrastructure":C.push(...p());break;case"Security":C.push(...v());break;case"Compliance":C.push(...y());break;case"Connectivity":C.push(...x());break;case"Cost Analysis":C.push(...w());break}return C},p=()=>{const k=[];if(t==="private-cloud"){const C=e.infrastructure;C!=null&&C.instanceType?C.instanceType==="medium"?k.push({category:"Infrastructure",status:"warning",message:"Limited performance with medium instance",details:"Consider upgrading to large or xlarge for better performance",icon:Ot}):k.push({category:"Infrastructure",status:"success",message:"Infrastructure configuration validated",details:`${C.instanceType} instance selected with appropriate resources`,icon:Ot}):k.push({category:"Infrastructure",status:"error",message:"Instance type not selected",details:"Please select an instance type for your deployment",icon:Ot})}else if(t==="local-server"){const C=e.hardware,E=N(C);E<50?k.push({category:"Infrastructure",status:"error",message:"Insufficient hardware resources",details:"Minimum requirements: 8GB RAM, 4 CPU cores, 100GB storage",icon:Ot}):E<70?k.push({category:"Infrastructure",status:"warning",message:"Hardware meets minimum requirements",details:"Performance may be limited. Consider hardware upgrades.",icon:Ot}):k.push({category:"Infrastructure",status:"success",message:"Hardware configuration excellent",details:`Performance score: ${E}%. Optimal for AI workloads.`,icon:Ot})}return k},v=()=>{const k=[],C=e.security;return C!=null&&C.tlsEncryption?k.push({category:"Security",status:"success",message:"TLS encryption enabled",details:"All communications will be encrypted",icon:it}):k.push({category:"Security",status:"error",message:"TLS encryption not enabled",details:"Enable TLS encryption for secure communications",icon:it}),t==="private-cloud"&&(C!=null&&C.waf||k.push({category:"Security",status:"warning",message:"Web Application Firewall not enabled",details:"Consider enabling WAF for additional protection",icon:it})),k},y=()=>{const k=[],C=e.compliance;return C!=null&&C.compliance_hipaa||C!=null&&C.compliance_gdpr||C!=null&&C.compliance_sox?k.push({category:"Compliance",status:"success",message:"Compliance controls configured",details:"Required compliance standards will be enforced",icon:Gr}):k.push({category:"Compliance",status:"warning",message:"No compliance standards selected",details:"Consider enabling relevant compliance controls",icon:Gr}),k},x=()=>{const k=[];if(t==="hybrid"){const C=e.secure_tunnel;C!=null&&C.tunnelType?k.push({category:"Connectivity",status:"success",message:"Secure tunnel c
1497onfigured",details:`${C.tunnelType} tunnel will be established`,icon:bs}):k.push({category:"Connectivity",status:"error",message:"Secure tunnel not configured",details:"Hybrid deployment requires secure tunnel configuration",icon:bs})}else k.push({category:"Connectivity",status:"success",message:"Connectivity validated",details:"Network configuration is appropriate for deployment mode",icon:bs});return k},w=()=>{const k=[];let C=0;if(t==="private-cloud"){const E=e.infrastructure;(E==null?void 0:E.instanceType)==="large"&&(C+=500),(E==null?void 0:E.instanceType)==="xlarge"&&(C+=1e3),E!=null&&E.autoScale&&(C+=200),(E==null?void 0:E.redundancy)==="multi-az"&&(C+=300)}return d(C),C>1500?k.push({category:"Cost",status:"warning",message:"High infrastructure costs",details:`Estimated monthly cost: $${C}. Consider optimizing configuration.`,icon:Rs}):k.push({category:"Cost",status:"success",message:"Cost analysis complete",details:`Estimated monthly cost: $${C}`,icon:Rs}),k},N=k=>{if(!k)return 0;let C=0;const E=parseInt(k.cpuCores)||0,O=parseInt(k.ramGb)||0,P=parseInt(k.storageGb)||0,R=k.hasGpu===!0;return E>=16?C+=25:E>=8?C+=15:E>=4&&(C+=10),O>=64?C+=25:O>=32?C+=20:O>=16?C+=15:O>=8&&(C+=10),P>=1e3?C+=20:P>=500?C+=15:P>=250&&(C+=10),R&&(C+=30),Math.min(C,100)},S=k=>{switch(k){case"success":return s.jsx(Pe,{className:"h-4 w-4 text-green-500"});case"warning":return s.jsx(ln,{className:"h-4 w-4 text-yellow-500"});case"error":return s.jsx(Ay,{className:"h-4 w-4 text-red-500"});default:return s.jsx(Pe,{className:"h-4 w-4 text-gray-400"})}},_=k=>{switch(k){case"success":return"border-green-200 bg-green-50 dark:border-green-800 dark:bg-green-950/30";case"warning":return"border-yellow-200 bg-yellow-50 dark:border-yellow-800 dark:bg-yellow-950/30";case"error":return"border-red-200 bg-red-50 dark:border-red-800 dark:bg-red-950/30";default:return"border-gray-200 bg-gray-50 dark:border-gray-700 dark:bg-gray-800"}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-5 w-5"}),"Configuration Validation"]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Test and validate your configuration before deployment"})]}),s.jsx(se,{children:s.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[s.jsxs(Y,{onClick:f,disabled:r,className:"flex items-center gap-2",children:[s.jsx(ss,{className:`h-4 w-4 ${r?"animate-spin":""}`}),r?"Validating...":"Test Configuration"]}),r&&s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex justify-between text-sm text-gray-600 mb-2",children:[s.jsx("span",{children:"Validation Progress"}),s.jsxs("span",{children:[l,"%"]})]}),s.jsx(qr,{value:l,className:"h-2"})]})]})})]}),i.length>0&&s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{className:"text-base",children:"Validation Results"})}),s.jsxs(se,{children:[s.jsx("div",{className:"space-y-3",children:i.map((k,C)=>{const E=k.icon;return s.jsx("div",{className:`p-4 rounded-lg border ${_(k.status)}`,children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(E,{className:"h-5 w-5 mt-0.5 text-gray-500"}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[S(k.status),s.jsx("span",{className:"font-medium",children:k.category})]}),s.jsx("p",{className:"text-sm text-gray-900 dark:text-gray-100 mb-1",children:k.message}),k.details&&s.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-400",children:k.details})]})]})},C)})}),u>0&&s.jsxs("div",{className:"mt-6 p-4 bg-cyber-blue/10 dark:bg-cyber-blue/20 rounded-lg border border-cyber-blue/30",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Rs,{className:"h-4 w-4 text-cyber-blue"}),s.jsx("span",{className:"font-medium text-cyber-blue dark:text-electric-blue",children:"Cost Estimate"})]}),s.jsxs("p",{className:"text-2xl font-bold text-cyber-blue mb-1",children:["$",u,"/month"]}),s.jsxs("p",{className:"text-sm text-cyber-blue/80 dark:text-cyber-cyan",children:["Estimated infrastru
1497cture costs for ",t," deployment"]})]})]})]})]})};class Dse extends b.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Wizard Error Boundary caught an error:",t,n)}render(){return this.state.hasError?s.jsxs(te,{className:"border-red-200 dark:border-red-800",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2 text-red-600 dark:text-red-400",children:[s.jsx(ln,{className:"h-5 w-5"}),"Configuration Wizard Error"]})}),s.jsxs(se,{className:"space-y-4",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"The configuration wizard encountered an error and could not load properly."}),this.state.error&&s.jsxs("div",{className:"p-3 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded text-sm",children:[s.jsx("strong",{children:"Error:"})," ",this.state.error.message]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{onClick:()=>{var t,n;this.setState({hasError:!1,error:void 0}),(n=(t=this.props).onRetry)==null||n.call(t)},variant:"outline",className:"flex items-center gap-2",children:[s.jsx(ss,{className:"h-4 w-4"}),"Try Again"]}),s.jsx(Y,{onClick:()=>window.location.reload(),variant:"destructive",children:"Reload Page"})]})]})]}):this.props.children}}const Uze=()=>{var R,T;const{user:e,isAuthenticated:t}=nr(),{toast:n}=_t(),r=qt(),[a,i]=b.useState(""),[o,l]=b.useState("llama3-8b"),[c,u]=b.useState(!1),[d,f]=b.useState(!1),[m,p]=b.useState(null),[v,y]=b.useState(null),[x,w]=b.useState(!1);b.useEffect(()=>{const D=localStorage.getItem("organizationConfig");if(D){const z=JSON.parse(D);y(z),i(z.deploymentMode),l(z.defaultLLM)}},[]);const N=[{id:"private-cloud",name:"Private Cloud",description:"Dedicated cloud infrastructure with enterprise security",icon:s.jsx(Ey,{className:"h-8 w-8"}),features:["Dedicated resources","Enterprise SLA","Custom networking","Advanced monitoring"],security:"Enterprise",cost:"$$$$",setup:"Managed",supportedLLMs:["llama3-8b","llama3-70b","mistral-7b","mixtral-8x7b"]},{id:"hybrid",name:"Hybrid Deployment",description:"Blend of cloud and on-premises infrastructure",icon:s.jsx(Fd,{className:"h-8 w-8"}),features:["Data sovereignty","Flexible scaling","Custom integrations","Compliance control"],security:"High",cost:"$$$",setup:"Assisted",supportedLLMs:["llama3-8b","llama3-70b","mistral-7b","mixtral-8x7b","phi3-mini"]},{id:"local-server",name:"Local Server",description:"Complete on-premises deployment with full control",icon:s.jsx(Gr,{className:"h-8 w-8"}),features:["Full data control","Air-gapped option","Custom hardware","Zero cloud dependency"],security:"Maximum",cost:"$$",setup:"Self-managed",supportedLLMs:["custom-open-source"]}],S=[{id:"llama3-8b",name:"LLaMA 3 8B",provider:"Meta",description:"Efficient large language model with strong performance",strengths:["Fast inference","Good reasoning","Multilingual"],cost:"$$",supportedModes:["private-cloud","hybrid"],performance:"High",requirements:"16GB RAM, 4 CPU cores"},{id:"llama3-70b",name:"LLaMA 3 70B",provider:"Meta",description:"Advanced reasoning and complex task handling",strengths:["Complex reasoning","Advanced analysis","Code generation"],cost:"$$$",supportedModes:["private-cloud","hybrid"],performance:"Excellent",requirements:"64GB RAM, 8 CPU cores"},{id:"mistral-7b",name:"Mistral 7B",provider:"Mistral AI",description:"Efficient and capable model for various tasks",strengths:["Efficiency","Instruction following","Code tasks"],cost:"$",supportedModes:["private-cloud","hybrid"],performance:"Good",requirements:"14GB RAM, 4 CPU cores"},{id:"mixtral-8x7b",name:"Mixtral 8x7B",provider:"Mistral AI",description:"Mixture of experts model for complex reasoning",strengths:["Expert routing","Specialized tasks","Efficiency"],cost:"$$",supportedModes:["private-cloud","hybrid"],performance:"Excellent",requirements:"32GB RAM, 8 CPU cores"},{id:"phi3-mini",name:"Phi-3 Mini",provider:"Microsoft",description:"Compact model optimized for hybrid deployments",strengths:["Small footprint","Fast inference","Edge deployment"],cost:"$",supportedModes:["hybrid"],performance:"Good",requirements:"8GB RAM, 2 CPU cores"},{id:"custom-open-source",name:"Custom Open-Source",provider:"Various",description:"Bring your own open-source model",strengths:["Full control","Custom fine-tuning","Cost effective"],cost:"$",supportedModes:["local-server"],performance:"Variable",requirements:"Depends on model"}],_=()=>a?S.filter(D=>D.supportedModes.includes(a)):[],k=D=>{i(D);const z=S.filter(I=>I.supportedModes.includes(D));z.length>0&&l(z[0].id)},C=b.useCallback(async D=>{var z;if(D==null||D.preventDefault(),D==null||D.stopPropagation(),console.log("🚀 Starting Configuration Wizard:",{selectedDeploymentMode:
1497a,isConfiguring:c,showWizard:d,user:e==null?void 0:e.name,currentPath:window.location.pathname}),!a){console.log("❌ No deployment mode selected"),n({title:"Select Deployment Mode",description:"Please select a deployment mode before proceeding",variant:"destructive"});return}w(!0);try{const I=`/wizard?mode=${a}`;console.log("🧭 Attempting navigation to:",I),n({title:"🚀 Starting Wizard",description:`Loading ${(z=N.find(F=>F.id===a))==null?void 0:z.name} configuration...`,duration:2e3}),localStorage.setItem("selectedDeploymentMode",a),console.log("🚀 Navigating directly to:",I),window.location.href=I}catch(I){console.error("❌ Navigation error:",I),n({title:"Navigation Error",description:"Trying alternative navigation method...",variant:"destructive"}),window.location.href=`/wizard?mode=${a}`}finally{setTimeout(()=>w(!1),3e3)}},[a,n,e,r,N]),E=D=>{console.log("Wizard completed with configuration:",D);const z={...D,deploymentMode:a,defaultLLM:o,organization:(e==null?void 0:e.organization)||"Your Organization",configuredAt:new Date().toISOString(),configuredBy:(e==null?void 0:e.name)||"Admin"};p(z),localStorage.setItem("organizationConfig",JSON.stringify(z)),f(!1),u(!1),n({title:"✅ Configuration Complete",description:"Organization-wide deployment settings have been configured successfully.",duration:4e3})},O=D=>{i(D.deploymentMode),l(D.configuration.defaultLLM||"llama3-8b"),p(D.configuration)},P=(D,z)=>{n(D?{title:"✅ Validation Successful",description:"Your configuration is ready for deployment.",duration:4e3}:{title:"⚠️ Validation Issues Found",description:"Please review and fix the configuration issues before deployment.",variant:"destructive",duration:4e3})};return d&&a?s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsx("div",{className:"container mx-auto px-6 py-8 max-w-6xl",children:s.jsx(Dse,{onRetry:()=>f(!1),children:s.jsx(Rse,{deploymentMode:a,onComplete:E,onBack:()=>f(!1)})})})})]}):s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-cyber-blue/30 rounded-full animate-floating"}),s.jsx("div",{className:"absolute top-1/3 right-1/3 w-1 h-1 bg-electric-blue/40 rounded-full animate-floating",style:{animationDelay:"2s"}}),s.jsx("div",{className:"absolute bottom-1/4 left-1/3 w-3 h-3 bg-neon-blue/20 rounded-full animate-floating",style:{animationDelay:"4s"}}),s.jsx("div",{className:"absolute top-1/2 right-1/4 w-2 h-2 bg-cyber-blue/30 rounded-full animate-floating",style:{animationDelay:"1s"}}),s.jsx("div",{className:"absolute bottom-1/3 right-1/2 w-1 h-1 bg-electric-blue/50 rounded-full animate-floating",style:{animationDelay:"3s"}}),s.jsxs("div",{className:"absolute top-0 left-0 w-full h-full opacity-30",children:[s.jsx("div",{className:"absolute top-1/4 left-1/6 w-32 h-32 rounded-full bg-gradient-radial from-cyber-blue/20 to-transparent animate-parallax-slow"}),s.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-48 h-48 rounded-full bg-gradient-radial from-electric-blue/15 to-transparent animate-parallax-medium"})]})]}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsxs("div",{className:"container mx-auto px-6 py-8 max-w-6xl",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("h1",{className:"font-bebas text-4xl sm:text-5xl lg:text-6xl text-white mb-4 tracking-wide",children:["SYSTEM ",s.jsx("span",{className:"bg-gradient-to-r from-electric-blue to-neon-blue bg-clip-text text-transparent",children:"SETUP"})]}),s.jsx("p",{className:"text-white",children:"Configure organization-wide deployment and infrastructure settings with advanced wizards and validation."})]}),s.jsxs(os,{defaultValue:"deployment",className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-4",children:[s.jsx(at,{value:"deployment",children:"Deployment"}),s.jsx(at,{value:"templates",children:"Templates"}),s.jsx(at,{value:"validation",children:"Validation"}),s.jsx(at,{value:"llm",children:"AI Models"})]}),s.jsx(Ze,{value:"deployment",className:"space-y-6 mt-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(hl,{className:"h-5 w-5"}),"Enhanced Deployment Configuration"]}),s.jsx(nt,{children:"Choose your deployment mode and proceed with detailed configuration wizard."})]}),s.jsxs(se,{children:[s.jsxs("div",{className:"mb-6 p-4 bg-primary/10 border border-primary/20 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("div",{className:"flex items-center justify-center w-6 h-6 bg-primary text-primary-foreground rounded-full text-sm font-bold",children:"1"}),s.jsx("h3",{className:"font-semibold text-primary",children:"Select Deployment Mode"})]}),s.jsxs("p",{className:"text-sm text-muted-foreground ml-8",children:["Click on one of the deployment options below to select your preferred configuration.",!a&&s.jsx("span",{className:"text-amber-600 font-medium",children:" (Required to continue)"})]})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:N.map(D=>
1497s.jsxs(te,{className:`cursor-pointer transition-all duration-300 transform hover:scale-105 ${a===D.id?"border-primary bg-primary/10 ring-2 ring-primary/30 shadow-lg shadow-primary/20":"hover:border-primary/50 hover:shadow-md"}`,onClick:()=>k(D.id),children:[s.jsxs(xe,{className:"text-center relative",children:[a===D.id&&s.jsx("div",{className:"absolute top-2 right-2",children:s.jsx(Pe,{className:"h-5 w-5 text-primary fill-primary/20"})}),s.jsx("div",{className:`mx-auto mb-2 p-3 rounded-lg w-fit transition-colors ${a===D.id?"bg-primary/20":"bg-muted"}`,children:D.icon}),s.jsx(we,{className:"text-lg",children:D.name}),s.jsx(nt,{children:D.description})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsx("div",{className:"space-y-2",children:D.features.map((z,I)=>s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Pe,{className:"h-3 w-3 text-green-500"}),s.jsx("span",{children:z})]},I))}),s.jsxs("div",{className:"flex justify-between text-xs",children:[s.jsxs(le,{variant:"outline",children:["Security: ",D.security]}),s.jsxs(le,{variant:"outline",children:["Setup: ",D.setup]})]})]})]},D.id))}),a&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"p-4 bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("div",{className:"flex items-center justify-center w-6 h-6 bg-green-600 text-white rounded-full text-sm font-bold",children:"2"}),s.jsx("h3",{className:"font-semibold text-green-700 dark:text-green-400",children:"Ready to Configure"})]}),s.jsxs("p",{className:"text-sm text-green-700 dark:text-green-300 ml-8",children:["Great! You've selected ",s.jsx("strong",{children:(R=N.find(D=>D.id===a))==null?void 0:R.name}),". Now click the button below to start the configuration wizard."]})]}),s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4",children:[s.jsx(Y,{onClick:C,disabled:x,className:"bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90 text-white px-8 py-3 text-lg disabled:opacity-50 transition-all",type:"button",children:x?s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"}),"Loading Wizard..."]}):s.jsxs("div",{className:"flex items-center gap-2",children:["Start Configuration Wizard",s.jsx(Bt,{className:"h-4 w-4"})]})}),s.jsx("a",{href:`/wizard?mode=${a}`,className:"text-sm text-muted-foreground hover:text-primary underline",onClick:D=>{D.preventDefault(),console.log("🔗 Direct link clicked as backup"),window.location.href=`/wizard?mode=${a}`},children:"Direct link (if button doesn't work)"})]})]})]})]})}),s.jsx(Ze,{value:"templates",className:"space-y-6 mt-6",children:s.jsx(zze,{onLoadTemplate:O,currentConfiguration:m})}),s.jsx(Ze,{value:"validation",className:"space-y-6 mt-6",children:m?s.jsx(Bze,{configuration:m,deploymentMode:a,onValidationComplete:P}):s.jsx(te,{children:s.jsxs(se,{className:"p-8 text-center",children:[s.jsx(ln,{className:"h-12 w-12 mx-auto text-yellow-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"No Configuration to Validate"}),s.jsx("p",{className:"text-readable-muted mb-4",children:"Complete the deployment configuration first or load a template to enable validation."}),s.jsx(Y,{onClick:()=>f(!0),disabled:!a,children:"Start Configuration"})]})})}),s.jsx(Ze,{value:"llm",className:"space-y-6 mt-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-5 w-5"}),"AI Model Selection"]}),s.jsx(nt,{children:"Choose the AI model based on your deployment mode. Models are filtered by compatibility."})]}),s.jsx(se,{children:a?s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"mb-4",children:s.jsxs(le,{variant:"outline",className:"mb-2",children:["Compatible with ",(T=N.find(D=>D.id===a))==null?void 0:T.name]})}),_().map(D=>s.jsx(te,{className:`cursor-pointer transition-all duration-200 ${o===D.id?"border-cyber-blue bg-cyber-blue/10 dark:bg-cyber-blue/20":"hover:border-gray-300"}`,onClick:()=>l(D.id),children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[s.jsx("h4",{className:"font-medium",children:D.name}),s.jsx(le,{variant:"secondary",children:Wg(D.provider)}),s.jsxs(le,{variant:"outline",children:["Cost: ",D.cost]}),s.jsxs(le,{variant:"outline",children:["Performance: ",D.performance]})]}),s.jsx("p",{className:"text-sm text-readable-muted mb-2",children:D.description}),s.jsx("div",{className:"flex gap-1 flex-wrap mb-2",children:D.strengths.map((z,I)=>s.jsx(le,{variant:"outline",className:"text-xs",children:z},I))}),s.jsxs("p",{className:"text-xs text-readable-subtle",children:["Requirements: ",D.requirements]})]}),o===D.id&&s.jsx(Pe,{className:"h-5 w-5 text-cyber-blue"})]})})},D.id))]}):s.jsxs("div",{className:"text-center py-8",children:[s.jsx(ln,{className:"h-12 w-12 mx-auto text-yellow-500 mb-4"}),s.jsx("p",{className:"text-readable-muted",children:"Please select a deployment mode first to see compatible AI models."})]})})]})})]})]})}),s.jsx(Cn,{})]})};class Hze{async getPlans(){return Et.get("/api/subscriptions/plans")}async createCheckout(t){return Et.post("/api/subscriptions/checkout",t)}async createPortalSession(t){return Et.post("/api/subscriptions/portal",{return_url:t})}}const JR=new Hze,Lse={all:["subscriptions"],plans:()=>[...Lse.all,"plans"]};function qze(){return hK({queryKey:Lse.plans(),queryFn:()=>JR.getPlans()})}function Vze(){return mK({mutationFn:e=>JR.createCheckout(e)})}function Wze(){return mK({mutationFn:e=>JR.createPortalSession(e)})}const Gze=()=>
1497{var k,C;const e=qt(),{user:t,refreshUser:n}=nr(),{toast:r}=_t(),[a,i]=b.useState(!1),o=Wze(),[l,c]=b.useState({firstName:(t==null?void 0:t.firstName)||"",lastName:(t==null?void 0:t.lastName)||"",email:(t==null?void 0:t.email)||""});b.useEffect(()=>{t&&c({firstName:t.firstName||"",lastName:t.lastName||"",email:t.email||""})},[t]);const[u,d]=b.useState({currentPassword:"",newPassword:"",confirmPassword:""}),f=t==null?void 0:t.subscription_info,p=((f==null?void 0:f.status)||"inactive").replace(/_/g," ").toUpperCase(),v=(f==null?void 0:f.has_access)??(f==null?void 0:f.is_subscribed)??!1,y=(f==null?void 0:f.will_renew)??(v&&!(f!=null&&f.cancel_at_period_end)),x=f!=null&&f.current_period_end?new Date(f.current_period_end).toLocaleDateString():"N/A",w=f!=null&&f.next_payment_at?new Date(f.next_payment_at).toLocaleDateString():"N/A",N=async()=>{i(!0);try{await qn.updateProfile({first_name:l.firstName,last_name:l.lastName}),await n(),r({title:"Personal Information Updated",description:"Your personal information has been successfully updated."})}catch{r({title:"Error",description:"Failed to update personal information. Please try again.",variant:"destructive"})}finally{i(!1)}},S=async()=>{if(u.newPassword!==u.confirmPassword){r({title:"Password Mismatch",description:"New password and confirmation password do not match.",variant:"destructive"});return}i(!0);try{await qn.changePassword({old_password:u.currentPassword,new_password:u.newPassword}),r({title:"Password Changed",description:"Your password has been successfully updated."}),d({currentPassword:"",newPassword:"",confirmPassword:""})}catch{r({title:"Error",description:"Failed to change password. Please verify your current password and try again.",variant:"destructive"})}finally{i(!1)}},_=async()=>{try{const E=await o.mutateAsync(`${window.location.origin}/account-profile`),O=(E==null?void 0:E.portal_url)||(E==null?void 0:E.url);if(O){window.location.href=O;return}r({title:"Billing portal unavailable",description:"Please try again shortly or contact support.",variant:"destructive"})}catch{r({title:"Billing portal unavailable",description:"Please use the Pricing page for plan changes while portal access is unavailable.",variant:"destructive"}),e("/pricing")}};return s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-cyber-blue/30 rounded-full animate-floating"}),s.jsx("div",{className:"absolute top-1/3 right-1/3 w-1 h-1 bg-electric-blue/40 rounded-full animate-floating",style:{animationDelay:"2s"}}),s.jsx("div",{className:"absolute bottom-1/4 left-1/3 w-3 h-3 bg-neon-blue/20 rounded-full animate-floating",style:{animationDelay:"4s"}}),s.jsx("div",{className:"absolute top-1/2 right-1/4 w-2 h-2 bg-cyber-blue/30 rounded-full animate-floating",style:{animationDelay:"1s"}}),s.jsx("div",{className:"absolute bottom-1/3 right-1/2 w-1 h-1 bg-electric-blue/50 rounded-full animate-floating",style:{animationDelay:"3s"}}),s.jsxs("div",{className:"absolute top-0 left-0 w-full h-full opacity-30",children:[s.jsx("div",{className:"absolute top-1/4 left-1/6 w-32 h-32 rounded-full bg-gradient-radial from-cyber-blue/20 to-transparent animate-parallax-slow"}),s.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-48 h-48 rounded-full bg-gradient-radial from-electric-blue/15 to-transparent animate-parallax-medium"})]})]}),s.jsx(xn,{}),s.jsx("div",{className:"container mx-auto px-6 pt-24 pb-12",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("h1",{className:"font-bebas text-4xl sm:text-5xl lg:text-6xl text-white mb-4 tracking-wide",children:["ACCOUNT ",s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue to-neon-cyan bg-clip-text text-transparent",children:"PROFILE"})]}),s.jsx("p",{className:"text-white mt-2",children:"Manage your personal information, security settings, and account preferences."})]}),s.jsxs(te,{className:"mb-6",children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Subscription"}),s.jsx(nt,{children:"Your current plan and billing management."})]}),s.jsxs(se,{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Current tier"}),s.jsxs("p",{className:"text-lg font-semibold",children:[((k=t==null?void 0:t.t
1497ier_info)==null?void 0:k.tier_name)||"Free"," (",((C=t==null?void 0:t.tier_info)==null?void 0:C.tier_slug)||"free",")"]}),s.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Subscription status: ",p]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Access: ",v?"Active":"Inactive"]}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Renewal: ",y?"Auto-renew enabled":"Will not renew"]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:f!=null&&f.is_scheduled_for_cancellation||f!=null&&f.cancel_at_period_end?`Scheduled cancellation on: ${x}`:`Current period ends: ${x}`}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:["Next payment: ",w]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Y,{variant:"outline",onClick:()=>e("/pricing"),children:"View Plans"}),s.jsx(Y,{onClick:_,disabled:o.isPending,children:o.isPending?"Opening portal...":"Manage Subscription"})]})]})]}),s.jsxs(os,{defaultValue:"personal",className:"space-y-6",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-2",children:[s.jsxs(at,{value:"personal",className:"flex items-center gap-2",children:[s.jsx(li,{className:"h-4 w-4"}),"Personal Information"]}),s.jsxs(at,{value:"security",className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-4 w-4"}),"Password"]})]}),s.jsx(Ze,{value:"personal",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Personal Information"}),s.jsx(nt,{children:"Update your personal details and contact information."})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"firstName",children:"First Name"}),s.jsx(_e,{id:"firstName",value:l.firstName,onChange:E=>c({...l,firstName:E.target.value}),placeholder:"Enter your first name"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"lastName",children:"Last Name"}),s.jsx(_e,{id:"lastName",value:l.lastName,onChange:E=>c({...l,lastName:E.target.value}),placeholder:"Enter your last name"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",children:"Email Address"}),s.jsx(_e,{id:"email",type:"email",value:l.email,disabled:!0,className:"bg-muted text-muted-foreground"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Email cannot be changed."})]}),s.jsx(Y,{onClick:N,disabled:a,className:"w-full md:w-auto",children:a?"Saving...":"Save Changes"})]})]})}),s.jsx(Ze,{value:"security",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Password & Security"}),s.jsx(nt,{children:"Manage your password and security preferences."})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"currentPassword",children:"Current Password"}),s.jsx(_e,{id:"currentPassword",type:"password",value:u.currentPassword,onChange:E=>d({...u,currentPassword:E.target.value}),placeholder:"Enter current password"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"newPassword",children:"New Password"}),s.jsx(_e,{id:"newPassword",type:"password",value:u.newPassword,onChange:E=>d({...u,newPassword:E.target.value}),placeholder:"Enter new password"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"confirmPassword",children:"Confirm New Password"}),s.jsx(_e,{id:"confirmPassword",type:"password",value:u.confirmPassword,onChange:E=>d({...u,confirmPassword:E.target.value}),placeholder:"Confirm new password"})]})]}),s.jsx(Y,{onClick:S,disabled:a||!u.currentPassword||!u.newPassword,className:"w-full md:w-auto",children:a?"Changing Password...":"Change Password"})]})]})})]})]})}),s.jsx(Cn,{})]})},Kze=()=>{const[e,t]=b.useState(!0),[n,r]=b.useState(!0),[a,i]=b.useState("us-east"),[o,l]=b.useState(2),c=[{framework:"SOC 2 Type II",status:"compliant",lastAudit:"March 2024",nextAudit:"March 2025"},{framework:"HIPAA",status:"compliant",lastAudit:"January 2024",nextAudit:"January 2025"},{framework:"GDPR",status:"compliant",lastAudit:"February 2024",nextAudit:"February 2025"},{framework:"FERPA",status:"compliant",lastAudit:"April 2024",nextAudit:"April 2025"},{framework:"ISO 27001",status:"in-progress",lastAudit:"In Progress",nextAudit:"July 2024"}],u=[{role:"Super Admin",users:3,permissions:["Full system access","User management","Billing","Security settings"],lastModified:"2024-03-15"},{role:"Admin",users:12,permissions:["Agent management","User management","Analytics","Knowledge base"],lastModified:"2024-03-10"},{role:"Manager",users:45,permissions:["Agent configuration","Team management","Reports"],lastModified:"2024-03-08"},{role:"User",users:892,permissions:["Agent interaction","Basic reports"],lastModified:"2024-03-05"}],d=[{provider:"Azure AD",status:"active",users:456,lastSync:"2024-03-15 14:30"},{provider:"Okta",status:"active",users:234,lastSync:"2024-03-15 14:28"}
1497,{provider:"Google Workspace",status:"configured",users:0,lastSync:"Never"},{provider:"SAML 2.0",status:"configured",users:0,lastSync:"Never"}],f=[{value:"us-east",label:"US East (Virginia)",flag:"🇺🇸"},{value:"us-west",label:"US West (California)",flag:"🇺🇸"},{value:"eu-west",label:"EU West (Ireland)",flag:"🇪🇺"},{value:"eu-central",label:"EU Central (Frankfurt)",flag:"🇪🇺"},{value:"asia-pacific",label:"Asia Pacific (Tokyo)",flag:"🇯🇵"},{value:"canada",label:"Canada (Central)",flag:"🇨🇦"}];return s.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[s.jsx(xn,{}),s.jsx("div",{className:"pt-20 pb-8",children:s.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[s.jsxs("div",{className:"mb-8",children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:"Governance Admin Console"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Manage security, compliance, and access controls for your organization"})]}),s.jsxs(os,{defaultValue:"compliance",className:"space-y-6",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-5",children:[s.jsxs(at,{value:"compliance",className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-4 w-4"}),"Compliance"]}),s.jsxs(at,{value:"security",className:"flex items-center gap-2",children:[s.jsx(ur,{className:"h-4 w-4"}),"Security"]}),s.jsxs(at,{value:"access",className:"flex items-center gap-2",children:[s.jsx(Bn,{className:"h-4 w-4"}),"Access Control"]}),s.jsxs(at,{value:"data",className:"flex items-center gap-2",children:[s.jsx(Gr,{className:"h-4 w-4"}),"Data Management"]}),s.jsxs(at,{value:"legal",className:"flex items-center gap-2",children:[s.jsx(rn,{className:"h-4 w-4"}),"Legal Holds"]})]}),s.jsx(Ze,{value:"compliance",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"lg:col-span-2",children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Compliance Status"}),s.jsx(nt,{children:"Current compliance framework status and audit schedules"})]}),s.jsx(se,{children:s.jsx("div",{className:"space-y-4",children:c.map(m=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[m.status==="compliant"?s.jsx(Pe,{className:"h-5 w-5 text-green-500"}):s.jsx(ln,{className:"h-5 w-5 text-yellow-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:m.framework}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Last audit: ",m.lastAudit]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx(le,{variant:m.status==="compliant"?"default":"secondary",className:m.status==="compliant"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"",children:m.status==="compliant"?"Compliant":"In Progress"}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Next: ",m.nextAudit]})]})]},m.framework))})})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Compliance Actions"}),s.jsx(nt,{children:"Quick compliance management tasks"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rn,{className:"h-4 w-4 mr-2"}),"Generate SOC 2 Report"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(it,{className:"h-4 w-4 mr-2"}),"Run HIPAA Audit"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(Gr,{className:"h-4 w-4 mr-2"}),"Export GDPR Data"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Configure Policies"]})]})]})]})}),s.jsx(Ze,{value:"security",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Encryption & Key Management"}),s.jsx(nt,{children:"Manage encryption settings and cryptographic keys"})]}),s.jsxs(se,{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Data Encryption at Rest"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"AES-256 encryption for all stored data"})]}),s.jsx(Dt,{checked:n,onCheckedChange:r})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Data Encryption in Transit"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"TLS 1.3 for all data transmission"})]}),s.jsx(Dt,{checked:!0,disabled:!0})]}),s.jsxs("div",{className:"pt-4 border-t",children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white mb-3",children:"Key Management"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Key Rotation:"}),s.jsx("span",{className:"text-green-600",children:"Automated (90 days)"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"HSM Integration:"}),s.jsx("span",{className:"text-green-600",children:"Active"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Key Escrow:"}),s.jsx("span",{className:"text-green-600",children:"Configured"})]})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(YO,{className:"h-4 w-4 mr-2"}),"Manage Keys"]})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"SSO Integrations"}),s.jsx(nt,{children:"Manage single sign-on providers and configurations"})]}),s.jsxs(se,{children:[s.jsx("div",{className:"space-y-4",children:d.map(m=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Qu,{className:"h-5 w-5 text-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:m.provider}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[m.users," users • Last sync: ",m.lastSync]})]})]}),s.jsx(le,{variant:m.status==="active"?"default":"secondary",className:m.status==="active"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"",children:m.status})]},m.provider))}),s.jsx(Y,{className:"w-full mt-4",children:"+ Add SSO Provider"})]})]})]})}),s.jsx(Ze,{value:"access",className:"space-y-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Role-Based Access Control (RBAC)"}),s.jsx(nt,{children:"Manage user roles and permissions across your organization"})]}),s.jsxs(se,{children:[s.jsx("div",{className:"space-y-4",children:u.map(m=>s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bn,{className:"h-5 w-5 text-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:m.role}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[m.users," users • Last modified: ",m.lastModified]})]})]}),s.jsx(Y,{variant:"outline",size:"sm",children:"Edit"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:"Permissions:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:m.permissions.map(p=>s.jsx(le,{variant:"secondary",className:"text-xs",children:p},p))})]})]},m.role))}),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Y,{className:"bg-blue-600 hover:bg-blue-700 text-white",children:"+ Create New Role"})})]})]})}),s.jsx(Ze,{value:"data",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Data Residency"}),s.jsx(nt,{children:"Control where your data is stored and processed"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2 block",children:"Primary Data Region"}),s.jsxs(dt,{value:a,onValueChange:i,children:[s.jsx(ot,{children:s.jsx(ft,{})}),s.jsx(lt,{children:f.map(m=>s.jsx(me,{value:m.value,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:m.flag}),s.jsx("span",{children:m.label})]})},m.value))})]})]}),s.jsxs("div",{className:"pt-4 border-t",children:[s.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:"Data Processing"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Cross-border transfers:"}),s.jsx("span",{className:"text-red-600",children:"Disabled"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Data localization:"}),s.jsx("span",{className:"text-green-600",children:"Enforced"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Backup regions:"}),s.jsx("span",{className:"text-blue-600",children:"Same jurisdiction"})]})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(bs,{className:"h-4 w-4 mr-2"}),"Configure Data Flows"]})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Data Retention Policies"}),s.jsx(nt,{children:"Manage automated data lifecycle and retention"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"User Data"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Personal information"})]}),s.jsx(le,{children:"7 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Conversation Logs"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Agent interactions"})]}),s.jsx(le,{children:"3 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Audit Logs"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Security events"})]}),s.jsx(le,{children:"10 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Analytics Data"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Usage metrics"})]}),s.jsx(le,{children:"5 years"})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Customize Policies"]}
1497)]})]})]})}),s.jsx(Ze,{value:"legal",className:"space-y-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Legal Holds"}),s.jsx(nt,{children:"Manage legal preservation notices and data holds"})]}),s.jsxs(se,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[s.jsxs("div",{className:"text-center p-4 bg-blue-50 dark:bg-blue-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600 dark:text-blue-400",children:o}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Active Holds"})]}),s.jsxs("div",{className:"text-center p-4 bg-green-50 dark:bg-green-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:"847GB"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Data Preserved"})]}),s.jsxs("div",{className:"text-center p-4 bg-yellow-50 dark:bg-yellow-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-yellow-600 dark:text-yellow-400",children:"5"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Pending Review"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ln,{className:"h-5 w-5 text-yellow-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Matter #2024-001"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Employment dispute - initiated March 1, 2024"})]})]}),s.jsx(le,{className:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",children:"Active"})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[s.jsx("strong",{children:"Scope:"})," All communications and documents for employee ID 12345 from Jan 1 - Mar 31, 2024"]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:[s.jsx("strong",{children:"Data preserved:"})," 234GB across 12,450 records"]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(it,{className:"h-5 w-5 text-blue-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Matter #2024-002"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Regulatory inquiry - initiated February 15, 2024"})]})]}),s.jsx(le,{className:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:"Active"})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[s.jsx("strong",{children:"Scope:"})," Patient data handling procedures and audit logs for Q4 2023"]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:[s.jsx("strong",{children:"Data preserved:"})," 613GB across 45,230 records"]})]})]}),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Y,{className:"bg-red-600 hover:bg-red-700 text-white",children:"+ Create New Legal Hold"})})]})]})})]})]})}),s.jsx(Cn,{})]})},Yze=()=>{const{user:e}=nr(),t=qt(),{toast:n}=_t(),[r,a]=b.useState(!0),[i,o]=b.useState(!0),[l,c]=b.useState("us-east"),[u,d]=b.useState("");if(!((e==null?void 0:e.role)==="admin"||(e==null?void 0:e.role)==="super_admin"))return s.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900 flex items-center justify-center",children:s.jsx(te,{className:"max-w-md",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx(it,{className:"h-16 w-16 mx-auto text-red-500 mb-4"}),s.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Access Denied"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Administrator privileges required to access governance settings."}),s.jsx(Y,{onClick:()=>t("/dashboard"),children:"Return to Dashboard"})]})})});const m=[{framework:"SOC 2 Type II",status:"compliant",lastAudit:"March 2024",nextAudit:"March 2025"},{framework:"HIPAA",status:"compliant",lastAudit:"January 2024",nextAudit:"January 2025"},{framework:"GDPR",status:"compliant",lastAudit:"February 2024",nextAudit:"February 2025"},{framework:"FERPA",status:"compliant",lastAudit:"April 2024",nextAudit:"April 2025"},{framework:"ISO 27001",status:"in-progress",lastAudit:"In Progress",nextAudit:"July 2024"}],p=[{role:"Super Admin",users:3,permissions:["Full system access","User management","Billing","Security settings"],lastModified:"2024-03-15"},{role:"Admin",users:12,permissions:["Agent management","User management","Analytics","Knowledge base"],lastModified:"2024-03-10"},{role:"Manager",users:45,permissions:["Agent configuration","Team management","Reports"],lastModified:"2024-03-08"},{role:"User",users:892,permissions:["Agent interaction","Basic reports"],lastModified:"2024-03-05"}],v=[{provider:"Azure AD",status:"active",users:456,lastSync:"2024-03-15 14:30"},{provider:"Okta",status:"active",users:234,lastSync:"2024-03-15 14:28"}
1497,{provider:"Google Workspace",status:"configured",users:0,lastSync:"Never"},{provider:"SAML 2.0",status:"configured",users:0,lastSync:"Never"}],y=[{value:"us-east",label:"US East (Virginia)",flag:"🇺🇸"},{value:"us-west",label:"US West (California)",flag:"🇺🇸"},{value:"eu-west",label:"EU West (Ireland)",flag:"🇪🇺"},{value:"eu-central",label:"EU Central (Frankfurt)",flag:"🇪🇺"},{value:"asia-pacific",label:"Asia Pacific (Tokyo)",flag:"🇯🇵"},{value:"canada",label:"Canada (Central)",flag:"🇨🇦"}];return s.jsx("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:s.jsxs("div",{className:"container mx-auto px-6 py-8 max-w-7xl",children:[s.jsxs("nav",{className:"flex items-center space-x-2 text-sm text-gray-600 dark:text-gray-400 mb-6",children:[s.jsxs(Y,{variant:"ghost",size:"sm",onClick:()=>t("/dashboard"),className:"p-0 h-auto text-sm hover:text-blue-600",children:[s.jsx(KO,{className:"h-4 w-4 mr-1"}),"Dashboard"]}),s.jsx(ao,{className:"h-4 w-4"}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:()=>t("/admin"),className:"p-0 h-auto text-sm hover:text-blue-600",children:"Admin Console"}),s.jsx(ao,{className:"h-4 w-4"}),s.jsx("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:"Governance"})]}),s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-gray-900 dark:text-white mb-2",children:"Governance & Compliance Console"}),s.jsxs("p",{className:"text-gray-600 dark:text-gray-400",children:["Manage security, compliance, and access controls for ",(e==null?void 0:e.organization)||"your organization"]})]}),s.jsxs(Y,{variant:"outline",onClick:()=>{n({title:"Help Documentation",description:"Opening governance help guide...",duration:3e3})},children:[s.jsx(Ko,{className:"h-4 w-4 mr-2"}),"Help"]})]}),s.jsxs("div",{className:"flex gap-4 items-center",children:[s.jsxs("div",{className:"relative flex-1 max-w-md",children:[s.jsx(Fh,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-4 w-4"}),s.jsx(_e,{placeholder:"Search governance settings...",value:u,onChange:x=>d(x.target.value),className:"pl-10"})]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(m1,{className:"h-4 w-4 mr-2"}),"Filter"]})]})]}),s.jsxs(os,{defaultValue:"compliance",className:"space-y-6",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-5",children:[s.jsxs(at,{value:"compliance",className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-4 w-4"}),"Compliance"]}),s.jsxs(at,{value:"security",className:"flex items-center gap-2",children:[s.jsx(ur,{className:"h-4 w-4"}),"Security"]}),s.jsxs(at,{value:"access",className:"flex items-center gap-2",children:[s.jsx(Bn,{className:"h-4 w-4"}),"Access Control"]}),s.jsxs(at,{value:"data",className:"flex items-center gap-2",children:[s.jsx(Gr,{className:"h-4 w-4"}),"Data Management"]}),s.jsxs(at,{value:"legal",className:"flex items-center gap-2",children:[s.jsx(rn,{className:"h-4 w-4"}),"Legal Holds"]})]}),s.jsx(Ze,{value:"compliance",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"lg:col-span-2",children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Compliance Status"}),s.jsx(nt,{children:"Current compliance framework status and audit schedules"})]}),s.jsx(se,{children:s.jsx("div",{className:"space-y-4",children:m.map(x=>s.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[x.status==="compliant"?s.jsx(Pe,{className:"h-5 w-5 text-green-500"}):s.jsx(ln,{className:"h-5 w-5 text-yellow-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:x.framework}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Last audit: ",x.lastAudit]})]})]}),s.jsxs("div",{className:"text-right",children:[s.jsx(le,{variant:x.status==="compliant"?"default":"secondary",className:x.status==="compliant"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"",children:x.status==="compliant"?"Compliant":"In Progress"}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Next: ",x.nextAudit]})]})]},x.framework))})})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Compliance Actions"}
vendor: 4,624 bytes, line 1497
1497),s.jsx(nt,{children:"Quick compliance management tasks"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(rn,{className:"h-4 w-4 mr-2"}),"Generate SOC 2 Report"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(it,{className:"h-4 w-4 mr-2"}),"Run HIPAA Audit"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(Gr,{className:"h-4 w-4 mr-2"}),"Export GDPR Data"]}),s.jsxs(Y,{variant:"outline",className:"w-full justify-start",children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Configure Policies"]})]})]})]})}),s.jsx(Ze,{value:"security",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Encryption & Key Management"}),s.jsx(nt,{children:"Manage encryption settings and cryptographic keys"})]}),s.jsxs(se,{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Data Encryption at Rest"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"AES-256 encryption for all stored data"})]}),s.jsx(Dt,{checked:i,onCheckedChange:o})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Data Encryption in Transit"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"TLS 1.3 for all data transmission"})]}),s.jsx(Dt,{checked:!0,disabled:!0})]}),s.jsxs("div",{className:"pt-4 border-t",children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white mb-3",children:"Key Management"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Key Rotation:"}),s.jsx("span",{className:"text-green-600",children:"Automated (90 days)"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"HSM Integration:"}),s.jsx("span",{className:"text-green-600",children:"Active"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Key Escrow:"}),s.jsx("span",{className:"text-green-600",children:"Configured"})]})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(YO,{className:"h-4 w-4 mr-2"}),"Manage Keys"]})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"SSO Integrations"}),s.jsx(nt,{children:"Manage single sign-on providers and configurations"})]}),s.jsxs(se,{children:[s.jsx("div",{className:"space-y-4",children:v.map(x=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Qu,{className:"h-5 w-5 text-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:x.provider}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[x.users," users • Last sync: ",x.lastSync]})]})]}),s.jsx(le,{variant:x.status==="active"?"default":"secondary",className:x.status==="active"?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200":"",children:x.status})]},x.provider))}),s.jsx(Y,{className:"w-full mt-4",children:"+ Add SSO Provider"})]})]})]})}),s.jsx(Ze,{value:"access",className:"space-y-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Role-Based Access Control (RBAC)"}),s.jsx(nt,{children:"Manage user roles and permissions across your organization"})]}),s.jsxs(se,{children:[s.jsx("div",{className:"space-y-4",children:p.map(x=>s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Bn,{className:"h-5 w-5 text-blue-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:x.role}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[x.users," users • Last modified: ",x.lastModified]})]})]}),s.jsx(Y,{variant:"outline",size:"sm",children:"Edit"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2",children:"Permissions:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:x.permissions.map(w=>s.jsx(le,{variant:"secondary",className:"text-xs",children:w}
1497,w))})]})]},x.role))}),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Y,{className:"bg-blue-600 hover:bg-blue-700 text-white",children:"+ Create New Role"})})]})]})}),s.jsx(Ze,{value:"data",className:"space-y-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Data Residency"}),s.jsx(nt,{children:"Control where your data is stored and processed"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"text-sm font-medium text-gray-900 dark:text-white mb-2 block",children:"Primary Data Region"}),s.jsxs(dt,{value:l,onValueChange:c,children:[s.jsx(ot,{children:s.jsx(ft,{})}),s.jsx(lt,{children:y.map(x=>s.jsx(me,{value:x.value,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{children:x.flag}),s.jsx("span",{children:x.label})]})},x.value))})]})]}),s.jsxs("div",{className:"pt-4 border-t",children:[s.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-white mb-3",children:"Data Processing"}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Cross-border transfers:"}),s.jsx("span",{className:"text-red-600",children:"Disabled"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Data localization:"}),s.jsx("span",{className:"text-green-600",children:"Enforced"})]}),s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsx("span",{children:"Backup regions:"}),s.jsx("span",{className:"text-blue-600",children:"Same jurisdiction"})]})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(bs,{className:"h-4 w-4 mr-2"}),"Configure Data Flows"]})]})]}),s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Data Retention Policies"}),s.jsx(nt,{children:"Manage automated data lifecycle and retention"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"User Data"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Personal information"})]}),s.jsx(le,{children:"7 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Conversation Logs"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Agent interactions"})]}),s.jsx(le,{children:"3 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Audit Logs"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Security events"})]}),s.jsx(le,{children:"10 years"})]}),s.jsxs("div",{className:"flex justify-between items-center p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-gray-900 dark:text-white",children:"Analytics Data"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Usage metrics"})]}),s.jsx(le,{children:"5 years"})]})]}),s.jsxs(Y,{variant:"outline",className:"w-full",children:[s.jsx(Kt,{className:"h-4 w-4 mr-2"}),"Customize Policies"]})]})]})]})}),s.jsx(Ze,{value:"legal",className:"space-y-6",children:s.jsxs(te,{children:[s.jsxs(xe,{children:[s.jsx(we,{children:"Legal Holds"}),s.jsx(nt,{children:"Manage legal preservation notices and data holds"})]}),s.jsxs(se,{children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-6",children:[s.jsxs("div",{className:"text-center p-4 bg-blue-50 dark:bg-blue-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-blue-600 dar
1497k:text-blue-400",children:"2"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Active Holds"})]}),s.jsxs("div",{className:"text-center p-4 bg-green-50 dark:bg-green-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-green-600 dark:text-green-400",children:"847GB"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Data Preserved"})]}),s.jsxs("div",{className:"text-center p-4 bg-yellow-50 dark:bg-yellow-950 rounded-lg",children:[s.jsx("div",{className:"text-2xl font-bold text-yellow-600 dark:text-yellow-400",children:"5"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Pending Review"})]})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(ln,{className:"h-5 w-5 text-yellow-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Matter #2024-001"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Employment dispute - initiated March 1, 2024"})]})]}),s.jsx(le,{className:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200",children:"Active"})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[s.jsx("strong",{children:"Scope:"})," All communications and documents for employee ID 12345 from Jan 1 - Mar 31, 2024"]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:[s.jsx("strong",{children:"Data preserved:"})," 234GB across 12,450 records"]})]}),s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(it,{className:"h-5 w-5 text-blue-500"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-gray-900 dark:text-white",children:"Matter #2024-002"}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Regulatory inquiry - initiated February 15, 2024"})]})]}),s.jsx(le,{className:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",children:"Active"})]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:[s.jsx("strong",{children:"Scope:"})," Patient data handling procedures and audit logs for Q4 2023"]}),s.jsxs("div",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:[s.jsx("strong",{children:"Data preserved:"})," 613GB across 45,230 records"]})]})]}),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Y,{className:"bg-red-600 hover:bg-red-700 text-white",children:"+ Create New Legal Hold"})})]})]})})]})]})})},Xze=({onSearch:e,onFiltersChange:t,recentSessions:n,onSessionSelect:r})=>{const[a,i]=b.useState(""),[o,l]=b.useState({agent:"all",operator:"all",facility:"all",dateRange:"24h",severity:"all"}),c=["Agent skipped step during Chlorine Check","Operator bypassed safety protocol in filtration","Compliance violation in water quality testing","Unusual response time in emergency procedure","Missing documentation in maintenance log"],u=()=>{e(a),console.log("Searching for:",a,"with filters:",o)},d=(m,p)=>{const v={...o,[m]:p};l(v),t(v)},f=m=>{i(m),e(m)};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Fh,{className:"h-5 w-5 text-blue-600"}),"Describe the Issue You're Investigating"]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Use natural language to describe what you're looking for. Our AI will find relevant sessions and patterns."})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx(_e,{value:a,onChange:m=>i(m.target.value),placeholder:"e.g., 'Agent skipped chlorine check in morning shift' or 'Operator took too long on filtration procedure'",className:"flex-1 text-lg p-6 border-2 border-blue-200 dark:border-blue-800 focus:border-blue-500",onKeyDown:m=>m.key==="Enter"&&u()}),s.jsx(Y,{onClick:u,size:"lg",className:"bg-blue-600 hover:bg-blue-700 px-8",children:s.jsx(Hm,{className:"h-4 w-4"})})]}
1497),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[s.jsxs(dt,{value:o.agent,onValueChange:m=>d("agent",m),children:[s.jsx(ot,{className:"h-10",children:s.jsx(ft,{placeholder:"Any Agent"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"all",children:"Any Agent"}),s.jsx(me,{value:"water-quality",children:"WaterQuality Assistant"}),s.jsx(me,{value:"maintenance",children:"Maintenance Assistant"}),s.jsx(me,{value:"compliance",children:"Compliance Monitor"}),s.jsx(me,{value:"emergency",children:"Emergency Response"})]})]}),s.jsxs(dt,{value:o.operator,onValueChange:m=>d("operator",m),children:[s.jsx(ot,{className:"h-10",children:s.jsx(ft,{placeholder:"Any Operator"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"all",children:"Any Operator"}),s.jsx(me,{value:"op-sarah-m",children:"Sarah M."}),s.jsx(me,{value:"op-mike-j",children:"Mike J."}),s.jsx(me,{value:"op-lisa-k",children:"Lisa K."}),s.jsx(me,{value:"op-david-r",children:"David R."})]})]}),s.jsxs(dt,{value:o.facility,onValueChange:m=>d("facility",m),children:[s.jsx(ot,{className:"h-10",children:s.jsx(ft,{placeholder:"Any Facility"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"all",children:"Any Facility"}),s.jsx(me,{value:"facility-north",children:"North Plant"}),s.jsx(me,{value:"facility-south",children:"South Plant"}),s.jsx(me,{value:"facility-east",children:"East Plant"}),s.jsx(me,{value:"facility-west",children:"West Plant"})]})]}),s.jsxs(dt,{value:o.dateRange,onValueChange:m=>d("dateRange",m),children:[s.jsx(ot,{className:"h-10",children:s.jsx(ft,{placeholder:"Time Range"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"1h",children:"Last Hour"}),s.jsx(me,{value:"24h",children:"Last 24 Hours"}),s.jsx(me,{value:"7d",children:"Last 7 Days"}),s.jsx(me,{value:"30d",children:"Last 30 Days"}),s.jsx(me,{value:"custom",children:"Custom Range"})]})]}),s.jsxs(dt,{value:o.severity,onValueChange:m=>d("severity",m),children:[s.jsx(ot,{className:"h-10",children:s.jsx(ft,{placeholder:"Any Severity"})}),s.jsxs(lt,{children:[s.jsx(me,{value:"all",children:"Any Severity"}),s.jsx(me,{value:"critical",children:"Critical"}),s.jsx(me,{value:"high",children:"High"}),s.jsx(me,{value:"medium",children:"Medium"}),s.jsx(me,{value:"low",children:"Low"})]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ws,{className:"h-4 w-4 text-blue-500"}),s.jsx("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:"Try these common scenarios:"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:c.map((m,p)=>s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>f(m),className:"text-xs hover:bg-blue-50 dark:hover:bg-blue-900/20 border-blue-200 dark:border-blue-800",children:m},p))})]})]})]}),a&&s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsx(we,{className:"text-lg",children:"Quick Results"})}),s.jsx(se,{children:s.jsx("div",{className:"space-y-3",children:n.slice(0,3).map(m=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer",onClick:()=>r(m),children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`w-3 h-3 rounded-full ${m.outcome==="success"?"bg-green-500":m.outcome==="warning"?"bg-yellow-500":"bg-red-500"}`}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium",children:m.agentName}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:[m.metadata.facility," • ",m.startTime.toLocaleTimeString()]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[m.flaggedIssues.length>0&&s.jsxs(le,{variant:"destructive",className:"text-xs",children:[m.flaggedIssues.length," issues"]}),s.jsxs(le,{variant:"outline",className:"text-xs",children:[m.duration,"m"]})]})]},m.id))})})]})]})},Qze=({sessions:e,searchQuery:t,filters:n,onSessionSelect:r})=>{const[a,i]=b.useState("timestamp"),[o,l]=b.useState("desc"),c=m=>{switch(m){case"success":return s.jsx(Pe,{className:"h-4 w-4 text-green-600"});case"warning":return s.jsx(ln,{className:"h-4 w-4 text-yellow-600"});case"error":return s.jsx(Ay,{className:"h-4 w-4 text-red-600"});default:return s.jsx(zn,{className:"h-4 w-4 text-gray-600"})}},u=m=>{switch(m.reduce((v,y)=>Math.max(v,{low:1,medium:2,high:3,critical:4}[y.severity]||0),0)){case 4:return"bg-red-100 text-red-800 border-red-200";case 3:return"bg-orange-100 text-orange-800 border-orange-200";case 2:return"bg-yellow-100 text-yellow-800 border-yellow-200";case 1:return"bg-blue-100 text-blue-800 border-blue-200";default:return"bg-gray-100 text-gray-800 border-gray-200"}},f=[...e.filter(m=>{var p;if(t){const v=t.toLowerCase(),y=m.agentName.toLowerCase().includes(v),x=(p=m.metadata.facility)==null?void 0:p.toLowerCase().includes(v),w=m.flaggedIssues.some(N=>N.description.toLowerCase().includes(v));if(!y&&!x&&!w)return!1}return!(n.agent!=="all"&&!m.agentName.toLowerCase().includes(n.agent)||n.facility!=="all"&&m.facilityId!==n.facility)})].sort((m,p)=>{let v=0;switch(a){case"timestamp":v=m.startTime.getTime()-p.startTime.getTime();break;case"duration":v=m.duration-p.duration;break;case"issues":v=m.flaggedIssues.length-p.flaggedIssues.length;break}return o==="desc"?-v:v});return s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(pr,{className:"h-5 w-5 text-blue-600"}),"Session Explorer"]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>i("timestamp"),children:[s.jsx(zn,{className:"h-4 w-4 mr-1"}),"Time"]}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>i("issues"),children:[s.jsx(ln,{className:"h-4 w-4 mr-1"}),"Issues"]})]})]}),s.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["Found ",f.length," sessions matching your criteria"]})]}),s.jsx(se,{children:s.jsx(js,{className:"h-96",children:s.jsxs("div",{className:"space-y-3",children:[f.map(m=>s.jsx("div",{className:"group border rounded-lg p-4 hover:bg-gray-50 dark:hover:bg-gray-800 cursor-pointer transition-all duration-200",onClick:()=>r(m),children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex items-start gap-3 flex-1",children:[c(m.outcome),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h4",{className:"font-medium text-gray-900 dark:text-gray-100 truncate",children:m.agentName}),s.jsx(le,{variant:"outline",className:"text-xs",children:m.sessionId})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400 mb-2",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(dl,{className:"h-3 w-3"}),m.metadata.facility]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(li,{className:"h-3 w-3"}),m.operatorId]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(zn,{className:"h-3 w-3"}),m.duration,"m"]})]}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500",children:m.startTime.toLocaleStr
1497ing()}),m.flaggedIssues.length>0&&s.jsxs("div",{className:"mt-2 space-y-1",children:[m.flaggedIssues.slice(0,2).map((p,v)=>s.jsxs("div",{className:"text-sm",children:[s.jsx(le,{variant:"outline",className:u(m.flaggedIssues),children:p.type.replace("_"," ")}),s.jsxs("span",{className:"ml-2 text-gray-600 dark:text-gray-400",children:[p.description.substring(0,80),"..."]})]},v)),m.flaggedIssues.length>2&&s.jsxs("p",{className:"text-xs text-gray-500",children:["+",m.flaggedIssues.length-2," more issues"]})]}),m.complianceViolations.length>0&&s.jsx("div",{className:"mt-2",children:s.jsxs(le,{variant:"destructive",className:"text-xs",children:[m.complianceViolations.length," compliance violations"]})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 ml-4",children:[s.jsx(Y,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(aw,{className:"h-4 w-4"})}),s.jsx(Bt,{className:"h-4 w-4 text-gray-400 opacity-0 group-hover:opacity-100 transition-opacity"})]})]})},m.id)),f.length===0&&s.jsxs("div",{className:"text-center py-8",children:[s.jsx(pr,{className:"h-12 w-12 text-gray-400 mx-auto mb-3"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"No sessions found matching your criteria"}),s.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 mt-1",children:"Try adjusting your search terms or filters"})]})]})})})]})},Zze=({session:e,onClose:t})=>{const[n,r]=b.useState(!1),[a,i]=b.useState(0),[o,l]=b.useState(1),c=[{id:"step-001",sequence:1,timestamp:new Date(e.startTime.getTime()),type:"user_input",content:"I need to perform the morning water quality check for the North Plant",flagged:!1,duration:2},{id:"step-002",sequence:2,timestamp:new Date(e.startTime.getTime()+2e3),type:"agent_response",content:"I'll guide you through the morning water quality check procedure. Let's start with the chlorine residual test. Have you collected your water sample from the distribution system?",flagged:!1,duration:3},{id:"step-003",sequence:3,timestamp:new Date(e.startTime.getTime()+5e3),type:"user_input",content:"Yes, I have the sample ready",flagged:!1,duration:1},{id:"step-004",sequence:4,timestamp:new Date(e.startTime.getTime()+6e3),type:"agent_response",content:"Perfect. Now please test the chlorine residual using your DPD test kit. The acceptable range is 0.5-2.0 mg/L. Please record the reading.",flagged:!1,duration:4},{id:"step-005",sequence:5,timestamp:new Date(e.startTime.getTime()+1e4),type:"user_input",content:"I'm running behind schedule, can we skip this and move to pH testing?",flagged:!0,flags:["skipped_step","compliance_violation"],duration:2},{id:"step-006",sequence:6,timestamp:new Date(e.startTime.getTime()+12e3),type:"agent_response",content:"⚠️ I cannot recommend skipping the chlorine residual test as it's required by EPA regulations (Section 141.74). This is a critical safety parameter. Please complete the test before proceeding.",flagged:!0,flags:["safety_warning"],duration:5},{id:"step-007",sequence:7,timestamp:new Date(e.startTime.getTime()+17e3),type:"user_input",content:"Fine, I'll mark it as 1.2 mg/L and move on",flagged:!0,flags:["unverified_data","compliance_risk"],duration:2}],u=p=>{switch(p){case"user_input":return s.jsx(li,{className:"h-4 w-4 text-blue-600"});case"agent_response":return s.jsx(so,{className:"h-4 w-4 text-purple-600"});case"tool_call":return s.jsx(Kt,{className:"h-4 w-4 text-green-600"});case"system_action":return s.jsx(Pe,{className:"h-4 w-4 text-gray-600"});default:return s.jsx(di,{className:"h-4 w-4 text-gray-600"})}},d=(p=[])=>p.includes("compliance_violation")||p.includes("safety_risk")?"critical":p.includes("skipped_step")||p.includes("compliance_risk")?"high":p.includes("unverified_data")||p.includes("safety_warning")?"medium":"low",f=p=>{console.log("Marking step as reviewed:",p)},m=p=>{console.log("Adding step pattern to tracker:",p)};return s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Vr,{className:"h-5 w-5 text-blue-600"}),"Session Playback: ",e.sessionId]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:t,children:s.jsx(jr,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-600 dark:text-gray-400",children:[s.jsx("span",{children:e.agentName}),s.jsx("span",{children:"•"}),s.jsx("span",{children:e.metadata.facility}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:[e.duration,"m duration"]}),s.jsx("span",{children:"•"}),s.jsxs("span",{children:[e.flaggedIssues.length," issues"]})]})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>r(!n),children:n?s.jsx(cw,{className:"h-4 w-4"}):s.jsx(Vr,{className:"h-4 w-4"})}),s.jsx(Y,{variant:"outline",size:"sm",children:s.jsx(xje,{className:"h-4 w-4"})}),s.jsx(Y,{variant:"outline",size:"sm",children:s.jsx(yje,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm",children:"Speed:"}),[.5,1,1.5,2].map(p=>s.jsxs(Y,{variant:o===p?"default":"outline",size:"sm",onClick:()=>l(p),className:"w-12",children:[p,"x"]},p))]})]}),s.jsx(js,{className:"h-96",children:s.jsx("div",{className:"space-y-4",children:c.map((p,v)=>s.jsxs("div",{className:`relative border-l-4 pl-6 pb-4 ${p.flagged?"border-l-red-400 bg-red-50 dark:bg-red-900/10":"border-l-gray-200 dark:border-l-gray-700"}`,children:[s.jsx("div",{className:`absolute -left-2 top-0 w-4 h-4 rounded-full border-2 ${p.flagged?"bg-red-400 border-red-400":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600"}`}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[u(p.type),s.jsx("span",{className:"text-sm font-medium",children:p.type.replace("_"," ").toUpperCase()}),s.jsxs(le,{variant:"outline",className:"text-xs",children:["Step ",p.sequence]}),s.jsx("span",{className:"text-xs text-gray-500",children:p.timestamp.toLocaleTimeString()})]}),p.flagged&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fX,{className:"h-4 w-4 text-red-500"}),s.jsx(le,{variant:"destructive",className:"text-xs",children:d(p.flags).toUpperCase()})]})]}),s.jsxs("div",{className:`p-3 rounded-lg ${p.type==="user_input"?"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800":"bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700"}`,children:[s.jsx("p",{className:"text-sm",children:p.content}),p.flagged&&p.flags&&s.jsxs("div",{className:"mt-2 space-y-1",children:[s.jsx("p",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:"Flagged Issues:"}),s.jsx("div",{className:"flex flex-wrap gap-1",children:p.flags.map((y,x)=>s.jsx(le,{variant:"outline",className:"text-xs bg-red-50 text-red-700 border-red-200",children:y.replace("_"," ")},x))})]})]}),p.flagged&&s.jsxs("div",{className:"flex gap-2 mt-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>f(p.id),children:[s.jsx(Pe,{className:"h-3 w-3 mr-1"}),"Mark Reviewed"]}),s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>m(p.id),children:[s.jsx(Hwe,{className:"h-3 w-3 mr-1"}),"Add to Tracker"]})]})]})]}
1497,p.id))})}),s.jsxs("div",{className:"border-t pt-4",children:[s.jsx("h4",{className:"font-medium mb-2",children:"Session Summary"}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Duration:"}),s.jsxs("span",{className:"ml-2 font-medium",children:[e.duration," minutes"]})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Steps:"}),s.jsx("span",{className:"ml-2 font-medium",children:c.length})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Flagged Issues:"}),s.jsx("span",{className:"ml-2 font-medium text-red-600",children:e.flaggedIssues.length})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"Outcome:"}),s.jsx(le,{variant:e.outcome==="success"?"default":"destructive",className:"ml-2",children:e.outcome})]})]})]})]})]})},Jze=({patterns:e,flaggedIssues:t})=>{const[n,r]=b.useState("patterns"),[a,i]=b.useState(!1),[o,l]=b.useState(""),c=[{id:"rule-001",name:"Chlorine Check Violations",description:"Alert when operators skip chlorine residual checks more than 2 times in 24 hours",patternId:"pattern-001",conditions:[{field:"step_type",operator:"contains",value:"chlorine"},{field:"flagged",operator:"equals",value:!0}],thresholds:{occurrences:2,timeWindow:24,severity:"high"},notifications:[{type:"email",target:"[email protected]",enabled:!0},{type:"dashboard",target:"main",enabled:!0}],status:"active",createdAt:new Date(Date.now()-1e3*60*60*24*7),lastTriggered:new Date(Date.now()-1e3*60*60*2)},{id:"rule-002",name:"Safety Protocol Bypasses",description:"Monitor for attempts to bypass safety protocols in emergency procedures",patternId:"pattern-002",conditions:[{field:"content",operator:"contains",value:"bypass"},{field:"safety_risk",operator:"equals",value:!0}],thresholds:{occurrences:1,timeWindow:1,severity:"critical"},notifications:[{type:"email",target:"[email protected]",enabled:!0},{type:"slack",target:"#safety-alerts",enabled:!0},{type:"dashboard",target:"main",enabled:!0}],status:"active",createdAt:new Date(Date.now()-1e3*60*60*24*14)}],u=p=>{const v={low:"bg-blue-50 text-blue-700 border-blue-200",medium:"bg-yellow-50 text-yellow-700 border-yellow-200",high:"bg-orange-50 text-orange-700 border-orange-200",critical:"bg-red-50 text-red-700 border-red-200"};return v[p]||v.low},d=p=>{switch(p){case"active":return s.jsx(Vr,{className:"h-4 w-4 text-green-600"});case"paused":return s.jsx(cw,{className:"h-4 w-4 text-yellow-600"});case"resolved":return s.jsx(pr,{className:"h-4 w-4 text-gray-600"});default:return s.jsx(Kt,{className:"h-4 w-4 text-gray-600"})}},f=p=>{switch(p){case"email":return s.jsx(Aa,{className:"h-3 w-3"});case"slack":return s.jsx(vje,{className:"h-3 w-3"});case"dashboard":return s.jsx(sw,{className:"h-3 w-3"});default:return s.jsx(sw,{className:"h-3 w-3"})}},m=()=>{o.trim()&&(console.log("Creating new tracking rule:",o),l(""),i(!1))};return s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsxs(xe,{children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-5 w-5 text-purple-600"}),"Issue Tracker & Automation"]}),s.jsxs(Y,{onClick:()=>i(!0),size:"sm",className:"bg-purple-600 hover:bg-purple-700",children:[s.jsx(Fn,{className:"h-4 w-4 mr-2"}),"New Rule"]})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track patterns and automate alerts for continuous improvement"})]}),s.jsxs(se,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-200 dark:border-gray-700",children:[s.jsxs(Y,{variant:n==="patterns"?"default":"ghost",size:"sm",onClick:()=>r("patterns"),children:["Patterns (",e.length,")"]}),s.jsxs(Y,{variant:n==="rules"?"default":"ghost",size:"sm",onClick:()=>r("rules"),children:["Rules (",c.length,")"]})]}),n==="patterns"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"font-medium",children:"Discovered Patterns"}),s.jsxs(le,{variant:"outline",className:"text-xs",children:[e.filter(p=>p.isActive).length," active"]})]}),s.jsx(js,{className:"h-64",children:s.jsx("div",{className:"space-y-3",children:e.map(p=>s.jsxs("div",{className:"border rounded-lg p-3",children:[s.jsx("div",{className:"flex items-start justify-between mb-2",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h5",{className:"font-medium",children:p.name}),s.jsx(le,{variant:"outline",className:u(p.severity),children:p.severity})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:p.description}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[s.jsxs("span",{children:[p.occurrences," occurrences"]}),s.jsxs("span",{children:["Last seen: ",p.lastSeen.toLocaleDateString()]})]})]})}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(le,{variant:p.isActive?"default":"secondary",className:"text-xs",children:p.isActive?"Active":"Inactive"}),s.jsxs("span",{className:"text-xs text-gray-500",children:[p.trackingRules.length," rules"]})]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(Fn,{className:"h-3 w-3 mr-1"}),"Create Rule"]})]})]}
1497,p.id))})})]}),n==="rules"&&s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"font-medium",children:"Tracking Rules"}),s.jsxs(le,{variant:"outline",className:"text-xs",children:[c.filter(p=>p.status==="active").length," active"]})]}),a&&s.jsxs("div",{className:"border rounded-lg p-3 bg-blue-50 dark:bg-blue-900/20",children:[s.jsx("h5",{className:"font-medium mb-2",children:"Create New Tracking Rule"}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(_e,{value:o,onChange:p=>l(p.target.value),placeholder:"Rule name (e.g., 'Repeated Safety Violations')",className:"mb-2"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Y,{onClick:m,size:"sm",children:"Create Rule"}),s.jsx(Y,{variant:"outline",size:"sm",onClick:()=>i(!1),children:"Cancel"})]})]})]}),s.jsx(js,{className:"h-64",children:s.jsx("div",{className:"space-y-3",children:c.map(p=>s.jsxs("div",{className:"border rounded-lg p-3",children:[s.jsx("div",{className:"flex items-start justify-between mb-2",children:s.jsxs("div",{className:"flex items-start gap-2",children:[d(p.status),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h5",{className:"font-medium",children:p.name}),s.jsx(le,{variant:"outline",className:u(p.thresholds.severity),children:p.thresholds.severity})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:p.description})]})]})}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[s.jsxs("span",{children:["Threshold: ",p.thresholds.occurrences," times in ",p.thresholds.timeWindow,"h"]}),p.lastTriggered&&s.jsxs("span",{children:["Last triggered: ",p.lastTriggered.toLocaleDateString()]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-gray-500",children:"Notifications:"}),p.notifications.filter(v=>v.enabled).map((v,y)=>s.jsxs("div",{className:"flex items-center gap-1",children:[f(v.type),s.jsx("span",{className:"text-xs",children:v.type})]},y))]})]}),s.jsxs("div",{className:"flex items-center justify-between mt-2 pt-2 border-t border-gray-200 dark:border-gray-700",children:[s.jsx(le,{variant:p.status==="active"?"default":"secondary",className:"text-xs",children:p.status.toUpperCase()}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Y,{variant:"outline",size:"sm",children:s.jsx(Kt,{className:"h-3 w-3"})}),s.jsx(Y,{variant:"outline",size:"sm",children:p.status==="active"?s.jsx(cw,{className:"h-3 w-3"}):s.jsx(Vr,{className:"h-3 w-3"})})]})]})]},p.id))})})]}),s.jsx("div",{className:"border-t pt-4",children:s.jsxs("div",{className:"grid grid-cols-3 gap-4 text-sm",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-lg font-bold text-purple-600",children:t.length}),s.jsx("div",{className:"text-xs text-gray-500",children:"Issues Today"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-lg font-bold text-blue-600",children:c.filter(p=>p.status==="active").length}),s.jsx("div",{className:"text-xs text-gray-500",children:"Active Rules"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-lg font-bold text-green-600",children:"94%"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Detection Rate"})]})]})})]})]})};var yC,yB;function ia(){if(yB)return yC;yB=1;var e=Array.isArray;return yC=e,yC}var vC,vB;function $se(){if(vB)return vC;vB=1;var e=typeof hv=="object"&&hv&&hv.Object===Object&&hv;return vC=e,vC}var bC,bB;function No(){if(bB)return bC;bB=1;var e=$se(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return bC=n,bC}var wC,wB;function Yy(){if(wB)return wC;wB=1;var e=No(),t=e.Symbol;return wC=t,wC}var jC,jB;function eBe(){if(jB)return jC;jB=1;var e=Yy(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,a=e?e.toStringTag:void 0;function i(o){var l=n.call(o,a),c=o[a];try{o[a]=void 0;var u=!0}catch{}var d=r.call(o);return u&&(l?o[a]=c:delete o[a]),d}return jC=i,jC}var NC,NB;function tBe(){if(NB)return NC;NB=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return NC=n,NC}var SC,SB;function Sl(){if(SB)return SC;SB=1;
vendor: 7,727 bytes, line 1497
1497var e=Yy(),t=eBe(),n=tBe(),r="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:r:i&&i in Object(l)?t(l):n(l)}return SC=o,SC}var kC,kB;function kl(){if(kB)return kC;kB=1;function e(t){return t!=null&&typeof t=="object"}return kC=e,kC}var CC,CB;function Zm(){if(CB)return CC;CB=1;var e=Sl(),t=kl(),n="[object Symbol]";function r(a){return typeof a=="symbol"||t(a)&&e(a)==n}return CC=r,CC}var _C,_B;function e3(){if(_B)return _C;_B=1;var e=ia(),t=Zm(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function a(i,o){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||o!=null&&i in Object(o)}return _C=a,_C}var AC,AB;function Yc(){if(AB)return AC;AB=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return AC=e,AC}var EC,EB;function t3(){if(EB)return EC;EB=1;var e=Sl(),t=Yc(),n="[object AsyncFunction]",r="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==r||c==a||c==n||c==i}return EC=o,EC}var PC,PB;function nBe(){if(PB)return PC;PB=1;var e=No(),t=e["__core-js_shared__"];return PC=t,PC}var TC,TB;function rBe(){if(TB)return TC;TB=1;var e=nBe(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return TC=n,TC}var IC,IB;function Fse(){if(IB)return IC;IB=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return IC=n,IC}var OC,OB;function sBe(){if(OB)return OC;OB=1;var e=t3(),t=rBe(),n=Yc(),r=Fse(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,u=l.hasOwnProperty,d=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(m){if(!n(m)||t(m))return!1;var p=e(m)?d:i;return p.test(r(m))}return OC=f,OC}var MC,MB;function aBe(){if(MB)return MC;MB=1;function e(t,n){return t==null?void 0:t[n]}return MC=e,MC}var RC,RB;function qd(){if(RB)return RC;RB=1;var e=sBe(),t=aBe();function n(r,a){var i=t(r,a);return e(i)?i:void 0}return RC=n,RC}var DC,DB;function lN(){if(DB)return DC;DB=1;var e=qd(),t=e(Object,"create");return DC=t,DC}var LC,LB;function iBe(){if(LB)return LC;LB=1;var e=lN();function t(){this.__data__=e?e(null):{},this.size=0}return LC=t,LC}var $C,$B;function oBe(){if($B)return $C;$B=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return $C=e,$C}var FC,FB;function lBe(){if(FB)return FC;FB=1;var e=lN(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function a(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return r.call(o,i)?o[i]:void 0}return FC=a,FC}var zC,zB;function cBe(){if(zB)return zC;zB=1;var e=lN(),t=Object.prototype,n=t.hasOwnProperty;function r(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return zC=r,zC}var BC,BB;function uBe(){if(BB)return BC;BB=1;var e=lN(),t="__lodash_hash_undefined__";function n(r,a){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&a===void 0?t:a,this}return BC=n,BC}var UC,UB;function dBe(){if(UB)return UC;UB=1;var e=iBe(),t=oBe(),n=lBe(),r=cBe(),a=uBe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,UC=i,UC}var HC,HB;function fBe(){if(HB)return HC;HB=1;function e(){this.__data__=[],this.size=0}return HC=e,HC}var qC,qB;function n3(){if(qB)return qC;qB=1;function e(t,n){return t===n||t!==t&&n!==n}return qC=e,qC}var VC,VB;function cN(){if(VB)return VC;VB=1;var e=n3();function t(n,r){for(var a=n.length;a--;)if(e(n[a][0],r))return a;return-1}return VC=t,VC}var WC,WB;function hBe(){if(WB)return WC;WB=1;var e=cN(),t=Array.prototype,n=t.splice;function r(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():n.call(i,o,1),--this.size,!0}return WC=r,WC}var GC,GB;function mBe(){if(GB)return GC;GB=1;var e=cN();function t(n){var r=this.__data__,a=e(r,n);return a<0?void 0:r[a][1]}return GC=t,GC}var KC,KB;function pBe(){if(KB)return KC;KB=1;var e=cN();function t(n){return e(this.__data__,n)>-1}return KC=t,KC}var YC,YB;function gBe(){if(YB)return YC;YB=1;var e=cN();function t(n,r){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return YC=t,YC}var XC,XB;function uN(){if(XB)return XC;XB=1;var e=fBe(),t=hBe(),n=mBe(),r=pBe(),a=gBe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,XC=i,XC}var QC,QB;function r3(){if(QB)return QC;QB=1;var e=qd(),t=No(),n=e(t,"Map");return QC=n,QC}var ZC,ZB;function xBe(){if(ZB)return ZC;ZB=1;var e=dBe(),t=uN(),n=r3();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return ZC=r,ZC}var JC,JB;function yBe(){if(JB)return JC;JB=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return JC=e,JC}var e_,e9;function dN(){if(e9)return e_;e9=1;var e=yBe();function t(n,r){var a=n.__data__;return e(r)?a[typeof r=="string"?"string":"hash"]:a.map}return e_=t,e_}var t_,t9;function vBe(){if(t9)return t_;t9=1;var e=dN();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return t_=t,t_}var n_,n9;function bBe(){if(n9)return n_;n9=1;var e=dN();function t(n){return e(this,n).get(n)}return n_=t,n_}var r_,r9;function wBe(){if(r9)return r_;r9=1;var e=dN();function t(n){return e(this,n).has(n)}return r_=t,r_}var s_,s9;function jBe(){if(s9)return s_;s9=1;var e=dN();function t(n,r){var a=e(this,n),i=a.size;return a.set(n,r),this.size+=a.size==i?0:1,this}return s_=t,s_}var a_,a9;function s3(){if(a9)return a_;a9=1;var e=xBe(),t=vBe(),n=bBe(),r=wBe(),a=jBe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=a,a_=i,a_}var i_,i9;function zse(){if(i9)return i_;i9=1;var e=s3(),t="Expected a function";function n(r,a){if(typeof r!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var o=arguments,l=a?a.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var u=r.apply(this,o);return i.cache=c.set(l,u)||c,u};return i.cache=new(n.Cache||e),i}return n.Cache=e,i_=n,i_}var o_,o9;function NBe(){if(o9)return o_;o9=1;var e=zse(),t=500;function n(r){var a=e(r,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return o_=n,o_}var l_,l9;function SBe(){if(l9)return l_;l9=1;var e=NBe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(o,l,c,u){i.push(c?u.replace(n,"$1"):l||o)}),i});return l_=r,l_}var c_,c9;function a3(){if(c9)return c_;c9=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=n(t[r],r,t);return i}return c_=e,c_}var u_,u9;function kBe(){if(u9)return u_;u9=1;var e=Yy(),t=a3(),n=ia(),r=Zm(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return u_=o,u_}var d_,d9;function Bse(){if(d9)return d_;d9=1;var e=kBe();function t(n){return n==null?"":e(n)}return d_=t,d_}var f_,f9;function Use(){if(f9)return f_;f9=1;
vendor: 9,385 bytes, lines 1497-1505
1497var e=ia(),t=e3(),n=SBe(),r=Bse();function a(i,o){return e(i)?i:t(i,o)?[i]:n(r(i))}return f_=a,f_}var h_,h9;function fN(){if(h9)return h_;h9=1;var e=Zm();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return h_=t,h_}var m_,m9;function i3(){if(m9)return m_;m9=1;var e=Use(),t=fN();function n(r,a){a=e(a,r);for(var i=0,o=a.length;r!=null&&i<o;)r=r[t(a[i++])];return i&&i==o?r:void 0}return m_=n,m_}var p_,p9;function Hse(){if(p9)return p_;p9=1;var e=i3();function t(n,r,a){var i=n==null?void 0:e(n,r);return i===void 0?a:i}return p_=t,p_}var CBe=Hse();const Ca=tn(CBe);var g_,g9;function _Be(){if(g9)return g_;g9=1;function e(t){return t==null}return g_=e,g_}var ABe=_Be();const Tt=tn(ABe);var x_,x9;function EBe(){if(x9)return x_;x9=1;var e=Sl(),t=ia(),n=kl(),r="[object String]";function a(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return x_=a,x_}var PBe=EBe();const wd=tn(PBe);var TBe=t3();const Ct=tn(TBe);var IBe=Yc();const Jm=tn(IBe);var y_={exports:{}},dn={};/**
1498 * @license React
1499 * react-is.production.min.js
1500 *
1501 * Copyright (c) Facebook, Inc. and its affiliates.
1502 *
1503 * This source code is licensed under the MIT license found in the
1504 * LICENSE file in the root directory of this source tree.
1505 */var y9;function OBe(){if(y9)return dn;y9=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function y(x){if(typeof x=="object"&&x!==null){var w=x.$$typeof;switch(w){case e:switch(x=x.type,x){case n:case a:case r:case u:case d:return x;default:switch(x=x&&x.$$typeof,x){case l:case o:case c:case m:case f:case i:return x;default:return w}}case t:return w}}}return dn.ContextConsumer=o,dn.ContextProvider=i,dn.Element=e,dn.ForwardRef=c,dn.Fragment=n,dn.Lazy=m,dn.Memo=f,dn.Portal=t,dn.Profiler=a,dn.StrictMode=r,dn.Suspense=u,dn.SuspenseList=d,dn.isAsyncMode=function(){return!1},dn.isConcurrentMode=function(){return!1},dn.isContextConsumer=function(x){return y(x)===o},dn.isContextProvider=function(x){return y(x)===i},dn.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},dn.isForwardRef=function(x){return y(x)===c},dn.isFragment=function(x){return y(x)===n},dn.isLazy=function(x){return y(x)===m},dn.isMemo=function(x){return y(x)===f},dn.isPortal=function(x){return y(x)===t},dn.isProfiler=function(x){return y(x)===a},dn.isStrictMode=function(x){return y(x)===r},dn.isSuspense=function(x){return y(x)===u},dn.isSuspenseList=function(x){return y(x)===d},dn.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===a||x===r||x===u||x===d||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===f||x.$$typeof===i||x.$$typeof===o||x.$$typeof===c||x.$$typeof===v||x.getModuleId!==void 0)},dn.typeOf=y,dn}var v9;function MBe(){return v9||(v9=1,y_.exports=OBe()),y_.exports}var RBe=MBe(),v_,b9;function qse(){if(b9)return v_;b9=1;var e=Sl(),t=kl(),n="[object Number]";function r(a){return typeof a=="number"||t(a)&&e(a)==n}return v_=r,v_}var b_,w9;function DBe(){if(w9)return b_;w9=1;var e=qse();function t(n){return e(n)&&n!=+n}return b_=t,b_}var LBe=DBe();const Xy=tn(LBe);var $Be=qse();const FBe=tn($Be);var Ts=function(t){return t===0?0:t>0?1:-1},Tu=function(t){return wd(t)&&t.indexOf("%")===t.length-1},ze=function(t){return FBe(t)&&!Xy(t)},zBe=function(t){return Tt(t)},Or=function(t){return ze(t)||wd(t)},BBe=0,ep=function(t){var n=++BBe;return"".concat(t||"").concat(n)},Is=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ze(t)&&!wd(t))return r;var i;if(Tu(t)){var o=t.indexOf("%");i=n*parseFloat(t.slice(0,o))/100}else i=+t;return Xy(i)&&(i=r),a&&i>n&&(i=n),i},lc=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},UBe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},a=0;a<n;a++)if(!r[t[a]])r[t[a]]=!0;else return!0;return!1},ba=function(t,n){return ze(t)&&ze(n)?function(r){return t+r*(n-t)}:function(){return n}};function zw(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Ca(r,t))===n})}var HBe=function(t,n){return ze(t)&&ze(n)?t-n:wd(t)&&wd(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function dh(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 T4(e){"@babel/helpers - typeof";return T4=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},T4(e)}var qBe=["viewBox","children"],VBe=["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"],j9=["points","pathLength"],w_={svg:qBe,polygon:j9,polyline:j9},o3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
1505ocus","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"],Bw=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(b.isValidElement(t)&&(r=t.props),!Jm(r))return null;var a={};return Object.keys(r).forEach(function(i){o3.includes(i)&&(a[i]=n||function(o){return r[i](r,o)})}),a},WBe=function(t,n,r){return function(a){return t(n,r,a),null}},jd=function(t,n,r){if(!Jm(t)||T4(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];o3.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=WBe(o,n,r))}),a},GBe=["children"],KBe=["children"];function N9(e,t){if(e==null)return{};var n=YBe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YBe(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 I4(e){"@babel/helpers - typeof";return I4=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},I4(e)}var S9={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"}
vendor: 4,411 bytes, line 1505
1505,nl=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},k9=null,j_=null,l3=function e(t){if(t===k9&&Array.isArray(j_))return j_;var n=[];return b.Children.forEach(t,function(r){Tt(r)||(RBe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),j_=n,k9=t,n};function _a(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(a){return nl(a)}):r=[nl(t)],l3(e).forEach(function(a){var i=Ca(a,"type.displayName")||Ca(a,"type.name");r.indexOf(i)!==-1&&n.push(a)}),n}function ya(e,t){var n=_a(e,t);return n&&n[0]}var C9=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,a=n.height;return!(!ze(r)||r<=0||!ze(a)||a<=0)},XBe=["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"],QBe=function(t){return t&&t.type&&wd(t.type)&&XBe.indexOf(t.type)>=0},ZBe=function(t){return t&&I4(t)==="object"&&"clipDot"in t},JBe=function(t,n,r,a){var i,o=(i=w_==null?void 0:w_[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!Ct(t)&&(a&&o.includes(n)||VBe.includes(n))||r&&o3.includes(n)},mt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(b.isValidElement(t)&&(a=t.props),!Jm(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;JBe((l=a)===null||l===void 0?void 0:l[o],o,n,r)&&(i[o]=a[o])}),i},O4=function e(t,n){if(t===n)return!0;var r=b.Children.count(t);if(r!==b.Children.count(n))return!1;if(r===0)return!0;if(r===1)return _9(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<r;a++){var i=t[a],o=n[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!_9(i,o))return!1}return!0},_9=function(t,n){if(Tt(t)&&Tt(n))return!0;if(!Tt(t)&&!Tt(n)){var r=t.props||{},a=r.children,i=N9(r,GBe),o=n.props||{},l=o.children,c=N9(o,KBe);return a&&l?dh(i,c)&&O4(a,l):!a&&!l?dh(i,c):!1}return!1},A9=function(t,n){var r=[],a={};return l3(t).forEach(function(i,o){if(QBe(i))r.push(i);else if(i){var l=nl(i.type),c=n[l]||{},u=c.handler,d=c.once;if(u&&(!d||!a[l])){var f=u(i,l,o);r.push(f),a[l]=!0}}}),r},e9e=function(t){var n=t&&t.type;return n&&S9[n]?S9[n]:null},t9e=function(t,n){return l3(n).indexOf(t)},n9e=["children","width","height","viewBox","className","style","title","desc"];function M4(){return M4=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},M4.apply(this,arguments)}function r9e(e,t){if(e==null)return{};var n=s9e(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s9e(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 R4(e){var t=e.children,n=e.width,r=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=r9e(e,n9e),d=a||{width:n,height:r,x:0,y:0},f=Mt("recharts-surface",i);return X.createElement("svg",M4({},mt(u,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),X.createElement("title",null,l),X.createElement("desc",null,c),t)}var a9e=["children","className"];function D4(){return D4=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},D4.apply(this,arguments)}function i9e(e,t){if(e==null)return{};var n=o9e(e,t),r,a;
1505if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function o9e(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 sn=X.forwardRef(function(e,t){var n=e.children,r=e.className,a=i9e(e,a9e),i=Mt("recharts-layer",r);return X.createElement("g",D4({className:i},mt(a,!0),{ref:t}),n)}),Ri=function(t,n){for(var r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i]},N_,E9;function l9e(){if(E9)return N_;E9=1;function e(t,n,r){var a=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(i);++a<i;)o[a]=t[a+n];return o}return N_=e,N_}var S_,P9;function c9e(){if(P9)return S_;P9=1;var e=l9e();function t(n,r,a){var i=n.length;return a=a===void 0?i:a,!r&&a>=i?n:e(n,r,a)}return S_=t,S_}var k_,T9;function Vse(){if(T9)return k_;T9=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+a+i+"]");function c(u){return l.test(u)}return k_=c,k_}var C_,I9;function u9e(){if(I9)return C_;I9=1;function e(t){return t.split("")}return C_=e,C_}var __,O9;function d9e(){if(O9)return __;O9=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",a=t+n+r,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",v=u+"?",y="["+i+"]?",x="(?:"+p+"(?:"+[d,f,m].join("|")+")"+y+v+")*",w=y+v+x,N="(?:"+[d+l+"?",l,f,m,o].join("|")+")",S=RegExp(c+"(?="+c+")|"+N+w,"g");function _(k){return k.match(S)||[]}return __=_,__}var A_,M9;function f9e(){if(M9)return A_;M9=1;var e=u9e(),t=Vse(),n=d9e();function r(a){return t(a)?n(a):e(a)}return A_=r,A_}var E_,R9;function h9e(){if(R9)return E_;R9=1;var e=c9e(),t=Vse(),n=f9e(),r=Bse();function a(i){return function(o){o=r(o);var l=t(o)?n(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[i]()+u}}return E_=a,E_}var P_,D9;function m9e(){if(D9)return P_;D9=1;var e=h9e(),t=e("toUpperCase");return P_=t,P_}var p9e=m9e();const hN=tn(p9e);function In(e){return function(){return e}}const Wse=Math.cos,Uw=Math.sin,zi=Math.sqrt,Hw=Math.PI,mN=2*Hw,L4=Math.PI,$4=2*L4,ku=1e-6,g9e=$4-ku;function Gse(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function x9e(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Gse;const n=10**t;return function(r){this._+=r[0];for(let a=1,i=r.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+r[a]}}class y9e{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Gse:x9e(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,a){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+a}`}bezierCurveTo(t,n,r,a,i,o){this._append`C${+t},${+n},${+r},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,n,r,a,i){if(t=+t,n=+n,r=+r,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=r-t,u=a-n,d=o-t,f=l-n,m=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>ku)if(!(Math.abs(f*c-u*d)>ku)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-o,v=a-l,y=c*c+u*u,x=p*p+v*v,w=Math.sqrt(y),N=Math.sqrt(m),S=i*Math.tan((L4-Math.acos((y+m-x)/(2*w*N)))/2),_=S/N,k=S/w;Math.abs(_-1)>ku&&this._append`L${t+_*d},${n+_*f}`,this._append`A${i},${i},0,0,${+(f*p>d*v)},${this._x1=t+k*c},${this._y1=n+k*u}`}}arc(t,n,r,a,i,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(a),c=r*Math.sin(a),u=t+l,d=n+c,f=1^o,m=o?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>ku||Math.abs(this._y1-d)>ku)&&this._append`L${u},${d}`,r&&(m<0&&(m=m%$4+$4),m>g9e?this._append`A${r},${r},0,1,${f},${t-l},${n-c}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:m>ku&&this._append`A${r},${r},0,${+(m>=L4)},${f},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+a}h${-r}Z`}toString(){return this._}}function c3(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 y9e(t)}function u3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Kse(e){this._context=e}Kse.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 pN(e){return new Kse(e)}function Yse(e){return e[0]}function Xse(e){return e[1]}function Qse(e,t){var n=In(!0),r=null,a=pN,i=null,o=c3(l);e=typeof e=="function"?e:e===void 0?Yse:In(e),t=typeof t=="function"?t:t===void 0?Xse:In(t);function l(c){var u,d=(c=u3(c)).length,f,m=!1,p;for(r==null&&(i=a(p=o())),u=0;u<=d;++u)!(u<d&&n(f=c[u],u,c))===m&&((m=!m)?i.lineStart():i.lineEnd()),m&&i.point(+e(f,u,c),+t(f,u,c));if(p)return i=null,p+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:In(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:In(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:In(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,r!=null&&(i=a(r)),l):a},l.context=function(c){return arguments.length?(c==null?r=i=null:i=a(r=c),l):r},l}function lb(e,t,n){var r=null,a=In(!0),i=null,o=pN,l=null,c=c3(u);e=typeof e=="function"?e:e===void 0?Yse:In(+e),t=typeof t=="function"?t:In(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Xse:In(+n);function u(f){var m,p,v,y=(f=u3(f)).length,x,w=!1,N,S=new Array(y),_=new Array(y);for(i==null&&(l=o(N=c())),m=0;m<=y;++m){if(!(m<y&&a(x=f[m],m,f))===w)if(w=!w)p=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),v=m-1;v>=p;--v)l.point(S[v],_[v]);l.lineEnd(),l.areaEnd()}w&&(S[m]=+e(x,m,f),_[m]=+t(x,m,f),l.point(r?+r(x,m,f):S[m],n?+n(x,m,f):_[m]))}if(N)return l=null,N+""||null}function d(){return Qse().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:In(+f),r=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:In(+f),u):e},u.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:In(+f),u):r},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:In(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:In(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:In(+f),u):n},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(n)},u.lineX1=function(){return d().x(r).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:In(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(l=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=l=null:l=o(i=f),u):i},u}class Zse{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}
vendor: 8,474 bytes, line 1505
1505point(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 v9e(e){return new Zse(e,!0)}function b9e(e){return new Zse(e,!1)}const d3={draw(e,t){const n=zi(t/Hw);e.moveTo(n,0),e.arc(0,0,n,0,mN)}},w9e={draw(e,t){const n=zi(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()}},Jse=zi(1/3),j9e=Jse*2,N9e={draw(e,t){const n=zi(t/j9e),r=n*Jse;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},S9e={draw(e,t){const n=zi(t),r=-n/2;e.rect(r,r,n,n)}},k9e=.8908130915292852,eae=Uw(Hw/10)/Uw(7*Hw/10),C9e=Uw(mN/10)*eae,_9e=-Wse(mN/10)*eae,A9e={draw(e,t){const n=zi(t*k9e),r=C9e*n,a=_9e*n;e.moveTo(0,-n),e.lineTo(r,a);for(let i=1;i<5;++i){const o=mN*i/5,l=Wse(o),c=Uw(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*a,c*r+l*a)}e.closePath()}},T_=zi(3),E9e={draw(e,t){const n=-zi(t/(T_*3));e.moveTo(0,n*2),e.lineTo(-T_*n,-n),e.lineTo(T_*n,-n),e.closePath()}},Fa=-.5,za=zi(3)/2,F4=1/zi(12),P9e=(F4/2+1)*3,T9e={draw(e,t){const n=zi(t/P9e),r=n/2,a=n*F4,i=r,o=n*F4+n,l=-i,c=o;e.moveTo(r,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(Fa*r-za*a,za*r+Fa*a),e.lineTo(Fa*i-za*o,za*i+Fa*o),e.lineTo(Fa*l-za*c,za*l+Fa*c),e.lineTo(Fa*r+za*a,Fa*a-za*r),e.lineTo(Fa*i+za*o,Fa*o-za*i),e.lineTo(Fa*l+za*c,Fa*c-za*l),e.closePath()}};function I9e(e,t){let n=null,r=c3(a);e=typeof e=="function"?e:In(e||d3),t=typeof t=="function"?t:In(t===void 0?64:+t);function a(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:In(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:In(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function qw(){}function Vw(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 tae(e){this._context=e}tae.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:Vw(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:Vw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function O9e(e){return new tae(e)}function nae(e){this._context=e}nae.prototype={areaStart:qw,areaEnd:qw,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:Vw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M9e(e){return new nae(e)}function rae(e){this._context=e}rae.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:Vw(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function R9e(e){return new rae(e)}function sae(e){this._context=e}sae.prototype={areaStart:qw,areaEnd:qw,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 D9e(e){return new sae(e)}function L9(e){return e<0?-1:1}function $9(e,t,n){var r=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(r||a<0&&-0),o=(n-e._y1)/(a||r<0&&-0),l=(i*a+o*r)/(r+a);return(L9(i)+L9(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function F9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function I_(e,t,n){var r=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-r)/3;e._context.bezierCurveTo(r+l,a+l*t,i-l,o-l*n,i,o)}function Ww(e){this._context=e}Ww.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:I_(this,this._t0,F9(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,I_(this,F9(this,n=$9(this,e,t)),n);break;default:I_(this,this._t0,n=$9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function aae(e){this._context=new iae(e)}(aae.prototype=Object.create(Ww.prototype)).point=function(e,t){Ww.prototype.point.call(this,t,e)};function iae(e){this._context=e}iae.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,a,i){this._context.bezierCurveTo(t,e,r,n,i,a)}};function L9e(e){return new Ww(e)}function $9e(e){return new aae(e)}function oae(e){this._context=e}oae.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=z9(e),a=z9(t),i=0,o=1;o<n;++i,++o)this._context.bezierCurveTo(r[0][i],a[0][i],r[1][i],a[1][i],e[o],t[o]);(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 z9(e){var t,n=e.length-1,r,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=a[t]/i[t-1],i[t]-=r,o[t]-=r*o[t-1];for(a[n-1]=o[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function F9e(e){return new oae(e)}function gN(e,t){this._context=e,this._t=t}gN.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: 13,428 bytes, lines 1505-1508
1505default:{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 z9e(e){return new gN(e,.5)}function B9e(e){return new gN(e,0)}function U9e(e){return new gN(e,1)}function em(e,t){if((o=e.length)>1)for(var n=1,r,a,i=e[t[0]],o,l=i.length;n<o;++n)for(a=i,i=e[t[n]],r=0;r<l;++r)i[r][1]+=i[r][0]=isNaN(a[r][1])?a[r][0]:a[r][1]}function z4(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function H9e(e,t){return e[t]}function q9e(e){const t=[];return t.key=e,t}function V9e(){var e=In([]),t=z4,n=em,r=H9e;function a(i){var o=Array.from(e.apply(this,arguments),q9e),l,c=o.length,u=-1,d;for(const f of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(f,o[l].key,u,i)]).data=f;for(l=0,d=u3(t(o));l<c;++l)o[d[l]].index=l;return n(o,d),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:In(Array.from(i)),a):e},a.value=function(i){return arguments.length?(r=typeof i=="function"?i:In(+i),a):r},a.order=function(i){return arguments.length?(t=i==null?z4:typeof i=="function"?i:In(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??em,a):n},a}function W9e(e,t){if((r=e.length)>0){for(var n,r,a=0,i=e[0].length,o;a<i;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}em(e,t)}}function G9e(e,t){if((a=e.length)>0){for(var n=0,r=e[t[0]],a,i=r.length;n<i;++n){for(var o=0,l=0;o<a;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}em(e,t)}}function K9e(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,r=1,a,i,o;r<i;++r){for(var l=0,c=0,u=0;l<o;++l){for(var d=e[t[l]],f=d[r][1]||0,m=d[r-1][1]||0,p=(f-m)/2,v=0;v<l;++v){var y=e[t[v]],x=y[r][1]||0,w=y[r-1][1]||0;p+=x-w}c+=f,u+=p*f}a[r-1][1]+=a[r-1][0]=n,c&&(n-=u/c)}a[r-1][1]+=a[r-1][0]=n,em(e,t)}}function kx(e){"@babel/helpers - typeof";return kx=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},kx(e)}var Y9e=["type","size","sizeType"];function B4(){return B4=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},B4.apply(this,arguments)}function B9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function U9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B9(Object(n),!0).forEach(function(r){X9e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X9e(e,t,n){return t=Q9e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q9e(e){var t=Z9e(e,"string");return kx(t)=="symbol"?t:t+""}function Z9e(e,t){if(kx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J9e(e,t){if(e==null)return{};var n=eUe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eUe(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 lae={symbolCircle:d3,symbolCross:w9e,symbolDiamond:N9e,symbolSquare:S9e,symbolStar:A9e,symbolTriangle:E9e,symbolWye:T9e},tUe=Math.PI/180,nUe=function(t){var n="symbol".concat(hN(t));return lae[n]||d3},rUe=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 a=18*tUe;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},sUe=function(t,n){lae["symbol".concat(hN(t))]=n},f3=function(t){var n=t.type,r=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=J9e(t,Y9e),u=U9(U9({},c),{},{type:r,size:i,sizeType:l}),d=function(){var x=nUe(r),w=I9e().type(x).size(rUe(i,l,r));return w()},f=u.className,m=u.cx,p=u.cy,v=mt(u,!0);return m===+m&&p===+p&&i===+i?X.createElement("path",B4({},v,{className:Mt("recharts-symbols",f),transform:"translate(".concat(m,", ").concat(p,")"),d:d()})):null};f3.registerSymbol=sUe;function tm(e){"@babel/helpers - typeof";return tm=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},tm(e)}function U4(){return U4=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},U4.apply(this,arguments)}function H9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function aUe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H9(Object(n),!0).forEach(function(r){Cx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H9(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iUe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oUe(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,uae(r.key),r)}}function lUe(e,t,n){return t&&oUe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cUe(e,t,n){return t=Gw(t),uUe(e,cae()?Reflect.construct(t,n||[],Gw(e).constructor):t.apply(e,n))}function uUe(e,t){if(t&&(tm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dUe(e)}function dUe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cae=function(){return!!e})()}function Gw(e){return Gw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gw(e)}function fUe(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&&H4(e,t)}function H4(e,t){return H4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},H4(e,t)}function Cx(e,t,n){return t=uae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uae(e){var t=hUe(e,"string");return tm(t)=="symbol"?t:t+""}function hUe(e,t){if(tm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ba=32,h3=(function(e){function t(){return iUe(this,t),cUe(this,t,arguments)}return fUe(t,e),lUe(t,[{key:"renderIcon",value:function(r){var a=this.props.inactiveColor,i=Ba/2,o=Ba/6,l=Ba/3,c=r.inactive?a:r.color;if(r.type==="plainline")return X.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:i,x2:Ba,y2:i,className:"recharts-legend-icon"});if(r.type==="line")return X.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
1506            A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
1507            H`).concat(Ba,"M").concat(2*l,",").concat(i,`
1508            A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return X.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(Ba/8,"h").concat(Ba,"v").concat(Ba*3/4,"h").concat(-Ba,"z"),className:"recharts-legend-icon"});if(X.isValidElement(r.legendIcon)){var u=aUe({},r);return delete u.legendIcon,X.cloneElement(r.legendIcon,u)}return X.createElement(f3,{fill:c,cx:i,cy:i,size:Ba,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:Ba,height:Ba},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,v){var y=p.formatter||c,x=Mt(Cx(Cx({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",p.inactive));if(p.type==="none")return null;var w=Ct(p.value)?null:p.value;Ri(!Ct(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 N=p.inactive?u:p.color;return X.createElement("li",U4({className:x,style:f,key:"legend-item-".concat(v)},jd(r.props,p,v)),X.createElement(R4,{width:o,height:o,viewBox:d,style:m},r.renderIcon(p)),X.createElement("span",{className:"recharts-legend-item-text",style:{color:N}},y?y(w,p,v):w))})}},{key:"render",value:function(){var r=this.props,a=r.payload,i=r.layout,o=r.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return X.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(b.PureComponent);Cx(h3,"displayName","Legend");Cx(h3,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var O_,q9;function mUe(){if(q9)return O_;q9=1;var e=uN();function t(){this.__data__=new e,this.size=0}return O_=t,O_}var M_,V9;function pUe(){if(V9)return M_;V9=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return M_=e,M_}var R_,W9;function gUe(){if(W9)return R_;W9=1;function e(t){return this.__data__.get(t)}return R_=e,R_}var D_,G9;function xUe(){if(G9)return D_;G9=1;function e(t){return this.__data__.has(t)}return D_=e,D_}var L_,K9;function yUe(){if(K9)return L_;K9=1;var e=uN(),t=r3(),n=s3(),r=200;function a(i,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([i,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(i,o),this.size=l.size,this}return L_=a,L_}var $_,Y9;function dae(){if(Y9)return $_;Y9=1;var e=uN(),t=mUe(),n=pUe(),r=gUe(),a=xUe(),i=yUe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=a,o.prototype.set=i,$_=o,$_}var F_,X9;function vUe(){if(X9)return F_;X9=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return F_=t,F_}var z_,Q9;function bUe(){if(Q9)return z_;Q9=1;function e(t){return this.__data__.has(t)}return z_=e,z_}var B_,Z9;function fae(){if(Z9)return B_;Z9=1;var e=s3(),t=vUe(),n=bUe();function r(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,B_=r,B_}var U_,J9;function hae(){if(J9)return U_;J9=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(n(t[r],r,t))return!0;return!1}return U_=e,U_}var H_,eU;function mae(){if(eU)return H_;eU=1;function e(t,n){return t.has(n)}return H_=e,H_}var q_,tU;function pae(){if(tU)return q_;tU=1;var e=fae(),t=hae(),n=mae(),r=1,a=2;function i(o,l,c,u,d,f){var m=c&r,p=o.length,v=l.length;if(p!=v&&!(m&&v>p))return!1;var y=f.get(o),x=f.get(l);if(y&&x)return y==l&&x==o;var w=-1,N=!0,S=c&a?new e:void 0;for(f.set(o,l),f.set(l,o);++w<p;){var _=o[w],k=l[w];if(u)var C=m?u(k,_,w,l,o,f):u(_,k,w,o,l,f);if(C!==void 0){if(C)continue;N=!1;break}if(S){if(!t(l,function(E,O){if(!n(S,O)&&(_===E||d(_,E,c,u,f)))return S.push(O)})){N=!1;break}}else if(!(_===k||d(_,k,c,u,f))){N=!1;break}}return f.delete(o),f.delete(l),N}return q_=i,q_}var V_,nU;function wUe(){if(nU)return V_;nU=1;var e=No(),t=e.Uint8Array;return V_=t,V_}var W_,rU;function jUe(){if(rU)return W_;rU=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a,i){r[++n]=[i,a]}),r}return W_=e,W_}var G_,sU;function m3(){if(sU)return G_;sU=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(a){r[++n]=a}),r}return G_=e,G_}var K_,aU;function NUe(){if(aU)return K_;aU=1;var e=Yy(),t=wUe(),n=n3(),r=pae(),a=jUe(),i=m3(),o=1,l=2,c="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",m="[object Number]",p="[object RegExp]",v="[object Set]",y="[object String]",x="[object Symbol]",w="[object ArrayBuffer]",N="[object DataView]",S=e?e.prototype:void 0,_=S?S.valueOf
vendor: 1,090 bytes, line 1508
1508:void 0;function k(C,E,O,P,R,T,D){switch(O){case N:if(C.byteLength!=E.byteLength||C.byteOffset!=E.byteOffset)return!1;C=C.buffer,E=E.buffer;case w:return!(C.byteLength!=E.byteLength||!T(new t(C),new t(E)));case c:case u:case m:return n(+C,+E);case d:return C.name==E.name&&C.message==E.message;case p:case y:return C==E+"";case f:var z=a;case v:var I=P&o;if(z||(z=i),C.size!=E.size&&!I)return!1;var F=D.get(C);if(F)return F==E;P|=l,D.set(C,E);var U=r(z(C),z(E),P,R,T,D);return D.delete(C),U;case x:if(_)return _.call(C)==_.call(E)}return!1}return K_=k,K_}var Y_,iU;function gae(){if(iU)return Y_;iU=1;function e(t,n){for(var r=-1,a=n.length,i=t.length;++r<a;)t[i+r]=n[r];return t}return Y_=e,Y_}var X_,oU;function SUe(){if(oU)return X_;oU=1;var e=gae(),t=ia();function n(r,a,i){var o=a(r);return t(r)?o:e(o,i(r))}return X_=n,X_}var Q_,lU;function kUe(){if(lU)return Q_;lU=1;function e(t,n){for(var r=-1,a=t==null?0:t.length,i=0,o=[];++r<a;){var l=t[r];n(l,r,t)&&(o[i++]=l)}return o}return Q_=e,Q_}var Z_,cU;function CUe(){if(cU)return Z_;cU=1;function e(){return[]}return Z_=e,Z_}var J_,uU;
vendor: 50,842 bytes, lines 1508-1515
1508function _Ue(){if(uU)return J_;uU=1;var e=kUe(),t=CUe(),n=Object.prototype,r=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(l){return r.call(o,l)}))}:t;return J_=i,J_}var eA,dU;function AUe(){if(dU)return eA;dU=1;function e(t,n){for(var r=-1,a=Array(t);++r<t;)a[r]=n(r);return a}return eA=e,eA}var tA,fU;function EUe(){if(fU)return tA;fU=1;var e=Sl(),t=kl(),n="[object Arguments]";function r(a){return t(a)&&e(a)==n}return tA=r,tA}var nA,hU;function p3(){if(hU)return nA;hU=1;var e=EUe(),t=kl(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!a.call(o,"callee")};return nA=i,nA}var gg={exports:{}},rA,mU;function PUe(){if(mU)return rA;mU=1;function e(){return!1}return rA=e,rA}gg.exports;var pU;function xae(){return pU||(pU=1,(function(e,t){var n=No(),r=PUe(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u})(gg,gg.exports)),gg.exports}var sA,gU;function g3(){if(gU)return sA;gU=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,a){var i=typeof r;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<a}return sA=n,sA}var aA,xU;function x3(){if(xU)return aA;xU=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return aA=t,aA}var iA,yU;function TUe(){if(yU)return iA;yU=1;var e=Sl(),t=x3(),n=kl(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",m="[object RegExp]",p="[object Set]",v="[object String]",y="[object WeakMap]",x="[object ArrayBuffer]",w="[object DataView]",N="[object Float32Array]",S="[object Float64Array]",_="[object Int8Array]",k="[object Int16Array]",C="[object Int32Array]",E="[object Uint8Array]",O="[object Uint8ClampedArray]",P="[object Uint16Array]",R="[object Uint32Array]",T={};T[N]=T[S]=T[_]=T[k]=T[C]=T[E]=T[O]=T[P]=T[R]=!0,T[r]=T[a]=T[x]=T[i]=T[w]=T[o]=T[l]=T[c]=T[u]=T[d]=T[f]=T[m]=T[p]=T[v]=T[y]=!1;function D(z){return n(z)&&t(z.length)&&!!T[e(z)]}return iA=D,iA}var oA,vU;function yae(){if(vU)return oA;vU=1;function e(t){return function(n){return t(n)}}return oA=e,oA}var xg={exports:{}};xg.exports;var bU;function IUe(){return bU||(bU=1,(function(e,t){var n=$se(),r=t&&!t.nodeType&&t,a=r&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===r,o=i&&n.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(xg,xg.exports)),xg.exports}var lA,wU;function vae(){if(wU)return lA;wU=1;var e=TUe(),t=yae(),n=IUe(),r=n&&n.isTypedArray,a=r?t(r):e;return lA=a,lA}var cA,jU;function OUe(){if(jU)return cA;jU=1;var e=AUe(),t=p3(),n=ia(),r=xae(),a=g3(),i=vae(),o=Object.prototype,l=o.hasOwnProperty;function c(u,d){var f=n(u),m=!f&&t(u),p=!f&&!m&&r(u),v=!f&&!m&&!p&&i(u),y=f||m||p||v,x=y?e(u.length,String):[],w=x.length;for(var N in u)(d||l.call(u,N))&&!(y&&(N=="length"||p&&(N=="offset"||N=="parent")||v&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||a(N,w)))&&x.push(N);return x}return cA=c,cA}var uA,NU;function MUe(){if(NU)return uA;NU=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||e;return n===a}return uA=t,uA}var dA,SU;function bae(){if(SU)return dA;SU=1;function e(t,n){return function(r){return t(n(r))}}return dA=e,dA}var fA,kU;function RUe(){if(kU)return fA;kU=1;var e=bae(),t=e(Object.keys,Object);return fA=t,fA}var hA,CU;function DUe(){if(CU)return hA;CU=1;var e=MUe(),t=RUe(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&o.push(l);return o}return hA=a,hA}var mA,_U;function Qy(){if(_U)return mA;_U=1;var e=t3(),t=x3();function n(r){return r!=null&&t(r.length)&&!e(r)}return mA=n,mA}var pA,AU;function xN(){if(AU)return pA;AU=1;var e=OUe(),t=DUe(),n=Qy();function r(a){return n(a)?e(a):t(a)}return pA=r,pA}var gA,EU;function LUe(){if(EU)return gA;EU=1;var e=SUe(),t=_Ue(),n=xN();function r(a){return e(a,n,t)}return gA=r,gA}var xA,PU;function $Ue(){if(PU)return xA;PU=1;var e=LUe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,o,l,c,u,d){var f=l&t,m=e(i),p=m.length,v=e(o),y=v.length;if(p!=y&&!f)return!1;for(var x=p;x--;){var w=m[x];if(!(f?w in o:r.call(o,w)))return!1}var N=d.get(i),S=d.get(o);if(N&&S)return N==o&&S==i;var _=!0;d.set(i,o),d.set(o,i);for(var k=f;++x<p;){w=m[x];var C=i[w],E=o[w];if(c)var O=f?c(E,C,w,o,i,d):c(C,E,w,i,o,d);if(!(O===void 0?C===E||u(C,E,l,c,d):O)){_=!1;break}k||(k=w=="constructor")}if(_&&!k){var P=i.constructor,R=o.constructor;P!=R&&"constructor"in i&&"constructor"in o&&!(typeof P=="function"&&P instanceof P&&typeof R=="function"&&R instanceof R)&&(_=!1)}return d.delete(i),d.delete(o),_}return xA=a,xA}var yA,TU;function FUe(){if(TU)return yA;TU=1;var e=qd(),t=No(),n=e(t,"DataView");return yA=n,yA}var vA,IU;function zUe(){if(IU)return vA;IU=1;var e=qd(),t=No(),n=e(t,"Promise");return vA=n,vA}var bA,OU;function wae(){if(OU)return bA;OU=1;var e=qd(),t=No(),n=e(t,"Set");return bA=n,bA}var wA,MU;function BUe(){if(MU)return wA;MU=1;var e=qd(),t=No(),n=e(t,"WeakMap");return wA=n,wA}var jA,RU;function UUe(){if(RU)return jA;RU=1;var e=FUe(),t=r3(),n=zUe(),r=wae(),a=BUe(),i=Sl(),o=Fse(),l="[object Map]",c="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",m="[object DataView]",p=o(e),v=o(t),y=o(n),x=o(r),w=o(a),N=i;return(e&&N(new e(new ArrayBuffer(1)))!=m||t&&N(new t)!=l||n&&N(n.resolve())!=u||r&&N(new r)!=d||a&&N(new a)!=f)&&(N=function(S){var _=i(S),k=_==c?S.constructor:void 0,C=k?o(k):"";if(C)switch(C){case p:return m;case v:return l;case y:return u;case x:return d;case w:return f}return _}),jA=N,jA}var NA,DU;function HUe(){if(DU)return NA;DU=1;var e=dae(),t=pae(),n=NUe(),r=$Ue(),a=UUe(),i=ia(),o=xae(),l=vae(),c=1,u="[object Arguments]",d="[object Array]",f="[object Object]",m=Object.prototype,p=m.hasOwnProperty;function v(y,x,w,N,S,_){var k=i(y),C=i(x),E=k?d:a(y),O=C?d:a(x);E=E==u?f:E,O=O==u?f:O;var P=E==f,R=O==f,T=E==O;if(T&&o(y)){if(!o(x))return!1;k=!0,P=!1}if(T&&!P)return _||(_=new e),k||l(y)?t(y,x,w,N,S,_):n(y,x,E,w,N,S,_);if(!(w&c)){var D=P&&p.call(y,"__wrapped__"),z=R&&p.call(x,"__wrapped__");if(D||z){var I=D?y.value():y,F=z?x.value():x;return _||(_=new e),S(I,F,w,N,_)}}return T?(_||(_=new e),r(y,x,w,N,S,_)):!1}return NA=v,NA}var SA,LU;function y3(){if(LU)return SA;LU=1;var e=HUe(),t=kl();function n(r,a,i,o,l){return r===a?!0:r==null||a==null||!t(r)&&!t(a)?r!==r&&a!==a:e(r,a,i,o,n,l)}return SA=n,SA}var kA,$U;function qUe(){if($U)return kA;$U=1;var e=dae(),t=y3(),n=1,r=2;function a(i,o,l,c){var u=l.length,d=u,f=!c;if(i==null)return!d;for(i=Object(i);u--;){var m=l[u];if(f&&m[2]?m[1]!==i[m[0]]:!(m[0]in i))return!1}for(;++u<d;){m=l[u];var p=m[0],v=i[p],y=m[1];if(f&&m[2]){if(v===void 0&&!(p in i))return!1}else{var x=new e;if(c)var w=c(v,y,p,i,o,x);if(!(w===void 0?t(y,v,n|r,c,x):w))return!1}}return!0}return kA=a,kA}var CA,FU;function jae(){if(FU)return CA;FU=1;var e=Yc();function t(n){return n===n&&!e(n)}return CA=t,CA}var _A,zU;function VUe(){if(zU)return _A;zU=1;var e=jae(),t=xN();function n(r){for(var a=t(r),i=a.length;i--;){var o=a[i],l=r[o];a[i]=[o,l,e(l)]}return a}return _A=n,_A}var AA,BU;function Nae(){if(BU)return AA;BU=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return AA=e,AA}var EA,UU;function WUe(){if(UU)return EA;UU=1;var e=qUe(),t=VUe(),n=Nae();function r(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return EA=r,EA}var PA,HU;function GUe(){if(HU)return PA;HU=1;function e(t,n){return t!=null&&n in Object(t)}return PA=e,PA}var TA,qU;function KUe(){if(qU)return TA;qU=1;var e=Use(),t=p3(),n=ia(),r=g3(),a=x3(),i=fN();function o(l,c,u){c=e(c,l);for(var d=-1,f=c.length,m=!1;++d<f;){var p=i(c[d]);if(!(m=l!=null&&u(l,p)))break;l=l[p]}return m||++d!=f?m:(f=l==null?0:l.length,!!f&&a(f)&&r(p,f)&&(n(l)||t(l)))}return TA=o,TA}var IA,VU;function YUe(){if(VU)return IA;VU=1;var e=GUe(),t=KUe();function n(r,a){return r!=null&&t(r,a,e)}return IA=n,IA}var OA,WU;function XUe(){if(WU)return OA;WU=1;var e=y3(),t=Hse(),n=YUe(),r=e3(),a=jae(),i=Nae(),o=fN(),l=1,c=2;function u(d,f){return r(d)&&a(f)?i(o(d),f):function(m){var p=t(m,d);return p===void 0&&p===f?n(m,d):e(f,p,l|c)}}return OA=u,OA}var MA,GU;function tp(){if(GU)return MA;GU=1;function e(t){return t}return MA=e,MA}var RA,KU;function QUe(){if(KU)return RA;KU=1;function e(t){return function(n){return n==null?void 0:n[t]}}return RA=e,RA}var DA,YU;function ZUe(){if(YU)return DA;YU=1;var e=i3();function t(n){return function(r){return e(r,n)}}return DA=t,DA}var LA,XU;function JUe(){if(XU)return LA;XU=1;var e=QUe(),t=ZUe(),n=e3(),r=fN();function a(i){return n(i)?e(r(i)):t(i)}return LA=a,LA}var $A,QU;function So(){if(QU)return $A;QU=1;var e=WUe(),t=XUe(),n=tp(),r=ia(),a=JUe();function i(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):a(o)}return $A=i,$A}var FA,ZU;function Sae(){if(ZU)return FA;ZU=1;function e(t,n,r,a){for(var i=t.length,o=r+(a?1:-1);a?o--:++o<i;)if(n(t[o],o,t))return o;return-1}return FA=e,FA}var zA,JU;function eHe(){if(JU)return zA;JU=1;function e(t){return t!==t}return zA=e,zA}var BA,eH;function tHe(){if(eH)return BA;eH=1;function e(t,n,r){for(var a=r-1,i=t.length;++a<i;)if(t[a]===n)return a;return-1}return BA=e,BA}var UA,tH;function nHe(){if(tH)return UA;tH=1;var e=Sae(),t=eHe(),n=tHe();function r(a,i,o){return i===i?n(a,i,o):e(a,t,o)}return UA=r,UA}var HA,nH;function rHe(){if(nH)return HA;nH=1;var e=nHe();function t(n,r){var a=n==null?0:n.length;return!!a&&e(n,r,0)>-1}return HA=t,HA}var qA,rH;function sHe(){if(rH)return qA;rH=1;function e(t,n,r){for(var a=-1,i=t==null?0:t.length;++a<i;)if(r(n,t[a]))return!0;return!1}return qA=e,qA}var VA,sH;function aHe(){if(sH)return VA;sH=1;function e(){}return VA=e,VA}var WA,aH;function iHe(){if(aH)return WA;aH=1;var e=wae(),t=aHe(),n=m3(),r=1/0,a=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return WA=a,WA}var GA,iH;function oHe(){if(iH)return GA;iH=1;var e=fae(),t=rHe(),n=sHe(),r=mae(),a=iHe(),i=m3(),o=200;function l(c,u,d){var f=-1,m=t,p=c.length,v=!0,y=[],x=y;if(d)v=!1,m=n;else if(p>=o){var w=u?null:a(c);if(w)return i(w);v=!1,m=r,x=new e}else x=u?[]:y;e:for(;++f<p;){var N=c[f],S=u?u(N):N;if(N=d||N!==0?N:0,v&&S===S){for(var _=x.length;_--;)if(x[_]===S)continue e;u&&x.push(S),y.push(N)}else m(x,S,d)||(x!==y&&x.push(S),y.push(N))}return y}return GA=l,GA}var KA,oH;function lHe(){if(oH)return KA;oH=1;var e=So(),t=oHe();function n(r,a){return r&&r.length?t(r,e(a,2)):[]}return KA=n,KA}var cHe=lHe();const lH=tn(cHe);function kae(e,t,n){return t===!0?lH(e,n):Ct(t)?lH(e,t):e}function nm(e){"@babel/helpers - typeof";return nm=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},nm(e)}var uHe=["ref"];function cH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cH(Object(n),!0).forEach(function(r){yN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dHe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uH(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,_ae(r.key),r)}}function fHe(e,t,n){return t&&uH(e.prototype,t),n&&uH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function hHe(e,t,n){return t=Kw(t),mHe(e,Cae()?Reflect.construct(t,n||[],Kw(e).constructor):t.apply(e,n))}function mHe(e,t){if(t&&(nm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pHe(e)}function pHe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cae=function(){return!!e})()}function Kw(e){return Kw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kw(e)}function gHe(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&&q4(e,t)}function q4(e,t){return q4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},q4(e,t)}function yN(e,t,n){return t=_ae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ae(e){var t=xHe(e,"string");return nm(t)=="symbol"?t:t+""}function xHe(e,t){if(nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yHe(e,t){if(e==null)return{};var n=vHe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vHe(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 bHe(e){return e.value}function wHe(e,t){if(X.isValidElement(e))return X.cloneElement(e,t);if(typeof e=="function")return X.createElement(e,t);t.ref;var n=yHe(t,uHe);return X.createElement(h3,n)}var dH=1,fh=(function(e){function t(){var n;dHe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=hHe(this,t,[].concat(a)),yN(n,"lastBoundingBox",{width:-1,height:-1}),n}return gHe(t,e),fHe(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,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>dH||Math.abs(a.height-this.lastBoundingBox.height)>dH)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,r&&r(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Do({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var a=this.props,i=a.layout,o=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,d=a.chartHeight,f,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=o==="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(l==="middle"){var v=this.getBBoxSnapshot();m={top:((d||0)-v.height)/2}}else m=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Do(Do({},f),m)}},{key:"render",value:function(){var r=this,a=this.props,i=a.content,o=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=Do(Do({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return X.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},wHe(i,Do(Do({},this.props),{},{payload:kae(d,u,bHe)})))}}],[{key:"getWithHeight",value:function(r,a){var i=Do(Do({},this.defaultProps),r.props),o=i.layout;return o==="vertical"&&ze(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||a}:null}}])})(b.PureComponent);yN(fh,"displayName","Legend");yN(fh,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var YA,fH;function jHe(){if(fH)return YA;fH=1;var e=Yy(),t=p3(),n=ia(),r=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(r&&i&&i[r])}return YA=a,YA}var XA,hH;function Aae(){if(hH)return XA;hH=1;var e=gae(),t=jHe();function n(r,a,i,o,l){var c=-1,u=r.length;for(i||(i=t),l||(l=[]);++c<u;){var d=r[c];a>0&&i(d)?a>1?n(d,a-1,i,o,l):e(l,d):o||(l[l.length]=d)}return l}return XA=n,XA}var QA,mH;function NHe(){if(mH)return QA;mH=1;function e(t){return function(n,r,a){for(var i=-1,o=Object(n),l=a(n),c=l.length;c--;){var u=l[t?c:++i];if(r(o[u],u,o)===!1)break}return n}}return QA=e,QA}var ZA,pH;function SHe(){if(pH)return ZA;pH=1;var e=NHe(),t=e();return ZA=t,ZA}var JA,gH;function Eae(){if(gH)return JA;gH=1;var e=SHe(),t=xN();function n(r,a){return r&&e(r,a,t)}return JA=n,JA}var eE,xH;function kHe(){if(xH)return eE;xH=1;var e=Qy();function t(n,r){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var o=a.length,l=r?o:-1,c=Object(a);(r?l--:++l<o)&&i(c[l],l,c)!==!1;);return a}}return eE=t,eE}var tE,yH;function v3(){if(yH)return tE;yH=1;var e=Eae(),t=kHe(),n=t(e);return tE=n,tE}var nE,vH;function Pae(){if(vH)return nE;vH=1;var e=v3(),t=Qy();function n(r,a){var i=-1,o=t(r)?Array(r.length):[];return e(r,function(l,c,u){o[++i]=a(l,c,u)}),o}return nE=n,nE}var rE,bH;function CHe(){if(bH)return rE;bH=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return rE=e,rE}var sE,wH;function _He(){if(wH)return sE;wH=1;var e=Zm();function t(n,r){if(n!==r){var a=n!==void 0,i=n===null,o=n===n,l=e(n),c=r!==void 0,u=r===null,d=r===r,f=e(r);if(!u&&!f&&!l&&n>r||l&&c&&d&&!u&&!f||i&&c&&d||!a&&d||!o)return 1;if(!i&&!l&&!f&&n<r||f&&a&&o&&!i&&!l||u&&a&&o||!c&&o||!d)return-1}return 0}return sE=t,sE}var aE,jH;function AHe(){if(jH)return aE;jH=1;var e=_He();function t(n,r,a){for(var i=-1,o=n.criteria,l=r.criteria,c=o.length,u=a.length;++i<c;){var d=e(o[i],l[i]);if(d){if(i>=u)return d;var f=a[i];return d*(f=="desc"?-1:1)}}return n.index-r.index}return aE=t,aE}var iE,NH;function EHe(){if(NH)return iE;NH=1;var e=a3(),t=i3(),n=So(),r=Pae(),a=CHe(),i=yae(),o=AHe(),l=tp(),c=ia();function u(d,f,m){f.length?f=e(f,function(y){return c(y)?function(x){return t(x,y.length===1?y[0]:y)}:y}):f=[l];var p=-1;f=e(f,i(n));var v=r(d,function(y,x,w){var N=e(f,function(S){return S(y)});return{criteria:N,index:++p,value:y}});return a(v,function(y,x){return o(y,x,m)})}return iE=u,iE}var oE,SH;function PHe(){if(SH)return oE;SH=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return oE=e,oE}var lE,kH;function THe(){if(kH)return lE;kH=1;var e=PHe(),t=Math.max;function n(r,a,i){return a=t(a===void 0?r.length-1:a,0),function(){for(var o=arguments,l=-1,c=t(o.length-a,0),u=Array(c);++l<c;)u[l]=o[a+l];l=-1;for(var d=Array(a+1);++l<a;)d[l]=o[l];return d[a]=i(u),e(r,this,d)}}return lE=n,lE}var cE,CH;function IHe(){if(CH)return cE;CH=1;function e(t){return function(){return t}}return cE=e,cE}var uE,_H;function Tae(){if(_H)return uE;_H=1;var e=qd(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return uE=t,uE}var dE,AH;function OHe(){if(AH)return dE;AH=1;var e=IHe(),t=Tae(),n=tp(),r=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return dE=r,dE}var fE,EH;function MHe(){if(EH)return fE;EH=1;var e=800,t=16,n=Date.now;function r(a){var i=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return fE=r,fE}var hE,PH;function RHe(){if(PH)return hE;PH=1;var e=OHe(),t=MHe(),n=t(e);return hE=n,hE}var mE,TH;function DHe(){if(TH)return mE;TH=1;var e=tp(),t=THe(),n=RHe();function r(a,i){return n(t(a,i,e),a+"")}return mE=r,mE}var pE,IH;function vN(){if(IH)return pE;IH=1;var e=n3(),t=Qy(),n=g3(),r=Yc();function a(i,o,l){if(!r(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],i):!1}return pE=a,pE}var gE,OH;function LHe(){if(OH)return gE;OH=1;var e=Aae(),t=EHe(),n=DHe(),r=vN(),a=n(function(i,o){if(i==null)return[];var l=o.length;return l>1&&r(i,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return gE=a,gE}var $He=LHe();const b3=tn($He);function _x(e){"@babel/helpers - typeof";return _x=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},_x(e)}function V4(){return V4=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},V4.apply(this,arguments)}function FHe(e,t){return HHe(e)||UHe(e,t)||BHe(e,t)||zHe()}function zHe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1509In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BHe(e,t){if(e){if(typeof e=="string")return MH(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 MH(e,t)}}function MH(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 UHe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function HHe(e){if(Array.isArray(e))return e}function RH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function xE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RH(Object(n),!0).forEach(function(r){qHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qHe(e,t,n){return t=VHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VHe(e){var t=WHe(e,"string");return _x(t)=="symbol"?t:t+""}function WHe(e,t){if(_x(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_x(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function GHe(e){return Array.isArray(e)&&Or(e[0])&&Or(e[1])?e.join(" ~ "):e}var KHe=function(t){var n=t.separator,r=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,d=t.payload,f=t.formatter,m=t.itemSorter,p=t.wrapperClassName,v=t.labelClassName,y=t.label,x=t.labelFormatter,w=t.accessibilityLayer,N=w===void 0?!1:w,S=function(){if(d&&d.length){var D={padding:0,margin:0},z=(m?b3(d,m):d).map(function(I,F){if(I.type==="none")return null;var U=xE({display:"block",paddingTop:4,paddingBottom:4,color:I.color||"#000"},l),H=I.formatter||f||GHe,q=I.value,B=I.name,L=q,V=B;if(H&&L!=null&&V!=null){var K=H(q,B,I,F,d);if(Array.isArray(K)){var W=FHe(K,2);L=W[0],V=W[1]}else L=K}return X.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(F),style:U},Or(V)?X.createElement("span",{className:"recharts-tooltip-item-name"},V):null,Or(V)?X.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,X.createElement("span",{className:"recharts-tooltip-item-value"},L),X.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return X.createElement("ul",{className:"recharts-tooltip-item-list",style:D},z)}return null},_=xE({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),k=xE({margin:0},u),C=!Tt(y),E=C?y:"",O=Mt("recharts-default-tooltip",p),P=Mt("recharts-tooltip-label",v);C&&x&&d!==void 0&&d!==null&&(E=x(y,d));var R=N?{role:"status","aria-live":"assertive"}:{};return X.createElement("div",V4({className:O,style:_},R),X.createElement("p",{className:P,style:k},X.isValidElement(E)?E:"".concat(E)),S())};function Ax(e){"@babel/helpers - typeof";return Ax=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},Ax(e)}function cb(e,t,n){return t=YHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YHe(e){var t=XHe(e,"string");return Ax(t)=="symbol"?t:t+""}function XHe(e,t){if(Ax(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ax(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Qp="recharts-tooltip-wrapper",QHe={visibility:"hidden"};function ZHe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Mt(Qp,cb(cb(cb(cb({},"".concat(Qp,"-right"),ze(n)&&t&&ze(t.x)&&n>=t.x),"".concat(Qp,"-left"),ze(n)&&t&&ze(t.x)&&n<t.x),"".concat(Qp,"-bottom"),ze(r)&&t&&ze(t.y)&&r>=t.y),"".concat(Qp,"-top"),ze(r)&&t&&ze(t.y)&&r<t.y))}function DH(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&ze(i[r]))return i[r];var d=n[r]-l-a,f=n[r]+a;if(t[r])return o[r]?d:f;if(o[r]){var m=d,p=c[r];return m<p?Math.max(f,c[r]):Math.max(d,c[r])}var v=f+l,y=c[r]+u;return v>y?Math.max(d,c[r]):Math.max(f,c[r])}function JHe(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 eqe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,d,f;return o.height>0&&o.width>0&&n?(d=DH({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=DH({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=JHe({translateX:d,translateY:f,useTranslate3d:l})):u=QHe,{cssProperties:u,cssClasses:ZHe({translateX:d,translateY:f,coordinate:n})}}function rm(e){"@babel/helpers - typeof";return rm=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},rm(e)}function LH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LH(Object(n),!0).forEach(function(r){G4(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nqe(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,Oae(r.key),r)}}function rqe(e,t,n){return t&&nqe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sqe(e,t,n){return t=Yw(t),aqe(e,Iae()?Reflect.construct(t,n||[],Yw(e).constructor):t.apply(e,n))}function aqe(e,t){if(t&&(rm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iqe(e)}function iqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Iae=function(){return!!e})()}function Yw(e){return Yw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yw(e)}function oqe(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&&W4(e,t)}function W4(e,t){return W4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},W4(e,t)}function G4(e,t,n){return t=Oae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oae(e){var t=lqe(e,"string");return rm(t)=="symbol"?t:t+""}function lqe(e,t){if(rm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var FH=1,cqe=(function(e){function t(){var n;tqe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=sqe(this,t,[].concat(a)),G4(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),G4(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),n}return oqe(t,e),rqe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>FH||Math.abs(r.height-this.state.lastBoundingBox.height)>FH)&&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,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,m=a.isAnimationActive,p=a.offset,v=a.position,y=a.reverseDirection,x=a.useTranslate3d,w=a.viewBox,N=a.wrapperStyle,S=eqe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:v,reverseDirection:y,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:w}),_=S.cssClasses,k=S.cssProperties,C=$H($H({transition:m&&i?"transform ".concat(l,"ms ").concat(c):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},N);return X.createElement("div",{tabIndex:-1,className:_,style:C,ref:function(O){r.wrapperNode=O}},u)}}])})(b.PureComponent),uqe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Vd={isSsr:uqe()};function sm(e){"@babel/helpers - typeof";return sm=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},sm(e)}function zH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function BH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zH(Object(n),!0).forEach(function(r){w3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fqe(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,Rae(r.key),r)}}function hqe(e,t,n){return t&&fqe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mqe(e,t,n){return t=Xw(t),pqe(e,Mae()?Reflect.construct(t,n||[],Xw(e).constructor):t.apply(e,n))}function pqe(e,t){if(t&&(sm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gqe(e)}function gqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mae=function(){return!!e})()}function Xw(e){return Xw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Xw(e)}function xqe(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&&K4(e,t)}function K4(e,t){return K4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},K4(e,t)}function w3(e,t,n){return t=Rae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rae(e){var t=yqe(e,"string");return sm(t)=="symbol"?t:t+""}function yqe(e,t){if(sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function vqe(e){return e.dataKey}function bqe(e,t){return X.isValidElement(e)?X.cloneElement(e,t):typeof e=="function"?X.createElement(e,t):X.createElement(KHe,t)}var Uo=(function(e){function t(){return dqe(this,t),mqe(this,t,arguments)}return xqe(t,e),hqe(t,[{key:"render",value:function(){var r=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,m=a.isAnimationActive,p=a.offset,v=a.payload,y=a.payloadUniqBy,x=a.position,w=a.reverseDirection,N=a.useTranslate3d,S=a.viewBox,_=a.wrapperStyle,k=v??[];f&&k.length&&(k=kae(v.filter(function(E){return E.value!=null&&(E.hide!==!0||r.props.includeHidden)}),y,vqe));var C=k.length>0;return X.createElement(cqe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:m,active:i,coordinate:d,hasPayload:C,offset:p,position:x,reverseDirection:w,useTranslate3d:N,viewBox:S,wrapperStyle:_},bqe(u,BH(BH({},this.props),{},{payload:k})))}}])})(b.PureComponent);w3(Uo,"displayName","Tooltip");w3(Uo,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Vd.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 yE,UH;function wqe(){if(UH)return yE;UH=1;var e=No(),t=function(){return e.Date.now()};return yE=t,yE}var vE,HH;function jqe(){if(HH)return vE;HH=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return vE=t,vE}var bE,qH;function Nqe(){if(qH)return bE;qH=1;var e=jqe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return bE=n,bE}var wE,VH;function Dae(){if(VH)return wE;VH=1;var e=Nqe(),t=Yc(),n=Zm(),r=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=i.test(u);return f||o.test(u)?l(u.slice(2),f?2:8):a.test(u)?r:+u}return wE=c,wE}var jE,WH;function Sqe(){if(WH)return jE;WH=1;var e=Yc(),t=wqe(),n=Dae(),r="Expected a function",a=Math.max,i=Math.min;function o(l,c,u){var d,f,m,p,v,y,x=0,w=!1,N=!1,S=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(u)&&(w=!!u.leading,N="maxWait"in u,m=N?a(n(u.maxWait)||0,c):m,S="trailing"in u?!!u.trailing:S);function _(z){var I=d,F=f;return d=f=void 0,x=z,p=l.apply(F,I),p}function k(z){return x=z,v=setTimeout(O,c),w?_(z):p}function C(z){var I=z-y,F=z-x,U=c-I;return N?i(U,m-F):U}function E(z){var I=z-y,F=z-x;return y===void 0||I>=c||I<0||N&&F>=m}function O(){var z=t();if(E(z))return P(z);v=setTimeout(O,C(z))}function P(z){return v=void 0,S&&d?_(z):(d=f=void 0,p)}function R(){v!==void 0&&clearTimeout(v),x=0,d=y=f=v=void 0}function T(){return v===void 0?p:P(t())}function D(){var z=t(),I=E(z);if(d=arguments,f=this,y=z,I){if(v===void 0)return k(y);if(N)return clearTimeout(v),v=setTimeout(O,c),_(y)}return v===void 0&&(v=setTimeout(O,c)),p}return D.cancel=R,D.flush=T,D}return jE=o,jE}var NE,GH;function kqe(){if(GH)return NE;GH=1;var e=Sqe(),t=Yc(),n="Expected a function";function r(a,i,o){var l=!0,c=!0;if(typeof a!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(a,i,{leading:l,maxWait:i,trailing:c})}return NE=r,NE}var Cqe=kqe();const Lae=tn(Cqe);function Ex(e){"@babel/helpers - typeof";return Ex=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},Ex(e)}function KH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ub(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KH(Object(n),!0).forEach(function(r){_qe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _qe(e,t,n){return t=Aqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aqe(e){var t=Eqe(e,"string");return Ex(t)=="symbol"?t:t+""}function Eqe(e,t){if(Ex(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ex(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pqe(e,t){return Mqe(e)||Oqe(e,t)||Iqe(e,t)||Tqe()}function Tqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1510In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iqe(e,t){if(e){if(typeof e=="string")return YH(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 YH(e,t)}}function YH(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 Oqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Mqe(e){if(Array.isArray(e))return e}var SE=b.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,a=r===void 0?{width:-1,height:-1}:r,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,m=e.maxHeight,p=e.children,v=e.debounce,y=v===void 0?0:v,x=e.id,w=e.className,N=e.onResize,S=e.style,_=S===void 0?{}:S,k=b.useRef(null),C=b.useRef();C.current=N,b.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var E=b.useState({containerWidth:a.width,containerHeight:a.height}),O=Pqe(E,2),P=O[0],R=O[1],T=b.useCallback(function(z,I){R(function(F){var U=Math.round(z),H=Math.round(I);return F.containerWidth===U&&F.containerHeight===H?F:{containerWidth:U,containerHeight:H}})},[]);b.useEffect(function(){var z=function(B){var L,V=B[0].contentRect,K=V.width,W=V.height;T(K,W),(L=C.current)===null||L===void 0||L.call(C,K,W)};y>0&&(z=Lae(z,y,{trailing:!0,leading:!1}));var I=new ResizeObserver(z),F=k.current.getBoundingClientRect(),U=F.width,H=F.height;return T(U,H),I.observe(k.current),function(){I.disconnect()}},[T,y]);var D=b.useMemo(function(){var z=P.containerWidth,I=P.containerHeight;if(z<0||I<0)return null;Ri(Tu(o)||Tu(c),`The width(%s) and height(%s) are both fixed numbers,
1511       maybe you don't need to use a ResponsiveContainer.`,o,c),Ri(!n||n>0,"The aspect(%s) must be greater than zero.",n);var F=Tu(o)?z:o,U=Tu(c)?I:c;n&&n>0&&(F?U=F/n:U&&(F=U*n),m&&U>m&&(U=m)),Ri(F>0||U>0,`The width(%s) and height(%s) of chart should be greater than 0,
1512       please check the style of container, or the props width(%s) and height(%s),
1513       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
1514       height and width.`,F,U,o,c,d,f,n);var H=!Array.isArray(p)&&nl(p.type).endsWith("Chart");return X.Children.map(p,function(q){return X.isValidElement(q)?b.cloneElement(q,ub({width:F,height:U},H?{style:ub({height:"100%",width:"100%",maxHeight:U,maxWidth:F},q.props.style)}:{})):q})},[n,p,c,m,f,d,P,o]);return X.createElement("div",{id:x?"".concat(x):void 0,className:Mt("recharts-responsive-container",w),style:ub(ub({},_),{},{width:o,height:c,minWidth:d,minHeight:f,maxHeight:m}),ref:k},D)}),bN=function(t){return null};bN.displayName="Cell";function Px(e){"@babel/helpers - typeof";return Px=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},Px(e)}function XH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Y4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XH(Object(n),!0).forEach(function(r){Rqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rqe(e,t,n){return t=Dqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dqe(e){var t=Lqe(e,"string");return Px(t)=="symbol"?t:t+""}function Lqe(e,t){if(Px(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Px(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Df={widthCache:{},cacheCount:0},$qe=2e3,Fqe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},QH="recharts_measurement_span";function zqe(e){var t=Y4({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Mg=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Vd.isSsr)return{width:0,height:0};var r=zqe(n),a=JSON.stringify({text:t,copyStyle:r});if(Df.widthCache[a])return Df.widthCache[a];try{var i=document.getElementById(QH);i||(i=document.createElement("span"),i.setAttribute("id",QH),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=Y4(Y4({},Fqe),r);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Df.widthCache[a]=c,++Df.cacheCount>$qe&&(Df.cacheCount=0,Df.widthCache={}),c}catch{return{width:0,height:0}}},Bqe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Tx(e){"@babel/helpers - typeof";return Tx=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},Tx(e)}function Qw(e,t){return Vqe(e)||qqe(e,t)||Hqe(e,t)||Uqe()}function Uqe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1515In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hqe(e,t){if(e){if(typeof e=="string")return ZH(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 ZH(e,t)}}function ZH(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 qqe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Vqe(e){if(Array.isArray(e))return e}function Wqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JH(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,Kqe(r.key),r)}}function Gqe(e,t,n){return t&&JH(e.prototype,t),n&&JH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kqe(e){var t=Yqe(e,"string");return Tx(t)=="symbol"?t:t+""}function Yqe(e,t){if(Tx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eq=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,tq=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xqe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Qqe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,$ae={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zqe=Object.keys($ae),Qf="NaN";function Jqe(e,t){return e*$ae[t]}var db=(function(){function e(t,n){Wqe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!Xqe.test(n)&&(this.num=NaN,this.unit=""),Zqe.includes(n)&&(this.num=Jqe(t,n),this.unit="px")}return Gqe(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,a=(r=Qqe.exec(n))!==null&&r!==void 0?r:[],i=Qw(a,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])})();function Fae(e){if(e.includes(Qf))return Qf;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=eq.exec(t))!==null&&n!==void 0?n:[],a=Qw(r,4),i=a[1],o=a[2],l=a[3],c=db.parse(i??""),u=db.parse(l??""),d=o==="*"?c.multiply(u):c.divide(u);if(d.isNaN())return Qf;t=t.replace(eq,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,m=(f=tq.exec(t))!==null&&f!==void 0?f:[],p=Qw(m,4),v=p[1],y=p[2],x=p[3],w=db.parse(v??""),N=db.parse(x??""),S=y==="+"?w.add(N):w.subtract(N);if(S.isNaN())return Qf;t=t.replace(tq,S.toString())}return t}var nq=/\(([^()]*)\)/;function e7e(e){for(var t=e;t.includes("(");){var n=nq.exec(t),r=Qw(n,2),a=r[1];t=t.replace(nq,Fae(a))}return t}function t7e(e){var t=e.replace(/\s+/g,"");return t=e7e(t),t=Fae(t),t}function n7e(e){try{return t7e(e)}catch{return Qf}}function kE(e){var t=n7e(e.slice(5,-1));return t===Qf?"":t}var r7e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],s7e=["dx","dy","angle","className","breakAll"];function X4(){return X4=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},X4.apply(this,arguments)}function rq(e,t){if(e==null)return{};var n=a7e(e,t),r,a;
1515if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a7e(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 sq(e,t){return c7e(e)||l7e(e,t)||o7e(e,t)||i7e()}function i7e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1516In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o7e(e,t){if(e){if(typeof e=="string")return aq(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 aq(e,t)}}function aq(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 l7e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function c7e(e){if(Array.isArray(e))return e}var zae=/[ \f\n\r\t\v\u2028\u2029]+/,Bae=function(t){var n=t.children,r=t.breakAll,a=t.style;try{var i=[];Tt(n)||(r?i=n.toString().split(""):i=n.toString().split(zae));var o=i.map(function(c){return{word:c,width:Mg(c,a).width}}),l=r?0:Mg(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},u7e=function(t,n,r,a,i){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,d=ze(o),f=l,m=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return F.reduce(function(U,H){var q=H.word,B=H.width,L=U[U.length-1];if(L&&(a==null||i||L.width+B+r<Number(a)))L.words.push(q),L.width+=B+r;else{var V={words:[q],width:B};U.push(V)}return U},[])},p=m(n),v=function(F){return F.reduce(function(U,H){return U.width>H.width?U:H})};if(!d)return p;for(var y="…",x=function(F){var U=f.slice(0,F),H=Bae({breakAll:u,style:c,children:U+y}).wordsWithComputedWidth,q=m(H),B=q.length>o||v(q).width>Number(a);return[B,q]},w=0,N=f.length-1,S=0,_;w<=N&&S<=f.length-1;){var k=Math.floor((w+N)/2),C=k-1,E=x(C),O=sq(E,2),P=O[0],R=O[1],T=x(k),D=sq(T,1),z=D[0];if(!P&&!z&&(w=k+1),P&&z&&(N=k-1),!P&&z){_=R;break}S++}return _||p},iq=function(t){var n=Tt(t)?[]:t.toString().split(zae);return[{words:n}]},d7e=function(t){var n=t.width,r=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Vd.isSsr){var c,u,d=Bae({breakAll:o,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,m=d.spaceWidth;c=f,u=m}else return iq(a);return u7e({breakAll:o,children:a,maxLines:l,style:i},c,u,n,r)}return iq(a)},oq="#808080",Nd=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,d=t.scaleToFit,f=d===void 0?!1:d,m=t.textAnchor,p=m===void 0?"start":m,v=t.verticalAnchor,y=v===void 0?"end":v,x=t.fill,w=x===void 0?oq:x,N=rq(t,r7e),S=b.useMemo(function(){return d7e({breakAll:N.breakAll,children:N.children,maxLines:N.maxLines,scaleToFit:f,style:N.style,width:N.width})},[N.breakAll,N.children,N.maxLines,f,N.style,N.width]),_=N.dx,k=N.dy,C=N.angle,E=N.className,O=N.breakAll,P=rq(N,s7e);if(!Or(r)||!Or(i))return null;var R=r+(ze(_)?_:0),T=i+(ze(k)?k:0),D;switch(y){case"start":D=kE("calc(".concat(u,")"));break;case"middle":D=kE("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:D=kE("calc(".concat(S.length-1," * -").concat(l,")"));break}var z=[];if(f){var I=S[0].width,F=N.width;z.push("scale(".concat((ze(F)?F/I:1)/I,")"))}return C&&z.push("rotate(".concat(C,", ").concat(R,", ").concat(T,")")),z.length&&(P.transform=z.join(" ")),X.createElement("text",X4({},mt(P,!0),{x:R,y:T,className:Mt("recharts-text",E),textAnchor:p,fill:w.includes("url")?oq:w}),S.map(function(U,H){var q=U.words.join(O?"":" ");return X.createElement("tspan",{x:R,dy:H===0?D:l,key:"".concat(q,"-").concat(H)},q)}))};function _c(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function f7e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function j3(e){let t,n,r;e.length!==2?(t=_c,n=(l,c)=>_c(e(l),c),r=(l,c)=>e(l)-c):(t=e===_c||e===f7e?e:h7e,n=e,r=e);function a(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<0?u=f+1:d=f}while(u<d)}return u}function i(l,c,u=0,d=l.length){if(u<d){if(t(c,c)!==0)return d;do{const f=u+d>>>1;n(l[f],c)<=0?u=f+1:d=f}while(u<d)}return u}function o(l,c,u=0,d=l.length){const f=a(l,c,u,d-1);return f>u&&r(l[f-1],c)>-r(l[f],c)?f-1:f}return{left:a,center:o,right:i}}function h7e(){return 0}function Uae(e){return e===null?NaN:+e}function*m7e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const p7e=j3(_c),Zy=p7e.right;
1516j3(Uae).center;class lq extends Map{constructor(t,n=y7e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,a]of t)this.set(r,a)}get(t){return super.get(cq(this,t))}has(t){return super.has(cq(this,t))}set(t,n){return super.set(g7e(this,t),n)}delete(t){return super.delete(x7e(this,t))}}function cq({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function g7e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function x7e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function y7e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function v7e(e=_c){if(e===_c)return Hae;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 Hae(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const b7e=Math.sqrt(50),w7e=Math.sqrt(10),j7e=Math.sqrt(2);function Zw(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),i=r/Math.pow(10,a),o=i>=b7e?10:i>=w7e?5:i>=j7e?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?Zw(e,t,n*2):[l,c,u]}function Q4(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[a,i,o]=r?Zw(t,e,n):Zw(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(i-u)/-o;else for(let u=0;u<l;++u)c[u]=(i-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function Z4(e,t,n){return t=+t,e=+e,n=+n,Zw(e,t,n)[2]}function J4(e,t,n){t=+t,e=+e,n=+n;const r=t<e,a=r?Z4(t,e,n):Z4(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}function uq(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function dq(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function qae(e,t,n=0,r=1/0,a){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(a=a===void 0?Hae:v7e(a);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,d=Math.log(c),f=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*f*(c-f)/c)*(u-c/2<0?-1:1),p=Math.max(n,Math.floor(t-u*f/c+m)),v=Math.min(r,Math.floor(t+(c-u)*f/c+m));qae(e,t,p,v,a)}const i=e[t];let o=n,l=r;for(Zp(e,n,t),a(e[r],i)>0&&Zp(e,n,r);o<l;){for(Zp(e,o,l),++o,--l;a(e[o],i)<0;)++o;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?Zp(e,n,l):(++l,Zp(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function Zp(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N7e(e,t,n){if(e=Float64Array.from(m7e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return dq(e);if(t>=1)return uq(e);var r,a=(r-1)*t,i=Math.floor(a),o=uq(qae(e,i).subarray(0,i+1)),l=dq(e.subarray(i+1));return o+(l-o)*(a-i)}}function S7e(e,t,n=Uae){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,a=(r-1)*t,i=Math.floor(a),o=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return o+(l-o)*(a-i)}}function k7e(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var r=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++r<a;)i[r]=e+r*n;return i}function hi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Cl(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 eI=Symbol("implicit");function N3(){var e=new lq,t=[],n=[],r=eI;function a(i){let o=e.get(i);if(o===void 0){if(r!==eI)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new lq;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return N3(t,n).unknown(r)},hi.apply(a,arguments),a}function Ix(){var e=N3().unknown(void 0),t=e.domain,n=e.range,r=0,a=1,i,o,l=!1,c=0,u=0,d=.5;delete e.unknown;function f(){var m=t().length,p=a<r,v=p?a:r,y=p?r:a;i=(y-v)/Math.max(1,m-c+u*2),l&&(i=Math.floor(i)),v+=(y-v-i*(m-c))*d,o=i*(1-c),l&&(v=Math.round(v),o=Math.round(o));var x=k7e(m).map(function(w){return v+i*w});return n(p?x.reverse():x)}return e.domain=function(m){return arguments.length?(t(m),f()):t()},e.range=function(m){return arguments.length?([r,a]=m,r=+r,a=+a,f()):[r,a]},e.rangeRound=function(m){return[r,a]=m,r=+r,a=+a,l=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(m){return arguments.length?(l=!!m,f()):l},e.padding=function(m){return arguments.length?(c=Math.min(1,u=+m),f()):c},e.paddingInner=function(m){return arguments.length?(c=Math.min(1,m),f()):c},e.paddingOuter=function(m){return arguments.length?(u=+m,f()):u},e.align=function(m){return arguments.length?(d=Math.max(0,Math.min(1,m)),f()):d},e.copy=function(){return Ix(t(),[r,a]).round(l).paddingInner(c).paddingOuter(u).align(d)},hi.apply(f(),arguments)}function Vae(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Vae(t())},e}function Rg(){return Vae(Ix.apply(null,arguments).paddingInner(1))}function C7e(e){return function(){return e}}function Jw(e){return+e}var fq=[0,1];function Os(e){return e}function tI(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:C7e(isNaN(t)?NaN:.5)}function _7e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function A7e(e,t,n){var r=e[0],a=e[1],i=t[0],o=t[1];return a<r?(r=tI(a,r),i=n(o,i)):(r=tI(r,a),i=n(i,o)),function(l){return i(r(l))}}function E7e(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),i=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)a[o]=tI(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(l){var c=Zy(e,l,1,r)-1;return i[c](a[c](l))}}function Jy(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wN(){var e=fq,t=fq,n=tl,r,a,i,o=Os,l,c,u;function d(){var m=Math.min(e.length,t.length);return o!==Os&&(o=_7e(e[0],e[m-1])),l=m>2?E7e:A7e,c=u=null,f}function f(m){return m==null||isNaN(m=+m)?i:(c||(c=l(e.map(r),t,n)))(r(o(m)))}return f.invert=function(m){return o(a((u||(u=l(t,e.map(r),Pi)))(m)))},f.domain=function(m){return arguments.length?(e=Array.from(m,Jw),d()):e.slice()},f.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},f.rangeRound=function(m){return t=Array.from(m),n=hR,d()},f.clamp=function(m){return arguments.length?(o=m?!0:Os,d()):o!==Os},f.interpolate=function(m){return arguments.length?(n=m,d()):n},f.unknown=function(m){return arguments.length?(i=m,f):i},function(m,p){return r=m,a=p,d()}}function S3(){return wN()(Os,Os)}
vendor: 4,460 bytes, line 1516
1516function P7e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function ej(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 am(e){return e=ej(Math.abs(e)),e?e[1]:NaN}function T7e(e,t){return function(n,r){for(var a=n.length,i=[],o=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function I7e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var O7e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ox(e){if(!(t=O7e.exec(e)))throw new Error("invalid format: "+e);var t;return new k3({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]})}Ox.prototype=k3.prototype;function k3(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+""}k3.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 M7e(e){e:for(var t=e.length,n=1,r=-1,a;n<t;++n)switch(e[n]){case".":r=a=n;break;case"0":r===0&&(r=n),a=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(a+1):e}var Wae;function R7e(e,t){var n=ej(e,t);if(!n)return e+"";var r=n[0],a=n[1],i=a-(Wae=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=r.length;return i===o?r:i>o?r+new Array(i-o+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+ej(e,Math.max(0,t+i-1))[0]}function hq(e,t){var n=ej(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}const mq={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:P7e,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)=>hq(e*100,t),r:hq,s:R7e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function pq(e){return e}var gq=Array.prototype.map,xq=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function D7e(e){var t=e.grouping===void 0||e.thousands===void 0?pq:T7e(gq.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?pq:I7e(gq.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f){f=Ox(f);var m=f.fill,p=f.align,v=f.sign,y=f.symbol,x=f.zero,w=f.width,N=f.comma,S=f.precision,_=f.trim,k=f.type;k==="n"?(N=!0,k="g"):mq[k]||(S===void 0&&(S=12),_=!0,k="g"),(x||m==="0"&&p==="=")&&(x=!0,m="0",p="=");var C=y==="$"?n:y==="#"&&/[boxX]/.test(k)?"0"+k.toLowerCase():"",E=y==="$"?r:/[%p]/.test(k)?o:"",O=mq[k],P=/[defgprs%]/.test(k);S=S===void 0?6:/[gprs]/.test(k)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function R(T){var D=C,z=E,I,F,U;if(k==="c")z=O(T)+z,T="";else{T=+T;var H=T<0||1/T<0;if(T=isNaN(T)?c:O(Math.abs(T),S),_&&(T=M7e(T)),H&&+T==0&&v!=="+"&&(H=!1),D=(H?v==="("?v:l:v==="-"||v==="("?"":v)+D,z=(k==="s"?xq[8+Wae/3]:"")+z+(H&&v==="("?")":""),P){for(I=-1,F=T.length;++I<F;)if(U=T.charCodeAt(I),48>U||U>57){z=(U===46?a+T.slice(I+1):T.slice(I))+z,T=T.slice(0,I);break}}}N&&!x&&(T=t(T,1/0));var q=D.length+T.length+z.length,B=q<w?new Array(w-q+1).join(m):"";switch(N&&x&&(T=t(B+T,B.length?w-z.length:1/0),B=""),p){case"<":T=D+T+z+B;break;case"=":T=D+B+T+z;break;case"^":T=B.slice(0,q=B.length>>1)+D+T+z+B.slice(q);break;default:T=B+D+T+z;break}return i(T)}return R.toString=function(){return f+""},R}function d(f,m){var p=u((f=Ox(f),f.type="f",f)),v=Math.max(-8,Math.min(8,Math.floor(am(m)/3)))*3,y=Math.pow(10,-v),x=xq[8+v/3];return function(w){return p(y*w)+x}}return{format:u,formatPrefix:d}}var fb,C3,Gae;
1516L7e({thousands:",",grouping:[3],currency:["$",""]});function L7e(e){return fb=D7e(e),C3=fb.format,Gae=fb.formatPrefix,fb}function $7e(e){return Math.max(0,-am(Math.abs(e)))}function F7e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(am(t)/3)))*3-am(Math.abs(e)))}function z7e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,am(t)-am(e))+1}function Kae(e,t,n,r){var a=J4(e,t,n),i;switch(r=Ox(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=F7e(a,o))&&(r.precision=i),Gae(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=z7e(a,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=$7e(a))&&(r.precision=i-(r.type==="%")*2);break}}return C3(r)}function Xc(e){var t=e.domain;return e.ticks=function(n){var r=t();return Q4(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var a=t();return Kae(a[0],a[a.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),a=0,i=r.length-1,o=r[a],l=r[i],c,u,d=10;for(l<o&&(u=o,o=l,l=u,u=a,a=i,i=u);d-- >0;){if(u=Z4(o,l,n),u===c)return r[a]=o,r[i]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function tj(){var e=S3();return e.copy=function(){return Jy(e,tj())},hi.apply(e,arguments),Xc(e)}function Yae(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,Jw),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Yae(e).unknown(t)},e=arguments.length?Array.from(e,Jw):[0,1],Xc(n)}function Xae(e,t){e=e.slice();var n=0,r=e.length-1,a=e[n],i=e[r],o;return i<a&&(o=n,n=r,r=o,o=a,a=i,i=o),e[n]=t.floor(a),e[r]=t.ceil(i),e}function yq(e){return Math.log(e)}function vq(e){return Math.exp(e)}function B7e(e){return-Math.log(-e)}function U7e(e){return-Math.exp(-e)}function H7e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function q7e(e){return e===10?H7e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function V7e(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 bq(e){return(t,n)=>-e(-t,n)}function _3(e){const t=e(yq,vq),n=t.domain;let r=10,a,i;function o(){return a=V7e(r),i=q7e(r),n()[0]<0?(a=bq(a),i=bq(i),e(B7e,U7e)):e(yq,vq),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],d=c[c.length-1];const f=d<u;f&&([u,d]=[d,u]);let m=a(u),p=a(d),v,y;const x=l==null?10:+l;let w=[];if(!(r%1)&&p-m<x){if(m=Math.floor(m),p=Math.ceil(p),u>0){for(;m<=p;++m)for(v=1;v<r;++v)if(y=m<0?v/i(-m):v*i(m),!(y<u)){if(y>d)break;w.push(y)}}else for(;m<=p;++m)for(v=r-1;v>=1;--v)if(y=m>0?v/i(-m):v*i(m),!(y<u)){if(y>d)break;w.push(y)}w.length*2<x&&(w=Q4(u,d,x))}else w=Q4(m,p,Math.min(p-m,x)).map(i);return f?w.reverse():w},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Ox(c)).precision==null&&(c.trim=!0),c=C3(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*r<r-.5&&(f*=r),f<=u?c(d):""}},t.nice=()=>n(Xae(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function Qae(){const e=_3(wN()).domain([1,10]);return e.copy=()=>Jy(e,Qae()).base(e.base()),hi.apply(e,arguments),e}function wq(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function jq(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function A3(e){var t=1,n=e(wq(t),jq(t));return n.constant=function(r){return arguments.length?e(wq(t=+r),jq(t)):t},Xc(n)}function Zae(){var e=A3(wN());return e.copy=function(){return Jy(e,Zae()).constant(e.constant())},hi.apply(e,arguments)}function Nq(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function W7e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function G7e(e){return e<0?-e*e:e*e}function E3(e){var t=e(Os,Os),n=1;function r(){return n===1?e(Os,Os):n===.5?e(W7e,G7e):e(Nq(n),Nq(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,r()):n},Xc(t)}function P3(){var e=E3(wN());return e.copy=function(){return Jy(e,P3()).exponent(e.exponent())},hi.apply(e,arguments),e}function K7e(){return P3.apply(null,arguments).exponent(.5)}function Sq(e){return Math.sign(e)*e*e}function Y7e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Jae(){var e=S3(),t=[0,1],n=!1,r;function a(i){var o=Y7e(e(i));return isNaN(o)?r:n?Math.round(o):o}return a.invert=function(i){return e.invert(Sq(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,Jw)).map(Sq)),a):t.slice()}
1516,a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return Jae(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},hi.apply(a,arguments),Xc(a)}function eie(){var e=[],t=[],n=[],r;function a(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=S7e(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?r:t[Zy(n,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(_c),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.quantiles=function(){return n.slice()},i.copy=function(){return eie().domain(e).range(t).unknown(r)},hi.apply(i,arguments)}function tie(){var e=0,t=1,n=1,r=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[Zy(r,c,0,n)]:i}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return tie().domain([e,t]).range(a).unknown(i)},hi.apply(Xc(o),arguments)}function nie(){var e=[.5],t=[0,1],n,r=1;function a(i){return i!=null&&i<=i?t[Zy(e,i,0,r)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return nie().domain(e).range(t).unknown(n)},hi.apply(a,arguments)}const CE=new Date,_E=new Date;function Rr(e,t,n,r){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),l=a.ceil(i);return i-o<l-i?o:l},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<o);return c},a.filter=i=>Rr(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),n&&(a.count=(i,o)=>(CE.setTime(+i),_E.setTime(+o),e(CE),e(_E),Math.floor(n(CE,_E))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?o=>r(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const nj=Rr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);nj.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Rr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):nj);nj.range;const Xo=1e3,Qa=Xo*60,Qo=Qa*60,xl=Qo*24,T3=xl*7,kq=xl*30,AE=xl*365,Iu=Rr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Xo)},(e,t)=>(t-e)/Xo,e=>e.getUTCSeconds());Iu.range;const I3=Rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo)},(e,t)=>{e.setTime(+e+t*Qa)},(e,t)=>(t-e)/Qa,e=>e.getMinutes());I3.range;const O3=Rr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Qa)},(e,t)=>(t-e)/Qa,e=>e.getUTCMinutes());O3.range;const M3=Rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Xo-e.getMinutes()*Qa)},(e,t)=>{e.setTime(+e+t*Qo)},(e,t)=>(t-e)/Qo,e=>e.getHours());M3.range;const R3=Rr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Qo)},(e,t)=>(t-e)/Qo,e=>e.getUTCHours());R3.range;const e0=Rr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Qa)/xl,e=>e.getDate()-1);e0.range;const jN=Rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xl,e=>e.getUTCDate()-1);jN.range;const rie=Rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/xl,e=>Math.floor(e/xl));rie.range;function Wd(e){return Rr(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())*Qa)/T3)}const NN=Wd(0),rj=Wd(1),X7e=Wd(2),Q7e=Wd(3),im=Wd(4),Z7e=Wd(5),J7e=Wd(6);NN.range;rj.range;X7e.range;Q7e.range;im.range;Z7e.range;J7e.range;function Gd(e){return Rr(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)/T3)}const SN=Gd(0),sj=Gd(1),eVe=Gd(2),tVe=Gd(3),om=Gd(4),nVe=Gd(5),rVe=Gd(6);SN.range;sj.range;eVe.range;tVe.range;om.range;nVe.range;rVe.range;const D3=Rr(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());D3.range;const L3=Rr(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());L3.range;const yl=Rr(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());yl.every=e=>
vendor: 6,047 bytes, line 1516
1516!isFinite(e=Math.floor(e))||!(e>0)?null:Rr(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)});yl.range;const vl=Rr(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());vl.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rr(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)});vl.range;function sie(e,t,n,r,a,i){const o=[[Iu,1,Xo],[Iu,5,5*Xo],[Iu,15,15*Xo],[Iu,30,30*Xo],[i,1,Qa],[i,5,5*Qa],[i,15,15*Qa],[i,30,30*Qa],[a,1,Qo],[a,3,3*Qo],[a,6,6*Qo],[a,12,12*Qo],[r,1,xl],[r,2,2*xl],[n,1,T3],[t,1,kq],[t,3,3*kq],[e,1,AE]];function l(u,d,f){const m=d<u;m&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:c(u,d,f),v=p?p.range(u,+d+1):[];return m?v.reverse():v}function c(u,d,f){const m=Math.abs(d-u)/f,p=j3(([,,x])=>x).right(o,m);if(p===o.length)return e.every(J4(u/AE,d/AE,f));if(p===0)return nj.every(Math.max(J4(u,d,f),1));const[v,y]=o[m/o[p-1][2]<o[p][2]/m?p-1:p];return v.every(y)}return[l,c]}const[sVe,aVe]=sie(vl,L3,SN,rie,R3,O3),[iVe,oVe]=sie(yl,D3,NN,e0,M3,I3);function EE(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 PE(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))}function Jp(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function lVe(e){var t=e.dateTime,n=e.date,r=e.time,a=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=eg(a),d=tg(a),f=eg(i),m=tg(i),p=eg(o),v=tg(o),y=eg(l),x=tg(l),w=eg(c),N=tg(c),S={a:H,A:q,b:B,B:L,c:null,d:Tq,e:Tq,f:TVe,g:BVe,G:HVe,H:AVe,I:EVe,j:PVe,L:aie,m:IVe,M:OVe,p:V,q:K,Q:Mq,s:Rq,S:MVe,u:RVe,U:DVe,V:LVe,w:$Ve,W:FVe,x:null,X:null,y:zVe,Y:UVe,Z:qVe,"%":Oq},_={a:W,A:ie,b:ve,B:ge,c:null,d:Iq,e:Iq,f:KVe,g:sWe,G:iWe,H:VVe,I:WVe,j:GVe,L:oie,m:YVe,M:XVe,p:J,q:ne,Q:Mq,s:Rq,S:QVe,u:ZVe,U:JVe,V:eWe,w:tWe,W:nWe,x:null,X:null,y:rWe,Y:aWe,Z:oWe,"%":Oq},k={a:R,A:T,b:D,B:z,c:I,d:Eq,e:Eq,f:SVe,g:Aq,G:_q,H:Pq,I:Pq,j:bVe,L:NVe,m:vVe,M:wVe,p:P,q:yVe,Q:CVe,s:_Ve,S:jVe,u:hVe,U:mVe,V:pVe,w:fVe,W:gVe,x:F,X:U,y:Aq,Y:_q,Z:xVe,"%":kVe};S.x=C(n,S),S.X=C(r,S),S.c=C(t,S),_.x=C(n,_),_.X=C(r,_),_.c=C(t,_);function C(Z,oe){return function(he){var Q=[],ae=-1,fe=0,Ee=Z.length,Re,qe,St;for(he instanceof Date||(he=new Date(+he));++ae<Ee;)Z.charCodeAt(ae)===37&&(Q.push(Z.slice(fe,ae)),(qe=Cq[Re=Z.charAt(++ae)])!=null?Re=Z.charAt(++ae):qe=Re==="e"?" ":"0",(St=oe[Re])&&(Re=St(he,qe)),Q.push(Re),fe=ae+1);return Q.push(Z.slice(fe,ae)),Q.join("")}}function E(Z,oe){return function(he){var Q=Jp(1900,void 0,1),ae=O(Q,Z,he+="",0),fe,Ee;if(ae!=he.length)return null;if("Q"in Q)return new Date(Q.Q);if("s"in Q)return new Date(Q.s*1e3+("L"in Q?Q.L:0));if(oe&&!("Z"in Q)&&(Q.Z=0),"p"in Q&&(Q.H=Q.H%12+Q.p*12),Q.m===void 0&&(Q.m="q"in Q?Q.q:0),"V"in Q){if(Q.V<1||Q.V>53)return null;"w"in Q||(Q.w=1),"Z"in Q?(fe=PE(Jp(Q.y,0,1)),Ee=fe.getUTCDay(),fe=Ee>4||Ee===0?sj.ceil(fe):sj(fe),fe=jN.offset(fe,(Q.V-1)*7),Q.y=fe.getUTCFullYear(),Q.m=fe.getUTCMonth(),Q.d=fe.getUTCDate()+(Q.w+6)%7):(fe=EE(Jp(Q.y,0,1)),Ee=fe.getDay(),fe=Ee>4||Ee===0?rj.ceil(fe):rj(fe),fe=e0.offset(fe,(Q.V-1)*7),Q.y=fe.getFullYear(),Q.m=fe.getMonth(),Q.d=fe.getDate()+(Q.w+6)%7)}else("W"in Q||"U"in Q)&&("w"in Q||(Q.w="u"in Q?Q.u%7:"W"in Q?1:0),Ee="Z"in Q?PE(Jp(Q.y,0,1)).getUTCDay():EE(Jp(Q.y,0,1)).getDay(),Q.m=0,Q.d="W"in Q?(Q.w+6)%7+Q.W*7-(Ee+5)%7:Q.w+Q.U*7-(Ee+6)%7);return"Z"in Q?(Q.H+=Q.Z/100|0,Q.M+=Q.Z%100,PE(Q)):EE(Q)}}function O(Z,oe,he,Q){for(var ae=0,fe=oe.length,Ee=he.length,Re,qe;ae<fe;){if(Q>=Ee)return-1;if(Re=oe.charCodeAt(ae++),Re===37){if(Re=oe.charAt(ae++),qe=k[Re in Cq?oe.charAt(ae++):Re],!qe||(Q=qe(Z,he,Q))<0)return-1}else if(Re!=he.charCodeAt(Q++))return-1}return Q}function P(Z,oe,he){var Q=u.exec(oe.slice(he));return Q?(Z.p=d.get(Q[0].toLowerCase()),he+Q[0].length):-1}function R(Z,oe,he){var Q=p.exec(oe.slice(he));return Q?(Z.w=v.get(Q[0].toLowerCase()),he+Q[0].length):-1}function T(Z,oe,he){var Q=f.exec(oe.slice(he));return Q?(Z.w=m.get(Q[0].toLowerCase()),he+Q[0].length):-1}function D(Z,oe,he){var Q=w.exec(oe.slice(he));return Q?(Z.m=N.get(Q[0].toLowerCase()),he+Q[0].length):-1}function z(Z,oe,he){var Q=y.exec(oe.slice(he));return Q?(Z.m=x.get(Q[0].toLowerCase()),he+Q[0].length):-1}function I(Z,oe,he){return O(Z,t,oe,he)}function F(Z,oe,he){return O(Z,n,oe,he)}function U(Z,oe,he){return O(Z,r,oe,he)}function H(Z){return o[Z.getDay()]}function q(Z){return i[Z.getDay()]}function B(Z){return c[Z.getMonth()]}function L(Z){return l[Z.getMonth()]}function V(Z){return a[+(Z.getHours()>=12)]}function K(Z){return 1+~~(Z.getMonth()/3)}function W(Z){return o[Z.getUTCDay()]}function ie(Z){return i[Z.getUTCDay()]}function ve(Z){return c[Z.getUTCMonth()]}function ge(Z){return l[Z.getUTCMonth()]}function J(Z){return a[+(Z.getUTCHours()>=12)]}function ne(Z){return 1+~~(Z.getUTCMonth()/3)}return{format:function(Z){var oe=C(Z+="",S);return oe.toString=function(){return Z},oe},parse:function(Z){var oe=E(Z+="",!1);return oe.toString=function(){return Z},oe},utcFormat:function(Z){var oe=C(Z+="",_);return oe.toString=function(){return Z},oe},utcParse:function(Z){var oe=E(Z+="",!0);return oe.toString=function(){return Z},oe}}}var Cq={"-":"",_:" ",0:"0"},Yr=/^\s*\d+/,cVe=/^%/,uVe=/[\\^$*+?|[\]().{}]/g;function on(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i<n?new Array(n-i+1).join(t)+a:a)}function dVe(e){return e.replace(uVe,"\\$&")}function eg(e){return new RegExp("^(?:"+e.map(dVe).join("|")+")","i")}function tg(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function fVe(e,t,n){var r=Yr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function hVe(e,t,n){var r=Yr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function mVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));
vendor: 4,118 bytes, line 1516
1516return r?(e.U=+r[0],n+r[0].length):-1}function pVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function gVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _q(e,t,n){var r=Yr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Aq(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function xVe(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 yVe(e,t,n){var r=Yr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function vVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Eq(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function bVe(e,t,n){var r=Yr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pq(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function jVe(e,t,n){var r=Yr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function NVe(e,t,n){var r=Yr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function SVe(e,t,n){var r=Yr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function kVe(e,t,n){var r=cVe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function CVe(e,t,n){var r=Yr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function _Ve(e,t,n){var r=Yr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Tq(e,t){return on(e.getDate(),t,2)}function AVe(e,t){return on(e.getHours(),t,2)}function EVe(e,t){return on(e.getHours()%12||12,t,2)}function PVe(e,t){return on(1+e0.count(yl(e),e),t,3)}function aie(e,t){return on(e.getMilliseconds(),t,3)}function TVe(e,t){return aie(e,t)+"000"}function IVe(e,t){return on(e.getMonth()+1,t,2)}function OVe(e,t){return on(e.getMinutes(),t,2)}function MVe(e,t){return on(e.getSeconds(),t,2)}function RVe(e){var t=e.getDay();return t===0?7:t}function DVe(e,t){return on(NN.count(yl(e)-1,e),t,2)}function iie(e){var t=e.getDay();return t>=4||t===0?im(e):im.ceil(e)}function LVe(e,t){return e=iie(e),on(im.count(yl(e),e)+(yl(e).getDay()===4),t,2)}function $Ve(e){return e.getDay()}function FVe(e,t){return on(rj.count(yl(e)-1,e),t,2)}function zVe(e,t){return on(e.getFullYear()%100,t,2)}function BVe(e,t){return e=iie(e),on(e.getFullYear()%100,t,2)}function UVe(e,t){return on(e.getFullYear()%1e4,t,4)}function HVe(e,t){var n=e.getDay();return e=n>=4||n===0?im(e):im.ceil(e),on(e.getFullYear()%1e4,t,4)}function qVe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+on(t/60|0,"0",2)+on(t%60,"0",2)}function Iq(e,t){return on(e.getUTCDate(),t,2)}function VVe(e,t){return on(e.getUTCHours(),t,2)}function WVe(e,t){return on(e.getUTCHours()%12||12,t,2)}function GVe(e,t){return on(1+jN.count(vl(e),e),t,3)}function oie(e,t){return on(e.getUTCMilliseconds(),t,3)}function KVe(e,t){return oie(e,t)+"000"}function YVe(e,t){return on(e.getUTCMonth()+1,t,2)}function XVe(e,t){return on(e.getUTCMinutes(),t,2)}function QVe(e,t){return on(e.getUTCSeconds(),t,2)}function ZVe(e){var t=e.getUTCDay();return t===0?7:t}function JVe(e,t){return on(SN.count(vl(e)-1,e),t,2)}function lie(e){var t=e.getUTCDay();return t>=4||t===0?om(e):om.ceil(e)}function eWe(e,t){return e=lie(e),on(om.count(vl(e),e)+(vl(e).getUTCDay()===4),t,2)}function tWe(e){return e.getUTCDay()}function nWe(e,t){return on(sj.count(vl(e)-1,e),t,2)}function rWe(e,t){return on(e.getUTCFullYear()%100,t,2)}function sWe(e,t){return e=lie(e),on(e.getUTCFullYear()%100,t,2)}function aWe(e,t){return on(e.getUTCFullYear()%1e4,t,4)}function iWe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?om(e):om.ceil(e),on(e.getUTCFullYear()%1e4,t,4)}function oWe(){return"+0000"}function Oq(){return"%"}function Mq(e){return+e}function Rq(e){return Math.floor(+e/1e3)}var Lf,cie,uie;lWe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1516ay","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 lWe(e){return Lf=lVe(e),cie=Lf.format,Lf.parse,uie=Lf.utcFormat,Lf.utcParse,Lf}function cWe(e){return new Date(e)}function uWe(e){return e instanceof Date?+e:+new Date(+e)}function $3(e,t,n,r,a,i,o,l,c,u){var d=S3(),f=d.invert,m=d.domain,p=u(".%L"),v=u(":%S"),y=u("%I:%M"),x=u("%I %p"),w=u("%a %d"),N=u("%b %d"),S=u("%B"),_=u("%Y");function k(C){return(c(C)<C?p:l(C)<C?v:o(C)<C?y:i(C)<C?x:r(C)<C?a(C)<C?w:N:n(C)<C?S:_)(C)}return d.invert=function(C){return new Date(f(C))},d.domain=function(C){return arguments.length?m(Array.from(C,uWe)):m().map(cWe)},d.ticks=function(C){var E=m();return e(E[0],E[E.length-1],C??10)},d.tickFormat=function(C,E){return E==null?k:u(E)},d.nice=function(C){var E=m();return(!C||typeof C.range!="function")&&(C=t(E[0],E[E.length-1],C??10)),C?m(Xae(E,C)):d},d.copy=function(){return Jy(d,$3(e,t,n,r,a,i,o,l,c,u))},d}function dWe(){return hi.apply($3(iVe,oVe,yl,D3,NN,e0,M3,I3,Iu,cie).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function fWe(){return hi.apply($3(sVe,aVe,vl,L3,SN,jN,R3,O3,Iu,uie).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function kN(){var e=0,t=1,n,r,a,i,o=Os,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:o(a===0?.5:(f=(i(f)-n)*a,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),r=i(t=+t),a=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(o=f,u):o};function d(f){return function(m){var p,v;return arguments.length?([p,v]=m,o=f(p,v),u):[o(0),o(1)]}}return u.range=d(tl),u.rangeRound=d(hR),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,n=f(e),r=f(t),a=n===r?0:1/(r-n),u}}function Qc(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function die(){var e=Xc(kN()(Os));return e.copy=function(){return Qc(e,die())},Cl.apply(e,arguments)}function fie(){var e=_3(kN()).domain([1,10]);return e.copy=function(){return Qc(e,fie()).base(e.base())},Cl.apply(e,arguments)}function hie(){var e=A3(kN());return e.copy=function(){return Qc(e,hie()).constant(e.constant())},Cl.apply(e,arguments)}function F3(){var e=E3(kN());return e.copy=function(){return Qc(e,F3()).exponent(e.exponent())},Cl.apply(e,arguments)}function hWe(){return F3.apply(null,arguments).exponent(.5)}function mie(){var e=[],t=Os;function n(r){if(r!=null&&!isNaN(r=+r))return t((Zy(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let a of r)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(_c),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,a)=>t(a/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(a,i)=>N7e(e,i/r))},n.copy=function(){return mie(t).domain(e)},Cl.apply(n,arguments)}function CN(){var e=0,t=.5,n=1,r=1,a,i,o,l,c,u=Os,d,f=!1,m;function p(y){return isNaN(y=+y)?m:(y=.5+((y=+d(y))-i)*(r*y<r*i?l:c),u(f?Math.max(0,Math.min(1,y)):y))}p.domain=function(y){return arguments.length?([e,t,n]=y,a=d(e=+e),i=d(t=+t),o=d(n=+n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,p):[e,t,n]},p.clamp=function(y){return arguments.length?(f=!!y,p):f},p.interpolator=function(y){return arguments.length?(u=y,p):u};function v(y){return function(x){var w,N,S;return arguments.length?([w,N,S]=x,u=b4e(y,[w,N,S]),p):[u(0),u(.5),u(1)]}}return p.range=v(tl),p.rangeRound=v(hR),p.unknown=function(y){return arguments.length?(m=y,p):m},function(y){return d=y,a=y(e),i=y(t),o=y(n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),r=i<a?-1:1,p}}function pie(){var e=Xc(CN()(Os));return e.copy=function(){return Qc(e,pie())},Cl.apply(e,arguments)}function gie(){var e=_3(CN()).domain([.1,1,10]);return e.copy=function(){return Qc(e,gie()).base(e.base())},Cl.apply(e,arguments)}function xie(){var e=A3(CN());return e.copy=function(){return Qc(e,xie()).constant(e.constant())},Cl.apply(e,arguments)}function z3(){var e=E3(CN());return e.copy=function(){return Qc(e,z3()).exponent(e.exponent())},Cl.apply(e,arguments)}function mWe(){return z3.apply(null,arguments).exponent(.5)}const Dq=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ix,scaleDiverging:pie,scaleDivergingLog:gie,scaleDivergingPow:z3,scaleDivergingSqrt:mWe,scaleDivergingSymlog:xie,scaleIdentity:Yae,scaleImplicit:eI,scaleLinear:tj,scaleLog:Qae,scaleOrdinal:N3,scalePoint:Rg,scalePow:P3,scaleQuantile:eie,scaleQuantize:tie,scaleRadial:Jae,scaleSequential:die,scaleSequentialLog:fie,scaleSequentialPow:F3,scaleSequentialQuantile:mie,scaleSequentialSqrt:hWe,scaleSequentialSymlog:hie,scaleSqrt:K7e,scaleSymlog:Zae,scaleThreshold:nie,scaleTime:dWe,scaleUtc:fWe,tickFormat:Kae},Symbol.toStringTag,{value:"Module"}));var TE,Lq;function _N(){if(Lq)return TE;Lq=1;var e=Zm();function t(n,r,a){for(var i=-1,o=n.length;++i<o;){var l=n[i],c=r(l);
vendor: 68,540 bytes, lines 1516-1543
1516if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,d=l}return d}return TE=t,TE}var IE,$q;function yie(){if($q)return IE;$q=1;function e(t,n){return t>n}return IE=e,IE}var OE,Fq;function pWe(){if(Fq)return OE;Fq=1;var e=_N(),t=yie(),n=tp();function r(a){return a&&a.length?e(a,n,t):void 0}return OE=r,OE}var gWe=pWe();const AN=tn(gWe);var ME,zq;function vie(){if(zq)return ME;zq=1;function e(t,n){return t<n}return ME=e,ME}var RE,Bq;function xWe(){if(Bq)return RE;Bq=1;var e=_N(),t=vie(),n=tp();function r(a){return a&&a.length?e(a,n,t):void 0}return RE=r,RE}var yWe=xWe();const EN=tn(yWe);var DE,Uq;function vWe(){if(Uq)return DE;Uq=1;var e=a3(),t=So(),n=Pae(),r=ia();function a(i,o){var l=r(i)?e:n;return l(i,t(o,3))}return DE=a,DE}var LE,Hq;function bWe(){if(Hq)return LE;Hq=1;var e=Aae(),t=vWe();function n(r,a){return e(t(r,a),1)}return LE=n,LE}var wWe=bWe();const jWe=tn(wWe);var $E,qq;function NWe(){if(qq)return $E;qq=1;var e=y3();function t(n,r){return e(n,r)}return $E=t,$E}var SWe=NWe();const t0=tn(SWe);var np=1e9,kWe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U3,Gn=!0,ui="[DecimalError] ",rd=ui+"Invalid argument: ",B3=ui+"Exponent out of range: ",rp=Math.floor,Cu=Math.pow,CWe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ja,Ur=1e7,$n=7,bie=9007199254740991,aj=rp(bie/$n),Xe={};Xe.absoluteValue=Xe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Xe.comparedTo=Xe.cmp=function(e){var t,n,r,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(r=i.d.length,a=e.d.length,t=0,n=r<a?r:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===a?0:r>a^i.s<0?1:-1};Xe.decimalPlaces=Xe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*$n;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Xe.dividedBy=Xe.div=function(e){return rl(this,new this.constructor(e))};Xe.dividedToIntegerBy=Xe.idiv=function(e){var t=this,n=t.constructor;return Nn(rl(t,new n(e),0,1),n.precision)};Xe.equals=Xe.eq=function(e){return!this.cmp(e)};Xe.exponent=function(){return Sr(this)};Xe.greaterThan=Xe.gt=function(e){return this.cmp(e)>0};Xe.greaterThanOrEqualTo=Xe.gte=function(e){return this.cmp(e)>=0};Xe.isInteger=Xe.isint=function(){return this.e>this.d.length-2};Xe.isNegative=Xe.isneg=function(){return this.s<0};Xe.isPositive=Xe.ispos=function(){return this.s>0};Xe.isZero=function(){return this.s===0};Xe.lessThan=Xe.lt=function(e){return this.cmp(e)<0};Xe.lessThanOrEqualTo=Xe.lte=function(e){return this.cmp(e)<1};Xe.logarithm=Xe.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(ja))throw Error(ui+"NaN");if(n.s<1)throw Error(ui+(n.s?"NaN":"-Infinity"));return n.eq(ja)?new r(0):(Gn=!1,t=rl(Mx(n,i),Mx(e,i),i),Gn=!0,Nn(t,a))};Xe.minus=Xe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Nie(t,e):wie(t,(e.s=-e.s,e))};Xe.modulo=Xe.mod=function(e){var t,n=this,r=n.constructor,a=r.precision;if(e=new r(e),!e.s)throw Error(ui+"NaN");return n.s?(Gn=!1,t=rl(n,e,0,1).times(e),Gn=!0,n.minus(t)):Nn(new r(n),a)};Xe.naturalExponential=Xe.exp=function(){return jie(this)};Xe.naturalLogarithm=Xe.ln=function(){return Mx(this)};Xe.negated=Xe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Xe.plus=Xe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?wie(t,e):Nie(t,(e.s=-e.s,e))};Xe.precision=Xe.sd=function(e){var t,n,r,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(rd+e);if(t=Sr(a)+1,r=a.d.length-1,n=r*$n+1,r=a.d[r],r){for(;r%10==0;r/=10)n--;for(r=a.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Xe.squareRoot=Xe.sqrt=function(){var e,t,n,r,a,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(ui+"NaN")}for(e=Sr(l),Gn=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=no(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=rp((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new c(t)):r=new c(a.toString()),n=c.precision,a=o=n+3;;)if(i=r,r=i.plus(rl(l,i,o+2)).times(.5),no(i.d).slice(0,o)===(t=no(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Nn(i,n+1,0),i.times(i).eq(l)){r=i;break}}else if(t!="9999")break;o+=4}return Gn=!0,Nn(r,n)};Xe.times=Xe.mul=function(e){var t,n,r,a,i,o,l,c,u,d=this,f=d.constructor,m=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,c=m.length,u=p.length,c<u&&(i=m,m=p,p=i,o=c,c=u,u=o),i=[],o=c+u,r=o;r--;)i.push(0);for(r=u;--r>=0;){for(t=0,a=c+r;a>r;)l=i[a]+p[r]*m[a-r-1]+t,i[a--]=l%Ur|0,t=l/Ur|0;i[a]=(i[a]+t)%Ur|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Gn?Nn(e,f.precision):e};Xe.toDecimalPlaces=Xe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(xo(e,0,np),t===void 0?t=r.rounding:xo(t,0,8),Nn(n,e+Sr(n)+1,t))};Xe.toExponential=function(e,t){var n,r=this,a=r.constructor;return e===void 0?n=Sd(r,!0):(xo(e,0,np),t===void 0?t=a.rounding:xo(t,0,8),r=Nn(new a(r),e+1,t),n=Sd(r,!0,e+1)),n};Xe.toFixed=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?Sd(a):(xo(e,0,np),t===void 0?t=i.rounding:xo(t,0,8),r=Nn(new i(a),e+Sr(a)+1,t),n=Sd(r.abs(),!1,e+Sr(r)+1),a.isneg()&&!a.isZero()?"-"+n:n)};Xe.toInteger=Xe.toint=function(){var e=this,t=e.constructor;return Nn(new t(e),Sr(e)+1,t.rounding)};Xe.toNumber=function(){return+this};Xe.toPower=Xe.pow=function(e){var t,n,r,a,i,o,l=this,c=l.constructor,u=12,d=+(e=new c(e));if(!e.s)return new c(ja);if(l=new c(l),!l.s){if(e.s<1)throw Error(ui+"Infinity");return l}if(l.eq(ja))return l;if(r=c.precision,e.eq(ja))return Nn(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,i=l.s,o){if((n=d<0?-d:d)<=bie){for(a=new c(ja),t=Math.ceil(r/$n+4),Gn=!1;n%2&&(a=a.times(l),Wq(a.d,t)),n=rp(n/2),n!==0;)l=l.times(l),Wq(l.d,t);return Gn=!0,e.s<0?new c(ja).div(a):Nn(a,r)}}else if(i<0)throw Error(ui+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,Gn=!1,a=e.times(Mx(l,r+u)),Gn=!0,a=jie(a),a.s=i,a};Xe.toPrecision=function(e,t){var n,r,a=this,i=a.constructor;return e===void 0?(n=Sr(a),r=Sd(a,n<=i.toExpNeg||n>=i.toExpPos)):(xo(e,1,np),t===void 0?t=i.rounding:xo(t,0,8),a=Nn(new i(a),e,t),n=Sr(a),r=Sd(a,e<=n||n<=i.toExpNeg,e)),r};Xe.toSignificantDigits=Xe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(xo(e,1,np),t===void 0?t=r.rounding:xo(t,0,8)),Nn(new r(n),e,t)};Xe.toString=Xe.valueOf=Xe.val=Xe.toJSON=Xe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Sr(e),n=e.constructor;return Sd(e,t<=n.toExpNeg||t>=n.toExpPos)};function wie(e,t){var n,r,a,i,o,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Gn?Nn(t,f):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(r=c,i=-i,l=u.length):(r=u,a=o,l=c.length),o=Math.ceil(f/$n),l=o>l?o+1:l+1,i>l&&(i=l,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,r=u,u=c,c=r),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Ur|0,c[i]%=Ur;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,Gn?Nn(t,f):t}function xo(e,t,n){if(e!==~~e||e<t||e>n)throw Error(rd+e)}function no(e){var t,n,r,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)r=e[t]+"",n=$n-r.length,n&&(i+=ic(n)),i+=r;o=e[t],r=o+"",n=$n-r.length,n&&(i+=ic(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var rl=(function(){function e(r,a){var i,o=0,l=r.length;for(r=r.slice();l--;)i=r[l]*a+o,r[l]=i%Ur|0,o=i/Ur|0;return o&&r.unshift(o),r}function t(r,a,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(r[l]!=a[l]){c=r[l]>a[l]?1:-1;break}return c}function n(r,a,i){for(var o=0;i--;)r[i]-=o,o=r[i]<a[i]?1:0,r[i]=o*Ur+r[i]-a[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,a,i,o){var l,c,u,d,f,m,p,v,y,x,w,N,S,_,k,C,E,O,P=r.constructor,R=r.s==a.s?1:-1,T=r.d,D=a.d;if(!r.s)return new P(r);if(!a.s)throw Error(ui+"Division by zero");for(c=r.e-a.e,E=D.length,k=T.length,p=new P(R),v=p.d=[],u=0;D[u]==(T[u]||0);)++u;if(D[u]>(T[u]||0)&&--c,i==null?N=i=P.precision:o?N=i+(Sr(r)-Sr(a))+1:N=i,N<0)return new P(0);if(N=N/$n+2|0,u=0,E==1)for(d=0,D=D[0],N++;(u<k||d)&&N--;u++)S=d*Ur+(T[u]||0),v[u]=S/D|0,d=S%D|0;else{for(d=Ur/(D[0]+1)|0,d>1&&(D=e(D,d),T=e(T,d),E=D.length,k=T.length),_=E,y=T.slice(0,E),x=y.length;x<E;)y[x++]=0;O=D.slice(),O.unshift(0),C=D[0],D[1]>=Ur/2&&++C;do d=0,l=t(D,y,E,x),l<0?(w=y[0],E!=x&&(w=w*Ur+(y[1]||0)),d=w/C|0,d>1?(d>=Ur&&(d=Ur-1),f=e(D,d),m=f.length,x=y.length,l=t(f,y,m,x),l==1&&(d--,n(f,E<m?O:D,m))):(d==0&&(l=d=1),f=D.slice()),m=f.length,m<x&&f.unshift(0),n(y,f,x),l==-1&&(x=y.length,l=t(D,y,E,x),l<1&&(d++,n(y,E<x?O:D,x))),x=y.length):l===0&&(d++,y=[0]),v[u++]=d,l&&y[0]?y[x++]=T[_]||0:(y=[T[_]],x=1);while((_++<k||y[0]!==void 0)&&N--)}return v[0]||v.shift(),p.e=c,Nn(p,o?i+Sr(p)+1:i)}})();function jie(e,t){var n,r,a,i,o,l,c=0,u=0,d=e.constructor,f=d.precision;if(Sr(e)>16)throw Error(B3+Sr(e));if(!e.s)return new d(ja);for(Gn=!1,l=f,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(Cu(2,u))/Math.LN10*2+5|0,l+=r,n=a=i=new d(ja),d.precision=l;;){if(a=Nn(a.times(e),l),n=n.times(++c),o=i.plus(rl(a,n,l)),no(o.d).slice(0,l)===no(i.d).slice(0,l)){for(;u--;)i=Nn(i.times(i),l);return d.precision=f,t==null?(Gn=!0,Nn(i,f)):i}i=o}}function Sr(e){for(var t=e.e*$n,n=e.d[0];n>=10;n/=10)t++;return t}function FE(e,t,n){if(t>e.LN10.sd())throw Gn=!0,n&&(e.precision=n),Error(ui+"LN10 precision limit exceeded");return Nn(new e(e.LN10),t)}function ic(e){for(var t="";e--;)t+="0";return t}function Mx(e,t){var n,r,a,i,o,l,c,u,d,f=1,m=10,p=e,v=p.d,y=p.constructor,x=y.precision;if(p.s<1)throw Error(ui+(p.s?"NaN":"-Infinity"));if(p.eq(ja))return new y(0);if(t==null?(Gn=!1,u=x):u=t,p.eq(10))return t==null&&(Gn=!0),FE(y,u);if(u+=m,y.precision=u,n=no(v),r=n.charAt(0),i=Sr(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=no(p.d),r=n.charAt(0),f++;i=Sr(p),r>1?(p=new y("0."+n),i++):p=new y(r+"."+n.slice(1))}else return c=FE(y,u+2,x).times(i+""),p=Mx(new y(r+"."+n.slice(1)),u-m).plus(c),y.precision=x,t==null?(Gn=!0,Nn(p,x)):p;for(l=o=p=rl(p.minus(ja),p.plus(ja),u),d=Nn(p.times(p),u),a=3;;){if(o=Nn(o.times(d),u),c=l.plus(rl(o,new y(a),u)),no(c.d).slice(0,u)===no(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(FE(y,u+2,x).times(i+""))),l=rl(l,new y(f),u),y.precision=x,t==null?(Gn=!0,Nn(l,x)):l;l=c,a+=2}}function Vq(e,t){var n,r,a;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(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=rp(n/$n),e.d=[],r=(n+1)%$n,n<0&&(r+=$n),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=$n;r<a;)e.d.push(+t.slice(r,r+=$n));t=t.slice(r),r=$n-t.length}else r-=a;for(;r--;)t+="0";if(e.d.push(+t),Gn&&(e.e>aj||e.e<-aj))throw Error(B3+n)}else e.s=0,e.e=0,e.d=[0];return e}function Nn(e,t,n){var r,a,i,o,l,c,u,d,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(r=t-o,r<0)r+=$n,a=t,u=f[d=0];else{if(d=Math.ceil((r+1)/$n),i=f.length,d>=i)return e;for(u=i=f[d],o=1;i>=10;i/=10)o++;r%=$n,a=r-$n+o}if(n!==void 0&&(i=Cu(10,o-a-1),l=u/i%10|0,c=t<0||f[d+1]!==void 0||u%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?a>0?u/Cu(10,o-a):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(i=Sr(e),f.length=1,t=t-i-1,f[0]=Cu(10,($n-t%$n)%$n),e.e=rp(-t/$n)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,i=1,d--):(f.length=d+1,i=Cu(10,$n-r),f[d]=a>0?(u/Cu(10,o-a)%Cu(10,a)|0)*i:0),c)for(;;)if(d==0){(f[0]+=i)==Ur&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=Ur)break;f[d--]=0,i=1}for(r=f.length;f[--r]===0;)f.pop();if(Gn&&(e.e>aj||e.e<-aj))throw Error(B3+Sr(e));return e}function Nie(e,t){var n,r,a,i,o,l,c,u,d,f,m=e.constructor,p=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),Gn?Nn(t,p):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(d=o<0,d?(n=c,o=-o,l=f.length):(n=f,r=u,l=c.length),a=Math.max(Math.ceil(p/$n),l)+2,o>a&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=f.length,d=a<l,d&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){d=c[a]<f[a];break}o=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>o;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=Ur-1;--c[i],c[a]+=Ur}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,Gn?Nn(t,p):t):new m(0)}function Sd(e,t,n){var r,a=Sr(e),i=no(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+ic(r):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+ic(-a-1)+i,n&&(r=n-o)>0&&(i+=ic(r))):a>=o?(i+=ic(a+1-o),n&&(r=n-a-1)>0&&(i=i+"."+ic(r))):((r=a+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(a+1===o&&(i+="."),i+=ic(r))),e.s<0?"-"+i:i}function Wq(e,t){if(e.length>t)return e.length=t,!0}function Sie(e){var t,n,r;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(rd+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return Vq(o,i.toString())}else if(typeof i!="string")throw Error(rd+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,CWe.test(i))Vq(o,i);else throw Error(rd+i)}if(a.prototype=Xe,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=Sie,a.config=a.set=_We,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 a.config(e),a}function _We(e){if(!e||typeof e!="object")throw Error(ui+"Object expected");var t,n,r,a=["precision",1,np,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((r=e[n=a[t]])!==void 0)if(rp(r)===r&&r>=a[t+1]&&r<=a[t+2])this[n]=r;else throw Error(rd+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(rd+n+": "+r);return this}var U3=Sie(kWe);ja=new U3(1);const bn=U3;function AWe(e){return IWe(e)||TWe(e)||PWe(e)||EWe()}function EWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1517In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function PWe(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 TWe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function IWe(e){if(Array.isArray(e))return nI(e)}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}var OWe=function(t){return t},kie={},Cie=function(t){return t===kie},Gq=function(t){return function n(){return arguments.length===0||arguments.length===1&&Cie(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},MWe=function e(t,n){return t===1?n:Gq(function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];var o=a.filter(function(l){return l!==kie}).length;return o>=t?n.apply(void 0,a):e(t-o,Gq(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var d=a.map(function(f){return Cie(f)?c.shift():f});return n.apply(void 0,AWe(d).concat(c))}))})},PN=function(t){return MWe(t.length,t)},rI=function(t,n){for(var r=[],a=t;a<n;++a)r[a-t]=a;return r},RWe=PN(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),DWe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return OWe;var a=n.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},sI=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},_ie=function(t){var n=null,r=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n&&i.every(function(l,c){return l===n[c]})||(n=i,r=t.apply(void 0,i)),r}};function LWe(e){var t;return e===0?t=1:t=Math.floor(new bn(e).abs().log(10).toNumber())+1,t}function $We(e,t,n){for(var r=new bn(e),a=0,i=[];r.lt(t)&&a<1e5;)i.push(r.toNumber()),r=r.add(n),a++;return i}var FWe=PN(function(e,t,n){var r=+e,a=+t;return r+n*(a-r)}),zWe=PN(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),BWe=PN(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const TN={rangeStep:$We,getDigitCount:LWe,interpolateNumber:FWe,uninterpolateNumber:zWe,uninterpolateTruncation:BWe};function aI(e){return qWe(e)||HWe(e)||Aie(e)||UWe()}function UWe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1518In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HWe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qWe(e){if(Array.isArray(e))return iI(e)}function Rx(e,t){return GWe(e)||WWe(e,t)||Aie(e,t)||VWe()}function VWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1519In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aie(e,t){if(e){if(typeof e=="string")return iI(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 iI(e,t)}}function iI(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 WWe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){a=!0,i=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(a)throw i}}return n}}function GWe(e){if(Array.isArray(e))return e}function Eie(e){var t=Rx(e,2),n=t[0],r=t[1],a=n,i=r;return n>r&&(a=r,i=n),[a,i]}function Pie(e,t,n){if(e.lte(0))return new bn(0);var r=TN.getDigitCount(e.toNumber()),a=new bn(10).pow(r),i=e.div(a),o=r!==1?.05:.1,l=new bn(Math.ceil(i.div(o).toNumber())).add(n).mul(o),c=l.mul(a);return t?c:new bn(Math.ceil(c))}function KWe(e,t,n){var r=1,a=new bn(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(r=new bn(10).pow(TN.getDigitCount(e)-1),a=new bn(Math.floor(a.div(r).toNumber())).mul(r)):i>1&&(a=new bn(Math.floor(e)))}else e===0?a=new bn(Math.floor((t-1)/2)):n||(a=new bn(Math.floor(e)));var o=Math.floor((t-1)/2),l=DWe(RWe(function(c){return a.add(new bn(c-o).mul(r)).toNumber()}),rI);return l(0,t)}function Tie(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new bn(0),tickMin:new bn(0),tickMax:new bn(0)};var i=Pie(new bn(t).sub(e).div(n-1),r,a),o;e<=0&&t>=0?o=new bn(0):(o=new bn(e).add(t).div(2),o=o.sub(new bn(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new bn(t).sub(o).div(i).toNumber()),u=l+c+1;return u>n?Tie(e,t,n,r,a+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:i,tickMin:o.sub(new bn(l).mul(i)),tickMax:o.add(new bn(c).mul(i))})}function YWe(e){var t=Rx(e,2),n=t[0],r=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),l=Eie([n,r]),c=Rx(l,2),u=c[0],d=c[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(aI(rI(0,a-1).map(function(){return 1/0}))):[].concat(aI(rI(0,a-1).map(function(){return-1/0})),[d]);return n>r?sI(f):f}if(u===d)return KWe(u,a,i);var m=Tie(u,d,o,i),p=m.step,v=m.tickMin,y=m.tickMax,x=TN.rangeStep(v,y.add(new bn(.1).mul(p)),p);return n>r?sI(x):x}function XWe(e,t){var n=Rx(e,2),r=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Eie([r,a]),l=Rx(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[r,a];if(c===u)return[c];var d=Math.max(t,2),f=Pie(new bn(u).sub(c).div(d-1),i,0),m=[].concat(aI(TN.rangeStep(new bn(c),new bn(u).sub(new bn(.99).mul(f)),f)),[u]);return r>a?sI(m):m}var QWe=_ie(YWe),ZWe=_ie(XWe),JWe="Invariant failed";function kd(e,t){throw new Error(JWe)}var eGe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function lm(e){"@babel/helpers - typeof";return lm=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},lm(e)}function ij(){return ij=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},ij.apply(this,arguments)}function tGe(e,t){return aGe(e)||sGe(e,t)||rGe(e,t)||nGe()}function nGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1520In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rGe(e,t){if(e){if(typeof e=="string")return Kq(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 Kq(e,t)}}function Kq(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 sGe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function aGe(e){if(Array.isArray(e))return e}function iGe(e,t){if(e==null)return{};var n=oGe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oGe(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 lGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cGe(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,Mie(r.key),r)}}function uGe(e,t,n){return t&&cGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dGe(e,t,n){return t=oj(t),fGe(e,Iie()?Reflect.construct(t,n||[],oj(e).constructor):t.apply(e,n))}function fGe(e,t){if(t&&(lm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hGe(e)}function hGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Iie=function(){return!!e})()}function oj(e){return oj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oj(e)}function mGe(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&&oI(e,t)}function oI(e,t){return oI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},oI(e,t)}function Oie(e,t,n){return t=Mie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mie(e){var t=pGe(e,"string");return lm(t)=="symbol"?t:t+""}function pGe(e,t){if(lm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var n0=(function(e){function t(){return lGe(this,t),dGe(this,t,arguments)}return mGe(t,e),uGe(t,[{key:"render",value:function(){var r=this.props,a=r.offset,i=r.layout,o=r.width,l=r.dataKey,c=r.data,u=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,m=iGe(r,eGe),p=mt(m,!1);this.props.direction==="x"&&d.type!=="number"&&kd();var v=c.map(function(y){var x=u(y,l),w=x.x,N=x.y,S=x.value,_=x.errorVal;if(!_)return null;var k=[],C,E;if(Array.isArray(_)){var O=tGe(_,2);C=O[0],E=O[1]}else C=E=_;if(i==="vertical"){var P=d.scale,R=N+a,T=R+o,D=R-o,z=P(S-C),I=P(S+E);k.push({x1:I,y1:T,x2:I,y2:D}),k.push({x1:z,y1:R,x2:I,y2:R}),k.push({x1:z,y1:T,x2:z,y2:D})}else if(i==="horizontal"){var F=f.scale,U=w+a,H=U-o,q=U+o,B=F(S-C),L=F(S+E);k.push({x1:H,y1:L,x2:q,y2:L}),k.push({x1:U,y1:B,x2:U,y2:L}),k.push({x1:H,y1:B,x2:q,y2:B})}return X.createElement(sn,ij({className:"recharts-errorBar",key:"bar-".concat(k.map(function(V){return"".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))},p),k.map(function(V){return X.createElement("line",ij({},V,{key:"line-".concat(V.x1,"-").concat(V.x2,"-").concat(V.y1,"-").concat(V.y2)}))}))});return X.createElement(sn,{className:"recharts-errorBars"},v)}}])})(X.Component);Oie(n0,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});Oie(n0,"displayName","ErrorBar");function Dx(e){"@babel/helpers - typeof";return Dx=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},Dx(e)}function Yq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yq(Object(n),!0).forEach(function(r){gGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gGe(e,t,n){return t=xGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xGe(e){var t=yGe(e,"string");return Dx(t)=="symbol"?t:t+""}function yGe(e,t){if(Dx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rie=function(t){var n=t.children,r=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=ya(n,fh);if(!o)return null;var l=fh.defaultProps,c=l!==void 0?vu(vu({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(r||[]).reduce(function(d,f){var m=f.item,p=f.props,v=p.sectors||p.data||[];return d.concat(v.map(function(y){return{type:o.props.iconType||m.props.legendType,value:y.name,color:y.fill,payload:y}}))},[]):u=(r||[]).map(function(d){var f=d.item,m=f.type.defaultProps,p=m!==void 0?vu(vu({},m),f.props):{},v=p.dataKey,y=p.name,x=p.legendType,w=p.hide;return{inactive:w,dataKey:v,type:c.iconType||x||"square",color:H3(f),value:y||v,payload:p}}),vu(vu(vu({},c),fh.getWithHeight(o,a)),{},{payload:u,item:o})};function Lx(e){"@babel/helpers - typeof";return Lx=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},Lx(e)}function Xq(e){return jGe(e)||wGe(e)||bGe(e)||vGe()}function vGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1521In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bGe(e,t){if(e){if(typeof e=="string")return lI(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 lI(e,t)}}function wGe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jGe(e){if(Array.isArray(e))return lI(e)}function lI(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 Qq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ir(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qq(Object(n),!0).forEach(function(r){hh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qq(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hh(e,t,n){return t=NGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NGe(e){var t=SGe(e,"string");return Lx(t)=="symbol"?t:t+""}function SGe(e,t){if(Lx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ir(e,t,n){return Tt(e)||Tt(t)?n:Or(t)?Ca(e,t,n):Ct(t)?t(e):n}function Dg(e,t,n,r){var a=jWe(e,function(l){return Ir(l,t)});if(n==="number"){var i=a.filter(function(l){return ze(l)||parseFloat(l)});return i.length?[EN(i),AN(i)]:[1/0,-1/0]}var o=r?a.filter(function(l){return!Tt(l)}):a;return o.map(function(l){return Or(l)||l instanceof Date?l:""})}var kGe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var d=u>0?a[u-1].coordinate:a[l-1].coordinate,f=a[u].coordinate,m=u>=l-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(Ts(f-d)!==Ts(m-f)){var v=[];if(Ts(m-f)===Ts(c[1]-c[0])){p=m;var y=f+c[1]-c[0];v[0]=Math.min(y,(y+d)/2),v[1]=Math.max(y,(y+d)/2)}else{p=d;var x=m+c[1]-c[0];v[0]=Math.min(f,(x+f)/2),v[1]=Math.max(f,(x+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=v[0]&&t<=v[1]){o=a[u].index;break}}else{var N=Math.min(d,m),S=Math.max(d,m);if(t>(N+f)/2&&t<=(S+f)/2){o=a[u].index;break}}}else for(var _=0;_<l;_++)if(_===0&&t<=(r[_].coordinate+r[_+1].coordinate)/2||_>0&&_<l-1&&t>(r[_].coordinate+r[_-1].coordinate)/2&&t<=(r[_].coordinate+r[_+1].coordinate)/2||_===l-1&&t>(r[_].coordinate+r[_-1].coordinate)/2){o=r[_].index;break}return o},H3=function(t){var n,r=t,a=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ir(ir({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},CGe=function(t){var n=t.barSize,r=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var d=i[l[c]].stackGroups,f=Object.keys(d),m=0,p=f.length;m<p;m++){var v=d[f[m]],y=v.items,x=v.cateAxisId,w=y.filter(function(E){return nl(E.type).indexOf("Bar")>=0});if(w&&w.length){var N=w[0].type.defaultProps,S=N!==void 0?ir(ir({},N),w[0].props):w[0].props,_=S.barSize,k=S[x];o[k]||(o[k]=[]);var C=Tt(_)?n:_;o[k].push({item:w[0],stackList:w.slice(1),barSize:Tt(C)?void 0:Is(C,r,0)})}}return o},_Ge=function(t){var n=t.barGap,r=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=Is(n,a,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var m=!1,p=a/c,v=o.reduce(function(_,k){return _+k.barSize||0},0);v+=(c-1)*u,v>=a&&(v-=(c-1)*u,u=0),v>=a&&p>0&&(m=!0,p*=.9,v=c*p);var y=(a-v)/2>>0,x={offset:y-u,size:0};d=o.reduce(function(_,k){var C={item:k.item,position:{offset:x.offset+x.size+u,size:m?p:k.barSize}},E=[].concat(Xq(_),[C]);return x=E[E.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function(O){E.push({item:O,position:x})}),E},f)}else{var w=Is(r,a,0,!0);a-2*w-(c-1)*u<=0&&(u=0);var N=(a-2*w-(c-1)*u)/c;N>1&&(N>>=0);var S=l===+l?Math.min(N,l):N;d=o.reduce(function(_,k,C){var E=[].concat(Xq(_),[{item:k.item,position:{offset:w+(N+u)*C+(N-S)/2,size:S}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function(O){E.push({item:O,position:E[E.length-1].position})}),E},f)}return d},AGe=function(t,n,r,a){var i=r.children,o=r.width,l=r.margin,c=o-(l.left||0)-(l.right||0),u=Rie({children:i,legendWidth:c});if(u){var d=a||{},f=d.width,m=d.height,p=u.align,v=u.verticalAlign,y=u.layout;if((y==="vertical"||y==="horizontal"&&v==="middle")&&p!=="center"&&ze(t[p]))return ir(ir({},t),{},hh({},p,t[p]+(f||0)));if((y==="horizontal"||y==="vertical"&&p==="center")&&v!=="middle"&&ze(t[v]))return ir(ir({},t),{},hh({},v,t[v]+(m||0)))}return t},EGe=function(t,n,r){return Tt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Die=function(t,n,r,a,i){var o=n.props.children,l=_a(o,n0).filter(function(u){return EGe(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=Ir(d,r);if(Tt(f))return u;var m=Array.isArray(f)?[EN(f),AN(f)]:[f,f],p=c.reduce(function(v,y){var x=Ir(d,y,0),w=m[0]-Math.abs(Array.isArray(x)?x[0]:x),N=m[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(w,v[0]),Math.max(N,v[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},PGe=function(t,n,r,a,i){var o=n.map(function(l){return Die(t,l,r,i,a)}).filter(function(l){return!Tt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},Lie=function(t,n,r,a,i){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&Die(t,c,u,a)||Dg(t,u,r,i)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var d=0,f=u.length;d<f;d++)l[u[d]]||(l[u[d]]=!0,c.push(u[d]));return c},[])},$ie=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Fie=function(t,n,r,a){if(a)return t.map(function(c){return c.coordinate});var i,o,l=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate});return i||l.push(n),o||l.push(r),l},Zo=function(t,n,r){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||r)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Ts(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var m=i?i.indexOf(f):f;return{coordinate:a(m)+u,value:f,offset:u}});return d.filter(function(f){return!Xy(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,m){return{coordinate:a(f)+u,value:f,index:m,offset:u}}):a.ticks&&!r?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,m){return{coordinate:a(f)+u,value:i?i[f]:f,index:m,offset:u}})},zE=new WeakMap,hb=function(t,n){if(typeof n!="function")return t;zE.has(t)||zE.set(t,new WeakMap);var r=zE.get(t);if(r.has(n))return r.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,a),a},zie=function(t,n,r){var a=t.scale,i=t.type,o=t.layout,l=t.axisType;if(a==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Ix(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:tj(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Rg(),realScaleType:"point"}:i==="category"?{scale:Ix(),realScaleType:"band"}:{scale:tj(),realScaleType:"linear"};if(wd(a)){var c="scale".concat(hN(a));return{scale:(Dq[c]||Rg)(),realScaleType:Dq[c]?c:"point"}}return Ct(a)?{scale:a}:{scale:Rg(),realScaleType:"point"}},Zq=1e-4,Bie=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,a=t.range(),i=Math.min(a[0],a[1])-Zq,o=Math.max(a[0],a[1])+Zq,l=t(n[0]),c=t(n[r-1]);(l<i||l>o||c<i||c>o)&&t.domain([n[0],n[r-1]])}},TGe=function(t,n){if(!t)return null;for(var r=0,a=t.length;r<a;r++)if(t[r].item===n)return t[r].position;return null},IGe=function(t,n){if(!n||n.length!==2||!ze(n[0])||!ze(n[1]))return t;var r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!ze(t[0])||t[0]<r)&&(i[0]=r),(!ze(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<r&&(i[1]=r),i},OGe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0,l=0;l<n;++l){var c=Xy(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=i,t[l][r][1]=i+c,i=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1])}},MGe=function(t){var n=t.length;if(!(n<=0))for(var r=0,a=t[0].length;r<a;++r)for(var i=0,o=0;o<n;++o){var l=Xy(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=i,t[o][r][1]=i+l,i=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},RGe={sign:OGe,expand:W9e,none:em,silhouette:G9e,wiggle:K9e,positive:MGe},DGe=function(t,n,r){var a=n.map(function(l){return l.props.dataKey}),i=RGe[r],o=V9e().keys(a).value(function(l,c){return+Ir(l,c,0)}).order(z4).offset(i);return o(t)},LGe=function(t,n,r,a,i,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(f,m){var p,v=(p=m.type)!==null&&p!==void 0&&p.defaultProps?ir(ir({},m.type.defaultProps),m.props):m.props,y=v.stackId,x=v.hide;if(x)return f;var w=v[r],N=f[w]||{hasStack:!1,stackGroups:{}};if(Or(y)){var S=N.stackGroups[y]||{numericAxisId:r,cateAxisId:a,items:[]};S.items.push(m),N.hasStack=!0,N.stackGroups[y]=S}else N.stackGroups[ep("_stackId_")]={numericAxisId:r,cateAxisId:a,items:[m]};return ir(ir({},f),{},hh({},w,N))},c),d={};return Object.keys(u).reduce(function(f,m){var p=u[m];if(p.hasStack){var v={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(y,x){var w=p.stackGroups[x];return ir(ir({},y),{},hh({},x,{numericAxisId:r,cateAxisId:a,items:w.items,stackedData:DGe(t,w.items,i)}))},v)}return ir(ir({},f),{},hh({},m,p))},d)},Uie=function(t,n){var r=n.realScaleType,a=n.type,i=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=QWe(u,i,l);return t.domain([EN(d),AN(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),m=ZWe(f,i,l);return{niceTicks:m}}return null};function Jq(e){var t=e.axis,n=e.ticks,r=e.bandSize,a=e.entry,i=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Tt(a[t.dataKey])){var l=zw(n,"value",a[t.dataKey]);if(l)return l.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var c=Ir(a,Tt(o)?t.dataKey:o);return Tt(c)?null:t.scale(c)}var e7=function(t){var n=t.axis,r=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+a:null;var c=Ir(o,n.dataKey,n.domain[l]);return Tt(c)?null:n.scale(c)-i/2+a},$Ge=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var a=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return a<=0&&i>=0?0:i<0?i:a}return r[0]},FGe=function(t,n){var r,a=(r=t.type)!==null&&r!==void 0&&r.defaultProps?ir(ir({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Or(i)){var o=n[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},zGe=function(t){return t.reduce(function(n,r){return[EN(r.concat([n[0]]).filter(ze)),AN(r.concat([n[1]]).filter(ze))]},[1/0,-1/0])},Hie=function(t,n,r){return Object.keys(t).reduce(function(a,i){var o=t[i],l=o.stackedData,c=l.reduce(function(u,d){var f=zGe(d.slice(n,r+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},t7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,n7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cI=function(t,n,r){if(Ct(t))return t(n,r);if(!Array.isArray(t))return n;var a=[];if(ze(t[0]))a[0]=r?t[0]:Math.min(t[0],n[0]);else if(t7.test(t[0])){var i=+t7.exec(t[0])[1];a[0]=n[0]-i}else Ct(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(ze(t[1]))a[1]=r?t[1]:Math.max(t[1],n[1]);else if(n7.test(t[1])){var o=+n7.exec(t[1])[1];a[1]=n[1]+o}else Ct(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},lj=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!r||a>0)return a}if(t&&n&&n.length>=2){for(var i=b3(n,function(f){return f.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var u=i[l],d=i[l-1];o=Math.min((u.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},r7=function(t,n,r){return!t||!t.length||t0(t,Ca(r,"type.defaultProps.domain"))?n:t},qie=function(t,n){var r=t.type.defaultProps?ir(ir({},t.type.defaultProps),t.props):t.props,a=r.dataKey,i=r.name,o=r.unit,l=r.formatter,c=r.tooltipType,u=r.chartType,d=r.hide;return ir(ir({},mt(t,!1)),{},{dataKey:a,unit:o,formatter:l,name:i||a,color:H3(t),value:Ir(n,a),type:c,payload:n,chartType:u,hide:d})};function $x(e){"@babel/helpers - typeof";return $x=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},$x(e)}function s7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ho(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?s7(Object(n),!0).forEach(function(r){Vie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vie(e,t,n){return t=BGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BGe(e){var t=UGe(e,"string");return $x(t)=="symbol"?t:t+""}function UGe(e,t){if($x(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($x(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HGe(e,t){return GGe(e)||WGe(e,t)||VGe(e,t)||qGe()}function qGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1522In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VGe(e,t){if(e){if(typeof e=="string")return a7(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 a7(e,t)}}function a7(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 WGe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function GGe(e){if(Array.isArray(e))return e}var cj=Math.PI/180,KGe=function(t){return t*180/Math.PI},On=function(t,n,r,a){return{x:t+Math.cos(-cj*a)*r,y:n+Math.sin(-cj*a)*r}},Wie=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},YGe=function(t,n,r,a,i){var o=t.width,l=t.height,c=t.startAngle,u=t.endAngle,d=Is(t.cx,o,o/2),f=Is(t.cy,l,l/2),m=Wie(o,l,r),p=Is(t.innerRadius,m,0),v=Is(t.outerRadius,m,m*.8),y=Object.keys(n);return y.reduce(function(x,w){var N=n[w],S=N.domain,_=N.reversed,k;if(Tt(N.range))a==="angleAxis"?k=[c,u]:a==="radiusAxis"&&(k=[p,v]),_&&(k=[k[1],k[0]]);else{k=N.range;var C=k,E=HGe(C,2);c=E[0],u=E[1]}var O=zie(N,i),P=O.realScaleType,R=O.scale;R.domain(S).range(k),Bie(R);var T=Uie(R,Ho(Ho({},N),{},{realScaleType:P})),D=Ho(Ho(Ho({},N),T),{},{range:k,radius:v,realScaleType:P,scale:R,cx:d,cy:f,innerRadius:p,outerRadius:v,startAngle:c,endAngle:u});return Ho(Ho({},x),{},Vie({},w,D))},{})},XGe=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(a-o,2))},QGe=function(t,n){var r=t.x,a=t.y,i=n.cx,o=n.cy,l=XGe({x:r,y:a},{x:i,y:o});if(l<=0)return{radius:l};var c=(r-i)/l,u=Math.acos(c);return a>o&&(u=2*Math.PI-u),{radius:l,angle:KGe(u),angleInRadian:u}},ZGe=function(t){var n=t.startAngle,r=t.endAngle,a=Math.floor(n/360),i=Math.floor(r/360),o=Math.min(a,i);return{startAngle:n-o*360,endAngle:r-o*360}},JGe=function(t,n){var r=n.startAngle,a=n.endAngle,i=Math.floor(r/360),o=Math.floor(a/360),l=Math.min(i,o);return t+l*360},i7=function(t,n){var r=t.x,a=t.y,i=QGe({x:r,y:a},n),o=i.radius,l=i.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var d=ZGe(n),f=d.startAngle,m=d.endAngle,p=l,v;if(f<=m){for(;p>m;)p-=360;for(;p<f;)p+=360;v=p>=f&&p<=m}else{for(;p>f;)p-=360;for(;p<m;)p+=360;v=p>=m&&p<=f}return v?Ho(Ho({},n),{},{radius:o,angle:JGe(p,n)}):null},Gie=function(t){return!b.isValidElement(t)&&!Ct(t)&&typeof t!="boolean"?t.className:""};function Fx(e){"@babel/helpers - typeof";return Fx=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},Fx(e)}var eKe=["offset"];function tKe(e){return aKe(e)||sKe(e)||rKe(e)||nKe()}function nKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1523In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rKe(e,t){if(e){if(typeof e=="string")return uI(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 uI(e,t)}}function sKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aKe(e){if(Array.isArray(e))return uI(e)}function uI(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 iKe(e,t){if(e==null)return{};var n=oKe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oKe(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 o7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o7(Object(n),!0).forEach(function(r){lKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lKe(e,t,n){return t=cKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cKe(e){var t=uKe(e,"string");return Fx(t)=="symbol"?t:t+""}function uKe(e,t){if(Fx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zx(){return zx=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},zx.apply(this,arguments)}var dKe=function(t){var n=t.value,r=t.formatter,a=Tt(t.children)?n:t.children;return Ct(r)?r(a):a},fKe=function(t,n){var r=Ts(n-t),a=Math.min(Math.abs(n-t),360);return r*a},hKe=function(t,n,r){var a=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,m=c.outerRadius,p=c.startAngle,v=c.endAngle,y=c.clockWise,x=(f+m)/2,w=fKe(p,v),N=w>=0?1:-1,S,_;a==="insideStart"?(S=p+N*o,_=y):a==="insideEnd"?(S=v-N*o,_=!y):a==="end"&&(S=v+N*o,_=y),_=w<=0?_:!_;var k=On(u,d,x,S),C=On(u,d,x,S+(_?1:-1)*359),E="M".concat(k.x,",").concat(k.y,`
1524    A`).concat(x,",").concat(x,",0,1,").concat(_?0:1,`,
1525    `).concat(C.x,",").concat(C.y),O=Tt(t.id)?ep("recharts-radial-line-"):t.id;return X.createElement("text",zx({},r,{dominantBaseline:"central",className:Mt("recharts-radial-bar-label",l)}),X.createElement("defs",null,X.createElement("path",{id:O,d:E})),X.createElement("textPath",{xlinkHref:"#".concat(O)},n))},mKe=function(t){var n=t.viewBox,r=t.offset,a=t.position,i=n,o=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,m=(d+f)/2;if(a==="outside"){var p=On(o,l,u+r,m),v=p.x,y=p.y;return{x:v,y,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var x=(c+u)/2,w=On(o,l,x,m),N=w.x,S=w.y;return{x:N,y:S,textAnchor:"middle",verticalAnchor:"middle"}},pKe=function(t){var n=t.viewBox,r=t.parentViewBox,a=t.offset,i=t.position,o=n,l=o.x,c=o.y,u=o.width,d=o.height,f=d>=0?1:-1,m=f*a,p=f>0?"end":"start",v=f>0?"start":"end",y=u>=0?1:-1,x=y*a,w=y>0?"end":"start",N=y>0?"start":"end";if(i==="top"){var S={x:l+u/2,y:c-f*a,textAnchor:"middle",verticalAnchor:p};return Tr(Tr({},S),r?{height:Math.max(c-r.y,0),width:u}:{})}if(i==="bottom"){var _={x:l+u/2,y:c+d+m,textAnchor:"middle",verticalAnchor:v};return Tr(Tr({},_),r?{height:Math.max(r.y+r.height-(c+d),0),width:u}:{})}if(i==="left"){var k={x:l-x,y:c+d/2,textAnchor:w,verticalAnchor:"middle"};return Tr(Tr({},k),r?{width:Math.max(k.x-r.x,0),height:d}:{})}if(i==="right"){var C={x:l+u+x,y:c+d/2,textAnchor:N,verticalAnchor:"middle"};return Tr(Tr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:d}:{})}var E=r?{width:u,height:d}:{};return i==="insideLeft"?Tr({x:l+x,y:c+d/2,textAnchor:N,verticalAnchor:"middle"},E):i==="insideRight"?Tr({x:l+u-x,y:c+d/2,textAnchor:w,verticalAnchor:"middle"},E):i==="insideTop"?Tr({x:l+u/2,y:c+m,textAnchor:"middle",verticalAnchor:v},E):i==="insideBottom"?Tr({x:l+u/2,y:c+d-m,textAnchor:"middle",verticalAnchor:p},E):i==="insideTopLeft"?Tr({x:l+x,y:c+m,textAnchor:N,verticalAnchor:v},E):i==="insideTopRight"?Tr({x:l+u-x,y:c+m,textAnchor:w,verticalAnchor:v},E):i==="insideBottomLeft"?Tr({x:l+x,y:c+d-m,textAnchor:N,verticalAnchor:p},E):i==="insideBottomRight"?Tr({x:l+u-x,y:c+d-m,textAnchor:w,verticalAnchor:p},E):Jm(i)&&(ze(i.x)||Tu(i.x))&&(ze(i.y)||Tu(i.y))?Tr({x:l+Is(i.x,u),y:c+Is(i.y,d),textAnchor:"end",verticalAnchor:"end"},E):Tr({x:l+u/2,y:c+d/2,textAnchor:"middle",verticalAnchor:"middle"},E)},gKe=function(t){return"cx"in t&&ze(t.cx)};function Hr(e){var t=e.offset,n=t===void 0?5:t,r=iKe(e,eKe),a=Tr({offset:n},r),i=a.viewBox,o=a.position,l=a.value,c=a.children,u=a.content,d=a.className,f=d===void 0?"":d,m=a.textBreakAll;if(!i||Tt(l)&&Tt(c)&&!b.isValidElement(u)&&!Ct(u))return null;if(b.isValidElement(u))return b.cloneElement(u,a);var p;if(Ct(u)){if(p=b.createElement(u,a),b.isValidElement(p))return p}else p=dKe(a);var v=gKe(i),y=mt(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return hKe(a,p,y);var x=v?mKe(a):pKe(a);return X.createElement(Nd,zx({className:Mt("recharts-label",f)},y,x,{breakAll:m}),p)}Hr.displayName="Label";var Kie=function(t){var n=t.cx,r=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,m=t.y,p=t.top,v=t.left,y=t.width,x=t.height,w=t.clockWise,N=t.labelViewBox;if(N)return N;if(ze(y)&&ze(x)){if(ze(f)&&ze(m))return{x:f,y:m,width:y,height:x};if(ze(p)&&ze(v))return{x:p,y:v,width:y,height:x}}return ze(f)&&ze(m)?{x:f,y:m,width:0,height:0}:ze(n)&&ze(r)?{cx:n,cy:r,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:d||c||l||0,clockWise:w}:t.viewBox?t.viewBox:{}},xKe=function(t,n){return t?t===!0?X.createElement(Hr,{key:"label-implicit",viewBox:n}):Or(t)?X.createElement(Hr,{key:"label-implicit",viewBox:n,value:t}):b.isValidElement(t)?t.type===Hr?b.cloneElement(t,{key:"label-implicit",viewBox:n}):X.createElement(Hr,{key:"label-implicit",content:t,viewBox:n}):Ct(t)?X.createElement(Hr,{key:"label-implicit",content:t,viewBox:n}):Jm(t)?X.createElement(Hr,zx({viewBox:n},t,{key:"label-implicit"})):null:null},yKe=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 a=t.children,i=Kie(t),o=_a(a,Hr).map(function(c,u){return b.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!r)return o;var l=xKe(t.label,n||i);return[l].concat(tKe(o))};Hr.parseViewBox=Kie;Hr.renderCallByParent=yKe;var BE,l7;function vKe(){if(l7)return BE;l7=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return BE=e,BE}var bKe=vKe();const wKe=tn(bKe);function Bx(e){"@babel/helpers - typeof";return Bx=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},Bx(e)}var jKe=["valueAccessor"],NKe=["data","dataKey","clockWise","id","textBreakAll"];function SKe(e){return AKe(e)||_Ke(e)||CKe(e)||kKe()}function kKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1526In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CKe(e,t){if(e){if(typeof e=="string")return dI(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 dI(e,t)}}function _Ke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function AKe(e){if(Array.isArray(e))return dI(e)}function dI(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 uj(){return uj=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},uj.apply(this,arguments)}function c7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function u7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?c7(Object(n),!0).forEach(function(r){EKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EKe(e,t,n){return t=PKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PKe(e){var t=TKe(e,"string");return Bx(t)=="symbol"?t:t+""}function TKe(e,t){if(Bx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d7(e,t){if(e==null)return{};var n=IKe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IKe(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 OKe=function(t){return Array.isArray(t.value)?wKe(t.value):t.value};function sl(e){var t=e.valueAccessor,n=t===void 0?OKe:t,r=d7(e,jKe),a=r.data,i=r.dataKey,o=r.clockWise,l=r.id,c=r.textBreakAll,u=d7(r,NKe);return!a||!a.length?null:X.createElement(sn,{className:"recharts-label-list"},a.map(function(d,f){var m=Tt(i)?n(d,f):Ir(d&&d.payload,i),p=Tt(l)?{}:{id:"".concat(l,"-").concat(f)};return X.createElement(Hr,uj({},mt(d,!0),u,p,{parentViewBox:d.parentViewBox,value:m,textBreakAll:c,viewBox:Hr.parseViewBox(Tt(o)?d:u7(u7({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}sl.displayName="LabelList";function MKe(e,t){return e?e===!0?X.createElement(sl,{key:"labelList-implicit",data:t}):X.isValidElement(e)||Ct(e)?X.createElement(sl,{key:"labelList-implicit",data:t,content:e}):Jm(e)?X.createElement(sl,uj({data:t},e,{key:"labelList-implicit"})):null:null}function RKe(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,a=_a(r,sl).map(function(o,l){return b.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return a;var i=MKe(e.label,t);return[i].concat(SKe(a))}sl.renderCallByParent=RKe;function Ux(e){"@babel/helpers - typeof";return Ux=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},Ux(e)}function fI(){return fI=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},fI.apply(this,arguments)}function f7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function h7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f7(Object(n),!0).forEach(function(r){DKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DKe(e,t,n){return t=LKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LKe(e){var t=$Ke(e,"string");return Ux(t)=="symbol"?t:t+""}function $Ke(e,t){if(Ux(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ux(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FKe=function(t,n){var r=Ts(n-t),a=Math.min(Math.abs(n-t),359.999);return r*a},mb=function(t){var n=t.cx,r=t.cy,a=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,d=c*(l?1:-1)+a,f=Math.asin(c/d)/cj,m=u?i:i+o*f,p=On(n,r,d,m),v=On(n,r,a,m),y=u?i-o*f:i,x=On(n,r,d*Math.cos(f*cj),y);return{center:p,circleTangency:v,lineTangency:x,theta:f}},Yie=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=FKe(o,l),u=o+c,d=On(n,r,i,o),f=On(n,r,i,u),m="M ".concat(d.x,",").concat(d.y,`
1527    A `).concat(i,",").concat(i,`,0,
1528    `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`,
1529    `).concat(f.x,",").concat(f.y,`
1530  `);if(a>0){var p=On(n,r,a,o),v=On(n,r,a,u);m+="L ".concat(v.x,",").concat(v.y,`
1531            A `).concat(a,",").concat(a,`,0,
1532            `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`,
1533            `).concat(p.x,",").concat(p.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},zKe=function(t){var n=t.cx,r=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=Ts(d-u),m=mb({cx:n,cy:r,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:c}),p=m.circleTangency,v=m.lineTangency,y=m.theta,x=mb({cx:n,cy:r,radius:i,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:c}),w=x.circleTangency,N=x.lineTangency,S=x.theta,_=c?Math.abs(u-d):Math.abs(u-d)-y-S;if(_<0)return l?"M ".concat(v.x,",").concat(v.y,`
1534        a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
1535        a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
1536      `):Yie({cx:n,cy:r,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d});var k="M ".concat(v.x,",").concat(v.y,`
1537    A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
1538    A`).concat(i,",").concat(i,",0,").concat(+(_>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,`
1539    A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(N.x,",").concat(N.y,`
1540  `);if(a>0){var C=mb({cx:n,cy:r,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),E=C.circleTangency,O=C.lineTangency,P=C.theta,R=mb({cx:n,cy:r,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),T=R.circleTangency,D=R.lineTangency,z=R.theta,I=c?Math.abs(u-d):Math.abs(u-d)-P-z;if(I<0&&o===0)return"".concat(k,"L").concat(n,",").concat(r,"Z");k+="L".concat(D.x,",").concat(D.y,`
1541      A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,`
1542      A`).concat(a,",").concat(a,",0,").concat(+(I>180),",").concat(+(f>0),",").concat(E.x,",").concat(E.y,`
1543      A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else k+="L".concat(n,",").concat(r,"Z");return k},BKe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Xie=function(t){var n=h7(h7({},BKe),t),r=n.cx,a=n.cy,i=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,m=n.className;if(o<i||d===f)return null;var p=Mt("recharts-sector",m),v=o-i,y=Is(l,v,0,!0),x;return y>0&&Math.abs(d-f)<360?x=zKe({cx:r,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(y,v/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:d,endAngle:f}):x=Yie({cx:r,cy:a,innerRadius:i,outerRadius:o,startAngle:d,endAngle:f}),X.createElement("path",fI({},mt(n,!0),{className:p,d:x,role:"img"}))};function Hx(e){"@babel/helpers - typeof";return Hx=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},Hx(e)}function hI(){return hI=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},hI.apply(this,arguments)}function m7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function p7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m7(Object(n),!0).forEach(function(r){UKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UKe(e,t,n){return t=HKe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HKe(e){var t=qKe(e,"string");return Hx(t)=="symbol"?t:t+""}function qKe(e,t){if(Hx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g7={curveBasisClosed:M9e,curveBasisOpen:R9e,curveBasis:O9e,curveBumpX:v9e,curveBumpY:b9e,curveLinearClosed:D9e,curveLinear:pN,curveMonotoneX:L9e,curveMonotoneY:$9e,curveNatural:F9e,curveStep:z9e,curveStepAfter:U9e,curveStepBefore:B9e},pb=function(t){return t.x===+t.x&&t.y===+t.y},ng=function(t){return t.x},rg=function(t){return t.y},VKe=function(t,n){if(Ct(t))return t;var r="curve".concat(hN(t));return(r==="curveMonotone"||r==="curveBump")&&n?g7["".concat(r).concat(n==="vertical"?"Y":"X")]:g7[r]||pN},WKe=function(t){var n=t.type,r=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,d=VKe(r,l),f=u?i.filter(function(y){return pb(y)}):i,m;if(Array.isArray(o)){var p=u?o.filter(function(y){return pb(y)}):o,v=f.map(function(y,x){return p7(p7({},y),{},{base:p[x]})});return l==="vertical"?m=lb().y(rg).x1(ng).x0(function(y){return y.base.x}):m=lb().x(ng).y1(rg).y0(function(y){return y.base.y}),m.defined(pb).curve(d),m(v)}return l==="vertical"&&ze(o)?m=lb().y(rg).x1(ng).x0(o):ze(o)?m=lb().x(ng).y1(rg).y0(o):m=Qse().x(ng).y(rg),m.defined(pb).curve(d),m(f)},dj=function(t){var n=t.className,r=t.points,a=t.path,i=t.pathRef;if((!r||!r.length)&&!a)return null;var o=r&&r.length?WKe(t):a;return b.createElement("path",hI({},mt(t,!1),Bw(t),{className:Mt("recharts-curve",n),d:o,ref:i}))},UE={exports:{}},HE,x7;function GKe(){if(x7)return HE;x7=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return HE=e,HE}var qE,y7;function KKe(){if(y7)return qE;y7=1;var e=GKe();function t(){}function n(){}return n.resetWarningCache=t,qE=function(){function r(o,l,c,u,d,f){if(f!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},qE}var v7;function YKe(){return v7||(v7=1,UE.exports=KKe()()),UE.exports}var XKe=YKe();const fn=tn(XKe);var QKe=Object.getOwnPropertyNames,ZKe=Object.getOwnPropertySymbols,JKe=Object.prototype.hasOwnProperty;function b7(e,t){return function(r,a,i){return e(r,a,i)&&t(r,a,i)}}function gb(e){return function(n,r,a){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,a);var i=a.cache,o=i.get(n),l=i.get(r);if(o&&l)return o===r&&l===n;i.set(n,r),i.set(r,n);var c=e(n,r,a);return i.delete(n),i.delete(r),c}}function w7(e){return QKe(e).concat(ZKe(e))}var eYe=Object.hasOwn||(function(e,t){return JKe.call(e,t)});function Kd(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var tYe="__v",nYe="__o",rYe="_owner",j7=Object.getOwnPropertyDescriptor,N7=Object.keys;function sYe(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 aYe(e,t){return Kd(e.getTime(),t.getTime())}function iYe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function oYe(e,t){return e===t}function S7(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.entries(),o,l,c=0;(o=i.next())&&!o.done;){for(var u=t.entries(),d=!1,f=0;(l=u.next())&&!l.done;){if(a[f]){f++;continue}var m=o.value,p=l.value;if(n.equals(m[0],p[0],c,f,e,t,n)&&n.equals(m[1],p[1],m[0],p[0],e,t,n)){d=a[f]=!0;break}f++}if(!d)return!1;c++}return!0}var lYe=Kd;function cYe(e,t,n){var r=N7(e),a=r.length;if(N7(t).length!==a)return!1;for(;a-- >0;)if(!Qie(e,t,n,r[a]))return!1;return!0}function sg(e,t,n){var r=w7(e),a=r.length;if(w7(t).length!==a)return!1;for(var i,o,l;a-- >0;)if(i=r[a],!Qie(e,t,n,i)||(o=j7(e,i),l=j7(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function uYe(e,t){return Kd(e.valueOf(),t.valueOf())}function dYe(e,t){return e.source===t.source&&e.flags===t.flags}
1543function k7(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var a=new Array(r),i=e.values(),o,l;(o=i.next())&&!o.done;){for(var c=t.values(),u=!1,d=0;(l=c.next())&&!l.done;){if(!a[d]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){u=a[d]=!0;break}d++}if(!u)return!1}return!0}function fYe(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 hYe(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 Qie(e,t,n,r){return(r===rYe||r===nYe||r===tYe)&&(e.$$typeof||t.$$typeof)?!0:eYe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var mYe="[object Arguments]",pYe="[object Boolean]",gYe="[object Date]",xYe="[object Error]",yYe="[object Map]",vYe="[object Number]",bYe="[object Object]",wYe="[object RegExp]",jYe="[object Set]",NYe="[object String]",SYe="[object URL]",kYe=Array.isArray,C7=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,_7=Object.assign,CYe=Object.prototype.toString.call.bind(Object.prototype.toString);function _Ye(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,m=e.areUrlsEqual;return function(v,y,x){if(v===y)return!0;if(v==null||y==null)return!1;var w=typeof v;if(w!==typeof y)return!1;if(w!=="object")return w==="number"?o(v,y,x):w==="function"?a(v,y,x):!1;var N=v.constructor;if(N!==y.constructor)return!1;if(N===Object)return l(v,y,x);if(kYe(v))return t(v,y,x);if(C7!=null&&C7(v))return f(v,y,x);if(N===Date)return n(v,y,x);if(N===RegExp)return u(v,y,x);if(N===Map)return i(v,y,x);if(N===Set)return d(v,y,x);var S=CYe(v);return S===gYe?n(v,y,x):S===wYe?u(v,y,x):S===yYe?i(v,y,x):S===jYe?d(v,y,x):S===bYe?typeof v.then!="function"&&typeof y.then!="function"&&l(v,y,x):S===SYe?m(v,y,x):S===xYe?r(v,y,x):S===mYe?l(v,y,x):S===pYe||S===vYe||S===NYe?c(v,y,x):!1}}function AYe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,a={areArraysEqual:r?sg:sYe,areDatesEqual:aYe,areErrorsEqual:iYe,areFunctionsEqual:oYe,areMapsEqual:r?b7(S7,sg):S7,areNumbersEqual:lYe,areObjectsEqual:r?sg:cYe,arePrimitiveWrappersEqual:uYe,areRegExpsEqual:dYe,areSetsEqual:r?b7(k7,sg):k7,areTypedArraysEqual:r?sg:fYe,areUrlsEqual:hYe};if(n&&(a=_7({},a,n(a))),t){var i=gb(a.areArraysEqual),o=gb(a.areMapsEqual),l=gb(a.areObjectsEqual),c=gb(a.areSetsEqual);a=_7({},a,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return a}function EYe(e){return function(t,n,r,a,i,o,l){return e(t,n,l)}}function PYe(e){var t=e.circular,n=e.comparator,r=e.createState,a=e.equals,i=e.strict;if(r)return function(c,u){var d=r(),f=d.cache,m=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return n(c,u,{cache:m,equals:a,meta:p,strict:i})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var o={cache:void 0,equals:a,meta:void 0,strict:i};return function(c,u){return n(c,u,o)}}var TYe=Zc();Zc({strict:!0});Zc({circular:!0});Zc({circular:!0,strict:!0});Zc({createInternalComparator:function(){return Kd}});Zc({strict:!0,createInternalComparator:function(){return Kd}});Zc({circular:!0,createInternalComparator:function(){return Kd}});Zc({circular:!0,createInternalComparator:function(){return Kd},strict:!0});function Zc(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,a=e.createState,i=e.strict,o=i===void 0?!1:i,l=AYe(e),c=_Ye(l),u=r?r(c):EYe(c);return PYe({circular:n,comparator:c,createState:a,equals:u,strict:o})}function IYe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function A7(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):IYe(a)};requestAnimationFrame(r)}function mI(e){"@babel/helpers - typeof";return mI=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},mI(e)}function OYe(e){return LYe(e)||DYe(e)||RYe(e)||MYe()}
vendor: 60,607 bytes, lines 1543-1562
1543function MYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1544In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RYe(e,t){if(e){if(typeof e=="string")return E7(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 E7(e,t)}}function E7(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 DYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LYe(e){if(Array.isArray(e))return e}function $Ye(){var e={},t=function(){return null},n=!1,r=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var o=i,l=OYe(o),c=l[0],u=l.slice(1);if(typeof c=="number"){A7(a.bind(null,u),c);return}a(c),A7(a.bind(null,u));return}mI(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,r(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function qx(e){"@babel/helpers - typeof";return qx=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},qx(e)}function P7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function T7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?P7(Object(n),!0).forEach(function(r){Zie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zie(e,t,n){return t=FYe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FYe(e){var t=zYe(e,"string");return qx(t)==="symbol"?t:String(t)}function zYe(e,t){if(qx(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qx(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BYe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,a){return r.filter(function(i){return a.includes(i)})})},UYe=function(t){return t},HYe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Lg=function(t,n){return Object.keys(n).reduce(function(r,a){return T7(T7({},r),{},Zie({},a,t(a,n[a])))},{})},I7=function(t,n,r){return t.map(function(a){return"".concat(HYe(a)," ").concat(n,"ms ").concat(r)}).join(",")};function qYe(e,t){return GYe(e)||WYe(e,t)||Jie(e,t)||VYe()}function VYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1545In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WYe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function GYe(e){if(Array.isArray(e))return e}function KYe(e){return QYe(e)||XYe(e)||Jie(e)||YYe()}function YYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1546In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jie(e,t){if(e){if(typeof e=="string")return pI(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 pI(e,t)}}function XYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QYe(e){if(Array.isArray(e))return pI(e)}function pI(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 fj=1e-4,eoe=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},toe=function(t,n){return t.map(function(r,a){return r*Math.pow(n,a)}).reduce(function(r,a){return r+a})},O7=function(t,n){return function(r){var a=eoe(t,n);return toe(a,r)}},ZYe=function(t,n){return function(r){var a=eoe(t,n),i=[].concat(KYe(a.map(function(o,l){return o*l}).slice(1)),[0]);return toe(i,r)}},M7=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0],i=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,o=1,l=1;break;case"ease":a=.25,i=.1,o=.25,l=1;break;case"ease-in":a=.42,i=0,o=1,l=1;break;case"ease-out":a=.42,i=0,o=.58,l=1;break;case"ease-in-out":a=0,i=0,o=.58,l=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(x){return parseFloat(x)}),d=qYe(u,4);a=d[0],i=d[1],o=d[2],l=d[3]}}}var f=O7(a,o),m=O7(i,l),p=ZYe(a,o),v=function(w){return w>1?1:w<0?0:w},y=function(w){for(var N=w>1?1:w,S=N,_=0;_<8;++_){var k=f(S)-N,C=p(S);if(Math.abs(k-N)<fj||C<fj)return m(S);S=v(S-k/C)}return m(S)};return y.isStepper=!1,y},JYe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,o=t.dt,l=o===void 0?17:o,c=function(d,f,m){var p=-(d-f)*r,v=m*i,y=m+(p-v)*l/1e3,x=m*l/1e3+d;return Math.abs(x-f)<fj&&Math.abs(y)<fj?[f,0]:[x,y]};return c.isStepper=!0,c.dt=l,c},eXe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return M7(a);case"spring":return JYe();default:if(a.split("(")[0]==="cubic-bezier")return M7(a)}return typeof a=="function"?a:null};function Vx(e){"@babel/helpers - typeof";return Vx=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},Vx(e)}function R7(e){return rXe(e)||nXe(e)||noe(e)||tXe()}function tXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1547In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rXe(e){if(Array.isArray(e))return xI(e)}function D7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function es(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D7(Object(n),!0).forEach(function(r){gI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gI(e,t,n){return t=sXe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sXe(e){var t=aXe(e,"string");return Vx(t)==="symbol"?t:String(t)}function aXe(e,t){if(Vx(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vx(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iXe(e,t){return cXe(e)||lXe(e,t)||noe(e,t)||oXe()}function oXe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1548In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function noe(e,t){if(e){if(typeof e=="string")return xI(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 xI(e,t)}}function xI(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 lXe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function cXe(e){if(Array.isArray(e))return e}var hj=function(t,n,r){return t+(n-t)*r},yI=function(t){var n=t.from,r=t.to;return n!==r},uXe=function e(t,n,r){var a=Lg(function(i,o){if(yI(o)){var l=t(o.from,o.to,o.velocity),c=iXe(l,2),u=c[0],d=c[1];return es(es({},o),{},{from:u,velocity:d})}return o},n);return r<1?Lg(function(i,o){return yI(o)?es(es({},o),{},{velocity:hj(o.velocity,a[i].velocity,r),from:hj(o.from,a[i].from,r)}):o},n):e(t,a,r-1)};const dXe=(function(e,t,n,r,a){var i=BYe(e,t),o=i.reduce(function(x,w){return es(es({},x),{},gI({},w,[e[w],t[w]]))},{}),l=i.reduce(function(x,w){return es(es({},x),{},gI({},w,{from:e[w],velocity:0,to:t[w]}))},{}),c=-1,u,d,f=function(){return null},m=function(){return Lg(function(w,N){return N.from},l)},p=function(){return!Object.values(l).filter(yI).length},v=function(w){u||(u=w);var N=w-u,S=N/n.dt;l=uXe(n,l,S),a(es(es(es({},e),t),m())),u=w,p()||(c=requestAnimationFrame(f))},y=function(w){d||(d=w);var N=(w-d)/r,S=Lg(function(k,C){return hj.apply(void 0,R7(C).concat([n(N)]))},o);if(a(es(es(es({},e),t),S)),N<1)c=requestAnimationFrame(f);else{var _=Lg(function(k,C){return hj.apply(void 0,R7(C).concat([n(1)]))},o);a(es(es(es({},e),t),_))}};return f=n.isStepper?v:y,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function cm(e){"@babel/helpers - typeof";return cm=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},cm(e)}var fXe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function hXe(e,t){if(e==null)return{};var n=mXe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mXe(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function VE(e){return yXe(e)||xXe(e)||gXe(e)||pXe()}function pXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1549In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gXe(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 xXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function yXe(e){if(Array.isArray(e))return vI(e)}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 L7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?L7(Object(n),!0).forEach(function(r){yg(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yg(e,t,n){return t=roe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vXe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bXe(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,roe(r.key),r)}}function wXe(e,t,n){return t&&bXe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function roe(e){var t=jXe(e,"string");return cm(t)==="symbol"?t:String(t)}function jXe(e,t){if(cm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NXe(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&&bI(e,t)}function bI(e,t){return bI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},bI(e,t)}function SXe(e){var t=kXe();return function(){var r=mj(e),a;if(t){var i=mj(this).constructor;a=Reflect.construct(r,arguments,i)}else a=r.apply(this,arguments);return wI(this,a)}}function wI(e,t){if(t&&(cm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jI(e)}function jI(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kXe(){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 mj(e){return mj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},mj(e)}var yo=(function(e){NXe(n,e);var t=SXe(n);function n(r,a){var i;vXe(this,n),i=t.call(this,r,a);var o=i.props,l=o.isActive,c=o.attributeName,u=o.from,d=o.to,f=o.steps,m=o.children,p=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(jI(i)),i.changeStyle=i.changeStyle.bind(jI(i)),!l||p<=0)return i.state={style:{}},typeof m=="function"&&(i.state={style:d}),wI(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof m=="function")return i.state={style:u},wI(i);i.state={style:c?yg({},c,u):u}}else i.state={style:{}};return i}return wXe(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,m=this.state.style;if(l){if(!o){var p={style:c?yg({},c,d):d};this.state&&m&&(c&&m[c]!==d||!c&&m!==d)&&this.setState(p);return}if(!(TYe(a.to,d)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var y=v||u?f:a.to;if(this.state&&m){var x={style:c?yg({},c,y):y};(c&&m[c]!==y||!c&&m!==y)&&this.setState(x)}this.runAnimation(wi(wi({},this.props),{},{from:y,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,l=a.to,c=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,m=a.onAnimationStart,p=dXe(o,l,eXe(u),c,this.changeStyle),v=function(){i.stopJSAnimation=p()};this.manager.start([m,d,v,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,l=a.begin,c=a.onAnimationStart,u=o[0],d=u.style,f=u.duration,m=f===void 0?0:f,p=function(y,x,w){if(w===0)return y;var N=x.duration,S=x.easing,_=S===void 0?"ease":S,k=x.style,C=x.properties,E=x.onAnimationEnd,O=w>0?o[w-1]:x,P=C||Object.keys(k);if(typeof _=="function"||_==="spring")return[].concat(VE(y),[i.runJSAnimation.bind(i,{from:O.style,to:k,duration:N,easing:_}),N]);var R=I7(P,N,_),T=wi(wi(wi({},O.style),k),{},{transition:R});return[].concat(VE(y),[T,N,E]).filter(UYe)};return this.manager.start([c].concat(VE(o.reduce(p,[d,Math.max(m,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=$Ye());var i=a.begin,o=a.duration,l=a.attributeName,c=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,m=a.steps,p=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(m.length>1){this.runStepAnimation(a);return}var y=l?yg({},l,c):c,x=I7(Object.keys(y),o,u);v.start([d,i,wi(wi({},y),{},{transition:x}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=hXe(a,fXe),u=b.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!l||u===0||o<=0)return i;var f=function(p){var v=p.props,y=v.style,x=y===void 0?{}:y,w=v.className,N=b.cloneElement(p,wi(wi({},c),{},{style:wi(wi({},x),d),className:w}));return N};return u===1?f(b.Children.only(i)):X.createElement("div",null,b.Children.map(i,function(m){return f(m)}))}}]),n})(b.PureComponent);yo.displayName="Animate";yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yo.propTypes={from:fn.oneOfType([fn.object,fn.string]),to:fn.oneOfType([fn.object,fn.string]),attributeName:fn.string,duration:fn.number,begin:fn.number,easing:fn.oneOfType([fn.string,fn.func]),steps:fn.arrayOf(fn.shape({duration:fn.number.isRequired,style:fn.object.isRequired,easing:fn.oneOfType([fn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),fn.func]),properties:fn.arrayOf("string"),onAnimationEnd:fn.func})),children:fn.oneOfType([fn.node,fn.func]),isActive:fn.bool,canBegin:fn.bool,onAnimationEnd:fn.func,shouldReAnimate:fn.bool,onAnimationStart:fn.func,onAnimationReStart:fn.func};function Wx(e){"@babel/helpers - typeof";return Wx=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},Wx(e)}function pj(){return pj=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},pj.apply(this,arguments)}function CXe(e,t){return PXe(e)||EXe(e,t)||AXe(e,t)||_Xe()}function _Xe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1550In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AXe(e,t){if(e){if(typeof e=="string")return $7(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 $7(e,t)}}function $7(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 EXe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function PXe(e){if(Array.isArray(e))return e}function F7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function z7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F7(Object(n),!0).forEach(function(r){TXe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TXe(e,t,n){return t=IXe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IXe(e){var t=OXe(e,"string");return Wx(t)=="symbol"?t:t+""}function OXe(e,t){if(Wx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var B7=function(t,n,r,a,i){var o=Math.min(Math.abs(r)/2,Math.abs(a)/2),l=a>=0?1:-1,c=r>=0?1:-1,u=a>=0&&r>=0||a<0&&r<0?1:0,d;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],m=0,p=4;m<p;m++)f[m]=i[m]>o?o:i[m];d="M".concat(t,",").concat(n+l*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),d+="L ".concat(t+r-c*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
1551        `).concat(t+r,",").concat(n+l*f[1])),d+="L ".concat(t+r,",").concat(n+a-l*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
1552        `).concat(t+r-c*f[2],",").concat(n+a)),d+="L ".concat(t+c*f[3],",").concat(n+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
1553        `).concat(t,",").concat(n+a-l*f[3])),d+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);d="M ".concat(t,",").concat(n+l*v,`
1554            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+c*v,",").concat(n,`
1555            L `).concat(t+r-c*v,",").concat(n,`
1556            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r,",").concat(n+l*v,`
1557            L `).concat(t+r,",").concat(n+a-l*v,`
1558            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+r-c*v,",").concat(n+a,`
1559            L `).concat(t+c*v,",").concat(n+a,`
1560            A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(n+a-l*v," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(a," h ").concat(-r," Z");return d},MXe=function(t,n){if(!t||!n)return!1;var r=t.x,a=t.y,i=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),d=Math.max(i,i+l),f=Math.min(o,o+c),m=Math.max(o,o+c);return r>=u&&r<=d&&a>=f&&a<=m}return!1},RXe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},q3=function(t){var n=z7(z7({},RXe),t),r=b.useRef(),a=b.useState(-1),i=CXe(a,2),o=i[0],l=i[1];b.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&l(_)}catch{}},[]);var c=n.x,u=n.y,d=n.width,f=n.height,m=n.radius,p=n.className,v=n.animationEasing,y=n.animationDuration,x=n.animationBegin,w=n.isAnimationActive,N=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var S=Mt("recharts-rectangle",p);return N?X.createElement(yo,{canBegin:o>0,from:{width:d,height:f,x:c,y:u},to:{width:d,height:f,x:c,y:u},duration:y,animationEasing:v,isActive:N},function(_){var k=_.width,C=_.height,E=_.x,O=_.y;return X.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,isActive:w,easing:v},X.createElement("path",pj({},mt(n,!0),{className:S,d:B7(E,O,k,C,m),ref:r})))}):X.createElement("path",pj({},mt(n,!0),{className:S,d:B7(c,u,d,f,m)}))},DXe=["points","className","baseLinePoints","connectNulls"];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)}function LXe(e,t){if(e==null)return{};var n=$Xe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Xe(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 U7(e){return UXe(e)||BXe(e)||zXe(e)||FXe()}function FXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1561In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zXe(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 BXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UXe(e){if(Array.isArray(e))return NI(e)}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}var H7=function(t){return t&&t.x===+t.x&&t.y===+t.y},HXe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){H7(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),H7(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},$g=function(t,n){var r=HXe(t);n&&(r=[r.reduce(function(i,o){return[].concat(U7(i),U7(o))},[])]);var a=r.map(function(i){return i.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(a,"Z"):a},qXe=function(t,n,r){var a=$g(t,r);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat($g(n.reverse(),r).slice(1))},VXe=function(t){var n=t.points,r=t.className,a=t.baseLinePoints,i=t.connectNulls,o=LXe(t,DXe);if(!n||!n.length)return null;var l=Mt("recharts-polygon",r);if(a&&a.length){var c=o.stroke&&o.stroke!=="none",u=qXe(n,a,i);return X.createElement("g",{className:l},X.createElement("path",Zf({},mt(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?X.createElement("path",Zf({},mt(o,!0),{fill:"none",d:$g(n,i)})):null,c?X.createElement("path",Zf({},mt(o,!0),{fill:"none",d:$g(a,i)})):null)}var d=$g(n,i);return X.createElement("path",Zf({},mt(o,!0),{fill:d.slice(-1)==="Z"?o.fill:"none",className:l,d}))};function SI(){return SI=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},SI.apply(this,arguments)}var IN=function(t){var n=t.cx,r=t.cy,a=t.r,i=t.className,o=Mt("recharts-dot",i);return n===+n&&r===+r&&a===+a?b.createElement("circle",SI({},mt(t,!1),Bw(t),{className:o,cx:n,cy:r,r:a})):null};function Gx(e){"@babel/helpers - typeof";return Gx=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},Gx(e)}var WXe=["x","y","top","left","width","height","className"];function kI(){return kI=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},kI.apply(this,arguments)}function q7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function GXe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q7(Object(n),!0).forEach(function(r){KXe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KXe(e,t,n){return t=YXe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YXe(e){var t=XXe(e,"string");return Gx(t)=="symbol"?t:t+""}function XXe(e,t){if(Gx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QXe(e,t){if(e==null)return{};var n=ZXe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZXe(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 JXe=function(t,n,r,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(n,"h").concat(r)},eQe=function(t){var n=t.x,r=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,d=t.width,f=d===void 0?0:d,m=t.height,p=m===void 0?0:m,v=t.className,y=QXe(t,WXe),x=GXe({x:r,y:i,top:l,left:u,width:f,height:p},y);return!ze(r)||!ze(i)||!ze(f)||!ze(p)||!ze(l)||!ze(u)?null:X.createElement("path",kI({},mt(x,!0),{className:Mt("recharts-cross",v),d:JXe(r,i,f,p,l,u)}))},WE,V7;function tQe(){if(V7)return WE;V7=1;var e=_N(),t=yie(),n=So();function r(a,i){return a&&a.length?e(a,n(i,2),t):void 0}return WE=r,WE}var nQe=tQe();const rQe=tn(nQe);var GE,W7;function sQe(){if(W7)return GE;W7=1;var e=_N(),t=So(),n=vie();function r(a,i){return a&&a.length?e(a,t(i,2),n):void 0}return GE=r,GE}var aQe=sQe();const iQe=tn(aQe);var oQe=["cx","cy","angle","ticks","axisLine"],lQe=["ticks","tick","angle","tickFormatter","stroke"];function um(e){"@babel/helpers - typeof";return um=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},um(e)}function Fg(){return Fg=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},Fg.apply(this,arguments)}function G7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G7(Object(n),!0).forEach(function(r){ON(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K7(e,t){if(e==null)return{};var n=cQe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cQe(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 uQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y7(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,aoe(r.key),r)}}function dQe(e,t,n){return t&&Y7(e.prototype,t),n&&Y7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fQe(e,t,n){return t=gj(t),hQe(e,soe()?Reflect.construct(t,n||[],gj(e).constructor):t.apply(e,n))}function hQe(e,t){if(t&&(um(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mQe(e)}function mQe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function soe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(soe=function(){return!!e})()}function gj(e){return gj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gj(e)}function pQe(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&&CI(e,t)}function CI(e,t){return CI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},CI(e,t)}function ON(e,t,n){return t=aoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aoe(e){var t=gQe(e,"string");return um(t)=="symbol"?t:t+""}function gQe(e,t){if(um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MN=(function(e){function t(){return uQe(this,t),fQe(this,t,arguments)}return pQe(t,e),dQe(t,[{key:"getTickValueCoord",value:function(r){var a=r.coordinate,i=this.props,o=i.angle,l=i.cx,c=i.cy;return On(l,c,a,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,a;switch(r){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.angle,l=r.ticks,c=rQe(l,function(d){return d.coordinate||0}),u=iQe(l,function(d){return d.coordinate||0});return{cx:a,cy:i,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.angle,l=r.ticks,c=r.axisLine,u=K7(r,oQe),d=l.reduce(function(v,y){return[Math.min(v[0],y.coordinate),Math.max(v[1],y.coordinate)]},[1/0,-1/0]),f=On(a,i,d[0],o),m=On(a,i,d[1],o),p=bu(bu(bu({},mt(u,!1)),{},{fill:"none"},mt(c,!1)),{},{x1:f.x,y1:f.y,x2:m.x,y2:m.y});return X.createElement("line",Fg({className:"recharts-polar-radius-axis-line"},p))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,o=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,d=K7(a,lQe),f=this.getTickTextAnchor(),m=mt(d,!1),p=mt(o,!1),v=i.map(function(y,x){var w=r.getTickValueCoord(y),N=bu(bu(bu(bu({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(w.x,", ").concat(w.y,")")},m),{},{stroke:"none",fill:u},p),{},{index:x},w),{},{payload:y});return X.createElement(sn,Fg({className:Mt("recharts-polar-radius-axis-tick",Gie(o)),key:"tick-".concat(y.coordinate)},jd(r.props,y,x)),t.renderTickItem(o,N,c?c(y.value,x):y.value))});return X.createElement(sn,{className:"recharts-polar-radius-axis-ticks"},v)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.axisLine,o=r.tick;return!a||!a.length?null:X.createElement(sn,{className:Mt("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),o&&this.renderTicks(),Hr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,a,i){var o;return X.isValidElement(r)?o=X.cloneElement(r,a):Ct(r)?o=r(a):o=X.createElement(Nd,Fg({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),o}}])})(b.PureComponent);ON(MN,"displayName","PolarRadiusAxis");ON(MN,"axisType","radiusAxis");ON(MN,"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 dm(e){"@babel/helpers - typeof";return dm=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},dm(e)}function _u(){return _u=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},_u.apply(this,arguments)}function X7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X7(Object(n),!0).forEach(function(r){RN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q7(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,ooe(r.key),r)}}function yQe(e,t,n){return t&&Q7(e.prototype,t),n&&Q7(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vQe(e,t,n){return t=xj(t),bQe(e,ioe()?Reflect.construct(t,n||[],xj(e).constructor):t.apply(e,n))}function bQe(e,t){if(t&&(dm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wQe(e)}function wQe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ioe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ioe=function(){return!!e})()}function xj(e){return xj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xj(e)}function jQe(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&&_I(e,t)}function _I(e,t){return _I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},_I(e,t)}function RN(e,t,n){return t=ooe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ooe(e){var t=NQe(e,"string");return dm(t)=="symbol"?t:t+""}function NQe(e,t){if(dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SQe=Math.PI/180,Z7=1e-5,DN=(function(e){function t(){return xQe(this,t),vQe(this,t,arguments)}return jQe(t,e),yQe(t,[{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.cx,o=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,d=u||8,f=On(i,o,l,r.coordinate),m=On(i,o,l+(c==="inner"?-1:1)*d,r.coordinate);return{x1:f.x,y1:f.y,x2:m.x,y2:m.y}}},{key:"getTickTextAnchor",value:function(r){var a=this.props.orientation,i=Math.cos(-r.coordinate*SQe),o;return i>Z7?o=a==="outer"?"start":"end":i<-Z7?o=a==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.cx,i=r.cy,o=r.radius,l=r.axisLine,c=r.axisLineType,u=wu(wu({},mt(this.props,!1)),{},{fill:"none"},mt(l,!1));if(c==="circle")return X.createElement(IN,_u({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:o}));var d=this.props.ticks,f=d.map(function(m){return On(a,i,o,m.coordinate)});return X.createElement(VXe,_u({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var r=this,a=this.props,i=a.ticks,o=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,d=mt(this.props,!1),f=mt(o,!1),m=wu(wu({},d),{},{fill:"none"},mt(l,!1)),p=i.map(function(v,y){var x=r.getTickLineCoord(v),w=r.getTickTextAnchor(v),N=wu(wu(wu({textAnchor:w},d),{},{stroke:"none",fill:u},f),{},{index:y,payload:v,x:x.x2,y:x.y2});return X.createElement(sn,_u({className:Mt("recharts-polar-angle-axis-tick",Gie(o)),key:"tick-".concat(v.coordinate)},jd(r.props,v,y)),l&&X.createElement("line",_u({className:"recharts-polar-angle-axis-tick-line"},m,x)),o&&t.renderTickItem(o,N,c?c(v.value,y):v.value))});return X.createElement(sn,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,a=r.ticks,i=r.radius,o=r.axisLine;return i<=0||!a||!a.length?null:X.createElement(sn,{className:Mt("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,a,i){var o;return X.isValidElement(r)?o=X.cloneElement(r,a):Ct(r)?o=r(a):o=X.createElement(Nd,_u({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),o}}])})(b.PureComponent);RN(DN,"displayName","PolarAngleAxis");RN(DN,"axisType","angleAxis");RN(DN,"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 KE,J7;function kQe(){if(J7)return KE;J7=1;var e=bae(),t=e(Object.getPrototypeOf,Object);return KE=t,KE}var YE,eV;function CQe(){if(eV)return YE;eV=1;var e=Sl(),t=kQe(),n=kl(),r="[object Object]",a=Function.prototype,i=Object.prototype,o=a.toString,l=i.hasOwnProperty,c=o.call(Object);function u(d){if(!n(d)||e(d)!=r)return!1;var f=t(d);if(f===null)return!0;var m=l.call(f,"constructor")&&f.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==c}return YE=u,YE}var _Qe=CQe();const AQe=tn(_Qe);var XE,tV;function EQe(){if(tV)return XE;tV=1;var e=Sl(),t=kl(),n="[object Boolean]";function r(a){return a===!0||a===!1||t(a)&&e(a)==n}return XE=r,XE}var PQe=EQe();const TQe=tn(PQe);function Kx(e){"@babel/helpers - typeof";return Kx=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},Kx(e)}function yj(){return yj=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},yj.apply(this,arguments)}function IQe(e,t){return DQe(e)||RQe(e,t)||MQe(e,t)||OQe()}function OQe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1562In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MQe(e,t){if(e){if(typeof e=="string")return nV(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 nV(e,t)}}function nV(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 RQe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function DQe(e){if(Array.isArray(e))return e}function rV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function sV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rV(Object(n),!0).forEach(function(r){LQe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LQe(e,t,n){return t=$Qe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Qe(e){var t=FQe(e,"string");return Kx(t)=="symbol"?t:t+""}function FQe(e,t){if(Kx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aV=function(t,n,r,a,i){var o=r-a,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+i),l+="L ".concat(t+r-o/2-a,",").concat(n+i),l+="L ".concat(t,",").concat(n," Z"),l},zQe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},BQe=function(t){var n=sV(sV({},zQe),t),r=b.useRef(),a=b.useState(-1),i=IQe(a,2),o=i[0],l=i[1];b.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&l(S)}catch{}},[]);var c=n.x,u=n.y,d=n.upperWidth,f=n.lowerWidth,m=n.height,p=n.className,v=n.animationEasing,y=n.animationDuration,x=n.animationBegin,w=n.isUpdateAnimationActive;if(c!==+c||u!==+u||d!==+d||f!==+f||m!==+m||d===0&&f===0||m===0)return null;var N=Mt("recharts-trapezoid",p);return w?X.createElement(yo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:c,y:u},to:{upperWidth:d,lowerWidth:f,height:m,x:c,y:u},duration:y,animationEasing:v,isActive:w},function(S){var _=S.upperWidth,k=S.lowerWidth,C=S.height,E=S.x,O=S.y;return X.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:y,easing:v},X.createElement("path",yj({},mt(n,!0),{className:N,d:aV(E,O,_,k,C),ref:r})))}):X.createElement("g",null,X.createElement("path",yj({},mt(n,!0),{className:N,d:aV(c,u,d,f,m)})))},UQe=["option","shapeType","propTransformer","activeClassName","isActive"];function Yx(e){"@babel/helpers - typeof";return Yx=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},Yx(e)}function HQe(e,t){if(e==null)return{};var n=qQe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qQe(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 iV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function vj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iV(Object(n),!0).forEach(function(r){VQe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VQe(e,t,n){return t=WQe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WQe(e){var t=GQe(e,"string");return Yx(t)=="symbol"?t:t+""}function GQe(e,t){if(Yx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KQe(e,t){return vj(vj({},t),e)}function YQe(e,t){return e==="symbols"}function oV(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return X.createElement(q3,n);case"trapezoid":return X.createElement(BQe,n);case"sector":return X.createElement(Xie,n);case"symbols":if(YQe(t))return X.createElement(f3,n);break;default:return null}}function XQe(e){return b.isValidElement(e)?e.props:e}function loe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,a=r===void 0?KQe:r,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=HQe(e,UQe),u;if(b.isValidElement(t))u=b.cloneElement(t,vj(vj({},c),XQe(t)));else if(Ct(t))u=t(c);else if(AQe(t)&&!TQe(t)){var d=a(t,c);u=X.createElement(oV,{shapeType:n,elementProps:d})}else{var f=c;u=X.createElement(oV,{shapeType:n,elementProps:f})}return l?X.createElement(sn,{className:o},u):u}function LN(e,t){return t!=null&&"trapezoids"in e.props}function $N(e,t){return t!=null&&"sectors"in e.props}function Xx(e,t){return t!=null&&"points"in e.props}function QQe(e,t){var n,r,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return a&&i}function ZQe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function JQe(e,t){var n=e.x===t.x,r=e.y===t.y,a=e.z===t.z;return n&&r&&a}function eZe(e,t){var n;return LN(e,t)?n=QQe:$N(e,t)?n=ZQe:Xx(e,t)&&(n=JQe),n}function tZe(e,t){var n;return LN(e,t)?n="trapezoids":$N(e,t)?n="sectors":Xx(e,t)&&(n="points"),n}function nZe(e,t){if(LN(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($N(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 Xx(e,t)?t.payload:{}}function rZe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,a=tZe(n,t),i=nZe(n,t),o=r.filter(function(c,u){var d=t0(i,c),f=n.props[a].filter(function(v){var y=eZe(n,t);return y(v,t)}),m=n.props[a].indexOf(f[f.length-1]),p=u===m;return d&&p}),l=r.indexOf(o[o.length-1]);return l}var Bb;function fm(e){"@babel/helpers - typeof";return fm=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},fm(e)}function Jf(){return Jf=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},Jf.apply(this,arguments)}function lV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lV(Object(n),!0).forEach(function(r){Ya(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sZe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cV(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,uoe(r.key),r)}}function aZe(e,t,n){return t&&cV(e.prototype,t),n&&cV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function iZe(e,t,n){return t=bj(t),oZe(e,coe()?Reflect.construct(t,n||[],bj(e).constructor):t.apply(e,n))}function oZe(e,t){if(t&&(fm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lZe(e)}function lZe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function coe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(coe=function(){return!!e})()}function bj(e){return bj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bj(e)}function cZe(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&&AI(e,t)}function AI(e,t){return AI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},AI(e,t)}function Ya(e,t,n){return t=uoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uoe(e){var t=uZe(e,"string");return fm(t)=="symbol"?t:t+""}function uZe(e,t){if(fm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _l=(function(e){function t(n){var r;return sZe(this,t),r=iZe(this,t,[n]),Ya(r,"pieRef",null),Ya(r,"sectorRefs",[]),Ya(r,"id",ep("recharts-pie-")),Ya(r,"handleAnimationEnd",function(){var a=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Ct(a)&&a()}),Ya(r,"handleAnimationStart",function(){var a=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Ct(a)&&a()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return cZe(t,e),aZe(t,[{key:"isActiveIndex",value:function(r){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(r)!==-1:r===a}},{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 a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,d=mt(this.props,!1),f=mt(o,!1),m=mt(l,!1),p=o&&o.offsetRadius||20,v=r.map(function(y,x){var w=(y.startAngle+y.endAngle)/2,N=On(y.cx,y.cy,y.outerRadius+p,w),S=Tn(Tn(Tn(Tn({},d),y),{},{stroke:"none"},f),{},{index:x,textAnchor:t.getTextAnchor(N.x,y.cx)},N),_=Tn(Tn(Tn(Tn({},d),y),{},{fill:"none",stroke:y.fill},m),{},{index:x,points:[On(y.cx,y.cy,y.outerRadius,w),N]}),k=c;return Tt(c)&&Tt(u)?k="value":Tt(c)&&(k=u),X.createElement(sn,{key:"label-".concat(y.startAngle,"-").concat(y.endAngle,"-").concat(y.midAngle,"-").concat(x)},l&&t.renderLabelLineItem(l,_,"line"),t.renderLabelItem(o,S,Ir(y,k)))});return X.createElement(sn,{className:"recharts-pie-labels"},v)}},{key:"renderSectorsStatically",value:function(r){var a=this,i=this.props,o=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return r.map(function(u,d){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var f=a.isActiveIndex(d),m=c&&a.hasActiveIndex()?c:null,p=f?o:m,v=Tn(Tn({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return X.createElement(sn,Jf({ref:function(x){x&&!a.sectorRefs.includes(x)&&a.sectorRefs.push(x)},tabIndex:-1,className:"recharts-pie-sector"},jd(a.props,u,d),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(d)}),X.createElement(loe,Jf({option:p,isActive:f,shapeType:"sector"},v)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,a=this.props,i=a.sectors,o=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,f=this.state,m=f.prevSectors,p=f.prevIsAnimationActive;return X.createElement(yo,{begin:l,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(d,"-").concat(p),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(v){var y=v.t,x=[],w=i&&i[0],N=w.startAngle;return i.forEach(function(S,_){var k=m&&m[_],C=_>0?Ca(S,"paddingAngle",0):0;if(k){var E=ba(k.endAngle-k.startAngle,S.endAngle-S.startAngle),O=Tn(Tn({},S),{},{startAngle:N+C,endAngle:N+E(y)+C});x.push(O),N=O.endAngle}else{var P=S.endAngle,R=S.startAngle,T=ba(0,P-R),D=T(y),z=Tn(Tn({},S),{},{startAngle:N+C,endAngle:N+D+C});x.push(z),N=z.endAngle}}),X.createElement(sn,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var a=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var o=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,a=r.sectors,i=r.isAnimationActive,o=this.state.prevSectors;return i&&a&&a.length&&(!o||!t0(o,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,a=this.props,i=a.hide,o=a.sectors,l=a.className,c=a.label,u=a.cx,d=a.cy,f=a.innerRadius,m=a.outerRadius,p=a.isAnimationActive,v=this.state.isAnimationFinished;if(i||!o||!o.length||!ze(u)||!ze(d)||!ze(f)||!ze(m))return null;var y=Mt("recharts-pie",l);return X.createElement(sn,{tabIndex:this.props.rootTabIndex,className:y,ref:function(w){r.pieRef=w}},this.renderSectors(),c&&this.renderLabels(o),Hr.renderCallByParent(this.props,null,!1),(!p||v)&&sl.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return a.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:r.sectors!==a.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,a){return r>a?"start":r<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,a,i){if(X.isValidElement(r))return X.cloneElement(r,a);if(Ct(r))return r(a);var o=Mt("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return X.createElement(dj,Jf({},a,{key:i,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,a,i){if(X.isValidElement(r))return X.cloneElement(r,a);var o=i;if(Ct(r)&&(o=r(a),X.isValidElement(o)))return o;var l=Mt("recharts-pie-label-text",typeof r!="boolean"&&!Ct(r)?r.className:"");return X.createElement(Nd,Jf({},a,{alignmentBaseline:"middle",className:l}),o)}}])})(b.PureComponent);Bb=_l;Ya(_l,"displayName","Pie");Ya(_l,"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:!Vd.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Ya(_l,"parseDeltaAngle",function(e,t){var n=Ts(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Ya(_l,"getRealPieData",function(e){var t=e.data,n=e.children,r=mt(e,!1),a=_a(n,bN);return t&&t.length?t.map(function(i,o){return Tn(Tn(Tn({payload:i},r),i),a&&a[o]&&a[o].props)}):a&&a.length?a.map(function(i){return Tn(Tn({},r),i.props)}):[]});Ya(_l,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,a=t.width,i=t.height,o=Wie(a,i),l=r+Is(e.cx,a,a/2),c=n+Is(e.cy,i,i/2),u=Is(e.innerRadius,o,0),d=Is(e.outerRadius,o,o*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}});Ya(_l,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?Tn(Tn({},t.type.defaultProps),t.props):t.props,a=Bb.getRealPieData(r);if(!a||!a.length)return null;var i=r.cornerRadius,o=r.startAngle,l=r.endAngle,c=r.paddingAngle,u=r.dataKey,d=r.nameKey,f=r.valueKey,m=r.tooltipType,p=Math.abs(r.minAngle),v=Bb.parseCoordinateOfPie(r,n),y=Bb.parseDeltaAngle(o,l),x=Math.abs(y),w=u;Tt(u)&&Tt(f)?(Ri(!1,`Use "dataKey" to specify the value of pie,
1563      the props "valueKey" will be deprecated in 1.1.0`),w="value"):Tt(u)&&(Ri(!1,`Use "dataKey" to specify the value of pie,
1564      the props "valueKey" will be deprecated in 1.1.0`),w=f);var N=a.filter(function(O){return Ir(O,w,0)!==0}).length,S=(x>=360?N:N-1)*c,_=x-N*p-S,k=a.reduce(function(O,P){var R=Ir(P,w,0);return O+(ze(R)?R:0)},0),C;if(k>0){var E;C=a.map(function(O,P){var R=Ir(O,w,0),T=Ir(O,d,P),D=(ze(R)?R:0)/k,z;P?z=E.endAngle+Ts(y)*c*(R!==0?1:0):z=o;var I=z+Ts(y)*((R!==0?p:0)+D*_),F=(z+I)/2,U=(v.innerRadius+v.outerRadius)/2,H=[{name:T,value:R,payload:O,dataKey:w,type:m}],q=On(v.cx,v.cy,U,F);return E=Tn(Tn(Tn({percent:D,cornerRadius:i,name:T,tooltipPayload:H,midAngle:F,middleRadius:U,tooltipPosition:q},O),v),{},{value:Ir(O,w),startAngle:z,endAngle:I,payload:O,paddingAngle:Ts(y)*c}),E})}return Tn(Tn({},v),{},{sectors:C,data:a})});var QE,uV;function dZe(){if(uV)return QE;uV=1;var e=Math.ceil,t=Math.max;function n(r,a,i,o){for(var l=-1,c=t(e((a-r)/(i||1)),0),u=Array(c);c--;)u[o?c:++l]=r,r+=i;return u}return QE=n,QE}var ZE,dV;function doe(){if(dV)return ZE;dV=1;var e=Dae(),t=1/0,n=17976931348623157e292;function r(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return ZE=r,ZE}var JE,fV;function fZe(){if(fV)return JE;fV=1;var e=dZe(),t=vN(),n=doe();function r(a){return function(i,o,l){return l&&typeof l!="number"&&t(i,o,l)&&(o=l=void 0),i=n(i),o===void 0?(o=i,i=0):o=n(o),l=l===void 0?i<o?1:-1:n(l),e(i,o,l,a)}}return JE=r,JE}var eP,hV;function hZe(){if(hV)return eP;hV=1;var e=fZe(),t=e();return eP=t,eP}var mZe=hZe();const wj=tn(mZe);function Qx(e){"@babel/helpers - typeof";return Qx=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},Qx(e)}function mV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function pV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mV(Object(n),!0).forEach(function(r){foe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function foe(e,t,n){return t=pZe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZe(e){var t=gZe(e,"string");return Qx(t)=="symbol"?t:t+""}function gZe(e,t){if(Qx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xZe=["Webkit","Moz","O","ms"],yZe=function(t,n){var r=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=xZe.reduce(function(i,o){return pV(pV({},i),{},foe({},o+r,n))},{});return a[t]=n,a};function hm(e){"@babel/helpers - typeof";return hm=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},hm(e)}function jj(){return jj=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},jj.apply(this,arguments)}function gV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gV(Object(n),!0).forEach(function(r){ga(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vZe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xV(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,moe(r.key),r)}}function bZe(e,t,n){return t&&xV(e.prototype,t),n&&xV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wZe(e,t,n){return t=Nj(t),jZe(e,hoe()?Reflect.construct(t,n||[],Nj(e).constructor):t.apply(e,n))}function jZe(e,t){if(t&&(hm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NZe(e)}function NZe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hoe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(hoe=function(){return!!e})()}
vendor: 123,349 bytes, lines 1564-1569
1564function Nj(e){return Nj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Nj(e)}function SZe(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&&EI(e,t)}function EI(e,t){return EI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},EI(e,t)}function ga(e,t,n){return t=moe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function moe(e){var t=kZe(e,"string");return hm(t)=="symbol"?t:t+""}function kZe(e,t){if(hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var CZe=function(t){var n=t.data,r=t.startIndex,a=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Rg().domain(wj(0,c)).range([i,i+o-l]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(a),scale:u,scaleValues:d}},yV=function(t){return t.changedTouches&&!!t.changedTouches.length},mm=(function(e){function t(n){var r;return vZe(this,t),r=wZe(this,t,[n]),ga(r,"handleDrag",function(a){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(a):r.state.isSlideMoving&&r.handleSlideDrag(a)}),ga(r,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&r.handleDrag(a.changedTouches[0])}),ga(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=r.props,i=a.endIndex,o=a.onDragEnd,l=a.startIndex;o==null||o({endIndex:i,startIndex:l})}),r.detachDragEndListener()}),ga(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ga(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ga(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ga(r,"handleSlideDragStart",function(a){var i=yV(a)?a.changedTouches[0]:a;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return SZe(t,e),bZe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var a=r.startX,i=r.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,d=u.length-1,f=Math.min(a,i),m=Math.max(a,i),p=t.getIndexInRange(o,f),v=t.getIndexInRange(o,m);return{startIndex:p-p%c,endIndex:v===d?d:v-v%c}}},{key:"getTextOfTick",value:function(r){var a=this.props,i=a.data,o=a.tickFormatter,l=a.dataKey,c=Ir(i[r],l,r);return Ct(o)?o(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 a=this.state,i=a.slideMoveStartX,o=a.startX,l=a.endX,c=this.props,u=c.x,d=c.width,f=c.travellerWidth,m=c.startIndex,p=c.endIndex,v=c.onChange,y=r.pageX-i;y>0?y=Math.min(y,u+d-f-l,u+d-f-o):y<0&&(y=Math.max(y,u-o,u-l));var x=this.getIndex({startX:o+y,endX:l+y});(x.startIndex!==m||x.endIndex!==p)&&v&&v(x),this.setState({startX:o+y,endX:l+y,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,a){var i=yV(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[o],d=this.props,f=d.x,m=d.width,p=d.travellerWidth,v=d.onChange,y=d.gap,x=d.data,w={startX:this.state.startX,endX:this.state.endX},N=r.pageX-i;N>0?N=Math.min(N,f+m-p-u):N<0&&(N=Math.max(N,f-u)),w[o]=u+N;var S=this.getIndex(w),_=S.startIndex,k=S.endIndex,C=function(){var O=x.length-1;return o==="startX"&&(l>c?_%y===0:k%y===0)||l<c&&k===O||o==="endX"&&(l>c?k%y===0:_%y===0)||l>c&&k===O};this.setState(ga(ga({},o,u+N),"brushMoveStartX",r.pageX),function(){v&&C()&&v(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,a){var i=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,d=this.state[a],f=l.indexOf(d);if(f!==-1){var m=f+r;if(!(m===-1||m>=l.length)){var p=l[m];a==="startX"&&p>=u||a==="endX"&&p<=c||this.setState(ga({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.fill,u=r.stroke;return X.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.data,u=r.children,d=r.padding,f=b.Children.only(u);return f?X.cloneElement(f,{x:a,y:i,width:o,height:l,margin:d,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,a){var i,o,l=this,c=this.props,u=c.y,d=c.travellerWidth,f=c.height,m=c.traveller,p=c.ariaLabel,v=c.data,y=c.startIndex,x=c.endIndex,w=Math.max(r,this.props.x),N=tP(tP({},mt(this.props,!1)),{},{x:w,y:u,width:d,height:f}),S=p||"Min value: ".concat((i=v[y])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[x])===null||o===void 0?void 0:o.name);return X.createElement(sn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),l.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,N))}},{key:"renderSlide",value:function(r,a){var i=this.props,o=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,d=Math.min(r,a)+u,f=Math.max(Math.abs(a-r)-u,0);return X.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:d,y:o,width:f,height:l})}},{key:"renderText",value:function(){var r=this.props,a=r.startIndex,i=r.endIndex,o=r.y,l=r.height,c=r.travellerWidth,u=r.stroke,d=this.state,f=d.startX,m=d.endX,p=5,v={pointerEvents:"none",fill:u};return X.createElement(sn,{className:"recharts-brush-texts"},X.createElement(Nd,jj({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,m)-p,y:o+l/2},v),this.getTextOfTick(a)),X.createElement(Nd,jj({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,m)+c+p,y:o+l/2},v),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,a=r.data,i=r.className,o=r.children,l=r.x,c=r.y,u=r.width,d=r.height,f=r.alwaysShowText,m=this.state,p=m.startX,v=m.endX,y=m.isTextActive,x=m.isSlideMoving,w=m.isTravellerMoving,N=m.isTravellerFocused;if(!a||!a.length||!ze(l)||!ze(c)||!ze(u)||!ze(d)||u<=0||d<=0)return null;var S=Mt("recharts-brush",i),_=X.Children.count(o)===1,k=yZe("userSelect","none");return X.createElement(sn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),_&&this.renderPanorama(),this.renderSlide(p,v),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(v,"endX"),(y||x||w||N||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var a=r.x,i=r.y,o=r.width,l=r.height,c=r.stroke,u=Math.floor(i+l/2)-1;return X.createElement(X.Fragment,null,X.createElement("rect",{x:a,y:i,width:o,height:l,fill:c,stroke:"none"}),X.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),X.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,a){var i;return X.isValidElement(r)?i=X.cloneElement(r,a):Ct(r)?i=r(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(r,a){var i=r.data,o=r.width,l=r.x,c=r.travellerWidth,u=r.updateId,d=r.startIndex,f=r.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return tP({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},i&&i.length?CZe({data:i,width:o,x:l,travellerWidth:c,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+o-c]);var m=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:a.scale(r.startIndex),endX:a.scale(r.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(r,a){for(var i=r.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);r[c]>a?l=c:o=c}return a>=r[l]?l:o}}])})(b.PureComponent);ga(mm,"displayName","Brush");ga(mm,"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 nP,vV;function _Ze(){if(vV)return nP;vV=1;var e=v3();function t(n,r){var a;return e(n,function(i,o,l){return a=r(i,o,l),!a}),!!a}return nP=t,nP}var rP,bV;function AZe(){if(bV)return rP;bV=1;var e=hae(),t=So(),n=_Ze(),r=ia(),a=vN();function i(o,l,c){var u=r(o)?e:n;return c&&a(o,l,c)&&(l=void 0),u(o,t(l,3))}return rP=i,rP}var EZe=AZe();const PZe=tn(EZe);var uo=function(t,n){var r=t.alwaysShow,a=t.ifOverflow;return r&&(a="extendDomain"),a===n},sP,wV;function TZe(){if(wV)return sP;wV=1;var e=Tae();function t(n,r,a){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[r]=a}return sP=t,sP}var aP,jV;function IZe(){if(jV)return aP;jV=1;var e=TZe(),t=Eae(),n=So();function r(a,i){var o={};return i=n(i,3),t(a,function(l,c,u){e(o,c,i(l,c,u))}),o}return aP=r,aP}var OZe=IZe();const MZe=tn(OZe);var iP,NV;function RZe(){if(NV)return iP;NV=1;function e(t,n){for(var r=-1,a=t==null?0:t.length;++r<a;)if(!n(t[r],r,t))return!1;return!0}return iP=e,iP}var oP,SV;function DZe(){if(SV)return oP;SV=1;var e=v3();function t(n,r){var a=!0;return e(n,function(i,o,l){return a=!!r(i,o,l),a}),a}return oP=t,oP}var lP,kV;function LZe(){if(kV)return lP;kV=1;var e=RZe(),t=DZe(),n=So(),r=ia(),a=vN();function i(o,l,c){var u=r(o)?e:t;return c&&a(o,l,c)&&(l=void 0),u(o,n(l,3))}return lP=i,lP}var $Ze=LZe();const poe=tn($Ze);var FZe=["x","y"];function Zx(e){"@babel/helpers - typeof";return Zx=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},Zx(e)}function PI(){return PI=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},PI.apply(this,arguments)}function CV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ag(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CV(Object(n),!0).forEach(function(r){zZe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zZe(e,t,n){return t=BZe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BZe(e){var t=UZe(e,"string");return Zx(t)=="symbol"?t:t+""}function UZe(e,t){if(Zx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HZe(e,t){if(e==null)return{};var n=qZe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qZe(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 VZe(e,t){var n=e.x,r=e.y,a=HZe(e,FZe),i="".concat(n),o=parseInt(i,10),l="".concat(r),c=parseInt(l,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),m=parseInt(f,10);return ag(ag(ag(ag(ag({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function _V(e){return X.createElement(loe,PI({shapeType:"rectangle",propTransformer:VZe,activeClassName:"recharts-active-bar"},e))}var WZe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,a){if(typeof t=="number")return t;var i=ze(r)||zBe(r);return i?t(r,a):(i||kd(),n)}},GZe=["value","background"],goe;function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function KZe(e,t){if(e==null)return{};var n=YZe(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YZe(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 Sj(){return Sj=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},Sj.apply(this,arguments)}function AV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?AV(Object(n),!0).forEach(function(r){wc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XZe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EV(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,yoe(r.key),r)}}function QZe(e,t,n){return t&&EV(e.prototype,t),n&&EV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZZe(e,t,n){return t=kj(t),JZe(e,xoe()?Reflect.construct(t,n||[],kj(e).constructor):t.apply(e,n))}function JZe(e,t){if(t&&(pm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eJe(e)}function eJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xoe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xoe=function(){return!!e})()}function kj(e){return kj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kj(e)}function tJe(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&&TI(e,t)}function TI(e,t){return TI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},TI(e,t)}function wc(e,t,n){return t=yoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yoe(e){var t=nJe(e,"string");return pm(t)=="symbol"?t:t+""}function nJe(e,t){if(pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yd=(function(e){function t(){var n;XZe(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=ZZe(this,t,[].concat(a)),wc(n,"state",{isAnimationFinished:!1}),wc(n,"id",ep("recharts-bar-")),wc(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),wc(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return tJe(t,e),QZe(t,[{key:"renderRectanglesStatically",value:function(r){var a=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,d=mt(this.props,!1);return r&&r.map(function(f,m){var p=m===c,v=p?u:o,y=vr(vr(vr({},d),f),{},{isActive:p,option:v,index:m,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return X.createElement(sn,Sj({className:"recharts-bar-rectangle"},jd(a.props,f,m),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(m)}),X.createElement(_V,y))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,a=this.props,i=a.data,o=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,m=this.state.prevData;return X.createElement(yo,{begin:c,duration:u,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var v=p.t,y=i.map(function(x,w){var N=m&&m[w];if(N){var S=ba(N.x,x.x),_=ba(N.y,x.y),k=ba(N.width,x.width),C=ba(N.height,x.height);return vr(vr({},x),{},{x:S(v),y:_(v),width:k(v),height:C(v)})}if(o==="horizontal"){var E=ba(0,x.height),O=E(v);return vr(vr({},x),{},{y:x.y+x.height-O,height:O})}var P=ba(0,x.width),R=P(v);return vr(vr({},x),{},{width:R})});return X.createElement(sn,null,r.renderRectanglesStatically(y))})}},{key:"renderRectangles",value:function(){var r=this.props,a=r.data,i=r.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!t0(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var r=this,a=this.props,i=a.data,o=a.dataKey,l=a.activeIndex,c=mt(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,m=KZe(u,GZe);if(!f)return null;var p=vr(vr(vr(vr(vr({},m),{},{fill:"#eee"},f),c),jd(r.props,u,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return X.createElement(_V,Sj({key:"background-bar-".concat(d),option:r.props.background,isActive:d===l},p))})}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=_a(d,n0);if(!f)return null;var m=u==="vertical"?o[0].height/2:o[0].width/2,p=function(x,w){var N=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:N,errorVal:Ir(x,w)}},v={clipPath:r?"url(#clipPath-".concat(a,")"):null};return X.createElement(sn,v,f.map(function(y){return X.cloneElement(y,{key:"error-bar-".concat(a,"-").concat(y.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:m,dataPointFormatter:p})}))}},{key:"render",value:function(){var r=this.props,a=r.hide,i=r.data,o=r.className,l=r.xAxis,c=r.yAxis,u=r.left,d=r.top,f=r.width,m=r.height,p=r.isAnimationActive,v=r.background,y=r.id;if(a||!i||!i.length)return null;var x=this.state.isAnimationFinished,w=Mt("recharts-bar",o),N=l&&l.allowDataOverflow,S=c&&c.allowDataOverflow,_=N||S,k=Tt(y)?this.id:y;return X.createElement(sn,{className:w},N||S?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(k)},X.createElement("rect",{x:N?u:u-f/2,y:S?d:d-m/2,width:N?f:f*2,height:S?m:m*2}))):null,X.createElement(sn,{className:"recharts-bar-rectangles",clipPath:_?"url(#clipPath-".concat(k,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(_,k),(!p||x)&&sl.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:a.curData}:r.data!==a.curData?{curData:r.data}:null}}])})(b.PureComponent);goe=Yd;wc(Yd,"displayName","Bar");wc(Yd,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Vd.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});wc(Yd,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,m=e.offset,p=TGe(r,n);if(!p)return null;var v=t.layout,y=n.type.defaultProps,x=y!==void 0?vr(vr({},y),n.props):n.props,w=x.dataKey,N=x.children,S=x.minPointSize,_=v==="horizontal"?o:i,k=u?_.scale.domain():null,C=$Ge({numericAxis:_}),E=_a(N,bN),O=f.map(function(P,R){var T,D,z,I,F,U;u?T=IGe(u[d+R],k):(T=Ir(P,w),Array.isArray(T)||(T=[C,T]));var H=WZe(S,goe.defaultProps.minPointSize)(T[1],R);if(v==="horizontal"){var q,B=[o.scale(T[0]),o.scale(T[1])],L=B[0],V=B[1];D=e7({axis:i,ticks:l,bandSize:a,offset:p.offset,entry:P,index:R}),z=(q=V??L)!==null&&q!==void 0?q:void 0,I=p.size;var K=L-V;if(F=Number.isNaN(K)?0:K,U={x:D,y:o.y,width:I,height:o.height},Math.abs(H)>0&&Math.abs(F)<Math.abs(H)){var W=Ts(F||H)*(Math.abs(H)-Math.abs(F));z-=W,F+=W}}else{var ie=[i.scale(T[0]),i.scale(T[1])],ve=ie[0],ge=ie[1];if(D=ve,z=e7({axis:o,ticks:c,bandSize:a,offset:p.offset,entry:P,index:R}),I=ge-ve,F=p.size,U={x:i.x,y:z,width:i.width,height:F},Math.abs(H)>0&&Math.abs(I)<Math.abs(H)){var J=Ts(I||H)*(Math.abs(H)-Math.abs(I));I+=J}}return vr(vr(vr({},P),{},{x:D,y:z,width:I,height:F,value:u?T:T[1],payload:P,background:U},E&&E[R]&&E[R].props),{},{tooltipPayload:[qie(n,P)],tooltipPosition:{x:D+I/2,y:z+F/2}})});return vr({data:O,layout:v},m)});function Jx(e){"@babel/helpers - typeof";return Jx=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},Jx(e)}function rJe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PV(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,voe(r.key),r)}}function sJe(e,t,n){return t&&PV(e.prototype,t),n&&PV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?TV(Object(n),!0).forEach(function(r){FN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FN(e,t,n){return t=voe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function voe(e){var t=aJe(e,"string");return Jx(t)=="symbol"?t:t+""}function aJe(e,t){if(Jx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var boe=function(t,n,r,a,i){var o=t.width,l=t.height,c=t.layout,u=t.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},m=!!ya(u,Yd);return d.reduce(function(p,v){var y=n[v],x=y.orientation,w=y.domain,N=y.padding,S=N===void 0?{}:N,_=y.mirror,k=y.reversed,C="".concat(x).concat(_?"Mirror":""),E,O,P,R,T;if(y.type==="number"&&(y.padding==="gap"||y.padding==="no-gap")){var D=w[1]-w[0],z=1/0,I=y.categoricalDomain.sort(HBe);if(I.forEach(function(ie,ve){ve>0&&(z=Math.min((ie||0)-(I[ve-1]||0),z))}),Number.isFinite(z)){var F=z/D,U=y.layout==="vertical"?r.height:r.width;if(y.padding==="gap"&&(E=F*U/2),y.padding==="no-gap"){var H=Is(t.barCategoryGap,F*U),q=F*U/2;E=q-H-(q-H)/U*H}}}a==="xAxis"?O=[r.left+(S.left||0)+(E||0),r.left+r.width-(S.right||0)-(E||0)]:a==="yAxis"?O=c==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(E||0),r.top+r.height-(S.bottom||0)-(E||0)]:O=y.range,k&&(O=[O[1],O[0]]);var B=zie(y,i,m),L=B.scale,V=B.realScaleType;L.domain(w).range(O),Bie(L);var K=Uie(L,_i(_i({},y),{},{realScaleType:V}));a==="xAxis"?(T=x==="top"&&!_||x==="bottom"&&_,P=r.left,R=f[C]-T*y.height):a==="yAxis"&&(T=x==="left"&&!_||x==="right"&&_,P=f[C]-T*y.width,R=r.top);var W=_i(_i(_i({},y),K),{},{realScaleType:V,x:P,y:R,scale:L,width:a==="xAxis"?r.width:y.width,height:a==="yAxis"?r.height:y.height});return W.bandSize=lj(W,K),!y.hide&&a==="xAxis"?f[C]+=(T?-1:1)*W.height:y.hide||(f[C]+=(T?-1:1)*W.width),_i(_i({},p),{},FN({},v,W))},{})},woe=function(t,n){var r=t.x,a=t.y,i=n.x,o=n.y;return{x:Math.min(r,i),y:Math.min(a,o),width:Math.abs(i-r),height:Math.abs(o-a)}},iJe=function(t){var n=t.x1,r=t.y1,a=t.x2,i=t.y2;return woe({x:n,y:r},{x:a,y:i})},joe=(function(){function e(t){rJe(this,e),this.scale=t}return sJe(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]:{},a=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(a){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(),a=r[0],i=r[r.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();FN(joe,"EPS",1e-4);var V3=function(t){var n=Object.keys(t).reduce(function(r,a){return _i(_i({},r),{},FN({},a,joe.create(t[a])))},{});return _i(_i({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return MZe(a,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(a){return poe(a,function(i,o){return n[o].isInRange(i)})}})};function oJe(e){return(e%180+180)%180}var lJe=function(t){var n=t.width,r=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=oJe(a),o=i*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},cP,IV;function cJe(){if(IV)return cP;IV=1;var e=So(),t=Qy(),n=xN();function r(a){return function(i,o,l){var c=Object(i);if(!t(i)){var u=e(o,3);i=n(i),o=function(f){return u(c[f],f,c)}}var d=a(i,o,l);return d>-1?c[u?i[d]:d]:void 0}}return cP=r,cP}var uP,OV;function uJe(){if(OV)return uP;OV=1;var e=doe();function t(n){var r=e(n),a=r%1;return r===r?a?r-a:r:0}return uP=t,uP}var dP,MV;function dJe(){if(MV)return dP;MV=1;var e=Sae(),t=So(),n=uJe(),r=Math.max;function a(i,o,l){var c=i==null?0:i.length;if(!c)return-1;var u=l==null?0:n(l);return u<0&&(u=r(c+u,0)),e(i,t(o,3),u)}return dP=a,dP}var fP,RV;function fJe(){if(RV)return fP;RV=1;var e=cJe(),t=dJe(),n=e(t);return fP=n,fP}var hJe=fJe();const mJe=tn(hJe);var pJe=zse();const gJe=tn(pJe);var xJe=gJe(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("")}),W3=b.createContext(void 0),G3=b.createContext(void 0),Noe=b.createContext(void 0),Soe=b.createContext({}),koe=b.createContext(void 0),Coe=b.createContext(0),_oe=b.createContext(0),DV=function(t){var n=t.state,r=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,d=xJe(i);return X.createElement(W3.Provider,{value:r},X.createElement(G3.Provider,{value:a},X.createElement(Soe.Provider,{value:i},X.createElement(Noe.Provider,{value:d},X.createElement(koe.Provider,{value:o},X.createElement(Coe.Provider,{value:u},X.createElement(_oe.Provider,{value:c},l)))))))},yJe=function(){return b.useContext(koe)},Aoe=function(t){var n=b.useContext(W3);n==null&&kd();var r=n[t];return r==null&&kd(),r},vJe=function(){var t=b.useContext(W3);return lc(t)},bJe=function(){var t=b.useContext(G3),n=mJe(t,function(r){return poe(r.domain,Number.isFinite)});return n||lc(t)},Eoe=function(t){var n=b.useContext(G3);n==null&&kd();var r=n[t];return r==null&&kd(),r},wJe=function(){var t=b.useContext(Noe);return t},jJe=function(){return b.useContext(Soe)},K3=function(){return b.useContext(_oe)},Y3=function(){return b.useContext(Coe)};function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}function NJe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SJe(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,Toe(r.key),r)}}function kJe(e,t,n){return t&&SJe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CJe(e,t,n){return t=Cj(t),_Je(e,Poe()?Reflect.construct(t,n||[],Cj(e).constructor):t.apply(e,n))}function _Je(e,t){if(t&&(gm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AJe(e)}function AJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Poe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Poe=function(){return!!e})()}function Cj(e){return Cj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cj(e)}function EJe(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&&II(e,t)}function II(e,t){return II=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},II(e,t)}function LV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LV(Object(n),!0).forEach(function(r){X3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X3(e,t,n){return t=Toe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Toe(e){var t=PJe(e,"string");return gm(t)=="symbol"?t:t+""}function PJe(e,t){if(gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function TJe(e,t){return RJe(e)||MJe(e,t)||OJe(e,t)||IJe()}function IJe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1565In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OJe(e,t){if(e){if(typeof e=="string")return FV(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 FV(e,t)}}function FV(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 MJe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function RJe(e){if(Array.isArray(e))return e}function OI(){return OI=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},OI.apply(this,arguments)}var DJe=function(t,n){var r;return X.isValidElement(t)?r=X.cloneElement(t,n):Ct(t)?r=t(n):r=X.createElement("line",OI({},n,{className:"recharts-reference-line-line"})),r},LJe=function(t,n,r,a,i,o,l,c,u){var d=i.x,f=i.y,m=i.width,p=i.height;if(r){var v=u.y,y=t.y.apply(v,{position:o});if(uo(u,"discard")&&!t.y.isInRange(y))return null;var x=[{x:d+m,y},{x:d,y}];return c==="left"?x.reverse():x}if(n){var w=u.x,N=t.x.apply(w,{position:o});if(uo(u,"discard")&&!t.x.isInRange(N))return null;var S=[{x:N,y:f+p},{x:N,y:f}];return l==="top"?S.reverse():S}if(a){var _=u.segment,k=_.map(function(C){return t.apply(C,{position:o})});return uo(u,"discard")&&PZe(k,function(C){return!t.isInRange(C)})?null:k}return null};function $Je(e){var t=e.x,n=e.y,r=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=yJe(),d=Aoe(a),f=Eoe(i),m=wJe();if(!u||!m)return null;Ri(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=V3({x:d.scale,y:f.scale}),v=Or(t),y=Or(n),x=r&&r.length===2,w=LJe(p,v,y,x,m,e.position,d.orientation,f.orientation,e);if(!w)return null;var N=TJe(w,2),S=N[0],_=S.x,k=S.y,C=N[1],E=C.x,O=C.y,P=uo(e,"hidden")?"url(#".concat(u,")"):void 0,R=$V($V({clipPath:P},mt(e,!0)),{},{x1:_,y1:k,x2:E,y2:O});return X.createElement(sn,{className:Mt("recharts-reference-line",l)},DJe(o,R),Hr.renderCallByParent(e,iJe({x1:_,y1:k,x2:E,y2:O})))}var Q3=(function(e){function t(){return NJe(this,t),CJe(this,t,arguments)}return EJe(t,e),kJe(t,[{key:"render",value:function(){return X.createElement($Je,this.props)}}])})(X.Component);X3(Q3,"displayName","ReferenceLine");X3(Q3,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function MI(){return MI=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},MI.apply(this,arguments)}function xm(e){"@babel/helpers - typeof";return xm=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},xm(e)}function zV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function BV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zV(Object(n),!0).forEach(function(r){zN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FJe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zJe(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,Ooe(r.key),r)}}function BJe(e,t,n){return t&&zJe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function UJe(e,t,n){return t=_j(t),HJe(e,Ioe()?Reflect.construct(t,n||[],_j(e).constructor):t.apply(e,n))}function HJe(e,t){if(t&&(xm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qJe(e)}function qJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ioe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ioe=function(){return!!e})()}function _j(e){return _j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_j(e)}function VJe(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&&RI(e,t)}function RI(e,t){return RI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},RI(e,t)}function zN(e,t,n){return t=Ooe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ooe(e){var t=WJe(e,"string");return xm(t)=="symbol"?t:t+""}function WJe(e,t){if(xm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GJe=function(t){var n=t.x,r=t.y,a=t.xAxis,i=t.yAxis,o=V3({x:a.scale,y:i.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return uo(t,"discard")&&!o.isInRange(l)?null:l},BN=(function(e){function t(){return FJe(this,t),UJe(this,t,arguments)}return VJe(t,e),BJe(t,[{key:"render",value:function(){var r=this.props,a=r.x,i=r.y,o=r.r,l=r.alwaysShow,c=r.clipPathId,u=Or(a),d=Or(i);if(Ri(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=GJe(this.props);if(!f)return null;var m=f.x,p=f.y,v=this.props,y=v.shape,x=v.className,w=uo(this.props,"hidden")?"url(#".concat(c,")"):void 0,N=BV(BV({clipPath:w},mt(this.props,!0)),{},{cx:m,cy:p});return X.createElement(sn,{className:Mt("recharts-reference-dot",x)},t.renderDot(y,N),Hr.renderCallByParent(this.props,{x:m-o,y:p-o,width:2*o,height:2*o}))}}])})(X.Component);zN(BN,"displayName","ReferenceDot");zN(BN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});zN(BN,"renderDot",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):Ct(e)?n=e(t):n=X.createElement(IN,MI({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function DI(){return DI=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},DI.apply(this,arguments)}function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function UV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function HV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UV(Object(n),!0).forEach(function(r){UN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KJe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YJe(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,Roe(r.key),r)}}function XJe(e,t,n){return t&&YJe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function QJe(e,t,n){return t=Aj(t),ZJe(e,Moe()?Reflect.construct(t,n||[],Aj(e).constructor):t.apply(e,n))}function ZJe(e,t){if(t&&(ym(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JJe(e)}function JJe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Moe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Moe=function(){return!!e})()}function Aj(e){return Aj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Aj(e)}function eet(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&&LI(e,t)}function LI(e,t){return LI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},LI(e,t)}function UN(e,t,n){return t=Roe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Roe(e){var t=tet(e,"string");return ym(t)=="symbol"?t:t+""}function tet(e,t){if(ym(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var net=function(t,n,r,a,i){var o=i.x1,l=i.x2,c=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var m=V3({x:d.scale,y:f.scale}),p={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(c,{position:"start"}):m.y.rangeMin},v={x:n?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:a?m.y.apply(u,{position:"end"}):m.y.rangeMax};return uo(i,"discard")&&(!m.isInRange(p)||!m.isInRange(v))?null:woe(p,v)},HN=(function(e){function t(){return KJe(this,t),QJe(this,t,arguments)}return eet(t,e),XJe(t,[{key:"render",value:function(){var r=this.props,a=r.x1,i=r.x2,o=r.y1,l=r.y2,c=r.className,u=r.alwaysShow,d=r.clipPathId;Ri(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Or(a),m=Or(i),p=Or(o),v=Or(l),y=this.props.shape;if(!f&&!m&&!p&&!v&&!y)return null;var x=net(f,m,p,v,this.props);if(!x&&!y)return null;var w=uo(this.props,"hidden")?"url(#".concat(d,")"):void 0;return X.createElement(sn,{className:Mt("recharts-reference-area",c)},t.renderRect(y,HV(HV({clipPath:w},mt(this.props,!0)),x)),Hr.renderCallByParent(this.props,x))}}])})(X.Component);UN(HN,"displayName","ReferenceArea");UN(HN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});UN(HN,"renderRect",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):Ct(e)?n=e(t):n=X.createElement(q3,DI({},t,{className:"recharts-reference-area-rect"})),n});function Doe(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],a=0;a<e.length;a+=t)r.push(e[a]);return r}function ret(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return lJe(r,n)}function set(e,t,n){var r=n==="width",a=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:r?a:i,end:r?a+o:i+l}:{start:r?a+o:i+l,end:r?a:i}}function Ej(e,t,n,r,a){if(e*t<e*r||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-a)<=0}function aet(e,t){return Doe(e,t+1)}function iet(e,t,n,r,a){for(var i=(r||[]).slice(),o=t.start,l=t.end,c=0,u=1,d=o,f=function(){var v=r==null?void 0:r[c];if(v===void 0)return{v:Doe(r,u)};var y=c,x,w=function(){return x===void 0&&(x=n(v,y)),x},N=v.coordinate,S=c===0||Ej(e,N,w,d,l);S||(c=0,d=o,u+=1),S&&(d=N+e*(w()/2+a),c+=u)},m;u<=i.length;)if(m=f(),m)return m.v;return[]}function ey(e){"@babel/helpers - typeof";return ey=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},ey(e)}function qV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ms(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qV(Object(n),!0).forEach(function(r){oet(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oet(e,t,n){return t=cet(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cet(e){var t=uet(e,"string");return ey(t)=="symbol"?t:t+""}function uet(e,t){if(ey(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ey(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function det(e,t,n,r,a){for(var i=(r||[]).slice(),o=i.length,l=t.start,c=t.end,u=function(m){var p=i[m],v,y=function(){return v===void 0&&(v=n(p,m)),v};if(m===o-1){var x=e*(p.coordinate+e*y()/2-c);i[m]=p=ms(ms({},p),{},{tickCoord:x>0?p.coordinate-x*e:p.coordinate})}else i[m]=p=ms(ms({},p),{},{tickCoord:p.coordinate});var w=Ej(e,p.tickCoord,y,l,c);w&&(c=p.tickCoord-e*(y()/2+a),i[m]=ms(ms({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)u(d);return i}function fet(e,t,n,r,a,i){var o=(r||[]).slice(),l=o.length,c=t.start,u=t.end;if(i){var d=r[l-1],f=n(d,l-1),m=e*(d.coordinate+e*f/2-u);o[l-1]=d=ms(ms({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate});var p=Ej(e,d.tickCoord,function(){return f},c,u);p&&(u=d.tickCoord-e*(f/2+a),o[l-1]=ms(ms({},d),{},{isShow:!0}))}for(var v=i?l-1:l,y=function(N){var S=o[N],_,k=function(){return _===void 0&&(_=n(S,N)),_};if(N===0){var C=e*(S.coordinate-e*k()/2-c);o[N]=S=ms(ms({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else o[N]=S=ms(ms({},S),{},{tickCoord:S.coordinate});var E=Ej(e,S.tickCoord,k,c,u);E&&(c=S.tickCoord+e*(k()/2+a),o[N]=ms(ms({},S),{},{isShow:!0}))},x=0;x<v;x++)y(x);return o}function Z3(e,t,n){var r=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!r)return[];if(ze(c)||Vd.isSsr)return aet(a,typeof c=="number"&&ze(c)?c:0);var m=[],p=l==="top"||l==="bottom"?"width":"height",v=d&&p==="width"?Mg(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},y=function(S,_){var k=Ct(u)?u(S.value,_):S.value;return p==="width"?ret(Mg(k,{fontSize:t,letterSpacing:n}),v,f):Mg(k,{fontSize:t,letterSpacing:n})[p]},x=a.length>=2?Ts(a[1].coordinate-a[0].coordinate):1,w=set(i,x,p);return c==="equidistantPreserveStart"?iet(x,w,y,a,o):(c==="preserveStart"||c==="preserveStartEnd"?m=fet(x,w,y,a,o,c==="preserveStartEnd"):m=det(x,w,y,a,o),m.filter(function(N){return N.isShow}))}var het=["viewBox"],met=["viewBox"],pet=["ticks"];function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function eh(){return eh=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},eh.apply(this,arguments)}function VV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VV(Object(n),!0).forEach(function(r){J3(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hP(e,t){if(e==null)return{};var n=get(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function get(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 xet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WV(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,$oe(r.key),r)}}function yet(e,t,n){return t&&WV(e.prototype,t),n&&WV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vet(e,t,n){return t=Pj(t),bet(e,Loe()?Reflect.construct(t,n||[],Pj(e).constructor):t.apply(e,n))}function bet(e,t){if(t&&(vm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wet(e)}function wet(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Loe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Loe=function(){return!!e})()}function Pj(e){return Pj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pj(e)}function jet(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&&$I(e,t)}function $I(e,t){return $I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},$I(e,t)}function J3(e,t,n){return t=$oe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $oe(e){var t=Net(e,"string");return vm(t)=="symbol"?t:t+""}function Net(e,t){if(vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sp=(function(e){function t(n){var r;return xet(this,t),r=vet(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return jet(t,e),yet(t,[{key:"shouldComponentUpdate",value:function(r,a){var i=r.viewBox,o=hP(r,het),l=this.props,c=l.viewBox,u=hP(l,met);return!dh(i,c)||!dh(o,u)||!dh(a,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var a=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var a=this.props,i=a.x,o=a.y,l=a.width,c=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,m=a.tickMargin,p,v,y,x,w,N,S=f?-1:1,_=r.tickSize||d,k=ze(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":p=v=r.coordinate,x=o+ +!f*c,y=x-S*_,N=y-S*m,w=k;break;case"left":y=x=r.coordinate,v=i+ +!f*l,p=v-S*_,w=p-S*m,N=k;break;case"right":y=x=r.coordinate,v=i+ +f*l,p=v+S*_,w=p+S*m,N=k;break;default:p=v=r.coordinate,x=o+ +f*c,y=x+S*_,N=y+S*m,w=k;break}return{line:{x1:p,y1:y,x2:v,y2:x},tick:{x:w,y:N}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,a=r.orientation,i=r.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,a=r.x,i=r.y,o=r.width,l=r.height,c=r.orientation,u=r.mirror,d=r.axisLine,f=Pr(Pr(Pr({},mt(this.props,!1)),mt(d,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var m=+(c==="top"&&!u||c==="bottom"&&u);f=Pr(Pr({},f),{},{x1:a,y1:i+m*l,x2:a+o,y2:i+m*l})}else{var p=+(c==="left"&&!u||c==="right"&&u);f=Pr(Pr({},f),{},{x1:a+p*o,y1:i,x2:a+p*o,y2:i+l})}return X.createElement("line",eh({},f,{className:Mt("recharts-cartesian-axis-line",Ca(d,"className"))}))}},{key:"renderTicks",value:function(r,a,i){var o=this,l=this.props,c=l.tickLine,u=l.stroke,d=l.tick,f=l.tickFormatter,m=l.unit,p=Z3(Pr(Pr({},this.props),{},{ticks:r}),a,i),v=this.getTickTextAnchor(),y=this.getTickVerticalAnchor(),x=mt(this.props,!1),w=mt(d,!1),N=Pr(Pr({},x),{},{fill:"none"},mt(c,!1)),S=p.map(function(_,k){var C=o.getTickLineCoord(_),E=C.line,O=C.tick,P=Pr(Pr(Pr(Pr({textAnchor:v,verticalAnchor:y},x),{},{stroke:"none",fill:u},w),O),{},{index:k,payload:_,visibleTicksCount:p.length,tickFormatter:f});return X.createElement(sn,eh({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},jd(o.props,_,k)),c&&X.createElement("line",eh({},N,E,{className:Mt("recharts-cartesian-axis-tick-line",Ca(c,"className"))})),d&&t.renderTickItem(d,P,"".concat(Ct(f)?f(_.value,k):_.value).concat(m||"")))});return X.createElement("g",{className:"recharts-cartesian-axis-ticks"},S)}},{key:"render",value:function(){var r=this,a=this.props,i=a.axisLine,o=a.width,l=a.height,c=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,m=f.ticks,p=hP(f,pet),v=m;return Ct(c)&&(v=m&&m.length>0?c(this.props):c(p)),o<=0||l<=0||!v||!v.length?null:X.createElement(sn,{className:Mt("recharts-cartesian-axis",u),ref:function(x){r.layerReference=x}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),Hr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,a,i){var o,l=Mt(a.className,"recharts-cartesian-axis-tick-value");return X.isValidElement(r)?o=X.cloneElement(r,Pr(Pr({},a),{},{className:l})):Ct(r)?o=r(Pr(Pr({},a),{},{className:l})):o=X.createElement(Nd,eh({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])})(b.Component);J3(sp,"displayName","CartesianAxis");J3(sp,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var ket=["x1","y1","x2","y2","key"],Cet=["offset"];function Cd(e){"@babel/helpers - typeof";return Cd=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},Cd(e)}function GV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function gs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GV(Object(n),!0).forEach(function(r){_et(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _et(e,t,n){return t=Aet(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aet(e){var t=Eet(e,"string");return Cd(t)=="symbol"?t:t+""}function Eet(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ou(){return Ou=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},Ou.apply(this,arguments)}function KV(e,t){if(e==null)return{};var n=Pet(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pet(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 Tet=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,a=t.x,i=t.y,o=t.width,l=t.height,c=t.ry;return X.createElement("rect",{x:a,y:i,ry:c,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Foe(e,t){var n;if(X.isValidElement(e))n=X.cloneElement(e,t);else if(Ct(e))n=e(t);else{var r=t.x1,a=t.y1,i=t.x2,o=t.y2,l=t.key,c=KV(t,ket),u=mt(c,!1);u.offset;var d=KV(u,Cet);n=X.createElement("line",Ou({},d,{x1:r,y1:a,x2:i,y2:o,fill:"none",key:l}))}return n}function Iet(e){var t=e.x,n=e.width,r=e.horizontal,a=r===void 0?!0:r,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=gs(gs({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return Foe(a,u)});return X.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function Oet(e){var t=e.y,n=e.height,r=e.vertical,a=r===void 0?!0:r,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=gs(gs({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return Foe(a,u)});return X.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function Met(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,a=e.y,i=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var d=l.map(function(m){return Math.round(m+a-a)}).sort(function(m,p){return m-p});a!==d[0]&&d.unshift(0);var f=d.map(function(m,p){var v=!d[p+1],y=v?a+o-m:d[p+1]-m;if(y<=0)return null;var x=p%t.length;return X.createElement("rect",{key:"react-".concat(p),y:m,x:r,height:y,width:i,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return X.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function Ret(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var d=u.map(function(m){return Math.round(m+i-i)}).sort(function(m,p){return m-p});i!==d[0]&&d.unshift(0);var f=d.map(function(m,p){var v=!d[p+1],y=v?i+l-m:d[p+1]-m;if(y<=0)return null;var x=p%r.length;return X.createElement("rect",{key:"react-".concat(p),x:m,y:o,width:y,height:c,stroke:"none",fill:r[x],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return X.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var Det=function(t,n){var r=t.xAxis,a=t.width,i=t.height,o=t.offset;return Fie(Z3(gs(gs(gs({},sp.defaultProps),r),{},{ticks:Zo(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,n)},Let=function(t,n){var r=t.yAxis,a=t.width,i=t.height,o=t.offset;return Fie(Z3(gs(gs(gs({},sp.defaultProps),r),{},{ticks:Zo(r,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,n)},$f={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function FI(e){var t,n,r,a,i,o,l=K3(),c=Y3(),u=jJe(),d=gs(gs({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:$f.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:$f.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:$f.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:$f.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:$f.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:$f.verticalFill,x:ze(e.x)?e.x:u.left,y:ze(e.y)?e.y:u.top,width:ze(e.width)?e.width:u.width,height:ze(e.height)?e.height:u.height}),f=d.x,m=d.y,p=d.width,v=d.height,y=d.syncWithTicks,x=d.horizontalValues,w=d.verticalValues,N=vJe(),S=bJe();if(!ze(p)||p<=0||!ze(v)||v<=0||!ze(f)||f!==+f||!ze(m)||m!==+m)return null;var _=d.verticalCoordinatesGenerator||Det,k=d.horizontalCoordinatesGenerator||Let,C=d.horizontalPoints,E=d.verticalPoints;if((!C||!C.length)&&Ct(k)){var O=x&&x.length,P=k({yAxis:S?gs(gs({},S),{},{ticks:O?x:S.ticks}):void 0,width:l,height:c,offset:u},O?!0:y);Ri(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Cd(P),"]")),Array.isArray(P)&&(C=P)}if((!E||!E.length)&&Ct(_)){var R=w&&w.length,T=_({xAxis:N?gs(gs({},N),{},{ticks:R?w:N.ticks}):void 0,width:l,height:c,offset:u},R?!0:y);Ri(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Cd(T),"]")),Array.isArray(T)&&(E=T)}return X.createElement("g",{className:"recharts-cartesian-grid"},X.createElement(Tet,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),X.createElement(Iet,Ou({},d,{offset:u,horizontalPoints:C,xAxis:N,yAxis:S})),X.createElement(Oet,Ou({},d,{offset:u,verticalPoints:E,xAxis:N,yAxis:S})),X.createElement(Met,Ou({},d,{horizontalPoints:C})),X.createElement(Ret,Ou({},d,{verticalPoints:E})))}FI.displayName="CartesianGrid";var $et=["type","layout","connectNulls","ref"],Fet=["key"];function bm(e){"@babel/helpers - typeof";return bm=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},bm(e)}function YV(e,t){if(e==null)return{};var n=zet(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zet(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 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 XV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XV(Object(n),!0).forEach(function(r){Ai(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XV(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ff(e){return qet(e)||Het(e)||Uet(e)||Bet()}function Bet(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1566In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uet(e,t){if(e){if(typeof e=="string")return zI(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 zI(e,t)}}function Het(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qet(e){if(Array.isArray(e))return zI(e)}function zI(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 Vet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QV(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,Boe(r.key),r)}}function Wet(e,t,n){return t&&QV(e.prototype,t),n&&QV(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Get(e,t,n){return t=Tj(t),Ket(e,zoe()?Reflect.construct(t,n||[],Tj(e).constructor):t.apply(e,n))}function Ket(e,t){if(t&&(bm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yet(e)}function Yet(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zoe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zoe=function(){return!!e})()}function Tj(e){return Tj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tj(e)}function Xet(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&&BI(e,t)}function BI(e,t){return BI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},BI(e,t)}function Ai(e,t,n){return t=Boe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Boe(e){var t=Qet(e,"string");return bm(t)=="symbol"?t:t+""}function Qet(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wm=(function(e){function t(){var n;Vet(this,t);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return n=Get(this,t,[].concat(a)),Ai(n,"state",{isAnimationFinished:!0,totalLength:0}),Ai(n,"generateSimpleStrokeDasharray",function(o,l){return"".concat(l,"px ").concat(o-l,"px")}),Ai(n,"getStrokeDasharray",function(o,l,c){var u=c.reduce(function(w,N){return w+N});if(!u)return n.generateSimpleStrokeDasharray(l,o);for(var d=Math.floor(o/u),f=o%u,m=l-o,p=[],v=0,y=0;v<c.length;y+=c[v],++v)if(y+c[v]>f){p=[].concat(Ff(c.slice(0,v)),[f-y]);break}var x=p.length%2===0?[0,m]:[m];return[].concat(Ff(t.repeat(c,d)),Ff(p),x).map(function(w){return"".concat(w,"px")}).join(", ")}),Ai(n,"id",ep("recharts-line-")),Ai(n,"pathRef",function(o){n.mainCurve=o}),Ai(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ai(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Xet(t,e),Wet(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.points,l=i.xAxis,c=i.yAxis,u=i.layout,d=i.children,f=_a(d,n0);if(!f)return null;var m=function(y,x){return{x:y.x,y:y.y,value:y.value,errorVal:Ir(y.payload,x)}},p={clipPath:r?"url(#clipPath-".concat(a,")"):null};return X.createElement(sn,p,f.map(function(v){return X.cloneElement(v,{key:"bar-".concat(v.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,dataPointFormatter:m})}))}},{key:"renderDots",value:function(r,a,i){var o=this.props.isAnimationActive;if(o&&!this.state.isAnimationFinished)return null;var l=this.props,c=l.dot,u=l.points,d=l.dataKey,f=mt(this.props,!1),m=mt(c,!0),p=u.map(function(y,x){var w=ma(ma(ma({key:"dot-".concat(x),r:3},f),m),{},{index:x,cx:y.x,cy:y.y,value:y.value,dataKey:d,payload:y.payload,points:u});return t.renderDotItem(c,w)}),v={clipPath:r?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return X.createElement(sn,zg({className:"recharts-line-dots",key:"dots"},v),p)}},{key:"renderCurveStatically",value:function(r,a,i,o){var l=this.props,c=l.type,u=l.layout,d=l.connectNulls;l.ref;var f=YV(l,$et),m=ma(ma(ma({},mt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:r},o),{},{type:c,layout:u,connectNulls:d});return X.createElement(dj,zg({},m,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,a){var i=this,o=this.props,l=o.points,c=o.strokeDasharray,u=o.isAnimationActive,d=o.animationBegin,f=o.animationDuration,m=o.animationEasing,p=o.animationId,v=o.animateNewValues,y=o.width,x=o.height,w=this.state,N=w.prevPoints,S=w.totalLength;return X.createElement(yo,{begin:d,duration:f,isActive:u,easing:m,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(_){var k=_.t;if(N){var C=N.length/l.length,E=l.map(function(D,z){var I=Math.floor(z*C);if(N[I]){var F=N[I],U=ba(F.x,D.x),H=ba(F.y,D.y);return ma(ma({},D),{},{x:U(k),y:H(k)})}if(v){var q=ba(y*2,D.x),B=ba(x/2,D.y);return ma(ma({},D),{},{x:q(k),y:B(k)})}return ma(ma({},D),{},{x:D.x,y:D.y})});return i.renderCurveStatically(E,r,a)}var O=ba(0,S),P=O(k),R;if(c){var T="".concat(c).split(/[,\s]+/gim).map(function(D){return parseFloat(D)});R=i.getStrokeDasharray(P,S,T)}else R=i.generateSimpleStrokeDasharray(S,P);return i.renderCurveStatically(l,r,a,{strokeDasharray:R})})}},{key:"renderCurve",value:function(r,a){var i=this.props,o=i.points,l=i.isAnimationActive,c=this.state,u=c.prevPoints,d=c.totalLength;return l&&o&&o.length&&(!u&&d>0||!t0(u,o))?this.renderCurveWithAnimation(r,a):this.renderCurveStatically(o,r,a)}},{key:"render",value:function(){var r,a=this.props,i=a.hide,o=a.dot,l=a.points,c=a.className,u=a.xAxis,d=a.yAxis,f=a.top,m=a.left,p=a.width,v=a.height,y=a.isAnimationActive,x=a.id;if(i||!l||!l.length)return null;var w=this.state.isAnimationFinished,N=l.length===1,S=Mt("recharts-line",c),_=u&&u.allowDataOverflow,k=d&&d.allowDataOverflow,C=_||k,E=Tt(x)?this.id:x,O=(r=mt(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},P=O.r,R=P===void 0?3:P,T=O.strokeWidth,D=T===void 0?2:T,z=ZBe(o)?o:{},I=z.clipDot,F=I===void 0?!0:I,U=R*2+D;return X.createElement(sn,{className:S},_||k?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(E)},X.createElement("rect",{x:_?m:m-p/2,y:k?f:f-v/2,width:_?p:p*2,height:k?v:v*2})),!F&&X.createElement("clipPath",{id:"clipPath-dots-".concat(E)},X.createElement("rect",{x:m-U/2,y:f-U/2,width:p+U,height:v+U}))):null,!N&&this.renderCurve(C,E),this.renderErrorBar(C,E),(N||o)&&this.renderDots(C,F,E),(!y||w)&&sl.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,a){return r.animationId!==a.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:a.curPoints}:r.points!==a.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,a){for(var i=r.length%2!==0?[].concat(Ff(r),[0]):r,o=[],l=0;l<a;++l)o=[].concat(Ff(o),Ff(i));return o}},{key:"renderDotItem",value:function(r,a){var i;if(X.isValidElement(r))i=X.cloneElement(r,a);else if(Ct(r))i=r(a);else{var o=a.key,l=YV(a,Fet),c=Mt("recharts-line-dot",typeof r!="boolean"?r.className:"");i=X.createElement(IN,zg({key:o},l,{className:c}))}return i}}])})(b.PureComponent);Ai(wm,"displayName","Line");Ai(wm,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!Vd.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Ai(wm,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,o=e.dataKey,l=e.bandSize,c=e.displayedData,u=e.offset,d=t.layout,f=c.map(function(m,p){var v=Ir(m,o);return d==="horizontal"?{x:Jq({axis:n,ticks:a,bandSize:l,entry:m,index:p}),y:Tt(v)?null:r.scale(v),value:v,payload:m}:{x:Tt(v)?null:n.scale(v),y:Jq({axis:r,ticks:i,bandSize:l,entry:m,index:p}),value:v,payload:m}});return ma({points:f,layout:d},u)});function jm(e){"@babel/helpers - typeof";return jm=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},jm(e)}function Zet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jet(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,qoe(r.key),r)}}function ett(e,t,n){return t&&Jet(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ttt(e,t,n){return t=Ij(t),ntt(e,Uoe()?Reflect.construct(t,n||[],Ij(e).constructor):t.apply(e,n))}function ntt(e,t){if(t&&(jm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rtt(e)}function rtt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uoe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uoe=function(){return!!e})()}function Ij(e){return Ij=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ij(e)}function stt(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&&UI(e,t)}function UI(e,t){return UI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},UI(e,t)}function Hoe(e,t,n){return t=qoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qoe(e){var t=att(e,"string");return jm(t)=="symbol"?t:t+""}function att(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function HI(){return HI=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},HI.apply(this,arguments)}function itt(e){var t=e.xAxisId,n=K3(),r=Y3(),a=Aoe(t);return a==null?null:b.createElement(sp,HI({},a,{className:Mt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return Zo(o,!0)}}))}var Nm=(function(e){function t(){return Zet(this,t),ttt(this,t,arguments)}return stt(t,e),ett(t,[{key:"render",value:function(){return b.createElement(itt,this.props)}}])})(b.Component);Hoe(Nm,"displayName","XAxis");Hoe(Nm,"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 Sm(e){"@babel/helpers - typeof";return Sm=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},Sm(e)}function ott(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ltt(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,Goe(r.key),r)}}function ctt(e,t,n){return t&&ltt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function utt(e,t,n){return t=Oj(t),dtt(e,Voe()?Reflect.construct(t,n||[],Oj(e).constructor):t.apply(e,n))}function dtt(e,t){if(t&&(Sm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ftt(e)}function ftt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Voe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Voe=function(){return!!e})()}function Oj(e){return Oj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Oj(e)}function htt(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&&qI(e,t)}function qI(e,t){return qI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},qI(e,t)}function Woe(e,t,n){return t=Goe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Goe(e){var t=mtt(e,"string");return Sm(t)=="symbol"?t:t+""}function mtt(e,t){if(Sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function VI(){return VI=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},VI.apply(this,arguments)}var ptt=function(t){var n=t.yAxisId,r=K3(),a=Y3(),i=Eoe(n);return i==null?null:b.createElement(sp,VI({},i,{className:Mt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:r,height:a},ticksGenerator:function(l){return Zo(l,!0)}}))},km=(function(e){function t(){return ott(this,t),utt(this,t,arguments)}return htt(t,e),ctt(t,[{key:"render",value:function(){return b.createElement(ptt,this.props)}}])})(b.Component);Woe(km,"displayName","YAxis");Woe(km,"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 ZV(e){return vtt(e)||ytt(e)||xtt(e)||gtt()}function gtt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1567In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xtt(e,t){if(e){if(typeof e=="string")return WI(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 WI(e,t)}}function ytt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vtt(e){if(Array.isArray(e))return WI(e)}function WI(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 GI=function(t,n,r,a,i){var o=_a(t,Q3),l=_a(t,BN),c=[].concat(ZV(o),ZV(l)),u=_a(t,HN),d="".concat(a,"Id"),f=a[0],m=n;if(c.length&&(m=c.reduce(function(y,x){if(x.props[d]===r&&uo(x.props,"extendDomain")&&ze(x.props[f])){var w=x.props[f];return[Math.min(y[0],w),Math.max(y[1],w)]}return y},m)),u.length){var p="".concat(f,"1"),v="".concat(f,"2");m=u.reduce(function(y,x){if(x.props[d]===r&&uo(x.props,"extendDomain")&&ze(x.props[p])&&ze(x.props[v])){var w=x.props[p],N=x.props[v];return[Math.min(y[0],w,N),Math.max(y[1],w,N)]}return y},m)}return i&&i.length&&(m=i.reduce(function(y,x){return ze(x)?[Math.min(y[0],x),Math.max(y[1],x)]:y},m)),m},mP={exports:{}},JV;function btt(){return JV||(JV=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function a(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,f,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||c,m),v=n?n+u:u;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],p]:c._events[v].push(p):(c._events[v]=p,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=n?n+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,p=f.length,v=new Array(p);m<p;m++)v[m]=f[m].fn;return v},l.prototype.listenerCount=function(u){var d=n?n+u:u,f=this._events[d];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,d,f,m,p,v){var y=n?n+u:u;if(!this._events[y])return!1;var x=this._events[y],w=arguments.length,N,S;if(x.fn){switch(x.once&&this.removeListener(u,x.fn,void 0,!0),w){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,d),!0;case 3:return x.fn.call(x.context,d,f),!0;case 4:return x.fn.call(x.context,d,f,m),!0;case 5:return x.fn.call(x.context,d,f,m,p),!0;case 6:return x.fn.call(x.context,d,f,m,p,v),!0}for(S=1,N=new Array(w-1);S<w;S++)N[S-1]=arguments[S];x.fn.apply(x.context,N)}else{var _=x.length,k;for(S=0;S<_;S++)switch(x[S].once&&this.removeListener(u,x[S].fn,void 0,!0),w){case 1:x[S].fn.call(x[S].context);break;case 2:x[S].fn.call(x[S].context,d);break;case 3:x[S].fn.call(x[S].context,d,f);break;case 4:x[S].fn.call(x[S].context,d,f,m);break;default:if(!N)for(k=1,N=new Array(w-1);k<w;k++)N[k-1]=arguments[k];x[S].fn.apply(x[S].context,N)}}return!0},l.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},l.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},l.prototype.removeListener=function(u,d,f,m){var p=n?n+u:u;if(!this._events[p])return this;if(!d)return o(this,p),this;var v=this._events[p];if(v.fn)v.fn===d&&(!m||v.once)&&(!f||v.context===f)&&o(this,p);else{for(var y=0,x=[],w=v.length;y<w;y++)(v[y].fn!==d||m&&!v[y].once||f&&v[y].context!==f)&&x.push(v[y]);x.length?this._events[p]=x.length===1?x[0]:x:o(this,p)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(mP)),mP.exports}var wtt=btt();const jtt=tn(wtt);var pP=new jtt,gP="recharts.syncMouseEvents";function ty(e){"@babel/helpers - typeof";return ty=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},ty(e)}function Ntt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Stt(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,Koe(r.key),r)}}function ktt(e,t,n){return t&&Stt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xP(e,t,n){return t=Koe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Koe(e){var t=Ctt(e,"string");return ty(t)=="symbol"?t:t+""}function Ctt(e,t){if(ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _tt=(function(){function e(){Ntt(this,e),xP(this,"activeIndex",0),xP(this,"coordinateList",[]),xP(this,"layout","horizontal")}return ktt(e,[{key:"setDetails",value:function(n){var r,a=n.coordinateList,i=a===void 0?null:a,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,d=n.offset,f=d===void 0?null:d,m=n.mouseHandlerCallback,p=m===void 0?null:m;this.coordinateList=(r=i??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??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 a=this.container.getBoundingClientRect(),i=a.x,o=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=i+c+u,m=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:f,pageY:m})}}}])})();function Att(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],a=e==null?void 0:e[1];if(r&&a&&ze(r)&&ze(a))return!0}return!1}function Ett(e,t,n,r){var a=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Yoe(e){var t=e.cx,n=e.cy,r=e.radius,a=e.startAngle,i=e.endAngle,o=On(t,n,r,a),l=On(t,n,r,i);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:a,endAngle:i}}function Ptt(e,t,n){var r,a,i,o;if(e==="horizontal")r=t.x,i=r,a=n.top,o=n.top+n.height;else if(e==="vertical")a=t.y,o=a,r=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,m=On(l,c,u,f),p=On(l,c,d,f);r=m.x,a=m.y,i=p.x,o=p.y}else return Yoe(t);return[{x:r,y:a},{x:i,y:o}]}function ny(e){"@babel/helpers - typeof";return ny=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},ny(e)}function eW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).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?eW(Object(n),!0).forEach(function(r){Ttt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ttt(e,t,n){return t=Itt(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Itt(e){var t=Ott(e,"string");return ny(t)=="symbol"?t:t+""}function Ott(e,t){if(ny(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ny(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mtt(e){var t,n,r=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,m=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||!i||!o||m!=="ScatterChart"&&a!=="axis")return null;var v,y=dj;if(m==="ScatterChart")v=o,y=eQe;else if(m==="BarChart")v=Ett(f,o,c,d),y=q3;else if(f==="radial"){var x=Yoe(o),w=x.cx,N=x.cy,S=x.radius,_=x.startAngle,k=x.endAngle;v={cx:w,cy:N,startAngle:_,endAngle:k,innerRadius:S,outerRadius:S},y=Xie}else v={points:Ptt(f,o,c)},y=dj;var C=xb(xb(xb(xb({stroke:"#ccc",pointerEvents:"none"},c),v),mt(p,!1)),{},{payload:l,payloadIndex:u,className:Mt("recharts-tooltip-cursor",p.className)});return b.isValidElement(p)?b.cloneElement(p,C):b.createElement(y,C)}var Rtt=["item"],Dtt=["children","className","width","height","style","compact","title","desc"];function Cm(e){"@babel/helpers - typeof";return Cm=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},Cm(e)}function th(){return th=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},th.apply(this,arguments)}function tW(e,t){return Ftt(e)||$tt(e,t)||Qoe(e,t)||Ltt()}function Ltt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1568In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $tt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(r=i.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,a=d}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Ftt(e){if(Array.isArray(e))return e}function nW(e,t){if(e==null)return{};var n=ztt(e,t),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ztt(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 Btt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Utt(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,Zoe(r.key),r)}}function Htt(e,t,n){return t&&Utt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qtt(e,t,n){return t=Mj(t),Vtt(e,Xoe()?Reflect.construct(t,n||[],Mj(e).constructor):t.apply(e,n))}function Vtt(e,t){if(t&&(Cm(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wtt(e)}function Wtt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xoe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Xoe=function(){return!!e})()}function Mj(e){return Mj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mj(e)}function Gtt(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&&KI(e,t)}function KI(e,t){return KI=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},KI(e,t)}function _m(e){return Xtt(e)||Ytt(e)||Qoe(e)||Ktt()}function Ktt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
1569In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qoe(e,t){if(e){if(typeof e=="string")return YI(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 YI(e,t)}}function Ytt(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xtt(e){if(Array.isArray(e))return YI(e)}function YI(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 rW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rW(Object(n),!0).forEach(function(r){yt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yt(e,t,n){return t=Zoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zoe(e){var t=Qtt(e,"string");return Cm(t)=="symbol"?t:t+""}function Qtt(e,t){if(Cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ztt={xAxis:["bottom","top"],yAxis:["left","right"]},Jtt={width:"100%",height:"100%"},Joe={x:0,y:0};function yb(e){return e}var ent=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},tnt=function(t,n,r,a){var i=n.find(function(d){return d&&d.index===r});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=a.radius;return ke(ke(ke({},a),On(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,u=a.angle;return ke(ke(ke({},a),On(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return Joe},qN=function(t,n){var r=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,o=(r??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(_m(l),_m(u)):l},[]);return o.length>0?o:t&&t.length&&ze(a)&&ze(i)?t.slice(a,i+1):[]};function ele(e){return e==="number"?[0,"auto"]:void 0}var XI=function(t,n,r,a){var i=t.graphicalItems,o=t.tooltipAxis,l=qN(n,t);return r<0||!i||!i.length||r>=l.length?null:i.reduce(function(c,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?l:f;m=zw(p,o.dataKey,a)}else m=f&&f[r]||l[r];return m?[].concat(_m(c),[qie(u,m)]):c},[])},sW=function(t,n,r,a){var i=a||{x:t.chartX,y:t.chartY},o=ent(i,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,d=kGe(o,l,u,c);if(d>=0&&u){var f=u[d]&&u[d].value,m=XI(t,n,d,f),p=tnt(r,l,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:m,activeCoordinate:p}}return null},nnt=function(t,n){var r=n.axes,a=n.graphicalItems,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,m=t.stackOffset,p=$ie(d,i);return r.reduce(function(v,y){var x,w=y.type.defaultProps!==void 0?ke(ke({},y.type.defaultProps),y.props):y.props,N=w.type,S=w.dataKey,_=w.allowDataOverflow,k=w.allowDuplicatedCategory,C=w.scale,E=w.ticks,O=w.includeHidden,P=w[o];if(v[P])return v;var R=qN(t.data,{graphicalItems:a.filter(function(K){var W,ie=o in K.props?K.props[o]:(W=K.type.defaultProps)===null||W===void 0?void 0:W[o];return ie===P}),dataStartIndex:c,dataEndIndex:u}),T=R.length,D,z,I;Att(w.domain,_,N)&&(D=cI(w.domain,null,_),p&&(N==="number"||C!=="auto")&&(I=Dg(R,S,"category")));var F=ele(N);if(!D||D.length===0){var U,H=(U=w.domain)!==null&&U!==void 0?U:F;if(S){if(D=Dg(R,S,N),N==="category"&&p){var q=UBe(D);k&&q?(z=D,D=wj(0,T)):k||(D=r7(H,D,y).reduce(function(K,W){return K.indexOf(W)>=0?K:[].concat(_m(K),[W])},[]))}else if(N==="category")k?D=D.filter(function(K){return K!==""&&!Tt(K)}):D=r7(H,D,y).reduce(function(K,W){return K.indexOf(W)>=0||W===""||Tt(W)?K:[].concat(_m(K),[W])},[]);else if(N==="number"){var B=PGe(R,a.filter(function(K){var W,ie,ve=o in K.props?K.props[o]:(W=K.type.defaultProps)===null||W===void 0?void 0:W[o],ge="hide"in K.props?K.props.hide:(ie=K.type.defaultProps)===null||ie===void 0?void 0:ie.hide;return ve===P&&(O||!ge)}),S,i,d);B&&(D=B)}p&&(N==="number"||C!=="auto")&&(I=Dg(R,S,"category"))}else p?D=wj(0,T):l&&l[P]&&l[P].hasStack&&N==="number"?D=m==="expand"?[0,1]:Hie(l[P].stackGroups,c,u):D=Lie(R,a.filter(function(K){var W=o in K.props?K.props[o]:K.type.defaultProps[o],ie="hide"in K.props?K.props.hide:K.type.defaultProps.hide;return W===P&&(O||!ie)}),N,d,!0);if(N==="number")D=GI(f,D,P,i,E),H&&(D=cI(H,D,_));else if(N==="category"&&H){var L=H,V=D.every(function(K){return L.indexOf(K)>=0});V&&(D=L)}}return ke(ke({},v),{},yt({},P,ke(ke({},w),{},{axisType:i,domain:D,categoricalDomain:I,duplicateDomain:z,originalDomain:(x=w.domain)!==null&&x!==void 0?x:F,isCategorical:p,layout:d})))},{})},rnt=function(t,n){var r=n.graphicalItems,a=n.Axis,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.layout,f=t.children,m=qN(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),p=m.length,v=$ie(d,i),y=-1;return r.reduce(function(x,w){var N=w.type.defaultProps!==void 0?ke(ke({},w.type.defaultProps),w.props):w.props,S=N[o],_=ele("number");if(!x[S]){y++;var k;return v?k=wj(0,p):l&&l[S]&&l[S].hasStack?(k=Hie(l[S].stackGroups,c,u),k=GI(f,k,S,i)):(k=cI(_,Lie(m,r.filter(function(C){var E,O,P=o in C.props?C.props[o]:(E=C.type.defaultProps)===null||E===void 0?void 0:E[o],R="hide"in C.props?C.props.hide:(O=C.type.defaultProps)===null||O===void 0?void 0:O.hide;return P===S&&!R}),"number",d),a.defaultProps.allowDataOverflow),k=GI(f,k,S,i)),ke(ke({},x),{},yt({},S,ke(ke({axisType:i},a.defaultProps),{},{hide:!0,orientation:Ca(Ztt,"".concat(i,".").concat(y%2),null),domain:k,originalDomain:_,isCategorical:v,layout:d})))}return x},{})},snt=function(t,n){var r=n.axisType,a=r===void 0?"xAxis":r,i=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,d=t.children,f="".concat(a,"Id"),m=_a(d,i),p={};return m&&m.length?p=nnt(t,{axes:m,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(p=rnt(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),p},ant=function(t){var n=lc(t),r=Zo(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:b3(r,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:lj(n,r)}},aW=function(t){var n=t.children,r=t.defaultShowTooltip,a=ya(n,mm),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},int=function(t){return!t||!t.length?!1:t.some(function(n){var r=nl(n&&n.type);return r&&r.indexOf("Bar")>=0})},iW=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"}},ont=function(t,n){var r=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=r.width,d=r.height,f=r.children,m=r.margin||{},p=ya(f,mm),v=ya(f,fh),y=Object.keys(c).reduce(function(k,C){var E=c[C],O=E.orientation;return!E.mirror&&!E.hide?ke(ke({},k),{},yt({},O,k[O]+E.width)):k},{left:m.left||0,right:m.right||0}),x=Object.keys(o).reduce(function(k,C){var E=o[C],O=E.orientation;return!E.mirror&&!E.hide?ke(ke({},k),{},yt({},O,Ca(k,"".concat(O))+E.height)):k},{top:m.top||0,bottom:m.bottom||0}),w=ke(ke({},x),y),N=w.bottom;p&&(w.bottom+=p.props.height||mm.defaultProps.height),v&&n&&(w=AGe(w,a,r,n));var S=u-w.left-w.right,_=d-w.top-w.bottom;return ke(ke({brushBottom:N},w),{},{width:Math.max(S,0),height:Math.max(_,0)})},lnt=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},e5=function(t){var n=t.chartName,r=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,m=function(w,N){var S=N.graphicalItems,_=N.stackGroups,k=N.offset,C=N.updateId,E=N.dataStartIndex,O=N.dataEndIndex,P=w.barSize,R=w.layout,T=w.barGap,D=w.barCategoryGap,z=w.maxBarSize,I=iW(R),F=I.numericAxisName,U=I.cateAxisName,H=int(S),q=[];return S.forEach(function(B,L){var V=qN(w.data,{graphicalItems:[B],dataStartIndex:E,dataEndIndex:O}),K=B.type.defaultProps!==void 0?ke(ke({},B.type.defaultProps),B.props):B.props,W=K.dataKey,ie=K.maxBarSize,ve=K["".concat(F,"Id")],ge=K["".concat(U,"Id")],J={},ne=c.reduce(function(Ue,wt){var At=N["".concat(wt.axisType,"Map")],cn=K["".concat(wt.axisType,"Id")];At&&At[cn]||wt.axisType==="zAxis"||kd();var vn=At[cn];return ke(ke({},Ue),{},yt(yt({},wt.axisType,vn),"".concat(wt.axisType,"Ticks"),Zo(vn)))},J),Z=ne[U],oe=ne["".concat(U,"Ticks")],he=_&&_[ve]&&_[ve].hasStack&&FGe(B,_[ve].stackGroups),Q=nl(B.type).indexOf("Bar")>=0,ae=lj(Z,oe),fe=[],Ee=H&&CGe({barSize:P,stackGroups:_,totalSize:lnt(ne,U)});if(Q){var Re,qe,St=Tt(ie)?z:ie,Ut=(Re=(qe=lj(Z,oe,!0))!==null&&qe!==void 0?qe:St)!==null&&Re!==void 0?Re:0;fe=_Ge({barGap:T,barCategoryGap:D,bandSize:Ut!==ae?Ut:ae,sizeList:Ee[ge],maxBarSize:St}),Ut!==ae&&(fe=fe.map(function(Ue){return ke(ke({},Ue),{},{position:ke(ke({},Ue.position),{},{offset:Ue.position.offset-Ut/2})})}))}var Yt=B&&B.type&&B.type.getComposedData;Yt&&q.push({props:ke(ke({},Yt(ke(ke({},ne),{},{displayedData:V,props:w,dataKey:W,item:B,bandSize:ae,barPosition:fe,offset:k,stackedData:he,layout:R,dataStartIndex:E,dataEndIndex:O}))),{},yt(yt(yt({key:B.key||"item-".concat(L)},F,ne[F]),U,ne[U]),"animationId",C)),childIndex:t9e(B,w.children),item:B})}),q},p=function(w,N){var S=w.props,_=w.dataStartIndex,k=w.dataEndIndex,C=w.updateId;if(!C9({props:S}))return null;var E=S.children,O=S.layout,P=S.stackOffset,R=S.data,T=S.reverseStackOrder,D=iW(O),z=D.numericAxisName,I=D.cateAxisName,F=_a(E,r),U=LGe(R,F,"".concat(z,"Id"),"".concat(I,"Id"),P,T),H=c.reduce(function(K,W){var ie="".concat(W.axisType,"Map");return ke(ke({},K),{},yt({},ie,snt(S,ke(ke({},W),{},{graphicalItems:F,stackGroups:W.axisType===z&&U,dataStartIndex:_,dataEndIndex:k}))))},{}),q=ont(ke(ke({},H),{},{props:S,graphicalItems:F}),N==null?void 0:N.legendBBox);Object.keys(H).forEach(function(K){H[K]=d(S,H[K],q,K.replace("Map",""),n)});var B=H["".concat(I,"Map")],L=ant(B),V=m(S,ke(ke({},H),{},{dataStartIndex:_,dataEndIndex:k,updateId:C,graphicalItems:F,stackGroups:U,offset:q}));return ke(ke({formattedGraphicalItems:V,graphicalItems:F,offset:q,stackGroups:U},L),H)},v=(function(x){function w(N){var S,_,k;return Btt(this,w),k=qtt(this,w,[N]),yt(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),yt(k,"accessibilityManager",new _tt),yt(k,"handleLegendBBoxUpdate",function(C){if(C){var E=k.state,O=E.dataStartIndex,P=E.dataEndIndex,R=E.updateId;k.setState(ke({legendBBox:C},p({props:k.props,dataStartIndex:O,dataEndIndex:P,updateId:R},ke(ke({},k.state),{},{legendBBox:C}))))}}),yt(k,"handleReceiveSyncEvent",function(C,E,O){if(k.props.syncId===C){if(O===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(E)}}),yt(k,"handleBrushChange",function(C){var E=C.startIndex,O=C.endIndex;if(E!==k.state.dataStartIndex||O!==k.state.dataEndIndex){var P=k.state.updateId;k.setState(function(){return ke({dataStartIndex:E,dataEndIndex:O},p({props:k.props,dataStartIndex:E,dataEndIndex:O,updateId:P},k.state))}),k.triggerSyncEvent({dataStartIndex:E,dataEndIndex:O})}}),yt(k,"handleMouseEnter",function(C){var E=k.getMouseInfo(C);if(E){var O=ke(ke({},E),{},{isTooltipActive:!0});k.setState(O),k.triggerSyncEvent(O);var P=k.props.onMouseEnter;Ct(P)&&P(O,C)}}),yt(k,"triggeredAfterMouseMove",function(C){var E=k.getMouseInfo(C),O=E?ke(ke({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState(O),k.triggerSyncEvent(O);var P=k.props.onMouseMove;Ct(P)&&P(O,C)}),yt(k,"handleItemMouseEnter",function(C){k.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),yt(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),yt(k,"handleMouseMove",function(C){C.persist(),k.throttleTriggeredAfterMouseMove(C)}),yt(k,"handleMouseLeave",function(C){k.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};k.setState(E),k.triggerSyncEvent(E);var O=k.props.onMouseLeave;Ct(O)&&O(E,C)}),yt(k,"handleOuterEvent",function(C){var E=e9e(C),O=Ca(k.props,"".concat(E));if(E&&Ct(O)){var P,R;/.*touch.*/i.test(E)?R=k.getMouseInfo(C.changedTouches[0]):R=k.getMouseInfo(C),O((P=R)!==null&&P!==void 0?P:{},C)}}),yt(k,"handleClick",function(C){var E=k.getMouseInfo(C);if(E){var O=ke(ke({},E),{},{isTooltipActive:!0});k.setState(O),k.triggerSyncEvent(O);var P=k.props.onClick;Ct(P)&&P(O,C)}}),yt(k,"handleMouseDown",function(C){var E=k.props.onMouseDown;if(Ct(E)){var O=k.getMouseInfo(C);E(O,C)}}),yt(k,"handleMouseUp",function(C){var E=k.props.onMouseUp;if(Ct(E)){var O=k.getMouseInfo(C);E(O,C)}}),yt(k,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),yt(k,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.handleMouseDown(C.changedTouches[0])}),yt(k,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.handleMouseUp(C.changedTouches[0])}),yt(k,"handleDoubleClick",function(C){var E=k.props.onDoubleClick;if(Ct(E)){var O=k.getMouseInfo(C);E(O,C)}}),yt(k,"handleContextMenu",function(C){var E=k.props.onContextMenu;if(Ct(E)){var O=k.getMouseInfo(C);E(O,C)}}),yt(k,"triggerSyncEvent",function(C){k.props.syncId!==void 0&&pP.emit(gP,k.props.syncId,C,k.eventEmitterSymbol)}),yt(k,"applySyncEvent",function(C){var E=k.props,O=E.layout,P=E.syncMethod,R=k.state.updateId,T=C.dataStartIndex,D=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)k.setState(ke({dataStartIndex:T,dataEndIndex:D},p({props:k.props,dataStartIndex:T,dataEndIndex:D,updateId:R},k.state)));else if(C.activeTooltipIndex!==void 0){var z=C.chartX,I=C.chartY,F=C.activeTooltipIndex,U=k.state,H=U.offset,q=U.tooltipTicks;if(!H)return;if(typeof P=="function")F=P(q,C);else if(P==="value"){F=-1;for(var B=0;B<q.length;B++)if(q[B].value===C.activeLabel){F=B;break}}var L=ke(ke({},H),{},{x:H.left,y:H.top}),V=Math.min(z,L.x+L.width),K=Math.min(I,L.y+L.height),W=q[F]&&q[F].value,ie=XI(k.state,k.props.data,F),ve=q[F]?{x:O==="horizontal"?q[F].coordinate:V,y:O==="horizontal"?K:q[F].coordinate}:Joe;k.setState(ke(ke({},C),{},{activeLabel:W,activeCoordinate:ve,activePayload:ie,activeTooltipIndex:F}))}else k.setState(C)}),yt(k,"renderCursor",function(C){var E,O=k.state,P=O.isTooltipActive,R=O.activeCoordinate,T=O.activePayload,D=O.offset,z=O.activeTooltipIndex,I=O.tooltipAxisBandSize,F=k.getTooltipEventType(),U=(E=C.props.active)!==null&&E!==void 0?E:P,H=k.props.layout,q=C.key||"_recharts-cursor";return X.createElement(Mtt,{key:q,activeCoordinate:R,activePayload:T,activeTooltipIndex:z,chartName:n,element:C,isActive:U,layout:H,offset:D,tooltipAxisBandSize:I,tooltipEventType:F})}),yt(k,"renderPolarAxis",function(C,E,O){var P=Ca(C,"type.axisType"),R=Ca(k.state,"".concat(P,"Map")),T=C.type.defaultProps,D=T!==void 0?ke(ke({},T),C.props):C.props,z=R&&R[D["".concat(P,"Id")]];return b.cloneElement(C,ke(ke({},z),{},{className:Mt(P,z.className),key:C.key||"".concat(E,"-").concat(O),ticks:Zo(z,!0)}))}),yt(k,"renderPolarGrid",function(C){var E=C.props,O=E.radialLines,P=E.polarAngles,R=E.polarRadius,T=k.state,D=T.radiusAxisMap,z=T.angleAxisMap,I=lc(D),F=lc(z),U=F.cx,H=F.cy,q=F.innerRadius,B=F.outerRadius;return b.cloneElement(C,{polarAngles:Array.isArray(P)?P:Zo(F,!0).map(function(L){return L.coordinate}),polarRadius:Array.isArray(R)?R:Zo(I,!0).map(function(L){return L.coordinate}),cx:U,cy:H,innerRadius:q,outerRadius:B,key:C.key||"polar-grid",radialLines:O})}),yt(k,"renderLegend",function(){var C=k.state.formattedGraphicalItems,E=k.props,O=E.children,P=E.width,R=E.height,T=k.props.margin||{},D=P-(T.left||0)-(T.right||0),z=Rie({children:O,formattedGraphicalItems:C,legendWidth:D,legendContent:u});if(!z)return null;var I=z.item,F=nW(z,Rtt);return b.cloneElement(I,ke(ke({},F),{},{chartWidth:P,chartHeight:R,margin:T,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),yt(k,"renderTooltip",function(){var C,E=k.props,O=E.children,P=E.accessibilityLayer,R=ya(O,Uo);if(!R)return null;var T=k.state,D=T.isTooltipActive,z=T.activeCoordinate,I=T.activePayload,F=T.activeLabel,U=T.offset,H=(C=R.props.active)!==null&&C!==void 0?C:D;return b.cloneElement(R,{viewBox:ke(ke({},U),{},{x:U.left,y:U.top}),active:H,label:F,payload:H?I:[],coordinate:z,accessibilityLayer:P})}),yt(k,"renderBrush",function(C){var E=k.props,O=E.margin,P=E.data,R=k.state,T=R.offset,D=R.dataStartIndex,z=R.dataEndIndex,I=R.updateId;return b.cloneElement(C,{key:C.key||"_recharts-brush",onChange:hb(k.handleBrushChange,C.props.onChange),data:P,x:ze(C.props.x)?C.props.x:T.left,y:ze(C.props.y)?C.props.y:T.top+T.height+T.brushBottom-(O.bottom||0),width:ze(C.props.width)?C.props.width:T.width,startIndex:D,endIndex:z,updateId:"brush-".concat(I)})}),yt(k,"renderReferenceElement",function(C,E,O){if(!C)return null;var P=k,R=P.clipPathId,T=k.state,D=T.xAxisMap,z=T.yAxisMap,I=T.offset,F=C.type.defaultProps||{},U=C.props,H=U.xAxisId,q=H===void 0?F.xAxisId:H,B=U.yAxisId,L=B===void 0?F.yAxisId:B;return b.cloneElement(C,{key:C.key||"".concat(E,"-").concat(O),xAxis:D[q],yAxis:z[L],viewBox:{x:I.left,y:I.top,width:I.width,height:I.height},clipPathId:R})}),yt(k,"renderActivePoints",function(C){var E=C.item,O=C.activePoint,P=C.basePoint,R=C.childIndex,T=C.isRange,D=[],z=E.props.key,I=E.item.type.defaultProps!==void 0?ke(ke({},E.item.type.defaultProps),E.item.props):E.item.props,F=I.activeDot,U=I.dataKey,H=ke(ke({index:R,dataKey:U,cx:O.x,cy:O.y,r:4,fill:H3(E.item),strokeWidth:2,stroke:"#fff",payload:O.payload,value:O.value},mt(F,!1)),Bw(F));return D.push(w.renderActiveDot(F,H,"".concat(z,"-activePoint-").concat(R))),P?D.push(w.renderActiveDot(F,ke(ke({},H),{},{cx:P.x,cy:P.y}),"".concat(z,"-basePoint-").concat(R))):T&&D.push(null),D}),yt(k,"renderGraphicChild",function(C,E,O){var P=k.filterFormatItem(C,E,O);if(!P)return null;var R=k.getTooltipEventType(),T=k.state,D=T.isTooltipActive,z=T.tooltipAxis,I=T.activeTooltipIndex,F=T.activeLabel,U=k.props.children,H=ya(U,Uo),q=P.props,B=q.points,L=q.isRange,V=q.baseLine,K=P.item.type.defaultProps!==void 0?ke(ke({},P.item.type.defaultProps),P.item.props):P.item.props,W=K.activeDot,ie=K.hide,ve=K.activeBar,ge=K.activeShape,J=!!(!ie&&D&&H&&(W||ve||ge)),ne={};R!=="axis"&&H&&H.props.trigger==="click"?ne={onClick:hb(k.handleItemMouseEnter,C.props.onClick)}:R!=="axis"&&(ne={onMouseLeave:hb(k.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:hb(k.handleItemMouseEnter,C.props.onMouseEnter)});var Z=b.cloneElement(C,ke(ke({},P.props),ne));function oe(wt){return typeof z.dataKey=="function"?z.dataKey(wt.payload):null}if(J)if(I>=0){var he,Q;if(z.dataKey&&!z.allowDuplicatedCategory){var ae=typeof z.dataKey=="function"?oe:"payload.".concat(z.dataKey.toString());he=zw(B,ae,F),Q=L&&V&&zw(V,ae,F)}else he=B==null?void 0:B[I],Q=L&&V&&V[I];if(ge||ve){var fe=C.props.activeIndex!==void 0?C.props.activeIndex:I;return[b.cloneElement(C,ke(ke(ke({},P.props),ne),{},{activeIndex:fe})),null,null]}if(!Tt(he))return[Z].concat(_m(k.renderActivePoints({item:P,activePoint:he,basePoint:Q,childIndex:I,isRange:L})))}else{var Ee,Re=(Ee=k.getItemByXY(k.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:Z},qe=Re.graphicalItem,St=qe.item,Ut=St===void 0?C:St,Yt=qe.childIndex,Ue=ke(ke(ke({},P.props),ne),{},{activeIndex:Yt});return[b.cloneElement(Ut,Ue),null,null]}return L?[Z,null,null]:[Z,null]}),yt(k,"renderCustomized",function(C,E,O){return b.cloneElement(C,ke(ke({key:"recharts-customized-".concat(O)},k.props),k.state))}),yt(k,"renderMap",{CartesianGrid:{handler:yb,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:yb},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:yb},YAxis:{handler:yb},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((S=N.id)!==null&&S!==void 0?S:ep("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=Lae(k.triggeredAfterMouseMove,(_=N.throttleDelay)!==null&&_!==void 0?_:1e3/60),k.state={},k}return Gtt(w,x),Htt(w,[{key:"componentDidMount",value:function(){var S,_;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(_=this.props.margin.top)!==null&&_!==void 0?_:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,_=S.children,k=S.data,C=S.height,E=S.layout,O=ya(_,Uo);if(O){var P=O.props.defaultIndex;if(!(typeof P!="number"||P<0||P>this.state.tooltipTicks.length-1)){var R=this.state.tooltipTicks[P]&&this.state.tooltipTicks[P].value,T=XI(this.state,k,P,R),D=this.state.tooltipTicks[P].coordinate,z=(this.state.offset.top+C)/2,I=E==="horizontal",F=I?{x:D,y:z}:{y:D,x:z},U=this.state.formattedGraphicalItems.find(function(q){var B=q.item;return B.type.name==="Scatter"});U&&(F=ke(ke({},F),U.props.points[P].tooltipPosition),T=U.props.points[P].tooltipPayload);var H={activeTooltipIndex:P,isTooltipActive:!0,activeLabel:R,activePayload:T,activeCoordinate:F};this.setState(H),this.renderCursor(O),this.accessibilityManager.setIndex(P)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,_){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==_.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var k,C;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){O4([ya(S.children,Uo)],[ya(this.props.children,Uo)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=ya(this.props.children,Uo);if(S&&typeof S.props.shared=="boolean"){var _=S.props.shared?"axis":"item";return l.indexOf(_)>=0?_:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var _=this.container,k=_.getBoundingClientRect(),C=Bqe(k),E={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},O=k.width/_.offsetWidth||1,P=this.inRange(E.chartX,E.chartY,O);if(!P)return null;var R=this.state,T=R.xAxisMap,D=R.yAxisMap,z=this.getTooltipEventType(),I=sW(this.state,this.props.data,this.props.layout,P);if(z!=="axis"&&T&&D){var F=lc(T).scale,U=lc(D).scale,H=F&&F.invert?F.invert(E.chartX):null,q=U&&U.invert?U.invert(E.chartY):null;return ke(ke({},E),{},{xValue:H,yValue:q},I)}return I?ke(ke({},E),I):null}},{key:"inRange",value:function(S,_){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,E=S/k,O=_/k;if(C==="horizontal"||C==="vertical"){var P=this.state.offset,R=E>=P.left&&E<=P.left+P.width&&O>=P.top&&O<=P.top+P.height;return R?{x:E,y:O}:null}var T=this.state,D=T.angleAxisMap,z=T.radiusAxisMap;if(D&&z){var I=lc(D);return i7({x:E,y:O},I)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,_=this.getTooltipEventType(),k=ya(S,Uo),C={};k&&_==="axis"&&(k.props.trigger==="click"?C={onClick:this.handleClick}:C={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 E=Bw(this.props,this.handleOuterEvent);return ke(ke({},E),C)}},{key:"addListener",value:function(){pP.on(gP,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pP.removeListener(gP,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,_,k){for(var C=this.state.formattedGraphicalItems,E=0,O=C.length;E<O;E++){var P=C[E];if(P.item===S||P.props.key===S.key||_===nl(P.item.type)&&k===P.childIndex)return P}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,_=this.state.offset,k=_.left,C=_.top,E=_.height,O=_.width;return X.createElement("defs",null,X.createElement("clipPath",{id:S},X.createElement("rect",{x:k,y:C,height:E,width:O})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(_,k){var C=tW(k,2),E=C[0],O=C[1];return ke(ke({},_),{},yt({},E,O.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(_,k){var C=tW(k,2),E=C[0],O=C[1];return ke(ke({},_),{},yt({},E,O.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var _;return(_=this.state.xAxisMap)===null||_===void 0||(_=_[S])===null||_===void 0?void 0:_.scale}},{key:"getYScaleByAxisId",value:function(S){var _;return(_=this.state.yAxisMap)===null||_===void 0||(_=_[S])===null||_===void 0?void 0:_.scale}},{key:"getItemByXY",value:function(S){var _=this.state,k=_.formattedGraphicalItems,C=_.activeItem;if(k&&k.length)for(var E=0,O=k.length;E<O;E++){var P=k[E],R=P.props,T=P.item,D=T.type.defaultProps!==void 0?ke(ke({},T.type.defaultProps),T.props):T.props,z=nl(T.type);if(z==="Bar"){var I=(R.data||[]).find(function(q){return MXe(S,q)});if(I)return{graphicalItem:P,payload:I}}else if(z==="RadialBar"){var F=(R.data||[]).find(function(q){return i7(S,q)});if(F)return{graphicalItem:P,payload:F}}else if(LN(P,C)||$N(P,C)||Xx(P,C)){var U=rZe({graphicalItem:P,activeTooltipItem:C,itemData:D.data}),H=D.activeIndex===void 0?U:D.activeIndex;return{graphicalItem:ke(ke({},P),{},{childIndex:H}),payload:Xx(P,C)?D.data[U]:P.props.data[U]}}}return null}},{key:"render",value:function(){var S=this;if(!C9(this))return null;var _=this.props,k=_.children,C=_.className,E=_.width,O=_.height,P=_.style,R=_.compact,T=_.title,D=_.desc,z=nW(_,Dtt),I=mt(z,!1);if(R)return X.createElement(DV,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement(R4,th({},I,{width:E,height:O,title:T,desc:D}),this.renderClipPath(),A9(k,this.renderMap)));if(this.props.accessibilityLayer){var F,U;I.tabIndex=(F=this.props.tabIndex)!==null&&F!==void 0?F:0,I.role=(U=this.props.role)!==null&&U!==void 0?U:"application",I.onKeyDown=function(q){S.accessibilityManager.keyboardEvent(q)},I.onFocus=function(){S.accessibilityManager.focus()}}var H=this.parseEventsOfWrapper();return X.createElement(DV,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement("div",th({className:Mt("recharts-wrapper",C),style:ke({position:"relative",cursor:"default",width:E,height:O},P)},H,{ref:function(B){S.container=B}}),X.createElement(R4,th({},I,{width:E,height:O,title:T,desc:D,style:Jtt}),this.renderClipPath(),A9(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(b.Component);yt(v,"displayName",n),yt(v,"defaultProps",ke({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),yt(v,"getDerivedStateFromProps",function(x,w){var N=x.dataKey,S=x.data,_=x.children,k=x.width,C=x.height,E=x.layout,O=x.stackOffset,P=x.margin,R=w.dataStartIndex,T=w.dataEndIndex;if(w.updateId===void 0){var D=aW(x);return ke(ke(ke({},D),{},{updateId:0},p(ke(ke({props:x},D),{},{updateId:0}),w)),{},{prevDataKey:N,prevData:S,prevWidth:k,prevHeight:C,prevLayout:E,prevStackOffset:O,prevMargin:P,prevChildren:_})}if(N!==w.prevDataKey||S!==w.prevData||k!==w.prevWidth||C!==w.prevHeight||E!==w.prevLayout||O!==w.prevStackOffset||!dh(P,w.prevMargin)){var z=aW(x),I={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},F=ke(ke({},sW(w,S,E)),{},{updateId:w.updateId+1}),U=ke(ke(ke({},z),I),F);return ke(ke(ke({},U),p(ke({props:x},U),w)),{},{prevDataKey:N,prevData:S,prevWidth:k,prevHeight:C,prevLayout:E,prevStackOffset:O,prevMargin:P,prevChildren:_})}if(!O4(_,w.prevChildren)){var H,q,B,L,V=ya(_,mm),K=V&&(H=(q=V.props)===null||q===void 0?void 0:q.startIndex)!==null&&H!==void 0?H:R,W=V&&(B=(L=V.props)===null||L===void 0?void 0:L.endIndex)!==null&&B!==void 0?B:T,ie=K!==R||W!==T,ve=!Tt(S),ge=ve&&!ie?w.updateId:w.updateId+1;return ke(ke({updateId:ge},p(ke(ke({props:x},w),{},{updateId:ge,dataStartIndex:K,dataEndIndex:W}),w)),{},{prevChildren:_,dataStartIndex:K,dataEndIndex:W})}return null}),yt(v,"renderActiveDot",function(x,w,N){var S;return b.isValidElement(x)?S=b.cloneElement(x,w):Ct(x)?S=x(w):S=X.createElement(IN,w),X.createElement(sn,{className:"recharts-active-dot",ke
1569y:N},S)});var y=b.forwardRef(function(w,N){return X.createElement(v,th({},w,{ref:N}))});return y.displayName=v.displayName,y},cnt=e5({chartName:"LineChart",GraphicalChild:wm,axisComponents:[{axisType:"xAxis",AxisComp:Nm},{axisType:"yAxis",AxisComp:km}],formatAxisMap:boe}),unt=e5({chartName:"BarChart",GraphicalChild:Yd,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Nm},{axisType:"yAxis",AxisComp:km}],formatAxisMap:boe}),dnt=e5({chartName:"PieChart",GraphicalChild:_l,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:DN},{axisType:"radiusAxis",AxisComp:MN}],formatAxisMap:YGe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const fnt=({sessions:e,patterns:t,flaggedIssues:n})=>{const r=[{month:"Jan",issuesIdentified:45,issuesResolved:42,efficiency:88},{month:"Feb",issuesIdentified:52,issuesResolved:48,efficiency:89},{month:"Mar",issuesIdentified:38,issuesResolved:36,efficiency:92},{month:"Apr",issuesIdentified:41,issuesResolved:40,efficiency:94},{month:"May",issuesIdentified:29,issuesResolved:28,efficiency:96},{month:"Jun",issuesIdentified:22,issuesResolved:21,efficiency:98}],a=[{category:"Compliance Violations",savings:125e3},{category:"Equipment Downtime",savings:89e3},{category:"Training Costs",savings:34e3},{category:"Audit Preparation",savings:67e3}],i=[{name:"Compliant",value:94,color:"#10b981"},{name:"Minor Issues",value:5,color:"#f59e0b"},{name:"Major Issues",value:1,color:"#ef4444"}],o={totalSavings:a.reduce((c,u)=>c+u.savings,0),resolutionTime:2.3,complianceScore:94,operatorEfficiency:18,riskReduction:67,issuesIdentified:n.length,issuesResolved:Math.floor(n.length*.85),activePatterns:t.filter(c=>c.isActive).length},l=[{title:"Cost Savings",value:`$${(o.totalSavings/1e3).toFixed(0)}K`,change:"+23%",trend:"up",icon:Rs,color:"text-green-600",bgColor:"bg-green-50 dark:bg-green-900/20"},{title:"Avg Resolution Time",value:`${o.resolutionTime}h`,change:"-34%",trend:"down",icon:zn,color:"text-blue-600",bgColor:"bg-blue-50 dark:bg-blue-900/20"},{title:"Compliance Score",value:`${o.complianceScore}%`,change:"+8%",trend:"up",icon:it,color:"text-purple-600",bgColor:"bg-purple-50 dark:bg-purple-900/20"},{title:"Operator Efficiency",value:`+${o.operatorEfficiency}%`,change:"+12%",trend:"up",icon:Bn,color:"text-orange-600",bgColor:"bg-orange-50 dark:bg-orange-900/20"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:l.map((c,u)=>{const d=c.icon;return s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsxs(se,{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("div",{className:`p-3 rounded-xl ${c.bgColor}`,children:s.jsx(d,{className:`h-6 w-6 ${c.color}`})}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"text-2xl font-bold",children:c.value}),s.jsxs("div",{className:"flex items-center gap-1 text-sm",children:[c.trend==="up"?s.jsx(aX,{className:"h-4 w-4 text-green-500"}):s.jsx(sX,{className:"h-4 w-4 text-green-500"}),s.jsx("span",{className:"text-green-600 font-medium",children:c.change})]})]})]}),s.jsx("h3",{className:"text-sm font-medium text-gray-600 dark:text-gray-400 mt-4",children:c.title})]})},u)})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(fl,{className:"h-5 w-5 text-blue-600"}),"Issue Resolution Trends"]})}),s.jsxs(se,{children:[s.jsx(SE,{width:"100%",height:250,children:s.jsxs(cnt,{data:r,children:[s.jsx(FI,{strokeDasharray:"3 3",stroke:"#e2e8f0",className:"opacity-30"}),s.jsx(Nm,{dataKey:"month",stroke:"#64748b",fontSize:12}),s.jsx(km,{stroke:"#64748b",fontSize:12}),s.jsx(wm,{type:"monotone",dataKey:"issuesIdentified",stroke:"#ef4444",strokeWidth:3,dot:{fill:"#ef4444",strokeWidth:2,r:4}}),s.jsx(wm,{type:"monotone",dataKey:"issuesResolved",stroke:"#10b981",strokeWidth:3,dot:{fill:"#10b981",strokeWidth:2,r:4}})]})}),s.jsxs("div",{className:"grid grid-cols-2 gap-4 mt-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-lg font-bold text-red-600",children:o.issuesIdentified}),s.jsx("div",{className:"text-xs text-gray-500",children:"Issues Identified"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-lg font-bold text-green-600",children:o.issuesResolved}),s.jsx("div",{className:"text-xs text-gray-500",children:"Issues Resolved"})]})]})]})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Rs,{className:"h-5 w-5 text-green-600"}),"Cost Savings Breakdown"]})}),s.jsxs(se,{children:[s.jsx(SE,{width:"100%",height:250,children:s.jsxs(unt,{data:a,children:[s.jsx(FI,{strokeDasharray:"3 3",stroke:"#e2e8f0",className:"opacity-30"}),s.jsx(Nm,{dataKey:"category",stroke:"#64748b",fontSize:10,angle:-45,textAnchor:"end",height:60}),s.jsx(km,{stroke:"#64748b",fontSize:12}),s.jsx(Yd,{dataKey:"savings",fill:"url(#greenGradient)",radius:[4,4,0,0]}),s.jsx("defs",{children:s.jsxs("linearGradient",{id:"greenGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",
1569stopColor:"#10b981",stopOpacity:.9}),s.jsx("stop",{offset:"95%",stopColor:"#34d399",stopOpacity:.6})]})})]})}),s.jsxs("div",{className:"text-center mt-4",children:[s.jsxs("div",{className:"text-2xl font-bold text-green-600",children:["$",(o.totalSavings/1e3).toFixed(0),"K"]}),s.jsx("div",{className:"text-xs text-gray-500",children:"Total Annual Savings"})]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-5 w-5 text-purple-600"}),"Compliance Status"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"text-3xl font-bold text-purple-600",children:[o.complianceScore,"%"]}),s.jsx("div",{className:"text-sm text-gray-500",children:"Overall Compliance"})]}),s.jsx(SE,{width:"100%",height:120,children:s.jsx(dnt,{children:s.jsx(_l,{data:i,dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:50,innerRadius:30,children:i.map((c,u)=>s.jsx(bN,{fill:c.color},`cell-${u}`))})})}),s.jsx("div",{className:"space-y-2",children:i.map((c,u)=>s.jsxs("div",{className:"flex items-center justify-between text-sm",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:c.color}}),s.jsx("span",{children:c.name})]}),s.jsxs("span",{className:"font-medium",children:[c.value,"%"]})]},u))})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(g1,{className:"h-5 w-5 text-orange-600"}),"Risk Reduction"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"text-center",children:[s.jsxs("div",{className:"text-3xl font-bold text-orange-600",children:[o.riskReduction,"%"]}),s.jsx("div",{className:"text-sm text-gray-500",children:"Risk Reduction"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Safety Incidents"}),s.jsx("span",{children:"-78%"})]}),s.jsx(qr,{value:78,className:"h-2"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Compliance Violations"}),s.jsx("span",{children:"-65%"})]}),s.jsx(qr,{value:65,className:"h-2"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Equipment Failures"}),s.jsx("span",{children:"-45%"})]}),s.jsx(qr,{value:45,className:"h-2"})]})]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"h-5 w-5 text-green-600"}),"Key Achievements"]})}),s.jsx(se,{children:s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Pe,{className:"h-5 w-5 text-green-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"Zero Critical Violations"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Last 30 days"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Pe,{className:"h-5 w-5 text-green-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"98% Issue Detection"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Above industry average"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Pe,{className:"h-5 w-5 text-green-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"2.3h Avg Resolution"}),s.jsx("p",{className:"text-xs text-gray-500",children:"34% improvement"})]})]}),s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(fl,{className:"h-5 w-5 text-blue-600 mt-0.5"}),s.jsxs("div",{children:[s.jsx("p",{className:"font-medium text-sm",children:"12 Active Patterns"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Continuously learning"})]})]})]}),s.jsx("div",{className:"border-t pt-4",children:s.jsx("div",{className:"text-center",children:s.jsx(le,{variant:"outline",className:"bg-green-50 text-green-700 border-green-200",children:"ROI: 340% in 6 months"})})})]})})]})]})]})},hnt=({patterns:e,sessions:t})=>{const[n,r]=b.useState(null),a=[{id:"insight-001",type:"trend_prediction",title:"Chlorine Check Violations Trending Up",description:"Pattern suggests 23% increase in chlorine check skips during morning shifts next week",confidence:87,severity:"medium",recommendation:"Schedule additional training for morning shift operators",daysToImpact:5},{id:"insight-002",type:"anomaly_detection",title:"Unusual pH Testing Pattern Detected",description:"New pattern emerging: pH tests taking 40% longer than normal in Facility South",confidence:92,severity:"high",recommendation:"Investigate equipment condition or operator training needs",daysToImpact:2},{id:"insight-003",type:"risk_assessment",title:"Compliance Risk Score Elevated",description:"Multiple minor violations creating cumulative compliance risk",confidence:78,severity:"low",recommendation:"Implement additional qual
1569ity checkpoints",daysToImpact:14}],i=[{id:"emerging-001",name:"Extended Break Periods",description:"Operators taking longer breaks during critical monitoring windows",occurrences:8,confidence:73,severity:"medium",isNew:!0},{id:"emerging-002",name:"Documentation Shortcuts",description:"Pattern of abbreviated documentation entries during busy periods",occurrences:15,confidence:89,severity:"high",isNew:!0}],o=u=>{const d={low:"bg-blue-50 text-blue-700 border-blue-200",medium:"bg-yellow-50 text-yellow-700 border-yellow-200",high:"bg-orange-50 text-orange-700 border-orange-200",critical:"bg-red-50 text-red-700 border-red-200"};return d[u]||d.low},l=u=>{switch(u){case"trend_prediction":return s.jsx(fl,{className:"h-4 w-4 text-blue-600"});case"anomaly_detection":return s.jsx(ln,{className:"h-4 w-4 text-orange-600"});case"risk_assessment":return s.jsx(g1,{className:"h-4 w-4 text-red-600"});default:return s.jsx(Sn,{className:"h-4 w-4 text-purple-600"})}},c=u=>u>=90?"text-green-600":u>=70?"text-yellow-600":"text-red-600";return s.jsxs(te,{className:"glass-effect glass-effect-dark",children:[s.jsxs(xe,{children:[s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Sn,{className:"h-5 w-5 text-purple-600"}),"Pattern Intelligence & Predictions"]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"AI-powered pattern discovery and predictive insights for proactive issue prevention"})]}),s.jsxs(se,{className:"space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h4",{className:"font-medium flex items-center gap-2",children:[s.jsx(Ot,{className:"h-4 w-4 text-yellow-600"}),"Predictive Insights"]}),s.jsxs(le,{variant:"outline",className:"text-xs",children:[a.length," active predictions"]})]}),s.jsx("div",{className:"space-y-3",children:a.map(u=>s.jsx("div",{className:"border rounded-lg p-3 hover:bg-gray-50 dark:hover:bg-gray-800",children:s.jsxs("div",{className:"flex items-start gap-3",children:[l(u.type),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h5",{className:"font-medium text-sm",children:u.title}),s.jsx(le,{variant:"outline",className:o(u.severity),children:u.severity})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:u.description}),s.jsxs("div",{className:"flex items-center justify-between text-xs",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:`font-medium ${c(u.confidence)}`,children:[u.confidence,"% confidence"]}),s.jsxs("span",{className:"text-gray-500",children:["Impact in ",u.daysToImpact," days"]})]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(pr,{className:"h-3 w-3 mr-1"}),"Details"]})]}),s.jsxs("div",{className:"mt-2 p-2 bg-blue-50 dark:bg-blue-900/20 rounded text-xs",children:[s.jsx("strong",{children:"Recommendation:"})," ",u.recommendation]})]})]})},u.id))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h4",{className:"font-medium flex items-center gap-2",children:[s.jsx(ZO,{className:"h-4 w-4 text-green-600"}),"Emerging Patterns"]}),s.jsxs(le,{variant:"outline",className:"text-xs bg-green-50 text-green-700 border-green-200",children:[i.length," new patterns"]})]}),s.jsx("div",{className:"space-y-3",children:i.map(u=>s.jsx("div",{className:"border rounded-lg p-3 border-green-200 bg-green-50 dark:bg-green-900/10 dark:border-green-800",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h5",{className:"font-medium text-sm",children:u.name}),s.jsx(le,{variant:"outline",className:"text-xs bg-green-100 text-green-700 border-green-200",children:"NEW"}),s.jsx(le,{variant:"outline",className:o(u.severity),children:u.severity})]}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 mb-2",children:u.description}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[s.jsxs("span",{children:[u.occurrences," occurrences detected"]}),s.jsxs("span",{className:c(u.confidence),children:[u.confidence,"% pattern confidence"]})]})]}),s.jsxs("div",{className:"flex gap-1",children:[s.jsx(Y,{variant:"outline",size:"sm",children:s.jsx(Kt,{className:"h-3 w-3"})}),s.jsx(Y,{size:"sm",className:"bg-green-600 hover:bg-green-700",children:"Track"})]})]})},u.id))})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("h4",{className:"font-medium flex items-center gap-2",children:[s.jsx(Yu,{className:"h-4 w-4 text-blue-600"}),"Pattern Analysis"]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Pattern Discovery Rate"}),s.jsx("span",{className:"font-medium",children:"92%"})]}),s.jsx(qr,{value:92,className:"h-2"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Prediction Accuracy"}),s.jsx("span",{className:"font-medium",children:"87%"})]}),s.jsx(qr,{value:87,className:"h-2"})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"Early Detection"}),s.jsx("span",{className:"font-medium",children:"78%"})]}),s.jsx(qr,{value:78,className:"h-2"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[s.jsx("span",{children:"False Positives"}),s.jsx("span",{className:"font-medium",children:"8%"})]}),s.jsx(qr,{value:8,className:"h-2"})]})]})]})]}),s.jsx("div",{className:"border-t pt-4",children:s.jsxs("div",{className:"grid grid-cols-4 gap-4 text-center text-sm",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-purple-600",children:e.length}),s.jsx("div",{className:"text-xs text-gray-500",children:"Active Patterns"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-blue-600",children:a.length}),s.jsx("div",{className:"text-xs text-gray-500",children:"Predictions"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-green-600",children:i.length}),s.jsx("div",{className:"text-xs text-gray-500",children:"Emerging"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-lg font-bold text-orange-600",children:"87%"}),s.jsx("div",{className:"text-xs text-gray-500",children:"Accuracy"})]})]})})]})]})},mnt=()=>{const[e,t]=b.useState("describe"),[n,r]=b.useState(null),[a,i]=b.useState(""),[o,l]=b.useState({agent:"all",operator:"all",facility:"all",dateRange:"24h",severity:"all"}),c=[{id:"session-001",sessionId:"ws-2024-001",agentName:"WaterQuality Assistant",operatorId:"op-sarah-m",facilityId:"facility-north",startTime:new Date(Date.now()-1e3*60*45),endTime:new Date(Date.now()-1e3*60*30),duration:15,status:"completed",steps:[],flaggedIssues:[{id:"issue-001",type:"skipped_step",severity:"medium",description:"Operator skipped chlorine residual check in distribution system",stepId:"step-005",recommendation:"Always verify chlorine levels before marking procedure complete",resolved:!1}],complianceViolations:["EPA Safe Drinking Water Act - Section 141.74"],outcome:"warning",metadata:{facility:"North Water Treatment Plant",shift:"morning"}},{id:"session-002",sessionId:"ws-2024-002",agentName:"Maintenance Assistant",operatorId:"op-mike-j",facilityId:"facility-south",startTime:new Date(Date.now()-1e3*60*120),endTime:new Date(Date.now()-1e3*60*115),duration:5,status:"completed",steps:[],flaggedIssues:[],complianceViolations:[],outcome:"success",metadata:{facility:"South Water Treatment Plant",shift:"afternoon"}}],u=c.flatMap(f=>f.flaggedIssues),d=[{id:"pattern-001",name:"Skipped Chlorine Checks",description:"Pattern of operators skipping chlorine residual verification steps",pattern:"chlorine.*skip|bypass.*chlorine|skip.*residual",severity:"high",occurrences:12,lastSeen:new Date,isActive:!0,trackingRules:["rule-001"],createdBy:"system",createdAt:new Date(Date.now()-1e3*60*60*24*7)}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(aw,{className:"h-6 w-6 text-blue-600"}),"Agent Session Replay & Issue Tracking"]}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Describe issues, investigate sessions, and track patterns for continuous improvement"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(h1,{className:"h-4 w-4 mr-2"}),"Export Report"]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(m1,{className:"h-4 w-4 mr-2"}),"Advanced Filters"]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Sessions Today"}),s.jsx("p",{className:"text-2xl font-bold",children:"127"})]}),s.jsx(aw,{className:"h-8 w-8 text-blue-600"})]})})}),s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Flagged Issues"}),s.jsx("p",{className:"text-2xl font-bold text-orange-600",children:u.length})]}),s.jsx(ln,{className:"h-8 w-8 text-orange-600"})]})})}),s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Active Patterns"}),s.jsx("p",{className:"text-2xl font-bold text-purple-600",children:d.length})]}),s.jsx(Ot,{className:"h-8 w-8 text-purple-600"})]})})}),s.jsx(te,{className:"glass-effect glass-effect-dark",children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm font-medium text-gray-600 dark:text-gray-400",children:"Resolution Rate"}),s.jsx("p",{className:"text-2xl font-bold text-green-600",children:"94%"})]}),s.jsx(fl,{className:"h-8 w-8 text-green-600"})]})})})]}),s.jsxs(os,{value:e,onValueChange:t,className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-4",children:[s.jsxs(at,{value:"describe",className:"flex items-center gap-2",children:[s.jsx(Fh,{className:"h-4 w-4"}),"Describe"]}),s.jsxs(at,{value:"investigate",className:"flex items-center gap-2",children:[s.jsx(pr,{className:"h-4 w-4"}),"Investigate"]}),s.jsxs(at,{value:"track",className:"flex items-center gap-2",children:[s.jsx(Ot,{className:"h-4 w-4"}),"Track"]}),s.jsxs(at,{value:"insights",className:"flex items-center gap-2",children:[s.jsx(fl,{className:"h-4 w-4"}),"Insights"]})]}),s.jsx(Ze,{value:"describe",className:"mt-6",children:s.jsx(Xze,{onSearch:i,onFiltersChange:l,recentSessions:c,onSessionSelect:r})}),s.jsx(Ze,{value:"investigate",className:"mt-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsx(Qze,{sessions:c,searchQuery:a,filters:o,onSessionSelect:r}),n&&s.jsx(Zze,{session:n,onClose:()=>r(null)})]})}),s.jsx(Ze,{value:"track",className:"mt-6",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[s.jsx(Jze,{patterns:d,flaggedIssues:u}),s.jsx(hnt,{patterns:d,sessions:c})]})}),s.jsx(Ze,{value:"insights",className:"mt-6",children:s.jsx(fnt,{sessions:c,patterns:d,flaggedIssues:u})})]})]})},pnt=()=>{const[e,t]=b.useState("24h"),[n,r]=b.useState("all"),a=[{id:"1",timestamp:new Date(Date.now()-1e3*60*30),agent:"HR Assistant",tool:"Employee Database",action:"Query employee info",result:"success",riskLevel:"low",userId:"user123",metadata:{query:"Employee vacation days",sanitized:!0}},{id:"2",timestamp:new Date(Date.now()-1e3*60*60*2),agent:"Finance Bot",tool:"Payment Processor",action:"Process refund",result:"warning",riskLevel:"medium",userId:"user456",metadata:{amount:"$250.00",flagged:"manual_review_required"}}],i=[{area:"GDPR Compliance",status:"compliant",lastCheck:new Date,details:"All data processing activities logged and compliant"},{area:"HIPAA Compliance",status:"compliant",lastCheck:new Date,details:"Healthcare data properly encrypted and access controlled"},{area:"SOX Compliance",status:"warning",lastCheck:new Date(Date.now()-1e3*60*60*6),details:"Some financial controls need review"}],o=u=>{switch(u){case"success":return s.jsx(Pe,{className:"h-4 w-4 text-green-600"});case"warning":return s.jsx(ln,{className:"h-4 w-4 text-yellow-600"});case"error":return s.jsx(ln,{className:"h-4 w-4 text-red-600"});default:return s.jsx(Yu,{className:"h-4 w-4"})}},l=u=>{const d={low:"bg-green-50 text-green-700 border-green-200",medium:"bg-yellow-50 text-yellow-700 border-yellow-200",high:"bg-red-50 text-red-700 border-red-200"};return s.jsx(le,{variant:"outline",className:d[u],children:u.toUpperCase()})},c=u=>{switch(u){case"compliant":return s.jsx(Pe,{className:"h-4 w-4 text-green-600"});case"warning":return s.jsx(ln,{className:"h-4 w-4 text-yellow-600"});case"violation":return s.jsx(ln,{className:"h-4 w-4 text-red-600"});default:return s.jsx(it,{className:"h-4 w-4"})}};return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold flex items-center gap-2",children:[s.jsx(it,{className:"h-6 w-6 text-blue-600"}),"Security & Compliance Dashboard"]}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400",children:"Monitor agent actions, tool usage, and compliance status"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(h1,{className:"h-4 w-4 mr-2"}),"Export Logs"]}),s.jsxs(Y,{variant:"outline",size:"sm",children:[s.jsx(m1,{className:"h-4 w-4 mr-2"}),"Filter"]})]})]}),s.jsxs(os,{defaultValue:"activity",className:"w-full",children:[s.jsxs(Kr,{className:"grid w-full grid-cols-4",children:[s.jsx(at,{value:"activity",children:"Activity L
1569ogs"}),s.jsx(at,{value:"compliance",children:"Compliance Status"}),s.jsx(at,{value:"tools",children:"Tool Registry"}),s.jsxs(at,{value:"audit",className:"flex items-center gap-2",children:[s.jsx(aw,{className:"h-4 w-4"}),"Audit & Debug"]})]}),s.jsx(Ze,{value:"activity",className:"space-y-4",children:s.jsxs(te,{children:[s.jsx(xe,{children:s.jsxs(we,{className:"flex items-center gap-2",children:[s.jsx(Yu,{className:"h-5 w-5"}),"Real-time Security Activity"]})}),s.jsx(se,{children:s.jsx(js,{className:"h-96",children:s.jsx("div",{className:"space-y-3",children:a.map(u=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[o(u.result),s.jsxs("div",{children:[s.jsxs("div",{className:"font-medium",children:[u.agent," → ",u.tool]}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:u.action}),s.jsxs("div",{className:"text-xs text-gray-500 flex items-center gap-1",children:[s.jsx(zn,{className:"h-3 w-3"}),u.timestamp.toLocaleTimeString()]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[l(u.riskLevel),s.jsx(Y,{size:"sm",variant:"ghost",children:s.jsx(pr,{className:"h-3 w-3"})})]})]},u.id))})})})]})}),s.jsx(Ze,{value:"compliance",className:"space-y-4",children:s.jsx("div",{className:"grid gap-4",children:i.map((u,d)=>s.jsx(te,{children:s.jsx(se,{className:"p-4",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[c(u.status),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:u.area}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:u.details}),s.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Last checked: ",u.lastCheck.toLocaleString()]})]})]}),s.jsx(le,{variant:u.status==="compliant"?"default":"secondary",className:u.status==="compliant"?"bg-green-100 text-green-800 border-green-200":u.status==="warning"?"bg-yellow-100 text-yellow-800 border-yellow-200":"bg-red-100 text-red-800 border-red-200",children:u.status.toUpperCase()})]})})},d))})}),s.jsx(Ze,{value:"tools",className:"space-y-4",children:s.jsxs(te,{children:[s.jsx(xe,{children:s.jsx(we,{children:"Verified Tool Registry"})}),s.jsx(se,{children:s.jsx("div",{className:"space-y-3",children:["Employee Database","Payment Processor","Email Service","Calendar API"].map((u,d)=>s.jsxs("div",{className:"flex items-center justify-between p-3 border rounded-lg",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(Pe,{className:"h-4 w-4 text-green-600"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium",children:u}),s.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Version 1.2.3 • Verified"})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(le,{variant:"outline",className:"text-green-600 border-green-200",children:"ACTIVE"}),s.jsx(Y,{size:"sm",variant:"outline",children:"Configure"})]})]},d))})})]})}),s.jsx(Ze,{value:"audit",className:"space-y-4",children:s.jsx(mnt,{})})]})]})},gnt=()=>s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-50 dark:from-slate-900 dark:via-blue-950 dark:to-indigo-950 p-6",children:[s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsx(pnt,{})}),s.jsx(Cn,{})]}),xnt=()=>{var y;const[e,t]=b.useState("monthly"),[n,r]=b.useState(!1),a=qt(),i=b.useRef(null),{isAuthenticated:o,user:l}=nr(),{toast:c}=_t(),{data:u=[],isLoading:d}=qze(),f=Vze();b.useEffect(()=>{const x=i.current;if(!x)return;const w=Array.from(x.querySelectorAll("details")),N=S=>{const _=S.target;_.open&&w.forEach(k=>{k!==_&&(k.open=!1)})};return w.forEach(S=>S.addEventListener("toggle",N)),()=>w.forEach(S=>S.removeEventListener("toggle",N))},[]);const m=((y=l==null?void 0:l.tier_info)==null?void 0:y.tier_level)??0,p={free:0,basic:1,pro:2,enterprise:3},v=async x=>{var N,S,_,k;if(!o){a("/register");return}const w=e==="yearly"?(S=(N=x.prices)==null?void 0:N.yearly)==null?void 0:S.price_id:(k=(_=x.prices)==null?void 0:_.monthly)==null?void 0:k.price_id;try{const C=await f.mutateAsync({tier_slug:x.id,billing_period:e==="yearly"?"yearly":"monthly",success_url:`${window.location.origin}/subscription/success`,cancel_url:`${window.location.origin}/subscription/cancel`,price_id:w}),E=(C==null?void 0:C.checkout_url)||(C==null?void 0:C.url);if(E){window.location.href=E;return}c({title:"Checkout unavailable",description:"No checkout URL was returned by the server.",variant:"destructive"})}catch{c({title:"Unable to start checkout",description:"Please try again in a moment.",variant:"destructive"})}};return s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-neon-blue/30 rounded-full floating"}),s.jsx("div",{className:"absolute top-3/4 right-1/4 w-1 h-1 bg-electric-blue/40 rounded-full floating stagger-delay-1"}),s.jsx("div",{className:"absolute top-1/2 left-3/4 w-1.5 h-1.5 bg-neon-cyan/20 rounded-full floating stagger-delay-2"})]}),s.jsx(xn,{}),s.jsx("main",{className:"relative z-10 pt-20 pb-20",children:s.jsxs("div",{className:"container mx-auto px-6 max-w-7xl",children:[s.jsxs("div",{className:"text-center mb-16 relative",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-neon-blue/10 via-electric-blue/8 to-neon-cyan/10 rounded-3xl blur-3xl"}),s.jsxs("div",{className:"relative",children:[s.jsxs("h1",{className:"font-bebas text-4xl sm:text-6xl md:text-7xl lg:text-8xl font-normal text-white leading-tight tracking-widest",children:["OPERATIONAL AI"," ",s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-cyber-blue bg-clip-text text-transparent text-shimmer inline-block",children:"INFRASTRUCTURE"})]}),s.jsx("br",{}),s.jsx("p",{className:"font-bebas text-2xl sm:text-3xl md:text-4xl text-white/90 tracking-wide",children:"Priced to scale."}),",",s.jsx("p",{className:"font-inter text-lg sm:text-xl text-gray-300 max-w-3xl mx-auto",children:"Select the deployment tier that matches your operational requirements. Privion supports self-serve evaluation and managed enterprise deployment. Start with a controlled pilot. Scale into production when validated."}),s.jsx("br",{}),s.jsx("br",{}),s.jsx("div",{className:"flex justify-center mb-12",children:s.jsxs(Y,{size:"lg",onClick:()=>{a(o?"/dashboard":"/register")},className:"font-inter font-bold px-8 sm:px-12 py-3 sm:py-6 rounded-xl bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white hover:shadow-lg transition-all duration-300 hover:scale-105",children:["Begin Evalutation",s.jsx(Bt,{className:"ml-2 h-5 w-5"})]})}),s.jsxs("div",{id:"trust-indicators",className:"flex flex-wrap justify-center items-center gap-6 sm:gap-8 text-white/70",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(zn,{className:"h-5 w-5 text-cyber-blue"}),s.jsx("span",{className:"font-inter text-sm sm:text-base",children:"Rapid deployment"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(kX,{className:"h-5 w-5 text-neon-blue"}),s.jsx("span",{className:"font-inter text-sm sm:text-base",children:"Guided configuration"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(it,{className:"h-5 w-5 text-electric-blue"}),s.jsx("span",{className:"font-inter text-sm sm:text-base",children:"Secure by design"})]})]})]})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx("br",{}),s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-4",children:[s.jsx("h2",{className:"font-bebas text-3xl sm:text-5xl lg:text-6xl text-white tracking-wide mb-4",children:"SIMPLE, SCALABLE PRICING"}),s.jsx("p",{className:"font-inter text-lg text-gray-300 max-w-3xl mx-auto mb-2",children:"Choose how deeply AI integrates into your business."}),s.jsx("p",{className:"font-inter text-base text-gray-400 max-w-2xl mx-auto mb-4",children:"Privion supports both self-serve AI deployment and done-for-you operational AI deployment. Start where you're comfortable. Scale when ready."})]}),s.jsxs("div",{className:"flex items-center gap-6 justify-center mb-8",children:[s.jsx("button",{onClick:()=>t("monthly"),className:`font-inter font-semibold text-sm ${e==="monthly"?"text-white":"text-white/70"}`,children:"Monthly"}),s.jsx("button",{"aria-pressed":e==="yearly",onClick:()=>t(e==="monthly"?"yearly":"monthly"),className:`relative w-14 h-8 rounded-full p-1 flex items-center transition-all duration-300 ${e==="yearly"?"bg-gradient-to-r from-cyber-blue to-neon-cyan shadow-lg":"bg-white/10"}`,children:s.jsx("span",{className:`block w-6 h-6 bg-white rounded-full shadow transform transition-transform duration-300 ${e==="yearly"?"translate-x-6":"translate-x-0"}`})}),s.jsxs("div",{className:"relative",children:[s.jsx("button",{onClick:()=>t("yearly"),className:`font-inter font-semibold text-sm ${e==="yearly"?"text-white":"text-white/70"}`,children:"Yearly"}),e==="yearly"&&s.jsx(le,{className:"absolute -top-3 -right-12 bg-neon-cyan text-cyber-dark text-[10px] px-2 py-0.5 rounded-full shadow-lg floating",children:"Save 15%"})]})]}),s.jsx("br",{}),s.jsx("div",{id:"plans-grid",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 ga
1569p-3 max-w-7xl mx-auto",children:u.map(x=>{var P,R,T,D;const w=x.id==="free",N=x.popular,S=f.isPending&&((P=f.variables)==null?void 0:P.tier_slug)===x.id,_=p[x.id]??999,k=o&&(((R=l==null?void 0:l.tier_info)==null?void 0:R.tier_slug)===x.id||_===m&&_!==999&&x.id!=="free"),C=o&&(k||_<=m&&_!==999),E=x.prices?e==="yearly"?(T=x.prices.yearly)==null?void 0:T.amount:(D=x.prices.monthly)==null?void 0:D.amount:null,O=E!=null?E/100:null;return s.jsxs("div",{className:`relative p-6 rounded-2xl backdrop-blur-sm transition-all duration-300 flex flex-col h-full min-h-[550px] ${N?"border-2 border-cyber-blue/50 bg-gray-900/60 hover:border-cyber-blue":"border-2 border-white/20 bg-gray-900/60 hover:border-white/40"}`,children:[N&&s.jsx(le,{className:"absolute -top-3 left-1/2 transform -translate-x-1/2 bg-cyber-blue text-white px-4 py-1 rounded-full font-inter font-semibold text-xs floating",children:"Most Popular"}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h3",{className:"font-bebas text-xl text-white/80 mb-2 tracking-wide",children:x.name.toUpperCase()}),x.max_agents!=null&&x.max_agents!==0&&s.jsx("p",{className:"font-inter text-xs text-cyber-blue/80 mb-3",children:x.max_agents===-1?"Unlimited agents":`Up to ${x.max_agents} ${x.max_agents===1?"agent":"agents"}`}),s.jsx("div",{className:"flex items-baseline gap-1",children:O===null?s.jsx("span",{className:"font-bebas text-5xl text-white",children:"Custom"}):s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"font-bebas text-5xl text-white",children:["$",O.toFixed(O%1===0?0:2)]}),s.jsx("span",{className:"font-inter text-white/60",children:e==="yearly"?"/yr":"/mo"})]})}),s.jsx("p",{className:"font-inter text-sm text-white/60 mt-2",children:x.subtitle})]}),s.jsx("div",{className:"space-y-3 mb-8 flex-1",children:x.features.map(z=>s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(mo,{className:"h-5 w-5 text-cyber-blue flex-shrink-0 mt-0.5"}),s.jsx("span",{className:`font-inter text-sm ${N?"text-white/90":"text-white/80"}`,children:z})]},z))}),s.jsxs(Y,{onClick:()=>{if(!(k||C)){if(w&&!o){a("/register");return}if(x.contactUs){r(!0);return}v(x)}},disabled:k||C||!x.contactUs&&(f.isPending||d),className:N?"w-full py-3 bg-gradient-to-r from-cyber-blue to-electric-blue text-white font-inter font-semibold rounded-xl hover:shadow-xl transition-all duration-300":"w-full py-3 font-inter font-semibold rounded-xl bg-transparent text-white border border-white/20 hover:bg-white/10 transition-all duration-300",children:[S?"Starting checkout...":k?"Current Plan":C?"Only Upgrades Available":x.cta,s.jsx(Bt,{className:"ml-2 h-4 w-4"})]})]},x.id)})}),d&&s.jsx("p",{className:"mt-4 text-center font-inter text-sm text-white/60",children:"Loading live subscription pricing..."})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx("br",{}),s.jsxs("section",{className:"py-16 sm:py-24 px-4 sm:px-6 lg:px-8 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-neon-cyan/8 to-transparent"}),s.jsxs("div",{className:"max-w-3xl mx-auto relative z-10 text-center",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx(le,{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white border-0 px-6 py-2 text-sm font-semibold floating",children:"DONE-FOR-YOU DEPLOYMENT"})}),s.jsxs("h2",{className:"font-bebas text-3xl sm:text-5xl lg:text-6xl text-white tracking-wide mb-4",children:["NEED HELP"," ",s.jsx("span",{className:"bg-gradient-to-r from-neon-cyan via-neon-blue to-electric-blue bg-clip-text text-transparent",children:"DEPLOYING AI?"})]}),s.jsx("p",{className:"font-inter text-lg text-gray-300 max-w-2xl mx-auto mb-8",children:"Privion designs, deploys, and manages operational AI systems — from rapid pilots to enterprise-scale infrastru
1569cture."}),s.jsxs("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-4",children:[s.jsx(Y,{asChild:!0,size:"lg",className:"font-inter font-bold px-8 py-6 rounded-xl bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white hover:shadow-lg transition-all duration-300 hover:scale-105",children:s.jsxs(Vn,{to:"/deployment",children:["Explore Deployment Services",s.jsx(Bt,{className:"ml-2 h-5 w-5"})]})}),s.jsx(Y,{asChild:!0,size:"lg",className:"font-inter font-bold px-8 py-6 rounded-xl bg-transparent text-white border border-white/30 hover:border-white/60 hover:bg-white/5 transition-all duration-300",children:s.jsxs("a",{href:"https://calendly.com/flo-ops/privion-onboarding?utm_content=Pricing+Consultation",target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Mc,{className:"w-4 h-4 mr-2"}),"Schedule a Consultation"]})})]})]})]}),s.jsxs("div",{className:"max-w-4xl mx-auto mb-20",children:[s.jsx("h2",{className:"font-bebas text-4xl sm:text-5xl text-white text-center mb-12 tracking-wide",children:"FREQUENTLY ASKED QUESTIONS"}),s.jsxs("div",{className:"space-y-4",ref:i,children:[s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"Can I start self-serve and move to done-for-you later?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Yes. Many organizations begin self-serve and transition to deployment support once use cases mature. We support both paths."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"Do I need clean data before deploying AI?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Structured data significantly improves AI performance. We guide data organization and standardization during deployment if needed — this is part of Phase 1."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"What industries do you support?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Primarily manufacturing, OEM, engineering, industrial automation, and regulated enterprise environments requiring structured, compliant AI deployment."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"What is Model Context Protocol (MCP)?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"A framework that allows multiple AI agents and systems to share context securely for coordinated workflows. Available in the Platform and Enterprise tiers."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"Do you support compliance requirements?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Yes. Including private deployments, access control, governance, and regulated infrastru
1569cture configurations for enterprise environments."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"Is there a yearly discount?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Yes. Annual plans include approximately 15% savings on self-serve tiers. Enterprise agreements may include custom pricing terms."})]}),s.jsxs("details",{className:"group p-6 rounded-xl border border-white/20 bg-gray-900/60 backdrop-blur-sm hover:border-cyber-blue/50 transition-all duration-2000",children:[s.jsxs("summary",{className:"flex items-center justify-between cursor-pointer list-none",children:[s.jsx("span",{className:"font-inter font-semibold text-white text-lg transition-colors duration-500 group-hover:text-cyber-blue group-open:text-cyber-blue",children:"How do I know which tier is right for me?"}),s.jsx("svg",{className:"w-5 h-5 text-white transition-transform duration-2000 group-open:rotate-180",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s.jsx("p",{className:"font-inter text-white/80 mt-4 leading-relaxed max-h-0 overflow-hidden transition-all duration-2000 group-open:max-h-96",children:"Start free if evaluating. Choose Professional for internal team use. Choose Automation if connecting to business systems. Talk to us if AI impacts operations at scale."})]})]})]})]})}),s.jsx(Cn,{}),s.jsx(Uc,{isOpen:n,onClose:()=>r(!1)})]})},oW=({videoId:e,title:t="See Privion in Action",subtitle:n="30-second overview of our AI platform",className:r=""})=>{const[a,i]=b.useState(!1),[o,l]=b.useState(!1),c=()=>{i(!0),l(!0)},u=()=>{l(!1),i(!1)},d=()=>{i(!1)},f=`https://img.youtube.com/vi/${e}/sddefault.jpg`;return s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`max-w-4xl mx-auto ${r}`,children:[s.jsxs("div",{className:"text-center mb-6",children:[s.jsx("h3",{className:"font-inter text-xl sm:text-2xl font-semibold text-white mb-2",children:t}),s.jsx("p",{className:"font-inter text-base sm:text-lg text-gray-300",children:n})]}),s.jsxs("div",{className:"relative group cursor-pointer",children:[s.jsxs("div",{className:"relative aspect-video rounded-xl overflow-hidden bg-white/5 backdrop-blur-sm border border-white/20 hover:border-cyber-blue/40 transition-all duration-300",children:[s.jsx("img",{src:f,alt:"Privion Commercial Preview",className:"w-full h-full object-cover",loading:"lazy"}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40 group-hover:bg-black/60 transition-all duration-300",onClick:c,children:s.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-full p-4 sm:p-6 border-2 border-white/30 group-hover:border-cyber-blue/60 group-hover:bg-white/30 transition-all duration-300",children:a?s.jsx(kr,{className:"w-8 h-8 sm:w-12 sm:h-12 text-white animate-spin"}):s.jsx(Vr,{className:"w-8 h-8 sm:w-12 sm:h-12 text-white fill-current ml-1"})})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 via-transparent to-black/20 pointer-events-none"})]}),s.jsx("div",{className:"absolute -inset-1 bg-gradient-to-r from-cyber-blue/20 via-electric-blue/20 to-neon-cyan/20 rounded-xl blur-sm opacity-0 group-hover:opacity-100 transition-opacity duration-300 -z-10"})]})]}),o&&s.jsx("div",{className:"fixed inset-0 bg-black/90 backdrop-blur-sm z-50 flex items-center justify-center p-4 animate-in fade-in duration-300",onClick:u,children:s.jsxs("div",{className:"relative w-full max-w-5xl aspect-video",onClick:m=>m.stopPropagation(),children:[s.jsx("button",{onClick:u,className:"absolute -top-5 -right-4 md:-top-6 md:-right-4 z-50 bg-transparent hover:bg-white/10 rounded-full p-1.5 transition-all duration-200 hover:scale-105","aria-label":"Close video",children:s.jsx(jr,{className:"w-5 h-5 text-white"})}),s.jsx("div",{className:"relative w-full h-full rounded-lg overflow-hidden shadow-2xl",children:s.jsx("iframe",{src:`https://www.youtube.com/embed/${e}
1569?autoplay=1&rel=0&modestbranding=1`,title:"Privion Commercial",className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,onLoad:d})})]})})]})},ynt=[{title:"Pilot Deployment",tagline:"Validate feasibility before scaling.",accent:"bg-neon-cyan",price:"$3K–$8K",features:["AI agent architecture","Knowledge ingestion setup","Controlled pilot deployment","Integration validation"]},{title:"Operational Deployment",tagline:"AI embedded directly into workflows.",accent:"bg-electric-blue",price:"$10K–$30K",features:["Workflow engineering","ERP / CRM / MES integrations","Secure automation setup","Monitoring & reporting"]},{title:"Enterprise Deployment",tagline:"AI integrated into mission-critical infrastructure.",accent:"bg-neon-blue",price:"$35K–$150K+",features:["Multi-agent environments","Advanced system integrations","Governance & access controls","Private or hybrid deployment"]}],vnt=encodeURIComponent("AI workflow automation for our operations — worth a look"),bnt=encodeURIComponent(`Hey [Name],
1570
1571I came across Privion while looking into AI automation for operations teams like ours. They deploy custom AI workflows directly inside existing systems — including legacy software with no API.
1572
1573Two workflows they've already built:
1574- Automated order entry via email PO feedback loop
1575- Workflow execution inside enterprise and legacy systems with or without an API
1576
1577Might be worth a 20-minute conversation:
1578https://dashboard.privion-agents.ai/deployment`),wnt=[{label:"Phase 1 — Validate",heading:"We make sure it works before we build it.",features:["Compatibility assessment","Data readiness review","Workflow validation","Prototype deployment","Security review","ROI analysis"],footer:"No surprises. No wasted budget.",accent:"bg-neon-cyan"},{label:"Phase 2 — Deploy",heading:"AI embedded directly into your workflow.",features:["ERP / CRM / MES integration","Workflow automation","Secure access controls","Production rollout","Monitoring setup"],footer:"Built to your spec. Deployed in your environment.",accent:"bg-electric-blue"},{label:"Phase 3 — Operate",heading:"We stay on after go-live.",features:["Continuous monitoring","Integration maintenance","Security governance","Workflow optimization","Optional managed support"],footer:"Operational AI requires operational oversight. We provide it.",accent:"bg-neon-blue"}],jnt=()=>{const[e,t]=X.useState(!1),n=()=>t(!1);return s.jsxs("div",{className:"cinematic-bg relative overflow-hidden min-h-screen",children:[s.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{backgroundImage:"radial-gradient(circle at 1px 1px, hsl(var(--cyber-blue)) 1px, transparent 0)",backgroundSize:"40px 40px"}}),s.jsx("div",{className:"absolute top-1/4 left-1/4 w-64 h-64 bg-cyber-blue/10 rounded-full blur-3xl animate-blob-drift"}),s.jsx("div",{className:"absolute bottom-1/3 right-1/4 w-48 h-48 bg-neon-cyan/8 rounded-full blur-3xl animate-blob-drift-reverse"}),s.jsx(xn,{}),s.jsxs("main",{className:"relative z-10",children:[s.jsxs("section",{className:"pt-28 pb-4 px-4 sm:px-6 lg:px-8 relative",children:[s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[600px] h-[400px] bg-gradient-to-b from-cyber-blue/20 via-electric-blue/10 to-transparent rounded-full blur-3xl pointer-events-none"}),s.jsxs("div",{className:"max-w-3xl mx-auto text-center relative",children:[s.jsxs("h1",{className:"font-bebas text-4xl sm:text-5xl md:text-6xl tracking-wide text-white mb-4",children:["Your Team Is Still Doing This Manually."," ",s.jsxs("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent",children:[s.jsx("br",{}),"We Automate It — Inside Your Systems."]})," "]}),s.jsx("p",{className:"font-inter text-lg text-gray-300 max-w-2xl mx-auto mb-3",children:"Privion deploys custom AI workflows directly into your existing operations. No API required. No ripping out your stack. No internal dev team needed."}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4 w-full max-w-xl mx-auto",children:[s.jsxs(Y,{size:"lg",onClick:()=>t(!0),className:"w-full bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white font-inter font-semibold px-8 py-6 rounded-xl hover:scale-105 transition-all duration-300",children:[s.jsx(Mc,{className:"w-4 h-4 mr-2"}),"Book a 20-Min Scoping Call"]}),s.jsx(Y,{asChild:!0,size:"lg",variant:"outline",className:"w-full border-cyber-blue/50 bg-white/10 text-white hover:bg-white/15 font-inter font-semibold px-8 py-6 rounded-xl transition-all duration-300",children:s.jsxs("a",{href:"#proof-videos",children:["See It Working First",s.jsx(Bt,{className:"ml-2 h-4 w-4"})]})})]}),s.jsxs("a",{href:`mailto:?subject=${vnt}&body=${bnt}`,className:"inline-flex items-center gap-1 font-inter text-sm text-gray-500 hover:text-neon-cyan transition-colors",children:[s.jsx(Aa,{className:"w-3.5 h-3.5"}),"Not the decision maker? Forward this to your ops or engineering lead →"]})]})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx("section",{id:"proof-videos",className:"pt-3 pb-20 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-transparent via-neon-cyan/5 to-transparent",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsxs("h2",{className:"font-bebas text-2xl sm:text-3xl tracking-wide text-white text-center mb-2 leading-tight",children:["These Are Not Demos of What AI Could Do.",s.jsx("br",{}),"These Are Workflows Already Running."]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-12",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-inter text-sm font-semibold text-white mb-3",children:"Order Entry Automation"}),s.jsx(oW,{videoId:"Z9LcCPzeLXQ",title:"",subtitle:"",className:"!max-w-none"}),s.jsx("p",{className:"font-inter text-xs text-gray-500 italic mt-3",children:"AI receives revised POs via email feedback loop and writes directly into the system — zero manual re-entry."})]}),s.jsxs("div",{children:[s.jsx("p",{className:"font-inter text-sm font-semibold text-white mb-3",children:"Workflow Execution — Enterprise & Legacy Systems"}),s.jsx(oW,{videoId:"QwYT7_rgKG4",title:"",subtitle:"",className:"!max-w-none"}),s.jsx("p",{className:"font-inter text-xs text-gray-500 italic mt-3",children:"AI automates tasks inside enterprise and legacy systems — with or without an API connection."})]})]}),s.jsx("p",{className:"font-inter text-sm text-gray-400 text-center mt-10",children:"Most systems we work with don't have open APIs. We automate them anyway."})]})}),s.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-5xl mx-auto bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 sm:p-12 backdrop-blur-sm",children:[s.jsxs("h2",{className:"font-bebas text-2xl sm:text-3xl tracking-wide text-white text-center mb-10 leading-tight",children:["Your Software Doesn't Need an API.",s.jsx("br",{}),"We Work Around It."]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[{icon:Fd,label:"Legacy systems",body:"We deploy inside software your team already uses — no integration required, no vend
1578or dependency."},{icon:dje,label:"With or without APIs",body:"Modern stack with open APIs? We use them. Closed legacy system? We automate around it."},{icon:hl,label:"No internal dev needed",body:"We handle the technical execution. Your team defines the workflow. We build and deploy it."}].map(r=>s.jsxs("div",{className:"text-center",children:[s.jsx(r.icon,{className:"w-8 h-8 text-neon-cyan mx-auto mb-3"}),s.jsx("h3",{className:"font-bebas text-lg tracking-wider text-white mb-2",children:r.label}),s.jsx("p",{className:"font-inter text-sm text-gray-300",children:r.body})]},r.label))})]})}),s.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-transparent via-cyber-blue/5 to-transparent",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-2xl sm:text-3xl tracking-wide text-white text-center mb-10",children:"Built for Operations Teams That Can't Afford to Wait on IT"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[{label:"You're losing hours to manual entry",body:"Order processing, PO management, and data entry your team does by hand every day — we automate it directly inside your existing system."},{label:"Your software has no API",body:"Most automation tools require an open API. Yours doesn't have one. We've solved this — we automate inside legacy systems without it."},{label:"You need AI without the IT project",body:"No internal dev team required. No months-long implementation. We scope, build, and deploy — you run the workflow."}].map(r=>s.jsxs("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-6 backdrop-blur-sm hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03]",children:[s.jsx("h3",{className:"font-bebas text-lg tracking-wider text-white mb-2",children:r.label}),s.jsx("p",{className:"font-inter text-sm text-gray-300",children:r.body})]},r.label))})]})}),s.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-2xl sm:text-3xl tracking-wide text-white text-center mb-10",children:"How a Deployment Works"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:wnt.map(r=>s.jsxs("div",{className:"relative bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-6 backdrop-blur-sm hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] flex flex-col overflow-hidden",children:[s.jsx("div",{className:`absolute top-0 left-0 right-0 h-1 ${r.accent}`}),s.jsx("h3",{className:"font-bebas text-lg tracking-wider text-white mb-1",children:r.label}),s.jsx("p",{className:"font-inter text-sm text-gray-400 mb-5",children:r.heading}),s.jsx("ul",{className:"space-y-2 flex-grow",children:r.features.map((a,i)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(mo,{className:"w-4 h-4 text-neon-cyan flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"font-inter text-sm text-gray-300",children:a})]},i))}),s.jsx("p",{className:"font-inter text-xs text-gray-500 italic border-t border-white/10 pt-3 mt-4",children:r.footer})]},r.label))})]})}),s.jsx("section",{className:"py-20 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx("h2",{className:"font-bebas text-2xl sm:text-3xl tracking-wide text-white text-center mb-10",children:"Deployment Focus Areas"}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-10",children:ynt.map(r=>s.jsxs("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm  hover:border-cyan-400 transition-all duration-300 hover:scale-[1.03] rounded-lg p-6 flex flex-col overflow-hidden",children:[s.jsx("div",{className:`absolute top-0 left-0 right-0 h-1 ${r.accent}`}),s.jsx("h3",{className:"font-bebas text-xl tracking-wider text-white mb-1",children:r.title}),s.jsx("p",{className:"font-inter text-sm text-gray-400 mb-5",children:r.tagline}),s.jsx("ul",{className:"space-y-2 flex-grow",children:r.features.map((a,i)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(mo,{className:"w-4 h-4 text-neon-cyan flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"font-inter text-sm text-gray-300",children:a})]},i))}),s.jsxs("div",{className:"border-t border-white/10 pt-3 mt-4",children:[s.jsx("p",{className:"font-inter text-xs text-gray-500 mb-1",children:"Typical Range"}),s.jsx("p",{className:"font-inter text-lg font-semibold text-white",children:r.price})]})]},r.title))}),s.jsx("p",{className:"font-inter text-sm text-gray-400 text-center mt-8",children:"Not sure which tier fits? The scoping call will tell you. It's 20 minutes and costs nothing."})]})}),s.jsx("section",{className:"py-24 px-4 sm:px-6 lg:px-8 bg-gradient-to-b from-transparent via-neon-cyan/5 to-transparent",children:s.jsxs("div",{className:"max-w-3xl mx-auto text-center",children:[s.jsxs("h2",{className:"font-bebas text-3xl sm:text-4xl tracking-wide text-white mb-4 leading-tight",children:["What Workflow Is Your Team",s.jsx("br",{}),"Still Doing Manually?"]}),s.jsx("p",{className:"font-inter text-base text-gray-300 max-w-xl mx-auto mb-8",children:"Let's look at your systems, define the right scope, and determine the fastest path to automation."}),s.jsxs(Y,{size:"lg",onClick:()=>t(!0),className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan text-white font-inter font-semibold px-8 py-6 rounded-xl hover:scale-105 transition-all duration-300",children:[s.jsx(Mc,{className:"w-4 h-4 mr-2"}),"Book a 20-Min Scoping Call"]}),s.jsx("div",{className:"mt-4",children:s.jsx("a",{href:"/pricing",className:"font-inter text-sm text-gray-400 hover:text-neon-cyan transition-colors",children:"Or start with a subscription RAG agent →"})})]})})]}),s.jsx(Cn,{}),s.jsx(Uc,{isOpen:e,onClose:n})]})},Nnt=()=>{const e=qt(),{isAuthenticated:t}=nr(),{toast:n}=_t(),[r,a]=b.useState(!1),[i,o]=b.useState(!1),l=d=>
1578{t?(e("/agent-builder/new"),n({title:"🚀 Perfect Choice!",description:`Building your ${d} agent - let's get started!`,duration:3e3})):(o(!0),n({title:"🚀 Perfect Choice!",description:`${d} agents are our specialty. Let's schedule your consultation!`,duration:4e3}))},c=[{id:"restaurants",title:"Restaurants & Food Service",icon:s.jsx(Cje,{className:"h-6 w-6"}),useCases:["Menu recommendations","Order management","Customer service"]},{id:"retail",title:"Retail & E-commerce",icon:s.jsx(pje,{className:"h-6 w-6"}),useCases:["Product recommendations","Inventory help","Customer support"]},{id:"hospitality",title:"Hotels & Hospitality",icon:s.jsx(aje,{className:"h-6 w-6"}),useCases:["Booking assistance","Guest services","Local recommendations"]},{id:"real-estate",title:"Real Estate",icon:s.jsx(KO,{className:"h-6 w-6"}),useCases:["Property search","Market insights","Client communication"]},{id:"automotive",title:"Automotive",icon:s.jsx(lX,{className:"h-6 w-6"}),useCases:["Service scheduling","Parts lookup","Maintenance guidance"]},{id:"travel",title:"Travel & Tourism",icon:s.jsx(bX,{className:"h-6 w-6"}),useCases:["Trip planning","Booking help","Travel assistance"]},{id:"fitness",title:"Fitness & Wellness",icon:s.jsx(eje,{className:"h-6 w-6"}),useCases:["Workout planning","Nutrition advice","Health tracking"]},{id:"legal",title:"Legal Services",icon:s.jsx(jX,{className:"h-6 w-6"}),useCases:["Contract review","Case management","Document drafting"]},{id:"healthcare",title:"Healthcare",icon:s.jsx(JO,{className:"h-6 w-6"}),useCases:["Patient support","Compliance help","Staff assistance"]},{id:"financial",title:"Financial Services",icon:s.jsx(Rs,{className:"h-6 w-6"}),useCases:["Account help","Investment guidance","Loan processing"]},{id:"insurance",title:"Insurance",icon:s.jsx(it,{className:"h-6 w-6"}),useCases:["Claims processing","Policy questions","Risk assessment"]},{id:"consulting",title:"Consulting",icon:s.jsx(iX,{className:"h-6 w-6"}),useCases:["Client research","Knowledge management","Report generation"]},{id:"education",title:"Education",icon:s.jsx($h,{className:"h-6 w-6"}),useCases:["Student guidance","Admin tasks","Campus questions"]},{id:"utilities",title:"Water & Utilities",icon:s.jsx(WO,{className:"h-6 w-6"}),useCases:["Quality monitoring","EPA compliance","Automated reporting"]},{id:"manufacturing",title:"Manufacturing",icon:s.jsx(GO,{className:"h-6 w-6"}),useCases:["Quality control","Safety compliance","Production planning"]},{id:"government",title:"Public Sector",icon:s.jsx(mX,{className:"h-6 w-6"}),useCases:["Citizen services","Compliance checks","Document management"]}],u={title:"And More...",icon:s.jsx(bs,{className:"h-6 w-6"}),useCases:["Don't see your industry?","Privion adapts to any workflow","Build in minutes"]};return s.jsxs("div",{className:"min-h-screen cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"relative pt-20 pb-12",children:s.jsxs("div",{className:"container mx-auto px-4 sm:px-6",children:[s.jsxs("div",{className:"text-center mb-16",children:[s.jsx("h1",{className:"text-5xl sm:text-6xl font-bebas tracking-wide gradient-text mb-6",children:"Industries We Serve"}),s.jsxs("p",{className:"text-xl text-white/80 max-w-4xl mx-auto mb-8 leading-relaxed",children:["Privion AI Agents are built for organizations that need security, speed, and compliance.",s.jsx("br",{}),"No matter your field, our agents adapt to your work in minutes."]}),s.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-8 text-sm text-electric-blue/90",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-electric-blue rounded-full animate-pulse"}),s.jsx("span",{children:"Enterprise Secure"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-neon-cyan rounded-full animate-pulse"}),s.jsx("span",{children:"5-Min Setup"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-2 h-2 bg-electric-blue rounded-full animate-pulse"}),s.jsx("span",{children:"Compliance-Ready"})]})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 mb-12",children:[c.map((d,f)=>s.jsx(te,{className:"group glass-effect-dark hover:bg-white/15 transition-all duration-500 hover:scale-105 hover:shadow-cyber border-electric-blue/20",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-gradient-to-br from-electric-blue to-neon-cyan flex items-center justify-center shadow-glow transition-all duration-300 group-hover:scale-110",children:s.jsx("div",{className:"text-white",children:d.icon})}),s.jsx("h3",{className:"text-lg font-semibold text-white mb-4 leading-tight",children:d.title}),s.jsx("div",{className:"space-y-2 mb-6",children:d.useCases.map((m,p)=>s.jsxs("div",{className:"flex items-center text-sm text-white/70",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-neon-cyan rounded-full mr-3 flex-shrink-0"}),s.jsx("span",{children:m})]},p))}),s.jsx(Y,{onClick:()=>l(d.title),variant:"outline",size:"sm",className:"w-full bg-transparent border-electric-blue/40 text-electric-blue hover:bg-electric-blue/20 hover:border-electric-blue transition-all duration-300",children:"Build Agent"})]})},d.id)),s.jsx(te,{className:"group glass-effect-dark hover:bg-gradient-to-br hover:from-electric-blue/20 hover:to-neon-cyan/20 transition-all duration-500 hover:scale-105 border-2 border-electric-blue/40 shadow-glow",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx("div",{className:"w-12 h-12 mx-auto mb-4 rounded-full bg-gradient-to-br from-neon-cyan to-electric-blue flex items-center justify-center shadow-glow animate-pulse",children:s.jsx("div",{className:"text-white",children:u.icon})}),s.jsx("h3",{className:"text-lg font-semibold text-white mb-4 leading-tight",children:u.title}),s.jsx("div",{className:"space-y-2 mb-6",children:u.useCases.map((d,f)=>s.jsxs("div",{className:"flex items-center text-sm text-white/70",children:[s.jsx("div",{className:"w-1.5 h-1.5 bg-neon-cyan rounded-full mr-3 flex-shrink-0"}),s.jsx("span",{children:d})]},f))}),s.jsx(Y,{onClick:()=>l("Universal"),className:"w-full bg-gradient-to-r from-electric-blue to-neon-cyan hover:from-electric-blue/80 hover:to-neon-cyan/80 text-white font-medium shadow-glow",children:"Try Universal Builder"})]})})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-xl text-white/60 mb-8 max-w-2xl mx-auto",children:"Build your own agent in minutes — secure and ready to scale."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[s.jsxs(Y,{size:"lg",onClick:()=>l("Custom"),className:"bg-gradient-to-r from-electric-blue to-neon-cyan hover:from-electric-blue/80 hover:to-neon-cyan/80 text-white shadow-glow",children:[s.jsx(ws,{className:"w-5 h-5 mr-2"}),"Start Building"]}),s.jsx(Y,{size:"lg",variant:"outline",onClick:()=>a(!0),className:"bg-transparent border-electric-blue/40 text-electric-blue hover:bg-electric-blue/20",children:"Schedule Demo"})]})]})]})}),s.jsx(Uc,{isOpen:i,onClose:()=>o(!1)}),s.jsx(Cn,{})]})},Snt=()=>{const e=qt(),[t,n]=b.useState(!1),r=()=>{e("/agent-builder")};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-green-50 to-emerald-100 dark:from-gray-950 dark:via-green-950 dark:to-emerald-950 relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-green-400/20 to-emerald-600/20 rounded-full blur-3xl animate-pulse"}),s.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-emerald-400/20 to-teal-600/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 pt-28 sm:pt-32 lg:pt-40 pb-12 sm:pb-16 lg:pb-20 relative z-10",children:s.jsxs("div",{className:"text-center max-w-5xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center mb-6 sm:mb-8",children:[s.jsxs("div",{className:"relative mb-4 sm:mb-6",children:[s.jsx(wr,{variant:"default",size:"large",className:"w-20 h-20 sm:w-24 sm:h-24"}),s.jsx(Jg,{className:"absolute -top-2 -right-2 h-6 w-6 text-green-500 opacity-70 animate-pulse"})]}),s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold gradient-text gradient-text-dark mb-4",children:"Privion for Healthcare"}),s.jsx("p",{className:"text-xl sm:text-2xl text-green-600 dark:text-green-400 font-semibold mb-2",children:"HIPAA-Secure AI Agents for Clinical Workflows"})]}),s.jsxs("p",{className:"text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-10 leading-relaxed",children:["Automate patient information management, clinical protocols, and administrative workflows with HIPAA-compliant AI agents built for healthcare.",s.jsx("br",{}),s.jsx("span",{className:"text-base sm:text-lg text-gray-500 dark:text-gray-400",children:"HIPAA Compliant • EMR Ready • Clinical Focused"})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3 mb-8 sm:mb-12",children:[s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-green-200 dark:border-green-800 bg-green-50/50 dark:bg-green-950/50 text-green-800 dark:text-green-200",children:[s.jsx(it,{className:"w-4 h-4 mr-2"}),"HIPAA Compliant"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/50 text-blue-800 dark:text-blue-200",children:[s.jsx(JO,{className:"w-4 h-4 mr-2"}),"EMR Integration"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-cyber-blue/30 dark:border-cyber-blue/30 bg-cyber-blue/10 dark:bg-cyber-blue/20 text-cyber-blue dark:text-electric-blue",children:[s.jsx(zn,{className:"w-4 h-4 mr-2"}),"24/7 Availability"]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-6 justify-center",children:[s.jsxs(Y,{size:"lg",onClick:r,className:"bg-gradient-to-r from-green-600 to-emerald-600 hover:from-green-700 hover:to-emerald-700 text-white px-8 py-4 text-lg font-semibold",children:[s.jsx(Sn,{className:"w-5 h-5 mr-2"}),"Try Healthcare Demo"]}),s.jsxs(Y,{size:"lg",variant:"outline",onClick:()=>n(!0),className:"px-8 py-4 text-lg font-semibold",children:[s.jsx(Vr,{className:"w-5 h-5 mr-2"}),"Request Clinical Demo"]})]})]})}),s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4 gradient-text gradient-text-dark",children:"AI Agents for Better Patient 
1578Care"}),s.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300",children:"Streamline clinical workflows while maintaining the highest privacy standards"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center",children:s.jsx(Jg,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Patient Management"}),s.jsx(nt,{children:"Intelligent patient information handling"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Appointment scheduling"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Medical history access"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Treatment reminders"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",children:s.jsx(rn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Clinical Protocols"}),s.jsx(nt,{children:"Automated clinical decision support"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Treatment guidelines"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Drug interaction alerts"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Care plan automation"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-cyber-blue to-electric-blue flex items-center justify-center",children:s.jsx(Bn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Staff Coordination"}),s.jsx(nt,{children:"Enhanced team communication"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Shift handoffs"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Emergency protocols"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Resource allocation"]})]})})]})]})]}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 py-12 relative z-10",children:s.jsx(te,{className:"glass-effect glass-effect-dark border-green-200 dark:border-green-800",children:s.jsx(se,{className:"p-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Explore Other Industries"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Privion also serves Water Treatment, Higher Education, Manufacturing, and Government"}),s.jsxs(Y,{variant:"outline",onClick:()=>e("/"),className:"border-green-300 text-green-700 hover:bg-green-100",children:["View All Industries",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})})})}),s.jsx(Ty,{isOpen:t,onClose:()=>n(!1)}),s.jsx(Cn,{})]})},knt=()=>{const e=qt(),[t,n]=b.useState(!1),r=()=>{e("/agent-builder")};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-orange-50 to-red-100 dark:from-gray-950 dark:via-orange-950 dar
1578k:to-red-950 relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-orange-400/20 to-red-600/20 rounded-full blur-3xl animate-pulse"}),s.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-red-400/20 to-pink-600/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 pt-28 sm:pt-32 lg:pt-40 pb-12 sm:pb-16 lg:pb-20 relative z-10",children:s.jsxs("div",{className:"text-center max-w-5xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center mb-6 sm:mb-8",children:[s.jsxs("div",{className:"relative mb-4 sm:mb-6",children:[s.jsx(wr,{variant:"default",size:"large",className:"w-20 h-20 sm:w-24 sm:h-24"}),s.jsx(uX,{className:"absolute -top-2 -right-2 h-6 w-6 text-orange-500 opacity-70 animate-pulse"})]}),s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold gradient-text gradient-text-dark mb-4",children:"Privion for Manufacturing"}),s.jsx("p",{className:"text-xl sm:text-2xl text-orange-600 dark:text-orange-400 font-semibold mb-2",children:"AI-Powered SOPs for Industrial Operations"})]}),s.jsxs("p",{className:"text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-10 leading-relaxed",children:["Automate manufacturing SOPs, connect to existing CMMS systems, and ensure quality compliance with AI agents built for industrial operations.",s.jsx("br",{}),s.jsx("span",{className:"text-base sm:text-lg text-gray-500 dark:text-gray-400",children:"SCADA Ready • Quality Focused • Production Optimized"})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3 mb-8 sm:mb-12",children:[s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-orange-200 dark:border-orange-800 bg-orange-50/50 dark:bg-orange-950/50 text-orange-800 dark:text-orange-200",children:[s.jsx(A$,{className:"w-4 h-4 mr-2"}),"SCADA Integration"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-red-200 dark:border-red-800 bg-red-50/50 dark:bg-red-950/50 text-red-800 dark:text-red-200",children:[s.jsx(it,{className:"w-4 h-4 mr-2"}),"ISO Compliant"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/50 text-blue-800 dark:text-blue-200",children:[s.jsx(hl,{className:"w-4 h-4 mr-2"}),"CMMS Ready"]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-6 justify-center",children:[s.jsxs(Y,{size:"lg",onClick:r,className:"bg-gradient-to-r from-orange-600 to-red-600 hover:from-orange-700 hover:to-red-700 text-white px-8 py-4 text-lg font-semibold",children:[s.jsx(Sn,{className:"w-5 h-5 mr-2"}),"Try Manufacturing Demo"]}),s.jsxs(Y,{size:"lg",variant:"outline",onClick:()=>n(!0),className:"px-8 py-4 text-lg font-semibold",children:[s.jsx(Vr,{className:"w-5 h-5 mr-2"}),"Request Plant Demo"]})]})]})}),s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4 gradient-text gradient-text-dark",children:"Built for Manufacturing Excellence"}),s.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300",children:"From floor operations to quality control, automate critical manufacturing workflows"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-orange-500 to-red-500 flex items-center justify-center",children:s.jsx(rn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"SOP Automation"}),s.jsx(nt,{children:"Digital standard operating procedures"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Equipment startup sequences"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Quality check protocols"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}
1578),"Safety procedure compliance"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",children:s.jsx(A$,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"SCADA Integration"}),s.jsx(nt,{children:"Real-time system connectivity"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Live data monitoring"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Automated alerts"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Production optimization"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center",children:s.jsx(hl,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Maintenance"}),s.jsx(nt,{children:"Predictive maintenance workflows"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"CMMS integration"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Work order automation"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Parts inventory tracking"]})]})})]})]})]}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 py-12 relative z-10",children:s.jsx(te,{className:"glass-effect glass-effect-dark border-orange-200 dark:border-orange-800",children:s.jsx(se,{className:"p-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Explore Other Industries"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Privion also serves Water Treatment, Higher Education, Healthcare, and Government"}),s.jsxs(Y,{variant:"outline",onClick:()=>e("/"),className:"border-orange-300 text-orange-700 hover:bg-orange-100",children:["View All Industries",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})})})}),s.jsx(Ty,{isOpen:t,onClose:()=>n(!1)}),s.jsx(Cn,{})]})},Cnt=()=>{const e=qt(),[t,n]=b.useState(!1),r=()=>{e("/agent-builder")};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-gray-50 to-blue-100 dark:from-gray-950 dark:via-gray-900 dark:to-blue-950 relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-blue-400/20 to-gray-600/20 rounded-full blur-3xl animate-pulse"}),s.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-gray-400/20 to-slate-600/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 pt-28 sm:pt-32 lg:pt-40 pb-12 sm:pb-16 lg:pb-20 relative z-10",children:s.jsxs("div",{className:"text-center max-w-5xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center mb-6 sm:mb-8",children:[s.jsxs("div",{className:"relative mb-4 sm:mb-6",children:[s.jsx(wr,{variant:"default",size:"large",className:"w-20 h-20 sm:w-24 sm:h-24"}),s.jsx(oX,{className:"absolute -top-2 -right-2 h-6 w-6 text-blue-500 opacity-70 animate-pulse"})]}),s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold gradient-text gradient-text-dark mb-4",children:"Privion for Government"}
1578),s.jsx("p",{className:"text-xl sm:text-2xl text-blue-600 dark:text-blue-400 font-semibold mb-2",children:"Compliant AI for Public Operations"})]}),s.jsxs("p",{className:"text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-10 leading-relaxed",children:["Modernize citizen services and internal operations with government-grade AI agents built for compliance, security, and transparency.",s.jsx("br",{}),s.jsx("span",{className:"text-base sm:text-lg text-gray-500 dark:text-gray-400",children:"FedRAMP Ready • SOC 2 Certified • Audit Compliant"})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3 mb-8 sm:mb-12",children:[s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/50 text-blue-800 dark:text-blue-200",children:[s.jsx(it,{className:"w-4 h-4 mr-2"}),"FedRAMP Ready"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-gray-200 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-950/50 text-gray-800 dark:text-gray-200",children:[s.jsx(ur,{className:"w-4 h-4 mr-2"}),"Government Grade"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-green-200 dark:border-green-800 bg-green-50/50 dark:bg-green-950/50 text-green-800 dark:text-green-200",children:[s.jsx(rn,{className:"w-4 h-4 mr-2"}),"Audit Ready"]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-6 justify-center",children:[s.jsxs(Y,{size:"lg",onClick:r,className:"bg-gradient-to-r from-blue-600 to-gray-600 hover:from-blue-700 hover:to-gray-700 text-white px-8 py-4 text-lg font-semibold",children:[s.jsx(Sn,{className:"w-5 h-5 mr-2"}),"Try Government Demo"]}),s.jsxs(Y,{size:"lg",variant:"outline",onClick:()=>n(!0),className:"px-8 py-4 text-lg font-semibold",children:[s.jsx(Vr,{className:"w-5 h-5 mr-2"}),"Request Agency Demo"]})]})]})}),s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4 gradient-text gradient-text-dark",children:"AI for Modern Government"}),s.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300",children:"Enhance citizen services while maintaining the highest security and compliance standards"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",children:s.jsx(Bn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Citizen Services"}),s.jsx(nt,{children:"Enhanced public service delivery"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Service request routing"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Document processing"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Status tracking"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-gray-500 to-slate-500 flex items-center justify-center",children:s.jsx(rn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Internal Operations"}),s.jsx(nt,{children:"Streamlined government workflows"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Policy automation"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Compliance monitoring"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Report generation"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center",children:s.jsx(it,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Security & Compliance"}),s.jsx(nt,{children:"Government-grade protection"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Data sovereignty"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Audit trails"]}
1578),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Access controls"]})]})})]})]})]}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 py-12 relative z-10",children:s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsx(se,{className:"p-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Explore Other Industries"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"Privion also serves Water Treatment, Higher Education, Healthcare, and Manufacturing"}),s.jsxs(Y,{variant:"outline",onClick:()=>e("/"),className:"border-blue-300 text-blue-700 hover:bg-blue-100",children:["View All Industries",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})})})}),s.jsx(Ty,{isOpen:t,onClose:()=>n(!1)}),s.jsx(Cn,{})]})},_nt=()=>{const e=qt(),[t,n]=b.useState(!1),r=()=>{e("/agent-builder")};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-100 dark:from-gray-950 dark:via-blue-950 dark:to-indigo-950 relative overflow-hidden",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-gradient-to-br from-blue-400/20 to-cyan-600/20 rounded-full blur-3xl animate-pulse"}),s.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-gradient-to-br from-cyber-blue/20 to-electric-blue/20 rounded-full blur-3xl animate-pulse",style:{animationDelay:"2s"}})]}),s.jsx(xn,{}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 pt-28 sm:pt-32 lg:pt-40 pb-12 sm:pb-16 lg:pb-20 relative z-10",children:s.jsxs("div",{className:"text-center max-w-5xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center mb-6 sm:mb-8",children:[s.jsxs("div",{className:"relative mb-4 sm:mb-6",children:[s.jsx(wr,{variant:"default",size:"large",className:"w-20 h-20 sm:w-24 sm:h-24"}),s.jsx($h,{className:"absolute -top-2 -right-2 h-6 w-6 text-blue-500 opacity-70 animate-pulse"})]}),s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold gradient-text gradient-text-dark mb-4",children:"Privion for Higher Education"}),s.jsx("p",{className:"text-xl sm:text-2xl text-blue-600 dark:text-blue-400 font-semibold mb-2",children:"FERPA-Compliant AI Agents for Academic Success"})]}),s.jsxs("p",{className:"text-lg sm:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-10 leading-relaxed",children:["Automate student services, advising workflows, and academic task management through white-labeled, FERPA-compliant AI agents.",s.jsx("br",{}),s.jsx("span",{className:"text-base sm:text-lg text-gray-500 dark:text-gray-400",children:"Built for Faculty, Advisors, and Students"})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3 mb-8 sm:mb-12",children:[s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-blue-200 dark:border-blue-800 bg-blue-50/50 dark:bg-blue-950/50 text-blue-800 dark:text-blue-200",children:[s.jsx(it,{className:"w-4 h-4 mr-2"}),"FERPA Compliant"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-green-200 dark:border-green-800 bg-green-50/50 dark:bg-green-950/50 text-green-800 dark:text-green-200",children:[s.jsx(Dh,{className:"w-4 h-4 mr-2"}),"LMS Integration"]}),s.jsxs(le,{variant:"secondary",className:"glass-effect glass-effect-dark px-4 py-2 text-sm font-medium border-cyber-blue/30 dark:border-cyber-blue/30 bg-cyber-blue/10 dark:bg-cyber-blue/20 text-cyber-blue dark:text-electric-blue",children:[s.jsx(el,{className:"w-4 h-4 mr-2"}),"Retention Analytics"]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 sm:gap-6 justify-center",children:[s.jsxs(Y,{size:"lg",onClick:r,className:"bg-gradient-to-r from-cyber-blue to-electric-blue hover:from-cyber-blue/90 hover:to-electric-blue/90 text-white px-8 py-4 text-lg font-semibold",children:[s.jsx(Sn,{className:"w-5 h-5 mr-2"}),"Try Academic Agent Demo"]}),s.jsxs(Y,{size:"lg",variant:"outline",onClick:()=>n(!0),className:"px-8 py-4 text-lg font-semibold",children:[s.jsx(Vr,{className:"w-5 h-5 mr-2"}),"Request Campus Demo"]})]})]})}),s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold mb-4 gradient-text gradient-text-dark",children:"AI Agents for Every Campus Role"}),s.jsx("p",{className:"text-lg text-gray-600 dark:text-gray-300",children:"Boost retention and completion outcomes with intelligent automation"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center",children:s.jsx(Bn,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Students"}
1578),s.jsx(nt,{children:"Smart academic support and task management"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Course reminders & deadlines"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Tutoring recommendations"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Event alerts & campus info"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-green-500 to-emerald-500 flex items-center justify-center",children:s.jsx($h,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Faculty"}),s.jsx(nt,{children:"Automated syllabus and grading support"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Syllabus sync with LMS"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Deadline notifications"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Feedback automation"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-cyber-blue to-electric-blue flex items-center justify-center",children:s.jsx(di,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Advisors"}),s.jsx(nt,{children:"Intelligent student success monitoring"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Appointment coordination"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Risk flag monitoring"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Intervention triggers"]})]})})]}),s.jsxs(te,{className:"glass-effect glass-effect-dark border-0 shadow-xl",children:[s.jsxs(xe,{className:"text-center pb-4",children:[s.jsx("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-gradient-to-br from-orange-500 to-red-500 flex items-center justify-center",children:s.jsx(el,{className:"h-8 w-8 text-white"})}),s.jsx(we,{className:"text-lg",children:"Administrators"}),s.jsx(nt,{children:"Data-driven student success insights"})]}),s.jsx(se,{children:s.jsxs("ul",{className:"space-y-2 text-sm text-gray-600 dark:text-gray-400",children:[s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Compliance audits"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Success dashboards"]}),s.jsxs("li",{className:"flex items-center gap-2",children:[s.jsx(Pe,{className:"w-4 h-4 text-green-500"}),"Retention analytics"]})]})})]})]})]}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:s.jsxs("div",{className:"glass-effect glass-effect-dark rounded-3xl p-8 lg:p-12 border border-white/20 dark:border-gray-700/30",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold gradient-text gradient-text-dark mb-4",children:"Real ROI for Institutions"}),s.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300",children:"Privion helps advisors and faculty do more with less while keeping students on track"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-4xl font-bold text-green-600 dark:text-green-400 mb-2",children:"+12%"}),s.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Task Completion"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Increase in student task completion rates"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-4xl font-bold text-blue-600 dar
1578k:text-blue-400 mb-2",children:"-18%"}),s.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Missed Appointments"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Reduction in missed advising appointments"})]}),s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"text-4xl font-bold text-cyber-blue dark:text-electric-blue mb-2",children:"+22%"}),s.jsx("p",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Retention Lift"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Retention improvement in pilot institutions"})]})]})]})}),s.jsxs("div",{className:"container mx-auto px-4 sm:px-6 py-12 sm:py-16 relative z-10",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("h2",{className:"text-3xl sm:text-4xl font-bold gradient-text gradient-text-dark mb-4",children:"Privacy-First by Design"}),s.jsx("p",{className:"text-xl text-gray-600 dark:text-gray-300",children:"Privion was designed with FERPA compliance in mind, from day one"})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx(it,{className:"h-12 w-12 text-blue-500 mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Student Record Access"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Granular control over data access and sharing"})]})}),s.jsx(te,{className:"glass-effect glass-effect-dark border-green-200 dark:border-green-800",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx(Pe,{className:"h-12 w-12 text-green-500 mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Consent-Based Data"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Student consent tracking for all data usage"})]})}),s.jsx(te,{className:"glass-effect glass-effect-dark border-cyber-blue/30 dark:border-cyber-blue/30",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx(el,{className:"h-12 w-12 text-cyber-blue mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Audit-Ready Logs"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Complete audit trail for every interaction"})]})}),s.jsx(te,{className:"glass-effect glass-effect-dark border-orange-200 dark:border-orange-800",children:s.jsxs(se,{className:"p-6 text-center",children:[s.jsx(Bn,{className:"h-12 w-12 text-orange-500 mx-auto mb-4"}),s.jsx("h3",{className:"font-semibold text-gray-900 dark:text-white mb-2",children:"Admin Controls"}),s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Full visibility and override capabilities"})]})})]})]}),s.jsx("div",{className:"container mx-auto px-4 sm:px-6 py-12 relative z-10",children:s.jsx(te,{className:"glass-effect glass-effect-dark border-blue-200 dark:border-blue-800",children:s.jsx(se,{className:"p-6",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-white mb-2",children:"Privion for Other Industries"}),s.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"We also support Water Utilities, Healthcare, Government, and Manufacturing"}),s.jsxs(Y,{variant:"outline",onClick:()=>e("/"),className:"border-blue-300 text-blue-700 hover:bg-blue-100",children:["Explore All Industries",s.jsx(Bt,{className:"h-4 w-4 ml-2"})]})]})})})}),s.jsx(Ty,{isOpen:t,onClose:()=>n(!1)}),s.jsx(Cn,{})]})},Ant=()=>{const[e]=$m(),t=qt(),{toast:n}=_t(),[r,a]=b.useState("");b.useEffect(()=>{const l=e.get("mode")||localStorage.getItem("selectedDeploymentMode")||"";if(console.log("🚀 WizardRoute loaded with mode:",l),!l){n({title:"No Deployment Mode Selected",description:"Redirecting to system setup...",variant:"destructive"}),t("/system-setup");return}a(l),localStorage.setItem("selectedDeploymentMode",l)},[e,t,n]);const i=l=>{console.log("✅ Wizard completed:",l);const c={...l,deploymentMode:r,configuredAt:new Date().toISOString()};localStorage.setItem("organizationConfig",JSON.stringify(c)),n({title:"✅ Configuration Complete",description:"Redirecting to system setup...",duration:3e3}),setTimeout(()=>{t("/system-setup")},1500)},o=()=>{console.log("⬅️ Going back to system setup"),t("/system-setup")};return r?s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsx("div",{className:"container mx-auto px-6 py-8 max-w-6xl",children:s.jsx(Dse,{onRetry:()=>window.location.reload(),children:s.jsx(Rse,{deploymentMode:r,onComplete:i,onBack:o})})})}),s.jsx(Cn,{})]}):s.jsxs("div",{className:"min-h-screen relative overflow-hidden cinematic-bg",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"pt-16",children:s.jsx("div",{className:"container mx-auto px-6 py-8 max-w-6xl",children:s.jsx(te,{children:s.jsxs(se,{className:"p-8 text-center",children:[s.jsx(ln,{className:"h-12 w-12 mx-auto text-yellow-500 mb-4"}),s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Loading Configuration Wizard..."}),s.jsx("p",{className:"text-muted-foreground",children:"Please wait while we prepare your deployment c
1578onfiguration."})]})})})})]})},Ent=()=>{const e=wl();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:[s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),s.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]}),s.jsx(Cn,{})]})},Pnt=()=>(qt(),s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx("div",{className:"absolute top-20 left-2 z-20 sm:top-10 sm:left-4 md:top-20 md:left-8",children:s.jsxs("button",{"aria-label":"Back to Home",type:"button",tabIndex:0,onClick:()=>{window.location.href="/"},className:"flex items-center justify-center bg-transparent border border-white text-gray-300 hover:bg-gradient-to-br hover:from-blue-950/30 hover:to-slate-900/30 hover:border-blue-400/60 hover:text-white transition-all duration-300 text-base px-3 py-2 rounded-lg min-w-0 w-auto active:scale-95 focus:outline-none focus:ring-2 focus:ring-cyber-blue/60 select-none",style:{minWidth:0,fontWeight:500,touchAction:"manipulation"},children:[s.jsx(ai,{className:"h-5 w-5"}),s.jsx("span",{className:"hidden sm:inline ml-2",children:"Back to Home"})]})}),s.jsxs("main",{className:"container mx-auto px-4 pt-20 pb-16 max-w-5xl relative z-10",children:[s.jsxs("div",{className:"text-center mb-28 mt-20",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"w-24 h-24 rounded-xl bg-gradient-to-br from-blue-500/20 to-cyan-500/20 flex items-center justify-center",children:s.jsx(it,{className:"w-10 h-10 text-blue-400"})})}),s.jsxs("h1",{className:"font-bebas text-5xl font-normal tracking-widest leading-tight",children:[s.jsx("span",{className:"text-white",children:"PRIVACY"}),s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent",children:"POLICY"})]}),s.jsx("p",{className:"text-gray-400 mt-4 text-base",children:"Last updated: January 15, 2026"}),s.jsx("p",{className:"text-gray-300 mt-6 max-w-3xl mx-auto leading-relaxed text-base",children:'Privion L.L.C. ("Privion," "we," "our," or "us") is committed to protecting your privacy and handling data responsibly. This Privacy Policy explains how we collect, use, store, and protect information when you use our services.'})]}),s.jsx(xn,{}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(bs,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 1"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Scope of This Policy"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"This Privacy Policy applies to information collected through:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"The Privion website"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"The Privion platform and services"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Communications with Privion"]})]}),s.jsx("p",{className:"text-gray-300 text-base mt-4",children:"This policy does not apply to third-party services, systems, or data sources you choose to connect to Privi
1578on."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 2"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Information We Collect"}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-3",children:"a. Account and Contact Information"}),s.jsx("p",{className:"text-gray-300 text-base mb-3",children:"We may collect:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Name"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Email address"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Organization name"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Billing information"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Account credentials"]})]}),s.jsx("p",{className:"text-gray-300 text-base mt-3",children:"This information is used to provide access, support, and billing."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-3",children:"b. Platform Usage Information"}),s.jsx("p",{className:"text-gray-300 text-base mb-3",children:"We may collect limited technical information such as:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Log data (timestamps, feature usage, errors)"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Authentication events"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"System performance metrics"]})]}),s.jsx("p",{className:"text-gray-300 text-base mt-3",children:"This information is used to operate, secure, and improve the platform."})]}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold text-white mb-3",children:"c. Customer-Provided Data"}),s.jsx("p",{className:"text-gray-300 text-base mb-3",children:'Privion processes data, documents, and content that customers choose to connect or upload to the platform ("Customer Data").'}),s.jsx("p",{className:"text-gray-300 text-base font-semibold mb-2",children:"Important:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Customers retain full ownership of all Customer Data."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Privion does not claim ownership of Customer Data."]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Customers control what data is connected, how it is used, and who can access it."]})]})]})]})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(it,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 3"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"How Customer Data is Used"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Customer Data is used only to:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Generate AI agent responses within defined scopes"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Provide access to authorized users"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Support configured workflows and integrations"]})]}),s.jsx("p",{className:"text-white font-semibold text-lg mb-3",children:"Privion does not:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-red-400 mr-3 mt-0.5",children:"•"}),"Use Customer Data to train public or shared AI models"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-red-400 mr-3 mt-0.5",children:"•"}),"Share Customer Data across customers"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-red-400 mr-3 mt-0.5",children:"•"}),"Sell Customer Data"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-red-400 mr-3 mt-0.5",children:"•"}),"Use Customer Data for advertising"]})]}),s.jsx("p",{className:"text-gray-300 text-base mt-6",children:"AI agents operate only on approved knowledge sources defined by the customer."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(Fd,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 4"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Data Isolation and Control"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion is designed to support customer-controlled environments."}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Depending on configuration:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Customer Data may be isolated per organization"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Access may be restricted by role-based permissions"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Data retention and scope are determined by customer settings"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Privion does not expand access to Customer Data beyond customer-defined permissions."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(ur,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 5"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Data Security"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion implements reasonable administrative, technical, and organizational safeguards designed to protect the platform, including:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Encryption in transit and at rest (where applicable)"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Role-based access controls"]}
1578),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Environment-level isolation"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Secure authentication mechanisms"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Security measures vary depending on deployment model and customer configuration."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(Ji,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 6"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Third-Party Services"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Customers may choose to integrate Privion with third-party services, APIs, or systems."}),s.jsx("p",{className:"text-white font-semibold text-lg mb-3",children:"Privion is not responsible for:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Data practices of third-party services"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Content or security of external systems"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Data shared directly with third parties by customers"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Use of third-party services is governed by their respective privacy policies."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(Jwe,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 7"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Cookies and Analytics"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion may use cookies or similar technologies to:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Maintain user sessions"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Improve website functionality"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Understand usage patterns"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"You may adjust browser settings to manage cookies."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(zn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 8"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Data Retention"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion retains information only as long as necessary to:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Provide services"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Meet legal or contractual obligations"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Maintain security and operational integrity"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Customer Data retention depends on customer configurations and usage."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(kX,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 9"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Your Choices"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"You may:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}
1578),"Update account information"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Request account deletion (subject to contractual obligations)"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Manage permissions and access within your organization"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Requests can be made by contacting us at the email below."})]})]})}),s.jsx("div",{className:"mb-6 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(ss,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 10"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Changes to This Policy"}),s.jsx("p",{className:"text-gray-300 text-base",children:"We may update this Privacy Policy from time to time. Updates are effective upon posting. Continued use of the services indicates acceptance of the updated policy."})]})]})}),s.jsx("div",{className:"mb-12 bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(Aa,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 11"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Contact Information"}),s.jsxs("div",{className:"text-gray-300 text-base space-y-2",children:[s.jsx("p",{className:"font-semibold text-white",children:"Privion L.L.C."}),s.jsx("p",{children:"1110 Brickell Ave Suite 430"}),s.jsx("p",{children:"Miami, FL 33131"}),s.jsxs("p",{className:"mt-4",children:["Email: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300 transition-colors",children:"[email protected]"})]})]})]})]})})]}),s.jsx(Cn,{})]})),Tnt=()=>(qt(),s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("div",{className:"absolute top-20 left-2 z-20 sm:top-10 sm:left-4 md:top-20 md:left-8",children:s.jsxs("button",{"aria-label":"Back to Home",type:"button",tabIndex:0,onClick:()=>{window.location.href="/"},className:"flex items-center justify-center bg-transparent border border-white text-gray-300 hover:bg-gradient-to-br hover:from-blue-950/30 hover:to-slate-900/30 hover:border-blue-400/60 hover:text-white transition-all duration-300 text-base px-3 py-2 rounded-lg min-w-0 w-auto active:scale-95 focus:outline-none focus:ring-2 focus:ring-cyber-blue/60 select-none",style:{minWidth:0,fontWeight:500,touchAction:"manipulation"},children:[s.jsx(ai,{className:"h-5 w-5"}),s.jsx("span",{className:"hidden sm:inline ml-2",children:"Back to Home"})]})}),s.jsxs("main",{className:"container mx-auto px-4 pt-20 pb-16 max-w-5xl relative z-10",children:[s.jsxs("div",{className:"text-center mb-28 mt-20",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"w-24 h-24 rounded-xl bg-gradient-to-br from-blue-500/20 to-cyan-500/20 flex items-center justify-center",children:s.jsx(rn,{className:"w-12 h-12 text-blue-400"})})}),s.jsxs("h1",{className:"font-bebas text-5xl font-normal tracking-widest leading-tight",children:[s.jsx("span",{className:"text-white",children:"TERMS OF"}),s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent",children:"SERVICE"})]}),s.jsx("p",{className:"text-gray-400 mt-4 text-base",children:"Last updated: January 15, 2026"})]}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-1",children:"Section 1"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:"Agreement to Terms"}),s.jsx("p",{className:"text-gray-300 text-base",children:'By accessing or using the services provided by Privion L.L.
1578C. ("Privion," "we," "our," or "us"), you agree to be bound by these Terms of Service ("Terms") and our Privacy Policy. If you do not agree to these Terms, you may not use the services.'})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 2"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Services"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion provides a platform for configuring, deploying, and managing AI agents within customer-controlled environments. Our services enable organizations to:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Configure AI agents using approved knowledge sources"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Deploy agents within websites, internal systems, or private infrastructure"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Control access through authentication and role-based permissions"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Integrate with external systems via APIs or webhooks"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Privion does not provide professional, legal, engineering, medical, or compliance advice. AI agent outputs are generated based on customer-provided or customer-authorized data and configurations."}),s.jsx("p",{className:"text-gray-300 text-base mt-4",children:"We may modify, update, or discontinue features of the services at any time."})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 3"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Trials and Evaluation Access"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Privion may offer trial access or limited usage credits for evaluation purposes"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Trial features and usage may be restricted"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),'Trial access is provided "as-is" with no guarantees']}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Privion may suspend or terminate trial access at any time"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Continued use requires an active paid subscription"]})]})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 4"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Eligibility and Accounts"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"You must be at least 18 years old to use the services. You are responsible for:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Maintaining the confidentiality of your account credentials"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"All activity that occurs under your account"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Ensuring authorized users comply with these Terms"]})]})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 5"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Acceptable Use"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"You agree not to use the services to:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Violate any applicable laws or regulations"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Infringe intellectual property or contractual rights"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Attempt to bypass security, access controls, or usage limits"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Misrepresent AI outputs as human-reviewed or authoritative without validation"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"You are solely responsible for the data, documents, and systems you connect to Privi
1578on."})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 6"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Customer Data and Responsibility"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Customers retain ownership of all data, documents, and content they provide or authorize for use with Privion."}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"You are responsible for:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-lg mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Determining what data is appropriate to use with AI agents"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Ensuring you have rights to use licensed or proprietary materials"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Complying with any regulatory or contractual obligations related to your data"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Privion does not independently verify the accuracy, completeness, or regulatory suitability of customer-provided data."})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 7"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Security"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Privion implements reasonable administrative, technical, and organizational safeguards designed to protect the platform, including:"}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base mb-6",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Encryption in transit and at rest (where applicable)"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Role-based access controls"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Environment-level isolation"]})]}),s.jsx("p",{className:"text-gray-300 text-base",children:"Security configurations and deployment models may vary depending on customer setup."})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 8"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Payment and Subscription"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"Subscription fees are billed according to your selected plan and billing cycle."}),s.jsxs("ul",{className:"space-y-2 text-gray-300 text-base",children:[s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Fees are non-refundable except as required by law"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Subscriptions renew automatically unless canceled prior to renew
1578al"]}),s.jsxs("li",{className:"flex items-start",children:[s.jsx("span",{className:"text-blue-400 mr-3 mt-0.5",children:"•"}),"Pricing and plans may change with notice"]})]})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 9"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Limitation of Liability"}),s.jsx("p",{className:"text-gray-300 text-base mb-4",children:"To the maximum extent permitted by law, Privion shall not be liable for indirect, incidental, special, or consequential damages."}),s.jsx("p",{className:"text-gray-300 text-base",children:"Privion's total liability for any claim shall not exceed the fees paid by you to Privion in the three (3) months preceding the claim."})]})]})})}),s.jsx("section",{className:"mb-6",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0 mb-2 sm:mb-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 10"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Changes to Terms"}),s.jsx("p",{className:"text-gray-300 text-base",children:"We may update these Terms from time to time. Continued use of the services after changes are posted constitutes acceptance of the revised Terms."})]})]})})}),s.jsx("section",{className:"mb-12",children:s.jsx("div",{className:"bg-gradient-to-br from-blue-950/30 to-slate-900/30 border border-blue-900/40 rounded-2xl p-8 backdrop-blur-sm transition-all duration-300 hover:bg-gradient-to-br hover:from-blue-950/40 hover:to-slate-900/40 hover:border-blue-500/60 hover:scale-[1.02] shadow-lg shadow-black/20",children:s.jsxs("div",{className:"flex flex-col sm:flex-row items-start gap-2 sm:gap-4 mb-6",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:s.jsx(rn,{className:"w-5 h-5 text-blue-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("p",{className:"text-base text-cyan-400 font-medium mb-2",children:"Section 11"}),s.jsx("h2",{className:"text-xl font-bold text-white mb-6",children:"Contact Information"}),s.jsxs("div",{className:"text-gray-300 text-base space-y-2",children:[s.jsx("p",{className:"font-semibold text-white",children:"Privion L.L.C."}),s.jsx("p",{children:"1110 Brickell Ave Suite 430"}),s.jsx("p",{children:"Miami, FL 33131"}),s.jsxs("p",{className:"mt-4",children:["Email: ",s.jsx("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300 transition-colors",children:"[email protected]"})]})]})]})]})})})]}),s.jsx(Cn,{})]}));var Bi="Accordion",Int=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[t5,Ont,Mnt]=zm(Bi),[VN]=Mr(Bi,[Mnt,JJ]),n5=JJ(),tle=X.forwardRef((e,t)=>{const{type:n,...r}=e,a=r,i=r;return s.jsx(t5.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx($nt,{...i,ref:t}):s.jsx(Lnt,{...a,ref:t})})});tle.displayName=Bi;var[nle,Rnt]=VN(Bi),[rle,Dnt]=VN(Bi,{collapsible:!1}),Lnt=X.forwardRef((e,t)=>
1578{const{value:n,defaultValue:r,onValueChange:a=()=>{},collapsible:i=!1,...o}=e,[l,c]=$s({prop:n,defaultProp:r??"",onChange:a,caller:Bi});return s.jsx(nle,{scope:e.__scopeAccordion,value:X.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:X.useCallback(()=>i&&c(""),[i,c]),children:s.jsx(rle,{scope:e.__scopeAccordion,collapsible:i,children:s.jsx(sle,{...o,ref:t})})})}),$nt=X.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...i}=e,[o,l]=$s({prop:n,defaultProp:r??[],onChange:a,caller:Bi}),c=X.useCallback(d=>l((f=[])=>[...f,d]),[l]),u=X.useCallback(d=>l((f=[])=>f.filter(m=>m!==d)),[l]);return s.jsx(nle,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:s.jsx(rle,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(sle,{...i,ref:t})})})}),[Fnt,WN]=VN(Bi),sle=X.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:a,orientation:i="vertical",...o}=e,l=X.useRef(null),c=gt(l,t),u=Ont(n),f=Md(a)==="ltr",m=Oe(e.onKeyDown,p=>{var O;if(!Int.includes(p.key))return;const v=p.target,y=u().filter(P=>{var R;return!((R=P.ref.current)!=null&&R.disabled)}),x=y.findIndex(P=>P.ref.current===v),w=y.length;if(x===-1)return;p.preventDefault();let N=x;const S=0,_=w-1,k=()=>{N=x+1,N>_&&(N=S)},C=()=>{N=x-1,N<S&&(N=_)};switch(p.key){case"Home":N=S;break;case"End":N=_;break;case"ArrowRight":i==="horizontal"&&(f?k():C());break;case"ArrowDown":i==="vertical"&&k();break;case"ArrowLeft":i==="horizontal"&&(f?C():k());break;case"ArrowUp":i==="vertical"&&C();break}const E=N%w;(O=y[E].ref.current)==null||O.focus()});return s.jsx(Fnt,{scope:n,disabled:r,direction:a,orientation:i,children:s.jsx(t5.Slot,{scope:n,children:s.jsx(Ve.div,{...o,"data-orientation":i,ref:c,onKeyDown:r?void 0:m})})})}),Rj="AccordionItem",[znt,r5]=VN(Rj),ale=X.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...a}=e,i=WN(Rj,n),o=Rnt(Rj,n),l=n5(n),c=na(),u=r&&o.value.includes(r)||!1,d=i.disabled||e.disabled;return s.jsx(znt,{scope:n,open:u,disabled:d,triggerId:c,children:s.jsx(nee,{"data-orientation":i.orientation,"data-state":dle(u),...l,...a,ref:t,disabled:d,open:u,onOpenChange:f=>{f?o.onItemOpen(r):o.onItemClose(r)}})})});ale.displayName=Rj;var ile="AccordionHeader",ole=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=WN(Bi,n),i=r5(ile,n);return s.jsx(Ve.h3,{"data-orientation":a.orientation,"data-state":dle(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:t})});ole.displayName=ile;var QI="AccordionTrigger",lle=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=WN(Bi,n),i=r5(QI,n),o=Dnt(QI,n),l=n5(n);return s.jsx(t5.ItemSlot,{scope:n,children:s.jsx(QAe,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":a.orientation,id:i.triggerId,...l,...r,ref:t})})});lle.displayName=QI;var cle="AccordionContent",ule=X.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,a=WN(Bi,n),i=r5(cle,n),o=n5(n);return s.jsx(ZAe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":a.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ule.displayName=cle;function dle(e){return e?"open":"closed"}var Bnt=tle,Unt=ale,Hnt=ole,fle=lle,hle=ule;const qnt=Bnt,mle=b.forwardRef(({className:e,...t},n)=>s.jsx(Unt,{ref:n,className:He("border-b",e),...t}));mle.displayName="AccordionItem";const ple=b.forwardRef(({className:e,children:t,...n},r)=>s.jsx(Hnt,{className:"flex",children:s.jsxs(fle,{ref:r,className:He("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(po,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));ple.displayName=fle.displayName;const gle=b.forwardRef(({className:e,children:t,...n},r)=>s.jsx(hle,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:He("pb-4 pt-0",e),children:t})}));gle.displayName=hle.displayName;const ec={mobile:768,tablet:1024},Vnt=()=>{const[e,t]=b.useState(()=>{if(typeof window>"u")return{isMobile:!1,isTablet:!1,isDesktop:!0,screenWidth:1920,screenHeight:1080,orientation:"landscape",isTouch:!1};const n=window.innerWidth,r=window.innerHeight,a=n<ec.mobile,i=n>=ec.mobile&&n<ec.tablet,o=n>=ec.tablet,l=n>r?"landscape":"portrait",c="ontouchstart"in window||navigator.maxTouchPoints>0;return{isMobile:a,isTablet:i,isDesktop:o,screenWidth:n,screenHeight:r,orientation:l,isTouch:c}
1578});return b.useEffect(()=>{const n=()=>{const i=window.innerWidth,o=window.innerHeight,l=i<ec.mobile,c=i>=ec.mobile&&i<ec.tablet,u=i>=ec.tablet,d=i>o?"landscape":"portrait",f="ontouchstart"in window||navigator.maxTouchPoints>0;t({isMobile:l,isTablet:c,isDesktop:u,screenWidth:i,screenHeight:o,orientation:d,isTouch:f})};let r;const a=()=>{clearTimeout(r),r=setTimeout(n,100)};return window.addEventListener("resize",a),window.addEventListener("orientationchange",a),n(),()=>{window.removeEventListener("resize",a),window.removeEventListener("orientationchange",a),clearTimeout(r)}},[]),e},Wnt=()=>{const[e,t]=b.useState(""),[n,r]=b.useState(!1),[a,i]=b.useState(!1),{isMobile:o,isTablet:l}=Vnt(),c=v=>({"cyber-blue":"text-cyber-blue","electric-blue":"text-electric-blue","neon-cyan":"text-neon-cyan","neon-blue":"text-neon-blue","cyber-electric":"text-cyber-electric"})[v]||"text-cyber-blue",u={general:{title:"General",icon:s.jsx(gX,{className:"h-5 w-5"}),color:"cyber-blue",questions:[{question:"What is Privion?",answer:"Privion is a private, no-code AI agent builder. You can create agents using your own knowledge sources (documents, SOPs, websites, videos, etc.) and deploy them on websites, apps, or internal tools. Privion agents are fully white-labeled and can orchestrate with popular apps. Every interaction is logged, so you can download a CSV, review conversations, and improve prompts over time."},{question:"How does Privion work?",answer:"Just open the Agent Builder, walk through the setup, give your agent an identity, connect your knowledge sources, and deploy—no coding required."},{question:"Who is Privion for?",answer:"Privion is designed for higher education, government, healthcare, businesses, and anyone who needs a specialized, controlled AI agent. Unlike general-purpose tools (like ChatGPT), Privion allows you to add guardrails and tailor the agent to your industry or business needs."},{question:"Do I need coding skills to use Privion?",answer:"No. Privion is a 100% no-code platform. Just type your prompts and connect your sources."}]},features:{title:"Features",icon:s.jsx(Ot,{className:"h-5 w-5"}),color:"electric-blue",questions:[{question:"What makes Privion different from other AI tools?",answer:"Unlike ChatGPT or Claude, Privion is fully white-labeled and personalized. You control the prompts, connect private/internal knowledge sources, and set boundaries so the agent stays within your application."},{question:"What is a Privion Agent?",answer:"A Privion Agent is your custom-built AI that follows your rules, knowledge, and branding."},{question:"Can Privion integrate with my existing systems?",answer:'Yes. Privion can be deployed as a standalone website, embedded as a widget on your site, and soon will include integrations with popular apps like Slack, Google Drive, and more through MCPs (Model Context Protocols). Think of MCPs as a "USB for AI agents," enabling seamless plug-and-play connections.'},{question:"How does Privion handle private/secure deployments?",answer:`Privion is built for organizations that require strict data protection. You can deploy agents in:
1579
1580• Private Cloud – Hosted in your secure VPC with full data control.
1581• Hybrid – Sensitive context stays local, while inference runs in the cloud for performance.
1582• On-Premise (Air-Gapped) – Fully offline deployment for maximum security and compliance.
1583
1584For private LLM applications, we leverage Llama-based models so your data never leaves your environment. For our starter plans that don't require strict data protection, we use trusted hosted LLMs like ChatGPT and Claude, which allow customers to start quickly at lower cost.
1585
1586All deployments ensure that data and interactions remain under your control — Privion never shares or sells your information.`},{question:"Does Privion support multiple languages?",answer:"Currently English and Spanish. Upon request we can support other languages too."}]},pricing:{title:"Pricing & Plans",icon:s.jsx(Rs,{className:"h-5 w-5"}),color:"neon-cyan",questions:[{question:"How much does Privion cost?",answer:"Please see our Pricing Page for detailed information about our plans and pricing tiers."},{question:"Do you offer a free trial?",answer:"Yes. You can create 1 free agent to try the platform."},{question:"Do you offer enterprise or volume pricing?",answer:"Yes, custom pricing is available for institutions and large organizations."},{question:"What is included in each pricing tier?",answer:"See our Pricing Page for details on what's included in each plan."}]},gettingStarted:{title:"Getting Started",icon:s.jsx(Kt,{className:"h-5 w-5"}),color:"neon-blue",questions:[{question:"How do I sign up for Privion?",answer:"Simply book a call and let us help you create your first agent."},{question:"How long does setup take?",answer:"On average, under 5 minutes."},{question:"What kind of support do you provide during onboarding?",answer:"We help you create your first agent so you can launch quickly."},{question:"Can I train my own custom AI agent?",answer:"Yes. You can continuously refine your agent by updating prompts and adding knowledge sources."}]},support:{title:"Support & Troubleshooting",icon:s.jsx(Ko,{className:"h-5 w-5"}),color:"electric-blue",questions:[{question:"What if Privion doesn't understand a question?",answer:"If an agent doesn't fully understand, you can refine the prompt or expand the knowledge sources it draws from. A useful tip is to copy and paste the response back into the prompt to fine-tune its instructions. The more data and interactions you provide, the smarter and more accurate your agent becomes over time."},{question:"How do I update or retrain my Privion Agent?",answer:"Go to the Agent Builder and edit the setup at any time."},{question:"How can I escalate issues to a human?",answer:"Please book a call with us."},{question:"Where can I find the changelog and updates?",answer:"We publish updates directly on our site."}]}},d=Object.entries(u).reduce((v,[y,x])=>{if(!e)return{...v,[y]:x};const w=x.questions.filter(N=>N.question.toLowerCase().includes(e.toLowerCase())||N.answer.toLowerCase().includes(e.toLowerCase()));return w.length>0&&(v[y]={...x,questions:w}),v},{}),f=()=>{window.scrollTo({top:0,behavior:"smooth"})},m=()=>{r(window.scrollY>400)};b.useEffect(()=>(window.addEventListener("scroll",m),()=>window.removeEventListener("scroll",m)),[]);const p=()=>{i(!0)};return s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-2 h-2 bg-neon-blue/30 rounded-full floating"}),s.jsx("div",{className:"absolute top-3/4 right-1/4 w-1 h-1 bg-electric-blue/40 rounded-full floating stagger-delay-1"}),s.jsx("div",{className:"absolute top-1/2 left-3/4 w-1.5 h-1.5 bg-neon-cyan/20 rounded-full floating stagger-delay-2"})]}),s.jsx(xn,{}),s.jsxs("main",{className:"relative z-10 pt-20",children:[s.jsx("section",{className:"py-12 sm:py-16 lg:py-20 px-4 sm:px-6 lg:px-8",children:s.jsx("div",{className:"max-w-4xl mx-auto text-center",children:s.jsxs("div",{className:"space-y-6 sm:space-y-8",children:[s.jsxs("h1",{className:"font-bebas mobile-h1 sm:text-5xl lg:text-6xl xl:text-7xl font-normal text-white leading-tight tracking-widest",children:["FREQUENTLY",s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent animate-[cyberGradientShift_6s_ease-in-out_infinite]",children:"ASKED"}),s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-neon-blue via-neon-cyan to-electric-blue bg-clip-text text-transparent animate-[cyberGradientShift_6s_ease-in-out_infinite_reverse]",children:"QUESTIONS"})]}),s.jsx("p",{className:"mobile-body sm:text-xl lg:text-2xl text-gray-300 max-w-2xl mx-auto font-light leading-relaxed",children:"Get answers to common questions about Privion AI agents"}),s.jsx("div",{className:"max-w-2xl mx-auto",children:s.jsxs("div",{className:"relative",children:[s.jsx(Fh,{className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),s.jsx(_e,{type:"text",placeholder:"Search FAQ...",value:e,onCh
1586ange:v=>t(v.target.value),className:"mobile-touch-target pl-12 pr-4 text-base sm:text-lg bg-white/10 border-cyber-blue/30 text-white placeholder:text-gray-400 focus:border-electric-blue/50 focus:ring-electric-blue/30 rounded-xl shadow-lg"})]})})]})})}),s.jsx("section",{className:"pb-12 sm:pb-16 lg:pb-20 px-4 sm:px-6 lg:px-8",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[!e&&s.jsx("div",{className:"mb-8 sm:mb-12",children:s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-4",children:Object.entries(u).map(([v,y])=>s.jsx("div",{},v))})}),s.jsx("div",{className:"space-y-8 sm:space-y-12",children:Object.entries(d).map(([v,y])=>s.jsx("div",{id:`category-${v}`,className:"scroll-mt-24",children:s.jsxs(te,{className:"bg-white/10 border border-white/10 hover:border-primary/20 transition-all duration-500",children:[s.jsx(xe,{className:"pb-4",children:s.jsxs(we,{className:"flex flex-col sm:flex-row sm:items-center gap-3 mobile-h2 sm:text-3xl text-white",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:`${c(y.color)} p-2 rounded-lg bg-white/10`,children:y.icon}),y.title]}),s.jsxs("span",{className:"text-sm text-gray-400 font-normal sm:ml-auto",children:["(",y.questions.length," ",y.questions.length===1?"question":"questions",")"]})]})}),s.jsx(se,{children:s.jsx(qnt,{type:"single",collapsible:!0,className:"space-y-3",children:y.questions.map((x,w)=>s.jsxs(mle,{value:`${v}-${w}`,className:"border border-white/10 rounded-lg bg-white/5 hover:bg-white/10 transition-colors duration-300",children:[s.jsx(ple,{className:"mobile-touch-target px-4 sm:px-6 py-4 text-left hover:no-underline group",children:s.jsxs("div",{className:"flex items-start gap-3 text-left w-full",children:[s.jsx(ao,{className:"h-4 w-4 mt-1 text-primary shrink-0 transition-transform duration-200 group-data-[state=open]:rotate-90"}),s.jsx("span",{className:"mobile-body sm:text-lg font-medium text-white leading-relaxed text-left",children:x.question})]})}),s.jsx(gle,{className:"px-4 sm:px-6 pb-4",children:s.jsx("div",{className:"ml-7 text-gray-300 mobile-body leading-relaxed whitespace-pre-line",children:x.answer})})]},w))})})]})},v))}),e&&Object.keys(d).length===0&&s.jsx("div",{className:"text-center py-12",children:s.jsx(te,{className:"max-w-md mx-auto bg-white/10 border-white/10",children:s.jsxs(se,{className:"p-8",children:[s.jsx(Fh,{className:"h-12 w-12 text-gray-400 mx-auto mb-4"}),s.jsx("h3",{className:"mobile-h3 text-white mb-2",children:"No results found"}),s.jsx("p",{className:"text-gray-400 mb-4",children:"Try different keywords or browse our categories above"}),s.jsx(Y,{variant:"outline",onClick:()=>t(""),className:"border-primary/30 text-primary hover:bg-primary/10",children:"Clear search"})]})})}),s.jsx("div",{className:"mt-12 sm:mt-16",children:s.jsx(te,{className:"bg-black/20 backdrop-blur-sm border border-cyber-blue/20 hover:border-cyber-blue/40 transition-all duration-300",children:s.jsxs(se,{className:"p-8 sm:p-10 text-center",children:[s.jsx("div",{className:"flex justify-center mb-6",children:s.jsx("div",{className:"p-4 rounded-full bg-gradient-to-r from-cyber-blue/20 to-electric-blue/20 border border-cyber-blue/30",children:s.jsx(Mc,{className:"h-8 w-8 text-cyber-blue"})})}),s.jsxs("h3",{className:"mobile-h2 sm:text-4xl lg:text-5xl text-white mb-6 font-bebas tracking-wider",children:["STILL HAVE",s.jsx("br",{}),s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent",children:"QUESTIONS?"})]}),s.jsx("p",{className:"mobile-body sm:text-lg text-white/90 mb-8 max-w-2xl mx-auto leading-relaxed",children:"Our team is here to help you build the perfect AI agent. Book a call with our experts for personalized assistance and guidance."}),s.jsxs(Y,{onClick:p,className:"mobile-btn-primary glow-button text-lg px-8 py-4 h-14",children:[s.jsx(Mc,{className:"h-5 w-5 mr-3"}),"Book Your Free Call"]})]})})})]})})]}),n&&s.jsx(Y,{onClick:f,className:"fixed bottom-6 right-6 z-50 mobile-touch-target rounded-full bg-gradient-to-r from-cyber-blue to-electric-blue text-white shadow-lg hover:shadow-xl transition-all duration-300 hover:scale-110",size:"icon",children:s.jsx(aX,{className:"h-5 w-5"})}),s.jsx(Cn,{}),s.jsx(Uc,{isOpen:a,onClose:()=>i(!1)})]})},Gnt=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",Knt=()=>{const[e,t]=b.useState(""),[n,r]=b.useState(""),[a,i]=b.useState(""),[o,l]=b.useState(""),[c,u]=b.useState(!1),[d,f]=b.useState(!1),[m,p]=b.useState(!1),[v,y]=b.useState(!1),[x,w]=b.useState(""),[N,S]=b.useState(!1),[_,k]=b.useState(null),[C,E]=b.useState(!1),[O,P]=b.useState(null),[R,T]=b.useState(""),[D,z]=b.useState("loading"),[I,F]=b.useState(null),U=b.useRef(null),[H,q]=b.useState(""),[B,L]=b.useState("loading"),[V,K]=b.useState(null),W=b.useRef(null),{toast:ie}=_t(),ve=qt(),[ge]=$m(),J=ge.get("agentId"),ne=ge.get("agentName"),Z=ge.get("returnUrl"),oe=(Ue,wt={})=>{const At=new URLSearchParams;Z&&At.set("returnUrl",Z),J&&At.set("agentId",J),ne&&At.set("agentName",ne),Object.entries(wt).forEach(([vn,ye])=>{ye&&At.set(vn,ye)});const cn=At.toString();return cn?`${Ue}?${cn}`:Ue},he=oe("/login"),Q=oe("/login",{verified:"true"}),ae=oe("/resend-verification"),fe="pendingRegistration",Re=(Ue=>Ue.length===0?{strength:0,label:"",color:""}:Ue.length<8?{strength:1,label:"Weak",color:"text-red-500"}:Ue.length<12?{strength:2,label:"Medium",color:"text-yellow-500"}:Ue.length>=12&&/[A-Z]/.test(Ue)&&/[a-z]/.test(Ue)&&/[0-9]/.test(Ue)&&/[^A-Za-z0-9]/.test(Ue)?{strength:4,label:"Strong",color:"text-green-500"}:{strength:3,label:"Good",color:"text-blue-500"})(a),qe=a===o&&o.length>0,St=Ue=>Ue.replace(/\D/g,"").slice(0,6);b.useEffect(()=>{(async()=>
1586{if(!J){P(null);return}const wt=Number(J);if(Number.isNaN(wt)){P(null);return}try{const At=await Pt.getPublicAgent(wt),cn=Gnt(At.logo);P(cn||null)}catch(At){console.error("Failed to fetch public agent logo:",At),P(null)}})()},[J]),b.useEffect(()=>{try{const Ue=sessionStorage.getItem(fe);if(Ue){const wt=JSON.parse(Ue);wt!=null&&wt.email&&(r(wt.email),y(!0))}}catch(Ue){console.error("Failed to restore registration state:",Ue),sessionStorage.removeItem(fe)}},[]);const Ut=async Ue=>{var wt,At,cn,vn;if(Ue.preventDefault(),F(null),!R){F({text:"CAPTCHA not completed. Please complete the CAPTCHA to register.",type:"warning"});return}if(a!==o){ie({title:"Passwords don't match",description:"Please make sure both passwords are the same.",variant:"destructive"});return}if(a.length<8){ie({title:"Password too short",description:"Password must be at least 8 characters long.",variant:"destructive"});return}p(!0);try{const ye=e.trim().split(" "),Ae=ye[0],st=ye.slice(1).join(" ");await qn.register({email:n,password:a,first_name:Ae,last_name:st||void 0,turnstile_token:R}),sessionStorage.setItem(fe,JSON.stringify({email:n})),y(!0),ie({title:"Registration successful!",description:"Please check your email for the verification code."}),(wt=U.current)==null||wt.reset(),T(""),z("loading"),F(null)}catch(ye){console.error("Registration error:",ye);const Ae=(ye==null?void 0:ye.message)||((cn=(At=ye==null?void 0:ye.response)==null?void 0:At.data)==null?void 0:cn.message)||"Failed to register. Please try again.";ie({title:"Registration failed",description:Ae.includes("already exists")?"A user with this email already exists. Please sign in or resend verification if you haven't verified yet.":Ae,variant:"destructive"}),(vn=U.current)==null||vn.reset(),T(""),z("loading")}finally{p(!1)}},Yt=async Ue=>{var wt,At,cn,vn;if(Ue.preventDefault(),K(null),!H){K({text:"CAPTCHA not completed. Please complete the CAPTCHA to verify.",type:"warning"});return}if(x.length!==6){ie({title:"Verification code required",description:"Enter the 6-digit code sent to your email.",variant:"destructive"});return}S(!0);try{await qn.verifyEmail({email:n.trim(),code:x,turnstile_token:H}),E(!0),sessionStorage.removeItem(fe),ie({title:"Email verified!",description:"Your account has been verified. You can now sign in."}),(wt=W.current)==null||wt.reset(),q(""),L("loading"),setTimeout(()=>{ve(Q)},2e3)}catch(ye){console.error("Verification error:",ye);const Ae=(ye==null?void 0:ye.message)||((cn=(At=ye==null?void 0:ye.response)==null?void 0:At.data)==null?void 0:cn.message)||"Invalid or expired verification code.";k(Ae),ie({title:"Verification failed",description:Ae,variant:"destructive"}),(vn=W.current)==null||vn.reset(),q(""),L("loading")}finally{S(!1)}};return v?s.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-900 via-indigo-950 to-slate-900 p-4 text-white",children:[s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-blue-500/20 via-transparent to-transparent pointer-events-none"}),s.jsx(te,{className:"w-full max-w-md bg-white/5 border-white/10 backdrop-blur-sm relative z-10 shadow-2xl",children:s.jsx(se,{className:"pt-8 pb-8",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"rounded-full bg-green-900/30 p-4 border border-green-500/20",children:s.jsx(Sc,{className:"h-12 w-12 text-green-400"})})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-bebas tracking-wide mb-3 text-white",children:"Check your email"}),s.jsxs("p",{className:"text-gray-400 mb-4 text-lg",children:["We've sent a 6-digit verification code to ",s.jsx("strong",{className:"text-white",children:n})]}),s.jsx("p",{className:"text-sm text-gray-500",children:"Enter the code within 60 minutes to activate your account."})]}),C?s.jsxs("div",{className:"pt-4 space-y-4",children:[s.jsx("p",{className:"text-sm text-green-400 font-medium",children:"Your email is verified. Redirecting to login..."}),s.jsx(Y,{onClick:()=>ve(Q),className:"w-full h-12 bg-green-600 hover:bg-green-500 text-white font-medium text-lg",children:"Go to Login"})]}):s.jsxs("div",{className:"pt-4 space-y-4 text-left",children:[_&&s.jsx("p",{className:"text-sm text-red-400 bg-red-900/20 p-3 rounded border border-red-900/50 text-center",children:_}),s.jsxs("form",{onSubmit:Yt,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"verificationCode",className:"text-gray-300",children:"Verification code"}),s.jsx(_e,{id:"verificationCode",type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"123456",value:x,onChange:Ue=>w(St(Ue.target.value)),className:"text-center tracking-[0.5em] text-2xl h-14 bg-black/20 border-white/10 text-white placeholder:text-gray-500 focus:border-blue-500/50 focus:ring-blue-500/20",maxLength:6,required:!0}),s.jsx("p",{className:"text-xs text-gray-500 text-center",children:"Codes expire after 60 minutes."})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2 my-4",children:[s.jsx(zh,{ref:W,siteKey:"0x4AAAAAACd8BHWKs0K2ODll",onLoad:()=>{console.log("Verification CAPTCHA loaded"),L("ready")},onSuccess:Ue=>{console.log("Verification CAPTCHA success"),q(Ue),L("ready"),K(null)},onError:()=>{var Ue;console.error("Verification CAPTCHA error"),L("error"),q(""),(Ue=W.current)==null||Ue.reset(),K({text:"CAPTCHA verification failed. Please refresh the page.",type:"error"})},onExpire:()=>{console.log("Verification CAPTCHA expired"),q(""),K({text:"CAPTCHA expired. Please complete it again.",type:"warning"})},options:{theme:"auto"}}),s.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${B==="ready"&&H?"bg-green-500":B==="error"?"bg-red-500":"bg-yellow-500 animate-pulse"}`}),s.jsx("span",{children:B==="ready"&&H?"CAPTCHA verified":B==="error"?"CAPTCHA unavailable":"CAPTCHA loading..."})]})]}),V&&s.jsx("div",{className:`text-sm font-medium ${V.type==="warning"?"text-yellow-600":"text-red-500"}`,children:V.text}),s.jsxs(Y,{type:"submit",className:"w-full h-12 bg-blue-600 hover:bg-blue-500 text-white font-medium text-lg shadow-lg shadow-blue-900/20",disabled:N||B!=="ready"||!H,children:[N&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Verify Email"]})]}),s.jsxs("div",{className:"space-y-3 text-center pt-2",children:[s.jsx(Y,{onClick:()=>ve(ae),variant:"ghost",className:"w-full text-gray-400 hover:text-white hover:bg-white/5",children:"Resend Verification Code"}),s.jsx(Y,{onClick:()=>{sessionStorage.removeItem(fe),ve("/")},variant:"ghost",className:"w-full text-gray-400 hover:text-white hover:bg-white/5",children:"Go to Home"})]})]})]})})})]}):s.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-900 via-indigo-950 to-slate-900 p-4 text-white",children:[s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-blue-500/20 via-trans
1586parent to-transparent pointer-events-none"}),s.jsxs(te,{className:"w-full max-w-md bg-white/5 border-white/10 backdrop-blur-sm relative z-10 shadow-2xl",children:[s.jsxs(xe,{className:"space-y-3 pb-8",children:[O&&s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"h-20 w-20 rounded-full bg-white/10 border border-white/20 shadow-sm flex items-center justify-center overflow-hidden",children:s.jsx("img",{src:O,alt:"Agent logo",className:"h-14 w-14 object-contain"})})}),s.jsx(we,{className:"text-4xl font-bebas text-center tracking-wider text-white",children:ne?`JOIN ${ne.toUpperCase()}`:"CREATE YOUR PRIVION WORKSPACE"}),s.jsx(nt,{className:"text-center text-gray-400 text-lg",children:ne?`Create an account to access ${ne}.`:"Start building your first private AI agent."})]}),s.jsxs(se,{children:[s.jsxs("form",{onSubmit:Ut,className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"name",className:"text-gray-300",children:"Name"}),s.jsxs("div",{className:"relative",children:[s.jsx(li,{className:"absolute left-3 top-3.5 h-4 w-4 text-gray-500"}),s.jsx(_e,{id:"name",placeholder:"Full Name",value:e,onChange:Ue=>t(Ue.target.value),className:"pl-10 bg-black/20 border-white/10 text-white placeholder:text-gray-400 focus:border-blue-500/50 focus:ring-blue-500/20 h-12",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",className:"text-gray-300",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3.5 h-4 w-4 text-gray-500"}),s.jsx(_e,{id:"email",type:"email",placeholder:"Enter your email",value:n,onChange:Ue=>r(Ue.target.value.toLowerCase()),className:"pl-10 bg-black/20 border-white/10 text-white placeholder:text-gray-400 focus:border-blue-500/50 focus:ring-blue-500/20 h-12",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"password",className:"text-gray-300",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ur,{className:"absolute left-3 top-3.5 h-4 w-4 text-gray-500"}),s.jsx(_e,{id:"password",type:c?"text":"password",placeholder:"Create a password",value:a,onChange:Ue=>i(Ue.target.value),className:"pl-10 pr-10 bg-black/20 border-white/10 text-white placeholder:text-gray-400 focus:border-blue-500/50 focus:ring-blue-500/20 h-12",required:!0,minLength:8}),s.jsx("button",{type:"button",onClick:()=>u(!c),className:"absolute right-3 top-3.5 text-gray-500 hover:text-gray-300",children:c?s.jsx(Lh,{className:"h-4 w-4"}):s.jsx(pr,{className:"h-4 w-4"})})]}),a.length>0&&s.jsxs("div",{className:"flex items-center gap-2 text-sm mt-1",children:[s.jsx("span",{className:Re.color,children:Re.label}),a.length>=8&&s.jsx("span",{className:"text-green-500",children:s.jsx(Sc,{className:"h-3 w-3 inline"})})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"confirmPassword",className:"text-gray-300",children:"Confirm Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ur,{className:"absolute left-3 top-3.5 h-4 w-4 text-gray-500"}),s.jsx(_e,{id:"confirmPassword",type:d?"text":"password",placeholder:"Confirm your password",value:o,onChange:Ue=>l(Ue.target.value),className:"pl-10 pr-10 bg-black/20 border-white/10 text-white placeholder:text-gray-400 focus:border-blue-500/50 focus:ring-blue-500/20 h-12",required:!0}),s.jsx("button",{type:"button",onClick:()=>f(!d),className:"absolute right-3 top-3.5 text-gray-500 hover:text-gray-300",children:d?s.jsx(Lh,{className:"h-4 w-4"}):s.jsx(pr,{className:"h-4 w-4"})})]}),o.length>0&&s.jsx("div",{className:"flex items-center gap-2 text-sm mt-1",children:qe?s.jsxs("span",{className:"text-green-500 flex items-center gap-1",children:[s.jsx(Sc,{className:"h-3 w-3"}),"Passwords match"]}):s.jsxs("span",{className:"text-red-500 flex items-center gap-1",children:[s.jsx(Ay,{className:"h-3 w-3"}),"Passwords don't match"]})})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2 my-4",children:[s.jsx(zh,{ref:U,siteKey:"0x4AAAAAACd8BHWKs0K2ODll",onLoad:()=>{console.log("Registration CAPTCHA loaded"),z("ready")},onSuccess:Ue=>{console.log("Registration CAPTCHA success"),T(Ue),z("ready"),F(null)},onError:()=>{var Ue;console.error("Registration CAPTCHA error"),z("error"),T(""),(Ue=U.current)==null||Ue.reset(),F({text:"CAPTCHA verification failed. Please refresh the page.",type:"error"})},onExpire:()=>{console.log("Registration CAPTCHA expired"),T(""),F({text:"CAPTCHA expired. Please complete it again.",type:"warning"})},options:{theme:"auto"}}),s.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${D==="ready"&&R?"bg-green-500":D==="error"?"bg-red-500":"bg-yellow-500 animate-pulse"}`}),s.jsx("span",{children:D==="ready"&&R?"CAPTCHA verified":D==="error"?"CAPTCHA unavailable":"CAPTCHA loading..."})]})]}),I&&s.jsx("div",{className:`text-sm font-medium ${I.type==="warning"?"text-yellow-600":"text-red-500"}`,children:I.text}),s.jsxs(Y,{type:"submit",className:"w-full h-12 bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-500 hover:to-indigo-500 text-white text-lg font-medium transition-all duration-300 shadow-lg shadow-blue-900/20",disabled:m||!qe||a.length<8||D!=="ready"||!R,children:[m&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Create Account"]})]}),s.jsxs("div",{className:"mt-8 text-center space-y-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm text-gray-400",children:"Already have an account? "}),s.jsx(Vn,{to:he,className:"text-sm text-blue-400 hover:text-blue-300 hover:underline",children:"Sign in"})]}),s.jsx("div",{children:s.jsx(Vn,{to:ae,className:"text-sm text-gray-500 hover:text-gray-400",children:"Resend verification code"})})]})]})]})]})},Ynt=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",Xnt=()=>{const[e,t]=b.useState(""),[n,r]=b.useState(""),[a,i]=b.useState(!1),[o,l]=b.useState(!1),[c,u]=b.useState(!1),[d,f]=b.useState(""),[m,p]=b.useState("loading"),[v,y]=b.useState(null),x=b.useRef(null),{signIn:w}=nr(),{toast:N}=_t(),S=qt(),[_]=$m(),k=_.get("verified")==="true",C=_.get("agentId"),E=_.get("returnUrl"),O=_.get("agentName"),[P,R]=b.useState(null),T=X.useMemo(()=>{const I=new URLSearchParams;E&&I.set("returnUrl",E),C&&I.set("agentId",C),O&&I.set("agentName",O);const F=I.toString();return F?`/register?${F}`:"/register"},[E,C,O]),D=()=>
1586{if(E)return E;const I=sessionStorage.getItem("authReturnUrl");return I?(sessionStorage.removeItem("authReturnUrl"),I):"/dashboard"};b.useEffect(()=>{k&&N({title:"Email verified!",description:"Your account has been verified. You can now sign in."})},[k,N]),b.useEffect(()=>{(async()=>{if(!C){R(null);return}const F=Number(C);if(Number.isNaN(F)){R(null);return}try{const U=await Pt.getPublicAgent(F),H=Ynt(U.logo);R(H||null)}catch(U){console.error("Failed to fetch public agent logo:",U),R(null)}})()},[C]);const z=async I=>{var F,U,H;if(I.preventDefault(),y(null),!d){y({text:"CAPTCHA not completed. Your login may be flagged as suspicious.",type:"warning"});return}l(!0);try{if(await w(e,n,d)){N({title:"Welcome back!",description:"You've successfully signed in to your account."});const B=D();S(B),(F=x.current)==null||F.reset(),f(""),p("loading"),y(null)}else N({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"}),(U=x.current)==null||U.reset(),f(""),p("loading")}catch{N({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"}),(H=x.current)==null||H.reset(),f(""),p("loading")}finally{l(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 p-4",children:s.jsxs(te,{className:"w-full max-w-md",children:[s.jsxs(xe,{children:[P&&s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"h-16 w-16 rounded-full bg-white/80 dark:bg-gray-900/60 border border-gray-200 dark:border-gray-800 shadow-sm flex items-center justify-center overflow-hidden",children:s.jsx("img",{src:P,alt:"Agent logo",className:"h-10 w-10 object-contain"})})}),s.jsx(we,{className:"text-2xl font-bold text-center",children:"Sign In to Privion"}),s.jsx(nt,{className:"text-center",children:"Access your agents and manage your account"})]}),s.jsxs(se,{children:[k&&s.jsxs(ti,{className:"mb-4",children:[s.jsx(Sc,{className:"h-4 w-4"}),s.jsx(ni,{children:"Your email has been verified. Please sign in to continue."})]}),s.jsxs("form",{onSubmit:z,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"email",type:"email",placeholder:"Enter your email",value:e,onChange:I=>t(I.target.value.toLowerCase()),className:"pl-10",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ur,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"password",type:a?"text":"password",placeholder:"Enter your password",value:n,onChange:I=>r(I.target.value),className:"pl-10 pr-10",required:!0}),s.jsx("button",{type:"button",onClick:()=>i(!a),className:"absolute right-3 top-3 text-gray-400 hover:text-gray-600",children:a?s.jsx(Lh,{className:"h-4 w-4"}):s.jsx(pr,{className:"h-4 w-4"})})]})]}),s.jsxs("div",{className:"flex flex-col items-center gap-2 my-4",children:[s.jsx(zh,{ref:x,siteKey:"0x4AAAAAACd8BHWKs0K2ODll",onLoad:()=>{console.log("CAPTCHA loaded"),p("ready")},onSuccess:I=>{console.log("CAPTCHA success"),f(I),p("ready"),y(null)},onError:()=>{var I;console.error("CAPTCHA error"),p("error"),f(""),(I=x.current)==null||I.reset(),y({text:"CAPTCHA verification failed. Please refresh the page.",type:"error"})},onExpire:()=>{console.log("CAPTCHA expired"),f(""),y({text:"CAPTCHA expired. Please complete it again.",type:"warning"})},options:{theme:"auto"}}),s.jsxs("div",{className:"text-xs text-gray-400 flex items-center gap-1",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${m==="ready"&&d?"bg-green-500":m==="error"?"bg-red-500":"bg-yellow-500 animate-pulse"}`}),s.jsx("span",{children:m==="ready"&&d?"CAPTCHA verified":m==="error"?"CAPTCHA unavailable":"CAPTCHA loading..."})]})]}),v&&s.jsx("div",{className:`text-sm font-medium ${v.type==="warning"?"text-yellow-600":"text-red-500"}`,children:v.text}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("input",{type:"checkbox",id:"remember",checked:c,onChange:I=>u(I.target.checked),className:"rounded border-gray-300"}),s.jsx(de,{htmlFor:"remember",className:"text-sm",children:"Remember me"})]}),s.jsx(Y,{variant:"link",className:"text-sm p-0",children:"Forgot password?"})]}),s.jsxs(Y,{type:"submit",className:"w-full",disabled:o||m!=="ready"||!d,children:[o&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Sign In"]})]}),s.jsxs("div",{className:"mt-6 text-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Don't have an account? "}),s.jsx(Vn,{to:T,className:"text-sm text-primary hover:underline",children:"Sign up"})]})]})]})})},Qnt=()=>{const[e,t]=b.useState(""),[n,r]=b.useState(""),[a,i]=b.useState(!1),[o,l]=b.useState(!1),[c,u]=b.useState(null),{toast:d}=_t(),f=qt(),[m]=$m(),p=m.get("returnUrl"),v=p?`/login?verified=true&returnUrl=${encodeURIComponent(p)}`:"/login?verified=true",y=w=>w.replace(/\D/g,"").slice(0,6),x=async w=>{var S,_;w.preventDefault(),u(null);const N=e.trim();if(!N){d({title:"Email required",description:"Please enter your email address.",variant:"destructive"});return}if(n.length!==6){d({title:"Verification code required",description:"Enter the 6-digit code sent to your email.",variant:"destructive"});return}i(!0);
1586try{await qn.verifyEmail({email:N,code:n,turnstile_token:""}),l(!0),d({title:"Email verified!",description:"Your account has been verified. You can now sign in."}),setTimeout(()=>{f(v)},2e3)}catch(k){console.error("Verification error:",k);const C=(k==null?void 0:k.message)||((_=(S=k==null?void 0:k.response)==null?void 0:S.data)==null?void 0:_.message)||"Invalid or expired verification code.";u(C),d({title:"Verification failed",description:C,variant:"destructive"})}finally{i(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 p-4",children:s.jsxs(te,{className:"w-full max-w-md",children:[s.jsxs(xe,{children:[s.jsx(we,{className:"text-2xl font-bold text-center",children:"Email Verification"}),s.jsx(nt,{className:"text-center",children:o?"Email verified successfully!":"Enter the 6-digit code sent to your email"})]}),s.jsxs(se,{className:"space-y-4",children:[o&&s.jsxs("div",{className:"text-center py-8 space-y-4",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"rounded-full bg-green-100 dark:bg-green-900/30 p-3",children:s.jsx(Sc,{className:"h-12 w-12 text-green-600 dark:text-green-400"})})}),s.jsxs("div",{children:[s.jsx("h3",{className:"text-lg font-semibold mb-2",children:"Email Verified!"}),s.jsx("p",{className:"text-muted-foreground",children:"Your account has been successfully verified. Redirecting to login..."})]}),s.jsx(Y,{onClick:()=>f(v),className:"w-full",children:"Go to Login"})]}),!o&&s.jsxs(s.Fragment,{children:[c&&s.jsxs(ti,{variant:"destructive",children:[s.jsx(Ay,{className:"h-4 w-4"}),s.jsx(ni,{children:c})]}),s.jsxs("form",{onSubmit:x,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"email",type:"email",placeholder:"Enter your email",value:e,onChange:w=>t(w.target.value),className:"pl-10",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"code",children:"Verification code"}),s.jsxs("div",{className:"relative",children:[s.jsx(ije,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"code",type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"123456",value:n,onChange:w=>r(y(w.target.value)),className:"pl-10 text-center tracking-[0.35em]",maxLength:6,required:!0})]}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Codes expire after 60 minutes."})]}),s.jsxs(Y,{type:"submit",className:"w-full",disabled:a,children:[a&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Verify Email"]})]}),s.jsxs("div",{className:"text-center space-y-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Didn't receive a code?"}),s.jsxs(Y,{variant:"outline",onClick:()=>f("/resend-verification"),className:"w-full",children:[s.jsx(Aa,{className:"mr-2 h-4 w-4"}),"Resend Verification Code"]}),s.jsx(Vn,{to:"/login",className:"text-sm text-primary hover:underline inline-block",children:"Back to Login"})]})]})]})]})})},Znt=()=>{const[e,t]=b.useState(""),[n,r]=b.useState(!1),[a,i]=b.useState(!1),{toast:o}=_t(),l=qt(),c=async u=>{var d,f;if(u.preventDefault(),!e.trim()){o({title:"Email required",description:"Please enter your email address.",variant:"destructive"});return}r(!0);try{await qn.resendVerification({email:e.trim()}),i(!0),o({title:"Verification code sent!",description:"Please check your email for the 6-digit code."})}catch(m){console.error("Resend verification error:",m);const p=(m==null?void 0:m.message)||((f=(d=m==null?void 0:m.response)==null?void 0:d.data)==null?void 0:f.message)||"Failed to send verification code.";p.toLowerCase().includes("already verified")||p.toLowerCase().includes("already active")?(o({title:"Account already verified",description:"Your account is already verified. You can sign in now."}),setTimeout(()=>{l("/login")},2e3)):o({title:"Failed to send code",description:p,variant:"destructive"})}finally{r(!1)}};return a?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 p-4",children:s.jsx(te,{className:"w-full max-w-md",children:s.jsx(se,{className:"pt-6",children:s.jsxs("div",{className:"text-center space-y-4",children:[s.jsx("div",{className:"flex justify-center",children:s.jsx("div",{className:"rounded-full bg-green-100 dark:bg-green-900/30 p-3",children:s.jsx(Sc,{className:"h-12 w-12 text-green-600 dark:text-green-400"})})}),s.jsxs("div",{children:[s.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Code Sent!"}),s.jsxs("p",{className:"text-muted-foreground mb-4",children:["We've sent a verification code to ",s.jsx("strong",{children:e})]}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter the 6-digit code within 60 minutes to activate your account."})]}),s.jsxs("div",{className:"pt-4 space-y-2",children:[s.jsx(Y,{onClick:()=>
1586l("/login"),className:"w-full",children:"Go to Login"}),s.jsx(Y,{onClick:()=>l("/verify-email"),variant:"outline",className:"w-full",children:"Enter Verification Code"})]})]})})})}):s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 p-4",children:s.jsxs(te,{className:"w-full max-w-md",children:[s.jsxs(xe,{children:[s.jsx(we,{className:"text-2xl font-bold text-center",children:"Resend Verification Code"}),s.jsx(nt,{className:"text-center",children:"Enter your email address to receive a new verification code"})]}),s.jsxs(se,{children:[s.jsxs("form",{onSubmit:c,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"email",type:"email",placeholder:"Enter your email",value:e,onChange:u=>t(u.target.value),className:"pl-10",required:!0})]})]}),s.jsxs(Y,{type:"submit",className:"w-full",disabled:n||!e.trim(),children:[n&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Send Verification Code"]})]}),s.jsxs("div",{className:"mt-6 space-y-2",children:[s.jsxs(Y,{variant:"ghost",onClick:()=>l("/verify-email"),className:"w-full",children:[s.jsx(ai,{className:"mr-2 h-4 w-4"}),"Back to Verification"]}),s.jsxs("div",{className:"text-center",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:"Already verified? "}),s.jsx(Vn,{to:"/login",className:"text-sm text-primary hover:underline",children:"Sign in"})]})]})]})]})})},Jnt=e=>e?e.startsWith("http://")||e.startsWith("https://")?e:e.startsWith("/")?`${Ls}${e}`:`${Ls}/${e}`:"",ert=()=>{const[e]=$m(),t=qt(),{user:n,signIn:r,signOut:a}=nr(),{toast:i}=_t(),o=e.get("agentId"),l=e.get("agentName")||"this agent",c=e.get("returnUrl"),[u,d]=b.useState(null),[f,m]=b.useState(null),[p,v]=b.useState(null),[y,x]=b.useState(""),[w,N]=b.useState(""),[S,_]=b.useState(!1),[k,C]=b.useState(!1);b.useEffect(()=>{try{const z=sessionStorage.getItem("accessDeniedContext");if(z){const I=JSON.parse(z);d(I),sessionStorage.removeItem("accessDeniedContext")}}catch(z){console.error("Failed to parse access denied context:",z)}},[]),b.useEffect(()=>{(async()=>{if(!o){m(null);return}const I=Number(o);if(Number.isNaN(I)){m(null);return}try{const F=await Pt.getPublicAgent(I),U=Jnt(F.logo);m(U||null),v(F.name||null)}catch(F){console.error("Failed to fetch public agent logo:",F),m(null),v(null)}})()},[o]);const E=(l!=="this agent"?l:null)||p||(u==null?void 0:u.name)||"this agent",O=X.useMemo(()=>{const z=new URLSearchParams;c&&z.set("returnUrl",c),o&&z.set("agentId",o),z.set("agentName",l);const I=z.toString();return I?`/register?${I}`:"/register"},[c,o,l]),P=()=>{c&&sessionStorage.setItem("authReturnUrl",c);const z=new URLSearchParams;c&&z.set("returnUrl",c),o&&z.set("agentId",o),z.set("agentName",l);const I=z.toString();t(I?`/login?${I}`:"/login")},R=async()=>{await a(),P()},T=async()=>{await a()},D=async z=>{z.preventDefault(),C(!0);try{await r(y,w)?(i({title:"Welcome back!",description:"You've successfully signed in to your account."}),t(c||"/dashboard")):i({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"})}catch{i({title:"Sign in failed",description:"Please check your credentials and try again.",variant:"destructive"})}finally{C(!1)}};return s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 p-4",children:s.jsxs(te,{className:"w-full max-w-lg",children:[s.jsxs(xe,{children:[f&&s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"h-20 w-20 rounded-full bg-white/80 dark:bg-gray-900/60 border border-gray-200 dark:border-gray-800 shadow-sm flex items-center justify-center overflow-hidden",children:s.jsx("img",{src:f,alt:"Agent logo",className:"h-14 w-14 object-contain"})})}),s.jsx(we,{className:"text-2xl font-bold text-center",children:"Welcome!"}),s.jsx("div",{className:"text-center text-lg font-semibold text-foreground",children:E}),s.jsxs(nt,{className:"text-center",children:['Sign up to continue to "',E,'"']})]}),s.jsxs(se,{className:"space-y-4",children:[n?s.jsx("div",{className:"p-4 bg-blue-50 dark:bg-blue-950/30 rounded-lg border border-blue-200 dark:border-blue-800",children:s.jsxs("div",{className:"flex items-start gap-2",children:[s.jsx(Aa,{className:"h-5 w-5 text-blue-600 dar
1586k:text-blue-400 mt-0.5"}),s.jsxs("div",{className:"text-sm text-blue-800 dark:text-blue-200 flex-1 space-y-3",children:[s.jsxs("div",{children:[s.jsx("p",{className:"font-medium mb-1",children:"Signed in as:"}),s.jsx("p",{className:"font-mono",children:n.email})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[s.jsx(Y,{variant:"secondary",size:"sm",onClick:R,className:"w-full sm:w-auto text-xs h-8 bg-blue-100 hover:bg-blue-200 text-blue-900 dark:bg-blue-900 dark:hover:bg-blue-800 dark:text-blue-100 border-none",children:"Log in again"}),s.jsx(Y,{variant:"outline",size:"sm",onClick:T,className:"w-full sm:w-auto text-xs h-8",children:"Log out"})]})]})]})}):s.jsx("div",{className:"rounded-lg border border-gray-200 dark:border-gray-800 p-4",children:s.jsxs("form",{onSubmit:D,className:"space-y-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"access-email",children:"Email"}),s.jsxs("div",{className:"relative",children:[s.jsx(Aa,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"access-email",type:"email",placeholder:"Enter your email",value:y,onChange:z=>x(z.target.value),className:"pl-10",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(de,{htmlFor:"access-password",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(ur,{className:"absolute left-3 top-3 h-4 w-4 text-gray-400"}),s.jsx(_e,{id:"access-password",type:S?"text":"password",placeholder:"Enter your password",value:w,onChange:z=>N(z.target.value),className:"pl-10 pr-10",required:!0}),s.jsx("button",{type:"button",onClick:()=>_(!S),className:"absolute right-3 top-3 text-gray-400 hover:text-gray-600",children:S?s.jsx(Lh,{className:"h-4 w-4"}):s.jsx(pr,{className:"h-4 w-4"})})]})]}),s.jsxs(Y,{type:"submit",className:"w-full py-6 text-base font-semibold bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700",disabled:k,children:[k&&s.jsx(kr,{className:"mr-2 h-4 w-4 animate-spin"}),"Log in to Access"]})]})}),s.jsx("div",{className:"p-4 bg-amber-50 dark:bg-amber-950/30 rounded-lg border border-amber-200 dark:border-amber-800",children:s.jsxs("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:[s.jsx("strong",{children:"Restricted Agent Access"})," This agent requires explicit permission from the agent owner or your organization's administrator. Once access is granted, you'll be able to use the agent immediately. If you believe this is a mistake, please confirm you're signed in with the correct email address."]})}),!n&&s.jsx("div",{className:"text-center pt-2",children:s.jsx(Vn,{to:O,className:"text-sm text-muted-foreground hover:text-primary hover:underline",children:"Don't have an account? Sign up"})})]})]})})};function ju(e){if(typeof e!="string"||!e.trim())return null;if(/^[a-zA-Z0-9_-]{11}$/.test(e))return e;try{const t=new URL(e);if(t.hostname.includes("youtu.be")){const o=t.pathname.replace("/","").trim();return/^[a-zA-Z0-9_-]{11}$/.test(o)?o:null}const n=t.searchParams.get("v");if(n&&/^[a-zA-Z0-9_-]{11}$/.test(n))return n;const r=t.pathname.split("/").filter(Boolean),a=r.indexOf("embed");if(a>=0&&r[a+1]&&/^[a-zA-Z0-9_-]{11}$/.test(r[a+1]))return r[a+1];const i=r.indexOf("shorts");return i>=0&&r[i+1]&&/^[a-zA-Z0-9_-]{11}$/.test(r[i+1])?r[i+1]:null}catch{return null}}function trt(e){const t=String(e.title??e.name??"").trim();if(!t)return null;const n=ju(e.youtubeId)??ju(e.youtube_id)??ju(e.videoId)??ju(e.video_id)??ju(e.url)??ju(e.videoUrl)??ju(e.video_url);return n?{id:e.id,title:t,description:typeof e.description=="string"?e.description:typeof e.subtitle=="string"?e.subtitle:void 0,youtubeId:n,thumbnailUrl:typeof e.thumbnailUrl=="string"?e.thumbnailUrl:typeof e.thumbnail_url=="string"?e.thumbnail_url:void 0,order:typeof e.order=="number"?e.order:typeof e.sort=="number"?e.sort:typeof e.priority=="number"?e.priority:void 0}:null}function nrt(e){const t=typeof e.id=="number"?e.id:Number(e.id);if(!Number.isFinite(t))return null;const n=String(e.name??"").trim();
1586return n?{id:t,name:n,description:typeof e.description=="string"?e.description:e.description===null?null:void 0,active:typeof e.active=="boolean"?e.active:void 0,order:typeof e.order=="number"?e.order:void 0,created_at:typeof e.created_at=="string"?e.created_at:void 0,updated_at:typeof e.updated_at=="string"?e.updated_at:void 0}:null}class rrt{async getCategories(){const t=await Et.get("/api/web-info/videos/categories/",{requiresAuth:!1,params:{page:1,page_size:30}});return(Array.isArray(t)?t:Array.isArray(t==null?void 0:t.items)?t.items:Array.isArray(t==null?void 0:t.results)?t.results:Array.isArray(t==null?void 0:t.categories)?t.categories:[]).map(nrt).filter(Boolean).filter(i=>i.active!==!1).sort((i,o)=>{const l=i.order??0,c=o.order??0;return l!==c?c-l:i.name.localeCompare(o.name)})}async getVideos(t){const n=await Et.get("/api/web-info/videos/",{requiresAuth:!1,params:{page:1,page_size:30,category_id:t==null?void 0:t.categoryId}});return(Array.isArray(n)?n:Array.isArray(n==null?void 0:n.items)?n.items:Array.isArray(n==null?void 0:n.results)?n.results:Array.isArray(n==null?void 0:n.videos)?n.videos:[]).map(trt).filter(Boolean).sort((i,o)=>{const l=i.order??0,c=o.order??0;return l!==c?c-l:i.title.localeCompare(o.title)})}async getVideosByCategoryId(t){return this.getVideos({categoryId:t})}}const lW=new rrt;function srt(e){return e.thumbnailUrl?e.thumbnailUrl:`https://img.youtube.com/vi/${e.youtubeId}/maxresdefault.jpg`}function art({video:e,onPlay:t}){return s.jsxs("div",{className:"video-card-wrapper",children:[s.jsx("div",{className:"relative aspect-video rounded-xl overflow-hidden bg-white/5 backdrop-blur-sm border border-white/15 hover:border-cyber-blue/40 transition-all duration-300 video-card-image-container",children:s.jsxs(s.Fragment,{children:[s.jsx("img",{src:srt(e),alt:e.title,className:"w-full h-full object-cover transition-transform duration-300 video-card-img",loading:"lazy",onError:n=>{const r=n.currentTarget;r.onerror=null,r.src=`https://img.youtube.com/vi/${e.youtubeId}/hqdefault.jpg`}}),s.jsx("button",{type:"button",onClick:()=>t(e),className:"absolute inset-0 flex items-center justify-center bg-black/35 video-card-overlay transition-all duration-300","aria-label":`Play ${e.title}`,children:s.jsx("div",{className:"bg-white/20 backdrop-blur-sm rounded-full p-4 border border-white/25 video-card-play-btn transition-all duration-300",children:s.jsx(Vr,{className:"w-7 h-7 text-white fill-current ml-0.5"})})}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/20 via-transparent to-black/20 pointer-events-none"})]})}),s.jsxs("div",{className:"mt-4 space-y-1",children:[s.jsx("div",{className:"text-white font-inter font-semibold text-base video-card-title",children:e.title}),e.description?s.jsx("div",{className:"text-gray-300 font-inter text-sm",children:e.description}):null]})]})}function irt({title:e,icon:t,videos:n,onPlay:r}){return n.length?s.jsxs("section",{className:"mt-6 video-section-container",children:[s.jsxs("div",{className:"flex items-center gap-3 mb-5",children:[t,s.jsx("h2",{className:"text-white font-inter font-semibold text-xl",children:e})]}),s.jsxs(KM,{opts:{align:"start",slidesToScroll:1,loop:!0},className:"relative",children:[s.jsx(YM,{className:"-ml-6",children:n.map(a=>s.jsx(Bo,{className:"pl-6 basis-full sm:basis-1/2 lg:basis-1/4",children:s.jsx(art,{video:a,onPlay:()=>r(a,n,e)})},String(a.id??a.youtubeId)))}),s.jsxs(s.Fragment,{children:[s.jsx(QJ,{variant:"ghost",className:`absolute -left-4 sm:-left-5 md:-left-6 top-[40%] -translate-y-1/2 h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 bg-gray-400 border-gray-300 text-white hover:bg-gray-500 hover:border-gray-400 z-10 ${n.length<2?"hidden":n.length<5?"lg:hidden":""}`}),s.jsx(ZJ,{variant:"ghost",className:`absolute -right-4 sm:-right-5 md:-right-6 top-[40%] -translate-y-1/2 h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12 bg-gray-400 border-gray-300 text-white hover:bg-gray-500 hover:border-gray-400 z-10 ${n.length<2?"hidden":n.length<5?"lg:hidden":""}`})]})]})]}):null}function ort(){const[e,t]=b.useState("all"),[n,r]=b.useState(null),a=hK({queryKey:["web-info","video-categories"],queryFn:()=>lW.getCategories(),staleTime:300*1e3}),i=eye({queries:(a.data??[]).map(d=>({queryKey:["web-info","videos","category",d.id],queryFn:()=>lW.getVideosByCategoryId(d.id),staleTime:300*1e3,enabled:!!a.data}))}),o=b.useMemo(()=>(a.data??[]).map((f,m)=>({category:f,query:i[m]})),[a.data,i]),l=b.useMemo(()=>{const d=a.data??[];return[{key:"all",label:"All"},...d.map(f=>({key:f.id,label:f.name}))]},[a.data]),c=b.useMemo(()=>e==="all"?o:o.filter(d=>d.category.id===e),[e,o]),u=()=>r(null);return b.useEffect(()=>{if(!n)return;const d=f=>{f.key==="Escape"&&u()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[n]),s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("main",{className:"relative z-10 pt-20",children:s.jsxs("div",{className:"container mx-auto px-6",children:[s.jsxs("div",{className:"text-center py-10 md:py-14",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full px-4 py-2 bg-white/10 backdrop-blur-md border border-white/10 text-gray-200 font-inter text-sm",children:[s.jsx(Dh,{className:"h-4 w-4 text-cyber-blue"}),s.jsx("span",{children:"Learning Hub"})]}),s.jsxs("h1",{className:"mt-6 font-bebas text-3xl sm:text-4xl md:text-5xl text-white tracking-widest",children:["RESOURCES &"," ",s.jsx("span",{className:"bg-gradient-to-r from-cyber-blue via-electric-blue to-neon-cyan bg-clip-text text-transparent",children:"LEARNING HUB"})]}),s.jsx("p",{className:"mt-4 text-gray-300 font-inter text-lg sm:text-xl max-w-2xl mx-auto",children:"Master AI agents with our tutorials, best practices, and expert podcast conversations."}),s.jsx("div",{className:"mt-8 flex flex-wrap items-center justify-center gap-3",children:l.map(d=>{const f=d.key===e;return s.jsx(Y,{type:"button",variant:f?"secondary":"ghost",onClick:()=>t(d.key),className:f?"rounded-full px-5 bg-gradient-to-r from-[hsl(var(--nav-gradient-start))] to-[hsl(var(--nav-gradient-end))] text-white hover:opacity-95":"rounded-full px-5 text-gray-200 bg-white/5 hover:bg-white/10 border border-white/10",children:d.label},String(d.key))})})]}),s.jsx("div",{className:"pb-16",children:a.isLoading?s.jsxs("div",{className:"flex items-center justify-center py-20 text-gray-200",children:[s.jsx(kr,{className:"h-6 w-6 animate-spin mr-3"}
1586),s.jsx("span",{className:"font-inter",children:"Loading categories…"})]}):a.isError?s.jsxs("div",{className:"text-center py-20 text-gray-200",children:[s.jsx("div",{className:"font-inter",children:"Couldn’t load categories right now."}),s.jsx("div",{className:"font-inter text-sm text-gray-400 mt-1",children:"Please try again in a moment."})]}):s.jsxs(s.Fragment,{children:[c.length===0?s.jsxs("div",{className:"text-center py-12 text-gray-200",children:[s.jsx("div",{className:"font-inter",children:"No categories found."}),s.jsx("div",{className:"font-inter text-sm text-gray-400 mt-1",children:"Add categories and videos in the admin panel."})]}):null,c.map(({category:d,query:f})=>{if(f!=null&&f.isLoading)return s.jsxs("section",{className:"mt-10",children:[s.jsx("div",{className:"flex items-center gap-3 mb-5",children:s.jsx("h2",{className:"text-white font-inter font-semibold text-xl",children:d.name})}),s.jsxs("div",{className:"flex items-center py-8 text-gray-200",children:[s.jsx(kr,{className:"h-5 w-5 animate-spin mr-3"}),s.jsx("span",{className:"font-inter",children:"Loading videos…"})]})]},String(d.id));if(f!=null&&f.isError)return s.jsxs("section",{className:"mt-10",children:[s.jsx("div",{className:"flex items-center gap-3 mb-5",children:s.jsx("h2",{className:"text-white font-inter font-semibold text-xl",children:d.name})}),s.jsx("div",{className:"text-gray-200 font-inter",children:"Couldn’t load videos for this category."})]},String(d.id));const m=(f==null?void 0:f.data)??[];return s.jsx(irt,{title:d.name,icon:null,videos:m,onPlay:(p,v,y)=>r({video:p,videos:v,title:y})},String(d.id))})]})})]})}),n?s.jsx("div",{className:"fixed inset-0 z-[60] bg-black/70 backdrop-blur-sm flex items-center justify-center p-4 md:p-8",role:"dialog","aria-modal":"true",onMouseDown:d=>{d.currentTarget===d.target&&u()},children:s.jsxs("div",{className:"w-full max-w-4xl relative",children:[s.jsx(Y,{type:"button",variant:"ghost",size:"icon",onClick:u,className:"absolute -top-14 right-3 md:-top-12 md:-right-12 z-10 text-white hover:bg-white/20 bg-white/10 rounded-full","aria-label":"Close",children:s.jsx(jr,{className:"h-6 w-6"})}),s.jsx("div",{className:"bg-white/5 border border-white/15 rounded-2xl overflow-hidden shadow-2xl",children:s.jsx("div",{className:"relative w-full aspect-video bg-black/30",children:s.jsx("iframe",{src:`https://www.youtube.com/embed/${n.video.youtubeId}?autoplay=1&rel=0&modestbranding=1`,title:n.video.title,className:"w-full h-full",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})})})]})}):null,s.jsx(Cn,{})]})}const lrt=()=>{const e=qt(),{refreshUser:t}=nr(),{toast:n}=_t(),[r,a]=b.useState(!0),i=b.useRef(!1);return b.useEffect(()=>{if(i.current)return;i.current=!0,(async()=>{try{await t(),n({title:"Subscription activated",description:"Your account tier has been updated successfully."})}catch{n({title:"Subscription completed",description:"Payment succeeded, but we could not refresh your tier yet. Please reload shortly."})}finally{a(!1)}})()},[t,n]),s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("main",{className:"relative z-10 container mx-auto px-6 pt-28 pb-20",children:s.jsxs("div",{className:"max-w-2xl mx-auto rounded-2xl border border-white/20 bg-gray-900/50 backdrop-blur-sm p-8 text-center",children:[s.jsx(Pe,{className:"h-14 w-14 text-neon-cyan mx-auto mb-4"}),s.jsx("h1",{className:"font-bebas text-4xl text-white tracking-wide mb-2",children:"SUBSCRIPTION CONFIRMED"}),s.jsx("p",{className:"font-inter text-white/75 mb-8",children:r?"Finalizing your plan and syncing your account limits...":"You now have access to your updated subscription features."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsxs(Y,{onClick:()=>e("/dashboard"),className:"font-inter",children:["Go to Dashboard",s.jsx(Bt,{className:"ml-2 h-4 w-4"})]}),s.jsx(Y,{variant:"outline",onClick:()=>e("/account-profile"),className:"font-inter",children:"View Account"})]})]})}),s.jsx(Cn,{})]})},crt=()=>{const e=qt();return s.jsxs("div",{className:"min-h-screen cinematic-bg relative overflow-hidden",children:[s.jsx("div",{className:"neural-network"}),s.jsx(xn,{}),s.jsx("main",{className:"relative z-10 container mx-auto px-6 pt-28 pb-20",children:s.jsxs("div",{className:"max-w-2xl mx-auto rounded-2xl border border-white/20 bg-gray-900/50 backdrop-blur-sm p-8 text-center",children:[s.jsx(Xa,{className:"h-14 w-14 text-yellow-400 mx-auto mb-4"}),s.jsx("h1",{className:"font-bebas text-4xl text-white tracking-wide mb-2",children:"CHECKOUT CANCELED"}),s.jsx("p",{className:"font-inter text-white/75 mb-8",children:"Your subscription was not changed. You can return to pricing and try again at any time."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsxs(Y,{onClick:()=>e("/pricing"),className:"font-inter",children:["Back to Pricing",s.jsx(Bt,{className:"ml-2 h-4 w-4"})]}),s.jsx(Y,{variant:"outline",onClick:()=>
1586e("/dashboard"),className:"font-inter",children:"Go to Dashboard"})]})]})}),s.jsx(Cn,{})]})};var s5="ToastProvider",[a5,urt,drt]=zm("Toast"),[xle]=Mr("Toast",[drt]),[frt,GN]=xle(s5),yle=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:i=50,children:o}=e,[l,c]=b.useState(null),[u,d]=b.useState(0),f=b.useRef(!1),m=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${s5}\`. Expected non-empty \`string\`.`),s.jsx(a5.Provider,{scope:t,children:s.jsx(frt,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:i,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:b.useCallback(()=>d(p=>p+1),[]),onToastRemove:b.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:m,children:o})})};yle.displayName=s5;var vle="ToastViewport",hrt=["F8"],ZI="toast.viewportPause",JI="toast.viewportResume",ble=b.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=hrt,label:a="Notifications ({hotkey})",...i}=e,o=GN(vle,n),l=urt(n),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=b.useRef(null),m=gt(t,f,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=o.toastCount>0;b.useEffect(()=>{const x=w=>{var S;r.length!==0&&r.every(_=>w[_]||w.code===_)&&((S=f.current)==null||S.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[r]),b.useEffect(()=>{const x=c.current,w=f.current;if(v&&x&&w){const N=()=>{if(!o.isClosePausedRef.current){const C=new CustomEvent(ZI);w.dispatchEvent(C),o.isClosePausedRef.current=!0}},S=()=>{if(o.isClosePausedRef.current){const C=new CustomEvent(JI);w.dispatchEvent(C),o.isClosePausedRef.current=!1}},_=C=>{!x.contains(C.relatedTarget)&&S()},k=()=>{x.contains(document.activeElement)||S()};return x.addEventListener("focusin",N),x.addEventListener("focusout",_),x.addEventListener("pointermove",N),x.addEventListener("pointerleave",k),window.addEventListener("blur",N),window.addEventListener("focus",S),()=>{x.removeEventListener("focusin",N),x.removeEventListener("focusout",_),x.removeEventListener("pointermove",N),x.removeEventListener("pointerleave",k),window.removeEventListener("blur",N),window.removeEventListener("focus",S)}}},[v,o.isClosePausedRef]);const y=b.useCallback(({tabbingDirection:x})=>{const N=l().map(S=>{const _=S.ref.current,k=[_,...Crt(_)];return x==="forwards"?k:k.reverse()});return(x==="forwards"?N.reverse():N).flat()},[l]);return b.useEffect(()=>{const x=f.current;if(x){const w=N=>{var k,C,E;const S=N.altKey||N.ctrlKey||N.metaKey;if(N.key==="Tab"&&!S){const O=document.activeElement,P=N.shiftKey;if(N.target===x&&P){(k=u.current)==null||k.focus();return}const D=y({tabbingDirection:P?"backwards":"forwards"}),z=D.findIndex(I=>I===O);yP(D.slice(z+1))?N.preventDefault():P?(C=u.current)==null||C.focus():(E=d.current)==null||E.focus()}};return x.addEventListener("keydown",w),()=>x.removeEventListener("keydown",w)}},[l,y]),s.jsxs(c0e,{ref:c,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&s.jsx(eO,{ref:u,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"forwards"});yP(x)}}),s.jsx(a5.Slot,{scope:n,children:s.jsx(Ve.ol,{tabIndex:-1,...i,ref:m})}),v&&s.jsx(eO,{ref:d,onFocusFromOutsideViewport:()=>{const x=y({tabbingDirection:"backwards"});yP(x)}})]})});ble.displayName=vle;var wle="ToastFocusProxy",eO=b.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...a}=e,i=GN(wle,n);return s.jsx(b1,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=i.viewport)!=null&&u.contains(l))&&r()}})});eO.displayName=wle;var r0="Toast",mrt="toast.swipeStart",prt="toast.swipeMove",grt="toast.swipeCancel",xrt="toast.swipeEnd",jle=b.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:a,onOpenChange:i,...o}=e,[l,c]=$s({prop:r,defaultProp:a??!0,onChange:i,caller:r0});return s.jsx(Cr,{present:n||l,children:s.jsx(brt,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:lr(e.onPause),onResume:lr(e.onResume),onSwipeStart:Oe(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Oe(e.onSwipeMove,u=>{const{x:d,y:f}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Oe(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:Oe(e.onSwipeEnd,u=>{const{x:d,y:f}=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",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),c(!1)})})})});jle.displayName=r0;var[yrt,vrt]=xle(r0,{onClose(){}}),brt=b.forwardRef((e,t)=>
1586{const{__scopeToast:n,type:r="foreground",duration:a,open:i,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:m,onSwipeEnd:p,...v}=e,y=GN(r0,n),[x,w]=b.useState(null),N=gt(t,I=>w(I)),S=b.useRef(null),_=b.useRef(null),k=a||y.duration,C=b.useRef(0),E=b.useRef(k),O=b.useRef(0),{onToastAdd:P,onToastRemove:R}=y,T=lr(()=>{var F;(x==null?void 0:x.contains(document.activeElement))&&((F=y.viewport)==null||F.focus()),o()}),D=b.useCallback(I=>{!I||I===1/0||(window.clearTimeout(O.current),C.current=new Date().getTime(),O.current=window.setTimeout(T,I))},[T]);b.useEffect(()=>{const I=y.viewport;if(I){const F=()=>{D(E.current),u==null||u()},U=()=>{const H=new Date().getTime()-C.current;E.current=E.current-H,window.clearTimeout(O.current),c==null||c()};return I.addEventListener(ZI,U),I.addEventListener(JI,F),()=>{I.removeEventListener(ZI,U),I.removeEventListener(JI,F)}}},[y.viewport,k,c,u,D]),b.useEffect(()=>{i&&!y.isClosePausedRef.current&&D(k)},[i,k,y.isClosePausedRef,D]),b.useEffect(()=>(P(),()=>R()),[P,R]);const z=b.useMemo(()=>x?Ele(x):null,[x]);return y.viewport?s.jsxs(s.Fragment,{children:[z&&s.jsx(wrt,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),s.jsx(yrt,{scope:n,onClose:T,children:Td.createPortal(s.jsx(a5.ItemSlot,{scope:n,children:s.jsx(l0e,{asChild:!0,onEscapeKeyDown:Oe(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||T(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Ve.li,{tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":y.swipeDirection,...v,ref:N,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Oe(e.onKeyDown,I=>{I.key==="Escape"&&(l==null||l(I.nativeEvent),I.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:Oe(e.onPointerDown,I=>{I.button===0&&(S.current={x:I.clientX,y:I.clientY})}),onPointerMove:Oe(e.onPointerMove,I=>{if(!S.current)return;const F=I.clientX-S.current.x,U=I.clientY-S.current.y,H=!!_.current,q=["left","right"].includes(y.swipeDirection),B=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,L=q?B(0,F):0,V=q?0:B(0,U),K=I.pointerType==="touch"?10:2,W={x:L,y:V},ie={originalEvent:I,delta:W};H?(_.current=W,vb(prt,f,ie,{discrete:!1})):cW(W,y.swipeDirection,K)?(_.current=W,vb(mrt,d,ie,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(F)>K||Math.abs(U)>K)&&(S.current=null)}),onPointerUp:Oe(e.onPointerUp,I=>{const F=_.current,U=I.target;if(U.hasPointerCapture(I.pointerId)&&U.releasePointerCapture(I.pointerId),_.current=null,S.current=null,F){const H=I.currentTarget,q={originalEvent:I,delta:F};cW(F,y.swipeDirection,y.swipeThreshold)?vb(xrt,p,q,{discrete:!0}):vb(grt,m,q,{discrete:!0}),H.addEventListener("click",B=>B.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),wrt=e=>{const{__scopeToast:t,children:n,...r}=e,a=GN(r0,t),[i,o]=b.useState(!1),[l,c]=b.useState(!1);return Srt(()=>o(!0)),b.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(Dd,{asChild:!0,children:s.jsx(b1,{...r,children:i&&s.jsxs(s.Fragment,{children:[a.label," ",n]})})})},jrt="ToastTitle",Nle=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(Ve.div,{...r,ref:t})});Nle.displayName=jrt;var Nrt="ToastDescription",Sle=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(Ve.div,{...r,ref:t})});Sle.displayName=Nrt;var kle="ToastAction",Cle=b.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(Ale,{altText:n,asChild:!0,children:s.jsx(i5,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kle}\`. Expected non-empty \`string\`.`),null)});Cle.displayName=kle;var _le="ToastClose",i5=b.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,a=vrt(_le,n);return s.jsx(Ale,{asChild:!0,children:s.jsx(Ve.button,{type:"button",...r,ref:t,onClick:Oe(e.onClick,a.onClose)})})});i5.displayName=_le;var Ale=b.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...a}=e;return s.jsx(Ve.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Ele(e){const t=[];
1586return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),krt(r)){const a=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!a)if(i){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Ele(r))}}),t}function vb(e,t,n,{discrete:r}){const a=n.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?PO(a,i):a.dispatchEvent(i)}var cW=(e,t,n=0)=>{const r=Math.abs(e.x),a=Math.abs(e.y),i=r>a;return t==="left"||t==="right"?i&&r>n:!i&&a>n};function Srt(e=()=>{}){const t=lr(e);cr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function krt(e){return e.nodeType===e.ELEMENT_NODE}function Crt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yP(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var _rt=yle,Ple=ble,Tle=jle,Ile=Nle,Ole=Sle,Mle=Cle,Rle=i5;const Art=_rt,Dle=b.forwardRef(({className:e,...t},n)=>s.jsx(Ple,{ref:n,className:He("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}));Dle.displayName=Ple.displayName;const Ert=vy("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"}}),Lle=b.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(Tle,{ref:r,className:He(Ert({variant:t}),e),...n}));Lle.displayName=Tle.displayName;const Prt=b.forwardRef(({className:e,...t},n)=>s.jsx(Mle,{ref:n,className:He("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 hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Prt.displayName=Mle.displayName;const $le=b.forwardRef(({className:e,...t},n)=>s.jsx(Rle,{ref:n,className:He("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(jr,{className:"h-4 w-4"})}));$le.displayName=Rle.displayName;const Fle=b.forwardRef(({className:e,...t},n)=>s.jsx(Ile,{ref:n,className:He("text-sm font-semibold",e),...t}));Fle.displayName=Ile.displayName;const zle=b.forwardRef(({className:e,...t},n)=>s.jsx(Ole,{ref:n,className:He("text-sm opacity-90",e),...t}));zle.displayName=Ole.displayName;function Trt(){const{toasts:e}=_t();return s.jsxs(Art,{children:[e.map(function({id:t,title:n,description:r,action:a,...i}){return s.jsxs(Lle,{...i,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(Fle,{children:n}),r&&s.jsx(zle,{children:r})]}),a,s.jsx($le,{})]},t)}),s.jsx(Dle,{})]})}const Irt=({onDismiss:e})=>{const{sessionExpired:t,clearSessionExpired:n,silentRefresh:r,toggleSessionExpiryHandling:a,isSessionExpiryDisabled:i}=nr();if(!t)return null;const o=()=>{n(),e==null||e()},l=async()=>{try{await r()&&(n(),e==null||e())}catch(c){console.error("Failed to refresh session:",c)}};return s.jsx(ti,{className:"fixed top-16 left-1/2 transform -translate-x-1/2 z-50 max-w-2xl mx-4 bg-orange-50 border-orange-200 dark:bg-orange-950/20 dark:border-orange-800",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsx("div",{className:"flex-1",children:s.jsxs(ni,{className:"text-orange-800 dark:text-orange-200",children:[s.jsx("strong",{children:"Session Expired:"})," Your session has expired. You can continue working, but some features may be limited. Sign in again when ready to restore full functionality."]})}),s.jsxs("div",{className:"flex items-center space-x-2 ml-4",children:[s.jsxs(Y,{variant:"outline",size:"sm",onClick:l,className:"text-orange-700 border-orange-300 hover:bg-orange-100 dar
1586k:text-orange-300 dark:border-orange-600 dark:hover:bg-orange-900/30",children:[s.jsx(ss,{className:"h-4 w-4 mr-1"}),"Refresh"]}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:a,className:"text-orange-600 hover:text-orange-800 hover:bg-orange-100 dark:text-orange-400 dark:hover:text-orange-200 dark:hover:bg-orange-900/30",title:i?"Enable session expiry notifications":"Disable session expiry notifications",children:i?"Enable":"Disable"}),s.jsx(Y,{variant:"ghost",size:"sm",onClick:o,className:"text-orange-600 hover:text-orange-800 hover:bg-orange-100 dark:text-orange-400 dark:hover:text-orange-200 dark:hover:bg-orange-900/30",children:s.jsx(jr,{className:"h-4 w-4"})})]})]})})},Ort=()=>{const{pathname:e}=wl();return b.useEffect(()=>{window.scrollTo(0,0)},[e]),null};function Mrt(){const e=wl();return b.useEffect(()=>{typeof window.gtag=="function"&&window.gtag("event","page_view",{page_path:e.pathname+e.search})},[e]),null}const Rrt=new Vxe({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3,retry:(e,t)=>(t==null?void 0:t.status)>=400&&(t==null?void 0:t.status)<500?[408,409,429].includes(t.status)&&e<2:e<3,refetchOnWindowFocus:!1},mutations:{retry:(e,t)=>(t==null?void 0:t.status)>=400&&(t==null?void 0:t.status)<500?!1:e<2}}});function Drt(){return s.jsx(s.Fragment,{children:s.jsxs(Qxe,{client:Rrt,children:[s.jsx(lye,{children:s.jsxs(Cxe,{children:[s.jsx(Mrt,{}),s.jsx(Ort,{}),s.jsx(Irt,{}),s.jsxs(yxe,{children:[s.jsx(Ft,{path:"/",element:s.jsx(JNe,{})}),s.jsx(Ft,{path:"/onboarding",element:s.jsx(sSe,{})}),s.jsx(Ft,{path:"/dashboard",element:s.jsx(GAe,{})}),s.jsx(Ft,{path:"/agent-builder",element:s.jsx(jEe,{})}),s.jsx(Ft,{path:"/agent-builder/advanced",element:s.jsx(bz,{})}),s.jsx(Ft,{path:"/agent-builder/advanced/:agentId",element:s.jsx(bz,{})}),s.jsx(Ft,{path:"/agent-builder/new",element:s.jsx(Sz,{})}),s.jsx(Ft,{path:"/agent-builder/new/:agentId",element:s.jsx(Sz,{})}),s.jsx(Ft,{path:"/agent-edit/:agentId",element:s.jsx(sre,{})}),s.jsx(Ft,{path:"/agent-preview",element:s.jsx(mC,{})}),s.jsx(Ft,{path:"/agent-preview/:agentId",element:s.jsx(mC,{})}),s.jsx(Ft,{path:"/:agentId",element:s.jsx(mC,{})}),s.jsx(Ft,{path:"/agentic",element:s.jsx(F8e,{})}),s.jsx(Ft,{path:"/chat",element:s.jsx(Dze,{})}),s.jsx(Ft,{path:"/system-setup",element:s.jsx(Uze,{})}),s.jsx(Ft,{path:"/wizard",element:s.jsx(Ant,{})}),s.jsx(Ft,{path:"/account-profile",element:s.jsx(Gze,{})}),s.jsx(Ft,{path:"/governance",element:s.jsx(Kze,{})}),s.jsx(Ft,{path:"/admin/governance",element:s.jsx(Yze,{})}),s.jsx(Ft,{path:"/security",element:s.jsx(gnt,{})}),s.jsx(Ft,{path:"/pricing",element:s.jsx(xnt,{})}),s.jsx(Ft,{path:"/industries",element:s.jsx(Nnt,{})}),s.jsx(Ft,{path:"/industries/healthcare",element:s.jsx(Snt,{})}),s.jsx(Ft,{path:"/industries/manufacturing",element:s.jsx(knt,{})}),s.jsx(Ft,{path:"/industries/government",element:s.jsx(Cnt,{})}),s.jsx(Ft,{path:"/industries/higher-education",element:s.jsx(_nt,{})}),s.jsx(Ft,{path:"/faq",element:s.jsx(Wnt,{})}),s.jsx(Ft,{path:"/contact-us",element:s.jsx(nSe,{})}),s.jsx(Ft,{path:"/resources",element:s.jsx(ort,{})}),s.jsx(Ft,{path:"/subscription/success",element:s.jsx(lrt,{})}),s.jsx(Ft,{path:"/subscription/cancel",element:s.jsx(crt,{})}),s.jsx(Ft,{path:"/deployment",element:s.jsx(jnt,{})}),s.jsx(Ft,{path:"/privacy-policy",element:s.jsx(Pnt,{})}),s.jsx(Ft,{path:"/terms-of-service",element:s.jsx(Tnt,{})}),s.jsx(Ft,{path:"/login",element:s.jsx(Xnt,{})}),s.jsx(Ft,{path:"/register",element:s.jsx(Knt,{})}),s.jsx(Ft,{path:"/verify-email",element:s.jsx(Qnt,{})}),s.jsx(Ft,{path:"/resend-verification",element:s.jsx(Znt,{})}),s.jsx(Ft,{path:"/access-denied",element:s.jsx(ert,{})}),s.jsx(Ft,{path:"*",element:s.jsx(Ent,{})})]})]})}),s.jsx(Trt,{})]})})}_ge.createRoot(document.getElementById("root")).render(s.jsx(Drt,{}));

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.