PageSourceSearch

https://boostikoesp-5kqqxalm.manus.space/assets/index-qKbVJ8bg.js

js boostikoesp-5kqqxalm.manus.space collected 2026-10-03 05:00:27 UTC 2,049,720 bytes, 1,111 lines download raw bytes

vendor: 28,184 bytes, lines 1-9
1function iG(e,t){for(var a=0;a<t.length;a++){const s=t[a];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in e)){const i=Object.getOwnPropertyDescriptor(s,r);i&&Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>s[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function a(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=a(r);fetch(r.href,i)}})();var cg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Na(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i1={exports:{}},xp={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and 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 bO;function cG(){if(bO)return xp;bO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(s,r,i){var l=null;if(i!==void 0&&(l=""+i),r.key!==void 0&&(l=""+r.key),"key"in r){i={};for(var d in r)d!=="key"&&(i[d]=r[d])}else i=r;return r=i.ref,{$$typeof:e,type:s,key:l,ref:r!==void 0?r:null,props:i}}return xp.Fragment=t,xp.jsx=a,xp.jsxs=a,xp}var jO;function lG(){return jO||(jO=1,i1.exports=cG()),i1.exports}var n=lG(),io=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(){}},oG={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dG=class{#t=oG;#e=!1;setTimeoutProvider(e){this.#t=e}setTimeout(e,t){return this.#t.setTimeout(e,t)}clearTimeout(e){this.#t.clearTimeout(e)}setInterval(e,t){return this.#t.setInterval(e,t)}clearInterval(e){this.#t.clearInterval(e)}},Bl=new dG;function uG(e){setTimeout(e,0)}var Vl=typeof window>"u"||"Deno"in globalThis;function Ln(){}function pG(e,t){return typeof e=="function"?e(t):e}function eS(e){return typeof e=="number"&&e>=0&&e!==1/0}function U7(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Mc(e,t){return typeof e=="function"?e(t):e}function Hs(e,t){return typeof e=="function"?e(t):e}function wO(e,t){const{type:a="all",exact:s,fetchStatus:r,predicate:i,queryKey:l,stale:d}=e;if(l){if(s){if(t.queryHash!==g5(l,t.options))return!1}else if(!sf(t.queryKey,l))return!1}if(a!=="all"){const u=t.isActive();if(a==="active"&&!u||a==="inactive"&&u)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||r&&r!==t.state.fetchStatus||i&&!i(t))}function NO(e,t){const{exact:a,status:s,predicate:r,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(a){if(qc(t.options.mutationKey)!==qc(i))return!1}else if(!sf(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function g5(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,a)=>tS(a)?Object.keys(a).sort().reduce((s,r)=>(s[r]=a[r],s),{}):a)}function sf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(a=>sf(e[a],t[a])):!1}var fG=Object.prototype.hasOwnProperty;function h5(e,t){if(e===t)return e;const a=SO(e)&&SO(t);if(!a&&!(tS(e)&&tS(t)))return t;const r=(a?e:Object.keys(e)).length,i=a?t:Object.keys(t),l=i.length,d=a?new Array(l):{};let u=0;for(let p=0;p<l;p++){const x=a?p:i[p],m=e[x],h=t[x];if(m===h){d[x]=m,(a?p<r:fG.call(e,x))&&u++;continue}if(m===null||h===null||typeof m!="object"||typeof h!="object"){d[x]=h;continue}const y=h5(m,h);d[x]=y,y===m&&u++}return r===l&&u===r?e:d}function rf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(e[a]!==t[a])return!1;return!0}function SO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function tS(e){if(!CO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!CO(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function CO(e){return Object.prototype.toString.call(e)==="[object Object]"}function mG(e){return new Promise(t=>{Bl.setTimeout(t,e)})}function aS(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?h5(e,t):t}function xG(e,t,a=0){const s=[...e,t];return a&&s.length>a?s.slice(1):s}function gG(e,t,a=0){const s=[t,...e];return a&&s.length>a?s.slice(0,-1):s}var ws=Symbol();function q7(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ws?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function F7(e,t){return typeof e=="function"?e(...t):!!e}var hG=class extends io{#t;#e;#a;constructor(){super(),this.#a=e=>{if(!Vl&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#a=e,this.#e?.(),this.#e=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#t!==e&&(this.#t=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},v5=new hG;function nS(){let e,t;const a=new Promise((r,i)=>{e=r,t=i});a.status="pending",a.catch(()=>{});function s(r){Object.assign(a,r),delete a.resolve,delete a.reject}return a.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},a.reject=r=>{s({status:"rejected",reason:r}),t(r)},a}var vG=uG;function yG(){let e=[],t=0,a=d=>{d()},s=d=>{d()},r=vG;const i=d=>{t?e.push(d):r(()=>{a(d)})},l=()=>{const d=e;e=[],d.length&&r(()=>{s(()=>{d.forEach(u=>{a(u)})})})};return{batch:d=>{let u;t++;try{u=d()}finally{t--,t||l()}return u},batchCalls:d=>(...u)=>{i(()=>{d(...u)})},schedule:i,setNotifyFunction:d=>{a=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{r=d}}}var Xa=yG(),bG=class extends io{#t=!0;#e;#a;constructor(){super(),this.#a=e=>{if(!Vl&&window.addEventListener){const t=()=>e(!0),a=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",a)}}}}onSubscribe(){this.#e||this.setEventListener(this.#a)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(e){this.#a=e,this.#e?.(),this.#e=e(this.setOnline.bind(this))}setOnline(e){this.#t!==e&&(this.#t=e,this.listeners.forEach(a=>{a(e)}))}isOnline(){return this.#t}},eh=new bG;function jG(e){return Math.min(1e3*2**e,3e4)}function W7(e){return(e??"online")==="online"?eh.isOnline():!0}var sS=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function H7(e){let t=!1,a=0,s;const r=nS(),i=()=>r.status!=="pending",l=b=>{if(!i()){const j=new sS(b);h(j),e.onCancel?.(j)}},d=()=>{t=!0},u=()=>{t=!1},p=()=>v5.isFocused()&&(e.networkMode==="always"||eh.isOnline())&&e.canRun(),x=()=>W7(e.networkMode)&&e.canRun(),m=b=>{i()||(s?.(),r.resolve(b))},h=b=>{i()||(s?.(),r.reject(b))},y=()=>new Promise(b=>{s=j=>{(i()||p())&&b(j)},e.onPause?.()}).then(()=>{s=void 0,i()||e.onContinue?.()}),w=()=>{if(i())return;let b;const j=a===0?e.initialPromise:void 0;try{b=j??e.fn()}catch(S){b=Promise.reject(S)}Promise.resolve(b).then(m).catch(S=>{if(i())return;const O=e.retry??(Vl?0:3),A=e.retryDelay??jG,k=typeof A=="function"?A(a,S):A,E=O===!0||typeof O=="number"&&a<O||typeof O=="function"&&O(a,S);if(t||!E){h(S);return}a++,e.onFail?.(a,S),mG(k).then(()=>p()?void 0:y()).then(()=>{t?h(S):w()})})};return{promise:r,status:()=>r.status,cancel:l,continue:()=>(s?.(),r),cancelRetry:d,continueRetry:u,canStart:x,start:()=>(x()?w():y().then(w),r)}}var V7=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),eS(this.gcTime)&&(this.#t=Bl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vl?1/0:300*1e3))}clearGcTimeout(){this.#t&&(Bl.clearTimeout(this.#t),this.#t=void 0)}},wG=class extends V7{#t;#e;#a;#s;#n;#r;#c;constructor(e){super(),this.#c=!1,this.#r=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#s=e.client,this.#a=this.#s.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=EO(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#r,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=EO(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(e,t){const a=aS(this.state.data,e,this.options);return this.#i({data:a,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),a}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(Ln).catch(Ln):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(e=>Hs(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ws||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mc(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!U7(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#c?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(u=>u.options.queryFn);d&&this.setOptions(d.options)}const a=new AbortController,s=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#c=!0,a.signal)})},r=()=>{const d=q7(this.options,t),p=(()=>{const x={client:this.#s,queryKey:this.queryKey,meta:this.meta};return s(x),x})();return this.#c=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:r};return s(d),d})();this.options.behavior?.onFetch(l,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#i({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=H7({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof sS&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),a.abort()},onFail:(d,u)=>{this.#i({type:"failed",failureCount:d,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#n.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#a.config.onSuccess?.(d,this),this.#a.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof sS){if(d.silent)return this.#n.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#i({type:"error",error:d}),this.#a.config.onError?.(d,this),this.#a.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#i(e){const t=a=>{switch(e.type){case"failed":return{...a,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...G7(a.data,this.options),fetchMeta:e.meta??null};case"success":const s={...a,data:e.data,dataUpdateCount:a.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=e.manual?s:void 0,s;case"error":const r=e.error;return{...a,error:r,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...e.state}}};this.state=t(this.state),Xa.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function G7(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:W7(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function EO(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,s=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var ym=class extends io{constructor(e,t){super(),this.options=t,this.#t=e,this.#i=null,this.#c=nS(),this.bindMethods(),this.setOptions(t)}#t;#e=void 0;#a=void 0;#s=void 0;#n;#r;#c;#i;#f;#u;#p;#o;#d;#l;#x=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),AO(this.#e,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return rS(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return rS(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#j(),this.#e.removeObserver(this)}setOptions(e){const t=this.options,a=this.#e;if(this.options=this.#t.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hs(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),t._defaulted&&!rf(this.options,t)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const s=this.hasListeners();s&&DO(this.#e,a,this.options,t)&&this.#m(),this.updateResult(),s&&(this.#e!==a||Hs(this.options.enabled,this.#e)!==Hs(t.enabled,this.#e)||Mc(this.options.staleTime,this.#e)!==Mc(t.staleTime,this.#e))&&this.#g();const r=this.#h();s&&(this.#e!==a||Hs(this.options.enabled,this.#e)!==Hs(t.enabled,this.#e)||r!==this.#l)&&this.#v(r)}getOptimisticResult(e){const t=this.#t.getQueryCache().build(this.#t,e),a=this.createResult(t,e);return SG(this,a)&&(this.#s=a,this.#r=this.options,this.#n=this.#e.state),a}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(a,s)=>(this.trackProp(s),t?.(s),s==="promise"&&!this.options.experimental_prefetchInRender&&this.#c.status==="pending"&&this.#c.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(a,s))})}trackProp(e){this.#x.add(e)}getCurrentQuery(){return this.#e}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#t.defaultQueryOptions(e),a=this.#t.getQueryCache().build(this.#t,t);return a.fetch().then(()=>this.createResult(a,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#w();let t=this.#e.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Ln)),t}#g(){this.#b();const e=Mc(this.options.staleTime,this.#e);if(Vl||this.#s.isStale||!eS(e))return;const a=U7(this.#s.dataUpdatedAt,e)+1;this.#o=Bl.setTimeout(()=>{this.#s.isStale||this.updateResult()},a)}#h(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(e){this.#j(),this.#l=e,!(Vl||Hs(this.options.enabled,this.#e)===!1||!eS(this.#l)||this.#l===0)&&(this.#d=Bl.setInterval(()=>{(this.options.refetchIntervalInBackground||v5.isFocused())&&this.#m()},this.#l))}#y(){this.#g(),this.#v(this.#h())}#b(){this.#o&&(Bl.clearTimeout(this.#o),this.#o=void 0)}#j(){this.#d&&(Bl.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){const a=this.#e,s=this.options,r=this.#s,i=this.#n,l=this.#r,u=e!==a?e.state:this.#a,{state:p}=e;let x={...p},m=!1,h;if(t._optimisticResults){const T=this.hasListeners(),I=!T&&AO(e,t),$=T&&DO(e,a,t,s);(I||$)&&(x={...x,...G7(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(x.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:b}=x;h=x.data;let j=!1;if(t.placeholderData!==void 0&&h===void 0&&b==="pending"){let T;r?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(T=r.data,j=!0):T=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,T!==void 0&&(b="success",h=aS(r?.data,T,t),m=!0)}if(t.select&&h!==void 0&&!j)if(r&&h===i?.data&&t.select===this.#f)h=this.#u;else try{this.#f=t.select,h=t.select(h),h=aS(r?.data,h,t),this.#u=h,this.#i=null}catch(T){this.#i=T}this.#i&&(y=this.#i,h=this.#u,w=Date.now(),b="error");const S=x.fetchStatus==="fetching",O=b==="pending",A=b==="error",k=O&&S,E=h!==void 0,_={status:b,fetchStatus:x.fetchStatus,isPending:O,isSuccess:b==="success",isError:A,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:x.dataUpdatedAt,error:y,errorUpdatedAt:w,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>u.dataUpdateCount||x.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!O,isLoadingError:A&&!E,isPaused:x.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&E,isStale:y5(e,t),refetch:this.refetch,promise:this.#c,isEnabled:Hs(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const T=R=>{_.status==="error"?R.reject(_.error):_.data!==void 0&&R.resolve(_.data)},I=()=>{const R=this.#c=_.promise=nS();T(R)},$=this.#c;switch($.status){case"pending":e.queryHash===a.queryHash&&T($);break;case"fulfilled":(_.status==="error"||_.data!==$.value)&&I();break;case"rejected":(_.status!=="error"||_.error!==$.reason)&&I();break}}return _}updateResult(){const e=this.#s,t=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#r=this.options,this.#n.data!==void 0&&(this.#p=this.#e),rf(t,e))return;this.#s=t;const a=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,r=typeof s=="function"?s():s;if(r==="all"||!r&&!this.#x.size)return!0;const i=new Set(r??this.#x);return this.options.throwOnError&&i.add("error"),Object.keys(this.#s).some(l=>{const d=l;return this.#s[d]!==e[d]&&i.has(d)})};this.#N({listeners:a()})}#w(){const e=this.#t.getQueryCache().build(this.#t,this.options);if(e===this.#e)return;const t=this.#e;this.#e=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#N(e){Xa.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#s)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function NG(e,t){return Hs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function AO(e,t){return NG(e,t)||e.state.data!==void 0&&rS(e,t,t.refetchOnMount)}function rS(e,t,a){if(Hs(t.enabled,e)!==!1&&Mc(t.staleTime,e)!=="static"){const s=typeof a=="function"?a(e):a;return s==="always"||s!==!1&&y5(e,t)}return!1}function DO(e,t,a,s){return(e!==t||Hs(s.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&y5(e,a)}function y5(e,t){return Hs(t.enabled,e)!==!1&&e.isStaleByTime(Mc(t.staleTime,e))}function SG(e,t){return!rf(e.getCurrentResult(),t)}function th(e){return{onFetch:(t,a)=>{const s=t.options,r=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let d={pages:[],pageParams:[]},u=0;const p=async()=>{let x=!1;const m=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?x=!0:t.signal.addEventListener("abort",()=>{x=!0}),t.signal)})},h=q7(t.options,t.fetchOptions),y=async(w,b,j)=>{if(x)return Promise.reject();if(b==null&&w.pages.length)return Promise.resolve(w);const O=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:b,direction:j?"backward":"forward",meta:t.options.meta};return m(D),D})(),A=await h(O),{maxPages:k}=t.options,E=j?gG:xG;return{pages:E(w.pages,A,k),pageParams:E(w.pageParams,b,k)}};if(r&&i.length){const w=r==="backward",b=w?Y7:iS,j={pages:i,pageParams:l},S=b(s,j);d=await y(j,S,w)}else{const w=e??i.length;do{const b=u===0?l[0]??s.initialPageParam:iS(s,d);if(u>0&&b==null)break;d=await y(d,b),u++}while(u<w)}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a):t.fetchFn=p}}}function iS(e,{pages:t,pageParams:a}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,a[s],a):void 0}function Y7(e,{pages:t,pageParams:a}){return t.length>0?e.getPreviousPageParam?.(t[0],t,a[0],a):void 0}function CG(e,t){return t?iS(e,t)!=null:!1}function EG(e,t){return!t||!e.getPreviousPageParam?!1:Y7(e,t)!=null}var K7=class extends ym{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:th()})}getOptimisticResult(e){return e.behavior=th(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:a}=e,s=super.createResult(e,t),{isFetching:r,isRefetching:i,isError:l,isRefetchError:d}=s,u=a.fetchMeta?.fetchMore?.direction,p=l&&u==="forward",x=r&&u==="forward",m=l&&u==="backward",h=r&&u==="backward";return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:CG(t,a.data),hasPreviousPage:EG(t,a.data),isFetchNextPageError:p,isFetchingNextPage:x,isFetchPreviousPageError:m,isFetchingPreviousPage:h,isRefetchError:d&&!p&&!m,isRefetching:i&&!x&&!h}}},AG=class extends V7{#t;#e;#a;#s;constructor(e){super(),this.#t=e.client,this.mutationId=e.mutationId,this.#a=e.mutationCache,this.#e=[],this.state=e.state||Q7(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#a.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#a.remove(this))}continue(){return this.#s?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#n({type:"continue"})},a={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#s=H7({fn:()=>this.options.mutationFn?this.options.mutationFn(e,a):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#n({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#a.canRun(this)});const s=this.state.status==="pending",r=!this.#s.canStart();try{if(s)t();else{this.#n({type:"pending",variables:e,isPaused:r}),await this.#a.config.onMutate?.(e,this,a);const l=await this.options.onMutate?.(e,a);l!==this.state.context&&this.#n({type:"pending",context:l,variables:e,isPaused:r})}const i=await this.#s.start();return await this.#a.config.onSuccess?.(i,e,this.state.context,this,a),await this.options.onSuccess?.(i,e,this.state.context,a),await this.#a.config.onSettled?.(i,null,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(i,null,e,this.state.context,a),this.#n({type:"success",data:i}),i}catch(i){try{throw await this.#a.config.onError?.(i,e,this.state.context,this,a),await this.options.onError?.(i,e,this.state.context,a),await this.#a.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,a),await this.options.onSettled?.(void 0,i,e,this.state.context,a),i}finally{this.#n({type:"error",error:i})}}finally{this.#a.runNext(this)}}#n(e){const t=a=>{switch(e.type){case"failed":return{...a,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...a,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:e.error,failureCount:a.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Xa.batch(()=>{this.#e.forEach(a=>{a.onMutationUpdate(e)}),this.#a.notify({mutation:this,type:"updated",action:e})})}};function Q7(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var DG=class extends io{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#e=new Map,this.#a=0}#t;#e;#a;build(e,t,a){const s=new AG({client:e,mutationCache:this,mutationId:++this.#a,options:e.defaultMutationOptions(t),state:a});return this.add(s),s}add(e){this.#t.add(e);const t=lg(e);if(typeof t=="string"){const a=this.#e.get(t);a?a.push(e):this.#e.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){const t=lg(e);if(typeof t=="string"){const a=this.#e.get(t);if(a)if(a.length>1){const s=a.indexOf(e);s!==-1&&a.splice(s,1)}else a[0]===e&&this.#e.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=lg(e);if(typeof t=="string"){const s=this.#e.get(t)?.find(r=>r.state.status==="pending");return!s||s===e}else return!0}runNext(e){const t=lg(e);return typeof t=="string"?this.#e.get(t)?.find(s=>
9s!==e&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Xa.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(e){const t={exact:!0,...e};return this.getAll().find(a=>NO(t,a))}findAll(e={}){return this.getAll().filter(t=>NO(e,t))}notify(e){Xa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Xa.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ln))))}};function lg(e){return e.options.scope?.id}var OG=class extends io{#t;#e=void 0;#a;#s;constructor(t,a){super(),this.#t=t,this.setOptions(a),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const a=this.options;this.options=this.#t.defaultMutationOptions(t),rf(this.options,a)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#a,observer:this}),a?.mutationKey&&this.options.mutationKey&&qc(a.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#a?.state.status==="pending"&&this.#a.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#a?.removeObserver(this)}onMutationUpdate(t){this.#n(),this.#r(t)}getCurrentResult(){return this.#e}reset(){this.#a?.removeObserver(this),this.#a=void 0,this.#n(),this.#r()}mutate(t,a){return this.#s=a,this.#a?.removeObserver(this),this.#a=this.#t.getMutationCache().build(this.#t,this.options),this.#a.addObserver(this),this.#a.execute(t)}#n(){const t=this.#a?.state??Q7();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#r(t){Xa.batch(()=>{if(this.#s&&this.hasListeners()){const a=this.#e.variables,s=this.#e.context,r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#s.onSuccess?.(t.data,a,s,r),this.#s.onSettled?.(t.data,null,a,s,r)):t?.type==="error"&&(this.#s.onError?.(t.error,a,s,r),this.#s.onSettled?.(void 0,t.error,a,s,r))}this.listeners.forEach(a=>{a(this.#e)})})}};function OO(e,t){const a=new Set(t);return e.filter(s=>!a.has(s))}function kG(e,t,a){const s=e.slice(0);return s[t]=a,s}var _G=class extends io{#t;#e;#a;#s;#n;#r;#c;#i;#f=[];constructor(e,t,a){super(),this.#t=e,this.#s=a,this.#a=[],this.#n=[],this.#e=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#n.forEach(e=>{e.subscribe(t=>{this.#d(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#n.forEach(e=>{e.destroy()})}setQueries(e,t){this.#a=e,this.#s=t,Xa.batch(()=>{const a=this.#n,s=this.#o(this.#a);this.#f=s,s.forEach(x=>x.observer.setOptions(x.defaultedQueryOptions));const r=s.map(x=>x.observer),i=r.map(x=>x.getCurrentResult()),l=a.length!==r.length,d=r.some((x,m)=>x!==a[m]),u=l||d,p=u?!0:i.some((x,m)=>{const h=this.#e[m];return!h||!rf(x,h)});!u&&!p||(u&&(this.#n=r),this.#e=i,this.hasListeners()&&(u&&(OO(a,r).forEach(x=>{x.destroy()}),OO(r,a).forEach(x=>{x.subscribe(m=>{this.#d(x,m)})})),this.#l()))})}getCurrentResult(){return this.#e}getQueries(){return this.#n.map(e=>e.getCurrentQuery())}getObservers(){return this.#n}getOptimisticResult(e,t){const a=this.#o(e),s=a.map(r=>r.observer.getOptimisticResult(r.defaultedQueryOptions));return[s,r=>this.#p(r??s,t),()=>this.#u(s,a)]}#u(e,t){return t.map((a,s)=>{const r=e[s];return a.defaultedQueryOptions.notifyOnChangeProps?r:a.observer.trackResult(r,i=>{t.forEach(l=>{l.observer.trackProp(i)})})})}#p(e,t){return t?((!this.#r||this.#e!==this.#i||t!==this.#c)&&(this.#c=t,this.#i=this.#e,this.#r=h5(this.#r,t(e))),this.#r):e}#o(e){const t=new Map(this.#n.map(s=>[s.options.queryHash,s])),a=[];return e.forEach(s=>{const r=this.#t.defaultQueryOptions(s),i=t.get(r.queryHash);i?a.push({defaultedQueryOptions:r,observer:i}):a.push({defaultedQueryOptions:r,observer:new ym(this.#t,r)})}),a}#d(e,t){const a=this.#n.indexOf(e);a!==-1&&(this.#e=kG(this.#e,a,t),this.#l())}#l(){if(this.hasListeners()){const e=this.#r,t=this.#u(this.#e,this.#f),a=this.#p(t,this.#s?.combine);e!==a&&Xa.batch(()=>
vendor: 13,601 bytes, lines 9-17
9{this.listeners.forEach(s=>{s(this.#e)})})}}},TG=class extends io{constructor(e={}){super(),this.config=e,this.#t=new Map}#t;build(e,t,a){const s=t.queryKey,r=t.queryHash??g5(s,t);let i=this.get(r);return i||(i=new wG({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:a,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){this.#t.has(e.queryHash)||(this.#t.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#t.get(e.queryHash);t&&(e.destroy(),t===e&&this.#t.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Xa.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#t.get(e)}getAll(){return[...this.#t.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(a=>wO(t,a))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(a=>wO(e,a)):t}notify(e){Xa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Xa.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xa.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},PG=class{#t;#e;#a;#s;#n;#r;#c;#i;constructor(e={}){this.#t=e.queryCache||new TG,this.#e=e.mutationCache||new DG,this.#a=e.defaultOptions||{},this.#s=new Map,this.#n=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#c=v5.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=eh.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#c?.(),this.#c=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#t.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#e.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=this.#t.build(this,t),s=a.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(Mc(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return this.#t.findAll(e).map(({queryKey:t,state:a})=>{const s=a.data;return[t,s]})}setQueryData(e,t,a){const s=this.defaultQueryOptions({queryKey:e}),i=this.#t.get(s.queryHash)?.state.data,l=pG(t,i);if(l!==void 0)return this.#t.build(this,s).setData(l,{...a,manual:!0})}setQueriesData(e,t,a){return Xa.batch(()=>this.#t.findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,a)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#t.get(t.queryHash)?.state}removeQueries(e){const t=this.#t;Xa.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=this.#t;return Xa.batch(()=>(a.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},s=Xa.batch(()=>this.#t.findAll(e).map(r=>r.cancel(a)));return Promise.all(s).then(Ln).catch(Ln)}invalidateQueries(e,t={}){return Xa.batch(()=>(this.#t.findAll(e).forEach(a=>{a.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const a={...t,cancelRefetch:t.cancelRefetch??!0},s=Xa.batch(()=>this.#t.findAll(e).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,a);return a.throwOnError||(i=i.catch(Ln)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(Ln)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=this.#t.build(this,t);return a.isStaleByTime(Mc(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ln).catch(Ln)}fetchInfiniteQuery(e){return e.behavior=th(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ln).catch(Ln)}ensureInfiniteQueryData(e){return e.behavior=th(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eh.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#a}setDefaultOptions(e){this.#a=e}setQueryDefaults(e,t){this.#s.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#s.values()],a={};return t.forEach(s=>{sf(e,s.queryKey)&&Object.assign(a,s.defaultOptions)}),a}setMutationDefaults(e,t){this.#n.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#n.values()],a={};return t.forEach(s=>{sf(e,s.mutationKey)&&Object.assign(a,s.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#a.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=g5(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===ws&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#a.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},c1={exports:{}},Dt={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and 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 kO;function MG(){if(kO)return Dt;kO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),h=Symbol.iterator;function y(G){return G===null||typeof G!="object"?null:(G=h&&G[h]||G["@@iterator"],typeof G=="function"?G:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,j={};function S(G,F,H){this.props=G,this.context=F,this.refs=j,this.updater=H||w}S.prototype.isReactComponent={},S.prototype.setState=function(G,F){if(typeof G!="object"&&typeof G!="function"&&G!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,G,F,"setState")},S.prototype.forceUpdate=function(G){this.updater.enqueueForceUpdate(this,G,"forceUpdate")};function O(){}O.prototype=S.prototype;function A(G,F,H){this.props=G,this.context=F,this.refs=j,this.updater=H||w}var k=A.prototype=new O;k.constructor=A,b(k,S.prototype),k.isPureReactComponent=!0;var E=Array.isArray;function D(){}var _={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function I(G,F,H){var q=H.ref;return{$$typeof:e,type:G,key:F,ref:q!==void 0?q:null,props:H}}function $(G,F){return I(G.type,F,G.props)}function R(G){return typeof G=="object"&&G!==null&&G.$$typeof===e}function B(G){var F={"=":"=0",":":"=2"};return"$"+G.replace(/[=:]/g,function(H){return F[H]})}var Y=/\/+/g;function z(G,F){return typeof G=="object"&&G!==null&&G.key!=null?B(""+G.key):F.toString(36)}function Q(G){switch(G.status){case"fulfilled":return G.value;case"rejected":throw G.reason;default:switch(typeof G.status=="string"?G.then(D,D):(G.status="pending",G.then(function(F){G.status==="pending"&&(G.status="fulfilled",G.value=F)},function(F){G.status==="pending"&&(G.status="rejected",G.reason=F)})),G.status){case"fulfilled":return G.value;case"rejected":throw G.reason}}throw G}function L(G,F,H,q,J){var ce=typeof G;(ce==="undefined"||ce==="boolean")&&(G=null);var se=!1;if(G===null)se=!0;else switch(ce){case"bigint":case"string":case"number":se=!0;break;case"object":switch(G.$$typeof){case e:case t:se=!0;break;case x:return se=G._init,L(se(G._payload),F,H,q,J)}}if(se)return J=J(G),se=q===""?"."+z(G,0):q,E(J)?(H="",se!=null&&(H=se.replace(Y,"$&/")+"/"),L(J,F,H,"",function(ve){return ve})):J!=null&&(R(J)&&(J=$(J,H+(J.key==null||G&&G.key===J.key?"":(""+J.key).replace(Y,"$&/")+"/")+se)),F.push(J)),1;se=0;var ye=q===""?".":q+":";if(E(G))for(var de=0;de<G.length;de++)q=G[de],ce=ye+z(q,de),se+=L(q,F,H,ce,J);else if(de=y(G),typeof de=="function")for(G=de.call(G),de=0;!(q=G.next()).done;)q=q.value,ce=ye+z(q,de++),se+=L(q,F,H,ce,J);else if(ce==="object"){if(typeof G.then=="function")return L(Q(G),F,H,q,J);throw F=String(G),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(G).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return se}function M(G,F,H){if(G==null)return G;var q=[],J=0;return L(G,q,"","",function(ce){return F.call(H,ce,J++)}),q}function U(G){if(G._status===-1){var F=G._result;F=F(),F.then(function(H){(G._status===0||G._status===-1)&&(G._status=1,G._result=H)},function(H){(G._status===0||G._status===-1)&&(G._status=2,G._result=H)}),G._status===-1&&(G._status=0,G._result=F)}if(G._status===1)return G._result.default;throw G._result}var Z=typeof reportError=="function"?reportError:function(G){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof G=="object"&&G!==null&&typeof G.message=="string"?String(G.message):String(G),error:G});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",G);return}console.error(G)},ie={map:M,forEach:function(G,F,H){M(G,function(){F.apply(this,arguments)},H)},count:function(G){var F=0;return M(G,function(){F++}),F},toArray:function(G){return M(G,function(F){return F})||[]},only:function(G){if(!R(G))throw Error("React.Children.only expected to receive a single React element child.");return G}};return Dt.Activity=m,Dt.Children=ie,Dt.Component=S,Dt.Fragment=a,Dt.Profiler=r,Dt.PureComponent=A,Dt.StrictMode=s,Dt.Suspense=u,Dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Dt.__COMPILER_RUNTIME={__proto__:null,c:function(G){return _.H.useMemoCache(G)}},Dt.cache=function(G){return function(){return G.apply(null,arguments)}},Dt.cacheSignal=function(){return null},Dt.cloneElement=function(G,F,H){if(G==null)throw Error("The argument must be a React element, but you passed "+G+".");var q=b({},G.props),J=G.key;if(F!=null)for(ce in F.key!==void 0&&(J=""+F.key),F)!T.call(F,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&F.ref===void 0||(q[ce]=F[ce]);var ce=arguments.length-2;if(ce===1)q.children=H;else if(1<ce){for(var se=Array(ce),ye=0;ye<ce;ye++)se[ye]=arguments[ye+2];q.children=se}return I(G.type,J,q)},Dt.createContext=function(G){return G={$$typeof:l,_currentValue:G,_currentValue2:G,_threadCount:0,Provider:null,Consumer:null},G.Provider=G,G.Consumer={$$typeof:i,_context:G},G},Dt.createElement=function(G,F,H){var q,J={},ce=null;if(F!=null)for(q in F.key!==void 0&&(ce=""+F.key),F)T.call(F,q)&&q!=="key"&&q!=="__self"&&q!=="__source"&&(J[q]=F[q]);var se=arguments.length-2;if(se===1)J.children=H;else if(1<se){for(var ye=Array(se),de=0;de<se;de++)ye[de]=arguments[de+2];J.children=ye}if(G&&G.defaultProps)for(q in se=G.defaultProps,se)J[q]===void 0&&(J[q]=se[q]);return I(G,ce,J)},Dt.createRef=function(){return{current:null}},Dt.forwardRef=function(G){return{$$typeof:d,render:G}},Dt.isValidElement=R,Dt.lazy=function(G){return{$$typeof:x,_payload:{_status:-1,_result:G},_init:U}},Dt.memo=function(G,F){return{$$typeof:p,type:G,compare:F===void 0?null:F}},Dt.startTransition=function(G){var F=_.T,H={};_.T=H;try{var q=G(),J=_.S;J!==null&&J(H,q),typeof q=="object"&&q!==null&&typeof q.then=="function"&&q.then(D,Z)}catch(ce){Z(ce)}finally{F!==null&&H.types!==null&&(F.types=H.types),_.T=F}},Dt.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Dt.use=function(G){return _.H.use(G)},Dt.useActionState=function(G,F,H){return _.H.useActionState(G,F,H)},Dt.useCallback=function(G,F){return _.H.useCallback(G,F)},Dt.useContext=function(G){return _.H.useContext(G)},Dt.useDebugValue=function(){},Dt.useDeferredValue=function(G,F){return _.H.useDeferredValue(G,F)},Dt.useEffect=function(G,F){return _.H.useEffect(G,F)},Dt.useEffectEvent=function(G){return _.H.useEffectEvent(G)},Dt.useId=function(){return _.H.useId()},Dt.useImperativeHandle=function(G,F,H){return _.H.useImperativeHandle(G,F,H)},Dt.useInsertionEffect=function(G,F){return _.H.useInsertionEffect(G,F)},Dt.useLayoutEffect=function(G,F){return _.H.useLayoutEffect(G,F)},Dt.useMemo=function(G,F){return _.H.useMemo(G,F)},Dt.useOptimistic=function(G,F){return _.H.useOptimistic(G,F)},Dt.useReducer=function(G,F,H){return _.H.useReducer(G,F,H)},Dt.useRef=function(G){return _.H.useRef(G)},Dt.useState=function(G){return _.H.useState(G)},Dt.useSyncExternalStore=function(G,F,H){return _.H.useSyncExternalStore(G,F,H)},Dt.useTransition=function(){return _.H.useTransition()},Dt.version="19.2.1",Dt}var _O;function wv(){return _O||(_O=1,c1.exports=MG()),c1.exports}var v=wv();const W=Na(v),Nv=iG({__proto__:null,default:W},[v]);var X7=v.createContext(void 0),bm=e=>{const t=v.useContext(X7);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RG=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),n.jsx(X7.Provider,{value:e,children:t})),Z7=v.createContext(!1),J7=()=>v.useContext(Z7);Z7.Provider;function BG(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
17var IG=v.createContext(BG()),eB=()=>v.useContext(IG),tB=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},aB=e=>{v.useEffect(()=>{e.clearReset()},[e])},nB=({result:e,errorResetBoundary:t,throwOnError:a,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||F7(a,[e.error,s])),b5=(e,t)=>t.state.data===void 0,sB=e=>{if(e.suspense){const a=r=>r==="static"?r:Math.max(r??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...r)=>a(s(...r)):a(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rB=(e,t)=>e.isLoading&&e.isFetching&&!t,cS=(e,t)=>e?.suspense&&t.isPending,ah=(e,t,a)=>t.fetchOptimistic(e).catch(()=>{a.clearReset()});function iB({queries:e,...t},a){const s=bm(a),r=J7(),i=eB(),l=v.useMemo(()=>e.map(b=>{const j=s.defaultQueryOptions(b);return j._optimisticResults=r?"isRestoring":"optimistic",j}),[e,s,r]);l.forEach(b=>{sB(b),tB(b,i)}),aB(i);const[d]=v.useState(()=>new _G(s,l,t)),[u,p,x]=d.getOptimisticResult(l,t.combine),m=!r&&t.subscribed!==!1;v.useSyncExternalStore(v.useCallback(b=>m?d.subscribe(Xa.batchCalls(b)):Ln,[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),v.useEffect(()=>{d.setQueries(l,t)},[l,t,d]);const y=u.some((b,j)=>cS(l[j],b))?u.flatMap((b,j)=>{const S=l[j];if(S){const O=new ym(s,S);if(cS(S,b))return ah(S,O,i);rB(b,r)&&ah(S,O,i)}return[]}):[];if(y.length>0)throw Promise.all(y);const w=u.find((b,j)=>{const S=l[j];return S&&nB({result:b,errorResetBoundary:i,throwOnError:S.throwOnError,query:s.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(w?.error)throw w.error;return p(x())}function Sv(e,t,a){const s=J7(),r=eB(),i=bm(a),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l),l._optimisticResults=s?"isRestoring":"optimistic",sB(l),tB(l,r),aB(r);const d=!i.getQueryCache().get(l.queryHash),[u]=v.useState(()=>new t(i,l)),p=u.getOptimisticResult(l),x=!s&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(m=>{const h=x?u.subscribe(Xa.batchCalls(m)):Ln;return u.updateResult(),h},[u,x]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),v.useEffect(()=>{u.setOptions(l)},[l,u]),cS(l,p))throw ah(l,u,r);if(nB({result:p,errorResetBoundary:r,throwOnError:l.throwOnError,query:i.getQueryCache().get(l.queryHash),suspense:l.suspense}))throw p.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Vl&&rB(p,s)&&(d?ah(l,u,r):i.getQueryCache().get(l.queryHash)?.promise)?.catch(Ln).finally(()=>{u.updateResult()}),l.notifyOnChangeProps?p:u.trackResult(p)}function LG(e,t){return Sv(e,ym,t)}function $G(e,t){return Sv({...e,enabled:!0,suspense:!0,throwOnError:b5,placeholderData:void 0},ym,t)}function zG(e,t){return Sv({...e,enabled:!0,suspense:!0,throwOnError:b5},K7,t)}function UG(e,t){return iB({...e,queries:e.queries.map(a=>({...a,suspense:!0,throwOnError:b5,enabled:!0,placeholderData:void 0}))},t)}function qG(e,t){const a=bm(t);a.getQueryState(e.queryKey)||a.prefetchQuery(e)}function FG(e,t){const a=bm(t);a.getQueryState(e.queryKey)||a.prefetchInfiniteQuery(e)}function WG(e,t){const a=bm(t),[s]=v.useState(()=>new OG(a,e));v.useEffect(()=>{s.setOptions(e)},[s,e]);const r=v.useSyncExternalStore(v.useCallback(l=>s.subscribe(Xa.batchCalls(l)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),i=v.useCallback((l,d)=>{s.mutate(l,d).catch(Ln)},[s]);if(r.error&&F7(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function HG(e,t){return Sv(e,K7,t)}function Gl(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}const VG=typeof Symbol=="function"&&!!Symbol.asyncIterator;function cB(e){return VG&&Gl(e)&&Symbol.asyncIterator in e}var GG=Object.create,lB=Object.defineProperty,YG=Object.getOwnPropertyDescriptor,oB=Object.getOwnPropertyNames,KG=Object.getPrototypeOf,QG=Object.prototype.hasOwnProperty,jm=(e,t)=>function(){return t||(0,e[oB(e)[0]])((t={exports:{}}).exports,t),t.exports},XG=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=oB(t),i=0,l=r.length,d;i<l;i++)d=r[i],!QG.call(e,d)&&d!==a&&lB(e,d,{get:(u=>t[u]).bind(null,d),enumerable:!(s=YG(t,d))||s.enumerable});return e},Cv=(e,t,a)=>(a=e!=null?GG(KG(e)):{},XG(lB(a,"default",{value:e,enumerable:!0}),e));const dB=()=>{},TO=e=>{Object.freeze&&Object.freeze(e)};function uB(e,t,a){var s;const r=t.join(".");return(s=a[r])!==null&&s!==void 0||(a[r]=new Proxy(dB,{get(i,l){if(!(typeof l!="string"||l==="then"))return uB(e,[...t,l],a)},apply(i,l,d){const u=t[t.length-1];let p={args:d,path:t};return u==="call"?p={args:d.length>=2?[d[1]]:[],path:t.slice(0,-1)}:u==="apply"&&(p={args:d.length>=2?d[1]:[],path:t.slice(0,-1)}),TO(p.args),TO(p.path),e(p)}})),a[r]}const Ev=e=>uB(e,[],Object.create(null)),j5=e=>new Proxy(dB,{get(t,a){if(a!=="then")return e(a)}});var pB=jm({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function a(s){"@babel/helpers - typeof";return t.exports=a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r}
17,t.exports.__esModule=!0,t.exports.default=t.exports,a(s)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),ZG=jm({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var a=pB().default;function s(r,i){if(a(r)!="object"||!r)return r;var l=r[Symbol.toPrimitive];if(l!==void 0){var d=l.call(r,i||"default");if(a(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),JG=jm({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var a=pB().default,s=ZG();function r(i){var l=s(i,"string");return a(l)=="symbol"?l:l+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),fB=jm({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var a=JG();function s(r,i,l){return(i=a(i))in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),w5=jm({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var a=fB();function s(i,l){var d=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);l&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(i,p).enumerable})),d.push.apply(d,u)}return d}function r(i){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?s(Object(d),!0).forEach(function(u){a(i,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(d,u))})}return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Cv(w5());Cv(fB());var og=Cv(w5());function eY(e,t){if("error"in e){const s=t.deserialize(e.error);return{ok:!1,error:(0,og.default)((0,og.default)({},e),{},{error:s})}}return{ok:!0,result:(0,og.default)((0,og.default)({},e.result),(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)})}}var l1=class extends Error{constructor(){super("Unable to transform response from server")}};function tY(e,t){let a;try{a=eY(e,t)}catch{throw new l1}if(!a.ok&&(!Gl(a.error.error)||typeof a.error.error.code!="number"))throw new l1;if(a.ok&&!Gl(a.result))throw new l1;return a}Cv(w5());function Av(e){const t={subscribe(a){let s=null,r=!1,i=!1,l=!1;function d(){if(s===null){l=!0;return}i||(i=!0,typeof s=="function"?s():s&&s.unsubscribe())}return s=e({next(u){var p;r||(p=a.next)===null||p===void 0||p.call(a,u)},error(u){var p;r||(r=!0,(p=a.error)===null||p===void 0||p.call(a,u),d())},complete(){var u;r||(r=!0,(u=a.complete)===null||u===void 0||u.call(a),d())}}),l&&d(),{unsubscribe:d}},pipe(...a){return a.reduce(aY,t)}};return t}function aY(e,t){return t(e)}function nY(e){const t=new AbortController;return new Promise((s,r)=>{let i=!1;function l(){i||(i=!0,d.unsubscribe())}t.signal.addEventListener("abort",()=>{r(t.signal.reason)});const d=e.subscribe({next(u){i=!0,s(u),l()},error(u){r(u)},complete(){t.abort(),l()}})})}var sY=Object.create,mB=Object.defineProperty,rY=Object.getOwnPropertyDescriptor,xB=Object.getOwnPropertyNames,iY=Object.getPrototypeOf,cY=Object.prototype.hasOwnProperty,Xc=(e,t)=>function(){return t||(0,e[xB(e)[0]])((t={exports:{}}).exports,t),t.exports},lY=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=xB(t),i=0,l=r.length,d;i<l;i++)d=r[i],!cY.call(e,d)&&d!==a&&mB(e,d,{get:(u=>t[u]).bind(null,d),enumerable:!(s=rY(t,d))||s.enumerable});return e},co=(e,t,a)=>(a=e!=null?sY(iY(e)):{},lY(t||!e||!e.__esModule?mB(a,"default",{value:e,enumerable:!0}):a,e)),oY=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(e,t){function a(s,r){if(s==null)return{};var i={};for(var l in s)if({}.hasOwnProperty.call(s,l)){if(r.includes(l))continue;i[l]=s[l]}return i}
17t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),dY=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(e,t){var a=oY();function s(r,i){if(r==null)return{};var l,d,u=a(r,i);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(r);for(d=0;d<p.length;d++)l=p[d],i.includes(l)||{}.propertyIsEnumerable.call(r,l)&&(u[l]=r[l])}return u}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),gB=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function a(s){"@babel/helpers - typeof";return t.exports=a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},t.exports.__esModule=!0,t.exports.default=t.exports,a(s)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),uY=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var a=gB().default;function s(r,i){if(a(r)!="object"||!r)return r;var l=r[Symbol.toPrimitive];if(l!==void 0){var d=l.call(r,i||"default");if(a(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),pY=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var a=gB().default,s=uY();function r(i){var l=s(i,"string");return a(l)=="symbol"?l:l+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),fY=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var a=pY();function s(r,i,l){return(i=a(i))in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),wm=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var a=fY();function s(i,l){var d=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);l&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(i,p).enumerable})),d.push.apply(d,u)}return d}function r(i){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?s(Object(d),!0).forEach(function(u){a(i,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(d,u))})}return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),mY=co(dY(),1),PO=co(wm(),1);const xY=["cursor","direction"];function Mr(e,t,a){const s=e.flatMap(r=>r.split("."));if(!t&&(!a||a==="any"))return s.length?[s]:[];if(a==="infinite"&&Gl(t)&&("direction"in t||"cursor"in t)){const{cursor:r,direction:i}=t,l=(0,mY.default)(t,xY);return[s,{input:l,type:"infinite"}]}return[s,(0,PO.default)((0,PO.default)({},typeof t<"u"&&t!==ws&&{input:t}),a&&a!=="any"&&{type:a})]}function Wg(e){return Mr(e,void 0,"any")}var gY=Object.create,hB=Object.defineProperty,hY=Object.getOwnPropertyDescriptor,vB=Object.getOwnPropertyNames,vY=Object.getPrototypeOf,yY=Object.prototype.hasOwnProperty,Xr=(e,t)=>function(){return t||(0,e[vB(e)[0]])((t={exports:{}}).exports,t),t.exports},bY=(e,t,a,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=vB(t),i=0,l=r.length,d;i<l;i++)d=r[i],!yY.call(e,d)&&d!==a&&hB(e,d,{get:(u=>t[u]).bind(null,d),enumerable:!(s=hY(t,d))||s.enumerable});return e},tn=(e,t,a)=>(a=e!=null?gY(vY(e)):{},bY(t||!e||!e.__esModule?hB(a,"default",{value:e,enumerable:!0}):a,e)),yB=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function a(s){"@babel/helpers - typeof";return t.exports=a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r}
17,t.exports.__esModule=!0,t.exports.default=t.exports,a(s)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),jY=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var a=yB().default;function s(r,i){if(a(r)!="object"||!r)return r;var l=r[Symbol.toPrimitive];if(l!==void 0){var d=l.call(r,i||"default");if(a(d)!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),wY=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var a=yB().default,s=jY();function r(i){var l=s(i,"string");return a(l)=="symbol"?l:l+""}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),lo=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var a=wY();function s(r,i,l){return(i=a(i))in r?Object.defineProperty(r,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):r[i]=l,r}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),br=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var a=lo();function s(i,l){var d=Object.keys(i);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(i);l&&(u=u.filter(function(p){return Object.getOwnPropertyDescriptor(i,p).enumerable})),d.push.apply(d,u)}return d}function r(i){for(var l=1;l<arguments.length;l++){var d=arguments[l]!=null?arguments[l]:{};l%2?s(Object(d),!0).forEach(function(u){a(i,u,d[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(d)):s(Object(d)).forEach(function(u){Object.defineProperty(i,u,Object.getOwnPropertyDescriptor(d,u))})}return i}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});function NY(e){return t=>{let a=0,s=null;const r=[];function i(){s||(s=t.subscribe({next(d){for(const p of r){var u;(u=p.next)===null||u===void 0||u.call(p,d)}},error(d){for(const p of r){var u;(u=p.error)===null||u===void 0||u.call(p,d)}},complete(){for(const u of r){var d;(d=u.complete)===null||d===void 0||d.call(u)}}}))}function l(){if(a===0&&s){const d=s;s=null,d.unsubscribe()}}return Av(d=>(a++,r.push(d),i(),{unsubscribe(){a--,l();const u=r.findIndex(p=>p===d);u>-1&&r.splice(u,1)}}))}}function SY(e){let t=e;const a=[],s=l=>{t!==void 0&&l.next(t),a.push(l)},r=l=>{a.splice(a.indexOf(l),1)},i=Av(l=>(s(l),()=>{r(l)}));return i.next=l=>{if(t!==l){t=l;for(const d of a)d.next(l)}},i.get=()=>t,i}function CY(e){return Av(t=>{function a(r=0,i=e.op){const l=e.links[r];if(!l)throw new Error("No more links to execute - did you forget to add an ending link?");return l({op:i,next(u){return a(r+1,u)}})}return a().subscribe(t)})}var dg=tn(lo(),1),Jo=tn(br(),1);function EY(e){return e instanceof kd}function AY(e){return Gl(e)&&Gl(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function DY(e,t){return typeof e=="string"?e:Gl(e)&&typeof e.message=="string"?e.message:t}var kd=class Hg extends Error{constructor(t,a){var s,r;const i=a?.cause;super(t,{cause:i}),(0,dg.default)(this,"cause",void 0),(0,dg.default)(this,"shape",void 0),(0,dg.default)(this,"data",void 0),(0,dg.default)(this,"meta",void 0),this.meta=a?.meta,this.cause=i,this.shape=a==null||(s=a.result)===null||s===void 0?void 0:s.error,this.data=a==null||(r=a.result)===null||r===void 0?void 0:r.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,Hg.prototype)}static from(t,a={}){const s=t;return EY(s)?(a.meta&&(s.meta=(0,Jo.default)((0,Jo.default)({},s.meta),a.meta)),s):AY(s)?new Hg(s.error.message,(0,Jo.default)((0,Jo.default)({},a),{},{result:s})):new Hg(DY(s,"Unknown error"),(0,Jo.default)((0,Jo.default)({},a),{},{cause:s}))}};function OY(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:a=>a,deserialize:a=>a},output:{serialize:a=>a,deserialize:a=>a}}}const MO=e=>typeof e=="function";function kY(e){if(e)return e;if(typeof window<"u"&&MO(window.fetch))return window.fetch;if(typeof globalThis<"u"&&MO(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var Wp=tn(br());function _Y(e){return{url:e.url.toString(),fetch:e.fetch,transformer:OY(e.transformer),methodOverride:e.methodOverride}}function TY(e){const t={};for(let a=0;a<e.length;a++){const s=e[a];t[a]=s}return t}const PY={query:"GET",mutation:"POST",subscription:"PATCH"};function bB(e){return"input"in e?e.transformer.input.serialize(e.input):TY(e.input
17s.map(t=>e.transformer.input.serialize(t)))}const jB=e=>{const t=e.url.split("?");let s=t[0].replace(/\/$/,"")+"/"+e.path;const r=[];if(t[1]&&r.push(t[1]),"inputs"in e&&r.push("batch=1"),e.type==="query"||e.type==="subscription"){const i=bB(e);i!==void 0&&e.methodOverride!=="POST"&&r.push(`input=${encodeURIComponent(JSON.stringify(i))}`)}return r.length&&(s+="?"+r.join("&")),s},MY=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=bB(e);return t!==void 0?JSON.stringify(t):void 0},RY=e=>$Y((0,Wp.default)((0,Wp.default)({},e),{},{contentTypeHeader:"application/json",getUrl:jB,getBody:MY}));var BY=class extends Error{constructor(){const e="AbortError";super(e),this.name=e,this.message=e}};const IY=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)===null||t===void 0||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new BY};async function LY(e){var t;IY(e.signal);const a=e.getUrl(e),s=e.getBody(e),r=(t=e.methodOverride)!==null&&t!==void 0?t:PY[e.type],i=await(async()=>{const d=await e.headers();return Symbol.iterator in d?Object.fromEntries(d):d})(),l=(0,Wp.default)((0,Wp.default)((0,Wp.default)({},e.contentTypeHeader&&r!=="GET"?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0),i);return kY(e.fetch)(a,{method:r,signal:e.signal,body:s,headers:l})}async function $Y(e){const t={},a=await LY(e);t.response=a;const s=await a.json();return t.responseJSON=s,{json:s,meta:t}}tn(br(),1);const RO=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function BO(e){let t=null,a=null;const s=()=>{clearTimeout(a),a=null,t=null};function r(d){const u=[[]];let p=0;for(;;){const h=d[p];if(!h)break;const y=u[u.length-1];if(h.aborted){var x;(x=h.reject)===null||x===void 0||x.call(h,new Error("Aborted")),p++;continue}if(e.validate(y.concat(h).map(b=>b.key))){y.push(h),p++;continue}if(y.length===0){var m;(m=h.reject)===null||m===void 0||m.call(h,new Error("Input is too big for a single dispatch")),p++;continue}u.push([])}return u}function i(){const d=r(t);s();for(const u of d){if(!u.length)continue;const p={items:u};for(const m of u)m.batch=p;e.fetch(p.items.map(m=>m.key)).then(async m=>{await Promise.all(m.map(async(y,w)=>{const b=p.items[w];try{var j;const O=await Promise.resolve(y);(j=b.resolve)===null||j===void 0||j.call(b,O)}catch(O){var S;(S=b.reject)===null||S===void 0||S.call(b,O)}b.batch=null,b.reject=null,b.resolve=null}));for(const y of p.items){var h;(h=y.reject)===null||h===void 0||h.call(y,new Error("Missing result")),y.batch=null}}).catch(m=>{for(const y of p.items){var h;(h=y.reject)===null||h===void 0||h.call(y,m),y.batch=null}})}}function l(d){var u;const p={aborted:!1,key:d,batch:null,resolve:RO,reject:RO},x=new Promise((m,h)=>{var y;p.reject=h,p.resolve=m,(y=t)!==null&&y!==void 0||(t=[]),t.push(p)});return(u=a)!==null&&u!==void 0||(a=setTimeout(i)),x}return{load:l}}function zY(...e){const t=new AbortController,a=e.length;let s=0;const r=()=>{++s===a&&t.abort()};for(const i of e)i?.aborted?r():i?.addEventListener("abort",r,{once:!0});return t.signal}var ug=tn(br(),1);function UY(e){var t,a;const s=_Y(e),r=(t=e.maxURLLength)!==null&&t!==void 0?t:1/0,i=(a=e.maxItems)!==null&&a!==void 0?a:1/0;return()=>{const l=x=>({validate(m){if(r===1/0&&i===1/0)return!0;if(m.length>i)return!1;const h=m.map(b=>b.path).join(","),y=m.map(b=>b.input);return jB((0,ug.default)((0,ug.default)({},s),{},{type:x,path:h,inputs:y,signal:null})).length<=r},async fetch(m){const h=m.map(O=>O.path).join(","),y=m.map(O=>O.input),w=zY(...m.map(O=>O.signal)),b=await RY((0,ug.default)((0,ug.default)({},s),{},{path:h,inputs:y,type:x,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:m}):e.headers:{}},signal:w}));return(Array.isArray(b.json)?b.json:m.map(()=>b.json)).map(O=>({meta:b.meta,json:O}))}}),d=BO(l("query")),u=BO(l("mutation")),p={query:d,mutation:u};return({op:x})=>Av(m=>{/* istanbul ignore if -- @preserve */if(x.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const y=p[x.type].load(x);let w;return y.then(b=>{w=b;const j=tY(b.json,s.transformer.output);if(!j.ok){m.error(kd.from(j.error,{meta:b.meta}));return}m.next({context:b.meta,result:j.result}),m.complete()}).catch(b=>{m.error(kd.from(b,{meta:w?.meta}))}),()=>{}})}}tn(br(),1);
17const wB=(e,...t)=>typeof e=="function"?e(...t):e;tn(lo(),1);function qY(){let e,t;return{promise:new Promise((s,r)=>{e=s,t=r}),resolve:e,reject:t}}async function FY(e){const t=await wB(e.url);if(!e.connectionParams)return t;const s=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+s}async function WY(e){const t={method:"connectionParams",data:await wB(e)};return JSON.stringify(t)}tn(lo(),1);var kl=tn(lo(),1);function HY(e){const{promise:t,resolve:a,reject:s}=qY();return e.addEventListener("open",()=>{e.removeEventListener("error",s),a()}),e.addEventListener("error",s),t}function VY(e,{intervalMs:t,pongTimeoutMs:a}){let s,r;function i(){s=setTimeout(()=>{e.send("PING"),r=setTimeout(()=>{e.close()},a)},t)}function l(){clearTimeout(s),i()}function d(){clearTimeout(r),l()}e.addEventListener("open",i),e.addEventListener("message",({data:u})=>{clearTimeout(s),i(),u==="PONG"&&d()}),e.addEventListener("close",()=>{clearTimeout(s),clearTimeout(r)})}var GY=class lS{constructor(t){var a;if((0,kl.default)(this,"id",++lS.connectCount),(0,kl.default)(this,"WebSocketPonyfill",void 0),(0,kl.default)(this,"urlOptions",void 0),(0,kl.default)(this,"keepAliveOpts",void 0),(0,kl.default)(this,"wsObservable",SY(null)),(0,kl.default)(this,"openPromise",null),this.WebSocketPonyfill=(a=t.WebSocketPonyfill)!==null&&a!==void 0?a:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++lS.connectCount;const a=FY(t.urlOptions).then(s=>new t.WebSocketPonyfill(s));t.openPromise=a.then(async s=>{t.ws=s,s.addEventListener("message",function({data:r}){r==="PING"&&this.send("PONG")}),t.keepAliveOpts.enabled&&VY(s,t.keepAliveOpts),s.addEventListener("close",()=>{t.ws===s&&(t.ws=null)}),await HY(s),t.urlOptions.connectionParams&&s.send(await WY(t.urlOptions.connectionParams))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var t=this;try{await t.openPromise}finally{var a;(a=t.ws)===null||a===void 0||a.close()}}};(0,kl.default)(GY,"connectCount",0);tn(lo(),1);tn(br(),1);var o1=tn(lo(),1),IO=tn(br(),1),Dv=class{constructor(e){(0,o1.default)(this,"links",void 0),(0,o1.default)(this,"runtime",void 0),(0,o1.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=e.links.map(t=>t(this.runtime))}$request(e){var t;return CY({links:this.links,op:(0,IO.default)((0,IO.default)({},e),{},{context:(t=e.context)!==null&&t!==void 0?t:{},id:++this.requestId})}).pipe(NY())}async requestAsPromise(e){var t=this;try{const a=t.$request(e);return(await nY(a)).result.data}catch(a){throw kd.from(a)}}query(e,t,a){return this.requestAsPromise({type:"query",path:e,input:t,context:a?.context,signal:a?.signal})}mutation(e,t,a){return this.requestAsPromise({type:"mutation",path:e,input:t,context:a?.context,signal:a?.signal})}subscription(e,t,a){return this.$request({type:"subscription",path:e,input:t,context:a.context,signal:a.signal}).subscribe({next(r){switch(r.result.type){case"state":{var i;(i=a.onConnectionStateChange)===null||i===void 0||i.call(a,r.result);break}case"started":{var l;(l=a.onStarted)===null||l===void 0||l.call(a,{context:r.context});break}case"stopped":{var d;(d=a.onStopped)===null||d===void 0||d.call(a);break}case"data":case void 0:{var u;(u=a.onData)===null||u===void 0||u.call(a,r.result.data);break}}},error(r){var i;(i=a.onError)===null||i===void 0||i.call(a,r)},complete(){var r;(r=a.onComplete)===null||r===void 0||r.call(a)}})}};const NB=Symbol.for("trpc_untypedClient"),YY={query:"query",mutate:"mutation",subscribe:"subscription"},KY=e=>YY[e];function SB(e){const t=Ev(({path:a,args:s})=>{const r=[...a],i=KY(r.pop()),l=r.join(".");return e[i](l,...s)});return j5(a=>a===NB?e:t[a])}function QY(e){const t=new Dv(e);return SB(t)}function N5(e){return e[NB]}tn(br(),1);tn(br(),1);var XY=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function a(r){var i,l,d,u=2;for(typeof Symbol<"u"&&(l=Symbol.asyncIterator,d=Symbol.iterator);u--;){if(l&&(i=r[l])!=null)return i.call(r);if(d&&(i=r[d])!=null)return new s(i.call(r));
17l="@@asyncIterator",d="@@iterator"}throw new TypeError("Object is not async iterable")}function s(r){function i(l){if(Object(l)!==l)return Promise.reject(new TypeError(l+" is not an object."));var d=l.done;return Promise.resolve(l.value).then(function(u){return{value:u,done:d}})}return s=function(d){this.s=d,this.n=d.next},s.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(d){var u=this.s.return;return u===void 0?Promise.resolve({value:d,done:!0}):i(u.apply(this.s,arguments))},throw:function(d){var u=this.s.return;return u===void 0?Promise.reject(d):i(u.apply(this.s,arguments))}},new s(r)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}});tn(XY(),1);tn(br(),1);var ZY=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function a(){var s=typeof SuppressedError=="function"?SuppressedError:function(d,u){var p=Error();return p.name="SuppressedError",p.error=d,p.suppressed=u,p},r={},i=[];function l(d,u){if(u!=null){if(Object(u)!==u)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(d)var p=u[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(p===void 0&&(p=u[Symbol.dispose||Symbol.for("Symbol.dispose")],d))var x=p;if(typeof p!="function")throw new TypeError("Object is not disposable.");x&&(p=function(){try{x.call(u)}catch(h){return Promise.reject(h)}}),i.push({v:u,d:p,a:d})}else d&&i.push({d:u,a:d});return u}return{e:r,u:l.bind(null,!1),a:l.bind(null,!0),d:function(){var u,p=this.e,x=0;function m(){for(;u=i.pop();)try{if(!u.a&&x===1)return x=0,i.push(u),Promise.resolve().then(m);if(u.d){var y=u.d.call(u.v);if(u.a)return x|=2,Promise.resolve(y).then(m,h)}else x|=1}catch(w){return h(w)}if(x===1)return p!==r?Promise.reject(p):Promise.resolve();if(p!==r)throw p}
17function h(y){return p=p!==r?new s(y,p):y,m()}return m()}}}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),CB=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function a(s,r){this.v=s,this.k=r}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),JY=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var a=CB();function s(r){return new a(r,0)}t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}}),eK=Xr({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var a=CB();function s(i){return function(){return new r(i.apply(this,arguments))}}function r(i){var l,d;function u(x,m){try{var h=i[x](m),y=h.value,w=y instanceof a;Promise.resolve(w?y.v:y).then(function(b){if(w){var j=x==="return"?"return":"next";if(!y.k||b.done)return u(j,b);b=i[j](b).value}p(h.done?"return":"normal",b)},function(b){u("throw",b)})}catch(b){p("throw",b)}}function p(x,m){switch(x){case"return":l.resolve({value:m,done:!0});break;case"throw":l.reject(m);break;default:l.resolve({value:m,done:!1})}(l=l.next)?u(l.key,l.arg):d=null}this._invoke=function(x,m){return new Promise(function(h,y){var w={key:x,arg:m,resolve:h,reject:y,next:null};d?d=d.next=w:(l=d=w,u(x,m))})},typeof i.return!="function"&&(this.return=void 0)}r.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},r.prototype.next=function(i){return this._invoke("next",i)},r.prototype.throw=function(i){return this._invoke("throw",i)},r.prototype.return=function(i){return this._invoke("return",i)},t.exports=s,t.exports.__esModule=!0,t.exports.default=t.exports}});tn(ZY(),1);tn(JY(),1);tn(eK(),1);tn(br(),1);function tK(e){return Ev(({path:t,args:a})=>{var s;const r=[...t],i=r.pop();if(i==="useMutation")return e[i](r,...a);if(i==="_def")return{path:r};const[l,...d]=a,u=(s=d[0])!==null&&s!==void 0?s:{};return e[i](r,l,u)})}var d1;const aK=["client","ssrContext","ssrState","abortOnUnmount"],nK=(d1=v.createContext)===null||d1===void 0?void 0:d1.call(Nv,null),sK=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function rK(e){return Ev(t=>{const a=[...t.path],s=a.pop(),r=[...t.args],i=r.shift(),l=sK(s),d=Mr(a,i,l);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(a,d,r[0]),queryOptions:()=>e.queryOptions(a,d,...r),fetch:()=>e.fetchQuery(d,...r),fetchInfinite:()=>e.fetchInfiniteQuery(d,r[0]),prefetch:()=>e.prefetchQuery(d,...r),prefetchInfinite:()=>e.prefetchInfiniteQuery(d,r[0]),ensureData:()=>e.ensureQueryData(d,...r),invalidate:()=>e.invalidateQueries(d,...r),reset:()=>e.resetQueries(d,...r),refetch:()=>e.refetchQueries(d,...r),cancel:()=>e.cancelQuery(d,...r),setData:()=>{e.setQueryData(d,r[0],r[1])},setQueriesData:()=>e.setQueriesData(d,r[0],r[1],r[2]),setInfiniteData:()=>{e.setInfiniteQueryData(d,r[0],r[1])},getData:()=>e.getQueryData(d),getInfiniteData:()=>e.getInfiniteQueryData(d),setMutationDefaults:()=>e.setMutationDefaults(Wg(a),i),getMutationDefaults:()=>e.getMutationDefaults(Wg(a)),isMutating:()=>e.isMutating({mutationKey:Wg(a)})}[s]()})}function iK(e){const t=SB(e.client),a=rK(e);return j5(s=>{const r=s;return r==="client"?t:aK.includes(r)?e[r]:a[s]})}var cK=co(wm(),1);function LO(e){const t=e instanceof Dv?e:N5(e);return Ev(a=>{const s=a.path,r=s.join("."),[i,l]=a.args;return(0,cK.default)({queryKey:Mr(s,i,"query"),queryFn:()=>t.query(r,i,l?.trpc)},l)})}var u1=co(wm(),1);function qn(e,t,a){var s;const r=e[0];let i=(s=e[1])===null||s===void 0?void 0:s.input;if(a){var l;i=(0,u1.default)((0,u1.default)((0,u1.default)({},(l=i)!==null&&l!==void 0?l:{}),a.pageParam?{cursor:a.pageParam}:{}),{},{direction:a.direction})}return[r.join("."),i,t?.trpc]}var lK=Xc({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function a(r){var i,l,d,u=2;for(typeof Symbol<"u"&&(l=Symbol.asyncIterator,d=Symbol.iterator);u--;){if(l&&(i=r[l])!=null)return i.call(r);if(d&&(i=r[d])!=null)return new s(i.call(r));
17l="@@asyncIterator",d="@@iterator"}throw new TypeError("Object is not async iterable")}function s(r){function i(l){if(Object(l)!==l)return Promise.reject(new TypeError(l+" is not an object."));var d=l.done;return Promise.resolve(l.value).then(function(u){return{value:u,done:d}})}return s=function(d){this.s=d,this.n=d.next},s.prototype={s:null,n:null,next:function(){return i(this.n.apply(this.s,arguments))},return:function(d){var u=this.s.return;return u===void 0?Promise.resolve({value:d,done:!0}):i(u.apply(this.s,arguments))},throw:function(d){var u=this.s.return;return u===void 0?Promise.reject(d):i(u.apply(this.s,arguments))}},new s(r)}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports}}),oK=co(lK(),1);function oS(e){return{path:e.path.join(".")}}function gp(e){const t=oS(e);return v.useMemo(()=>t,[t])}async function EB(e,t,a){const r=t.getQueryCache().build(t,{queryKey:a});r.setState({data:[],status:"success"});const i=[];var l=!1,d=!1,u;try{for(var p=(0,oK.default)(e),x;l=!(x=await p.next()).done;l=!1){const m=x.value;i.push(m),r.setState({data:[...i]})}}catch(m){d=!0,u=m}finally{try{l&&p.return!=null&&await p.return()}finally{if(d)throw u}}return i}var ta=co(wm(),1);function dK(e){const{client:t,queryClient:a}=e,s=t instanceof Dv?t:N5(t);return{infiniteQueryOptions:(r,i,l)=>{var d,u;const p=((d=i[1])===null||d===void 0?void 0:d.input)===ws,x=async m=>{var h;const y=(0,ta.default)((0,ta.default)({},l),{},{trpc:(0,ta.default)((0,ta.default)({},l?.trpc),!(l==null||(h=l.trpc)===null||h===void 0)&&h.abortOnUnmount?{signal:m.signal}:{signal:null})});return await s.query(...qn(i,y,{direction:m.direction,pageParam:m.pageParam}))};return Object.assign((0,ta.default)((0,ta.default)({},l),{},{initialData:l?.initialData,queryKey:i,queryFn:p?ws:x,initialPageParam:(u=l?.initialCursor)!==null&&u!==void 0?u:null}),{trpc:oS({path:r})})},queryOptions:(r,i,l)=>{var d;const u=((d=i[1])===null||d===void 0?void 0:d.input)===ws,p=async x=>{var m;const h=(0,ta.default)((0,ta.default)({},l),{},{trpc:(0,ta.default)((0,ta.default)({},l?.trpc),!(l==null||(m=l.trpc)===null||m===void 0)&&m.abortOnUnmount?{signal:x.signal}:{signal:null})}),y=await s.query(...qn(i,h));return cB(y)?EB(y,a,i):y};return Object.assign((0,ta.default)((0,ta.default)({},l),{},{initialData:l?.initialData,queryKey:i,queryFn:u?ws:p}),{trpc:oS({path:r})})},fetchQuery:(r,i)=>a.fetchQuery((0,ta.default)((0,ta.default)({},i),{},{queryKey:r,queryFn:()=>s.query(...qn(r,i))})),fetchInfiniteQuery:(r,i)=>{var l;return a.fetchInfiniteQuery((0,ta.default)((0,ta.default)({},i),{},{queryKey:r,queryFn:({pageParam:d,direction:u})=>s.query(...qn(r,i,{pageParam:d,direction:u})),initialPageParam:(l=i?.initialCursor)!==null&&l!==void 0?l:null}))},prefetchQuery:(r,i)=>a.prefetchQuery((0,ta.default)((0,ta.default)({},i),{},{queryKey:r,queryFn:()=>s.query(...qn(r,i))})),prefetchInfiniteQuery:(r,i)=>{var l;return a.prefetchInfiniteQuery((0,ta.default)((0,ta.default)({},i),{},{queryKey:r,queryFn:({pageParam:d,direction:u})=>s.query(...qn(r,i,{pageParam:d,direction:u})),initialPageParam:(l=i?.initialCursor)!==null&&l!==void 0?l:null}))},ensureQueryData:(r,i)=>a.ensureQueryData((0,ta.default)((0,ta.default)({},i),{},{queryKey:r,queryFn:()=>s.query(...qn(r,i))})),invalidateQueries:(r,i,l)=>a.invalidateQueries((0,ta.default)((0,ta.default)({},i),{},{queryKey:r}),l),resetQueries:(r,i,l)=>a.resetQueries((0,ta.default)((0,ta.default)({},i),{},{queryKey:r}),l),refetchQueries:(r,i,l)=>a.refetchQueries((0,ta.default)((0,ta.default)({},i),{},{queryKey:r}),l),cancelQuery:(r,i)=>a.cancelQueries({queryKey:r},i),setQueryData:(r,i,l)=>a.setQueryData(r,i,l),setQueriesData:(r,i,l,d)=>a.setQueriesData((0,ta.default)((0,ta.default)({},i),{},{queryKey:r}),l,d),getQueryData:r=>a.getQueryData(r),setInfiniteQueryData:(r,i,l)=>a.setQueryData(r,i,l),getInfiniteQueryData:r=>a.getQueryData(r),setMutationDefaults:(r,i)=>{const l=r[0],d=u=>s.mutation(...qn([l,{input:u}],e));return a.setMutationDefaults(r,typeof i=="function"?i({canonicalMutationFn:d}):i)},getMutationDefaults:r=>a.getMutationDefaults(r),isMutating:r=>a.isMutating((0,ta.default)((0,ta.default)({},r),{},{exact:!0}))}}var Xe=co(wm());const $O=(e,t)=>new Proxy(e,{get(s,r){return t(r),s[r]}});function uK(e){var t,a;const s=(t=void 0)!==null&&t!==void 0?t:E=>E.originalFn(),r=(a=void 0)!==null&&a!==void 0?a:nK,i=QY,l=E=>{var D;const{abortOnUnmount:_=!1,queryClient:T,ssrContext:I}=E,[$,R]=v.useState((D=E.ssrState)!==null&&D!==void 0?D:!1),B=E.client instanceof Dv?E.client:N5(E.client),Y=v.useMemo(()=>dK({client:B,queryClient:T}),[B,T]),z=v.useMemo(()=>(0,Xe.default)({abortOnUnmount:_,queryClient:T,client:B,ssrContext:I??null,ssrState:$},Y),[_,B,Y,T,I,$]);return v.useEffect(()=>{R(Q=>Q?"mounted":!1)},[]),n.jsx(r.Provider,{value:z,children:E.children})};function d(){const E=v.useContext(r);if(!E)throw new Error("Unable to find tRPC Context. Did you forget to wrap your Ap
vendor: 19,679 bytes, lines 17-41
17p inside `withTRPC` HoC?");return E}function u(E,D){var _;const{queryClient:T,ssrState:I}=d();return I&&I!=="mounted"&&((_=T.getQueryCache().find({queryKey:E}))===null||_===void 0?void 0:_.state.status)==="error"?(0,Xe.default)({retryOnMount:!1},D):D}function p(E,D,_){var T,I,$,R,B;const Y=d(),{abortOnUnmount:z,client:Q,ssrState:L,queryClient:M,prefetchQuery:U}=Y,Z=Mr(E,D,"query"),ie=M.getQueryDefaults(Z),G=D===ws;typeof window>"u"&&L==="prepass"&&(_==null||(T=_.trpc)===null||T===void 0?void 0:T.ssr)!==!1&&((I=_?.enabled)!==null&&I!==void 0?I:ie?.enabled)!==!1&&!G&&!M.getQueryCache().find({queryKey:Z})&&U(Z,_);const F=u(Z,(0,Xe.default)((0,Xe.default)({},ie),_)),H=($=(R=_==null||(B=_.trpc)===null||B===void 0?void 0:B.abortOnUnmount)!==null&&R!==void 0?R:void 0)!==null&&$!==void 0?$:z,q=LG((0,Xe.default)((0,Xe.default)({},F),{},{queryKey:Z,queryFn:G?D:async J=>{const ce=(0,Xe.default)((0,Xe.default)({},F),{},{trpc:(0,Xe.default)((0,Xe.default)({},F?.trpc),H?{signal:J.signal}:{signal:null})}),se=await Q.query(...qn(Z,ce));return cB(se)?EB(se,M,Z):se}}),M);return q.trpc=gp({path:E}),q}function x(E,D,_){var T,I,$;const R=d(),B=Mr(E,D,"query"),Y=D===ws,z=(T=(I=_==null||($=_.trpc)===null||$===void 0?void 0:$.abortOnUnmount)!==null&&I!==void 0?I:void 0)!==null&&T!==void 0?T:R.abortOnUnmount;qG((0,Xe.default)((0,Xe.default)({},_),{},{queryKey:B,queryFn:Y?D:Q=>{const L={trpc:(0,Xe.default)((0,Xe.default)({},_?.trpc),z?{signal:Q.signal}:{})};return R.client.query(...qn(B,L))}}))}function m(E,D,_){var T,I,$;const R=d(),B=Mr(E,D,"query"),Y=(T=(I=_==null||($=_.trpc)===null||$===void 0?void 0:$.abortOnUnmount)!==null&&I!==void 0?I:void 0)!==null&&T!==void 0?T:R.abortOnUnmount,z=$G((0,Xe.default)((0,Xe.default)({},_),{},{queryKey:B,queryFn:Q=>{const L=(0,Xe.default)((0,Xe.default)({},_),{},{trpc:(0,Xe.default)((0,Xe.default)({},_?.trpc),Y?{signal:Q.signal}:{signal:null})});return R.client.query(...qn(B,L))}}),R.queryClient);return z.trpc=gp({path:E}),[z.data,z]}function h(E,D){const{client:_,queryClient:T}=d(),I=Wg(E),$=T.defaultMutationOptions(T.getMutationDefaults(I)),R=WG((0,Xe.default)((0,Xe.default)({},D),{},{mutationKey:I,mutationFn:B=>_.mutation(...qn([E,{input:B}],D)),onSuccess(...B){var Y,z;return s({originalFn:()=>{var L,M,U;return(L=D==null||(M=D.onSuccess)===null||M===void 0?void 0:M.call(D,...B))!==null&&L!==void 0?L:$==null||(U=$.onSuccess)===null||U===void 0?void 0:U.call($,...B)},queryClient:T,meta:(Y=(z=D?.meta)!==null&&z!==void 0?z:$?.meta)!==null&&Y!==void 0?Y:{}})}}),T);return R.trpc=gp({path:E}),R}const y={data:void 0,error:null,status:"idle"},w={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function b(E,D,_){var T;const I=(T=_?.enabled)!==null&&T!==void 0?T:D!==ws,$=qc(Mr(E,D,"any")),{client:R}=d(),B=v.useRef(_);v.useEffect(()=>{B.current=_});const[Y]=v.useState(new Set([])),z=v.useCallback(G=>{Y.add(G)},[Y]),Q=v.useRef(null),L=v.useCallback(G=>{const F=U.current,H=U.current=G(F);let q=!1;for(const J of Y)if(F[J]!==H[J]){q=!0;break}q&&ie($O(H,z))},[z,Y]),M=v.useCallback(()=>{var G;if((G=Q.current)===null||G===void 0||G.unsubscribe(),!I){L(()=>(0,Xe.default)((0,Xe.default)({},y),{},{reset:M}));return}L(()=>(0,Xe.default)((0,Xe.default)({},w),{},{reset:M}));const F=R.subscription(E.join("."),D??void 0,{onStarted:()=>{var H,q;(H=(q=B.current).onStarted)===null||H===void 0||H.call(q),L(J=>(0,Xe.default)((0,Xe.default)({},J),{},{status:"pending",error:null}))},onData:H=>{var q,J;(q=(J=B.current).onData)===null||q===void 0||q.call(J,H),L(ce=>(0,Xe.default)((0,Xe.default)({},ce),{},{status:"pending",data:H,error:null}))},onError:H=>{var q,J;(q=(J=B.current).onError)===null||q===void 0||q.call(J,H),L(ce=>(0,Xe.default)((0,Xe.default)({},ce),{},{status:"error",error:H}))},onConnectionStateChange:H=>{L(q=>{switch(H.state){case"idle":return(0,Xe.default)((0,Xe.default)({},q),{},{status:H.state,error:null,data:void 0});case"connecting":return(0,Xe.default)((0,Xe.default)({},q),{},{error:H.error,status:H.state});case"pending":return q}})},onComplete:()=>{var H,q;(H=(q=B.current).onComplete)===null||H===void 0||H.call(q),L(J=>(0,Xe.default)((0,Xe.default)({},J),{},{status:"idle",error:null,data:void 0}))}});Q.current=F},[R,$,I,L]);v.useEffect(()=>(M(),()=>{var G;(G=Q.current)===null||G===void 0||G.unsubscribe()}),[M]);const U=v.useRef(I?(0,Xe.default)((0,Xe.default)({},w),{},{reset:M}):(0,Xe.default)((0,Xe.default)({},y),{},{reset:M})),[Z,ie]=v.useState($O(U.current,z));return Z}function j(E,D,_){var T,I,$,R,B;const{client:Y,ssrState:z,prefetchInfiniteQuery:Q,queryClient:L,abortOnUnmount:M}=d(),U=Mr(E,D,"infinite"),Z=L.getQueryDefaults(U),ie=D===ws;typeof window>"u"&&z==="prepass"&&(_==null||(T=_.trpc)===null||T===void 0?void 0:T.ssr)!==!1&&((I=_?.enabled)!==null&&I!==void 0?I:Z?.enabled)!==!1&&!ie&&!L.getQueryCache().find({queryKey:U})&&Q(U,(0,Xe.default)((0,Xe.default)({},Z),_));const G=u(U,(0,Xe.default)((0,Xe.default)({},Z),_)),F=($=_==null||(R=_.trpc)===null||R===void 0?void 0:R.abortOnUnmount)!==null&&$!==void 0?$:M,H=HG((0,Xe.default)((0,Xe.default)({},G),{},{initialPageParam:(B=_.initialCursor)!==null&&B!==void 0?B:null,persister:_.persister,queryKey:U,queryFn:ie?D:q=>{var J;const ce=(0,Xe.default)((0,Xe.default)({},G),{},{trpc:(0,Xe.default)((0,Xe.default)({},G?.trpc),F?{signal:q.signal}:{signal:null})});return Y.query(...qn(U,ce,{pageParam:(J=q.pageParam)!==null&&J!==void 0?J:_.initialCursor,direction:q.direction}))}}),L);return H.trpc=gp({path:E}),H}function S(E,D,_){var T,I,$;const R=d(),B=Mr(E,D,"infinite"),Y=R.queryClient.getQueryDefaults(B),z=D===ws,Q=u(B,(0,Xe.default)((0,Xe.default)({},Y),_)),L=(T=_==null||(I=_.trpc)===null||I===void 0?void 0:I.abortOnUnmount)!==null&&T!==void 0?T:R.abortOnUnmount;FG((0,Xe.default)((0,Xe.default)({},_),{},{initialPageParam:($=_.initialCursor)!==null&&$!==void 0?$:null,queryKey:B,queryFn:z?D:M=>{var U;const Z=(0,Xe.default)((0,Xe.default)({},Q),{},{trpc:(0,Xe.default)((0,Xe.default)({},Q?.trpc),L?{signal:M.signal}:{})});return R.client.query(...qn(B,Z,{pageParam:(U=M.pageParam)!==null&&U!==void 0?U:_.initialCursor,direction:M.direction}))}}))}function O(E,D,_){var T,I,$;const R=d(),B=Mr(E,D,"infinite"),Y=R.queryClient.getQueryDefaults(B),z=u(B,(0,Xe.default)((0,Xe.default)({},Y),_)),Q=(T=_==null||(I=_.trpc)===null||I===void 0?void 0:I.abortOnUnmount)!==null&&T!==void 0?T:R.abortOnUnmount,L=zG((0,Xe.default)((0,Xe.default)({},_),{},{initialPageParam:($=_.initialCursor)!==null&&$!==void 0?$:null,queryKey:B,queryFn:M=>{var U;const Z=(0,Xe.default)((0,Xe.default)({},z),{},{trpc:(0,Xe.default)((0,Xe.default)({},z?.trpc),Q?{signal:M.signal}:{})});return R.client.query(...qn(B,Z,{pageParam:(U=M.pageParam)!==null&&U!==void 0?U:_.initialCursor,direction:M.direction}))}}),R.queryClient);return L.trpc=gp({path:E}),[L.data,L]}return{Provider:l,createClient:i,useContext:d,useUtils:d,useQuery:p,usePrefetchQuery:x,useSuspenseQuery:m,useQueries:(E,D)=>{const{ssrState:_,queryClient:T,prefetchQuery:I,client:$}=d(),R=LO($),B=E(R);if(typeof window>"u"&&_==="prepass")for(const z of B){var Y;const Q=z;((Y=Q.trpc)===null||Y===void 0?void 0:Y.ssr)!==!1&&!T.getQueryCache().find({queryKey:Q.queryKey})&&I(Q.queryKey,Q)}return iB({queries:B.map(z=>(0,Xe.default)((0,Xe.default)({},z),{},{queryKey:z.queryKey})),combine:D?.combine},T)},useSuspenseQueries:E=>{const{queryClient:D,client:_}=d(),T=LO(_),I=E(T),$=UG({queries:I.map(R=>(0,Xe.default)((0,Xe.default)({},R),{},{queryFn:R.queryFn,queryKey:R.queryKey}))},D);return[$.map(R=>R.data),$]},useMutation:h,useSubscription:b,useInfiniteQuery:j,usePrefetchInfiniteQuery:S,useSuspenseInfiniteQuery:O}}function pK(e){const t=tK(e);return j5(a=>a==="useContext"||a==="useUtils"?()=>{const s=e.useUtils();return v.useMemo(()=>iK(s),[s])}:e.hasOwnProperty(a)?e[a]:t[a])}function fK(e){const t=uK();return pK(t)}const le=fK(),mK="Please login (10001)";var p1={exports:{}},hp={},f1={exports:{}},m1={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var zO;function xK(){return zO||(zO=1,(function(e){function t(L,M){var U=L.length;L.push(M);e:for(;0<U;){var Z=U-1>>>1,ie=L[Z];if(0<r(ie,M))L[Z]=M,L[U]=ie,U=Z;else break e}}function a(L){return L.length===0?null:L[0]}function s(L){if(L.length===0)return null;var M=L[0],U=L.pop();if(U!==M){L[0]=U;e:for(var Z=0,ie=L.length,G=ie>>>1;Z<G;){var F=2*(Z+1)-1,H=L[F],q=F+1,J=L[q];if(0>r(H,U))q<ie&&0>r(J,H)?(L[Z]=J,L[q]=U,Z=q):(L[Z]=H,L[F]=U,Z=F);else if(q<ie&&0>r(J,U))L[Z]=J,L[q]=U,Z=q;else break e}}return M}function r(L,M){var U=L.sortIndex-M.sortIndex;return U!==0?U:L.id-M.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var u=[],p=[],x=1,m=null,h=3,y=!1,w=!1,b=!1,j=!1,S=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function k(L){for(var M=a(p);M!==null;){if(M.callback===null)s(p);else if(M.startTime<=L)s(p),M.sortIndex=M.expirationTime,t(u,M);else break;M=a(p)}}function E(L){if(b=!1,k(L),!w)if(a(u)!==null)w=!0,D||(D=!0,B());else{var M=a(p);M!==null&&Q(E,M.startTime-L)}}var D=!1,_=-1,T=5,I=-1;function $(){return j?!0:!(e.unstable_now()-I<T)}function R(){if(j=!1,D){var L=e.unstable_now();I=L;var M=!0;try{e:{w=!1,b&&(b=!1,O(_),_=-1),y=!0;var U=h;try{t:{for(k(L),m=a(u);m!==null&&!(m.expirationTime>L&&$());){var Z=m.callback;if(typeof Z=="function"){m.callback=null,h=m.priorityLevel;var ie=Z(m.expirationTime<=L);if(L=e.unstable_now(),typeof ie=="function"){m.callback=ie,k(L),M=!0;break t}m===a(u)&&s(u),k(L)}else s(u);m=a(u)}if(m!==null)M=!0;else{var G=a(p);G!==null&&Q(E,G.startTime-L),M=!1}}break e}finally{m=null,h=U,y=!1}M=void 0}}finally{M?B():D=!1}}}var B;if(typeof A=="function")B=function(){A(R)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,z=Y.port2;Y.port1.onmessage=R,B=function(){z.postMessage(null)}}else B=function(){S(R,0)};function Q(L,M){_=S(function(){L(e.unstable_now())},M)}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(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(L){switch(h){case 1:case 2:case 3:var M=3;break;default:M=h}var U=h;h=M;try{return L()}finally{h=U}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(L,M){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var U=h;h=L;try{return M()}finally{h=U}},e.unstable_scheduleCallback=function(L,M,U){var Z=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Z+U:Z):U=Z,L){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=U+ie,L={id:x++,callback:M,priorityLevel:L,startTime:U,expirationTime:ie,sortIndex:-1},U>Z?(L.sortIndex=U,t(p,L),a(u)===null&&L===a(p)&&(b?(O(_),_=-1):b=!0,Q(E,U-Z))):(L.sortIndex=ie,t(u,L),w||y||(w=!0,D||(D=!0,B()))),L},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(L){var M=h;return function(){var U=h;h=M;try{return L.apply(this,arguments)}finally{h=U}}}})(m1)),m1}var UO;function gK(){return UO||(UO=1,f1.exports=xK()),f1.exports}var x1={exports:{}},Rn={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var qO;function hK(){if(qO)return Rn;qO=1;var e=wv();function t(u){var p="https://react.dev/errors/"+u;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+u+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},r=Symbol.for("react.portal");function i(u,p,x){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:m==null?null:""+m,children:u,containerInfo:p,implementation:x}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(u,p){if(u==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,Rn.createPortal=function(u,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return i(u,p,null,x)},Rn.flushSync=function(u){var p=l.T,x=s.p;try{if(l.T=null,s.p=2,u)return u()}finally{l.T=p,s.p=x,s.d.f()}},Rn.preconnect=function(u,p){typeof u=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,s.d.C(u,p))},Rn.prefetchDNS=function(u){typeof u=="string"&&s.d.D(u)},Rn.preinit=function(u,p){if(typeof u=="string"&&p&&typeof p.as=="string"){var x=p.as,m=d(x,p.crossOrigin),h=typeof p.integrity=="string"?p.integrity:void 0,y=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?s.d.S(u,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:m,integrity:h,fetchPriority:y}):x==="script"&&s.d.X(u,{crossOrigin:m,integrity:h,fetchPriority:y,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Rn.preinitModule=function(u,p){if(typeof u=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=d(p.as,p.crossOrigin);s.d.M(u,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&s.d.M(u)},Rn.preload=function(u,p){if(typeof u=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,m=d(x,p.crossOrigin);s.d.L(u,x,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Rn.preloadModule=function(u,p){if(typeof u=="string")if(p){var x=d(p.as,p.crossOrigin);s.d.m(u,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else s.d.m(u)},Rn.requestFormReset=function(u){s.d.r(u)},Rn.unstable_batchedUpdates=function(u,p){return u(p)},Rn.useFormState=function(u,p,x){return l.H.useFormState(u,p,x)},Rn.useFormStatus=function(){return l.H.useHostTransitionStatus()},Rn.version="19.2.1",Rn}var FO;function AB(){if(FO)return x1.exports;FO=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(),x1.exports=hK(),x1.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var WO;function vK(){if(WO)return hp;WO=1;var e=gK(),t=wv(),a=AB();function s(c){var o="https://react.dev/errors/"+c;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)o+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+c+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(c){return!(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)}function i(c){var o=c,f=c;if(c.alternate)for(;o.return;)o=o.return;else{c=o;do o=c,(o.flags&4098)!==0&&(f=o.return),c=o.return;while(c)}return o.tag===3?f:null}function l(c){if(c.tag===13){var o=c.memoizedState;if(o===null&&(c=c.alternate,c!==null&&(o=c.memoizedState)),o!==null)return o.dehydrated}return null}function d(c){if(c.tag===31){var o=c.memoizedState;if(o===null&&(c=c.alternate,c!==null&&(o=c.memoizedState)),o!==null)return o.dehydrated}return null}function u(c){if(i(c)!==c)throw Error(s(188))}function p(c){var o=c.alternate;if(!o){if(o=i(c),o===null)throw Error(s(188));return o!==c?null:c}for(var f=c,g=o;;){var N=f.return;if(N===null)break;var C=N.alternate;if(C===null){if(g=N.return,g!==null){f=g;continue}break}if(N.child===C.child){for(C=N.child;C;){if(C===f)return u(N),c;if(C===g)return u(N),o;C=C.sibling}throw Error(s(188))}if(f.return!==g.return)f=N,g=C;else{for(var P=!1,V=N.child;V;){if(V===f){P=!0,f=N,g=C;break}if(V===g){P=!0,g=N,f=C;break}V=V.sibling}if(!P){for(V=C.child;V;){if(V===f){P=!0,f=C,g=N;break}if(V===g){P=!0,g=C,f=N;break}V=V.sibling}if(!P)throw Error(s(189))}}if(f.alternate!==g)throw Error(s(190))}if(f.tag!==3)throw Error(s(188));return f.stateNode.current===f?c:o}function x(c){var o=c.tag;if(o===5||o===26||o===27||o===6)return c;for(c=c.child;c!==null;){if(o=x(c),o!==null)return o;c=c.sibling}return null}var m=Object.assign,h=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),R=Symbol.iterator;function B(c){return c===null||typeof c!="object"?null:(c=R&&c[R]||c["@@iterator"],typeof c=="function"?c:null)}var Y=Symbol.for("react.client.reference");function z(c){if(c==null)return null;if(typeof c=="function")return c.$$typeof===Y?null:c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case b:return"Fragment";case S:return"Profiler";case j:return"StrictMode";case E:return"Suspense";case D:return"SuspenseList";case I:return"Activity"}if(typeof c=="object")switch(c.$$typeof){case w:return"Portal";case A:return c.displayName||"Context";case O:return(c._context.displayName||"Context")+".Consumer";case k:var o=c.render;return c=c.displayName,c||(c=o.displayName||o.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case _:return o=c.displayName||null,o!==null?o:z(c.type)||"Memo";case T:o=c._payload,c=c._init;try{return z(c(o))}catch{}}return null}var Q=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},Z=[],ie=-1;function G(c){return{current:c}}function F(c){0>ie||(c.current=Z[ie],Z[ie]=null,ie--)}function H(c,o){ie++,Z[ie]=c.current,c.current=o}var q=G(null),J=G(null),ce=G(null),se=G(null);function ye(c,o){switch(H(ce,o),H(J,c),H(q,null),o.nodeType){case 9:case 11:c=(c=o.documentElement)&&(c=c.namespaceURI)?FD(c):0;break;
vendor: 9,696 bytes, lines 41-48
41default:if(c=o.tagName,o=o.namespaceURI)o=FD(o),c=WD(o,c);else switch(c){case"svg":c=1;break;case"math":c=2;break;default:c=0}}F(q),H(q,c)}function de(){F(q),F(J),F(ce)}function ve(c){c.memoizedState!==null&&H(se,c);var o=q.current,f=WD(o,c.type);o!==f&&(H(J,c),H(q,f))}function Pe(c){J.current===c&&(F(q),F(J)),se.current===c&&(F(se),up._currentValue=U)}var ue,Qe;function Ue(c){if(ue===void 0)try{throw Error()}catch(f){var o=f.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",Qe=-1<f.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+ue+c+Qe}var xe=!1;function $e(c,o){if(!c||xe)return"";xe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(o){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(je){var ge=je}Reflect.construct(c,[],Oe)}else{try{Oe.call()}catch(je){ge=je}c.call(Oe.prototype)}}else{try{throw Error()}catch(je){ge=je}(Oe=c())&&typeof Oe.catch=="function"&&Oe.catch(function(){})}}catch(je){if(je&&ge&&typeof je.stack=="string")return[je.stack,ge.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var N=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");N&&N.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var C=g.DetermineComponentFrameRoot(),P=C[0],V=C[1];if(P&&V){var ae=P.split(`
44`),fe=V.split(`
45`);for(N=g=0;g<ae.length&&!ae[g].includes("DetermineComponentFrameRoot");)g++;for(;N<fe.length&&!fe[N].includes("DetermineComponentFrameRoot");)N++;if(g===ae.length||N===fe.length)for(g=ae.length-1,N=fe.length-1;1<=g&&0<=N&&ae[g]!==fe[N];)N--;for(;1<=g&&0<=N;g--,N--)if(ae[g]!==fe[N]){if(g!==1||N!==1)do if(g--,N--,0>N||ae[g]!==fe[N]){var Ce=`
46`+ae[g].replace(" at new "," at ");return c.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",c.displayName)),Ce}while(1<=g&&0<=N);break}}}finally{xe=!1,Error.prepareStackTrace=f}return(f=c?c.displayName||c.name:"")?Ue(f):""}function Te(c,o){switch(c.tag){case 26:case 27:case 5:return Ue(c.type);case 16:return Ue("Lazy");case 13:return c.child!==o&&o!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return $e(c.type,!1);case 11:return $e(c.type.render,!1);case 1:return $e(c.type,!0);case 31:return Ue("Activity");default:return""}}function dt(c){try{var o="",f=null;do o+=Te(c,f),f=c,c=c.return;while(c);return o}catch(g){return`
47Error generating stack: `+g.message+`
48`+g.stack}}var tt=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,ut=e.unstable_cancelCallback,pt=e.unstable_shouldYield,ft=e.unstable_requestPaint,_t=e.unstable_now,da=e.unstable_getCurrentPriorityLevel,vt=e.unstable_ImmediatePriority,Xt=e.unstable_UserBlockingPriority,Ct=e.unstable_NormalPriority,Zt=e.unstable_LowPriority,xa=e.unstable_IdlePriority,Sa=e.log,Da=e.unstable_setDisableYieldValue,Va=null,X=null;function Re(c){if(typeof Sa=="function"&&Da(c),X&&typeof X.setStrictMode=="function")try{X.setStrictMode(Va,c)}catch{}}var Ve=Math.clz32?Math.clz32:ee,bt=Math.log,Be=Math.LN2;function ee(c){return c>>>=0,c===0?32:31-(bt(c)/Be|0)|0}var ke=256,qe=262144,Ye=4194304;function at(c){var o=c&42;if(o!==0)return o;switch(c&-c){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return c&261888;case 262144:case 524288:case 1048576:case 2097152:return c&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return c&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return c}}function Ge(c,o,f){var g=c.pendingLanes;if(g===0)return 0;var N=0,C=c.suspendedLanes,P=c.pingedLanes;c=c.warmLanes;var V=g&134217727;return V!==0?(g=V&~C,g!==0?N=at(g):(P&=V,P!==0?N=at(P):f||(f=V&~c,f!==0&&(N=at(f))))):(V=g&~C,V!==0?N=at(V):P!==0?N=at(P):f||(f=g&~c,f!==0&&(N=at(f)))),N===0?0:o!==0&&o!==N&&(o&C)===0&&(C=N&-N,f=o&-o,C>=f||C===32&&(f&4194048)!==0)?o:N}function Mt(c,o){return(c.pendingLanes&~(c.suspendedLanes&~c.pingedLanes)&o)===0}function zt(c,o){switch(c){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ie(){var c=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),c}function ua(c){for(var o=[],f=0;31>f;f++)o.push(c);return o}function Ht(c,o){c.pendingLanes|=o,o!==268435456&&(c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0)}function Lt(c,o,f,g,N,C){var P=c.pendingLanes;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.warmLanes=0,c.expiredLanes&=f,c.entangledLanes&=f,c.errorRecoveryDisabledLanes&=f,c.shellSuspendCounter=0;var V=c.entanglements,ae=c.expirationTimes,fe=c.hiddenUpdates;for(f=P&~f;0<f;){var Ce=31-Ve(f),Oe=1<<Ce;V[Ce]=0,ae[Ce]=-1;var ge=fe[Ce];if(ge!==null)for(fe[Ce]=null,Ce=0;Ce<ge.length;Ce++){var je=ge[Ce];je!==null&&(je.lane&=-536870913)}f&=~Oe}g!==0&&be(c,g,0),C!==0&&N===0&&c.tag!==0&&(c.suspendedLanes|=C&~(P&~o))}function be(c,o,f){c.pendingLanes|=o,c.suspendedLanes&=~o;var g=31-Ve(o);c.entangledLanes|=o,c.entanglements[g]=c.entanglements[g]|1073741824|f&261930}function ga(c,o){var f=c.entangledLanes|=o;for(c=c.entanglements;f;){var g=31-Ve(f),N=1<<g;N&o|c[g]&o&&(c[g]|=o),f&=~N}}function Ca(c,o){var f=o&-o;return f=(f&42)!==0?1:Yn(f),(f&(c.suspendedLanes|o))!==0?0:f}function Yn(c){switch(c){case 2:c=1;break;case 8:c=4;break;case 32:c=16;break;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:c=128;break;case 268435456:c=134217728;break;default:c=0}return c}function Ga(c){return c&=-c,2<c?8<c?(c&134217727)!==0?32:268435456:8:2}function Kn(){var c=M.p;return c!==0?c:(c=window.event,c===void 0?32:fO(c.type))}function Sr(c,o){var f=M.p;try{return M.p=c,o()}finally{M.p=f}}var Qn=Math.random().toString(36).slice(2),dn="__reactFiber$"+Qn,Mn="__reactProps$"+Qn,Cr="__reactContainer$"+Qn,Au="__reactEvents$"+Qn,Ym="__reactListeners$"+Qn,Os="__reactHandles$"+Qn,vo="__reactResources$"+Qn,we="__reactMarker$"+Qn;function Je(c){delete c[dn],delete c[Mn],delete c[Au],delete c[Ym],delete c[Os]}function lt(c){var o=c[dn];if(o)return o;for(var f=c.parentNode;f;){if(o=f[Cr]||f[dn]){if(f=o.alternate,o.child!==null||f!==null&&f.child!==null)for(c=XD(c);c!==null;){if(f=c[dn])return f;c=XD(c)}return o}c=f,f=c.parentNode}return null}function K(c){if(c=c[dn]||c[Cr]){var o=c.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return c}return null}function He(c){var o=c.tag;if(o===5||o===26||o===27||o===6)return c.stateNode;throw Error(s(33))}function nt(c){var o=c[vo];return o||(o=c[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Fe(c){c[we]=!0}var ks=new Set,_s={};function ll(c,o){yo(c,o),yo(c+"Capture",o)}function yo(c,o){for(_s[c]=o,c=0;c<o.length;c++)ks.add(o[c])}var XW=RegExp("^[: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]*$"),P4={},M4={};function ZW(c){return tt.call(M4,c)?!0:tt.call(P4,c)?!1:XW.test(c)?M4[c]=!0:(P4[c]=!0,!1)}function Km(c,o,f){if(ZW(o))if(f===null)c.removeAttribute(o);else{switch(typeof f){case"undefined":case"function":case"symbol":c.removeAttribute(o);return;case"boolean":var g=o.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){c.removeAttribute(o);return}}c.setAttribute(o,""+f)}}function Qm(c,o,f){if(f===null)c.removeAttribute(o);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(o);return}c.setAttribute(o,""+f)}}function ti(c,o,f,g){if(g===null)c.removeAttribute(f);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":c.removeAttribute(f);return}c.setAttributeNS(o,f,""+g)}}function Ts(c){switch(typeof c){case"bigint":case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function R4(c){var o=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function JW(c,o,f){var g=Object.getOwnPropertyDescriptor(c.constructor.prototype,o);if(!c.hasOwnProperty(o)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var N=g.get,C=g.set;return Object.defineProperty(c,o,{configurable:!0,get:function(){return N.call(this)},set:function(P){f=""+P,C.call(this,P)}}),Object.defineProperty(c,o,{enumerable:g.enumerable}),{getValue:function(){return f},setValue:function(P){f=""+P},stopTracking:function(){c._valueTracker=null,delete c[o]}}}}function Jy(c){if(!c._valueTracker){var o=R4(c)?"checked":"value";c._valueTracker=JW(c,o,""+c[o])}}function B4(c){if(!c)return!1;var o=c._valueTracker;if(!o)return!0;var f=o.getValue(),g="";
vendor: 4,728 bytes, line 48
48return c&&(g=R4(c)?c.checked?"true":"false":c.value),c=g,c!==f?(o.setValue(c),!0):!1}function Xm(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}var eH=/[\n"\\]/g;function Ps(c){return c.replace(eH,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function eb(c,o,f,g,N,C,P,V){c.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?c.type=P:c.removeAttribute("type"),o!=null?P==="number"?(o===0&&c.value===""||c.value!=o)&&(c.value=""+Ts(o)):c.value!==""+Ts(o)&&(c.value=""+Ts(o)):P!=="submit"&&P!=="reset"||c.removeAttribute("value"),o!=null?tb(c,P,Ts(o)):f!=null?tb(c,P,Ts(f)):g!=null&&c.removeAttribute("value"),N==null&&C!=null&&(c.defaultChecked=!!C),N!=null&&(c.checked=N&&typeof N!="function"&&typeof N!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?c.name=""+Ts(V):c.removeAttribute("name")}function I4(c,o,f,g,N,C,P,V){if(C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(c.type=C),o!=null||f!=null){if(!(C!=="submit"&&C!=="reset"||o!=null)){Jy(c);return}f=f!=null?""+Ts(f):"",o=o!=null?""+Ts(o):f,V||o===c.value||(c.value=o),c.defaultValue=o}g=g??N,g=typeof g!="function"&&typeof g!="symbol"&&!!g,c.checked=V?c.checked:!!g,c.defaultChecked=!!g,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(c.name=P),Jy(c)}function tb(c,o,f){o==="number"&&Xm(c.ownerDocument)===c||c.defaultValue===""+f||(c.defaultValue=""+f)}function bo(c,o,f,g){if(c=c.options,o){o={};for(var N=0;N<f.length;N++)o["$"+f[N]]=!0;for(f=0;f<c.length;f++)N=o.hasOwnProperty("$"+c[f].value),c[f].selected!==N&&(c[f].selected=N),N&&g&&(c[f].defaultSelected=!0)}else{for(f=""+Ts(f),o=null,N=0;N<c.length;N++){if(c[N].value===f){c[N].selected=!0,g&&(c[N].defaultSelected=!0);return}o!==null||c[N].disabled||(o=c[N])}o!==null&&(o.selected=!0)}}function L4(c,o,f){if(o!=null&&(o=""+Ts(o),o!==c.value&&(c.value=o),f==null)){c.defaultValue!==o&&(c.defaultValue=o);return}c.defaultValue=f!=null?""+Ts(f):""}function $4(c,o,f,g){if(o==null){if(g!=null){if(f!=null)throw Error(s(92));if(Q(g)){if(1<g.length)throw Error(s(93));g=g[0]}f=g}f==null&&(f=""),o=f}f=Ts(o),c.defaultValue=f,g=c.textContent,g===f&&g!==""&&g!==null&&(c.value=g),Jy(c)}function jo(c,o){if(o){var f=c.firstChild;if(f&&f===c.lastChild&&f.nodeType===3){f.nodeValue=o;return}}c.textContent=o}var tH=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function z4(c,o,f){var g=o.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?g?c.setProperty(o,""):o==="float"?c.cssFloat="":c[o]="":g?c.setProperty(o,f):typeof f!="number"||f===0||tH.has(o)?o==="float"?c.cssFloat=f:c[o]=(""+f).trim():c[o]=f+"px"}function U4(c,o,f){if(o!=null&&typeof o!="object")throw Error(s(62));if(c=c.style,f!=null){for(var g in f)!f.hasOwnProperty(g)||o!=null&&o.hasOwnProperty(g)||(g.indexOf("--")===0?c.setProperty(g,""):g==="float"?c.cssFloat="":c[g]="");for(var N in o)g=o[N],o.hasOwnProperty(N)&&f[N]!==g&&z4(c,N,g)}else for(var C in o)o.hasOwnProperty(C)&&z4(c,C,o[C])}function ab(c){if(c.indexOf("-")===-1)return!1;switch(c){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 aH=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRen
48dering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nH=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zm(c){return nH.test(""+c)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":c}function ai(){}var nb=null;function sb(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var wo=null,No=null;function q4(c){var o=K(c);if(o&&(c=o.stateNode)){var f=c[Mn]||null;e:switch(c=o.stateNode,o.type){case"input":if(eb(c,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),o=f.name,f.type==="radio"&&o!=null){for(f=c;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Ps(""+o)+'"][type="radio"]'),o=0;o<f.length;o++){var g=f[o];if(g!==c&&g.form===c.form){var N=g[Mn]||null;if(!N)throw Error(s(90));eb(g,N.value,N.defaultValue,N.defaultValue,N.checked,N.defaultChecked,N.type,N.name)}}for(o=0;o<f.length;o++)g=f[o],g.form===c.form&&B4(g)}break e;case"textarea":L4(c,f.value,f.defaultValue);break e;case"select":o=f.value,o!=null&&bo(c,!!f.multiple,o,!1)}}}var rb=!1;function F4(c,o,f){if(rb)return c(o,f);rb=!0;try{var g=c(o);return g}finally{if(rb=!1,(wo!==null||No!==null)&&($x(),wo&&(o=wo,c=No,No=wo=null,q4(o),c)))for(o=0;o<c.length;o++)q4(c[o])}}function Du(c,o){var f=c.stateNode;if(f===null)return null;var g=f[Mn]||null;if(g===null)return null;f=g[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(c=c.type,g=!(c==="button"||c==="input"||c==="select"||c==="textarea")),c=!g;break e;default:c=!1}if(c)return null;if(f&&typeof f!="function")throw Error(s(231,o,typeof f));return f}var ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ib=!1;if(ni)try{var Ou={};Object.defineProperty(Ou,"passive",{get:function(){ib=!0}}),window.addEventListener("test",Ou,Ou),window.removeEventListener("test",Ou,Ou)}catch{ib=!1}var Ji=null,cb=null,Jm=null;
vendor: 4,292 bytes, line 48
48function W4(){if(Jm)return Jm;var c,o=cb,f=o.length,g,N="value"in Ji?Ji.value:Ji.textContent,C=N.length;for(c=0;c<f&&o[c]===N[c];c++);var P=f-c;for(g=1;g<=P&&o[f-g]===N[C-g];g++);return Jm=N.slice(c,1<g?1-g:void 0)}function ex(c){var o=c.keyCode;return"charCode"in c?(c=c.charCode,c===0&&o===13&&(c=13)):c=o,c===10&&(c=13),32<=c||c===13?c:0}function tx(){return!0}function H4(){return!1}function Xn(c){function o(f,g,N,C,P){this._reactName=f,this._targetInst=N,this.type=g,this.nativeEvent=C,this.target=P,this.currentTarget=null;for(var V in c)c.hasOwnProperty(V)&&(f=c[V],this[V]=f?f(C):C[V]);return this.isDefaultPrevented=(C.defaultPrevented!=null?C.defaultPrevented:C.returnValue===!1)?tx:H4,this.isPropagationStopped=H4,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=tx)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=tx)},persist:function(){},isPersistent:tx}),o}var ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(c){return c.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ax=Xn(ol),ku=m({},ol,{view:0,detail:0}),sH=Xn(ku),lb,ob,_u,nx=m({},ku,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ub,button:0,buttons:0,relatedTarget:function(c){return c.relatedTarget===void 0?c.fromElement===c.srcElement?c.toElement:c.fromElement:c.relatedTarget},movementX:function(c){return"movementX"in c?c.movementX:(c!==_u&&(_u&&c.type==="mousemove"?(lb=c.screenX-_u.screenX,ob=c.screenY-_u.screenY):ob=lb=0,_u=c),lb)},movementY:function(c){return"movementY"in c?c.movementY:ob}}),V4=Xn(nx),rH=m({},nx,{dataTransfer:0}),iH=Xn(rH),cH=m({},ku,{relatedTarget:0}),db=Xn(cH),lH=m({},ol,{animationName:0,elapsedTime:0,pseudoElement:0}),oH=Xn(lH),dH=m({},ol,{clipboardData:function(c){return"clipboardData"in c?c.clipboardData:window.clipboardData}}),uH=Xn(dH),pH=m({},ol,{data:0}),G4=Xn(pH),fH={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mH={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"},xH={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gH(c){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(c):(c=xH[c])?!!o[c]:!1}function ub(){return gH}var hH=m({},ku,{key:function(c){if(c.key){var o=fH[c.key]||c.key;if(o!=="Unidentified")return o}return c.type==="keypress"?(c=ex(c),c===13?"Enter":String.fromCharCode(c)):c.type==="keydown"||c.type==="keyup"?mH[c.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ub,charCode:function(c){return c.type==="keypress"?ex(c):0},keyCode:function(c){return c.type==="keydown"||c.type==="keyup"?c.keyCode:0},which:function(c){return c.type==="keypress"?ex(c):c.type==="keydown"||c.type==="keyup"?c.keyCode:0}}),vH=Xn(hH),yH=m({},nx,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Y4=Xn(yH),bH=m({},ku,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ub}),jH=Xn(bH),wH=m({},ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),NH=Xn(wH),SH=m({},nx,{deltaX:function(c){return"deltaX"in c?c.deltaX:"wheelDeltaX"in c?-c.wheelDeltaX:0},deltaY:function(c){return"deltaY"in c?c.deltaY:"wheelDeltaY"in c?-c.wheelDeltaY:"wheelDelta"in c?-c.wheelDelta:0},deltaZ:0,deltaMode:0}),CH=Xn(SH),EH=m({},ol,{newState:0,oldState:0}),AH=Xn(EH),DH=[9,13,27,32],pb=ni&&"CompositionEvent"in window,Tu=null;ni&&"documentMode"in document&&(Tu=document.documentMode);
vendor: 4,869 bytes, line 48
48var OH=ni&&"TextEvent"in window&&!Tu,K4=ni&&(!pb||Tu&&8<Tu&&11>=Tu),Q4=" ",X4=!1;function Z4(c,o){switch(c){case"keyup":return DH.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function J4(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var So=!1;function kH(c,o){switch(c){case"compositionend":return J4(o);case"keypress":return o.which!==32?null:(X4=!0,Q4);case"textInput":return c=o.data,c===Q4&&X4?null:c;default:return null}}function _H(c,o){if(So)return c==="compositionend"||!pb&&Z4(c,o)?(c=W4(),Jm=cb=Ji=null,So=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return K4&&o.locale!=="ko"?null:o.data;default:return null}}var TH={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 eE(c){var o=c&&c.nodeName&&c.nodeName.toLowerCase();return o==="input"?!!TH[c.type]:o==="textarea"}function tE(c,o,f,g){wo?No?No.push(g):No=[g]:wo=g,o=Vx(o,"onChange"),0<o.length&&(f=new ax("onChange","change",null,f,g),c.push({event:f,listeners:o}))}var Pu=null,Mu=null;function PH(c){ID(c,0)}function sx(c){var o=He(c);if(B4(o))return c}function aE(c,o){if(c==="change")return o}var nE=!1;if(ni){var fb;if(ni){var mb="oninput"in document;if(!mb){var sE=document.createElement("div");sE.setAttribute("oninput","return;"),mb=typeof sE.oninput=="function"}fb=mb}else fb=!1;nE=fb&&(!document.documentMode||9<document.documentMode)}function rE(){Pu&&(Pu.detachEvent("onpropertychange",iE),Mu=Pu=null)}function iE(c){if(c.propertyName==="value"&&sx(Mu)){var o=[];tE(o,Mu,c,sb(c)),F4(PH,o)}}function MH(c,o,f){c==="focusin"?(rE(),Pu=o,Mu=f,Pu.attachEvent("onpropertychange",iE)):c==="focusout"&&rE()}function RH(c){if(c==="selectionchange"||c==="keyup"||c==="keydown")return sx(Mu)}function BH(c,o){if(c==="click")return sx(o)}function IH(c,o){if(c==="input"||c==="change")return sx(o)}function LH(c,o){return c===o&&(c!==0||1/c===1/o)||c!==c&&o!==o}var ls=typeof Object.is=="function"?Object.is:LH;function Ru(c,o){if(ls(c,o))return!0;if(typeof c!="object"||c===null||typeof o!="object"||o===null)return!1;var f=Object.keys(c),g=Object.keys(o);if(f.length!==g.length)return!1;for(g=0;g<f.length;g++){var N=f[g];if(!tt.call(o,N)||!ls(c[N],o[N]))return!1}return!0}function cE(c){for(;c&&c.firstChild;)c=c.firstChild;return c}function lE(c,o){var f=cE(c);c=0;for(var g;f;){if(f.nodeType===3){if(g=c+f.textContent.length,c<=o&&g>=o)return{node:f,offset:o-c};c=g}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=cE(f)}}function oE(c,o){return c&&o?c===o?!0:c&&c.nodeType===3?!1:o&&o.nodeType===3?oE(c,o.parentNode):"contains"in c?c.contains(o):c.compareDocumentPosition?!!(c.compareDocumentPosition(o)&16):!1:!1}function dE(c){c=c!=null&&c.ownerDocument!=null&&c.ownerDocument.defaultView!=null?c.ownerDocument.defaultView:window;for(var o=Xm(c.document);o instanceof c.HTMLIFrameElement;){try{var f=typeof o.contentWindow.location.href=="string"}catch{f=!1}if(f)c=o.contentWindow;else break;o=Xm(c.document)}return o}function xb(c){var o=c&&c.nodeName&&c.nodeName.toLowerCase();return o&&(o==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||o==="textarea"||c.contentEditable==="true")}var $H=ni&&"documentMode"in document&&11>=document.documentMode,Co=null,gb=null,Bu=null,hb=!1;function uE(c,o,f){var g=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;hb||Co==null||Co!==Xm(g)||(g=Co,"selectionStart"in g&&xb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Bu&&Ru(Bu,g)||(Bu=g,g=Vx(gb,"onSelect"),0<g.length&&(o=new ax("onSelect","select",null,o,f),c.push({event:o,listeners:g}),o.target=Co)))}function dl(c,o){var f={};return f[c.toLowerCase()]=o.toLowerCase(),f["Webkit"+c]="webkit"+o,f["Moz"+c]="moz"+o,f}var Eo={animationend:dl("Animation","AnimationEnd"),animationiteration:dl("Animation","AnimationIteration"),animationstart:dl("Animation","AnimationStart"),transitionrun:dl("Transition","TransitionRun"),transitionstart:dl("Transition","TransitionStart"),transitioncancel:dl("Transition","TransitionCancel"),transitionend:dl("Transition","TransitionEnd")},vb={},pE={};ni&&(pE=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);
vendor: 18,633 bytes, line 48
48function ul(c){if(vb[c])return vb[c];if(!Eo[c])return c;var o=Eo[c],f;for(f in o)if(o.hasOwnProperty(f)&&f in pE)return vb[c]=o[f];return c}var fE=ul("animationend"),mE=ul("animationiteration"),xE=ul("animationstart"),zH=ul("transitionrun"),UH=ul("transitionstart"),qH=ul("transitioncancel"),gE=ul("transitionend"),hE=new Map,yb="abort auxClick beforeToggle 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(" ");yb.push("scrollEnd");function tr(c,o){hE.set(c,o),ll(o,[c])}var rx=typeof reportError=="function"?reportError:function(c){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof c=="object"&&c!==null&&typeof c.message=="string"?String(c.message):String(c),error:c});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",c);return}console.error(c)},Ms=[],Ao=0,bb=0;function ix(){for(var c=Ao,o=bb=Ao=0;o<c;){var f=Ms[o];Ms[o++]=null;var g=Ms[o];Ms[o++]=null;var N=Ms[o];Ms[o++]=null;var C=Ms[o];if(Ms[o++]=null,g!==null&&N!==null){var P=g.pending;P===null?N.next=N:(N.next=P.next,P.next=N),g.pending=N}C!==0&&vE(f,N,C)}}function cx(c,o,f,g){Ms[Ao++]=c,Ms[Ao++]=o,Ms[Ao++]=f,Ms[Ao++]=g,bb|=g,c.lanes|=g,c=c.alternate,c!==null&&(c.lanes|=g)}function jb(c,o,f,g){return cx(c,o,f,g),lx(c)}function pl(c,o){return cx(c,null,null,o),lx(c)}function vE(c,o,f){c.lanes|=f;var g=c.alternate;g!==null&&(g.lanes|=f);for(var N=!1,C=c.return;C!==null;)C.childLanes|=f,g=C.alternate,g!==null&&(g.childLanes|=f),C.tag===22&&(c=C.stateNode,c===null||c._visibility&1||(N=!0)),c=C,C=C.return;return c.tag===3?(C=c.stateNode,N&&o!==null&&(N=31-Ve(f),c=C.hiddenUpdates,g=c[N],g===null?c[N]=[o]:g.push(o),o.lane=f|536870912),C):null}function lx(c){if(50<sp)throw sp=0,k0=null,Error(s(185));for(var o=c.return;o!==null;)c=o,o=c.return;return c.tag===3?c.stateNode:null}var Do={};function FH(c,o,f,g){this.tag=c,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function os(c,o,f,g){return new FH(c,o,f,g)}function wb(c){return c=c.prototype,!(!c||!c.isReactComponent)}function si(c,o){var f=c.alternate;return f===null?(f=os(c.tag,o,c.key,c.mode),f.elementType=c.elementType,f.type=c.type,f.stateNode=c.stateNode,f.alternate=c,c.alternate=f):(f.pendingProps=o,f.type=c.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=c.flags&65011712,f.childLanes=c.childLanes,f.lanes=c.lanes,f.child=c.child,f.memoizedProps=c.memoizedProps,f.memoizedState=c.memoizedState,f.updateQueue=c.updateQueue,o=c.dependencies,f.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},f.sibling=c.sibling,f.index=c.index,f.ref=c.ref,f.refCleanup=c.refCleanup,f}function yE(c,o){c.flags&=65011714;var f=c.alternate;return f===null?(c.childLanes=0,c.lanes=o,c.child=null,c.subtreeFlags=0,c.memoizedProps=null,c.memoizedState=null,c.updateQueue=null,c.dependencies=null,c.stateNode=null):(c.childLanes=f.childLanes,c.lanes=f.lanes,c.child=f.child,c.subtreeFlags=0,c.deletions=null,c.memoizedProps=f.memoizedProps,c.memoizedState=f.memoizedState,c.updateQueue=f.updateQueue,c.type=f.type,o=f.dependencies,c.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),c}function ox(c,o,f,g,N,C){var P=0;if(g=c,typeof c=="function")wb(c)&&(P=1);else if(typeof c=="string")P=YV(c,f,q.current)?26:c==="html"||c==="head"||c==="body"?27:5;else e:switch(c){case I:return c=os(31,f,o,N),c.elementType=I,c.lanes=C,c;case b:return fl(f.children,N,C,o);case j:P=8,N|=24;break;case S:return c=os(12,f,o,N|2),c.elementType=S,c.lanes=C,c;case E:return c=os(13,f,o,N),c.elementType=E,c.lanes=C,c;case D:return c=os(19,f,o,N),c.elementType=D,c.lanes=C,c;default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case A:P=10;break e;case O:P=9;break e;case k:P=11;break e;case _:P=14;break e;case T:P=16,g=null;break e}P=29,f=Error(s(130,c===null?"null":typeof c,"")),g=null}return o=os(P,f,o,N),o.elementType=c,o.type=g,o.lanes=C,o}function fl(c,o,f,g){return c=os(7,c,g,o),c.lanes=f,c}function Nb(c,o,f){return c=os(6,c,null,o),c.lanes=f,c}function bE(c){var o=os(18,null,null,0);return o.stateNode=c,o}function Sb(c,o,f){return o=os(4,c.children!==null?c.children:[],c.key,o),o.lanes=f,o.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},o}var jE=new WeakMap;function Rs(c,o){if(typeof c=="object"&&c!==null){var f=jE.get(c);return f!==void 0?f:(o={value:c,source:o,stack:dt(o)},jE.set(c,o),o)}return{value:c,source:o,stack:dt(o)}}var Oo=[],ko=0,dx=null,Iu=0,Bs=[],Is=0,ec=null,Er=1,Ar="";function ri(c,o){Oo[ko++]=Iu,Oo[ko++]=dx,dx=c,Iu=o}function wE(c,o,f){Bs[Is++]=Er,Bs[Is++]=Ar,Bs[Is++]=ec,ec=c;var g=Er;c=Ar;var N=32-Ve(g)-1;g&=~(1<<N),f+=1;var C=32-Ve(o)+N;if(30<C){var P=N-N%5;C=(g&(1<<P)-1).toString(32),g>>=P,N-=P,Er=1<<32-Ve(o)+N|f<<N|g,Ar=C+c}else Er=1<<C|f<<N|g,Ar=c}function Cb(c){c.return!==null&&(ri(c,1),wE(c,1,0))}function Eb(c){for(;c===dx;)dx=Oo[--ko],Oo[ko]=null,Iu=Oo[--ko],Oo[ko]=null;for(;c===ec;)ec=Bs[--Is],Bs[Is]=null,Ar=Bs[--Is],Bs[Is]=null,Er=Bs[--Is],Bs[Is]=null}function NE(c,o){Bs[Is++]=Er,Bs[Is++]=Ar,Bs[Is++]=ec,Er=o.id,Ar=o.overflow,ec=c}var Cn=null,ka=null,Kt=!1,tc=null,Ls=!1,Ab=Error(s(519));function ac(c){var o=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lu(Rs(o,c)),Ab}function SE(c){var o=c.stateNode,f=c.type,g=c.memoizedProps;switch(o[dn]=c,o[Mn]=g,f){case"dialog":qt("cancel",o),qt("close",o);break;case"iframe":case"object":case"embed":qt("load",o);break;case"video":case"audio":for(f=0;f<ip.length;f++)qt(ip[f],o);break;case"source":qt("error",o);break;case"img":case"image":case"link":qt("error",o),qt("load",o);break;case"details":qt("toggle",o);break;case"input":qt("invalid",o),I4(o,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":qt("invalid",o);break;case"textarea":qt("invalid",o),$4(o,g.value,g.defaultValue,g.children)}f=g.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||o.textContent===""+f||g.suppressHydrationWarning===!0||UD(o.textContent,f)?(g.popover!=null&&(qt("beforetoggle",o),qt("toggle",o)),g.onScroll!=null&&qt("scroll",o),g.onScrollEnd!=null&&qt("scrollend",o),g.onClick!=null&&(o.onclick=ai),o=!0):o=!1,o||ac(c,!0)}function CE(c){for(Cn=c.return;Cn;)switch(Cn.tag){case 5:case 31:case 13:Ls=!1;return;case 27:case 3:Ls=!0;return;default:Cn=Cn.return}}function _o(c){if(c!==Cn)return!1;if(!Kt)return CE(c),Kt=!0,!1;var o=c.tag,f;if((f=o!==3&&o!==27)&&((f=o===5)&&(f=c.type,f=!(f!=="form"&&f!=="button")||H0(c.type,c.memoizedProps)),f=!f),f&&ka&&ac(c),CE(c),o===13){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));ka=QD(c)}else if(o===31){if(c=c.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));ka=QD(c)}else o===27?(o=ka,gc(c.type)?(c=Q0,Q0=null,ka=c):ka=o):ka=Cn?zs(c.stateNode.nextSibling):null;return!0}function ml(){ka=Cn=null,Kt=!1}function Db(){var c=tc;return c!==null&&(ts===null?ts=c:ts.push.apply(ts,c),tc=null),c}function Lu(c){tc===null?tc=[c]:tc.push(c)}var Ob=G(null),xl=null,ii=null;function nc(c,o,f){H(Ob,o._currentValue),o._currentValue=f}function ci(c){c._currentValue=Ob.current,F(Ob)}function kb(c,o,f){for(;c!==null;){var g=c.alternate;if((c.childLanes&o)!==o?(c.childLanes|=o,g!==null&&(g.childLanes|=o)):g!==null&&(g.childLanes&o)!==o&&(g.childLanes|=o),c===f)break;c=c.return}}function _b(c,o,f,g){var N=c.child;for(N!==null&&(N.return=c);N!==null;){var C=N.dependencies;if(C!==null){var P=N.child;C=C.firstContext;e:for(;C!==null;){var V=C;C=N;for(var ae=0;ae<o.length;ae++)if(V.context===o[ae]){C.lanes|=f,V=C.alternate,V!==null&&(V.lanes|=f),kb(C.return,f,c),g||(P=null);break e}C=V.next}}else if(N.tag===18){if(P=N.return,P===null)throw Error(s(341));P.lanes|=f,C=P.alternate,C!==null&&(C.lanes|=f),kb(P,f,c),P=null}else P=N.child;if(P!==null)P.return=N;else for(P=N;P!==null;){if(P===c){P=null;break}if(N=P.sibling,N!==null){N.return=P.return,P=N;break}P=P.return}N=P}}function To(c,o,f,g){c=null;for(var N=o,C=!1;N!==null;){if(!C){if((N.flags&524288)!==0)C=!0;else if((N.flags&262144)!==0)break}if(N.tag===10){var P=N.alternate;if(P===null)throw Error(s(387));if(P=P.memoizedProps,P!==null){var V=N.type;ls(N.pendingProps.value,P.value)||(c!==null?c.push(V):c=[V])}}else if(N===se.current){if(P=N.alternate,P===null)throw Error(s(387));P.memoizedState.memoizedState!==N.memoizedState.memoizedState&&(c!==null?c.push(up):c=[up])}N=N.return}c!==null&&_b(o,c,f,g),o.flags|=262144}function ux(c){for(c=c.firstContext;c!==null;){if(!ls(c.context._currentValue,c.memoizedValue))return!0;c=c.next}return!1}function gl(c){xl=c,ii=null,c=c.dependencies,c!==null&&(c.firstContext=null)}function En(c){return EE(xl,c)}function px(c,o){return xl===null&&gl(c),EE(c,o)}function EE(c,o){var f=o._currentValue;if(o={context:o,memoizedValue:f,next:null},ii===null){if(c===null)throw Error(s(308));ii=o,c.dependencies={lanes:0,firstContext:o},c.flags|=524288}else ii=ii.next=o;return f}var WH=typeof AbortController<"u"?AbortController:function(){var c=[],o=this.signal={aborted:!1,addEventListener:function(f,g){c.push(g)}};this.abort=function(){o.aborted=!0,c.forEach(function(f){return f()})}},HH=e.unstable_scheduleCallback,VH=e.unstable_NormalPriority,an={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Tb(){return{controller:new WH,data:new Map,refCount:0}}function $u(c){c.refCount--,c.refCount===0&&HH(VH,function(){c.controller.abort()})}var zu=null,Pb=0,Po=0,Mo=null;function GH(c,o){if(zu===null){var f=zu=[];Pb=0,Po=B0(),Mo={status:"pending",value:void 0,then:function(g){f.push(g)}}}return Pb++,o.then(AE,AE),o}function AE(){if(--Pb===0&&zu!==null){Mo!==null&&(Mo.status="fulfilled");var c=zu;zu=null,Po=0,Mo=null;for(var o=0;o<c.length;o++)(0,c[o])()}}function YH(c,o){var f=[],g={status:"pending",value:null,reason:null,then:function(N){f.push(N)}};return c.then(function(){g.status="fulfilled",g.value=o;for(var N=0;N<f.length;N++)(0,f[N])(o)},function(N){for(g.status="rejected",g.reason=N,N=0;N<f.length;N++)(0,f[N])(void 0)}),g}var DE=L.S;L.S=function(c,o){uD=_t(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&GH(c,o),DE!==null&&DE(c,o)};var hl=G(null);function Mb(){var c=hl.current;return c!==null?c:Ea.pooledCache}function fx(c,o){o===null?H(hl,hl.current):H(hl,o.pool)}function OE(){var c=Mb();return c===null?null:{parent:an._currentValue,pool:c}}var Ro=Error(s(460)),Rb=Error(s(474)),mx=Error(s(542)),xx={then:function(){}};function kE(c){return c=c.status,c==="fulfilled"||c==="rejected"}function _E(c,o,f){switch(f=c[f],f===void 0?c.push(o):f!==o&&(o.then(ai,ai),o=f),o.status){case"fulfilled":return o.value;case"rejected":throw c=o.reason,PE(c),c;default:if(typeof o.status=="string")o.then(ai,ai);else{if(c=Ea,c!==null&&100<c.shellSuspendCounter)throw Error(s(482));c=o,c.status="pending",c.then(function(g){if(o.status==="pending"){var N=o;N.status="fulfilled",N.value=g}},function(g){if(o.status==="pending"){var N=o;N.status="rejected",N.reason=g}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw c=o.reason,PE(c),c}throw yl=o,Ro}}function vl(c){try{var o=c._init;return o(c._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(yl=f,Ro):f}}var yl=null;function TE(){if(yl===null)throw Error(s(459));var c=yl;return yl=null,c}function PE(c){if(c===Ro||c===mx)throw Error(s(483))}var Bo=null,Uu=0;function gx(c){var o=Uu;return Uu+=1,Bo===null&&(Bo=[]),_E(Bo,c,o)}function qu(c,o){o=o.props.ref,c.ref=o!==void 0?o:null}function hx(c,o){throw o.$$typeof===h?Error(s(525)):(c=Object.prototype.toString.call(o),Error(s(31,c==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":c)))}function ME(c){function o(oe,re){if(c){var pe=oe.deletions;pe===null?(oe.deletions=[re],oe.flags|=16):pe.push(re)}}function f(oe,re){if(!c)return null;for(;re!==null;)o(oe,re),re=re.sibling;return null}function g(oe){for(var re=new Map;oe!==null;)oe.key!==null?re.set(oe.key,oe):re.set(oe.index,oe),oe=oe.sibling;return re}function N(oe,re){return oe=si(oe,re),oe.index=0,oe.sibling=null,oe}function C(oe,re,pe){return oe.index=pe,c?(pe=oe.alternate,pe!==null?(pe=pe.index,pe<re?(oe.flags|=67108866,re):pe):(oe.flags|=67108866,re)):(oe.flags|=1048576,re)}function P(oe){return c&&oe.alternate===null&&(oe.flags|=67108866),oe}function V(oe,re,pe,Ae){return re===null||re.tag!==6?(re=Nb(pe,oe.mode,Ae),re.return=oe,re):(re=N(re,pe),re.return=oe,re)}function ae(oe,re,pe,Ae){var jt=pe.type;return jt===b?Ce(oe,re,pe.props.children,Ae,pe.key):re!==null&&(re.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===T&&vl(jt)===re.type)?(re=N(re,pe.props),qu(re,pe),re.return=oe,re):(re=ox(pe.type,pe.key,pe.props,null,oe.mode,Ae),qu(re,pe),re.return=oe,re)}function fe(oe,re,pe,Ae){return re===null||re.tag!==4||re.stateNode.containerInfo!==pe.containerInfo||re.stateNode.implementation!==pe.implementation?(re=Sb(pe,oe.mode,Ae),re.return=oe,re):(re=N(re,pe.children||[]),re.return=oe,re)}function Ce(oe,re,pe,Ae,jt){return re===null||re.tag!==7?(re=fl(pe,oe.mode,Ae,jt),re.return=oe,re):(re=N(re,pe),re.return=oe,re)}function Oe(oe,re,pe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Nb(""+re,oe.mode,pe),re.return=oe,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case y:return pe=ox(re.type,re.key,re.props,null,oe.mode,pe),qu(pe,re),pe.return=oe,pe;case w:return re=Sb(re,oe.mode,pe),re.return=oe,re;case T:return re=vl(re),Oe(oe,re,pe)}if(Q(re)||B(re))return re=fl(re,oe.mode,pe,null),re.return=oe,re;if(typeof re.then=="function")return Oe(oe,gx(re),pe);if(re.$$typeof===A)return Oe(oe,px(oe,re),pe);hx(oe,re)}return null}function ge(oe,re,pe,Ae){var jt=re!==null?re.key:null;if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return jt!==null?null:V(oe,re,""+pe,Ae);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:return pe.key===jt?ae(oe,re,pe,Ae):null;case w:return pe.key===jt?fe(oe,re,pe,Ae):null;case T:return pe=vl(pe),ge(oe,re,pe,Ae)}if(Q(pe)||B(pe))return jt!==null?null:Ce(oe,re,pe,Ae,null);if(typeof pe.then=="function")return ge(oe,re,gx(pe),Ae);if(pe.$$typeof===A)return ge(oe,re,px(oe,pe),Ae);hx(oe,pe)}return null}function je(oe,re,pe,Ae,jt){if(typeof Ae=="string"&&Ae!==""||typeof Ae=="number"||typeof Ae=="bigint")return oe=oe.get(pe)||null,V(re,oe,""+Ae,jt);if(typeof Ae=="object"&&Ae!==null){switch(Ae.$$typeof){case y:return oe=oe.get(Ae.key===null?pe:Ae.key)||null,ae(re,oe,Ae,jt);case w:return oe=oe.get(Ae.key===null?pe:Ae.key)||null,fe(re,oe,Ae,jt);case T:return Ae=vl(Ae),je(oe,re,pe,Ae,jt)}if(Q(Ae)||B(Ae))return oe=oe.get(pe)||null,Ce(re,oe,Ae,jt,null);if(typeof Ae.then=="function")return je(oe,re,pe,gx(Ae),jt);if(Ae.$$typeof===A)return je(oe,re,pe,px(re,Ae),jt);hx(re,Ae)}return null}function rt(oe,re,pe,Ae){for(var jt=null,Jt=null,ot=re,Rt=re=0,Gt=null;ot!==null&&Rt<pe.length;Rt++){ot.index>Rt?(Gt=ot,ot=null):Gt=ot.sibling;var ea=ge(oe,ot,pe[Rt],Ae);if(ea===null){ot===null&&(ot=Gt);break}c&&ot&&ea.alternate===null&&o(oe,ot),re=C(ea,re,Rt),Jt===null?jt=ea:Jt.sibling=ea,Jt=ea,ot=Gt}if(Rt===pe.length)return f(oe,ot),Kt&&ri(oe,Rt),jt;if(ot===null){for(;Rt<pe.length;Rt++)ot=Oe(oe,pe[Rt],Ae),ot!==null&&(re=C(ot,re,Rt),Jt===null?jt=ot:Jt.sibling=ot,Jt=ot);return Kt&&ri(oe,Rt),jt}for(ot=g(ot);Rt<pe.length;Rt++)Gt=je(ot,oe,Rt,pe[Rt],Ae),Gt!==null&&(c&&Gt.alternate!==null&&ot.delete(Gt.key===null?Rt:Gt.key),re=C(Gt,re,Rt),Jt===null?jt=Gt:Jt.sibling=Gt,Jt=Gt);return c&&ot.forEach(function(jc){return o(oe,jc)}),Kt&&ri(oe,Rt),jt}function wt(oe,re,pe,Ae){if(pe==null)throw Error(s(151));for(var jt=null,Jt=null,ot=re,Rt=re=0,Gt=null,ea=pe.next();ot!==null&&!ea.done;Rt++,ea=pe.next()){ot.index>Rt?(Gt=ot,ot=null):Gt=ot.sibling;var jc=ge(oe,ot,ea.value,Ae);if(jc===null){ot===null&&(ot=Gt);break}c&&ot&&jc.alternate===null&&o(oe,ot),re=C(jc,re,Rt),Jt===null?jt=jc:Jt.sibling=jc,Jt=jc,ot=Gt}if(ea.done)return f(oe,ot),Kt&&ri(oe,Rt),jt;if(ot===null){for(;!ea.done;Rt++,ea=pe.next())ea=Oe(oe,ea.value,Ae),ea!==null&&(re=C(ea,re,Rt),Jt===null?jt=ea:Jt.sibling=ea,Jt=ea);return Kt&&ri(oe,Rt),jt}for(ot=g(ot);!ea.done;Rt++,ea=pe.next())ea=je(ot,oe,Rt,ea.value,Ae),ea!==null&&(c&&ea.alternate!==null&&ot.delete(ea.key===null?Rt:ea.key),re=C(ea,re,Rt),Jt===null?jt=ea:Jt.sibling=ea,Jt=ea);return c&&ot.forEach(function(rG){return o(oe,rG)}),Kt&&ri(oe,Rt),jt}function ya(oe,re,pe,Ae){if(typeof pe=="object"&&pe!==null&&pe.type===b&&pe.key===null&&(pe=pe.props.children),typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case y:e:{for(var jt=pe.key;re!==null;){if(re.key===jt){if(jt=pe.type,jt===b){if(re.tag===7){f(oe,re.sibling),Ae=N(re,pe.props.children),Ae.return=oe,oe=Ae;break e}}else if(re.elementType===jt||typeof jt=="object"&&jt!==null&&jt.$$typeof===T&&vl(jt)===re.type){f(oe,re.sibling),Ae=N(re,pe.props),qu(Ae,pe),Ae.return=oe,oe=Ae;break e}f(oe,re);break}else o(oe,re);re=re.sibling}pe.type===b?(Ae=fl(pe.props.children,oe.mode,Ae,pe.key),Ae.return=oe,oe=Ae):(Ae=ox(pe.type,pe.key,pe.props,null,oe.mode,Ae),qu(Ae,pe),Ae.return=oe,oe=Ae)}return P(oe);case w:e:{for(jt=pe.key;re!==null;){if(re.key===jt)if(re.tag===4&&re.stateNode.containerInfo===pe.containerInfo&&re.stateNode.implementation===pe.implementation){f(oe,re.sibling),Ae=N(re,pe.children||[]),Ae.return=oe,oe=Ae;break e}else{f(oe,re);break}else o(oe,re);re=re.sibling}Ae=Sb(pe,oe.mode,Ae),Ae.return=oe,oe=Ae}return P(oe);case T:return pe=vl(pe),ya(oe,re,pe,Ae)}if(Q(pe))return rt(oe,re,pe,Ae);if(B(pe)){if(jt=B(pe),typeof jt!="function")throw Error(s(150));return pe=jt.call(pe),wt(oe,re,pe,Ae)}if(typeof pe.then=="function")return ya(oe,re,gx(pe),Ae);if(pe.$$typeof===A)return ya(oe,re,px(oe,pe),Ae);hx(oe,pe)}
vendor: 6,419 bytes, line 48
48return typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint"?(pe=""+pe,re!==null&&re.tag===6?(f(oe,re.sibling),Ae=N(re,pe),Ae.return=oe,oe=Ae):(f(oe,re),Ae=Nb(pe,oe.mode,Ae),Ae.return=oe,oe=Ae),P(oe)):f(oe,re)}return function(oe,re,pe,Ae){try{Uu=0;var jt=ya(oe,re,pe,Ae);return Bo=null,jt}catch(ot){if(ot===Ro||ot===mx)throw ot;var Jt=os(29,ot,null,oe.mode);return Jt.lanes=Ae,Jt.return=oe,Jt}finally{}}}var bl=ME(!0),RE=ME(!1),sc=!1;function Bb(c){c.updateQueue={baseState:c.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ib(c,o){c=c.updateQueue,o.updateQueue===c&&(o.updateQueue={baseState:c.baseState,firstBaseUpdate:c.firstBaseUpdate,lastBaseUpdate:c.lastBaseUpdate,shared:c.shared,callbacks:null})}function rc(c){return{lane:c,tag:0,payload:null,callback:null,next:null}}function ic(c,o,f){var g=c.updateQueue;if(g===null)return null;if(g=g.shared,(na&2)!==0){var N=g.pending;return N===null?o.next=o:(o.next=N.next,N.next=o),g.pending=o,o=lx(c),vE(c,null,f),o}return cx(c,g,o,f),lx(c)}function Fu(c,o,f){if(o=o.updateQueue,o!==null&&(o=o.shared,(f&4194048)!==0)){var g=o.lanes;g&=c.pendingLanes,f|=g,o.lanes=f,ga(c,f)}}function Lb(c,o){var f=c.updateQueue,g=c.alternate;if(g!==null&&(g=g.updateQueue,f===g)){var N=null,C=null;if(f=f.firstBaseUpdate,f!==null){do{var P={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};C===null?N=C=P:C=C.next=P,f=f.next}while(f!==null);C===null?N=C=o:C=C.next=o}else N=C=o;f={baseState:g.baseState,firstBaseUpdate:N,lastBaseUpdate:C,shared:g.shared,callbacks:g.callbacks},c.updateQueue=f;return}c=f.lastBaseUpdate,c===null?f.firstBaseUpdate=o:c.next=o,f.lastBaseUpdate=o}var $b=!1;function Wu(){if($b){var c=Mo;if(c!==null)throw c}}function Hu(c,o,f,g){$b=!1;var N=c.updateQueue;sc=!1;var C=N.firstBaseUpdate,P=N.lastBaseUpdate,V=N.shared.pending;if(V!==null){N.shared.pending=null;var ae=V,fe=ae.next;ae.next=null,P===null?C=fe:P.next=fe,P=ae;var Ce=c.alternate;Ce!==null&&(Ce=Ce.updateQueue,V=Ce.lastBaseUpdate,V!==P&&(V===null?Ce.firstBaseUpdate=fe:V.next=fe,Ce.lastBaseUpdate=ae))}if(C!==null){var Oe=N.baseState;P=0,Ce=fe=ae=null,V=C;do{var ge=V.lane&-536870913,je=ge!==V.lane;if(je?(Vt&ge)===ge:(g&ge)===ge){ge!==0&&ge===Po&&($b=!0),Ce!==null&&(Ce=Ce.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var rt=c,wt=V;ge=o;var ya=f;switch(wt.tag){case 1:if(rt=wt.payload,typeof rt=="function"){Oe=rt.call(ya,Oe,ge);break e}Oe=rt;break e;case 3:rt.flags=rt.flags&-65537|128;case 0:if(rt=wt.payload,ge=typeof rt=="function"?rt.call(ya,Oe,ge):rt,ge==null)break e;Oe=m({},Oe,ge);break e;case 2:sc=!0}}ge=V.callback,ge!==null&&(c.flags|=64,je&&(c.flags|=8192),je=N.callbacks,je===null?N.callbacks=[ge]:je.push(ge))}else je={lane:ge,tag:V.tag,payload:V.payload,callback:V.callback,next:null},Ce===null?(fe=Ce=je,ae=Oe):Ce=Ce.next=je,P|=ge;if(V=V.next,V===null){if(V=N.shared.pending,V===null)break;je=V,V=je.next,je.next=null,N.lastBaseUpdate=je,N.shared.pending=null}}while(!0);Ce===null&&(ae=Oe),N.baseState=ae,N.firstBaseUpdate=fe,N.lastBaseUpdate=Ce,C===null&&(N.shared.lanes=0),uc|=P,c.lanes=P,c.memoizedState=Oe}}function BE(c,o){if(typeof c!="function")throw Error(s(191,c));c.call(o)}function IE(c,o){var f=c.callbacks;if(f!==null)for(c.callbacks=null,c=0;c<f.length;c++)BE(f[c],o)}var Io=G(null),vx=G(0);function LE(c,o){c=gi,H(vx,c),H(Io,o),gi=c|o.baseLanes}function zb(){H(vx,gi),H(Io,Io.current)}function Ub(){gi=vx.current,F(Io),F(vx)}var ds=G(null),$s=null;function cc(c){var o=c.alternate;H(Za,Za.current&1),H(ds,c),$s===null&&(o===null||Io.current!==null||o.memoizedState!==null)&&($s=c)}function qb(c){H(Za,Za.current),H(ds,c),$s===null&&($s=c)}function $E(c){c.tag===22?(H(Za,Za.current),H(ds,c),$s===null&&($s=c)):lc()}function lc(){H(Za,Za.current),H(ds,ds.current)}function us(c){F(ds),$s===c&&($s=null),F(Za)}var Za=G(0);function yx(c){for(var o=c;o!==null;){if(o.tag===13){var f=o.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Y0(f)||K0(f)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===c)break;for(;o.sibling===null;){if(o.return===null||o.return===c)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var li=0,Tt=null,ha=null,nn=null,bx=!1,Lo=!1,jl=!1,jx=0,Vu=0,$o=null,KH=0;function Ya(){throw Error(s(321))}function Fb(c,o){if(o===null)return!1;for(var f=0;f<o.length&&f<c.length;f++)if(!ls(c[f],o[f]))return!1;return!0}function Wb(c,o,f,g,N,C){return li=C,Tt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,L.H=c===null||c.memoizedState===null?wA:r0,jl=!1,C=f(g,N),jl=!1,Lo&&(C=UE(o,f,g,N)),zE(c),C}function zE(c){L.H=Ku;var o=ha!==null&&ha.next!==null;if(li=0,nn=ha=Tt=null,bx=!1,Vu=0,$o=null,o)throw Error(s(300));c===null||sn||(c=c.dependencies,c!==null&&ux(c)&&(sn=!0))}function UE(c,o,f,g){Tt=c;var N=0;do{if(Lo&&($o=null),Vu=0,Lo=!1,25<=N)throw Error(s(301));if(N+=1,nn=ha=null,c.updateQueue!=null){var C=c.updateQueue;C.lastEffect=null,C.events=null,C.stores=null,C.memoCache!=null&&(C.memoCache.index=0)}L.H=NA,C=o(f,g)}while(Lo);return C}function QH(){var c=L.H,o=c.useState()[0];return o=typeof o.then=="function"?Gu(o):o,c=c.useState()[0],(ha!==null?ha.memoizedState:null)!==c&&(Tt.flags|=1024),o}function Hb(){var c=jx!==0;return jx=0,c}function Vb(c,o,f){o.updateQueue=c.updateQueue,o.flags&=-2053,c.lanes&=~f}function Gb(c){if(bx){for(c=c.memoizedState;c!==null;){var o=c.queue;o!==null&&(o.pending=null),c=c.next}bx=!1}li=0,nn=ha=Tt=null,Lo=!1,Vu=jx=0,$o=null}function Un(){var c={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nn===null?Tt.memoizedState=nn=c:nn=nn.next=c,nn}function Ja(){if(ha===null){var c=Tt.alternate;c=c!==null?c.memoizedState:null}else c=ha.next;var o=nn===null?Tt.memoizedState:nn.next;if(o!==null)nn=o,ha=c;else{if(c===null)throw Tt.alternate===null?Error(s(467)):Error(s(310));ha=c,c={memoizedState:ha.memoizedState,baseState:ha.baseState,baseQueue:ha.baseQueue,queue:ha.queue,next:null},nn===null?Tt.memoizedState=nn=c:nn=nn.next=c}return nn}function wx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gu(c){var o=Vu;
vendor: 17,125 bytes, line 48
48return Vu+=1,$o===null&&($o=[]),c=_E($o,c,o),o=Tt,(nn===null?o.memoizedState:nn.next)===null&&(o=o.alternate,L.H=o===null||o.memoizedState===null?wA:r0),c}function Nx(c){if(c!==null&&typeof c=="object"){if(typeof c.then=="function")return Gu(c);if(c.$$typeof===A)return En(c)}throw Error(s(438,String(c)))}function Yb(c){var o=null,f=Tt.updateQueue;if(f!==null&&(o=f.memoCache),o==null){var g=Tt.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(o={data:g.data.map(function(N){return N.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),f===null&&(f=wx(),Tt.updateQueue=f),f.memoCache=o,f=o.data[o.index],f===void 0)for(f=o.data[o.index]=Array(c),g=0;g<c;g++)f[g]=$;return o.index++,f}function oi(c,o){return typeof o=="function"?o(c):o}function Sx(c){var o=Ja();return Kb(o,ha,c)}function Kb(c,o,f){var g=c.queue;if(g===null)throw Error(s(311));g.lastRenderedReducer=f;var N=c.baseQueue,C=g.pending;if(C!==null){if(N!==null){var P=N.next;N.next=C.next,C.next=P}o.baseQueue=N=C,g.pending=null}if(C=c.baseState,N===null)c.memoizedState=C;else{o=N.next;var V=P=null,ae=null,fe=o,Ce=!1;do{var Oe=fe.lane&-536870913;if(Oe!==fe.lane?(Vt&Oe)===Oe:(li&Oe)===Oe){var ge=fe.revertLane;if(ge===0)ae!==null&&(ae=ae.next={lane:0,revertLane:0,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null}),Oe===Po&&(Ce=!0);else if((li&ge)===ge){fe=fe.next,ge===Po&&(Ce=!0);continue}else Oe={lane:0,revertLane:fe.revertLane,gesture:null,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ae===null?(V=ae=Oe,P=C):ae=ae.next=Oe,Tt.lanes|=ge,uc|=ge;Oe=fe.action,jl&&f(C,Oe),C=fe.hasEagerState?fe.eagerState:f(C,Oe)}else ge={lane:Oe,revertLane:fe.revertLane,gesture:fe.gesture,action:fe.action,hasEagerState:fe.hasEagerState,eagerState:fe.eagerState,next:null},ae===null?(V=ae=ge,P=C):ae=ae.next=ge,Tt.lanes|=Oe,uc|=Oe;fe=fe.next}while(fe!==null&&fe!==o);if(ae===null?P=C:ae.next=V,!ls(C,c.memoizedState)&&(sn=!0,Ce&&(f=Mo,f!==null)))throw f;c.memoizedState=C,c.baseState=P,c.baseQueue=ae,g.lastRenderedState=C}return N===null&&(g.lanes=0),[c.memoizedState,g.dispatch]}function Qb(c){var o=Ja(),f=o.queue;if(f===null)throw Error(s(311));f.lastRenderedReducer=c;var g=f.dispatch,N=f.pending,C=o.memoizedState;if(N!==null){f.pending=null;var P=N=N.next;do C=c(C,P.action),P=P.next;while(P!==N);ls(C,o.memoizedState)||(sn=!0),o.memoizedState=C,o.baseQueue===null&&(o.baseState=C),f.lastRenderedState=C}return[C,g]}function qE(c,o,f){var g=Tt,N=Ja(),C=Kt;if(C){if(f===void 0)throw Error(s(407));f=f()}else f=o();var P=!ls((ha||N).memoizedState,f);if(P&&(N.memoizedState=f,sn=!0),N=N.queue,Jb(HE.bind(null,g,N,c),[c]),N.getSnapshot!==o||P||nn!==null&&nn.memoizedState.tag&1){if(g.flags|=2048,zo(9,{destroy:void 0},WE.bind(null,g,N,f,o),null),Ea===null)throw Error(s(349));C||(li&127)!==0||FE(g,o,f)}return f}function FE(c,o,f){c.flags|=16384,c={getSnapshot:o,value:f},o=Tt.updateQueue,o===null?(o=wx(),Tt.updateQueue=o,o.stores=[c]):(f=o.stores,f===null?o.stores=[c]:f.push(c))}function WE(c,o,f,g){o.value=f,o.getSnapshot=g,VE(o)&&GE(c)}function HE(c,o,f){return f(function(){VE(o)&&GE(c)})}function VE(c){var o=c.getSnapshot;c=c.value;try{var f=o();return!ls(c,f)}catch{return!0}}function GE(c){var o=pl(c,2);o!==null&&as(o,c,2)}function Xb(c){var o=Un();if(typeof c=="function"){var f=c;if(c=f(),jl){Re(!0);try{f()}finally{Re(!1)}}}return o.memoizedState=o.baseState=c,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:c},o}function YE(c,o,f,g){return c.baseState=f,Kb(c,ha,typeof g=="function"?g:oi)}function XH(c,o,f,g,N){if(Ax(c))throw Error(s(485));if(c=o.action,c!==null){var C={payload:N,action:c,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){C.listeners.push(P)}};L.T!==null?f(!0):C.isTransition=!1,g(C),f=o.pending,f===null?(C.next=o.pending=C,KE(o,C)):(C.next=f.next,o.pending=f.next=C)}}function KE(c,o){var f=o.action,g=o.payload,N=c.state;if(o.isTransition){var C=L.T,P={};L.T=P;try{var V=f(N,g),ae=L.S;ae!==null&&ae(P,V),QE(c,o,V)}catch(fe){Zb(c,o,fe)}finally{C!==null&&P.types!==null&&(C.types=P.types),L.T=C}}else try{C=f(N,g),QE(c,o,C)}catch(fe){Zb(c,o,fe)}}function QE(c,o,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(g){XE(c,o,g)},function(g){return Zb(c,o,g)}):XE(c,o,f)}function XE(c,o,f){o.status="fulfilled",o.value=f,ZE(o),c.state=f,o=c.pending,o!==null&&(f=o.next,f===o?c.pending=null:(f=f.next,o.next=f,KE(c,f)))}function Zb(c,o,f){var g=c.pending;if(c.pending=null,g!==null){g=g.next;do o.status="rejected",o.reason=f,ZE(o),o=o.next;while(o!==g)}c.action=null}function ZE(c){c=c.listeners;for(var o=0;o<c.length;o++)(0,c[o])()}function JE(c,o){return o}function eA(c,o){if(Kt){var f=Ea.formState;if(f!==null){e:{var g=Tt;if(Kt){if(ka){t:{for(var N=ka,C=Ls;N.nodeType!==8;){if(!C){N=null;break t}if(N=zs(N.nextSibling),N===null){N=null;break t}}C=N.data,N=C==="F!"||C==="F"?N:null}if(N){ka=zs(N.nextSibling),g=N.data==="F!";break e}}ac(g)}g=!1}g&&(o=f[0])}}return f=Un(),f.memoizedState=f.baseState=o,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:JE,lastRenderedState:o},f.queue=g,f=yA.bind(null,Tt,g),g.dispatch=f,g=Xb(!1),C=s0.bind(null,Tt,!1,g.queue),g=Un(),N={state:o,dispatch:null,action:c,pending:null},g.queue=N,f=XH.bind(null,Tt,N,C,f),N.dispatch=f,g.memoizedState=c,[o,f,!1]}function tA(c){var o=Ja();return aA(o,ha,c)}function aA(c,o,f){if(o=Kb(c,o,JE)[0],c=Sx(oi)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var g=Gu(o)}catch(P){throw P===Ro?mx:P}else g=o;o=Ja();var N=o.queue,C=N.dispatch;return f!==o.memoizedState&&(Tt.flags|=2048,zo(9,{destroy:void 0},ZH.bind(null,N,f),null)),[g,C,c]}function ZH(c,o){c.action=o}function nA(c){var o=Ja(),f=ha;if(f!==null)return aA(o,f,c);Ja(),o=o.memoizedState,f=Ja();var g=f.queue.dispatch;return f.memoizedState=c,[o,g,!1]}function zo(c,o,f,g){return c={tag:c,create:f,deps:g,inst:o,next:null},o=Tt.updateQueue,o===null&&(o=wx(),Tt.updateQueue=o),f=o.lastEffect,f===null?o.lastEffect=c.next=c:(g=f.next,f.next=c,c.next=g,o.lastEffect=c),c}function sA(){return Ja().memoizedState}function Cx(c,o,f,g){var N=Un();Tt.flags|=c,N.memoizedState=zo(1|o,{destroy:void 0},f,g===void 0?null:g)}function Ex(c,o,f,g){var N=Ja();g=g===void 0?null:g;var C=N.memoizedState.inst;ha!==null&&g!==null&&Fb(g,ha.memoizedState.deps)?N.memoizedState=zo(o,C,f,g):(Tt.flags|=c,N.memoizedState=zo(1|o,C,f,g))}function rA(c,o){Cx(8390656,8,c,o)}function Jb(c,o){Ex(2048,8,c,o)}function JH(c){Tt.flags|=4;var o=Tt.updateQueue;if(o===null)o=wx(),Tt.updateQueue=o,o.events=[c];else{var f=o.events;f===null?o.events=[c]:f.push(c)}}function iA(c){var o=Ja().memoizedState;return JH({ref:o,nextImpl:c}),function(){if((na&2)!==0)throw Error(s(440));return o.impl.apply(void 0,arguments)}}function cA(c,o){return Ex(4,2,c,o)}function lA(c,o){return Ex(4,4,c,o)}function oA(c,o){if(typeof o=="function"){c=c();var f=o(c);return function(){typeof f=="function"?f():o(null)}}if(o!=null)return c=c(),o.current=c,function(){o.current=null}}function dA(c,o,f){f=f!=null?f.concat([c]):null,Ex(4,4,oA.bind(null,o,c),f)}function e0(){}function uA(c,o){var f=Ja();o=o===void 0?null:o;var g=f.memoizedState;return o!==null&&Fb(o,g[1])?g[0]:(f.memoizedState=[c,o],c)}function pA(c,o){var f=Ja();o=o===void 0?null:o;var g=f.memoizedState;if(o!==null&&Fb(o,g[1]))return g[0];if(g=c(),jl){Re(!0);try{c()}finally{Re(!1)}}return f.memoizedState=[g,o],g}function t0(c,o,f){return f===void 0||(li&1073741824)!==0&&(Vt&261930)===0?c.memoizedState=o:(c.memoizedState=f,c=fD(),Tt.lanes|=c,uc|=c,f)}function fA(c,o,f,g){return ls(f,o)?f:Io.current!==null?(c=t0(c,f,g),ls(c,o)||(sn=!0),c):(li&42)===0||(li&1073741824)!==0&&(Vt&261930)===0?(sn=!0,c.memoizedState=f):(c=fD(),Tt.lanes|=c,uc|=c,o)}function mA(c,o,f,g,N){var C=M.p;M.p=C!==0&&8>C?C:8;var P=L.T,V={};L.T=V,s0(c,!1,o,f);try{var ae=N(),fe=L.S;if(fe!==null&&fe(V,ae),ae!==null&&typeof ae=="object"&&typeof ae.then=="function"){var Ce=YH(ae,g);Yu(c,o,Ce,ms(c))}else Yu(c,o,g,ms(c))}catch(Oe){Yu(c,o,{then:function(){},status:"rejected",reason:Oe},ms())}finally{M.p=C,P!==null&&V.types!==null&&(P.types=V.types),L.T=P}}function eV(){}function a0(c,o,f,g){if(c.tag!==5)throw Error(s(476));var N=xA(c).queue;mA(c,N,o,U,f===null?eV:function(){return gA(c),f(g)})}function xA(c){var o=c.memoizedState;if(o!==null)return o;o={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:U},next:null};var f={};return o.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:f},next:null},c.memoizedState=o,c=c.alternate,c!==null&&(c.memoizedState=o),o}function gA(c){var o=xA(c);o.next===null&&(o=c.alternate.memoizedState),Yu(c,o.next.queue,{},ms())}function n0(){return En(up)}function hA(){return Ja().memoizedState}function vA(){return Ja().memoizedState}function tV(c){for(var o=c.return;o!==null;){switch(o.tag){case 24:case 3:var f=ms();c=rc(f);var g=ic(o,c,f);g!==null&&(as(g,o,f),Fu(g,o,f)),o={cache:Tb()},c.payload=o;return}o=o.return}}function aV(c,o,f){var g=ms();f={lane:g,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Ax(c)?bA(o,f):(f=jb(c,o,f,g),f!==null&&(as(f,c,g),jA(f,o,g)))}function yA(c,o,f){var g=ms();Yu(c,o,f,g)}function Yu(c,o,f,g){var N={lane:g,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Ax(c))bA(o,N);else{var C=c.alternate;if(c.lanes===0&&(C===null||C.lanes===0)&&(C=o.lastRenderedReducer,C!==null))try{var P=o.lastRenderedState,V=C(P,f);if(N.hasEagerState=!0,N.eagerState=V,ls(V,P))return cx(c,o,N,0),Ea===null&&ix(),!1}catch{}finally{}if(f=jb(c,o,N,g),f!==null)return as(f,c,g),jA(f,o,g),!0}return!1}function s0(c,o,f,g){if(g={lane:2,revertLane:B0(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},Ax(c)){if(o)throw Error(s(479))}else o=jb(c,f,g,2),o!==null&&as(o,c,2)}function Ax(c){var o=c.alternate;return c===Tt||o!==null&&o===Tt}function bA(c,o){Lo=bx=!0;var f=c.pending;f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o}function jA(c,o,f){if((f&4194048)!==0){var g=o.lanes;g&=c.pendingLanes,f|=g,o.lanes=f,ga(c,f)}}var Ku={readContext:En,use:Nx,useCallback:Ya,useContext:Ya,useEffect:Ya,useImperativeHandle:Ya,useLayoutEffect:Ya,useInsertionEffect:Ya,useMemo:Ya,useReducer:Ya,useRef:Ya,useState:Ya,useDebugValue:Ya,useDeferredValue:Ya,useTransition:Ya,useSyncExternalStore:Ya,useId:Ya,useHostTransitionStatus:Ya,useFormState:Ya,useActionState:Ya,useOptimistic:Ya,useMemoCache:Ya,useCacheRefresh:Ya};Ku.useEffectEvent=Ya;var wA={readContext:En,use:Nx,useCallback:function(c,o){return Un().memoizedState=[c,o===void 0?null:o],c},useContext:En,useEffect:rA,useImperativeHandle:function(c,o,f){f=f!=null?f.concat([c]):null,Cx(4194308,4,oA.bind(null,o,c),f)},useLayoutEffect:function(c,o){return Cx(4194308,4,c,o)},useInsertionEffect:function(c,o){Cx(4,2,c,o)},useMemo:function(c,o){var f=Un();o=o===void 0?null:o;var g=c();if(jl){Re(!0);try{c()}finally{Re(!1)}}return f.memoizedState=[g,o],g},useReducer:function(c,o,f){var g=Un();if(f!==void 0){var N=f(o);if(jl){Re(!0);try{f(o)}finally{Re(!1)}}}else N=o;return g.memoizedState=g.baseState=N,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:N},g.queue=c,c=c.dispatch=aV.bind(null,Tt,c),[g.memoizedState,c]},useRef:function(c){var o=Un();return c={current:c},o.memoizedState=c},useState:function(c){c=Xb(c);var o=c.queue,f=yA.bind(null,Tt,o);return o.dispatch=f,[c.memoizedState,f]},useDebugValue:e0,useDeferredValue:function(c,o){var f=Un();return t0(f,c,o)},useTransition:function(){var c=Xb(!1);return c=mA.bind(null,Tt,c.queue,!0,!1),Un().memoizedState=c,[!1,c]},useSyncExternalStore:function(c,o,f){var g=Tt,N=Un();if(Kt){if(f===void 0)throw Error(s(407));f=f()}else{if(f=o(),Ea===null)throw Error(s(349));(Vt&127)!==0||FE(g,o,f)}N.memoizedState=f;var C={value:f,getSnapshot:o};return N.queue=C,rA(HE.bind(null,g,C,c),[c]),g.flags|=2048,zo(9,{destroy:void 0},WE.bind(null,g,C,f,o),null),f},useId:function(){var c=Un(),o=Ea.identifierPrefix;if(Kt){var f=Ar,g=Er;f=(g&~(1<<32-Ve(g)-1)).toString(32)+f,o="_"+o+"R_"+f,f=jx++,0<f&&(o+="H"+f.toString(32)),o+="_"}else f=KH++,o="_"+o+"r_"+f.toString(32)+"_";return c.memoizedState=o},useHostTransitionStatus:n0,useFormState:eA,useActionState:eA,useOptimistic:function(c){var o=Un();o.memoizedState=o.baseState=c;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=f,o=s0.bind(null,Tt,!0,f),f.dispatch=o,[c,o]},useMemoCache:Yb,useCacheRefresh:function(){return Un().memoizedState=tV.bind(null,Tt)},useEffectEvent:function(c){var o=Un(),f={impl:c};return o.memoizedState=f,function(){if((na&2)!==0)throw Error(s(440));return f.impl.apply(void 0,arguments)}}},r0={readContext:En,use:Nx,useCallback:uA,useContext:En,useEffect:Jb,useImperativeHandle:dA,useInsertionEffect:cA,useLayoutEffect:lA,useMemo:pA,useReducer:Sx,useRef:sA,useState:function(){return Sx(oi)},useDebugValue:e0,useDeferredValue:function(c,o){var f=Ja();return fA(f,ha.memoizedState,c,o)},useTransition:function(){var c=Sx(oi)[0],o=Ja().memoizedState;return[typeof c=="boolean"?c:Gu(c),o]},useSyncExternalStore:qE,useId:hA,useHostTransitionStatus:n0,useFormState:tA,useActionState:tA,useOptimistic:function(c,o){var f=Ja();return YE(f,ha,c,o)},useMemoCache:Yb,useCacheRefresh:vA};r0.useEffectEvent=iA;var NA={readContext:En,use:Nx,useCallback:uA,useContext:En,useEffect:Jb,useImperativeHandle:dA,useInsertionEffect:cA,useLayoutEffect:lA,useMemo:pA,useReducer:Qb,useRef:sA,useState:function(){return Qb(oi)},useDebugValue:e0,useDeferredValue:function(c,o){var f=Ja();return ha===null?t0(f,c,o):fA(f,ha.memoizedState,c,o)},useTransition:function(){var c=Qb(oi)[0],o=Ja().memoizedState;return[typeof c=="boolean"?c:Gu(c),o]},useSyncExternalStore:qE,useId:hA,useHostTransitionStatus:n0,useFormState:nA,useActionState:nA,useOptimistic:function(c,o){var f=Ja();return ha!==null?YE(f,ha,c,o):(f.baseState=c,[c,f.queue.dispatch])},useMemoCache:Yb,useCacheRefresh:vA};NA.useEffectEvent=iA;function i0(c,o,f,g){o=c.memoizedState,f=f(g,o),f=f==null?o:m({},o,f),c.memoizedState=f,c.lanes===0&&(c.updateQueue.baseState=f)}var c0={enqueueSetState:function(c,o,f){c=c._reactInternals;var g=ms(),N=rc(g);N.payload=o,f!=null&&(N.callback=f),o=ic(c,N,g),o!==null&&(as(o,c,g),Fu(o,c,g))},enqueueReplaceState:function(c,o,f){c=c._reactInternals;var g=ms(),N=rc(g);N.tag=1,N.payload=o,f!=null&&(N.callback=f),o=ic(c,N,g),o!==null&&(as(o,c,g),Fu(o,c,g))},enqueueForceUpdate:function(c,o){c=c._reactInternals;var f=ms(),g=rc(f);g.tag=2,o!=null&&(g.callback=o),o=ic(c,g,f),o!==null&&(as(o,c,f),Fu(o,c,f))}};function SA(c,o,f,g,N,C,P){return c=c.stateNode,typeof c.shouldComponentUpdate=="function"?c.shouldComponentUpdate(g,C,P):o.prototype&&o.prototype.isPureReactComponent?!Ru(f,g)||!Ru(N,C):!0}function CA(c,o,f,g){c=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(f,g),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(f,g),o.state!==c&&c0.enqueueReplaceState(o,o.state,null)}function wl(c,o){var f=o;if("ref"in o){f={};for(var g in o)g!=="ref"&&(f[g]=o[g])}if(c=c.defaultProps){f===o&&(f=m({},f));for(var N in c)f[N]===void 0&&(f[N]=c[N])}return f}function EA(c){rx(c)}function AA(c){console.error(c)}function DA(c){rx(c)}function Dx(c,o){try{var f=c.onUncaughtError;f(o.value,{componentStack:o.stack})}catch(g){setTimeout(function(){throw g})}}function OA(c,o,f){try{var g=c.onCaughtError;g(f.value,{componentStack:f.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(N){setTimeout(function(){throw N})}}function l0(c,o,f){return f=rc(f),f.tag=3,f.payload={element:null},f.callback=function(){Dx(c,o)},f}function kA(c){return c=rc(c),c.tag=3,c}function _A(c,o,f,g){var N=f.type.getDerivedStateFromError;if(typeof N=="function"){var C=g.value;c.payload=function(){return N(C)},c.callback=function(){OA(o,f,g)}}var P=f.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(c.callback=function(){OA(o,f,g),typeof N!="function"&&(pc===null?pc=new Set([this]):pc.add(this));var V=g.stack;this.componentDidCatch(g.value,{componentStack:V!==null?V:""})})}function nV(c,o,f,g,N){if(f.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(o=f.alternate,o!==null&&To(o,f,N,!0),f=ds.current,f!==null){switch(f.tag){case 31:case 13:return $s===null?zx():f.alternate===null&&Ka===0&&(Ka=3),f.flags&=-257,f.flags|=65536,f.lanes=N,g===xx?f.flags|=16384:(o=f.updateQueue,o===null?f.updateQueue=new Set([g]):o.add(g),P0(c,g,N)),!1;case 22:return f.flags|=65536,g===xx?f.flags|=16384:(o=f.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([g])},f.updateQueue=o):(f=o.retryQueue,f===null?o.retryQueue=new Set([g]):f.add(g)),P0(c,g,N)),!1}throw Error(s(435,f.tag))}return P0(c,g,N),zx(),!1}if(Kt)return o=ds.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=N,g!==Ab&&(c=Error(s(422),{cause:g}
vendor: 13,783 bytes, line 48
48),Lu(Rs(c,f)))):(g!==Ab&&(o=Error(s(423),{cause:g}),Lu(Rs(o,f))),c=c.current.alternate,c.flags|=65536,N&=-N,c.lanes|=N,g=Rs(g,f),N=l0(c.stateNode,g,N),Lb(c,N),Ka!==4&&(Ka=2)),!1;var C=Error(s(520),{cause:g});if(C=Rs(C,f),np===null?np=[C]:np.push(C),Ka!==4&&(Ka=2),o===null)return!0;g=Rs(g,f),f=o;do{switch(f.tag){case 3:return f.flags|=65536,c=N&-N,f.lanes|=c,c=l0(f.stateNode,g,c),Lb(f,c),!1;case 1:if(o=f.type,C=f.stateNode,(f.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||C!==null&&typeof C.componentDidCatch=="function"&&(pc===null||!pc.has(C))))return f.flags|=65536,N&=-N,f.lanes|=N,N=kA(N),_A(N,c,f,g),Lb(f,N),!1}f=f.return}while(f!==null);return!1}var o0=Error(s(461)),sn=!1;function An(c,o,f,g){o.child=c===null?RE(o,null,f,g):bl(o,c.child,f,g)}function TA(c,o,f,g,N){f=f.render;var C=o.ref;if("ref"in g){var P={};for(var V in g)V!=="ref"&&(P[V]=g[V])}else P=g;return gl(o),g=Wb(c,o,f,P,C,N),V=Hb(),c!==null&&!sn?(Vb(c,o,N),di(c,o,N)):(Kt&&V&&Cb(o),o.flags|=1,An(c,o,g,N),o.child)}function PA(c,o,f,g,N){if(c===null){var C=f.type;return typeof C=="function"&&!wb(C)&&C.defaultProps===void 0&&f.compare===null?(o.tag=15,o.type=C,MA(c,o,C,g,N)):(c=ox(f.type,null,g,o,o.mode,N),c.ref=o.ref,c.return=o,o.child=c)}if(C=c.child,!h0(c,N)){var P=C.memoizedProps;if(f=f.compare,f=f!==null?f:Ru,f(P,g)&&c.ref===o.ref)return di(c,o,N)}return o.flags|=1,c=si(C,g),c.ref=o.ref,c.return=o,o.child=c}function MA(c,o,f,g,N){if(c!==null){var C=c.memoizedProps;if(Ru(C,g)&&c.ref===o.ref)if(sn=!1,o.pendingProps=g=C,h0(c,N))(c.flags&131072)!==0&&(sn=!0);else return o.lanes=c.lanes,di(c,o,N)}return d0(c,o,f,g,N)}function RA(c,o,f,g){var N=g.children,C=c!==null?c.memoizedState:null;if(c===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((o.flags&128)!==0){if(C=C!==null?C.baseLanes|f:f,c!==null){for(g=o.child=c.child,N=0;g!==null;)N=N|g.lanes|g.childLanes,g=g.sibling;g=N&~C}else g=0,o.child=null;return BA(c,o,C,f,g)}if((f&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},c!==null&&fx(o,C!==null?C.cachePool:null),C!==null?LE(o,C):zb(),$E(o);else return g=o.lanes=536870912,BA(c,o,C!==null?C.baseLanes|f:f,f,g)}else C!==null?(fx(o,C.cachePool),LE(o,C),lc(),o.memoizedState=null):(c!==null&&fx(o,null),zb(),lc());return An(c,o,N,f),o.child}function Qu(c,o){return c!==null&&c.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function BA(c,o,f,g,N){var C=Mb();return C=C===null?null:{parent:an._currentValue,pool:C},o.memoizedState={baseLanes:f,cachePool:C},c!==null&&fx(o,null),zb(),$E(o),c!==null&&To(c,o,g,!0),o.childLanes=N,null}function Ox(c,o){return o=_x({mode:o.mode,children:o.children},c.mode),o.ref=c.ref,c.child=o,o.return=c,o}function IA(c,o,f){return bl(o,c.child,null,f),c=Ox(o,o.pendingProps),c.flags|=2,us(o),o.memoizedState=null,c}function sV(c,o,f){var g=o.pendingProps,N=(o.flags&128)!==0;if(o.flags&=-129,c===null){if(Kt){if(g.mode==="hidden")return c=Ox(o,g),o.lanes=536870912,Qu(null,c);if(qb(o),(c=ka)?(c=KD(c,Ls),c=c!==null&&c.data==="&"?c:null,c!==null&&(o.memoizedState={dehydrated:c,treeContext:ec!==null?{id:Er,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},f=bE(c),f.return=o,o.child=f,Cn=o,ka=null)):c=null,c===null)throw ac(o);return o.lanes=536870912,null}return Ox(o,g)}var C=c.memoizedState;if(C!==null){var P=C.dehydrated;if(qb(o),N)if(o.flags&256)o.flags&=-257,o=IA(c,o,f);else if(o.memoizedState!==null)o.child=c.child,o.flags|=128,o=null;else throw Error(s(558));else if(sn||To(c,o,f,!1),N=(f&c.childLanes)!==0,sn||N){if(g=Ea,g!==null&&(P=Ca(g,f),P!==0&&P!==C.retryLane))throw C.retryLane=P,pl(c,P),as(g,c,P),o0;zx(),o=IA(c,o,f)}else c=C.treeContext,ka=zs(P.nextSibling),Cn=o,Kt=!0,tc=null,Ls=!1,c!==null&&NE(o,c),o=Ox(o,g),o.flags|=4096;return o}return c=si(c.child,{mode:g.mode,children:g.children}),c.ref=o.ref,o.child=c,c.return=o,c}function kx(c,o){var f=o.ref;if(f===null)c!==null&&c.ref!==null&&(o.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(s(284));(c===null||c.ref!==f)&&(o.flags|=4194816)}}function d0(c,o,f,g,N){return gl(o),f=Wb(c,o,f,g,void 0,N),g=Hb(),c!==null&&!sn?(Vb(c,o,N),di(c,o,N)):(Kt&&g&&Cb(o),o.flags|=1,An(c,o,f,N),o.child)}function LA(c,o,f,g,N,C){return gl(o),o.updateQueue=null,f=UE(o,g,f,N),zE(c),g=Hb(),c!==null&&!sn?(Vb(c,o,C),di(c,o,C)):(Kt&&g&&Cb(o),o.flags|=1,An(c,o,f,C),o.child)}function $A(c,o,f,g,N){if(gl(o),o.stateNode===null){var C=Do,P=f.contextType;typeof P=="object"&&P!==null&&(C=En(P)),C=new f(g,C),o.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,C.updater=c0,o.stateNode=C,C._reactInternals=o,C=o.stateNode,C.props=g,C.state=o.memoizedState,C.refs={},Bb(o),P=f.contextType,C.context=typeof P=="object"&&P!==null?En(P):Do,C.state=o.memoizedState,P=f.getDerivedStateFromProps,typeof P=="function"&&(i0(o,f,P,g),C.state=o.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof C.getSnapshotBeforeUpdate=="function"||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(P=C.state,typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount(),P!==C.state&&c0.enqueueReplaceState(C,C.state,null),Hu(o,g,C,N),Wu(),C.state=o.memoizedState),typeof C.componentDidMount=="function"&&(o.flags|=4194308),g=!0}else if(c===null){C=o.stateNode;var V=o.memoizedProps,ae=wl(f,V);C.props=ae;var fe=C.context,Ce=f.contextType;P=Do,typeof Ce=="object"&&Ce!==null&&(P=En(Ce));var Oe=f.getDerivedStateFromProps;Ce=typeof Oe=="function"||typeof C.getSnapshotBeforeUpdate=="function",V=o.pendingProps!==V,Ce||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(V||fe!==P)&&CA(o,C,g,P),sc=!1;var ge=o.memoizedState;C.state=ge,Hu(o,g,C,N),Wu(),fe=o.memoizedState,V||ge!==fe||sc?(typeof Oe=="function"&&(i0(o,f,Oe,g),fe=o.memoizedState),(ae=sc||SA(o,f,ae,g,ge,fe,P))?(Ce||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(o.flags|=4194308)):(typeof C.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=g,o.memoizedState=fe),C.props=g,C.state=fe,C.context=P,g=ae):(typeof C.componentDidMount=="function"&&(o.flags|=4194308),g=!1)}else{C=o.stateNode,Ib(c,o),P=o.memoizedProps,Ce=wl(f,P),C.props=Ce,Oe=o.pendingProps,ge=C.context,fe=f.contextType,ae=Do,typeof fe=="object"&&fe!==null&&(ae=En(fe)),V=f.getDerivedStateFromProps,(fe=typeof V=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(P!==Oe||ge!==ae)&&CA(o,C,g,ae),sc=!1,ge=o.memoizedState,C.state=ge,Hu(o,g,C,N),Wu();var je=o.memoizedState;P!==Oe||ge!==je||sc||c!==null&&c.dependencies!==null&&ux(c.dependencies)?(typeof V=="function"&&(i0(o,f,V,g),je=o.memoizedState),(Ce=sc||SA(o,f,Ce,g,ge,je,ae)||c!==null&&c.dependencies!==null&&ux(c.dependencies))?(fe||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(g,je,ae),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(g,je,ae)),typeof C.componentDidUpdate=="function"&&(o.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof C.componentDidUpdate!="function"||P===c.memoizedProps&&ge===c.memoizedState||(o.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||P===c.memoizedProps&&ge===c.memoizedState||(o.flags|=1024),o.memoizedProps=g,o.memoizedState=je),C.props=g,C.state=je,C.context=ae,g=Ce):(typeof C.componentDidUpdate!="function"||P===c.memoizedProps&&ge===c.memoizedState||(o.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||P===c.memoizedProps&&ge===c.memoizedState||(o.flags|=1024),g=!1)}return C=g,kx(c,o),g=(o.flags&128)!==0,C||g?(C=o.stateNode,f=g&&typeof f.getDerivedStateFromError!="function"?null:C.render(),o.flags|=1,c!==null&&g?(o.child=bl(o,c.child,null,N),o.child=bl(o,null,f,N)):An(c,o,f,N),o.memoizedState=C.state,c=o.child):c=di(c,o,N),c}function zA(c,o,f,g){return ml(),o.flags|=256,An(c,o,f,g),o.child}var u0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function p0(c){return{baseLanes:c,cachePool:OE()}}function f0(c,o,f){return c=c!==null?c.childLanes&~f:0,o&&(c|=fs),c}function UA(c,o,f){var g=o.pendingProps,N=!1,C=(o.flags&128)!==0,P;if((P=C)||(P=c!==null&&c.memoizedState===null?!1:(Za.current&2)!==0),P&&(N=!0,o.flags&=-129),P=(o.flags&32)!==0,o.flags&=-33,c===null){if(Kt){if(N?cc(o):lc(),(c=ka)?(c=KD(c,Ls),c=c!==null&&c.data!=="&"?c:null,c!==null&&(o.memoizedState={dehydrated:c,treeContext:ec!==null?{id:Er,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},f=bE(c),f.return=o,o.child=f,Cn=o,ka=null)):c=null,c===null)throw ac(o);return K0(c)?o.lanes=32:o.lanes=536870912,null}var V=g.children;return g=g.fallback,N?(lc(),N=o.mode,V=_x({mode:"hidden",children:V},N),g=fl(g,N,f,null),V.return=o,g.return=o,V.sibling=g,o.child=V,g=o.child,g.memoizedState=p0(f),g.childLanes=f0(c,P,f),o.memoizedState=u0,Qu(null,g)):(cc(o),m0(o,V))}var ae=c.memoizedState;if(ae!==null&&(V=ae.dehydrated,V!==null)){if(C)o.flags&256?(cc(o),o.flags&=-257,o=x0(c,o,f)):o.memoizedState!==null?(lc(),o.child=c.child,o.flags|=128,o=null):(lc(),V=g.fallback,N=o.mode,g=_x({mode:"visible",children:g.children},N),V=fl(V,N,f,null),V.flags|=2,g.return=o,V.return=o,g.sibling=V,o.child=g,bl(o,c.child,null,f),g=o.child,g.memoizedState=p0(f),g.childLanes=f0(c,P,f),o.memoizedState=u0,o=Qu(null,g));else if(cc(o),K0(V)){if(P=V.nextSibling&&V.nextSibling.dataset,P)var fe=P.dgst;P=fe,g=Error(s(419)),g.stack="",g.digest=P,Lu({value:g,source:null,stack:null}),o=x0(c,o,f)}else if(sn||To(c,o,f,!1),P=(f&c.childLanes)!==0,sn||P){if(P=Ea,P!==null&&(g=Ca(P,f),g!==0&&g!==ae.retryLane))throw ae.retryLane=g,pl(c,g),as(P,c,g),o0;Y0(V)||zx(),o=x0(c,o,f)}else Y0(V)?(o.flags|=192,o.child=c.child,o=null):(c=ae.treeContext,ka=zs(V.nextSibling),Cn=o,Kt=!0,tc=null,Ls=!1,c!==null&&NE(o,c),o=m0(o,g.children),o.flags|=4096);return o}return N?(lc(),V=g.fallback,N=o.mode,ae=c.child,fe=ae.sibling,g=si(ae,{mode:"hidden",children:g.children}),g.subtreeFlags=ae.subtreeFlags&65011712,fe!==null?V=si(fe,V):(V=fl(V,N,f,null),V.flags|=2),V.return=o,g.return=o,g.sibling=V,o.child=g,Qu(null,g),g=o.child,V=c.child.memoizedState,V===null?V=p0(f):(N=V.cachePool,N!==null?(ae=an._currentValue,N=N.parent!==ae?{parent:ae,pool:ae}:N):N=OE(),V={baseLanes:V.baseLanes|f,cachePool:N}),g.memoizedState=V,g.childLanes=f0(c,P,f),o.memoizedState=u0,Qu(c.child,g)):(cc(o),f=c.child,c=f.sibling,f=si(f,{mode:"visible",children:g.children}),f.return=o,f.sibling=null,c!==null&&(P=o.deletions,P===null?(o.deletions=[c],o.flags|=16):P.push(c)),o.child=f,o.memoizedState=null,f)}function m0(c,o){return o=_x({mode:"visible",children:o},c.mode),o.return=c,c.child=o}function _x(c,o){return c=os(22,c,null,o),c.lanes=0,c}function x0(c,o,f){return bl(o,c.child,null,f),c=m0(o,o.pendingProps.children),c.flags|=2,o.memoizedState=null,c}function qA(c,o,f){c.lanes|=o;var g=c.alternate;g!==null&&(g.lanes|=o),kb(c.return,o,f)}function g0(c,o,f,g,N,C){var P=c.memoizedState;P===null?c.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:g,tail:f,tailMode:N,treeForkCount:C}:(P.isBackwards=o,P.rendering=null,P.renderingStartTime=0,P.last=g,P.tail=f,P.tailMode=N,P.treeForkCount=C)}function FA(c,o,f){var g=o.pendingProps,N=g.revealOrder,C=g.tail;g=g.children;var P=Za.current,V=(P&2)!==0;if(V?(P=P&1|2,o.flags|=128):P&=1,H(Za,P),An(c,o,g,f),g=Kt?Iu:0,!V&&c!==null&&(c.flags&128)!==0)e:for(c=o.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&qA(c,f,o);else if(c.tag===19)qA(c,f,o);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===o)break e;for(;c.sibling===null;){if(c.return===null||c.return===o)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}switch(N){case"forwards":for(f=o.child,N=null;f!==null;)c=f.alternate,c!==null&&yx(c)===null&&(N=f),f=f.sibling;f=N,f===null?(N=o.child,o.child=null):(N=f.sibling,f.sibling=null),g0(o,!1,N,f,C,g);break;case"backwards":case"unstable_legacy-backwards":for(f=null,N=o.child,o.child=null;N!==null;){if(c=N.alternate,c!==null&&yx(c)===null){o.child=N;break}c=N.sibling,N.sibling=f,f=N,N=c}g0(o,!0,f,null,C,g);break;case"together":g0(o,!1,null,null,void 0,g);break;default:o.memoizedState=null}return o.child}function di(c,o,f){if(c!==null&&(o.dependencies=c.dependencies),uc|=o.lanes,(f&o.childLanes)===0)if(c!==null){if(To(c,o,f,!1),(f&o.childLanes)===0)return null}else return null;if(c!==null&&o.child!==c.child)throw Error(s(153));if(o.child!==null){for(c=o.child,f=si(c,c.pendingProps),o.child=f,f.return=o;c.sibling!==null;)c=c.sibling,f=f.sibling=si(c,c.pendingProps),f.return=o;f.sibling=null}return o.child}function h0(c,o){return(c.lanes&o)!==0?!0:(c=c.dependencies,!!(c!==null&&ux(c)))}function rV(c,o,f){switch(o.tag){case 3:ye(o,o.stateNode.containerInfo),nc(o,an,c.memoizedState.cache),ml();break;case 27:case 5:ve(o);break;case 4:ye(o,o.stateNode.containerInfo);break;case 10:nc(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,qb(o),null;break;case 13:var g=o.memoizedState;if(g!==null)return g.dehydrated!==null?(cc(o),o.flags|=128,null):(f&o.child.childLanes)!==0?UA(c,o,f):(cc(o),c=di(c,o,f),c!==null?c.sibling:null);cc(o);break;case 19:var N=(c.flags&128)!==0;if(g=(f&o.childLanes)!==0,g||(To(c,o,f,!1),g=(f&o.childLanes)!==0),N){if
vendor: 5,483 bytes, line 48
48(g)return FA(c,o,f);o.flags|=128}if(N=o.memoizedState,N!==null&&(N.rendering=null,N.tail=null,N.lastEffect=null),H(Za,Za.current),g)break;return null;case 22:return o.lanes=0,RA(c,o,f,o.pendingProps);case 24:nc(o,an,c.memoizedState.cache)}return di(c,o,f)}function WA(c,o,f){if(c!==null)if(c.memoizedProps!==o.pendingProps)sn=!0;else{if(!h0(c,f)&&(o.flags&128)===0)return sn=!1,rV(c,o,f);sn=(c.flags&131072)!==0}else sn=!1,Kt&&(o.flags&1048576)!==0&&wE(o,Iu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var g=o.pendingProps;if(c=vl(o.elementType),o.type=c,typeof c=="function")wb(c)?(g=wl(c,g),o.tag=1,o=$A(null,o,c,g,f)):(o.tag=0,o=d0(null,o,c,g,f));else{if(c!=null){var N=c.$$typeof;if(N===k){o.tag=11,o=TA(null,o,c,g,f);break e}else if(N===_){o.tag=14,o=PA(null,o,c,g,f);break e}}throw o=z(c)||c,Error(s(306,o,""))}}return o;case 0:return d0(c,o,o.type,o.pendingProps,f);case 1:return g=o.type,N=wl(g,o.pendingProps),$A(c,o,g,N,f);case 3:e:{if(ye(o,o.stateNode.containerInfo),c===null)throw Error(s(387));g=o.pendingProps;var C=o.memoizedState;N=C.element,Ib(c,o),Hu(o,g,null,f);var P=o.memoizedState;if(g=P.cache,nc(o,an,g),g!==C.cache&&_b(o,[an],f,!0),Wu(),g=P.element,C.isDehydrated)if(C={element:g,isDehydrated:!1,cache:P.cache},o.updateQueue.baseState=C,o.memoizedState=C,o.flags&256){o=zA(c,o,g,f);break e}else if(g!==N){N=Rs(Error(s(424)),o),Lu(N),o=zA(c,o,g,f);break e}else{switch(c=o.stateNode.containerInfo,c.nodeType){case 9:c=c.body;break;default:c=c.nodeName==="HTML"?c.ownerDocument.body:c}for(ka=zs(c.firstChild),Cn=o,Kt=!0,tc=null,Ls=!0,f=RE(o,null,g,f),o.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(ml(),g===N){o=di(c,o,f);break e}An(c,o,g,f)}o=o.child}return o;case 26:return kx(c,o),c===null?(f=tO(o.type,null,o.pendingProps,null))?o.memoizedState=f:Kt||(f=o.type,c=o.pendingProps,g=Gx(ce.current).createElement(f),g[dn]=o,g[Mn]=c,Dn(g,f,c),Fe(g),o.stateNode=g):o.memoizedState=tO(o.type,c.memoizedProps,o.pendingProps,c.memoizedState),null;case 27:return ve(o),c===null&&Kt&&(g=o.stateNode=ZD(o.type,o.pendingProps,ce.current),Cn=o,Ls=!0,N=ka,gc(o.type)?(Q0=N,ka=zs(g.firstChild)):ka=N),An(c,o,o.pendingProps.children,f),kx(c,o),c===null&&(o.flags|=4194304),o.child;case 5:return c===null&&Kt&&((N=g=ka)&&(g=RV(g,o.type,o.pendingProps,Ls),g!==null?(o.stateNode=g,Cn=o,ka=zs(g.firstChild),Ls=!1,N=!0):N=!1),N||ac(o)),ve(o),N=o.type,C=o.pendingProps,P=c!==null?c.memoizedProps:null,g=C.children,H0(N,C)?g=null:P!==null&&H0(N,P)&&(o.flags|=32),o.memoizedState!==null&&(N=Wb(c,o,QH,null,null,f),up._currentValue=N),kx(c,o),An(c,o,g,f),o.child;case 6:return c===null&&Kt&&((c=f=ka)&&(f=BV(f,o.pendingProps,Ls),f!==null?(o.stateNode=f,Cn=o,ka=null,c=!0):c=!1),c||ac(o)),null;case 13:return UA(c,o,f);case 4:return ye(o,o.stateNode.containerInfo),g=o.pendingProps,c===null?o.child=bl(o,null,g,f):An(c,o,g,f),o.child;case 11:return TA(c,o,o.type,o.pendingProps,f);case 7:return An(c,o,o.pendingProps,f),o.child;case 8:return An(c,o,o.pendingProps.children,f),o.child;case 12:return An(c,o,o.pendingProps.children,f),o.child;case 10:return g=o.pendingProps,nc(o,o.type,g.value),An(c,o,g.children,f),o.child;case 9:return N=o.type._context,g=o.pendingProps.children,gl(o),N=En(N),g=g(N),o.flags|=1,An(c,o,g,f),o.child;case 14:return PA(c,o,o.type,o.pendingProps,f);case 15:return MA(c,o,o.type,o.pendingProps,f);case 19:return FA(c,o,f);case 31:return sV(c,o,f);case 22:return RA(c,o,f,o.pendingProps);case 24:return gl(o),g=En(an),c===null?(N=Mb(),N===null&&(N=Ea,C=Tb(),N.pooledCache=C,C.refCount++,C!==null&&(N.pooledCacheLanes|=f),N=C),o.memoizedState={parent:g,cache:N},Bb(o),nc(o,an,N)):((c.lanes&f)!==0&&(Ib(c,o),Hu(o,null,null,f),Wu()),N=c.memoizedState,C=o.memoizedState,N.parent!==g?(N={parent:g,cache:g},o.memoizedState=N,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=N),nc(o,an,g)):(g=C.cache,nc(o,an,g),g!==N.cache&&_b(o,[an],f,!0))),An(c,o,o.pendingProps.children,f),o.child;case 29:throw o.pendingProps}throw Error(s(156,o.tag))}function ui(c){c.flags|=4}function v0(c,o,f,g,N){if((o=(c.mode&32)!==0)&&(o=!1),o){if(c.flags|=16777216,(N&335544128)===N)if(c.stateNode.complete)c.flags|=8192;else if(hD())c.flags|=8192;else throw yl=xx,Rb}else c.flags&=-16777217}function HA(c,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)c.flags&=-16777217;else if(c.flags|=16777216,!iO(o))if(hD())c.flags|=8192;else throw yl=xx,Rb}function Tx(c,o){o!==null&&(c.flags|=4),c.flags&16384&&(o=c.tag!==22?Ie():536870912,c.lanes|=o,Wo|=o)}function Xu(c,o){if(!Kt)switch(c.tailMode){case"hidden":o=c.tail;for(var f=null;o!==null;)o.alternate!==null&&(f=o),o=o.sibling;f===null?c.tail=null:f.sibling=null;break;case"collapsed":f=c.tail;for(var g=null;f!==null;)f.alternate!==null&&(g=f),f=f.sibling;g===null?o||c.tail===null?c.tail=null:c.tail.sibling=null:g.sibling=null}}function _a(c){var o=c.alternate!==null&&c.alternate.child===c.child,f=0,g=0;if(o)for(var N=c.child;N!==null;)f|=N.lanes|N.childLanes,g|=N.subtreeFlags&65011712,g|=N.flags&65011712,N.return=c,N=N.sibling;else for(N=c.child;N!==null;)f|=N.lanes|N.childLanes,g|=N.subtreeFlags,g|=N.flags,N.return=c,N=N.sibling;return c.subtreeFlags|=g,c.childLanes=f,o}function iV(c,o,f){var g=o.pendingProps;switch(Eb(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _a(o),null;case 1:return _a(o),null;case 3:return f=o.stateNode,g=null,c!==null&&(g=c.memoizedState.cache),o.memoizedState.cache!==g&&(o.flags|=2048),ci(an),de(),f.pendingContext&&(f.context=f.pen
vendor: 4,249 bytes, line 48
48dingContext,f.pendingContext=null),(c===null||c.child===null)&&(_o(o)?ui(o):c===null||c.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Db())),_a(o),null;case 26:var N=o.type,C=o.memoizedState;return c===null?(ui(o),C!==null?(_a(o),HA(o,C)):(_a(o),v0(o,N,null,g,f))):C?C!==c.memoizedState?(ui(o),_a(o),HA(o,C)):(_a(o),o.flags&=-16777217):(c=c.memoizedProps,c!==g&&ui(o),_a(o),v0(o,N,c,g,f)),null;case 27:if(Pe(o),f=ce.current,N=o.type,c!==null&&o.stateNode!=null)c.memoizedProps!==g&&ui(o);else{if(!g){if(o.stateNode===null)throw Error(s(166));return _a(o),null}c=q.current,_o(o)?SE(o):(c=ZD(N,g,f),o.stateNode=c,ui(o))}return _a(o),null;case 5:if(Pe(o),N=o.type,c!==null&&o.stateNode!=null)c.memoizedProps!==g&&ui(o);else{if(!g){if(o.stateNode===null)throw Error(s(166));return _a(o),null}if(C=q.current,_o(o))SE(o);else{var P=Gx(ce.current);switch(C){case 1:C=P.createElementNS("http://www.w3.org/2000/svg",N);break;case 2:C=P.createElementNS("http://www.w3.org/1998/Math/MathML",N);break;default:switch(N){case"svg":C=P.createElementNS("http://www.w3.org/2000/svg",N);break;case"math":C=P.createElementNS("http://www.w3.org/1998/Math/MathML",N);break;case"script":C=P.createElement("div"),C.innerHTML="<script><\/script>",C=C.removeChild(C.firstChild);break;case"select":C=typeof g.is=="string"?P.createElement("select",{is:g.is}):P.createElement("select"),g.multiple?C.multiple=!0:g.size&&(C.size=g.size);break;default:C=typeof g.is=="string"?P.createElement(N,{is:g.is}):P.createElement(N)}}C[dn]=o,C[Mn]=g;e:for(P=o.child;P!==null;){if(P.tag===5||P.tag===6)C.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===o)break e;for(;P.sibling===null;){if(P.return===null||P.return===o)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}o.stateNode=C;e:switch(Dn(C,N,g),N){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&ui(o)}}return _a(o),v0(o,o.type,c===null?null:c.memoizedProps,o.pendingProps,f),null;case 6:if(c&&o.stateNode!=null)c.memoizedProps!==g&&ui(o);else{if(typeof g!="string"&&o.stateNode===null)throw Error(s(166));if(c=ce.current,_o(o)){if(c=o.stateNode,f=o.memoizedProps,g=null,N=Cn,N!==null)switch(N.tag){case 27:case 5:g=N.memoizedProps}c[dn]=o,c=!!(c.nodeValue===f||g!==null&&g.suppressHydrationWarning===!0||UD(c.nodeValue,f)),c||ac(o,!0)}else c=Gx(c).createTextNode(g),c[dn]=o,o.stateNode=c}return _a(o),null;case 31:if(f=o.memoizedState,c===null||c.memoizedState!==null){if(g=_o(o),f!==null){if(c===null){if(!g)throw Error(s(318));if(c=o.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(557));c[dn]=o}else ml(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_a(o),c=!1}else f=Db(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=f),c=!0;if(!c)return o.flags&256?(us(o),o):(us(o),null);if((o.flags&128)!==0)throw Error(s(558))}return _a(o),null;case 13:if(g=o.memoizedState,c===null||c.memoizedState!==null&&c.memoizedState.dehydrated!==null){if(N=_o(o),g!==null&&g.dehydrated!==null){if(c===null){if(!N)throw Error(s(318));if(N=o.memoizedState,N=N!==null?N.dehydrated:null,!N)throw Error(s(317));N[dn]=o}else ml(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;_a(o),N=!1}else N=Db(),c!==null&&c.memoizedState!==null&&(c.memoizedState.hydrationErrors=N),N=!0;if(!N)return o.flags&256?(us(o),o):(us(o),null)}return us(o),(o.flags&128)!==0?(o.lanes=f,o):(f=g!==null,c=c!==null&&c.memoizedState!==null,f&&(g=o.child,N=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(N=g.alternate.memoizedState.cachePool.pool),C=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(C=g.memoizedState.cachePool.pool),C!==N&&(g.flags|=2048)),f!==c&&f&&(o.child.flags|=8192),Tx(o,o.updateQueue),_a(o),null);case 4:return de(),c===null&&z0(o.stateNode.containerInfo),_a(o),null;case 10:return ci(o.type),_a(o),null;case 19:if(F(Za),g=o.memoizedState,g===null)return _a(o),null;if(N=(o.flags&128)!==0,C=g.rendering,C===null)if(N)Xu(g,!1);else{if(Ka!==0||c!==null&&(c.flags&128)!==0)for(c=o.child;c!==null;){if(C=yx(c),C!==null){for(o.flags|=128,Xu(g,!1),c=C.updateQueue,o.updateQueue=c,Tx(o,c
vendor: 20,798 bytes, line 48
48),o.subtreeFlags=0,c=f,f=o.child;f!==null;)yE(f,c),f=f.sibling;return H(Za,Za.current&1|2),Kt&&ri(o,g.treeForkCount),o.child}c=c.sibling}g.tail!==null&&_t()>Ix&&(o.flags|=128,N=!0,Xu(g,!1),o.lanes=4194304)}else{if(!N)if(c=yx(C),c!==null){if(o.flags|=128,N=!0,c=c.updateQueue,o.updateQueue=c,Tx(o,c),Xu(g,!0),g.tail===null&&g.tailMode==="hidden"&&!C.alternate&&!Kt)return _a(o),null}else 2*_t()-g.renderingStartTime>Ix&&f!==536870912&&(o.flags|=128,N=!0,Xu(g,!1),o.lanes=4194304);g.isBackwards?(C.sibling=o.child,o.child=C):(c=g.last,c!==null?c.sibling=C:o.child=C,g.last=C)}return g.tail!==null?(c=g.tail,g.rendering=c,g.tail=c.sibling,g.renderingStartTime=_t(),c.sibling=null,f=Za.current,H(Za,N?f&1|2:f&1),Kt&&ri(o,g.treeForkCount),c):(_a(o),null);case 22:case 23:return us(o),Ub(),g=o.memoizedState!==null,c!==null?c.memoizedState!==null!==g&&(o.flags|=8192):g&&(o.flags|=8192),g?(f&536870912)!==0&&(o.flags&128)===0&&(_a(o),o.subtreeFlags&6&&(o.flags|=8192)):_a(o),f=o.updateQueue,f!==null&&Tx(o,f.retryQueue),f=null,c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(f=c.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==f&&(o.flags|=2048),c!==null&&F(hl),null;case 24:return f=null,c!==null&&(f=c.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),ci(an),_a(o),null;case 25:return null;case 30:return null}throw Error(s(156,o.tag))}function cV(c,o){switch(Eb(o),o.tag){case 1:return c=o.flags,c&65536?(o.flags=c&-65537|128,o):null;case 3:return ci(an),de(),c=o.flags,(c&65536)!==0&&(c&128)===0?(o.flags=c&-65537|128,o):null;case 26:case 27:case 5:return Pe(o),null;case 31:if(o.memoizedState!==null){if(us(o),o.alternate===null)throw Error(s(340));ml()}return c=o.flags,c&65536?(o.flags=c&-65537|128,o):null;case 13:if(us(o),c=o.memoizedState,c!==null&&c.dehydrated!==null){if(o.alternate===null)throw Error(s(340));ml()}return c=o.flags,c&65536?(o.flags=c&-65537|128,o):null;case 19:return F(Za),null;case 4:return de(),null;case 10:return ci(o.type),null;case 22:case 23:return us(o),Ub(),c!==null&&F(hl),c=o.flags,c&65536?(o.flags=c&-65537|128,o):null;case 24:return ci(an),null;case 25:return null;default:return null}}function VA(c,o){switch(Eb(o),o.tag){case 3:ci(an),de();break;case 26:case 27:case 5:Pe(o);break;case 4:de();break;case 31:o.memoizedState!==null&&us(o);break;case 13:us(o);break;case 19:F(Za);break;case 10:ci(o.type);break;case 22:case 23:us(o),Ub(),c!==null&&F(hl);break;case 24:ci(an)}}function Zu(c,o){try{var f=o.updateQueue,g=f!==null?f.lastEffect:null;if(g!==null){var N=g.next;f=N;do{if((f.tag&c)===c){g=void 0;var C=f.create,P=f.inst;g=C(),P.destroy=g}f=f.next}while(f!==N)}}catch(V){fa(o,o.return,V)}}function oc(c,o,f){try{var g=o.updateQueue,N=g!==null?g.lastEffect:null;if(N!==null){var C=N.next;g=C;do{if((g.tag&c)===c){var P=g.inst,V=P.destroy;if(V!==void 0){P.destroy=void 0,N=o;var ae=f,fe=V;try{fe()}catch(Ce){fa(N,ae,Ce)}}}g=g.next}while(g!==C)}}catch(Ce){fa(o,o.return,Ce)}}function GA(c){var o=c.updateQueue;if(o!==null){var f=c.stateNode;try{IE(o,f)}catch(g){fa(c,c.return,g)}}}function YA(c,o,f){f.props=wl(c.type,c.memoizedProps),f.state=c.memoizedState;try{f.componentWillUnmount()}catch(g){fa(c,o,g)}}function Ju(c,o){try{var f=c.ref;if(f!==null){switch(c.tag){case 26:case 27:case 5:var g=c.stateNode;break;case 30:g=c.stateNode;break;default:g=c.stateNode}typeof f=="function"?c.refCleanup=f(g):f.current=g}}catch(N){fa(c,o,N)}}function Dr(c,o){var f=c.ref,g=c.refCleanup;if(f!==null)if(typeof g=="function")try{g()}catch(N){fa(c,o,N)}finally{c.refCleanup=null,c=c.alternate,c!=null&&(c.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(N){fa(c,o,N)}else f.current=null}function KA(c){var o=c.type,f=c.memoizedProps,g=c.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":f.autoFocus&&g.focus();break e;case"img":f.src?g.src=f.src:f.srcSet&&(g.srcset=f.srcSet)}}catch(N){fa(c,c.return,N)}}function y0(c,o,f){try{var g=c.stateNode;OV(g,c.type,f,o),g[Mn]=o}catch(N){fa(c,c.return,N)}}function QA(c){return c.tag===5||c.tag===3||c.tag===26||c.tag===27&&gc(c.type)||c.tag===4}function b0(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||QA(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.tag===27&&gc(c.type)||c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function j0(c,o,f){var g=c.tag;if(g===5||g===6)c=c.stateNode,o?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(c,o):(o=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,o.appendChild(c),f=f._reactRootContainer,f!=null||o.onclick!==null||(o.onclick=ai));else if(g!==4&&(g===27&&gc(c.type)&&(f=c.stateNode,o=null),c=c.child,c!==null))for(j0(c,o,f),c=c.sibling;c!==null;)j0(c,o,f),c=c.sibling}function Px(c,o,f){var g=c.tag;if(g===5||g===6)c=c.stateNode,o?f.insertBefore(c,o):f.appendChild(c);else if(g!==4&&(g===27&&gc(c.type)&&(f=c.stateNode),c=c.child,c!==null))for(Px(c,o,f),c=c.sibling;c!==null;)Px(c,o,f),c=c.sibling}function XA(c){var o=c.stateNode,f=c.memoizedProps;try{for(var g=c.type,N=o.attributes;N.length;)o.removeAttributeNode(N[0]);Dn(o,g,f),o[dn]=c,o[Mn]=f}catch(C){fa(c,c.return,C)}}var pi=!1,rn=!1,w0=!1,ZA=typeof WeakSet=="function"?WeakSet:Set,yn=null;function lV(c,o){if(c=c.containerInfo,F0=eg,c=dE(c),xb(c)){if("selectionStart"in c)var f={start:c.selectionStart,end:c.selectionEnd};else e:{f=(f=c.ownerDocument)&&f.defaultView||window;var g=f.getSelection&&f.getSelection();if(g&&g.rangeCount!==0){f=g.anchorNode;var N=g.anchorOffset,C=g.focusNode;g=g.focusOffset;try{f.nodeType,C.nodeType}catch{f=null;break e}var P=0,V=-1,ae=-1,fe=0,Ce=0,Oe=c,ge=null;t:for(;;){for(var je;Oe!==f||N!==0&&Oe.nodeType!==3||(V=P+N),Oe!==C||g!==0&&Oe.nodeType!==3||(ae=P+g),Oe.nodeType===3&&(P+=Oe.nodeValue.length),(je=Oe.firstChild)!==null;)ge=Oe,Oe=je;for(;;){if(Oe===c)break t;if(ge===f&&++fe===N&&(V=P),ge===C&&++Ce===g&&(ae=P),(je=Oe.nextSibling)!==null)break;Oe=ge,ge=Oe.parentNode}Oe=je}f=V===-1||ae===-1?null:{start:V,end:ae}}else f=null}f=f||{start:0,end:0}}else f=null;for(W0={focusedElem:c,selectionRange:f},eg=!1,yn=o;yn!==null;)if(o=yn,c=o.child,(o.subtreeFlags&1028)!==0&&c!==null)c.return=o,yn=c;else for(;yn!==null;){switch(o=yn,C=o.alternate,c=o.flags,o.tag){case 0:if((c&4)!==0&&(c=o.updateQueue,c=c!==null?c.events:null,c!==null))for(f=0;f<c.length;f++)N=c[f],N.ref.impl=N.nextImpl;break;case 11:case 15:break;case 1:if((c&1024)!==0&&C!==null){c=void 0,f=o,N=C.memoizedProps,C=C.memoizedState,g=f.stateNode;try{var rt=wl(f.type,N);c=g.getSnapshotBeforeUpdate(rt,C),g.__reactInternalSnapshotBeforeUpdate=c}catch(wt){fa(f,f.return,wt)}}break;case 3:if((c&1024)!==0){if(c=o.stateNode.containerInfo,f=c.nodeType,f===9)G0(c);else if(f===1)switch(c.nodeName){case"HEAD":case"HTML":case"BODY":G0(c);break;default:c.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((c&1024)!==0)throw Error(s(163))}if(c=o.sibling,c!==null){c.return=o.return,yn=c;break}yn=o.return}}function JA(c,o,f){var g=f.flags;switch(f.tag){case 0:case 11:case 15:mi(c,f),g&4&&Zu(5,f);break;case 1:if(mi(c,f),g&4)if(c=f.stateNode,o===null)try{c.componentDidMount()}catch(P){fa(f,f.return,P)}else{var N=wl(f.type,o.memoizedProps);o=o.memoizedState;try{c.componentDidUpdate(N,o,c.__reactInternalSnapshotBeforeUpdate)}catch(P){fa(f,f.return,P)}}g&64&&GA(f),g&512&&Ju(f,f.return);break;case 3:if(mi(c,f),g&64&&(c=f.updateQueue,c!==null)){if(o=null,f.child!==null)switch(f.child.tag){case 27:case 5:o=f.child.stateNode;break;case 1:o=f.child.stateNode}try{IE(c,o)}catch(P){fa(f,f.return,P)}}break;case 27:o===null&&g&4&&XA(f);case 26:case 5:mi(c,f),o===null&&g&4&&KA(f),g&512&&Ju(f,f.return);break;case 12:mi(c,f);break;case 31:mi(c,f),g&4&&aD(c,f);break;case 13:mi(c,f),g&4&&nD(c,f),g&64&&(c=f.memoizedState,c!==null&&(c=c.dehydrated,c!==null&&(f=hV.bind(null,f),IV(c,f))));break;case 22:if(g=f.memoizedState!==null||pi,!g){o=o!==null&&o.memoizedState!==null||rn,N=pi;var C=rn;pi=g,(rn=o)&&!C?xi(c,f,(f.subtreeFlags&8772)!==0):mi(c,f),pi=N,rn=C}break;case 30:break;default:mi(c,f)}}function eD(c){var o=c.alternate;o!==null&&(c.alternate=null,eD(o)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(o=c.stateNode,o!==null&&Je(o)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}var Ma=null,Zn=!1;function fi(c,o,f){for(f=f.child;f!==null;)tD(c,o,f),f=f.sibling}function tD(c,o,f){if(X&&typeof X.onCommitFiberUnmount=="function")try{X.onCommitFiberUnmount(Va,f)}catch{}switch(f.tag){case 26:rn||Dr(f,o),fi(c,o,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:rn||Dr(f,o);var g=Ma,N=Zn;gc(f.type)&&(Ma=f.stateNode,Zn=!1),fi(c,o,f),lp(f.stateNode),Ma=g,Zn=N;break;case 5:rn||Dr(f,o);case 6:if(g=Ma,N=Zn,Ma=null,fi(c,o,f),Ma=g,Zn=N,Ma!==null)if(Zn)try{(Ma.nodeType===9?Ma.body:Ma.nodeName==="HTML"?Ma.ownerDocument.body:Ma).removeChild(f.stateNode)}catch(C){fa(f,o,C)}else try{Ma.removeChild(f.stateNode)}catch(C){fa(f,o,C)}break;case 18:Ma!==null&&(Zn?(c=Ma,GD(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,f.stateNode),Zo(c)):GD(Ma,f.stateNode));break;case 4:g=Ma,N=Zn,Ma=f.stateNode.containerInfo,Zn=!0,fi(c,o,f),Ma=g,Zn=N;break;case 0:case 11:case 14:case 15:oc(2,f,o),rn||oc(4,f,o),fi(c,o,f);break;case 1:rn||(Dr(f,o),g=f.stateNode,typeof g.componentWillUnmount=="function"&&YA(f,o,g)),fi(c,o,f);break;case 21:fi(c,o,f);break;case 22:rn=(g=rn)||f.memoizedState!==null,fi(c,o,f),rn=g;break;default:fi(c,o,f)}}function aD(c,o){if(o.memoizedState===null&&(c=o.alternate,c!==null&&(c=c.memoizedState,c!==null))){c=c.dehydrated;try{Zo(c)}catch(f){fa(o,o.return,f)}}}function nD(c,o){if(o.memoizedState===null&&(c=o.alternate,c!==null&&(c=c.memoizedState,c!==null&&(c=c.dehydrated,c!==null))))try{Zo(c)}catch(f){fa(o,o.return,f)}}function oV(c){switch(c.tag){case 31:case 13:case 19:var o=c.stateNode;return o===null&&(o=c.stateNode=new ZA),o;case 22:return c=c.stateNode,o=c._retryCache,o===null&&(o=c._retryCache=new ZA),o;default:throw Error(s(435,c.tag))}}function Mx(c,o){var f=oV(c);o.forEach(function(g){if(!f.has(g)){f.add(g);var N=vV.bind(null,c,g);g.then(N,N)}})}function Jn(c,o){var f=o.deletions;if(f!==null)for(var g=0;g<f.length;g++){var N=f[g],C=c,P=o,V=P;e:for(;V!==null;){switch(V.tag){case 27:if(gc(V.type)){Ma=V.stateNode,Zn=!1;break e}break;case 5:Ma=V.stateNode,Zn=!1;break e;case 3:case 4:Ma=V.stateNode.containerInfo,Zn=!0;break e}V=V.return}if(Ma===null)throw Error(s(160));tD(C,P,N),Ma=null,Zn=!1,C=N.alternate,C!==null&&(C.return=null),N.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)sD(o,c),o=o.sibling}var ar=null;function sD(c,o){var f=c.alternate,g=c.flags;switch(c.tag){case 0:case 11:case 14:case 15:Jn(o,c),es(c),g&4&&(oc(3,c,c.return),Zu(3,c),oc(5,c,c.return));break;case 1:Jn(o,c),es(c),g&512&&(rn||f===null||Dr(f,f.return)),g&64&&pi&&(c=c.updateQueue,c!==null&&(g=c.callbacks,g!==null&&(f=c.shared.hiddenCallbacks,c.shared.hiddenCallbacks=f===null?g:f.concat(g))));break;case 26:var N=ar;if(Jn(o,c),es(c),g&512&&(rn||f===null||Dr(f,f.return)),g&4){var C=f!==null?f.memoizedState:null;if(g=c.memoizedState,f===null)if(g===null)if(c.stateNode===null){e:{g=c.type,f=c.memoizedProps,N=N.ownerDocument||N;t:switch(g){case"title":C=N.getElementsByTagName("title")[0],(!C||C[we]||C[dn]||C.namespaceURI==="http://www.w3.org/2000/svg"||C.hasAttribute("itemprop"))&&(C=N.createElement(g),N.head.insertBefore(C,N.querySelector("head > title"))),Dn(C,g,f),C[dn]=c,Fe(C),g=C;break e;case"link":var P=sO("link","href",N).get(g+(f.href||""));if(P){for(var V=0;V<P.length;V++)if(C=P[V],C.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&C.getAttribute("rel")===(f.rel==null?null:f.rel)&&C.getAttribute("title")===(f.title==null?null:f.title)&&C.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){P.splice(V,1);break t}}C=N.createElement(g),Dn(C,g,f),N.head.appendChild(C);break;case"meta":if(P=sO("meta","content",N).get(g+(f.content||""))){for(V=0;V<P.length;V++)if(C=P[V],C.getAttribute("content")===(f.content==null?null:""+f.content)&&C.getAttribute("name")===(f.name==null?null:f.name)&&C.getAttribute("property")===(f.property==null?null:f.property)&&C.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&C.getAttribute("charset")===(f.charSet==null?null:f.charSet)){P.splice(V,1);break t}}C=N.createElement(g),Dn(C,g,f),N.head.appendChild(C);break;default:throw Error(s(468,g))}C[dn]=c,Fe(C),g=C}c.stateNode=g}else rO(N,c.type,c.stateNode);else c.stateNode=nO(N,g,c.memoizedProps);else C!==g?(C===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):C.count--,g===null?rO(N,c.type,c.stateNode):nO(N,g,c.memoizedProps)):g===null&&c.stateNode!==null&&y0(c,c.memoizedProps,f.memoizedProps)}break;case 27:Jn(o,c),es(c),g&512&&(rn||f===null||Dr(f,f.return)),f!==null&&g&4&&y0(c,c.memoizedProps,f.memoizedProps);break;case 5:if(Jn(o,c),es(c),g&512&&(rn||f===null||Dr(f,f.return)),c.flags&32){N=c.stateNode;try{jo(N,"")}catch(rt){fa(c,c.return,rt)}}g&4&&c.stateNode!=null&&(N=c.memoizedProps,y0(c,N,f!==null?f.memoizedProps:N)),g&1024&&(w0=!0);break;case 6:if(Jn(o,c),es(c),g&4){if(c.stateNode===null)throw Error(s(162));g=c.memoizedProps,f=c.stateNode;try{f.nodeValue=g}catch(rt){fa(c,c.return,rt)}}break;case 3:if(Qx=null,N=ar,ar=Yx(o.containerInfo),Jn(o,c),ar=N,es(c),g&4&&f!==null&&f.memoizedState.isDehydrated)try{Zo(o.containerInfo)}catch(rt){fa(c,c.return,rt)}w0&&(w0=!1,rD(c));break;case 4:g=ar,ar=Yx(c.stateNode.containerInfo),Jn(o,c),es(c),ar=g;break;case 12:Jn(o,c),es(c);break;case 31:Jn(o,c),es(c),g&4&&(g=c.updateQueue,g!==null&&(c.updateQueue=null,Mx(c,g)));break;case 13:Jn(o,c),es(c),c.child.flags&8192&&c.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Bx=_t()),g&4&&(g=c.updateQueue,g!==null&&(c.updateQueue=null,Mx(c,g)));break;case 22:N=c.memoizedState!==null;var ae=f!==null&&f.memoizedState!==null,fe=pi,Ce=rn;if(pi=fe||N,rn=Ce||ae,Jn(o,c),rn=Ce,pi=fe,es(c),g&8192)e:for(o=c.stateNode,o._visibility=N?o._visibility&-2:o._visibility|1,N&&(f===null||ae||pi||rn||Nl(c)),f=null,o=c;;){if(o.tag===5||o.tag===26){if(f===null){ae=f=o;try{if(C=ae.stateNode,N)P=C.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{V=ae.stateNode;var Oe=ae.memoizedProps.style,ge=Oe!=null&&Oe.hasOwnProperty("display")?Oe.display:null;V.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(rt){fa(ae,ae.return,rt)}}}else if(o.tag===6){if(f===null){ae=o;try{ae.stateNode.nodeValue=N?"":ae.memoizedProps}catch(rt){fa(ae,ae.return,rt)}}}else if(o.tag===18){if(f===null){ae=o;try{var je=ae.stateNode;N?YD(je,!0):YD(ae.stateNode,!1)}catch(rt){fa(ae,ae.return,rt)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===c)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===c)break e;for(;o.sibling===null;){if(o.return===null||o.return===c)break e;f===o&&(f=null),o=o.return}f===o&&(f=null),o.sibling.return=o.return,o=o.sibling}g&4&&(g=c.updateQueue,g!==null&&(f=g.retryQueue,f!==null&&(g.retryQueue=null,Mx(c,f))));break;case 19:Jn(o,c),es(c),g&4&&(g=c.updateQueue,g!==null&&(c.updateQueue=null,Mx(c,g)));break;case 30:break;case 21:break;default:Jn(o,c),es(c)}}function es(c){var o=c.flags;if(o&2){try{for(var f,g=c.return;g!==null;){if(QA(g)){f=g;break}g=g.return}if(f==null)throw Error(s(160));switch(f.tag){case 27:var N=f.stateNode,C=b0(c);Px(c,C,N);break;case 5:var P=f.stateNode;f.flags&32&&(jo(P,""),f.flags&=-33);var V=b0(c);Px(c,V,P);break;case 3:case 4:var ae=f.stateNode.containerInfo,fe=b0(c);j0(c,fe,ae);break;default:throw Error(s(161))}}catch(Ce){fa(c,c.return,Ce)}c.flags&=-3}o&4096&&(c.flags&=-4097)}function rD(c){if(c.subtreeFlags&1024)for(c=c.child;c!==null;){var o=c;rD(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),c=c.sibling}}function mi(c,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)JA(c,o.alternate,o),o=o.sibling}function Nl(c){for(c=c.child;c!==null;){var o=c;switch(o.tag){case 0:case 11:case 14:case 15:oc(4,o,o.return),Nl(o);break;case 1:Dr(o,o.return);var f=o.stateNode;typeof f.componentWillUnmount=="function"&&YA(o,o.return,f),Nl(o);break;case 27:lp(o.stateNode);case 26:case 5:Dr(o,o.return),Nl(o);break;case 22:o.memoizedState===null&&Nl(o);break;case 30:Nl(o);break;default:Nl(o)}c=c.sibling}}function xi(c,o,f){for(f=f&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var g=o.alternate,N=c,C=o,P=C.flags;switch(C.tag){case 0:case 11:case 15:xi(N,C,f),Zu(4,C);break;case 1:if(xi(N,C,f),g=C,N=g.stateNode,typeof N.componentDidMount=="function")try{N.componentDidMount()}catch(fe){fa(g,g.return,fe)}if(g=C,N=g.updateQueue,N!==null){var V=g.stateNode;try{var ae=N.shared.hiddenCallbacks;if(ae!==null)for(N.shared.hiddenCallbacks=null,N=0;N<ae.length;N++)BE(ae[N],V)}catch(fe){fa(g,g.return,fe)}}f&&P&64&&GA(C),Ju(C,C.return);break;case 27:XA(C);case 26:case 5:xi(N,C,f),f&&g===null&&P&4&&KA(C),Ju(C,C.return);break;case 12:xi(N,C,f);break;case 31:xi(N,C,f),f&&P&4&&aD(N,C);break;case 13:xi(N,C,f),f&&P&4&&nD(N,C);break;case 22:C.memoizedState===null&&xi(N,C,f),Ju(C,C.return);break;case 30:break;default:xi(N,C,f)}o=o.sibling}}function N0(c,o){var f=null;c!==null&&c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(f=c.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==f&&(c!=null&&c.refCount++,f!=null&&$u(f))}function S0(c,o){c=null,o.alternate!==null&&(c=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==c&&(o.refCount++,c!=null&&$u(c))}function nr(c,o,f,g){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)iD(c,o,f,g),o=o.sibling}function iD(c,o,f,g){var N=o.flags;switch(o.tag){case 0:case 11:case 15:nr(c,o,f,g),N&2048&&Zu(9,o);break;case 1:nr(c,o,f,g);break;case 3:nr(c,o,f,g),N&2048&&(c=null,o.alternate!==null&&(c=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==c&&(o.refCount++,c!=null&&$u(c)));break;case 12:if(N&2048){nr(c,o,f,g),c=o.stateNode;try{var C=o.memoizedProps,P=C.id,V=C.onPostCommit;typeof V=="function"&&V(P,o.alternate===null?"mount":"update",c.passiveEffectDuration,-0)}catch(ae){fa(o,o.return,ae)}}else nr(c,o,f,g);break;case 31:nr(c,o,f,g);break;case 13:nr(c,o,f,g);break;case 23:break;case 22:C=o.stateNode,P=o.alternate,o.memoizedState!==null?C._visibility&2?nr(c,o,f,g):ep(c,o):C._visibility&2?nr(c,o,f,g):(C._visibility|=2,Uo(c,o,f,g,(o.subtreeFlags&10256)!==0||!1)),N&2048&&N0(P,o);break;case 24:nr(c,o,f,g),N&2048&&S0(o.alternate,o);break;default:nr(c,o,f,g)}}function Uo(c,o,f,g,N){for(N=N&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var C=c,P=o,V=f,ae=g,fe=P.flags;switch(P.tag){case 0:case 11:case 15:Uo(C,P,V,ae,N),Zu(8,P);break;case 23:break;case 22:var Ce=P.stateNode;P.memoizedState!==null?Ce._visibility&2?Uo(C,P,V,ae,N):ep(C,P):(Ce._visibility|=2,Uo(C,P,V,ae,N)),N&&fe&2048&&N0(P.alternate,P);break;case 24:Uo(C,P,V,ae,N),N&&fe&2048&&S0(P.alternate,P);break;default:Uo(C,P,V,ae,N)}o=o.sibling}}function ep(c,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var f=c,g=o,N=g.flags;switch(g.tag){case 22:ep(f,g),N&2048&&N0(g.alternate,g);break;case 24:ep(f,g),N&2048&&S0(g.alternate,g);break;default:ep(f,g)}o=o.sibling}}var tp=8192;function qo(c,o,f){if(c.subtreeFlags&tp)for(c=c.child;c!==null;)cD(c,o,f),c=c.sibling}function cD(c,o,f){switch(c.tag){case 26:qo(c,o,f),c.flags&tp&&c.memoizedState!==null&&KV(f,ar,c.memoizedState,c.memoizedProps);break;case 5:qo(c,o,f);break;case 3:case 4:var g=ar;ar=Yx(c.stateNode.containerInfo),qo(c,o,f),ar=g;break;case 22:c.memoizedState===null&&(g=c.alternate,g!==null&&g.memoizedState!==null?(g=tp,tp=16777216,qo(c,o,f),tp=g):qo(c,o,f));break;default:qo(c,o,f)}}function lD(c){var o=c.alternate;if(o!==null&&(c=o.child,c!==null)){o.child=null;do o=c.sibling,c.sibling=null,c=o;while(c!==null)}}function ap(c){var o=c.deletions;if((c.flags&16)!==0){if(o!==null)for(var f=0;f<o.length;f++){var g=o[f];yn=g,dD(g,c)}lD(c)}if(c.subtreeFlags&10256)for(c=c.child;c!==null;)oD(c),c=c.sibling}function oD(c){switch(c.tag){case 0:case 11:case 15:ap(c),c.flags&2048&&oc(9,c,c.return);break;case 3:ap(c);break;case 12:ap(c);break;case 22:var o=c.stateNode;c.memoizedState!==null&&o._visibility&2&&(c.return===null||c.return.tag!==13)?(o._visibility&=-3,Rx(c)):ap(c);break;default:ap(c)}}function Rx(c){var o=c.deletions;if((c.flags&16)!==0){if(o!==null)for(var f=0;f<o.length;f++){var g=o[f];yn=g,dD(g,c)}lD(c)}for(c=c.child;c!==null;){switch(o=c,o.tag){case 0:case 11:case 15:oc(8,o,o.return),Rx(o);break;
vendor: 5,136 bytes, line 48
48case 22:f=o.stateNode,f._visibility&2&&(f._visibility&=-3,Rx(o));break;default:Rx(o)}c=c.sibling}}function dD(c,o){for(;yn!==null;){var f=yn;switch(f.tag){case 0:case 11:case 15:oc(8,f,o);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var g=f.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:$u(f.memoizedState.cache)}if(g=f.child,g!==null)g.return=f,yn=g;else e:for(f=c;yn!==null;){g=yn;var N=g.sibling,C=g.return;if(eD(g),g===f){yn=null;break e}if(N!==null){N.return=C,yn=N;break e}yn=C}}}var dV={getCacheForType:function(c){var o=En(an),f=o.data.get(c);return f===void 0&&(f=c(),o.data.set(c,f)),f},cacheSignal:function(){return En(an).controller.signal}},uV=typeof WeakMap=="function"?WeakMap:Map,na=0,Ea=null,Ut=null,Vt=0,pa=0,ps=null,dc=!1,Fo=!1,C0=!1,gi=0,Ka=0,uc=0,Sl=0,E0=0,fs=0,Wo=0,np=null,ts=null,A0=!1,Bx=0,uD=0,Ix=1/0,Lx=null,pc=null,un=0,fc=null,Ho=null,hi=0,D0=0,O0=null,pD=null,sp=0,k0=null;function ms(){return(na&2)!==0&&Vt!==0?Vt&-Vt:L.T!==null?B0():Kn()}function fD(){if(fs===0)if((Vt&536870912)===0||Kt){var c=qe;qe<<=1,(qe&3932160)===0&&(qe=262144),fs=c}else fs=536870912;return c=ds.current,c!==null&&(c.flags|=32),fs}function as(c,o,f){(c===Ea&&(pa===2||pa===9)||c.cancelPendingCommit!==null)&&(Vo(c,0),mc(c,Vt,fs,!1)),Ht(c,f),((na&2)===0||c!==Ea)&&(c===Ea&&((na&2)===0&&(Sl|=f),Ka===4&&mc(c,Vt,fs,!1)),Or(c))}function mD(c,o,f){if((na&6)!==0)throw Error(s(327));var g=!f&&(o&127)===0&&(o&c.expiredLanes)===0||Mt(c,o),N=g?mV(c,o):T0(c,o,!0),C=g;do{if(N===0){Fo&&!g&&mc(c,o,0,!1);break}else{if(f=c.current.alternate,C&&!pV(f)){N=T0(c,o,!1),C=!1;continue}if(N===2){if(C=o,c.errorRecoveryDisabledLanes&C)var P=0;else P=c.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){o=P;e:{var V=c;N=np;var ae=V.current.memoizedState.isDehydrated;if(ae&&(Vo(V,P).flags|=256),P=T0(V,P,!1),P!==2){if(C0&&!ae){V.errorRecoveryDisabledLanes|=C,Sl|=C,N=4;break e}C=ts,ts=N,C!==null&&(ts===null?ts=C:ts.push.apply(ts,C))}N=P}if(C=!1,N!==2)continue}}if(N===1){Vo(c,0),mc(c,o,0,!0);break}e:{switch(g=c,C=N,C){case 0:case 1:throw Error(s(345));case 4:if((o&4194048)!==o)break;case 6:mc(g,o,fs,!dc);break e;case 2:ts=null;break;case 3:case 5:break;default:throw Error(s(329))}if((o&62914560)===o&&(N=Bx+300-_t(),10<N)){if(mc(g,o,fs,!dc),Ge(g,0,!0)!==0)break e;hi=o,g.timeoutHandle=HD(xD.bind(null,g,f,ts,Lx,A0,o,fs,Sl,Wo,dc,C,"Throttled",-0,0),N);break e}xD(g,f,ts,Lx,A0,o,fs,Sl,Wo,dc,C,null,-0,0)}}break}while(!0);Or(c)}function xD(c,o,f,g,N,C,P,V,ae,fe,Ce,Oe,ge,je){if(c.timeoutHandle=-1,Oe=o.subtreeFlags,Oe&8192||(Oe&16785408)===16785408){Oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ai},cD(o,C,Oe);var rt=(C&62914560)===C?Bx-_t():(C&4194048)===C?uD-_t():0;if(rt=QV(Oe,rt),rt!==null){hi=C,c.cancelPendingCommit=rt(ND.bind(null,c,o,C,f,g,N,P,V,ae,Ce,Oe,null,ge,je)),mc(c,C,P,!fe);return}}ND(c,o,C,f,g,N,P,V,ae)}function pV(c){for(var o=c;;){var f=o.tag;if((f===0||f===11||f===15)&&o.flags&16384&&(f=o.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var g=0;g<f.length;g++){var N=f[g],C=N.getSnapshot;N=N.value;try{if(!ls(C(),N))return!1}catch{return!1}}if(f=o.child,o.subtreeFlags&16384&&f!==null)f.return=o,o=f;else{if(o===c)break;for(;o.sibling===null;){if(o.return===null||o.return===c)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function mc(c,o,f,g){o&=~E0,o&=~Sl,c.suspendedLanes|=o,c.pingedLanes&=~o,g&&(c.warmLanes|=o),g=c.expirationTimes;for(var N=o;0<N;){var C=31-Ve(N),P=1<<C;g[C]=-1,N&=~P}f!==0&&be(c,f,o)}function $x(){return(na&6)===0?(rp(0),!1):!0}function _0(){if(Ut!==null){if(pa===0)var c=Ut.return;else c=Ut,ii=xl=null,Gb(c),Bo=null,Uu=0,c=Ut;for(;c!==null;)VA(c.alternate,c),c=c.return;Ut=null}}function Vo(c,o){var f=c.timeoutHandle;f!==-1&&(c.timeoutHandle=-1,TV(f)),f=c.cancelPendingCommit,f!==null&&(c.cancelPendingCommit=null,f()),hi=0,_0(),Ea=c,Ut=f=si(c.current,null),Vt=o,pa=0,ps=null,dc=!1,Fo=Mt(c,o),C0=!1,Wo=fs=E0=Sl=uc=Ka=0,ts=np=null,A0=!1,(o&8)!==0&&(o|=o&32);var g=c.entangledLanes;if(g!==0)for(c=c.entanglements,g&=o;0<g;){var N=31-Ve(g),C=1<<N;o|=c[N],g&=~C}return gi=o,ix(),f}function gD(c,o){Tt=null,L.H=Ku,o===Ro||o===mx?(o=TE(),pa=3):o===Rb?(o=TE(),pa=4):pa=o===o0?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,ps=o,Ut===null&&(Ka=1,Dx(c,Rs(o,c.current)))}function hD(){var c=ds.current;return c===null?!0:(Vt&4194048)===Vt?$s===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?c===$s:!1}function vD(){var c=L.H;return L.H=Ku,c===null?Ku:c}function yD(){var c=L.A;return L.A=dV,c}function zx(){Ka=4,dc||(Vt&4194048)!==Vt&&ds.current!==null||(Fo=!0),(uc&134217727)===0&&(Sl&134217727)===0||Ea===null||mc(Ea,Vt,fs,!1)}function T0(c,o,f){var g=na;na|=2;var N=vD(),C=yD();(Ea!==c||Vt!==o)&&(Lx=null,Vo(c,o)),o=!1;var P=Ka;e:do try{if(pa!==0&&Ut!==null){var V=Ut,ae=ps;switch(pa){case 8:_0(),P=6;break e;case 3:case 2:case 9:case 6:ds.current===null&&(o=!0);var fe=pa;if(pa=0,ps=null,Go(c,V,ae,fe),f&&Fo){P=0;break e}break;default:fe=pa,pa=0,ps=null,Go(c,V,ae,fe)}}fV(),P=Ka;break}catch(Ce){gD(c,Ce)}while(!0);
vendor: 3,683 bytes, line 48
48return o&&c.shellSuspendCounter++,ii=xl=null,na=g,L.H=N,L.A=C,Ut===null&&(Ea=null,Vt=0,ix()),P}function fV(){for(;Ut!==null;)bD(Ut)}function mV(c,o){var f=na;na|=2;var g=vD(),N=yD();Ea!==c||Vt!==o?(Lx=null,Ix=_t()+500,Vo(c,o)):Fo=Mt(c,o);e:do try{if(pa!==0&&Ut!==null){o=Ut;var C=ps;t:switch(pa){case 1:pa=0,ps=null,Go(c,o,C,1);break;case 2:case 9:if(kE(C)){pa=0,ps=null,jD(o);break}o=function(){pa!==2&&pa!==9||Ea!==c||(pa=7),Or(c)},C.then(o,o);break e;case 3:pa=7;break e;case 4:pa=5;break e;case 7:kE(C)?(pa=0,ps=null,jD(o)):(pa=0,ps=null,Go(c,o,C,7));break;case 5:var P=null;switch(Ut.tag){case 26:P=Ut.memoizedState;case 5:case 27:var V=Ut;if(P?iO(P):V.stateNode.complete){pa=0,ps=null;var ae=V.sibling;if(ae!==null)Ut=ae;else{var fe=V.return;fe!==null?(Ut=fe,Ux(fe)):Ut=null}break t}}pa=0,ps=null,Go(c,o,C,5);break;case 6:pa=0,ps=null,Go(c,o,C,6);break;case 8:_0(),Ka=6;break e;default:throw Error(s(462))}}xV();break}catch(Ce){gD(c,Ce)}while(!0);return ii=xl=null,L.H=g,L.A=N,na=f,Ut!==null?0:(Ea=null,Vt=0,ix(),Ka)}function xV(){for(;Ut!==null&&!pt();)bD(Ut)}function bD(c){var o=WA(c.alternate,c,gi);c.memoizedProps=c.pendingProps,o===null?Ux(c):Ut=o}function jD(c){var o=c,f=o.alternate;switch(o.tag){case 15:case 0:o=LA(f,o,o.pendingProps,o.type,void 0,Vt);break;case 11:o=LA(f,o,o.pendingProps,o.type.render,o.ref,Vt);break;case 5:Gb(o);default:VA(f,o),o=Ut=yE(o,gi),o=WA(f,o,gi)}c.memoizedProps=c.pendingProps,o===null?Ux(c):Ut=o}function Go(c,o,f,g){ii=xl=null,Gb(o),Bo=null,Uu=0;var N=o.return;try{if(nV(c,N,o,f,Vt)){Ka=1,Dx(c,Rs(f,c.current)),Ut=null;return}}catch(C){if(N!==null)throw Ut=N,C;Ka=1,Dx(c,Rs(f,c.current)),Ut=null;return}o.flags&32768?(Kt||g===1?c=!0:Fo||(Vt&536870912)!==0?c=!1:(dc=c=!0,(g===2||g===9||g===3||g===6)&&(g=ds.current,g!==null&&g.tag===13&&(g.flags|=16384))),wD(o,c)):Ux(o)}function Ux(c){var o=c;do{if((o.flags&32768)!==0){wD(o,dc);return}c=o.return;var f=iV(o.alternate,o,gi);if(f!==null){Ut=f;return}if(o=o.sibling,o!==null){Ut=o;return}Ut=o=c}while(o!==null);Ka===0&&(Ka=5)}function wD(c,o){do{var f=cV(c.alternate,c);if(f!==null){f.flags&=32767,Ut=f;return}if(f=c.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!o&&(c=c.sibling,c!==null)){Ut=c;return}Ut=c=f}while(c!==null);Ka=6,Ut=null}function ND(c,o,f,g,N,C,P,V,ae){c.cancelPendingCommit=null;do qx();while(un!==0);if((na&6)!==0)throw Error(s(327));if(o!==null){if(o===c.current)throw Error(s(177));if(C=o.lanes|o.childLanes,C|=bb,Lt(c,f,C,P,V,ae),c===Ea&&(Ut=Ea=null,Vt=0),Ho=o,fc=c,hi=f,D0=C,O0=N,pD=g,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(c.callbackNode=null,c.callbackPriority=0,yV(Ct,function(){return DD(),null})):(c.callbackNode=null,c.callbackPriority=0),g=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||g){g=L.T,L.T=null,N=M.p,M.p=2,P=na,na|=4;try{lV(c,o,f)}finally{na=P,M.p=N,L.T=g}}un=1,SD(),CD(),ED()}}function SD(){if(un===1){un=0;var c=fc,o=Ho,f=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||f){f=L.T,L.T=null;var g=M.p;M.p=2;var N=na;na|=4;try{sD(o,c);var C=W0,P=dE(c.containerInfo),V=C.focusedElem,ae=C.selectionRange;if(P!==V&&V&&V.ownerDocument&&oE(V.ownerDocument.documentElement,V)){if(ae!==null&&xb(V)){var fe=ae.start,Ce=ae.end;if(Ce===void 0&&(Ce=fe),"selectionStart"in V)V.selectionStart=fe,V.selectionEnd=Math.min(Ce,V.value.length);else{var Oe=V.ownerDocument||document,ge=Oe&&Oe.defaultView||window;if(ge.getSelection){var je=ge.getSelection(),rt=V.textContent.length,wt=Math.min(ae.start,rt),ya=ae.end===void 0?wt:Math.min(ae.end,rt);!je.extend&&wt>ya&&(P=ya,ya=wt,wt=P);var oe=lE(V,wt),re=lE(V,ya);if(oe&&re&&(je.rangeCount!==1||je.anchorNode!==oe.node||je.anchorOffset!==oe.offset||je.focusNode!==re.node||je.focu
vendor: 6,840 bytes, line 48
48sOffset!==re.offset)){var pe=Oe.createRange();pe.setStart(oe.node,oe.offset),je.removeAllRanges(),wt>ya?(je.addRange(pe),je.extend(re.node,re.offset)):(pe.setEnd(re.node,re.offset),je.addRange(pe))}}}}for(Oe=[],je=V;je=je.parentNode;)je.nodeType===1&&Oe.push({element:je,left:je.scrollLeft,top:je.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Oe.length;V++){var Ae=Oe[V];Ae.element.scrollLeft=Ae.left,Ae.element.scrollTop=Ae.top}}eg=!!F0,W0=F0=null}finally{na=N,M.p=g,L.T=f}}c.current=o,un=2}}function CD(){if(un===2){un=0;var c=fc,o=Ho,f=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||f){f=L.T,L.T=null;var g=M.p;M.p=2;var N=na;na|=4;try{JA(c,o.alternate,o)}finally{na=N,M.p=g,L.T=f}}un=3}}function ED(){if(un===4||un===3){un=0,ft();var c=fc,o=Ho,f=hi,g=pD;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?un=5:(un=0,Ho=fc=null,AD(c,c.pendingLanes));var N=c.pendingLanes;if(N===0&&(pc=null),Ga(f),o=o.stateNode,X&&typeof X.onCommitFiberRoot=="function")try{X.onCommitFiberRoot(Va,o,void 0,(o.current.flags&128)===128)}catch{}if(g!==null){o=L.T,N=M.p,M.p=2,L.T=null;try{for(var C=c.onRecoverableError,P=0;P<g.length;P++){var V=g[P];C(V.value,{componentStack:V.stack})}}finally{L.T=o,M.p=N}}(hi&3)!==0&&qx(),Or(c),N=c.pendingLanes,(f&261930)!==0&&(N&42)!==0?c===k0?sp++:(sp=0,k0=c):sp=0,rp(0)}}function AD(c,o){(c.pooledCacheLanes&=o)===0&&(o=c.pooledCache,o!=null&&(c.pooledCache=null,$u(o)))}function qx(){return SD(),CD(),ED(),DD()}function DD(){if(un!==5)return!1;var c=fc,o=D0;D0=0;var f=Ga(hi),g=L.T,N=M.p;try{M.p=32>f?32:f,L.T=null,f=O0,O0=null;var C=fc,P=hi;if(un=0,Ho=fc=null,hi=0,(na&6)!==0)throw Error(s(331));var V=na;if(na|=4,oD(C.current),iD(C,C.current,P,f),na=V,rp(0,!1),X&&typeof X.onPostCommitFiberRoot=="function")try{X.onPostCommitFiberRoot(Va,C)}catch{}return!0}finally{M.p=N,L.T=g,AD(c,o)}}function OD(c,o,f){o=Rs(f,o),o=l0(c.stateNode,o,2),c=ic(c,o,2),c!==null&&(Ht(c,2),Or(c))}function fa(c,o,f){if(c.tag===3)OD(c,c,f);else for(;o!==null;){if(o.tag===3){OD(o,c,f);break}else if(o.tag===1){var g=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(pc===null||!pc.has(g))){c=Rs(f,c),f=kA(2),g=ic(o,f,2),g!==null&&(_A(f,g,o,c),Ht(g,2),Or(g));break}}o=o.return}}function P0(c,o,f){var g=c.pingCache;if(g===null){g=c.pingCache=new uV;var N=new Set;g.set(o,N)}else N=g.get(o),N===void 0&&(N=new Set,g.set(o,N));N.has(f)||(C0=!0,N.add(f),c=gV.bind(null,c,o,f),o.then(c,c))}function gV(c,o,f){var g=c.pingCache;g!==null&&g.delete(o),c.pingedLanes|=c.suspendedLanes&f,c.warmLanes&=~f,Ea===c&&(Vt&f)===f&&(Ka===4||Ka===3&&(Vt&62914560)===Vt&&300>_t()-Bx?(na&2)===0&&Vo(c,0):E0|=f,Wo===Vt&&(Wo=0)),Or(c)}function kD(c,o){o===0&&(o=Ie()),c=pl(c,o),c!==null&&(Ht(c,o),Or(c))}function hV(c){var o=c.memoizedState,f=0;o!==null&&(f=o.retryLane),kD(c,f)}function vV(c,o){var f=0;switch(c.tag){case 31:case 13:var g=c.stateNode,N=c.memoizedState;N!==null&&(f=N.retryLane);break;case 19:g=c.stateNode;break;case 22:g=c.stateNode._retryCache;break;default:throw Error(s(314))}g!==null&&g.delete(o),kD(c,f)}function yV(c,o){return me(c,o)}var Fx=null,Yo=null,M0=!1,Wx=!1,R0=!1,xc=0;function Or(c){c!==Yo&&c.next===null&&(Yo===null?Fx=Yo=c:Yo=Yo.next=c),Wx=!0,M0||(M0=!0,jV())}function rp(c,o){if(!R0&&Wx){R0=!0;do for(var f=!1,g=Fx;g!==null;){if(c!==0){var N=g.pendingLanes;if(N===0)var C=0;else{var P=g.suspendedLanes,V=g.pingedLanes;C=(1<<31-Ve(42|c)+1)-1,C&=N&~(P&~V),C=C&201326741?C&201326741|1:C?C|2:0}C!==0&&(f=!0,MD(g,C))}else C=Vt,C=Ge(g,g===Ea?C:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(C&3)===0||Mt(g,C)||(f=!0,MD(g,C));g=g.next}while(f);R0=!1}}function bV(){_D()}function _D(){Wx=M0=!1;var c=0;xc!==0&&_V()&&(c=xc);for(var o=_t(),f=null,g=Fx;g!==null;){var N=g.next,C=TD(g,o);C===0?(g.next=null,f===null?Fx=N:f.next=N,N===null&&(Yo=f)):(f=g,(c!==0||(C&3)!==0)&&(Wx=!0)),g=N}un!==0&&un!==5||rp(c),xc!==0&&(xc=0)}function TD(c,o){for(var f=c.suspendedLanes,g=c.pingedLanes,N=c.expirationTimes,C=c.pendingLanes&-62914561;0<C;){var P=31-Ve(C),V=1<<P,ae=N[P];ae===-1?((V&f)===0||(V&g)!==0)&&(N[P]=zt(V,o)):ae<=o&&(c.expiredLanes|=V),C&=~V}if(o=Ea,f=Vt,f=Ge(c,c===o?f:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),g=c.callbackNode,f===0||c===o&&(pa===2||pa===9)||c.cancelPendingCommit!==null)return g!==null&&g!==null&&ut(g),c.callbackNode=null,c.callbackPriority=0;if((f&3)===0||Mt(c,f)){if(o=f&-f,o===c.callbackPriority)return o;switch(g!==null&&ut(g),Ga(f)){case 2:case 8:f=Xt;break;case 32:f=Ct;break;case 268435456:f=xa;break;default:f=Ct}return g=PD.bind(null,c),f=me(f,g),c.callbackPriority=o,c.callbackNode=f,o}return g!==null&&g!==null&&ut(g),c.callbackPriority=2,c.callbackNode=null,2}function PD(c,o){if(un!==0&&un!==5)return c.callbackNode=null,c.callbackPriority=0,null;var f=c.callbackNode;if(qx()&&c.callbackNode!==f)return null;var g=Vt;return g=Ge(c,c===Ea?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),g===0?null:(mD(c,g,o),TD(c,_t()),c.callbackNode!=null&&c.callbackNode===f?PD.bind(null,c):null)}function MD(c,o){if(qx())return null;mD(c,o,!0)}function jV(){PV(function(){(na&6)!==0?me(vt,bV):_D()})}function B0(){if(xc===0){var c=Po;c===0&&(c=ke,ke<<=1,(ke&261888)===0&&(ke=256)),xc=c}return xc}function RD(c){return c==null||typeof c=="symbol"||typeof c=="boolean"?null:typeof c=="function"?c:Zm(""+c)}function BD(c,o){var f=o.ownerDocument.createElement("input");return f.name=o.name,f.value=o.value,c.id&&f.setAttribute("form",c.id),o.parentNode.insertBefore(f,o),c=new FormData(c),f.parentNode.removeChild(f),c}function wV(c,o,f,g,N){if(o==="submit"&&f&&f.stateNode===N){var C=RD((N[Mn]||null).action),P=g.submitter;P&&(o=(o=P[Mn]||null)?RD(o.formAction):P.getAttribute("formAction"),o!==null&&(C=o,P=null));var V=new ax("action","action",null,g,N);c.push({event:V,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(xc!==0){var ae=P?BD(N,P):new FormData(N);a0(f,{pending:!0,data:ae,method:N.method,action:C},null,ae)}}else typeof C=="function"&&(V.preventDefault(),ae=P?BD(N,P):new FormData(N),a0(f,{pending:!0,data:ae,method:N.method,action:C},C,ae))},currentTarget:N}]})}}for(var I0=0;I0<yb.length;I0++){var L0=yb[I0],NV=L0.toLowerCase(),SV=L0[0].toUpperCase()+L0.slice(1);tr(NV,"on"+SV)}tr(fE,"onAnimationEnd"),tr(mE,"onAnimationIteration"),tr(xE,"onAnimationStart"),tr("dblclick","onDoubleClick"),tr("focusin","onFocus"),tr("focusout","onBlur"),tr(zH,"onTransitionRun"),tr(UH,"onTransitionStart"),tr(qH,"onTransitionCancel"),tr(gE,"onTransitionEnd"),yo("onMouseEnter",["mouseout","mouseover"]),yo("onMouseLeave",["mouseout","mouseover"]),yo("onPointerEnter",["pointerout","pointerover"]),yo("onPointerLeave",["pointerout","pointerover"]),ll("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ll("onSelect","focusout contextmenu dragend focu
48sin keydown keyup mousedown mouseup selectionchange".split(" ")),ll("onBeforeInput",["compositionend","keypress","textInput","paste"]),ll("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ll("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ll("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ip="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(" "),CV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ip));function ID(c,o){o=(o&4)!==0;for(var f=0;f<c.length;f++){var g=c[f],N=g.event;g=g.listeners;e:{var C=void 0;if(o)for(var P=g.length-1;0<=P;P--){var V=g[P],ae=V.instance,fe=V.currentTarget;if(V=V.listener,ae!==C&&N.isPropagationStopped())break e;C=V,N.currentTarget=fe;try{C(N)}catch(Ce){rx(Ce)}N.currentTarget=null,C=ae}else for(P=0;P<g.length;P++){if(V=g[P],ae=V.instance,fe=V.currentTarget,V=V.listener,ae!==C&&N.isPropagationStopped())break e;C=V,N.currentTarget=fe;try{C(N)}catch(Ce){rx(Ce)}N.currentTarget=null,C=ae}}}}function qt(c,o){var f=o[Au];f===void 0&&(f=o[Au]=new Set);var g=c+"__bubble";f.has(g)||(LD(o,c,2,!1),f.add(g))}function $0(c,o,f){var g=0;o&&(g|=4),LD(f,c,g,o)}var Hx="_reactListening"+Math.random().toString(36).slice(2);function z0(c){if(!c[Hx]){c[Hx]=!0,ks.forEach(function(f){f!=="selectionchange"&&(CV.has(f)||$0(f,!1,c),$0(f,!0,c))});var o=c.nodeType===9?c:c.ownerDocument;o===null||o[Hx]||(o[Hx]=!0,$0("selectionchange",!1,o))}}function LD(c,o,f,g){switch(fO(o)){case 2:var N=JV;break;case 8:N=eG;break;default:N=t1}f=N.bind(null,o,f,c),N=void 0,!ib||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(N=!0),g?N!==void 0?c.addEventListener(o,f,{capture:!0,passive:N}):c.addEventListener(o,f,!0):N!==void 0?c.addEventListener(o,f,{passive:N}):c.addEventListener(o,f,!1)}function U0(c,o,f,g,N){var C=g;if((o&1)===0&&(o&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var V=g.stateNode.containerInfo;if(V===N)break;if(P===4)for(P=g.return;P!==null;){var ae=P.tag;if((ae===3||ae===4)&&P.stateNode.containerInfo===N)return;P=P.return}for(;V!==null;){if(P=lt(V),P===null)return;if(ae=P.tag,ae===5||ae===6||ae===26||ae===27){g=C=P;continue e}V=V.parentNode}}g=g.return}F4(function(){var fe=C,Ce=sb(f),Oe=[];e:{var ge=hE.get(c);if(ge!==void 0){var je=ax,rt=c;switch(c){case"keypress":if(ex(f)===0)break e;case"keydown":case"keyup":je=vH;break;case"focusin":rt="focus",je=db;break;case"focusout":rt="blur",je=db;break;case"beforeblur":case"afterblur":je=db;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=V4;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=iH;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=jH;break;case fE:case mE:case xE:je=oH;break;case gE:je=NH;break;case"scroll":case"scrollend":je=sH;break;case"wheel":je=CH;break;case"copy":case"cut":case"paste":je=uH;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Y4;break;case"toggle":case"beforetoggle":je=AH}var wt=(o&4)!==0,ya=!wt&&(c==="scroll"||c==="scrollend"),oe=wt?ge!==null?ge+"Capture":null:ge;wt=[];for(var re=fe,pe;re!==null;){var Ae=re;if(pe=Ae.stateNode,Ae=Ae.tag,Ae!==5&&Ae!==26&&Ae!==27||pe===null||oe===null||(Ae=Du(re,oe),Ae!=null&&wt.push(cp(re,Ae,pe))),ya)break;re=re.return}0<wt.length&&(ge=new je(ge,rt,null,f,Ce),Oe.push({event:ge,listeners:wt}))}}if((o&7)===0){e:{if(ge=c==="mouseover"||c==="pointerover",je=c==="mouseout"||c==="pointerout",ge&&f!==nb&&(rt=f.relatedTarget||f.fromElement)&&(lt(rt)||rt[Cr]))break e;if((je||ge)&&(ge=Ce.window===Ce?Ce:(ge=Ce.ownerDocument)?ge.defaultView||ge.parentWindow:window,je?(rt=f.relatedTarget||f.toElement,je=fe,rt=rt?lt(rt):null,rt!==null&&(ya=i(rt),wt=rt.tag,rt!==ya||wt!==5&&wt!==27&&wt!==6)&&(rt=null)):(je=null,rt=fe),je!==rt)){if(wt=V4,Ae="onMouseLeave",oe="onMouseEnter",re="mouse",(c==="pointerout"||c==="pointerover")&&(wt=Y4,Ae="onPointerLeave",oe="onPointerEnter",re="pointer"),ya=je==null?ge:He(je),pe=rt==null?ge:He(rt),ge=new wt(Ae,re+"leave",je,f,Ce),ge.target=ya,ge.relatedTarget=pe,Ae=null,lt(Ce)===fe&&(wt=new wt(oe,re+"enter",rt,f,Ce),wt.target=pe,wt.relatedTarget=ya,Ae=wt),ya=Ae,je&&rt)t:{for(wt=EV,oe=je,re=rt,pe=0,Ae=oe;Ae;Ae=wt(Ae))pe++;Ae=0;for(var jt=re;jt;jt=wt(jt))Ae++;for(;0<pe-Ae;)oe=wt(oe),pe--;for(;0<Ae-pe;)re=wt(re),Ae--;for(;pe--;){if(oe===re||re!==null&&oe===re.alternate){wt=oe;break t}oe=wt(oe),re=wt(re)}wt=null}else wt=null;je!==null&&$D(Oe,ge,je,wt,!1),rt!==null&&ya!==null&&$D(Oe,ya,rt,wt,!0)}}
vendor: 1,221 bytes, line 48
48e:{if(ge=fe?He(fe):window,je=ge.nodeName&&ge.nodeName.toLowerCase(),je==="select"||je==="input"&&ge.type==="file")var Jt=aE;else if(eE(ge))if(nE)Jt=IH;else{Jt=RH;var ot=MH}else je=ge.nodeName,!je||je.toLowerCase()!=="input"||ge.type!=="checkbox"&&ge.type!=="radio"?fe&&ab(fe.elementType)&&(Jt=aE):Jt=BH;if(Jt&&(Jt=Jt(c,fe))){tE(Oe,Jt,f,Ce);break e}ot&&ot(c,ge,fe),c==="focusout"&&fe&&ge.type==="number"&&fe.memoizedProps.value!=null&&tb(ge,"number",ge.value)}switch(ot=fe?He(fe):window,c){case"focusin":(eE(ot)||ot.contentEditable==="true")&&(Co=ot,gb=fe,Bu=null);break;case"focusout":Bu=gb=Co=null;break;case"mousedown":hb=!0;break;case"contextmenu":case"mouseup":case"dragend":hb=!1,uE(Oe,f,Ce);break;case"selectionchange":if($H)break;case"keydown":case"keyup":uE(Oe,f,Ce)}var Rt;if(pb)e:{switch(c){case"compositionstart":var Gt="onCompositionStart";break e;case"compositionend":Gt="onCompositionEnd";break e;case"compositionupdate":Gt="onCompositionUpdate";break e}Gt=void 0}else So?Z4(c,f)&&(Gt="onCompositionEnd"):c==="keydown"&&f.keyCode===229&&(Gt="onCompositionStart");Gt&&(K4&&f.locale!=="ko"&&(So||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&So&&(Rt=W4()):(Ji=Ce,cb="value"in Ji?Ji.value:Ji.textContent,S
vendor: 6,232 bytes, lines 48-49
48o=!0)),ot=Vx(fe,Gt),0<ot.length&&(Gt=new G4(Gt,c,null,f,Ce),Oe.push({event:Gt,listeners:ot}),Rt?Gt.data=Rt:(Rt=J4(f),Rt!==null&&(Gt.data=Rt)))),(Rt=OH?kH(c,f):_H(c,f))&&(Gt=Vx(fe,"onBeforeInput"),0<Gt.length&&(ot=new G4("onBeforeInput","beforeinput",null,f,Ce),Oe.push({event:ot,listeners:Gt}),ot.data=Rt)),wV(Oe,c,fe,f,Ce)}ID(Oe,o)})}function cp(c,o,f){return{instance:c,listener:o,currentTarget:f}}function Vx(c,o){for(var f=o+"Capture",g=[];c!==null;){var N=c,C=N.stateNode;if(N=N.tag,N!==5&&N!==26&&N!==27||C===null||(N=Du(c,f),N!=null&&g.unshift(cp(c,N,C)),N=Du(c,o),N!=null&&g.push(cp(c,N,C))),c.tag===3)return g;c=c.return}return[]}function EV(c){if(c===null)return null;do c=c.return;while(c&&c.tag!==5&&c.tag!==27);return c||null}function $D(c,o,f,g,N){for(var C=o._reactName,P=[];f!==null&&f!==g;){var V=f,ae=V.alternate,fe=V.stateNode;if(V=V.tag,ae!==null&&ae===g)break;V!==5&&V!==26&&V!==27||fe===null||(ae=fe,N?(fe=Du(f,C),fe!=null&&P.unshift(cp(f,fe,ae))):N||(fe=Du(f,C),fe!=null&&P.push(cp(f,fe,ae)))),f=f.return}P.length!==0&&c.push({event:o,listeners:P})}var AV=/\r\n?/g,DV=/\u0000|\uFFFD/g;function zD(c){return(typeof c=="string"?c:""+c).replace(AV,`
49`).replace(DV,"")}function UD(c,o){return o=zD(o),zD(c)===o}function va(c,o,f,g,N,C){switch(f){case"children":typeof g=="string"?o==="body"||o==="textarea"&&g===""||jo(c,g):(typeof g=="number"||typeof g=="bigint")&&o!=="body"&&jo(c,""+g);break;case"className":Qm(c,"class",g);break;case"tabIndex":Qm(c,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":Qm(c,f,g);break;case"style":U4(c,g,C);break;case"data":if(o!=="object"){Qm(c,"data",g);break}case"src":case"href":if(g===""&&(o!=="a"||f!=="href")){c.removeAttribute(f);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){c.removeAttribute(f);break}g=Zm(""+g),c.setAttribute(f,g);break;case"action":case"formAction":if(typeof g=="function"){c.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof C=="function"&&(f==="formAction"?(o!=="input"&&va(c,o,"name",N.name,N,null),va(c,o,"formEncType",N.formEncType,N,null),va(c,o,"formMethod",N.formMethod,N,null),va(c,o,"formTarget",N.formTarget,N,null)):(va(c,o,"encType",N.encType,N,null),va(c,o,"method",N.method,N,null),va(c,o,"target",N.target,N,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){c.removeAttribute(f);break}g=Zm(""+g),c.setAttribute(f,g);break;case"onClick":g!=null&&(c.onclick=ai);break;case"onScroll":g!=null&&qt("scroll",c);break;case"onScrollEnd":g!=null&&qt("scrollend",c);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(s(61));if(f=g.__html,f!=null){if(N.children!=null)throw Error(s(60));c.innerHTML=f}}break;case"multiple":c.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":c.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){c.removeAttribute("xlink:href");break}f=Zm(""+g),c.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?c.setAttribute(f,""+g):c.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?c.setAttribute(f,""):c.removeAttribute(f);break;case"capture":case"download":g===!0?c.setAttribute(f,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?c.setAttribute(f,g):c.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?c.setAttribute(f,g):c.removeAttribute(f);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?c.removeAttribute(f):c.setAttribute(f,g);break;case"popover":qt("beforetoggle",c),qt("toggle",c),Km(c,"popover",g);break;case"xlinkActuate":ti(c,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":ti(c,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":ti(c,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":ti(c,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":ti(c,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":ti(c,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":ti(c,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":ti(c,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":ti(c,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":Km(c,"is",g);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=aH.get(f)||f,Km(c,f,g))}}function q0(c,o,f,g,N,C){switch(f){case"style":U4(c,g,C);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(s(61));if(f=g.__html,f!=null){if(N.children!=null)throw Error(s(60));c.innerHTML=f}}break;case"children":typeof g=="string"?jo(c,g):(typeof g=="number"||typeof g=="bigint")&&jo(c,""+g);break;case"onScroll":g!=null&&qt("scroll",c);break;case"onScrollEnd":g!=null&&qt("scrollend",c);break;case"onClick":g!=null&&(c.onclick=ai);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;
vendor: 10,892 bytes, line 49
49default:if(!_s.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(N=f.endsWith("Capture"),o=f.slice(2,N?f.length-7:void 0),C=c[Mn]||null,C=C!=null?C[f]:null,typeof C=="function"&&c.removeEventListener(o,C,N),typeof g=="function")){typeof C!="function"&&C!==null&&(f in c?c[f]=null:c.hasAttribute(f)&&c.removeAttribute(f)),c.addEventListener(o,g,N);break e}f in c?c[f]=g:g===!0?c.setAttribute(f,""):Km(c,f,g)}}}function Dn(c,o,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qt("error",c),qt("load",c);var g=!1,N=!1,C;for(C in f)if(f.hasOwnProperty(C)){var P=f[C];if(P!=null)switch(C){case"src":g=!0;break;case"srcSet":N=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:va(c,o,C,P,f,null)}}N&&va(c,o,"srcSet",f.srcSet,f,null),g&&va(c,o,"src",f.src,f,null);return;case"input":qt("invalid",c);var V=C=P=N=null,ae=null,fe=null;for(g in f)if(f.hasOwnProperty(g)){var Ce=f[g];if(Ce!=null)switch(g){case"name":N=Ce;break;case"type":P=Ce;break;case"checked":ae=Ce;break;case"defaultChecked":fe=Ce;break;case"value":C=Ce;break;case"defaultValue":V=Ce;break;case"children":case"dangerouslySetInnerHTML":if(Ce!=null)throw Error(s(137,o));break;default:va(c,o,g,Ce,f,null)}}I4(c,C,V,ae,fe,P,N,!1);return;case"select":qt("invalid",c),g=P=C=null;for(N in f)if(f.hasOwnProperty(N)&&(V=f[N],V!=null))switch(N){case"value":C=V;break;case"defaultValue":P=V;break;case"multiple":g=V;default:va(c,o,N,V,f,null)}o=C,f=P,c.multiple=!!g,o!=null?bo(c,!!g,o,!1):f!=null&&bo(c,!!g,f,!0);return;case"textarea":qt("invalid",c),C=N=g=null;for(P in f)if(f.hasOwnProperty(P)&&(V=f[P],V!=null))switch(P){case"value":g=V;break;case"defaultValue":N=V;break;case"children":C=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(s(91));break;default:va(c,o,P,V,f,null)}$4(c,g,N,C);return;case"option":for(ae in f)if(f.hasOwnProperty(ae)&&(g=f[ae],g!=null))switch(ae){case"selected":c.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:va(c,o,ae,g,f,null)}return;case"dialog":qt("beforetoggle",c),qt("toggle",c),qt("cancel",c),qt("close",c);break;case"iframe":case"object":qt("load",c);break;case"video":case"audio":for(g=0;g<ip.length;g++)qt(ip[g],c);break;case"image":qt("error",c),qt("load",c);break;case"details":qt("toggle",c);break;case"embed":case"source":case"link":qt("error",c),qt("load",c);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(fe in f)if(f.hasOwnProperty(fe)&&(g=f[fe],g!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,o));default:va(c,o,fe,g,f,null)}return;default:if(ab(o)){for(Ce in f)f.hasOwnProperty(Ce)&&(g=f[Ce],g!==void 0&&q0(c,o,Ce,g,f,void 0));return}}for(V in f)f.hasOwnProperty(V)&&(g=f[V],g!=null&&va(c,o,V,g,f,null))}function OV(c,o,f,g){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var N=null,C=null,P=null,V=null,ae=null,fe=null,Ce=null;for(je in f){var Oe=f[je];if(f.hasOwnProperty(je)&&Oe!=null)switch(je){case"checked":break;case"value":break;case"defaultValue":ae=Oe;default:g.hasOwnProperty(je)||va(c,o,je,null,g,Oe)}}for(var ge in g){var je=g[ge];if(Oe=f[ge],g.hasOwnProperty(ge)&&(je!=null||Oe!=null))switch(ge){case"type":C=je;break;case"name":N=je;break;case"checked":fe=je;break;case"defaultChecked":Ce=je;break;case"value":P=je;break;case"defaultValue":V=je;break;case"children":case"dangerouslySetInnerHTML":if(je!=null)throw Error(s(137,o));break;default:je!==Oe&&va(c,o,ge,je,g,Oe)}}eb(c,P,V,ae,fe,Ce,C,N);return;case"select":je=P=V=ge=null;for(C in f)if(ae=f[C],f.hasOwnProperty(C)&&ae!=null)switch(C){case"value":break;case"multiple":je=ae;default:g.hasOwnProperty(C)||va(c,o,C,null,g,ae)}for(N in g)if(C=g[N],ae=f[N],g.hasOwnProperty(N)&&(C!=null||ae!=null))switch(N){case"value":ge=C;break;case"defaultValue":V=C;break;case"multiple":P=C;default:C!==ae&&va(c,o,N,C,g,ae)}o=V,f=P,g=je,ge!=null?bo(c,!!f,ge,!1):!!g!=!!f&&(o!=null?bo(c,!!f,o,!0):bo(c,!!f,f?[]:"",!1));return;case"textarea":je=ge=null;for(V in f)if(N=f[V],f.hasOwnProperty(V)&&N!=null&&!g.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:va(c,o,V,null,g,N)}for(P in g)if(N=g[P],C=f[P],g.hasOwnProperty(P)&&(N!=null||C!=null))switch(P){case"value":ge=N;break;case"defaultValue":je=N;break;case"children":break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(s(91));break;default:N!==C&&va(c,o,P,N,g,C)}L4(c,ge,je);return;case"option":for(var rt in f)if(ge=f[rt],f.hasOwnProperty(rt)&&ge!=null&&!g.hasOwnProperty(rt))switch(rt){case"selected":c.selected=!1;break;default:va(c,o,rt,null,g,ge)}for(ae in g)if(ge=g[ae],je=f[ae],g.hasOwnProperty(ae)&&ge!==je&&(ge!=null||je!=null))switch(ae){case"selected":c.selected=ge&&typeof ge!="function"&&typeof ge!="symbol";break;default:va(c,o,ae,ge,g,je)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var wt in f)ge=f[wt],f.hasOwnProperty(wt)&&ge!=null&&!g.hasOwnProperty(wt)&&va(c,o,wt,null,g,ge);for(fe in g)if(ge=g[fe],je=f[fe],g.hasOwnProperty(fe)&&ge!==je&&(ge!=null||je!=null))switch(fe){case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(s(137,o));break;default:va(c,o,fe,ge,g,je)}return;default:if(ab(o)){for(var ya in f)ge=f[ya],f.hasOwnProperty(ya)&&ge!==void 0&&!g.hasOwnProperty(ya)&&q0(c,o,ya,void 0,g,ge);for(Ce in g)ge=g[Ce],je=f[Ce],!g.hasOwnProperty(Ce)||ge===je||ge===void 0&&je===void 0||q0(c,o,Ce,ge,g,je);return}}for(var oe in f)ge=f[oe],f.hasOwnProperty(oe)&&ge!=null&&!g.hasOwnProperty(oe)&&va(c,o,oe,null,g,ge);for(Oe in g)ge=g[Oe],je=f[Oe],!g.hasOwnProperty(Oe)||ge===je||ge==null&&je==null||va(c,o,Oe,ge,g,je)}function qD(c){switch(c){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function kV(){if(typeof performance.getEntriesByType=="function"){for(var c=0,o=0,f=performance.getEntriesByType("resource"),g=0;g<f.length;g++){var N=f[g],C=N.transferSize,P=N.initiatorType,V=N.duration;if(C&&V&&qD(P)){for(P=0,V=N.responseEnd,g+=1;g<f.length;g++){var ae=f[g],fe=ae.startTime;if(fe>V)break;var Ce=ae.transferSize,Oe=ae.initiatorType;Ce&&qD(Oe)&&(ae=ae.responseEnd,P+=Ce*(ae<V?1:(V-fe)/(ae-fe)))}if(--g,o+=8*(C+P)/(N.duration/1e3),c++,10<c)break}}if(0<c)return o/c/1e6}return navigator.connection&&(c=navigator.connection.downlink,typeof c=="number")?c:5}var F0=null,W0=null;function Gx(c){return c.nodeType===9?c:c.ownerDocument}function FD(c){switch(c){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function WD(c,o){if(c===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return c===1&&o==="foreignObject"?0:c}function H0(c,o){return c==="textarea"||c==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var V0=null;function _V(){var c=window.event;return c&&c.type==="popstate"?c===V0?!1:(V0=c,!0):(V0=null,!1)}var HD=typeof setTimeout=="function"?setTimeout:void 0,TV=typeof clearTimeout=="function"?clearTimeout:void 0,VD=typeof Promise=="function"?Promise:void 0,PV=typeof queueMicrotask=="function"?queueMicrotask:typeof VD<"u"?function(c){return VD.resolve(null).then(c).catch(MV)}:HD;function MV(c){setTimeout(function(){throw c})}function gc(c){return c==="head"}function GD(c,o){var f=o,g=0;do{var N=f.nextSibling;if(c.removeChild(f),N&&N.nodeType===8)if(f=N.data,f==="/$"||f==="/&"){if(g===0){c.removeChild(N),Zo(o);return}g--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")g++;else if(f==="html")lp(c.ownerDocument.documentElement);else if(f==="head"){f=c.ownerDocument.head,lp(f);for(var C=f.firstChild;C;){var P=C.nextSibling,V=C.nodeName;C[we]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&C.rel.toLowerCase()==="stylesheet"||f.removeChild(C),C=P}}else f==="body"&&lp(c.ownerDocument.body);f=N}while(f);Zo(o)}function YD(c,o){var f=c;c=0;do{var g=f.nextSibling;if(f.nodeType===1?o?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(o?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),g&&g.nodeType===8)if(f=g.data,f==="/$"){if(c===0)break;c--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||c++;f=g}while(f)}function G0(c){var o=c.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var f=o;switch(o=o.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":G0(f),Je(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}c.removeChild(f)}}function RV(c,o,f,g){for(;c.nodeType===1;){var N=f;if(c.nodeName.toLowerCase()!==o.toLowerCase()){if(!g&&(c.nodeName!=="INPUT"||c.type!=="hidden"))break}else if(g){if(!c[we])switch(o){case"meta":if(!c.hasAttribute("itemprop"))break;return c;case"link":if(C=c.getAttribute("rel"),C==="stylesheet"&&c.hasAttribute("data-precedence"))break;if(C!==N.rel||c.getAttribute("href")!==(N.href==null||N.href===""?null:N.href)||c.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin)||c.getAttribute("title")!==(N.title==null?null:N.title))break;return c;case"style":if(c.hasAttribute("data-precedence"))break;return c;case"script":if(C=c.getAttribute("src"),(C!==(N.src==null?null:N.src)||c.getAttribute("type")!==(N.type==null?null:N.type)||c.getAttribute("crossorigin")!==(N.crossOrigin==null?null:N.crossOrigin))&&C&&c.hasAttribute("async")&&!c.hasAttribute("itemprop"))break;return c;default:return c}}else if(o==="input"&&c.type==="hidden"){var C=N.name==null?null:""+N.name;if(N.type==="hidden"&&c.getAttribute("name")===C)return c}else return c;if(c=zs(c.nextSibling),c===null)break}return null}function BV(c,o,f){if(o==="")return null;for(;c.nodeType!==3;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!f||(c=zs(c.nextSibling),c===null))return null;return c}function KD(c,o){for(;c.nodeType!==8;)if((c.nodeType!==1||c.nodeName!=="INPUT"||c.type!=="hidden")&&!o||(c=zs(c.nextSibling),c===null))return null;return c}function Y0(c){return c.data==="$?"||c.data==="$~"}function K0(c){return c.data==="$!"||c.data==="$?"&&c.ownerDocument.readyState!=="loading"}function IV(c,o){var f=c.ownerDocument;if(c.data==="$~")c._reactRetry=o;else if(c.data!=="$?"||f.readyState!=="loading")o();else{var g=function(){o(),f.removeEventListener("DOMContentLoaded",g)};f.addEventListener("DOMContentLoaded",g),c._reactRetry=g}}function zs(c){for(;c!=null;c=c.nextSibling){var o=c.nodeType;if(o===1||o===3)break;if(o===8){if(o=c.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;
vendor: 9,113 bytes, line 49
49if(o==="/$"||o==="/&")return null}}return c}var Q0=null;function QD(c){c=c.nextSibling;for(var o=0;c;){if(c.nodeType===8){var f=c.data;if(f==="/$"||f==="/&"){if(o===0)return zs(c.nextSibling);o--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||o++}c=c.nextSibling}return null}function XD(c){c=c.previousSibling;for(var o=0;c;){if(c.nodeType===8){var f=c.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(o===0)return c;o--}else f!=="/$"&&f!=="/&"||o++}c=c.previousSibling}return null}function ZD(c,o,f){switch(o=Gx(f),c){case"html":if(c=o.documentElement,!c)throw Error(s(452));return c;case"head":if(c=o.head,!c)throw Error(s(453));return c;case"body":if(c=o.body,!c)throw Error(s(454));return c;default:throw Error(s(451))}}function lp(c){for(var o=c.attributes;o.length;)c.removeAttributeNode(o[0]);Je(c)}var Us=new Map,JD=new Set;function Yx(c){return typeof c.getRootNode=="function"?c.getRootNode():c.nodeType===9?c:c.ownerDocument}var vi=M.d;M.d={f:LV,r:$V,D:zV,C:UV,L:qV,m:FV,X:HV,S:WV,M:VV};function LV(){var c=vi.f(),o=$x();return c||o}function $V(c){var o=K(c);o!==null&&o.tag===5&&o.type==="form"?gA(o):vi.r(c)}var Ko=typeof document>"u"?null:document;function eO(c,o,f){var g=Ko;if(g&&typeof o=="string"&&o){var N=Ps(o);N='link[rel="'+c+'"][href="'+N+'"]',typeof f=="string"&&(N+='[crossorigin="'+f+'"]'),JD.has(N)||(JD.add(N),c={rel:c,crossOrigin:f,href:o},g.querySelector(N)===null&&(o=g.createElement("link"),Dn(o,"link",c),Fe(o),g.head.appendChild(o)))}}function zV(c){vi.D(c),eO("dns-prefetch",c,null)}function UV(c,o){vi.C(c,o),eO("preconnect",c,o)}function qV(c,o,f){vi.L(c,o,f);var g=Ko;if(g&&c&&o){var N='link[rel="preload"][as="'+Ps(o)+'"]';o==="image"&&f&&f.imageSrcSet?(N+='[imagesrcset="'+Ps(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(N+='[imagesizes="'+Ps(f.imageSizes)+'"]')):N+='[href="'+Ps(c)+'"]';var C=N;switch(o){case"style":C=Qo(c);break;case"script":C=Xo(c)}Us.has(C)||(c=m({rel:"preload",href:o==="image"&&f&&f.imageSrcSet?void 0:c,as:o},f),Us.set(C,c),g.querySelector(N)!==null||o==="style"&&g.querySelector(op(C))||o==="script"&&g.querySelector(dp(C))||(o=g.createElement("link"),Dn(o,"link",c),Fe(o),g.head.appendChild(o)))}}function FV(c,o){vi.m(c,o);var f=Ko;if(f&&c){var g=o&&typeof o.as=="string"?o.as:"script",N='link[rel="modulepreload"][as="'+Ps(g)+'"][href="'+Ps(c)+'"]',C=N;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":C=Xo(c)}if(!Us.has(C)&&(c=m({rel:"modulepreload",href:c},o),Us.set(C,c),f.querySelector(N)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(dp(C)))return}g=f.createElement("link"),Dn(g,"link",c),Fe(g),f.head.appendChild(g)}}}function WV(c,o,f){vi.S(c,o,f);var g=Ko;if(g&&c){var N=nt(g).hoistableStyles,C=Qo(c);o=o||"default";var P=N.get(C);if(!P){var V={loading:0,preload:null};if(P=g.querySelector(op(C)))V.loading=5;else{c=m({rel:"stylesheet",href:c,"data-precedence":o},f),(f=Us.get(C))&&X0(c,f);var ae=P=g.createElement("link");Fe(ae),Dn(ae,"link",c),ae._p=new Promise(function(fe,Ce){ae.onload=fe,ae.onerror=Ce}),ae.addEventListener("load",function(){V.loading|=1}),ae.addEventListener("error",function(){V.loading|=2}),V.loading|=4,Kx(P,o,g)}P={type:"stylesheet",instance:P,count:1,state:V},N.set(C,P)}}}function HV(c,o){vi.X(c,o);var f=Ko;if(f&&c){var g=nt(f).hoistableScripts,N=Xo(c),C=g.get(N);C||(C=f.querySelector(dp(N)),C||(c=m({src:c,async:!0},o),(o=Us.get(N))&&Z0(c,o),C=f.createElement("script"),Fe(C),Dn(C,"link",c),f.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(N,C))}}function VV(c,o){vi.M(c,o);var f=Ko;if(f&&c){var g=nt(f).hoistableScripts,N=Xo(c),C=g.get(N);C||(C=f.querySelector(dp(N)),C||(c=m({src:c,async:!0,type:"module"},o),(o=Us.get(N))&&Z0(c,o),C=f.createElement("script"),Fe(C),Dn(C,"link",c),f.head.appendChild(C)),C={type:"script",instance:C,count:1,state:null},g.set(N,C))}}function tO(c,o,f,g){var N=(N=ce.current)?Yx(N):null;if(!N)throw Error(s(446));switch(c){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(o=Qo(f.href),f=nt(N).hoistableStyles,g=f.get(o),g||(g={type:"style",instance:null,count:0,state:null},f.set(o,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){c=Qo(f.href);var C=nt(N).hoistableStyles,P=C.get(c);if(P||(N=N.ownerDocument||N,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},C.set(c,P),(C=N.querySelector(op(c)))&&!C._p&&(P.instance=C,P.state.loading=5),Us.has(c)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Us.set(c,f),C||GV(N,c,f,P.state))),o&&g===null)throw Error(s(528,""));return P}if(o&&g!==null)throw Error(s(529,""));return null;case"script":return o=f.async,f=f.src,typeof f=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Xo(f),f=nt(N).hoistableScripts,g=f.get(o),g||(g={type:"script",instance:null,count:0,state:null},f.set(o,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,c))}}function Qo(c){return'href="'+Ps(c)+'"'}function op(c){return'link[rel="stylesheet"]['+c+"]"}function aO(c){return m({},c,{"data-precedence":c.precedence,precedence:null})}function GV(c,o,f,g){c.querySelector('link[rel="preload"][as="style"]['+o+"]")?g.loading=1:(o=c.createElement("link"),g.preload=o,o.addEventListener("load",function(){return g.loading|=1}),o.addEventListener("error",function(){return g.loading|=2}),Dn(o,"link",f),Fe(o),c.head.appendChild(o))}function Xo(c){return'[src="'+Ps(c)+'"]'}function dp(c){return"script[async]"+c}function nO(c,o,f){if(o.count++,o.instance===null)switch(o.type){case"style":var g=c.querySelector('style[data-href~="'+Ps(f.href)+'"]');if(g)return o.instance=g,Fe(g),g;var N=m({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return g=(c.ownerDocument||c).createElement("style"),Fe(g),Dn(g,"style",N),Kx(g,f.precedence,c),o.instance=g;case"stylesheet":N=Qo(f.href);var C=c.querySelector(op(N));if(C)return o.state.loading|=4,o.instance=C,Fe(C),C;g=aO(f),(N=Us.get(N))&&X0(g,N),C=(c.ownerDocument||c).createElement("link"),Fe(C);var P=C;return P._p=new Promise(function(V,ae){P.onload=V,P.onerror=ae}),Dn(C,"link",g),o.state.loading|=4,Kx(C,f.precedence,c),o.instance=C;case"script":return C=Xo(f.src),(N=c.querySelector(dp(C)))?(o.instance=N,Fe(N),N):(g=f,(N=Us.get(C))&&(g=m({},f),Z0(g,N)),c=c.ownerDocument||c,N=c.createElement("script"),Fe(N),Dn(N,"link",g),c.head.appendChild(N),o.instance=N);case"void":return null;default:throw Error(s(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(g=o.instance,o.state.loading|=4,Kx(g,f.precedence,c));return o.instance}function Kx(c,o,f){for(var g=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),N=g.length?g[g.length-1]:null,C=N,P=0;P<g.length;P++){var V=g[P];if(V.dataset.precedence===o)C=V;else if(C!==N)break}C?C.parentNode.insertBefore(c,C.nextSibling):(o=f.nodeType===9?f.head:f,o.insertBefore(c,o.firstChild))}function X0(c,o){c.crossOrigin==null&&(c.crossOrigin=o.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=o.referrerPolicy),c.title==null&&(c.title=o.title)}function Z0(c,o){c.crossOrigin==null&&(c.crossOrigin=o.crossOrigin),c.referrerPolicy==null&&(c.referrerPolicy=o.referrerPolicy),c.integrity==null&&(c.integrity=o.integrity)}var Qx=null;function sO(c,o,f){if(Qx===null){var g=new Map,N=Qx=new Map;N.set(f,g)}else N=Qx,g=N.get(f),g||(g=new Map,N.set(f,g));if(g.has(c))return g;for(g.set(c,null),f=f.getElementsByTagName(c),N=0;N<f.length;N++){var C=f[N];if(!(C[we]||C[dn]||c==="link"&&C.getAttribute("rel")==="stylesheet")&&C.namespaceURI!=="http://www.w3.org/2000/svg"){var P=C.getAttribute(o)||"";P=c+P;var V=g.get(P);V?V.push(C):g.set(P,[C])}}return g}function rO(c,o,f){c=c.ownerDocument||c,c.head.insertBefore(f,o==="title"?c.querySelector("head > title"):null)}function YV(c,o,f){if(f===1||o.itemProp!=null)return!1;switch(c){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return c=o.disabled,typeof o.precedence=="string"&&c==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function iO(c){return!(c.type==="stylesheet"&&(c.state.loading&3)===0)}function KV(c,o,f,g){if(f.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var N=Qo(g.href),C=o.querySelector(op(N));if(C){o=C._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(c.count++,c=Xx.bind(c),o.then(c,c)),f.state.loading|=4,f.instance=C,Fe(C);return}
vendor: 4,847 bytes, line 49
49C=o.ownerDocument||o,g=aO(g),(N=Us.get(N))&&X0(g,N),C=C.createElement("link"),Fe(C);var P=C;P._p=new Promise(function(V,ae){P.onload=V,P.onerror=ae}),Dn(C,"link",g),f.instance=C}c.stylesheets===null&&(c.stylesheets=new Map),c.stylesheets.set(f,o),(o=f.state.preload)&&(f.state.loading&3)===0&&(c.count++,f=Xx.bind(c),o.addEventListener("load",f),o.addEventListener("error",f))}}var J0=0;function QV(c,o){return c.stylesheets&&c.count===0&&Jx(c,c.stylesheets),0<c.count||0<c.imgCount?function(f){var g=setTimeout(function(){if(c.stylesheets&&Jx(c,c.stylesheets),c.unsuspend){var C=c.unsuspend;c.unsuspend=null,C()}},6e4+o);0<c.imgBytes&&J0===0&&(J0=62500*kV());var N=setTimeout(function(){if(c.waitingForImages=!1,c.count===0&&(c.stylesheets&&Jx(c,c.stylesheets),c.unsuspend)){var C=c.unsuspend;c.unsuspend=null,C()}},(c.imgBytes>J0?50:800)+o);return c.unsuspend=f,function(){c.unsuspend=null,clearTimeout(g),clearTimeout(N)}}:null}function Xx(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jx(this,this.stylesheets);else if(this.unsuspend){var c=this.unsuspend;this.unsuspend=null,c()}}}var Zx=null;function Jx(c,o){c.stylesheets=null,c.unsuspend!==null&&(c.count++,Zx=new Map,o.forEach(XV,c),Zx=null,Xx.call(c))}function XV(c,o){if(!(o.state.loading&4)){var f=Zx.get(c);if(f)var g=f.get(null);else{f=new Map,Zx.set(c,f);for(var N=c.querySelectorAll("link[data-precedence],style[data-precedence]"),C=0;C<N.length;C++){var P=N[C];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(f.set(P.dataset.precedence,P),g=P)}g&&f.set(null,g)}N=o.instance,P=N.getAttribute("data-precedence"),C=f.get(P)||g,C===g&&f.set(null,N),f.set(P,N),this.count++,g=Xx.bind(this),N.addEventListener("load",g),N.addEventListener("error",g),C?C.parentNode.insertBefore(N,C.nextSibling):(c=c.nodeType===9?c.head:c,c.insertBefore(N,c.firstChild)),o.state.loading|=4}}var up={$$typeof:A,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function ZV(c,o,f,g,N,C,P,V,ae){this.tag=1,this.containerInfo=c,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ua(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ua(0),this.hiddenUpdates=ua(null),this.identifierPrefix=g,this.onUncaughtError=N,this.onCaughtError=C,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ae,this.incompleteTransitions=new Map}function cO(c,o,f,g,N,C,P,V,ae,fe,Ce,Oe){return c=new ZV(c,o,f,P,ae,fe,Ce,Oe,V),o=1,C===!0&&(o|=24),C=os(3,null,null,o),c.current=C,C.stateNode=c,o=Tb(),o.refCount++,c.pooledCache=o,o.refCount++,C.memoizedState={element:g,isDehydrated:f,cache:o},Bb(C),c}function lO(c){return c?(c=Do,c):Do}function oO(c,o,f,g,N,C){N=lO(N),g.context===null?g.context=N:g.pendingContext=N,g=rc(o),g.payload={element:f},C=C===void 0?null:C,C!==null&&(g.callback=C),f=ic(c,g,o),f!==null&&(as(f,c,o),Fu(f,c,o))}function dO(c,o){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var f=c.retryLane;c.retryLane=f!==0&&f<o?f:o}}function e1(c,o){dO(c,o),(c=c.alternate)&&dO(c,o)}function uO(c){if(c.tag===13||c.tag===31){var o=pl(c,67108864);o!==null&&as(o,c,67108864),e1(c,67108864)}}function pO(c){if(c.tag===13||c.tag===31){var o=ms();o=Yn(o);var f=pl(c,o);f!==null&&as(f,c,o),e1(c,o)}}var eg=!0;function JV(c,o,f,g){var N=L.T;L.T=null;var C=M.p;try{M.p=2,t1(c,o,f,g)}finally{M.p=C,L.T=N}}function eG(c,o,f,g){var N=L.T;L.T=null;var C=M.p;try{M.p=8,t1(c,o,f,g)}finally{M.p=C,L.T=N}}function t1(c,o,f,g){if(eg){var N=a1(g);if(N===null)U0(c,o,g,tg,f),mO(c,g);else if(aG(N,c,o,f,g))g.stopPropagation();else if(mO(c,g),o&4&&-1<tG.indexOf(c)){for(;N!==null;){var C=K(N);if(C!==null)switch(C.tag){case 3:if(C=C.stateNode,C.current.memoizedState.isDehydrated){var P=at(C.pendingLanes);if(P!==0){var V=C;for(V.pendingLanes|=2,V.entangledLanes|=2;P;){var ae=1<<31-Ve(P);V.entanglements[1]|=ae,P&=~ae}Or(C),(na&6)===0&&(Ix=_t()+500,rp(0))}}break;case 31:case 13:V=pl(C,2),V!==null&&as(V,C,2),$x(),e1(C,2)}if(C=a1(g),C===null&&U0(c,o,g,tg,f),C===N)break;N=C}N!==null&&g.stopPropagation()}else U0(c,o,g,null,f)}}function a1(c){return c=sb(c),n1(c)}var tg=null;function n1(c){if(tg=null,c=lt(c),c!==null){var o=i(c);if(o===null)c=null;else{var f=o.tag;if(f===13){if(c=l(o),c!==null)return c;c=null}else if(f===31){if(c=d(o),c!==null)return c;c=null}else if(f===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;c=null}else o!==c&&(c=null)}}return tg=c,null}function fO(c){switch(c){case"beforetoggle":case"cancel":case"click":case"close"
vendor: 4,730 bytes, line 49
49: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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(da()){case vt:return 2;case Xt:return 8;case Ct:case Zt:return 32;case xa:return 268435456;default:return 32}default:return 32}}var s1=!1,hc=null,vc=null,yc=null,pp=new Map,fp=new Map,bc=[],tG="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".split(" ");function mO(c,o){switch(c){case"focusin":case"focusout":hc=null;break;case"dragenter":case"dragleave":vc=null;break;case"mouseover":case"mouseout":yc=null;break;case"pointerover":case"pointerout":pp.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":fp.delete(o.pointerId)}}function mp(c,o,f,g,N,C){return c===null||c.nativeEvent!==C?(c={blockedOn:o,domEventName:f,eventSystemFlags:g,nativeEvent:C,targetContainers:[N]},o!==null&&(o=K(o),o!==null&&uO(o)),c):(c.eventSystemFlags|=g,o=c.targetContainers,N!==null&&o.indexOf(N)===-1&&o.push(N),c)}function aG(c,o,f,g,N){switch(o){case"focusin":return hc=mp(hc,c,o,f,g,N),!0;case"dragenter":return vc=mp(vc,c,o,f,g,N),!0;case"mouseover":return yc=mp(yc,c,o,f,g,N),!0;case"pointerover":var C=N.pointerId;return pp.set(C,mp(pp.get(C)||null,c,o,f,g,N)),!0;case"gotpointercapture":return C=N.pointerId,fp.set(C,mp(fp.get(C)||null,c,o,f,g,N)),!0}return!1}function xO(c){var o=lt(c.target);if(o!==null){var f=i(o);if(f!==null){if(o=f.tag,o===13){if(o=l(f),o!==null){c.blockedOn=o,Sr(c.priority,function(){pO(f)});return}}else if(o===31){if(o=d(f),o!==null){c.blockedOn=o,Sr(c.priority,function(){pO(f)});return}}else if(o===3&&f.stateNode.current.memoizedState.isDehydrated){c.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}c.blockedOn=null}function ag(c){if(c.blockedOn!==null)return!1;for(var o=c.targetContainers;0<o.length;){var f=a1(c.nativeEvent);if(f===null){f=c.nativeEvent;var g=new f.constructor(f.type,f);nb=g,f.target.dispatchEvent(g),nb=null}else return o=K(f),o!==null&&uO(o),c.blockedOn=f,!1;o.shift()}return!0}function gO(c,o,f){ag(c)&&f.delete(o)}function nG(){s1=!1,hc!==null&&ag(hc)&&(hc=null),vc!==null&&ag(vc)&&(vc=null),yc!==null&&ag(yc)&&(yc=null),pp.forEach(gO),fp.forEach(gO)}function ng(c,o){c.blockedOn===o&&(c.blockedOn=null,s1||(s1=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,nG)))}var sg=null;function hO(c){sg!==c&&(sg=c,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){sg===c&&(sg=null);for(var o=0;o<c.length;o+=3){var f=c[o],g=c[o+1],N=c[o+2];if(typeof g!="function"){if(n1(g||f)===null)continue;break}var C=K(f);C!==null&&(c.splice(o,3),o-=3,a0(C,{pending:!0,data:N,method:f.method,action:g},g,N))}}))}function Zo(c){function o(ae){return ng(ae,c)}hc!==null&&ng(hc,c),vc!==null&&ng(vc,c),yc!==null&&ng(yc,c),pp.forEach(o),fp.forEach(o);for(var f=0;f<bc.length;f++){var g=bc[f];g.blockedOn===c&&(g.blockedOn=null)}for(;0<bc.length&&(f=bc[0],f.blockedOn===null);)xO(f),f.blockedOn===null&&bc.shift();if(f=(c.ownerDocument||c).$$reactFormReplay,f!=null)for(g=0;g<f.length;g+=3){var N=f[g],C=f[g+1],P=N[Mn]||null;if(typeof C=="function")P||hO(f);else if(P){var V=null;if(C&&C.hasAttribute("formAction")){if(N=C,P=C[Mn]||null)V=P.formAction;else if(n1(N)!==null)continue}else V=P.action;typeof V=="function"?f[g+1]=V:(f.splice(g,3),g-=3),hO(f)}}}function vO(){function c(C){C.canIntercept&&C.info==="react-transition"&&C.intercept({handler:function(){return new Promise(function(P){return N=P})},focusReset:"manual",scroll:"manual"})}function o(){N!==null&&(N(),N=null),g||setTimeout(f,20)}function f(){if(!g&&!navigation.transition){var C=navigation.currentEntry;
vendor: 4,152 bytes, line 49
49C&&C.url!=null&&navigation.navigate(C.url,{state:C.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,N=null;return navigation.addEventListener("navigate",c),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(f,100),function(){g=!0,navigation.removeEventListener("navigate",c),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),N!==null&&(N(),N=null)}}}function r1(c){this._internalRoot=c}rg.prototype.render=r1.prototype.render=function(c){var o=this._internalRoot;if(o===null)throw Error(s(409));var f=o.current,g=ms();oO(f,g,c,o,null,null)},rg.prototype.unmount=r1.prototype.unmount=function(){var c=this._internalRoot;if(c!==null){this._internalRoot=null;var o=c.containerInfo;oO(c.current,2,null,c,null,null),$x(),o[Cr]=null}};function rg(c){this._internalRoot=c}rg.prototype.unstable_scheduleHydration=function(c){if(c){var o=Kn();c={blockedOn:null,target:c,priority:o};for(var f=0;f<bc.length&&o!==0&&o<bc[f].priority;f++);bc.splice(f,0,c),f===0&&xO(c)}};var yO=t.version;if(yO!=="19.2.1")throw Error(s(527,yO,"19.2.1"));M.findDOMNode=function(c){var o=c._reactInternals;if(o===void 0)throw typeof c.render=="function"?Error(s(188)):(c=Object.keys(c).join(","),Error(s(268,c)));return c=p(o),c=c!==null?x(c):null,c=c===null?null:c.stateNode,c};var sG={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ig=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ig.isDisabled&&ig.supportsFiber)try{Va=ig.inject(sG),X=ig}catch{}}return hp.createRoot=function(c,o){if(!r(c))throw Error(s(299));var f=!1,g="",N=EA,C=AA,P=DA;return o!=null&&(o.unstable_strictMode===!0&&(f=!0),o.identifierPrefix!==void 0&&(g=o.identifierPrefix),o.onUncaughtError!==void 0&&(N=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(P=o.onRecoverableError)),o=cO(c,1,!1,null,null,f,g,null,N,C,P,vO),c[Cr]=o.current,z0(c),new r1(o)},hp.hydrateRoot=function(c,o,f){if(!r(c))throw Error(s(299));var g=!1,N="",C=EA,P=AA,V=DA,ae=null;return f!=null&&(f.unstable_strictMode===!0&&(g=!0),f.identifierPrefix!==void 0&&(N=f.identifierPrefix),f.onUncaughtError!==void 0&&(C=f.onUncaughtError),f.onCaughtError!==void 0&&(P=f.onCaughtError),f.onRecoverableError!==void 0&&(V=f.onRecoverableError),f.formState!==void 0&&(ae=f.formState)),o=cO(c,1,!0,o,f??null,g,N,ae,C,P,V,vO),o.context=lO(null),f=o.current,g=ms(),g=Yn(g),N=rc(g),N.callback=null,ic(f,N,g),f=g,o.current.lanes=f,Ht(o,f),Or(o),c[Cr]=o.current,z0(c),new rg(o)},hp.version="19.2.1",hp}var HO;function yK(){if(HO)return p1.exports;HO=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(),p1.exports=vK(),p1.exports}var bK=yK(),jK=(function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(t,a){this.keyToValue.set(t,a),this.valueToKey.set(a,t)},e.prototype.getByKey=function(t){return this.keyToValue.get(t)},e.prototype.getByValue=function(t){return this.valueToKey.get(t)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e})(),DB=(function(){function e(t){this.generateIdentifier=t,this.kv=new jK}return e.prototype.register=function(t,a){this.kv.getByValue(t)||(a||(a=this.generateIdentifier(t)),this.kv.set(a,t))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(t){return this.kv.getByValue(t)},e.prototype.getValue=function(t){return this.kv.getByKey(t)},e})(),wK=(function(){var e=function(t,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,r){s.__proto__=r}||function(s,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(s[i]=r[i])},e(t,a)};return function(t,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(t,a);function s(){this.constructor=t}
49t.prototype=a===null?Object.create(a):(s.prototype=a.prototype,new s)}})(),NK=(function(e){wK(t,e);function t(){var a=e.call(this,function(s){return s.name})||this;return a.classToAllowedProps=new Map,a}return t.prototype.register=function(a,s){typeof s=="object"?(s.allowProps&&this.classToAllowedProps.set(a,s.allowProps),e.prototype.register.call(this,a,s.identifier)):e.prototype.register.call(this,a,s)},t.prototype.getAllowedProps=function(a){return this.classToAllowedProps.get(a)},t})(DB),SK=function(e,t){var a=typeof Symbol=="function"&&e[Symbol.iterator];if(!a)return e;var s=a.call(e),r,i=[],l;try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(d){l={error:d}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}return i};function CK(e){if("values"in Object)return Object.values(e);var t=[];for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);return t}function EK(e,t){var a=CK(e);if("find"in a)return a.find(t);for(var s=a,r=0;r<s.length;r++){var i=s[r];if(t(i))return i}}function _d(e,t){Object.entries(e).forEach(function(a){var s=SK(a,2),r=s[0],i=s[1];return t(i,r)})}function Vg(e,t){return e.indexOf(t)!==-1}function VO(e,t){for(var a=0;a<e.length;a++){var s=e[a];if(t(s))return s}}var AK=(function(){function e(){this.transfomers={}}return e.prototype.register=function(t){this.transfomers[t.name]=t},e.prototype.findApplicable=function(t){return EK(this.transfomers,function(a){return a.isApplicable(t)})},e.prototype.findByName=function(t){return this.transfomers[t]},e})(),DK=function(e){return Object.prototype.toString.call(e).slice(8,-1)},OB=function(e){return typeof e>"u"},OK=function(e){return e===null},cf=function(e){return typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype},dS=function(e){return cf(e)&&Object.keys(e).length===0},Fc=function(e){return Array.isArray(e)},kK=function(e){return typeof e=="string"},_K=function(e){return typeof e=="number"&&!isNaN(e)},TK=function(e){return typeof e=="boolean"},PK=function(e){return e instanceof RegExp},lf=function(e){return e instanceof Map},of=function(e){return e instanceof Set},kB=function(e){return DK(e)==="Symbol"},MK=function(e){return e instanceof Date&&!isNaN(e.valueOf())},RK=function(e){return e instanceof Error},GO=function(e){return typeof e=="number"&&isNaN(e)},BK=function(e){return TK(e)||OK(e)||OB(e)||_K(e)||kK(e)||kB(e)},IK=function(e){return typeof e=="bigint"},LK=function(e){return e===1/0||e===-1/0},$K=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},zK=function(e){return e instanceof URL},_B=function(e){return e.replace(/\./g,"\\.")},g1=function(e){return e.map(String).map(_B).join(".")},Hp=function(e){for(var t=[],a="",s=0;s<e.length;s++){var r=e.charAt(s),i=r==="\\"&&e.charAt(s+1)===".";if(i){a+=".",s++;continue}var l=r===".";if(l){t.push(a),a="";continue}a+=r}var d=a;return t.push(d),t},uS=function(){return uS=Object.assign||function(e){for(var t,a=1,s=arguments.length;a<s;a++){t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},uS.apply(this,arguments)},pS=function(e,t){var a=typeof Symbol=="function"&&e[Symbol.iterator];if(!a)return e;var s=a.call(e),r,i=[],l;try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(d){l={error:d}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}return i},fS=function(e,t){for(var a=0,s=t.length,r=e.length;a<s;a++,r++)e[r]=t[a];return e};function kr(e,t,a,s){return{isApplicable:e,annotation:t,transform:a,untransform:s}}var TB=[kr(OB,"undefined",function(){return null},function(){}),kr(IK,"bigint",function(e){return e.toString()},function(e){return typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)}),kr(MK,"Date",function(e){return e.toISOString()},function(e){return new Date(e)}),kr(RK,"Error",function(e,t){var a={name:e.name,message:e.message};return t.allowedErrorProps.forEach(function(s){a[s]=e[s]}),a},function(e,t){var a=new Error(e.message);return a.name=e.name,a.stack=e.stack,t.allowedErrorProps.forEach(function(s){a[s]=e[s]}),a}),kr(PK,"regexp",function(e){return""+e},function(e){var t=e.slice(1,e.lastIndexOf("/")),a=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,a)}
49),kr(of,"set",function(e){return fS([],pS(e.values()))},function(e){return new Set(e)}),kr(lf,"map",function(e){return fS([],pS(e.entries()))},function(e){return new Map(e)}),kr(function(e){return GO(e)||LK(e)},"number",function(e){return GO(e)?"NaN":e>0?"Infinity":"-Infinity"},Number),kr(function(e){return e===0&&1/e===-1/0},"number",function(){return"-0"},Number),kr(zK,"URL",function(e){return e.toString()},function(e){return new URL(e)})];function Ov(e,t,a,s){return{isApplicable:e,annotation:t,transform:a,untransform:s}}var PB=Ov(function(e,t){if(kB(e)){var a=!!t.symbolRegistry.getIdentifier(e);return a}return!1},function(e,t){var a=t.symbolRegistry.getIdentifier(e);return["symbol",a]},function(e){return e.description},function(e,t,a){var s=a.symbolRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown symbol");return s}),UK=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),MB=Ov($K,function(e){return["typed-array",e.constructor.name]},function(e){return fS([],pS(e))},function(e,t){var a=UK[t[1]];if(!a)throw new Error("Trying to deserialize unknown typed array");return new a(e)});function RB(e,t){if(e?.constructor){var a=!!t.classRegistry.getIdentifier(e.constructor);return a}return!1}var BB=Ov(RB,function(e,t){var a=t.classRegistry.getIdentifier(e.constructor);return["class",a]},function(e,t){var a=t.classRegistry.getAllowedProps(e.constructor);if(!a)return uS({},e);var s={};return a.forEach(function(r){s[r]=e[r]}),s},function(e,t,a){var s=a.classRegistry.getValue(t[1]);if(!s)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(s.prototype),e)}),IB=Ov(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){var a=t.customTransformerRegistry.findApplicable(e);return["custom",a.name]},function(e,t){var a=t.customTransformerRegistry.findApplicable(e);return a.serialize(e)},function(e,t,a){var s=a.customTransformerRegistry.findByName(t[1]);if(!s)throw new Error("Trying to deserialize unknown custom value");return s.deserialize(e)}),qK=[BB,PB,IB,MB],YO=function(e,t){var a=VO(qK,function(r){return r.isApplicable(e,t)});if(a)return{value:a.transform(e,t),type:a.annotation(e,t)};var s=VO(TB,function(r){return r.isApplicable(e,t)});if(s)return{value:s.transform(e,t),type:s.annotation}},LB={};TB.forEach(function(e){LB[e.annotation]=e});var FK=function(e,t,a){if(Fc(t))switch(t[0]){case"symbol":return PB.untransform(e,t,a);case"class":return BB.untransform(e,t,a);case"custom":return IB.untransform(e,t,a);case"typed-array":return MB.untransform(e,t,a);default:throw new Error("Unknown transformation: "+t)}else{var s=LB[t];if(!s)throw new Error("Unknown transformation: "+t);return s.untransform(e,a)}},pd=function(e,t){for(var a=e.keys();t>0;)a.next(),t--;return a.next().value};function $B(e){if(Vg(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Vg(e,"prototype"))throw new Error("prototype is not allowed as a property");if(Vg(e,"constructor"))throw new Error("constructor is not allowed as a property")}var WK=function(e,t){$B(t);for(var a=0;a<t.length;a++){var s=t[a];if(of(e))e=pd(e,+s);else if(lf(e)){var r=+s,i=+t[++a]==0?"key":"value",l=pd(e,r);switch(i){case"key":e=l;break;case"value":e=e.get(l);break}}else e=e[s]}return e},mS=function(e,t,a){if($B(t),t.length===0)return a(e);for(var s=e,r=0;r<t.length-1;r++){var i=t[r];if(Fc(s)){var l=+i;s=s[l]}else if(cf(s))s=s[i];else if(of(s)){var d=+i;s=pd(s,d)}else if(lf(s)){var u=r===t.length-2;if(u)break;var d=+i,p=+t[++r]==0?"key":"value",x=pd(s,d);switch(p){case"key":s=x;break;case"value":s=s.get(x);break}}}var m=t[t.length-1];if(Fc(s)?s[+m]=a(s[+m]):cf(s)&&(s[m]=a(s[m])),of(s)){var h=pd(s,+m),y=a(h);h!==y&&(s.delete(h),s.add(y))}if(lf(s)){var d=+t[t.length-2],w=pd(s,d),p=+m==0?"key":"value";switch(p){case"key":{var b=a(w);s.set(b,s.get(w)),b!==w&&s.delete(w);break}case"value":{s.set(w,a(s.get(w)));break}}}return e},wi=function(e,t){var a=typeof Symbol=="function"&&e[Symbol.iterator];if(!a)return e;var s=a.call(e),r,i=[],l;try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(d){l={error:d}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}return i},_c=function(e,t){for(var a=0,s=t.length,r=e.length;a<s;a++,r++)e[r]=t[a];return e};function xS(e,t,a){if(a===void 0&&(a=[]),!!e){if(!Fc(e)){_d(e,function(l,d){return xS(l,t,_c(_c([],wi(a)),wi(Hp(d))))});return}var s=wi(e,2),r=s[0],i=s[1];i&&_d(i,function(l,d){xS(l,t,_c(_c([],wi(a)),wi(Hp(d))))}),t(r,a)}}function HK(e,t,a){return xS(t,function(s,r){e=mS(e,r,function(i){return FK(i,s,a)})}),e}function VK(e,t){function a(l,d){var u=WK(e,Hp(d));
49l.map(Hp).forEach(function(p){e=mS(e,p,function(){return u})})}if(Fc(t)){var s=wi(t,2),r=s[0],i=s[1];r.forEach(function(l){e=mS(e,Hp(l),function(){return e})}),i&&_d(i,a)}else _d(t,a);return e}var GK=function(e,t){return cf(e)||Fc(e)||lf(e)||of(e)||RB(e,t)};function YK(e,t,a){var s=a.get(e);s?s.push(t):a.set(e,[t])}function KK(e,t){var a={},s=void 0;return e.forEach(function(r){if(!(r.length<=1)){t||(r=r.map(function(u){return u.map(String)}).sort(function(u,p){return u.length-p.length}));var i=wi(r),l=i[0],d=i.slice(1);l.length===0?s=d.map(g1):a[g1(l)]=d.map(g1)}}),s?dS(a)?[s]:[s,a]:dS(a)?void 0:a}var zB=function(e,t,a,s,r,i,l){var d;r===void 0&&(r=[]),i===void 0&&(i=[]),l===void 0&&(l=new Map);var u=BK(e);if(!u){YK(e,r,t);var p=l.get(e);if(p)return s?{transformedValue:null}:p}if(!GK(e,a)){var x=YO(e,a),m=x?{transformedValue:x.value,annotations:[x.type]}:{transformedValue:e};return u||l.set(e,m),m}if(Vg(i,e))return{transformedValue:null};var h=YO(e,a),y=(d=h?.value)!==null&&d!==void 0?d:e,w=Fc(y)?[]:{},b={};_d(y,function(S,O){var A=zB(S,t,a,s,_c(_c([],wi(r)),[O]),_c(_c([],wi(i)),[e]),l);w[O]=A.transformedValue,Fc(A.annotations)?b[O]=A.annotations:cf(A.annotations)&&_d(A.annotations,function(k,E){b[_B(O)+"."+E]=k})});var j=dS(b)?{transformedValue:w,annotations:h?[h.type]:void 0}:{transformedValue:w,annotations:h?[h.type,b]:b};return u||l.set(e,j),j};function UB(e){return Object.prototype.toString.call(e).slice(8,-1)}function KO(e){return UB(e)==="Array"}function QK(e){if(UB(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function XK(e,t,a,s,r){const i={}.propertyIsEnumerable.call(s,t)?"enumerable":"nonenumerable";i==="enumerable"&&(e[t]=a),r&&i==="nonenumerable"&&Object.defineProperty(e,t,{value:a,enumerable:!1,writable:!0,configurable:!0})}function gS(e,t={}){if(KO(e))return e.map(r=>gS(r,t));if(!QK(e))return e;const a=Object.getOwnPropertyNames(e),s=Object.getOwnPropertySymbols(e);return[...a,...s].reduce((r,i)=>{if(KO(t.props)&&!t.props.includes(i))return r;const l=e[i],d=gS(l,t);return XK(r,i,d,e,t.nonenumerable),r},{})}var Ml=function(){return Ml=Object.assign||function(e){for(var t,a=1,s=arguments.length;a<s;a++){t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Ml.apply(this,arguments)},ZK=function(e,t){var a=typeof Symbol=="function"&&e[Symbol.iterator];if(!a)return e;var s=a.call(e),r,i=[],l;try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)i.push(r.value)}catch(d){l={error:d}}finally{try{r&&!r.done&&(a=s.return)&&a.call(s)}finally{if(l)throw l.error}}return i},JK=function(e,t){for(var a=0,s=t.length,r=e.length;a<s;a++,r++)e[r]=t[a];return e},Gi=(function(){function e(t){var a=t===void 0?{}:t,s=a.dedupe,r=s===void 0?!1:s;this.classRegistry=new NK,this.symbolRegistry=new DB(function(i){var l;return(l=i.description)!==null&&l!==void 0?l:""}),this.customTransformerRegistry=new AK,this.allowedErrorProps=[],this.dedupe=r}return e.prototype.serialize=function(t){var a=new Map,s=zB(t,a,this,this.dedupe),r={json:s.transformedValue};s.annotations&&(r.meta=Ml(Ml({},r.meta),{values:s.annotations}));var i=KK(a,this.dedupe);return i&&(r.meta=Ml(Ml({},r.meta),{referentialEqualities:i})),r},e.prototype.deserialize=function(t){var a=t.json,s=t.meta,r=gS(a);return s?.values&&(r=HK(r,s.values,this)),s?.referentialEqualities&&(r=VK(r,s.referentialEqualities)),r},e.prototype.stringify=function(t){return JSON.stringify(this.serialize(t))},e.prototype.parse=function(t){return this.deserialize(JSON.parse(t))},e.prototype.registerClass=function(t,a){this.classRegistry.register(t,a)},e.prototype.registerSymbol=function(t,a){this.symbolRegistry.register(t,a)},e.prototype.registerCustom=function(t,a){this.customTransformerRegistry.register(Ml({name:a},t))},e.prototype.allowErrorProps=function(){for(var t,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];(t=this.allowedErrorProps).push.apply(t,JK([],ZK(a)))},e.defaultInstance=new e,e.serialize=e.defaultInstance.serialize.bind(e.defaultInstance),e.deserialize=e.defaultInstance.deserialize.bind(e.defaultInstance),e.stringify=e.defaultInstance.stringify.bind(e.defaultInstance),e.parse=e.defaultInstance.parse.bind(e.defaultInstance),e.registerClass=e.defaultInstance.registerClass.bind(e.defaultInstance),e.registerSymbol=e.defaultInstance.registerSymbol.bind(e.defaultInstance),e.registerCustom=e.defaultInstance.registerCustom.bind(e.defaultInstance),e.allowErrorProps=e.defaultInstance.allowErrorProps.bind(e.defaultInstance),e})();Gi.serialize;Gi.deserialize;Gi.stringify;Gi.parse;Gi.registerClass;Gi.registerCustom;Gi.registerSymbol;Gi.allowErrorProps;var eQ=(e,t,a,s,r,i,l,d)=>{let u=document.documentElement,p=["light","dark"];
vendor: 7,443 bytes, line 49
49function x(y){(Array.isArray(e)?e:[e]).forEach(w=>{let b=w==="class",j=b&&i?r.map(S=>i[S]||S):r;b?(u.classList.remove(...j),u.classList.add(i&&i[y]?i[y]:y)):u.setAttribute(w,y)}),m(y)}function m(y){d&&p.includes(y)&&(u.style.colorScheme=y)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)x(s);else try{let y=localStorage.getItem(t)||a,w=l&&y==="system"?h():y;x(w)}catch{}},tQ=v.createContext(void 0),aQ={setTheme:e=>{},themes:[]},nQ=()=>{var e;return(e=v.useContext(tQ))!=null?e:aQ};v.memo(({forcedTheme:e,storageKey:t,attribute:a,enableSystem:s,enableColorScheme:r,defaultTheme:i,value:l,themes:d,nonce:u,scriptProps:p})=>{let x=JSON.stringify([a,t,i,e,d,l,s,r]).slice(1,-1);return v.createElement("script",{...p,suppressHydrationWarning:!0,nonce:typeof window>"u"?u:"",dangerouslySetInnerHTML:{__html:`(${eQ.toString()})(${x})`}})});var Br=AB();const qB=Na(Br);function sQ(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",t.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}const rQ=e=>{switch(e){case"success":return lQ;case"info":return dQ;case"warning":return oQ;case"error":return uQ;default:return null}},iQ=Array(12).fill(0),cQ=({visible:e,className:t})=>W.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},W.createElement("div",{className:"sonner-spinner"},iQ.map((a,s)=>W.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),lQ=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),oQ=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},W.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"})),dQ=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),uQ=W.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},W.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"})),pQ=W.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"},W.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),W.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fQ=()=>{const[e,t]=W.useState(document.hidden);return W.useEffect(()=>{const a=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",a),()=>window.removeEventListener("visibilitychange",a)},[]),e};let hS=1;class mQ{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const a=this.subscribers.indexOf(t);this.subscribers.splice(a,1)}),this.publish=t=>{this.subscribers.forEach(a=>a(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var a;const{message:s,...r}=t,i=typeof t?.id=="number"||((a=t.id)==null?void 0:a.length)>0?t.id:hS++,l=this.toasts.find(u=>u.id===i),d=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...t,id:i,title:s}),{...u,...t,id:i,dismissible:d,title:s}):u):this.addToast({title:s,...r,dismissible:d,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(a=>a({id:t,dismiss:!0})))):this.toasts.forEach(a=>{this.subscribers.forEach(s=>s({id:a.id,dismiss:!0}))}),t),this.message=(t,a)=>this.create({...a,message:t}),this.error=(t,a)=>this.create({...a,message:t,type:"error"}),this.success=(t,a)=>this.create({...a,type:"success",message:t}),this.info=(t,a)=>this.create({...a,type:"info",message:t}),this.warning=(t,a)=>this.create({...a,type:"warning",message:t}),this.loading=(t,a)=>this.create({...a,type:"loading",message:t}),this.promise=(t,a)=>{if(!a)return;let s;a.loading!==void 0&&(s=this.create({...a,promise:t,type:"loading",message:a.loading,description:typeof a.description!="function"?a.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let i=s!==void 0,l;const d=r.then(async p=>{if(l=["resolve",p],W.isValidElement(p))i=!1,this.create({id:s,type:"default",message:p});else if(gQ(p)&&!p.ok){i=!1;const m=typeof a.error=="function"?await a.error(`HTTP error! status: ${p.status}`):a.error,h=typeof a.description=="function"?await a.description(`HTTP error! status: ${p.status}`):a.description,w=typeof m=="object"&&!W.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:h,...w})}else if(p instanceof Error){i=!1;const m=typeof a.error=="function"?await a.error(p):a.error,h=typeof a.description=="function"?await a.description(p):a.description,w=typeof m=="object"&&!W.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:h,...w})}else if(a.success!==void 0){i=!1;const m=typeof a.success=="function"?await a.success(p):a.success,h=typeof a.description=="function"?await a.description(p):a.description,w=typeof m=="object"&&!W.isValidElement(m)?m:{message:m};this.create({id:s,type:"success",description:h,...w})}}).catch(async p=>{if(l=["reject",p],a.error!==void 0){i=!1;const x=typeof a.error=="function"?await a.error(p):a.error,m=typeof a.description=="function"?await a.description(p):a.description,y=typeof x=="object"&&!W.isValidElement(x)?x:{message:x};this.create({id:s,type:"error",description:m,...y})}}).finally(()=>{i&&(this.dismiss(s),s=void 0),a.finally==null||a.finally.call(a)}),u=()=>new Promise((p,x)=>d.then(()=>l[0]==="reject"?x(l[1]):p(l[1])).catch(x));return typeof s!="string"&&typeof s!="number"?{unwrap:u}:Object.assign(s,{unwrap:u})},this.custom=(t,a)=>{const s=a?.id||hS++;return this.create({jsx:t(s),id:s,...a}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const ns=new mQ,xQ=(e,t)=>{const a=t?.id||hS++;return ns.addToast({title:e,...t,id:a}),a},gQ=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",hQ=xQ,vQ=()=>ns.toasts,yQ=()=>ns.getActiveToasts(),ne=Object.assign(hQ,{success:ns.success,info:ns.info,warning:ns.warning,error:ns.error,custom:ns.custom,message:ns.message,promise:ns.promise,dismiss:ns.dismiss,loading:ns.loading},{getHistory:vQ,getToasts:yQ});sQ
vendor: 14,873 bytes, line 49
49("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function 
vendor: 1,806 bytes, line 49
49pg(e){return e.label!==void 0}const bQ=3,jQ="24px",wQ="16px",QO=4e3,NQ=356,SQ=14,CQ=45,EQ=200;function _r(...e){return e.filter(Boolean).join(" ")}function AQ(e){const[t,a]=e.split("-"),s=[];return t&&s.push(t),a&&s.push(a),s}const DQ=e=>{var t,a,s,r,i,l,d,u,p;const{invert:x,toast:m,unstyled:h,interacting:y,setHeights:w,visibleToasts:b,heights:j,index:S,toasts:O,expanded:A,removeToast:k,defaultRichColors:E,closeButton:D,style:_,cancelButtonStyle:T,actionButtonStyle:I,className:$="",descriptionClassName:R="",duration:B,position:Y,gap:z,expandByDefault:Q,classNames:L,icons:M,closeButtonAriaLabel:U="Close toast"}=e,[Z,ie]=W.useState(null),[G,F]=W.useState(null),[H,q]=W.useState(!1),[J,ce]=W.useState(!1),[se,ye]=W.useState(!1),[de,ve]=W.useState(!1),[Pe,ue]=W.useState(!1),[Qe,Ue]=W.useState(0),[xe,$e]=W.useState(0),Te=W.useRef(m.duration||B||QO),dt=W.useRef(null),tt=W.useRef(null),me=S===0,ut=S+1<=b,pt=m.type,ft=m.dismissible!==!1,_t=m.className||"",da=m.descriptionClassName||"",vt=W.useMemo(()=>j.findIndex(Ge=>Ge.toastId===m.id)||0,[j,m.id]),Xt=W.useMemo(()=>{var Ge;return(Ge=m.closeButton)!=null?Ge:D},[m.closeButton,D]),Ct=W.useMemo(()=>m.duration||B||QO,[m.duration,B]),Zt=W.useRef(0),xa=W.useRef(0),Sa=W.useRef(0),Da=W.useRef(null),[Va,X]=Y.split("-"),Re=W.useMemo(()=>j.reduce((Ge,Mt,zt)=>zt>=vt?Ge:Ge+Mt.height,0),[j,vt]),Ve=fQ(),bt=m.invert||x,Be=pt==="loading";xa.current=W.useMemo(()=>vt*z+Re,[vt,Re]),W.useEffect(()=>{Te.current=Ct},[Ct]),W.useEffect(()=>{q(!0)},[]),W.useEffect(()=>{const Ge=tt.current;if(Ge){const Mt=Ge.getBoundingClientRect().height;return $e(Mt),w(zt=>[{toastId:m.id,height:Mt,position:m.position},...zt]),()=>w(zt=>zt.filter(Ie=>Ie.toastId!==m.id))}},[w,m.id]),W.useLayoutEffect(()=>{if(!H)return;const Ge=tt.current,Mt=Ge.style.height;Ge.style.height="auto";
vendor: 14,772 bytes, line 49
49const zt=Ge.getBoundingClientRect().height;Ge.style.height=Mt,$e(zt),w(Ie=>Ie.find(Ht=>Ht.toastId===m.id)?Ie.map(Ht=>Ht.toastId===m.id?{...Ht,height:zt}:Ht):[{toastId:m.id,height:zt,position:m.position},...Ie])},[H,m.title,m.description,w,m.id,m.jsx,m.action,m.cancel]);const ee=W.useCallback(()=>{ce(!0),Ue(xa.current),w(Ge=>Ge.filter(Mt=>Mt.toastId!==m.id)),setTimeout(()=>{k(m)},EQ)},[m,k,w,xa]);W.useEffect(()=>{if(m.promise&&pt==="loading"||m.duration===1/0||m.type==="loading")return;let Ge;return A||y||Ve?(()=>{if(Sa.current<Zt.current){const Ie=new Date().getTime()-Zt.current;Te.current=Te.current-Ie}Sa.current=new Date().getTime()})():(()=>{Te.current!==1/0&&(Zt.current=new Date().getTime(),Ge=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),ee()},Te.current))})(),()=>clearTimeout(Ge)},[A,y,m,pt,Ve,ee]),W.useEffect(()=>{m.delete&&(ee(),m.onDismiss==null||m.onDismiss.call(m,m))},[ee,m.delete]);function ke(){var Ge;if(M?.loading){var Mt;return W.createElement("div",{className:_r(L?.loader,m==null||(Mt=m.classNames)==null?void 0:Mt.loader,"sonner-loader"),"data-visible":pt==="loading"},M.loading)}return W.createElement(cQ,{className:_r(L?.loader,m==null||(Ge=m.classNames)==null?void 0:Ge.loader),visible:pt==="loading"})}const qe=m.icon||M?.[pt]||rQ(pt);var Ye,at;return W.createElement("li",{tabIndex:0,ref:tt,className:_r($,_t,L?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,L?.default,L?.[pt],m==null||(a=m.classNames)==null?void 0:a[pt]),"data-sonner-toast":"","data-rich-colors":(Ye=m.richColors)!=null?Ye:E,"data-styled":!(m.jsx||m.unstyled||h),"data-mounted":H,"data-promise":!!m.promise,"data-swiped":Pe,"data-removed":J,"data-visible":ut,"data-y-position":Va,"data-x-position":X,"data-index":S,"data-front":me,"data-swiping":se,"data-dismissible":ft,"data-type":pt,"data-invert":bt,"data-swipe-out":de,"data-swipe-direction":G,"data-expanded":!!(A||Q&&H),"data-testid":m.testId,style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${J?Qe:xa.current}px`,"--initial-height":Q?"auto":`${xe}px`,..._,...m.style},onDragEnd:()=>{ye(!1),ie(null),Da.current=null},onPointerDown:Ge=>{Ge.button!==2&&(Be||!ft||(dt.current=new Date,Ue(xa.current),Ge.target.setPointerCapture(Ge.pointerId),Ge.target.tagName!=="BUTTON"&&(ye(!0),Da.current={x:Ge.clientX,y:Ge.clientY})))},onPointerUp:()=>{var Ge,Mt,zt;if(de||!ft)return;Da.current=null;const Ie=Number(((Ge=tt.current)==null?void 0:Ge.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ua=Number(((Mt=tt.current)==null?void 0:Mt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ht=new Date().getTime()-((zt=dt.current)==null?void 0:zt.getTime()),Lt=Z==="x"?Ie:ua,be=Math.abs(Lt)/Ht;if(Math.abs(Lt)>=CQ||be>.11){Ue(xa.current),m.onDismiss==null||m.onDismiss.call(m,m),F(Z==="x"?Ie>0?"right":"left":ua>0?"down":"up"),ee(),ve(!0);return}else{var ga,Ca;(ga=tt.current)==null||ga.style.setProperty("--swipe-amount-x","0px"),(Ca=tt.current)==null||Ca.style.setProperty("--swipe-amount-y","0px")}ue(!1),ye(!1),ie(null)},onPointerMove:Ge=>{var Mt,zt,Ie;if(!Da.current||!ft||((Mt=window.getSelection())==null?void 0:Mt.toString().length)>0)return;const Ht=Ge.clientY-Da.current.y,Lt=Ge.clientX-Da.current.x;var be;const ga=(be=e.swipeDirections)!=null?be:AQ(Y);!Z&&(Math.abs(Lt)>1||Math.abs(Ht)>1)&&ie(Math.abs(Lt)>Math.abs(Ht)?"x":"y");let Ca={x:0,y:0};const Yn=Ga=>1/(1.5+Math.abs(Ga)/20);if(Z==="y"){if(ga.includes("top")||ga.includes("bottom"))if(ga.includes("top")&&Ht<0||ga.includes("bottom")&&Ht>0)Ca.y=Ht;else{const Ga=Ht*Yn(Ht);Ca.y=Math.abs(Ga)<Math.abs(Ht)?Ga:Ht}}else if(Z==="x"&&(ga.includes("left")||ga.includes("right")))if(ga.includes("left")&&Lt<0||ga.includes("right")&&Lt>0)Ca.x=Lt;else{const Ga=Lt*Yn(Lt);Ca.x=Math.abs(Ga)<Math.abs(Lt)?Ga:Lt}(Math.abs(Ca.x)>0||Math.abs(Ca.y)>0)&&ue(!0),(zt=tt.current)==null||zt.style.setProperty("--swipe-amount-x",`${Ca.x}px`),(Ie=tt.current)==null||Ie.style.setProperty("--swipe-amount-y",`${Ca.y}px`)}},Xt&&!m.jsx&&pt!=="loading"?W.createElement("button",{"aria-label":U,"data-disabled":Be,"data-close-button":!0,onClick:Be||!ft?()=>{}:()=>{ee(),m.onDismiss==null||m.onDismiss.call(m,m)},className:_r(L?.closeButton,m==null||(s=m.classNames)==null?void 0:s.closeButton)},(at=M?.close)!=null?at:pQ):null,(pt||m.icon||m.promise)&&m.icon!==null&&(M?.[pt]!==null||m.icon)?W.createElement("div",{"data-icon":"",className:_r(L?.icon,m==null||(r=m.classNames)==null?void 0:r.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ke():null,m.type!=="loading"?qe:null):null,W.createElement("div",{"data-content":"",className:_r(L?.content,m==null||(i=m.classNames)==null?void 0:i.content)},W.createElement("div",{"data-title":"",className:_r(L?.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?W.createElement("div",{"data-description":"",className:_r(R,da,L?.description,m==null||(d=m.classNames)==null?void 0:d.description)},typeof m.description=="function"?m.description():m.description):null),W.isValidElement(m.cancel)?m.cancel:m.cancel&&pg(m.cancel)?W.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||T,onClick:Ge=>{pg(m.cancel)&&ft&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Ge),ee())},className:_r(L?.cancelButton,m==null||(u=m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,W.isValidElement(m.action)?m.action:m.action&&pg(m.action)?W.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||I,onClick:Ge=>{pg(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Ge),!Ge.defaultPrevented&&ee())},className:_r(L?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function XO(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function OQ(e,t){const a={};return[e,t].forEach((s,r)=>{const i=r===1,l=i?"--mobile-offset":"--offset",d=i?wQ:jQ;function u(p){["top","right","bottom","left"].forEach(x=>{a[`${l}-${x}`]=typeof p=="number"?`${p}px`:p})}typeof s=="number"||typeof s=="string"?u(s):typeof s=="object"?["top","right","bottom","left"].forEach(p=>{s[p]===void 0?a[`${l}-${p}`]=d:a[`${l}-${p}`]=typeof s[p]=="number"?`${s[p]}px`:s[p]}):u(d)}),a}const kQ=W.forwardRef(function(t,a){const{id:s,invert:r,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:d,closeButton:u,className:p,offset:x,mobileOffset:m,theme:h="light",richColors:y,duration:w,style:b,visibleToasts:j=bQ,toastOptions:S,dir:O=XO(),gap:A=SQ,icons:k,containerAriaLabel:E="Notifications"}=t,[D,_]=W.useState([]),T=W.useMemo(()=>s?D.filter(H=>H.toasterId===s):D.filter(H=>!H.toasterId),[D,s]),I=W.useMemo(()=>Array.from(new Set([i].concat(T.filter(H=>H.position).map(H=>H.position)))),[T,i]),[$,R]=W.useState([]),[B,Y]=W.useState(!1),[z,Q]=W.useState(!1),[L,M]=W.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=W.useRef(null),Z=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),ie=W.useRef(null),G=W.useRef(!1),F=W.useCallback(H=>{_(q=>{var J;return(J=q.find(ce=>ce.id===H.id))!=null&&J.delete||ns.dismiss(H.id),q.filter(({id:ce})=>ce!==H.id)})},[]);return W.useEffect(()=>ns.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{_(q=>q.map(J=>J.id===H.id?{...J,delete:!0}:J))});return}setTimeout(()=>{qB.flushSync(()=>{_(q=>{const J=q.findIndex(ce=>ce.id===H.id);return J!==-1?[...q.slice(0,J),{...q[J],...H},...q.slice(J+1)]:[H,...q]})})})}),[D]),W.useEffect(()=>{if(h!=="system"){M(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:q})=>{M(q?"dark":"light")})}catch{H.addListener(({matches:J})=>{try{M(J?"dark":"light")}catch(ce){console.error(ce)}})}},[h]),W.useEffect(()=>{D.length<=1&&Y(!1)},[D]),W.useEffect(()=>{const H=q=>{var J;if(l.every(ye=>q[ye]||q.code===ye)){var se;Y(!0),(se=U.current)==null||se.focus()}q.code==="Escape"&&(document.activeElement===U.current||(J=U.current)!=null&&J.contains(document.activeElement))&&Y(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[l]),W.useEffect(()=>{if(U.current)return()=>{ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null,G.current=!1)}},[U.current]),W.createElement("section",{ref:a,"aria-label":`${E} ${Z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},I.map((H,q)=>{var J;const[ce,se]=H.split("-");return T.length?W.createElement("ol",{key:H,dir:O==="auto"?XO():O,tabIndex:-1,ref:U,className:p,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":ce,"data-x-position":se,style:{"--front-toast-height":`${((J=$[0])==null?void 0:J.height)||0}px`,"--width":`${NQ}px`,"--gap":`${A}px`,...b,...OQ(x,m)},onBlur:ye=>{G.current&&!ye.currentTarget.contains(ye.relatedTarget)&&(G.current=!1,ie.current&&(ie.current.focus({preventScroll:!0}),ie.current=null))},onFocus:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||G.current||(G.current=!0,ie.current=ye.relatedTarget)},onMouseEnter:()=>Y(!0),onMouseMove:()=>Y(!0),onMouseLeave:()=>{z||Y(!1)},onDragEnd:()=>Y(!1),onPointerDown:ye=>{ye.target instanceof HTMLElement&&ye.target.dataset.dismissible==="false"||Q(!0)},onPointerUp:()=>Q(!1)},T.filter(ye=>!ye.position&&q===0||ye.position===H).map((ye,de)=>{var ve,Pe;return W.createElement(DQ,{key:ye.id,icons:k,index:de,toast:ye,defaultRichColors:y,duration:(ve=S?.duration)!=null?ve:w,className:S?.className,descriptionClassName:S?.descriptionClassName,invert:r,visibleToasts:j,closeButton:(Pe=S?.closeButton)!=null?Pe:u,interacting:z,position:H,style:S?.style,unstyled:S?.unstyled,classNames:S?.classNames,cancelButtonStyle:S?.cancelButtonStyle,actionButtonStyle:S?.actionButtonStyle,closeButtonAriaLabel:S?.closeButtonAriaLabel,removeToast:F,toasts:T.filter(ue=>ue.position==ye.position),heights:$.filter(ue=>ue.position==ye.position),setHeights:R,expandByDefault:d,gap:A,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),_Q=({...e})=>{const{theme:t="system"}=nQ();return n.jsx(kQ,{"data-loc":"client/src/components/ui/sonner.tsx:8",theme:t,className:"toaster group",style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},...e})};function We(e,t,{checkForDefaultPrevented:a=!0}={}){return function(r){if(e?.(r),a===!1||!r.defaultPrevented)return t?.(r)}}function ZO(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Pi(...e){return t=>{let a=!1;const s=e.map(r=>{const i=ZO(r,t);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let r=0;r<s.length;r++){const i=s[r];typeof i=="function"?i():ZO(e[r],null)}}}}function kt(...e){return v.useCallback(Pi(...e),e)}function TQ(e,t){const a=v.createContext(t),s=i=>{const{children:l,...d}=i,u=v.useMemo(()=>d,Object.values(d));return n.jsx(a.Provider,{value:u,children:l})};s.displayName=e+"Provider";function r(i){const l=v.useContext(a);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[s,r]}function Pn(e,t=[]){let a=[];function s(i,l){const d=v.createContext(l),u=a.length;a=[...a,l];const p=m=>{const{scope:h,children:y,...w}=m,b=h?.[e]?.[u]||d,j=v.useMemo(()=>w,Object.values(w));return n.jsx(b.Provider,{value:j,children:y})};p.displayName=i+"Provider";function x(m,h){const y=h?.[e]?.[u]||d,w=v.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${i}\``)}return[p,x]}const r=()=>{const i=a.map(l=>v.createContext(l));return function(d){const u=d?.[e]||i;return v.useMemo(()=>({[`__scope${e}`]:{...d,[e]:u}}),[d,u])}};return r.scopeName=e,[s,PQ(r,...t)]}function PQ(...e){const t=e[0];if(e.length===1)return t;const a=()=>{const s=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(i){const l=s.reduce((d,{useScope:u,scopeName:p})=>{const m=u(i)[`__scope${p}`];return{...d,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return a.scopeName=t.scopeName,a}function Wc(e){const t=MQ(e),a=v.forwardRef((s,r)=>{const{children:i,...l}=s,d=v.Children.toArray(i),u=d.find(RQ);if(u){const p=u.props.children,x=d.map(m=>m===u?v.Children.count(p)>1?v.Children.only(null):v.isValidElement(p)?p.props.children:null:m);return n.jsx(t,{...l,ref:r,children:v.isValidElement(p)?v.cloneElement(p,void 0,x):null})}return n.jsx(t,{...l,ref:r,children:i})});return a.displayName=`${e}.Slot`,a}var S5=Wc("Slot");function MQ(e){const t=v.forwardRef((a,s)=>{const{children:r,...i}=a;if(v.isValidElement(r)){const l=IQ(r),d=BQ(i,r.props);return r.type!==v.Fragment&&(d.ref=s?Pi(s,l):l),v.cloneElement(r,d)}return v.Children.count(r)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var FB=Symbol("radix.slottable");function WB(e){const t=({children:a})=>n.jsx(n.Fragment,{children:a});return t.displayName=`${e}.Slottable`,t.__radixId=FB,t}function RQ(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===FB}function BQ(e,t){const a={...t};for(const s in t){const r=e[s],i=t[s];/^on[A-Z]/.test(s)?r&&i?a[s]=(...d)=>{const u=i(...d);return r(...d),u}:r&&(a[s]=r):s==="style"?a[s]={...r,...i}:s==="className"&&(a[s]=[r,i].filter(Boolean).join(" "))}return{...e,...a}}function IQ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var LQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],et=LQ.reduce((e,t)=>{const a=Wc(`Primitive.${t}`),s=v.forwardRef((r,i)=>{const{asChild:l,...d}=r,u=l?a:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(u,{...d,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function HB(e,t){e&&Br.flushSync(()=>e.dispatchEvent(t))}function ur(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...a)=>t.current?.(...a),[])}function $Q(e,t=globalThis?.document){const a=ur(e);v.useEffect(()=>{const s=r=>{r.key==="Escape"&&a(r)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[a,t])}var zQ="DismissableLayer",vS="dismissableLayer.update",UQ="dismissableLayer.pointerDownOutside",qQ="dism
49issableLayer.focusOutside",JO,VB=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ru=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:s,onPointerDownOutside:r,onFocusOutside:i,onInteractOutside:l,onDismiss:d,...u}=e,p=v.useContext(VB),[x,m]=v.useState(null),h=x?.ownerDocument??globalThis?.document,[,y]=v.useState({}),w=kt(t,_=>m(_)),b=Array.from(p.layers),[j]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),S=b.indexOf(j),O=x?b.indexOf(x):-1,A=p.layersWithOutsidePointerEventsDisabled.size>0,k=O>=S,E=HQ(_=>{const T=_.target,I=[...p.branches].some($=>$.contains(T));!k||I||(r?.(_),l?.(_),_.defaultPrevented||d?.())},h),D=VQ(_=>{const T=_.target;[...p.branches].some($=>$.contains(T))||(i?.(_),l?.(_),_.defaultPrevented||d?.())},h);return $Q(_=>{O===p.layers.size-1&&(s?.(_),!_.defaultPrevented&&d&&(_.preventDefault(),d()))},h),v.useEffect(()=>{if(x)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(JO=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(x)),p.layers.add(x),ek(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=JO)}},[x,h,a,p]),v.useEffect(()=>()=>{x&&(p.layers.delete(x),p.layersWithOutsidePointerEventsDisabled.delete(x),ek())},[x,p]),v.useEffect(()=>{const _=()=>y({});return document.addEventListener(vS,_),()=>document.removeEventListener(vS,_)},[]),n.jsx(et.div,{...u,ref:w,style:{pointerEvents:A?k?"auto":"none":void 0,...e.style},onFocusCapture:We(e.onFocusCapture,D.onFocusCapture),onBlurCapture:We(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:We(e.onPointerDownCapture,E.onPointerDownCapture)})});ru.displayName=zQ;var FQ="DismissableLayerBranch",WQ=v.forwardRef((e,t)=>{const a=v.useContext(VB),s=v.useRef(null),r=kt(t,s);return v.useEffect(()=>{const i=s.current;if(i)return a.branches.add(i),()=>{a.branches.delete(i)}},[a.branches]),n.jsx(et.div,{...e,ref:r})});WQ.displayName=FQ;function HQ(e,t=globalThis?.document){const a=ur(e),s=v.useRef(!1),r=v.useRef(()=>{});return v.useEffect(()=>{const i=d=>
vendor: 4,356 bytes, line 49
49{if(d.target&&!s.current){let u=function(){GB(UQ,a,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=u,t.addEventListener("click",r.current,{once:!0})):u()}else t.removeEventListener("click",r.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",r.current)}},[t,a]),{onPointerDownCapture:()=>s.current=!0}}function VQ(e,t=globalThis?.document){const a=ur(e),s=v.useRef(!1);return v.useEffect(()=>{const r=i=>{i.target&&!s.current&&GB(qQ,a,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,a]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function ek(){const e=new CustomEvent(vS);document.dispatchEvent(e)}function GB(e,t,a,{discrete:s}){const r=a.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:a});t&&r.addEventListener(e,t,{once:!0}),s?HB(r,i):r.dispatchEvent(i)}var on=globalThis?.document?v.useLayoutEffect:()=>{},GQ=Nv[" useId ".trim().toString()]||(()=>{}),YQ=0;function hn(e){const[t,a]=v.useState(GQ());return on(()=>{a(s=>s??String(YQ++))},[e]),e||(t?`radix-${t}`:"")}const KQ=["top","right","bottom","left"],Hc=Math.min,bs=Math.max,nh=Math.round,fg=Math.floor,Ur=e=>({x:e,y:e}),QQ={left:"right",right:"left",bottom:"top",top:"bottom"},XQ={start:"end",end:"start"};function yS(e,t,a){return bs(e,Hc(t,a))}function Mi(e,t){return typeof e=="function"?e(t):e}function Ri(e){return e.split("-")[0]}function iu(e){return e.split("-")[1]}function C5(e){return e==="x"?"y":"x"}function E5(e){return e==="y"?"height":"width"}const ZQ=new Set(["top","bottom"]);function Ir(e){return ZQ.has(Ri(e))?"y":"x"}function A5(e){return C5(Ir(e))}function JQ(e,t,a){a===void 0&&(a=!1);const s=iu(e),r=A5(e),i=E5(r);let l=r==="x"?s===(a?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=sh(l)),[l,sh(l)]}function eX(e){const t=sh(e);return[bS(e),t,bS(t)]}function bS(e){return e.replace(/start|end/g,t=>XQ[t])}const tk=["left","right"],ak=["right","left"],tX=["top","bottom"],aX=["bottom","top"];function nX(e,t,a){switch(e){case"top":case"bottom":return a?t?ak:tk:t?tk:ak;case"left":case"right":return t?tX:aX;default:return[]}}function sX(e,t,a,s){const r=iu(e);let i=nX(Ri(e),a==="start",s);return r&&(i=i.map(l=>l+"-"+r),t&&(i=i.concat(i.map(bS)))),i}function sh(e){return e.replace(/left|right|bottom|top/g,t=>QQ[t])}function rX(e){return{top:0,right:0,bottom:0,left:0,...e}}function YB(e){return typeof e!="number"?rX(e):{top:e,right:e,bottom:e,left:e}}function rh(e){const{x:t,y:a,width:s,height:r}=e;return{width:s,height:r,top:a,left:t,right:t+s,bottom:a+r,x:t,y:a}}function nk(e,t,a){let{reference:s,floating:r}=e;const i=Ir(t),l=A5(t),d=E5(l),u=Ri(t),p=i==="y",x=s.x+s.width/2-r.width/2,m=s.y+s.height/2-r.height/2,h=s[d]/2-r[d]/2;let y;switch(u){case"top":y={x,y:s.y-r.height};break;case"bottom":y={x,y:s.y+s.height};break;case"right":y={x:s.x+s.width,y:m};break;case"left":y={x:s.x-r.width,y:m};break;default:y={x:s.x,y:s.y}}switch(iu(t)){case"start":y[l]-=h*(a&&p?-1:1);break;case"end":y[l]+=h*(a&&p?-1:1);break}return y}const iX=async(e,t,a)=>{const{placement:s="bottom",strategy:r="absolute",middleware:i=[],platform:l}=a,d=i.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(t));let p=await l.getElementRects({reference:e,floating:t,strategy:r}),{x,y:m}=nk(p,s,u),h=s,y={},w=0;for(let b=0;b<d.length;b++){const{name:j,fn:S}=d[b],{x:O,y:A,data:k,reset:E}=await S({x,y:m,initialPlacement:s,placement:h,strategy:r,middlewareData:y,rects:p,platform:l,elements:{reference:e,floating:t}});x=O??x,m=A??m,y={...y,[j]:{...y[j],...k}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(p=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x,y:m}=nk(p,h,u)),b=-1)}return{x,y:m,placement:h,strategy:r,middlewareData:y}};async function df(e,t){var a;t===void 0&&(t={});const{x:s,y:r,platform:i,rects:l,elements:d,strategy:u}=e,{boundary:p="clippingAncestors",rootBoundary:x="viewport",elementContext:m="floating",altBoundary:h=!1,padding:y=0}=Mi(t,e),w=YB(y),j=d[h?m==="floating"?"reference":"floating":m],S=rh(await i.getClippingRect
vendor: 11,492 bytes, line 49
49({element:(a=await(i.isElement==null?void 0:i.isElement(j)))==null||a?j:j.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(d.floating)),boundary:p,rootBoundary:x,strategy:u})),O=m==="floating"?{x:s,y:r,width:l.floating.width,height:l.floating.height}:l.reference,A=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d.floating)),k=await(i.isElement==null?void 0:i.isElement(A))?await(i.getScale==null?void 0:i.getScale(A))||{x:1,y:1}:{x:1,y:1},E=rh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:O,offsetParent:A,strategy:u}):O);return{top:(S.top-E.top+w.top)/k.y,bottom:(E.bottom-S.bottom+w.bottom)/k.y,left:(S.left-E.left+w.left)/k.x,right:(E.right-S.right+w.right)/k.x}}const cX=e=>({name:"arrow",options:e,async fn(t){const{x:a,y:s,placement:r,rects:i,platform:l,elements:d,middlewareData:u}=t,{element:p,padding:x=0}=Mi(e,t)||{};if(p==null)return{};const m=YB(x),h={x:a,y:s},y=A5(r),w=E5(y),b=await l.getDimensions(p),j=y==="y",S=j?"top":"left",O=j?"bottom":"right",A=j?"clientHeight":"clientWidth",k=i.reference[w]+i.reference[y]-h[y]-i.floating[w],E=h[y]-i.reference[y],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(p));let _=D?D[A]:0;(!_||!await(l.isElement==null?void 0:l.isElement(D)))&&(_=d.floating[A]||i.floating[w]);const T=k/2-E/2,I=_/2-b[w]/2-1,$=Hc(m[S],I),R=Hc(m[O],I),B=$,Y=_-b[w]-R,z=_/2-b[w]/2+T,Q=yS(B,z,Y),L=!u.arrow&&iu(r)!=null&&z!==Q&&i.reference[w]/2-(z<B?$:R)-b[w]/2<0,M=L?z<B?z-B:z-Y:0;return{[y]:h[y]+M,data:{[y]:Q,centerOffset:z-Q-M,...L&&{alignmentOffset:M}},reset:L}}}),lX=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var a,s;const{placement:r,middlewareData:i,rects:l,initialPlacement:d,platform:u,elements:p}=t,{mainAxis:x=!0,crossAxis:m=!0,fallbackPlacements:h,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...j}=Mi(e,t);if((a=i.arrow)!=null&&a.alignmentOffset)return{};const S=Ri(r),O=Ir(d),A=Ri(d)===d,k=await(u.isRTL==null?void 0:u.isRTL(p.floating)),E=h||(A||!b?[sh(d)]:eX(d)),D=w!=="none";!h&&D&&E.push(...sX(d,b,w,k));const _=[d,...E],T=await df(t,j),I=[];let $=((s=i.flip)==null?void 0:s.overflows)||[];if(x&&I.push(T[S]),m){const z=JQ(r,l,k);I.push(T[z[0]],T[z[1]])}if($=[...$,{placement:r,overflows:I}],!I.every(z=>z<=0)){var R,B;const z=(((R=i.flip)==null?void 0:R.index)||0)+1,Q=_[z];if(Q&&(!(m==="alignment"?O!==Ir(Q):!1)||$.every(U=>Ir(U.placement)===O?U.overflows[0]>0:!0)))return{data:{index:z,overflows:$},reset:{placement:Q}};let L=(B=$.filter(M=>M.overflows[0]<=0).sort((M,U)=>M.overflows[1]-U.overflows[1])[0])==null?void 0:B.placement;if(!L)switch(y){case"bestFit":{var Y;const M=(Y=$.filter(U=>{if(D){const Z=Ir(U.placement);return Z===O||Z==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Z=>Z>0).reduce((Z,ie)=>Z+ie,0)]).sort((U,Z)=>U[1]-Z[1])[0])==null?void 0:Y[0];M&&(L=M);break}case"initialPlacement":L=d;break}if(r!==L)return{reset:{placement:L}}}return{}}}};function sk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rk(e){return KQ.some(t=>e[t]>=0)}const oX=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:a}=t,{strategy:s="referenceHidden",...r}=Mi(e,t);switch(s){case"referenceHidden":{const i=await df(t,{...r,elementContext:"reference"}),l=sk(i,a.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:rk(l)}}}case"escaped":{const i=await df(t,{...r,altBoundary:!0}),l=sk(i,a.floating);return{data:{escapedOffsets:l,escaped:rk(l)}}}default:return{}}}}},KB=new Set(["left","top"]);async function dX(e,t){const{placement:a,platform:s,elements:r}=e,i=await(s.isRTL==null?void 0:s.isRTL(r.floating)),l=Ri(a),d=iu(a),u=Ir(a)==="y",p=KB.has(l)?-1:1,x=i&&u?-1:1,m=Mi(t,e);let{mainAxis:h,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return d&&typeof w=="number"&&(y=d==="end"?w*-1:w),u?{x:y*x,y:h*p}:{x:h*p,y:y*x}}const uX=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var a,s;const{x:r,y:i,placement:l,middlewareData:d}=t,u=await dX(t,e);return l===((a=d.offset)==null?void 0:a.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:r+u.x,y:i+u.y,data:{...u,placement:l}}}}},pX=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:a,y:s,placement:r}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:d={fn:j=>{let{x:S,y:O}=j;return{x:S,y:O}}},...u}=Mi(e,t),p={x:a,y:s},x=await df(t,u),m=Ir(Ri(r)),h=C5(m);let y=p[h],w=p[m];if(i){const j=h==="y"?"top":"left",S=h==="y"?"bottom":"right",O=y+x[j],A=y-x[S];y=yS(O,y,A)}if(l){const j=m==="y"?"top":"left",S=m==="y"?"bottom":"right",O=w+x[j],A=w-x[S];w=yS(O,w,A)}const b=d.fn({...t,[h]:y,[m]:w});return{...b,data:{x:b.x-a,y:b.y-s,enabled:{[h]:i,[m]:l}}}}}},fX=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:a,y:s,placement:r,rects:i,middlewareData:l}=t,{offset:d=0,mainAxis:u=!0,crossAxis:p=!0}=Mi(e,t),x={x:a,y:s},m=Ir(r),h=C5(m);let y=x[h],w=x[m];const b=Mi(d,t),j=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(u){const A=h==="y"?"height":"width",k=i.reference[h]-i.floating[A]+j.mainAxis,E=i.reference[h]+i.reference[A]-j.mainAxis;y<k?y=k:y>E&&(y=E)}if(p){var S,O;const A=h==="y"?"width":"height",k=KB.has(Ri(r)),E=i.reference[m]-i.floating[A]+(k&&((S=l.offset)==null?void 0:S[m])||0)+(k?0:j.crossAxis),D=i.reference[m]+i.reference[A]+(k?0:((O=l.offset)==null?void 0:O[m])||0)-(k?j.crossAxis:0);w<E?w=E:w>D&&(w=D)}return{[h]:y,[m]:w}}}},mX=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var a,s;const{placement:r,rects:i,platform:l,elements:d}=t,{apply:u=()=>{},...p}=Mi(e,t),x=await df(t,p),m=Ri(r),h=iu(r),y=Ir(r)==="y",{width:w,height:b}=i.floating;let j,S;m==="top"||m==="bottom"?(j=m,S=h===(await(l.isRTL==null?void 0:l.isRTL(d.floating))?"start":"end")?"left":"right"):(S=m,j=h==="end"?"top":"bottom");const O=b-x.top-x.bottom,A=w-x.left-x.right,k=Hc(b-x[j],O),E=Hc(w-x[S],A),D=!t.middlewareData.shift;let _=k,T=E;if((a=t.middlewareData.shift)!=null&&a.enabled.x&&(T=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(_=O),D&&!h){const $=bs(x.left,0),R=bs(x.right,0),B=bs(x.top,0),Y=bs(x.bottom,0);y?T=w-2*($!==0||R!==0?$+R:bs(x.left,x.right)):_=b-2*(B!==0||Y!==0?B+Y:bs(x.top,x.bottom))}await u({...t,availableWidth:T,availableHeight:_});const I=await l.getDimensions(d.floating);return w!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function kv(){return typeof window<"u"}function cu(e){return QB(e)?(e.nodeName||"").toLowerCase():"#document"}function Cs(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Zr(e){var t;return(t=(QB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function QB(e){return kv()?e instanceof Node||e instanceof Cs(e).Node:!1}function pr(e){return kv()?e instanceof Element||e instanceof Cs(e).Element:!1}function Hr(e){return kv()?e instanceof HTMLElement||e instanceof Cs(e).HTMLElement:!1}function ik(e){return!kv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Cs(e).ShadowRoot}const xX=new Set(["inline","contents"]);function Nm(e){const{overflow:t,overflowX:a,overflowY:s,display:r}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+a)&&!xX.has(r)}const gX=new Set(["table","td","th"]);function hX(e){return gX.has(cu(e))}const vX=[":popover-open",":modal"];function _v(e){return vX.some(t=>{try{return e.matches(t)}catch{return!1}})}const yX=["transform","translate","scale","rotate","perspective"],bX=["transform","translate","scale","rotate","perspective","filter"],jX=["paint","layout","strict","content"];function D5(e){const t=O5(),a=pr(e)?fr(e):e;return yX.some(s=>a[s]?a[s]!=="none":!1)||(a.containerType?a.containerType!=="normal":!1)||!t&&(a.backdropFilter?a.backdropFilter!=="none":!1)||!t&&(a.filter?a.filter!=="none":!1)||bX.some(s=>(a.willChange||"").includes(s))||jX.some(s=>(a.contain||"").includes(s))}function wX(e){let t=Vc(e);for(;Hr(t)&&!Td(t);){if(D5(t))return t;if(_v(t))return null;t=Vc(t)}return null}function O5(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const NX=new Set(["html","body","#document"]);function Td(e){return NX.has(cu(e))}function fr(e){return Cs(e).getComputedStyle(e)}function Tv(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Vc(e){if(cu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ik(e)&&e.host||Zr(e);return ik(t)?t.host:t}function XB(e){const t=Vc(e);return Td(t)?e.ownerDocument?e.ownerDocument.body:e.body:Hr(t)&&Nm(t)?t:XB(t)}function uf(e,t,a){var s;t===void 0&&(t=[]),a===void 0&&(a=!0);const r=XB(e),i=r===((s=e.ownerDocument)==null?void 0:s.body),l=Cs(r);if(i){const d=jS(l);return t.concat(l,l.visualViewport||[],Nm(r)?r:[],d&&a?uf(d):[])}return t.concat(r,uf(r,[],a))}function jS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ZB(e){const t=fr(e);let a=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=Hr(e),i=r?e.offsetWidth:a,l=r?e.offsetHeight:s,d=nh(a)!==i||nh(s)!==l;return d&&(a=i,s=l),{width:a,height:s,$:d}}function k5(e){return pr(e)?e:e.contextElement}function vd(e){const t=k5(e);if(!Hr(t))return Ur(1);const a=t.getBoundingClientRect(),{width:s,height:r,$:i}=ZB(t);let l=(i?nh(a.width):a.width)/s,d=(i?nh(a.height):a.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!d||!Number.isFinite(d))&&(d=1),{x:l,y:d}}const SX=Ur(0);function JB(e){const t=Cs(e);return!O5()||!t.visualViewport?SX:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CX(e,t,a){return t===void 0&&(t=!1),!a||t&&a!==Cs(e)?!1:t}function Yl(e,t,a,s){t===void 0&&(t=!1),a===void 0&&(a=!1);const r=e.getBoundingClientRect(),i=k5(e);let l=Ur(1);t&&(s?pr(s)&&(l=vd(s)):l=vd(e));const d=CX(i,a,s)?JB(i):Ur(0);let u=(r.left+d.x)/l.x,p=(r.top+d.y)/l.y,x=r.width/l.x,m=r.height/l.y;if(i){const h=Cs(i),y=s&&pr(s)?Cs(s):s;let w=h,b=jS(w);for(;b&&s&&y!==w;){const j=vd(b),S=b.getBoundingClientRect(),O=fr(b),A=S.left+(b.clientLeft+parseFloat(O.paddingLeft))*j.x,k=S.top+(b.clientTop+parseFloat(O.paddingTop))*j.y;u*=j.x,p*=j.y,x*=j.x,m*=j.y,u+=A,p+=k,w=Cs(b),b=jS(w)}}return rh({width:x,height:m,x:u,y:p})}function Pv(e,t){const a=Tv(e).scrollLeft;return t?t.left+a:Yl(Zr(e)).left+a}function eI(e,t){const a=e.getBoundingClientRect(),s=a.left+t.scrollLeft-Pv(e,a),r=a.top+t.scrollTop;return{x:s,y:r}}function EX(e){let{elements:t,rect:a,offsetParent:s,strategy:r}=e;const i=r==="fixed",l=Zr(s),d=t?_v(t.floating):!1;if(s===l||d&&i)return a;let u={scrollLeft:0,scrollTop:0},p=Ur(1);const x=Ur(0),m=Hr(s);if((m||!m&&!i)&&((cu(s)!=="body"||Nm(l))&&(u=Tv(s)),Hr(s))){const y=Yl(s);p=vd(s),x.x=y.x+s.clientLeft,x.y=y.y+s.clientTop}const h=l&&!m&&!i?eI(l,u):Ur(0);return{width:a.width*p.x,height:a.height*p.y,x:a.x*p.x-u.scrollLeft*p.x+x.x+h.x,y:a.y*p.y-u.scrollTop*p.y+x.y+h.y}}function AX(e){return Array.from(e.getClientRects())}function DX(e){const t=Zr(e),a=Tv(e),s=e.ownerDocument.body,r=bs(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),i=bs(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let l=-a.scrollLeft+Pv(e);const d=-a.scrollTop;return fr(s).direction==="rtl"&&(l+=bs(t.clientWidth,s.clientWidth)-r),{width:r,height:i,x:l,y:d}}const ck=25;
vendor: 13,764 bytes, line 49
49function OX(e,t){const a=Cs(e),s=Zr(e),r=a.visualViewport;let i=s.clientWidth,l=s.clientHeight,d=0,u=0;if(r){i=r.width,l=r.height;const x=O5();(!x||x&&t==="fixed")&&(d=r.offsetLeft,u=r.offsetTop)}const p=Pv(s);if(p<=0){const x=s.ownerDocument,m=x.body,h=getComputedStyle(m),y=x.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(s.clientWidth-m.clientWidth-y);w<=ck&&(i-=w)}else p<=ck&&(i+=p);return{width:i,height:l,x:d,y:u}}const kX=new Set(["absolute","fixed"]);function _X(e,t){const a=Yl(e,!0,t==="fixed"),s=a.top+e.clientTop,r=a.left+e.clientLeft,i=Hr(e)?vd(e):Ur(1),l=e.clientWidth*i.x,d=e.clientHeight*i.y,u=r*i.x,p=s*i.y;return{width:l,height:d,x:u,y:p}}function lk(e,t,a){let s;if(t==="viewport")s=OX(e,a);else if(t==="document")s=DX(Zr(e));else if(pr(t))s=_X(t,a);else{const r=JB(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return rh(s)}function tI(e,t){const a=Vc(e);return a===t||!pr(a)||Td(a)?!1:fr(a).position==="fixed"||tI(a,t)}function TX(e,t){const a=t.get(e);if(a)return a;let s=uf(e,[],!1).filter(d=>pr(d)&&cu(d)!=="body"),r=null;const i=fr(e).position==="fixed";let l=i?Vc(e):e;for(;pr(l)&&!Td(l);){const d=fr(l),u=D5(l);!u&&d.position==="fixed"&&(r=null),(i?!u&&!r:!u&&d.position==="static"&&!!r&&kX.has(r.position)||Nm(l)&&!u&&tI(e,l))?s=s.filter(x=>x!==l):r=d,l=Vc(l)}return t.set(e,s),s}function PX(e){let{element:t,boundary:a,rootBoundary:s,strategy:r}=e;const l=[...a==="clippingAncestors"?_v(t)?[]:TX(t,this._c):[].concat(a),s],d=l[0],u=l.reduce((p,x)=>{const m=lk(t,x,r);return p.top=bs(m.top,p.top),p.right=Hc(m.right,p.right),p.bottom=Hc(m.bottom,p.bottom),p.left=bs(m.left,p.left),p},lk(t,d,r));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function MX(e){const{width:t,height:a}=ZB(e);return{width:t,height:a}}function RX(e,t,a){const s=Hr(t),r=Zr(t),i=a==="fixed",l=Yl(e,!0,i,t);let d={scrollLeft:0,scrollTop:0};const u=Ur(0);function p(){u.x=Pv(r)}if(s||!s&&!i)if((cu(t)!=="body"||Nm(r))&&(d=Tv(t)),s){const y=Yl(t,!0,i,t);u.x=y.x+t.clientLeft,u.y=y.y+t.clientTop}else r&&p();i&&!s&&r&&p();const x=r&&!s&&!i?eI(r,d):Ur(0),m=l.left+d.scrollLeft-u.x-x.x,h=l.top+d.scrollTop-u.y-x.y;return{x:m,y:h,width:l.width,height:l.height}}function h1(e){return fr(e).position==="static"}function ok(e,t){if(!Hr(e)||fr(e).position==="fixed")return null;if(t)return t(e);let a=e.offsetParent;return Zr(e)===a&&(a=a.ownerDocument.body),a}function aI(e,t){const a=Cs(e);if(_v(e))return a;if(!Hr(e)){let r=Vc(e);for(;r&&!Td(r);){if(pr(r)&&!h1(r))return r;r=Vc(r)}return a}let s=ok(e,t);for(;s&&hX(s)&&h1(s);)s=ok(s,t);return s&&Td(s)&&h1(s)&&!D5(s)?a:s||wX(e)||a}const BX=async function(e){const t=this.getOffsetParent||aI,a=this.getDimensions,s=await a(e.floating);return{reference:RX(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function IX(e){return fr(e).direction==="rtl"}const LX={convertOffsetParentRelativeRectToViewportRelativeRect:EX,getDocumentElement:Zr,getClippingRect:PX,getOffsetParent:aI,getElementRects:BX,getClientRects:AX,getDimensions:MX,getScale:vd,isElement:pr,isRTL:IX};function nI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $X(e,t){let a=null,s;const r=Zr(e);function i(){var d;clearTimeout(s),(d=a)==null||d.disconnect(),a=null}function l(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),i();const p=e.getBoundingClientRect(),{left:x,top:m,width:h,height:y}=p;if(d||t(),!h||!y)return;const w=fg(m),b=fg(r.clientWidth-(x+h)),j=fg(r.clientHeight-(m+y)),S=fg(x),A={rootMargin:-w+"px "+-b+"px "+-j+"px "+-S+"px",threshold:bs(0,Hc(1,u))||1};let k=!0;function E(D){const _=D[0].intersectionRatio;if(_!==u){if(!k)return l();_?l(!1,_):s=setTimeout(()=>{l(!1,1e-7)},1e3)}_===1&&!nI(p,e.getBoundingClientRect())&&l(),k=!1}try{a=new IntersectionObserver(E,{...A,root:r.ownerDocument})}catch{a=new IntersectionObserver(E,A)}a.observe(e)}return l(!0),i}function zX(e,t,a,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:u=!1}=s,p=k5(e),x=r||i?[...p?uf(p):[],...uf(t)]:[];x.forEach(S=>{r&&S.addEventListener("scroll",a,{passive:!0}),i&&S.addEventListener("resize",a)});const m=p&&d?$X(p,a):null;let h=-1,y=null;l&&(y=new ResizeObserver(S=>{let[O]=S;O&&O.target===p&&y&&(y.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),a()}),p&&!u&&y.observe(p),y.observe(t));let w,b=u?Yl(e):null;u&&j();function j(){const S=Yl(e);b&&!nI(b,S)&&a(),b=S,w=requestAnimationFrame(j)}return a(),()=>{var S;x.forEach(O=>{r&&O.removeEventListener("scroll",a),i&&O.removeEventListener("resize",a)}),m?.(),(S=y)==null||S.disconnect(),y=null,u&&cancelAnimationFrame(w)}}const UX=uX,qX=pX,FX=lX,WX=mX,HX=oX,dk=cX,VX=fX,GX=(e,t,a)=>{const s=new Map,r={platform:LX,...a},i={...r.platform,_c:s};return iX(e,t,{...r,platform:i})};var YX=typeof document<"u",KX=function(){},Gg=YX?v.useLayoutEffect:KX;function ih(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 a,s,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(a=e.length,a!==t.length)return!1;for(s=a;s--!==0;)if(!ih(e[s],t[s]))return!1;return!0}if(r=Object.keys(e),a=r.length,a!==Object.keys(t).length)return!1;for(s=a;s--!==0;)if(!{}.hasOwnProperty.call(t,r[s]))return!1;for(s=a;s--!==0;){const i=r[s];if(!(i==="_owner"&&e.$$typeof)&&!ih(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function sI(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uk(e,t){const a=sI(e);return Math.round(t*a)/a}function v1(e){const t=v.useRef(e);return Gg(()=>{t.current=e}),t}function QX(e){e===void 0&&(e={});const{placement:t="bottom",strategy:a="absolute",middleware:s=[],platform:r,elements:{reference:i,floating:l}={},transform:d=!0,whileElementsMounted:u,open:p}=e,[x,m]=v.useState({x:0,y:0,strategy:a,placement:t,middlewareData:{},isPositioned:!1}),[h,y]=v.useState(s);ih(h,s)||y(s);const[w,b]=v.useState(null),[j,S]=v.useState(null),O=v.useCallback(U=>{U!==D.current&&(D.current=U,b(U))},[]),A=v.useCallback(U=>{U!==_.current&&(_.current=U,S(U))},[]),k=i||w,E=l||j,D=v.useRef(null),_=v.useRef(null),T=v.useRef(x),I=u!=null,$=v1(u),R=v1(r),B=v1(p),Y=v.useCallback(()=>{if(!D.current||!_.current)return;const U={placement:t,strategy:a,middleware:h};R.current&&(U.platform=R.current),GX(D.current,_.current,U).then(Z=>{const ie={...Z,isPositioned:B.current!==!1};z.current&&!ih(T.current,ie)&&(T.current=ie,Br.flushSync(()=>{m(ie)}))})},[h,t,a,R,B]);Gg(()=>{p===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,m(U=>({...U,isPositioned:!1})))},[p]);const z=v.useRef(!1);Gg(()=>(z.current=!0,()=>{z.current=!1}),[]),Gg(()=>{if(k&&(D.current=k),E&&(_.current=E),k&&E){if($.current)return $.current(k,E,Y);Y()}},[k,E,Y,$,I]);const Q=v.useMemo(()=>({reference:D,floating:_,setReference:O,setFloating:A}),[O,A]),L=v.useMemo(()=>({reference:k,floating:E}),[k,E]),M=v.useMemo(()=>{const U={position:a,left:0,top:0};if(!L.floating)return U;const Z=uk(L.floating,x.x),ie=uk(L.floating,x.y);return d?{...U,transform:"translate("+Z+"px, "+ie+"px)",...sI(L.floating)>=1.5&&{willChange:"transform"}}:{position:a,left:Z,top:ie}},[a,d,L.floating,x.x,x.y]);return v.useMemo(()=>({...x,update:Y,refs:Q,elements:L,floatingStyles:M}),[x,Y,Q,L,M])}const XX=e=>{function t(a){return{}.hasOwnProperty.call(a,"current")}return{name:"arrow",options:e,fn(a){const{element:s,padding:r}=typeof e=="function"?e(a):e;return s&&t(s)?s.current!=null?dk({element:s.current,padding:r}).fn(a):{}:s?dk({element:s,padding:r}).fn(a):{}}}},ZX=(e,t)=>({...UX(e),options:[e,t]}),JX=(e,t)=>({...qX(e),options:[e,t]}),eZ=(e,t)=>({...VX(e),options:[e,t]}),tZ=(e,t)=>({...FX(e),options:[e,t]}),aZ=(e,t)=>({...WX(e),options:[e,t]}),nZ=(e,t)=>({...HX(e),options:[e,t]}),sZ=(e,t)=>({...XX(e),options:[e,t]});var rZ="Arrow",rI=v.forwardRef((e,t)=>{const{children:a,width:s=10,height:r=5,...i}=e;return n.jsx(et.svg,{...i,ref:t,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?a:n.jsx("polygon",{points:"0,0 30,0 15,10"})})});rI.displayName=rZ;var iZ=rI;function Mv(e){const[t,a]=v.useState(void 0);return on(()=>{if(e){a({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let l,d;if("borderBoxSize"in i){const u=i.borderBoxSize,p=Array.isArray(u)?u[0]:u;l=p.inlineSize,d=p.blockSize}else l=e.offsetWidth,d=e.offsetHeight;a({width:l,height:d})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else a(void 0)},[e]),t}var _5="Popper",[iI,Zc]=Pn(_5),[cZ,cI]=iI(_5),lI=e=>{const{__scopePopper:t,children:a}=e,[s,r]=v.useState(null);return n.jsx(cZ,{scope:t,anchor:s,onAnchorChange:r,children:a})};lI.displayName=_5;var oI="PopperAnchor",dI=v.forwardRef((e,t)=>{const{__scopePopper:a,virtualRef:s,...r}=e,i=cI(oI,a),l=v.useRef(null),d=kt(t,l),u=v.useRef(null);return v.useEffect(()=>{const p=u.current;u.current=s?.current||l.current,p!==u.current&&i.onAnchorChange(u.current)}),s?null:n.jsx(et.div,{...r,ref:d})});dI.displayName=oI;var T5="PopperContent",[lZ,oZ]=iI(T5),uI=v.forwardRef((e,t)=>{const{__scopePopper:a,side:s="bottom",sideOffset:r=0,align:i="center",alignOffset:l=0,arrowPadding:d=0,avoidCollisions:u=!0,collisionBoundary:p=[],collisionPadding:x=0,sticky:m="partial",hideWhenDetached:h=!1,updatePositionStrategy:y="optimized",onPlaced:w,...b}=e,j=cI(T5,a),[S,O]=v.useState(null),A=kt(t,se=>O(se)),[k,E]=v.useState(null),D=Mv(k),_=D?.width??0,T=D?.height??0,I=s+(i!=="center"?"-"+i:""),$=typeof x=="number"?x:{top:0,right:0,bottom:0,left:0,...x},R=Array.isArray(p)?p:[p],B=R.length>0,Y={padding:$,boundary:R.filter(uZ),altBoundary:B},{refs:z,floatingStyles:Q,placement:L,isPositioned:M,middlewareData:U}=QX({strategy:"fixed",placement:I,whileElementsMounted:(...se)=>zX(...se,{animationFrame:y==="always"}),elements:{reference:j.anchor},middleware:[ZX({mainAxis:r+T,alignmentAxis:l}),u&&JX({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?eZ():void 0,...Y}),u&&tZ({...Y}),aZ({...Y,apply:({elements:se,rects:ye,availableWidth:de,availableHeight:ve})=>{const{width:Pe,height:ue}=ye.reference,Qe=se.floating.style;Qe.setProperty("--radix-popper-available-width",`${de}px`),Qe.setProperty("--radix-popper-available-height",`${ve}px`),Qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),Qe.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),k&&sZ({element:k,padding:d}),pZ({arrowWidth:_,arrowHeight:T}),h&&nZ({strategy:"referenceHidden",...Y})]}),[Z,ie]=mI(L),G=ur(w);on(()=>{M&&G?.()},[M,G]);const F=U.arrow?.x,H=U.arrow?.y,q=U.arrow?.centerOffset!==0,[J,ce]=v.useState();return on(()=>{S&&ce(window.getComputedStyle(S).zIndex)},[S]),n.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:M?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[U.transformOrigin?.x,U.transformOrigin?.y].join(" "),...U.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:n.jsx(lZ,{scope:a,placedSide:Z,onArrowChange:E,arrowX:F,arrowY:H,shouldHideArrow:q,children:n.jsx(et.div,{"data-side":Z,"data-align":ie,...b,ref:A,style:{...b.style,animation:M?void 0:"none"}})})})});uI.displayName=T5;var pI="PopperArrow",dZ={top:"bottom",right:"left",bottom:"top",left:"right"},fI=v.forwardRef(function(t,a){const{__scopePopper:s,...r}=t,i=oZ(pI,s),l=dZ[i.placedSide];return n.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[l]: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:n.jsx(iZ,{...r,ref:a,style:{...r.style,display:"block"}})})});fI.displayName=pI;function uZ(e){return e!==null}var pZ=e=>({name:"transformOrigin",options:e,fn(t){const{placement:a,rects:s,middlewareData:r}=t,l=r.arrow?.centerOffset!==0,d=l?0:e.arrowWidth,u=l?0:e.arrowHeight,[p,x]=mI(a),m={start:"0%",center:"50%",end:"100%"}[x],h=(r.arrow?.x??0)+d/2,y=(r.arrow?.y??0)+u/2;let w="",b="";return p==="bottom"?(w=l?m:`${h}px`,b=`${-u}px`):p==="top"?(w=l?m:`${h}px`,b=`${s.floating.height+u}px`):p==="right"?(w=`${-u}px`,b=l?m:`${y}px`):p==="left"&&(w=`${s.floating.width+u}px`,b=l?m:`${y}px`),{data:{x:w,y:b}}}});function mI(e){const[t,a="center"]=e.split("-");return[t,a]}var Rv=lI,Sm=dI,Bv=uI,Iv=fI,fZ="Portal",lu=v.forwardRef((e,t)=>{const{container:a,...s}=e,[r,i]=v.useState(!1);on(()=>i(!0),[]);const l=a||r&&globalThis?.document?.body;return l?qB.createPortal(n.jsx(et.div,{...s,ref:t}),l):null});lu.displayName=fZ;function mZ(e,t){return v.useReducer((a,s)=>t[a][s]??a,e)}var Hn=e=>{const{present:t,children:a}=e,s=xZ(t),r=typeof a=="function"?a({present:s.isPresent}):v.Children.only(a),i=kt(s.ref,gZ(r));return typeof a=="function"||s.isPresent?v.cloneElement(r,{ref:i}):null};Hn.displayName="Presence";function xZ(e){const[t,a]=v.useState(),s=v.useRef(null),r=v.useRef(e),i=v.useRef("none"),l=e?"mounted":"unmounted",[d,u]=mZ(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const p=mg(s.current);i.current=d==="mounted"?p:"none"},[d]),on(()=>{const p=s.current,x=r.current;if(x!==e){const h=i.current,y=mg(p);e?u("MOUNT"):y==="none"||p?.display==="none"?u("UNMOUNT"):u(x&&h!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,u]),on(()=>
vendor: 4,353 bytes, line 49
49{if(t){let p;const x=t.ownerDocument.defaultView??window,m=y=>{const b=mg(s.current).includes(CSS.escape(y.animationName));if(y.target===t&&b&&(u("ANIMATION_END"),!r.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",p=x.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},h=y=>{y.target===t&&(i.current=mg(s.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{x.clearTimeout(p),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:v.useCallback(p=>{s.current=p?getComputedStyle(p):null,a(p)},[])}}function mg(e){return e?.animationName||"none"}function gZ(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning;return a?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,a=t&&"isReactWarning"in t&&t.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var hZ=Nv[" useInsertionEffect ".trim().toString()]||on;function Zs({prop:e,defaultProp:t,onChange:a=()=>{},caller:s}){const[r,i,l]=vZ({defaultProp:t,onChange:a}),d=e!==void 0,u=d?e:r;{const x=v.useRef(e!==void 0);v.useEffect(()=>{const m=x.current;m!==d&&console.warn(`${s} is changing from ${m?"controlled":"uncontrolled"} to ${d?"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.`),x.current=d},[d,s])}const p=v.useCallback(x=>{if(d){const m=yZ(x)?x(e):x;m!==e&&l.current?.(m)}else i(x)},[d,e,i,l]);return[u,p]}function vZ({defaultProp:e,onChange:t}){const[a,s]=v.useState(e),r=v.useRef(a),i=v.useRef(t);return hZ(()=>{i.current=t},[t]),v.useEffect(()=>{r.current!==a&&(i.current?.(a),r.current=a)},[a,r]),[a,s,i]}function yZ(e){return typeof e=="function"}var xI=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"}),bZ="VisuallyHidden",gI=v.forwardRef((e,t)=>n.jsx(et.span,{...e,ref:t,style:{...xI,...e.style}}));gI.displayName=bZ;var jZ=gI,[Lv]=Pn("Tooltip",[Zc]),$v=Zc(),hI="TooltipProvider",wZ=700,wS="tooltip.open",[NZ,P5]=Lv(hI),vI=e=>{const{__scopeTooltip:t,delayDuration:a=wZ,skipDelayDuration:s=300,disableHoverableContent:r=!1,children:i}=e,l=v.useRef(!0),d=v.useRef(!1),u=v.useRef(0);return v.useEffect(()=>{const p=u.current;return()=>window.clearTimeout(p)},[]),n.jsx(NZ,{scope:t,isOpenDelayedRef:l,delayDuration:a,onOpen:v.useCallback(()=>{window.clearTimeout(u.current),l.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,s)},[s]),isPointerInTransitRef:d,onPointerInTransitChange:v.useCallback(p=>{d.current=p},[]),disableHoverableContent:r,children:i})};vI.displayName=hI;var pf="Tooltip",[SZ,Cm]=Lv(pf),yI=e=>{const{__scopeTooltip:t,children:a,open:s,defaultOpen:r,onOpenChange:i,disableHoverableContent:l,delayDuration:d}=e,u=P5(pf,e.__scopeTooltip),p=$v(t),[x,m]=v.useState(null),h=hn(),y=v.useRef(0),w=l??u.disableHoverableContent,b=d??u.delayDuration,j=v.useRef(!1),[S,O]=Zs({prop:s,defaultProp:r??!1,onChange:_=>{_?(u.onOpen(),document.dispatchEvent(new CustomEvent(wS))):u.onClose(),i?.(_)},caller:pf}),A=v.useMemo(()=>S?j.current?"delayed-open":"instant-open":"closed",[S]),k=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,j.current=!1,O(!0)},[O]),E=v.useCallback(()=>{window.clearTimeout(y.current),y.current=0,O(!1)},[O]),D=v.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{j.current=!0,O(!0),y.current=0},b)},[b,O]);return v.useEffect(()=>()=>{y.current&&(window.clearTimeout(y.current),y.current=0)},[]),n.jsx(Rv,{...p,children:n.jsx(SZ,{scope:t,contentId:h,open:S,stateAttribute:A,trigger:x,onTriggerChange:m,onTriggerEnter:v.useCallback(()=>{u.isOpenDelayedRef.current?D():k()},[u.isOpenDelayedRef,D,k]),onTriggerLeave:v.useCallback(()=>{w?E():(window.clearTimeout(y.current),y.current=0)},[E,w]),onOpen:k,onClose:E,disableHoverableContent:w,children:a})})};yI.displayName=pf;var NS="TooltipTrigger",bI=v.forwardRef((e,t)=>
vendor: 12,649 bytes, line 49
49{const{__scopeTooltip:a,...s}=e,r=Cm(NS,a),i=P5(NS,a),l=$v(a),d=v.useRef(null),u=kt(t,d,r.onTriggerChange),p=v.useRef(!1),x=v.useRef(!1),m=v.useCallback(()=>p.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),n.jsx(Sm,{asChild:!0,...l,children:n.jsx(et.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...s,ref:u,onPointerMove:We(e.onPointerMove,h=>{h.pointerType!=="touch"&&!x.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),x.current=!0)}),onPointerLeave:We(e.onPointerLeave,()=>{r.onTriggerLeave(),x.current=!1}),onPointerDown:We(e.onPointerDown,()=>{r.open&&r.onClose(),p.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:We(e.onFocus,()=>{p.current||r.onOpen()}),onBlur:We(e.onBlur,r.onClose),onClick:We(e.onClick,r.onClose)})})});bI.displayName=NS;var M5="TooltipPortal",[CZ,EZ]=Lv(M5,{forceMount:void 0}),jI=e=>{const{__scopeTooltip:t,forceMount:a,children:s,container:r}=e,i=Cm(M5,t);return n.jsx(CZ,{scope:t,forceMount:a,children:n.jsx(Hn,{present:a||i.open,children:n.jsx(lu,{asChild:!0,container:r,children:s})})})};jI.displayName=M5;var Pd="TooltipContent",wI=v.forwardRef((e,t)=>{const a=EZ(Pd,e.__scopeTooltip),{forceMount:s=a.forceMount,side:r="top",...i}=e,l=Cm(Pd,e.__scopeTooltip);return n.jsx(Hn,{present:s||l.open,children:l.disableHoverableContent?n.jsx(NI,{side:r,...i,ref:t}):n.jsx(AZ,{side:r,...i,ref:t})})}),AZ=v.forwardRef((e,t)=>{const a=Cm(Pd,e.__scopeTooltip),s=P5(Pd,e.__scopeTooltip),r=v.useRef(null),i=kt(t,r),[l,d]=v.useState(null),{trigger:u,onClose:p}=a,x=r.current,{onPointerInTransitChange:m}=s,h=v.useCallback(()=>{d(null),m(!1)},[m]),y=v.useCallback((w,b)=>{const j=w.currentTarget,S={x:w.clientX,y:w.clientY},O=_Z(S,j.getBoundingClientRect()),A=TZ(S,O),k=PZ(b.getBoundingClientRect()),E=RZ([...A,...k]);d(E),m(!0)},[m]);return v.useEffect(()=>()=>h(),[h]),v.useEffect(()=>{if(u&&x){const w=j=>y(j,x),b=j=>y(j,u);return u.addEventListener("pointerleave",w),x.addEventListener("pointerleave",b),()=>{u.removeEventListener("pointerleave",w),x.removeEventListener("pointerleave",b)}}},[u,x,y,h]),v.useEffect(()=>{if(l){const w=b=>{const j=b.target,S={x:b.clientX,y:b.clientY},O=u?.contains(j)||x?.contains(j),A=!MZ(S,l);O?h():A&&(h(),p())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[u,x,l,p,h]),n.jsx(NI,{...e,ref:i})}),[DZ,OZ]=Lv(pf,{isInside:!1}),kZ=WB("TooltipContent"),NI=v.forwardRef((e,t)=>{const{__scopeTooltip:a,children:s,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:l,...d}=e,u=Cm(Pd,a),p=$v(a),{onClose:x}=u;return v.useEffect(()=>(document.addEventListener(wS,x),()=>document.removeEventListener(wS,x)),[x]),v.useEffect(()=>{if(u.trigger){const m=h=>{h.target?.contains(u.trigger)&&x()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[u.trigger,x]),n.jsx(ru,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:m=>m.preventDefault(),onDismiss:x,children:n.jsxs(Bv,{"data-state":u.stateAttribute,...p,...d,ref:t,style:{...d.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:[n.jsx(kZ,{children:s}),n.jsx(DZ,{scope:a,isInside:!0,children:n.jsx(jZ,{id:u.contentId,role:"tooltip",children:r||s})})]})})});wI.displayName=Pd;var SI="TooltipArrow",CI=v.forwardRef((e,t)=>{const{__scopeTooltip:a,...s}=e,r=$v(a);return OZ(SI,a).isInside?null:n.jsx(Iv,{...r,...s,ref:t})});CI.displayName=SI;function _Z(e,t){const a=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(a,s,r,i)){case i:return"left";case r:return"right";case a:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function TZ(e,t,a=5){const s=[];switch(t){case"top":s.push({x:e.x-a,y:e.y+a},{x:e.x+a,y:e.y+a});break;case"bottom":s.push({x:e.x-a,y:e.y-a},{x:e.x+a,y:e.y-a});break;case"left":s.push({x:e.x+a,y:e.y-a},{x:e.x+a,y:e.y+a});break;case"right":s.push({x:e.x-a,y:e.y-a},{x:e.x-a,y:e.y+a});break}return s}function PZ(e){const{top:t,right:a,bottom:s,left:r}=e;return[{x:r,y:t},{x:a,y:t},{x:a,y:s},{x:r,y:s}]}function MZ(e,t){const{x:a,y:s}=e;let r=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const d=t[i],u=t[l],p=d.x,x=d.y,m=u.x,h=u.y;x>s!=h>s&&a<(m-p)*(s-x)/(h-x)+p&&(r=!r)}return r}function RZ(e){const t=e.slice();return t.sort((a,s)=>a.x<s.x?-1:a.x>s.x?1:a.y<s.y?-1:a.y>s.y?1:0),BZ(t)}function BZ(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const r=e[s];for(;t.length>=2;){const i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}t.pop();const a=[];for(let s=e.length-1;s>=0;s--){const r=e[s];for(;a.length>=2;){const i=a[a.length-1],l=a[a.length-2];if((i.x-l.x)*(r.y-l.y)>=(i.y-l.y)*(r.x-l.x))a.pop();else break}a.push(r)}return a.pop(),t.length===1&&a.length===1&&t[0].x===a[0].x&&t[0].y===a[0].y?t:t.concat(a)}var IZ=vI,LZ=yI,$Z=bI,zZ=jI,UZ=wI,qZ=CI;function EI(e){var t,a,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(a=EI(e[t]))&&(s&&(s+=" "),s+=a)}else for(a in e)e[a]&&(s&&(s+=" "),s+=a);return s}function Qt(){for(var e,t,a=0,s="",r=arguments.length;a<r;a++)(e=arguments[a])&&(t=EI(e))&&(s&&(s+=" "),s+=t);return s}const R5="-",FZ=e=>{const t=HZ(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:l=>{const d=l.split(R5);return d[0]===""&&d.length!==1&&d.shift(),AI(d,t)||WZ(l)},getConflictingClassGroupIds:(l,d)=>{const u=a[l]||[];return d&&s[l]?[...u,...s[l]]:u}}},AI=(e,t)=>{if(e.length===0)return t.classGroupId;const a=e[0],s=t.nextPart.get(a),r=s?AI(e.slice(1),s):void 0;if(r)return r;if(t.validators.length===0)return;const i=e.join(R5);return t.validators.find(({validator:l})=>l(i))?.classGroupId},pk=/^\[(.+)\]$/,WZ=e=>{if(pk.test(e)){const t=pk.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},HZ=e=>{const{theme:t,classGroups:a}=e,s={nextPart:new Map,validators:[]};for(const r in a)SS(a[r],s,r,t);return s},SS=(e,t,a,s)=>{e.forEach(r=>{if(typeof r=="string"){const i=r===""?t:fk(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(VZ(r)){SS(r(s),t,a,s);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,l])=>{SS(l,fk(t,i),a,s)})})},fk=(e,t)=>{let a=e;return t.split(R5).forEach(s=>{a.nextPart.has(s)||a.nextPart.set(s,{nextPart:new Map,validators:[]}),a=a.nextPart.get(s)}),a},VZ=e=>e.isThemeGetter,GZ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,s=new Map;const r=(i,l)=>{a.set(i,l),t++,t>e&&(t=0,s=a,a=new Map)};return{get(i){let l=a.get(i);if(l!==void 0)return l;if((l=s.get(i))!==void 0)return r(i,l),l},set(i,l){a.has(i)?a.set(i,l):r(i,l)}}},CS="!",ES=":",YZ=ES.length,KZ=e=>{const{prefix:t,experimentalParseClassName:a}=e;let s=r=>{const i=[];let l=0,d=0,u=0,p;for(let w=0;w<r.length;w++){let b=r[w];if(l===0&&d===0){if(b===ES){i.push(r.slice(u,w)),u=w+YZ;continue}if(b==="/"){p=w;continue}}b==="["?l++:b==="]"?l--:b==="("?d++:b===")"&&d--}const x=i.length===0?r:r.substring(u),m=QZ(x),h=m!==x,y=p&&p>u?p-u:void 0;return{modifiers:i,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}};if(t){const r=t+ES,i=s;s=l=>l.startsWith(r)?i(l.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:l,maybePostfixModifierPosition:void 0}}if(a){const r=s;s=i=>a({className:i,parseClassName:r})}return s},QZ=e=>e.endsWith(CS)?e.substring(0,e.length-1):e.startsWith(CS)?e.substring(1):e,XZ=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(s=>[s,!0]));return s=>{if(s.length<=1)return s;const r=[];let i=[];return s.forEach(l=>{l[0]==="["||t[l]?(r.push(...i.sort(),l),i=[]):i.push(l)}),r.push(...i.sort()),r}},ZZ=e=>({cache:GZ(e.cacheSize),parseClassName:KZ(e),sortModifiers:XZ(e),...FZ(e)}),JZ=/\s+/,eJ=(e,t)=>{const{parseClassName:a,getClassGroupId:s,getConflictingClassGroupIds:r,sortModifiers:i}=t,l=[],d=e.trim().split(JZ);let u="";for(let p=d.length-1;p>=0;p-=1){const x=d[p],{isExternal:m,modifiers:h,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:b}=a(x);if(m){u=x+(u.length>0?" "+u:u);continue}let j=!!b,S=s(j?w.substring(0,b):w);if(!S){if(!j){u=x+(u.length>0?" "+u:u);continue}if(S=s(w),!S){u=x+(u.length>0?" "+u:u);continue}j=!1}const O=i(h).join(":"),A=y?O+CS:O,k=A+S;if(l.includes(k))continue;l.push(k);const E=r(S,j);for(let D=0;D<E.length;++D){const _=E[D];l.push(A+_)}u=x+(u.length>0?" "+u:u)}return u};function tJ(){let e=0,t,a,s="";for(;e<arguments.length;)(t=arguments[e++])&&(a=DI(t))&&(s&&(s+=" "),s+=a);return s}const DI=e=>{if(typeof e=="string")return e;let t,a="";for(let s=0;s<e.length;s++)e[s]&&(t=DI(e[s]))&&(a&&(a+=" "),a+=t);return a};function aJ(e,...t){let a,s,r,i=l;function l(u){const p=t.reduce((x,m)=>m(x),e());return a=ZZ(p),s=a.cache.get,r=a.cache.set,i=d,d(u)}function d(u){const p=s(u);if(p)return p;const x=eJ(u,a);return r(u,x),x}return function(){return i(tJ.apply(null,arguments))}}const pn=e=>{const t=a=>a[e]||[];return t.isThemeGetter=!0,t},OI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,kI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nJ=/^\d+\/\d+$/,sJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rJ=/\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$/,iJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ed=e=>nJ.test(e),$t=e=>!!e&&!Number.isNaN(Number(e)),wc=e=>!!e&&Number.isInteger(Number(e)),y1=e=>e.endsWith("%")&&$t(e.slice(0,-1)),yi=e=>sJ.test(e),oJ=()=>!0,dJ=e=>rJ.test(e)&&!iJ.test(e),_I=()=>!1,uJ=e=>cJ.test(e),pJ=e=>lJ.test(e),fJ=e=>!it(e)&&!ct(e),mJ=e=>ou(e,MI,_I),it=e=>OI.test(e),Cl=e=>ou(e,RI,dJ),b1=e=>ou(e,yJ,$t),mk=e=>ou(e,TI,_I),xJ=e=>ou(e,PI,pJ),xg=e=>ou(e,BI,uJ),ct=e=>kI.test(e),vp=e=>du(e,RI),gJ=e=>du(e,bJ),xk=e=>du(e,TI),hJ=e=>du(e,MI),vJ=e=>du(e,PI),gg=e=>du(e,BI,!0),ou=(e,t,a)=>{const s=OI.exec(e);return s?s[1]?t(s[1]):a(s[2]):!1},du=(e,t,a=!1)=>{const s=kI.exec(e);return s?s[1]?t(s[1]):a:!1},TI=e=>e==="position"||e==="percentage",PI=e=>e==="image"||e==="url",MI=e=>e==="length"||e==="size"||e==="bg-size",RI=e=>e==="length",yJ=e=>e==="number",bJ=e=>e==="family-name",BI=e=>e==="shadow",jJ=()=>{const e=pn("color"),t=pn("font"),a=pn("text"),s=pn("font-weight"),r=pn("tracking"),i=pn("leading"),l=pn("breakpoint"),d=pn("container"),u=pn("spacing"),p=pn("radius"),x=pn("shadow"),m=pn("inset-shadow"),h=pn("text-shadow"),y=pn("drop-shadow"),w=pn("blur"),b=pn("perspective"),j=pn("aspect"),S=pn("ease"),O=pn("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...k(),ct,it],D=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],T=()=>[ct,it,u],I=()=>[ed,"full","auto",...T()],$=()=>[wc,"none","subgrid",ct,it],R=()=>["auto",{span:["full",wc,ct,it]},wc,ct,it],B=()=>[wc,"auto",ct,it],Y=()=>["auto","min","max","fr",ct,it],z=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...T()],M=()=>[ed,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],U=()=>[e,ct,it],Z=()=>[...k(),xk,mk,{position:[ct,it]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",hJ,mJ,{size:[ct,it]}],F=()=>[y1,vp,Cl],H=()=>["","none","full",p,ct,it],q=()=>["",$t,vp,Cl],J=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[$t,y1,xk,mk],ye=()=>["","none",w,ct,it],de=()=>["none",$t,ct,it],ve=()=>["none",$t,ct,it],Pe=()=>[$t,ct,it],ue=()=>[ed,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[yi],breakpoint:[yi],c
vendor: 13,363 bytes, line 49
49olor:[oJ],container:[yi],"drop-shadow":[yi],ease:["in","out","in-out"],font:[fJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[yi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[yi],shadow:[yi],spacing:["px",$t],text:[yi],"text-shadow":[yi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ed,it,ct,j]}],container:["container"],columns:[{columns:[$t,it,ct,d]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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"],sr:["sr-only","not-sr-only"],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:E()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[wc,"auto",ct,it]}],basis:[{basis:[ed,"full","auto",d,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$t,ed,"auto","initial","none",it]}],grow:[{grow:["",$t,ct,it]}],shrink:[{shrink:["",$t,ct,it]}],order:[{order:[wc,"first","last","none",ct,it]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...z(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...z()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":z()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:M()}],w:[{w:[d,"screen",...M()]}],"min-w":[{"min-w":[d,"screen","none",...M()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[l]},...M()]}],h:[{h:["screen","lh",...M()]}],"min-h":[{"min-h":["screen","lh","none",...M()]}],"max-h":[{"max-h":["screen","lh",...M()]}],"font-size":[{text:["base",a,vp,Cl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,ct,b1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",y1,it]}],"font-family":[{font:[gJ,it,t]}],"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:[r,ct,it]}],"line-clamp":[{"line-clamp":[$t,"none",ct,b1]}],leading:[{leading:[i,...T()]}],"list-image":[{"list-image":["none",ct,it]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ct,it]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[$t,"from-font","auto",ct,Cl]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[$t,"auto",ct,it]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ct,it]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ct,it]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Z()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},wc,ct,it],radial:["",ct,it],conic:[wc,ct,it]},vJ,xJ]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$t,ct,it]}],"outline-w":[{outline:["",$t,vp,Cl]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",x,gg,xg]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",m,gg,xg]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[$t,Cl]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",h,gg,xg]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[$t,ct,it]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$t]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[ct,it]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[$t]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Z()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ct,it]}],filter:[{filter:["","none",ct,it]}],blur:[{blur:ye()}],brightness:[{brightness:[$t,ct,it]}],contrast:[{contrast:[$t,ct,it]}],"drop-shadow":[{"drop-shadow":["","none",y,gg,xg]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",$t,ct,it]}],"hue-rotate":[{"hue-rotate":[$t,ct,it]}],invert:[{invert:["",$t,ct,it]}],saturate:[{saturate:[$t,ct,it]}],sepia:[{sepia:["",$t,ct,it]}],"backdrop-filter":[{"backdrop-filter":["","none",ct,it]}],"backdrop-blur":[{"backdrop-blur":ye()}],"backdrop-brightness":[{"backdrop-brightness":[$t,ct,it]}],"backdrop-contrast":[{"backdrop-contrast":[$t,ct,it]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$t,ct,it]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$t,ct,it]}],"backdrop-invert":[{"backdrop-invert":["",$t,ct,it]}],"backdrop-opacity":[{"backdrop-opacity":[$t,ct,it]}],"backdrop-saturate":[{"backdrop-saturate":[$t,ct,it]}],"backdrop-sepia":[{"backdrop-sepia":["",$t,ct,it]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ct,it]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$t,"initial",ct,it]}],ease:[{ease:["linear","initial",S,ct,it]}],delay:[{delay:[$t,ct,it]}],animate:[{animate:["none",O,ct,it]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,ct,it]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:de()}],"rotate-x":[{"rotate-x":de()}],"rotate-y":[{"rotate-y":de()}],"rotate-z":[{"rotate-z":de()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:Pe()}],"skew-x":[{"skew-x":Pe()}],"skew-y":[{"skew-y":Pe()}],transform:[{transform:[ct,it,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}
vendor: 5,466 bytes, line 49
49],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",ct,it]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ct,it]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[$t,vp,Cl,b1]}],stroke:[{stroke:["none",...U()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wJ=aJ(jJ);function Se(...e){return wJ(Qt(e))}function B5({delayDuration:e=0,...t}){return n.jsx(IZ,{"data-loc":"client/src/components/ui/tooltip.tsx:11","data-slot":"tooltip-provider",delayDuration:e,...t})}function II({...e}){return n.jsx(B5,{"data-loc":"client/src/components/ui/tooltip.tsx:23",children:n.jsx(LZ,{"data-loc":"client/src/components/ui/tooltip.tsx:24","data-slot":"tooltip",...e})})}function LI({...e}){return n.jsx($Z,{"data-loc":"client/src/components/ui/tooltip.tsx:32","data-slot":"tooltip-trigger",...e})}function $I({className:e,sideOffset:t=0,children:a,...s}){return n.jsx(zZ,{"data-loc":"client/src/components/ui/tooltip.tsx:42",children:n.jsxs(UZ,{"data-loc":"client/src/components/ui/tooltip.tsx:43","data-slot":"tooltip-content",sideOffset:t,className:Se("bg-foreground text-background 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
49de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...s,children:[a,n.jsx(qZ,{"data-loc":"client/src/components/ui/tooltip.tsx:53",className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const gk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hk=Qt,I5=(e,t)=>a=>{var s;if(t?.variants==null)return hk(e,a?.class,a?.className);const{variants:r,defaultVariants:i}=t,l=Object.keys(r).map(p=>{const x=a?.[p],m=i?.[p];if(x===null)return null;const h=gk(x)||gk(m);return r[p][h]}),d=a&&Object.entries(a).reduce((p,x)=>{let[m,h]=x;return h===void 0||(p[m]=h),p},{}),u=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((p,x)=>{let{class:m,className:h,...y}=x;return Object.entries(y).every(w=>{let[b,j]=w;return Array.isArray(j)?j.includes({...i,...d}[b]):{...i,...d}[b]===j})?[...p,m,h]:p},[]);return hk(e,l,u,a?.class,a?.className)},ff=I5("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-transparent shadow-xs hover:bg-accent dark:bg-transparent dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function te({className:e,variant:t,size:a,asChild:s=!1,...r}){const i=s?S5:"button";return n.jsx(i,{"data-loc":"client/src/components/ui/button.tsx:52","data-slot":"button",className:Se(ff({variant:t,size:a,className:e})),...r})}function Ke({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:7","data-slot":"card",className:Se("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Nt({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:20","data-slot":"card-header",className:Se("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function St({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:33","data-slot":"card-title",className:Se("leading-none font-semibold",e),...t})}function j1({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:43","data-slot":"card-description",className:Se("text-muted-foreground text-sm",e),...t})}function Ze({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/card.tsx:66","data-slot":"card-content",className:Se("px-6",e),...t})}/**
50 * @license lucide-react v0.453.0 - ISC
51 *
52 * This source code is licensed under the ISC license.
53 * See the LICENSE file in the root directory of this source tree.
54 */const NJ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zI=(...e)=>e.filter((t,a,s)=>!!t&&s.indexOf(t)===a).join(" ");/**
55 * @license lucide-react v0.453.0 - ISC
56 *
57 * This source code is licensed under the ISC license.
58 * See the LICENSE file in the root directory of this source tree.
59 */var SJ={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"};/**
60 * @license lucide-react v0.453.0 - ISC
61 *
62 * This source code is licensed under the ISC license.
63 * See the LICENSE file in the root directory of this source tree.
64 */const CJ=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:a=2,absoluteStrokeWidth:s,className:r="",children:i,iconNode:l,...d},u)=>v.createElement("svg",{ref:u,...SJ,width:t,height:t,stroke:e,strokeWidth:s?Number(a)*24/Number(t):a,className:zI("lucide",r),...d},[...l.map(([p,x])=>v.createElement(p,x)),...Array.isArray(i)?i:[i]]));/**
65 * @license lucide-react v0.453.0 - ISC
66 *
67 * This source code is licensed under the ISC license.
68 * See the LICENSE file in the root directory of this source tree.
69 */const Ne=(e,t)=>{const a=v.forwardRef(({className:s,...r},i)=>v.createElement(CJ,{ref:i,iconNode:t,className:zI(`lucide-${NJ(e)}`,s),...r}));return a.displayName=`${e}`,a};/**
70 * @license lucide-react v0.453.0 - ISC
71 *
72 * This source code is licensed under the ISC license.
73 * See the LICENSE file in the root directory of this source tree.
74 */const Ks=Ne("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
74-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
75 * @license lucide-react v0.453.0 - ISC
76 *
77 * This source code is licensed under the ISC license.
78 * See the LICENSE file in the root directory of this source tree.
79 */const w1=Ne("AlignCenter",[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
80 * @license lucide-react v0.453.0 - ISC
81 *
82 * This source code is licensed under the ISC license.
83 * See the LICENSE file in the root directory of this source tree.
84 */const vk=Ne("AlignJustify",[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]]);/**
85 * @license lucide-react v0.453.0 - ISC
86 *
87 * This source code is licensed under the ISC license.
88 * See the LICENSE file in the root directory of this source tree.
89 */const Yg=Ne("AlignLeft",[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
90 * @license lucide-react v0.453.0 - ISC
91 *
92 * This source code is licensed under the ISC license.
93 * See the LICENSE file in the root directory of this source tree.
94 */const N1=Ne("AlignRight",[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]]);/**
95 * @license lucide-react v0.453.0 - ISC
96 *
97 * This source code is licensed under the ISC license.
98 * See the LICENSE file in the root directory of this source tree.
99 */const S1=Ne("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
100 * @license lucide-react v0.453.0 - ISC
101 *
102 * This source code is licensed under the ISC license.
103 * See the LICENSE file in the root directory of this source tree.
104 */const rs=Ne("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
105 * @license lucide-react v0.453.0 - ISC
106 *
107 * This source code is licensed under the ISC license.
108 * See the LICENSE file in the root directory of this source tree.
109 */const fd=Ne("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
110 * @license lucide-react v0.453.0 - ISC
111 *
112 * This source code is licensed under the ISC license.
113 * See the LICENSE file in the root directory of this source tree.
114 */const EJ=Ne("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
115 * @license lucide-react v0.453.0 - ISC
116 *
117 * This source code is licensed under the ISC license.
118 * See the LICENSE file in the root directory of this source tree.
119 */const AJ=Ne("AtSign",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]);/**
120 * @license lucide-react v0.453.0 - ISC
121 *
122 * This source code is licensed under the ISC license.
123 * See the LICENSE file in the root directory of this source tree.
124 */const mf=Ne("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"}]]);/**
125 * @license lucide-react v0.453.0 - ISC
126 *
127 * This source code is licensed under the ISC license.
128 * See the LICENSE file in the root directory of this source tree.
129 */const yk=Ne("Bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
130 * @license lucide-react v0.453.0 - ISC
131 *
132 * This source code is licensed under the ISC license.
133 * See the LICENSE file in the root directory of this source tree.
134 */const UI=Ne("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"}]]);/**
135 * @license lucide-react v0.453.0 - ISC
136 *
137 * This source code is licensed under the ISC license.
138 * See the LICENSE file in the root directory of this source tree.
139 */const DJ=Ne("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);/**
140 * @license lucide-react v0.453.0 - ISC
141 *
142 * This source code is licensed under the ISC license.
143 * See the LICENSE file in the root directory of this source tree.
144 */const qI=Ne("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"}
144],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
145 * @license lucide-react v0.453.0 - ISC
146 *
147 * This source code is licensed under the ISC license.
148 * See the LICENSE file in the root directory of this source tree.
149 */const OJ=Ne("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
150 * @license lucide-react v0.453.0 - ISC
151 *
152 * This source code is licensed under the ISC license.
153 * See the LICENSE file in the root directory of this source tree.
154 */const AS=Ne("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"}]]);/**
155 * @license lucide-react v0.453.0 - ISC
156 *
157 * This source code is licensed under the ISC license.
158 * See the LICENSE file in the root directory of this source tree.
159 */const L5=Ne("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"}]]);/**
160 * @license lucide-react v0.453.0 - ISC
161 *
162 * This source code is licensed under the ISC license.
163 * See the LICENSE file in the root directory of this source tree.
164 */const xf=Ne("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
165 * @license lucide-react v0.453.0 - ISC
166 *
167 * This source code is licensed under the ISC license.
168 * See the LICENSE file in the root directory of this source tree.
169 */const ss=Ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
170 * @license lucide-react v0.453.0 - ISC
171 *
172 * This source code is licensed under the ISC license.
173 * See the LICENSE file in the root directory of this source tree.
174 */const Tn=Ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
175 * @license lucide-react v0.453.0 - ISC
176 *
177 * This source code is licensed under the ISC license.
178 * See the LICENSE file in the root directory of this source tree.
179 */const Rc=Ne("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
180 * @license lucide-react v0.453.0 - ISC
181 *
182 * This source code is licensed under the ISC license.
183 * See the LICENSE file in the root directory of this source tree.
184 */const Es=Ne("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
185 * @license lucide-react v0.453.0 - ISC
186 *
187 * This source code is licensed under the ISC license.
188 * See the LICENSE file in the root directory of this source tree.
189 */const Bi=Ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
190 * @license lucide-react v0.453.0 - ISC
191 *
192 * This source code is licensed under the ISC license.
193 * See the LICENSE file in the root directory of this source tree.
194 */const DS=Ne("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
195 * @license lucide-react v0.453.0 - ISC
196 *
197 * This source code is licensed under the ISC license.
198 * See the LICENSE file in the root directory of this source tree.
199 */const $5=Ne("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"}]]);/**
200 * @license lucide-react v0.453.0 - ISC
201 *
202 * This source code is licensed under the ISC license.
203 * See the LICENSE file in the root directory of this source tree.
204 */const jn=Ne("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
205 * @license lucide-react v0.453.0 - ISC
206 *
207 * This source code is licensed under the ISC license.
208 * See the LICENSE file in the root directory of this source tree.
209 */const Kl=Ne("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
210 * @license lucide-react v0.453.0 - ISC
211 *
212 * This source code is licensed under the ISC license.
213 * See the LICENSE file in the root directory of this source tree.
214 */const bk=Ne("CirclePause",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/**
215 * @license lucide-react v0.453.0 - ISC
216 *
217 * This source code is licensed under the ISC license.
218 * See the LICENSE file in the root directory of this source tree.
219 */const kJ=Ne("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
220 * @license lucide-react v0.453.0 - ISC
221 *
222 * This source code is licensed under the ISC license.
223 * See the LICENSE file in the root directory of this source tree.
224 */const gf=Ne("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"}]]);/**
225 * @license lucide-react v0.453.0 - ISC
226 *
227 * This source code is licensed under the ISC license.
228 * See the LICENSE file in the root directory of this source tree.
229 */const Vp=Ne("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"}]]);/**
230 * @license lucide-react v0.453.0 - ISC
231 *
232 * This source code is licensed under the ISC license.
233 * See the LICENSE file in the root directory of this source tree.
234 */const jr=Ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
235 * @license lucide-react v0.453.0 - ISC
236 *
237 * This source code is licensed under the ISC license.
238 * See the LICENSE file in the root directory of this source tree.
239 */const FI=Ne("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
240 * @license lucide-react v0.453.0 - ISC
241 *
242 * This source code is licensed under the ISC license.
243 * See the LICENSE file in the root directory of this source tree.
244 */const WI=Ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
245 * @license lucide-react v0.453.0 - ISC
246 *
247 * This source code is licensed under the ISC license.
248 * See the LICENSE file in the root directory of this source tree.
249 */const _J=Ne("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
250 * @license lucide-react v0.453.0 - ISC
251 *
252 * This source code is licensed under the ISC license.
253 * See the LICENSE file in the root directory of this source tree.
254 */const Ra=Ne("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"}]]);/**
255 * @license lucide-react v0.453.0 - ISC
256 *
257 * This source code is licensed under the ISC license.
258 * See the LICENSE file in the root directory of this source tree.
259 */const HI=Ne("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/**
260 * @license lucide-react v0.453.0 - ISC
261 *
262 * This source code is licensed under the ISC license.
263 * See the LICENSE file in the root directory of this source tree.
264 */const TJ=Ne("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"}]]);/**
265 * @license lucide-react v0.453.0 - ISC
266 *
267 * This source code is licensed under the ISC license.
268 * See the LICENSE file in the root directory of this source tree.
269 */const C1=Ne("Dices",[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2",key:"6agr2n"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6",key:"1o487t"}],["path",{d:"M6 18h.01",key:"uhywen"}],["path",{d:"M10 14h.01",key:"ssrbsk"}],["path",{d:"M15 6h.01",key:"cblpky"}],["path",{d:"M18 9h.01",key:"2061c0"}]]);/**
270 * @license lucide-react v0.453.0 - ISC
271 *
272 * This source code is licensed under the ISC license.
273 * See the LICENSE file in the root directory of this source tree.
274 */const Ii=Ne("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"}]]);/**
275 * @license lucide-react v0.453.0 - ISC
276 *
277 * This source code is licensed under the ISC license.
278 * See the LICENSE file in the root directory of this source tree.
279 */const Bc=Ne("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"}]]);/**
280 * @license lucide-react v0.453.0 - ISC
281 *
282 * This source code is licensed under the ISC license.
283 * See the LICENSE file in the root directory of this source tree.
284 */const Li=Ne("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"}]]);/**
285 * @license lucide-react v0.453.0 - ISC
286 *
287 * This source code is licensed under the ISC license.
288 * See the LICENSE file in the root directory of this source tree.
289 */const jk=Ne("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/**
290 * @license lucide-react v0.453.0 - ISC
291 *
292 * This source code is licensed under the ISC license.
293 * See the LICENSE file in the root directory of this source tree.
294 */const zv=Ne("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"}]]);/**
295 * @license lucide-react v0.453.0 - ISC
296 *
297 * This source code is licensed under the ISC license.
298 * See the LICENSE file in the root directory of this source tree.
299 */const VI=Ne("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"}]]);/**
300 * @license lucide-react v0.453.0 - ISC
301 *
302 * This source code is licensed under the ISC license.
303 * See the LICENSE file in the root directory of this source tree.
304 */const la=Ne("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"}]]);/**
305 * @license lucide-react v0.453.0 - ISC
306 *
307 * This source code is licensed under the ISC license.
308 * See the LICENSE file in the root directory of this source tree.
309 */const GI=Ne("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",ke
309y:"1mlx9k"}]]);/**
310 * @license lucide-react v0.453.0 - ISC
311 *
312 * This source code is licensed under the ISC license.
313 * See the LICENSE file in the root directory of this source tree.
314 */const hf=Ne("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"}]]);/**
315 * @license lucide-react v0.453.0 - ISC
316 *
317 * This source code is licensed under the ISC license.
318 * See the LICENSE file in the root directory of this source tree.
319 */const ch=Ne("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
320 * @license lucide-react v0.453.0 - ISC
321 *
322 * This source code is licensed under the ISC license.
323 * See the LICENSE file in the root directory of this source tree.
324 */const PJ=Ne("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"}]]);/**
325 * @license lucide-react v0.453.0 - ISC
326 *
327 * This source code is licensed under the ISC license.
328 * See the LICENSE file in the root directory of this source tree.
329 */const wk=Ne("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]);/**
330 * @license lucide-react v0.453.0 - ISC
331 *
332 * This source code is licensed under the ISC license.
333 * See the LICENSE file in the root directory of this source tree.
334 */const Gp=Ne("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
335 * @license lucide-react v0.453.0 - ISC
336 *
337 * This source code is licensed under the ISC license.
338 * See the LICENSE file in the root directory of this source tree.
339 */const YI=Ne("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
340 * @license lucide-react v0.453.0 - ISC
341 *
342 * This source code is licensed under the ISC license.
343 * See the LICENSE file in the root directory of this source tree.
344 */const $i=Ne("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"}]]);/**
345 * @license lucide-react v0.453.0 - ISC
346 *
347 * This source code is licensed under the ISC license.
348 * See the LICENSE file in the root directory of this source tree.
349 */const MJ=Ne("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/**
350 * @license lucide-react v0.453.0 - ISC
351 *
352 * This source code is licensed under the ISC license.
353 * See the LICENSE file in the root directory of this source tree.
354 */const RJ=Ne("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"}]]);/**
355 * @license lucide-react v0.453.0 - ISC
356 *
357 * This source code is licensed under the ISC license.
358 * See the LICENSE file in the root directory of this source tree.
359 */const Fl=Ne("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"}]]);/**
360 * @license lucide-react v0.453.0 - ISC
361 *
362 * This source code is licensed under the ISC license.
363 * See the LICENSE file in the root directory of this source tree.
364 */const BJ=Ne("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["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"}]]);/**
365 * @license lucide-react v0.453.0 - ISC
366 *
367 * This source code is licensed under the ISC license.
368 * See the LICENSE file in the root directory of this source tree.
369 */const IJ=Ne("IndentDecrease",[["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 18H11",key:"4wu86t"}],["path",{d:"M21 6H11",key:"6dy1d6"}],["path",{d:"m7 8-4 4 4 4",key:"o5hrat"}]]);/**
370 * @license lucide-react v0.453.0 - ISC
371 *
372 * This source code is licensed under the ISC license.
373 * See the LICENSE file in the root directory of this source tree.
374 */const LJ=Ne("IndentIncrease",[["path",{d:"M21 12H11",key:"wd7e0v"}],["path",{d:"M21 18H11",key:"4wu86t"}],["path",{d:"M21 6H11",key:"6dy1d6"}],["path",{d:"m3 8 4 4-4 4",key:"1a3j6y"}]]);/**
375 * @license lucide-react v0.453.0 - ISC
376 *
377 * This source code is licensed under the ISC license.
378 * See the LICENSE file in the root directory of this source tree.
379 */const Uv=Ne("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
380 * @license lucide-react v0.453.0 - ISC
381 *
382 * This source code is licensed under the ISC license.
383 * See the LICENSE file in the root directory of this source tree.
384 */const Nk=Ne("Italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
385 * @license lucide-react v0.453.0 - ISC
386 *
387 * This source code is licensed under the ISC license.
388 * See the LICENSE file in the root directory of this source tree.
389 */const OS=Ne("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"}]]);/**
390 * @license lucide-react v0.453.0 - ISC
391 *
392 * This source code is licensed under the ISC license.
393 * See the LICENSE file in the root directory of this source tree.
394 */const Rl=Ne("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
395 * @license lucide-react v0.453.0 - ISC
396 *
397 * This source code is licensed under the ISC license.
398 * See the LICENSE file in the root directory of this source tree.
399 */const z5=Ne("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
400 * @license lucide-react v0.453.0 - ISC
401 *
402 * This source code is licensed under the ISC license.
403 * See the LICENSE file in the root directory of this source tree.
404 */const Sk=Ne("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"}]]);/**
405 * @license lucide-react v0.453.0 - ISC
406 *
407 * This source code is licensed under the ISC license.
408 * See the LICENSE file in the root directory of this source tree.
409 */const $J=Ne("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/**
410 * @license lucide-react v0.453.0 - ISC
411 *
412 * This source code is licensed under the ISC license.
413 * See the LICENSE file in the root directory of this source tree.
414 */const kS=Ne("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
415 * @license lucide-react v0.453.0 - ISC
416 *
417 * This source code is licensed under the ISC license.
418 * See the LICENSE file in the root directory of this source tree.
419 */const Ot=Ne("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
420 * @license lucide-react v0.453.0 - ISC
421 *
422 * This source code is licensed under the ISC license.
423 * See the LICENSE file in the root directory of this source tree.
424 */const KI=Ne("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"}]]);/**
425 * @license lucide-react v0.453.0 - ISC
426 *
427 * This source code is licensed under the ISC license.
428 * See the LICENSE file in the root directory of this source tree.
429 */const zJ=Ne("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/**
430 * @license lucide-react v0.453.0 - ISC
431 *
432 * This source code is licensed under the ISC license.
433 * See the LICENSE file in the root directory of this source tree.
434 */const Kg=Ne("MailX",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h9",key:"1j9vog"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m17 17 4 4",key:"1b3523"}],["path",{d:"m21 17-4 4",key:"uinynz"}]]);/**
435 * @license lucide-react v0.453.0 - ISC
436 *
437 * This source code is licensed under the ISC license.
438 * See the LICENSE file in the root directory of this source tree.
439 */const ja=Ne("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"}]]);/**
440 * @license lucide-react v0.453.0 - ISC
441 *
442 * This source code is licensed under the ISC license.
443 * See the LICENSE file in the root directory of this source tree.
444 */const UJ=Ne("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"}]]);/**
445 * @license lucide-react v0.453.0 - ISC
446 *
447 * This source code is licensed under the ISC license.
448 * See the LICENSE file in the root directory of this source tree.
449 */const qJ=Ne("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"}]]);/**
450 * @license lucide-react v0.453.0 - ISC
451 *
452 * This source code is licensed under the ISC license.
453 * See the LICENSE file in the root directory of this source tree.
454 */const QI=Ne("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
455 * @license lucide-react v0.453.0 - ISC
456 *
457 * This source code is licensed under the ISC license.
458 * See the LICENSE file in the root directory of this source tree.
459 */const XI=Ne("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"}]]);/**
460 * @license lucide-react v0.453.0 - ISC
461 *
462 * This source code is licensed under the ISC license.
463 * See the LICENSE file in the root directory of this source tree.
464 */const Ic=Ne("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
464074z",key:"s0h3yz"}]]);/**
465 * @license lucide-react v0.453.0 - ISC
466 *
467 * This source code is licensed under the ISC license.
468 * See the LICENSE file in the root directory of this source tree.
469 */const Yp=Ne("MousePointer",[["path",{d:"M12.586 12.586 19 19",key:"ea5xo7"}],["path",{d:"M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z",key:"277e5u"}]]);/**
470 * @license lucide-react v0.453.0 - ISC
471 *
472 * This source code is licensed under the ISC license.
473 * See the LICENSE file in the root directory of this source tree.
474 */const ZI=Ne("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
475 * @license lucide-react v0.453.0 - ISC
476 *
477 * This source code is licensed under the ISC license.
478 * See the LICENSE file in the root directory of this source tree.
479 */const FJ=Ne("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"}]]);/**
480 * @license lucide-react v0.453.0 - ISC
481 *
482 * This source code is licensed under the ISC license.
483 * See the LICENSE file in the root directory of this source tree.
484 */const U5=Ne("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
485 * @license lucide-react v0.453.0 - ISC
486 *
487 * This source code is licensed under the ISC license.
488 * See the LICENSE file in the root directory of this source tree.
489 */const mr=Ne("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
490 * @license lucide-react v0.453.0 - ISC
491 *
492 * This source code is licensed under the ISC license.
493 * See the LICENSE file in the root directory of this source tree.
494 */const WJ=Ne("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"}]]);/**
495 * @license lucide-react v0.453.0 - ISC
496 *
497 * This source code is licensed under the ISC license.
498 * See the LICENSE file in the root directory of this source tree.
499 */const HJ=Ne("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
500 * @license lucide-react v0.453.0 - ISC
501 *
502 * This source code is licensed under the ISC license.
503 * See the LICENSE file in the root directory of this source tree.
504 */const JI=Ne("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"}]]);/**
505 * @license lucide-react v0.453.0 - ISC
506 *
507 * This source code is licensed under the ISC license.
508 * See the LICENSE file in the root directory of this source tree.
509 */const Wt=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
510 * @license lucide-react v0.453.0 - ISC
511 *
512 * This source code is licensed under the ISC license.
513 * See the LICENSE file in the root directory of this source tree.
514 */const VJ=Ne("Redo2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
515 * @license lucide-react v0.453.0 - ISC
516 *
517 * This source code is licensed under the ISC license.
518 * See the LICENSE file in the root directory of this source tree.
519 */const Vr=Ne("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"}]]);/**
520 * @license lucide-react v0.453.0 - ISC
521 *
522 * This source code is licensed under the ISC license.
523 * See the LICENSE file in the root directory of this source tree.
524 */const e9=Ne("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"}]]);/**
525 * @license lucide-react v0.453.0 - ISC
526 *
527 * This source code is licensed under the ISC license.
528 * See the LICENSE file in the root directory of this source tree.
529 */const Md=Ne("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"}]]);/**
530 * @license lucide-react v0.453.0 - ISC
531 *
532 * This source code is licensed under the ISC license.
533 * See the LICENSE file in the root directory of this source tree.
534 */const Gr=Ne("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
535 * @license lucide-react v0.453.0 - ISC
536 *
537 * This source code is licensed under the ISC license.
538 * See the LICENSE file in the root directory of this source tree.
539 */const Lc=Ne("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"}]]);/**
540 * @license lucide-react v0.453.0 - ISC
541 *
542 * This source code is licensed under the ISC license.
543 * See the LICENSE file in the root directory of this source tree.
544 */const q5=Ne("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"}]]);/**
545 * @license lucide-react v0.453.0 - ISC
546 *
547 * This source code is licensed under the ISC license.
548 * See the LICENSE file in the root directory of this source tree.
549 */const t9=Ne("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
550 * @license lucide-react v0.453.0 - ISC
551 *
552 * This source code is licensed under the ISC license.
553 * See the LICENSE file in the root directory of this source tree.
554 */const GJ=Ne("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"}]]);/**
555 * @license lucide-react v0.453.0 - ISC
556 *
557 * This source code is licensed under the ISC license.
558 * See the LICENSE file in the root directory of this source tree.
559 */const Qg=Ne("ShieldAlert",[["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
559y:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
560 * @license lucide-react v0.453.0 - ISC
561 *
562 * This source code is licensed under the ISC license.
563 * See the LICENSE file in the root directory of this source tree.
564 */const _S=Ne("ShieldBan",[["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"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/**
565 * @license lucide-react v0.453.0 - ISC
566 *
567 * This source code is licensed under the ISC license.
568 * See the LICENSE file in the root directory of this source tree.
569 */const js=Ne("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",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
570 * @license lucide-react v0.453.0 - ISC
571 *
572 * This source code is licensed under the ISC license.
573 * See the LICENSE file in the root directory of this source tree.
574 */const YJ=Ne("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/**
575 * @license lucide-react v0.453.0 - ISC
576 *
577 * This source code is licensed under the ISC license.
578 * See the LICENSE file in the root directory of this source tree.
579 */const yd=Ne("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"}]]);/**
580 * @license lucide-react v0.453.0 - ISC
581 *
582 * This source code is licensed under the ISC license.
583 * See the LICENSE file in the root directory of this source tree.
584 */const zi=Ne("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"}]]);/**
585 * @license lucide-react v0.453.0 - ISC
586 *
587 * This source code is licensed under the ISC license.
588 * See the LICENSE file in the root directory of this source tree.
589 */const KJ=Ne("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
590 * @license lucide-react v0.453.0 - ISC
591 *
592 * This source code is licensed under the ISC license.
593 * See the LICENSE file in the root directory of this source tree.
594 */const Ck=Ne("Snowflake",[["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"m20 16-4-4 4-4",key:"rquw4f"}],["path",{d:"m4 8 4 4-4 4",key:"12s3z9"}],["path",{d:"m16 4-4 4-4-4",key:"1tumq1"}],["path",{d:"m8 20 4-4 4 4",key:"9p200w"}]]);/**
595 * @license lucide-react v0.453.0 - ISC
596 *
597 * This source code is licensed under the ISC license.
598 * See the LICENSE file in the root directory of this source tree.
599 */const qr=Ne("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"}]]);/**
600 * @license lucide-react v0.453.0 - ISC
601 *
602 * This source code is licensed under the ISC license.
603 * See the LICENSE file in the root directory of this source tree.
604 */const Ek=Ne("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
605 * @license lucide-react v0.453.0 - ISC
606 *
607 * This source code is licensed under the ISC license.
608 * See the LICENSE file in the root directory of this source tree.
609 */const Ak=Ne("Strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
610 * @license lucide-react v0.453.0 - ISC
611 *
612 * This source code is licensed under the ISC license.
613 * See the LICENSE file in the root directory of this source tree.
614 */const vf=Ne("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
615 * @license lucide-react v0.453.0 - ISC
616 *
617 * This source code is licensed under the ISC license.
618 * See the LICENSE file in the root directory of this source tree.
619 */const QJ=Ne("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/**
620 * @license lucide-react v0.453.0 - ISC
621 *
622 * This source code is licensed under the ISC license.
623 * See the LICENSE file in the root directory of this source tree.
624 */const XJ=Ne("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"}]]);/**
625 * @license lucide-react v0.453.0 - ISC
626 *
627 * This source code is licensed under the ISC license.
628 * See the LICENSE file in the root directory of this source tree.
629 */const Dk=Ne("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"}]]);/**
630 * @license lucide-react v0.453.0 - ISC
631 *
632 * This source code is licensed under the ISC license.
633 * See the LICENSE file in the root directory of this source tree.
634 */const a9=Ne("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]);/**
635 * @license lucide-react v0.453.0 - ISC
636 *
637 * This source code is licensed under the ISC license.
638 * See the LICENSE file in the root directory of this source tree.
639 */const n9=Ne("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]);/**
640 * @license lucide-react v0.453.0 - ISC
641 *
642 * This source code is licensed under the ISC license.
643 * See the LICENSE file in the root directory of this source tree.
644 */const Ua=Ne("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"}]]);/**
645 * @license lucide-react v0.453.0 - ISC
646 *
647 * This source code is licensed under the ISC license.
648 * See the LICENSE file in the root directory of this source tree.
649 */const lh=Ne("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
650 * @license lucide-react v0.453.0 - ISC
651 *
652 * This source code is licensed under the ISC license.
653 * See the LICENSE file in the root directory of this source tree.
654 */const _n=Ne("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"}]]);/**
655 * @license lucide-react v0.453.0 - ISC
656 *
657 * This source code is licensed under the ISC license.
658 * See the LICENSE file in the root directory of this source tree.
659 */const Ia=Ne("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"}]]);/**
660 * @license lucide-react v0.453.0 - ISC
661 *
662 * This source code is licensed under the ISC license.
663 * See the LICENSE file in the root directory of this source tree.
664 */const F5=Ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/**
665 * @license lucide-react v0.453.0 - ISC
666 *
667 * This source code is licensed under the ISC license.
668 * See the LICENSE file in the root directory of this source tree.
669 */const Ok=Ne("Underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",ke
vendor: 4,788 bytes, lines 669-727
669y:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
670 * @license lucide-react v0.453.0 - ISC
671 *
672 * This source code is licensed under the ISC license.
673 * See the LICENSE file in the root directory of this source tree.
674 */const ZJ=Ne("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
675 * @license lucide-react v0.453.0 - ISC
676 *
677 * This source code is licensed under the ISC license.
678 * See the LICENSE file in the root directory of this source tree.
679 */const Ns=Ne("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"}]]);/**
680 * @license lucide-react v0.453.0 - ISC
681 *
682 * This source code is licensed under the ISC license.
683 * See the LICENSE file in the root directory of this source tree.
684 */const kk=Ne("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
685 * @license lucide-react v0.453.0 - ISC
686 *
687 * This source code is licensed under the ISC license.
688 * See the LICENSE file in the root directory of this source tree.
689 */const Ql=Ne("UserX",[["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"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
690 * @license lucide-react v0.453.0 - ISC
691 *
692 * This source code is licensed under the ISC license.
693 * See the LICENSE file in the root directory of this source tree.
694 */const JJ=Ne("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"}]]);/**
695 * @license lucide-react v0.453.0 - ISC
696 *
697 * This source code is licensed under the ISC license.
698 * See the LICENSE file in the root directory of this source tree.
699 */const wa=Ne("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"}]]);/**
700 * @license lucide-react v0.453.0 - ISC
701 *
702 * This source code is licensed under the ISC license.
703 * See the LICENSE file in the root directory of this source tree.
704 */const TS=Ne("Webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]);/**
705 * @license lucide-react v0.453.0 - ISC
706 *
707 * This source code is licensed under the ISC license.
708 * See the LICENSE file in the root directory of this source tree.
709 */const eee=Ne("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"}]]);/**
710 * @license lucide-react v0.453.0 - ISC
711 *
712 * This source code is licensed under the ISC license.
713 * See the LICENSE file in the root directory of this source tree.
714 */const Ui=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
715 * @license lucide-react v0.453.0 - ISC
716 *
717 * This source code is licensed under the ISC license.
718 * See the LICENSE file in the root directory of this source tree.
719 */const Pa=Ne("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"}]]);function tee(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var a,s,r,i,l=[],d="",u=e.split("/");for(u[0]||u.shift();r=u.shift();)a=r[0],a==="*"?(l.push(a),d+=r[1]==="?"?"(?:/(.*))?":"/(.*)"):a===":"?(s=r.indexOf("?",1),i=r.indexOf(".",1),l.push(r.substring(1,~s?s:~i?i:r.length)),d+=~s&&!~i?"(?:/([^/]+?))?":"/([^/]+?)",~i&&(d+=(~s?"?":"")+"\\"+r.substring(i))):d+="/"+r;return{keys:l,pattern:new RegExp("^"+d+(t?"(?=$|/)":"/?$"),"i")}}var E1={exports:{}},A1={};/**
720 * @license React
721 * use-sync-external-store-shim.production.js
722 *
723 * Copyright (c) Meta Platforms, Inc. and affiliates.
724 *
725 * This source code is licensed under the MIT license found in the
726 * LICENSE file in the root directory of this source tree.
727 */var _k;function aee(){if(_k)return A1;_k=1;var e=wv();function t(m,h){return m===h&&(m!==0||1/m===1/h)||m!==m&&h!==h}var a=typeof Object.is=="function"?Object.is:t,s=e.useState,r=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;
727function d(m,h){var y=h(),w=s({inst:{value:y,getSnapshot:h}}),b=w[0].inst,j=w[1];return i(function(){b.value=y,b.getSnapshot=h,u(b)&&j({inst:b})},[m,y,h]),r(function(){return u(b)&&j({inst:b}),m(function(){u(b)&&j({inst:b})})},[m]),l(y),y}function u(m){var h=m.getSnapshot;m=m.value;try{var y=h();return!a(m,y)}catch{return!0}}function p(m,h){return h()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return A1.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,A1}var Tk;function nee(){return Tk||(Tk=1,E1.exports=aee()),E1.exports}var s9=nee();const see=Nv.useInsertionEffect,ree=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",iee=ree?v.useLayoutEffect:v.useEffect,cee=see||iee,r9=e=>{const t=v.useRef([e,(...a)=>t[0](...a)]).current;return cee(()=>{t[0]=e}),t[1]},lee="popstate",W5="pushState",H5="replaceState",oee="hashchange",Pk=[lee,W5,H5,oee],dee=e=>{for(const t of Pk)addEventListener(t,e);return()=>{for(const t of Pk)removeEventListener(t,e)}},i9=(e,t)=>s9.useSyncExternalStore(dee,e,t),uee=()=>location.search,pee=({ssrSearch:e=""}={})=>i9(uee,()=>e),Mk=()=>location.pathname,fee=({ssrPath:e}={})=>i9(Mk,e?()=>e:Mk),mee=(e,{replace:t=!1,state:a=null}={})=>history[t?H5:W5](a,"",e),xee=(e={})=>[fee(e),mee],Rk=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[Rk]>"u"){for(const e of[W5,H5]){const t=history[e];history[e]=function(){const a=t.apply(this,arguments),s=new Event(e);return s.arguments=arguments,dispatchEvent(s),a}}Object.defineProperty(window,Rk,{value:!0})}const gee=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",c9=(e="")=>e==="/"?"":e,hee=(e,t)=>e[0]==="~"?e.slice(1):c9(t)+e,vee=(e="",t)=>gee(PS(c9(e)),PS(t)),yee=e=>e[0]==="?"?e.slice(1):e,PS=e=>{try{return decodeURI(e)}catch{return e}},bee=e=>PS(yee(e)),l9={hook:xee,searchHook:pee,parser:tee,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e},o9=v.createContext(l9),oo=()=>v.useContext(o9),d9={},u9=v.createContext(d9),Yi=()=>v.useContext(u9),qv=e=>{const[t,a]=e.hook(e);return[vee(e.base,t),r9((s,r)=>a(hee(s,e.base),r))]},La=()=>qv(oo()),V5=()=>{const e=oo();return bee(e.searchHook(e))},G5=(e,t,a,s)=>{const{pattern:r,keys:i}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",s),l=r.exec(a)||[],[d,...u]=l;return d!==void 0?[!0,(()=>{const p=i!==!1?Object.fromEntries(i.map((m,h)=>[m,u[h]])):l.groups;let x={...u};return p&&Object.assign(x,p),x})(),...s?[d]:[]]:[!1,null]},p9=e=>G5(oo().parser,e,La()[0]),jee=({children:e,...t})=>{const a=oo(),s=t.hook?l9:a;let r=s;const[i,l]=t.ssrPath?.split("?")??[];l&&(t.ssrSearch=l,t.ssrPath=i),t.hrefs=t.hrefs??t.hook?.hrefs;let d=v.useRef({}),u=d.current,p=u;for(let x in s){const m=x==="base"?s[x]+(t[x]||""):t[x]||s[x];u===p&&m!==p[x]&&(d.current=p={...p}),p[x]=m,(m!==s[x]||m!==r[x])&&(r=p)}return v.createElement(o9.Provider,{value:r,children:e})},Bk=({children:e,component:t},a)=>t?v.createElement(t,{params:a}):typeof e=="function"?e(a):e,wee=e=>{let t=v.useRef(d9);const a=t.current;return t.current=Object.keys(e).length!==Object.keys(a).length||Object.entries(e).some(([s,r])=>r!==a[s])?e:a},At=({path:e,nest:t,match:a,...s})=>{const r=oo(),[i]=qv(r),[l,d,u]=a??G5(r.parser,e,i,t),p=wee({...Yi(),...d});if(!l)return null;const x=u?v.createElement(jee,{base:u},Bk(s,p)):Bk(s,p);return v.createElement(u9.Provider,{value:p,children:x})},It=v.forwardRef((e,t)=>{const a=oo(),[s,r]=qv(a),{to:i="",href:l=i,onClick:d,asChild:u,children:p,className:x,replace:m,state:h,...y}=e,w=r9(j=>{j.ctrlKey||j.metaKey||j.altKey||j.shiftKey||j.button!==0||(d?.(j),j.defaultPrevented||(j.preventDefault(),r(l,e)))}),b=a.hrefs(l[0]==="~"?l.slice(1):a.base+l,a);return u&&v.isValidElement(p)?v.cloneElement(p,{onClick:w,href:b}):v.createElement("a",{...y,onClick:w,href:b,className:x?.call?x(s===l):x,children:p,ref:t})}),MS=e=>Array.isArray(e)?e.flatMap(t=>MS(t&&t.type===v.Fragment?t.props.children:t)):[e],Nee=({children:e,location:t})=>{const a=oo(),[s]=qv(a);typeof window<"u"&&(window.__WOUTER_ROUTES__||(window.__WOUTER_ROUTES__=[]),MS(e).forEach(i=>
727{if(v.isValidElement(i)&&i.props.path){const l=i.props.path;window.__WOUTER_ROUTES__.includes(l)||window.__WOUTER_ROUTES__.push(l)}}));for(const r of MS(e)){let i=0;if(v.isValidElement(r)&&(i=G5(a.parser,r.props.path,t||s,r.props.nest))[0])return v.cloneElement(r,{match:i})}return null};function Ik(){const[,e]=La(),t=()=>{e("/")};return n.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:14",className:"min-h-screen w-full flex items-center justify-center bg-gradient-to-br from-slate-50 to-slate-100",children:n.jsx(Ke,{"data-loc":"client/src/pages/NotFound.tsx:15",className:"w-full max-w-lg mx-4 shadow-lg border-0 bg-white/80 backdrop-blur-sm",children:n.jsxs(Ze,{"data-loc":"client/src/pages/NotFound.tsx:16",className:"pt-8 pb-8 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:17",className:"flex justify-center mb-6",children:n.jsxs("div",{"data-loc":"client/src/pages/NotFound.tsx:18",className:"relative",children:[n.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:19",className:"absolute inset-0 bg-red-100 rounded-full animate-pulse"}),n.jsx($5,{"data-loc":"client/src/pages/NotFound.tsx:20",className:"relative h-16 w-16 text-red-500"})]})}),n.jsx("h1",{"data-loc":"client/src/pages/NotFound.tsx:24",className:"text-4xl font-bold text-slate-900 mb-2",children:"404"}),n.jsx("h2",{"data-loc":"client/src/pages/NotFound.tsx:26",className:"text-xl font-semibold text-slate-700 mb-4",children:"Page Not Found"}),n.jsxs("p",{"data-loc":"client/src/pages/NotFound.tsx:30",className:"text-slate-600 mb-8 leading-relaxed",children:["Sorry, the page you are looking for doesn't exist.",n.jsx("br",{"data-loc":"client/src/pages/NotFound.tsx:32"}),"It may have been moved or deleted."]}),n.jsx("div",{"data-loc":"client/src/pages/NotFound.tsx:36",id:"not-found-button-group",className:"flex flex-col sm:flex-row gap-3 justify-center",children:n.jsxs(te,{"data-loc":"client/src/pages/NotFound.tsx:40",onClick:t,className:"bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-lg transition-all duration-200 shadow-md hover:shadow-lg",children:[n.jsx(RJ,{"data-loc":"client/src/pages/NotFound.tsx:44",className:"w-4 h-4 mr-2"}),"Go Home"]})})]})})})}class See extends v.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}render(){return this.state.hasError?n.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:27",className:"flex items-center justify-center min-h-screen p-8 bg-background",children:n.jsxs("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:28",className:"flex flex-col items-center w-full max-w-2xl p-8",children:[n.jsx(Ia,{"data-loc":"client/src/components/ErrorBoundary.tsx:29",size:48,className:"text-destructive mb-6 flex-shrink-0"}),n.jsx("h2",{"data-loc":"client/src/components/ErrorBoundary.tsx:34",className:"text-xl mb-4",children:"An unexpected error occurred."}),n.jsx("div",{"data-loc":"client/src/components/ErrorBoundary.tsx:36",className:"p-4 w-full rounded bg-muted overflow-auto mb-6",children:n.jsx("pre",{"data-loc":"client/src/components/ErrorBoundary.tsx:37",className:"text-sm text-muted-foreground whitespace-break-spaces",children:this.state.error?.stack})}),n.jsxs("button",{"data-loc":"client/src/components/ErrorBoundary.tsx:42",onClick:()=>window.location.reload(),className:Se("flex items-center gap-2 px-4 py-2 rounded-lg","bg-primary text-primary-foreground","hover:opacity-90 cursor-pointer"),children:[n.jsx(e9,{"data-loc":"client/src/components/ErrorBoundary.tsx:50",size:16}),"Reload Page"]})]})}):this.props.children}}const Cee=v.createContext(void 0);function Eee({children:e,defaultTheme:t="light",switchable:a=!1}){const[s,r]=v.useState(()=>a&&localStorage.getItem("theme")||t);v.useEffect(()=>{const l=document.documentElement;s==="dark"?l.classList.add("dark"):l.classList.remove("dark"),a&&localStorage.setItem("theme",s)},[s,a]);const i=a?()=>{r(l=>l==="light"?"dark":"light")}:void 0;return n.jsx(Cee.Provider,{"data-loc":"client/src/contexts/ThemeContext.tsx:52",value:{theme:s,toggleTheme:i,switchable:a},children:e})}const uo=()=>{const e="https://manus.im",t="5KqQXaLmVbMYwCWbyhuUUG",a=`${window.location.origin}
727/api/oauth/callback`,s=btoa(a),r=new URL(`${e}/app-auth`);return r.searchParams.set("appId",t),r.searchParams.set("redirectUri",a),r.searchParams.set("state",s),r.searchParams.set("type","signIn"),r.toString()};function Jc(e){const{redirectOnUnauthenticated:t=!1,redirectPath:a=uo()}={},s=le.useUtils(),r=le.auth.me.useQuery(void 0,{retry:!1,refetchOnWindowFocus:!1}),i=le.auth.logout.useMutation({onSuccess:()=>{s.auth.me.setData(void 0,null)}}),l=v.useCallback(async()=>{try{await i.mutateAsync()}catch(u){if(u instanceof kd&&u.data?.code==="UNAUTHORIZED")return;throw u}finally{s.auth.me.setData(void 0,null),await s.auth.me.invalidate()}},[i,s]),d=v.useMemo(()=>(localStorage.setItem("manus-runtime-user-info",JSON.stringify(r.data)),{user:r.data??null,loading:r.isLoading||i.isPending,error:r.error??i.error??null,isAuthenticated:!!r.data}),[r.data,r.error,r.isLoading,i.error,i.isPending]);return v.useEffect(()=>{t&&(r.isLoading||i.isPending||d.user||typeof window>"u"||window.location.pathname!==a&&(window.location.href=a))},[t,a,i.isPending,r.isLoading,d.user]),{...d,refresh:()=>r.refetch(),logout:l}}function Lk(){const{user:e,loading:t}=Jc(),[,a]=La();v.useEffect(()=>{!t&&e&&(e.role==="admin"?a("/admin"):a("/dashboard"))},[e,t,a]);const s=()=>{window.location.href=uo()},r=[{icon:ja,label:"Smart Campaigns",desc:"Broadcast & automated email flows"},{icon:_n,label:"Trading Triggers",desc:"Account funded, challenge passed & more"},{icon:L5,label:"Deep Analytics",desc:"Opens, clicks, revenue attribution"},{icon:yd,label:"Deliverability First",desc:"Built on Amazon SES infrastructure"}];return n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:34",className:"min-h-screen flex hero-gradient",children:[n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:36",className:"hidden lg:flex flex-col justify-between w-1/2 p-12 border-r border-border/50",children:[n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:37",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:38",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/Login.tsx:39",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:41",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:44",className:"space-y-8",children:[n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:45",children:[n.jsxs("h1",{"data-loc":"client/src/pages/Login.tsx:46",className:"text-4xl font-bold text-foreground leading-tight mb-4",children:["Email marketing built for"," ",n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:48",className:"gradient-text",children:"prop firms & crypto"})]}),n.jsx("p",{"data-loc":"client/src/pages/Login.tsx:50",className:"text-muted-foreground text-lg leading-relaxed",children:"The only ESP purpose-built for the trading industry. Trigger emails from trading events, segment by account type, and track revenue attribution with precision."})]}),n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:57",className:"grid grid-cols-2 gap-4",children:r.map(({icon:i,label:l,desc:d})=>n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:59",className:"glass-card rounded-xl p-4 space-y-2",children:[n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:60",className:"w-8 h-8 rounded-lg bg-primary/15 flex items-center justify-center",children:n.jsx(i,{"data-loc":"client/src/pages/Login.tsx:61",className:"w-4 h-4 text-primary"})}),n.jsx("p",{"data-loc":"client/src/pages/Login.tsx:63",className:"text-sm font-semibold text-foreground",children:l}),n.jsx("p",{"data-loc":"client/src/pages/Login.tsx:64",className:"text-xs text-muted-foreground",children:d})]},l))})]}),n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:70",className:"flex items-center gap-6 text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:71",children:"500K+ contacts managed"}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:72",className:"w-1 h-1 rounded-full bg-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:73",children:"Millions of emails/month"}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:74",className:"w-1 h-1 rounded-full bg-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:75",children:"Amazon SES powered"})]})]}),n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:80",className:"flex-1 flex items-center justify-center p-8",children:n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:81",className:"w-full max-w-sm space-y-8",children:[n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:83",className:"lg:hidden flex items-center gap-3 justify-center",children:[n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:84",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/Login.tsx:85",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:87",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:90",className:"space-y-2",children:[n.jsx("h2",{"data-loc":"client/src/pages/Login.tsx:91",className:"text-2xl font-bold text-foreground",children:"Welcome back"}),n.jsx("p",{"data-loc":"client/src/pages/Login.tsx:92",className:"text-muted-foreground text-sm",children:"Sign in to your Boostiko workspace to manage your email campaigns."})]}),n.jsxs("div",{"data-loc":"client/src/pages/Login.tsx:97",className:"glass-card rounded-2xl p-8 space-y-6",children:[n.jsxs(te,{"data-loc":"client/src/pages/Login.tsx:98",onClick:s,className:"w-full h-11 font-semibold text-sm glow-primary",size:"lg",children:[n.jsx(Pa,{"data-loc":"client/src/pages/Login.tsx:103",className:"w-4 h-4 mr-2"}),"Sign in with Boostiko"]}),n.jsx("div",{"data-loc":"client/src/pages/Login.tsx:107",className:"text-center",children:n.jsx("p",{"data-loc":"client/src/pages/Login.tsx:108",className:"text-xs text-muted-foreground",children:"Secure authentication powered by Manus OAuth"})})]}),n.jsxs("p",{"data-loc":"client/src/pages/Login.tsx:114",className:"text-center text-xs text-muted-foreground",children:["Don't have an account?"," ",n.jsx("span",{"data-loc":"client/src/pages/Login.tsx:116",className:"text-primary curs
727or-pointer hover:underline",children:"Contact your Boostiko admin"})]})]})})]})}var D1="focusScope.autoFocusOnMount",O1="focusScope.autoFocusOnUnmount",$k={bubbles:!1,cancelable:!0},Aee="FocusScope",Em=v.forwardRef((e,t)=>{const{loop:a=!1,trapped:s=!1,onMountAutoFocus:r,onUnmountAutoFocus:i,...l}=e,[d,u]=v.useState(null),p=ur(r),x=ur(i),m=v.useRef(null),h=kt(t,b=>u(b)),y=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(s){let b=function(A){if(y.paused||!d)return;const k=A.target;d.contains(k)?m.current=k:Ec(m.current,{select:!0})},j=function(A){if(y.paused||!d)return;const k=A.relatedTarget;k!==null&&(d.contains(k)||Ec(m.current,{select:!0}))},S=function(A){if(document.activeElement===document.body)for(const E of A)E.removedNodes.length>0&&Ec(d)};document.addEventListener("focusin",b),document.addEventListener("focusout",j);const O=new MutationObserver(S);return d&&O.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",j),O.disconnect()}}},[s,d,y.paused]),v.useEffect(()=>{if(d){Uk.add(y);const b=document.activeElement;if(!d.contains(b)){const S=new CustomEvent(D1,$k);d.addEventListener(D1,p),d.dispatchEvent(S),S.defaultPrevented||(Dee(Pee(f9(d)),{select:!0}),document.activeElement===b&&Ec(d))}return()=>{d.removeEventListener(D1,p),setTimeout(()=>{const S=new CustomEvent(O1,$k);d.addEventListener(O1,x),d.dispatchEvent(S),S.defaultPrevented||Ec(b??document.body,{select:!0}),d.removeEventListener(O1,x),Uk.remove(y)},0)}}},[d,p,x,y]);const w=v.useCallback(b=>{if(!a&&!s||y.paused)return;const j=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,S=document.activeElement;if(j&&S){const O=b.currentTarget,[A,k]=Oee(O);A&&k?!b.shiftKey&&S===k?(b.preventDefault(),a&&Ec(A,{select:!0})):b.shiftKey&&S===A&&(b.preventDefault(),a&&Ec(k,{select:!0})):S===O&&b.preventDefault()}},[a,s,y.paused]);return n.jsx(et.div,{tabIndex:-1,...l,ref:h,onKeyDown:w})});Em.displayName=Aee;function Dee(e,{select:t=!1}={}){const a=document.activeElement;for(const s of e)if(Ec(s,{select:t}),document.activeElement!==a)return}function Oee(e){const t=f9(e),a=zk(t,e),s=zk(t.reverse(),e);return[a,s]}function f9(e){const t=[],a=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const r=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||r?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)t.push(a.currentNode);return t}function zk(e,t){for(const a of e)if(!kee(a,{upTo:t}))return a}function kee(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 _ee(e){return e instanceof HTMLInputElement&&"select"in e}function Ec(e,{select:t=!1}={}){if(e&&e.focus){const a=document.activeElement;e.focus({preventScroll:!0}),e!==a&&_ee(e)&&t&&e.select()}}var Uk=Tee();function Tee(){let e=[];return{add(t){const a=e[0];t!==a&&a?.pause(),e=qk(e,t),e.unshift(t)},remove(t){e=qk(e,t),e[0]?.resume()}}}function qk(e,t){const a=[...e],s=a.indexOf(t);return s!==-1&&a.splice(s,1),a}function Pee(e){return e.filter(t=>t.tagName!=="A")}var k1=0;function Fv(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Fk()),document.body.insertAdjacentElement("beforeend",e[1]??Fk()),k1++,()=>{k1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),k1--}},[])}function Fk(){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 Rr=function(){return Rr=Object.assign||function(t){for(var a,s=1,r=arguments.length;s<r;s++){a=arguments[s];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}return t},Rr.apply(this,arguments)};function m9(e,t){var a={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(a[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,s=Object.getOwnPropertySymbols(e);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(e,s[r])&&(a[s[r]]=e[s[r]]);return a}function Mee(e,t,a){if(a||arguments.length===2)for(var s=0,r=t.length,i;s<r;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var Xg="right-scroll-bar-position",Zg="width-before-scroll-bar",Ree="with-scroll-bars-hidden",Bee="--removed-body-scroll-bar-size";function _1(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Iee(e,t){var a=v.useState(function(){return{value:e,callback:t,facade:{get current(){return a.value},set current(s){var r=a.value;r!==s&&(a.value=s,a.callback(s,r))}}}})[0];return a.callback=t,a.facade}var Lee=typeof window<"u"?v.useLayoutEffect:v.useEffect,Wk=new WeakMap;function $ee(e,t){var a=Iee(null,function(s){return e.forEach(function(r){return _1(r,s)})});return Lee(function(){var s=Wk.get(a);if(s){var r=new Set(s),i=new Set(e),l=a.current;r.forEach(function(d){i.has(d)||_1(d,null)}
vendor: 4,181 bytes, lines 727-742
727),i.forEach(function(d){r.has(d)||_1(d,l)})}Wk.set(a,e)},[e]),a}function zee(e){return e}function Uee(e,t){t===void 0&&(t=zee);var a=[],s=!1,r={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:e},useMedium:function(i){var l=t(i,s);return a.push(l),function(){a=a.filter(function(d){return d!==l})}},assignSyncMedium:function(i){for(s=!0;a.length;){var l=a;a=[],l.forEach(i)}a={push:function(d){return i(d)},filter:function(){return a}}},assignMedium:function(i){s=!0;var l=[];if(a.length){var d=a;a=[],d.forEach(i),l=a}var u=function(){var x=l;l=[],x.forEach(i)},p=function(){return Promise.resolve().then(u)};p(),a={push:function(x){l.push(x),p()},filter:function(x){return l=l.filter(x),a}}}};return r}function qee(e){e===void 0&&(e={});var t=Uee(null);return t.options=Rr({async:!0,ssr:!1},e),t}var x9=function(e){var t=e.sideCar,a=m9(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return v.createElement(s,Rr({},a))};x9.isSideCarExport=!0;function Fee(e,t){return e.useMedium(t),x9}var g9=qee(),T1=function(){},Wv=v.forwardRef(function(e,t){var a=v.useRef(null),s=v.useState({onScrollCapture:T1,onWheelCapture:T1,onTouchMoveCapture:T1}),r=s[0],i=s[1],l=e.forwardProps,d=e.children,u=e.className,p=e.removeScrollBar,x=e.enabled,m=e.shards,h=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,j=e.allowPinchZoom,S=e.as,O=S===void 0?"div":S,A=e.gapMode,k=m9(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,D=$ee([a,t]),_=Rr(Rr({},k),r);return v.createElement(v.Fragment,null,x&&v.createElement(E,{sideCar:g9,removeScrollBar:p,shards:m,noRelative:y,noIsolation:w,inert:b,setCallbacks:i,allowPinchZoom:!!j,lockRef:a,gapMode:A}),l?v.cloneElement(v.Children.only(d),Rr(Rr({},_),{ref:D})):v.createElement(O,Rr({},_,{className:u,ref:D}),d))});Wv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wv.classNames={fullWidth:Zg,zeroRight:Xg};var Wee=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Hee(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Wee();return t&&e.setAttribute("nonce",t),e}function Vee(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Gee(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yee=function(){var e=0,t=null;return{add:function(a){e==0&&(t=Hee())&&(Vee(t,a),Gee(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kee=function(){var e=Yee();return function(t,a){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&a])}},h9=function(){var e=Kee(),t=function(a){var s=a.styles,r=a.dynamic;return e(s,r),null};return t},Qee={left:0,top:0,right:0,gap:0},P1=function(e){return parseInt(e||"",10)||0},Xee=function(e){var t=window.getComputedStyle(document.body),a=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[P1(a),P1(s),P1(r)]},Zee=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Qee;var t=Xee(e),a=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-a+t[2]-t[0])}},Jee=h9(),bd="data-scroll-locked",ete=function(e,t,a,s){var r=e.left,i=e.top,l=e.right,d=e.gap;return a===void 0&&(a="margin"),`
728  .`.concat(Ree,` {
729   overflow: hidden `).concat(s,`;
730   padding-right: `).concat(d,"px ").concat(s,`;
731  }
732  body[`).concat(bd,`] {
733    overflow: hidden `).concat(s,`;
734    overscroll-behavior: contain;
735    `).concat([t&&"position: relative ".concat(s,";"),a==="margin"&&`
736    padding-left: `.concat(r,`px;
737    padding-top: `).concat(i,`px;
738    padding-right: `).concat(l,`px;
739    margin-left:0;
740    margin-top:0;
741    margin-right: `).concat(d,"px ").concat(s,`;
742    `),a==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";
742")].filter(Boolean).join(""),`
743  }
744  
745  .`).concat(Xg,` {
746    right: `).concat(d,"px ").concat(s,`;
747  }
748  
749  .`).concat(Zg,` {
750    margin-right: `).concat(d,"px ").concat(s,`;
751  }
752  
753  .`).concat(Xg," .").concat(Xg,` {
754    right: 0 `).concat(s,`;
755  }
756  
757  .`).concat(Zg," .").concat(Zg,` {
758    margin-right: 0 `).concat(s,`;
759  }
760  
761  body[`).concat(bd,`] {
762    `).concat(Bee,": ").concat(d,`px;
763  }
764`)},Hk=function(){var e=parseInt(document.body.getAttribute(bd)||"0",10);return isFinite(e)?e:0},tte=function(){v.useEffect(function(){return document.body.setAttribute(bd,(Hk()+1).toString()),function(){var e=Hk()-1;e<=0?document.body.removeAttribute(bd):document.body.setAttribute(bd,e.toString())}},[])},ate=function(e){var t=e.noRelative,a=e.noImportant,s=e.gapMode,r=s===void 0?"margin":s;tte();var i=v.useMemo(function(){return Zee(r)},[r]);return v.createElement(Jee,{styles:ete(i,!t,r,a?"":"!important")})},RS=!1;if(typeof window<"u")try{var hg=Object.defineProperty({},"passive",{get:function(){return RS=!0,!0}});window.addEventListener("test",hg,hg),window.removeEventListener("test",hg,hg)}catch{RS=!1}var td=RS?{passive:!1}:!1,nte=function(e){return e.tagName==="TEXTAREA"},v9=function(e,t){if(!(e instanceof Element))return!1;var a=window.getComputedStyle(e);return a[t]!=="hidden"&&!(a.overflowY===a.overflowX&&!nte(e)&&a[t]==="visible")},ste=function(e){return v9(e,"overflowY")},rte=function(e){return v9(e,"overflowX")},Vk=function(e,t){var a=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var r=y9(e,s);if(r){var i=b9(e,s),l=i[1],d=i[2];if(l>d)return!0}s=s.parentNode}while(s&&s!==a.body);return!1},ite=function(e){var t=e.scrollTop,a=e.scrollHeight,s=e.clientHeight;return[t,a,s]},cte=function(e){var t=e.scrollLeft,a=e.scrollWidth,s=e.clientWidth;return[t,a,s]},y9=function(e,t){return e==="v"?ste(t):rte(t)},b9=function(e,t){return e==="v"?ite(t):cte(t)},lte=function(e,t){return e==="h"&&t==="rtl"?-1:1},ote=function(e,t,a,s,r){var i=lte(e,window.getComputedStyle(t).direction),l=i*s,d=a.target,u=t.contains(d),p=!1,x=l>0,m=0,h=0;do{if(!d)break;var y=b9(e,d),w=y[0],b=y[1],j=y[2],S=b-j-i*w;(w||S)&&y9(e,d)&&(m+=S,h+=w);var O=d.parentNode;d=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!u&&d!==document.body||u&&(t.contains(d)||t===d));return(x&&Math.abs(m)<1||!x&&Math.abs(h)<1)&&(p=!0),p},vg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gk=function(e){return[e.deltaX,e.deltaY]},Yk=function(e){return e&&"current"in e?e.current:e},dte=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ute=function(e){return`
765  .block-interactivity-`.concat(e,` {pointer-events: none;}
766  .allow-interactivity-`).concat(e,` {pointer-events: all;}
767`)},pte=0,ad=[];function fte(e){var t=v.useRef([]),a=v.useRef([0,0]),s=v.useRef(),r=v.useState(pte++)[0],i=v.useState(h9)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var b=Mee([e.lockRef.current],(e.shards||[]).map(Yk),!0).filter(Boolean);return b.forEach(function(j){return j.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),b.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var d=v.useCallback(function(b,j){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!l.current.allowPinchZoom;var S=vg(b),O=a.current,A="deltaX"in b?b.deltaX:O[0]-S[0],k="deltaY"in b?b.deltaY:O[1]-S[1],E,D=b.target,_=Math.abs(A)>Math.abs(k)?"h":"v";if("touches"in b&&_==="h"&&D.type==="range")return!1;var T=Vk(_,D);if(!T)return!0;if(T?E=_:(E=_==="v"?"h":"v",T=Vk(_,D)),!T)return!1;if(!s.current&&"changedTouches"in b&&(A||k)&&(s.current=E),!E)return!0;var I=s.current||E;return ote(I,j,b,I==="h"?A:k)},[]),u=v.useCallback(function(b){var j=b;if(!(!ad.length||ad[ad.length-1]!==i)){var S="deltaY"in j?Gk(j):vg(j),O=t.current.filter(function(E){return E.name===j.type&&(E.target===j.target||j.target===E.shadowParent)&&dte(E.delta,S)})[0];if(O&&O.should){j.cancelable&&j.preventDefault();return}
vendor: 9,327 bytes, lines 767-771
767if(!O){var A=(l.current.shards||[]).map(Yk).filter(Boolean).filter(function(E){return E.contains(j.target)}),k=A.length>0?d(j,A[0]):!l.current.noIsolation;k&&j.cancelable&&j.preventDefault()}}},[]),p=v.useCallback(function(b,j,S,O){var A={name:b,delta:j,target:S,should:O,shadowParent:mte(S)};t.current.push(A),setTimeout(function(){t.current=t.current.filter(function(k){return k!==A})},1)},[]),x=v.useCallback(function(b){a.current=vg(b),s.current=void 0},[]),m=v.useCallback(function(b){p(b.type,Gk(b),b.target,d(b,e.lockRef.current))},[]),h=v.useCallback(function(b){p(b.type,vg(b),b.target,d(b,e.lockRef.current))},[]);v.useEffect(function(){return ad.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener("wheel",u,td),document.addEventListener("touchmove",u,td),document.addEventListener("touchstart",x,td),function(){ad=ad.filter(function(b){return b!==i}),document.removeEventListener("wheel",u,td),document.removeEventListener("touchmove",u,td),document.removeEventListener("touchstart",x,td)}},[]);var y=e.removeScrollBar,w=e.inert;return v.createElement(v.Fragment,null,w?v.createElement(i,{styles:ute(r)}):null,y?v.createElement(ate,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mte(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const xte=Fee(g9,fte);var Am=v.forwardRef(function(e,t){return v.createElement(Wv,Rr({},e,{ref:t,sideCar:xte}))});Am.classNames=Wv.classNames;var gte=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nd=new WeakMap,yg=new WeakMap,bg={},M1=0,j9=function(e){return e&&(e.host||j9(e.parentNode))},hte=function(e,t){return t.map(function(a){if(e.contains(a))return a;var s=j9(a);return s&&e.contains(s)?s:(console.error("aria-hidden",a,"in not contained inside",e,". Doing nothing"),null)}).filter(function(a){return!!a})},vte=function(e,t,a,s){var r=hte(t,Array.isArray(e)?e:[e]);bg[a]||(bg[a]=new WeakMap);var i=bg[a],l=[],d=new Set,u=new Set(r),p=function(m){!m||d.has(m)||(d.add(m),p(m.parentNode))};r.forEach(p);var x=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(h){if(d.has(h))x(h);else try{var y=h.getAttribute(s),w=y!==null&&y!=="false",b=(nd.get(h)||0)+1,j=(i.get(h)||0)+1;nd.set(h,b),i.set(h,j),l.push(h),b===1&&w&&yg.set(h,!0),j===1&&h.setAttribute(a,"true"),w||h.setAttribute(s,"true")}catch(S){console.error("aria-hidden: cannot operate on ",h,S)}})};return x(t),d.clear(),M1++,function(){l.forEach(function(m){var h=nd.get(m)-1,y=i.get(m)-1;nd.set(m,h),i.set(m,y),h||(yg.has(m)||m.removeAttribute(s),yg.delete(m)),y||m.removeAttribute(a)}),M1--,M1||(nd=new WeakMap,nd=new WeakMap,yg=new WeakMap,bg={})}},Hv=function(e,t,a){a===void 0&&(a="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),r=gte(e);return r?(s.push.apply(s,Array.from(r.querySelectorAll("[aria-live], script"))),vte(s,r,a,"aria-hidden")):function(){return null}},Vv="Dialog",[w9,N9]=Pn(Vv),[yte,wr]=w9(Vv),S9=e=>{const{__scopeDialog:t,children:a,open:s,defaultOpen:r,onOpenChange:i,modal:l=!0}=e,d=v.useRef(null),u=v.useRef(null),[p,x]=Zs({prop:s,defaultProp:r??!1,onChange:i,caller:Vv});return n.jsx(yte,{scope:t,triggerRef:d,contentRef:u,contentId:hn(),titleId:hn(),descriptionId:hn(),open:p,onOpenChange:x,onOpenToggle:v.useCallback(()=>x(m=>!m),[x]),modal:l,children:a})};S9.displayName=Vv;var C9="DialogTrigger",E9=v.forwardRef((e,t)=>{const{__scopeDialog:a,...s}=e,r=wr(C9,a),i=kt(t,r.triggerRef);return n.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Q5(r.open),...s,ref:i,onClick:We(e.onClick,r.onOpenToggle)})});E9.displayName=C9;var Y5="DialogPortal",[bte,A9]=w9(Y5,{forceMount:void 0}),D9=e=>{const{__scopeDialog:t,forceMount:a,children:s,container:r}=e,i=wr(Y5,t);return n.jsx(bte,{scope:t,forceMount:a,children:v.Children.map(s,l=>n.jsx(Hn,{present:a||i.open,children:n.jsx(lu,{asChild:!0,container:r,children:l})}))})};D9.displayName=Y5;var oh="DialogOverlay",O9=v.forwardRef((e,t)=>{const a=A9(oh,e.__scopeDialog),{forceMount:s=a.forceMount,...r}=e,i=wr(oh,e.__scopeDialog);return i.modal?n.jsx(Hn,{present:s||i.open,children:n.jsx(wte,{...r,ref:t})}):null});O9.displayName=oh;var jte=Wc("DialogOverlay.RemoveScroll"),wte=v.forwardRef((e,t)=>{const{__scopeDialog:a,...s}=e,r=wr(oh,a);return n.jsx(Am,{as:jte,allowPinchZoom:!0,shards:[r.contentRef],children:n.jsx(et.div,{"data-state":Q5(r.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Xl="DialogContent",k9=v.forwardRef((e,t)=>{const a=A9(Xl,e.__scopeDialog),{forceMount:s=a.forceMount,...r}=e,i=wr(Xl,e.__scopeDialog);return n.jsx(Hn,{present:s||i.open,children:i.modal?n.jsx(Nte,{...r,ref:t}):n.jsx(Ste,{...r,ref:t})})});k9.displayName=Xl;var Nte=v.forwardRef((e,t)=>{const a=wr(Xl,e.__scopeDialog),s=v.useRef(null),r=kt(t,a.contentRef,s);return v.useEffect(()=>{const i=s.current;if(i)return Hv(i)},[]),n.jsx(_9,{...e,ref:r,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:We(e.onCloseAutoFocus,i=>{i.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:We(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,d=l.button===0&&l.ctrlKey===!0;(l.button===2||d)&&i.preventDefault()}),onFocusOutside:We(e.onFocusOutside,i=>i.preventDefault())})}),Ste=v.forwardRef((e,t)=>{const a=wr(Xl,e.__scopeDialog),s=v.useRef(!1),r=v.useRef(!1);return n.jsx(_9,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(s.current||a.triggerRef.current?.focus(),i.preventDefault()),s.current=!1,r.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=i.target;a.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),_9=v.forwardRef((e,t)=>{const{__scopeDialog:a,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:i,...l}=e,d=wr(Xl,a),u=v.useRef(null),p=kt(t,u);return Fv(),n.jsxs(n.Fragment,{children:[n.jsx(Em,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:r,onUnmountAutoFocus:i,children:n.jsx(ru,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Q5(d.open),...l,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(Ete,{titleId:d.titleId}),n.jsx(Dte,{contentRef:u,descriptionId:d.descriptionId})]})]})}),K5="DialogTitle",T9=v.forwardRef((e,t)=>{const{__scopeDialog:a,...s}=e,r=wr(K5,a);return n.jsx(et.h2,{id:r.titleId,...s,ref:t})});T9.displayName=K5;var P9="DialogDescription",M9=v.forwardRef((e,t)=>{const{__scopeDialog:a,...s}=e,r=wr(P9,a);return n.jsx(et.p,{id:r.descriptionId,...s,ref:t})});M9.displayName=P9;var R9="DialogClose",B9=v.forwardRef((e,t)=>{const{__scopeDialog:a,...s}=e,r=wr(R9,a);return n.jsx(et.button,{type:"button",...s,ref:t,onClick:We(e.onClick,()=>r.onOpenChange(!1))})});B9.displayName=R9;function Q5(e){return e?"open":"closed"}var I9="DialogTitleWarning",[Cte,L9]=TQ(I9,{contentName:Xl,titleName:K5,docsSlug:"dialog"}),Ete=({titleId:e})=>{const t=L9(I9),a=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
768
769If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
770
771For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(a))},[a,e]),null},Ate="DialogDescriptionWarning",Dte=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${L9(Ate).contentName}}.`;return v.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Gv=S9,$9=E9,Yv=D9,Kv=O9,Qv=k9,X5=T9,Z5=M9,Xv=B9;const z9=v.createContext({isComposing:()=>!1,setComposing:()=>{},justEndedComposing:()=>!1,markCompositionEnd:()=>{}}),J5=()=>v.useContext(z9);function qa({...e}){const t=v.useRef(!1),a=v.useRef(!1),s=v.useRef(null),r=v.useMemo(()=>({isComposing:()=>t.current,setComposing:i=>{t.current=i},justEndedComposing:()=>a.current,markCompositionEnd:()=>{a.current=!0,s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{a.current=!1},150)}}),[]);return n.jsx(z9.Provider,{"data-loc":"client/src/components/ui/dialog.tsx:50",value:r,children:n.jsx(Gv,{"data-loc":"client/src/components/ui/dialog.tsx:51","data-slot":"dialog",...e})})}function qi({...e}){return n.jsx($9,{"data-loc":"client/src/components/ui/dialog.tsx:59","data-slot":"dialog-trigger",...e})}function Ote({...e}){return n.jsx(Yv,{"data-loc":"client/src/components/ui/dialog.tsx:65","data-slot":"dialog-portal",...e})}function U9({className:e,...t}){return n.jsx(Kv,{"data-loc":"client/src/components/ui/dialog.tsx:79","data-slot":"dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}U9.displayName="DialogOverlay";function Fa({className:e,children:t,showCloseButton:a=!0,onEscapeKeyDown:s,...r}){const{isComposing:i}=J5(),l=v.useCallback(d=>
771{if(d.isComposing||i()){d.preventDefault();return}s?.(d)},[i,s]);return n.jsxs(Ote,{"data-loc":"client/src/components/ui/dialog.tsx:122","data-slot":"dialog-portal",children:[n.jsx(U9,{"data-loc":"client/src/components/ui/dialog.tsx:123"}),n.jsxs(Qv,{"data-loc":"client/src/components/ui/dialog.tsx:124","data-slot":"dialog-content",className:Se("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),onEscapeKeyDown:l,...r,children:[t,a&&n.jsxs(Xv,{"data-loc":"client/src/components/ui/dialog.tsx:135","data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[n.jsx(Ui,{"data-loc":"client/src/components/ui/dialog.tsx:139"}),n.jsx("span",{"data-loc":"client/src/components/ui/dialog.tsx:140",className:"sr-only",children:"Close"})]})]})]})}function Wa({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:150","data-slot":"dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function Di({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/dialog.tsx:160","data-slot":"dialog-footer",className:Se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Ha({className:e,...t}){return n.jsx(X5,{"data-loc":"client/src/components/ui/dialog.tsx:176","data-slot":"dialog-title",className:Se("text-lg leading-none font-semibold",e),...t})}function kte({className:e,...t}){return n.jsx(Z5,{"data-loc":"client/src/components/ui/dialog.tsx:189","data-slot":"dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}function jg(e){const t=v.useRef(e);t.current=e;const a=v.useRef(null);return a.current||(a.current=function(...s){return t.current.apply(this,s)}),a.current}function q9(e={}){const{onKeyDown:t,onCompositionStart:a,onCompositionEnd:s}=e,r=v.useRef(!1),i=v.useRef(null),l=v.useRef(null),d=jg(m=>{i.current&&(clearTimeout(i.current),i.current=null),l.current&&(clearTimeout(l.current),l.current=null),r.current=!0,a?.(m)}),u=jg(m=>{i.current=setTimeout(()=>{l.current=setTimeout(()=>{r.current=!1})}),s?.(m)}),p=jg(m=>{if(r.current&&(m.key==="Escape"||m.key==="Enter"&&!m.shiftKey)){m.stopPropagation();return}t?.(m)}),x=jg(()=>r.current);return{onCompositionStart:d,onCompositionEnd:u,onKeyDown:p,isComposing:x}}function De({className:e,type:t,onKeyDown:a,onCompositionStart:s,onCompositionEnd:r,...i}){const l=J5(),{onCompositionStart:d,onCompositionEnd:u,onKeyDown:p}=q9({onKeyDown:x=>{const m=x.nativeEvent.isComposing||l.justEndedComposing();x.key==="Enter"&&m||a?.(x)},onCompositionStart:x=>{l.setComposing(!0),s?.(x)},onCompositionEnd:x=>{l.markCompositionEnd(),setTimeout(()=>{l.setComposing(!1)},100),r?.(x)}});return n.jsx("input",{"data-loc":"client/src/components/ui/input.tsx:53",type:t,"data-slot":"input",className:Se("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),onCompositionStart:d,onCompositionEnd:u,onKeyDown:p,...i})}var _te="Label",F9=v.forwardRef((e,t)=>
771n.jsx(et.label,{...e,ref:t,onMouseDown:a=>{a.target.closest("button, input, select, textarea")||(e.onMouseDown?.(a),!a.defaultPrevented&&a.detail>1&&a.preventDefault())}}));F9.displayName=_te;var Tte=F9;function _e({className:e,...t}){return n.jsx(Tte,{"data-loc":"client/src/components/ui/label.tsx:11","data-slot":"label",className:Se("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Pte(){const[,e]=La(),[t,a]=v.useState(""),[s,r]=v.useState(""),[i,l]=v.useState(""),[d,u]=v.useState(!1),[p,x]=v.useState(!1);v.useEffect(()=>{const S=new URLSearchParams(window.location.search).get("token");S&&a(S)},[]);const{data:m,isLoading:h,error:y}=le.team.getInvite.useQuery({token:t},{enabled:!!t,retry:!1}),w=le.team.acceptInvite.useMutation({onSuccess:()=>{x(!0),ne.success("Account created! Redirecting to dashboard..."),setTimeout(()=>e("/dashboard"),2e3)},onError:j=>ne.error(j.message)}),b=j=>{if(j.preventDefault(),s.length<8){ne.error("Password must be at least 8 characters");return}if(s!==i){ne.error("Passwords do not match");return}w.mutate({token:t,password:s})};return t?h?n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:65",className:"min-h-screen flex items-center justify-center bg-background",children:n.jsx(Ot,{"data-loc":"client/src/pages/AcceptInvite.tsx:66",className:"w-8 h-8 animate-spin text-primary"})}):y||!m?n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:73",className:"min-h-screen flex items-center justify-center bg-background",children:n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:74",className:"text-center space-y-3 max-w-sm",children:[n.jsx(Ia,{"data-loc":"client/src/pages/AcceptInvite.tsx:75",className:"w-10 h-10 text-red-400 mx-auto"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:76",className:"text-foreground font-semibold",children:"Invite not found or expired"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:77",className:"text-muted-foreground text-sm",children:y?.message??"This invite link is invalid or has already been used."}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:80",className:"text-xs text-muted-foreground",children:"Contact your workspace owner to send a new invite."})]})}):p?n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:90",className:"min-h-screen flex items-center justify-center bg-background",children:n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:91",className:"text-center space-y-3",children:[n.jsx(jn,{"data-loc":"client/src/pages/AcceptInvite.tsx:92",className:"w-12 h-12 text-emerald-400 mx-auto"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:93",className:"text-foreground font-semibold text-lg",children:"Account created!"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:94",className:"text-muted-foreground text-sm",children:"Redirecting to your dashboard..."})]})}):n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:101",className:"min-h-screen flex hero-gradient",children:[n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:103",className:"hidden lg:flex flex-col justify-between w-1/2 p-12 border-r border-border/50",children:[n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:104",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:105",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/AcceptInvite.tsx:106",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:108",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:111",className:"space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:112",children:[n.jsxs("h1",{"data-loc":"client/src/pages/AcceptInvite.tsx:113",className:"text-4xl font-bold text-foreground leading-tight mb-4",children:["Join"," ",n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:115",className:"gradient-text",children:m.tenantName})]}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:117",className:"text-muted-foreground text-lg leading-relaxed",children:"You've been invited to collaborate on email campaigns and automations. Set up your password to get started."})]}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:123",className:"glass-card rounded-xl p-5 space-y-3",children:[n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:124",className:"text-sm font-semibold text-foreground",children:"Your inv
771ite details"}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:125",className:"space-y-1.5 text-sm text-muted-foreground",children:[n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:126",children:[n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:126",className:"text-foreground font-medium",children:"Name:"})," ",m.name]}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:127",children:[n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:127",className:"text-foreground font-medium",children:"Email:"})," ",m.email]}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:128",children:[n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:128",className:"text-foreground font-medium",children:"Role:"})," ",n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:128",className:"capitalize",children:m.role})]}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:129",children:[n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:129",className:"text-foreground font-medium",children:"Workspace:"})," ",m.tenantName]})]})]})]}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:134",className:"text-xs text-muted-foreground",children:["Invite expires ",new Date(m.expiresAt).toLocaleDateString()]})]}),n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:140",className:"flex-1 flex items-center justify-center p-8",children:n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:141",className:"w-full max-w-sm space-y-8",children:[n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:143",className:"lg:hidden flex items-center gap-3 justify-center",children:[n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:144",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/AcceptInvite.tsx:145",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/AcceptInvite.tsx:147",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:150",className:"space-y-2",children:[n.jsx("h2",{"data-loc":"client/src/pages/AcceptInvite.tsx:151",className:"text-2xl font-bold text-foreground",children:"Set your password"}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:152",className:"text-muted-foreground text-sm",children:["Welcome, ",n.jsx("strong",{"data-loc":"client/src/pages/AcceptInvite.tsx:153",children:m.name}),"! Create a password to access"," ",n.jsx("strong",{"data-loc":"client/src/pages/AcceptInvite.tsx:154",children:m.tenantName}),"."]})]}),n.jsxs("form",{"data-loc":"client/src/pages/AcceptInvite.tsx:158",onSubmit:b,className:"glass-card rounded-2xl p-8 space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:159",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/AcceptInvite.tsx:160",children:"Email"}),n.jsx(De,{"data-loc":"client/src/pages/AcceptInvite.tsx:161",value:m.email,readOnly:!0,className:"bg-muted/50 text-muted-foreground"})]}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:164",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/AcceptInvite.tsx:165",children:"Password"}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:166",className:"relative",children:[n.jsx(De,{"data-loc":"client/src/pages/AcceptInvite.tsx:167",type:d?"text":"password",placeholder:"At least 8 characters",value:s,onChange:j=>r(j.target.value),required:!0,minLength:8,className:"pr-10"}),n.jsx("button",{"data-loc":"client/src/pages/AcceptInvite.tsx:176",type:"button",onClick:()=>u(!d),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:d?n.jsx(VI,{"data-loc":"client/src/pages/AcceptInvite.tsx:181",className:"w-4 h-4"}):n.jsx(la,{"data-loc":"client/src/pages/AcceptInvite.tsx:181",className:"w-4 h-4"})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:186",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/AcceptInvite.tsx:187",children:"Confirm Password"}),n.jsx(De,{"data-loc":"client/src/pages/AcceptInvite.tsx:188",type:"password",placeholder:"Repeat your password",value:i,onChange:j=>l(j.target.value),required:!0})]}),n.jsx(te,{"data-loc":"client/src/pages/AcceptInvite.tsx:197",type:"submit",className:"w-full h-11 font-semibold text-sm glow-primary",size:"lg",disabled:w.isPending,children:w.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/AcceptInvite.tsx:204",className:"w-4 h-4 animate-spin mr-2"}),"Creating account..."]}):n.jsxs(n.Fragment,{children:[n.jsx(jn,{"data-loc":"client/src/pages/AcceptInvite.tsx:206",className:"w-4 h-4 mr-2"}),"Create account & sign in"]})})]}),n.jsxs("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:211",className:"text-center text-xs text-muted-foreground",children:["Already have an account?"," ",n.jsx("a",{"data-loc":"client/src/pages/AcceptInvite.tsx:213",href:"/member-login",className:"text-primary curs
771or-pointer hover:underline",children:"Sign in here"})]})]})})]}):n.jsx("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:53",className:"min-h-screen flex items-center justify-center bg-background",children:n.jsxs("div",{"data-loc":"client/src/pages/AcceptInvite.tsx:54",className:"text-center space-y-3",children:[n.jsx(Ia,{"data-loc":"client/src/pages/AcceptInvite.tsx:55",className:"w-10 h-10 text-amber-400 mx-auto"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:56",className:"text-foreground font-semibold",children:"Invalid invite link"}),n.jsx("p",{"data-loc":"client/src/pages/AcceptInvite.tsx:57",className:"text-muted-foreground text-sm",children:"This link appears to be missing a token."})]})})}function Mte(){const{user:e,loading:t}=Jc(),[,a]=La(),[s,r]=v.useState(""),[i,l]=v.useState(""),[d,u]=v.useState(!1);v.useEffect(()=>{!t&&e&&(e.role==="admin"?a("/admin"):a("/dashboard"))},[e,t,a]);const p=le.team.login.useMutation({onSuccess:()=>{ne.success("Signed in successfully!"),window.location.href="/dashboard"},onError:h=>ne.error(h.message)}),x=h=>{if(h.preventDefault(),!s||!i){ne.error("Please enter your email and password");return}p.mutate({email:s,password:i})},m=[{icon:ja,label:"Smart Campaigns",desc:"Broadcast & automated email flows"},{icon:_n,label:"Trading Triggers",desc:"Account funded, challenge passed & more"},{icon:L5,label:"Deep Analytics",desc:"Opens, clicks, revenue attribution"},{icon:yd,label:"Deliverability First",desc:"Built on Amazon SES infrastructure"}];return n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:56",className:"min-h-screen flex hero-gradient",children:[n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:58",className:"hidden lg:flex flex-col justify-between w-1/2 p-12 border-r border-border/50",children:[n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:59",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:60",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/MemberLogin.tsx:61",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:63",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:66",className:"space-y-8",children:[n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:67",children:[n.jsxs("h1",{"data-loc":"client/src/pages/MemberLogin.tsx:68",className:"text-4xl font-bold text-foreground leading-tight mb-4",children:["Email marketing built for"," ",n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:70",className:"gradient-text",children:"prop firms & crypto"})]}),n.jsx("p",{"data-loc":"client/src/pages/MemberLogin.tsx:72",className:"text-muted-foreground text-lg leading-relaxed",children:"The only ESP purpose-built for the trading industry. Trigger emails from trading events, segment by account type, and track revenue attribution with precision."})]}),n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:79",className:"grid grid-cols-2 gap-4",children:m.map(({icon:h,label:y,desc:w})=>n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:81",className:"glass-card rounded-xl p-4 space-y-2",children:[n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:82",className:"w-8 h-8 rounded-lg bg-primary/15 flex items-center justify-center",children:n.jsx(h,{"data-loc":"client/src/pages/MemberLogin.tsx:83",className:"w-4 h-4 text-primary"})}),n.jsx("p",{"data-loc":"client/src/pages/MemberLogin.tsx:85",className:"text-sm font-semibold text-foreground",children:y}),n.jsx("p",{"data-loc":"client/src/pages/MemberLogin.tsx:86",className:"text-xs text-muted-foreground",children:w})]},y))})]}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:92",className:"flex items-center gap-6 text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:93",children:"500K+ contacts managed"}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:94",className:"w-1 h-1 rounded-full bg-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:95",children:"Millions of emails/month"}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:96",className:"w-1 h-1 rounded-full bg-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:97",children:"Amazon SES powered"})]})]}),n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:102",className:"flex-1 flex items-center justify-center p-8",children:n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:103",className:"w-full max-w-sm space-y-8",children:[n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:105",className:"lg:hidden flex items-center gap-3 justify-center",children:[n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:106",className:"w-9 h-9 rounded-xl bg-primary flex items-center justify-center glow-primary",children:n.jsx(Pa,{"data-loc":"client/src/pages/MemberLogin.tsx:107",className:"w-5 h-5 text-white"})}),n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:109",className:"text-xl font-bold text-foreground",children:"Boostiko"})]}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:112",className:"space-y-2",children:[n.jsx("h2",{"data-loc":"client/src/pages/MemberLogin.tsx:113",className:"text-2xl font-bold text-foreground",children:"Team member sign in"}),n.jsx("p",{"data-loc":"client/src/pages/MemberLogin.tsx:114",className:"text-muted-foreground text-sm",children:"Sign in to your workspace with your email and password."})]}),n.jsxs("form",{"data-loc":"client/src/pages/MemberLogin.tsx:119",onSubmit:x,className:"glass-card rounded-2xl p-8 space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:120",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/MemberLogin.tsx:121",children:"Email address"}),n.jsx(De,{"data-loc":"client/src/pages/MemberLogin.tsx:122",type:"email",placeholder:"[email protected]",value:s,onChange:h=>r(h.target.value),required:!0,autoFocus:!0})]}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:132",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/MemberLogin.tsx:133",children:"Password"}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:134",className:"relative",children:[n.jsx(De,{"data-loc":"client/src/pages/MemberLogin.tsx:135",type:d?"text":"password",placeholder:"Your password",value:i,onChange:h=>l(h.target.value),required:!0,className:"pr-10"}),n.jsx("button",{"data-loc":"client/src/pages/MemberLogin.tsx:143",type:"button",onClick:()=>u(!d),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:d?n.jsx(VI,{"data-loc":"client/src/pages/MemberLogin.tsx:148",className:"w-4 h-4"}):n.jsx(la,{"data-loc":"client/src/pages/MemberLogin.tsx:148",className:"w-4 h-4"})})]})]}),n.jsx(te,{"data-loc":"client/src/pages/MemberLogin.tsx:153",type:"submit",className:"w-full h-11 font-semibold text-sm glow-primary",size:"lg",disabled:p.isPending,children:p.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/MemberLogin.tsx:160",className:"w-4 h-4 animate-spin mr-2"}),"Signing in..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Pa,{"data-loc":"client/src/pages/MemberLogin.tsx:162",className:"w-4 h-4 mr-2"}),"Sign in"]})}),n.jsxs("div",{"data-loc":"client/src/pages/MemberLogin.tsx:166",className:"relative",children:[n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:167",className:"absolute inset-0 flex items-center",children:n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:168",className:"w-full border-t border-border"})}),n.jsx("div",{"data-loc":"client/src/pages/MemberLogin.tsx:170",className:"relative flex justify-center text-xs uppercase",children:n.jsx("span",{"data-loc":"client/src/pages/MemberLogin.tsx:171",className:"bg-card px-2 text-muted-foreground",children:"or"})})]}),n.jsx(te,{"data-loc":"client/src/pages/MemberLogin.tsx:175",type:"button",variant:"outline",className:"w-full h-10 text-sm",onClick:()=>window.location.href=uo(),children:"Sign in with Manus OAuth"})]}),n.jsxs("p",{"data-loc":"client/src/pages/MemberLogin.tsx:185",className:"text-center text-xs text-muted-foreground",children:["Received an invite?"," ",n.jsx("a",{"data-loc":"client/src/pages/MemberLogin.tsx:187",href:"/invite/accept",className:"text-primary curs
771or-pointer hover:underline",children:"Accept your invitation"})]})]})})]})}const W9=v.createContext({tenantId:null,clientName:null,isImpersonating:!1,startImpersonation:()=>{},stopImpersonation:()=>{}}),BS="boostiko_impersonation";function Rte(){try{const e=sessionStorage.getItem(BS);if(e)return JSON.parse(e)}catch{}return{tenantId:null,clientName:null,isImpersonating:!1}}function Bte({children:e}){const[t,a]=v.useState(Rte),s=v.useCallback((i,l)=>{const d={tenantId:i,clientName:l,isImpersonating:!0};a(d),sessionStorage.setItem(BS,JSON.stringify(d))},[]),r=v.useCallback(()=>{a({tenantId:null,clientName:null,isImpersonating:!1}),sessionStorage.removeItem(BS)},[]);return n.jsx(W9.Provider,{"data-loc":"client/src/contexts/ImpersonationContext.tsx:48",value:{...t,startImpersonation:s,stopImpersonation:r},children:e})}function Zv(){return v.useContext(W9)}function Ite(){return s9.useSyncExternalStore(Lte,()=>!0,()=>!1)}function Lte(){return()=>{}}var e3="Avatar",[$te]=Pn(e3),[zte,H9]=$te(e3),V9=v.forwardRef((e,t)=>{const{__scopeAvatar:a,...s}=e,[r,i]=v.useState("idle");return n.jsx(zte,{scope:a,imageLoadingStatus:r,onImageLoadingStatusChange:i,children:n.jsx(et.span,{...s,ref:t})})});V9.displayName=e3;var G9="AvatarImage",Ute=v.forwardRef((e,t)=>{const{__scopeAvatar:a,src:s,onLoadingStatusChange:r=()=>{},...i}=e,l=H9(G9,a),d=qte(s,i),u=ur(p=>{r(p),l.onImageLoadingStatusChange(p)});return on(()=>{d!=="idle"&&u(d)},[d,u]),d==="loaded"?n.jsx(et.img,{...i,ref:t,src:s}):null});Ute.displayName=G9;var Y9="AvatarFallback",K9=v.forwardRef((e,t)=>{const{__scopeAvatar:a,delayMs:s,...r}=e,i=H9(Y9,a),[l,d]=v.useState(s===void 0);return v.useEffect(()=>{if(s!==void 0){const u=window.setTimeout(()=>d(!0),s);return()=>window.clearTimeout(u)}},[s]),l&&i.imageLoadingStatus!=="loaded"?n.jsx(et.span,{...r,ref:t}):null});K9.displayName=Y9;function Kk(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function qte(e,{referrerPolicy:t,crossOrigin:a}){const s=Ite(),r=v.useRef(null),i=s?(r.current||(r.current=new window.Image),r.current):null,[l,d]=v.useState(()=>Kk(i,e));return on(()=>{d(Kk(i,e))},[i,e]),on(()=>{const u=m=>()=>{d(m)};if(!i)return;const p=u("loaded"),x=u("error");return i.addEventListener("load",p),i.addEventListener("error",x),t&&(i.referrerPolicy=t),typeof a=="string"&&(i.crossOrigin=a),()=>{i.removeEventListener("load",p),i.removeEventListener("error",x)}},[i,a,t]),l}var Fte=V9,Wte=K9;function Q9({className:e,...t}){return n.jsx(Fte,{"data-loc":"client/src/components/ui/avatar.tsx:11","data-slot":"avatar",className:Se("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function X9({className:e,...t}){return n.jsx(Wte,{"data-loc":"client/src/components/ui/avatar.tsx:40","data-slot":"avatar-fallback",className:Se("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function Jv(e){const t=e+"CollectionProvider",[a,s]=Pn(t),[r,i]=a(t,{collectionRef:{current:null},itemMap:new Map}),l=b=>{const{scope:j,children:S}=b,O=W.useRef(null),A=W.useRef(new Map).current;return n.jsx(r,{scope:j,itemMap:A,collectionRef:O,children:S})};l.displayName=t;const d=e+"CollectionSlot",u=Wc(d),p=W.forwardRef((b,j)=>{const{scope:S,children:O}=b,A=i(d,S),k=kt(j,A.collectionRef);return n.jsx(u,{ref:k,children:O})});p.displayName=d;const x=e+"CollectionItemSlot",m="data-radix-collection-item",h=Wc(x),y=W.forwardRef((b,j)=>{const{scope:S,children:O,...A}=b,k=W.useRef(null),E=kt(j,k),D=i(x,S);return W.useEffect(()=>(D.itemMap.set(k,{ref:k,...A}),()=>void D.itemMap.delete(k))),n.jsx(h,{[m]:"",ref:E,children:O})});y.displayName=x;function w(b){const j=i(e+"CollectionConsumer",b);return W.useCallback(()=>{const O=j.collectionRef.current;if(!O)return[];const A=Array.from(O.querySelectorAll(`[${m}]`));return Array.from(j.itemMap.values()).sort((D,_)=>A.indexOf(D.ref.current)-A.indexOf(_.ref.current))},[j.collectionRef,j.itemMap])}return[{Provider:l,Slot:p,ItemSlot:y},w,s]}var Hte=v.createContext(void 0);function Dm(e){const t=v.useContext(Hte);return e||t||"ltr"}var R1="rovingFocusGroup.onEntryFocus",Vte={bubbles:!1,cancelable:!0},Om="RovingFocusGroup",[IS,Z9,Gte]=Jv(Om),[Yte,ey]=Pn(Om,[Gte]),[Kte,Qte]=Yte(Om),J9=v.forwardRef((e,t)=>
vendor: 4,370 bytes, line 771
771n.jsx(IS.Provider,{scope:e.__scopeRovingFocusGroup,children:n.jsx(IS.Slot,{scope:e.__scopeRovingFocusGroup,children:n.jsx(Xte,{...e,ref:t})})}));J9.displayName=Om;var Xte=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,orientation:s,loop:r=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:u,onEntryFocus:p,preventScrollOnEntryFocus:x=!1,...m}=e,h=v.useRef(null),y=kt(t,h),w=Dm(i),[b,j]=Zs({prop:l,defaultProp:d??null,onChange:u,caller:Om}),[S,O]=v.useState(!1),A=ur(p),k=Z9(a),E=v.useRef(!1),[D,_]=v.useState(0);return v.useEffect(()=>{const T=h.current;if(T)return T.addEventListener(R1,A),()=>T.removeEventListener(R1,A)},[A]),n.jsx(Kte,{scope:a,orientation:s,dir:w,loop:r,currentTabStopId:b,onItemFocus:v.useCallback(T=>j(T),[j]),onItemShiftTab:v.useCallback(()=>O(!0),[]),onFocusableItemAdd:v.useCallback(()=>_(T=>T+1),[]),onFocusableItemRemove:v.useCallback(()=>_(T=>T-1),[]),children:n.jsx(et.div,{tabIndex:S||D===0?-1:0,"data-orientation":s,...m,ref:y,style:{outline:"none",...e.style},onMouseDown:We(e.onMouseDown,()=>{E.current=!0}),onFocus:We(e.onFocus,T=>{const I=!E.current;if(T.target===T.currentTarget&&I&&!S){const $=new CustomEvent(R1,Vte);if(T.currentTarget.dispatchEvent($),!$.defaultPrevented){const R=k().filter(L=>L.focusable),B=R.find(L=>L.active),Y=R.find(L=>L.id===b),Q=[B,Y,...R].filter(Boolean).map(L=>L.ref.current);aL(Q,x)}}E.current=!1}),onBlur:We(e.onBlur,()=>O(!1))})})}),eL="RovingFocusGroupItem",tL=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:a,focusable:s=!0,active:r=!1,tabStopId:i,children:l,...d}=e,u=hn(),p=i||u,x=Qte(eL,a),m=x.currentTabStopId===p,h=Z9(a),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:b}=x;return v.useEffect(()=>{if(s)return y(),()=>w()},[s,y,w]),n.jsx(IS.ItemSlot,{scope:a,id:p,focusable:s,active:r,children:n.jsx(et.span,{tabIndex:m?0:-1,"data-orientation":x.orientation,...d,ref:t,onMouseDown:We(e.onMouseDown,j=>{s?x.onItemFocus(p):j.preventDefault()}),onFocus:We(e.onFocus,()=>x.onItemFocus(p)),onKeyDown:We(e.onKeyDown,j=>{if(j.key==="Tab"&&j.shiftKey){x.onItemShiftTab();return}if(j.target!==j.currentTarget)return;const S=eae(j,x.orientation,x.dir);if(S!==void 0){if(j.metaKey||j.ctrlKey||j.altKey||j.shiftKey)return;j.preventDefault();let A=h().filter(k=>k.focusable).map(k=>k.ref.current);if(S==="last")A.reverse();else if(S==="prev"||S==="next"){S==="prev"&&A.reverse();const k=A.indexOf(j.currentTarget);A=x.loop?tae(A,k+1):A.slice(k+1)}setTimeout(()=>aL(A))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:b!=null}):l})})});tL.displayName=eL;var Zte={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jte(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function eae(e,t,a){const s=Jte(e.key,a);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return Zte[s]}function aL(e,t=!1){const a=document.activeElement;for(const s of e)if(s===a||(s.focus({preventScroll:t}),document.activeElement!==a))return}function tae(e,t){return e.map((a,s)=>e[(t+s)%e.length])}var nL=J9,sL=tL,LS=["Enter"," "],aae=["ArrowDown","PageUp","Home"],rL=["ArrowUp","PageDown","End"],nae=[...aae,...rL],sae={ltr:[...LS,"ArrowRight"],rtl:[...LS,"ArrowLeft"]},rae={ltr:["ArrowLeft"],rtl:["ArrowRight"]},km="Menu",[yf,iae,cae]=Jv(km),[po,iL]=Pn(km,[cae,Zc,ey]),ty=Zc(),cL=ey(),[lae,fo]=po(km),[oae,_m]=po(km),lL=e=>{const{__scopeMenu:t,open:a=!1,children:s,dir:r,onOpenChange:i,modal:l=!0}=e,d=ty(t),[u,p]=v.useState(null),x=v.useRef(!1),m=ur(i),h=Dm(r);return v.useEffect(()=>{const y=()=>{x.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>x.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),n.jsx(Rv,{...d,children:n.jsx(lae,{scope:t,open:a,onOpenChange:m,content:u,onContentChange:p,children:n.jsx(oae,{scope:t,onClose:v.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:x,dir:h,modal:l,children:s})})})};lL.displayName=km;var dae="MenuAnchor",t3=v.forwardRef((e,t)=>
vendor: 13,528 bytes, line 771
771{const{__scopeMenu:a,...s}=e,r=ty(a);return n.jsx(Sm,{...r,...s,ref:t})});t3.displayName=dae;var a3="MenuPortal",[uae,oL]=po(a3,{forceMount:void 0}),dL=e=>{const{__scopeMenu:t,forceMount:a,children:s,container:r}=e,i=fo(a3,t);return n.jsx(uae,{scope:t,forceMount:a,children:n.jsx(Hn,{present:a||i.open,children:n.jsx(lu,{asChild:!0,container:r,children:s})})})};dL.displayName=a3;var Qs="MenuContent",[pae,n3]=po(Qs),uL=v.forwardRef((e,t)=>{const a=oL(Qs,e.__scopeMenu),{forceMount:s=a.forceMount,...r}=e,i=fo(Qs,e.__scopeMenu),l=_m(Qs,e.__scopeMenu);return n.jsx(yf.Provider,{scope:e.__scopeMenu,children:n.jsx(Hn,{present:s||i.open,children:n.jsx(yf.Slot,{scope:e.__scopeMenu,children:l.modal?n.jsx(fae,{...r,ref:t}):n.jsx(mae,{...r,ref:t})})})})}),fae=v.forwardRef((e,t)=>{const a=fo(Qs,e.__scopeMenu),s=v.useRef(null),r=kt(t,s);return v.useEffect(()=>{const i=s.current;if(i)return Hv(i)},[]),n.jsx(s3,{...e,ref:r,trapFocus:a.open,disableOutsidePointerEvents:a.open,disableOutsideScroll:!0,onFocusOutside:We(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>a.onOpenChange(!1)})}),mae=v.forwardRef((e,t)=>{const a=fo(Qs,e.__scopeMenu);return n.jsx(s3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>a.onOpenChange(!1)})}),xae=Wc("MenuContent.ScrollLock"),s3=v.forwardRef((e,t)=>{const{__scopeMenu:a,loop:s=!1,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:d,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:m,onInteractOutside:h,onDismiss:y,disableOutsideScroll:w,...b}=e,j=fo(Qs,a),S=_m(Qs,a),O=ty(a),A=cL(a),k=iae(a),[E,D]=v.useState(null),_=v.useRef(null),T=kt(t,_,j.onContentChange),I=v.useRef(0),$=v.useRef(""),R=v.useRef(0),B=v.useRef(null),Y=v.useRef("right"),z=v.useRef(0),Q=w?Am:v.Fragment,L=w?{as:xae,allowPinchZoom:!0}:void 0,M=Z=>{const ie=$.current+Z,G=k().filter(se=>!se.disabled),F=document.activeElement,H=G.find(se=>se.ref.current===F)?.textValue,q=G.map(se=>se.textValue),J=Aae(q,ie,H),ce=G.find(se=>se.textValue===J)?.ref.current;(function se(ye){$.current=ye,window.clearTimeout(I.current),ye!==""&&(I.current=window.setTimeout(()=>se(""),1e3))})(ie),ce&&setTimeout(()=>ce.focus())};v.useEffect(()=>()=>window.clearTimeout(I.current),[]),Fv();const U=v.useCallback(Z=>Y.current===B.current?.side&&Oae(Z,B.current?.area),[]);return n.jsx(pae,{scope:a,searchRef:$,onItemEnter:v.useCallback(Z=>{U(Z)&&Z.preventDefault()},[U]),onItemLeave:v.useCallback(Z=>{U(Z)||(_.current?.focus(),D(null))},[U]),onTriggerLeave:v.useCallback(Z=>{U(Z)&&Z.preventDefault()},[U]),pointerGraceTimerRef:R,onPointerGraceIntentChange:v.useCallback(Z=>{B.current=Z},[]),children:n.jsx(Q,{...L,children:n.jsx(Em,{asChild:!0,trapped:r,onMountAutoFocus:We(i,Z=>{Z.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:n.jsx(ru,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:x,onFocusOutside:m,onInteractOutside:h,onDismiss:y,children:n.jsx(nL,{asChild:!0,...A,dir:S.dir,orientation:"vertical",loop:s,currentTabStopId:E,onCurrentTabStopIdChange:D,onEntryFocus:We(u,Z=>{S.isUsingKeyboardRef.current||Z.preventDefault()}),preventScrollOnEntryFocus:!0,children:n.jsx(Bv,{role:"menu","aria-orientation":"vertical","data-state":AL(j.open),"data-radix-menu-content":"",dir:S.dir,...O,...b,ref:T,style:{outline:"none",...b.style},onKeyDown:We(b.onKeyDown,Z=>{const G=Z.target.closest("[data-radix-menu-content]")===Z.currentTarget,F=Z.ctrlKey||Z.altKey||Z.metaKey,H=Z.key.length===1;G&&(Z.key==="Tab"&&Z.preventDefault(),!F&&H&&M(Z.key));const q=_.current;if(Z.target!==q||!nae.includes(Z.key))return;Z.preventDefault();const ce=k().filter(se=>!se.disabled).map(se=>se.ref.current);rL.includes(Z.key)&&ce.reverse(),Cae(ce)}),onBlur:We(e.onBlur,Z=>{Z.currentTarget.contains(Z.target)||(window.clearTimeout(I.current),$.current="")}),onPointerMove:We(e.onPointerMove,bf(Z=>{const ie=Z.target,G=z.current!==Z.clientX;if(Z.currentTarget.contains(ie)&&G){const F=Z.clientX>z.current?"right":"left";Y.current=F,z.current=Z.clientX}}))})})})})})})});uL.displayName=Qs;var gae="MenuGroup",r3=v.forwardRef((e,t)=>{const{__scopeMenu:a,...s}=e;return n.jsx(et.div,{role:"group",...s,ref:t})});r3.displayName=gae;var hae="MenuLabel",pL=v.forwardRef((e,t)=>{const{__scopeMenu:a,...s}=e;return n.jsx(et.div,{...s,ref:t})});pL.displayName=hae;var dh="MenuItem",Qk="menu.itemSelect",ay=v.forwardRef((e,t)=>{const{disabled:a=!1,onSelect:s,...r}=e,i=v.useRef(null),l=_m(dh,e.__scopeMenu),d=n3(dh,e.__scopeMenu),u=kt(t,i),p=v.useRef(!1),x=()=>{const m=i.current;if(!a&&m){const h=new CustomEvent(Qk,{bubbles:!0,cancelable:!0});m.addEventListener(Qk,y=>s?.(y),{once:!0}),HB(m,h),h.defaultPrevented?p.current=!1:l.onClose()}};return n.jsx(fL,{...r,ref:u,disabled:a,onClick:We(e.onClick,x),onPointerDown:m=>{e.onPointerDown?.(m),p.current=!0},onPointerUp:We(e.onPointerUp,m=>{p.current||m.currentTarget?.click()}),onKeyDown:We(e.onKeyDown,m=>{const h=d.searchRef.current!=="";a||h&&m.key===" "||LS.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});ay.displayName=dh;var fL=v.forwardRef((e,t)=>{const{__scopeMenu:a,disabled:s=!1,textValue:r,...i}=e,l=n3(dh,a),d=cL(a),u=v.useRef(null),p=kt(t,u),[x,m]=v.useState(!1),[h,y]=v.useState("");return v.useEffect(()=>{const w=u.current;w&&y((w.textContent??"").trim())},[i.children]),n.jsx(yf.ItemSlot,{scope:a,disabled:s,textValue:r??h,children:n.jsx(sL,{asChild:!0,...d,focusable:!s,children:n.jsx(et.div,{role:"menuitem","data-highlighted":x?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...i,ref:p,onPointerMove:We(e.onPointerMove,bf(w=>{s?l.onItemLeave(w):(l.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:We(e.onPointerLeave,bf(w=>l.onItemLeave(w))),onFocus:We(e.onFocus,()=>m(!0)),onBlur:We(e.onBlur,()=>m(!1))})})})}),vae="MenuCheckboxItem",mL=v.forwardRef((e,t)=>{const{checked:a=!1,onCheckedChange:s,...r}=e;return n.jsx(yL,{scope:e.__scopeMenu,checked:a,children:n.jsx(ay,{role:"menuitemcheckbox","aria-checked":uh(a)?"mixed":a,...r,ref:t,"data-state":c3(a),onSelect:We(r.onSelect,()=>s?.(uh(a)?!0:!a),{checkForDefaultPrevented:!1})})})});mL.displayName=vae;var xL="MenuRadioGroup",[yae,bae]=po(xL,{value:void 0,onValueChange:()=>{}}),gL=v.forwardRef((e,t)=>{const{value:a,onValueChange:s,...r}=e,i=ur(s);return n.jsx(yae,{scope:e.__scopeMenu,value:a,onValueChange:i,children:n.jsx(r3,{...r,ref:t})})});gL.displayName=xL;var hL="MenuRadioItem",vL=v.forwardRef((e,t)=>{const{value:a,...s}=e,r=bae(hL,e.__scopeMenu),i=a===r.value;return n.jsx(yL,{scope:e.__scopeMenu,checked:i,children:n.jsx(ay,{role:"menuitemradio","aria-checked":i,...s,ref:t,"data-state":c3(i),onSelect:We(s.onSelect,()=>r.onValueChange?.(a),{checkForDefaultPrevented:!1})})})});vL.displayName=hL;var i3="MenuItemIndicator",[yL,jae]=po(i3,{checked:!1}),bL=v.forwardRef((e,t)=>{const{__scopeMenu:a,forceMount:s,...r}=e,i=jae(i3,a);return n.jsx(Hn,{present:s||uh(i.checked)||i.checked===!0,children:n.jsx(et.span,{...r,ref:t,"data-state":c3(i.checked)})})});bL.displayName=i3;var wae="MenuSeparator",jL=v.forwardRef((e,t)=>{const{__scopeMenu:a,...s}=e;return n.jsx(et.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});jL.displayName=wae;var Nae="MenuArrow",wL=v.forwardRef((e,t)=>{const{__scopeMenu:a,...s}=e,r=ty(a);return n.jsx(Iv,{...r,...s,ref:t})});wL.displayName=Nae;var Sae="MenuSub",[g3e,NL]=po(Sae),Ip="MenuSubTrigger",SL=v.forwardRef((e,t)=>{const a=fo(Ip,e.__scopeMenu),s=_m(Ip,e.__scopeMenu),r=NL(Ip,e.__scopeMenu),i=n3(Ip,e.__scopeMenu),l=v.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:u}=i,p={__scopeMenu:e.__scopeMenu},x=v.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return v.useEffect(()=>x,[x]),v.useEffect(()=>{const m=d.current;return()=>{window.clearTimeout(m),u(null)}},[d,u]),n.jsx(t3,{asChild:!0,...p,children:n.jsx(fL,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":r.contentId,"data-state":AL(a.open),...e,ref:Pi(t,r.onTriggerChange),onClick:m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),a.open||a.onOpenChange(!0))},onPointerMove:We(e.onPointerMove,bf(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!a.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{a.onOpenChange(!0),x()},100))})),onPointerLeave:We(e.onPointerLeave,bf(m=>{x();const h=a.content?.getBoundingClientRect();if(h){const y=a.content?.dataset.side,w=y==="right",b=w?-5:5,j=h[w?"left":"right"],S=h[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x:j,y:h.top},{x:S,y:h.top},{x:S,y:h.bottom},{x:j,y:h.bottom}],side:y}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:We(e.onKeyDown,m=>{const h=i.searchRef.current!=="";e.disabled||h&&m.key===" "||sae[s.dir].includes(m.key)&&(a.onOpenChange(!0),a.content?.focus(),m.preventDefault())})})})});SL.displayName=Ip;var CL="MenuSubContent",EL=v.forwardRef((e,t)=>{const a=oL(Qs,e.__scopeMenu),{forceMount:s=a.forceMount,...r}=e,i=fo(Qs,e.__scopeMenu),l=_m(Qs,e.__scopeMenu),d=NL(CL,e.__scopeMenu),u=v.useRef(null),p=kt(t,u);return n.jsx(yf.Provider,{scope:e.__scopeMenu,children:n.jsx(Hn,{present:s||i.open,children:n.jsx(yf.Slot,{scope:e.__scopeMenu,children:n.jsx(s3,{id:d.contentId,"aria-labelledby":d.triggerId,...r,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{l.isUsingKeyboardRef.current&&u.current?.focus(),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:We(e.onFocusOutside,x=>{x.target!==d.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:We(e.onEscapeKeyDown,x=>{l.onClose(),x.preventDefault()}),onKeyDown:We(e.onKeyDown,x=>{const m=x.currentTarget.contains(x.target),h=rae[l.dir].includes(x.key);m&&h&&(i.onOpenChange(!1),d.trigger?.focus(),x.preventDefault())})})})})})});EL.displayName=CL;function AL(e){return e?"open":"closed"}function uh(e){return e==="indeterminate"}function c3(e){return uh(e)?"indeterminate":e?"checked":"unchecked"}function Cae(e){const t=document.activeElement;for(const a of e)if(a===t||(a.focus(),document.activeElement!==t))return}function Eae(e,t){return e.map((a,s)=>e[(t+s)%e.length])}function Aae(e,t,a){const r=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,i=a?e.indexOf(a):-1;let l=Eae(e,Math.max(i,0));r.length===1&&(l=l.filter(p=>p!==a));const u=l.find(p=>p.toLowerCase().startsWith(r.toLowerCase()));return u!==a?u:void 0}function Dae(e,t){const{x:a,y:s}=e;let r=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const d=t[i],u=t[l],p=d.x,x=d.y,m=u.x,h=u.y;x>s!=h>s&&a<(m-p)*(s-x)/(h-x)+p&&(r=!r)}return r}function Oae(e,t){if(!t)return!1;const a={x:e.clientX,y:e.clientY};return Dae(a,t)}function bf(e){return t=>t.pointerType==="mouse"?e(t):void 0}var kae=lL,_ae=t3,Tae=dL,Pae=uL,Mae=r3,Rae=pL,Bae=ay,Iae=mL,Lae=gL,$ae=vL,zae=bL,Uae=jL,qae=wL,Fae=SL,Wae=EL,ny="DropdownMenu",[Hae]=Pn(ny,[iL]),Vn=iL(),[Vae,DL]=Hae(ny),OL=e=>{const{__scopeDropdownMenu:t,children:a,dir:s,open:r,defaultOpen:i,onOpenChange:l,modal:d=!0}=e,u=Vn(t),p=v.useRef(null),[x,m]=Zs({prop:r,defaultProp:i??!1,onChange:l,caller:ny});return n.jsx(Vae,{scope:t,triggerId:hn(),triggerRef:p,contentId:hn(),open:x,onOpenChange:m,onOpenToggle:v.useCallback(()=>m(h=>!h),[m]),modal:d,children:n.jsx(kae,{...u,open:x,onOpenChange:m,dir:s,modal:d,children:a})})};OL.displayName=ny;var kL="DropdownMenuTrigger",_L=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,disabled:s=!1,...r}=e,i=DL(kL,a),l=Vn(a);return n.jsx(_ae,{asChild:!0,...l,children:n.jsx(et.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":s?"":void 0,disabled:s,...r,ref:Pi(t,i.triggerRef),onPointerDown:We(e.onPointerDown,d=>{!s&&d.button===0&&d.ctrlKey===!1&&(i.onOpenToggle(),i.open||d.preventDefault())}),onKeyDown:We(e.onKeyDown,d=>{s||(["Enter"," "].includes(d.key)&&i.onOpenToggle(),d.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});_L.displayName=kL;var Gae="DropdownMenuPortal",TL=e=>{const{__scopeDropdownMenu:t,...a}=e,s=Vn(t);return n.jsx(Tae,{...s,...a})};TL.displayName=Gae;var PL="DropdownMenuContent",ML=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=DL(PL,a),i=Vn(a),l=v.useRef(!1);return n.jsx(Pae,{id:r.contentId,"aria-labelledby":r.triggerId,...i,...s,ref:t,onCloseAutoFocus:We(e.onCloseAutoFocus,d=>{l.current||r.triggerRef.current?.focus(),l.current=!1,d.preventDefault()}),onInteractOutside:We(e.onInteractOutside,d=>{const u=d.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0,x=u.button===2||p;(!r.modal||x)&&(l.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)"}})});ML.displayName=PL;var Yae="DropdownMenuGroup",Kae=v.forwardRef((e,t)=>
771{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Mae,{...r,...s,ref:t})});Kae.displayName=Yae;var Qae="DropdownMenuLabel",Xae=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Rae,{...r,...s,ref:t})});Xae.displayName=Qae;var Zae="DropdownMenuItem",RL=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Bae,{...r,...s,ref:t})});RL.displayName=Zae;var Jae="DropdownMenuCheckboxItem",ene=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Iae,{...r,...s,ref:t})});ene.displayName=Jae;var tne="DropdownMenuRadioGroup",ane=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Lae,{...r,...s,ref:t})});ane.displayName=tne;var nne="DropdownMenuRadioItem",sne=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx($ae,{...r,...s,ref:t})});sne.displayName=nne;var rne="DropdownMenuItemIndicator",ine=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(zae,{...r,...s,ref:t})});ine.displayName=rne;var cne="DropdownMenuSeparator",BL=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Uae,{...r,...s,ref:t})});BL.displayName=cne;var lne="DropdownMenuArrow",one=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(qae,{...r,...s,ref:t})});one.displayName=lne;var dne="DropdownMenuSubTrigger",une=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Fae,{...r,...s,ref:t})});une.displayName=dne;var pne="DropdownMenuSubContent",fne=v.forwardRef((e,t)=>{const{__scopeDropdownMenu:a,...s}=e,r=Vn(a);return n.jsx(Wae,{...r,...s,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)"}})});fne.displayName=pne;var mne=OL,xne=_L,gne=TL,hne=ML,vne=RL,yne=BL;function xr({...e}){return n.jsx(mne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:10","data-slot":"dropdown-menu",...e})}function gr({...e}){return n.jsx(xne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:25","data-slot":"dropdown-menu-trigger",...e})}function hr({className:e,sideOffset:t=4,...a}){return n.jsx(gne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:38",children:n.jsx(hne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:39","data-slot":"dropdown-menu-content",sideOffset:t,className:Se("bg-popover text-popover-foreground 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...a})})}function ca({className:e,inset:t,variant:a="default",...s}){return n.jsx(vne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:70","data-slot":"dropdown-menu-item","data-inset":t,"data-variant":a,className:Se("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s})}function jf({className:e,...t}){return n.jsx(yne,{"data-loc":"client/src/components/ui/dropdown-menu.tsx:169","data-slot":"dropdown-menu-separator",className:Se("bg-border -mx-1 my-1 h-px",e),...t})}const bne=[{label:"Dashboard",href:"/admin",icon:z5},{label:"Clients",href:"/admin/clients",icon:wa},{label:"Sending Health",href:"/admin/sending-health",icon:Ks}],jne=[{label:"Dashboard",href:"/dashboard",icon:z5},{label:"Campaigns",href:"/campaigns",icon:ja},{label:"Automations",href:"/automations",icon:Pa},{label:"Popups",href:"/popups",icon:qr},{label:"Deliverability",href:"/deliverability",icon:js},{label:"Revenue",href:"/revenue",icon:Ii},{label:"Activity",href:"/activity",icon:Ks},{label:"Integrations",href:"/integrations",icon:JI},{label:"Blacklist",href:"/blacklist",icon:_S},{label:"Audit Log",href:"/audit-log",icon:Vp},{label:"API Docs",href:"/api-docs",icon:UI}],Xk=[{label:"Contacts",href:"/contacts"},{label:"Duplicates",href:"/contacts/duplicates"},{label:"Segments",href:"/segments"},{label:"Lists",href:"/lists"},{label:"Imports",href:"/imports"},{label:"Exports",href:"/exports"},{label:"Tags",href:"/tags"}];function Pt({children:e,title:t}){const{user:a,logout:s}=Jc(),{isImpersonating:r,clientName:i,stopImpersonation:l}=Zv(),[d,u]=La(),[p,x]=v.useState(!0),m=le.useUtils(),h=a?.role==="admin",y=!h||r,{data:w}=le.settings.get.useQuery(void 0,{enabled:y}),b=w?.logoUrl??null,j=Xk.some(_=>d.startsWith(_.href)),[S,O]=v.useState(j),A=y?jne:bne,k=async()=>{try{await s()}catch{ne.error("Failed to log out")}},E=()=>
771{l(),m.invalidate(),u("/admin/clients"),ne.success("Returned to Admin Console")},D=a?.name?a.name.split(" ").map(_=>_[0]).join("").toUpperCase().slice(0,2):"B";return n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:116",className:"flex h-screen bg-background overflow-hidden",children:[n.jsxs("aside",{"data-loc":"client/src/components/AppLayout.tsx:118",className:Se("flex flex-col border-r border-border transition-all duration-300","bg-sidebar",p?"w-60":"w-16"),children:[n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:126",className:"flex items-center gap-3 px-4 py-5 border-b border-sidebar-border",children:[n.jsx("div",{"data-loc":"client/src/components/AppLayout.tsx:127",className:Se("flex-shrink-0 w-8 h-8 rounded-lg flex items-center justify-center overflow-hidden",b?"bg-transparent":r?"bg-amber-500 shadow-[0_0_12px_rgba(245,158,11,0.4)]":"bg-primary glow-primary"),children:b?n.jsx("img",{"data-loc":"client/src/components/AppLayout.tsx:132",src:b,alt:"Logo",className:"w-full h-full object-contain"}):n.jsx(Pa,{"data-loc":"client/src/components/AppLayout.tsx:134",className:"w-4 h-4 text-white"})}),p&&n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:138",className:"flex flex-col min-w-0",children:[n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:139",className:"font-bold text-sm text-sidebar-foreground tracking-wide",children:b?w?.name??"Boostiko":"Boostiko"}),r?n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:143",className:"text-[10px] font-medium text-amber-400 uppercase tracking-widest truncate",children:i??"Client View"}):h?n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:147",className:"text-[10px] font-medium text-primary uppercase tracking-widest",children:"Admin Console"}):null]})]}),r&&p&&n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:157",className:"mx-3 mt-3 px-3 py-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:158",className:"flex items-center gap-2 mb-1.5",children:[n.jsx(yd,{"data-loc":"client/src/components/AppLayout.tsx:159",className:"w-3.5 h-3.5 text-amber-400 flex-shrink-0"}),n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:160",className:"text-xs font-semibold text-amber-400",children:"Viewing as Client"})]}),n.jsx("p",{"data-loc":"client/src/components/AppLayout.tsx:162",className:"text-[10px] text-amber-300/80 truncate mb-2",children:i}),n.jsxs(te,{"data-loc":"client/src/components/AppLayout.tsx:163",size:"sm",variant:"outline",className:"w-full h-6 text-[10px] border-amber-500/40 text-amber-400 hover:bg-amber-500/10 hover:text-amber-300",onClick:E,children:[n.jsx(rs,{"data-loc":"client/src/components/AppLayout.tsx:169",className:"w-3 h-3 mr-1"}),"Exit Client View"]})]}),p&&h&&!r&&n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:177",className:"mx-3 mt-3 px-3 py-1.5 rounded-md bg-primary/10 border border-primary/20 flex items-center gap-2",children:[n.jsx(yd,{"data-loc":"client/src/components/AppLayout.tsx:178",className:"w-3.5 h-3.5 text-primary flex-shrink-0"}),n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:179",className:"text-xs font-semibold text-primary",children:"Boostiko Admin"})]}),n.jsxs("nav",{"data-loc":"client/src/components/AppLayout.tsx:184",className:"flex-1 px-2 py-4 space-y-0.5 overflow-y-auto",children:[A.map(_=>{const T=_.href==="/admin"||_.href==="/dashboard"?d===_.href:d.startsWith(_.href),I=_.icon;return n.jsxs(It,{"data-loc":"client/src/components/AppLayout.tsx:193",href:_.href,className:Se("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium transition-all duration-150","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",T?r?"bg-amber-500/15 text-amber-400 border-l-2 border-amber-500 pl-[10px]":"bg-primary/15 text-primary border-l-2 border-primary pl-[10px]":"text-sidebar-foreground/70 border-l-2 border-transparent"),children:[n.jsx(I,{"data-loc":"client/src/components/AppLayout.tsx:206",className:Se("w-4 h-4 flex-shrink-0",T?r?"text-amber-400":"text-primary":"")}),p&&n.jsx("span",{"data-loc":"client/src/components/AppLayout.t
771sx:210",className:"truncate",children:_.label}),p&&_.badge&&n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:212",className:"ml-auto text-[10px] font-bold bg-primary/20 text-primary px-1.5 py-0.5 rounded-full",children:_.badge})]},_.href)}),y&&n.jsxs(n.Fragment,{children:[n.jsxs("button",{"data-loc":"client/src/components/AppLayout.tsx:223",onClick:()=>O(_=>!_),className:Se("w-full flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium transition-all duration-150","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",j?r?"bg-amber-500/15 text-amber-400 border-l-2 border-amber-500 pl-[10px]":"bg-primary/15 text-primary border-l-2 border-primary pl-[10px]":"text-sidebar-foreground/70 border-l-2 border-transparent"),children:[n.jsx(wa,{"data-loc":"client/src/components/AppLayout.tsx:235",className:Se("w-4 h-4 flex-shrink-0",j?r?"text-amber-400":"text-primary":"")}),p&&n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:236",className:"truncate flex-1",children:"Audience"}),p&&(S?n.jsx(Tn,{"data-loc":"client/src/components/AppLayout.tsx:238",className:"w-3.5 h-3.5 text-muted-foreground"}):n.jsx(Es,{"data-loc":"client/src/components/AppLayout.tsx:239",className:"w-3.5 h-3.5 text-muted-foreground"}))]}),S&&p&&n.jsx("div",{"data-loc":"client/src/components/AppLayout.tsx:242",className:"ml-6 border-l border-border pl-2 space-y-0.5",children:Xk.map(_=>{const T=d===_.href||d.startsWith(_.href+"/");return n.jsx(It,{"data-loc":"client/src/components/AppLayout.tsx:246",href:_.href,className:Se("block px-2 py-1.5 rounded-md text-sm transition-colors",T?r?"text-amber-400 font-medium bg-amber-500/10":"text-primary font-medium bg-primary/10":"text-muted-foreground hover:bg-sidebar-accent hover:text-foreground"),children:_.label},_.href)})})]})]}),n.jsx("div",{"data-loc":"client/src/components/AppLayout.tsx:269",className:"border-t border-sidebar-border p-3",children:n.jsxs(xr,{"data-loc":"client/src/components/AppLayout.tsx:270",children:[n.jsx(gr,{"data-loc":"client/src/components/AppLayout.tsx:271",asChild:!0,children:n.jsxs("button",{"data-loc":"client/src/components/AppLayout.tsx:272",className:"w-full flex items-center gap-3 px-2 py-2 rounded-md hover:bg-sidebar-accent transition-colors text-left",children:[n.jsx(Q9,{"data-loc":"client/src/components/AppLayout.tsx:273",className:"w-7 h-7 flex-shrink-0",children:n.jsx(X9,{"data-loc":"client/src/components/AppLayout.tsx:274",className:"bg-primary/20 text-primary text-xs font-bold",children:D})}),p&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:280",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/components/AppLayout.tsx:281",className:"text-xs font-medium text-sidebar-foreground truncate",children:a?.name??"User"}),n.jsx("p",{"data-loc":"client/src/components/AppLayout.tsx:284",className:"text-[10px] text-muted-foreground truncate",children:a?.email??""})]}),n.jsx(Tn,{"data-loc":"client/src/components/AppLayout.tsx:288",className:"w-3.5 h-3.5 text-muted-foreground flex-shrink-0"})]})]})}),n.jsxs(hr,{"data-loc":"client/src/components/AppLayout.tsx:293",align:"end",side:"top",className:"w-48",children:[r&&n.jsxs(n.Fragment,{children:[n.jsxs(ca,{"data-loc":"client/src/components/AppLayout.tsx:296",onClick:E,className:"text-amber-400 focus:text-amber-400",children:[n.jsx(rs,{"data-loc":"client/src/components/AppLayout.tsx:297",className:"w-4 h-4 mr-2"}),"Exit Client View"]}),n.jsx(jf,{"data-loc":"client/src/components/AppLayout.tsx:300"})]}),n.jsx(ca,{"data-loc":"client/src/components/AppLayout.tsx:303",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/components/AppLayout.tsx:304",href:"/settings",className:"cursor-pointer",children:[n.jsx(GJ,{"data-loc":"client/src/components/AppLayout.tsx:305",className:"w-4 h-4 mr-2"}),"Settings"]})}),n.jsx(jf,{"data-loc":"client/src/components/AppLayout.tsx:309"}),n.jsxs(ca,{"data-loc":"client/src/components/AppLayout.tsx:310",onClick:k,className:"text-destructive focus:text-destructive",children:[n.jsx(KI,{"data-loc":"client/src/components/AppLayout.t
771sx:311",className:"w-4 h-4 mr-2"}),"Log out"]})]})]})})]}),n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:320",className:"flex-1 flex flex-col min-w-0 overflow-hidden",children:[r&&n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:323",className:"flex items-center justify-between px-6 py-2 bg-amber-500/10 border-b border-amber-500/20 flex-shrink-0",children:[n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:324",className:"flex items-center gap-2",children:[n.jsx(yd,{"data-loc":"client/src/components/AppLayout.tsx:325",className:"w-3.5 h-3.5 text-amber-400"}),n.jsxs("span",{"data-loc":"client/src/components/AppLayout.tsx:326",className:"text-xs font-medium text-amber-300",children:["You are viewing the workspace of ",n.jsx("strong",{"data-loc":"client/src/components/AppLayout.tsx:327",className:"text-amber-400",children:i})," as Admin"]})]}),n.jsxs(te,{"data-loc":"client/src/components/AppLayout.tsx:330",size:"sm",variant:"ghost",className:"h-6 text-[11px] text-amber-400 hover:text-amber-300 hover:bg-amber-500/10 px-2",onClick:E,children:[n.jsx(rs,{"data-loc":"client/src/components/AppLayout.tsx:336",className:"w-3 h-3 mr-1"}),"Exit"]})]}),n.jsxs("header",{"data-loc":"client/src/components/AppLayout.tsx:343",className:"flex items-center justify-between px-6 py-4 border-b border-border bg-background/80 backdrop-blur-sm flex-shrink-0",children:[n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:344",className:"flex items-center gap-4",children:[n.jsx("button",{"data-loc":"client/src/components/AppLayout.tsx:345",onClick:()=>x(!p),className:"p-1.5 rounded-md hover:bg-muted transition-colors",children:n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:349",className:"w-4 h-3 flex flex-col justify-between",children:[n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:350",className:"block h-0.5 bg-muted-foreground rounded"}),n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:351",className:"block h-0.5 bg-muted-foreground rounded"}),n.jsx("span",{"data-loc":"client/src/components/AppLayout.tsx:352",className:"block h-0.5 bg-muted-foreground rounded"})]})}),t&&n.jsx("h1",{"data-loc":"client/src/components/AppLayout.tsx:356",className:"text-base font-semibold text-foreground",children:t})]}),n.jsxs("div",{"data-loc":"client/src/components/AppLayout.tsx:359",className:"flex items-center gap-3",children:[r&&n.jsxs(te,{"data-loc":"client/src/components/AppLayout.tsx:361",size:"sm",variant:"outline",className:"h-7 text-xs border-amber-500/40 text-amber-400 hover:bg-amber-500/10",onClick:E,children:[n.jsx(rs,{"data-loc":"client/src/components/AppLayout.tsx:367",className:"w-3 h-3 mr-1.5"}),"Back to Admin"]}),n.jsx("button",{"data-loc":"client/src/components/AppLayout.tsx:371",className:"p-2 rounded-md hover:bg-muted transition-colors relative",children:n.jsx(mf,{"data-loc":"client/src/components/AppLayout.tsx:372",className:"w-4 h-4 text-muted-foreground"})})]})]}),n.jsx("main",{"data-loc":"client/src/components/AppLayout.tsx:378",className:"flex-1 overflow-y-auto",children:e})]})]})}const wne=I5("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Le({className:e,variant:t,asChild:a=!1,...s}){const r=a?S5:"span";return n.jsx(r,{"data-loc":"client/src/components/ui/badge.tsx:38","data-slot":"badge",className:Se(wne({variant:t}),e),...s})}function Me({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/skeleton.tsx:5","data-slot":"skeleton",className:Se("bg-accent animate-pulse rounded-md",e),...t})}function Nne(){const{user:e,loading:t}=Jc(),[,a]=La();v.useEffect(()=>{!t&&!e&&(window.location.href=uo()),!t&&e&&e.role!=="admin"&&a("/dashboard")},[e,t]);const{data:s,isLoading:r}=le.tenants.list.useQuery(),{data:i}=le.adminAnalytics.globalHealth.useQuery({days:7}),l=s?.filter(h=>h.status==="active").length??0,d=s?.filter(h=>h.status==="trial").length??0,u=s?.filter(h=>h.status==="suspended").length??0,p=i?.reduce((h,y)=>h+(y.totalSent??0),0)??0,x=i?.reduce((h,y)=>h+(y.totalBounces??0),0)??0,m=p>0?(x/p*100).toFixed(2):"0.00";return t?n.jsx(Pt,{"data-loc":"client/src/pages/admin/Dashboard.tsx:36",title:"Admin Dashboard",children:n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:37",className:"p-6 space-y-6",children:n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:38",className:"grid grid-cols-4 gap-4",children:[...Array(4)].map((h,y)=>n.jsx(Me,{"data-loc":"client/src/pages/admin/Dashboard.tsx:40",className:"h-28 rounded-xl"},y))})})}):n.jsx(Pt,{"data-loc":"client/src/pages/admin/Dashboard.tsx:49",title:"Admin Dashboard",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:50",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:52",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:53",children:[n.jsx("h2",{"data-loc":"client/src/pages/admin/Dashboard.tsx:54",className:"text-2xl font-bold text-foreground",children:"Admin Console"}),n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:55",className:"text-muted-foreground text-sm mt-1",children:"Manage all Boostiko client workspaces and monitor sending health"})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:59",className:"flex items-center gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:60",className:"flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 border border-primary/20",children:[n.jsx(yd,{"data-loc":"client/src/pages/admin/Dashboard.tsx:61",className:"w-3.5 h-3.5 text-primary"}),n.jsx("span",{"data-loc":"client/src/pages/admin/Dashboard.tsx:62",className:"text-xs font-semibold text-primary",children:"Boostiko Admin"})]}),n.jsx(te,{"data-loc":"client/src/pages/admin/Dashboard.tsx:64",asChild:!0,size:"sm",children:n.jsxs(It,{"data-loc":"client/src/pages/admin/Dashboard.tsx:65",href:"/admin/clients",children:[n.jsx(Wt,{"data-loc":"client/src/pages/admin/Dashboard.tsx:66",className:"w-4 h-4 mr-2"}),"New Client"]})})]})]}),n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:74",className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[{label:"Total Clients",value:s?.length??0,icon:wa,color:"text-primary",bg:"bg-primary/10"},{label:"Active Clients",value:l,icon:Ks,color:"text-emerald-400",bg:"bg-emerald-500/10"}
771,{label:"Emails (7d)",value:p.toLocaleString(),icon:ja,color:"text-cyan-400",bg:"bg-cyan-500/10"},{label:"Avg Bounce Rate",value:`${m}%`,icon:_n,color:"text-amber-400",bg:"bg-amber-500/10"}].map(({label:h,value:y,icon:w,color:b,bg:j})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:81",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:82",className:"flex items-center justify-between mb-3",children:[n.jsx("span",{"data-loc":"client/src/pages/admin/Dashboard.tsx:83",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:h}),n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:84",className:`w-8 h-8 rounded-lg ${j} flex items-center justify-center`,children:n.jsx(w,{"data-loc":"client/src/pages/admin/Dashboard.tsx:85",className:`w-4 h-4 ${b}`})})]}),n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:88",className:"text-2xl font-bold text-foreground",children:y})]},h))}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:94",className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/admin/Dashboard.tsx:95",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/admin/Dashboard.tsx:96",className:"flex flex-row items-center justify-between pb-3",children:[n.jsx(St,{"data-loc":"client/src/pages/admin/Dashboard.tsx:97",className:"text-sm font-semibold",children:"Client Accounts"}),n.jsx(te,{"data-loc":"client/src/pages/admin/Dashboard.tsx:98",variant:"ghost",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/admin/Dashboard.tsx:99",href:"/admin/clients",children:["View all ",n.jsx(fd,{"data-loc":"client/src/pages/admin/Dashboard.tsx:100",className:"w-3.5 h-3.5 ml-1"})]})})]}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/Dashboard.tsx:104",className:"space-y-2",children:r?[...Array(5)].map((h,y)=>n.jsx(Me,{"data-loc":"client/src/pages/admin/Dashboard.tsx:106",className:"h-12 rounded-lg"},y)):s?.length===0?n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:108",className:"text-center py-8 text-muted-foreground text-sm",children:"No clients yet. Create your first client."}):s?.slice(0,6).map(h=>n.jsx(It,{"data-loc":"client/src/pages/admin/Dashboard.tsx:113",href:`/admin/clients/${h.id}`,children:n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:114",className:"flex items-center justify-between p-3 rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:115",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:116",className:"w-8 h-8 rounded-lg bg-primary/15 flex items-center justify-center",children:n.jsx("span",{"data-loc":"client/src/pages/admin/Dashboard.tsx:117",className:"text-xs font-bold text-primary",children:h.name.slice(0,2).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:121",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:122",className:"text-sm font-medium text-foreground",children:h.name}),n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:123",className:"text-xs text-muted-foreground capitalize",children:h.industry.replace("_"," ")})]})]}),n.jsx(Le,{"data-loc":"client/src/pages/admin/Dashboard.tsx:126",className:h.status==="active"?"badge-active":h.status==="trial"?"badge-paused":"badge-failed",variant:"outline",children:h.status})]})},h.id))})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/admin/Dashboard.tsx:143",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/admin/Dashboard.tsx:144",className:"flex flex-row items-center justify-between pb-3",children:[n.jsx(St,{"data-loc":"client/src/pages/admin/Dashboard.tsx:145",className:"text-sm font-semibold",children:"Sending Health (7 days)"}),n.jsx(te,{"data-loc":"client/src/pages/admin/Dashboard.tsx:146",variant:"ghost",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/admin/Dashboard.tsx:147",href:"/admin/sending-health",children:["Details ",n.jsx(fd,{"data-loc":"client/src/pages/admin/Dashboard.tsx:148",className:"w-3.5 h-3.5 ml-1"})]})})]}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/Dashboard.tsx:152",children:!i||i.length===0?n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:154",className:"text-center py-8 text-muted-foreground text-sm",children:"No sending data yet. Sending health will appear once emails are sent."}):n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:158",className:"space-y-3",children:[{label:"Total Sent",value:p.toLocaleStr
vendor: 4,305 bytes, line 771
771ing(),color:"text-foreground"},{label:"Total Bounces",value:x.toLocaleString(),color:"text-amber-400"},{label:"Bounce Rate",value:`${m}%`,color:parseFloat(m)>5?"text-red-400":"text-emerald-400"}].map(({label:h,value:y,color:w})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:164",className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[n.jsx("span",{"data-loc":"client/src/pages/admin/Dashboard.tsx:165",className:"text-sm text-muted-foreground",children:h}),n.jsx("span",{"data-loc":"client/src/pages/admin/Dashboard.tsx:166",className:`text-sm font-semibold ${w}`,children:y})]},h))})})]})]}),n.jsx("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:176",className:"grid grid-cols-3 gap-4",children:[{label:"Active Clients",value:l,color:"text-emerald-400"},{label:"Trial Clients",value:d,color:"text-amber-400"},{label:"Suspended",value:u,color:"text-red-400"}].map(({label:h,value:y,color:w})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/Dashboard.tsx:182",className:"glass-card rounded-xl p-4 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:183",className:`text-3xl font-bold ${w}`,children:y}),n.jsx("p",{"data-loc":"client/src/pages/admin/Dashboard.tsx:184",className:"text-xs text-muted-foreground mt-1",children:h})]},h))})]})})}function ph(e,[t,a]){return Math.min(a,Math.max(t,e))}function sy(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Sne=[" ","Enter","ArrowUp","ArrowDown"],Cne=[" ","Enter"],Zl="Select",[ry,iy,Ene]=Jv(Zl),[uu]=Pn(Zl,[Ene,Zc]),cy=Zc(),[Ane,el]=uu(Zl),[Dne,One]=uu(Zl),IL=e=>{const{__scopeSelect:t,children:a,open:s,defaultOpen:r,onOpenChange:i,value:l,defaultValue:d,onValueChange:u,dir:p,name:x,autoComplete:m,disabled:h,required:y,form:w}=e,b=cy(t),[j,S]=v.useState(null),[O,A]=v.useState(null),[k,E]=v.useState(!1),D=Dm(p),[_,T]=Zs({prop:s,defaultProp:r??!1,onChange:i,caller:Zl}),[I,$]=Zs({prop:l,defaultProp:d,onChange:u,caller:Zl}),R=v.useRef(null),B=j?w||!!j.closest("form"):!0,[Y,z]=v.useState(new Set),Q=Array.from(Y).map(L=>L.props.value).join(";");return n.jsx(Rv,{...b,children:n.jsxs(Ane,{required:y,scope:t,trigger:j,onTriggerChange:S,valueNode:O,onValueNodeChange:A,valueNodeHasChildren:k,onValueNodeHasChildrenChange:E,contentId:hn(),value:I,onValueChange:$,open:_,onOpenChange:T,dir:D,triggerPointerDownPosRef:R,disabled:h,children:[n.jsx(ry.Provider,{scope:t,children:n.jsx(Dne,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(L=>{z(M=>new Set(M).add(L))},[]),onNativeOptionRemove:v.useCallback(L=>{z(M=>{const U=new Set(M);return U.delete(L),U})},[]),children:a})}),B?n.jsxs(r$,{"aria-hidden":!0,required:y,tabIndex:-1,name:x,autoComplete:m,value:I,onChange:L=>$(L.target.value),disabled:h,form:w,children:[I===void 0?n.jsx("option",{value:""}):null,Array.from(Y)]},Q):null]})})};IL.displayName=Zl;var LL="SelectTrigger",$L=v.forwardRef((e,t)=>{const{__scopeSelect:a,disabled:s=!1,...r}=e,i=cy(a),l=el(LL,a),d=l.disabled||s,u=kt(t,l.onTriggerChange),p=iy(a),x=v.useRef("touch"),[m,h,y]=c$(b=>{const j=p().filter(A=>!A.disabled),S=j.find(A=>A.value===l.value),O=l$(j,b,S);O!==void 0&&l.onValueChange(O.value)}),w=b=>{d||(l.onOpenChange(!0),y()),b&&(l.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return n.jsx(Sm,{asChild:!0,...i,children:n.jsx(et.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":i$(l.value)?"":void 0,...r,ref:u,onClick:We(r.onClick,b=>{b.currentTarget.focus(),x.current!=="mouse"&&w(b)}),onPointerDown:We(r.onPointerDown,b=>{x.current=b.pointerType;const j=b.target;j.hasPointerCapture(b.pointerId)&&j.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(w(b),b.preventDefault())}),onKeyDown:We(r.onKeyDown,b=>{const j=m.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&h(b.key),!(j&&b.key===" ")&&Sne.includes(b.key)&&(w(),b.preventDefault())})})})});$L.displayName=LL;var zL="SelectValue",UL=v.forwardRef((e,t)=>
vendor: 13,468 bytes, line 771
771{const{__scopeSelect:a,className:s,style:r,children:i,placeholder:l="",...d}=e,u=el(zL,a),{onValueNodeHasChildrenChange:p}=u,x=i!==void 0,m=kt(t,u.onValueNodeChange);return on(()=>{p(x)},[p,x]),n.jsx(et.span,{...d,ref:m,style:{pointerEvents:"none"},children:i$(u.value)?n.jsx(n.Fragment,{children:l}):i})});UL.displayName=zL;var kne="SelectIcon",qL=v.forwardRef((e,t)=>{const{__scopeSelect:a,children:s,...r}=e;return n.jsx(et.span,{"aria-hidden":!0,...r,ref:t,children:s||"▼"})});qL.displayName=kne;var _ne="SelectPortal",FL=e=>n.jsx(lu,{asChild:!0,...e});FL.displayName=_ne;var Jl="SelectContent",WL=v.forwardRef((e,t)=>{const a=el(Jl,e.__scopeSelect),[s,r]=v.useState();if(on(()=>{r(new DocumentFragment)},[]),!a.open){const i=s;return i?Br.createPortal(n.jsx(HL,{scope:e.__scopeSelect,children:n.jsx(ry.Slot,{scope:e.__scopeSelect,children:n.jsx("div",{children:e.children})})}),i):null}return n.jsx(VL,{...e,ref:t})});WL.displayName=Jl;var rr=10,[HL,tl]=uu(Jl),Tne="SelectContentImpl",Pne=Wc("SelectContent.RemoveScroll"),VL=v.forwardRef((e,t)=>{const{__scopeSelect:a,position:s="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:l,side:d,sideOffset:u,align:p,alignOffset:x,arrowPadding:m,collisionBoundary:h,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:j,...S}=e,O=el(Jl,a),[A,k]=v.useState(null),[E,D]=v.useState(null),_=kt(t,se=>k(se)),[T,I]=v.useState(null),[$,R]=v.useState(null),B=iy(a),[Y,z]=v.useState(!1),Q=v.useRef(!1);v.useEffect(()=>{if(A)return Hv(A)},[A]),Fv();const L=v.useCallback(se=>{const[ye,...de]=B().map(ue=>ue.ref.current),[ve]=de.slice(-1),Pe=document.activeElement;for(const ue of se)if(ue===Pe||(ue?.scrollIntoView({block:"nearest"}),ue===ye&&E&&(E.scrollTop=0),ue===ve&&E&&(E.scrollTop=E.scrollHeight),ue?.focus(),document.activeElement!==Pe))return},[B,E]),M=v.useCallback(()=>L([T,A]),[L,T,A]);v.useEffect(()=>{Y&&M()},[Y,M]);const{onOpenChange:U,triggerPointerDownPosRef:Z}=O;v.useEffect(()=>{if(A){let se={x:0,y:0};const ye=ve=>{se={x:Math.abs(Math.round(ve.pageX)-(Z.current?.x??0)),y:Math.abs(Math.round(ve.pageY)-(Z.current?.y??0))}},de=ve=>{se.x<=10&&se.y<=10?ve.preventDefault():A.contains(ve.target)||U(!1),document.removeEventListener("pointermove",ye),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",de,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",de,{capture:!0})}}},[A,U,Z]),v.useEffect(()=>{const se=()=>U(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[U]);const[ie,G]=c$(se=>{const ye=B().filter(Pe=>!Pe.disabled),de=ye.find(Pe=>Pe.ref.current===document.activeElement),ve=l$(ye,se,de);ve&&setTimeout(()=>ve.ref.current.focus())}),F=v.useCallback((se,ye,de)=>{const ve=!Q.current&&!de;(O.value!==void 0&&O.value===ye||ve)&&(I(se),ve&&(Q.current=!0))},[O.value]),H=v.useCallback(()=>A?.focus(),[A]),q=v.useCallback((se,ye,de)=>{const ve=!Q.current&&!de;(O.value!==void 0&&O.value===ye||ve)&&R(se)},[O.value]),J=s==="popper"?$S:GL,ce=J===$S?{side:d,sideOffset:u,align:p,alignOffset:x,arrowPadding:m,collisionBoundary:h,collisionPadding:y,sticky:w,hideWhenDetached:b,avoidCollisions:j}:{};return n.jsx(HL,{scope:a,content:A,viewport:E,onViewportChange:D,itemRefCallback:F,selectedItem:T,onItemLeave:H,itemTextRefCallback:q,focusSelectedItem:M,selectedItemText:$,position:s,isPositioned:Y,searchRef:ie,children:n.jsx(Am,{as:Pne,allowPinchZoom:!0,children:n.jsx(Em,{asChild:!0,trapped:O.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:We(r,se=>{O.trigger?.focus({preventScroll:!0}),se.preventDefault()}),children:n.jsx(ru,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:n.jsx(J,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:se=>se.preventDefault(),...S,...ce,onPlaced:()=>z(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:We(S.onKeyDown,se=>{const ye=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ye&&se.key.length===1&&G(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let ve=B().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(se.key)&&(ve=ve.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Pe=se.target,ue=ve.indexOf(Pe);ve=ve.slice(ue+1)}setTimeout(()=>L(ve)),se.preventDefault()}})})})})})})});VL.displayName=Tne;var Mne="SelectItemAlignedPosition",GL=v.forwardRef((e,t)=>{const{__scopeSelect:a,onPlaced:s,...r}=e,i=el(Jl,a),l=tl(Jl,a),[d,u]=v.useState(null),[p,x]=v.useState(null),m=kt(t,_=>x(_)),h=iy(a),y=v.useRef(!1),w=v.useRef(!0),{viewport:b,selectedItem:j,selectedItemText:S,focusSelectedItem:O}=l,A=v.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&p&&b&&j&&S){const _=i.trigger.getBoundingClientRect(),T=p.getBoundingClientRect(),I=i.valueNode.getBoundingClientRect(),$=S.getBoundingClientRect();if(i.dir!=="rtl"){const Pe=$.left-T.left,ue=I.left-Pe,Qe=_.left-ue,Ue=_.width+Qe,xe=Math.max(Ue,T.width),$e=window.innerWidth-rr,Te=ph(ue,[rr,Math.max(rr,$e-xe)]);d.style.minWidth=Ue+"px",d.style.left=Te+"px"}else{const Pe=T.right-$.right,ue=window.innerWidth-I.right-Pe,Qe=window.innerWidth-_.right-ue,Ue=_.width+Qe,xe=Math.max(Ue,T.width),$e=window.innerWidth-rr,Te=ph(ue,[rr,Math.max(rr,$e-xe)]);d.style.minWidth=Ue+"px",d.style.right=Te+"px"}const R=h(),B=window.innerHeight-rr*2,Y=b.scrollHeight,z=window.getComputedStyle(p),Q=parseInt(z.borderTopWidth,10),L=parseInt(z.paddingTop,10),M=parseInt(z.borderBottomWidth,10),U=parseInt(z.paddingBottom,10),Z=Q+L+Y+U+M,ie=Math.min(j.offsetHeight*5,Z),G=window.getComputedStyle(b),F=parseInt(G.paddingTop,10),H=parseInt(G.paddingBottom,10),q=_.top+_.height/2-rr,J=B-q,ce=j.offsetHeight/2,se=j.offsetTop+ce,ye=Q+L+se,de=Z-ye;if(ye<=q){const Pe=R.length>0&&j===R[R.length-1].ref.current;d.style.bottom="0px";const ue=p.clientHeight-b.offsetTop-b.offsetHeight,Qe=Math.max(J,ce+(Pe?H:0)+ue+M),Ue=ye+Qe;d.style.height=Ue+"px"}else{const Pe=R.length>0&&j===R[0].ref.current;d.style.top="0px";const Qe=Math.max(q,Q+b.offsetTop+(Pe?F:0)+ce)+de;d.style.height=Qe+"px",b.scrollTop=ye-q+b.offsetTop}d.style.margin=`${rr}px 0`,d.style.minHeight=ie+"px",d.style.maxHeight=B+"px",s?.(),requestAnimationFrame(()=>y.current=!0)}},[h,i.trigger,i.valueNode,d,p,b,j,S,i.dir,s]);on(()=>A(),[A]);const[k,E]=v.useState();on(()=>{p&&E(window.getComputedStyle(p).zIndex)},[p]);const D=v.useCallback(_=>{_&&w.current===!0&&(A(),O?.(),w.current=!1)},[A,O]);return n.jsx(Bne,{scope:a,contentWrapper:d,shouldExpandOnScrollRef:y,onScrollButtonChange:D,children:n.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:n.jsx(et.div,{...r,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});GL.displayName=Mne;var Rne="SelectPopperPosition",$S=v.forwardRef((e,t)=>{const{__scopeSelect:a,align:s="start",collisionPadding:r=rr,...i}=e,l=cy(a);return n.jsx(Bv,{...l,...i,ref:t,align:s,collisionPadding:r,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)"}})});$S.displayName=Rne;var[Bne,l3]=uu(Jl,{}),zS="SelectViewport",YL=v.forwardRef((e,t)=>{const{__scopeSelect:a,nonce:s,...r}=e,i=tl(zS,a),l=l3(zS,a),d=kt(t,i.onViewportChange),u=v.useRef(0);return n.jsxs(n.Fragment,{children:[n.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:s}),n.jsx(ry.Slot,{scope:a,children:n.jsx(et.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:We(r.onScroll,p=>{const x=p.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:h}=l;if(h?.current&&m){const y=Math.abs(u.current-x.scrollTop);if(y>0){const w=window.innerHeight-rr*2,b=parseFloat(m.style.minHeight),j=parseFloat(m.style.height),S=Math.max(b,j);if(S<w){const O=S+y,A=Math.min(w,O),k=O-A;m.style.height=A+"px",m.style.bottom==="0px"&&(x.scrollTop=k>0?k:0,m.style.justifyContent="flex-end")}}}u.current=x.scrollTop})})})]})});YL.displayName=zS;var KL="SelectGroup",[Ine,Lne]=uu(KL),$ne=v.forwardRef((e,t)=>{const{__scopeSelect:a,...s}=e,r=hn();return n.jsx(Ine,{scope:a,id:r,children:n.jsx(et.div,{role:"group","aria-labelledby":r,...s,ref:t})})});$ne.displayName=KL;var QL="SelectLabel",zne=v.forwardRef((e,t)=>{const{__scopeSelect:a,...s}=e,r=Lne(QL,a);return n.jsx(et.div,{id:r.id,...s,ref:t})});zne.displayName=QL;var fh="SelectItem",[Une,XL]=uu(fh),ZL=v.forwardRef((e,t)=>{const{__scopeSelect:a,value:s,disabled:r=!1,textValue:i,...l}=e,d=el(fh,a),u=tl(fh,a),p=d.value===s,[x,m]=v.useState(i??""),[h,y]=v.useState(!1),w=kt(t,O=>u.itemRefCallback?.(O,s,r)),b=hn(),j=v.useRef("touch"),S=()=>{r||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")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 n.jsx(Une,{scope:a,value:s,disabled:r,textId:b,isSelected:p,onItemTextChange:v.useCallback(O=>{m(A=>A||(O?.textContent??"").trim())},[]),children:n.jsx(ry.ItemSlot,{scope:a,value:s,disabled:r,textValue:x,children:n.jsx(et.div,{role:"option","aria-labelledby":b,"data-highlighted":h?"":void 0,"aria-selected":p&&h,"data-state":p?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...l,ref:w,onFocus:We(l.onFocus,()=>y(!0)),onBlur:We(l.onBlur,()=>y(!1)),onClick:We(l.onClick,()=>{j.current!=="mouse"&&S()}),onPointerUp:We(l.onPointerUp,()=>{j.current==="mouse"&&S()}),onPointerDown:We(l.onPointerDown,O=>{j.current=O.pointerType}),onPointerMove:We(l.onPointerMove,O=>{j.current=O.pointerType,r?u.onItemLeave?.():j.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:We(l.onPointerLeave,O=>{O.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:We(l.onKeyDown,O=>{u.searchRef?.current!==""&&O.key===" "||(Cne.includes(O.key)&&S(),O.key===" "&&O.preventDefault())})})})})});ZL.displayName=fh;var Lp="SelectItemText",JL=v.forwardRef((e,t)=>{const{__scopeSelect:a,className:s,style:r,...i}=e,l=el(Lp,a),d=tl(Lp,a),u=XL(Lp,a),p=One(Lp,a),[x,m]=v.useState(null),h=kt(t,S=>m(S),u.onItemTextChange,S=>d.itemTextRefCallback?.(S,u.value,u.disabled)),y=x?.textContent,w=v.useMemo(()=>n.jsx("option",{value:u.value,disabled:u.disabled,children:y},u.value),[u.disabled,u.value,y]),{onNativeOptionAdd:b,onNativeOptionRemove:j}=p;return on(()=>(b(w),()=>j(w)),[b,j,w]),n.jsxs(n.Fragment,{children:[n.jsx(et.span,{id:u.textId,...i,ref:h}),u.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Br.createPortal(i.children,l.valueNode):null]})});JL.displayName=Lp;var e$="SelectItemIndicator",t$=v.forwardRef((e,t)=>{const{__scopeSelect:a,...s}=e;return XL(e$,a).isSelected?n.jsx(et.span,{"aria-hidden":!0,...s,ref:t}):null});t$.displayName=e$;var US="SelectScrollUpButton",a$=v.forwardRef((e,t)=>{const a=tl(US,e.__scopeSelect),s=l3(US,e.__scopeSelect),[r,i]=v.useState(!1),l=kt(t,s.onScrollButtonChange);return on(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=u.scrollTop>0;i(p)};const u=a.viewport;return d(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),r?n.jsx(s$,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:u}=a;d&&u&&(d.scrollTop=d.scrollTop-u.offsetHeight)}}):null});a$.displayName=US;var qS="SelectScrollDownButton",n$=v.forwardRef((e,t)=>{const a=tl(qS,e.__scopeSelect),s=l3(qS,e.__scopeSelect),[r,i]=v.useState(!1),l=kt(t,s.onScrollButtonChange);return on(()=>{if(a.viewport&&a.isPositioned){let d=function(){const p=u.scrollHeight-u.clientHeight,x=Math.ceil(u.scrollTop)<p;i(x)};const u=a.viewport;return d(),u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[a.viewport,a.isPositioned]),r?n.jsx(s$,{...e,ref:l,onAutoScroll:()=>{const{viewport:d,selectedItem:u}=a;d&&u&&(d.scrollTop=d.scrollTop+u.offsetHeight)}}):null});n$.displayName=qS;var s$=v.forwardRef((e,t)=>{const{__scopeSelect:a,onAutoScroll:s,...r}=e,i=tl("SelectScrollButton",a),l=v.useRef(null),d=iy(a),u=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>u(),[u]),on(()=>{d().find(x=>x.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[d]),n.jsx(et.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:We(r.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(s,50))}),onPointerMove:We(r.onPointerMove,()=>{i.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(s,50))}),onPointerLeave:We(r.onPointerLeave,()=>{u()})})}),qne="SelectSeparator",Fne=v.forwardRef((e,t)=>
vendor: 6,495 bytes, line 771
771{const{__scopeSelect:a,...s}=e;return n.jsx(et.div,{"aria-hidden":!0,...s,ref:t})});Fne.displayName=qne;var FS="SelectArrow",Wne=v.forwardRef((e,t)=>{const{__scopeSelect:a,...s}=e,r=cy(a),i=el(FS,a),l=tl(FS,a);return i.open&&l.position==="popper"?n.jsx(Iv,{...r,...s,ref:t}):null});Wne.displayName=FS;var Hne="SelectBubbleInput",r$=v.forwardRef(({__scopeSelect:e,value:t,...a},s)=>{const r=v.useRef(null),i=kt(s,r),l=sy(t);return v.useEffect(()=>{const d=r.current;if(!d)return;const u=window.HTMLSelectElement.prototype,x=Object.getOwnPropertyDescriptor(u,"value").set;if(l!==t&&x){const m=new Event("change",{bubbles:!0});x.call(d,t),d.dispatchEvent(m)}},[l,t]),n.jsx(et.select,{...a,style:{...xI,...a.style},ref:i,defaultValue:t})});r$.displayName=Hne;function i$(e){return e===""||e===void 0}function c$(e){const t=ur(e),a=v.useRef(""),s=v.useRef(0),r=v.useCallback(l=>{const d=a.current+l;t(d),(function u(p){a.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>u(""),1e3))})(d)},[t]),i=v.useCallback(()=>{a.current="",window.clearTimeout(s.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(s.current),[]),[a,r,i]}function l$(e,t,a){const r=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,i=a?e.indexOf(a):-1;let l=Vne(e,Math.max(i,0));r.length===1&&(l=l.filter(p=>p!==a));const u=l.find(p=>p.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==a?u:void 0}function Vne(e,t){return e.map((a,s)=>e[(t+s)%e.length])}var Gne=IL,Yne=$L,Kne=UL,Qne=qL,Xne=FL,Zne=WL,Jne=YL,ese=ZL,tse=JL,ase=t$,nse=a$,sse=n$;function mt({...e}){return n.jsx(Gne,{"data-loc":"client/src/components/ui/select.tsx:10","data-slot":"select",...e})}function ht({...e}){return n.jsx(Kne,{"data-loc":"client/src/components/ui/select.tsx:22","data-slot":"select-value",...e})}function xt({className:e,size:t="default",children:a,...s}){return n.jsxs(Yne,{"data-loc":"client/src/components/ui/select.tsx:34","data-slot":"select-trigger","data-size":t,className:Se("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...s,children:[a,n.jsx(Qne,{"data-loc":"client/src/components/ui/select.tsx:44",asChild:!0,children:n.jsx(Tn,{"data-loc":"client/src/components/ui/select.tsx:45",className:"size-4 opacity-50"})})]})}function gt({className:e,children:t,position:a="popper",align:s="center",...r}){return n.jsx(Xne,{"data-loc":"client/src/components/ui/select.tsx:59",children:n.jsxs(Zne,{"data-loc":"client/src/components/ui/select.tsx:60","data-slot":"select-content",className:Se("bg-popover text-popover-foreground 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",a==="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:a,align:s,...r,children:[n.jsx(rse,{"data-loc":"client/src/components/ui/select.tsx:72"}),n.jsx(Jne,{"data-loc":"client/src/components/ui/select.tsx:73",className:Se("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),n.jsx(ise,{"data-loc":"client/src/components/ui/select.tsx:82"})]})})}function he({className:e,children:t,...a}){return n.jsxs(ese,{"data-loc":"client/src/components/ui/select.tsx:107","data-slot":"select-item",className:Se("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...a,children:[n.jsx("span",{"data-loc":"client/src/components/ui/select.tsx:115",className:"absolute right-2 flex size-3.5 items-center justify-center",children:n.jsx(ase,{"data-loc":"client/src/components/ui/select.tsx:116",children:n.jsx(ss,{"data-loc":"client/src/components/ui/select.tsx:117",className:"size-4"})})}),n.jsx(tse,{"data-loc":"client/src/components/ui/select.tsx:120",children:t})]})}function rse({className:e,...t}){return n.jsx(nse,{"data-loc":"client/src/components/ui/select.tsx:143","data-slot":"select-scroll-up-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Bi,{"data-loc":"client/src/components/ui/select.tsx:151",className:"size-4"})})}function ise({className:e,...t}){return n.jsx(sse,{"data-loc":"client/src/components/ui/select.tsx:161","data-slot":"select-scroll-down-button",className:Se("flex cursor-default items-center justify-center py-1",e),...t,children:n.jsx(Tn,{"data-loc":"client/src/components/ui/select.tsx:169",className:"size-4"})})}function cse(){const[e,t]=v.useState(""),[a,s]=v.useState(!1),[r,i]=v.useState({name:"",slug:"",industry:"prop_firm",contactEmail:"",fromEmail:"",fromName:""}),{startImpersonation:l}=Zv(),[,d]=La(),{data:u,isLoading:p,refetch:x}=le.tenants.list.useQuery(),m=le.tenants.create.useMutation({onSuccess:()=>{ne.success("Client created successfully"),s(!1),x()},onError:w=>ne.error(w.message)}),h=u?.filter(w=>w.name.toLowerCase().includes(e.toLowerCase())||w.contactEmail?.toLowerCase().includes(e.toLowerCase())),y=()=>
771{if(!r.name||!r.slug)return ne.error("Name and slug are required");m.mutate(r)};return n.jsx(Pt,{"data-loc":"client/src/pages/admin/Clients.tsx:40",title:"Client Management",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:41",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:42",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:43",children:[n.jsx("h2",{"data-loc":"client/src/pages/admin/Clients.tsx:44",className:"text-2xl font-bold text-foreground",children:"Clients"}),n.jsx("p",{"data-loc":"client/src/pages/admin/Clients.tsx:45",className:"text-muted-foreground text-sm mt-1",children:"Manage all Boostiko client workspaces"})]}),n.jsxs(qa,{"data-loc":"client/src/pages/admin/Clients.tsx:47",open:a,onOpenChange:s,children:[n.jsx(qi,{"data-loc":"client/src/pages/admin/Clients.tsx:48",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/admin/Clients.tsx:49",size:"sm",children:[n.jsx(Wt,{"data-loc":"client/src/pages/admin/Clients.tsx:49",className:"w-4 h-4 mr-2"}),"New Client"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/admin/Clients.tsx:51",className:"bg-card border-border",children:[n.jsx(Wa,{"data-loc":"client/src/pages/admin/Clients.tsx:52",children:n.jsx(Ha,{"data-loc":"client/src/pages/admin/Clients.tsx:53",children:"Create New Client"})}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:55",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:56",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:57",children:"Company Name"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:58",placeholder:"Alpha Prop Firm",value:r.name,onChange:w=>i({...r,name:w.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:60",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:61",children:"Slug (unique identifier)"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:62",placeholder:"alpha-prop-firm",value:r.slug,onChange:w=>i({...r,slug:w.target.value.toLowerCase().replace(/\s+/g,"-")})})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:64",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:65",children:"Industry"}),n.jsxs(mt,{"data-loc":"client/src/pages/admin/Clients.tsx:66",value:r.industry,onValueChange:w=>i({...r,industry:w}),children:[n.jsx(xt,{"data-loc":"client/src/pages/admin/Clients.tsx:67",children:n.jsx(ht,{"data-loc":"client/src/pages/admin/Clients.tsx:67"})}),n.jsxs(gt,{"data-loc":"client/src/pages/admin/Clients.tsx:68",children:[n.jsx(he,{"data-loc":"client/src/pages/admin/Clients.tsx:69",value:"prop_firm",children:"Prop Trading Firm"}),n.jsx(he,{"data-loc":"client/src/pages/admin/Clients.tsx:70",value:"crypto",children:"Crypto / DeFi"}),n.jsx(he,{"data-loc":"client/src/pages/admin/Clients.tsx:71",value:"other",children:"Other"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:75",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:76",children:"Contact Email"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:77",type:"email",placeholder:"[email protected]",value:r.contactEmail,onChange:w=>i({...r,contactEmail:w.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:79",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:80",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:81",children:"From Name"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:82",placeholder:"Alpha Prop",value:r.fromName,onChange:w=>i({...r,fromName:w.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:84",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/admin/Clients.tsx:85",children:"From Email"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:86",type:"email",placeholder:"[email protected]",value:r.fromEmail,onChange:w=>i({...r,fromEmail:w.target.value})})]})]}),n.jsx(te,{"data-loc":"client/src/pages/admin/Clients.tsx:89",className:"w-full",onClick:y,disabled:m.isPending,children:m.isPending?"Creating...":"Create Client"})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:98",className:"relative max-w-sm",children:[n.jsx(Gr,{"data-loc":"client/src/pages/admin/Clients.tsx:99",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/admin/Clients.tsx:100",className:"pl-9",placeholder:"Search clients...",value:e,onCh
771ange:w=>t(w.target.value)})]}),n.jsx("div",{"data-loc":"client/src/pages/admin/Clients.tsx:104",className:"rounded-xl border border-border overflow-hidden",children:n.jsxs("table",{"data-loc":"client/src/pages/admin/Clients.tsx:105",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/admin/Clients.tsx:106",children:n.jsxs("tr",{"data-loc":"client/src/pages/admin/Clients.tsx:107",className:"border-b border-border bg-muted/30",children:[n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:108",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Client"}),n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:109",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Industry"}),n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:110",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Status"}),n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:111",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"From Email"}),n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:112",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Created"}),n.jsx("th",{"data-loc":"client/src/pages/admin/Clients.tsx:113",className:"px-4 py-3"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/admin/Clients.tsx:116",children:p?[...Array(5)].map((w,b)=>n.jsx("tr",{"data-loc":"client/src/pages/admin/Clients.tsx:119",className:"border-b border-border",children:n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:120",colSpan:6,className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/admin/Clients.tsx:120",className:"h-8 w-full"})})},b)):h?.length===0?n.jsx("tr",{"data-loc":"client/src/pages/admin/Clients.tsx:124",children:n.jsxs("td",{"data-loc":"client/src/pages/admin/Clients.tsx:125",colSpan:6,className:"text-center py-12 text-muted-foreground text-sm",children:[n.jsx(qI,{"data-loc":"client/src/pages/admin/Clients.tsx:126",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"No clients found"]})}):h?.map(w=>n.jsxs("tr",{"data-loc":"client/src/pages/admin/Clients.tsx:132",className:"border-b border-border data-table-row transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:133",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:134",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/admin/Clients.tsx:135",className:"w-8 h-8 rounded-lg bg-primary/15 flex items-center justify-center flex-shrink-0",children:n.jsx("span",{"data-loc":"client/src/pages/admin/Clients.tsx:136",className:"text-xs font-bold text-primary",children:w.name.slice(0,2).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:138",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/Clients.tsx:139",className:"text-sm font-medium text-foreground",children:w.name}),n.jsx("p",{"data-loc":"client/src/pages/admin/Clients.tsx:140",className:"text-xs text-muted-foreground",children:w.slug})]})]})}),n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:144",className:"px-4 py-3",children:n.jsx("span",{"data-loc":"client/src/pages/admin/Clients.tsx:145",className:"text-sm text-muted-foreground capitalize",children:w.industry.replace("_"," ")})}),n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:147",className:"px-4 py-3",children:n.jsx(Le,{"data-loc":"client/src/pages/admin/Clients.tsx:148",className:w.status==="active"?"badge-active":w.status==="trial"?"badge-paused":"badge-failed",variant:"outline",children:w.status})}),n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:155",className:"px-4 py-3",children:n.jsx("span",{"data-loc":"client/src/pages/admin/Clients.tsx:156",className:"text-sm text-muted-foreground",children:w.fromEmail??"—"})}),n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:158",className:"px-4 py-3",children:n.jsx("span",{"data-loc":"client/src/pages/admin/Clients.tsx:159",className:"text-xs text-muted-foreground",children:new Date(w.createdAt).toLocaleDateString()})}),n.jsx("td",{"data-loc":"client/src/pages/admin/Clients.tsx:161",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/Clients.tsx:162",className:"flex items-center gap-1",children:[n.jsxs(te,{"data-loc":"client/src/pages/admin/Clients.tsx:163",variant:"ghost",size:"sm",className:"h-7 text-xs text-amber-400 hover:text-amber-300 hover:bg-amber-500/10",onClick:()=>{l(w.id,w.name),d("/dashboard"),ne.success(`Now viewing as ${w.name}`)},children:[n.jsx(la,{"data-loc":"client/src/pages/admin/Clients.tsx:173",className:"w-3.5 h-3.5 mr-1"}),"View as Client"]}),n.jsx(te,{"data-loc":"client/src/pages/admin/Clients.tsx:176",variant:"ghost",size:"sm",asChild:!0,className:"h-7",children:n.jsx(It,{"data-loc":"client/src/pages/admin/Clients.tsx:177",href:`/admin/clients/${w.id}`,children:n.jsx(zv,{"data-loc":"client/src/pages/admin/Clients.tsx:178",className:"w-3.5 h-3.5"})})})]})})]},w.id))})]})})]})})}function lse(){const e=Yi(),t=parseInt(e.id??"0"),[,a]=La(),{startImpersonation:s}=Zv(),{data:r,isLoading:i,refetch:l}=le.tenants.get.useQuery({id:t}),d=le.tenants.update.useMutation({onSuccess:()=>{ne.success("Client updated"),l()},onError:p=>ne.error(p.message)}),u=p=>{d.mutate({id:t,data:{status:p}})};return i?n.jsx(Pt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:32",title:"Client Detail",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:33",className:"p-6 space-y-4",children:[n.jsx(Me,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:34",className:"h-8 w-48"}),n.jsx(Me,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:35",className:"h-48 w-full"})]})}):r?n.jsx(Pt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:50",title:r.name,children:n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:51",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:52",className:"flex items-center gap-4",children:[n.jsxs(te,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:53",variant:"ghost",size:"sm",onClick:()=>a("/admin/clients"),children:[n.jsx(rs,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:54",className:"w-4 h-4 mr-2"}),"Back"]}),n.jsx("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:56",className:"flex-1"}),n.jsxs(te,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:57",size:"sm",variant:"outline",className:"border-amber-500/40 text-amber-400 hover:bg-amber-500/10 hover:text-amber-300",onClick:()=>{s(r.id,r.name),a("/dashboard"),ne.success(`Now viewing as ${r.name}`)},children:[n.jsx(la,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:67",className:"w-4 h-4 mr-2"}),"View as Client"]}),n.jsxs(mt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:70",value:r.status,onValueChange:u,children:[n.jsx(xt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:71",className:"w-36",children:n.jsx(ht,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:72"})}),n.jsxs(gt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:74",children:[n.jsx(he,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:75",value:"active",children:"Active"}),n.jsx(he,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:76",value:"trial",children:"Trial"}),n.jsx(he,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:77",value:"suspended",children:"Suspended"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:82",className:"flex items-center gap-4",children:[n.jsx("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:83",className:"w-14 h-14 roun
771ded-2xl bg-primary/15 flex items-center justify-center",children:n.jsx("span",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:84",className:"text-xl font-bold text-primary",children:r.name.slice(0,2).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:86",children:[n.jsx("h2",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:87",className:"text-2xl font-bold text-foreground",children:r.name}),n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:88",className:"flex items-center gap-3 mt-1",children:[n.jsx("span",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:89",className:"text-sm text-muted-foreground capitalize",children:r.industry.replace("_"," ")}),n.jsx(Le,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:90",className:r.status==="active"?"badge-active":r.status==="trial"?"badge-paused":"badge-failed",variant:"outline",children:r.status})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:100",className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:101",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:102",children:n.jsx(St,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:102",className:"text-sm",children:"Contact Information"})}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:103",className:"space-y-3",children:[{label:"Contact Email",value:r.contactEmail,icon:ja},{label:"Website",value:r.website,icon:$i},{label:"Slug",value:r.slug,icon:Ks}].map(({label:p,value:x,icon:m})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:109",className:"flex items-center gap-3",children:[n.jsx(m,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:110",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:111",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:112",className:"text-xs text-muted-foreground",children:p}),n.jsx("p",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:113",className:"text-sm text-foreground",children:x??"—"})]})]},p))})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:120",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:121",children:n.jsx(St,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:121",className:"text-sm",children:"Sending Configuration"})}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:122",className:"space-y-3",children:[{label:"From Name",value:r.fromName},{label:"From Email",value:r.fromEmail},{label:"Reply-To",value:r.replyToEmail},{label:"Provider",value:r.sendingProvider?.toUpperCase()??"SES"},{label:"Monthly Limit",value:r.monthlyEmailLimit?.toLocaleString()}].map(({label:p,value:x})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:130",className:"flex items-center justify-between py-1.5 border-b border-border last:border-0",children:[n.jsx("span",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:131",className:"text-xs text-muted-foreground",children:p}),n.jsx("span",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:132",className:"text-sm text-foreground font-medium",children:x??"—"})]},p))})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:139",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:140",children:n.jsx(St,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:140",className:"text-sm",children:"Account Details"})}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:141",className:"grid grid-cols-2 gap-4",children:[{label:"Client ID",value:`#${r.id}`},{label:"Created",value:new Date(r.createdAt).toLocaleDateString()},{label:"Last Updated",value:new Date(r.updatedAt).toLocaleDateString()},{label:"Emails Sent This Month",value:r.emailsSentThisMonth?.toLocaleString()??"0"}].map(({label:p,value:x})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:148",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:149",className:"text-xs text-muted-foreground",children:p}),n.jsx("p",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:150",className:"text-sm font-medium text-foreground mt-0.5",children:x})]},p))})]})]})}):n.jsx(Pt,{"data-loc":"client/src/pages/admin/ClientDetail.tsx:43",title:"Client Not Found",children:n.jsx("div",{"data-loc":"client/src/pages/admin/ClientDetail.tsx:44",className:"p-6 text-center text-muted-foreground",children:"Client not found."})})}function ose(){const{data:e,isLoading:t}=le.adminAnalytics.globalHealth.useQuery({days:30}),{data:a}=le.adminAnalytics.autoPausedCampaigns.useQuery(),s=e?.reduce((p,x)=>p+(x.totalSent??0),0)??0,r=e?.reduce((p,x)=>p+(x.totalBounces??0),0)??0,i=e?.reduce((p,x)=>p+(x.totalComplaints??0),0)??0,l=s>0?(r/s*100).toFixed(2):"0.00",d=s>0?(i/s*100).toFixed(4):"0.0000",u=parseFloat(l)>5?"critical":parseFloat(l)>2?"warning":"healthy";return n.jsx(Pt,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:21",title:"Sending Health",children:n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:22",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:23",children:[n.jsx("h2",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:24",className:"text-2xl font-bold text-foreground",children:"Sending Health Monitor"}),n.jsx("p",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:25",className:"text-muted-foreground text-sm mt-1",children:"Global email deliverability metrics across all clients (last 30 days)"})]}),n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:29",className:`rounded-xl p-4 flex items-center gap-4 border ${u==="healthy"?"bg-emerald-500/10 border-emerald-500/25":u==="warning"?"bg-amber-500/10 border-amber-500/25":"bg-red-500/10 border-red-500/25"}`,children:[u==="healthy"?n.jsx(jn,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:35",className:"w-5 h-5 text-emerald-400 flex-shrink-0"}):n.jsx(Ia,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:37",className:`w-5 h-5 flex-shrink-0 ${u==="warning"?"text-amber-400":"text-red-400"}`}),n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:39",children:[n.jsx("p",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:40",className:`font-semibold text-sm ${u==="healthy"?"text-emerald-400":u==="warning"?"text-amber-400":"text-red-400"}`,children:u==="healthy"?"All systems healthy":u==="warning"?"Bounce rate elevated — monitor closely":"Critical: Bounce rate exceeds 5% threshold"}),n.jsx("p",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:48",className:"text-xs text-muted-foreground mt-0.5",children:"Industry standard: bounce rate < 2%, complaint rate < 0.1%"})]})]}),n.jsx("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:55",className:"grid grid-cols-2 lg:grid-cols-5 ga
771p-4",children:t?[...Array(5)].map((p,x)=>n.jsx(Me,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:57",className:"h-28 rounded-xl"},x)):[{label:"Total Sent (30d)",value:s.toLocaleString(),icon:Ks,color:"text-primary"},{label:"Total Bounces",value:r.toLocaleString(),icon:lh,color:"text-amber-400"},{label:"Bounce Rate",value:`${l}%`,icon:Ia,color:parseFloat(l)>2?"text-red-400":"text-emerald-400"},{label:"Complaint Rate",value:`${d}%`,icon:Ia,color:parseFloat(d)>.1?"text-red-400":"text-emerald-400"},{label:"Auto-Paused",value:(a?.length??0).toString(),icon:bk,color:(a?.length??0)>0?"text-red-400":"text-emerald-400"}].map(({label:p,value:x,icon:m,color:h})=>n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:65",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:66",className:"flex items-center justify-between mb-3",children:[n.jsx("span",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:67",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:p}),n.jsx(m,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:68",className:`w-4 h-4 ${h}`})]}),n.jsx("p",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:70",className:`text-2xl font-bold ${h}`,children:x})]},p))}),a&&a.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:77",className:"bg-card border-red-500/30",children:[n.jsx(Nt,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:78",children:n.jsxs(St,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:79",className:"text-sm flex items-center gap-2 text-red-400",children:[n.jsx(bk,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:80",className:"w-4 h-4"}),"Auto-Paused Campaigns (",a.length,")"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:84",children:n.jsxs("table",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:85",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:86",children:n.jsxs("tr",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:87",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:88",className:"text-left py-2 text-xs text-muted-foreground font-medium",children:"Campaign"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:89",className:"text-left py-2 text-xs text-muted-foreground font-medium",children:"Client ID"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:90",className:"text-left py-2 text-xs text-muted-foreground font-medium",children:"Paused At"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:91",className:"text-left py-2 text-xs text-muted-foreground font-medium",children:"Reason"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:94",children:a.map(p=>n.jsxs("tr",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:96",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:97",className:"py-2.5 text-sm text-foreground font-medium",children:p.name}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:98",className:"py-2.5 text-sm text-muted-foreground",children:p.tenantId}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:99",className:"py-2.5 text-sm text-muted-foreground",children:p.autoPausedAt?new Date(p.autoPausedAt).toLocaleString():"—"}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:102",className:"py-2.5 text-xs text-red-400 max-w-xs truncate",children:p.autoPauseReason??"—"})]},p.id))})]})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:112",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:113",children:n.jsx(St,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:113",className:"text-sm",children:"Daily Sending Log"})}),n.jsx(Ze,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:114",children:t?n.jsx("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:116",className:"space-y-2",children:[...Array(7)].map((p,x)=>n.jsx(Me,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:116",className:"h-10"},x))}):!e||e.length===0?n.jsx("div",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:118",className:"text-center py-8 text-muted-foreground text-sm",children:"No sending data available yet."}):n.jsxs("table",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:122",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:123",children:n.jsxs("tr",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:124",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:125",className:"text-left py-2 text-xs text-muted-foreground font-medium",children:"Date"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:126",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Sent"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:127",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Delivered"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:128",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Bounces"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:129",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Complaints"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:130",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Bounce Rate"}),n.jsx("th",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:131",className:"text-right py-2 text-xs text-muted-foreground font-medium",children:"Status"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:134",children:e.map(p=>{const x=p.bounceRate?parseFloat(p.bounceRate):0;return n.jsxs("tr",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:138",className:"border-b border-border/50 data-table-row",children:[n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:139",className:"py-2.5 text-sm text-foreground",children:new Date(p.date).toLocaleDateString()}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:140",className:"py-2.5 text-sm text-right text-foreground",children:p.totalSent?.toLocaleStr
vendor: 4,507 bytes, line 771
771ing()}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:141",className:"py-2.5 text-sm text-right text-foreground",children:p.totalDelivered?.toLocaleString()}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:142",className:"py-2.5 text-sm text-right text-amber-400",children:p.totalBounces?.toLocaleString()}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:143",className:"py-2.5 text-sm text-right text-red-400",children:p.totalComplaints?.toLocaleString()}),n.jsxs("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:144",className:"py-2.5 text-sm text-right font-medium",children:[p.bounceRate??"0","%"]}),n.jsx("td",{"data-loc":"client/src/pages/admin/SendingHealth.tsx:145",className:"py-2.5 text-right",children:n.jsx(Le,{"data-loc":"client/src/pages/admin/SendingHealth.tsx:146",className:x>5?"badge-failed":x>2?"badge-paused":"badge-active",variant:"outline",children:x>5?"Critical":x>2?"Warning":"Healthy"})})]},p.id)})})]})})]})]})})}var B1,Zk;function cs(){if(Zk)return B1;Zk=1;var e=Array.isArray;return B1=e,B1}var I1,Jk;function o$(){if(Jk)return I1;Jk=1;var e=typeof cg=="object"&&cg&&cg.Object===Object&&cg;return I1=e,I1}var L1,e_;function Jr(){if(e_)return L1;e_=1;var e=o$(),t=typeof self=="object"&&self&&self.Object===Object&&self,a=e||t||Function("return this")();return L1=a,L1}var $1,t_;function Tm(){if(t_)return $1;t_=1;var e=Jr(),t=e.Symbol;return $1=t,$1}var z1,a_;function dse(){if(a_)return z1;a_=1;var e=Tm(),t=Object.prototype,a=t.hasOwnProperty,s=t.toString,r=e?e.toStringTag:void 0;function i(l){var d=a.call(l,r),u=l[r];try{l[r]=void 0;var p=!0}catch{}var x=s.call(l);return p&&(d?l[r]=u:delete l[r]),x}return z1=i,z1}var U1,n_;function use(){if(n_)return U1;n_=1;var e=Object.prototype,t=e.toString;function a(s){return t.call(s)}return U1=a,U1}var q1,s_;function Ki(){if(s_)return q1;s_=1;var e=Tm(),t=dse(),a=use(),s="[object Null]",r="[object Undefined]",i=e?e.toStringTag:void 0;function l(d){return d==null?d===void 0?r:s:i&&i in Object(d)?t(d):a(d)}return q1=l,q1}var F1,r_;function Qi(){if(r_)return F1;r_=1;function e(t){return t!=null&&typeof t=="object"}return F1=e,F1}var W1,i_;function pu(){if(i_)return W1;i_=1;var e=Ki(),t=Qi(),a="[object Symbol]";function s(r){return typeof r=="symbol"||t(r)&&e(r)==a}return W1=s,W1}var H1,c_;function o3(){if(c_)return H1;c_=1;var e=cs(),t=pu(),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function r(i,l){if(e(i))return!1;var d=typeof i;return d=="number"||d=="symbol"||d=="boolean"||i==null||t(i)?!0:s.test(i)||!a.test(i)||l!=null&&i in Object(l)}return H1=r,H1}var V1,l_;function al(){if(l_)return V1;l_=1;function e(t){var a=typeof t;return t!=null&&(a=="object"||a=="function")}return V1=e,V1}var G1,o_;function d3(){if(o_)return G1;o_=1;var e=Ki(),t=al(),a="[object AsyncFunction]",s="[object Function]",r="[object GeneratorFunction]",i="[object Proxy]";function l(d){if(!t(d))return!1;var u=e(d);return u==s||u==r||u==a||u==i}return G1=l,G1}var Y1,d_;function pse(){if(d_)return Y1;d_=1;var e=Jr(),t=e["__core-js_shared__"];return Y1=t,Y1}var K1,u_;function fse(){if(u_)return K1;u_=1;var e=pse(),t=(function(){var s=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function a(s){return!!t&&t in s}return K1=a,K1}var Q1,p_;function d$(){if(p_)return Q1;p_=1;var e=Function.prototype,t=e.toString;function a(s){if(s!=null){try{return t.call(s)}catch{}try{return s+""}catch{}}return""}return Q1=a,Q1}var X1,f_;function mse(){if(f_)return X1;f_=1;var e=d3(),t=fse(),a=al(),s=d$(),r=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,l=Function.prototype,d=Object.prototype,u=l.toString,p=d.hasOwnProperty,x=RegExp("^"+u.call(p).replace(r,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(h){if(!a(h)||t(h))return!1;var y=e(h)?x:i;return y.test(s(h))}return X1=m,X1}var Z1,m_;function xse(){if(m_)return Z1;m_=1;function e(t,a){return t?.[a]}return Z1=e,Z1}var J1,x_;function mo(){if(x_)return J1;x_=1;var e=mse(),t=xse();function a(s,r){var i=t(s,r);return e(i)?i:void 0}return J1=a,J1}var ej,g_;function ly(){if(g_)return ej;g_=1;var e=mo(),t=e(Object,"create");return ej=t,ej}var tj,h_;function gse(){if(h_)return tj;h_=1;var e=ly();function t(){this.__data__=e?e(null):{},this.size=0}return tj=t,tj}var aj,v_;function hse(){if(v_)return aj;v_=1;function e(t){var a=this.has(t)&&delete this.__data__[t];return this.size-=a?1:0,a}return aj=e,aj}var nj,y_;
vendor: 4,177 bytes, line 771
771function vse(){if(y_)return nj;y_=1;var e=ly(),t="__lodash_hash_undefined__",a=Object.prototype,s=a.hasOwnProperty;function r(i){var l=this.__data__;if(e){var d=l[i];return d===t?void 0:d}return s.call(l,i)?l[i]:void 0}return nj=r,nj}var sj,b_;function yse(){if(b_)return sj;b_=1;var e=ly(),t=Object.prototype,a=t.hasOwnProperty;function s(r){var i=this.__data__;return e?i[r]!==void 0:a.call(i,r)}return sj=s,sj}var rj,j_;function bse(){if(j_)return rj;j_=1;var e=ly(),t="__lodash_hash_undefined__";function a(s,r){var i=this.__data__;return this.size+=this.has(s)?0:1,i[s]=e&&r===void 0?t:r,this}return rj=a,rj}var ij,w_;function jse(){if(w_)return ij;w_=1;var e=gse(),t=hse(),a=vse(),s=yse(),r=bse();function i(l){var d=-1,u=l==null?0:l.length;for(this.clear();++d<u;){var p=l[d];this.set(p[0],p[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=a,i.prototype.has=s,i.prototype.set=r,ij=i,ij}var cj,N_;function wse(){if(N_)return cj;N_=1;function e(){this.__data__=[],this.size=0}return cj=e,cj}var lj,S_;function u3(){if(S_)return lj;S_=1;function e(t,a){return t===a||t!==t&&a!==a}return lj=e,lj}var oj,C_;function oy(){if(C_)return oj;C_=1;var e=u3();function t(a,s){for(var r=a.length;r--;)if(e(a[r][0],s))return r;return-1}return oj=t,oj}var dj,E_;function Nse(){if(E_)return dj;E_=1;var e=oy(),t=Array.prototype,a=t.splice;function s(r){var i=this.__data__,l=e(i,r);if(l<0)return!1;var d=i.length-1;return l==d?i.pop():a.call(i,l,1),--this.size,!0}return dj=s,dj}var uj,A_;function Sse(){if(A_)return uj;A_=1;var e=oy();function t(a){var s=this.__data__,r=e(s,a);return r<0?void 0:s[r][1]}return uj=t,uj}var pj,D_;function Cse(){if(D_)return pj;D_=1;var e=oy();function t(a){return e(this.__data__,a)>-1}return pj=t,pj}var fj,O_;function Ese(){if(O_)return fj;O_=1;var e=oy();function t(a,s){var r=this.__data__,i=e(r,a);return i<0?(++this.size,r.push([a,s])):r[i][1]=s,this}return fj=t,fj}var mj,k_;function dy(){if(k_)return mj;k_=1;var e=wse(),t=Nse(),a=Sse(),s=Cse(),r=Ese();function i(l){var d=-1,u=l==null?0:l.length;for(this.clear();++d<u;){var p=l[d];this.set(p[0],p[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=a,i.prototype.has=s,i.prototype.set=r,mj=i,mj}var xj,__;function p3(){if(__)return xj;__=1;var e=mo(),t=Jr(),a=e(t,"Map");return xj=a,xj}var gj,T_;function Ase(){if(T_)return gj;T_=1;var e=jse(),t=dy(),a=p3();function s(){this.size=0,this.__data__={hash:new e,map:new(a||t),string:new e}}return gj=s,gj}var hj,P_;function Dse(){if(P_)return hj;P_=1;function e(t){var a=typeof t;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?t!=="__proto__":t===null}return hj=e,hj}var vj,M_;function uy(){if(M_)return vj;M_=1;var e=Dse();function t(a,s){var r=a.__data__;return e(s)?r[typeof s=="string"?"string":"hash"]:r.map}return vj=t,vj}var yj,R_;function Ose(){if(R_)return yj;R_=1;var e=uy();function t(a){var s=e(this,a).delete(a);return this.size-=s?1:0,s}return yj=t,yj}var bj,B_;function kse(){if(B_)return bj;B_=1;var e=uy();function t(a){return e(this,a).get(a)}return bj=t,bj}var jj,I_;function _se(){if(I_)return jj;I_=1;var e=uy();function t(a){return e(this,a).has(a)}return jj=t,jj}var wj,L_;function Tse(){if(L_)return wj;L_=1;var e=uy();function t(a,s){var r=e(this,a),i=r.size;return r.set(a,s),this.size+=r.size==i?0:1,this}return wj=t,wj}var Nj,$_;function f3(){if($_)return Nj;$_=1;var e=Ase(),t=Ose(),a=kse(),s=_se(),r=Tse();function i(l){var d=-1,u=l==null?0:l.length;for(this.clear();++d<u;){var p=l[d];this.set(p[0],p[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=a,i.prototype.has=s,i.prototype.set=r,Nj=i,Nj}var Sj,z_;function u$(){if(z_)return Sj;z_=1;var e=f3(),t="Expected a function";function a(s,r){if(typeof s!="function"||r!=null&&typeof r!="function")throw new TypeError(t);var i=function(){var l=arguments,d=r?r.apply(this,l):l[0],u=i.cache;if(u.has(d))return u.get(d);var p=s.apply(this,l);return i.cache=u.set(d,p)||u,p};return i.cache=new(a.Cache||e),i}return a.Cache=e,Sj=a,Sj}var Cj,U_;function Pse(){if(U_)return Cj;U_=1;var e=u$(),t=500;function a(s){var r=e(s,function(l){return i.size===t&&i.clear(),l}),i=r.cache;return r}return Cj=a,Cj}
vendor: 10,288 bytes, lines 771-779
771var Ej,q_;function Mse(){if(q_)return Ej;q_=1;var e=Pse(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=e(function(r){var i=[];return r.charCodeAt(0)===46&&i.push(""),r.replace(t,function(l,d,u,p){i.push(u?p.replace(a,"$1"):d||l)}),i});return Ej=s,Ej}var Aj,F_;function m3(){if(F_)return Aj;F_=1;function e(t,a){for(var s=-1,r=t==null?0:t.length,i=Array(r);++s<r;)i[s]=a(t[s],s,t);return i}return Aj=e,Aj}var Dj,W_;function Rse(){if(W_)return Dj;W_=1;var e=Tm(),t=m3(),a=cs(),s=pu(),r=e?e.prototype:void 0,i=r?r.toString:void 0;function l(d){if(typeof d=="string")return d;if(a(d))return t(d,l)+"";if(s(d))return i?i.call(d):"";var u=d+"";return u=="0"&&1/d==-1/0?"-0":u}return Dj=l,Dj}var Oj,H_;function p$(){if(H_)return Oj;H_=1;var e=Rse();function t(a){return a==null?"":e(a)}return Oj=t,Oj}var kj,V_;function f$(){if(V_)return kj;V_=1;var e=cs(),t=o3(),a=Mse(),s=p$();function r(i,l){return e(i)?i:t(i,l)?[i]:a(s(i))}return kj=r,kj}var _j,G_;function py(){if(G_)return _j;G_=1;var e=pu();function t(a){if(typeof a=="string"||e(a))return a;var s=a+"";return s=="0"&&1/a==-1/0?"-0":s}return _j=t,_j}var Tj,Y_;function x3(){if(Y_)return Tj;Y_=1;var e=f$(),t=py();function a(s,r){r=e(r,s);for(var i=0,l=r.length;s!=null&&i<l;)s=s[t(r[i++])];return i&&i==l?s:void 0}return Tj=a,Tj}var Pj,K_;function m$(){if(K_)return Pj;K_=1;var e=x3();function t(a,s,r){var i=a==null?void 0:e(a,s);return i===void 0?r:i}return Pj=t,Pj}var Bse=m$();const Xs=Na(Bse);var Mj,Q_;function Ise(){if(Q_)return Mj;Q_=1;function e(t){return t==null}return Mj=e,Mj}var Lse=Ise();const Yt=Na(Lse);var Rj,X_;function $se(){if(X_)return Rj;X_=1;var e=Ki(),t=cs(),a=Qi(),s="[object String]";function r(i){return typeof i=="string"||!t(i)&&a(i)&&e(i)==s}return Rj=r,Rj}var zse=$se();const eo=Na(zse);var Use=d3();const Bt=Na(Use);var qse=al();const fu=Na(qse);var Bj={exports:{}},ra={};/**
772 * @license React
773 * react-is.production.min.js
774 *
775 * Copyright (c) Facebook, Inc. and its affiliates.
776 *
777 * This source code is licensed under the MIT license found in the
778 * LICENSE file in the root directory of this source tree.
779 */var Z_;function Fse(){if(Z_)return ra;Z_=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function b(j){if(typeof j=="object"&&j!==null){var S=j.$$typeof;switch(S){case e:switch(j=j.type,j){case a:case r:case s:case p:case x:return j;default:switch(j=j&&j.$$typeof,j){case d:case l:case u:case h:case m:case i:return j;default:return S}}case t:return S}}}return ra.ContextConsumer=l,ra.ContextProvider=i,ra.Element=e,ra.ForwardRef=u,ra.Fragment=a,ra.Lazy=h,ra.Memo=m,ra.Portal=t,ra.Profiler=r,ra.StrictMode=s,ra.Suspense=p,ra.SuspenseList=x,ra.isAsyncMode=function(){return!1},ra.isConcurrentMode=function(){return!1},ra.isContextConsumer=function(j){return b(j)===l},ra.isContextProvider=function(j){return b(j)===i},ra.isElement=function(j){return typeof j=="object"&&j!==null&&j.$$typeof===e},ra.isForwardRef=function(j){return b(j)===u},ra.isFragment=function(j){return b(j)===a},ra.isLazy=function(j){return b(j)===h},ra.isMemo=function(j){return b(j)===m},ra.isPortal=function(j){return b(j)===t},ra.isProfiler=function(j){return b(j)===r},ra.isStrictMode=function(j){return b(j)===s},ra.isSuspense=function(j){return b(j)===p},ra.isSuspenseList=function(j){return b(j)===x},ra.isValidElementType=function(j){return typeof j=="string"||typeof j=="function"||j===a||j===r||j===s||j===p||j===x||j===y||typeof j=="object"&&j!==null&&(j.$$typeof===h||j.$$typeof===m||j.$$typeof===i||j.$$typeof===l||j.$$typeof===u||j.$$typeof===w||j.getModuleId!==void 0)},ra.typeOf=b,ra}var J_;function Wse(){return J_||(J_=1,Bj.exports=Fse()),Bj.exports}var Hse=Wse(),Ij,eT;function x$(){if(eT)return Ij;eT=1;var e=Ki(),t=Qi(),a="[object Number]";function s(r){return typeof r=="number"||t(r)&&e(r)==a}return Ij=s,Ij}var Lj,tT;function Vse(){if(tT)return Lj;tT=1;var e=x$();function t(a){return e(a)&&a!=+a}return Lj=t,Lj}var Gse=Vse();const mu=Na(Gse);var Yse=x$();const Kse=Na(Yse);var lr=function(t){return t===0?0:t>0?1:-1},Il=function(t){return eo(t)&&t.indexOf("%")===t.length-1},ze=function(t){return Kse(t)&&!mu(t)},Qse=function(t){return Yt(t)},gn=function(t){return ze(t)||eo(t)},Xse=0,Pm=function(t){var a=++Xse;return"".concat(t||"").concat(a)},to=function(t,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ze(t)&&!eo(t))return s;var i;if(Il(t)){var l=t.indexOf("%");i=a*parseFloat(t.slice(0,l))/100}else i=+t;return mu(i)&&(i=s),r&&i>a&&(i=a),i},kc=function(t){if(!t)return null;var a=Object.keys(t);return a&&a.length?t[a[0]]:null},Zse=function(t){if(!Array.isArray(t))return!1;for(var a=t.length,s={},r=0;r<a;r++)if(!s[t[r]])s[t[r]]=!0;else return!0;return!1},Gs=function(t,a){return ze(t)&&ze(a)?function(s){return t+s*(a-t)}:function(){return a}};function mh(e,t,a){return!e||!e.length?null:e.find(function(s){return s&&(typeof t=="function"?t(s):Xs(s,t))===a})}var Jse=function(t,a){return ze(t)&&ze(a)?t-a:eo(t)&&eo(a)?t.localeCompare(a):t instanceof Date&&a instanceof Date?t.getTime()-a.getTime():String(t).localeCompare(String(a))};function jd(e,t){for(var a in e)if({}.hasOwnProperty.call(e,a)&&(!{}.hasOwnProperty.call(t,a)||e[a]!==t[a]))return!1;for(var s in t)if({}.hasOwnProperty.call(t,s)&&!{}.hasOwnProperty.call(e,s))return!1;return!0}function WS(e){"@babel/helpers - typeof";return WS=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},WS(e)}var ere=["viewBox","children"],tre=["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"],aT=["points","pathLength"],$j={svg:ere,polygon:aT,polyline:aT},g3=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
779ocus","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"],xh=function(t,a){if(!t||typeof t=="function"||typeof t=="boolean")return null;var s=t;if(v.isValidElement(t)&&(s=t.props),!fu(s))return null;var r={};return Object.keys(s).forEach(function(i){g3.includes(i)&&(r[i]=a||function(l){return s[i](s,l)})}),r},are=function(t,a,s){return function(r){return t(a,s,r),null}},gh=function(t,a,s){if(!fu(t)||WS(t)!=="object")return null;var r=null;return Object.keys(t).forEach(function(i){var l=t[i];g3.includes(i)&&typeof l=="function"&&(r||(r={}),r[i]=are(l,a,s))}),r},nre=["children"],sre=["children"];function nT(e,t){if(e==null)return{};var a=rre(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function rre(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function HS(e){"@babel/helpers - typeof";return HS=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},HS(e)}var sT={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: 7,113 bytes, line 779
779,Oi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},rT=null,zj=null,h3=function e(t){if(t===rT&&Array.isArray(zj))return zj;var a=[];return v.Children.forEach(t,function(s){Yt(s)||(Hse.isFragment(s)?a=a.concat(e(s.props.children)):a.push(s))}),zj=a,rT=t,a};function dr(e,t){var a=[],s=[];return Array.isArray(t)?s=t.map(function(r){return Oi(r)}):s=[Oi(t)],h3(e).forEach(function(r){var i=Xs(r,"type.displayName")||Xs(r,"type.name");s.indexOf(i)!==-1&&a.push(r)}),a}function hs(e,t){var a=dr(e,t);return a&&a[0]}var iT=function(t){if(!t||!t.props)return!1;var a=t.props,s=a.width,r=a.height;return!(!ze(s)||s<=0||!ze(r)||r<=0)},ire=["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"],cre=function(t){return t&&t.type&&eo(t.type)&&ire.indexOf(t.type)>=0},lre=function(t){return t&&HS(t)==="object"&&"clipDot"in t},ore=function(t,a,s,r){var i,l=(i=$j?.[r])!==null&&i!==void 0?i:[];return a.startsWith("data-")||!Bt(t)&&(r&&l.includes(a)||tre.includes(a))||s&&g3.includes(a)},Ft=function(t,a,s){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(v.isValidElement(t)&&(r=t.props),!fu(r))return null;var i={};return Object.keys(r).forEach(function(l){var d;ore((d=r)===null||d===void 0?void 0:d[l],l,a,s)&&(i[l]=r[l])}),i},VS=function e(t,a){if(t===a)return!0;var s=v.Children.count(t);if(s!==v.Children.count(a))return!1;if(s===0)return!0;if(s===1)return cT(Array.isArray(t)?t[0]:t,Array.isArray(a)?a[0]:a);for(var r=0;r<s;r++){var i=t[r],l=a[r];if(Array.isArray(i)||Array.isArray(l)){if(!e(i,l))return!1}else if(!cT(i,l))return!1}return!0},cT=function(t,a){if(Yt(t)&&Yt(a))return!0;if(!Yt(t)&&!Yt(a)){var s=t.props||{},r=s.children,i=nT(s,nre),l=a.props||{},d=l.children,u=nT(l,sre);return r&&d?jd(i,u)&&VS(r,d):!r&&!d?jd(i,u):!1}return!1},lT=function(t,a){var s=[],r={};return h3(t).forEach(function(i,l){if(cre(i))s.push(i);else if(i){var d=Oi(i.type),u=a[d]||{},p=u.handler,x=u.once;if(p&&(!x||!r[d])){var m=p(i,d,l);s.push(m),r[d]=!0}}}),s},dre=function(t){var a=t&&t.type;return a&&sT[a]?sT[a]:null},ure=function(t,a){return h3(a).indexOf(t)},pre=["children","width","height","viewBox","className","style","title","desc"];function GS(){return GS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},GS.apply(this,arguments)}function fre(e,t){if(e==null)return{};var a=mre(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function mre(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function YS(e){var t=e.children,a=e.width,s=e.height,r=e.viewBox,i=e.className,l=e.style,d=e.title,u=e.desc,p=fre(e,pre),x=r||{width:a,height:s,x:0,y:0},m=Qt("recharts-surface",i);return W.createElement("svg",GS({},Ft(p,!0,"svg"),{className:m,width:a,height:s,style:l,viewBox:"".concat(x.x," ").concat(x.y," ").concat(x.width," ").concat(x.height)}),W.createElement("title",null,d),W.createElement("desc",null,u),t)}var xre=["children","className"];function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},KS.apply(this,arguments)}function gre(e,t){if(e==null)return{};var a=hre(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function hre(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}var za=W.forwardRef(function(e,t){var a=e.children,s=e.className,r=gre(e,xre),i=Qt("recharts-layer",s);return W.createElement("g",KS({className:i},Ft(r,!0),{ref:t}),a)}),ki=function(t,a){for(var s=arguments.length,r=new Array(s>2?s-2:0),i=2;i<s;i++)r[i-2]=arguments[i]},Uj,oT;function vre(){if(oT)return Uj;oT=1;function e(t,a,s){var r=-1,i=t.length;a<0&&(a=-a>i?0:i+a),s=s>i?i:s,s<0&&(s+=i),i=a>s?0:s-a>>>0,a>>>=0;for(var l=Array(i);++r<i;)l[r]=t[r+a];return l}return Uj=e,Uj}var qj,dT;function yre(){if(dT)return qj;dT=1;var e=vre();function t(a,s,r){var i=a.length;return r=r===void 0?i:r,!s&&r>=i?a:e(a,s,r)}return qj=t,qj}var Fj,uT;function g$(){if(uT)return Fj;uT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",r=t+a+s,i="\\ufe0e\\ufe0f",l="\\u200d",d=RegExp("["+l+e+r+i+"]");function u(p){return d.test(p)}return Fj=u,Fj}var Wj,pT;function bre(){if(pT)return Wj;pT=1;function e(t){return t.split("")}return Wj=e,Wj}var Hj,fT;function jre(){if(fT)return Hj;fT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",a="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",r=t+a+s,i="\\ufe0e\\ufe0f",l="["+e+"]",d="["+r+"]",u="\\ud83c[\\udffb-\\udfff]",p="(?:"+d+"|"+u+")",x="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",y="\\u200d",w=p+"?",b="["+i+"]?",j="(?:"+y+"(?:"+[x,m,h].join("|")+")"+b+w+")*",S=b+w+j,O="(?:"+[x+d+"?",d,m,h,l].join("|")+")",A=RegExp(u+"(?="+u+")|"+O+S,"g");function k(E){return E.match(A)||[]}return Hj=k,Hj}var Vj,mT;function wre(){if(mT)return Vj;mT=1;var e=bre(),t=g$(),a=jre();function s(r){return t(r)?a(r):e(r)}return Vj=s,Vj}var Gj,xT;function Nre(){if(xT)return Gj;xT=1;var e=yre(),t=g$(),a=wre(),s=p$();function r(i){return function(l){l=s(l);var d=t(l)?a(l):void 0,u=d?d[0]:l.charAt(0),p=d?e(d,1).join(""):l.slice(1);return u[i]()+p}}return Gj=r,Gj}var Yj,gT;function Sre(){if(gT)return Yj;gT=1;var e=Nre(),t=e("toUpperCase");return Yj=t,Yj}var Cre=Sre();const fy=Na(Cre);function Oa(e){return function(){return e}}const h$=Math.cos,hh=Math.sin,Nr=Math.sqrt,vh=Math.PI,my=2*vh,QS=Math.PI,XS=2*QS,_l=1e-6,Ere=XS-_l;function v$(e){this._+=e[0];for(let t=1,a=e.length;t<a;++t)this._+=arguments[t]+e[t]}function Are(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return v$;const a=10**t;return function(s){this._+=s[0];for(let r=1,i=s.length;r<i;
779++r)this._+=Math.round(arguments[r]*a)/a+s[r]}}class Dre{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?v$:Are(t)}moveTo(t,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+a}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,a){this._append`L${this._x1=+t},${this._y1=+a}`}quadraticCurveTo(t,a,s,r){this._append`Q${+t},${+a},${this._x1=+s},${this._y1=+r}`}bezierCurveTo(t,a,s,r,i,l){this._append`C${+t},${+a},${+s},${+r},${this._x1=+i},${this._y1=+l}`}arcTo(t,a,s,r,i){if(t=+t,a=+a,s=+s,r=+r,i=+i,i<0)throw new Error(`negative radius: ${i}`);let l=this._x1,d=this._y1,u=s-t,p=r-a,x=l-t,m=d-a,h=x*x+m*m;if(this._x1===null)this._append`M${this._x1=t},${this._y1=a}`;else if(h>_l)if(!(Math.abs(m*u-p*x)>_l)||!i)this._append`L${this._x1=t},${this._y1=a}`;else{let y=s-l,w=r-d,b=u*u+p*p,j=y*y+w*w,S=Math.sqrt(b),O=Math.sqrt(h),A=i*Math.tan((QS-Math.acos((b+h-j)/(2*S*O)))/2),k=A/O,E=A/S;Math.abs(k-1)>_l&&this._append`L${t+k*x},${a+k*m}`,this._append`A${i},${i},0,0,${+(m*y>x*w)},${this._x1=t+E*u},${this._y1=a+E*p}`}}arc(t,a,s,r,i,l){if(t=+t,a=+a,s=+s,l=!!l,s<0)throw new Error(`negative radius: ${s}`);let d=s*Math.cos(r),u=s*Math.sin(r),p=t+d,x=a+u,m=1^l,h=l?r-i:i-r;this._x1===null?this._append`M${p},${x}`:(Math.abs(this._x1-p)>_l||Math.abs(this._y1-x)>_l)&&this._append`L${p},${x}`,s&&(h<0&&(h=h%XS+XS),h>Ere?this._append`A${s},${s},0,1,${m},${t-d},${a-u}A${s},${s},0,1,${m},${this._x1=p},${this._y1=x}`:h>_l&&this._append`A${s},${s},0,${+(h>=QS)},${m},${this._x1=t+s*Math.cos(i)},${this._y1=a+s*Math.sin(i)}`)}rect(t,a,s,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+a}h${s=+s}v${+r}h${-s}Z`}toString(){return this._}}function v3(e){let t=3;return e.digits=function(a){if(!arguments.length)return t;if(a==null)t=null;else{const s=Math.floor(a);if(!(s>=0))throw new RangeError(`invalid digits: ${a}`);t=s}return e},()=>new Dre(t)}function y3(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function y$(e){this._context=e}y$.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 xy(e){return new y$(e)}function b$(e){return e[0]}function j$(e){return e[1]}function w$(e,t){var a=Oa(!0),s=null,r=xy,i=null,l=v3(d);e=typeof e=="function"?e:e===void 0?b$:Oa(e),t=typeof t=="function"?t:t===void 0?j$:Oa(t);function d(u){var p,x=(u=y3(u)).length,m,h=!1,y;for(s==null&&(i=r(y=l())),p=0;p<=x;++p)!(p<x&&a(m=u[p],p,u))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(m,p,u),+t(m,p,u));if(y)return i=null,y+""||null}return d.x=function(u){return arguments.length?(e=typeof u=="function"?u:Oa(+u),d):e},d.y=function(u){return arguments.length?(t=typeof u=="function"?u:Oa(+u),d):t},d.defined=function(u){return arguments.length?(a=typeof u=="function"?u:Oa(!!u),d):a},d.curve=function(u){return arguments.length?(r=u,s!=null&&(i=r(s)),d):r},d.context=function(u){return arguments.length?(u==null?s=i=null:i=r(s=u),d):s},d}function wg(e,t,a){var s=null,r=Oa(!0),i=null,l=xy,d=null,u=v3(p);e=typeof e=="function"?e:e===void 0?b$:Oa(+e),t=typeof t=="function"?t:Oa(t===void 0?0:+t),a=typeof a=="function"?a:a===void 0?j$:Oa(+a);function p(m){var h,y,w,b=(m=y3(m)).length,j,S=!1,O,A=new Array(b),k=new Array(b);for(i==null&&(d=l(O=u())),h=0;h<=b;++h){if(!(h<b&&r(j=m[h],h,m))===S)if(S=!S)y=h,d.areaStart(),d.lineStart();else{for(d.lineEnd(),d.lineStart(),w=h-1;w>=y;--w)d.point(A[w],k[w]);d.lineEnd(),d.areaEnd()}S&&(A[h]=+e(j,h,m),k[h]=+t(j,h,m),d.point(s?+s(j,h,m):A[h],a?+a(j,h,m):k[h]))}if(O)return d=null,O+""||null}function x(){return w$().defined(r).curve(l).context(i)}return p.x=function(m){return arguments.length?(e=typeof m=="function"?m:Oa(+m),s=null,p):e},p.x0=function(m){return arguments.length?(e=typeof m=="function"?m:Oa(+m),p):e},p.x1=function(m){return arguments.length?(s=m==null?null:typeof m=="function"?m:Oa(+m),p):s},p.y=function(m){return arguments.length?(t=typeof m=="function"?m:Oa(+m),a=null,p):t},p.y0=function(m){return arguments.length?(t=typeof m=="function"?m:Oa(+m),p):t},p.y1=function(m){return arguments.length?(a=m==null?null:typeof m=="function"?m:Oa(+m),p):a},p.lineX0=p.lineY0=function(){return x().x(e).y(t)},p.lineY1=function(){return x().x(e).y(a)},p.lineX1=function(){return x().x(s).y(t)},p.defined=function(m){return arguments.length?(r=typeof m=="function"?m:Oa(!!m),p):r},p.curve=function(m){return arguments.length?(l=m,i!=null&&(d=l(i)),p):l},p.context=function(m){return arguments.length?(m==null?i=d=null:d=l(i=m),p):i},p}class N${constructor(t,a){this._context=t,this._x=a}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,a){switch(t=+t,a=+a,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,a):this._context.moveTo(t,a);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,a,t,a):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+a)/2,t,this._y0,t,a);break}}this._x0=t,this._y0=a}}function Ore(e){return new N$(e,!0)}function kre(e){return new N$(e,!1)}const b3={draw(e,t){const a=Nr(t/vh);e.moveTo(a,0),e.arc(0,0,a,0,my)}},_re={draw(e,t){const a=Nr(t/5)/2;e.moveTo(-3*a,-a),e.lineTo(-a,-a),e.lineTo(-a,-3*a),e.lineTo(a,-3*a),e.lineTo(a,-a),e.lineTo(3*a,-a),e.lineTo(3*a,a),e.lineTo(a,a),e.lineTo(a,3*a),e.lineTo(-a,3*a),e.lineTo(-a,a),e.lineTo(-3*a,a),e.closePath()}},S$=Nr(1/3),Tre=S$*2,Pre={draw(e,t){const a=Nr(t/Tre),s=a*S$;e.moveTo(0,-a),e.lineTo(s,0),e.lineTo(0,a),e.lineTo(-s,0),e.closePath()}},Mre={draw(e,t){const a=Nr(t),s=-a/2;e.rect(s,s,a,a)}},Rre=.8908130915292852,C$=hh(vh/10)/hh(7*vh/10),Bre=hh(my/10)*C$,Ire=-h$(my/10)*C$,Lre={draw(e,t){const a=Nr(t*Rre),s=Bre*a,r=Ire*a;e.moveTo(0,-a),e.lineTo(s,r);for(let i=1;i<5;++i){const l=my*i/5,d=h$(l),u=hh(l);e.lineTo(u*a,-d*a),e.lineTo(d*s-u*r,u*s+d*r)}e.closePath()}},Kj=Nr(3),$re={draw(e,t){const a=-Nr(t/(Kj*3));e.moveTo(0,a*2),e.lineTo(-Kj*a,-a),e.lineTo(Kj*a,-a),e.closePath()}},qs=-.5,Fs=Nr(3)/2,ZS=1/Nr(12),zre=(ZS/2+1)*3,Ure={draw(e,t){const a=Nr(t/zre),s=a/2,r=a*ZS,i=s,l=a*ZS+a,d=-i,u=l;e.moveTo(s,r),e.lineTo(i,l),e.lineTo(d,u),e.lineTo(qs*s-Fs*r,Fs*s+qs*r),e.lineTo(qs*i-Fs*l,Fs*i+qs*l),e.lineTo(qs*d-Fs*u,Fs*d+qs*u),e.lineTo(qs*s+Fs*r,qs*r-Fs*s),e.lineTo(qs*i+Fs*l,qs*l-Fs*i),e.lineTo(qs*d+Fs*u,qs*u-Fs*d),e.closePath()}};function qre(e,t){let a=null,s=v3(r);e=typeof e=="function"?e:Oa(e||b3),t=typeof t=="function"?t:Oa(t===void 0?64:+t);function r(){let i;if(a||(a=i=s()),e.apply(this,arguments).draw(a,+t.apply(this,arguments)),i)return a=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:Oa(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:Oa(+i),r):t},r.context=function(i){return arguments.length?(a=i??null,r):a},r}function yh(){}function bh(e,t,a){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+a)/6)}function E$(e){this._context=e}E$.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:bh(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:bh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fre(e){return new E$(e)}function A$(e){this._context=e}A$.prototype={areaStart:yh,areaEnd:yh,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:bh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Wre(e){return new A$(e)}function D$(e){this._context=e}D$.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 a=(this._x0+4*this._x1+e)/6,s=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(a,s):this._context.moveTo(a,s);break;case 3:this._point=4;default:bh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hre(e){return new D$(e)}function O$(e){this._context=e}O$.prototype={areaStart:yh,areaEnd:yh,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 Vre(e){return new O$(e)}function hT(e){return e<0?-1:1}function vT(e,t,a){var s=e._x1-e._x0,r=t-e._x1,i=(e._y1-e._y0)/(s||r<0&&-0),l=(a-e._y1)/(r||s<0&&-0),d=(i*r+l*s)/(s+r);
779return(hT(i)+hT(l))*Math.min(Math.abs(i),Math.abs(l),.5*Math.abs(d))||0}function yT(e,t){var a=e._x1-e._x0;return a?(3*(e._y1-e._y0)/a-t)/2:t}function Qj(e,t,a){var s=e._x0,r=e._y0,i=e._x1,l=e._y1,d=(i-s)/3;e._context.bezierCurveTo(s+d,r+d*t,i-d,l-d*a,i,l)}function jh(e){this._context=e}jh.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:Qj(this,this._t0,yT(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 a=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,Qj(this,yT(this,a=vT(this,e,t)),a);break;default:Qj(this,this._t0,a=vT(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=a}}};function k$(e){this._context=new _$(e)}(k$.prototype=Object.create(jh.prototype)).point=function(e,t){jh.prototype.point.call(this,t,e)};function _$(e){this._context=e}_$.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,a,s,r,i){this._context.bezierCurveTo(t,e,s,a,i,r)}};function Gre(e){return new jh(e)}function Yre(e){return new k$(e)}function T$(e){this._context=e}T$.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,a=e.length;if(a)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),a===2)this._context.lineTo(e[1],t[1]);else for(var s=bT(e),r=bT(t),i=0,l=1;l<a;++i,++l)this._context.bezierCurveTo(s[0][i],r[0][i],s[1][i],r[1][i],e[l],t[l]);(this._line||this._line!==0&&a===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 bT(e){var t,a=e.length-1,s,r=new Array(a),i=new Array(a),l=new Array(a);for(r[0]=0,i[0]=2,l[0]=e[0]+2*e[1],t=1;t<a-1;++t)r[t]=1,i[t]=4,l[t]=4*e[t]+2*e[t+1];for(r[a-1]=2,i[a-1]=7,l[a-1]=8*e[a-1]+e[a],t=1;t<a;++t)s=r[t]/i[t-1],i[t]-=s,l[t]-=s*l[t-1];for(r[a-1]=l[a-1]/i[a-1],t=a-2;t>=0;--t)r[t]=(l[t]-r[t+1])/i[t];for(i[a-1]=(e[a]+r[a-1])/2,t=0;t<a-1;++t)i[t]=2*e[t+1]-r[t+1];return[r,i]}function Kre(e){return new T$(e)}function gy(e,t){this._context=e,this._t=t}gy.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;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var a=this._x*(1-this._t)+e*this._t;this._context.lineTo(a,this._y),this._context.lineTo(a,t)}break}}this._x=e,this._y=t}};function Qre(e){return new gy(e,.5)}function Xre(e){return new gy(e,0)}function Zre(e){return new gy(e,1)}function Rd(e,t){if((l=e.length)>1)for(var a=1,s,r,i=e[t[0]],l,d=i.length;a<l;++a)for(r=i,i=e[t[a]],s=0;s<d;++s)i[s][1]+=i[s][0]=isNaN(r[s][1])?r[s][0]:r[s][1]}function JS(e){for(var t=e.length,a=new Array(t);--t>=0;)a[t]=t;return a}function Jre(e,t){return e[t]}function eie(e){const t=[];return t.key=e,t}function tie(){var e=Oa([]),t=JS,a=Rd,s=Jre;function r(i){var l=Array.from(e.apply(this,arguments),eie),d,u=l.length,p=-1,x;for(const m of i)for(d=0,++p;d<u;++d)(l[d][p]=[0,+s(m,l[d].key,p,i)]).data=m;for(d=0,x=y3(t(l));d<u;++d)l[x[d]].index=d;return a(l,x),l}return r.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Oa(Array.from(i)),r):e},r.value=function(i){return arguments.length?(s=typeof i=="function"?i:Oa(+i),r):s},r.order=function(i){return arguments.length?(t=i==null?JS:typeof i=="function"?i:Oa(Array.from(i)),r):t},r.offset=function(i){return arguments.length?(a=i??Rd,r):a},r}function aie(e,t){if((s=e.length)>0){for(var a,s,r=0,i=e[0].length,l;r<i;++r){for(l=a=0;a<s;++a)l+=e[a][r][1]||0;if(l)for(a=0;a<s;++a)e[a][r][1]/=l}Rd(e,t)}}function nie(e,t){if((r=e.length)>0){for(var a=0,s=e[t[0]],r,i=s.length;a<i;++a){for(var l=0,d=0;l<r;++l)d+=e[l][a][1]||0;s[a][1]+=s[a][0]=-d/2}Rd(e,t)}}function sie(e,t){if(!(!((l=e.length)>0)||!((i=(r=e[t[0]]).length)>0))){for(var a=0,s=1,r,i,l;s<i;++s){for(var d=0,u=0,p=0;d<l;++d){for(var x=e[t[d]],m=x[s][1]||0,h=x[s-1][1]||0,y=(m-h)/2,w=0;w<d;++w){var b=e[t[w]],j=b[s][1]||0,S=b[s-1][1]||0;y+=j-S}u+=m,p+=y*m}r[s-1][1]+=r[s-1][0]=a,u&&(a-=p/u)}r[s-1][1]+=r[s-1][0]=a,Rd(e,t)}}function wf(e){"@babel/helpers - typeof";return wf=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},wf(e)}var rie=["type","size","sizeType"];function eC(){return eC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},eC.apply(this,arguments)}function jT(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function wT(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};
vendor: 12,637 bytes, lines 779-782
779t%2?jT(Object(a),!0).forEach(function(s){iie(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):jT(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function iie(e,t,a){return t=cie(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function cie(e){var t=lie(e,"string");return wf(t)=="symbol"?t:t+""}function lie(e,t){if(wf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(wf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oie(e,t){if(e==null)return{};var a=die(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function die(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}var P$={symbolCircle:b3,symbolCross:_re,symbolDiamond:Pre,symbolSquare:Mre,symbolStar:Lre,symbolTriangle:$re,symbolWye:Ure},uie=Math.PI/180,pie=function(t){var a="symbol".concat(fy(t));return P$[a]||b3},fie=function(t,a,s){if(a==="area")return t;switch(s){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var r=18*uie;return 1.25*t*t*(Math.tan(r)-Math.tan(r*2)*Math.pow(Math.tan(r),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}},mie=function(t,a){P$["symbol".concat(fy(t))]=a},j3=function(t){var a=t.type,s=a===void 0?"circle":a,r=t.size,i=r===void 0?64:r,l=t.sizeType,d=l===void 0?"area":l,u=oie(t,rie),p=wT(wT({},u),{},{type:s,size:i,sizeType:d}),x=function(){var j=pie(s),S=qre().type(j).size(fie(i,d,s));return S()},m=p.className,h=p.cx,y=p.cy,w=Ft(p,!0);return h===+h&&y===+y&&i===+i?W.createElement("path",eC({},w,{className:Qt("recharts-symbols",m),transform:"translate(".concat(h,", ").concat(y,")"),d:x()})):null};j3.registerSymbol=mie;function Bd(e){"@babel/helpers - typeof";return Bd=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},Bd(e)}function tC(){return tC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},tC.apply(this,arguments)}function NT(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function xie(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(a),!0).forEach(function(s){Nf(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):NT(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function gie(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hie(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,R$(s.key),s)}}function vie(e,t,a){return t&&hie(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yie(e,t,a){return t=wh(t),bie(e,M$()?Reflect.construct(t,a||[],wh(e).constructor):t.apply(e,a))}function bie(e,t){if(t&&(Bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jie(e)}function jie(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M$=function(){return!!e})()}function wh(e){return wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},wh(e)}function wie(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&&aC(e,t)}function aC(e,t){return aC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},aC(e,t)}function Nf(e,t,a){return t=R$(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function R$(e){var t=Nie(e,"string");return Bd(t)=="symbol"?t:t+""}function Nie(e,t){if(Bd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Bd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ws=32,w3=(function(e){function t(){return gie(this,t),yie(this,t,arguments)}return wie(t,e),vie(t,[{key:"renderIcon",value:function(s){var r=this.props.inactiveColor,i=Ws/2,l=Ws/6,d=Ws/3,u=s.inactive?r:s.color;if(s.type==="plainline")return W.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:s.payload.strokeDasharray,x1:0,y1:i,x2:Ws,y2:i,className:"recharts-legend-icon"});if(s.type==="line")return W.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(i,"h").concat(d,`
780            A`).concat(l,",").concat(l,",0,1,1,").concat(2*d,",").concat(i,`
781            H`).concat(Ws,"M").concat(2*d,",").concat(i,`
782            A`).concat(l,",").concat(l,",0,1,1,").concat(d,",").concat(i),className:"recharts-legend-icon"});if(s.type==="rect")return W.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(Ws/8,"h").concat(Ws,"v").concat(Ws*3/4,"h").concat(-Ws,"z"),className:"recharts-legend-icon"});if(W.isValidElement(s.legendIcon)){var p=xie({},s);return delete p.legendIcon,W.cloneElement(s.legendIcon,p)}return W.createElement(j3,{fill:u,cx:i,cy:i,size:Ws,sizeType:"diameter",type:s.type})}},{key:"renderItems",value:function(){var s=this,r=this.props,i=r.payload,l=r.iconSize,d=r.layout,u=r.formatter,p=r.inactiveColor,x={x:0,y:0,width:Ws,height:Ws},m={display:d==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(y,w){var b=y.formatter||u,j=Qt(Nf(Nf({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",y.inactive));if(y.type==="none")return null;var S=Bt(y.value)?null:y.value;ki(!Bt(y.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 O=y.inactive?p:y.color;return W.createElement("li",tC({className:j,style:m,key:"legend-item-".concat(w)},gh(s.props,y,w)),W.createElement(YS,{width:l,height:l,viewBox:x,style:h},s.renderIcon(y)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:O}},b?b(S,y,w):S))})}},{key:"render",value:function(){var s=this.props,r=s.payload,i=s.layout,l=s.align;if(!r||!r.length)return null;var d={padding:0,margin:0,textAlign:i==="horizontal"?l:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:d},this.renderItems())}}])})(v.PureComponent);Nf(w3,"displayName","Legend");Nf(w3,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Xj,ST;function Sie(){if(ST)return Xj;ST=1;var e=dy();function t(){this.__data__=new e,this.size=0}return Xj=t,Xj}var Zj,CT;function Cie(){if(CT)return Zj;CT=1;function e(t){var a=this.__data__,s=a.delete(t);return this.size=a.size,s}return Zj=e,Zj}var Jj,ET;function Eie(){if(ET)return Jj;ET=1;function e(t){return this.__data__.get(t)}return Jj=e,Jj}var ew,AT;function Aie(){if(AT)return ew;AT=1;function e(t){return this.__data__.has(t)}return ew=e,ew}var tw,DT;function Die(){if(DT)return tw;DT=1;var e=dy(),t=p3(),a=f3(),s=200;function r(i,l){var d=this.__data__;if(d instanceof e){var u=d.__data__;if(!t||u.length<s-1)return u.push([i,l]),this.size=++d.size,this;d=this.__data__=new a(u)}return d.set(i,l),this.size=d.size,this}return tw=r,tw}var aw,OT;function B$(){if(OT)return aw;OT=1;var e=dy(),t=Sie(),a=Cie(),s=Eie(),r=Aie(),i=Die();function l(d){var u=this.__data__=new e(d);this.size=u.size}return l.prototype.clear=t,l.prototype.delete=a,l.prototype.get=s,l.prototype.has=r,l.prototype.set=i,aw=l,aw}var nw,kT;function Oie(){if(kT)return nw;kT=1;var e="__lodash_hash_undefined__";function t(a){return this.__data__.set(a,e),this}return nw=t,nw}var sw,_T;function kie(){if(_T)return sw;_T=1;function e(t){return this.__data__.has(t)}return sw=e,sw}var rw,TT;function I$(){if(TT)return rw;TT=1;var e=f3(),t=Oie(),a=kie();function s(r){var i=-1,l=r==null?0:r.length;for(this.__data__=new e;++i<l;)this.add(r[i])}return s.prototype.add=s.prototype.push=t,s.prototype.has=a,rw=s,rw}var iw,PT;function L$(){if(PT)return iw;PT=1;function e(t,a){for(var s=-1,r=t==null?0:t.length;++s<r;)if(a(t[s],s,t))return!0;return!1}return iw=e,iw}var cw,MT;function $$(){if(MT)return cw;MT=1;function e(t,a){return t.has(a)}return cw=e,cw}var lw,RT;function z$(){if(RT)return lw;RT=1;var e=I$(),t=L$(),a=$$(),s=1,r=2;function i(l,d,u,p,x,m){var h=u&s,y=l.length,w=d.length;if(y!=w&&!(h&&w>y))return!1;var b=m.get(l),j=m.get(d);if(b&&j)return b==d&&j==l;var S=-1,O=!0,A=u&r?new e:void 0;for(m.set(l,d),m.set(d,l);++S<y;){var k=l[S],E=d[S];if(p)var D=h?p(E,k,S,d,l,m):p(k,E,S,l,d,m);if(D!==void 0){if(D)continue;O=!1;break}if(A){if(!t(d,function(_,T){if(!a(A,T)&&(k===_||x(k,_,u,p,m)))return A.push(T)})){O=!1;break}}else if(!(k===E||x(k,E,u,p,m))){O=!1;break}}return m.delete(l),m.delete(d),O}return lw=i,lw}var ow,BT;function _ie(){if(BT)return ow;BT=1;var e=Jr(),t=e.Uint8Array;return ow=t,ow}var dw,IT;function Tie(){if(IT)return dw;IT=1;function e(t){var a=-1,s=Array(t.size);return t.forEach(function(r,i){s[++a]=[i,r]}),s}return dw=e,dw}var uw,LT;function N3(){if(LT)return uw;LT=1;function e(t){var a=-1,s=Array(t.size);return t.forEach(function(r){s[++a]=r}),s}return uw=e,uw}var pw,$T;function Pie(){if($T)return pw;$T=1;var e=Tm(),t=_ie(),a=u3(),s=z$(),r=Tie(),i=N3(),l=1,d=2,u="[object Boolean]",p="[object Date]",x="[object Error]",m="[object Map]",h="[object Number]",y="[object RegExp]",w="[object Set]",b="[object String]",j="[object Symbol]",S="[object ArrayBuffer]",O="[object DataView]",A=e?e.prototype:void 0,k=A?A.valueOf:void 0;function E(D,_,T,I,$,R,B){switch(T){case O:if(D.byteLength!=_.byteLength||D.byteOffset!=_.byteOffset)return!1;D=D.buffer,_=_.buffer;case S:return!(D.byteLength!=_.byteLength||!R(new t(D),new t(_)));case u:case p:case h:return a(+D,+_);case x:return D.name==_.name&&D.message==_.message;case y:case b:return D==_+"";case m:var Y=r;case w:var z=I&l;if(Y||(Y=i),D.size!=_.size&&!z)return!1;var Q=B.get(D);if(Q)return Q==_;I|=d,B.set(D,_);var L=s(Y(D),Y(_),I,$,R,B);return B.delete(D),L;case j:if(k)return k.call(D)==k.call(_)}return!1}return pw=E,pw}var fw,zT;function U$(){if(zT)return fw;zT=1;function e(t,a){for(var s=-1,r=a.length,i=t.length;++s<r;)t[i+s]=a[s];return t}return fw=e,fw}var mw,UT;function Mie(){if(UT)return mw;UT=1;var e=U$(),t=cs();function a(s,r,i){var l=r(s);return t(s)?l:e(l,i(s))}return mw=a,mw}var xw,qT;function Rie(){if(qT)return xw;qT=1;function e(t,a){for(var s=-1,r=t==null?0:t.length,i=0,l=[];++s<r;){var d=t[s];a(d,s,t)&&(l[i++]=d)}return l}return xw=e,xw}var gw,FT;function Bie(){if(FT)return gw;FT=1;function e(){return[]}return gw=e,gw}var hw,WT;function Iie(){if(WT)return hw;WT=1;var e=Rie(),t=Bie(),a=Object.prototype,s=a.propertyIsEnumerable,r=Object.getOwnPropertySymbols,i=r?function(l){return l==null?[]:(l=Object(l),e(r(l),function(d){return s.call(l,d)}))}:t;return hw=i,hw}var vw,HT;function Lie(){if(HT)return vw;HT=1;function e(t,a){for(var s=-1,r=Array(t);++s<t;)r[s]=a(s);return r}return vw=e,vw}var yw,VT;function $ie(){if(VT)return yw;VT=1;var e=Ki(),t=Qi(),a="[object Arguments]";function s(r){return t(r)&&e(r)==a}return yw=s,yw}var bw,GT;function S3(){if(GT)return bw;GT=1;var e=$ie(),t=Qi(),a=Object.prototype,s=a.hasOwnProperty,r=a.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(l){return t(l)&&s.call(l,"callee")&&!r.call(l,"callee")};return bw=i,bw}var $p={exports:{}},jw,YT;function zie(){if(YT)return jw;YT=1;function e(){return!1}return jw=e,jw}
vendor: 5,531 bytes, line 782
782$p.exports;var KT;function q$(){return KT||(KT=1,(function(e,t){var a=Jr(),s=zie(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,l=i&&i.exports===r,d=l?a.Buffer:void 0,u=d?d.isBuffer:void 0,p=u||s;e.exports=p})($p,$p.exports)),$p.exports}var ww,QT;function C3(){if(QT)return ww;QT=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function a(s,r){var i=typeof s;return r=r??e,!!r&&(i=="number"||i!="symbol"&&t.test(s))&&s>-1&&s%1==0&&s<r}return ww=a,ww}var Nw,XT;function E3(){if(XT)return Nw;XT=1;var e=9007199254740991;function t(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=e}return Nw=t,Nw}var Sw,ZT;function Uie(){if(ZT)return Sw;ZT=1;var e=Ki(),t=E3(),a=Qi(),s="[object Arguments]",r="[object Array]",i="[object Boolean]",l="[object Date]",d="[object Error]",u="[object Function]",p="[object Map]",x="[object Number]",m="[object Object]",h="[object RegExp]",y="[object Set]",w="[object String]",b="[object WeakMap]",j="[object ArrayBuffer]",S="[object DataView]",O="[object Float32Array]",A="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",D="[object Int32Array]",_="[object Uint8Array]",T="[object Uint8ClampedArray]",I="[object Uint16Array]",$="[object Uint32Array]",R={};R[O]=R[A]=R[k]=R[E]=R[D]=R[_]=R[T]=R[I]=R[$]=!0,R[s]=R[r]=R[j]=R[i]=R[S]=R[l]=R[d]=R[u]=R[p]=R[x]=R[m]=R[h]=R[y]=R[w]=R[b]=!1;function B(Y){return a(Y)&&t(Y.length)&&!!R[e(Y)]}return Sw=B,Sw}var Cw,JT;function F$(){if(JT)return Cw;JT=1;function e(t){return function(a){return t(a)}}return Cw=e,Cw}var zp={exports:{}};zp.exports;var eP;function qie(){return eP||(eP=1,(function(e,t){var a=o$(),s=t&&!t.nodeType&&t,r=s&&!0&&e&&!e.nodeType&&e,i=r&&r.exports===s,l=i&&a.process,d=(function(){try{var u=r&&r.require&&r.require("util").types;return u||l&&l.binding&&l.binding("util")}catch{}})();e.exports=d})(zp,zp.exports)),zp.exports}var Ew,tP;function W$(){if(tP)return Ew;tP=1;var e=Uie(),t=F$(),a=qie(),s=a&&a.isTypedArray,r=s?t(s):e;return Ew=r,Ew}var Aw,aP;function Fie(){if(aP)return Aw;aP=1;var e=Lie(),t=S3(),a=cs(),s=q$(),r=C3(),i=W$(),l=Object.prototype,d=l.hasOwnProperty;function u(p,x){var m=a(p),h=!m&&t(p),y=!m&&!h&&s(p),w=!m&&!h&&!y&&i(p),b=m||h||y||w,j=b?e(p.length,String):[],S=j.length;for(var O in p)(x||d.call(p,O))&&!(b&&(O=="length"||y&&(O=="offset"||O=="parent")||w&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||r(O,S)))&&j.push(O);return j}return Aw=u,Aw}var Dw,nP;function Wie(){if(nP)return Dw;nP=1;var e=Object.prototype;function t(a){var s=a&&a.constructor,r=typeof s=="function"&&s.prototype||e;return a===r}return Dw=t,Dw}var Ow,sP;function H$(){if(sP)return Ow;sP=1;function e(t,a){return function(s){return t(a(s))}}return Ow=e,Ow}var kw,rP;function Hie(){if(rP)return kw;rP=1;var e=H$(),t=e(Object.keys,Object);return kw=t,kw}var _w,iP;function Vie(){if(iP)return _w;iP=1;var e=Wie(),t=Hie(),a=Object.prototype,s=a.hasOwnProperty;function r(i){if(!e(i))return t(i);var l=[];for(var d in Object(i))s.call(i,d)&&d!="constructor"&&l.push(d);return l}return _w=r,_w}var Tw,cP;function Mm(){if(cP)return Tw;cP=1;var e=d3(),t=E3();function a(s){return s!=null&&t(s.length)&&!e(s)}return Tw=a,Tw}var Pw,lP;function hy(){if(lP)return Pw;lP=1;var e=Fie(),t=Vie(),a=Mm();function s(r){return a(r)?e(r):t(r)}return Pw=s,Pw}var Mw,oP;function Gie(){if(oP)return Mw;oP=1;var e=Mie(),t=Iie(),a=hy();function s(r){return e(r,a,t)}return Mw=s,Mw}var Rw,dP;function Yie(){if(dP)return Rw;dP=1;var e=Gie(),t=1,a=Object.prototype,s=a.hasOwnProperty;function r(i,l,d,u,p,x){var m=d&t,h=e(i),y=h.length,w=e(l),b=w.length;if(y!=b&&!m)return!1;for(var j=y;j--;){var S=h[j];if(!(m?S in l:s.call(l,S)))return!1}var O=x.get(i),A=x.get(l);if(O&&A)return O==l&&A==i;var k=!0;x.set(i,l),x.set(l,i);for(var E=m;++j<y;){S=h[j];var D=i[S],_=l[S];if(u)var T=m?u(_,D,S,l,i,x):u(D,_,S,i,l,x);if(!(T===void 0?D===_||p(D,_,d,u,x):T)){k=!1;break}E||(E=S=="constructor")}if(k&&!E){var I=i.constructor,$=l.constructor;I!=$&&"constructor"in i&&"constructor"in l&&!(typeof I=="function"&&I instanceof I&&typeof $=="function"&&$ instanceof $)&&(k=!1)}return x.delete(i),x.delete(l),k}return Rw=r,Rw}var Bw,uP;function Kie(){if(uP)return Bw;uP=1;var e=mo(),t=Jr(),a=e(t,"DataView");return Bw=a,Bw}var Iw,pP;function Qie(){if(pP)return Iw;pP=1;var e=mo(),t=Jr(),a=e(t,"Promise");return Iw=a,Iw}var Lw,fP;function V$(){if(fP)return Lw;fP=1;var e=mo(),t=Jr(),a=e(t,"Set");return Lw=a,Lw}var $w,mP;function Xie(){if(mP)return $w;mP=1;var e=mo(),t=Jr(),a=e(t,"WeakMap");return $w=a,$w}var zw,xP;function Zie(){if(xP)return zw;xP=1;var e=Kie(),t=p3(),a=Qie(),s=V$(),r=Xie(),i=Ki(),l=d$(),d="[object Map]",u="[object Object]",p="[object Promise]",x="[object Set]",m="[object WeakMap]",h="[object DataView]",y=l(e),w=l(t),b=l(a),j=l(s),S=l(r),O=i;return(e&&O(new e(new ArrayBuffer(1)))!=h||t&&O(new t)!=d||a&&O(a.resolve())!=p||s&&O(new s)!=x||r&&O(new r)!=m)&&(O=function(A){var k=i(A),E=k==u?A.constructor:void 0,D=E?l(E):"";if(D)switch(D){case y:return h;case w:return d;case b:return p;case j:return x;case S:return m}return k}),zw=O,zw}var Uw,gP;function Jie(){if(gP)return Uw;gP=1;var e=B$(),t=z$(),a=Pie(),s=Yie(),r=Zie(),i=cs(),l=q$(),d=W$(),u=1,p="[object Arguments]",x="[object Array]",m="[object Object]",h=Object.prototype,y=h.hasOwnProperty;function w(b,j,S,O,A,k){var E=i(b),D=i(j),_=E?x:r(b),T=D?x:r(j);_=_==p?m:_,T=T==p?m:T;var I=_==m,$=T==m,R=_==T;if(R&&l(b)){if(!l(j))return!1;E=!0,I=!1}if(R&&!I)return k||(k=new e),E||d(b)?t(b,j,S,O,A,k):a(b,j,_,S,O,A,k);if(!(S&u)){var B=I&&y.call(b,"__wrapped__"),Y=$&&y.call(j,"__wrapped__");
vendor: 46,054 bytes, lines 782-790
782if(B||Y){var z=B?b.value():b,Q=Y?j.value():j;return k||(k=new e),A(z,Q,S,O,k)}}return R?(k||(k=new e),s(b,j,S,O,A,k)):!1}return Uw=w,Uw}var qw,hP;function A3(){if(hP)return qw;hP=1;var e=Jie(),t=Qi();function a(s,r,i,l,d){return s===r?!0:s==null||r==null||!t(s)&&!t(r)?s!==s&&r!==r:e(s,r,i,l,a,d)}return qw=a,qw}var Fw,vP;function ece(){if(vP)return Fw;vP=1;var e=B$(),t=A3(),a=1,s=2;function r(i,l,d,u){var p=d.length,x=p,m=!u;if(i==null)return!x;for(i=Object(i);p--;){var h=d[p];if(m&&h[2]?h[1]!==i[h[0]]:!(h[0]in i))return!1}for(;++p<x;){h=d[p];var y=h[0],w=i[y],b=h[1];if(m&&h[2]){if(w===void 0&&!(y in i))return!1}else{var j=new e;if(u)var S=u(w,b,y,i,l,j);if(!(S===void 0?t(b,w,a|s,u,j):S))return!1}}return!0}return Fw=r,Fw}var Ww,yP;function G$(){if(yP)return Ww;yP=1;var e=al();function t(a){return a===a&&!e(a)}return Ww=t,Ww}var Hw,bP;function tce(){if(bP)return Hw;bP=1;var e=G$(),t=hy();function a(s){for(var r=t(s),i=r.length;i--;){var l=r[i],d=s[l];r[i]=[l,d,e(d)]}return r}return Hw=a,Hw}var Vw,jP;function Y$(){if(jP)return Vw;jP=1;function e(t,a){return function(s){return s==null?!1:s[t]===a&&(a!==void 0||t in Object(s))}}return Vw=e,Vw}var Gw,wP;function ace(){if(wP)return Gw;wP=1;var e=ece(),t=tce(),a=Y$();function s(r){var i=t(r);return i.length==1&&i[0][2]?a(i[0][0],i[0][1]):function(l){return l===r||e(l,r,i)}}return Gw=s,Gw}var Yw,NP;function nce(){if(NP)return Yw;NP=1;function e(t,a){return t!=null&&a in Object(t)}return Yw=e,Yw}var Kw,SP;function sce(){if(SP)return Kw;SP=1;var e=f$(),t=S3(),a=cs(),s=C3(),r=E3(),i=py();function l(d,u,p){u=e(u,d);for(var x=-1,m=u.length,h=!1;++x<m;){var y=i(u[x]);if(!(h=d!=null&&p(d,y)))break;d=d[y]}return h||++x!=m?h:(m=d==null?0:d.length,!!m&&r(m)&&s(y,m)&&(a(d)||t(d)))}return Kw=l,Kw}var Qw,CP;function rce(){if(CP)return Qw;CP=1;var e=nce(),t=sce();function a(s,r){return s!=null&&t(s,r,e)}return Qw=a,Qw}var Xw,EP;function ice(){if(EP)return Xw;EP=1;var e=A3(),t=m$(),a=rce(),s=o3(),r=G$(),i=Y$(),l=py(),d=1,u=2;function p(x,m){return s(x)&&r(m)?i(l(x),m):function(h){var y=t(h,x);return y===void 0&&y===m?a(h,x):e(m,y,d|u)}}return Xw=p,Xw}var Zw,AP;function xu(){if(AP)return Zw;AP=1;function e(t){return t}return Zw=e,Zw}var Jw,DP;function cce(){if(DP)return Jw;DP=1;function e(t){return function(a){return a?.[t]}}return Jw=e,Jw}var e2,OP;function lce(){if(OP)return e2;OP=1;var e=x3();function t(a){return function(s){return e(s,a)}}return e2=t,e2}var t2,kP;function oce(){if(kP)return t2;kP=1;var e=cce(),t=lce(),a=o3(),s=py();function r(i){return a(i)?e(s(i)):t(i)}return t2=r,t2}var a2,_P;function nl(){if(_P)return a2;_P=1;var e=ace(),t=ice(),a=xu(),s=cs(),r=oce();function i(l){return typeof l=="function"?l:l==null?a:typeof l=="object"?s(l)?t(l[0],l[1]):e(l):r(l)}return a2=i,a2}var n2,TP;function K$(){if(TP)return n2;TP=1;function e(t,a,s,r){for(var i=t.length,l=s+(r?1:-1);r?l--:++l<i;)if(a(t[l],l,t))return l;return-1}return n2=e,n2}var s2,PP;function dce(){if(PP)return s2;PP=1;function e(t){return t!==t}return s2=e,s2}var r2,MP;function uce(){if(MP)return r2;MP=1;function e(t,a,s){for(var r=s-1,i=t.length;++r<i;)if(t[r]===a)return r;return-1}return r2=e,r2}var i2,RP;function pce(){if(RP)return i2;RP=1;var e=K$(),t=dce(),a=uce();function s(r,i,l){return i===i?a(r,i,l):e(r,t,l)}return i2=s,i2}var c2,BP;function fce(){if(BP)return c2;BP=1;var e=pce();function t(a,s){var r=a==null?0:a.length;return!!r&&e(a,s,0)>-1}return c2=t,c2}var l2,IP;function mce(){if(IP)return l2;IP=1;function e(t,a,s){for(var r=-1,i=t==null?0:t.length;++r<i;)if(s(a,t[r]))return!0;return!1}return l2=e,l2}var o2,LP;function xce(){if(LP)return o2;LP=1;function e(){}return o2=e,o2}var d2,$P;function gce(){if($P)return d2;$P=1;var e=V$(),t=xce(),a=N3(),s=1/0,r=e&&1/a(new e([,-0]))[1]==s?function(i){return new e(i)}:t;return d2=r,d2}var u2,zP;function hce(){if(zP)return u2;zP=1;var e=I$(),t=fce(),a=mce(),s=$$(),r=gce(),i=N3(),l=200;function d(u,p,x){var m=-1,h=t,y=u.length,w=!0,b=[],j=b;if(x)w=!1,h=a;else if(y>=l){var S=p?null:r(u);if(S)return i(S);w=!1,h=s,j=new e}else j=p?[]:b;e:for(;++m<y;){var O=u[m],A=p?p(O):O;if(O=x||O!==0?O:0,w&&A===A){for(var k=j.length;k--;)if(j[k]===A)continue e;p&&j.push(A),b.push(O)}else h(j,A,x)||(j!==b&&j.push(A),b.push(O))}return b}return u2=d,u2}var p2,UP;function vce(){if(UP)return p2;UP=1;var e=nl(),t=hce();function a(s,r){return s&&s.length?t(s,e(r,2)):[]}return p2=a,p2}var yce=vce();const qP=Na(yce);function Q$(e,t,a){return t===!0?qP(e,a):Bt(t)?qP(e,t):e}function Id(e){"@babel/helpers - typeof";return Id=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},Id(e)}var bce=["ref"];function FP(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function bi(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(a),!0).forEach(function(s){vy(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):FP(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WP(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Z$(s.key),s)}}function wce(e,t,a){return t&&WP(e.prototype,t),a&&WP(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nce(e,t,a){return t=Nh(t),Sce(e,X$()?Reflect.construct(t,a||[],Nh(e).constructor):t.apply(e,a))}function Sce(e,t){if(t&&(Id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cce(e)}function Cce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X$=function(){return!!e})()}function Nh(e){return Nh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Nh(e)}function Ece(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&&nC(e,t)}function nC(e,t){return nC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},nC(e,t)}function vy(e,t,a){return t=Z$(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Z$(e){var t=Ace(e,"string");return Id(t)=="symbol"?t:t+""}function Ace(e,t){if(Id(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Id(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dce(e,t){if(e==null)return{};var a=Oce(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Oce(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function kce(e){return e.value}function _ce(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var a=Dce(t,bce);return W.createElement(w3,a)}var HP=1,wd=(function(e){function t(){var a;jce(this,t);for(var s=arguments.length,r=new Array(s),i=0;i<s;i++)r[i]=arguments[i];return a=Nce(this,t,[].concat(r)),vy(a,"lastBoundingBox",{width:-1,height:-1}),a}return Ece(t,e),wce(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var s=this.wrapperNode.getBoundingClientRect();return s.height=this.wrapperNode.offsetHeight,s.width=this.wrapperNode.offsetWidth,s}return null}},{key:"updateBBox",value:function(){var s=this.props.onBBoxUpdate,r=this.getBBox();r?(Math.abs(r.width-this.lastBoundingBox.width)>HP||Math.abs(r.height-this.lastBoundingBox.height)>HP)&&(this.lastBoundingBox.width=r.width,this.lastBoundingBox.height=r.height,s&&s(r)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,s&&s(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?bi({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(s){var r=this.props,i=r.layout,l=r.align,d=r.verticalAlign,u=r.margin,p=r.chartWidth,x=r.chartHeight,m,h;if(!s||(s.left===void 0||s.left===null)&&(s.right===void 0||s.right===null))if(l==="center"&&i==="vertical"){var y=this.getBBoxSnapshot();m={left:((p||0)-y.width)/2}}else m=l==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!s||(s.top===void 0||s.top===null)&&(s.bottom===void 0||s.bottom===null))if(d==="middle"){var w=this.getBBoxSnapshot();h={top:((x||0)-w.height)/2}}else h=d==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return bi(bi({},m),h)}},{key:"render",value:function(){var s=this,r=this.props,i=r.content,l=r.width,d=r.height,u=r.wrapperStyle,p=r.payloadUniqBy,x=r.payload,m=bi(bi({position:"absolute",width:l||"auto",height:d||"auto"},this.getDefaultPosition(u)),u);return W.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:function(y){s.wrapperNode=y}},_ce(i,bi(bi({},this.props),{},{payload:Q$(x,p,kce)})))}}],[{key:"getWithHeight",value:function(s,r){var i=bi(bi({},this.defaultProps),s.props),l=i.layout;return l==="vertical"&&ze(s.props.height)?{height:s.props.height}:l==="horizontal"?{width:s.props.width||r}:null}}])})(v.PureComponent);vy(wd,"displayName","Legend");vy(wd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var f2,VP;function Tce(){if(VP)return f2;VP=1;var e=Tm(),t=S3(),a=cs(),s=e?e.isConcatSpreadable:void 0;function r(i){return a(i)||t(i)||!!(s&&i&&i[s])}return f2=r,f2}var m2,GP;function J$(){if(GP)return m2;GP=1;var e=U$(),t=Tce();function a(s,r,i,l,d){var u=-1,p=s.length;for(i||(i=t),d||(d=[]);++u<p;){var x=s[u];r>0&&i(x)?r>1?a(x,r-1,i,l,d):e(d,x):l||(d[d.length]=x)}return d}return m2=a,m2}var x2,YP;function Pce(){if(YP)return x2;YP=1;function e(t){return function(a,s,r){for(var i=-1,l=Object(a),d=r(a),u=d.length;u--;){var p=d[t?u:++i];if(s(l[p],p,l)===!1)break}return a}}return x2=e,x2}var g2,KP;function Mce(){if(KP)return g2;KP=1;var e=Pce(),t=e();return g2=t,g2}var h2,QP;function ez(){if(QP)return h2;QP=1;var e=Mce(),t=hy();function a(s,r){return s&&e(s,r,t)}return h2=a,h2}var v2,XP;function Rce(){if(XP)return v2;XP=1;var e=Mm();function t(a,s){return function(r,i){if(r==null)return r;if(!e(r))return a(r,i);for(var l=r.length,d=s?l:-1,u=Object(r);(s?d--:++d<l)&&i(u[d],d,u)!==!1;);return r}}return v2=t,v2}var y2,ZP;function D3(){if(ZP)return y2;ZP=1;var e=ez(),t=Rce(),a=t(e);return y2=a,y2}var b2,JP;function tz(){if(JP)return b2;JP=1;var e=D3(),t=Mm();function a(s,r){var i=-1,l=t(s)?Array(s.length):[];return e(s,function(d,u,p){l[++i]=r(d,u,p)}),l}return b2=a,b2}var j2,eM;function Bce(){if(eM)return j2;eM=1;function e(t,a){var s=t.length;for(t.sort(a);s--;)t[s]=t[s].value;return t}return j2=e,j2}var w2,tM;function Ice(){if(tM)return w2;tM=1;var e=pu();function t(a,s){if(a!==s){var r=a!==void 0,i=a===null,l=a===a,d=e(a),u=s!==void 0,p=s===null,x=s===s,m=e(s);if(!p&&!m&&!d&&a>s||d&&u&&x&&!p&&!m||i&&u&&x||!r&&x||!l)return 1;if(!i&&!d&&!m&&a<s||m&&r&&l&&!i&&!d||p&&r&&l||!u&&l||!x)return-1}return 0}return w2=t,w2}var N2,aM;function Lce(){if(aM)return N2;aM=1;var e=Ice();function t(a,s,r){for(var i=-1,l=a.criteria,d=s.criteria,u=l.length,p=r.length;++i<u;){var x=e(l[i],d[i]);if(x){if(i>=p)return x;var m=r[i];return x*(m=="desc"?-1:1)}}return a.index-s.index}return N2=t,N2}var S2,nM;function $ce(){if(nM)return S2;nM=1;var e=m3(),t=x3(),a=nl(),s=tz(),r=Bce(),i=F$(),l=Lce(),d=xu(),u=cs();function p(x,m,h){m.length?m=e(m,function(b){return u(b)?function(j){return t(j,b.length===1?b[0]:b)}:b}):m=[d];var y=-1;m=e(m,i(a));var w=s(x,function(b,j,S){var O=e(m,function(A){return A(b)});return{criteria:O,index:++y,value:b}});return r(w,function(b,j){return l(b,j,h)})}return S2=p,S2}var C2,sM;function zce(){if(sM)return C2;sM=1;function e(t,a,s){switch(s.length){case 0:return t.call(a);case 1:return t.call(a,s[0]);case 2:return t.call(a,s[0],s[1]);case 3:return t.call(a,s[0],s[1],s[2])}return t.apply(a,s)}return C2=e,C2}var E2,rM;function Uce(){if(rM)return E2;rM=1;var e=zce(),t=Math.max;function a(s,r,i){return r=t(r===void 0?s.length-1:r,0),function(){for(var l=arguments,d=-1,u=t(l.length-r,0),p=Array(u);++d<u;)p[d]=l[r+d];d=-1;for(var x=Array(r+1);++d<r;)x[d]=l[d];return x[r]=i(p),e(s,this,x)}}return E2=a,E2}var A2,iM;function qce(){if(iM)return A2;iM=1;function e(t){return function(){return t}}return A2=e,A2}var D2,cM;function az(){if(cM)return D2;cM=1;var e=mo(),t=(function(){try{var a=e(Object,"defineProperty");return a({},"",{}),a}catch{}})();return D2=t,D2}var O2,lM;function Fce(){if(lM)return O2;lM=1;var e=qce(),t=az(),a=xu(),s=t?function(r,i){return t(r,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:a;return O2=s,O2}var k2,oM;function Wce(){if(oM)return k2;oM=1;var e=800,t=16,a=Date.now;function s(r){var i=0,l=0;return function(){var d=a(),u=t-(d-l);if(l=d,u>0){if(++i>=e)return arguments[0]}else i=0;return r.apply(void 0,arguments)}}return k2=s,k2}var _2,dM;function Hce(){if(dM)return _2;dM=1;var e=Fce(),t=Wce(),a=t(e);return _2=a,_2}var T2,uM;function Vce(){if(uM)return T2;uM=1;var e=xu(),t=Uce(),a=Hce();function s(r,i){return a(t(r,i,e),r+"")}return T2=s,T2}var P2,pM;function yy(){if(pM)return P2;pM=1;var e=u3(),t=Mm(),a=C3(),s=al();function r(i,l,d){if(!s(d))return!1;var u=typeof l;return(u=="number"?t(d)&&a(l,d.length):u=="string"&&l in d)?e(d[l],i):!1}return P2=r,P2}var M2,fM;function Gce(){if(fM)return M2;fM=1;var e=J$(),t=$ce(),a=Vce(),s=yy(),r=a(function(i,l){if(i==null)return[];var d=l.length;return d>1&&s(i,l[0],l[1])?l=[]:d>2&&s(l[0],l[1],l[2])&&(l=[l[0]]),t(i,e(l,1),[])});return M2=r,M2}var Yce=Gce();const O3=Na(Yce);function Sf(e){"@babel/helpers - typeof";return Sf=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},Sf(e)}function sC(){return sC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},sC.apply(this,arguments)}function Kce(e,t){return Jce(e)||Zce(e,t)||Xce(e,t)||Qce()}function Qce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
783In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xce(e,t){if(e){if(typeof e=="string")return mM(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return mM(e,t)}}function mM(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Zce(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Jce(e){if(Array.isArray(e))return e}function xM(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function R2(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?xM(Object(a),!0).forEach(function(s){ele(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):xM(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function ele(e,t,a){return t=tle(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function tle(e){var t=ale(e,"string");return Sf(t)=="symbol"?t:t+""}function ale(e,t){if(Sf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Sf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nle(e){return Array.isArray(e)&&gn(e[0])&&gn(e[1])?e.join(" ~ "):e}var sle=function(t){var a=t.separator,s=a===void 0?" : ":a,r=t.contentStyle,i=r===void 0?{}:r,l=t.itemStyle,d=l===void 0?{}:l,u=t.labelStyle,p=u===void 0?{}:u,x=t.payload,m=t.formatter,h=t.itemSorter,y=t.wrapperClassName,w=t.labelClassName,b=t.label,j=t.labelFormatter,S=t.accessibilityLayer,O=S===void 0?!1:S,A=function(){if(x&&x.length){var B={padding:0,margin:0},Y=(h?O3(x,h):x).map(function(z,Q){if(z.type==="none")return null;var L=R2({display:"block",paddingTop:4,paddingBottom:4,color:z.color||"#000"},d),M=z.formatter||m||nle,U=z.value,Z=z.name,ie=U,G=Z;if(M&&ie!=null&&G!=null){var F=M(U,Z,z,Q,x);if(Array.isArray(F)){var H=Kce(F,2);ie=H[0],G=H[1]}else ie=F}return W.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(Q),style:L},gn(G)?W.createElement("span",{className:"recharts-tooltip-item-name"},G):null,gn(G)?W.createElement("span",{className:"recharts-tooltip-item-separator"},s):null,W.createElement("span",{className:"recharts-tooltip-item-value"},ie),W.createElement("span",{className:"recharts-tooltip-item-unit"},z.unit||""))});return W.createElement("ul",{className:"recharts-tooltip-item-list",style:B},Y)}return null},k=R2({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),E=R2({margin:0},p),D=!Yt(b),_=D?b:"",T=Qt("recharts-default-tooltip",y),I=Qt("recharts-tooltip-label",w);D&&j&&x!==void 0&&x!==null&&(_=j(b,x));var $=O?{role:"status","aria-live":"assertive"}:{};return W.createElement("div",sC({className:T,style:k},$),W.createElement("p",{className:I,style:E},W.isValidElement(_)?_:"".concat(_)),A())};function Cf(e){"@babel/helpers - typeof";return Cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cf(e)}function Ng(e,t,a){return t=rle(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function rle(e){var t=ile(e,"string");return Cf(t)=="symbol"?t:t+""}function ile(e,t){if(Cf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Cf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yp="recharts-tooltip-wrapper",cle={visibility:"hidden"};function lle(e){var t=e.coordinate,a=e.translateX,s=e.translateY;return Qt(yp,Ng(Ng(Ng(Ng({},"".concat(yp,"-right"),ze(a)&&t&&ze(t.x)&&a>=t.x),"".concat(yp,"-left"),ze(a)&&t&&ze(t.x)&&a<t.x),"".concat(yp,"-bottom"),ze(s)&&t&&ze(t.y)&&s>=t.y),"".concat(yp,"-top"),ze(s)&&t&&ze(t.y)&&s<t.y))}function gM(e){var t=e.allowEscapeViewBox,a=e.coordinate,s=e.key,r=e.offsetTopLeft,i=e.position,l=e.reverseDirection,d=e.tooltipDimension,u=e.viewBox,p=e.viewBoxDimension;if(i&&ze(i[s]))return i[s];var x=a[s]-d-r,m=a[s]+r;if(t[s])return l[s]?x:m;if(l[s]){var h=x,y=u[s];return h<y?Math.max(m,u[s]):Math.max(x,u[s])}var w=m+d,b=u[s]+p;return w>b?Math.max(x,u[s]):Math.max(m,u[s])}function ole(e){var t=e.translateX,a=e.translateY,s=e.useTranslate3d;return{transform:s?"translate3d(".concat(t,"px, ").concat(a,"px, 0)"):"translate(".concat(t,"px, ").concat(a,"px)")}}function dle(e){var t=e.allowEscapeViewBox,a=e.coordinate,s=e.offsetTopLeft,r=e.position,i=e.reverseDirection,l=e.tooltipBox,d=e.useTranslate3d,u=e.viewBox,p,x,m;return l.height>0&&l.width>0&&a?(x=gM({allowEscapeViewBox:t,coordinate:a,key:"x",offsetTopLeft:s,position:r,reverseDirection:i,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),m=gM({allowEscapeViewBox:t,coordinate:a,key:"y",offsetTopLeft:s,position:r,reverseDirection:i,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),p=ole({translateX:x,translateY:m,useTranslate3d:d})):p=cle,{cssProperties:p,cssClasses:lle({translateX:x,translateY:m,coordinate:a})}}function Ld(e){"@babel/helpers - typeof";return Ld=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},Ld(e)}function hM(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function vM(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(a),!0).forEach(function(s){iC(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):hM(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function ule(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ple(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,sz(s.key),s)}}function fle(e,t,a){return t&&ple(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mle(e,t,a){return t=Sh(t),xle(e,nz()?Reflect.construct(t,a||[],Sh(e).constructor):t.apply(e,a))}function xle(e,t){if(t&&(Ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gle(e)}function gle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nz=function(){return!!e})()}function Sh(e){return Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Sh(e)}function hle(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&&rC(e,t)}function rC(e,t){return rC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},rC(e,t)}function iC(e,t,a){return t=sz(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function sz(e){var t=vle(e,"string");return Ld(t)=="symbol"?t:t+""}function vle(e,t){if(Ld(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Ld(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yM=1,yle=(function(e){function t(){var a;ule(this,t);for(var s=arguments.length,r=new Array(s),i=0;i<s;i++)r[i]=arguments[i];return a=mle(this,t,[].concat(r)),iC(a,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),iC(a,"handleKeyDown",function(l){if(l.key==="Escape"){var d,u,p,x;a.setState({dismissed:!0,dismissedAtCoordinate:{x:(d=(u=a.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&d!==void 0?d:0,y:(p=(x=a.props.coordinate)===null||x===void 0?void 0:x.y)!==null&&p!==void 0?p:0}})}}),a}return hle(t,e),fle(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var s=this.wrapperNode.getBoundingClientRect();(Math.abs(s.width-this.state.lastBoundingBox.width)>yM||Math.abs(s.height-this.state.lastBoundingBox.height)>yM)&&this.setState({lastBoundingBox:{width:s.width,height:s.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 s,r;this.props.active&&this.updateBBox(),this.state.dismissed&&(((s=this.props.coordinate)===null||s===void 0?void 0:s.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var s=this,r=this.props,i=r.active,l=r.allowEscapeViewBox,d=r.animationDuration,u=r.animationEasing,p=r.children,x=r.coordinate,m=r.hasPayload,h=r.isAnimationActive,y=r.offset,w=r.position,b=r.reverseDirection,j=r.useTranslate3d,S=r.viewBox,O=r.wrapperStyle,A=dle({allowEscapeViewBox:l,coordinate:x,offsetTopLeft:y,position:w,reverseDirection:b,tooltipBox:this.state.lastBoundingBox,useTranslate3d:j,viewBox:S}),k=A.cssClasses,E=A.cssProperties,D=vM(vM({transition:h&&i?"transform ".concat(d,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&m?"visible":"hidden",position:"absolute",top:0,left:0},O);return W.createElement("div",{tabIndex:-1,className:k,style:D,ref:function(T){s.wrapperNode=T}},p)}}])})(v.PureComponent),ble=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},gu={isSsr:ble()};function $d(e){"@babel/helpers - typeof";return $d=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},$d(e)}function bM(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function jM(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?bM(Object(a),!0).forEach(function(s){k3(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):bM(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function jle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wle(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,iz(s.key),s)}}function Nle(e,t,a){return t&&wle(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sle(e,t,a){return t=Ch(t),Cle(e,rz()?Reflect.construct(t,a||[],Ch(e).constructor):t.apply(e,a))}function Cle(e,t){if(t&&($d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ele(e)}function Ele(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rz=function(){return!!e})()}function Ch(e){return Ch=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Ch(e)}function Ale(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&&cC(e,t)}function cC(e,t){return cC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},cC(e,t)}function k3(e,t,a){return t=iz(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function iz(e){var t=Dle(e,"string");return $d(t)=="symbol"?t:t+""}function Dle(e,t){if($d(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if($d(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Ole(e){return e.dataKey}function kle(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(sle,t)}var ys=(function(e){function t(){return jle(this,t),Sle(this,t,arguments)}return Ale(t,e),Nle(t,[{key:"render",value:function(){var s=this,r=this.props,i=r.active,l=r.allowEscapeViewBox,d=r.animationDuration,u=r.animationEasing,p=r.content,x=r.coordinate,m=r.filterNull,h=r.isAnimationActive,y=r.offset,w=r.payload,b=r.payloadUniqBy,j=r.position,S=r.reverseDirection,O=r.useTranslate3d,A=r.viewBox,k=r.wrapperStyle,E=w??[];m&&E.length&&(E=Q$(w.filter(function(_){return _.value!=null&&(_.hide!==!0||s.props.includeHidden)}),b,Ole));var D=E.length>0;return W.createElement(yle,{allowEscapeViewBox:l,animationDuration:d,animationEasing:u,isAnimationActive:h,active:i,coordinate:x,hasPayload:D,offset:y,position:j,reverseDirection:S,useTranslate3d:O,viewBox:A,wrapperStyle:k},kle(p,jM(jM({},this.props),{},{payload:E})))}}])})(v.PureComponent);k3(ys,"displayName","Tooltip");k3(ys,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!gu.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 B2,wM;function _le(){if(wM)return B2;wM=1;var e=Jr(),t=function(){return e.Date.now()};return B2=t,B2}var I2,NM;function Tle(){if(NM)return I2;NM=1;var e=/\s/;function t(a){for(var s=a.length;s--&&e.test(a.charAt(s)););return s}return I2=t,I2}var L2,SM;function Ple(){if(SM)return L2;SM=1;var e=Tle(),t=/^\s+/;function a(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return L2=a,L2}var $2,CM;function cz(){if(CM)return $2;CM=1;var e=Ple(),t=al(),a=pu(),s=NaN,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;function u(p){if(typeof p=="number")return p;if(a(p))return s;if(t(p)){var x=typeof p.valueOf=="function"?p.valueOf():p;p=t(x)?x+"":x}if(typeof p!="string")return p===0?p:+p;p=e(p);var m=i.test(p);return m||l.test(p)?d(p.slice(2),m?2:8):r.test(p)?s:+p}return $2=u,$2}var z2,EM;function Mle(){if(EM)return z2;EM=1;var e=al(),t=_le(),a=cz(),s="Expected a function",r=Math.max,i=Math.min;function l(d,u,p){var x,m,h,y,w,b,j=0,S=!1,O=!1,A=!0;if(typeof d!="function")throw new TypeError(s);u=a(u)||0,e(p)&&(S=!!p.leading,O="maxWait"in p,h=O?r(a(p.maxWait)||0,u):h,A="trailing"in p?!!p.trailing:A);function k(Y){var z=x,Q=m;return x=m=void 0,j=Y,y=d.apply(Q,z),y}function E(Y){return j=Y,w=setTimeout(T,u),S?k(Y):y}function D(Y){var z=Y-b,Q=Y-j,L=u-z;return O?i(L,h-Q):L}function _(Y){var z=Y-b,Q=Y-j;return b===void 0||z>=u||z<0||O&&Q>=h}function T(){var Y=t();if(_(Y))return I(Y);w=setTimeout(T,D(Y))}function I(Y){return w=void 0,A&&x?k(Y):(x=m=void 0,y)}function $(){w!==void 0&&clearTimeout(w),j=0,x=b=m=w=void 0}function R(){return w===void 0?y:I(t())}function B(){var Y=t(),z=_(Y);if(x=arguments,m=this,b=Y,z){if(w===void 0)return E(b);if(O)return clearTimeout(w),w=setTimeout(T,u),k(b)}return w===void 0&&(w=setTimeout(T,u)),y}return B.cancel=$,B.flush=R,B}return z2=l,z2}var U2,AM;function Rle(){if(AM)return U2;AM=1;var e=Mle(),t=al(),a="Expected a function";function s(r,i,l){var d=!0,u=!0;if(typeof r!="function")throw new TypeError(a);return t(l)&&(d="leading"in l?!!l.leading:d,u="trailing"in l?!!l.trailing:u),e(r,i,{leading:d,maxWait:i,trailing:u})}return U2=s,U2}var Ble=Rle();const lz=Na(Ble);function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function DM(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Sg(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?DM(Object(a),!0).forEach(function(s){Ile(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):DM(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Ile(e,t,a){return t=Lle(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Lle(e){var t=$le(e,"string");return Ef(t)=="symbol"?t:t+""}function $le(e,t){if(Ef(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Ef(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zle(e,t){return Wle(e)||Fle(e,t)||qle(e,t)||Ule()}function Ule(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
784In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qle(e,t){if(e){if(typeof e=="string")return OM(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return OM(e,t)}}function OM(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Fle(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Wle(e){if(Array.isArray(e))return e}var Eh=v.forwardRef(function(e,t){var a=e.aspect,s=e.initialDimension,r=s===void 0?{width:-1,height:-1}:s,i=e.width,l=i===void 0?"100%":i,d=e.height,u=d===void 0?"100%":d,p=e.minWidth,x=p===void 0?0:p,m=e.minHeight,h=e.maxHeight,y=e.children,w=e.debounce,b=w===void 0?0:w,j=e.id,S=e.className,O=e.onResize,A=e.style,k=A===void 0?{}:A,E=v.useRef(null),D=v.useRef();D.current=O,v.useImperativeHandle(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var _=v.useState({containerWidth:r.width,containerHeight:r.height}),T=zle(_,2),I=T[0],$=T[1],R=v.useCallback(function(Y,z){$(function(Q){var L=Math.round(Y),M=Math.round(z);return Q.containerWidth===L&&Q.containerHeight===M?Q:{containerWidth:L,containerHeight:M}})},[]);v.useEffect(function(){var Y=function(Z){var ie,G=Z[0].contentRect,F=G.width,H=G.height;R(F,H),(ie=D.current)===null||ie===void 0||ie.call(D,F,H)};b>0&&(Y=lz(Y,b,{trailing:!0,leading:!1}));var z=new ResizeObserver(Y),Q=E.current.getBoundingClientRect(),L=Q.width,M=Q.height;return R(L,M),z.observe(E.current),function(){z.disconnect()}},[R,b]);var B=v.useMemo(function(){var Y=I.containerWidth,z=I.containerHeight;if(Y<0||z<0)return null;ki(Il(l)||Il(u),`The width(%s) and height(%s) are both fixed numbers,
785       maybe you don't need to use a ResponsiveContainer.`,l,u),ki(!a||a>0,"The aspect(%s) must be greater than zero.",a);var Q=Il(l)?Y:l,L=Il(u)?z:u;a&&a>0&&(Q?L=Q/a:L&&(Q=L*a),h&&L>h&&(L=h)),ki(Q>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
786       please check the style of container, or the props width(%s) and height(%s),
787       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
788       height and width.`,Q,L,l,u,x,m,a);var M=!Array.isArray(y)&&Oi(y.type).endsWith("Chart");return W.Children.map(y,function(U){return W.isValidElement(U)?v.cloneElement(U,Sg({width:Q,height:L},M?{style:Sg({height:"100%",width:"100%",maxHeight:L,maxWidth:Q},U.props.style)}:{})):U})},[a,y,u,h,m,x,I,l]);return W.createElement("div",{id:j?"".concat(j):void 0,className:Qt("recharts-responsive-container",S),style:Sg(Sg({},k),{},{width:l,height:u,minWidth:x,minHeight:m,maxHeight:h}),ref:E},B)}),oz=function(t){return null};oz.displayName="Cell";function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function kM(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function lC(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(a),!0).forEach(function(s){Hle(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):kM(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Hle(e,t,a){return t=Vle(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Vle(e){var t=Gle(e,"string");return Af(t)=="symbol"?t:t+""}function Gle(e,t){if(Af(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Af(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sd={widthCache:{},cacheCount:0},Yle=2e3,Kle={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},_M="recharts_measurement_span";function Qle(e){var t=lC({},e);return Object.keys(t).forEach(function(a){t[a]||delete t[a]}),t}var Kp=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gu.isSsr)return{width:0,height:0};var s=Qle(a),r=JSON.stringify({text:t,copyStyle:s});if(sd.widthCache[r])return sd.widthCache[r];try{var i=document.getElementById(_M);i||(i=document.createElement("span"),i.setAttribute("id",_M),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var l=lC(lC({},Kle),s);Object.assign(i.style,l),i.textContent="".concat(t);var d=i.getBoundingClientRect(),u={width:d.width,height:d.height};return sd.widthCache[r]=u,++sd.cacheCount>Yle&&(sd.cacheCount=0,sd.widthCache={}),u}catch{return{width:0,height:0}}},Xle=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Df(e){"@babel/helpers - typeof";return Df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(e)}function Ah(e,t){return toe(e)||eoe(e,t)||Jle(e,t)||Zle()}function Zle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
789In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jle(e,t){if(e){if(typeof e=="string")return TM(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return TM(e,t)}}function TM(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function eoe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;u=!1}else for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function toe(e){if(Array.isArray(e))return e}function aoe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function PM(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,soe(s.key),s)}}function noe(e,t,a){return t&&PM(e.prototype,t),a&&PM(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function soe(e){var t=roe(e,"string");return Df(t)=="symbol"?t:t+""}function roe(e,t){if(Df(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Df(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,RM=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ioe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,coe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,dz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},loe=Object.keys(dz),md="NaN";function ooe(e,t){return e*dz[t]}var Cg=(function(){function e(t,a){aoe(this,e),this.num=t,this.unit=a,this.num=t,this.unit=a,Number.isNaN(t)&&(this.unit=""),a!==""&&!ioe.test(a)&&(this.num=NaN,this.unit=""),loe.includes(a)&&(this.num=ooe(t,a),this.unit="px")}return noe(e,[{key:"add",value:function(a){return this.unit!==a.unit?new e(NaN,""):new e(this.num+a.num,this.unit)}},{key:"subtract",value:function(a){return this.unit!==a.unit?new e(NaN,""):new e(this.num-a.num,this.unit)}},{key:"multiply",value:function(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new e(NaN,""):new e(this.num*a.num,this.unit||a.unit)}},{key:"divide",value:function(a){return this.unit!==""&&a.unit!==""&&this.unit!==a.unit?new e(NaN,""):new e(this.num/a.num,this.unit||a.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(a){var s,r=(s=coe.exec(a))!==null&&s!==void 0?s:[],i=Ah(r,3),l=i[1],d=i[2];return new e(parseFloat(l),d??"")}}])})();function uz(e){if(e.includes(md))return md;for(var t=e;t.includes("*")||t.includes("/");){var a,s=(a=MM.exec(t))!==null&&a!==void 0?a:[],r=Ah(s,4),i=r[1],l=r[2],d=r[3],u=Cg.parse(i??""),p=Cg.parse(d??""),x=l==="*"?u.multiply(p):u.divide(p);if(x.isNaN())return md;t=t.replace(MM,x.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,h=(m=RM.exec(t))!==null&&m!==void 0?m:[],y=Ah(h,4),w=y[1],b=y[2],j=y[3],S=Cg.parse(w??""),O=Cg.parse(j??""),A=b==="+"?S.add(O):S.subtract(O);if(A.isNaN())return md;t=t.replace(RM,A.toString())}return t}var BM=/\(([^()]*)\)/;function doe(e){for(var t=e;t.includes("(");){var a=BM.exec(t),s=Ah(a,2),r=s[1];t=t.replace(BM,uz(r))}return t}function uoe(e){var t=e.replace(/\s+/g,"");return t=doe(t),t=uz(t),t}function poe(e){try{return uoe(e)}catch{return md}}function q2(e){var t=poe(e.slice(5,-1));return t===md?"":t}var foe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],moe=["dx","dy","angle","className","breakAll"];function oC(){return oC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},oC.apply(this,arguments)}function IM(e,t){if(e==null)return{};var a=xoe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function xoe(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function LM(e,t){return yoe(e)||voe(e,t)||hoe(e,t)||goe()}function goe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
790In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hoe(e,t){if(e){if(typeof e=="string")return $M(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return $M(e,t)}}function $M(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function voe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t===0){if(Object(a)!==a)return;u=!1}else for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function yoe(e){if(Array.isArray(e))return e}var pz=/[ \f\n\r\t\v\u2028\u2029]+/,fz=function(t){var a=t.children,s=t.breakAll,r=t.style;try{var i=[];Yt(a)||(s?i=a.toString().split(""):i=a.toString().split(pz));var l=i.map(function(u){return{word:u,width:Kp(u,r).width}}),d=s?0:Kp(" ",r).width;
790return{wordsWithComputedWidth:l,spaceWidth:d}}catch{return null}},boe=function(t,a,s,r,i){var l=t.maxLines,d=t.children,u=t.style,p=t.breakAll,x=ze(l),m=d,h=function(){var Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return Q.reduce(function(L,M){var U=M.word,Z=M.width,ie=L[L.length-1];if(ie&&(r==null||i||ie.width+Z+s<Number(r)))ie.words.push(U),ie.width+=Z+s;else{var G={words:[U],width:Z};L.push(G)}return L},[])},y=h(a),w=function(Q){return Q.reduce(function(L,M){return L.width>M.width?L:M})};if(!x)return y;for(var b="…",j=function(Q){var L=m.slice(0,Q),M=fz({breakAll:p,style:u,children:L+b}).wordsWithComputedWidth,U=h(M),Z=U.length>l||w(U).width>Number(r);return[Z,U]},S=0,O=m.length-1,A=0,k;S<=O&&A<=m.length-1;){var E=Math.floor((S+O)/2),D=E-1,_=j(D),T=LM(_,2),I=T[0],$=T[1],R=j(E),B=LM(R,1),Y=B[0];if(!I&&!Y&&(S=E+1),I&&Y&&(O=E-1),!I&&Y){k=$;break}A++}return k||y},zM=function(t){var a=Yt(t)?[]:t.toString().split(pz);return[{words:a}]},joe=function(t){var a=t.width,s=t.scaleToFit,r=t.children,i=t.style,l=t.breakAll,d=t.maxLines;if((a||s)&&!gu.isSsr){var u,p,x=fz({breakAll:l,children:r,style:i});if(x){var m=x.wordsWithComputedWidth,h=x.spaceWidth;u=m,p=h}else return zM(r);return boe({breakAll:l,children:r,maxLines:d,style:i},u,p,a,s)}return zM(r)},UM="#808080",Dh=function(t){var a=t.x,s=a===void 0?0:a,r=t.y,i=r===void 0?0:r,l=t.lineHeight,d=l===void 0?"1em":l,u=t.capHeight,p=u===void 0?"0.71em":u,x=t.scaleToFit,m=x===void 0?!1:x,h=t.textAnchor,y=h===void 0?"start":h,w=t.verticalAnchor,b=w===void 0?"end":w,j=t.fill,S=j===void 0?UM:j,O=IM(t,foe),A=v.useMemo(function(){return joe({breakAll:O.breakAll,children:O.children,maxLines:O.maxLines,scaleToFit:m,style:O.style,width:O.width})},[O.breakAll,O.children,O.maxLines,m,O.style,O.width]),k=O.dx,E=O.dy,D=O.angle,_=O.className,T=O.breakAll,I=IM(O,moe);if(!gn(s)||!gn(i))return null;var $=s+(ze(k)?k:0),R=i+(ze(E)?E:0),B;switch(b){case"start":B=q2("calc(".concat(p,")"));break;case"middle":B=q2("calc(".concat((A.length-1)/2," * -").concat(d," + (").concat(p," / 2))"));break;default:B=q2("calc(".concat(A.length-1," * -").concat(d,")"));break}var Y=[];if(m){var z=A[0].width,Q=O.width;Y.push("scale(".concat((ze(Q)?Q/z:1)/z,")"))}return D&&Y.push("rotate(".concat(D,", ").concat($,", ").concat(R,")")),Y.length&&(I.transform=Y.join(" ")),W.createElement("text",oC({},Ft(I,!0),{x:$,y:R,className:Qt("recharts-text",_),textAnchor:y,fill:S.includes("url")?UM:S}),A.map(function(L,M){var U=L.words.join(T?"":" ");return W.createElement("tspan",{x:$,dy:M===0?B:d,key:"".concat(U,"-").concat(M)},U)}))};function $c(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function woe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function _3(e){let t,a,s;e.length!==2?(t=$c,a=(d,u)=>$c(e(d),u),s=(d,u)=>e(d)-u):(t=e===$c||e===woe?e:Noe,a=e,s=e);function r(d,u,p=0,x=d.length){if(p<x){if(t(u,u)!==0)return x;do{const m=p+x>>>1;a(d[m],u)<0?p=m+1:x=m}while(p<x)}return p}function i(d,u,p=0,x=d.length){if(p<x){if(t(u,u)!==0)return x;do{const m=p+x>>>1;a(d[m],u)<=0?p=m+1:x=m}while(p<x)}return p}function l(d,u,p=0,x=d.length){const m=r(d,u,p,x-1);return m>p&&s(d[m-1],u)>-s(d[m],u)?m-1:m}return{left:r,center:l,right:i}}function Noe(){return 0}function mz(e){return e===null?NaN:+e}function*Soe(e,t){for(let a of e)a!=null&&(a=+a)>=a&&(yield a)}const Coe=_3($c),Rm=Coe.right;_3(mz).center;class qM extends Map{constructor(t,a=Doe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:a}}),t!=null)for(const[s,r]of t)this.set(s,r)}get(t){return super.get(FM(this,t))}has(t){return super.has(FM(this,t))}set(t,a){return super.set(Eoe(this,t),a)}delete(t){return super.delete(Aoe(this,t))}}function FM({_intern:e,_key:t},a){const s=t(a);return e.has(s)?e.get(s):a}function Eoe({_intern:e,_key:t},a){const s=t(a);return e.has(s)?e.get(s):(e.set(s,a),a)}function Aoe({_intern:e,_key:t},a){const s=t(a);return e.has(s)&&(a=e.get(s),e.delete(s)),a}function Doe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Ooe(e=$c){if(e===$c)return xz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,a)=>{const s=e(t,a);return s||s===0?s:(e(a,a)===0)-(e(t,t)===0)}}function xz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const koe=Math.sqrt(50),_oe=Math.sqrt(10),Toe=Math.sqrt(2);function Oh(e,t,a){const s=(t-e)/Math.max(0,a),r=Math.floor(Math.log10(s)),i=s/Math.pow(10,r),l=i>=koe?10:i>=_oe?5:i>=Toe?2:1;let d,u,p;return r<0?(p=Math.pow(10,-r)/l,d=Math.round(e*p),u=Math.round(t*p),d/p<e&&++d,u/p>t&&--u,p=-p):(p=Math.pow(10,r)*l,d=Math.round(e/p),u=Math.round(t/p),d*p<e&&++d,u*p>t&&--u),u<d&&.5<=a&&a<2?Oh(e,t,a*2):[d,u,p]}function dC(e,t,a){if(t=+t,e=+e,a=+a,!(a>0))return[];if(e===t)return[e];const s=t<e,[r,i,l]=s?Oh(t,e,a):Oh(e,t,a);if(!(i>=r))return[];const d=i-r+1,u=new Array(d);if(s)if(l<0)for(let p=0;p<d;++p)u[p]=(i-p)/-l;else for(let p=0;p<d;++p)u[p]=(i-p)*l;else if(l<0)for(let p=0;p<d;++p)u[p]=(r+p)/-l;else for(let p=0;p<d;++p)u[p]=(r+p)*l;return u}function uC(e,t,a){return t=+t,e=+e,a=+a,Oh(e,t,a)[2]}function pC(e,t,a){t=+t,e=+e,a=+a;const s=t<e,r=s?uC(t,e,a):uC(e,t,a);return(s?-1:1)*(r<0?1/-r:r)}function WM(e,t){let a;for(const s of e)s!=null&&(a<s||a===void 0&&s>=s)&&(a=s);return a}function HM(e,t){let a;for(const s of e)s!=null&&(a>s||a===void 0&&s>=s)&&(a=s);return a}function gz(e,t,a=0,s=1/0,r){if(t=Math.floor(t),a=Math.floor(Math.max(0,a)),s=Math.floor(Math.min(e.length-1,s)),!(a<=t&&t<=s))return e;for(r=r===void 0?xz:Ooe(r);s>a;){if(s-a>600){const u=s-a+1,p=t-a+1,x=Math.log(u),m=.5*Math.exp(2*x/3),h=.5*Math.sqrt(x*m*(u-m)/u)*(p-u/2<0?-1:1),y=Math.max(a,Math.floor(t-p*m/u+h)),w=Math.min(s,Math.floor(t+(u-p)*m/u+h));gz(e,t,y,w,r)}const i=e[t];let l=a,d=s;for(bp(e,a,t),r(e[s],i)>0&&bp(e,a,s);l<d;){for(bp(e,l,d),++l,--d;r(e[l],i)<0;)++l;for(;r(e[d],i)>0;)--d}r(e[a],i)===0?bp(e,a,d):(++d,bp(e,d,s)),d<=t&&(a=d+1),t<=d&&(s=d-1)}return e}function bp(e,t,a){const s=e[t];e[t]=e[a],e[a]=s}function Poe(e,t,a){if(e=Float64Array.from(Soe(e)),!(!(s=e.length)||isNaN(t=+t))){if(t<=0||s<2)return HM(e);if(t>=1)return WM(e);var s,r=(s-1)*t,i=Math.floor(r),l=WM(gz(e,i).subarray(0,i+1)),d=HM(e.subarray(i+1));return l+(d-l)*(r-i)}}function Moe(e,t,a=mz){if(!(!(s=e.length)||isNaN(t=+t))){if(t<=0||s<2)return+a(e[0],0,e);if(t>=1)return+a(e[s-1],s-1,e);var s,r=(s-1)*t,i=Math.floor(r),l=+a(e[i],i,e),d=+a(e[i+1],i+1,e);return l+(d-l)*(r-i)}}function Roe(e,t,a){e=+e,t=+t,a=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+a;for(var s=-1,r=Math.max(0,Math.ceil((t-e)/a))|0,i=new Array(r);++s<r;)i[s]=e+s*a;return i}function er(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Xi(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}
vendor: 6,574 bytes, line 790
790const fC=Symbol("implicit");function T3(){var e=new qM,t=[],a=[],s=fC;function r(i){let l=e.get(i);if(l===void 0){if(s!==fC)return s;e.set(i,l=t.push(i)-1)}return a[l%a.length]}return r.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new qM;for(const l of i)e.has(l)||e.set(l,t.push(l)-1);return r},r.range=function(i){return arguments.length?(a=Array.from(i),r):a.slice()},r.unknown=function(i){return arguments.length?(s=i,r):s},r.copy=function(){return T3(t,a).unknown(s)},er.apply(r,arguments),r}function Of(){var e=T3().unknown(void 0),t=e.domain,a=e.range,s=0,r=1,i,l,d=!1,u=0,p=0,x=.5;delete e.unknown;function m(){var h=t().length,y=r<s,w=y?r:s,b=y?s:r;i=(b-w)/Math.max(1,h-u+p*2),d&&(i=Math.floor(i)),w+=(b-w-i*(h-u))*x,l=i*(1-u),d&&(w=Math.round(w),l=Math.round(l));var j=Roe(h).map(function(S){return w+i*S});return a(y?j.reverse():j)}return e.domain=function(h){return arguments.length?(t(h),m()):t()},e.range=function(h){return arguments.length?([s,r]=h,s=+s,r=+r,m()):[s,r]},e.rangeRound=function(h){return[s,r]=h,s=+s,r=+r,d=!0,m()},e.bandwidth=function(){return l},e.step=function(){return i},e.round=function(h){return arguments.length?(d=!!h,m()):d},e.padding=function(h){return arguments.length?(u=Math.min(1,p=+h),m()):u},e.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),m()):u},e.paddingOuter=function(h){return arguments.length?(p=+h,m()):p},e.align=function(h){return arguments.length?(x=Math.max(0,Math.min(1,h)),m()):x},e.copy=function(){return Of(t(),[s,r]).round(d).paddingInner(u).paddingOuter(p).align(x)},er.apply(m(),arguments)}function hz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return hz(t())},e}function Qp(){return hz(Of.apply(null,arguments).paddingInner(1))}function P3(e,t,a){e.prototype=t.prototype=a,a.constructor=e}function vz(e,t){var a=Object.create(e.prototype);for(var s in t)a[s]=t[s];return a}function Bm(){}var kf=.7,kh=1/kf,Nd="\\s*([+-]?\\d+)\\s*",_f="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Boe=/^#([0-9a-f]{3,8})$/,Ioe=new RegExp(`^rgb\\(${Nd},${Nd},${Nd}\\)$`),Loe=new RegExp(`^rgb\\(${Fr},${Fr},${Fr}\\)$`),$oe=new RegExp(`^rgba\\(${Nd},${Nd},${Nd},${_f}\\)$`),zoe=new RegExp(`^rgba\\(${Fr},${Fr},${Fr},${_f}\\)$`),Uoe=new RegExp(`^hsl\\(${_f},${Fr},${Fr}\\)$`),qoe=new RegExp(`^hsla\\(${_f},${Fr},${Fr},${_f}\\)$`),VM={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};P3(Bm,Tf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:GM,formatHex:GM,formatHex8:Foe,formatHsl:Woe,formatRgb:YM,toString:YM});function GM(){return this.rgb().formatHex()}function Foe(){return this.rgb().formatHex8()}function Woe(){return yz(this).formatHsl()}function YM(){return this.rgb().formatRgb()}function Tf(e){var t,a;return e=(e+"").trim().toLowerCase(),(t=Boe.exec(e))?(a=t[1].length,t=parseInt(t[1],16),a===6?KM(t):a===3?new is(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):a===8?Eg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):a===4?Eg(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=Ioe.exec(e))?new is(t[1],t[2],t[3],1):(t=Loe.exec(e))?new is(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=$oe.exec(e))?Eg(t[1],t[2],t[3],t[4]):(t=zoe.exec(e))?Eg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Uoe.exec(e))?ZM(t[1],t[2]/100,t[3]/100,1):(t=qoe.exec(e))?ZM(t[1],t[2]/100,t[3]/100,t[4]):VM.hasOwnProperty(e)?KM(VM[e]):e==="transparent"?new is(NaN,NaN,NaN,0):null}function KM(e){return new is(e>>16&255,e>>8&255,e&255,1)}function Eg(e,t,a,s){return s<=0&&(e=t=a=NaN),new is(e,t,a,s)}function Hoe(e){return e instanceof Bm||(e=Tf(e)),e?(e=e.rgb(),new is(e.r,e.g,e.b,e.opacity)):new is}function mC(e,t,a,s){return arguments.length===1?Hoe(e):new is(e,t,a,s??1)}function is(e,t,a,s){this.r=+e,this.g=+t,this.b=+a,this.opacity=+s}
vendor: 4,545 bytes, line 790
790P3(is,mC,vz(Bm,{brighter(e){return e=e==null?kh:Math.pow(kh,e),new is(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?kf:Math.pow(kf,e),new is(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new is(Wl(this.r),Wl(this.g),Wl(this.b),_h(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:QM,formatHex:QM,formatHex8:Voe,formatRgb:XM,toString:XM}));function QM(){return`#${Ll(this.r)}${Ll(this.g)}${Ll(this.b)}`}function Voe(){return`#${Ll(this.r)}${Ll(this.g)}${Ll(this.b)}${Ll((isNaN(this.opacity)?1:this.opacity)*255)}`}function XM(){const e=_h(this.opacity);return`${e===1?"rgb(":"rgba("}${Wl(this.r)}, ${Wl(this.g)}, ${Wl(this.b)}${e===1?")":`, ${e})`}`}function _h(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ll(e){return e=Wl(e),(e<16?"0":"")+e.toString(16)}function ZM(e,t,a,s){return s<=0?e=t=a=NaN:a<=0||a>=1?e=t=NaN:t<=0&&(e=NaN),new cr(e,t,a,s)}function yz(e){if(e instanceof cr)return new cr(e.h,e.s,e.l,e.opacity);if(e instanceof Bm||(e=Tf(e)),!e)return new cr;if(e instanceof cr)return e;e=e.rgb();var t=e.r/255,a=e.g/255,s=e.b/255,r=Math.min(t,a,s),i=Math.max(t,a,s),l=NaN,d=i-r,u=(i+r)/2;return d?(t===i?l=(a-s)/d+(a<s)*6:a===i?l=(s-t)/d+2:l=(t-a)/d+4,d/=u<.5?i+r:2-i-r,l*=60):d=u>0&&u<1?0:l,new cr(l,d,u,e.opacity)}function Goe(e,t,a,s){return arguments.length===1?yz(e):new cr(e,t,a,s??1)}function cr(e,t,a,s){this.h=+e,this.s=+t,this.l=+a,this.opacity=+s}P3(cr,Goe,vz(Bm,{brighter(e){return e=e==null?kh:Math.pow(kh,e),new cr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kf:Math.pow(kf,e),new cr(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,a=this.l,s=a+(a<.5?a:1-a)*t,r=2*a-s;return new is(F2(e>=240?e-240:e+120,r,s),F2(e,r,s),F2(e<120?e+240:e-120,r,s),this.opacity)},clamp(){return new cr(JM(this.h),Ag(this.s),Ag(this.l),_h(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=_h(this.opacity);return`${e===1?"hsl(":"hsla("}${JM(this.h)}, ${Ag(this.s)*100}%, ${Ag(this.l)*100}%${e===1?")":`, ${e})`}`}}));function JM(e){return e=(e||0)%360,e<0?e+360:e}function Ag(e){return Math.max(0,Math.min(1,e||0))}function F2(e,t,a){return(e<60?t+(a-t)*e/60:e<180?a:e<240?t+(a-t)*(240-e)/60:t)*255}const M3=e=>()=>e;function Yoe(e,t){return function(a){return e+a*t}}function Koe(e,t,a){return e=Math.pow(e,a),t=Math.pow(t,a)-e,a=1/a,function(s){return Math.pow(e+s*t,a)}}function Qoe(e){return(e=+e)==1?bz:function(t,a){return a-t?Koe(t,a,e):M3(isNaN(t)?a:t)}}function bz(e,t){var a=t-e;return a?Yoe(e,a):M3(isNaN(e)?t:e)}const e6=(function e(t){var a=Qoe(t);function s(r,i){var l=a((r=mC(r)).r,(i=mC(i)).r),d=a(r.g,i.g),u=a(r.b,i.b),p=bz(r.opacity,i.opacity);return function(x){return r.r=l(x),r.g=d(x),r.b=u(x),r.opacity=p(x),r+""}}return s.gamma=e,s})(1);function Xoe(e,t){t||(t=[]);var a=e?Math.min(t.length,e.length):0,s=t.slice(),r;return function(i){for(r=0;r<a;++r)s[r]=e[r]*(1-i)+t[r]*i;return s}}function Zoe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Joe(e,t){var a=t?t.length:0,s=e?Math.min(a,e.length):0,r=new Array(s),i=new Array(a),l;for(l=0;l<s;++l)r[l]=hu(e[l],t[l]);for(;l<a;++l)i[l]=t[l];return function(d){for(l=0;l<s;++l)i[l]=r[l](d);return i}}function ede(e,t){var a=new Date;return e=+e,t=+t,function(s){return a.setTime(e*(1-s)+t*s),a}}function Th(e,t){return e=+e,t=+t,function(a){return e*(1-a)+t*a}}function tde(e,t){var a={},s={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?a[r]=hu(e[r],t[r]):s[r]=t[r];return function(i){for(r in a)s[r]=a[r](i);return s}}var xC=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,W2=new RegExp(xC.source,"g");function ade(e){return function(){return e}}function nde(e){return function(t){return e(t)+""}}function sde(e,t){var a=xC.lastIndex=W2.lastIndex=0,s,r,i,l=-1,d=[],u=[];for(e=e+"",t=t+"";(s=xC.exec(e))&&(r=W2.exec(t));)(i=r.index)>a&&(i=t.slice(a,i),d[l]?d[l]+=i:d[++l]=i),(s=s[0])===(r=r[0])?d[l]?d[l]+=r:d[++l]=r:(d[++l]=null,u.push({i:l,x:Th(s,r)})),a=W2.lastIndex;return a<t.length&&(i=t.slice(a),d[l]?d[l]+=i:d[++l]=i),d.length<2?u[0]?nde(u[0].x):ade(t):(t=u.length,function(p){for(var x=0,m;x<t;++x)d[(m=u[x]).i]=m.x(p);return d.join("")})}function hu(e,t){var a=typeof t,s;
vendor: 4,408 bytes, line 790
790return t==null||a==="boolean"?M3(t):(a==="number"?Th:a==="string"?(s=Tf(t))?(t=s,e6):sde:t instanceof Tf?e6:t instanceof Date?ede:Zoe(t)?Xoe:Array.isArray(t)?Joe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tde:Th)(e,t)}function R3(e,t){return e=+e,t=+t,function(a){return Math.round(e*(1-a)+t*a)}}function rde(e,t){t===void 0&&(t=e,e=hu);for(var a=0,s=t.length-1,r=t[0],i=new Array(s<0?0:s);a<s;)i[a]=e(r,r=t[++a]);return function(l){var d=Math.max(0,Math.min(s-1,Math.floor(l*=s)));return i[d](l-d)}}function ide(e){return function(){return e}}function Ph(e){return+e}var t6=[0,1];function Wn(e){return e}function gC(e,t){return(t-=e=+e)?function(a){return(a-e)/t}:ide(isNaN(t)?NaN:.5)}function cde(e,t){var a;return e>t&&(a=e,e=t,t=a),function(s){return Math.max(e,Math.min(t,s))}}function lde(e,t,a){var s=e[0],r=e[1],i=t[0],l=t[1];return r<s?(s=gC(r,s),i=a(l,i)):(s=gC(s,r),i=a(i,l)),function(d){return i(s(d))}}function ode(e,t,a){var s=Math.min(e.length,t.length)-1,r=new Array(s),i=new Array(s),l=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<s;)r[l]=gC(e[l],e[l+1]),i[l]=a(t[l],t[l+1]);return function(d){var u=Rm(e,d,1,s)-1;return i[u](r[u](d))}}function Im(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function by(){var e=t6,t=t6,a=hu,s,r,i,l=Wn,d,u,p;function x(){var h=Math.min(e.length,t.length);return l!==Wn&&(l=cde(e[0],e[h-1])),d=h>2?ode:lde,u=p=null,m}function m(h){return h==null||isNaN(h=+h)?i:(u||(u=d(e.map(s),t,a)))(s(l(h)))}return m.invert=function(h){return l(r((p||(p=d(t,e.map(s),Th)))(h)))},m.domain=function(h){return arguments.length?(e=Array.from(h,Ph),x()):e.slice()},m.range=function(h){return arguments.length?(t=Array.from(h),x()):t.slice()},m.rangeRound=function(h){return t=Array.from(h),a=R3,x()},m.clamp=function(h){return arguments.length?(l=h?!0:Wn,x()):l!==Wn},m.interpolate=function(h){return arguments.length?(a=h,x()):a},m.unknown=function(h){return arguments.length?(i=h,m):i},function(h,y){return s=h,r=y,x()}}function B3(){return by()(Wn,Wn)}function dde(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Mh(e,t){if((a=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var a,s=e.slice(0,a);return[s.length>1?s[0]+s.slice(2):s,+e.slice(a+1)]}function zd(e){return e=Mh(Math.abs(e)),e?e[1]:NaN}function ude(e,t){return function(a,s){for(var r=a.length,i=[],l=0,d=e[0],u=0;r>0&&d>0&&(u+d+1>s&&(d=Math.max(1,s-u)),i.push(a.substring(r-=d,r+d)),!((u+=d+1)>s));)d=e[l=(l+1)%e.length];return i.reverse().join(t)}}function pde(e){return function(t){return t.replace(/[0-9]/g,function(a){return e[+a]})}}var fde=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pf(e){if(!(t=fde.exec(e)))throw new Error("invalid format: "+e);var t;return new I3({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]})}Pf.prototype=I3.prototype;function I3(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+""}I3.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 mde(e){e:for(var t=e.length,a=1,s=-1,r;a<t;++a)switch(e[a]){case".":s=r=a;break;case"0":s===0&&(s=a),r=a;break;default:if(!+e[a])break e;s>0&&(s=0);break}return s>0?e.slice(0,s)+e.slice(r+1):e}var jz;function xde(e,t){var a=Mh(e,t);if(!a)return e+"";var s=a[0],r=a[1],i=r-(jz=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,l=s.length;return i===l?s:i>l?s+new Array(i-l+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+Mh(e,Math.max(0,t+i-1))[0]}function a6(e,t){var a=Mh(e,t);if(!a)return e+"";var s=a[0],r=a[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}const n6={"%":(e,t)=>
vendor: 5,608 bytes, line 790
790(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:dde,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)=>a6(e*100,t),r:a6,s:xde,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function s6(e){return e}var r6=Array.prototype.map,i6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function gde(e){var t=e.grouping===void 0||e.thousands===void 0?s6:ude(r6.call(e.grouping,Number),e.thousands+""),a=e.currency===void 0?"":e.currency[0]+"",s=e.currency===void 0?"":e.currency[1]+"",r=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?s6:pde(r6.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",d=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function p(m){m=Pf(m);var h=m.fill,y=m.align,w=m.sign,b=m.symbol,j=m.zero,S=m.width,O=m.comma,A=m.precision,k=m.trim,E=m.type;E==="n"?(O=!0,E="g"):n6[E]||(A===void 0&&(A=12),k=!0,E="g"),(j||h==="0"&&y==="=")&&(j=!0,h="0",y="=");var D=b==="$"?a:b==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",_=b==="$"?s:/[%p]/.test(E)?l:"",T=n6[E],I=/[defgprs%]/.test(E);A=A===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function $(R){var B=D,Y=_,z,Q,L;if(E==="c")Y=T(R)+Y,R="";else{R=+R;var M=R<0||1/R<0;if(R=isNaN(R)?u:T(Math.abs(R),A),k&&(R=mde(R)),M&&+R==0&&w!=="+"&&(M=!1),B=(M?w==="("?w:d:w==="-"||w==="("?"":w)+B,Y=(E==="s"?i6[8+jz/3]:"")+Y+(M&&w==="("?")":""),I){for(z=-1,Q=R.length;++z<Q;)if(L=R.charCodeAt(z),48>L||L>57){Y=(L===46?r+R.slice(z+1):R.slice(z))+Y,R=R.slice(0,z);break}}}O&&!j&&(R=t(R,1/0));var U=B.length+R.length+Y.length,Z=U<S?new Array(S-U+1).join(h):"";switch(O&&j&&(R=t(Z+R,Z.length?S-Y.length:1/0),Z=""),y){case"<":R=B+R+Y+Z;break;case"=":R=B+Z+R+Y;break;case"^":R=Z.slice(0,U=Z.length>>1)+B+R+Y+Z.slice(U);break;default:R=Z+B+R+Y;break}return i(R)}return $.toString=function(){return m+""},$}function x(m,h){var y=p((m=Pf(m),m.type="f",m)),w=Math.max(-8,Math.min(8,Math.floor(zd(h)/3)))*3,b=Math.pow(10,-w),j=i6[8+w/3];return function(S){return y(b*S)+j}}return{format:p,formatPrefix:x}}var Dg,L3,wz;hde({thousands:",",grouping:[3],currency:["$",""]});function hde(e){return Dg=gde(e),L3=Dg.format,wz=Dg.formatPrefix,Dg}function vde(e){return Math.max(0,-zd(Math.abs(e)))}function yde(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(zd(t)/3)))*3-zd(Math.abs(e)))}function bde(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,zd(t)-zd(e))+1}function Nz(e,t,a,s){var r=pC(e,t,a),i;switch(s=Pf(s??",f"),s.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return s.precision==null&&!isNaN(i=yde(r,l))&&(s.precision=i),wz(s,l)}case"":case"e":case"g":case"p":case"r":{s.precision==null&&!isNaN(i=bde(r,Math.max(Math.abs(e),Math.abs(t))))&&(s.precision=i-(s.type==="e"));break}case"f":case"%":{s.precision==null&&!isNaN(i=vde(r))&&(s.precision=i-(s.type==="%")*2);break}}return L3(s)}function sl(e){var t=e.domain;return e.ticks=function(a){var s=t();return dC(s[0],s[s.length-1],a??10)},e.tickFormat=function(a,s){var r=t();return Nz(r[0],r[r.length-1],a??10,s)},e.nice=function(a){a==null&&(a=10);var s=t(),r=0,i=s.length-1,l=s[r],d=s[i],u,p,x=10;for(d<l&&(p=l,l=d,d=p,p=r,r=i,i=p);x-- >0;){if(p=uC(l,d,a),p===u)return s[r]=l,s[i]=d,t(s);if(p>0)l=Math.floor(l/p)*p,d=Math.ceil(d/p)*p;else if(p<0)l=Math.ceil(l*p)/p,d=Math.floor(d*p)/p;else break;u=p}return e},e}function Rh(){var e=B3();return e.copy=function(){return Im(e,Rh())},er.apply(e,arguments),sl(e)}function Sz(e){var t;function a(s){return s==null||isNaN(s=+s)?t:s}return a.invert=a,a.domain=a.range=function(s){return arguments.length?(e=Array.from(s,Ph),a):e.slice()},a.unknown=function(s){return arguments.length?(t=s,a):t},a.copy=function(){return Sz(e).unknown(t)},e=arguments.length?Array.from(e,Ph):[0,1],sl(a)}function Cz(e,t){e=e.slice();var a=0,s=e.length-1,r=e[a],i=e[s],l;return i<r&&(l=a,a=s,s=l,l=r,r=i,i=l),e[a]=t.floor(r),e[s]=t.ceil(i),e}function c6(e){return Math.log(e)}function l6(e){return Math.exp(e)}function jde(e){return-Math.log(-e)}function wde(e){return-Math.exp(-e)}function Nde(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Sde(e){return e===10?Nde:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Cde(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 o6(e){return(t,a)=>-e(-t,a)}function $3(e){const t=e(c6,l6),a=t.domain;let s=10,r,i;function l(){return r=Cde(s),i=Sde(s),a()[0]<0?(r=o6(r),i=o6(i),e(jde,wde)):e(c6,l6),t}return t.base=function(d){return arguments.length?(s=+d,l()):s},t.domain=function(d){return arguments.length?(a(d),l()):a()},t.ticks=d=>{const u=a();let p=u[0],x=u[u.length-1];const m=x<p;m&&([p,x]=[x,p]);let h=r(p),y=r(x),w,b;const j=d==null?10:+d;let S=[];if(!(s%1)&&y-h<j){if(h=Math.floor(h),y=Math.ceil(y),p>0){for(;h<=y;++h)for(w=1;w<s;++w)if(b=h<0?w/i(-h):w*i(h),!(b<p)){if(b>x)break;S.push(b)}}else for(;h<=y;++h)for(w=s-1;w>=1;--w)if(b=h>0?w/i(-h):w*i(h),!(b<p)){if(b>x)break;S.push(b)}S.length*2<j&&(S=dC(p,x,j))}else S=dC(h,y,Math.min(y-h,j)).map(i);return m?S.reverse():S},t.tickFormat=(d,u)=>{if(d==null&&(d=10),u==null&&(u=s===10?"s":","),typeof u!="function"&&(!(s%1)&&(u=Pf(u)).precision==null&&(u.trim=!0),u=L3(u)),d===1/0)return u;const p=Math.max(1,s*d/t.ticks().length);return x=>{let m=x/i(Math.round(r(x)));return m*s<s-.5&&(m*=s),m<=p?u(x):""}},t.nice=()=>a(Cz(a(),{floor:d=>i(Math.floor(r(d))),ceil:d=>i(Math.ceil(r(d)))})),t}function Ez(){const e=$3(by()).domain([1,10]);return e.copy=()=>Im(e,Ez()).base(e.base()),er.apply(e,arguments),e}
790function d6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function u6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function z3(e){var t=1,a=e(d6(t),u6(t));return a.constant=function(s){return arguments.length?e(d6(t=+s),u6(t)):t},sl(a)}function Az(){var e=z3(by());return e.copy=function(){return Im(e,Az()).constant(e.constant())},er.apply(e,arguments)}function p6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ede(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ade(e){return e<0?-e*e:e*e}function U3(e){var t=e(Wn,Wn),a=1;function s(){return a===1?e(Wn,Wn):a===.5?e(Ede,Ade):e(p6(a),p6(1/a))}return t.exponent=function(r){return arguments.length?(a=+r,s()):a},sl(t)}function q3(){var e=U3(by());return e.copy=function(){return Im(e,q3()).exponent(e.exponent())},er.apply(e,arguments),e}function Dde(){return q3.apply(null,arguments).exponent(.5)}function f6(e){return Math.sign(e)*e*e}function Ode(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Dz(){var e=B3(),t=[0,1],a=!1,s;function r(i){var l=Ode(e(i));return isNaN(l)?s:a?Math.round(l):l}return r.invert=function(i){return e.invert(f6(i))},r.domain=function(i){return arguments.length?(e.domain(i),r):e.domain()},r.range=function(i){return arguments.length?(e.range((t=Array.from(i,Ph)).map(f6)),r):t.slice()},r.rangeRound=function(i){return r.range(i).round(!0)},r.round=function(i){return arguments.length?(a=!!i,r):a},r.clamp=function(i){return arguments.length?(e.clamp(i),r):e.clamp()},r.unknown=function(i){return arguments.length?(s=i,r):s},r.copy=function(){return Dz(e.domain(),t).round(a).clamp(e.clamp()).unknown(s)},er.apply(r,arguments),sl(r)}function Oz(){var e=[],t=[],a=[],s;function r(){var l=0,d=Math.max(1,t.length);for(a=new Array(d-1);++l<d;)a[l-1]=Moe(e,l/d);return i}function i(l){return l==null||isNaN(l=+l)?s:t[Rm(a,l)]}return i.invertExtent=function(l){var d=t.indexOf(l);return d<0?[NaN,NaN]:[d>0?a[d-1]:e[0],d<a.length?a[d]:e[e.length-1]]},i.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let d of l)d!=null&&!isNaN(d=+d)&&e.push(d);return e.sort($c),r()},i.range=function(l){return arguments.length?(t=Array.from(l),r()):t.slice()},i.unknown=function(l){return arguments.length?(s=l,i):s},i.quantiles=function(){return a.slice()},i.copy=function(){return Oz().domain(e).range(t).unknown(s)},er.apply(i,arguments)}function kz(){var e=0,t=1,a=1,s=[.5],r=[0,1],i;function l(u){return u!=null&&u<=u?r[Rm(s,u,0,a)]:i}function d(){var u=-1;for(s=new Array(a);++u<a;)s[u]=((u+1)*t-(u-a)*e)/(a+1);return l}return l.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,d()):[e,t]},l.range=function(u){return arguments.length?(a=(r=Array.from(u)).length-1,d()):r.slice()},l.invertExtent=function(u){var p=r.indexOf(u);return p<0?[NaN,NaN]:p<1?[e,s[0]]:p>=a?[s[a-1],t]:[s[p-1],s[p]]},l.unknown=function(u){return arguments.length&&(i=u),l},l.thresholds=function(){return s.slice()},l.copy=function(){return kz().domain([e,t]).range(r).unknown(i)},er.apply(sl(l),arguments)}function _z(){var e=[.5],t=[0,1],a,s=1;function r(i){return i!=null&&i<=i?t[Rm(e,i,0,s)]:a}return r.domain=function(i){return arguments.length?(e=Array.from(i),s=Math.min(e.length,t.length-1),r):e.slice()},r.range=function(i){return arguments.length?(t=Array.from(i),s=Math.min(e.length,t.length-1),r):t.slice()},r.invertExtent=function(i){var l=t.indexOf(i);return[e[l-1],e[l]]},r.unknown=function(i){return arguments.length?(a=i,r):a},r.copy=function(){return _z().domain(e).range(t).unknown(a)},er.apply(r,arguments)}const H2=new Date,V2=new Date;function vn(e,t,a,s){function r(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return r.floor=i=>(e(i=new Date(+i)),i),r.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),r.round=i=>{const l=r(i),d=r.ceil(i);return i-l<d-i?l:d},r.offset=(i,l)=>(t(i=new Date(+i),l==null?1:Math.floor(l)),i),r.range=(i,l,d)=>{const u=[];if(i=r.ceil(i),d=d==null?1:Math.floor(d),!(i<l)||!(d>0))return u;let p;do u.push(p=new Date(+i)),t(i,d),e(i);while(p<i&&i<l);return u},r.filter=i=>vn(l=>{if(l>=l)for(;e(l),!i(l);)l.setTime(l-1)},(l,d)=>{if(l>=l)if(d<0)for(;++d<=0;)for(;t(l,-1),!i(l););else for(;--d>=0;)for(;t(l,1),!i(l););}),a&&(r.count=(i,l)=>(H2.setTime(+i),V2.setTime(+l),e(H2),e(V2),Math.floor(a(H2,V2))),r.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?r.filter(s?l=>s(l)%i===0:l=>r.count(0,l)%i===0):r)),r}const Bh=vn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Bh.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?vn(t=>{t.setTime(Math.floor(t/e)*e)},(t,a)=>{t.setTime(+t+a*e)},(t,a)=>(a-t)/e):Bh);Bh.range;const Ni=1e3,Ys=Ni*60,Si=Ys*60,Fi=Si*24,F3=Fi*7,m6=Fi*30,G2=Fi*365,$l=vn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ni)},(e,t)=>(t-e)/Ni,e=>e.getUTCSeconds());$l.range;const W3=vn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ni)},(e,t)=>{e.setTime(+e+t*Ys)},(e,t)=>(t-e)/Ys,e=>e.getMinutes());W3.range;const H3=vn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ys)},(e,t)=>(t-e)/Ys,e=>e.getUTCMinutes());H3.range;const V3=vn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ni-e.getMinutes()*Ys)},(e,t)=>{e.setTime(+e+t*Si)},(e,t)=>(t-e)/Si,e=>e.getHours());V3.range;const G3=vn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Si)},(e,t)=>(t-e)/Si,e=>e.getUTCHours());G3.range;const Lm=vn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ys)/Fi,e=>e.getDate()-1);Lm.range;const jy=vn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fi,e=>e.getUTCDate()-1);jy.range;const Tz=vn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Fi,e=>Math.floor(e/Fi));Tz.range;function xo(e){return vn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,a)=>{t.setDate(t.getDate()+a*7)},(t,a)=>(a-t-(a.getTimezoneOffset()-t.getTimezoneOffset())*Ys)/F3)}const wy=xo(0),Ih=xo(1),kde=xo(2),_de=xo(3),Ud=xo(4),Tde=xo(5),Pde=xo(6);wy.range;Ih.range;kde.range;_de.range;Ud.range;Tde.range;Pde.range;function go(e){return vn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,a)=>{t.setUTCDate(t.getUTCDate()+a*7)},(t,a)=>(a-t)/F3)}const Ny=go(0),Lh=go(1),Mde=go(2),Rde=go(3),qd=go(4),Bde=go(5),Ide=go(6);Ny.range;Lh.range;Mde.range;Rde.range;qd.range;Bde.range;Ide.range;const Y3=vn(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());Y3.range;const K3=vn(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());K3.range;const Wi=vn(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());Wi.every=e=>
vendor: 5,075 bytes, line 790
790!isFinite(e=Math.floor(e))||!(e>0)?null:vn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,a)=>{t.setFullYear(t.getFullYear()+a*e)});Wi.range;const Hi=vn(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());Hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:vn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,a)=>{t.setUTCFullYear(t.getUTCFullYear()+a*e)});Hi.range;function Pz(e,t,a,s,r,i){const l=[[$l,1,Ni],[$l,5,5*Ni],[$l,15,15*Ni],[$l,30,30*Ni],[i,1,Ys],[i,5,5*Ys],[i,15,15*Ys],[i,30,30*Ys],[r,1,Si],[r,3,3*Si],[r,6,6*Si],[r,12,12*Si],[s,1,Fi],[s,2,2*Fi],[a,1,F3],[t,1,m6],[t,3,3*m6],[e,1,G2]];function d(p,x,m){const h=x<p;h&&([p,x]=[x,p]);const y=m&&typeof m.range=="function"?m:u(p,x,m),w=y?y.range(p,+x+1):[];return h?w.reverse():w}function u(p,x,m){const h=Math.abs(x-p)/m,y=_3(([,,j])=>j).right(l,h);if(y===l.length)return e.every(pC(p/G2,x/G2,m));if(y===0)return Bh.every(Math.max(pC(p,x,m),1));const[w,b]=l[h/l[y-1][2]<l[y][2]/h?y-1:y];return w.every(b)}return[d,u]}const[Lde,$de]=Pz(Hi,K3,Ny,Tz,G3,H3),[zde,Ude]=Pz(Wi,Y3,wy,Lm,V3,W3);function Y2(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 K2(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,a){return{y:e,m:t,d:a,H:0,M:0,S:0,L:0}}function qde(e){var t=e.dateTime,a=e.date,s=e.time,r=e.periods,i=e.days,l=e.shortDays,d=e.months,u=e.shortMonths,p=wp(r),x=Np(r),m=wp(i),h=Np(i),y=wp(l),w=Np(l),b=wp(d),j=Np(d),S=wp(u),O=Np(u),A={a:M,A:U,b:Z,B:ie,c:null,d:b6,e:b6,f:uue,g:jue,G:Nue,H:lue,I:oue,j:due,L:Mz,m:pue,M:fue,p:G,q:F,Q:N6,s:S6,S:mue,u:xue,U:gue,V:hue,w:vue,W:yue,x:null,X:null,y:bue,Y:wue,Z:Sue,"%":w6},k={a:H,A:q,b:J,B:ce,c:null,d:j6,e:j6,f:Due,g:Lue,G:zue,H:Cue,I:Eue,j:Aue,L:Bz,m:Oue,M:kue,p:se,q:ye,Q:N6,s:S6,S:_ue,u:Tue,U:Pue,V:Mue,w:Rue,W:Bue,x:null,X:null,y:Iue,Y:$ue,Z:Uue,"%":w6},E={a:$,A:R,b:B,B:Y,c:z,d:v6,e:v6,f:sue,g:h6,G:g6,H:y6,I:y6,j:eue,L:nue,m:Jde,M:tue,p:I,q:Zde,Q:iue,s:cue,S:aue,u:Gde,U:Yde,V:Kde,w:Vde,W:Qde,x:Q,X:L,y:h6,Y:g6,Z:Xde,"%":rue};A.x=D(a,A),A.X=D(s,A),A.c=D(t,A),k.x=D(a,k),k.X=D(s,k),k.c=D(t,k);function D(de,ve){return function(Pe){var ue=[],Qe=-1,Ue=0,xe=de.length,$e,Te,dt;for(Pe instanceof Date||(Pe=new Date(+Pe));++Qe<xe;)de.charCodeAt(Qe)===37&&(ue.push(de.slice(Ue,Qe)),(Te=x6[$e=de.charAt(++Qe)])!=null?$e=de.charAt(++Qe):Te=$e==="e"?" ":"0",(dt=ve[$e])&&($e=dt(Pe,Te)),ue.push($e),Ue=Qe+1);return ue.push(de.slice(Ue,Qe)),ue.join("")}}function _(de,ve){return function(Pe){var ue=jp(1900,void 0,1),Qe=T(ue,de,Pe+="",0),Ue,xe;if(Qe!=Pe.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(ve&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Ue=K2(jp(ue.y,0,1)),xe=Ue.getUTCDay(),Ue=xe>4||xe===0?Lh.ceil(Ue):Lh(Ue),Ue=jy.offset(Ue,(ue.V-1)*7),ue.y=Ue.getUTCFullYear(),ue.m=Ue.getUTCMonth(),ue.d=Ue.getUTCDate()+(ue.w+6)%7):(Ue=Y2(jp(ue.y,0,1)),xe=Ue.getDay(),Ue=xe>4||xe===0?Ih.ceil(Ue):Ih(Ue),Ue=Lm.offset(Ue,(ue.V-1)*7),ue.y=Ue.getFullYear(),ue.m=Ue.getMonth(),ue.d=Ue.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),xe="Z"in ue?K2(jp(ue.y,0,1)).getUTCDay():Y2(jp(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(xe+5)%7:ue.w+ue.U*7-(xe+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,K2(ue)):Y2(ue)}}function T(de,ve,Pe,ue){for(var Qe=0,Ue=ve.length,xe=Pe.length,$e,Te;Qe<Ue;){if(ue>=xe)return-1;if($e=ve.charCodeAt(Qe++),$e===37){if($e=ve.charAt(Qe++),Te=E[$e in x6?ve.charAt(Qe++):$e],!Te||(ue=Te(de,Pe,ue))<0)return-1}else if($e!=Pe.charCodeAt(ue++))return-1}return ue}function I(de,ve,Pe){var ue=p.exec(ve.slice(Pe));return ue?(de.p=x.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function $(de,ve,Pe){var ue=y.exec(ve.slice(Pe));return ue?(de.w=w.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function R(de,ve,Pe){var ue=m.exec(ve.slice(Pe));return ue?(de.w=h.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function B(de,ve,Pe){var ue=S.exec(ve.slice(Pe));return ue?(de.m=O.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function Y(de,ve,Pe){var ue=b.exec(ve.slice(Pe));return ue?(de.m=j.get(ue[0].toLowerCase()),Pe+ue[0].length):-1}function z(de,ve,Pe){return T(de,t,ve,Pe)}function Q(de,ve,Pe){return T(de,a,ve,Pe)}function L(de,ve,Pe){return T(de,s,ve,Pe)}function M(de){return l[de.getDay()]}function U(de){return i[de.getDay()]}function Z(de){return u[de.getMonth()]}function ie(de){return d[de.getMonth()]}function G(de){return r[+(de.getHours()>=12)]}function F(de){return 1+~~(de.getMonth()/3)}function H(de){return l[de.getUTCDay()]}function q(de){return i[de.getUTCDay()]}
vendor: 5,226 bytes, line 790
790function J(de){return u[de.getUTCMonth()]}function ce(de){return d[de.getUTCMonth()]}function se(de){return r[+(de.getUTCHours()>=12)]}function ye(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var ve=D(de+="",A);return ve.toString=function(){return de},ve},parse:function(de){var ve=_(de+="",!1);return ve.toString=function(){return de},ve},utcFormat:function(de){var ve=D(de+="",k);return ve.toString=function(){return de},ve},utcParse:function(de){var ve=_(de+="",!0);return ve.toString=function(){return de},ve}}}var x6={"-":"",_:" ",0:"0"},Sn=/^\s*\d+/,Fde=/^%/,Wde=/[\\^$*+?|[\]().{}]/g;function aa(e,t,a){var s=e<0?"-":"",r=(s?-e:e)+"",i=r.length;return s+(i<a?new Array(a-i+1).join(t)+r:r)}function Hde(e){return e.replace(Wde,"\\$&")}function wp(e){return new RegExp("^(?:"+e.map(Hde).join("|")+")","i")}function Np(e){return new Map(e.map((t,a)=>[t.toLowerCase(),a]))}function Vde(e,t,a){var s=Sn.exec(t.slice(a,a+1));return s?(e.w=+s[0],a+s[0].length):-1}function Gde(e,t,a){var s=Sn.exec(t.slice(a,a+1));return s?(e.u=+s[0],a+s[0].length):-1}function Yde(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.U=+s[0],a+s[0].length):-1}function Kde(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.V=+s[0],a+s[0].length):-1}function Qde(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.W=+s[0],a+s[0].length):-1}function g6(e,t,a){var s=Sn.exec(t.slice(a,a+4));return s?(e.y=+s[0],a+s[0].length):-1}function h6(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),a+s[0].length):-1}function Xde(e,t,a){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(a,a+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),a+s[0].length):-1}function Zde(e,t,a){var s=Sn.exec(t.slice(a,a+1));return s?(e.q=s[0]*3-3,a+s[0].length):-1}function Jde(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.m=s[0]-1,a+s[0].length):-1}function v6(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.d=+s[0],a+s[0].length):-1}function eue(e,t,a){var s=Sn.exec(t.slice(a,a+3));return s?(e.m=0,e.d=+s[0],a+s[0].length):-1}function y6(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.H=+s[0],a+s[0].length):-1}function tue(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.M=+s[0],a+s[0].length):-1}function aue(e,t,a){var s=Sn.exec(t.slice(a,a+2));return s?(e.S=+s[0],a+s[0].length):-1}function nue(e,t,a){var s=Sn.exec(t.slice(a,a+3));return s?(e.L=+s[0],a+s[0].length):-1}function sue(e,t,a){var s=Sn.exec(t.slice(a,a+6));return s?(e.L=Math.floor(s[0]/1e3),a+s[0].length):-1}function rue(e,t,a){var s=Fde.exec(t.slice(a,a+1));return s?a+s[0].length:-1}function iue(e,t,a){var s=Sn.exec(t.slice(a));return s?(e.Q=+s[0],a+s[0].length):-1}function cue(e,t,a){var s=Sn.exec(t.slice(a));return s?(e.s=+s[0],a+s[0].length):-1}function b6(e,t){return aa(e.getDate(),t,2)}function lue(e,t){return aa(e.getHours(),t,2)}function oue(e,t){return aa(e.getHours()%12||12,t,2)}function due(e,t){return aa(1+Lm.count(Wi(e),e),t,3)}function Mz(e,t){return aa(e.getMilliseconds(),t,3)}function uue(e,t){return Mz(e,t)+"000"}function pue(e,t){return aa(e.getMonth()+1,t,2)}function fue(e,t){return aa(e.getMinutes(),t,2)}function mue(e,t){return aa(e.getSeconds(),t,2)}function xue(e){var t=e.getDay();return t===0?7:t}function gue(e,t){return aa(wy.count(Wi(e)-1,e),t,2)}function Rz(e){var t=e.getDay();return t>=4||t===0?Ud(e):Ud.ceil(e)}function hue(e,t){return e=Rz(e),aa(Ud.count(Wi(e),e)+(Wi(e).getDay()===4),t,2)}function vue(e){return e.getDay()}function yue(e,t){return aa(Ih.count(Wi(e)-1,e),t,2)}function bue(e,t){return aa(e.getFullYear()%100,t,2)}function jue(e,t){return e=Rz(e),aa(e.getFullYear()%100,t,2)}function wue(e,t){return aa(e.getFullYear()%1e4,t,4)}function Nue(e,t){var a=e.getDay();return e=a>=4||a===0?Ud(e):Ud.ceil(e),aa(e.getFullYear()%1e4,t,4)}function Sue(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+aa(t/60|0,"0",2)+aa(t%60,"0",2)}function j6(e,t){return aa(e.getUTCDate(),t,2)}function Cue(e,t){return aa(e.getUTCHours(),t,2)}function Eue(e,t){return aa(e.getUTCHours()%12||12,t,2)}function Aue(e,t){return aa(1+jy.count(Hi(e),e),t,3)}function Bz(e,t){return aa(e.getUTCMilliseconds(),t,3)}function Due(e,t){return Bz(e,t)+"000"}function Oue(e,t){return aa(e.getUTCMonth()+1,t,2)}function kue(e,t){return aa(e.getUTCMinutes(),t,2)}function _ue(e,t){return aa(e.getUTCSeconds(),t,2)}function Tue(e){var t=e.getUTCDay();return t===0?7:t}function Pue(e,t){return aa(Ny.count(Hi(e)-1,e),t,2)}function Iz(e){var t=e.getUTCDay();return t>=4||t===0?qd(e):qd.ceil(e)}function Mue(e,t){return e=Iz(e),aa(qd.count(Hi(e),e)+(Hi(e).getUTCDay()===4),t,2)}function Rue(e){return e.getUTCDay()}function Bue(e,t){return aa(Lh.count(Hi(e)-1,e),t,2)}function Iue(e,t){return aa(e.getUTCFullYear()%100,t,2)}function Lue(e,t){return e=Iz(e),aa(e.getUTCFullYear()%100,t,2)}function $ue(e,t){return aa(e.getUTCFullYear()%1e4,t,4)}function zue(e,t){var a=e.getUTCDay();return e=a>=4||a===0?qd(e):qd.ceil(e),aa(e.getUTCFullYear()%1e4,t,4)}function Uue(){return"+0000"}function w6(){return"%"}function N6(e){return+e}function S6(e){return Math.floor(+e/1e3)}var rd,Lz,$z;que({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
790ay","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 que(e){return rd=qde(e),Lz=rd.format,rd.parse,$z=rd.utcFormat,rd.utcParse,rd}function Fue(e){return new Date(e)}function Wue(e){return e instanceof Date?+e:+new Date(+e)}function Q3(e,t,a,s,r,i,l,d,u,p){var x=B3(),m=x.invert,h=x.domain,y=p(".%L"),w=p(":%S"),b=p("%I:%M"),j=p("%I %p"),S=p("%a %d"),O=p("%b %d"),A=p("%B"),k=p("%Y");function E(D){return(u(D)<D?y:d(D)<D?w:l(D)<D?b:i(D)<D?j:s(D)<D?r(D)<D?S:O:a(D)<D?A:k)(D)}return x.invert=function(D){return new Date(m(D))},x.domain=function(D){return arguments.length?h(Array.from(D,Wue)):h().map(Fue)},x.ticks=function(D){var _=h();return e(_[0],_[_.length-1],D??10)},x.tickFormat=function(D,_){return _==null?E:p(_)},x.nice=function(D){var _=h();return(!D||typeof D.range!="function")&&(D=t(_[0],_[_.length-1],D??10)),D?h(Cz(_,D)):x},x.copy=function(){return Im(x,Q3(e,t,a,s,r,i,l,d,u,p))},x}function Hue(){return er.apply(Q3(zde,Ude,Wi,Y3,wy,Lm,V3,W3,$l,Lz).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vue(){return er.apply(Q3(Lde,$de,Hi,K3,Ny,jy,G3,H3,$l,$z).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Sy(){var e=0,t=1,a,s,r,i,l=Wn,d=!1,u;function p(m){return m==null||isNaN(m=+m)?u:l(r===0?.5:(m=(i(m)-a)*r,d?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t]=m,a=i(e=+e),s=i(t=+t),r=a===s?0:1/(s-a),p):[e,t]},p.clamp=function(m){return arguments.length?(d=!!m,p):d},p.interpolator=function(m){return arguments.length?(l=m,p):l};function x(m){return function(h){var y,w;return arguments.length?([y,w]=h,l=m(y,w),p):[l(0),l(1)]}}return p.range=x(hu),p.rangeRound=x(R3),p.unknown=function(m){return arguments.length?(u=m,p):u},function(m){return i=m,a=m(e),s=m(t),r=a===s?0:1/(s-a),p}}function rl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function zz(){var e=sl(Sy()(Wn));return e.copy=function(){return rl(e,zz())},Xi.apply(e,arguments)}function Uz(){var e=$3(Sy()).domain([1,10]);return e.copy=function(){return rl(e,Uz()).base(e.base())},Xi.apply(e,arguments)}function qz(){var e=z3(Sy());return e.copy=function(){return rl(e,qz()).constant(e.constant())},Xi.apply(e,arguments)}function X3(){var e=U3(Sy());return e.copy=function(){return rl(e,X3()).exponent(e.exponent())},Xi.apply(e,arguments)}function Gue(){return X3.apply(null,arguments).exponent(.5)}function Fz(){var e=[],t=Wn;function a(s){if(s!=null&&!isNaN(s=+s))return t((Rm(e,s,1)-1)/(e.length-1))}return a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let r of s)r!=null&&!isNaN(r=+r)&&e.push(r);return e.sort($c),a},a.interpolator=function(s){return arguments.length?(t=s,a):t},a.range=function(){return e.map((s,r)=>t(r/(e.length-1)))},a.quantiles=function(s){return Array.from({length:s+1},(r,i)=>Poe(e,i/s))},a.copy=function(){return Fz(t).domain(e)},Xi.apply(a,arguments)}function Cy(){var e=0,t=.5,a=1,s=1,r,i,l,d,u,p=Wn,x,m=!1,h;function y(b){return isNaN(b=+b)?h:(b=.5+((b=+x(b))-i)*(s*b<s*i?d:u),p(m?Math.max(0,Math.min(1,b)):b))}y.domain=function(b){return arguments.length?([e,t,a]=b,r=x(e=+e),i=x(t=+t),l=x(a=+a),d=r===i?0:.5/(i-r),u=i===l?0:.5/(l-i),s=i<r?-1:1,y):[e,t,a]},y.clamp=function(b){return arguments.length?(m=!!b,y):m},y.interpolator=function(b){return arguments.length?(p=b,y):p};function w(b){return function(j){var S,O,A;return arguments.length?([S,O,A]=j,p=rde(b,[S,O,A]),y):[p(0),p(.5),p(1)]}}return y.range=w(hu),y.rangeRound=w(R3),y.unknown=function(b){return arguments.length?(h=b,y):h},function(b){return x=b,r=b(e),i=b(t),l=b(a),d=r===i?0:.5/(i-r),u=i===l?0:.5/(l-i),s=i<r?-1:1,y}}function Wz(){var e=sl(Cy()(Wn));return e.copy=function(){return rl(e,Wz())},Xi.apply(e,arguments)}function Hz(){var e=$3(Cy()).domain([.1,1,10]);return e.copy=function(){return rl(e,Hz()).base(e.base())},Xi.apply(e,arguments)}function Vz(){var e=z3(Cy());return e.copy=function(){return rl(e,Vz()).constant(e.constant())},Xi.apply(e,arguments)}function Z3(){var e=U3(Cy());return e.copy=function(){return rl(e,Z3()).exponent(e.exponent())},Xi.apply(e,arguments)}function Yue(){return Z3.apply(null,arguments).exponent(.5)}const C6=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Of,scaleDiverging:Wz,scaleDivergingLog:Hz,scaleDivergingPow:Z3,scaleDivergingSqrt:Yue,scaleDivergingSymlog:Vz,scaleIdentity:Sz,scaleImplicit:fC,scaleLinear:Rh,scaleLog:Ez,scaleOrdinal:T3,scalePoint:Qp,scalePow:q3,scaleQuantile:Oz,scaleQuantize:kz,scaleRadial:Dz,scaleSequential:zz,scaleSequentialLog:Uz,scaleSequentialPow:X3,scaleSequentialQuantile:Fz,scaleSequentialSqrt:Gue,scaleSequentialSymlog:qz,scaleSqrt:Dde,scaleSymlog:Az,scaleThreshold:_z,scaleTime:Hue,scaleUtc:Vue,tickFormat:Nz},Symbol.toStringTag,{value:"Module"}));var Q2,E6;function Gz(){if(E6)return Q2;E6=1;var e=pu();function t(a,s,r){for(var i=-1,l=a.length;++i<l;){var d=a[i],u=s(d);if(u!=null&&(p===void 0?u===u&&!e(u):r(u,p)))var p=u,x=d}return x}return Q2=t,Q2}var X2,A6;function Kue(){if(A6)return X2;A6=1;function e(t,a){return t>a}return X2=e,X2}var Z2,D6;function Que(){if(D6)return Z2;D6=1;var e=Gz(),t=Kue(),a=xu();function s(r){return r&&r.length?e(r,a,t):void 0}return Z2=s,Z2}var Xue=Que();const Tc=Na(Xue);var J2,O6;
vendor: 67,548 bytes, lines 790-816
790function Zue(){if(O6)return J2;O6=1;function e(t,a){return t<a}return J2=e,J2}var eN,k6;function Jue(){if(k6)return eN;k6=1;var e=Gz(),t=Zue(),a=xu();function s(r){return r&&r.length?e(r,a,t):void 0}return eN=s,eN}var epe=Jue();const Ey=Na(epe);var tN,_6;function tpe(){if(_6)return tN;_6=1;var e=m3(),t=nl(),a=tz(),s=cs();function r(i,l){var d=s(i)?e:a;return d(i,t(l,3))}return tN=r,tN}var aN,T6;function ape(){if(T6)return aN;T6=1;var e=J$(),t=tpe();function a(s,r){return e(t(s,r),1)}return aN=a,aN}var npe=ape();const spe=Na(npe);var nN,P6;function rpe(){if(P6)return nN;P6=1;var e=A3();function t(a,s){return e(a,s)}return nN=t,nN}var ipe=rpe();const Mf=Na(ipe);var vu=1e9,cpe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},e4,Ba=!0,Js="[DecimalError] ",Hl=Js+"Invalid argument: ",J3=Js+"Exponent out of range: ",yu=Math.floor,Tl=Math.pow,lpe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ss,bn=1e7,Ta=7,Yz=9007199254740991,$h=yu(Yz/Ta),st={};st.absoluteValue=st.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};st.comparedTo=st.cmp=function(e){var t,a,s,r,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(s=i.d.length,r=e.d.length,t=0,a=s<r?s:r;t<a;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return s===r?0:s>r^i.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,a=(t-e.e)*Ta;if(t=e.d[t],t)for(;t%10==0;t/=10)a--;return a<0?0:a};st.dividedBy=st.div=function(e){return _i(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,a=t.constructor;return Aa(_i(t,new a(e),0,1),a.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return ln(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,a=this,s=a.constructor,r=s.precision,i=r+5;if(e===void 0)e=new s(10);else if(e=new s(e),e.s<1||e.eq(Ss))throw Error(Js+"NaN");if(a.s<1)throw Error(Js+(a.s?"NaN":"-Infinity"));return a.eq(Ss)?new s(0):(Ba=!1,t=_i(Rf(a,i),Rf(e,i),i),Ba=!0,Aa(t,r))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Xz(t,e):Kz(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,a=this,s=a.constructor,r=s.precision;if(e=new s(e),!e.s)throw Error(Js+"NaN");return a.s?(Ba=!1,t=_i(a,e,0,1).times(e),Ba=!0,a.minus(t)):Aa(new s(a),r)};st.naturalExponential=st.exp=function(){return Qz(this)};st.naturalLogarithm=st.ln=function(){return Rf(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Kz(t,e):Xz(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,a,s,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Hl+e);if(t=ln(r)+1,s=r.d.length-1,a=s*Ta+1,s=r.d[s],s){for(;s%10==0;s/=10)a--;for(s=r.d[0];s>=10;s/=10)a++}return e&&t>a?t:a};st.squareRoot=st.sqrt=function(){var e,t,a,s,r,i,l,d=this,u=d.constructor;if(d.s<1){if(!d.s)return new u(0);throw Error(Js+"NaN")}for(e=ln(d),Ba=!1,r=Math.sqrt(+d),r==0||r==1/0?(t=Lr(d.d),(t.length+e)%2==0&&(t+="0"),r=Math.sqrt(t),e=yu((e+1)/2)-(e<0||e%2),r==1/0?t="5e"+e:(t=r.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),s=new u(t)):s=new u(r.toString()),a=u.precision,r=l=a+3;;)if(i=s,s=i.plus(_i(d,i,l+2)).times(.5),Lr(i.d).slice(0,l)===(t=Lr(s.d)).slice(0,l)){if(t=t.slice(l-3,l+1),r==l&&t=="4999"){if(Aa(i,a+1,0),i.times(i).eq(d)){s=i;break}}else if(t!="9999")break;l+=4}return Ba=!0,Aa(s,a)};st.times=st.mul=function(e){var t,a,s,r,i,l,d,u,p,x=this,m=x.constructor,h=x.d,y=(e=new m(e)).d;if(!x.s||!e.s)return new m(0);for(e.s*=x.s,a=x.e+e.e,u=h.length,p=y.length,u<p&&(i=h,h=y,y=i,l=u,u=p,p=l),i=[],l=u+p,s=l;s--;)i.push(0);for(s=p;--s>=0;){for(t=0,r=u+s;r>s;)d=i[r]+y[s]*h[r-s-1]+t,i[r--]=d%bn|0,t=d/bn|0;i[r]=(i[r]+t)%bn|0}for(;!i[--l];)i.pop();return t?++a:i.shift(),e.d=i,e.e=a,Ba?Aa(e,m.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var a=this,s=a.constructor;return a=new s(a),e===void 0?a:(Yr(e,0,vu),t===void 0?t=s.rounding:Yr(t,0,8),Aa(a,e+ln(a)+1,t))};st.toExponential=function(e,t){var a,s=this,r=s.constructor;return e===void 0?a=ao(s,!0):(Yr(e,0,vu),t===void 0?t=r.rounding:Yr(t,0,8),s=Aa(new r(s),e+1,t),a=ao(s,!0,e+1)),a};st.toFixed=function(e,t){var a,s,r=this,i=r.constructor;return e===void 0?ao(r):(Yr(e,0,vu),t===void 0?t=i.rounding:Yr(t,0,8),s=Aa(new i(r),e+ln(r)+1,t),a=ao(s.abs(),!1,e+ln(s)+1),r.isneg()&&!r.isZero()?"-"+a:a)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return Aa(new t(e),ln(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,a,s,r,i,l,d=this,u=d.constructor,p=12,x=+(e=new u(e));if(!e.s)return new u(Ss);if(d=new u(d),!d.s){if(e.s<1)throw Error(Js+"Infinity");return d}if(d.eq(Ss))return d;if(s=u.precision,e.eq(Ss))return Aa(d,s);if(t=e.e,a=e.d.length-1,l=t>=a,i=d.s,l){if((a=x<0?-x:x)<=Yz){for(r=new u(Ss),t=Math.ceil(s/Ta+4),Ba=!1;a%2&&(r=r.times(d),R6(r.d,t)),a=yu(a/2),a!==0;)d=d.times(d),R6(d.d,t);return Ba=!0,e.s<0?new u(Ss).div(r):Aa(r,s)}}else if(i<0)throw Error(Js+"NaN");return i=i<0&&e.d[Math.max(t,a)]&1?-1:1,d.s=1,Ba=!1,r=e.times(Rf(d,s+p)),Ba=!0,r=Qz(r),r.s=i,r};st.toPrecision=function(e,t){var a,s,r=this,i=r.constructor;return e===void 0?(a=ln(r),s=ao(r,a<=i.toExpNeg||a>=i.toExpPos)):(Yr(e,1,vu),t===void 0?t=i.rounding:Yr(t,0,8),r=Aa(new i(r),e,t),a=ln(r),s=ao(r,e<=a||a<=i.toExpNeg,e)),s};st.toSignificantDigits=st.tosd=function(e,t){var a=this,s=a.constructor;return e===void 0?(e=s.precision,t=s.rounding):(Yr(e,1,vu),t===void 0?t=s.rounding:Yr(t,0,8)),Aa(new s(a),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ln(e),a=e.constructor;return ao(e,t<=a.toExpNeg||t>=a.toExpPos)};function Kz(e,t){var a,s,r,i,l,d,u,p,x=e.constructor,m=x.precision;if(!e.s||!t.s)return t.s||(t=new x(e)),Ba?Aa(t,m):t;if(u=e.d,p=t.d,l=e.e,r=t.e,u=u.slice(),i=l-r,i){for(i<0?(s=u,i=-i,d=p.length):(s=p,r=l,d=u.length),l=Math.ceil(m/Ta),d=l>d?l+1:d+1,i>d&&(i=d,s.length=1),s.reverse();i--;)s.push(0);s.reverse()}for(d=u.length,i=p.length,d-i<0&&(i=d,s=p,p=u,u=s),a=0;i;)a=(u[--i]=u[i]+p[i]+a)/bn|0,u[i]%=bn;for(a&&(u.unshift(a),++r),d=u.length;u[--d]==0;)u.pop();return t.d=u,t.e=r,Ba?Aa(t,m):t}function Yr(e,t,a){if(e!==~~e||e<t||e>a)throw Error(Hl+e)}function Lr(e){var t,a,s,r=e.length-1,i="",l=e[0];if(r>0){for(i+=l,t=1;t<r;t++)s=e[t]+"",a=Ta-s.length,a&&(i+=Dc(a)),i+=s;l=e[t],s=l+"",a=Ta-s.length,a&&(i+=Dc(a))}else if(l===0)return"0";for(;l%10===0;)l/=10;return i+l}var _i=(function(){function e(s,r){var i,l=0,d=s.length;for(s=s.slice();d--;)i=s[d]*r+l,s[d]=i%bn|0,l=i/bn|0;return l&&s.unshift(l),s}function t(s,r,i,l){var d,u;if(i!=l)u=i>l?1:-1;else for(d=u=0;d<i;d++)if(s[d]!=r[d]){u=s[d]>r[d]?1:-1;break}return u}function a(s,r,i){for(var l=0;i--;)s[i]-=l,l=s[i]<r[i]?1:0,s[i]=l*bn+s[i]-r[i];for(;!s[0]&&s.length>1;)s.shift()}return function(s,r,i,l){var d,u,p,x,m,h,y,w,b,j,S,O,A,k,E,D,_,T,I=s.constructor,$=s.s==r.s?1:-1,R=s.d,B=r.d;if(!s.s)return new I(s);if(!r.s)throw Error(Js+"Division by zero");for(u=s.e-r.e,_=B.length,E=R.length,y=new I($),w=y.d=[],p=0;B[p]==(R[p]||0);)++p;if(B[p]>(R[p]||0)&&--u,i==null?O=i=I.precision:l?O=i+(ln(s)-ln(r))+1:O=i,O<0)return new I(0);if(O=O/Ta+2|0,p=0,_==1)for(x=0,B=B[0],O++;(p<E||x)&&O--;p++)A=x*bn+(R[p]||0),w[p]=A/B|0,x=A%B|0;else{for(x=bn/(B[0]+1)|0,x>1&&(B=e(B,x),R=e(R,x),_=B.length,E=R.length),k=_,b=R.slice(0,_),j=b.length;j<_;)b[j++]=0;T=B.slice(),T.unshift(0),D=B[0],B[1]>=bn/2&&++D;do x=0,d=t(B,b,_,j),d<0?(S=b[0],_!=j&&(S=S*bn+(b[1]||0)),x=S/D|0,x>1?(x>=bn&&(x=bn-1),m=e(B,x),h=m.length,j=b.length,d=t(m,b,h,j),d==1&&(x--,a(m,_<h?T:B,h))):(x==0&&(d=x=1),m=B.slice()),h=m.length,h<j&&m.unshift(0),a(b,m,j),d==-1&&(j=b.length,d=t(B,b,_,j),d<1&&(x++,a(b,_<j?T:B,j))),j=b.length):d===0&&(x++,b=[0]),w[p++]=x,d&&b[0]?b[j++]=R[k]||0:(b=[R[k]],j=1);while((k++<E||b[0]!==void 0)&&O--)}return w[0]||w.shift(),y.e=u,Aa(y,l?i+ln(y)+1:i)}})();function Qz(e,t){var a,s,r,i,l,d,u=0,p=0,x=e.constructor,m=x.precision;if(ln(e)>16)throw Error(J3+ln(e));if(!e.s)return new x(Ss);for(Ba=!1,d=m,l=new x(.03125);e.abs().gte(.1);)e=e.times(l),p+=5;for(s=Math.log(Tl(2,p))/Math.LN10*2+5|0,d+=s,a=r=i=new x(Ss),x.precision=d;;){if(r=Aa(r.times(e),d),a=a.times(++u),l=i.plus(_i(r,a,d)),Lr(l.d).slice(0,d)===Lr(i.d).slice(0,d)){for(;p--;)i=Aa(i.times(i),d);return x.precision=m,t==null?(Ba=!0,Aa(i,m)):i}i=l}}function ln(e){for(var t=e.e*Ta,a=e.d[0];a>=10;a/=10)t++;return t}function sN(e,t,a){if(t>e.LN10.sd())throw Ba=!0,a&&(e.precision=a),Error(Js+"LN10 precision limit exceeded");return Aa(new e(e.LN10),t)}function Dc(e){for(var t="";e--;)t+="0";return t}function Rf(e,t){var a,s,r,i,l,d,u,p,x,m=1,h=10,y=e,w=y.d,b=y.constructor,j=b.precision;if(y.s<1)throw Error(Js+(y.s?"NaN":"-Infinity"));if(y.eq(Ss))return new b(0);if(t==null?(Ba=!1,p=j):p=t,y.eq(10))return t==null&&(Ba=!0),sN(b,p);if(p+=h,b.precision=p,a=Lr(w),s=a.charAt(0),i=ln(y),Math.abs(i)<15e14){for(;s<7&&s!=1||s==1&&a.charAt(1)>3;)y=y.times(e),a=Lr(y.d),s=a.charAt(0),m++;i=ln(y),s>1?(y=new b("0."+a),i++):y=new b(s+"."+a.slice(1))}else return u=sN(b,p+2,j).times(i+""),y=Rf(new b(s+"."+a.slice(1)),p-h).plus(u),b.precision=j,t==null?(Ba=!0,Aa(y,j)):y;for(d=l=y=_i(y.minus(Ss),y.plus(Ss),p),x=Aa(y.times(y),p),r=3;;){if(l=Aa(l.times(x),p),u=d.plus(_i(l,new b(r),p)),Lr(u.d).slice(0,p)===Lr(d.d).slice(0,p))return d=d.times(2),i!==0&&(d=d.plus(sN(b,p+2,j).times(i+""))),d=_i(d,new b(m),p),b.precision=j,t==null?(Ba=!0,Aa(d,j)):d;d=u,r+=2}}function M6(e,t){var a,s,r;for((a=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(a<0&&(a=s),a+=+t.slice(s+1),t=t.substring(0,s)):a<0&&(a=t.length),s=0;t.charCodeAt(s)===48;)++s;for(r=t.length;t.charCodeAt(r-1)===48;)--r;if(t=t.slice(s,r),t){if(r-=s,a=a-s-1,e.e=yu(a/Ta),e.d=[],s=(a+1)%Ta,a<0&&(s+=Ta),s<r){for(s&&e.d.push(+t.slice(0,s)),r-=Ta;s<r;)e.d.push(+t.slice(s,s+=Ta));t=t.slice(s),s=Ta-t.length}else s-=r;for(;s--;)t+="0";if(e.d.push(+t),Ba&&(e.e>$h||e.e<-$h))throw Error(J3+a)}else e.s=0,e.e=0,e.d=[0];return e}function Aa(e,t,a){var s,r,i,l,d,u,p,x,m=e.d;for(l=1,i=m[0];i>=10;i/=10)l++;if(s=t-l,s<0)s+=Ta,r=t,p=m[x=0];else{if(x=Math.ceil((s+1)/Ta),i=m.length,x>=i)return e;for(p=i=m[x],l=1;i>=10;i/=10)l++;s%=Ta,r=s-Ta+l}if(a!==void 0&&(i=Tl(10,l-r-1),d=p/i%10|0,u=t<0||m[x+1]!==void 0||p%i,u=a<4?(d||u)&&(a==0||a==(e.s<0?3:2)):d>5||d==5&&(a==4||u||a==6&&(s>0?r>0?p/Tl(10,l-r):0:m[x-1])%10&1||a==(e.s<0?8:7))),t<1||!m[0])return u?(i=ln(e),m.length=1,t=t-i-1,m[0]=Tl(10,(Ta-t%Ta)%Ta),e.e=yu(-t/Ta)||0):(m.length=1,m[0]=e.e=e.s=0),e;if(s==0?(m.length=x,i=1,x--):(m.length=x+1,i=Tl(10,Ta-s),m[x]=r>0?(p/Tl(10,l-r)%Tl(10,r)|0)*i:0),u)for(;;)if(x==0){(m[0]+=i)==bn&&(m[0]=1,++e.e);break}else{if(m[x]+=i,m[x]!=bn)break;m[x--]=0,i=1}for(s=m.length;m[--s]===0;)m.pop();if(Ba&&(e.e>$h||e.e<-$h))throw Error(J3+ln(e));return e}function Xz(e,t){var a,s,r,i,l,d,u,p,x,m,h=e.constructor,y=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Ba?Aa(t,y):t;if(u=e.d,m=t.d,s=t.e,p=e.e,u=u.slice(),l=p-s,l){for(x=l<0,x?(a=u,l=-l,d=m.length):(a=m,s=p,d=u.length),r=Math.max(Math.ceil(y/Ta),d)+2,l>r&&(l=r,a.length=1),a.reverse(),r=l;r--;)a.push(0);a.reverse()}else{for(r=u.length,d=m.length,x=r<d,x&&(d=r),r=0;r<d;r++)if(u[r]!=m[r]){x=u[r]<m[r];break}l=0}for(x&&(a=u,u=m,m=a,t.s=-t.s),d=u.length,r=m.length-d;r>0;--r)u[d++]=0;for(r=m.length;r>l;){if(u[--r]<m[r]){for(i=r;i&&u[--i]===0;)u[i]=bn-1;--u[i],u[r]+=bn}u[r]-=m[r]}for(;u[--d]===0;)u.pop();for(;u[0]===0;u.shift())--s;return u[0]?(t.d=u,t.e=s,Ba?Aa(t,y):t):new h(0)}function ao(e,t,a){var s,r=ln(e),i=Lr(e.d),l=i.length;return t?(a&&(s=a-l)>0?i=i.charAt(0)+"."+i.slice(1)+Dc(s):l>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(r<0?"e":"e+")+r):r<0?(i="0."+Dc(-r-1)+i,a&&(s=a-l)>0&&(i+=Dc(s))):r>=l?(i+=Dc(r+1-l),a&&(s=a-r-1)>0&&(i=i+"."+Dc(s))):((s=r+1)<l&&(i=i.slice(0,s)+"."+i.slice(s)),a&&(s=a-l)>0&&(r+1===l&&(i+="."),i+=Dc(s))),e.s<0?"-"+i:i}function R6(e,t){if(e.length>t)return e.length=t,!0}function Zz(e){var t,a,s;function r(i){var l=this;if(!(l instanceof r))return new r(i);if(l.constructor=r,i instanceof r){l.s=i.s,l.e=i.e,l.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(Hl+i);if(i>0)l.s=1;else if(i<0)i=-i,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(i===~~i&&i<1e7){l.e=0,l.d=[i];return}return M6(l,i.toString())}else if(typeof i!="string")throw Error(Hl+i);if(i.charCodeAt(0)===45?(i=i.slice(1),l.s=-1):l.s=1,lpe.test(i))M6(l,i);else throw Error(Hl+i)}if(r.prototype=st,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.clone=Zz,r.config=r.set=ope,e===void 0&&(e={}),e)for(s=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<s.length;)e.hasOwnProperty(a=s[t++])||(e[a]=this[a]);return r.config(e),r}function ope(e){if(!e||typeof e!="object")throw Error(Js+"Object expected");var t,a,s,r=["precision",1,vu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<r.length;t+=3)if((s=e[a=r[t]])!==void 0)if(yu(s)===s&&s>=r[t+1]&&s<=r[t+2])this[a]=s;else throw Error(Hl+a+": "+s);if((s=e[a="LN10"])!==void 0)if(s==Math.LN10)this[a]=new this(s);else throw Error(Hl+a+": "+s);return this}var e4=Zz(cpe);Ss=new e4(1);const ba=e4;function dpe(e){return mpe(e)||fpe(e)||ppe(e)||upe()}function upe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
791In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ppe(e,t){if(e){if(typeof e=="string")return hC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return hC(e,t)}}function fpe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function mpe(e){if(Array.isArray(e))return hC(e)}function hC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var xpe=function(t){return t},Jz={},eU=function(t){return t===Jz},B6=function(t){return function a(){return arguments.length===0||arguments.length===1&&eU(arguments.length<=0?void 0:arguments[0])?a:t.apply(void 0,arguments)}},gpe=function e(t,a){return t===1?a:B6(function(){for(var s=arguments.length,r=new Array(s),i=0;i<s;i++)r[i]=arguments[i];var l=r.filter(function(d){return d!==Jz}).length;return l>=t?a.apply(void 0,r):e(t-l,B6(function(){for(var d=arguments.length,u=new Array(d),p=0;p<d;p++)u[p]=arguments[p];var x=r.map(function(m){return eU(m)?u.shift():m});return a.apply(void 0,dpe(x).concat(u))}))})},Ay=function(t){return gpe(t.length,t)},vC=function(t,a){for(var s=[],r=t;r<a;++r)s[r-t]=r;return s},hpe=Ay(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(a){return t[a]}).map(e)}),vpe=function(){for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];if(!a.length)return xpe;var r=a.reverse(),i=r[0],l=r.slice(1);return function(){return l.reduce(function(d,u){return u(d)},i.apply(void 0,arguments))}},yC=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},tU=function(t){var a=null,s=null;return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];return a&&i.every(function(d,u){return d===a[u]})||(a=i,s=t.apply(void 0,i)),s}};function ype(e){var t;return e===0?t=1:t=Math.floor(new ba(e).abs().log(10).toNumber())+1,t}function bpe(e,t,a){for(var s=new ba(e),r=0,i=[];s.lt(t)&&r<1e5;)i.push(s.toNumber()),s=s.add(a),r++;return i}var jpe=Ay(function(e,t,a){var s=+e,r=+t;return s+a*(r-s)}),wpe=Ay(function(e,t,a){var s=t-+e;return s=s||1/0,(a-e)/s}),Npe=Ay(function(e,t,a){var s=t-+e;return s=s||1/0,Math.max(0,Math.min(1,(a-e)/s))});const Dy={rangeStep:bpe,getDigitCount:ype,interpolateNumber:jpe,uninterpolateNumber:wpe,uninterpolateTruncation:Npe};function bC(e){return Epe(e)||Cpe(e)||aU(e)||Spe()}function Spe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
792In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cpe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Epe(e){if(Array.isArray(e))return jC(e)}function Bf(e,t){return Ope(e)||Dpe(e,t)||aU(e,t)||Ape()}function Ape(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
793In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aU(e,t){if(e){if(typeof e=="string")return jC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return jC(e,t)}}function jC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Dpe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var a=[],s=!0,r=!1,i=void 0;try{for(var l=e[Symbol.iterator](),d;!(s=(d=l.next()).done)&&(a.push(d.value),!(t&&a.length===t));s=!0);}catch(u){r=!0,i=u}finally{try{!s&&l.return!=null&&l.return()}finally{if(r)throw i}}return a}}function Ope(e){if(Array.isArray(e))return e}function nU(e){var t=Bf(e,2),a=t[0],s=t[1],r=a,i=s;return a>s&&(r=s,i=a),[r,i]}function sU(e,t,a){if(e.lte(0))return new ba(0);var s=Dy.getDigitCount(e.toNumber()),r=new ba(10).pow(s),i=e.div(r),l=s!==1?.05:.1,d=new ba(Math.ceil(i.div(l).toNumber())).add(a).mul(l),u=d.mul(r);return t?u:new ba(Math.ceil(u))}function kpe(e,t,a){var s=1,r=new ba(e);if(!r.isint()&&a){var i=Math.abs(e);i<1?(s=new ba(10).pow(Dy.getDigitCount(e)-1),r=new ba(Math.floor(r.div(s).toNumber())).mul(s)):i>1&&(r=new ba(Math.floor(e)))}else e===0?r=new ba(Math.floor((t-1)/2)):a||(r=new ba(Math.floor(e)));var l=Math.floor((t-1)/2),d=vpe(hpe(function(u){return r.add(new ba(u-l).mul(s)).toNumber()}),vC);return d(0,t)}function rU(e,t,a,s){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(a-1)))return{step:new ba(0),tickMin:new ba(0),tickMax:new ba(0)};var i=sU(new ba(t).sub(e).div(a-1),s,r),l;e<=0&&t>=0?l=new ba(0):(l=new ba(e).add(t).div(2),l=l.sub(new ba(l).mod(i)));var d=Math.ceil(l.sub(e).div(i).toNumber()),u=Math.ceil(new ba(t).sub(l).div(i).toNumber()),p=d+u+1;return p>a?rU(e,t,a,s,r+1):(p<a&&(u=t>0?u+(a-p):u,d=t>0?d:d+(a-p)),{step:i,tickMin:l.sub(new ba(d).mul(i)),tickMax:l.add(new ba(u).mul(i))})}function _pe(e){var t=Bf(e,2),a=t[0],s=t[1],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(r,2),d=nU([a,s]),u=Bf(d,2),p=u[0],x=u[1];if(p===-1/0||x===1/0){var m=x===1/0?[p].concat(bC(vC(0,r-1).map(function(){return 1/0}))):[].concat(bC(vC(0,r-1).map(function(){return-1/0})),[x]);return a>s?yC(m):m}if(p===x)return kpe(p,r,i);var h=rU(p,x,l,i),y=h.step,w=h.tickMin,b=h.tickMax,j=Dy.rangeStep(w,b.add(new ba(.1).mul(y)),y);return a>s?yC(j):j}function Tpe(e,t){var a=Bf(e,2),s=a[0],r=a[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=nU([s,r]),d=Bf(l,2),u=d[0],p=d[1];if(u===-1/0||p===1/0)return[s,r];if(u===p)return[u];var x=Math.max(t,2),m=sU(new ba(p).sub(u).div(x-1),i,0),h=[].concat(bC(Dy.rangeStep(new ba(u),new ba(p).sub(new ba(.99).mul(m)),m)),[p]);return s>r?yC(h):h}var Ppe=tU(_pe),Mpe=tU(Tpe),Rpe="Invariant failed";function no(e,t){throw new Error(Rpe)}var Bpe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Fd(e){"@babel/helpers - typeof";return Fd=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},Fd(e)}function zh(){return zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},zh.apply(this,arguments)}function Ipe(e,t){return Upe(e)||zpe(e,t)||$pe(e,t)||Lpe()}function Lpe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
794In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $pe(e,t){if(e){if(typeof e=="string")return I6(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return I6(e,t)}}function I6(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function zpe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Upe(e){if(Array.isArray(e))return e}function qpe(e,t){if(e==null)return{};var a=Fpe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Fpe(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function Wpe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Hpe(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,lU(s.key),s)}}function Vpe(e,t,a){return t&&Hpe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Gpe(e,t,a){return t=Uh(t),Ype(e,iU()?Reflect.construct(t,a||[],Uh(e).constructor):t.apply(e,a))}function Ype(e,t){if(t&&(Fd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kpe(e)}function Kpe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iU=function(){return!!e})()}function Uh(e){return Uh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Uh(e)}function Qpe(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&&wC(e,t)}function wC(e,t){return wC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},wC(e,t)}function cU(e,t,a){return t=lU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function lU(e){var t=Xpe(e,"string");return Fd(t)=="symbol"?t:t+""}function Xpe(e,t){if(Fd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Fd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Oy=(function(e){function t(){return Wpe(this,t),Gpe(this,t,arguments)}return Qpe(t,e),Vpe(t,[{key:"render",value:function(){var s=this.props,r=s.offset,i=s.layout,l=s.width,d=s.dataKey,u=s.data,p=s.dataPointFormatter,x=s.xAxis,m=s.yAxis,h=qpe(s,Bpe),y=Ft(h,!1);this.props.direction==="x"&&x.type!=="number"&&no();var w=u.map(function(b){var j=p(b,d),S=j.x,O=j.y,A=j.value,k=j.errorVal;if(!k)return null;var E=[],D,_;if(Array.isArray(k)){var T=Ipe(k,2);D=T[0],_=T[1]}else D=_=k;if(i==="vertical"){var I=x.scale,$=O+r,R=$+l,B=$-l,Y=I(A-D),z=I(A+_);E.push({x1:z,y1:R,x2:z,y2:B}),E.push({x1:Y,y1:$,x2:z,y2:$}),E.push({x1:Y,y1:R,x2:Y,y2:B})}else if(i==="horizontal"){var Q=m.scale,L=S+r,M=L-l,U=L+l,Z=Q(A-D),ie=Q(A+_);E.push({x1:M,y1:ie,x2:U,y2:ie}),E.push({x1:L,y1:Z,x2:L,y2:ie}),E.push({x1:M,y1:Z,x2:U,y2:Z})}return W.createElement(za,zh({className:"recharts-errorBar",key:"bar-".concat(E.map(function(G){return"".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))},y),E.map(function(G){return W.createElement("line",zh({},G,{key:"line-".concat(G.x1,"-").concat(G.x2,"-").concat(G.y1,"-").concat(G.y2)}))}))});return W.createElement(za,{className:"recharts-errorBars"},w)}}])})(W.Component);cU(Oy,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});cU(Oy,"displayName","ErrorBar");function If(e){"@babel/helpers - typeof";return If=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(e)}function L6(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function El(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?L6(Object(a),!0).forEach(function(s){Zpe(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):L6(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Zpe(e,t,a){return t=Jpe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Jpe(e){var t=efe(e,"string");return If(t)=="symbol"?t:t+""}function efe(e,t){if(If(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(If(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oU=function(t){var a=t.children,s=t.formattedGraphicalItems,r=t.legendWidth,i=t.legendContent,l=hs(a,wd);if(!l)return null;var d=wd.defaultProps,u=d!==void 0?El(El({},d),l.props):{},p;return l.props&&l.props.payload?p=l.props&&l.props.payload:i==="children"?p=(s||[]).reduce(function(x,m){var h=m.item,y=m.props,w=y.sectors||y.data||[];return x.concat(w.map(function(b){return{type:l.props.iconType||h.props.legendType,value:b.name,color:b.fill,payload:b}}))},[]):p=(s||[]).map(function(x){var m=x.item,h=m.type.defaultProps,y=h!==void 0?El(El({},h),m.props):{},w=y.dataKey,b=y.name,j=y.legendType,S=y.hide;return{inactive:S,dataKey:w,type:u.iconType||j||"square",color:t4(m),value:b||w,payload:y}}),El(El(El({},u),wd.getWithHeight(l,r)),{},{payload:p,item:l})};function Lf(e){"@babel/helpers - typeof";return Lf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lf(e)}function $6(e){return sfe(e)||nfe(e)||afe(e)||tfe()}function tfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
795In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function afe(e,t){if(e){if(typeof e=="string")return NC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return NC(e,t)}}function nfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sfe(e){if(Array.isArray(e))return NC(e)}function NC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function z6(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Qa(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?z6(Object(a),!0).forEach(function(s){Sd(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):z6(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Sd(e,t,a){return t=rfe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function rfe(e){var t=ife(e,"string");return Lf(t)=="symbol"?t:t+""}function ife(e,t){if(Lf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Lf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function As(e,t,a){return Yt(e)||Yt(t)?a:gn(t)?Xs(e,t,a):Bt(t)?t(e):a}function Xp(e,t,a,s){var r=spe(e,function(d){return As(d,t)});if(a==="number"){var i=r.filter(function(d){return ze(d)||parseFloat(d)});return i.length?[Ey(i),Tc(i)]:[1/0,-1/0]}var l=s?r.filter(function(d){return!Yt(d)}):r;return l.map(function(d){return gn(d)||d instanceof Date?d:""})}var cfe=function(t){var a,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,l=-1,d=(a=s?.length)!==null&&a!==void 0?a:0;if(d<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var u=i.range,p=0;p<d;p++){var x=p>0?r[p-1].coordinate:r[d-1].coordinate,m=r[p].coordinate,h=p>=d-1?r[0].coordinate:r[p+1].coordinate,y=void 0;if(lr(m-x)!==lr(h-m)){var w=[];if(lr(h-m)===lr(u[1]-u[0])){y=h;var b=m+u[1]-u[0];w[0]=Math.min(b,(b+x)/2),w[1]=Math.max(b,(b+x)/2)}else{y=x;var j=h+u[1]-u[0];w[0]=Math.min(m,(j+m)/2),w[1]=Math.max(m,(j+m)/2)}var S=[Math.min(m,(y+m)/2),Math.max(m,(y+m)/2)];if(t>S[0]&&t<=S[1]||t>=w[0]&&t<=w[1]){l=r[p].index;break}}else{var O=Math.min(x,h),A=Math.max(x,h);if(t>(O+m)/2&&t<=(A+m)/2){l=r[p].index;break}}}else for(var k=0;k<d;k++)if(k===0&&t<=(s[k].coordinate+s[k+1].coordinate)/2||k>0&&k<d-1&&t>(s[k].coordinate+s[k-1].coordinate)/2&&t<=(s[k].coordinate+s[k+1].coordinate)/2||k===d-1&&t>(s[k].coordinate+s[k-1].coordinate)/2){l=s[k].index;break}return l},t4=function(t){var a,s=t,r=s.type.displayName,i=(a=t.type)!==null&&a!==void 0&&a.defaultProps?Qa(Qa({},t.type.defaultProps),t.props):t.props,l=i.stroke,d=i.fill,u;switch(r){case"Line":u=l;break;case"Area":case"Radar":u=l&&l!=="none"?l:d;break;default:u=d;break}return u},lfe=function(t){var a=t.barSize,s=t.totalSize,r=t.stackGroups,i=r===void 0?{}:r;if(!i)return{};for(var l={},d=Object.keys(i),u=0,p=d.length;u<p;u++)for(var x=i[d[u]].stackGroups,m=Object.keys(x),h=0,y=m.length;h<y;h++){var w=x[m[h]],b=w.items,j=w.cateAxisId,S=b.filter(function(_){return Oi(_.type).indexOf("Bar")>=0});if(S&&S.length){var O=S[0].type.defaultProps,A=O!==void 0?Qa(Qa({},O),S[0].props):S[0].props,k=A.barSize,E=A[j];l[E]||(l[E]=[]);var D=Yt(k)?a:k;l[E].push({item:S[0],stackList:S.slice(1),barSize:Yt(D)?void 0:to(D,s,0)})}}return l},ofe=function(t){var a=t.barGap,s=t.barCategoryGap,r=t.bandSize,i=t.sizeList,l=i===void 0?[]:i,d=t.maxBarSize,u=l.length;if(u<1)return null;var p=to(a,r,0,!0),x,m=[];if(l[0].barSize===+l[0].barSize){var h=!1,y=r/u,w=l.reduce(function(k,E){return k+E.barSize||0},0);w+=(u-1)*p,w>=r&&(w-=(u-1)*p,p=0),w>=r&&y>0&&(h=!0,y*=.9,w=u*y);var b=(r-w)/2>>0,j={offset:b-p,size:0};x=l.reduce(function(k,E){var D={item:E.item,position:{offset:j.offset+j.size+p,size:h?y:E.barSize}},_=[].concat($6(k),[D]);return j=_[_.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(T){_.push({item:T,position:j})}),_},m)}else{var S=to(s,r,0,!0);r-2*S-(u-1)*p<=0&&(p=0);var O=(r-2*S-(u-1)*p)/u;O>1&&(O>>=0);var A=d===+d?Math.min(O,d):O;x=l.reduce(function(k,E,D){var _=[].concat($6(k),[{item:E.item,position:{offset:S+(O+p)*D+(O-A)/2,size:A}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(T){_.push({item:T,position:_[_.length-1].position})}),_},m)}return x},dfe=function(t,a,s,r){var i=s.children,l=s.width,d=s.margin,u=l-(d.left||0)-(d.right||0),p=oU({children:i,legendWidth:u});if(p){var x=r||{},m=x.width,h=x.height,y=p.align,w=p.verticalAlign,b=p.layout;if((b==="vertical"||b==="horizontal"&&w==="middle")&&y!=="center"&&ze(t[y]))return Qa(Qa({},t),{},Sd({},y,t[y]+(m||0)));if((b==="horizontal"||b==="vertical"&&y==="center")&&w!=="middle"&&ze(t[w]))return Qa(Qa({},t),{},Sd({},w,t[w]+(h||0)))}return t},ufe=function(t,a,s){return Yt(a)?!0:t==="horizontal"?a==="yAxis":t==="vertical"||s==="x"?a==="xAxis":s==="y"?a==="yAxis":!0},dU=function(t,a,s,r,i){var l=a.props.children,d=dr(l,Oy).filter(function(p){return ufe(r,i,p.props.direction)});if(d&&d.length){var u=d.map(function(p){return p.props.dataKey});return t.reduce(function(p,x){var m=As(x,s);if(Yt(m))return p;var h=Array.isArray(m)?[Ey(m),Tc(m)]:[m,m],y=u.reduce(function(w,b){var j=As(x,b,0),S=h[0]-Math.abs(Array.isArray(j)?j[0]:j),O=h[1]+Math.abs(Array.isArray(j)?j[1]:j);return[Math.min(S,w[0]),Math.max(O,w[1])]},[1/0,-1/0]);return[Math.min(y[0],p[0]),Math.max(y[1],p[1])]},[1/0,-1/0])}return null},pfe=function(t,a,s,r,i){var l=a.map(function(d){return dU(t,d,s,i,r)}).filter(function(d){return!Yt(d)});return l&&l.length?l.reduce(function(d,u){return[Math.min(d[0],u[0]),Math.max(d[1],u[1])]},[1/0,-1/0]):null},uU=function(t,a,s,r,i){var l=a.map(function(u){var p=u.props.dataKey;return s==="number"&&p&&dU(t,u,p,r)||Xp(t,p,s,i)});if(s==="number")return l.reduce(function(u,p){return[Math.min(u[0],p[0]),Math.max(u[1],p[1])]},[1/0,-1/0]);var d={};return l.reduce(function(u,p){for(var x=0,m=p.length;x<m;x++)d[p[x]]||(d[p[x]]=!0,u.push(p[x]));return u},[])},pU=function(t,a){return t==="horizontal"&&a==="xAxis"||t==="vertical"&&a==="yAxis"||t==="centric"&&a==="angleAxis"||t==="radial"&&a==="radiusAxis"},fU=function(t,a,s,r){if(r)return t.map(function(u){return u.coordinate});var i,l,d=t.map(function(u){return u.coordinate===a&&(i=!0),u.coordinate===s&&(l=!0),u.coordinate});return i||d.push(a),l||d.push(s),d},Ci=function(t,a,s){if(!t)return null;var r=t.scale,i=t.duplicateDomain,l=t.type,d=t.range,u=t.realScaleType==="scaleBand"?r.bandwidth()/2:2,p=(a||s)&&l==="category"&&r.bandwidth?r.bandwidth()/u:0;if(p=t.axisType==="angleAxis"&&d?.length>=2?lr(d[0]-d[1])*2*p:p,a&&(t.ticks||t.niceTicks)){var x=(t.ticks||t.niceTicks).map(function(m){var h=i?i.indexOf(m):m;return{coordinate:r(h)+p,value:m,offset:p}});return x.filter(function(m){return!mu(m.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(m,h){return{coordinate:r(m)+p,value:m,index:h,offset:p}}):r.ticks&&!s?r.ticks(t.tickCount).map(function(m){return{coordinate:r(m)+p,value:m,offset:p}}):r.domain().map(function(m,h){return{coordinate:r(m)+p,value:i?i[m]:m,index:h,offset:p}})},rN=new WeakMap,Og=function(t,a){if(typeof a!="function")return t;rN.has(t)||rN.set(t,new WeakMap);var s=rN.get(t);if(s.has(a))return s.get(a);var r=function(){t.apply(void 0,arguments),a.apply(void 0,arguments)};return s.set(a,r),r},ffe=function(t,a,s){var r=t.scale,i=t.type,l=t.layout,d=t.axisType;if(r==="auto")return l==="radial"&&d==="radiusAxis"?{scale:Of(),realScaleType:"band"}:l==="radial"&&d==="angleAxis"?{scale:Rh(),realScaleType:"linear"}:i==="category"&&a&&(a.indexOf("LineChart")>=0||a.indexOf("AreaChart")>=0||a.indexOf("ComposedChart")>=0&&!s)?{scale:Qp(),realScaleType:"point"}:i==="category"?{scale:Of(),realScaleType:"band"}:{scale:Rh(),realScaleType:"linear"};if(eo(r)){var u="scale".concat(fy(r));return{scale:(C6[u]||Qp)(),realScaleType:C6[u]?u:"point"}}return Bt(r)?{scale:r}:{scale:Qp(),realScaleType:"point"}},U6=1e-4,mfe=function(t){var a=t.domain();if(!(!a||a.length<=2)){var s=a.length,r=t.range(),i=Math.min(r[0],r[1])-U6,l=Math.max(r[0],r[1])+U6,d=t(a[0]),u=t(a[s-1]);(d<i||d>l||u<i||u>l)&&t.domain([a[0],a[s-1]])}},xfe=function(t,a){if(!t)return null;for(var s=0,r=t.length;s<r;s++)if(t[s].item===a)return t[s].position;return null},gfe=function(t,a){if(!a||a.length!==2||!ze(a[0])||!ze(a[1]))return t;var s=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]),i=[t[0],t[1]];return(!ze(t[0])||t[0]<s)&&(i[0]=s),(!ze(t[1])||t[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<s&&(i[1]=s),i},hfe=function(t){var a=t.length;if(!(a<=0))for(var s=0,r=t[0].length;s<r;++s)for(var i=0,l=0,d=0;d<a;++d){var u=mu(t[d][s][1])?t[d][s][0]:t[d][s][1];u>=0?(t[d][s][0]=i,t[d][s][1]=i+u,i=t[d][s][1]):(t[d][s][0]=l,t[d][s][1]=l+u,l=t[d][s][1])}},vfe=function(t){var a=t.length;if(!(a<=0))for(var s=0,r=t[0].length;s<r;++s)for(var i=0,l=0;l<a;++l){var d=mu(t[l][s][1])?t[l][s][0]:t[l][s][1];d>=0?(t[l][s][0]=i,t[l][s][1]=i+d,i=t[l][s][1]):(t[l][s][0]=0,t[l][s][1]=0)}},yfe={sign:hfe,expand:aie,none:Rd,silhouette:nie,wiggle:sie,positive:vfe},bfe=function(t,a,s){var r=a.map(function(d){return d.props.dataKey}),i=yfe[s],l=tie().keys(r).value(function(d,u){return+As(d,u,0)}).order(JS).offset(i);return l(t)},jfe=function(t,a,s,r,i,l){if(!t)return null;var d=l?a.reverse():a,u={},p=d.reduce(function(m,h){var y,w=(y=h.type)!==null&&y!==void 0&&y.defaultProps?Qa(Qa({},h.type.defaultProps),h.props):h.props,b=w.stackId,j=w.hide;if(j)return m;var S=w[s],O=m[S]||{hasStack:!1,stackGroups:{}};if(gn(b)){var A=O.stackGroups[b]||{numericAxisId:s,cateAxisId:r,items:[]};A.items.push(h),O.hasStack=!0,O.stackGroups[b]=A}else O.stackGroups[Pm("_stackId_")]={numericAxisId:s,cateAxisId:r,items:[h]};return Qa(Qa({},m),{},Sd({},S,O))},u),x={};return Object.keys(p).reduce(function(m,h){var y=p[h];if(y.hasStack){var w={};y.stackGroups=Object.keys(y.stackGroups).reduce(function(b,j){var S=y.stackGroups[j];return Qa(Qa({},b),{},Sd({},j,{numericAxisId:s,cateAxisId:r,items:S.items,stackedData:bfe(t,S.items,i)}))},w)}return Qa(Qa({},m),{},Sd({},h,y))},x)},wfe=function(t,a){var s=a.realScaleType,r=a.type,i=a.tickCount,l=a.originalDomain,d=a.allowDecimals,u=s||a.scale;if(u!=="auto"&&u!=="linear")return null;if(i&&r==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var p=t.domain();if(!p.length)return null;var x=Ppe(p,i,d);return t.domain([Ey(x),Tc(x)]),{niceTicks:x}}if(i&&r==="number"){var m=t.domain(),h=Mpe(m,i,d);return{niceTicks:h}}return null};function q6(e){var t=e.axis,a=e.ticks,s=e.bandSize,r=e.entry,i=e.index,l=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Yt(r[t.dataKey])){var d=mh(a,"value",r[t.dataKey]);if(d)return d.coordinate+s/2}return a[i]?a[i].coordinate+s/2:null}var u=As(r,Yt(l)?t.dataKey:l);return Yt(u)?null:t.scale(u)}var F6=function(t){var a=t.axis,s=t.ticks,r=t.offset,i=t.bandSize,l=t.entry,d=t.index;if(a.type==="category")return s[d]?s[d].coordinate+r:null;var u=As(l,a.dataKey,a.domain[d]);return Yt(u)?null:a.scale(u)-i/2+r},Nfe=function(t){var a=t.numericAxis,s=a.scale.domain();if(a.type==="number"){var r=Math.min(s[0],s[1]),i=Math.max(s[0],s[1]);return r<=0&&i>=0?0:i<0?i:r}return s[0]},Sfe=function(t,a){var s,r=(s=t.type)!==null&&s!==void 0&&s.defaultProps?Qa(Qa({},t.type.defaultProps),t.props):t.props,i=r.stackId;if(gn(i)){var l=a[i];if(l){var d=l.items.indexOf(t);return d>=0?l.stackedData[d]:null}}return null},Cfe=function(t){return t.reduce(function(a,s){return[Ey(s.concat([a[0]]).filter(ze)),Tc(s.concat([a[1]]).filter(ze))]},[1/0,-1/0])},mU=function(t,a,s){return Object.keys(t).reduce(function(r,i){var l=t[i],d=l.stackedData,u=d.reduce(function(p,x){var m=Cfe(x.slice(a,s+1));return[Math.min(p[0],m[0]),Math.max(p[1],m[1])]},[1/0,-1/0]);return[Math.min(u[0],r[0]),Math.max(u[1],r[1])]},[1/0,-1/0]).map(function(r){return r===1/0||r===-1/0?0:r})},W6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,H6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,SC=function(t,a,s){if(Bt(t))return t(a,s);if(!Array.isArray(t))return a;var r=[];if(ze(t[0]))r[0]=s?t[0]:Math.min(t[0],a[0]);else if(W6.test(t[0])){var i=+W6.exec(t[0])[1];r[0]=a[0]-i}else Bt(t[0])?r[0]=t[0](a[0]):r[0]=a[0];if(ze(t[1]))r[1]=s?t[1]:Math.max(t[1],a[1]);else if(H6.test(t[1])){var l=+H6.exec(t[1])[1];r[1]=a[1]+l}else Bt(t[1])?r[1]=t[1](a[1]):r[1]=a[1];return r},qh=function(t,a,s){if(t&&t.scale&&t.scale.bandwidth){var r=t.scale.bandwidth();if(!s||r>0)return r}if(t&&a&&a.length>=2){for(var i=O3(a,function(m){return m.coordinate}),l=1/0,d=1,u=i.length;d<u;d++){var p=i[d],x=i[d-1];l=Math.min((p.coordinate||0)-(x.coordinate||0),l)}return l===1/0?0:l}return s?void 0:0},V6=function(t,a,s){return!t||!t.length||Mf(t,Xs(s,"type.defaultProps.domain"))?a:t},xU=function(t,a){var s=t.type.defaultProps?Qa(Qa({},t.type.defaultProps),t.props):t.props,r=s.dataKey,i=s.name,l=s.unit,d=s.formatter,u=s.tooltipType,p=s.chartType,x=s.hide;return Qa(Qa({},Ft(t,!1)),{},{dataKey:r,unit:l,formatter:d,name:i||r,color:t4(t),value:As(a,r),type:u,payload:a,chartType:p,hide:x})};function $f(e){"@babel/helpers - typeof";return $f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$f(e)}function G6(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Y6(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?G6(Object(a),!0).forEach(function(s){Efe(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):G6(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Efe(e,t,a){return t=Afe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Afe(e){var t=Dfe(e,"string");return $f(t)=="symbol"?t:t+""}function Dfe(e,t){if($f(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if($f(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fh=Math.PI/180,Ofe=function(t){return t*180/Math.PI},kn=function(t,a,s,r){return{x:t+Math.cos(-Fh*r)*s,y:a+Math.sin(-Fh*r)*s}},kfe=function(t,a){var s=t.x,r=t.y,i=a.x,l=a.y;return Math.sqrt(Math.pow(s-i,2)+Math.pow(r-l,2))},_fe=function(t,a){var s=t.x,r=t.y,i=a.cx,l=a.cy,d=kfe({x:s,y:r},{x:i,y:l});if(d<=0)return{radius:d};var u=(s-i)/d,p=Math.acos(u);return r>l&&(p=2*Math.PI-p),{radius:d,angle:Ofe(p),angleInRadian:p}},Tfe=function(t){var a=t.startAngle,s=t.endAngle,r=Math.floor(a/360),i=Math.floor(s/360),l=Math.min(r,i);return{startAngle:a-l*360,endAngle:s-l*360}},Pfe=function(t,a){var s=a.startAngle,r=a.endAngle,i=Math.floor(s/360),l=Math.floor(r/360),d=Math.min(i,l);return t+d*360},K6=function(t,a){var s=t.x,r=t.y,i=_fe({x:s,y:r},a),l=i.radius,d=i.angle,u=a.innerRadius,p=a.outerRadius;if(l<u||l>p)return!1;if(l===0)return!0;var x=Tfe(a),m=x.startAngle,h=x.endAngle,y=d,w;if(m<=h){for(;y>h;)y-=360;for(;y<m;)y+=360;w=y>=m&&y<=h}else{for(;y>m;)y-=360;for(;y<h;)y+=360;w=y>=h&&y<=m}return w?Y6(Y6({},a),{},{radius:l,angle:Pfe(y,a)}):null};function zf(e){"@babel/helpers - typeof";return zf=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},zf(e)}var Mfe=["offset"];function Rfe(e){return $fe(e)||Lfe(e)||Ife(e)||Bfe()}function Bfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
796In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ife(e,t){if(e){if(typeof e=="string")return CC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return CC(e,t)}}function Lfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $fe(e){if(Array.isArray(e))return CC(e)}function CC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function zfe(e,t){if(e==null)return{};var a=Ufe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Ufe(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function Q6(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function mn(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(a),!0).forEach(function(s){qfe(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Q6(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function qfe(e,t,a){return t=Ffe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Ffe(e){var t=Wfe(e,"string");return zf(t)=="symbol"?t:t+""}function Wfe(e,t){if(zf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(zf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uf(){return Uf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Uf.apply(this,arguments)}var Hfe=function(t){var a=t.value,s=t.formatter,r=Yt(t.children)?a:t.children;return Bt(s)?s(r):r},Vfe=function(t,a){var s=lr(a-t),r=Math.min(Math.abs(a-t),360);return s*r},Gfe=function(t,a,s){var r=t.position,i=t.viewBox,l=t.offset,d=t.className,u=i,p=u.cx,x=u.cy,m=u.innerRadius,h=u.outerRadius,y=u.startAngle,w=u.endAngle,b=u.clockWise,j=(m+h)/2,S=Vfe(y,w),O=S>=0?1:-1,A,k;r==="insideStart"?(A=y+O*l,k=b):r==="insideEnd"?(A=w-O*l,k=!b):r==="end"&&(A=w+O*l,k=b),k=S<=0?k:!k;var E=kn(p,x,j,A),D=kn(p,x,j,A+(k?1:-1)*359),_="M".concat(E.x,",").concat(E.y,`
797    A`).concat(j,",").concat(j,",0,1,").concat(k?0:1,`,
798    `).concat(D.x,",").concat(D.y),T=Yt(t.id)?Pm("recharts-radial-line-"):t.id;return W.createElement("text",Uf({},s,{dominantBaseline:"central",className:Qt("recharts-radial-bar-label",d)}),W.createElement("defs",null,W.createElement("path",{id:T,d:_})),W.createElement("textPath",{xlinkHref:"#".concat(T)},a))},Yfe=function(t){var a=t.viewBox,s=t.offset,r=t.position,i=a,l=i.cx,d=i.cy,u=i.innerRadius,p=i.outerRadius,x=i.startAngle,m=i.endAngle,h=(x+m)/2;if(r==="outside"){var y=kn(l,d,p+s,h),w=y.x,b=y.y;return{x:w,y:b,textAnchor:w>=l?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:l,y:d,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:l,y:d,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:l,y:d,textAnchor:"middle",verticalAnchor:"end"};var j=(u+p)/2,S=kn(l,d,j,h),O=S.x,A=S.y;return{x:O,y:A,textAnchor:"middle",verticalAnchor:"middle"}},Kfe=function(t){var a=t.viewBox,s=t.parentViewBox,r=t.offset,i=t.position,l=a,d=l.x,u=l.y,p=l.width,x=l.height,m=x>=0?1:-1,h=m*r,y=m>0?"end":"start",w=m>0?"start":"end",b=p>=0?1:-1,j=b*r,S=b>0?"end":"start",O=b>0?"start":"end";if(i==="top"){var A={x:d+p/2,y:u-m*r,textAnchor:"middle",verticalAnchor:y};return mn(mn({},A),s?{height:Math.max(u-s.y,0),width:p}:{})}if(i==="bottom"){var k={x:d+p/2,y:u+x+h,textAnchor:"middle",verticalAnchor:w};return mn(mn({},k),s?{height:Math.max(s.y+s.height-(u+x),0),width:p}:{})}if(i==="left"){var E={x:d-j,y:u+x/2,textAnchor:S,verticalAnchor:"middle"};return mn(mn({},E),s?{width:Math.max(E.x-s.x,0),height:x}:{})}if(i==="right"){var D={x:d+p+j,y:u+x/2,textAnchor:O,verticalAnchor:"middle"};return mn(mn({},D),s?{width:Math.max(s.x+s.width-D.x,0),height:x}:{})}var _=s?{width:p,height:x}:{};return i==="insideLeft"?mn({x:d+j,y:u+x/2,textAnchor:O,verticalAnchor:"middle"},_):i==="insideRight"?mn({x:d+p-j,y:u+x/2,textAnchor:S,verticalAnchor:"middle"},_):i==="insideTop"?mn({x:d+p/2,y:u+h,textAnchor:"middle",verticalAnchor:w},_):i==="insideBottom"?mn({x:d+p/2,y:u+x-h,textAnchor:"middle",verticalAnchor:y},_):i==="insideTopLeft"?mn({x:d+j,y:u+h,textAnchor:O,verticalAnchor:w},_):i==="insideTopRight"?mn({x:d+p-j,y:u+h,textAnchor:S,verticalAnchor:w},_):i==="insideBottomLeft"?mn({x:d+j,y:u+x-h,textAnchor:O,verticalAnchor:y},_):i==="insideBottomRight"?mn({x:d+p-j,y:u+x-h,textAnchor:S,verticalAnchor:y},_):fu(i)&&(ze(i.x)||Il(i.x))&&(ze(i.y)||Il(i.y))?mn({x:d+to(i.x,p),y:u+to(i.y,x),textAnchor:"end",verticalAnchor:"end"},_):mn({x:d+p/2,y:u+x/2,textAnchor:"middle",verticalAnchor:"middle"},_)},Qfe=function(t){return"cx"in t&&ze(t.cx)};function $n(e){var t=e.offset,a=t===void 0?5:t,s=zfe(e,Mfe),r=mn({offset:a},s),i=r.viewBox,l=r.position,d=r.value,u=r.children,p=r.content,x=r.className,m=x===void 0?"":x,h=r.textBreakAll;if(!i||Yt(d)&&Yt(u)&&!v.isValidElement(p)&&!Bt(p))return null;if(v.isValidElement(p))return v.cloneElement(p,r);var y;if(Bt(p)){if(y=v.createElement(p,r),v.isValidElement(y))return y}else y=Hfe(r);var w=Qfe(i),b=Ft(r,!0);if(w&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Gfe(r,y,b);var j=w?Yfe(r):Kfe(r);return W.createElement(Dh,Uf({className:Qt("recharts-label",m)},b,j,{breakAll:h}),y)}$n.displayName="Label";var gU=function(t){var a=t.cx,s=t.cy,r=t.angle,i=t.startAngle,l=t.endAngle,d=t.r,u=t.radius,p=t.innerRadius,x=t.outerRadius,m=t.x,h=t.y,y=t.top,w=t.left,b=t.width,j=t.height,S=t.clockWise,O=t.labelViewBox;if(O)return O;if(ze(b)&&ze(j)){if(ze(m)&&ze(h))return{x:m,y:h,width:b,height:j};if(ze(y)&&ze(w))return{x:y,y:w,width:b,height:j}}return ze(m)&&ze(h)?{x:m,y:h,width:0,height:0}:ze(a)&&ze(s)?{cx:a,cy:s,startAngle:i||r||0,endAngle:l||r||0,innerRadius:p||0,outerRadius:x||u||d||0,clockWise:S}:t.viewBox?t.viewBox:{}},Xfe=function(t,a){return t?t===!0?W.createElement($n,{key:"label-implicit",viewBox:a}):gn(t)?W.createElement($n,{key:"label-implicit",viewBox:a,value:t}):v.isValidElement(t)?t.type===$n?v.cloneElement(t,{key:"label-implicit",viewBox:a}):W.createElement($n,{key:"label-implicit",content:t,viewBox:a}):Bt(t)?W.createElement($n,{key:"label-implicit",content:t,viewBox:a}):fu(t)?W.createElement($n,Uf({viewBox:a},t,{key:"label-implicit"})):null:null},Zfe=function(t,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&s&&!t.label)return null;var r=t.children,i=gU(t),l=dr(r,$n).map(function(u,p){return v.cloneElement(u,{viewBox:a||i,key:"label-".concat(p)})});if(!s)return l;var d=Xfe(t.label,a||i);return[d].concat(Rfe(l))};$n.parseViewBox=gU;$n.renderCallByParent=Zfe;var iN,X6;function Jfe(){if(X6)return iN;X6=1;function e(t){var a=t==null?0:t.length;return a?t[a-1]:void 0}return iN=e,iN}var eme=Jfe();const tme=Na(eme);function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}var ame=["valueAccessor"],nme=["data","dataKey","clockWise","id","textBreakAll"];function sme(e){return lme(e)||cme(e)||ime(e)||rme()}function rme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
799In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ime(e,t){if(e){if(typeof e=="string")return EC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return EC(e,t)}}function cme(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lme(e){if(Array.isArray(e))return EC(e)}function EC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Wh(){return Wh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Wh.apply(this,arguments)}function Z6(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function J6(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?Z6(Object(a),!0).forEach(function(s){ome(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):Z6(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function ome(e,t,a){return t=dme(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function dme(e){var t=ume(e,"string");return qf(t)=="symbol"?t:t+""}function ume(e,t){if(qf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(qf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function e8(e,t){if(e==null)return{};var a=pme(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function pme(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}var fme=function(t){return Array.isArray(t.value)?tme(t.value):t.value};function zc(e){var t=e.valueAccessor,a=t===void 0?fme:t,s=e8(e,ame),r=s.data,i=s.dataKey,l=s.clockWise,d=s.id,u=s.textBreakAll,p=e8(s,nme);return!r||!r.length?null:W.createElement(za,{className:"recharts-label-list"},r.map(function(x,m){var h=Yt(i)?a(x,m):As(x&&x.payload,i),y=Yt(d)?{}:{id:"".concat(d,"-").concat(m)};return W.createElement($n,Wh({},Ft(x,!0),p,y,{parentViewBox:x.parentViewBox,value:h,textBreakAll:u,viewBox:$n.parseViewBox(Yt(l)?x:J6(J6({},x),{},{clockWise:l})),key:"label-".concat(m),index:m}))}))}zc.displayName="LabelList";function mme(e,t){return e?e===!0?W.createElement(zc,{key:"labelList-implicit",data:t}):W.isValidElement(e)||Bt(e)?W.createElement(zc,{key:"labelList-implicit",data:t,content:e}):fu(e)?W.createElement(zc,Wh({data:t},e,{key:"labelList-implicit"})):null:null}function xme(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&a&&!e.label)return null;var s=e.children,r=dr(s,zc).map(function(l,d){return v.cloneElement(l,{data:t,key:"labelList-".concat(d)})});if(!a)return r;var i=mme(e.label,t);return[i].concat(sme(r))}zc.renderCallByParent=xme;function Ff(e){"@babel/helpers - typeof";return Ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ff(e)}function AC(){return AC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},AC.apply(this,arguments)}function t8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function a8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?t8(Object(a),!0).forEach(function(s){gme(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function gme(e,t,a){return t=hme(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function hme(e){var t=vme(e,"string");return Ff(t)=="symbol"?t:t+""}function vme(e,t){if(Ff(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Ff(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yme=function(t,a){var s=lr(a-t),r=Math.min(Math.abs(a-t),359.999);return s*r},kg=function(t){var a=t.cx,s=t.cy,r=t.radius,i=t.angle,l=t.sign,d=t.isExternal,u=t.cornerRadius,p=t.cornerIsExternal,x=u*(d?1:-1)+r,m=Math.asin(u/x)/Fh,h=p?i:i+l*m,y=kn(a,s,x,h),w=kn(a,s,r,h),b=p?i-l*m:i,j=kn(a,s,x*Math.cos(m*Fh),b);return{center:y,circleTangency:w,lineTangency:j,theta:m}},hU=function(t){var a=t.cx,s=t.cy,r=t.innerRadius,i=t.outerRadius,l=t.startAngle,d=t.endAngle,u=yme(l,d),p=l+u,x=kn(a,s,i,l),m=kn(a,s,i,p),h="M ".concat(x.x,",").concat(x.y,`
800    A `).concat(i,",").concat(i,`,0,
801    `).concat(+(Math.abs(u)>180),",").concat(+(l>p),`,
802    `).concat(m.x,",").concat(m.y,`
803  `);if(r>0){var y=kn(a,s,r,l),w=kn(a,s,r,p);h+="L ".concat(w.x,",").concat(w.y,`
804            A `).concat(r,",").concat(r,`,0,
805            `).concat(+(Math.abs(u)>180),",").concat(+(l<=p),`,
806            `).concat(y.x,",").concat(y.y," Z")}else h+="L ".concat(a,",").concat(s," Z");return h},bme=function(t){var a=t.cx,s=t.cy,r=t.innerRadius,i=t.outerRadius,l=t.cornerRadius,d=t.forceCornerRadius,u=t.cornerIsExternal,p=t.startAngle,x=t.endAngle,m=lr(x-p),h=kg({cx:a,cy:s,radius:i,angle:p,sign:m,cornerRadius:l,cornerIsExternal:u}),y=h.circleTangency,w=h.lineTangency,b=h.theta,j=kg({cx:a,cy:s,radius:i,angle:x,sign:-m,cornerRadius:l,cornerIsExternal:u}),S=j.circleTangency,O=j.lineTangency,A=j.theta,k=u?Math.abs(p-x):Math.abs(p-x)-b-A;if(k<0)return d?"M ".concat(w.x,",").concat(w.y,`
807        a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
808        a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
809      `):hU({cx:a,cy:s,innerRadius:r,outerRadius:i,startAngle:p,endAngle:x});var E="M ".concat(w.x,",").concat(w.y,`
810    A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(y.x,",").concat(y.y,`
811    A`).concat(i,",").concat(i,",0,").concat(+(k>180),",").concat(+(m<0),",").concat(S.x,",").concat(S.y,`
812    A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(O.x,",").concat(O.y,`
813  `);if(r>0){var D=kg({cx:a,cy:s,radius:r,angle:p,sign:m,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),_=D.circleTangency,T=D.lineTangency,I=D.theta,$=kg({cx:a,cy:s,radius:r,angle:x,sign:-m,isExternal:!0,cornerRadius:l,cornerIsExternal:u}),R=$.circleTangency,B=$.lineTangency,Y=$.theta,z=u?Math.abs(p-x):Math.abs(p-x)-I-Y;if(z<0&&l===0)return"".concat(E,"L").concat(a,",").concat(s,"Z");E+="L".concat(B.x,",").concat(B.y,`
814      A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(R.x,",").concat(R.y,`
815      A`).concat(r,",").concat(r,",0,").concat(+(z>180),",").concat(+(m>0),",").concat(_.x,",").concat(_.y,`
816      A`).concat(l,",").concat(l,",0,0,").concat(+(m<0),",").concat(T.x,",").concat(T.y,"Z")}else E+="L".concat(a,",").concat(s,"Z");return E},jme={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},vU=function(t){var a=a8(a8({},jme),t),s=a.cx,r=a.cy,i=a.innerRadius,l=a.outerRadius,d=a.cornerRadius,u=a.forceCornerRadius,p=a.cornerIsExternal,x=a.startAngle,m=a.endAngle,h=a.className;if(l<i||x===m)return null;var y=Qt("recharts-sector",h),w=l-i,b=to(d,w,0,!0),j;return b>0&&Math.abs(x-m)<360?j=bme({cx:s,cy:r,innerRadius:i,outerRadius:l,cornerRadius:Math.min(b,w/2),forceCornerRadius:u,cornerIsExternal:p,startAngle:x,endAngle:m}):j=hU({cx:s,cy:r,innerRadius:i,outerRadius:l,startAngle:x,endAngle:m}),W.createElement("path",AC({},Ft(a,!0),{className:y,d:j,role:"img"}))};function Wf(e){"@babel/helpers - typeof";return Wf=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},Wf(e)}function DC(){return DC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},DC.apply(this,arguments)}function n8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function s8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?n8(Object(a),!0).forEach(function(s){wme(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function wme(e,t,a){return t=Nme(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Nme(e){var t=Sme(e,"string");return Wf(t)=="symbol"?t:t+""}function Sme(e,t){if(Wf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Wf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var r8={curveBasisClosed:Wre,curveBasisOpen:Hre,curveBasis:Fre,curveBumpX:Ore,curveBumpY:kre,curveLinearClosed:Vre,curveLinear:xy,curveMonotoneX:Gre,curveMonotoneY:Yre,curveNatural:Kre,curveStep:Qre,curveStepAfter:Zre,curveStepBefore:Xre},_g=function(t){return t.x===+t.x&&t.y===+t.y},Sp=function(t){return t.x},Cp=function(t){return t.y},Cme=function(t,a){if(Bt(t))return t;var s="curve".concat(fy(t));return(s==="curveMonotone"||s==="curveBump")&&a?r8["".concat(s).concat(a==="vertical"?"Y":"X")]:r8[s]||xy},Eme=function(t){var a=t.type,s=a===void 0?"linear":a,r=t.points,i=r===void 0?[]:r,l=t.baseLine,d=t.layout,u=t.connectNulls,p=u===void 0?!1:u,x=Cme(s,d),m=p?i.filter(function(b){return _g(b)}):i,h;if(Array.isArray(l)){var y=p?l.filter(function(b){return _g(b)}):l,w=m.map(function(b,j){return s8(s8({},b),{},{base:y[j]})});return d==="vertical"?h=wg().y(Cp).x1(Sp).x0(function(b){return b.base.x}):h=wg().x(Sp).y1(Cp).y0(function(b){return b.base.y}),h.defined(_g).curve(x),h(w)}return d==="vertical"&&ze(l)?h=wg().y(Cp).x1(Sp).x0(l):ze(l)?h=wg().x(Sp).y1(Cp).y0(l):h=w$().x(Sp).y(Cp),h.defined(_g).curve(x),h(m)},Zp=function(t){var a=t.className,s=t.points,r=t.path,i=t.pathRef;if((!s||!s.length)&&!r)return null;var l=s&&s.length?Eme(t):r;return v.createElement("path",DC({},Ft(t,!1),xh(t),{className:Qt("recharts-curve",a),d:l,ref:i}))},cN={exports:{}},lN,i8;function Ame(){if(i8)return lN;i8=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return lN=e,lN}var oN,c8;function Dme(){if(c8)return oN;c8=1;var e=Ame();function t(){}function a(){}return a.resetWarningCache=t,oN=function(){function s(l,d,u,p,x,m){if(m!==e){var h=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 h.name="Invariant Violation",h}}s.isRequired=s;function r(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:r,element:s,elementType:s,instanceOf:r,node:s,objectOf:r,oneOf:r,oneOfType:r,shape:r,exact:r,checkPropTypes:a,resetWarningCache:t};return i.PropTypes=i,i},oN}var l8;function Ome(){return l8||(l8=1,cN.exports=Dme()()),cN.exports}var kme=Ome();const ia=Na(kme);var _me=Object.getOwnPropertyNames,Tme=Object.getOwnPropertySymbols,Pme=Object.prototype.hasOwnProperty;function o8(e,t){return function(s,r,i){return e(s,r,i)&&t(s,r,i)}}function Tg(e){return function(a,s,r){if(!a||!s||typeof a!="object"||typeof s!="object")return e(a,s,r);var i=r.cache,l=i.get(a),d=i.get(s);if(l&&d)return l===s&&d===a;i.set(a,s),i.set(s,a);var u=e(a,s,r);return i.delete(a),i.delete(s),u}}function Mme(e){return e?.[Symbol.toStringTag]}function d8(e){return _me(e).concat(Tme(e))}var Rme=Object.hasOwn||(function(e,t){return Pme.call(e,t)});function ho(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var Bme="__v",Ime="__o",Lme="_owner",u8=Object.getOwnPropertyDescriptor,p8=Object.keys;function $me(e,t,a){var s=e.length;if(t.length!==s)return!1;for(;s-- >0;)if(!a.equals(e[s],t[s],s,s,e,t,a))return!1;return!0}function zme(e,t){return ho(e.getTime(),t.getTime())}function Ume(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function qme(e,t){return e===t}function f8(e,t,a){var s=e.size;if(s!==t.size)return!1;if(!s)return!0;for(var r=new Array(s),i=e.entries(),l,d,u=0;(l=i.next())&&!l.done;){for(var p=t.entries(),x=!1,m=0;(d=p.next())&&!d.done;){if(r[m]){m++;continue}var h=l.value,y=d.value;if(a.equals(h[0],y[0],u,m,e,t,a)&&a.equals(h[1],y[1],h[0],y[0],e,t,a)){x=r[m]=!0;break}m++}if(!x)return!1;u++}return!0}var Fme=ho;function Wme(e,t,a){var s=p8(e),r=s.length;if(p8(t).length!==r)return!1;for(;r-- >0;)if(!yU(e,t,a,s[r]))return!1;return!0}function Ep(e,t,a){var s=d8(e),r=s.length;if(d8(t).length!==r)return!1;for(var i,l,d;r-- >0;)if(i=s[r],!yU(e,t,a,i)||(l=u8(e,i),d=u8(t,i),(l||d)&&(!l||!d||l.configurable!==d.configurable||l.enumerable!==d.enumerable||l.writable!==d.writable)))return!1;return!0}function Hme(e,t){return ho(e.valueOf(),t.valueOf())}function Vme(e,t){return e.source===t.source&&e.flags===t.flags}function m8(e,t,a){var s=e.size;if(s!==t.size)return!1;if(!s)return!0;for(var r=new Array(s),i=e.values(),l,d;(l=i.next())&&!l.done;){for(var u=t.values(),p=!1,x=0;(d=u.next())&&!d.done;){if(!r[x]&&a.equals(l.value,d.value,l.value,d.value,e,t,a)){p=r[x]=!0;break}x++}if(!p)return!1}return!0}function Gme(e,t){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(e[a]!==t[a])return!1;return!0}function Yme(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 yU(e,t,a,s){return(s===Lme||s===Ime||s===Bme)&&(e.$$typeof||t.$$typeof)?!0:Rme(t,s)&&a.equals(e[s],t[s],s,s,e,t,a)}var Kme="[object Arguments]",Qme="[object Boolean]",Xme="[object Date]",Zme="[object Error]",Jme="[object Map]",exe="[object Number]",txe="[object Object]",axe="[object RegExp]",nxe="[object Set]",sxe="[object String]",rxe="[object URL]",ixe=Array.isArray,x8=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,g8=Object.assign,cxe=Object.prototype.toString.call.bind(Object.prototype.toString);function lxe(e){var t=e.areArraysEqual,a=e.areDatesEqual,s=e.areErrorsEqual,r=e.areFunctionsEqual,i=e.areMapsEqual,l=e.areNumbersEqual,d=e.areObjectsEqual,u=e.arePrimitiveWrappersEqual,p=e.areRegExpsEqual,x=e.areSetsEqual,m=e.areTypedArraysEqual,h=e.areUrlsEqual,y=e.unknownTagComparators;
816return function(b,j,S){if(b===j)return!0;if(b==null||j==null)return!1;var O=typeof b;if(O!==typeof j)return!1;if(O!=="object")return O==="number"?l(b,j,S):O==="function"?r(b,j,S):!1;var A=b.constructor;if(A!==j.constructor)return!1;if(A===Object)return d(b,j,S);if(ixe(b))return t(b,j,S);if(x8!=null&&x8(b))return m(b,j,S);if(A===Date)return a(b,j,S);if(A===RegExp)return p(b,j,S);if(A===Map)return i(b,j,S);if(A===Set)return x(b,j,S);var k=cxe(b);if(k===Xme)return a(b,j,S);if(k===axe)return p(b,j,S);if(k===Jme)return i(b,j,S);if(k===nxe)return x(b,j,S);if(k===txe)return typeof b.then!="function"&&typeof j.then!="function"&&d(b,j,S);if(k===rxe)return h(b,j,S);if(k===Zme)return s(b,j,S);if(k===Kme)return d(b,j,S);if(k===Qme||k===exe||k===sxe)return u(b,j,S);if(y){var E=y[k];if(!E){var D=Mme(b);D&&(E=y[D])}if(E)return E(b,j,S)}return!1}}function oxe(e){var t=e.circular,a=e.createCustomConfig,s=e.strict,r={areArraysEqual:s?Ep:$me,areDatesEqual:zme,areErrorsEqual:Ume,areFunctionsEqual:qme,areMapsEqual:s?o8(f8,Ep):f8,areNumbersEqual:Fme,areObjectsEqual:s?Ep:Wme,arePrimitiveWrappersEqual:Hme,areRegExpsEqual:Vme,areSetsEqual:s?o8(m8,Ep):m8,areTypedArraysEqual:s?Ep:Gme,areUrlsEqual:Yme,unknownTagComparators:void 0};if(a&&(r=g8({},r,a(r))),t){var i=Tg(r.areArraysEqual),l=Tg(r.areMapsEqual),d=Tg(r.areObjectsEqual),u=Tg(r.areSetsEqual);r=g8({},r,{areArraysEqual:i,areMapsEqual:l,areObjectsEqual:d,areSetsEqual:u})}return r}function dxe(e){return function(t,a,s,r,i,l,d){return e(t,a,d)}}function uxe(e){var t=e.circular,a=e.comparator,s=e.createState,r=e.equals,i=e.strict;if(s)return function(u,p){var x=s(),m=x.cache,h=m===void 0?t?new WeakMap:void 0:m,y=x.meta;return a(u,p,{cache:h,equals:r,meta:y,strict:i})};if(t)return function(u,p){return a(u,p,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};var l={cache:void 0,equals:r,meta:void 0,strict:i};return function(u,p){return a(u,p,l)}}var pxe=il();il({strict:!0});il({circular:!0});il({circular:!0,strict:!0});il({createInternalComparator:function(){return ho}});il({strict:!0,createInternalComparator:function(){return ho}});il({circular:!0,createInternalComparator:function(){return ho}});il({circular:!0,createInternalComparator:function(){return ho},strict:!0});function il(e){e===void 0&&(e={});var t=e.circular,a=t===void 0?!1:t,s=e.createInternalComparator,r=e.createState,i=e.strict,l=i===void 0?!1:i,d=oxe(e),u=lxe(d),p=s?s(u):dxe(u);return uxe({circular:a,comparator:u,createState:r,equals:p,strict:l})}function fxe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function h8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=-1,s=function r(i){a<0&&(a=i),i-a>t?(e(i),a=-1):fxe(r)};requestAnimationFrame(s)}function OC(e){"@babel/helpers - typeof";return OC=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},OC(e)}function mxe(e){return vxe(e)||hxe(e)||gxe(e)||xxe()}function xxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
817In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gxe(e,t){if(e){if(typeof e=="string")return v8(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return v8(e,t)}}function v8(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function hxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vxe(e){if(Array.isArray(e))return e}function yxe(){var e={},t=function(){return null},a=!1,s=function r(i){if(!a){if(Array.isArray(i)){if(!i.length)return;var l=i,d=mxe(l),u=d[0],p=d.slice(1);if(typeof u=="number"){h8(r.bind(null,p),u);return}r(u),h8(r.bind(null,p));return}OC(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){a=!0},start:function(i){a=!1,s(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function y8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function b8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};
vendor: 162,127 bytes, lines 817-838
817t%2?y8(Object(a),!0).forEach(function(s){bU(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):y8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function bU(e,t,a){return t=bxe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function bxe(e){var t=jxe(e,"string");return Hf(t)==="symbol"?t:String(t)}function jxe(e,t){if(Hf(e)!=="object"||e===null)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Hf(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var wxe=function(t,a){return[Object.keys(t),Object.keys(a)].reduce(function(s,r){return s.filter(function(i){return r.includes(i)})})},Nxe=function(t){return t},Sxe=function(t){return t.replace(/([A-Z])/g,function(a){return"-".concat(a.toLowerCase())})},Jp=function(t,a){return Object.keys(a).reduce(function(s,r){return b8(b8({},s),{},bU({},r,t(r,a[r])))},{})},j8=function(t,a,s){return t.map(function(r){return"".concat(Sxe(r)," ").concat(a,"ms ").concat(s)}).join(",")};function Cxe(e,t){return Dxe(e)||Axe(e,t)||jU(e,t)||Exe()}function Exe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
818In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Axe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Dxe(e){if(Array.isArray(e))return e}function Oxe(e){return Txe(e)||_xe(e)||jU(e)||kxe()}function kxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
819In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jU(e,t){if(e){if(typeof e=="string")return kC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return kC(e,t)}}function _xe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Txe(e){if(Array.isArray(e))return kC(e)}function kC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var Hh=1e-4,wU=function(t,a){return[0,3*t,3*a-6*t,3*t-3*a+1]},NU=function(t,a){return t.map(function(s,r){return s*Math.pow(a,r)}).reduce(function(s,r){return s+r})},w8=function(t,a){return function(s){var r=wU(t,a);return NU(r,s)}},Pxe=function(t,a){return function(s){var r=wU(t,a),i=[].concat(Oxe(r.map(function(l,d){return l*d}).slice(1)),[0]);return NU(i,s)}},N8=function(){for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];var r=a[0],i=a[1],l=a[2],d=a[3];if(a.length===1)switch(a[0]){case"linear":r=0,i=0,l=1,d=1;break;case"ease":r=.25,i=.1,l=.25,d=1;break;case"ease-in":r=.42,i=0,l=1,d=1;break;case"ease-out":r=.42,i=0,l=.58,d=1;break;case"ease-in-out":r=0,i=0,l=.58,d=1;break;default:{var u=a[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var p=u[1].split(")")[0].split(",").map(function(j){return parseFloat(j)}),x=Cxe(p,4);r=x[0],i=x[1],l=x[2],d=x[3]}}}var m=w8(r,l),h=w8(i,d),y=Pxe(r,l),w=function(S){return S>1?1:S<0?0:S},b=function(S){for(var O=S>1?1:S,A=O,k=0;k<8;++k){var E=m(A)-O,D=y(A);if(Math.abs(E-O)<Hh||D<Hh)return h(A);A=w(A-E/D)}return h(A)};return b.isStepper=!1,b},Mxe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=t.stiff,s=a===void 0?100:a,r=t.damping,i=r===void 0?8:r,l=t.dt,d=l===void 0?17:l,u=function(x,m,h){var y=-(x-m)*s,w=h*i,b=h+(y-w)*d/1e3,j=h*d/1e3+x;return Math.abs(j-m)<Hh&&Math.abs(b)<Hh?[m,0]:[j,b]};return u.isStepper=!0,u.dt=d,u},Rxe=function(){for(var t=arguments.length,a=new Array(t),s=0;s<t;s++)a[s]=arguments[s];var r=a[0];if(typeof r=="string")switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return N8(r);case"spring":return Mxe();default:if(r.split("(")[0]==="cubic-bezier")return N8(r)}return typeof r=="function"?r:null};function Vf(e){"@babel/helpers - typeof";return Vf=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},Vf(e)}function S8(e){return Lxe(e)||Ixe(e)||SU(e)||Bxe()}function Bxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
820In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ixe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lxe(e){if(Array.isArray(e))return TC(e)}function C8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function On(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?C8(Object(a),!0).forEach(function(s){_C(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):C8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function _C(e,t,a){return t=$xe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function $xe(e){var t=zxe(e,"string");return Vf(t)==="symbol"?t:String(t)}function zxe(e,t){if(Vf(e)!=="object"||e===null)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Vf(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Uxe(e,t){return Wxe(e)||Fxe(e,t)||SU(e,t)||qxe()}function qxe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
821In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SU(e,t){if(e){if(typeof e=="string")return TC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return TC(e,t)}}function TC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Fxe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Wxe(e){if(Array.isArray(e))return e}var Vh=function(t,a,s){return t+(a-t)*s},PC=function(t){var a=t.from,s=t.to;return a!==s},Hxe=function e(t,a,s){var r=Jp(function(i,l){if(PC(l)){var d=t(l.from,l.to,l.velocity),u=Uxe(d,2),p=u[0],x=u[1];return On(On({},l),{},{from:p,velocity:x})}return l},a);return s<1?Jp(function(i,l){return PC(l)?On(On({},l),{},{velocity:Vh(l.velocity,r[i].velocity,s),from:Vh(l.from,r[i].from,s)}):l},a):e(t,r,s-1)};const Vxe=(function(e,t,a,s,r){var i=wxe(e,t),l=i.reduce(function(j,S){return On(On({},j),{},_C({},S,[e[S],t[S]]))},{}),d=i.reduce(function(j,S){return On(On({},j),{},_C({},S,{from:e[S],velocity:0,to:t[S]}))},{}),u=-1,p,x,m=function(){return null},h=function(){return Jp(function(S,O){return O.from},d)},y=function(){return!Object.values(d).filter(PC).length},w=function(S){p||(p=S);var O=S-p,A=O/a.dt;d=Hxe(a,d,A),r(On(On(On({},e),t),h())),p=S,y()||(u=requestAnimationFrame(m))},b=function(S){x||(x=S);var O=(S-x)/s,A=Jp(function(E,D){return Vh.apply(void 0,S8(D).concat([a(O)]))},l);if(r(On(On(On({},e),t),A)),O<1)u=requestAnimationFrame(m);else{var k=Jp(function(E,D){return Vh.apply(void 0,S8(D).concat([a(1)]))},l);r(On(On(On({},e),t),k))}};return m=a.isStepper?w:b,function(){return requestAnimationFrame(m),function(){cancelAnimationFrame(u)}}});function Wd(e){"@babel/helpers - typeof";return Wd=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},Wd(e)}var Gxe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Yxe(e,t){if(e==null)return{};var a=Kxe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Kxe(e,t){if(e==null)return{};var a={},s=Object.keys(e),r,i;for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}function dN(e){return Jxe(e)||Zxe(e)||Xxe(e)||Qxe()}function Qxe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
822In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Xxe(e,t){if(e){if(typeof e=="string")return MC(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return MC(e,t)}}function Zxe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jxe(e){if(Array.isArray(e))return MC(e)}function MC(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function E8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function sr(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?E8(Object(a),!0).forEach(function(s){Up(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):E8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Up(e,t,a){return t=CU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ege(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tge(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,CU(s.key),s)}}function age(e,t,a){return t&&tge(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CU(e){var t=nge(e,"string");return Wd(t)==="symbol"?t:String(t)}function nge(e,t){if(Wd(e)!=="object"||e===null)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Wd(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sge(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&&RC(e,t)}function RC(e,t){return RC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},RC(e,t)}function rge(e){var t=ige();return function(){var s=Gh(e),r;if(t){var i=Gh(this).constructor;r=Reflect.construct(s,arguments,i)}else r=s.apply(this,arguments);return BC(this,r)}}function BC(e,t){if(t&&(Wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IC(e)}function IC(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ige(){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 Gh(e){return Gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Gh(e)}var Vi=(function(e){sge(a,e);var t=rge(a);function a(s,r){var i;ege(this,a),i=t.call(this,s,r);var l=i.props,d=l.isActive,u=l.attributeName,p=l.from,x=l.to,m=l.steps,h=l.children,y=l.duration;if(i.handleStyleChange=i.handleStyleChange.bind(IC(i)),i.changeStyle=i.changeStyle.bind(IC(i)),!d||y<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:x}),BC(i);if(m&&m.length)i.state={style:m[0].style};else if(p){if(typeof h=="function")return i.state={style:p},BC(i);i.state={style:u?Up({},u,p):p}}else i.state={style:{}};return i}return age(a,[{key:"componentDidMount",value:function(){var r=this.props,i=r.isActive,l=r.canBegin;this.mounted=!0,!(!i||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(r){var i=this.props,l=i.isActive,d=i.canBegin,u=i.attributeName,p=i.shouldReAnimate,x=i.to,m=i.from,h=this.state.style;if(d){if(!l){var y={style:u?Up({},u,x):x};this.state&&h&&(u&&h[u]!==x||!u&&h!==x)&&this.setState(y);return}if(!(pxe(r.to,x)&&r.canBegin&&r.isActive)){var w=!r.canBegin||!r.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var b=w||p?m:r.to;if(this.state&&h){var j={style:u?Up({},u,b):b};(u&&h[u]!==b||!u&&h!==b)&&this.setState(j)}this.runAnimation(sr(sr({},this.props),{},{from:b,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var r=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),r&&r()}},{key:"handleStyleChange",value:function(r){this.changeStyle(r)}},{key:"changeStyle",value:function(r){this.mounted&&this.setState({style:r})}},{key:"runJSAnimation",value:function(r){var i=this,l=r.from,d=r.to,u=r.duration,p=r.easing,x=r.begin,m=r.onAnimationEnd,h=r.onAnimationStart,y=Vxe(l,d,Rxe(p),u,this.changeStyle),w=function(){i.stopJSAnimation=y()};this.manager.start([h,x,w,u,m])}},{key:"runStepAnimation",value:function(r){var i=this,l=r.steps,d=r.begin,u=r.onAnimationStart,p=l[0],x=p.style,m=p.duration,h=m===void 0?0:m,y=function(b,j,S){if(S===0)return b;var O=j.duration,A=j.easing,k=A===void 0?"ease":A,E=j.style,D=j.properties,_=j.onAnimationEnd,T=S>0?l[S-1]:j,I=D||Object.keys(E);if(typeof k=="function"||k==="spring")return[].concat(dN(b),[i.runJSAnimation.bind(i,{from:T.style,to:E,duration:O,easing:k}),O]);var $=j8(I,O,k),R=sr(sr(sr({},T.style),E),{},{transition:$});return[].concat(dN(b),[R,O,_]).filter(Nxe)};return this.manager.start([u].concat(dN(l.reduce(y,[x,Math.max(h,d)])),[r.onAnimationEnd]))}},{key:"runAnimation",value:function(r){this.manager||(this.manager=yxe());var i=r.begin,l=r.duration,d=r.attributeName,u=r.to,p=r.easing,x=r.onAnimationStart,m=r.onAnimationEnd,h=r.steps,y=r.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof p=="function"||typeof y=="function"||p==="spring"){this.runJSAnimation(r);return}if(h.length>1){this.runStepAnimation(r);return}var b=d?Up({},d,u):u,j=j8(Object.keys(b),l,p);w.start([x,i,sr(sr({},b),{},{transition:j}),l,m])}},{key:"render",value:function(){var r=this.props,i=r.children;r.begin;var l=r.duration;r.attributeName,r.easing;var d=r.isActive;r.steps,r.from,r.to,r.canBegin,r.onAnimationEnd,r.shouldReAnimate,r.onAnimationReStart;var u=Yxe(r,Gxe),p=v.Children.count(i),x=this.state.style;if(typeof i=="function")return i(x);if(!d||p===0||l<=0)return i;var m=function(y){var w=y.props,b=w.style,j=b===void 0?{}:b,S=w.className,O=v.cloneElement(y,sr(sr({},u),{},{style:sr(sr({},j),x),className:S}));return O};return p===1?m(v.Children.only(i)):W.createElement("div",null,v.Children.map(i,function(h){return m(h)}))}}]),a})(v.PureComponent);Vi.displayName="Animate";Vi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Vi.propTypes={from:ia.oneOfType([ia.object,ia.string]),to:ia.oneOfType([ia.object,ia.string]),attributeName:ia.string,duration:ia.number,begin:ia.number,easing:ia.oneOfType([ia.string,ia.func]),steps:ia.arrayOf(ia.shape({duration:ia.number.isRequired,style:ia.object.isRequired,easing:ia.oneOfType([ia.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),ia.func]),properties:ia.arrayOf("string"),onAnimationEnd:ia.func})),children:ia.oneOfType([ia.node,ia.func]),isActive:ia.bool,canBegin:ia.bool,onAnimationEnd:ia.func,shouldReAnimate:ia.bool,onAnimationStart:ia.func,onAnimationReStart:ia.func};function Gf(e){"@babel/helpers - typeof";return Gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(e)}function Yh(){return Yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Yh.apply(this,arguments)}function cge(e,t){return uge(e)||dge(e,t)||oge(e,t)||lge()}function lge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
823In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oge(e,t){if(e){if(typeof e=="string")return A8(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return A8(e,t)}}function A8(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function dge(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function uge(e){if(Array.isArray(e))return e}function D8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function O8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?D8(Object(a),!0).forEach(function(s){pge(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):D8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function pge(e,t,a){return t=fge(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function fge(e){var t=mge(e,"string");return Gf(t)=="symbol"?t:t+""}function mge(e,t){if(Gf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Gf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var k8=function(t,a,s,r,i){var l=Math.min(Math.abs(s)/2,Math.abs(r)/2),d=r>=0?1:-1,u=s>=0?1:-1,p=r>=0&&s>=0||r<0&&s<0?1:0,x;if(l>0&&i instanceof Array){for(var m=[0,0,0,0],h=0,y=4;h<y;h++)m[h]=i[h]>l?l:i[h];x="M".concat(t,",").concat(a+d*m[0]),m[0]>0&&(x+="A ".concat(m[0],",").concat(m[0],",0,0,").concat(p,",").concat(t+u*m[0],",").concat(a)),x+="L ".concat(t+s-u*m[1],",").concat(a),m[1]>0&&(x+="A ".concat(m[1],",").concat(m[1],",0,0,").concat(p,`,
824        `).concat(t+s,",").concat(a+d*m[1])),x+="L ".concat(t+s,",").concat(a+r-d*m[2]),m[2]>0&&(x+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(p,`,
825        `).concat(t+s-u*m[2],",").concat(a+r)),x+="L ".concat(t+u*m[3],",").concat(a+r),m[3]>0&&(x+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(p,`,
826        `).concat(t,",").concat(a+r-d*m[3])),x+="Z"}else if(l>0&&i===+i&&i>0){var w=Math.min(l,i);x="M ".concat(t,",").concat(a+d*w,`
827            A `).concat(w,",").concat(w,",0,0,").concat(p,",").concat(t+u*w,",").concat(a,`
828            L `).concat(t+s-u*w,",").concat(a,`
829            A `).concat(w,",").concat(w,",0,0,").concat(p,",").concat(t+s,",").concat(a+d*w,`
830            L `).concat(t+s,",").concat(a+r-d*w,`
831            A `).concat(w,",").concat(w,",0,0,").concat(p,",").concat(t+s-u*w,",").concat(a+r,`
832            L `).concat(t+u*w,",").concat(a+r,`
833            A `).concat(w,",").concat(w,",0,0,").concat(p,",").concat(t,",").concat(a+r-d*w," Z")}else x="M ".concat(t,",").concat(a," h ").concat(s," v ").concat(r," h ").concat(-s," Z");return x},xge=function(t,a){if(!t||!a)return!1;var s=t.x,r=t.y,i=a.x,l=a.y,d=a.width,u=a.height;if(Math.abs(d)>0&&Math.abs(u)>0){var p=Math.min(i,i+d),x=Math.max(i,i+d),m=Math.min(l,l+u),h=Math.max(l,l+u);return s>=p&&s<=x&&r>=m&&r<=h}return!1},gge={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},a4=function(t){var a=O8(O8({},gge),t),s=v.useRef(),r=v.useState(-1),i=cge(r,2),l=i[0],d=i[1];v.useEffect(function(){if(s.current&&s.current.getTotalLength)try{var k=s.current.getTotalLength();k&&d(k)}catch{}},[]);var u=a.x,p=a.y,x=a.width,m=a.height,h=a.radius,y=a.className,w=a.animationEasing,b=a.animationDuration,j=a.animationBegin,S=a.isAnimationActive,O=a.isUpdateAnimationActive;if(u!==+u||p!==+p||x!==+x||m!==+m||x===0||m===0)return null;var A=Qt("recharts-rectangle",y);return O?W.createElement(Vi,{canBegin:l>0,from:{width:x,height:m,x:u,y:p},to:{width:x,height:m,x:u,y:p},duration:b,animationEasing:w,isActive:O},function(k){var E=k.width,D=k.height,_=k.x,T=k.y;return W.createElement(Vi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:j,duration:b,isActive:S,easing:w},W.createElement("path",Yh({},Ft(a,!0),{className:A,d:k8(_,T,E,D,h),ref:s})))}):W.createElement("path",Yh({},Ft(a,!0),{className:A,d:k8(u,p,x,m,h)}))};function LC(){return LC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},LC.apply(this,arguments)}var n4=function(t){var a=t.cx,s=t.cy,r=t.r,i=t.className,l=Qt("recharts-dot",i);return a===+a&&s===+s&&r===+r?v.createElement("circle",LC({},Ft(t,!1),xh(t),{className:l,cx:a,cy:s,r})):null};function Yf(e){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yf(e)}var hge=["x","y","top","left","width","height","className"];function $C(){return $C=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},$C.apply(this,arguments)}function _8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function vge(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?_8(Object(a),!0).forEach(function(s){yge(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):_8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function yge(e,t,a){return t=bge(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function bge(e){var t=jge(e,"string");return Yf(t)=="symbol"?t:t+""}function jge(e,t){if(Yf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Yf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wge(e,t){if(e==null)return{};var a=Nge(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Nge(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}var Sge=function(t,a,s,r,i,l){return"M".concat(t,",").concat(i,"v").concat(r,"M").concat(l,",").concat(a,"h").concat(s)},Cge=function(t){var a=t.x,s=a===void 0?0:a,r=t.y,i=r===void 0?0:r,l=t.top,d=l===void 0?0:l,u=t.left,p=u===void 0?0:u,x=t.width,m=x===void 0?0:x,h=t.height,y=h===void 0?0:h,w=t.className,b=wge(t,hge),j=vge({x:s,y:i,top:d,left:p,width:m,height:y},b);return!ze(s)||!ze(i)||!ze(m)||!ze(y)||!ze(d)||!ze(p)?null:W.createElement("path",$C({},Ft(j,!0),{className:Qt("recharts-cross",w),d:Sge(s,i,m,y,d,p)}))},uN,T8;function Ege(){if(T8)return uN;T8=1;var e=H$(),t=e(Object.getPrototypeOf,Object);return uN=t,uN}var pN,P8;function Age(){if(P8)return pN;P8=1;var e=Ki(),t=Ege(),a=Qi(),s="[object Object]",r=Function.prototype,i=Object.prototype,l=r.toString,d=i.hasOwnProperty,u=l.call(Object);function p(x){if(!a(x)||e(x)!=s)return!1;var m=t(x);if(m===null)return!0;var h=d.call(m,"constructor")&&m.constructor;return typeof h=="function"&&h instanceof h&&l.call(h)==u}return pN=p,pN}var Dge=Age();const Oge=Na(Dge);var fN,M8;function kge(){if(M8)return fN;M8=1;var e=Ki(),t=Qi(),a="[object Boolean]";function s(r){return r===!0||r===!1||t(r)&&e(r)==a}return fN=s,fN}var _ge=kge();const Tge=Na(_ge);function Kf(e){"@babel/helpers - typeof";return Kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(e)}function Kh(){return Kh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Kh.apply(this,arguments)}function Pge(e,t){return Ige(e)||Bge(e,t)||Rge(e,t)||Mge()}function Mge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
834In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rge(e,t){if(e){if(typeof e=="string")return R8(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return R8(e,t)}}function R8(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Bge(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Ige(e){if(Array.isArray(e))return e}function B8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function I8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?B8(Object(a),!0).forEach(function(s){Lge(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):B8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Lge(e,t,a){return t=$ge(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function $ge(e){var t=zge(e,"string");return Kf(t)=="symbol"?t:t+""}function zge(e,t){if(Kf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Kf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var L8=function(t,a,s,r,i){var l=s-r,d;return d="M ".concat(t,",").concat(a),d+="L ".concat(t+s,",").concat(a),d+="L ".concat(t+s-l/2,",").concat(a+i),d+="L ".concat(t+s-l/2-r,",").concat(a+i),d+="L ".concat(t,",").concat(a," Z"),d},Uge={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},qge=function(t){var a=I8(I8({},Uge),t),s=v.useRef(),r=v.useState(-1),i=Pge(r,2),l=i[0],d=i[1];v.useEffect(function(){if(s.current&&s.current.getTotalLength)try{var A=s.current.getTotalLength();A&&d(A)}catch{}},[]);var u=a.x,p=a.y,x=a.upperWidth,m=a.lowerWidth,h=a.height,y=a.className,w=a.animationEasing,b=a.animationDuration,j=a.animationBegin,S=a.isUpdateAnimationActive;if(u!==+u||p!==+p||x!==+x||m!==+m||h!==+h||x===0&&m===0||h===0)return null;var O=Qt("recharts-trapezoid",y);return S?W.createElement(Vi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:p},to:{upperWidth:x,lowerWidth:m,height:h,x:u,y:p},duration:b,animationEasing:w,isActive:S},function(A){var k=A.upperWidth,E=A.lowerWidth,D=A.height,_=A.x,T=A.y;return W.createElement(Vi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:j,duration:b,easing:w},W.createElement("path",Kh({},Ft(a,!0),{className:O,d:L8(_,T,k,E,D),ref:s})))}):W.createElement("g",null,W.createElement("path",Kh({},Ft(a,!0),{className:O,d:L8(u,p,x,m,h)})))},Fge=["option","shapeType","propTransformer","activeClassName","isActive"];function Qf(e){"@babel/helpers - typeof";return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function Wge(e,t){if(e==null)return{};var a=Hge(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Hge(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function $8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Qh(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?$8(Object(a),!0).forEach(function(s){Vge(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):$8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Vge(e,t,a){return t=Gge(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Gge(e){var t=Yge(e,"string");return Qf(t)=="symbol"?t:t+""}function Yge(e,t){if(Qf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Qf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kge(e,t){return Qh(Qh({},t),e)}function Qge(e,t){return e==="symbols"}function z8(e){var t=e.shapeType,a=e.elementProps;switch(t){case"rectangle":return W.createElement(a4,a);case"trapezoid":return W.createElement(qge,a);case"sector":return W.createElement(vU,a);case"symbols":if(Qge(t))return W.createElement(j3,a);break;default:return null}}function Xge(e){return v.isValidElement(e)?e.props:e}function Zge(e){var t=e.option,a=e.shapeType,s=e.propTransformer,r=s===void 0?Kge:s,i=e.activeClassName,l=i===void 0?"recharts-active-shape":i,d=e.isActive,u=Wge(e,Fge),p;if(v.isValidElement(t))p=v.cloneElement(t,Qh(Qh({},u),Xge(t)));else if(Bt(t))p=t(u);else if(Oge(t)&&!Tge(t)){var x=r(t,u);p=W.createElement(z8,{shapeType:a,elementProps:x})}else{var m=u;p=W.createElement(z8,{shapeType:a,elementProps:m})}return d?W.createElement(za,{className:l},p):p}function ky(e,t){return t!=null&&"trapezoids"in e.props}function _y(e,t){return t!=null&&"sectors"in e.props}function Xf(e,t){return t!=null&&"points"in e.props}function Jge(e,t){var a,s,r=e.x===(t==null||(a=t.labelViewBox)===null||a===void 0?void 0:a.x)||e.x===t.x,i=e.y===(t==null||(s=t.labelViewBox)===null||s===void 0?void 0:s.y)||e.y===t.y;return r&&i}function ehe(e,t){var a=e.endAngle===t.endAngle,s=e.startAngle===t.startAngle;return a&&s}function the(e,t){var a=e.x===t.x,s=e.y===t.y,r=e.z===t.z;return a&&s&&r}function ahe(e,t){var a;return ky(e,t)?a=Jge:_y(e,t)?a=ehe:Xf(e,t)&&(a=the),a}function nhe(e,t){var a;return ky(e,t)?a="trapezoids":_y(e,t)?a="sectors":Xf(e,t)&&(a="points"),a}function she(e,t){if(ky(e,t)){var a;return(a=t.tooltipPayload)===null||a===void 0||(a=a[0])===null||a===void 0||(a=a.payload)===null||a===void 0?void 0:a.payload}if(_y(e,t)){var s;return(s=t.tooltipPayload)===null||s===void 0||(s=s[0])===null||s===void 0||(s=s.payload)===null||s===void 0?void 0:s.payload}return Xf(e,t)?t.payload:{}}function rhe(e){var t=e.activeTooltipItem,a=e.graphicalItem,s=e.itemData,r=nhe(a,t),i=she(a,t),l=s.filter(function(u,p){var x=Mf(i,u),m=a.props[r].filter(function(w){var b=ahe(a,t);return b(w,t)}),h=a.props[r].indexOf(m[m.length-1]),y=p===h;return x&&y}),d=s.indexOf(l[l.length-1]);return d}var mN,U8;function ihe(){if(U8)return mN;U8=1;var e=Math.ceil,t=Math.max;function a(s,r,i,l){for(var d=-1,u=t(e((r-s)/(i||1)),0),p=Array(u);u--;)p[l?u:++d]=s,s+=i;return p}return mN=a,mN}var xN,q8;function EU(){if(q8)return xN;q8=1;var e=cz(),t=1/0,a=17976931348623157e292;function s(r){if(!r)return r===0?r:0;if(r=e(r),r===t||r===-t){var i=r<0?-1:1;return i*a}return r===r?r:0}return xN=s,xN}var gN,F8;function che(){if(F8)return gN;F8=1;var e=ihe(),t=yy(),a=EU();function s(r){return function(i,l,d){return d&&typeof d!="number"&&t(i,l,d)&&(l=d=void 0),i=a(i),l===void 0?(l=i,i=0):l=a(l),d=d===void 0?i<l?1:-1:a(d),e(i,l,d,r)}}return gN=s,gN}var hN,W8;function lhe(){if(W8)return hN;W8=1;var e=che(),t=e();return hN=t,hN}var ohe=lhe();const Xh=Na(ohe);function Zf(e){"@babel/helpers - typeof";return Zf=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},Zf(e)}function H8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function V8(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?H8(Object(a),!0).forEach(function(s){AU(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):H8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function AU(e,t,a){return t=dhe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function dhe(e){var t=uhe(e,"string");return Zf(t)=="symbol"?t:t+""}function uhe(e,t){if(Zf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Zf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var phe=["Webkit","Moz","O","ms"],fhe=function(t,a){var s=t.replace(/(\w)/,function(i){return i.toUpperCase()}),r=phe.reduce(function(i,l){return V8(V8({},i),{},AU({},l+s,a))},{});return r[t]=a,r};function Hd(e){"@babel/helpers - typeof";return Hd=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},Hd(e)}function Zh(){return Zh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Zh.apply(this,arguments)}function G8(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function vN(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?G8(Object(a),!0).forEach(function(s){gs(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):G8(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function mhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y8(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,OU(s.key),s)}}function xhe(e,t,a){return t&&Y8(e.prototype,t),a&&Y8(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function ghe(e,t,a){return t=Jh(t),hhe(e,DU()?Reflect.construct(t,a||[],Jh(e).constructor):t.apply(e,a))}function hhe(e,t){if(t&&(Hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vhe(e)}function vhe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DU=function(){return!!e})()}function Jh(e){return Jh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},Jh(e)}function yhe(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&&zC(e,t)}function zC(e,t){return zC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},zC(e,t)}function gs(e,t,a){return t=OU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function OU(e){var t=bhe(e,"string");return Hd(t)=="symbol"?t:t+""}function bhe(e,t){if(Hd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Hd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jhe=function(t){var a=t.data,s=t.startIndex,r=t.endIndex,i=t.x,l=t.width,d=t.travellerWidth;if(!a||!a.length)return{};var u=a.length,p=Qp().domain(Xh(0,u)).range([i,i+l-d]),x=p.domain().map(function(m){return p(m)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:p(s),endX:p(r),scale:p,scaleValues:x}},K8=function(t){return t.changedTouches&&!!t.changedTouches.length},Vd=(function(e){function t(a){var s;return mhe(this,t),s=ghe(this,t,[a]),gs(s,"handleDrag",function(r){s.leaveTimer&&(clearTimeout(s.leaveTimer),s.leaveTimer=null),s.state.isTravellerMoving?s.handleTravellerMove(r):s.state.isSlideMoving&&s.handleSlideDrag(r)}),gs(s,"handleTouchMove",function(r){r.changedTouches!=null&&r.changedTouches.length>0&&s.handleDrag(r.changedTouches[0])}),gs(s,"handleDragEnd",function(){s.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var r=s.props,i=r.endIndex,l=r.onDragEnd,d=r.startIndex;l?.({endIndex:i,startIndex:d})}),s.detachDragEndListener()}),gs(s,"handleLeaveWrapper",function(){(s.state.isTravellerMoving||s.state.isSlideMoving)&&(s.leaveTimer=window.setTimeout(s.handleDragEnd,s.props.leaveTimeOut))}),gs(s,"handleEnterSlideOrTraveller",function(){s.setState({isTextActive:!0})}),gs(s,"handleLeaveSlideOrTraveller",function(){s.setState({isTextActive:!1})}),gs(s,"handleSlideDragStart",function(r){var i=K8(r)?r.changedTouches[0]:r;s.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),s.attachDragEndListener()}),s.travellerDragStartHandlers={startX:s.handleTravellerDragStart.bind(s,"startX"),endX:s.handleTravellerDragStart.bind(s,"endX")},s.state={},s}return yhe(t,e),xhe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(s){var r=s.startX,i=s.endX,l=this.state.scaleValues,d=this.props,u=d.gap,p=d.data,x=p.length-1,m=Math.min(r,i),h=Math.max(r,i),y=t.getIndexInRange(l,m),w=t.getIndexInRange(l,h);return{startIndex:y-y%u,endIndex:w===x?x:w-w%u}}},{key:"getTextOfTick",value:function(s){var r=this.props,i=r.data,l=r.tickFormatter,d=r.dataKey,u=As(i[s],d,s);return Bt(l)?l(u,s):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(s){var r=this.state,i=r.slideMoveStartX,l=r.startX,d=r.endX,u=this.props,p=u.x,x=u.width,m=u.travellerWidth,h=u.startIndex,y=u.endIndex,w=u.onChange,b=s.pageX-i;b>0?b=Math.min(b,p+x-m-d,p+x-m-l):b<0&&(b=Math.max(b,p-l,p-d));var j=this.getIndex({startX:l+b,endX:d+b});(j.startIndex!==h||j.endIndex!==y)&&w&&w(j),this.setState({startX:l+b,endX:d+b,slideMoveStartX:s.pageX})}},{key:"handleTravellerDragStart",value:function(s,r){var i=K8(r)?r.changedTouches[0]:r;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:s,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(s){var r=this.state,i=r.brushMoveStartX,l=r.movingTravellerId,d=r.endX,u=r.startX,p=this.state[l],x=this.props,m=x.x,h=x.width,y=x.travellerWidth,w=x.onChange,b=x.gap,j=x.data,S={startX:this.state.startX,endX:this.state.endX},O=s.pageX-i;O>0?O=Math.min(O,m+h-y-p):O<0&&(O=Math.max(O,m-p)),S[l]=p+O;var A=this.getIndex(S),k=A.startIndex,E=A.endIndex,D=function(){var T=j.length-1;return l==="startX"&&(d>u?k%b===0:E%b===0)||d<u&&E===T||l==="endX"&&(d>u?E%b===0:k%b===0)||d>u&&E===T};this.setState(gs(gs({},l,p+O),"brushMoveStartX",s.pageX),function(){w&&D()&&w(A)})}},{key:"handleTravellerMoveKeyboard",value:function(s,r){var i=this,l=this.state,d=l.scaleValues,u=l.startX,p=l.endX,x=this.state[r],m=d.indexOf(x);if(m!==-1){var h=m+s;if(!(h===-1||h>=d.length)){var y=d[h];r==="startX"&&y>=p||r==="endX"&&y<=u||this.setState(gs({},r,y),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var s=this.props,r=s.x,i=s.y,l=s.width,d=s.height,u=s.fill,p=s.stroke;return W.createElement("rect",{stroke:p,fill:u,x:r,y:i,width:l,height:d})}},{key:"renderPanorama",value:function(){var s=this.props,r=s.x,i=s.y,l=s.width,d=s.height,u=s.data,p=s.children,x=s.padding,m=v.Children.only(p);return m?W.cloneElement(m,{x:r,y:i,width:l,height:d,margin:x,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(s,r){var i,l,d=this,u=this.props,p=u.y,x=u.travellerWidth,m=u.height,h=u.traveller,y=u.ariaLabel,w=u.data,b=u.startIndex,j=u.endIndex,S=Math.max(s,this.props.x),O=vN(vN({},Ft(this.props,!1)),{},{x:S,y:p,width:x,height:m}),A=y||"Min value: ".concat((i=w[b])===null||i===void 0?void 0:i.name,", Max value: ").concat((l=w[j])===null||l===void 0?void 0:l.name);return W.createElement(za,{tabIndex:0,role:"slider","aria-label":A,"aria-valuenow":s,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[r],onTouchStart:this.travellerDragStartHandlers[r],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),d.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,r))},onFocus:function(){d.setState({isTravellerFocused:!0})},onBlur:function(){d.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,O))}},{key:"renderSlide",value:function(s,r){var i=this.props,l=i.y,d=i.height,u=i.stroke,p=i.travellerWidth,x=Math.min(s,r)+p,m=Math.max(Math.abs(r-s)-p,0);return W.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x,y:l,width:m,height:d})}},{key:"renderText",value:function(){var s=this.props,r=s.startIndex,i=s.endIndex,l=s.y,d=s.height,u=s.travellerWidth,p=s.stroke,x=this.state,m=x.startX,h=x.endX,y=5,w={pointerEvents:"none",fill:p};return W.createElement(za,{className:"recharts-brush-texts"},W.createElement(Dh,Zh({textAnchor:"end",verticalAnchor:"middle",x:Math.min(m,h)-y,y:l+d/2},w),this.getTextOfTick(r)),W.createElement(Dh,Zh({textAnchor:"start",verticalAnchor:"middle",x:Math.max(m,h)+u+y,y:l+d/2},w),this.getTextOfTick(i)))}},{key:"render",value:function(){var s=this.props,r=s.data,i=s.className,l=s.children,d=s.x,u=s.y,p=s.width,x=s.height,m=s.alwaysShowText,h=this.state,y=h.startX,w=h.endX,b=h.isTextActive,j=h.isSlideMoving,S=h.isTravellerMoving,O=h.isTravellerFocused;if(!r||!r.length||!ze(d)||!ze(u)||!ze(p)||!ze(x)||p<=0||x<=0)return null;var A=Qt("recharts-brush",i),k=W.Children.count(l)===1,E=fhe("userSelect","none");return W.createElement(za,{className:A,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),k&&this.renderPanorama(),this.renderSlide(y,w),this.renderTravellerLayer(y,"startX"),this.renderTravellerLayer(w,"endX"),(b||j||S||O||m)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(s){var r=s.x,i=s.y,l=s.width,d=s.height,u=s.stroke,p=Math.floor(i+d/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:r,y:i,width:l,height:d,fill:u,stroke:"none"}),W.createElement("line",{x1:r+1,y1:p,x2:r+l-1,y2:p,fill:"none",stroke:"#fff"}),W.createElement("line",{x1:r+1,y1:p+2,x2:r+l-1,y2:p+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(s,r){var i;return W.isValidElement(s)?i=W.cloneElement(s,r):Bt(s)?i=s(r):i=t.renderDefaultTraveller(r),i}},{key:"getDerivedStateFromProps",value:function(s,r){var i=s.data,l=s.width,d=s.x,u=s.travellerWidth,p=s.updateId,x=s.startIndex,m=s.endIndex;if(i!==r.prevData||p!==r.prevUpdateId)return vN({prevData:i,prevTravellerWidth:u,prevUpdateId:p,prevX:d,prevWidth:l},i&&i.length?jhe({data:i,width:l,x:d,travellerWidth:u,startIndex:x,endIndex:m}):{scale:null,scaleValues:null});if(r.scale&&(l!==r.prevWidth||d!==r.prevX||u!==r.prevTravellerWidth)){r.scale.range([d,d+l-u]);var h=r.scale.domain().map(function(y){return r.scale(y)});return{prevData:i,prevTravellerWidth:u,prevUpdateId:p,prevX:d,prevWidth:l,startX:r.scale(s.startIndex),endX:r.scale(s.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(s,r){for(var i=s.length,l=0,d=i-1;d-l>1;){var u=Math.floor((l+d)/2);s[u]>r?d=u:l=u}return r>=s[d]?d:l}}])})(v.PureComponent);gs(Vd,"displayName","Brush");gs(Vd,"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 yN,Q8;function whe(){if(Q8)return yN;Q8=1;var e=D3();function t(a,s){var r;return e(a,function(i,l,d){return r=s(i,l,d),!r}),!!r}return yN=t,yN}var bN,X8;function Nhe(){if(X8)return bN;X8=1;var e=L$(),t=nl(),a=whe(),s=cs(),r=yy();function i(l,d,u){var p=s(l)?e:a;return u&&r(l,d,u)&&(d=void 0),p(l,t(d,3))}return bN=i,bN}var She=Nhe();const Che=Na(She);var Wr=function(t,a){var s=t.alwaysShow,r=t.ifOverflow;return s&&(r="extendDomain"),r===a},jN,Z8;function Ehe(){if(Z8)return jN;Z8=1;var e=az();function t(a,s,r){s=="__proto__"&&e?e(a,s,{configurable:!0,enumerable:!0,value:r,writable:!0}):a[s]=r}return jN=t,jN}var wN,J8;function Ahe(){if(J8)return wN;J8=1;var e=Ehe(),t=ez(),a=nl();function s(r,i){var l={};return i=a(i,3),t(r,function(d,u,p){e(l,u,i(d,u,p))}),l}return wN=s,wN}var Dhe=Ahe();const Ohe=Na(Dhe);var NN,eR;function khe(){if(eR)return NN;eR=1;function e(t,a){for(var s=-1,r=t==null?0:t.length;++s<r;)if(!a(t[s],s,t))return!1;return!0}return NN=e,NN}var SN,tR;function _he(){if(tR)return SN;tR=1;var e=D3();function t(a,s){var r=!0;return e(a,function(i,l,d){return r=!!s(i,l,d),r}),r}return SN=t,SN}var CN,aR;function The(){if(aR)return CN;aR=1;var e=khe(),t=_he(),a=nl(),s=cs(),r=yy();function i(l,d,u){var p=s(l)?e:t;return u&&r(l,d,u)&&(d=void 0),p(l,a(d,3))}return CN=i,CN}var Phe=The();const kU=Na(Phe);var Mhe=["x","y"];function Jf(e){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jf(e)}function UC(){return UC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},UC.apply(this,arguments)}function nR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Ap(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(a),!0).forEach(function(s){Rhe(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):nR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Rhe(e,t,a){return t=Bhe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function Bhe(e){var t=Ihe(e,"string");return Jf(t)=="symbol"?t:t+""}function Ihe(e,t){if(Jf(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Jf(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lhe(e,t){if(e==null)return{};var a=$he(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function $he(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function zhe(e,t){var a=e.x,s=e.y,r=Lhe(e,Mhe),i="".concat(a),l=parseInt(i,10),d="".concat(s),u=parseInt(d,10),p="".concat(t.height||r.height),x=parseInt(p,10),m="".concat(t.width||r.width),h=parseInt(m,10);return Ap(Ap(Ap(Ap(Ap({},t),r),l?{x:l}:{}),u?{y:u}:{}),{},{height:x,width:h,name:t.name,radius:t.radius})}function sR(e){return W.createElement(Zge,UC({shapeType:"rectangle",propTransformer:zhe,activeClassName:"recharts-active-bar"},e))}var Uhe=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(s,r){if(typeof t=="number")return t;var i=ze(s)||Qse(s);return i?t(s,r):(i||no(),a)}},qhe=["value","background"],_U;function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function Fhe(e,t){if(e==null)return{};var a=Whe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Whe(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function ev(){return ev=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},ev.apply(this,arguments)}function rR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function cn(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(a),!0).forEach(function(s){Pc(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):rR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Hhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iR(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,PU(s.key),s)}}function Vhe(e,t,a){return t&&iR(e.prototype,t),a&&iR(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ghe(e,t,a){return t=tv(t),Yhe(e,TU()?Reflect.construct(t,a||[],tv(e).constructor):t.apply(e,a))}function Yhe(e,t){if(t&&(Gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Khe(e)}function Khe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function TU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(TU=function(){return!!e})()}function tv(e){return tv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},tv(e)}function Qhe(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&&qC(e,t)}function qC(e,t){return qC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},qC(e,t)}function Pc(e,t,a){return t=PU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function PU(e){var t=Xhe(e,"string");return Gd(t)=="symbol"?t:t+""}function Xhe(e,t){if(Gd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Gd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Kr=(function(e){function t(){var a;Hhe(this,t);for(var s=arguments.length,r=new Array(s),i=0;i<s;i++)r[i]=arguments[i];return a=Ghe(this,t,[].concat(r)),Pc(a,"state",{isAnimationFinished:!1}),Pc(a,"id",Pm("recharts-bar-")),Pc(a,"handleAnimationEnd",function(){var l=a.props.onAnimationEnd;a.setState({isAnimationFinished:!0}),l&&l()}),Pc(a,"handleAnimationStart",function(){var l=a.props.onAnimationStart;a.setState({isAnimationFinished:!1}),l&&l()}),a}return Qhe(t,e),Vhe(t,[{key:"renderRectanglesStatically",value:function(s){var r=this,i=this.props,l=i.shape,d=i.dataKey,u=i.activeIndex,p=i.activeBar,x=Ft(this.props,!1);return s&&s.map(function(m,h){var y=h===u,w=y?p:l,b=cn(cn(cn({},x),m),{},{isActive:y,option:w,index:h,dataKey:d,onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd});return W.createElement(za,ev({className:"recharts-bar-rectangle"},gh(r.props,m,h),{key:"rectangle-".concat(m?.x,"-").concat(m?.y,"-").concat(m?.value,"-").concat(h)}),W.createElement(sR,b))})}},{key:"renderRectanglesWithAnimation",value:function(){var s=this,r=this.props,i=r.data,l=r.layout,d=r.isAnimationActive,u=r.animationBegin,p=r.animationDuration,x=r.animationEasing,m=r.animationId,h=this.state.prevData;return W.createElement(Vi,{begin:u,duration:p,isActive:d,easing:x,from:{t:0},to:{t:1},key:"bar-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(y){var w=y.t,b=i.map(function(j,S){var O=h&&h[S];if(O){var A=Gs(O.x,j.x),k=Gs(O.y,j.y),E=Gs(O.width,j.width),D=Gs(O.height,j.height);return cn(cn({},j),{},{x:A(w),y:k(w),width:E(w),height:D(w)})}if(l==="horizontal"){var _=Gs(0,j.height),T=_(w);return cn(cn({},j),{},{y:j.y+j.height-T,height:T})}var I=Gs(0,j.width),$=I(w);return cn(cn({},j),{},{width:$})});return W.createElement(za,null,s.renderRectanglesStatically(b))})}},{key:"renderRectangles",value:function(){var s=this.props,r=s.data,i=s.isAnimationActive,l=this.state.prevData;return i&&r&&r.length&&(!l||!Mf(l,r))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(r)}},{key:"renderBackground",value:function(){var s=this,r=this.props,i=r.data,l=r.dataKey,d=r.activeIndex,u=Ft(this.props.background,!1);return i.map(function(p,x){p.value;var m=p.background,h=Fhe(p,qhe);if(!m)return null;var y=cn(cn(cn(cn(cn({},h),{},{fill:"#eee"},m),u),gh(s.props,p,x)),{},{onAnimationStart:s.handleAnimationStart,onAnimationEnd:s.handleAnimationEnd,dataKey:l,index:x,className:"recharts-bar-background-rectangle"});return W.createElement(sR,ev({key:"background-bar-".concat(x),option:s.props.background,isActive:x===d},y))})}},{key:"renderErrorBar",value:function(s,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,l=i.data,d=i.xAxis,u=i.yAxis,p=i.layout,x=i.children,m=dr(x,Oy);if(!m)return null;var h=p==="vertical"?l[0].height/2:l[0].width/2,y=function(j,S){var O=Array.isArray(j.value)?j.value[1]:j.value;return{x:j.x,y:j.y,value:O,errorVal:As(j,S)}},w={clipPath:s?"url(#clipPath-".concat(r,")"):null};return W.createElement(za,w,m.map(function(b){return W.cloneElement(b,{key:"error-bar-".concat(r,"-").concat(b.props.dataKey),data:l,xAxis:d,yAxis:u,layout:p,offset:h,dataPointFormatter:y})}))}},{key:"render",value:function(){var s=this.props,r=s.hide,i=s.data,l=s.className,d=s.xAxis,u=s.yAxis,p=s.left,x=s.top,m=s.width,h=s.height,y=s.isAnimationActive,w=s.background,b=s.id;if(r||!i||!i.length)return null;var j=this.state.isAnimationFinished,S=Qt("recharts-bar",l),O=d&&d.allowDataOverflow,A=u&&u.allowDataOverflow,k=O||A,E=Yt(b)?this.id:b;return W.createElement(za,{className:S},O||A?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(E)},W.createElement("rect",{x:O?p:p-m/2,y:A?x:x-h/2,width:O?m:m*2,height:A?h:h*2}))):null,W.createElement(za,{className:"recharts-bar-rectangles",clipPath:k?"url(#clipPath-".concat(E,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(k,E),(!y||j)&&zc.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(s,r){return s.animationId!==r.prevAnimationId?{prevAnimationId:s.animationId,curData:s.data,prevData:r.curData}:s.data!==r.curData?{curData:s.data}:null}}])})(v.PureComponent);_U=Kr;Pc(Kr,"displayName","Bar");Pc(Kr,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!gu.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Pc(Kr,"getComposedData",function(e){var t=e.props,a=e.item,s=e.barPosition,r=e.bandSize,i=e.xAxis,l=e.yAxis,d=e.xAxisTicks,u=e.yAxisTicks,p=e.stackedData,x=e.dataStartIndex,m=e.displayedData,h=e.offset,y=xfe(s,a);if(!y)return null;var w=t.layout,b=a.type.defaultProps,j=b!==void 0?cn(cn({},b),a.props):a.props,S=j.dataKey,O=j.children,A=j.minPointSize,k=w==="horizontal"?l:i,E=p?k.scale.domain():null,D=Nfe({numericAxis:k}),_=dr(O,oz),T=m.map(function(I,$){var R,B,Y,z,Q,L;p?R=gfe(p[x+$],E):(R=As(I,S),Array.isArray(R)||(R=[D,R]));var M=Uhe(A,_U.defaultProps.minPointSize)(R[1],$);if(w==="horizontal"){var U,Z=[l.scale(R[0]),l.scale(R[1])],ie=Z[0],G=Z[1];B=F6({axis:i,ticks:d,bandSize:r,offset:y.offset,entry:I,index:$}),Y=(U=G??ie)!==null&&U!==void 0?U:void 0,z=y.size;var F=ie-G;if(Q=Number.isNaN(F)?0:F,L={x:B,y:l.y,width:z,height:l.height},Math.abs(M)>0&&Math.abs(Q)<Math.abs(M)){var H=lr(Q||M)*(Math.abs(M)-Math.abs(Q));Y-=H,Q+=H}}else{var q=[i.scale(R[0]),i.scale(R[1])],J=q[0],ce=q[1];if(B=J,Y=F6({axis:l,ticks:u,bandSize:r,offset:y.offset,entry:I,index:$}),z=ce-J,Q=y.size,L={x:i.x,y:Y,width:i.width,height:Q},Math.abs(M)>0&&Math.abs(z)<Math.abs(M)){var se=lr(z||M)*(Math.abs(M)-Math.abs(z));z+=se}}return cn(cn(cn({},I),{},{x:B,y:Y,width:z,height:Q,value:p?R:R[1],payload:I,background:L},_&&_[$]&&_[$].props),{},{tooltipPayload:[xU(a,I)],tooltipPosition:{x:B+z/2,y:Y+Q/2}})});return cn({data:T,layout:w},h)});function em(e){"@babel/helpers - typeof";return em=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},em(e)}function Zhe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cR(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,MU(s.key),s)}}function Jhe(e,t,a){return t&&cR(e.prototype,t),a&&cR(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function lR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function ir(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?lR(Object(a),!0).forEach(function(s){Ty(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):lR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Ty(e,t,a){return t=MU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function MU(e){var t=eve(e,"string");return em(t)=="symbol"?t:t+""}function eve(e,t){if(em(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(em(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RU=function(t,a,s,r,i){var l=t.width,d=t.height,u=t.layout,p=t.children,x=Object.keys(a),m={left:s.left,leftMirror:s.left,right:l-s.right,rightMirror:l-s.right,top:s.top,topMirror:s.top,bottom:d-s.bottom,bottomMirror:d-s.bottom},h=!!hs(p,Kr);return x.reduce(function(y,w){var b=a[w],j=b.orientation,S=b.domain,O=b.padding,A=O===void 0?{}:O,k=b.mirror,E=b.reversed,D="".concat(j).concat(k?"Mirror":""),_,T,I,$,R;if(b.type==="number"&&(b.padding==="gap"||b.padding==="no-gap")){var B=S[1]-S[0],Y=1/0,z=b.categoricalDomain.sort(Jse);if(z.forEach(function(q,J){J>0&&(Y=Math.min((q||0)-(z[J-1]||0),Y))}),Number.isFinite(Y)){var Q=Y/B,L=b.layout==="vertical"?s.height:s.width;if(b.padding==="gap"&&(_=Q*L/2),b.padding==="no-gap"){var M=to(t.barCategoryGap,Q*L),U=Q*L/2;_=U-M-(U-M)/L*M}}}r==="xAxis"?T=[s.left+(A.left||0)+(_||0),s.left+s.width-(A.right||0)-(_||0)]:r==="yAxis"?T=u==="horizontal"?[s.top+s.height-(A.bottom||0),s.top+(A.top||0)]:[s.top+(A.top||0)+(_||0),s.top+s.height-(A.bottom||0)-(_||0)]:T=b.range,E&&(T=[T[1],T[0]]);var Z=ffe(b,i,h),ie=Z.scale,G=Z.realScaleType;ie.domain(S).range(T),mfe(ie);var F=wfe(ie,ir(ir({},b),{},{realScaleType:G}));r==="xAxis"?(R=j==="top"&&!k||j==="bottom"&&k,I=s.left,$=m[D]-R*b.height):r==="yAxis"&&(R=j==="left"&&!k||j==="right"&&k,I=m[D]-R*b.width,$=s.top);var H=ir(ir(ir({},b),F),{},{realScaleType:G,x:I,y:$,scale:ie,width:r==="xAxis"?s.width:b.width,height:r==="yAxis"?s.height:b.height});return H.bandSize=qh(H,F),!b.hide&&r==="xAxis"?m[D]+=(R?-1:1)*H.height:b.hide||(m[D]+=(R?-1:1)*H.width),ir(ir({},y),{},Ty({},w,H))},{})},BU=function(t,a){var s=t.x,r=t.y,i=a.x,l=a.y;return{x:Math.min(s,i),y:Math.min(r,l),width:Math.abs(i-s),height:Math.abs(l-r)}},tve=function(t){var a=t.x1,s=t.y1,r=t.x2,i=t.y2;return BU({x:a,y:s},{x:r,y:i})},IU=(function(){function e(t){Zhe(this,e),this.scale=t}return Jhe(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(a){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=s.bandAware,i=s.position;if(a!==void 0){if(i)switch(i){case"start":return this.scale(a);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+l}case"end":{var d=this.bandwidth?this.bandwidth():0;return this.scale(a)+d}default:return this.scale(a)}if(r){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(a)+u}return this.scale(a)}}},{key:"isInRange",value:function(a){var s=this.range(),r=s[0],i=s[s.length-1];return r<=i?a>=r&&a<=i:a>=i&&a<=r}}],[{key:"create",value:function(a){return new e(a)}}])})();Ty(IU,"EPS",1e-4);var s4=function(t){var a=Object.keys(t).reduce(function(s,r){return ir(ir({},s),{},Ty({},r,IU.create(t[r])))},{});return ir(ir({},a),{},{apply:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.bandAware,d=i.position;return Ohe(r,function(u,p){return a[p].apply(u,{bandAware:l,position:d})})},isInRange:function(r){return kU(r,function(i,l){return a[l].isInRange(i)})}})};function ave(e){return(e%180+180)%180}var nve=function(t){var a=t.width,s=t.height,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=ave(r),l=i*Math.PI/180,d=Math.atan(s/a),u=l>d&&l<Math.PI-d?s/Math.sin(l):a/Math.cos(l);return Math.abs(u)},EN,oR;function sve(){if(oR)return EN;oR=1;var e=nl(),t=Mm(),a=hy();function s(r){return function(i,l,d){var u=Object(i);if(!t(i)){var p=e(l,3);i=a(i),l=function(m){return p(u[m],m,u)}}var x=r(i,l,d);return x>-1?u[p?i[x]:x]:void 0}}return EN=s,EN}var AN,dR;function rve(){if(dR)return AN;dR=1;var e=EU();function t(a){var s=e(a),r=s%1;return s===s?r?s-r:s:0}return AN=t,AN}var DN,uR;function ive(){if(uR)return DN;uR=1;var e=K$(),t=nl(),a=rve(),s=Math.max;function r(i,l,d){var u=i==null?0:i.length;if(!u)return-1;var p=d==null?0:a(d);return p<0&&(p=s(u+p,0)),e(i,t(l,3),p)}return DN=r,DN}var ON,pR;function cve(){if(pR)return ON;pR=1;var e=sve(),t=ive(),a=e(t);return ON=a,ON}var lve=cve();const ove=Na(lve);var dve=u$();const uve=Na(dve);var pve=uve(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("")}),r4=v.createContext(void 0),i4=v.createContext(void 0),LU=v.createContext(void 0),$U=v.createContext({}),zU=v.createContext(void 0),UU=v.createContext(0),qU=v.createContext(0),fR=function(t){var a=t.state,s=a.xAxisMap,r=a.yAxisMap,i=a.offset,l=t.clipPathId,d=t.children,u=t.width,p=t.height,x=pve(i);return W.createElement(r4.Provider,{value:s},W.createElement(i4.Provider,{value:r},W.createElement($U.Provider,{value:i},W.createElement(LU.Provider,{value:x},W.createElement(zU.Provider,{value:l},W.createElement(UU.Provider,{value:p},W.createElement(qU.Provider,{value:u},d)))))))},fve=function(){return v.useContext(zU)},FU=function(t){var a=v.useContext(r4);a==null&&no();var s=a[t];return s==null&&no(),s},mve=function(){var t=v.useContext(r4);return kc(t)},xve=function(){var t=v.useContext(i4),a=ove(t,function(s){return kU(s.domain,Number.isFinite)});return a||kc(t)},WU=function(t){var a=v.useContext(i4);a==null&&no();var s=a[t];return s==null&&no(),s},gve=function(){var t=v.useContext(LU);return t},hve=function(){return v.useContext($U)},c4=function(){return v.useContext(qU)},l4=function(){return v.useContext(UU)};function Yd(e){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yd(e)}function vve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yve(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,VU(s.key),s)}}function bve(e,t,a){return t&&yve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jve(e,t,a){return t=av(t),wve(e,HU()?Reflect.construct(t,a||[],av(e).constructor):t.apply(e,a))}function wve(e,t){if(t&&(Yd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nve(e)}function Nve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function HU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(HU=function(){return!!e})()}function av(e){return av=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},av(e)}function Sve(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&&FC(e,t)}function FC(e,t){return FC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},FC(e,t)}function mR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function xR(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?mR(Object(a),!0).forEach(function(s){o4(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):mR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function o4(e,t,a){return t=VU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function VU(e){var t=Cve(e,"string");return Yd(t)=="symbol"?t:t+""}function Cve(e,t){if(Yd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Yd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Eve(e,t){return kve(e)||Ove(e,t)||Dve(e,t)||Ave()}function Ave(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
835In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dve(e,t){if(e){if(typeof e=="string")return gR(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return gR(e,t)}}function gR(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function Ove(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function kve(e){if(Array.isArray(e))return e}function WC(){return WC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},WC.apply(this,arguments)}var _ve=function(t,a){var s;return W.isValidElement(t)?s=W.cloneElement(t,a):Bt(t)?s=t(a):s=W.createElement("line",WC({},a,{className:"recharts-reference-line-line"})),s},Tve=function(t,a,s,r,i,l,d,u,p){var x=i.x,m=i.y,h=i.width,y=i.height;if(s){var w=p.y,b=t.y.apply(w,{position:l});if(Wr(p,"discard")&&!t.y.isInRange(b))return null;var j=[{x:x+h,y:b},{x,y:b}];return u==="left"?j.reverse():j}if(a){var S=p.x,O=t.x.apply(S,{position:l});if(Wr(p,"discard")&&!t.x.isInRange(O))return null;var A=[{x:O,y:m+y},{x:O,y:m}];return d==="top"?A.reverse():A}if(r){var k=p.segment,E=k.map(function(D){return t.apply(D,{position:l})});return Wr(p,"discard")&&Che(E,function(D){return!t.isInRange(D)})?null:E}return null};function Pve(e){var t=e.x,a=e.y,s=e.segment,r=e.xAxisId,i=e.yAxisId,l=e.shape,d=e.className,u=e.alwaysShow,p=fve(),x=FU(r),m=WU(i),h=gve();if(!p||!h)return null;ki(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var y=s4({x:x.scale,y:m.scale}),w=gn(t),b=gn(a),j=s&&s.length===2,S=Tve(y,w,b,j,h,e.position,x.orientation,m.orientation,e);if(!S)return null;var O=Eve(S,2),A=O[0],k=A.x,E=A.y,D=O[1],_=D.x,T=D.y,I=Wr(e,"hidden")?"url(#".concat(p,")"):void 0,$=xR(xR({clipPath:I},Ft(e,!0)),{},{x1:k,y1:E,x2:_,y2:T});return W.createElement(za,{className:Qt("recharts-reference-line",d)},_ve(l,$),$n.renderCallByParent(e,tve({x1:k,y1:E,x2:_,y2:T})))}var d4=(function(e){function t(){return vve(this,t),jve(this,t,arguments)}return Sve(t,e),bve(t,[{key:"render",value:function(){return W.createElement(Pve,this.props)}}])})(W.Component);o4(d4,"displayName","ReferenceLine");o4(d4,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function HC(){return HC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},HC.apply(this,arguments)}function Kd(e){"@babel/helpers - typeof";return Kd=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},Kd(e)}function hR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function vR(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?hR(Object(a),!0).forEach(function(s){Py(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):hR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Mve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rve(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,YU(s.key),s)}}function Bve(e,t,a){return t&&Rve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ive(e,t,a){return t=nv(t),Lve(e,GU()?Reflect.construct(t,a||[],nv(e).constructor):t.apply(e,a))}function Lve(e,t){if(t&&(Kd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $ve(e)}function $ve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GU=function(){return!!e})()}function nv(e){return nv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},nv(e)}function zve(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VC(e,t)}function VC(e,t){return VC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},VC(e,t)}function Py(e,t,a){return t=YU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function YU(e){var t=Uve(e,"string");return Kd(t)=="symbol"?t:t+""}function Uve(e,t){if(Kd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Kd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qve=function(t){var a=t.x,s=t.y,r=t.xAxis,i=t.yAxis,l=s4({x:r.scale,y:i.scale}),d=l.apply({x:a,y:s},{bandAware:!0});return Wr(t,"discard")&&!l.isInRange(d)?null:d},My=(function(e){function t(){return Mve(this,t),Ive(this,t,arguments)}return zve(t,e),Bve(t,[{key:"render",value:function(){var s=this.props,r=s.x,i=s.y,l=s.r,d=s.alwaysShow,u=s.clipPathId,p=gn(r),x=gn(i);if(ki(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!p||!x)return null;var m=qve(this.props);if(!m)return null;var h=m.x,y=m.y,w=this.props,b=w.shape,j=w.className,S=Wr(this.props,"hidden")?"url(#".concat(u,")"):void 0,O=vR(vR({clipPath:S},Ft(this.props,!0)),{},{cx:h,cy:y});return W.createElement(za,{className:Qt("recharts-reference-dot",j)},t.renderDot(b,O),$n.renderCallByParent(this.props,{x:h-l,y:y-l,width:2*l,height:2*l}))}}])})(W.Component);Py(My,"displayName","ReferenceDot");Py(My,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Py(My,"renderDot",function(e,t){var a;return W.isValidElement(e)?a=W.cloneElement(e,t):Bt(e)?a=e(t):a=W.createElement(n4,HC({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),a});function GC(){return GC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},GC.apply(this,arguments)}function Qd(e){"@babel/helpers - typeof";return Qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(e)}function yR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function bR(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?yR(Object(a),!0).forEach(function(s){Ry(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):yR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Fve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wve(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,QU(s.key),s)}}function Hve(e,t,a){return t&&Wve(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Vve(e,t,a){return t=sv(t),Gve(e,KU()?Reflect.construct(t,a||[],sv(e).constructor):t.apply(e,a))}function Gve(e,t){if(t&&(Qd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yve(e)}function Yve(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KU=function(){return!!e})()}function sv(e){return sv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},sv(e)}function Kve(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&&YC(e,t)}function YC(e,t){return YC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},YC(e,t)}function Ry(e,t,a){return t=QU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function QU(e){var t=Qve(e,"string");return Qd(t)=="symbol"?t:t+""}function Qve(e,t){if(Qd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Qd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xve=function(t,a,s,r,i){var l=i.x1,d=i.x2,u=i.y1,p=i.y2,x=i.xAxis,m=i.yAxis;if(!x||!m)return null;var h=s4({x:x.scale,y:m.scale}),y={x:t?h.x.apply(l,{position:"start"}):h.x.rangeMin,y:s?h.y.apply(u,{position:"start"}):h.y.rangeMin},w={x:a?h.x.apply(d,{position:"end"}):h.x.rangeMax,y:r?h.y.apply(p,{position:"end"}):h.y.rangeMax};return Wr(i,"discard")&&(!h.isInRange(y)||!h.isInRange(w))?null:BU(y,w)},By=(function(e){function t(){return Fve(this,t),Vve(this,t,arguments)}return Kve(t,e),Hve(t,[{key:"render",value:function(){var s=this.props,r=s.x1,i=s.x2,l=s.y1,d=s.y2,u=s.className,p=s.alwaysShow,x=s.clipPathId;ki(p===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=gn(r),h=gn(i),y=gn(l),w=gn(d),b=this.props.shape;if(!m&&!h&&!y&&!w&&!b)return null;var j=Xve(m,h,y,w,this.props);if(!j&&!b)return null;var S=Wr(this.props,"hidden")?"url(#".concat(x,")"):void 0;return W.createElement(za,{className:Qt("recharts-reference-area",u)},t.renderRect(b,bR(bR({clipPath:S},Ft(this.props,!0)),j)),$n.renderCallByParent(this.props,j))}}])})(W.Component);Ry(By,"displayName","ReferenceArea");Ry(By,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Ry(By,"renderRect",function(e,t){var a;return W.isValidElement(e)?a=W.cloneElement(e,t):Bt(e)?a=e(t):a=W.createElement(a4,GC({},t,{className:"recharts-reference-area-rect"})),a});function XU(e,t,a){if(t<1)return[];if(t===1&&a===void 0)return e;for(var s=[],r=0;r<e.length;r+=t)s.push(e[r]);return s}function Zve(e,t,a){var s={width:e.width+t.width,height:e.height+t.height};return nve(s,a)}function Jve(e,t,a){var s=a==="width",r=e.x,i=e.y,l=e.width,d=e.height;return t===1?{start:s?r:i,end:s?r+l:i+d}:{start:s?r+l:i+d,end:s?r:i}}function rv(e,t,a,s,r){if(e*t<e*s||e*t>e*r)return!1;var i=a();return e*(t-e*i/2-s)>=0&&e*(t+e*i/2-r)<=0}function eye(e,t){return XU(e,t+1)}function tye(e,t,a,s,r){for(var i=(s||[]).slice(),l=t.start,d=t.end,u=0,p=1,x=l,m=function(){var w=s?.[u];if(w===void 0)return{v:XU(s,p)};var b=u,j,S=function(){return j===void 0&&(j=a(w,b)),j},O=w.coordinate,A=u===0||rv(e,O,S,x,d);A||(u=0,x=l,p+=1),A&&(x=O+e*(S()/2+r),u+=p)},h;p<=i.length;)if(h=m(),h)return h.v;return[]}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 jR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Bn(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?jR(Object(a),!0).forEach(function(s){aye(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):jR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function aye(e,t,a){return t=nye(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function nye(e){var t=sye(e,"string");return tm(t)=="symbol"?t:t+""}function sye(e,t){if(tm(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(tm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rye(e,t,a,s,r){for(var i=(s||[]).slice(),l=i.length,d=t.start,u=t.end,p=function(h){var y=i[h],w,b=function(){return w===void 0&&(w=a(y,h)),w};if(h===l-1){var j=e*(y.coordinate+e*b()/2-u);i[h]=y=Bn(Bn({},y),{},{tickCoord:j>0?y.coordinate-j*e:y.coordinate})}else i[h]=y=Bn(Bn({},y),{},{tickCoord:y.coordinate});var S=rv(e,y.tickCoord,b,d,u);S&&(u=y.tickCoord-e*(b()/2+r),i[h]=Bn(Bn({},y),{},{isShow:!0}))},x=l-1;x>=0;x--)p(x);return i}function iye(e,t,a,s,r,i){var l=(s||[]).slice(),d=l.length,u=t.start,p=t.end;if(i){var x=s[d-1],m=a(x,d-1),h=e*(x.coordinate+e*m/2-p);l[d-1]=x=Bn(Bn({},x),{},{tickCoord:h>0?x.coordinate-h*e:x.coordinate});var y=rv(e,x.tickCoord,function(){return m},u,p);y&&(p=x.tickCoord-e*(m/2+r),l[d-1]=Bn(Bn({},x),{},{isShow:!0}))}for(var w=i?d-1:d,b=function(O){var A=l[O],k,E=function(){return k===void 0&&(k=a(A,O)),k};if(O===0){var D=e*(A.coordinate-e*E()/2-u);l[O]=A=Bn(Bn({},A),{},{tickCoord:D<0?A.coordinate-D*e:A.coordinate})}else l[O]=A=Bn(Bn({},A),{},{tickCoord:A.coordinate});var _=rv(e,A.tickCoord,E,u,p);_&&(u=A.tickCoord+e*(E()/2+r),l[O]=Bn(Bn({},A),{},{isShow:!0}))},j=0;j<w;j++)b(j);return l}function u4(e,t,a){var s=e.tick,r=e.ticks,i=e.viewBox,l=e.minTickGap,d=e.orientation,u=e.interval,p=e.tickFormatter,x=e.unit,m=e.angle;if(!r||!r.length||!s)return[];if(ze(u)||gu.isSsr)return eye(r,typeof u=="number"&&ze(u)?u:0);var h=[],y=d==="top"||d==="bottom"?"width":"height",w=x&&y==="width"?Kp(x,{fontSize:t,letterSpacing:a}):{width:0,height:0},b=function(A,k){var E=Bt(p)?p(A.value,k):A.value;return y==="width"?Zve(Kp(E,{fontSize:t,letterSpacing:a}),w,m):Kp(E,{fontSize:t,letterSpacing:a})[y]},j=r.length>=2?lr(r[1].coordinate-r[0].coordinate):1,S=Jve(i,j,y);return u==="equidistantPreserveStart"?tye(j,S,b,r,l):(u==="preserveStart"||u==="preserveStartEnd"?h=iye(j,S,b,r,l,u==="preserveStartEnd"):h=rye(j,S,b,r,l),h.filter(function(O){return O.isShow}))}var cye=["viewBox"],lye=["viewBox"],oye=["ticks"];function Xd(e){"@babel/helpers - typeof";return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xd(e)}function xd(){return xd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},xd.apply(this,arguments)}function wR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function fn(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?wR(Object(a),!0).forEach(function(s){p4(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):wR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function kN(e,t){if(e==null)return{};var a=dye(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function dye(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function uye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NR(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,JU(s.key),s)}}function pye(e,t,a){return t&&NR(e.prototype,t),a&&NR(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function fye(e,t,a){return t=iv(t),mye(e,ZU()?Reflect.construct(t,a||[],iv(e).constructor):t.apply(e,a))}function mye(e,t){if(t&&(Xd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xye(e)}function xye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZU=function(){return!!e})()}function iv(e){return iv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},iv(e)}function gye(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&&KC(e,t)}function KC(e,t){return KC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},KC(e,t)}function p4(e,t,a){return t=JU(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function JU(e){var t=hye(e,"string");return Xd(t)=="symbol"?t:t+""}function hye(e,t){if(Xd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Xd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bu=(function(e){function t(a){var s;return uye(this,t),s=fye(this,t,[a]),s.state={fontSize:"",letterSpacing:""},s}return gye(t,e),pye(t,[{key:"shouldComponentUpdate",value:function(s,r){var i=s.viewBox,l=kN(s,cye),d=this.props,u=d.viewBox,p=kN(d,lye);return!jd(i,u)||!jd(l,p)||!jd(r,this.state)}},{key:"componentDidMount",value:function(){var s=this.layerReference;if(s){var r=s.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];r&&this.setState({fontSize:window.getComputedStyle(r).fontSize,letterSpacing:window.getComputedStyle(r).letterSpacing})}}},{key:"getTickLineCoord",value:function(s){var r=this.props,i=r.x,l=r.y,d=r.width,u=r.height,p=r.orientation,x=r.tickSize,m=r.mirror,h=r.tickMargin,y,w,b,j,S,O,A=m?-1:1,k=s.tickSize||x,E=ze(s.tickCoord)?s.tickCoord:s.coordinate;switch(p){case"top":y=w=s.coordinate,j=l+ +!m*u,b=j-A*k,O=b-A*h,S=E;break;case"left":b=j=s.coordinate,w=i+ +!m*d,y=w-A*k,S=y-A*h,O=E;break;case"right":b=j=s.coordinate,w=i+ +m*d,y=w+A*k,S=y+A*h,O=E;break;default:y=w=s.coordinate,j=l+ +m*u,b=j+A*k,O=b+A*h,S=E;break}return{line:{x1:y,y1:b,x2:w,y2:j},tick:{x:S,y:O}}}},{key:"getTickTextAnchor",value:function(){var s=this.props,r=s.orientation,i=s.mirror,l;switch(r){case"left":l=i?"start":"end";break;case"right":l=i?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var s=this.props,r=s.orientation,i=s.mirror,l="end";switch(r){case"left":case"right":l="middle";break;case"top":l=i?"start":"end";break;default:l=i?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var s=this.props,r=s.x,i=s.y,l=s.width,d=s.height,u=s.orientation,p=s.mirror,x=s.axisLine,m=fn(fn(fn({},Ft(this.props,!1)),Ft(x,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var h=+(u==="top"&&!p||u==="bottom"&&p);m=fn(fn({},m),{},{x1:r,y1:i+h*d,x2:r+l,y2:i+h*d})}else{var y=+(u==="left"&&!p||u==="right"&&p);m=fn(fn({},m),{},{x1:r+y*l,y1:i,x2:r+y*l,y2:i+d})}return W.createElement("line",xd({},m,{className:Qt("recharts-cartesian-axis-line",Xs(x,"className"))}))}},{key:"renderTicks",value:function(s,r,i){var l=this,d=this.props,u=d.tickLine,p=d.stroke,x=d.tick,m=d.tickFormatter,h=d.unit,y=u4(fn(fn({},this.props),{},{ticks:s}),r,i),w=this.getTickTextAnchor(),b=this.getTickVerticalAnchor(),j=Ft(this.props,!1),S=Ft(x,!1),O=fn(fn({},j),{},{fill:"none"},Ft(u,!1)),A=y.map(function(k,E){var D=l.getTickLineCoord(k),_=D.line,T=D.tick,I=fn(fn(fn(fn({textAnchor:w,verticalAnchor:b},j),{},{stroke:"none",fill:p},S),T),{},{index:E,payload:k,visibleTicksCount:y.length,tickFormatter:m});return W.createElement(za,xd({className:"recharts-cartesian-axis-tick",key:"tick-".concat(k.value,"-").concat(k.coordinate,"-").concat(k.tickCoord)},gh(l.props,k,E)),u&&W.createElement("line",xd({},O,_,{className:Qt("recharts-cartesian-axis-tick-line",Xs(u,"className"))})),x&&t.renderTickItem(x,I,"".concat(Bt(m)?m(k.value,E):k.value).concat(h||"")))});return W.createElement("g",{className:"recharts-cartesian-axis-ticks"},A)}},{key:"render",value:function(){var s=this,r=this.props,i=r.axisLine,l=r.width,d=r.height,u=r.ticksGenerator,p=r.className,x=r.hide;if(x)return null;var m=this.props,h=m.ticks,y=kN(m,oye),w=h;return Bt(u)&&(w=h&&h.length>0?u(this.props):u(y)),l<=0||d<=0||!w||!w.length?null:W.createElement(za,{className:Qt("recharts-cartesian-axis",p),ref:function(j){s.layerReference=j}},i&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),$n.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(s,r,i){var l,d=Qt(r.className,"recharts-cartesian-axis-tick-value");return W.isValidElement(s)?l=W.cloneElement(s,fn(fn({},r),{},{className:d})):Bt(s)?l=s(fn(fn({},r),{},{className:d})):l=W.createElement(Dh,xd({},r,{className:"recharts-cartesian-axis-tick-value"}),i),l}}])})(v.Component);p4(bu,"displayName","CartesianAxis");p4(bu,"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 vye=["x1","y1","x2","y2","key"],yye=["offset"];function so(e){"@babel/helpers - typeof";return so=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},so(e)}function SR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function zn(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?SR(Object(a),!0).forEach(function(s){bye(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):SR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function bye(e,t,a){return t=jye(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function jye(e){var t=wye(e,"string");return so(t)=="symbol"?t:t+""}function wye(e,t){if(so(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(so(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},zl.apply(this,arguments)}function CR(e,t){if(e==null)return{};var a=Nye(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Nye(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}var Sye=function(t){var a=t.fill;if(!a||a==="none")return null;var s=t.fillOpacity,r=t.x,i=t.y,l=t.width,d=t.height,u=t.ry;return W.createElement("rect",{x:r,y:i,ry:u,width:l,height:d,stroke:"none",fill:a,fillOpacity:s,className:"recharts-cartesian-grid-bg"})};function eq(e,t){var a;if(W.isValidElement(e))a=W.cloneElement(e,t);else if(Bt(e))a=e(t);else{var s=t.x1,r=t.y1,i=t.x2,l=t.y2,d=t.key,u=CR(t,vye),p=Ft(u,!1);p.offset;var x=CR(p,yye);a=W.createElement("line",zl({},x,{x1:s,y1:r,x2:i,y2:l,fill:"none",key:d}))}return a}function Cye(e){var t=e.x,a=e.width,s=e.horizontal,r=s===void 0?!0:s,i=e.horizontalPoints;if(!r||!i||!i.length)return null;var l=i.map(function(d,u){var p=zn(zn({},e),{},{x1:t,y1:d,x2:t+a,y2:d,key:"line-".concat(u),index:u});return eq(r,p)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Eye(e){var t=e.y,a=e.height,s=e.vertical,r=s===void 0?!0:s,i=e.verticalPoints;if(!r||!i||!i.length)return null;var l=i.map(function(d,u){var p=zn(zn({},e),{},{x1:d,y1:t,x2:d,y2:t+a,key:"line-".concat(u),index:u});return eq(r,p)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Aye(e){var t=e.horizontalFill,a=e.fillOpacity,s=e.x,r=e.y,i=e.width,l=e.height,d=e.horizontalPoints,u=e.horizontal,p=u===void 0?!0:u;if(!p||!t||!t.length)return null;var x=d.map(function(h){return Math.round(h+r-r)}).sort(function(h,y){return h-y});r!==x[0]&&x.unshift(0);var m=x.map(function(h,y){var w=!x[y+1],b=w?r+l-h:x[y+1]-h;if(b<=0)return null;var j=y%t.length;return W.createElement("rect",{key:"react-".concat(y),y:h,x:s,height:b,width:i,stroke:"none",fill:t[j],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},m)}function Dye(e){var t=e.vertical,a=t===void 0?!0:t,s=e.verticalFill,r=e.fillOpacity,i=e.x,l=e.y,d=e.width,u=e.height,p=e.verticalPoints;if(!a||!s||!s.length)return null;var x=p.map(function(h){return Math.round(h+i-i)}).sort(function(h,y){return h-y});i!==x[0]&&x.unshift(0);var m=x.map(function(h,y){var w=!x[y+1],b=w?i+d-h:x[y+1]-h;if(b<=0)return null;var j=y%s.length;return W.createElement("rect",{key:"react-".concat(y),x:h,y:l,width:b,height:u,stroke:"none",fill:s[j],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},m)}var Oye=function(t,a){var s=t.xAxis,r=t.width,i=t.height,l=t.offset;return fU(u4(zn(zn(zn({},bu.defaultProps),s),{},{ticks:Ci(s,!0),viewBox:{x:0,y:0,width:r,height:i}})),l.left,l.left+l.width,a)},kye=function(t,a){var s=t.yAxis,r=t.width,i=t.height,l=t.offset;return fU(u4(zn(zn(zn({},bu.defaultProps),s),{},{ticks:Ci(s,!0),viewBox:{x:0,y:0,width:r,height:i}})),l.top,l.top+l.height,a)},id={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function am(e){var t,a,s,r,i,l,d=c4(),u=l4(),p=hve(),x=zn(zn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:id.stroke,fill:(a=e.fill)!==null&&a!==void 0?a:id.fill,horizontal:(s=e.horizontal)!==null&&s!==void 0?s:id.horizontal,horizontalFill:(r=e.horizontalFill)!==null&&r!==void 0?r:id.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:id.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:id.verticalFill,x:ze(e.x)?e.x:p.left,y:ze(e.y)?e.y:p.top,width:ze(e.width)?e.width:p.width,height:ze(e.height)?e.height:p.height}),m=x.x,h=x.y,y=x.width,w=x.height,b=x.syncWithTicks,j=x.horizontalValues,S=x.verticalValues,O=mve(),A=xve();if(!ze(y)||y<=0||!ze(w)||w<=0||!ze(m)||m!==+m||!ze(h)||h!==+h)return null;var k=x.verticalCoordinatesGenerator||Oye,E=x.horizontalCoordinatesGenerator||kye,D=x.horizontalPoints,_=x.verticalPoints;if((!D||!D.length)&&Bt(E)){var T=j&&j.length,I=E({yAxis:A?zn(zn({},A),{},{ticks:T?j:A.ticks}):void 0,width:d,height:u,offset:p},T?!0:b);ki(Array.isArray(I),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(so(I),"]")),Array.isArray(I)&&(D=I)}if((!_||!_.length)&&Bt(k)){var $=S&&S.length,R=k({xAxis:O?zn(zn({},O),{},{ticks:$?S:O.ticks}):void 0,width:d,height:u,offset:p},$?!0:b);ki(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(so(R),"]")),Array.isArray(R)&&(_=R)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(Sye,{fill:x.fill,fillOpacity:x.fillOpacity,x:x.x,y:x.y,width:x.width,height:x.height,ry:x.ry}),W.createElement(Cye,zl({},x,{offset:p,horizontalPoints:D,xAxis:O,yAxis:A})),W.createElement(Eye,zl({},x,{offset:p,verticalPoints:_,xAxis:O,yAxis:A})),W.createElement(Aye,zl({},x,{horizontalPoints:D})),W.createElement(Dye,zl({},x,{verticalPoints:_})))}am.displayName="CartesianGrid";var _ye=["layout","type","stroke","connectNulls","isRange","ref"],Tye=["key"],tq;function Zd(e){"@babel/helpers - typeof";return Zd=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},Zd(e)}function aq(e,t){if(e==null)return{};var a=Pye(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Pye(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},Ul.apply(this,arguments)}function ER(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Ac(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?ER(Object(a),!0).forEach(function(s){$r(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ER(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Mye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AR(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,sq(s.key),s)}}function Rye(e,t,a){return t&&AR(e.prototype,t),a&&AR(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bye(e,t,a){return t=cv(t),Iye(e,nq()?Reflect.construct(t,a||[],cv(e).constructor):t.apply(e,a))}function Iye(e,t){if(t&&(Zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lye(e)}function Lye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nq=function(){return!!e})()}function cv(e){return cv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},cv(e)}function $ye(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&&QC(e,t)}function QC(e,t){return QC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},QC(e,t)}function $r(e,t,a){return t=sq(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function sq(e){var t=zye(e,"string");return Zd(t)=="symbol"?t:t+""}function zye(e,t){if(Zd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Zd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Qr=(function(e){function t(){var a;Mye(this,t);for(var s=arguments.length,r=new Array(s),i=0;i<s;i++)r[i]=arguments[i];return a=Bye(this,t,[].concat(r)),$r(a,"state",{isAnimationFinished:!0}),$r(a,"id",Pm("recharts-area-")),$r(a,"handleAnimationEnd",function(){var l=a.props.onAnimationEnd;a.setState({isAnimationFinished:!0}),Bt(l)&&l()}),$r(a,"handleAnimationStart",function(){var l=a.props.onAnimationStart;a.setState({isAnimationFinished:!1}),Bt(l)&&l()}),a}return $ye(t,e),Rye(t,[{key:"renderDots",value:function(s,r,i){var l=this.props.isAnimationActive,d=this.state.isAnimationFinished;if(l&&!d)return null;var u=this.props,p=u.dot,x=u.points,m=u.dataKey,h=Ft(this.props,!1),y=Ft(p,!0),w=x.map(function(j,S){var O=Ac(Ac(Ac({key:"dot-".concat(S),r:3},h),y),{},{index:S,cx:j.x,cy:j.y,dataKey:m,value:j.value,payload:j.payload,points:x});return t.renderDotItem(p,O)}),b={clipPath:s?"url(#clipPath-".concat(r?"":"dots-").concat(i,")"):null};return W.createElement(za,Ul({className:"recharts-area-dots"},b),w)}},{key:"renderHorizontalRect",value:function(s){var r=this.props,i=r.baseLine,l=r.points,d=r.strokeWidth,u=l[0].x,p=l[l.length-1].x,x=s*Math.abs(u-p),m=Tc(l.map(function(h){return h.y||0}));return ze(i)&&typeof i=="number"?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(Tc(i.map(function(h){return h.y||0})),m)),ze(m)?W.createElement("rect",{x:u<p?u:u-x,y:0,width:x,height:Math.floor(m+(d?parseInt("".concat(d),10):1))}):null}},{key:"renderVerticalRect",value:function(s){var r=this.props,i=r.baseLine,l=r.points,d=r.strokeWidth,u=l[0].y,p=l[l.length-1].y,x=s*Math.abs(u-p),m=Tc(l.map(function(h){return h.x||0}));return ze(i)&&typeof i=="number"?m=Math.max(i,m):i&&Array.isArray(i)&&i.length&&(m=Math.max(Tc(i.map(function(h){return h.x||0})),m)),ze(m)?W.createElement("rect",{x:0,y:u<p?u:u-x,width:m+(d?parseInt("".concat(d),10):1),height:Math.floor(x)}):null}},{key:"renderClipRect",value:function(s){var r=this.props.layout;return r==="vertical"?this.renderVerticalRect(s):this.renderHorizontalRect(s)}},{key:"renderAreaStatically",value:function(s,r,i,l){var d=this.props,u=d.layout,p=d.type,x=d.stroke,m=d.connectNulls,h=d.isRange;d.ref;var y=aq(d,_ye);return W.createElement(za,{clipPath:i?"url(#clipPath-".concat(l,")"):null},W.createElement(Zp,Ul({},Ft(y,!0),{points:s,connectNulls:m,type:p,baseLine:r,layout:u,stroke:"none",className:"recharts-area-area"})),x!=="none"&&W.createElement(Zp,Ul({},Ft(this.props,!1),{className:"recharts-area-curve",layout:u,type:p,connectNulls:m,fill:"none",points:s})),x!=="none"&&h&&W.createElement(Zp,Ul({},Ft(this.props,!1),{className:"recharts-area-curve",layout:u,type:p,connectNulls:m,fill:"none",points:r})))}},{key:"renderAreaWithAnimation",value:function(s,r){var i=this,l=this.props,d=l.points,u=l.baseLine,p=l.isAnimationActive,x=l.animationBegin,m=l.animationDuration,h=l.animationEasing,y=l.animationId,w=this.state,b=w.prevPoints,j=w.prevBaseLine;return W.createElement(Vi,{begin:x,duration:m,isActive:p,easing:h,from:{t:0},to:{t:1},key:"area-".concat(y),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var O=S.t;if(b){var A=b.length/d.length,k=d.map(function(T,I){var $=Math.floor(I*A);if(b[$]){var R=b[$],B=Gs(R.x,T.x),Y=Gs(R.y,T.y);return Ac(Ac({},T),{},{x:B(O),y:Y(O)})}return T}),E;if(ze(u)&&typeof u=="number"){var D=Gs(j,u);E=D(O)}else if(Yt(u)||mu(u)){var _=Gs(j,0);E=_(O)}else E=u.map(function(T,I){var $=Math.floor(I*A);if(j[$]){var R=j[$],B=Gs(R.x,T.x),Y=Gs(R.y,T.y);return Ac(Ac({},T),{},{x:B(O),y:Y(O)})}return T});return i.renderAreaStatically(k,E,s,r)}return W.createElement(za,null,W.createElement("defs",null,W.createElement("clipPath",{id:"animationClipPath-".concat(r)},i.renderClipRect(O))),W.createElement(za,{clipPath:"url(#animationClipPath-".concat(r,")")},i.renderAreaStatically(d,u,s,r)))})}},{key:"renderArea",value:function(s,r){var i=this.props,l=i.points,d=i.baseLine,u=i.isAnimationActive,p=this.state,x=p.prevPoints,m=p.prevBaseLine,h=p.totalLength;return u&&l&&l.length&&(!x&&h>0||!Mf(x,l)||!Mf(m,d))?this.renderAreaWithAnimation(s,r):this.renderAreaStatically(l,d,s,r)}},{key:"render",value:function(){var s,r=this.props,i=r.hide,l=r.dot,d=r.points,u=r.className,p=r.top,x=r.left,m=r.xAxis,h=r.yAxis,y=r.width,w=r.height,b=r.isAnimationActive,j=r.id;if(i||!d||!d.length)return null;var S=this.state.isAnimationFinished,O=d.length===1,A=Qt("recharts-area",u),k=m&&m.allowDataOverflow,E=h&&h.allowDataOverflow,D=k||E,_=Yt(j)?this.id:j,T=(s=Ft(l,!1))!==null&&s!==void 0?s:{r:3,strokeWidth:2},I=T.r,$=I===void 0?3:I,R=T.strokeWidth,B=R===void 0?2:R,Y=lre(l)?l:{},z=Y.clipDot,Q=z===void 0?!0:z,L=$*2+B;return W.createElement(za,{className:A},k||E?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(_)},W.createElement("rect",{x:k?x:x-y/2,y:E?p:p-w/2,width:k?y:y*2,height:E?w:w*2})),!Q&&W.createElement("clipPath",{id:"clipPath-dots-".concat(_)},W.createElement("rect",{x:x-L/2,y:p-L/2,width:y+L,height:w+L}))):null,O?null:this.renderArea(D,_),(l||O)&&this.renderDots(D,Q,_),(!b||S)&&zc.renderCallByParent(this.props,d))}}],[{key:"getDerivedStateFromProps",value:function(s,r){return s.animationId!==r.prevAnimationId?{prevAnimationId:s.animationId,curPoints:s.points,curBaseLine:s.baseLine,prevPoints:r.curPoints,prevBaseLine:r.curBaseLine}:s.points!==r.curPoints||s.baseLine!==r.curBaseLine?{curPoints:s.points,curBaseLine:s.baseLine}:null}}])})(v.PureComponent);tq=Qr;$r(Qr,"displayName","Area");$r(Qr,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!gu.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});$r(Qr,"getBaseValue",function(e,t,a,s){var r=e.layout,i=e.baseValue,l=t.props.baseValue,d=l??i;if(ze(d)&&typeof d=="number")return d;var u=r==="horizontal"?s:a,p=u.scale.domain();if(u.type==="number"){var x=Math.max(p[0],p[1]),m=Math.min(p[0],p[1]);return d==="dataMin"?m:d==="dataMax"||x<0?x:Math.max(Math.min(p[0],p[1]),0)}return d==="dataMin"?p[0]:d==="dataMax"?p[1]:p[0]});$r(Qr,"getComposedData",function(e){var t=e.props,a=e.item,s=e.xAxis,r=e.yAxis,i=e.xAxisTicks,l=e.yAxisTicks,d=e.bandSize,u=e.dataKey,p=e.stackedData,x=e.dataStartIndex,m=e.displayedData,h=e.offset,y=t.layout,w=p&&p.length,b=tq.getBaseValue(t,a,s,r),j=y==="horizontal",S=!1,O=m.map(function(k,E){var D;w?D=p[x+E]:(D=As(k,u),Array.isArray(D)?S=!0:D=[b,D]);var _=D[1]==null||w&&As(k,u)==null;return j?{x:q6({axis:s,ticks:i,bandSize:d,entry:k,index:E}),y:_?null:r.scale(D[1]),value:D,payload:k}:{x:_?null:s.scale(D[1]),y:q6({axis:r,ticks:l,bandSize:d,entry:k,index:E}),value:D,payload:k}}),A;return w||S?A=O.map(function(k){var E=Array.isArray(k.value)?k.value[0]:null;return j?{x:k.x,y:E!=null&&k.y!=null?r.scale(E):null}:{x:E!=null?s.scale(E):null,y:k.y}}):A=j?r.scale(b):s.scale(b),Ac({points:O,baseLine:A,layout:y,isRange:S},h)});$r(Qr,"renderDotItem",function(e,t){var a;if(W.isValidElement(e))a=W.cloneElement(e,t);else if(Bt(e))a=e(t);else{var s=Qt("recharts-area-dot",typeof e!="boolean"?e.className:""),r=t.key,i=aq(t,Tye);a=W.createElement(n4,Ul({},i,{key:r,className:s}))}return a});function Jd(e){"@babel/helpers - typeof";return Jd=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},Jd(e)}function Uye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qye(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,cq(s.key),s)}}function Fye(e,t,a){return t&&qye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wye(e,t,a){return t=lv(t),Hye(e,rq()?Reflect.construct(t,a||[],lv(e).constructor):t.apply(e,a))}function Hye(e,t){if(t&&(Jd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vye(e)}function Vye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rq=function(){return!!e})()}function lv(e){return lv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},lv(e)}function Gye(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&&XC(e,t)}function XC(e,t){return XC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},XC(e,t)}function iq(e,t,a){return t=cq(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function cq(e){var t=Yye(e,"string");return Jd(t)=="symbol"?t:t+""}function Yye(e,t){if(Jd(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(Jd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ZC(){return ZC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},ZC.apply(this,arguments)}function Kye(e){var t=e.xAxisId,a=c4(),s=l4(),r=FU(t);return r==null?null:v.createElement(bu,ZC({},r,{className:Qt("recharts-".concat(r.axisType," ").concat(r.axisType),r.className),viewBox:{x:0,y:0,width:a,height:s},ticksGenerator:function(l){return Ci(l,!0)}}))}var Gc=(function(e){function t(){return Uye(this,t),Wye(this,t,arguments)}return Gye(t,e),Fye(t,[{key:"render",value:function(){return v.createElement(Kye,this.props)}}])})(v.Component);iq(Gc,"displayName","XAxis");iq(Gc,"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 eu(e){"@babel/helpers - typeof";return eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eu(e)}function Qye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xye(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,dq(s.key),s)}}function Zye(e,t,a){return t&&Xye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jye(e,t,a){return t=ov(t),ebe(e,lq()?Reflect.construct(t,a||[],ov(e).constructor):t.apply(e,a))}function ebe(e,t){if(t&&(eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tbe(e)}function tbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lq=function(){return!!e})()}function ov(e){return ov=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},ov(e)}function abe(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&&JC(e,t)}function JC(e,t){return JC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},JC(e,t)}function oq(e,t,a){return t=dq(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function dq(e){var t=nbe(e,"string");return eu(t)=="symbol"?t:t+""}function nbe(e,t){if(eu(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(eu(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function e5(){return e5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},e5.apply(this,arguments)}var sbe=function(t){var a=t.yAxisId,s=c4(),r=l4(),i=WU(a);return i==null?null:v.createElement(bu,e5({},i,{className:Qt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:s,height:r},ticksGenerator:function(d){return Ci(d,!0)}}))},Yc=(function(e){function t(){return Qye(this,t),Jye(this,t,arguments)}return abe(t,e),Zye(t,[{key:"render",value:function(){return v.createElement(sbe,this.props)}}])})(v.Component);oq(Yc,"displayName","YAxis");oq(Yc,"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 DR(e){return lbe(e)||cbe(e)||ibe(e)||rbe()}function rbe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
836In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ibe(e,t){if(e){if(typeof e=="string")return t5(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return t5(e,t)}}function cbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lbe(e){if(Array.isArray(e))return t5(e)}function t5(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}var a5=function(t,a,s,r,i){var l=dr(t,d4),d=dr(t,My),u=[].concat(DR(l),DR(d)),p=dr(t,By),x="".concat(r,"Id"),m=r[0],h=a;if(u.length&&(h=u.reduce(function(b,j){if(j.props[x]===s&&Wr(j.props,"extendDomain")&&ze(j.props[m])){var S=j.props[m];return[Math.min(b[0],S),Math.max(b[1],S)]}return b},h)),p.length){var y="".concat(m,"1"),w="".concat(m,"2");h=p.reduce(function(b,j){if(j.props[x]===s&&Wr(j.props,"extendDomain")&&ze(j.props[y])&&ze(j.props[w])){var S=j.props[y],O=j.props[w];return[Math.min(b[0],S,O),Math.max(b[1],S,O)]}return b},h)}return i&&i.length&&(h=i.reduce(function(b,j){return ze(j)?[Math.min(b[0],j),Math.max(b[1],j)]:b},h)),h},_N={exports:{}},OR;function obe(){return OR||(OR=1,(function(e){var t=Object.prototype.hasOwnProperty,a="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(a=!1));function r(u,p,x){this.fn=u,this.context=p,this.once=x||!1}function i(u,p,x,m,h){if(typeof x!="function")throw new TypeError("The listener must be a function");var y=new r(x,m||u,h),w=a?a+p:p;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],y]:u._events[w].push(y):(u._events[w]=y,u._eventsCount++),u}function l(u,p){--u._eventsCount===0?u._events=new s:delete u._events[p]}function d(){this._events=new s,this._eventsCount=0}d.prototype.eventNames=function(){var p=[],x,m;if(this._eventsCount===0)return p;for(m in x=this._events)t.call(x,m)&&p.push(a?m.slice(1):m);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(x)):p},d.prototype.listeners=function(p){var x=a?a+p:p,m=this._events[x];if(!m)return[];if(m.fn)return[m.fn];for(var h=0,y=m.length,w=new Array(y);h<y;h++)w[h]=m[h].fn;return w},d.prototype.listenerCount=function(p){var x=a?a+p:p,m=this._events[x];return m?m.fn?1:m.length:0},d.prototype.emit=function(p,x,m,h,y,w){var b=a?a+p:p;if(!this._events[b])return!1;var j=this._events[b],S=arguments.length,O,A;if(j.fn){switch(j.once&&this.removeListener(p,j.fn,void 0,!0),S){case 1:return j.fn.call(j.context),!0;case 2:return j.fn.call(j.context,x),!0;case 3:return j.fn.call(j.context,x,m),!0;case 4:return j.fn.call(j.context,x,m,h),!0;case 5:return j.fn.call(j.context,x,m,h,y),!0;case 6:return j.fn.call(j.context,x,m,h,y,w),!0}for(A=1,O=new Array(S-1);A<S;A++)O[A-1]=arguments[A];j.fn.apply(j.context,O)}else{var k=j.length,E;for(A=0;A<k;A++)switch(j[A].once&&this.removeListener(p,j[A].fn,void 0,!0),S){case 1:j[A].fn.call(j[A].context);break;case 2:j[A].fn.call(j[A].context,x);break;case 3:j[A].fn.call(j[A].context,x,m);break;case 4:j[A].fn.call(j[A].context,x,m,h);break;default:if(!O)for(E=1,O=new Array(S-1);E<S;E++)O[E-1]=arguments[E];j[A].fn.apply(j[A].context,O)}}return!0},d.prototype.on=function(p,x,m){return i(this,p,x,m,!1)},d.prototype.once=function(p,x,m){return i(this,p,x,m,!0)},d.prototype.removeListener=function(p,x,m,h){var y=a?a+p:p;if(!this._events[y])return this;if(!x)return l(this,y),this;var w=this._events[y];if(w.fn)w.fn===x&&(!h||w.once)&&(!m||w.context===m)&&l(this,y);else{for(var b=0,j=[],S=w.length;b<S;b++)(w[b].fn!==x||h&&!w[b].once||m&&w[b].context!==m)&&j.push(w[b]);j.length?this._events[y]=j.length===1?j[0]:j:l(this,y)}return this},d.prototype.removeAllListeners=function(p){var x;return p?(x=a?a+p:p,this._events[x]&&l(this,x)):(this._events=new s,this._eventsCount=0),this},d.prototype.off=d.prototype.removeListener,d.prototype.addListener=d.prototype.on,d.prefixed=a,d.EventEmitter=d,e.exports=d})(_N)),_N.exports}var dbe=obe();const ube=Na(dbe);var TN=new ube,PN="recharts.syncMouseEvents";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)}function pbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fbe(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,uq(s.key),s)}}function mbe(e,t,a){return t&&fbe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function MN(e,t,a){return t=uq(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function uq(e){var t=xbe(e,"string");return nm(t)=="symbol"?t:t+""}function xbe(e,t){if(nm(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(nm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gbe=(function(){function e(){pbe(this,e),MN(this,"activeIndex",0),MN(this,"coordinateList",[]),MN(this,"layout","horizontal")}return mbe(e,[{key:"setDetails",value:function(a){var s,r=a.coordinateList,i=r===void 0?null:r,l=a.container,d=l===void 0?null:l,u=a.layout,p=u===void 0?null:u,x=a.offset,m=x===void 0?null:x,h=a.mouseHandlerCallback,y=h===void 0?null:h;this.coordinateList=(s=i??this.coordinateList)!==null&&s!==void 0?s:[],this.container=d??this.container,this.layout=p??this.layout,this.offset=m??this.offset,this.mouseHandlerCallback=y??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(a){if(this.coordinateList.length!==0)switch(a.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(a){this.activeIndex=a}},{key:"spoofMouse",value:function(){var a,s;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var r=this.container.getBoundingClientRect(),i=r.x,l=r.y,d=r.height,u=this.coordinateList[this.activeIndex].coordinate,p=((a=window)===null||a===void 0?void 0:a.scrollX)||0,x=((s=window)===null||s===void 0?void 0:s.scrollY)||0,m=i+u+p,h=l+this.offset.top+d/2+x;this.mouseHandlerCallback({pageX:m,pageY:h})}}}])})();function hbe(e,t,a){if(a==="number"&&t===!0&&Array.isArray(e)){var s=e?.[0],r=e?.[1];if(s&&r&&ze(s)&&ze(r))return!0}return!1}function vbe(e,t,a,s){var r=s/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-r:a.left+.5,y:e==="horizontal"?a.top+.5:t.y-r,width:e==="horizontal"?s:a.width-1,height:e==="horizontal"?a.height-1:s}}function pq(e){var t=e.cx,a=e.cy,s=e.radius,r=e.startAngle,i=e.endAngle,l=kn(t,a,s,r),d=kn(t,a,s,i);return{points:[l,d],cx:t,cy:a,radius:s,startAngle:r,endAngle:i}}function ybe(e,t,a){var s,r,i,l;if(e==="horizontal")s=t.x,i=s,r=a.top,l=a.top+a.height;else if(e==="vertical")r=t.y,l=r,s=a.left,i=a.left+a.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var d=t.cx,u=t.cy,p=t.innerRadius,x=t.outerRadius,m=t.angle,h=kn(d,u,p,m),y=kn(d,u,x,m);s=h.x,r=h.y,i=y.x,l=y.y}else return pq(t);return[{x:s,y:r},{x:i,y:l}]}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 kR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Pg(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?kR(Object(a),!0).forEach(function(s){bbe(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):kR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function bbe(e,t,a){return t=jbe(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function jbe(e){var t=wbe(e,"string");return sm(t)=="symbol"?t:t+""}function wbe(e,t){if(sm(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(sm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nbe(e){var t,a,s=e.element,r=e.tooltipEventType,i=e.isActive,l=e.activeCoordinate,d=e.activePayload,u=e.offset,p=e.activeTooltipIndex,x=e.tooltipAxisBandSize,m=e.layout,h=e.chartName,y=(t=s.props.cursor)!==null&&t!==void 0?t:(a=s.type.defaultProps)===null||a===void 0?void 0:a.cursor;if(!s||!y||!i||!l||h!=="ScatterChart"&&r!=="axis")return null;var w,b=Zp;if(h==="ScatterChart")w=l,b=Cge;else if(h==="BarChart")w=vbe(m,l,u,x),b=a4;else if(m==="radial"){var j=pq(l),S=j.cx,O=j.cy,A=j.radius,k=j.startAngle,E=j.endAngle;w={cx:S,cy:O,startAngle:k,endAngle:E,innerRadius:A,outerRadius:A},b=vU}else w={points:ybe(m,l,u)},b=Zp;var D=Pg(Pg(Pg(Pg({stroke:"#ccc",pointerEvents:"none"},u),w),Ft(y,!1)),{},{payload:d,payloadIndex:p,className:Qt("recharts-tooltip-cursor",y.className)});return v.isValidElement(y)?v.cloneElement(y,D):v.createElement(b,D)}var Sbe=["item"],Cbe=["children","className","width","height","style","compact","title","desc"];function tu(e){"@babel/helpers - typeof";return tu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(e)}function gd(){return gd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},gd.apply(this,arguments)}function _R(e,t){return Dbe(e)||Abe(e,t)||mq(e,t)||Ebe()}function Ebe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
837In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Abe(e,t){var a=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a!=null){var s,r,i,l,d=[],u=!0,p=!1;try{if(i=(a=a.call(e)).next,t!==0)for(;!(u=(s=i.call(a)).done)&&(d.push(s.value),d.length!==t);u=!0);}catch(x){p=!0,r=x}finally{try{if(!u&&a.return!=null&&(l=a.return(),Object(l)!==l))return}finally{if(p)throw r}}return d}}function Dbe(e){if(Array.isArray(e))return e}function TR(e,t){if(e==null)return{};var a=Obe(e,t),s,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)s=i[r],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(a[s]=e[s])}return a}function Obe(e,t){if(e==null)return{};var a={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;a[s]=e[s]}return a}function kbe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _be(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,xq(s.key),s)}}function Tbe(e,t,a){return t&&_be(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pbe(e,t,a){return t=dv(t),Mbe(e,fq()?Reflect.construct(t,a||[],dv(e).constructor):t.apply(e,a))}function Mbe(e,t){if(t&&(tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rbe(e)}function Rbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fq=function(){return!!e})()}function dv(e){return dv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(a){return a.__proto__||Object.getPrototypeOf(a)},dv(e)}function Bbe(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&&n5(e,t)}function n5(e,t){return n5=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,r){return s.__proto__=r,s},n5(e,t)}function au(e){return $be(e)||Lbe(e)||mq(e)||Ibe()}function Ibe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
838In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mq(e,t){if(e){if(typeof e=="string")return s5(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor&&(a=e.constructor.name),a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return s5(e,t)}}function Lbe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function $be(e){if(Array.isArray(e))return s5(e)}function s5(e,t){(t==null||t>e.length)&&(t=e.length);for(var a=0,s=new Array(t);a<t;a++)s[a]=e[a];return s}function PR(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),a.push.apply(a,s)}return a}function Ee(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?PR(Object(a),!0).forEach(function(s){Et(e,s,a[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):PR(Object(a)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(a,s))})}return e}function Et(e,t,a){return t=xq(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function xq(e){var t=zbe(e,"string");return tu(t)=="symbol"?t:t+""}function zbe(e,t){if(tu(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var s=a.call(e,t);if(tu(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ube={xAxis:["bottom","top"],yAxis:["left","right"]},qbe={width:"100%",height:"100%"},gq={x:0,y:0};function Mg(e){return e}var Fbe=function(t,a){return a==="horizontal"?t.x:a==="vertical"?t.y:a==="centric"?t.angle:t.radius},Wbe=function(t,a,s,r){var i=a.find(function(x){return x&&x.index===s});if(i){if(t==="horizontal")return{x:i.coordinate,y:r.y};if(t==="vertical")return{x:r.x,y:i.coordinate};if(t==="centric"){var l=i.coordinate,d=r.radius;return Ee(Ee(Ee({},r),kn(r.cx,r.cy,d,l)),{},{angle:l,radius:d})}var u=i.coordinate,p=r.angle;return Ee(Ee(Ee({},r),kn(r.cx,r.cy,u,p)),{},{angle:p,radius:u})}return gq},Iy=function(t,a){var s=a.graphicalItems,r=a.dataStartIndex,i=a.dataEndIndex,l=(s??[]).reduce(function(d,u){var p=u.props.data;return p&&p.length?[].concat(au(d),au(p)):d},[]);return l.length>0?l:t&&t.length&&ze(r)&&ze(i)?t.slice(r,i+1):[]};function hq(e){return e==="number"?[0,"auto"]:void 0}var r5=function(t,a,s,r){var i=t.graphicalItems,l=t.tooltipAxis,d=Iy(a,t);return s<0||!i||!i.length||s>=d.length?null:i.reduce(function(u,p){var x,m=(x=p.props.data)!==null&&x!==void 0?x:a;m&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=s&&(m=m.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(l.dataKey&&!l.allowDuplicatedCategory){var y=m===void 0?d:m;h=mh(y,l.dataKey,r)}else h=m&&m[s]||d[s];return h?[].concat(au(u),[xU(p,h)]):u},[])},MR=function(t,a,s,r){var i=r||{x:t.chartX,y:t.chartY},l=Fbe(i,s),d=t.orderedTooltipTicks,u=t.tooltipAxis,p=t.tooltipTicks,x=cfe(l,d,p,u);if(x>=0&&p){var m=p[x]&&p[x].value,h=r5(t,a,x,m),y=Wbe(s,d,x,i);return{activeTooltipIndex:x,activeLabel:m,activePayload:h,activeCoordinate:y}}return null},Hbe=function(t,a){var s=a.axes,r=a.graphicalItems,i=a.axisType,l=a.axisIdKey,d=a.stackGroups,u=a.dataStartIndex,p=a.dataEndIndex,x=t.layout,m=t.children,h=t.stackOffset,y=pU(x,i);return s.reduce(function(w,b){var j,S=b.type.defaultProps!==void 0?Ee(Ee({},b.type.defaultProps),b.props):b.props,O=S.type,A=S.dataKey,k=S.allowDataOverflow,E=S.allowDuplicatedCategory,D=S.scale,_=S.ticks,T=S.includeHidden,I=S[l];if(w[I])return w;var $=Iy(t.data,{graphicalItems:r.filter(function(F){var H,q=l in F.props?F.props[l]:(H=F.type.defaultProps)===null||H===void 0?void 0:H[l];return q===I}),dataStartIndex:u,dataEndIndex:p}),R=$.length,B,Y,z;hbe(S.domain,k,O)&&(B=SC(S.domain,null,k),y&&(O==="number"||D!=="auto")&&(z=Xp($,A,"category")));var Q=hq(O);if(!B||B.length===0){var L,M=(L=S.domain)!==null&&L!==void 0?L:Q;if(A){if(B=Xp($,A,O),O==="category"&&y){var U=Zse(B);E&&U?(Y=B,B=Xh(0,R)):E||(B=V6(M,B,b).reduce(function(F,H){return F.indexOf(H)>=0?F:[].concat(au(F),[H])},[]))}else if(O==="category")E?B=B.filter(function(F){return F!==""&&!Yt(F)}):B=V6(M,B,b).reduce(function(F,H){return F.indexOf(H)>=0||H===""||Yt(H)?F:[].concat(au(F),[H])},[]);else if(O==="number"){var Z=pfe($,r.filter(function(F){var H,q,J=l in F.props?F.props[l]:(H=F.type.defaultProps)===null||H===void 0?void 0:H[l],ce="hide"in F.props?F.props.hide:(q=F.type.defaultProps)===null||q===void 0?void 0:q.hide;return J===I&&(T||!ce)}),A,i,x);Z&&(B=Z)}y&&(O==="number"||D!=="auto")&&(z=Xp($,A,"category"))}else y?B=Xh(0,R):d&&d[I]&&d[I].hasStack&&O==="number"?B=h==="expand"?[0,1]:mU(d[I].stackGroups,u,p):B=uU($,r.filter(function(F){var H=l in F.props?F.props[l]:F.type.defaultProps[l],q="hide"in F.props?F.props.hide:F.type.defaultProps.hide;return H===I&&(T||!q)}),O,x,!0);if(O==="number")B=a5(m,B,I,i,_),M&&(B=SC(M,B,k));else if(O==="category"&&M){var ie=M,G=B.every(function(F){return ie.indexOf(F)>=0});G&&(B=ie)}}return Ee(Ee({},w),{},Et({},I,Ee(Ee({},S),{},{axisType:i,domain:B,categoricalDomain:z,duplicateDomain:Y,originalDomain:(j=S.domain)!==null&&j!==void 0?j:Q,isCategorical:y,layout:x})))},{})},Vbe=function(t,a){var s=a.graphicalItems,r=a.Axis,i=a.axisType,l=a.axisIdKey,d=a.stackGroups,u=a.dataStartIndex,p=a.dataEndIndex,x=t.layout,m=t.children,h=Iy(t.data,{graphicalItems:s,dataStartIndex:u,dataEndIndex:p}),y=h.length,w=pU(x,i),b=-1;return s.reduce(function(j,S){var O=S.type.defaultProps!==void 0?Ee(Ee({},S.type.defaultProps),S.props):S.props,A=O[l],k=hq("number");if(!j[A]){b++;var E;return w?E=Xh(0,y):d&&d[A]&&d[A].hasStack?(E=mU(d[A].stackGroups,u,p),E=a5(m,E,A,i)):(E=SC(k,uU(h,s.filter(function(D){var _,T,I=l in D.props?D.props[l]:(_=D.type.defaultProps)===null||_===void 0?void 0:_[l],$="hide"in D.props?D.props.hide:(T=D.type.defaultProps)===null||T===void 0?void 0:T.hide;return I===A&&!$}),"number",x),r.defaultProps.allowDataOverflow),E=a5(m,E,A,i)),Ee(Ee({},j),{},Et({},A,Ee(Ee({axisType:i},r.defaultProps),{},{hide:!0,orientation:Xs(Ube,"".concat(i,".").concat(b%2),null),domain:E,originalDomain:k,isCategorical:w,layout:x})))}return j},{})},Gbe=function(t,a){var s=a.axisType,r=s===void 0?"xAxis":s,i=a.AxisComp,l=a.graphicalItems,d=a.stackGroups,u=a.dataStartIndex,p=a.dataEndIndex,x=t.children,m="".concat(r,"Id"),h=dr(x,i),y={};return h&&h.length?y=Hbe(t,{axes:h,graphicalItems:l,axisType:r,axisIdKey:m,stackGroups:d,dataStartIndex:u,dataEndIndex:p}):l&&l.length&&(y=Vbe(t,{Axis:i,graphicalItems:l,axisType:r,axisIdKey:m,stackGroups:d,dataStartIndex:u,dataEndIndex:p})),y},Ybe=function(t){var a=kc(t),s=Ci(a,!1,!0);return{tooltipTicks:s,orderedTooltipTicks:O3(s,function(r){return r.coordinate}),tooltipAxis:a,tooltipAxisBandSize:qh(a,s)}},RR=function(t){var a=t.children,s=t.defaultShowTooltip,r=hs(a,Vd),i=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(i=r.props.startIndex),r.props.endIndex>=0&&(l=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!s}},Kbe=function(t){return!t||!t.length?!1:t.some(function(a){var s=Oi(a&&a.type);return s&&s.indexOf("Bar")>=0})},BR=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"}},Qbe=function(t,a){var s=t.props,r=t.graphicalItems,i=t.xAxisMap,l=i===void 0?{}:i,d=t.yAxisMap,u=d===void 0?{}:d,p=s.width,x=s.height,m=s.children,h=s.margin||{},y=hs(m,Vd),w=hs(m,wd),b=Object.keys(u).reduce(function(E,D){var _=u[D],T=_.orientation;return!_.mirror&&!_.hide?Ee(Ee({},E),{},Et({},T,E[T]+_.width)):E},{left:h.left||0,right:h.right||0}),j=Object.keys(l).reduce(function(E,D){var _=l[D],T=_.orientation;return!_.mirror&&!_.hide?Ee(Ee({},E),{},Et({},T,Xs(E,"".concat(T))+_.height)):E},{top:h.top||0,bottom:h.bottom||0}),S=Ee(Ee({},j),b),O=S.bottom;y&&(S.bottom+=y.props.height||Vd.defaultProps.height),w&&a&&(S=dfe(S,r,s,a));var A=p-S.left-S.right,k=x-S.top-S.bottom;return Ee(Ee({brushBottom:O},S),{},{width:Math.max(A,0),height:Math.max(k,0)})},Xbe=function(t,a){if(a==="xAxis")return t[a].width;if(a==="yAxis")return t[a].height},vq=function(t){var a=t.chartName,s=t.GraphicalChild,r=t.defaultTooltipEventType,i=r===void 0?"axis":r,l=t.validateTooltipEventTypes,d=l===void 0?["axis"]:l,u=t.axisComponents,p=t.legendContent,x=t.formatAxisMap,m=t.defaultProps,h=function(S,O){var A=O.graphicalItems,k=O.stackGroups,E=O.offset,D=O.updateId,_=O.dataStartIndex,T=O.dataEndIndex,I=S.barSize,$=S.layout,R=S.barGap,B=S.barCategoryGap,Y=S.maxBarSize,z=BR($),Q=z.numericAxisName,L=z.cateAxisName,M=Kbe(A),U=[];return A.forEach(function(Z,ie){var G=Iy(S.data,{graphicalItems:[Z],dataStartIndex:_,dataEndIndex:T}),F=Z.type.defaultProps!==void 0?Ee(Ee({},Z.type.defaultProps),Z.props):Z.props,H=F.dataKey,q=F.maxBarSize,J=F["".concat(Q,"Id")],ce=F["".concat(L,"Id")],se={},ye=u.reduce(function(ut,pt){var ft=O["".concat(pt.axisType,"Map")],_t=F["".concat(pt.axisType,"Id")];ft&&ft[_t]||pt.axisType==="zAxis"||no();var da=ft[_t];return Ee(Ee({},ut),{},Et(Et({},pt.axisType,da),"".concat(pt.axisType,"Ticks"),Ci(da)))},se),de=ye[L],ve=ye["".concat(L,"Ticks")],Pe=k&&k[J]&&k[J].hasStack&&Sfe(Z,k[J].stackGroups),ue=Oi(Z.type).indexOf("Bar")>=0,Qe=qh(de,ve),Ue=[],xe=M&&lfe({barSize:I,stackGroups:k,totalSize:Xbe(ye,L)});if(ue){var $e,Te,dt=Yt(q)?Y:q,tt=($e=(Te=qh(de,ve,!0))!==null&&Te!==void 0?Te:dt)!==null&&$e!==void 0?$e:0;Ue=ofe({barGap:R,barCategoryGap:B,bandSize:tt!==Qe?tt:Qe,sizeList:xe[ce],maxBarSize:dt}),tt!==Qe&&(Ue=Ue.map(function(ut){return Ee(Ee({},ut),{},{position:Ee(Ee({},ut.position),{},{offset:ut.position.offset-tt/2})})}))}var me=Z&&Z.type&&Z.type.getComposedData;me&&U.push({props:Ee(Ee({},me(Ee(Ee({},ye),{},{displayedData:G,props:S,dataKey:H,item:Z,bandSize:Qe,barPosition:Ue,offset:E,stackedData:Pe,layout:$,dataStartIndex:_,dataEndIndex:T}))),{},Et(Et(Et({key:Z.key||"item-".concat(ie)},Q,ye[Q]),L,ye[L]),"animationId",D)),childIndex:ure(Z,S.children),item:Z})}),U},y=function(S,O){var A=S.props,k=S.dataStartIndex,E=S.dataEndIndex,D=S.updateId;if(!iT({props:A}))return null;var _=A.children,T=A.layout,I=A.stackOffset,$=A.data,R=A.reverseStackOrder,B=BR(T),Y=B.numericAxisName,z=B.cateAxisName,Q=dr(_,s),L=jfe($,Q,"".concat(Y,"Id"),"".concat(z,"Id"),I,R),M=u.reduce(function(F,H){var q="".concat(H.axisType,"Map");return Ee(Ee({},F),{},Et({},q,Gbe(A,Ee(Ee({},H),{},{graphicalItems:Q,stackGroups:H.axisType===Y&&L,dataStartIndex:k,dataEndIndex:E}))))},{}),U=Qbe(Ee(Ee({},M),{},{props:A,graphicalItems:Q}),O?.legendBBox);Object.keys(M).forEach(function(F){M[F]=x(A,M[F],U,F.replace("Map",""),a)});var Z=M["".concat(z,"Map")],ie=Ybe(Z),G=h(A,Ee(Ee({},M),{},{dataStartIndex:k,dataEndIndex:E,updateId:D,graphicalItems:Q,stackGroups:L,offset:U}));return Ee(Ee({formattedGraphicalItems:G,graphicalItems:Q,offset:U,stackGroups:L},ie),M)},w=(function(j){function S(O){var A,k,E;return kbe(this,S),E=Pbe(this,S,[O]),Et(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Et(E,"accessibilityManager",new gbe),Et(E,"handleLegendBBoxUpdate",function(D){if(D){var _=E.state,T=_.dataStartIndex,I=_.dataEndIndex,$=_.updateId;E.setState(Ee({legendBBox:D},y({props:E.props,dataStartIndex:T,dataEndIndex:I,updateId:$},Ee(Ee({},E.state),{},{legendBBox:D}))))}}),Et(E,"handleReceiveSyncEvent",function(D,_,T){if(E.props.syncId===D){if(T===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(_)}}),Et(E,"handleBrushChange",function(D){var _=D.startIndex,T=D.endIndex;if(_!==E.state.dataStartIndex||T!==E.state.dataEndIndex){var I=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:_,dataEndIndex:T},y({props:E.props,dataStartIndex:_,dataEndIndex:T,updateId:I},E.state))}),E.triggerSyncEvent({dataStartIndex:_,dataEndIndex:T})}}),Et(E,"handleMouseEnter",function(D){var _=E.getMouseInfo(D);if(_){var T=Ee(Ee({},_),{},{isTooltipActive:!0});E.setState(T),E.triggerSyncEvent(T);var I=E.props.onMouseEnter;Bt(I)&&I(T,D)}}),Et(E,"triggeredAfterMouseMove",function(D){var _=E.getMouseInfo(D),T=_?Ee(Ee({},_),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(T),E.triggerSyncEvent(T);var I=E.props.onMouseMove;Bt(I)&&I(T,D)}),Et(E,"handleItemMouseEnter",function(D){E.setState(function(){return{isTooltipActive:!0,activeItem:D,activePayload:D.tooltipPayload,activeCoordinate:D.tooltipPosition||{x:D.cx,y:D.cy}}})}),Et(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Et(E,"handleMouseMove",function(D){D.persist(),E.throttleTriggeredAfterMouseMove(D)}),Et(E,"handleMouseLeave",function(D){E.throttleTriggeredAfterMouseMove.cancel();var _={isTooltipActive:!1};E.setState(_),E.triggerSyncEvent(_);var T=E.props.onMouseLeave;Bt(T)&&T(_,D)}),Et(E,"handleOuterEvent",function(D){var _=dre(D),T=Xs(E.props,"".concat(_));if(_&&Bt(T)){var I,$;/.*touch.*/i.test(_)?$=E.getMouseInfo(D.changedTouches[0]):$=E.getMouseInfo(D),T((I=$)!==null&&I!==void 0?I:{},D)}}),Et(E,"handleClick",function(D){var _=E.getMouseInfo(D);if(_){var T=Ee(Ee({},_),{},{isTooltipActive:!0});E.setState(T),E.triggerSyncEvent(T);var I=E.props.onClick;Bt(I)&&I(T,D)}}),Et(E,"handleMouseDown",function(D){var _=E.props.onMouseDown;if(Bt(_)){var T=E.getMouseInfo(D);_(T,D)}}),Et(E,"handleMouseUp",function(D){var _=E.props.onMouseUp;if(Bt(_)){var T=E.getMouseInfo(D);_(T,D)}}),Et(E,"handleTouchMove",function(D){D.changedTouches!=null&&D.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(D.changedTouches[0])}),Et(E,"handleTouchStart",function(D){D.changedTouches!=null&&D.changedTouches.length>0&&E.handleMouseDown(D.changedTouches[0])}),Et(E,"handleTouchEnd",function(D){D.changedTouches!=null&&D.changedTouches.length>0&&E.handleMouseUp(D.changedTouches[0])}),Et(E,"handleDoubleClick",function(D){var _=E.props.onDoubleClick;if(Bt(_)){var T=E.getMouseInfo(D);_(T,D)}}),Et(E,"handleContextMenu",function(D){var _=E.props.onContextMenu;if(Bt(_)){var T=E.getMouseInfo(D);_(T,D)}}),Et(E,"triggerSyncEvent",function(D){E.props.syncId!==void 0&&TN.emit(PN,E.props.syncId,D,E.eventEmitterSymbol)}),Et(E,"applySyncEvent",function(D){var _=E.props,T=_.layout,I=_.syncMethod,$=E.state.updateId,R=D.dataStartIndex,B=D.dataEndIndex;if(D.dataStartIndex!==void 0||D.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:R,dataEndIndex:B},y({props:E.props,dataStartIndex:R,dataEndIndex:B,updateId:$},E.state)));else if(D.activeTooltipIndex!==void 0){var Y=D.chartX,z=D.chartY,Q=D.activeTooltipIndex,L=E.state,M=L.offset,U=L.tooltipTicks;if(!M)return;if(typeof I=="function")Q=I(U,D);else if(I==="value"){Q=-1;for(var Z=0;Z<U.length;Z++)if(U[Z].value===D.activeLabel){Q=Z;break}}var ie=Ee(Ee({},M),{},{x:M.left,y:M.top}),G=Math.min(Y,ie.x+ie.width),F=Math.min(z,ie.y+ie.height),H=U[Q]&&U[Q].value,q=r5(E.state,E.props.data,Q),J=U[Q]?{x:T==="horizontal"?U[Q].coordinate:G,y:T==="horizontal"?F:U[Q].coordinate}:gq;E.setState(Ee(Ee({},D),{},{activeLabel:H,activeCoordinate:J,activePayload:q,activeTooltipIndex:Q}))}else E.setState(D)}),Et(E,"renderCursor",function(D){var _,T=E.state,I=T.isTooltipActive,$=T.activeCoordinate,R=T.activePayload,B=T.offset,Y=T.activeTooltipIndex,z=T.tooltipAxisBandSize,Q=E.getTooltipEventType(),L=(_=D.props.active)!==null&&_!==void 0?_:I,M=E.props.layout,U=D.key||"_recharts-cursor";return W.createElement(Nbe,{key:U,activeCoordinate:$,activePayload:R,activeTooltipIndex:Y,chartName:a,element:D,isActive:L,layout:M,offset:B,tooltipAxisBandSize:z,tooltipEventType:Q})}),Et(E,"renderPolarAxis",function(D,_,T){var I=Xs(D,"type.axisType"),$=Xs(E.state,"".concat(I,"Map")),R=D.type.defaultProps,B=R!==void 0?Ee(Ee({},R),D.props):D.props,Y=$&&$[B["".concat(I,"Id")]];return v.cloneElement(D,Ee(Ee({},Y),{},{className:Qt(I,Y.className),key:D.key||"".concat(_,"-").concat(T),ticks:Ci(Y,!0)}))}),Et(E,"renderPolarGrid",function(D){var _=D.props,T=_.radialLines,I=_.polarAngles,$=_.polarRadius,R=E.state,B=R.radiusAxisMap,Y=R.angleAxisMap,z=kc(B),Q=kc(Y),L=Q.cx,M=Q.cy,U=Q.innerRadius,Z=Q.outerRadius;return v.cloneElement(D,{polarAngles:Array.isArray(I)?I:Ci(Q,!0).map(function(ie){return ie.coordinate}),polarRadius:Array.isArray($)?$:Ci(z,!0).map(function(ie){return ie.coordinate}),cx:L,cy:M,innerRadius:U,outerRadius:Z,key:D.key||"polar-grid",radialLines:T})}),Et(E,"renderLegend",function(){var D=E.state.formattedGraphicalItems,_=E.props,T=_.children,I=_.width,$=_.height,R=E.props.margin||{},B=I-(R.left||0)-(R.right||0),Y=oU({children:T,formattedGraphicalItems:D,legendWidth:B,legendContent:p});if(!Y)return null;var z=Y.item,Q=TR(Y,Sbe);return v.cloneElement(z,Ee(Ee({},Q),{},{chartWidth:I,chartHeight:$,margin:R,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Et(E,"renderTooltip",function(){var D,_=E.props,T=_.children,I=_.accessibilityLayer,$=hs(T,ys);if(!$)return null;var R=E.state,B=R.isTooltipActive,Y=R.activeCoordinate,z=R.activePayload,Q=R.activeLabel,L=R.offset,M=(D=$.props.active)!==null&&D!==void 0?D:B;return v.cloneElement($,{viewBox:Ee(Ee({},L),{},{x:L.left,y:L.top}),active:M,label:Q,payload:M?z:[],coordinate:Y,accessibilityLayer:I})}),Et(E,"renderBrush",function(D){var _=E.props,T=_.margin,I=_.data,$=E.state,R=$.offset,B=$.dataStartIndex,Y=$.dataEndIndex,z=$.updateId;return v.cloneElement(D,{key:D.key||"_recharts-brush",onChange:Og(E.handleBrushChange,D.props.onChange),data:I,x:ze(D.props.x)?D.props.x:R.left,y:ze(D.props.y)?D.props.y:R.top+R.height+R.brushBottom-(T.bottom||0),width:ze(D.props.width)?D.props.width:R.width,startIndex:B,endIndex:Y,updateId:"brush-".concat(z)})}),Et(E,"renderReferenceElement",function(D,_,T){if(!D)return null;var I=E,$=I.clipPathId,R=E.state,B=R.xAxisMap,Y=R.yAxisMap,z=R.offset,Q=D.type.defaultProps||{},L=D.props,M=L.xAxisId,U=M===void 0?Q.xAxisId:M,Z=L.yAxisId,ie=Z===void 0?Q.yAxisId:Z;return v.cloneElement(D,{key:D.key||"".concat(_,"-").concat(T),xAxis:B[U],yAxis:Y[ie],viewBox:{x:z.left,y:z.top,width:z.width,height:z.height},clipPathId:$})}),Et(E,"renderActivePoints",function(D){var _=D.item,T=D.activePoint,I=D.basePoint,$=D.childIndex,R=D.isRange,B=[],Y=_.props.key,z=_.item.type.defaultProps!==void 0?Ee(Ee({},_.item.type.defaultProps),_.item.props):_.item.props,Q=z.activeDot,L=z.dataKey,M=Ee(Ee({index:$,dataKey:L,cx:T.x,cy:T.y,r:4,fill:t4(_.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},Ft(Q,!1)),xh(Q));return B.push(S.renderActiveDot(Q,M,"".concat(Y,"-activePoint-").concat($))),I?B.push(S.renderActiveDot(Q,Ee(Ee({},M),{},{cx:I.x,cy:I.y}),"".concat(Y,"-basePoint-").concat($))):R&&B.push(null),B}),Et(E,"renderGraphicChild",function(D,_,T){var I=E.filterFormatItem(D,_,T);if(!I)return null;var $=E.getTooltipEventType(),R=E.state,B=R.isTooltipActive,Y=R.tooltipAxis,z=R.activeTooltipIndex,Q=R.activeLabel,L=E.props.children,M=hs(L,ys),U=I.props,Z=U.points,ie=U.isRange,G=U.baseLine,F=I.item.type.defaultProps!==void 0?Ee(Ee({},I.item.type.defaultProps),I.item.props):I.item.props,H=F.activeDot,q=F.hide,J=F.activeBar,ce=F.activeShape,se=!!(!q&&B&&M&&(H||J||ce)),ye={};$!=="axis"&&M&&M.props.trigger==="click"?ye={onClick:Og(E.handleItemMouseEnter,D.props.onClick)}:$!=="axis"&&(ye={onMouseLeave:Og(E.handleItemMouseLeave,D.props.onMouseLeave),onMouseEnter:Og(E.handleItemMouseEnter,D.props.onMouseEnter)});var de=v.cloneElement(D,Ee(Ee({},I.props),ye));function ve(pt){return typeof Y.dataKey=="function"?Y.dataKey(pt.payload):null}if(se)if(z>=0){var Pe,ue;if(Y.dataKey&&!Y.allowDuplicatedCategory){var Qe=typeof Y.dataKey=="function"?ve:"payload.".concat(Y.dataKey.toString());Pe=mh(Z,Qe,Q),ue=ie&&G&&mh(G,Qe,Q)}else Pe=Z?.[z],ue=ie&&G&&G[z];if(ce||J){var Ue=D.props.activeIndex!==void 0?D.props.activeIndex:z;return[v.cloneElement(D,Ee(Ee(Ee({},I.props),ye),{},{activeIndex:Ue})),null,null]}if(!Yt(Pe))return[de].concat(au(E.renderActivePoints({item:I,activePoint:Pe,basePoint:ue,childIndex:z,isRange:ie})))}else{var xe,$e=(xe=E.getItemByXY(E.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:de},Te=$e.graphicalItem,dt=Te.item,tt=dt===void 0?D:dt,me=Te.childIndex,ut=Ee(Ee(Ee({},I.props),ye),{},{activeIndex:me});return[v.cloneElement(tt,ut),null,null]}return ie?[de,null,null]:[de,null]}),Et(E,"renderCustomized",function(D,_,T){return v.cloneElement(D,Ee(Ee({key:"recharts-customized-".concat(T)},E.props),E.state))}),Et(E,"renderMap",{CartesianGrid:{handler:Mg,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Mg},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Mg},YAxis:{handler:Mg},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((A=O.id)!==null&&A!==void 0?A:Pm("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=lz(E.triggeredAfterMouseMove,(k=O.throttleDelay)!==null&&k!==void 0?k:1e3/60),E.state={},E}return Bbe(S,j),Tbe(S,[{key:"componentDidMount",value:function(){var A,k;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(A=this.props.margin.left)!==null&&A!==void 0?A:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var A=this.props,k=A.children,E=A.data,D=A.height,_=A.layout,T=hs(k,ys);if(T){var I=T.props.defaultIndex;if(!(typeof I!="number"||I<0||I>this.state.tooltipTicks.length-1)){var $=this.state.tooltipTicks[I]&&this.state.tooltipTicks[I].value,R=r5(this.state,E,I,$),B=this.state.tooltipTicks[I].coordinate,Y=(this.state.offset.top+D)/2,z=_==="horizontal",Q=z?{x:B,y:Y}:{y:B,x:Y},L=this.state.formattedGraphicalItems.find(function(U){var Z=U.item;return Z.type.name==="Scatter"});L&&(Q=Ee(Ee({},Q),L.props.points[I].tooltipPosition),R=L.props.points[I].tooltipPayload);var M={activeTooltipIndex:I,isTooltipActive:!0,activeLabel:$,activePayload:R,activeCoordinate:Q};this.setState(M),this.renderCursor(T),this.accessibilityManager.setIndex(I)}}}},{key:"getSnapshotBeforeUpdate",value:function(A,k){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==k.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==A.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==A.margin){var E,D;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(D=this.props.margin.top)!==null&&D!==void 0?D:0}})}return null}},{key:"componentDidUpdate",value:function(A){VS([hs(A.children,ys)],[hs(this.props.children,ys)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var A=hs(this.props.children,ys);if(A&&typeof A.props.shared=="boolean"){var k=A.props.shared?"axis":"item";return d.indexOf(k)>=0?k:i}return i}},{key:"getMouseInfo",value:function(A){if(!this.container)return null;var k=this.container,E=k.getBoundingClientRect(),D=Xle(E),_={chartX:Math.round(A.pageX-D.left),chartY:Math.round(A.pageY-D.top)},T=E.width/k.offsetWidth||1,I=this.inRange(_.chartX,_.chartY,T);if(!I)return null;var $=this.state,R=$.xAxisMap,B=$.yAxisMap,Y=this.getTooltipEventType(),z=MR(this.state,this.props.data,this.props.layout,I);if(Y!=="axis"&&R&&B){var Q=kc(R).scale,L=kc(B).scale,M=Q&&Q.invert?Q.invert(_.chartX):null,U=L&&L.invert?L.invert(_.chartY):null;return Ee(Ee({},_),{},{xValue:M,yValue:U},z)}return z?Ee(Ee({},_),z):null}},{key:"inRange",value:function(A,k){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,D=this.props.layout,_=A/E,T=k/E;if(D==="horizontal"||D==="vertical"){var I=this.state.offset,$=_>=I.left&&_<=I.left+I.width&&T>=I.top&&T<=I.top+I.height;return $?{x:_,y:T}:null}var R=this.state,B=R.angleAxisMap,Y=R.radiusAxisMap;if(B&&Y){var z=kc(B);return K6({x:_,y:T},z)}return null}},{key:"parseEventsOfWrapper",value:function(){var A=this.props.children,k=this.getTooltipEventType(),E=hs(A,ys),D={};E&&k==="axis"&&(E.props.trigger==="click"?D={onClick:this.handleClick}:D={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 _=xh(this.props,this.handleOuterEvent);return Ee(Ee({},_),D)}},{key:"addListener",value:function(){TN.on(PN,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){TN.removeListener(PN,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(A,k,E){for(var D=this.state.formattedGraphicalItems,_=0,T=D.length;_<T;_++){var I=D[_];if(I.item===A||I.props.key===A.key||k===Oi(I.item.type)&&E===I.childIndex)return I}return null}},{key:"renderClipPath",value:function(){var A=this.clipPathId,k=this.state.offset,E=k.left,D=k.top,_=k.height,T=k.width;return W.createElement("defs",null,W.createElement("clipPath",{id:A},W.createElement("rect",{x:E,y:D,height:_,width:T})))}},{key:"getXScales",value:function(){var A=this.state.xAxisMap;return A?Object.entries(A).reduce(function(k,E){var D=_R(E,2),_=D[0],T=D[1];return Ee(Ee({},k),{},Et({},_,T.scale))},{}):null}},{key:"getYScales",value:function(){var A=this.state.yAxisMap;return A?Object.entries(A).reduce(function(k,E){var D=_R(E,2),_=D[0],T=D[1];return Ee(Ee({},k),{},Et({},_,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(A){var k;return(k=this.state.xAxisMap)===null||k===void 0||(k=k[A])===null||k===void 0?void 0:k.scale}},{key:"getYScaleByAxisId",value:function(A){var k;return(k=this.state.yAxisMap)===null||k===void 0||(k=k[A])===null||k===void 0?void 0:k.scale}},{key:"getItemByXY",value:function(A){var k=this.state,E=k.formattedGraphicalItems,D=k.activeItem;if(E&&E.length)for(var _=0,T=E.length;_<T;_++){var I=E[_],$=I.props,R=I.item,B=R.type.defaultProps!==void 0?Ee(Ee({},R.type.defaultProps),R.props):R.props,Y=Oi(R.type);if(Y==="Bar"){var z=($.data||[]).find(function(U){return xge(A,U)});if(z)return{graphicalItem:I,payload:z}}else if(Y==="RadialBar"){var Q=($.data||[]).find(function(U){return K6(A,U)});if(Q)return{graphicalItem:I,payload:Q}}else if(ky(I,D)||_y(I,D)||Xf(I,D)){var L=rhe({graphicalItem:I,activeTooltipItem:D,itemData:B.data}),M=B.activeIndex===void 0?L:B.activeIndex;return{graphicalItem:Ee(Ee({},I),{},{childIndex:M}),payload:Xf(I,D)?B.data[L]:I.props.data[L]}}}return null}},{key:"render",value:function(){var A=this;if(!iT(this))return null;var k=this.props,E=k.children,D=k.className,_=k.width,T=k.height,I=k.style,$=k.compact,R=k.title,B=k.desc,Y=TR(k,Cbe),z=Ft(Y,!1);if($)return W.createElement(fR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(YS,gd({},z,{width:_,height:T,title:R,desc:B}),this.renderClipPath(),lT(E,this.renderMap)));if(this.props.accessibilityLayer){var Q,L;z.tabIndex=(Q=this.props.tabIndex)!==null&&Q!==void 0?Q:0,z.role=(L=this.props.role)!==null&&L!==void 0?L:"application",z.onKeyDown=function(U){A.accessibilityManager.keyboardEvent(U)},z.onFocus=function(){A.accessibilityManager.focus()}}var M=this.parseEventsOfWrapper();return W.createElement(fR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",gd({className:Qt("recharts-wrapper",D),style:Ee({position:"relative",cursor:"default",width:_,height:T},I)},M,{ref:function(Z){A.container=Z}}),W.createElement(YS,gd({},z,{width:_,height:T,title:R,desc:B,style:qbe}),this.renderClipPath(),lT(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(v.Component);Et(w,"displayName",a),Et(w,"defaultProps",Ee({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},m)),Et(w,"getDerivedStateFromProps",function(j,S){var O=j.dataKey,A=j.data,k=j.children,E=j.width,D=j.height,_=j.layout,T=j.stackOffset,I=j.margin,$=S.dataStartIndex,R=S.dataEndIndex;if(S.updateId===void 0){var B=RR(j);return Ee(Ee(Ee({},B),{},{updateId:0},y(Ee(Ee({props:j},B),{},{updateId:0}),S)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:D,prevLayout:_,prevStackOffset:T,prevMargin:I,prevChildren:k})}if(O!==S.prevDataKey||A!==S.prevData||E!==S.prevWidth||D!==S.prevHeight||_!==S.prevLayout||T!==S.prevStackOffset||!jd(I,S.prevMargin)){var Y=RR(j),z={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},Q=Ee(Ee({},MR(S,A,_)),{},{updateId:S.updateId+1}),L=Ee(Ee(Ee({},Y),z),Q);return Ee(Ee(Ee({},L),y(Ee({props:j},L),S)),{},{prevDataKey:O,prevData:A,prevWidth:E,prevHeight:D,prevLayout:_,prevStackOffset:T,prevMargin:I,prevChildren:k})}if(!VS(k,S.prevChildren)){var M,U,Z,ie,G=hs(k,Vd),F=G&&(M=(U=G.props)===null||U===void 0?void 0:U.startIndex)!==null&&M!==void 0?M:$,H=G&&(Z=(ie=G.props)===null||ie===void 0?void 0:ie.endIndex)!==null&&Z!==void 0?Z:R,q=F!==$||H!==R,J=!Yt(A),ce=J&&!q?S.updateId:S.updateId+1;return Ee(Ee({updateId:ce},y(Ee(Ee({props:j},S),{},{updateId:ce,dataStartIndex:F,dataEndIndex:H}),S)),{},{prevChildren:k,dataStartIndex:F,dataEndIndex:H})}return null}),Et(w,"renderActiveDot",function(j,S,O){var A;return v.isValidElement(j)?A=v.cloneElement(j,S):Bt(j)?A=j(S):A=W.createElement(n4,S),W.createElement(za,{className:"recharts-active-dot",key:O},A)});var b=v.forwardRef(function(S,O){return W.createElement(w,gd({},S,{ref:O}))});return b.displayName=w.displayName,b},yq=vq({chartName:"BarChart",GraphicalChild:Kr,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:Gc},{axisType:"yAxis",AxisComp:Yc}],formatAxisMap:RU}),bq=vq({chartName:"AreaChart",GraphicalChild:Qr,axisComponents:[{axisType:"xAxis",AxisComp:Gc},{axisType:"yAxis",AxisComp:Yc}],formatAxisMap:RU});const jq=6048e5,Zbe=864e5,wq=6e4,Nq=36e5,IR=Symbol.for("constructDateFrom");function en(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&IR in e?e[IR](t):e instanceof Date?new e.constructor(t):new Date(t)}function oa(e,t){return en(t||e,e)}function Sq(e,t,a){const s=oa(e,a?.in);return isNaN(t)?en(e,NaN):(t&&s.setDate(s.getDate()+t),s)}function Cq(e,t,a){const s=oa(e,a?.in);
vendor: 6,244 bytes, line 838
838if(isNaN(t))return en(e,NaN);if(!t)return s;const r=s.getDate(),i=en(e,s.getTime());i.setMonth(s.getMonth()+t+1,0);const l=i.getDate();return r>=l?i:(s.setFullYear(i.getFullYear(),i.getMonth(),r),s)}let Jbe={};function $m(){return Jbe}function nu(e,t){const a=$m(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=oa(e,t?.in),i=r.getDay(),l=(i<s?7:0)+i-s;return r.setDate(r.getDate()-l),r.setHours(0,0,0,0),r}function rm(e,t){return nu(e,{...t,weekStartsOn:1})}function Eq(e,t){const a=oa(e,t?.in),s=a.getFullYear(),r=en(a,0);r.setFullYear(s+1,0,4),r.setHours(0,0,0,0);const i=rm(r),l=en(a,0);l.setFullYear(s,0,4),l.setHours(0,0,0,0);const d=rm(l);return a.getTime()>=i.getTime()?s+1:a.getTime()>=d.getTime()?s:s-1}function LR(e){const t=oa(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),+e-+a}function ju(e,...t){const a=en.bind(null,t.find(s=>typeof s=="object"));return t.map(a)}function im(e,t){const a=oa(e,t?.in);return a.setHours(0,0,0,0),a}function Aq(e,t,a){const[s,r]=ju(a?.in,e,t),i=im(s),l=im(r),d=+i-LR(i),u=+l-LR(l);return Math.round((d-u)/Zbe)}function e0e(e,t){const a=Eq(e,t),s=en(e,0);return s.setFullYear(a,0,4),s.setHours(0,0,0,0),rm(s)}function t0e(e,t,a){return Sq(e,t*7,a)}function a0e(e,t,a){return Cq(e,t*12,a)}function n0e(e,t){let a,s=t?.in;return e.forEach(r=>{!s&&typeof r=="object"&&(s=en.bind(null,r));const i=oa(r,s);(!a||a<i||isNaN(+i))&&(a=i)}),en(s,a||NaN)}function s0e(e,t){let a,s=t?.in;return e.forEach(r=>{!s&&typeof r=="object"&&(s=en.bind(null,r));const i=oa(r,s);(!a||a>i||isNaN(+i))&&(a=i)}),en(s,a||NaN)}function r0e(e,t,a){const[s,r]=ju(a?.in,e,t);return+im(s)==+im(r)}function Dq(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function i0e(e){return!(!Dq(e)&&typeof e!="number"||isNaN(+oa(e)))}function c0e(e,t,a){const[s,r]=ju(a?.in,e,t),i=s.getFullYear()-r.getFullYear(),l=s.getMonth()-r.getMonth();return i*12+l}function l0e(e,t){const a=oa(e,t?.in),s=a.getMonth();return a.setFullYear(a.getFullYear(),s+1,0),a.setHours(23,59,59,999),a}function Oq(e,t){const[a,s]=ju(e,t.start,t.end);return{start:a,end:s}}function o0e(e,t){const{start:a,end:s}=Oq(t?.in,e);let r=+a>+s;const i=r?+a:+s,l=r?s:a;l.setHours(0,0,0,0),l.setDate(1);let d=1;const u=[];for(;+l<=i;)u.push(en(a,l)),l.setMonth(l.getMonth()+d);return r?u.reverse():u}function d0e(e,t){const a=oa(e,t?.in);return a.setDate(1),a.setHours(0,0,0,0),a}function u0e(e,t){const a=oa(e,t?.in),s=a.getFullYear();return a.setFullYear(s+1,0,0),a.setHours(23,59,59,999),a}function kq(e,t){const a=oa(e,t?.in);return a.setFullYear(a.getFullYear(),0,1),a.setHours(0,0,0,0),a}function p0e(e,t){const{start:a,end:s}=Oq(t?.in,e);let r=+a>+s;const i=r?+a:+s,l=r?s:a;l.setHours(0,0,0,0),l.setMonth(0,1);let d=1;const u=[];for(;+l<=i;)u.push(en(a,l)),l.setFullYear(l.getFullYear()+d);return r?u.reverse():u}function _q(e,t){const a=$m(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??a.weekStartsOn??a.locale?.options?.weekStartsOn??0,r=oa(e,t?.in),i=r.getDay(),l=(i<s?-7:0)+6-(i-s);return r.setDate(r.getDate()+l),r.setHours(23,59,59,999),r}function f0e(e,t){return _q(e,{...t,weekStartsOn:1})}const m0e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},x0e=(e,t,a)=>{let s;const r=m0e[e];return typeof r=="string"?s=r:t===1?s=r.one:s=r.other.replace("{{count}}",t.toString()),a?.addSuffix?a.comparison&&a.comparison>0?"in "+s:s+" ago":s};function RN(e){return(t={})=>{const a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}const g0e={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},h0e={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},v0e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},y0e={date:RN({formats:g0e,defaultWidth:"full"}),time:RN({formats:h0e,defaultWidth:"full"}),dateTime:RN({formats:v0e,defaultWidth:"full"})},b0e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},j0e=(e,t,a,s)=>b0e[e];function Dp(e){return(t,a)=>{const s=a?.context?String(a.context):"standalone";let r;if(s==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,d=a?.width?String(a.width):l;r=e.formattingValues[d]||e.formattingValues[l]}else{const l=e.defaultWidth,d=a?.width?String(a.width):e.defaultWidth;r=e.values[d]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return r[i]}}const w0e={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},N0e={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},S0e={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},C0e={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
838ay","Saturday"]},E0e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},A0e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},D0e=(e,t)=>{const a=Number(e),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},O0e={ordinalNumber:D0e,era:Dp({values:w0e,defaultWidth:"wide"}),quarter:Dp({values:N0e,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Dp({values:S0e,defaultWidth:"wide"}),day:Dp({values:C0e,defaultWidth:"wide"}),dayPeriod:Dp({values:E0e,defaultWidth:"wide",formattingValues:A0e,defaultFormattingWidth:"wide"})};function Op(e){return(t,a={})=>{const s=a.width,r=s&&e.matchPatterns[s]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;const l=i[0],d=s&&e.parsePatterns[s]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?_0e(d,m=>m.test(l)):k0e(d,m=>m.test(l));let p;p=e.valueCallback?e.valueCallback(u):u,p=a.valueCallback?a.valueCallback(p):p;const x=t.slice(l.length);return{value:p,rest:x}}}function k0e(e,t){for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}function _0e(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}function T0e(e){return(t,a={})=>{const s=t.match(e.matchPattern);if(!s)return null;const r=s[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=a.valueCallback?a.valueCallback(l):l;const d=t.slice(r.length);return{value:l,rest:d}}}const P0e=/^(\d+)(th|st|nd|rd)?/i,M0e=/\d+/i,R0e={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},B0e={any:[/^b/i,/^(a|c)/i]},I0e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},L0e={any:[/1/i,/2/i,/3/i,/4/i]},$0e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},z0e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},U0e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},q0e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},F0e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},W0e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},H0e={ordinalNumber:T0e({matchPattern:P0e,parsePattern:M0e,valueCallback:e=>parseInt(e,10)}),era:Op({matchPatterns:R0e,defaultMatchWidth:"wide",parsePatterns:B0e,defaultParseWidth:"any"}),quarter:Op({matchPatterns:I0e,defaultMatchWidth:"wide",parsePatterns:L0e,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Op({matchPatterns:$0e,defaultMatchWidth:"wide",parsePatterns:z0e,defaultParseWidth:"any"}),day:Op({matchPatterns:U0e,defaultMatchWidth:"wide",parsePatterns:q0e,defaultParseWidth:"any"}),dayPeriod:Op({matchPatterns:F0e,defaultMatchWidth:"any",parsePatterns:W0e,defaultParseWidth:"any"})},f4={code:"en-US",formatDistance:x0e,formatLong:y0e,formatRelative:j0e,localize:O0e,match:H0e,options:{weekStartsOn:0,firstWeekContainsDate:1}};function V0e(e,t){const a=oa(e,t?.in);return Aq(a,kq(a))+1}function Tq(e,t){const a=oa(e,t?.in),s=+rm(a)-+e0e(a);return Math.round(s/jq)+1}function Pq(e,t){const a=oa(e,t?.in),s=a.getFullYear(),r=$m(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,l=en(t?.in||e,0);l.setFullYear(s+1,0,i),l.setHours(0,0,0,0);const d=nu(l,t),u=en(t?.in||e,0);u.setFullYear(s,0,i),u.setHours(0,0,0,0);const p=nu(u,t);return+a>=+d?s+1:+a>=+p?s:s-1}function G0e(e,t){const a=$m(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,r=Pq(e,t),i=en(t?.in||e,0);return i.setFullYear(r,0,s),i.setHours(0,0,0,0),nu(i,t)}function Mq(e,t){const a=oa(e,t?.in),s=+nu(a,t)-+G0e(a,t);return Math.round(s/jq)+1}function ma(e,t){const a=e<0?"-":"",s=Math.abs(e).toString().padStart(t,"0");return a+s}const Nc={y(e,t){const a=e.getFullYear(),s=a>0?a:1-a;return ma(t==="yy"?s%100:s,t.length)},M(e,t){const a=e.getMonth();return t==="M"?String(a+1):ma(a+1,2)},d(e,t){return ma(e.getDate(),t.length)},a(e,t){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h(e,t){return ma(e.getHours()%12||12,t.length)},H(e,t){return ma(e.getHours(),t.length)},m(e,t){return ma(e.getMinutes(),t.length)},s(e,t){return ma(e.getSeconds(),t.length)},S(e,t){const a=t.length,s=e.getMilliseconds(),r=Math.trunc(s*Math.pow(10,a-3));return ma(r,t.length)}},cd={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$R={G:function(e,t,a){const s=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return a.era(s,{width:"abbreviated"});case"GGGGG":return a.era(s,{width:"narrow"});case"GGGG":default:return a.era(s,{width:"wide"})}},y:function(e,t,a){if(t==="yo"){const s=e.getFullYear(),r=s>
vendor: 4,378 bytes, line 838
8380?s:1-s;return a.ordinalNumber(r,{unit:"year"})}return Nc.y(e,t)},Y:function(e,t,a,s){const r=Pq(e,s),i=r>0?r:1-r;if(t==="YY"){const l=i%100;return ma(l,2)}return t==="Yo"?a.ordinalNumber(i,{unit:"year"}):ma(i,t.length)},R:function(e,t){const a=Eq(e);return ma(a,t.length)},u:function(e,t){const a=e.getFullYear();return ma(a,t.length)},Q:function(e,t,a){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(s);case"QQ":return ma(s,2);case"Qo":return a.ordinalNumber(s,{unit:"quarter"});case"QQQ":return a.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(s,{width:"wide",context:"formatting"})}},q:function(e,t,a){const s=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(s);case"qq":return ma(s,2);case"qo":return a.ordinalNumber(s,{unit:"quarter"});case"qqq":return a.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(s,{width:"wide",context:"standalone"})}},M:function(e,t,a){const s=e.getMonth();switch(t){case"M":case"MM":return Nc.M(e,t);case"Mo":return a.ordinalNumber(s+1,{unit:"month"});case"MMM":return a.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(s,{width:"wide",context:"formatting"})}},L:function(e,t,a){const s=e.getMonth();switch(t){case"L":return String(s+1);case"LL":return ma(s+1,2);case"Lo":return a.ordinalNumber(s+1,{unit:"month"});case"LLL":return a.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(s,{width:"wide",context:"standalone"})}},w:function(e,t,a,s){const r=Mq(e,s);return t==="wo"?a.ordinalNumber(r,{unit:"week"}):ma(r,t.length)},I:function(e,t,a){const s=Tq(e);return t==="Io"?a.ordinalNumber(s,{unit:"week"}):ma(s,t.length)},d:function(e,t,a){return t==="do"?a.ordinalNumber(e.getDate(),{unit:"date"}):Nc.d(e,t)},D:function(e,t,a){const s=V0e(e);return t==="Do"?a.ordinalNumber(s,{unit:"dayOfYear"}):ma(s,t.length)},E:function(e,t,a){const s=e.getDay();switch(t){case"E":case"EE":case"EEE":return a.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(s,{width:"short",context:"formatting"});case"EEEE":default:return a.day(s,{width:"wide",context:"formatting"})}},e:function(e,t,a,s){const r=e.getDay(),i=(r-s.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return ma(i,2);case"eo":return a.ordinalNumber(i,{unit:"day"});case"eee":return a.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(r,{width:"short",context:"formatting"});case"eeee":default:return a.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,a,s){const r=e.getDay(),i=(r-s.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return ma(i,t.length);case"co":return a.ordinalNumber(i,{unit:"day"});case"ccc":return a.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(r,{width:"narrow",context:"standalone"});case"cccccc":return a.day(r,{width:"short",context:"standalone"});case"cccc":default:return a.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,a){const s=e.getDay(),r=s===0?7:s;switch(t){case"i":return String(r);case"ii":return ma(r,t.length);case"io":return a.ordinalNumber(r,{unit:"day"});case"iii":return a.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(s,{width:"short",context:"formatting"});case"iiii":default:return a.day(s,{width:"wide",context:"formatting"})}},a:function(e,t,a){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,a){const s=e.getHours();let r;switch(s===12?r=cd.noon:s===0?r=cd.midnight:r=s/12>
vendor: 4,313 bytes, line 838
838=1?"pm":"am",t){case"b":case"bb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,a){const s=e.getHours();let r;switch(s>=17?r=cd.evening:s>=12?r=cd.afternoon:s>=4?r=cd.morning:r=cd.night,t){case"B":case"BB":case"BBB":return a.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,a){if(t==="ho"){let s=e.getHours()%12;return s===0&&(s=12),a.ordinalNumber(s,{unit:"hour"})}return Nc.h(e,t)},H:function(e,t,a){return t==="Ho"?a.ordinalNumber(e.getHours(),{unit:"hour"}):Nc.H(e,t)},K:function(e,t,a){const s=e.getHours()%12;return t==="Ko"?a.ordinalNumber(s,{unit:"hour"}):ma(s,t.length)},k:function(e,t,a){let s=e.getHours();return s===0&&(s=24),t==="ko"?a.ordinalNumber(s,{unit:"hour"}):ma(s,t.length)},m:function(e,t,a){return t==="mo"?a.ordinalNumber(e.getMinutes(),{unit:"minute"}):Nc.m(e,t)},s:function(e,t,a){return t==="so"?a.ordinalNumber(e.getSeconds(),{unit:"second"}):Nc.s(e,t)},S:function(e,t){return Nc.S(e,t)},X:function(e,t,a){const s=e.getTimezoneOffset();if(s===0)return"Z";switch(t){case"X":return UR(s);case"XXXX":case"XX":return Pl(s);case"XXXXX":case"XXX":default:return Pl(s,":")}},x:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"x":return UR(s);case"xxxx":case"xx":return Pl(s);case"xxxxx":case"xxx":default:return Pl(s,":")}},O:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+zR(s,":");case"OOOO":default:return"GMT"+Pl(s,":")}},z:function(e,t,a){const s=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+zR(s,":");case"zzzz":default:return"GMT"+Pl(s,":")}},t:function(e,t,a){const s=Math.trunc(+e/1e3);return ma(s,t.length)},T:function(e,t,a){return ma(+e,t.length)}};function zR(e,t=""){const a=e>0?"-":"+",s=Math.abs(e),r=Math.trunc(s/60),i=s%60;return i===0?a+String(r):a+String(r)+t+ma(i,2)}function UR(e,t){return e%60===0?(e>0?"-":"+")+ma(Math.abs(e)/60,2):Pl(e,t)}function Pl(e,t=""){const a=e>0?"-":"+",s=Math.abs(e),r=ma(Math.trunc(s/60),2),i=ma(s%60,2);return a+r+t+i}const qR=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Rq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Y0e=(e,t)=>{const a=e.match(/(P+)(p+)?/)||[],s=a[1],r=a[2];if(!r)return qR(e,t);let i;switch(s){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",qR(s,t)).replace("{{time}}",Rq(r,t))},K0e={p:Rq,P:Y0e},Q0e=/^D+$/,X0e=/^Y+$/,Z0e=["D","DD","YY","YYYY"];function J0e(e){return Q0e.test(e)}function e1e(e){return X0e.test(e)}function t1e(e,t,a){const s=a1e(e,t,a);if(console.warn(s),Z0e.includes(e))throw new RangeError(s)}function a1e(e,t,a){const s=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${s} to the input \`${a}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const n1e=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s1e=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,r1e=/^'([^]*?)'?$/,i1e=/''/g,c1e=/[a-zA-Z]/;function ef(e,t,a){const s=$m(),r=a?.locale??s.locale??f4,i=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,l=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0,d=oa(e,a?.in);if(!i0e(d))throw new RangeError("Invalid time value");let u=t.match(s1e).map(x=>{const m=x[0];if(m==="p"||m==="P"){const h=K0e[m];return h(x,r.formatLong)}return x}).join("").match(n1e).map(x=>
vendor: 4,494 bytes, line 838
838{if(x==="''")return{isToken:!1,value:"'"};const m=x[0];if(m==="'")return{isToken:!1,value:l1e(x)};if($R[m])return{isToken:!0,value:x};if(m.match(c1e))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:x}});r.localize.preprocessor&&(u=r.localize.preprocessor(d,u));const p={firstWeekContainsDate:i,weekStartsOn:l,locale:r};return u.map(x=>{if(!x.isToken)return x.value;const m=x.value;(!a?.useAdditionalWeekYearTokens&&e1e(m)||!a?.useAdditionalDayOfYearTokens&&J0e(m))&&t1e(m,t,String(e));const h=$R[m[0]];return h(d,m,r.localize,p)}).join("")}function l1e(e){const t=e.match(r1e);return t?t[1].replace(i1e,"'"):e}function o1e(e,t){const a=oa(e,t?.in),s=a.getFullYear(),r=a.getMonth(),i=en(a,0);return i.setFullYear(s,r+1,0),i.setHours(0,0,0,0),i.getDate()}function d1e(e,t){return oa(e,t?.in).getMonth()}function u1e(e,t){return oa(e,t?.in).getFullYear()}function p1e(e,t){return+oa(e)>+oa(t)}function f1e(e,t){return+oa(e)<+oa(t)}function m1e(e,t,a){const[s,r]=ju(a?.in,e,t);return s.getFullYear()===r.getFullYear()&&s.getMonth()===r.getMonth()}function x1e(e,t,a){const[s,r]=ju(a?.in,e,t);return s.getFullYear()===r.getFullYear()}function Bq(e,t){const a=()=>en(t?.in,NaN),r=y1e(e);let i;if(r.date){const p=b1e(r.date,2);i=j1e(p.restDateString,p.year)}if(!i||isNaN(+i))return a();const l=+i;let d=0,u;if(r.time&&(d=w1e(r.time),isNaN(d)))return a();if(r.timezone){if(u=N1e(r.timezone),isNaN(u))return a()}else{const p=new Date(l+d),x=oa(0,t?.in);return x.setFullYear(p.getUTCFullYear(),p.getUTCMonth(),p.getUTCDate()),x.setHours(p.getUTCHours(),p.getUTCMinutes(),p.getUTCSeconds(),p.getUTCMilliseconds()),x}return oa(l+d+u,t?.in)}const Rg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},g1e=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,h1e=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,v1e=/^([+-])(\d{2})(?::?(\d{2}))?$/;function y1e(e){const t={},a=e.split(Rg.dateTimeDelimiter);let s;if(a.length>2)return t;if(/:/.test(a[0])?s=a[0]:(t.date=a[0],s=a[1],Rg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Rg.timeZoneDelimiter)[0],s=e.substr(t.date.length,e.length))),s){const r=Rg.timezone.exec(s);r?(t.time=s.replace(r[1],""),t.timezone=r[1]):t.time=s}return t}function b1e(e,t){const a=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),s=e.match(a);if(!s)return{year:NaN,restDateString:""};const r=s[1]?parseInt(s[1]):null,i=s[2]?parseInt(s[2]):null;return{year:i===null?r:i*100,restDateString:e.slice((s[1]||s[2]).length)}}function j1e(e,t){if(t===null)return new Date(NaN);const a=e.match(g1e);if(!a)return new Date(NaN);const s=!!a[4],r=kp(a[1]),i=kp(a[2])-1,l=kp(a[3]),d=kp(a[4]),u=kp(a[5])-1;if(s)return D1e(t,d,u)?S1e(t,d,u):new Date(NaN);{const p=new Date(0);return!E1e(t,i,l)||!A1e(t,r)?new Date(NaN):(p.setUTCFullYear(t,i,Math.max(r,l)),p)}}function kp(e){return e?parseInt(e):1}function w1e(e){const t=e.match(h1e);if(!t)return NaN;const a=BN(t[1]),s=BN(t[2]),r=BN(t[3]);return O1e(a,s,r)?a*Nq+s*wq+r*1e3:NaN}function BN(e){return e&&parseFloat(e.replace(",","."))||0}function N1e(e){if(e==="Z")return 0;const t=e.match(v1e);if(!t)return 0;const a=t[1]==="+"?-1:1,s=parseInt(t[2]),r=t[3]&&parseInt(t[3])||0;return k1e(s,r)?a*(s*Nq+r*wq):NaN}function S1e(e,t,a){const s=new Date(0);s.setUTCFullYear(e,0,4);const r=s.getUTCDay()||7,i=(t-1)*7+a+1-r;return s.setUTCDate(s.getUTCDate()+i),s}const C1e=[31,null,31,30,31,30,31,31,30,31,30,31];function Iq(e){return e%400===0||e%4===0&&e%100!==0}function E1e(e,t,a){return t>=0&&t<=11&&a>=1&&a<=(C1e[t]||(Iq(e)?29:28))}function A1e(e,t){return t>=1&&t<=(Iq(e)?366:365)}function D1e(e,t,a){return t>=1&&t<=53&&a>=0&&a<=6}function O1e(e,t,a){return e===24?t===0&&a===0:a>=0&&a<60&&t>=0&&t<60&&e>=0&&e<25}function k1e(e,t){return t>=0&&t<=59}function _1e(e,t,a){const s=oa(e,a?.in),r=s.getFullYear(),i=s.getDate(),l=en(e,0);l.setFullYear(r,t,15),l.setHours(0,0,0,0);const d=o1e(l);return s.setMonth(t,Math.min(i,d)),s}function T1e(e,t,a){const s=oa(e,a?.in);return isNaN(+s)?en(e,NaN):(s.setFullYear(t),s)}function P1e(e){const t=new Date().getHours(),a=t<12?"Good morning":t<17?"Good afternoon":"Good evening",s=e?.split(" ")[0]??"";return`${a}${s?`, ${s}`:""} 👋`}function M1e(e){const t=e/100;return t>=1e6?`$${(t/1e6).toFixed(1)}M`:t>=1e3?`$${(t/1e3).toFixed(1)}K`:`$${t.toFixed(2)}`}function xs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}
838K`:e.toLocaleString()}function Bg(e){return`${e.toFixed(1)}%`}function Ig({icon:e,iconColor:t,label:a,value:s,sub:r,delta:i,loading:l}){return l?n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:62",className:"h-28 rounded-xl"}):n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:64",className:"bg-card border border-border rounded-xl px-5 py-4 flex flex-col gap-3 hover:border-primary/30 transition-colors",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:65",className:"flex items-center justify-between",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:66",className:`w-8 h-8 rounded-lg flex items-center justify-center ${t}`,children:n.jsx(e,{"data-loc":"client/src/pages/client/Dashboard.tsx:67",className:"w-4 h-4"})}),i&&n.jsxs("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:70",className:`flex items-center gap-0.5 text-xs font-medium px-2 py-0.5 rounded-full ${i.positive?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:[i.positive?n.jsx(_n,{"data-loc":"client/src/pages/client/Dashboard.tsx:73",className:"w-3 h-3"}):n.jsx(lh,{"data-loc":"client/src/pages/client/Dashboard.tsx:73",className:"w-3 h-3"}),i.value]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:78",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:79",className:"text-2xl font-bold text-foreground tracking-tight",children:s}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:80",className:"text-xs text-muted-foreground mt-0.5",children:a}),r&&n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:81",className:"text-xs text-muted-foreground/60 mt-0.5",children:r})]})]})}const R1e=({active:e,payload:t,label:a})=>!e||!t?.length?null:n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:92",className:"bg-card border border-border rounded-lg px-3 py-2 text-xs shadow-xl",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:93",className:"font-semibold text-foreground mb-1.5",children:a?ef(Bq(a),"MMM d, yyyy"):""}),t.map(s=>n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:97",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:98",className:"w-2 h-2 rounded-full",style:{background:s.stroke}}),n.jsxs("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:99",className:"text-muted-foreground capitalize",children:[s.name,":"]}),n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:100",className:"font-medium text-foreground",children:xs(s.value)})]},s.dataKey))]});function B1e({status:e}){return e==="sent"?n.jsx(Le,{"data-loc":"client/src/pages/client/Dashboard.tsx:110",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30 text-xs",children:"Sent"}):e==="sending"?n.jsx(Le,{"data-loc":"client/src/pages/client/Dashboard.tsx:111",className:"bg-blue-500/15 text-blue-400 border-blue-500/30 text-xs",children:"Sending"}):e==="draft"?n.jsx(Le,{"data-loc":"client/src/pages/client/Dashboard.tsx:112",className:"bg-muted text-muted-foreground border-border text-xs",children:"Draft"}):e==="scheduled"?n.jsx(Le,{"data-loc":"client/src/pages/client/Dashboard.tsx:113",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 text-xs",children:"Scheduled"}):n.jsx(Le,{"data-loc":"client/src/pages/client/Dashboard.tsx:114",variant:"outline",className:"text-xs",children:e})}function I1e({item:e}){const t=e.type==="purchase",a=e.type==="checkout_view",s=e.firstName?`${e.firstName} ${e.lastName??""}`.trim():e.email?.split("@")[0]??"Unknown",r=(()=>{const i=Date.now()-new Date(e.occurredAt).getTime(),l=Math.floor(i/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const d=Math.floor(l/60);return d<24?`${d}h ago`:`${Math.floor(d/24)}d ago`})();return n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:136",className:"flex items-center gap-3 py-2.5 border-b border-border/50 last:border-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:137",className:`w-7 h-7 rounded-full flex items-center justify-center flex-shrink-0 text-xs font-bold ${t?"bg-emerald-500/20 text-emerald-400":a?"bg-amber-500/20 text-amber-400":"bg-blue-500/20 text-blue-400"}`,children:s.charAt(0).toUpperCase()}),n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:144",className:"flex-1 min-w-0",children:n.jsxs("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:145",className:"text-xs text-foreground truncate",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:146",className:"font-medium",children:s}),t?` completed order · ${M1e(e.amountUsd??0)}`:a?" started checkout":" visited a page"]})}),n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:151",className:"text-[10px] text-muted-foreground flex-shrink-0",children:r})]})}function L1e(){const{user:e,loading:t}=Jc(),{isImpersonating:a}=Zv(),[,s]=La(),[r]=v.useState(30);v.useEffect(()=>{!t&&!e&&(window.location.href=uo()),!t&&e&&e.role==="admin"&&!a&&s("/admin")},[e,t,a]);const{data:i,isLoading:l,refetch:d}=le.analytics.dashboardStats.useQuery({days:r}),{data:u,isLoading:p}=le.analytics.audienceChart.useQuery({days:r}),{data:x,isLoading:m}=le.campaigns.list.useQuery({status:"sent",page:1,limit:5}),{data:h,isLoading:y}=le.activity.getFeed.useQuery({page:1,limit:8}),[w,b]=v.useState(new Date),j=()=>{d(),b(new Date)},S=v.useMemo(()=>(u??[]).map(I=>({...I,label:I.date})),[u]),O=x?.campaigns??[],A=h?.items??[],k=i?.email.total??0,E=i?.email.subscribed??0,D=i?.email.unsubscribed??0,_=i?.email.bounced??0,T=k>0?Math.round(E/k*100):0;return t?n.jsx(Pt,{"data-loc":"client/src/pages/client/Dashboard.tsx:201",title:"Dashboard",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:202",className:"p-6 space-y-6",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:203",className:"h-8 w-64"}),n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:204",className:"grid grid-cols-4 gap-4",children:[...Array(4)].map((I,$)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:205",className:"h-28 rounded-xl"},$))})]})}):n.jsx(Pt,{"data-loc":"client/src/pages/client/Dashboard.tsx:213",title:"Dashboard",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:214",className:"p-6 space-y-7 max-w-[1400px]",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:217",className:"flex items-center justify-between",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Dashboard.tsx:218",className:"text-2xl font-bold text-foreground",children:P1e(e?.name)}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:219",className:"flex items-center gap-2",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:220",className:"text-xs text-muted-foreground",children:["Updated ",ef(w,"h:mm a")]}),n.jsx("button",{"data-loc":"client/src/pages/client/Dashboard.tsx:221",onClick:j,className:"p-1.5 rounded-md hover:bg-muted transition-colors",children:n.jsx(Vr,{"data-loc":"client/src/pages/client/Dashboard.tsx:222",className:"w-3.5 h-3.5 text-muted-foreground"})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:228",className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(Ig,{"data-loc":"client/src/pages/client/Dashboard.tsx:229",icon:wa,iconColor:"bg-blue-500/15 text-blue-400",label:"Total contacts",value:xs(k),sub:`${xs(E)} subscribed`,loading:l}),n.jsx(Ig,{"data-loc":"client/src/pages/client/Dashboard.tsx:237",icon:ja,iconColor:"bg-violet-500/15 text-violet-400",label:"Open rate (30d)",value:
838Bg(i?.performance.openRate??0),sub:`${xs(i?.performance.totalSent??0)} emails sent`,loading:l}),n.jsx(Ig,{"data-loc":"client/src/pages/client/Dashboard.tsx:245",icon:la,iconColor:"bg-cyan-500/15 text-cyan-400",label:"Click rate (30d)",value:Bg(i?.performance.clickRate??0),sub:`${xs(i?.performance.totalClicks??0)} clicks`,loading:l}),n.jsx(Ig,{"data-loc":"client/src/pages/client/Dashboard.tsx:253",icon:zi,iconColor:"bg-emerald-500/15 text-emerald-400",label:"Checkout views (30d)",value:xs(i?.revenue.totalOrders??0),sub:"tracked via pixel",loading:l})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:264",className:"flex flex-wrap gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:265",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:266",href:"/campaigns/new",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Dashboard.tsx:266",className:"w-3.5 h-3.5 mr-1.5"}),"New Campaign"]})}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:268",size:"sm",variant:"outline",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:269",href:"/imports",children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Dashboard.tsx:269",className:"w-3.5 h-3.5 mr-1.5"}),"Import Contacts"]})}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:271",size:"sm",variant:"outline",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:272",href:"/activity",children:[n.jsx(Ks,{"data-loc":"client/src/pages/client/Dashboard.tsx:272",className:"w-3.5 h-3.5 mr-1.5"}),"View Activity"]})}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:274",size:"sm",variant:"outline",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:275",href:"/automations",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/Dashboard.tsx:275",className:"w-3.5 h-3.5 mr-1.5"}),"Automations"]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:280",className:"grid grid-cols-1 xl:grid-cols-3 gap-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:283",className:"xl:col-span-2 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:286",className:"bg-card border border-border rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:287",className:"flex items-center justify-between mb-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:288",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Dashboard.tsx:289",className:"text-sm font-semibold text-foreground",children:"Audience Growth"}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:290",className:"text-xs text-muted-foreground mt-0.5",children:"Subscribers over the last 30 days"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:292",variant:"outline",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:293",href:"/contacts",children:["View all ",n.jsx(fd,{"data-loc":"client/src/pages/client/Dashboard.tsx:293",className:"w-3.5 h-3.5 ml-1"})]})})]}),p?n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:297",className:"h-52 w-full rounded-lg"}):n.jsx(Eh,{"data-loc":"client/src/pages/client/Dashboard.tsx:299",width:"100%",height:220,children:n.jsxs(bq,{"data-loc":"client/src/pages/client/Dashboard.tsx:300",data:S,margin:{top:4,right:4,bottom:0,left:0},children:[n.jsxs("defs",{"data-loc":"client/src/pages/client/Dashboard.tsx:301",children:[n.jsxs("linearGradient",{"data-loc":"client/src/pages/client/Dashboard.tsx:302",id:"gradSub",x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{"data-loc":"client/src/pages/client/Dashboard.tsx:303",offset:"5%",stopColor:"#06b6d4",stopOpacity:.25}),n.jsx("stop",{"data-loc":"client/src/pages/client/Dashboard.tsx:304",offset:"95%",stopColor:"#06b6d4",stopOpacity:0})]}),n.jsxs("linearGradient",{"data-loc":"client/src/pages/client/Dashboard.tsx:306",id:"gradUnsub",x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{"data-loc":"client/src/pages/client/Dashboard.tsx:307",offset:"5%",
838stopColor:"#f43f5e",stopOpacity:.18}),n.jsx("stop",{"data-loc":"client/src/pages/client/Dashboard.tsx:308",offset:"95%",stopColor:"#f43f5e",stopOpacity:0})]})]}),n.jsx(am,{"data-loc":"client/src/pages/client/Dashboard.tsx:311",vertical:!1,stroke:"hsl(var(--border))",strokeDasharray:"3 3"}),n.jsx(Gc,{"data-loc":"client/src/pages/client/Dashboard.tsx:312",dataKey:"date",tickFormatter:I=>ef(Bq(I),"MMM d"),tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},axisLine:!1,tickLine:!1,interval:Math.floor(S.length/6)}),n.jsx(Yc,{"data-loc":"client/src/pages/client/Dashboard.tsx:319",tickFormatter:I=>xs(I),tick:{fontSize:10,fill:"hsl(var(--muted-foreground))"},axisLine:!1,tickLine:!1,width:44}),n.jsx(ys,{"data-loc":"client/src/pages/client/Dashboard.tsx:324",content:n.jsx(R1e,{"data-loc":"client/src/pages/client/Dashboard.tsx:324"})}),n.jsx(Qr,{"data-loc":"client/src/pages/client/Dashboard.tsx:325",dataKey:"subscribed",name:"Subscribed",stroke:"#06b6d4",strokeWidth:2,fill:"url(#gradSub)",dot:!1}),n.jsx(Qr,{"data-loc":"client/src/pages/client/Dashboard.tsx:326",dataKey:"unsubscribed",name:"Unsubscribed",stroke:"#f43f5e",strokeWidth:1.5,fill:"url(#gradUnsub)",dot:!1})]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:333",className:"bg-card border border-border rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:334",className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:335",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Dashboard.tsx:336",className:"text-sm font-semibold text-foreground",children:"Recent Campaigns"}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:337",className:"text-xs text-muted-foreground mt-0.5",children:"Last 5 sent campaigns"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:339",variant:"outline",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:340",href:"/campaigns",children:["All campaigns ",n.jsx(fd,{"data-loc":"client/src/pages/client/Dashboard.tsx:340",className:"w-3.5 h-3.5 ml-1"})]})})]}),m?n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:344",className:"space-y-2",children:[...Array(4)].map((I,$)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:344",className:"h-10 rounded"},$))}):O.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:346",className:"text-center py-8 text-muted-foreground text-sm",children:[n.jsx(xf,{"data-loc":"client/src/pages/client/Dashboard.tsx:347",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"No campaigns sent yet"]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:351",className:"space-y-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:352",className:"grid grid-cols-[1fr_80px_70px_70px] gap-2 px-2 pb-2 text-[10px] font-medium text-muted-foreground uppercase tracking-wider border-b border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:353",children:"Campaign"}),n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:354",className:"text-right",children:"Sent"}),n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:355",className:"text-right",children:"Open %"}),n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:356",className:"text-right",children:"Click %"})]}),O.map(I=>{const $=I.totalSent>0?I.totalUniqueOpens/I.totalSent*100:0,R=I.totalSent>0?I.totalUniqueClicks/I.totalSent*100:0;return n.jsx(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:362",href:`/campaigns/${I.id}`,children:n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:363",className:"grid grid-cols-[1fr_80px_70px_70px] gap-2 px-2 py-2.5 rounded-lg hover:bg-muted/50 transition-colors cursor-pointer border-b border-border/40 last:border-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:364",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:365",className:"text-xs font-medium text-foreground truncate",children:I.name}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:366",className:"flex items-center gap-1.5 mt-0.5",children:[n.jsx(B1e,{"data-loc":"client/src/pages/client/Dashboard.tsx:367",status:I.status}),I.sentAt&&n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:368",className:"text-[10px] text-muted-foreground",children:ef(new Date(I.sentAt),"MMM d")})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:371",className:"text-xs text-muted-foreground text-right self-center",children:xs(I.totalSent??0)}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:372",className:`text-xs font-medium text-right self-center ${$>=33?"text-emerald-400":$>=15?"text-amber-400":"text-muted-foreground"}`,children:Bg($)}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:375",className:`text-xs font-medium text-right self-center ${R>=1.2?"text-emerald-400":"text-muted-foreground"}`,children:Bg(R)})]})},I.id)})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:388",className:"space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:391",className:"bg-card border border-border rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:392",className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:393",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Dashboard.tsx:394",className:"text-sm font-semibold text-foreground",children:"Live Activity"}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:395",className:"text-xs text-muted-foreground mt-0.5",children:"Recent contact events"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:397",variant:"outline",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:398",href:"/activity",children:["All ",n.jsx(fd,{"data-loc":"client/src/pages/client/Dashboard.tsx:398",className:"w-3.5 h-3.5 ml-1"})]})})]}),y?n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:402",className:"space-y-2",children:[...Array(5)].map((I,$)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:402",className:"h-9 rounded"},$))}):A.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:404",className:"text-center py-8 text-muted-foreground text-sm",children:[n.jsx(Ks,{"data-loc":"client/src/pages/client/Dashboard.tsx:405",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),"No activity yet"]}):n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:409",children:A.map(I=>n.jsx(I1e,{"data-loc":"client/src/pages/client/Dashboard.tsx:409",item:I},I.id))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:414",className:"bg-card border border-border rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:415",className:"mb-4",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Dashboard.tsx:416",className:"text-sm font-semibold text-foreground",children:"Audience Health"}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:417",className:"text-xs text-muted-foreground mt-0.5",children:"List quality snapshot"})]}),l?n.jsx(Me,{"data-loc":"client/src/pages/client/Dashboard.tsx:420",className:"h-32 rounded-lg"}):n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:422",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:424",className:"flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:425",className:"text-xs text-muted-foreground",children:"Subscribed"}),n.jsxs("span",{"data-loc":"client/src/pages/client/Dashboard.tsx:426",className:"text-xs font-semibold text-foreground",children:[xs(E)," / ",xs(k)]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:428",className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:n.jsx("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:429",className:`h-full rounded-full transition-all duration-700 ${T>=80?"bg-emerald-500":T>=60?"bg-amber-500":"bg-red-500"}`,style:{width:`${T}%`}})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:436",className:"grid grid-cols-3 gap-2 pt-1",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:437",className:"bg-muted/50 rounded-lg px-3 py-2 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:438",className:"text-base font-bold text-foreground",children:xs(E)}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:439",className:"text-[10px] text-muted-foreground mt-0.5",children:"Active"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:441",className:"bg-muted/50 rounded-lg px-3 py-2 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:442",className:"text-base font-bold text-amber-400",children:xs(D)}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:443",className:"text-[10px] text-muted-foreground mt-0.5",children:"Unsub"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Dashboard.tsx:445",className:"bg-muted/50 rounded-lg px-3 py-2 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:446",className:"text-base font-bold text-red-400",children:xs(_)}),n.jsx("p",{"data-loc":"client/src/pages/client/Dashboard.tsx:447",className:"text-[10px] text-muted-foreground mt-0.5",children:"Bounced"})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Dashboard.tsx:450",variant:"outline",size:"sm",className:"w-full mt-1",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Dashboard.tsx:451",href:"/contacts",children:["Manage contacts ",n.jsx(fd,{"data-loc":"client/src/pages/client/Dashboard.tsx:451",className:"w-3.5 h-3.5 ml-1"})]})})]})]})]})]})]})})}var Ly="Checkbox",[$1e]=Pn(Ly),[z1e,m4]=$1e(Ly);function U1e(e){const{__scopeCheckbox:t,checked:a,children:s,defaultChecked:r,disabled:i,form:l,name:d,onCheckedChange:u,required:p,value:x="on",internal_do_not_use_render:m}=e,[h,y]=Zs({prop:a,defaultProp:r??!1,onChange:u,caller:Ly}),[w,b]=v.useState(null),[j,S]=v.useState(null),O=v.useRef(!1),A=w?!!l||!!w.closest("form"):!0,k={checked:h,disabled:i,setChecked:y,control:w,setControl:b,name:d,form:l,value:x,hasConsumerStoppedPropagationRef:O,required:p,defaultChecked:Uc(r)?!1:r,isFormControl:A,bubbleInput:j,setBubbleInput:S};return n.jsx(z1e,{scope:t,...k,children:q1e(m)?m(k):s})}var Lq="CheckboxTrigger",$q=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:a,...s},r)=>{const{control:i,value:l,disabled:d,checked:u,required:p,setControl:x,setChecked:m,hasConsumerStoppedPropagationRef:h,isFormControl:y,bubbleInput:w}=m4(Lq,e),b=kt(r,x),j=v.useRef(u);return v.useEffect(()=>{const S=i?.form;if(S){const O=()=>m(j.current);return S.addEventListener("reset",O),()=>S.removeEventListener("reset",O)}},[i,m]),n.jsx(et.button,{type:"button",role:"checkbox","aria-checked":Uc(u)?"mixed":u,"aria-required":p,"data-state":Hq(u),"data-disabled":d?"":void 0,disabled:d,value:l,...s,ref:b,onKeyDown:We(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:We(a,S=>{m(O=>Uc(O)?!0:!O),w&&y&&(h.current=S.isPropagationStopped(),h.current||S.stopPropagation())})})});$q.displayName=Lq;var zq=v.forwardRef((e,t)=>
vendor: 26,060 bytes, line 838
838{const{__scopeCheckbox:a,name:s,checked:r,defaultChecked:i,required:l,disabled:d,value:u,onCheckedChange:p,form:x,...m}=e;return n.jsx(U1e,{__scopeCheckbox:a,checked:r,defaultChecked:i,disabled:d,required:l,onCheckedChange:p,name:s,form:x,value:u,internal_do_not_use_render:({isFormControl:h})=>n.jsxs(n.Fragment,{children:[n.jsx($q,{...m,ref:t,__scopeCheckbox:a}),h&&n.jsx(Wq,{__scopeCheckbox:a})]})})});zq.displayName=Ly;var Uq="CheckboxIndicator",qq=v.forwardRef((e,t)=>{const{__scopeCheckbox:a,forceMount:s,...r}=e,i=m4(Uq,a);return n.jsx(Hn,{present:s||Uc(i.checked)||i.checked===!0,children:n.jsx(et.span,{"data-state":Hq(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});qq.displayName=Uq;var Fq="CheckboxBubbleInput",Wq=v.forwardRef(({__scopeCheckbox:e,...t},a)=>{const{control:s,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:l,required:d,disabled:u,name:p,value:x,form:m,bubbleInput:h,setBubbleInput:y}=m4(Fq,e),w=kt(a,y),b=sy(i),j=Mv(s);v.useEffect(()=>{const O=h;if(!O)return;const A=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(A,"checked").set,D=!r.current;if(b!==i&&E){const _=new Event("click",{bubbles:D});O.indeterminate=Uc(i),E.call(O,Uc(i)?!1:i),O.dispatchEvent(_)}},[h,b,i,r]);const S=v.useRef(Uc(i)?!1:i);return n.jsx(et.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??S.current,required:d,disabled:u,name:p,value:x,form:m,...t,tabIndex:-1,ref:w,style:{...t.style,...j,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Wq.displayName=Fq;function q1e(e){return typeof e=="function"}function Uc(e){return e==="indeterminate"}function Hq(e){return Uc(e)?"indeterminate":e?"checked":"unchecked"}function hd({className:e,...t}){return n.jsx(zq,{"data-loc":"client/src/components/ui/checkbox.tsx:12","data-slot":"checkbox",className:Se("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:n.jsx(qq,{"data-loc":"client/src/components/ui/checkbox.tsx:20","data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:n.jsx(ss,{"data-loc":"client/src/components/ui/checkbox.tsx:24",className:"size-3.5"})})})}var $y="Popover",[Vq]=Pn($y,[Zc]),zm=Zc(),[F1e,cl]=Vq($y),Gq=e=>{const{__scopePopover:t,children:a,open:s,defaultOpen:r,onOpenChange:i,modal:l=!1}=e,d=zm(t),u=v.useRef(null),[p,x]=v.useState(!1),[m,h]=Zs({prop:s,defaultProp:r??!1,onChange:i,caller:$y});return n.jsx(Rv,{...d,children:n.jsx(F1e,{scope:t,contentId:hn(),triggerRef:u,open:m,onOpenChange:h,onOpenToggle:v.useCallback(()=>h(y=>!y),[h]),hasCustomAnchor:p,onCustomAnchorAdd:v.useCallback(()=>x(!0),[]),onCustomAnchorRemove:v.useCallback(()=>x(!1),[]),modal:l,children:a})})};Gq.displayName=$y;var Yq="PopoverAnchor",W1e=v.forwardRef((e,t)=>{const{__scopePopover:a,...s}=e,r=cl(Yq,a),i=zm(a),{onCustomAnchorAdd:l,onCustomAnchorRemove:d}=r;return v.useEffect(()=>(l(),()=>d()),[l,d]),n.jsx(Sm,{...i,...s,ref:t})});W1e.displayName=Yq;var Kq="PopoverTrigger",Qq=v.forwardRef((e,t)=>{const{__scopePopover:a,...s}=e,r=cl(Kq,a),i=zm(a),l=kt(t,r.triggerRef),d=n.jsx(et.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":tF(r.open),...s,ref:l,onClick:We(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?d:n.jsx(Sm,{asChild:!0,...i,children:d})});Qq.displayName=Kq;var x4="PopoverPortal",[H1e,V1e]=Vq(x4,{forceMount:void 0}),Xq=e=>{const{__scopePopover:t,forceMount:a,children:s,container:r}=e,i=cl(x4,t);return n.jsx(H1e,{scope:t,forceMount:a,children:n.jsx(Hn,{present:a||i.open,children:n.jsx(lu,{asChild:!0,container:r,children:s})})})};Xq.displayName=x4;var su="PopoverContent",Zq=v.forwardRef((e,t)=>{const a=V1e(su,e.__scopePopover),{forceMount:s=a.forceMount,...r}=e,i=cl(su,e.__scopePopover);return n.jsx(Hn,{present:s||i.open,children:i.modal?n.jsx(Y1e,{...r,ref:t}):n.jsx(K1e,{...r,ref:t})})});Zq.displayName=su;var G1e=Wc("PopoverContent.RemoveScroll"),Y1e=v.forwardRef((e,t)=>{const a=cl(su,e.__scopePopover),s=v.useRef(null),r=kt(t,s),i=v.useRef(!1);return v.useEffect(()=>{const l=s.current;if(l)return Hv(l)},[]),n.jsx(Am,{as:G1e,allowPinchZoom:!0,children:n.jsx(Jq,{...e,ref:r,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:We(e.onCloseAutoFocus,l=>{l.preventDefault(),i.current||a.triggerRef.current?.focus()}),onPointerDownOutside:We(e.onPointerDownOutside,l=>{const d=l.detail.originalEvent,u=d.button===0&&d.ctrlKey===!0,p=d.button===2||u;i.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:We(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),K1e=v.forwardRef((e,t)=>{const a=cl(su,e.__scopePopover),s=v.useRef(!1),r=v.useRef(!1);return n.jsx(Jq,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(s.current||a.triggerRef.current?.focus(),i.preventDefault()),s.current=!1,r.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=i.target;a.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&r.current&&i.preventDefault()}})}),Jq=v.forwardRef((e,t)=>{const{__scopePopover:a,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:x,...m}=e,h=cl(su,a),y=zm(a);return Fv(),n.jsx(Em,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:r,onUnmountAutoFocus:i,children:n.jsx(ru,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:x,onEscapeKeyDown:d,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>h.onOpenChange(!1),children:n.jsx(Bv,{"data-state":tF(h.open),role:"dialog",id:h.contentId,...y,...m,ref:t,style:{...m.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)"}})})})}),eF="PopoverClose",Q1e=v.forwardRef((e,t)=>{const{__scopePopover:a,...s}=e,r=cl(eF,a);return n.jsx(et.button,{type:"button",...s,ref:t,onClick:We(e.onClick,()=>r.onOpenChange(!1))})});Q1e.displayName=eF;var X1e="PopoverArrow",Z1e=v.forwardRef((e,t)=>{const{__scopePopover:a,...s}=e,r=zm(a);return n.jsx(Iv,{...r,...s,ref:t})});Z1e.displayName=X1e;function tF(e){return e?"open":"closed"}var J1e=Gq,eje=Qq,tje=Xq,aje=Zq;function Cd({...e}){return n.jsx(J1e,{"data-loc":"client/src/components/ui/popover.tsx:9","data-slot":"popover",...e})}function Ed({...e}){return n.jsx(eje,{"data-loc":"client/src/components/ui/popover.tsx:15","data-slot":"popover-trigger",...e})}function Ad({className:e,align:t="center",sideOffset:a=4,...s}){return n.jsx(tje,{"data-loc":"client/src/components/ui/popover.tsx:25",children:n.jsx(aje,{"data-loc":"client/src/components/ui/popover.tsx:26","data-slot":"popover-content",align:t,sideOffset:a,className:Se("bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...s})})}var FR=1,nje=.9,sje=.8,rje=.17,IN=.1,LN=.999,ije=.9999,cje=.99,lje=/[\\\/_+.#"@\[\(\{&]/,oje=/[\\\/_+.#"@\[\(\{&]/g,dje=/[\s-]/,aF=/[\s-]/g;function i5(e,t,a,s,r,i,l){if(i===t.length)return r===e.length?FR:cje;var d=`${r},${i}`;if(l[d]!==void 0)return l[d];for(var u=s.charAt(i),p=a.indexOf(u,r),x=0,m,h,y,w;p>=0;)m=i5(e,t,a,s,p+1,i+1,l),m>x&&(p===r?m*=FR:lje.test(e.charAt(p-1))?(m*=sje,y=e.slice(r,p-1).match(oje),y&&r>0&&(m*=Math.pow(LN,y.length))):dje.test(e.charAt(p-1))?(m*=nje,w=e.slice(r,p-1).match(aF),w&&r>0&&(m*=Math.pow(LN,w.length))):(m*=rje,r>0&&(m*=Math.pow(LN,p-r))),e.charAt(p)!==t.charAt(i)&&(m*=ije)),(m<IN&&a.charAt(p-1)===s.charAt(i+1)||s.charAt(i+1)===s.charAt(i)&&a.charAt(p-1)!==s.charAt(i))&&(h=i5(e,t,a,s,p+1,i+2,l),h*IN>m&&(m=h*IN)),m>x&&(x=m),p=a.indexOf(u,p+1);return l[d]=x,x}function WR(e){return e.toLowerCase().replace(aF," ")}function uje(e,t,a){return e=a&&a.length>0?`${e+" "+a.join(" ")}`:e,i5(e,t,WR(e),WR(t),0,0,{})}var _p='[cmdk-group=""]',$N='[cmdk-group-items=""]',pje='[cmdk-group-heading=""]',nF='[cmdk-item=""]',HR=`${nF}:not([aria-disabled="true"])`,c5="cmdk-item-select",dd="data-value",fje=(e,t,a)=>uje(e,t,a),sF=v.createContext(void 0),Um=()=>v.useContext(sF),rF=v.createContext(void 0),g4=()=>v.useContext(rF),iF=v.createContext(void 0),cF=v.forwardRef((e,t)=>{let a=ud(()=>{var F,H;return{search:"",value:(H=(F=e.value)!=null?F:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=ud(()=>new Set),r=ud(()=>new Map),i=ud(()=>new Map),l=ud(()=>new Set),d=lF(e),{label:u,children:p,value:x,onValueChange:m,filter:h,shouldFilter:y,loop:w,disablePointerSelection:b=!1,vimBindings:j=!0,...S}=e,O=hn(),A=hn(),k=hn(),E=v.useRef(null),D=Sje();ro(()=>{if(x!==void 0){let F=x.trim();a.current.value=F,_.emit()}},[x]),ro(()=>{D(6,Y)},[]);let _=v.useMemo(()=>({subscribe:F=>(l.current.add(F),()=>l.current.delete(F)),snapshot:()=>a.current,setState:(F,H,q)=>{var J,ce,se,ye;if(!Object.is(a.current[F],H)){if(a.current[F]=H,F==="search")B(),$(),D(1,R);else if(F==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let de=document.getElementById(k);de?de.focus():(J=document.getElementById(O))==null||J.focus()}if(D(7,()=>{var de;a.current.selectedItemId=(de=z())==null?void 0:de.id,_.emit()}),q||D(5,Y),((ce=d.current)==null?void 0:ce.value)!==void 0){let de=H??"";(ye=(se=d.current).onValueChange)==null||ye.call(se,de);return}}_.emit()}},emit:()=>{l.current.forEach(F=>F())}}),[]),T=v.useMemo(()=>({value:(F,H,q)=>{var J;H!==((J=i.current.get(F))==null?void 0:J.value)&&(i.current.set(F,{value:H,keywords:q}),a.current.filtered.items.set(F,I(H,q)),D(2,()=>{$(),_.emit()}))},item:(F,H)=>(s.current.add(F),H&&(r.current.has(H)?r.current.get(H).add(F):r.current.set(H,new Set([F]))),D(3,()=>{B(),$(),a.current.value||R(),_.emit()}),()=>{i.current.delete(F),s.current.delete(F),a.current.filtered.items.delete(F);let q=z();D(4,()=>{B(),q?.getAttribute("id")===F&&R(),_.emit()})}),group:F=>(r.current.has(F)||r.current.set(F,new Set),()=>{i.current.delete(F),r.current.delete(F)}),filter:()=>d.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:O,inputId:k,labelId:A,listInnerRef:E}),[]);function I(F,H){var q,J;let ce=(J=(q=d.current)==null?void 0:q.filter)!=null?J:fje;return F?ce(F,a.current.search,H):0}function $(){if(!a.current.search||d.current.shouldFilter===!1)return;let F=a.current.filtered.items,H=[];a.current.filtered.groups.forEach(J=>{let ce=r.current.get(J),se=0;ce.forEach(ye=>{let de=F.get(ye);se=Math.max(de,se)}),H.push([J,se])});let q=E.current;Q().sort((J,ce)=>{var se,ye;let de=J.getAttribute("id"),ve=ce.getAttribute("id");return((se=F.get(ve))!=null?se:0)-((ye=F.get(de))!=null?ye:0)}).forEach(J=>{let ce=J.closest($N);ce?ce.appendChild(J.parentElement===ce?J:J.closest(`${$N} > *`)):q.appendChild(J.parentElement===q?J:J.closest(`${$N} > *`))}),H.sort((J,ce)=>ce[1]-J[1]).forEach(J=>{var ce;let se=(ce=E.current)==null?void 0:ce.querySelector(`${_p}[${dd}="${encodeURIComponent(J[0])}"]`);se?.parentElement.appendChild(se)})}function R(){let F=Q().find(q=>q.getAttribute("aria-disabled")!=="true"),H=F?.getAttribute(dd);_.setState("value",H||void 0)}function B(){var F,H,q,J;if(!a.current.search||d.current.shouldFilter===!1){a.current.filtered.count=s.current.size;return}a.current.filtered.groups=new Set;let ce=0;for(let se of s.current){let ye=(H=(F=i.current.get(se))==null?void 0:F.value)!=null?H:"",de=(J=(q=i.current.get(se))==null?void 0:q.keywords)!=null?J:[],ve=I(ye,de);a.current.filtered.items.set(se,ve),ve>0&&ce++}for(let[se,ye]of r.current)for(let de of ye)if(a.current.filtered.items.get(de)>0){a.current.filtered.groups.add(se);break}a.current.filtered.count=ce}function Y(){var F,H,q;let J=z();J&&(((F=J.parentElement)==null?void 0:F.firstChild)===J&&((q=(H=J.closest(_p))==null?void 0:H.querySelector(pje))==null||q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function z(){var F;return(F=E.current)==null?void 0:F.querySelector(`${nF}[aria-selected="true"]`)}function Q(){var F;return Array.from(((F=E.current)==null?void 0:F.querySelectorAll(HR))||[])}function L(F){let H=Q()[F];H&&_.setState("value",H.getAttribute(dd))}function M(F){var H;let q=z(),J=Q(),ce=J.findIndex(ye=>ye===q),se=J[ce+F];(H=d.current)!=null&&H.loop&&(se=ce+F<0?J[J.length-1]:ce+F===J.length?J[0]:J[ce+F]),se&&_.setState("value",se.getAttribute(dd))}function U(F){let H=z(),q=H?.closest(_p),J;for(;q&&!J;)q=F>0?wje(q,_p):Nje(q,_p),J=q?.querySelector(HR);J?_.setState("value",J.getAttribute(dd)):M(F)}let Z=()=>L(Q().length-1),ie=F=>{F.preventDefault(),F.metaKey?Z():F.altKey?U(1):M(1)},G=F=>{F.preventDefault(),F.metaKey?L(0):F.altKey?U(-1):M(-1)};return v.createElement(et.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:F=>{var H;(H=S.onKeyDown)==null||H.call(S,F);let q=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||q))switch(F.key){case"n":case"j":{j&&F.ctrlKey&&ie(F);break}case"ArrowDown":{ie(F);break}case"p":case"k":{j&&F.ctrlKey&&G(F);break}case"ArrowUp":{G(F);break}case"Home":{F.preventDefault(),L(0);break}case"End":{F.preventDefault(),Z();break}case"Enter":{F.preventDefault();let J=z();if(J){let ce=new Event(c5);J.dispatchEvent(ce)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Eje},u),zy(e,F=>v.createElement(rF.Provider,{value:_},v.createElement(sF.Provider,{value:T},F))))}),mje=v.forwardRef((e,t)=>{var a,s;let r=hn(),i=v.useRef(null),l=v.useContext(iF),d=Um(),u=lF(e),p=(s=(a=u.current)==null?void 0:a.forceMount)!=null?s:l?.forceMount;ro(()=>{if(!p)return d.item(r,l?.id)},[p]);let x=oF(r,i,[e.value,e.children,i],e.keywords),m=g4(),h=Kc(D=>D.value&&D.value===x.current),y=Kc(D=>p||d.filter()===!1?!0:D.search?D.filtered.items.get(r)>0:!0);v.useEffect(()=>{let D=i.current;if(!(!D||e.disabled))return D.addEventListener(c5,w),()=>D.removeEventListener(c5,w)},[y,e.onSelect,e.disabled]);function w(){var D,_;b(),(_=(D=u.current).onSelect)==null||_.call(D,x.current)}function b(){m.setState("value",x.current,!0)}if(!y)return null;let{disabled:j,value:S,onSelect:O,forceMount:A,keywords:k,...E}=e;return v.createElement(et.div,{ref:Pi(i,t),...E,id:r,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!h,"data-disabled":!!j,"data-selected":!!h,onPointerMove:j||d.getDisablePointerSelection()?void 0:b,onClick:j?void 0:w},e.children)}),xje=v.forwardRef((e,t)=>{let{heading:a,children:s,forceMount:r,...i}=e,l=hn(),d=v.useRef(null),u=v.useRef(null),p=hn(),x=Um(),m=Kc(y=>r||x.filter()===!1?!0:y.search?y.filtered.groups.has(l):!0);ro(()=>x.group(l),[]),oF(l,d,[e.value,e.heading,u]);let h=v.useMemo(()=>({id:l,forceMount:r}),[r]);return v.createElement(et.div,{ref:Pi(d,t),...i,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},a&&v.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:p},a),zy(e,y=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":a?p:void 0},v.createElement(iF.Provider,{value:h},y))))}),gje=v.forwardRef((e,t)=>{let{alwaysRender:a,...s}=e,r=v.useRef(null),i=Kc(l=>!l.search);return!a&&!i?null:v.createElement(et.div,{ref:Pi(r,t),...s,"cmdk-separator":"",role:"separator"})}),hje=v.forwardRef((e,t)=>{let{onValueChange:a,...s}=e,r=e.value!=null,i=g4(),l=Kc(p=>p.search),d=Kc(p=>p.selectedItemId),u=Um();return v.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),v.createElement(et.input,{ref:t,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":d,id:u.inputId,type:"text",value:r?e.value:l,onChange:p=>{r||i.setState("search",p.target.value),a?.(p.target.value)}})}),vje=v.forwardRef((e,t)=>{let{children:a,label:s="Suggestions",...r}=e,i=v.useRef(null),l=v.useRef(null),d=Kc(p=>p.selectedItemId),u=Um();return v.useEffect(()=>{if(l.current&&i.current){let p=l.current,x=i.current,m,h=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let y=p.offsetHeight;x.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return h.observe(p),()=>{cancelAnimationFrame(m),h.unobserve(p)}}},[]),v.createElement(et.div,{ref:Pi(i,t),...r,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":s,id:u.listId},zy(e,p=>v.createElement("div",{ref:Pi(l,u.listInnerRef),"cmdk-list-sizer":""},p)))}),yje=v.forwardRef((e,t)=>{let{open:a,onOpenChange:s,overlayClassName:r,contentClassName:i,container:l,...d}=e;return v.createElement(Gv,{open:a,onOpenChange:s},v.createElement(Yv,{container:l},v.createElement(Kv,{"cmdk-overlay":"",className:r}),v.createElement(Qv,{"aria-label":e.label,"cmdk-dialog":"",className:i},v.createElement(cF,{ref:t,...d}))))}),bje=v.forwardRef((e,t)=>Kc(a=>a.filtered.count===0)?v.createElement(et.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),jje=v.forwardRef((e,t)=>{let{progress:a,children:s,label:r="Loading...",...i}=e;return v.createElement(et.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r},zy(e,l=>v.createElement("div",{"aria-hidden":!0},l)))}),wu=Object.assign(cF,{List:vje,Item:mje,Input:hje,Group:xje,Separator:gje,Dialog:yje,Empty:bje,Loading:jje});function wje(e,t){let a=e.nextElementSibling;for(;a;){if(a.matches(t))return a;a=a.nextElementSibling}}function Nje(e,t){let a=e.previousElementSibling;for(;a;){if(a.matches(t))return a;a=a.previousElementSibling}}function lF(e){let t=v.useRef(e);return ro(()=>{t.current=e}),t}var ro=typeof window>"u"?v.useEffect:v.useLayoutEffect;function ud(e){let t=v.useRef();return t.current===void 0&&(t.current=e()),t}function Kc(e){let t=g4(),a=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,a,a)}function oF(e,t,a,s=[]){let r=v.useRef(),i=Um();return ro(()=>{var l;let d=(()=>{var p;for(let x of a){if(typeof x=="string")return x.trim();if(typeof x=="object"&&"current"in x)return x.current?(p=x.current.textContent)==null?void 0:p.trim():r.current}})(),u=s.map(p=>p.trim());i.value(e,d,u),(l=t.current)==null||l.setAttribute(dd,d),r.current=d}),r}var Sje=()=>{let[e,t]=v.useState(),a=ud(()=>new Map);return ro(()=>{a.current.forEach(s=>s()),a.current=new Map},[e]),(s,r)=>{a.current.set(s,r),t({})}};function Cje(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function zy({asChild:e,children:t},a){return e&&v.isValidElement(t)?v.cloneElement(Cje(t),{ref:t.ref},a(t.props.children)):a(t)}var Eje={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Aje({className:e,...t}){return n.jsx(wu,{"data-loc":"client/src/components/ui/command.tsx:21","data-slot":"command",className:Se("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function Dje({className:e,...t}){return n.jsxs("div",{"data-loc":"client/src/components/ui/command.tsx:68","data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[n.jsx(Gr,{"data-loc":"client/src/components/ui/command.tsx:72",className:"size-4 shrink-0 opacity-50"}),n.jsx(wu.Input,{"data-loc":"client/src/components/ui/command.tsx:73","data-slot":"command-input",className:Se("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function Oje({className:e,...t}){return n.jsx(wu.List,{"data-loc":"client/src/components/ui/command.tsx:90","data-slot":"command-list",className:Se("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function kje({...e}){return n.jsx(wu.Empty,{"data-loc":"client/src/components/ui/command.tsx:105","data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function _je({className:e,...t}){return n.jsx(wu.Group,{"data-loc":"client/src/components/ui/command.tsx:118","data-slot":"command-group",className:Se("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function VR({className:e,...t}){return n.jsx(wu.Item,{"data-loc":"client/src/components/ui/command.tsx:147","data-slot":"command-item",className:Se("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Uy="Switch",[Tje]=Pn(Uy),[Pje,Mje]=Tje(Uy),dF=v.forwardRef((e,t)=>{const{__scopeSwitch:a,name:s,checked:r,defaultChecked:i,required:l,disabled:d,value:u="on",onCheckedChange:p,form:x,...m}=e,[h,y]=v.useState(null),w=kt(t,A=>y(A)),b=v.useRef(!1),j=h?x||!!h.closest("form"):!0,[S,O]=Zs({prop:r,defaultProp:i??!1,onChange:p,caller:Uy});return n.jsxs(Pje,{scope:a,checked:S,disabled:d,children:[n.jsx(et.button,{type:"button",role:"switch","aria-checked":S,"aria-required":l,"data-state":mF(S),"data-disabled":d?"":void 0,disabled:d,value:u,...m,ref:w,onClick:We(e.onClick,A=>{O(k=>!k),j&&(b.current=A.isPropagationStopped(),b.current||A.stopPropagation())})}),j&&n.jsx(fF,{control:h,bubbles:!b.current,name:s,value:u,checked:S,required:l,disabled:d,form:x,style:{transform:"translateX(-100%)"}})]})});dF.displayName=Uy;var uF="SwitchThumb",pF=v.forwardRef((e,t)=>{const{__scopeSwitch:a,...s}=e,r=Mje(uF,a);return n.jsx(et.span,{"data-state":mF(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:t})});pF.displayName=uF;var Rje="SwitchBubbleInput",fF=v.forwardRef(({__scopeSwitch:e,control:t,checked:a,bubbles:s=!0,...r},i)=>{const l=v.useRef(null),d=kt(l,i),u=sy(a),p=Mv(t);return v.useEffect(()=>{const x=l.current;if(!x)return;const m=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(m,"checked").set;if(u!==a&&y){const w=new Event("click",{bubbles:s});y.call(x,a),x.dispatchEvent(w)}},[u,a,s]),n.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:d,style:{...r.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});fF.displayName=Rje;function mF(e){return e?"checked":"unchecked"}var Bje=dF,Ije=pF;function Ti({className:e,...t}){return n.jsx(Bje,{"data-loc":"client/src/components/ui/switch.tsx:11","data-slot":"switch",className:Se("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:n.jsx(Ije,{"data-loc":"client/src/components/ui/switch.tsx:19","data-slot":"switch-thumb",className:Se("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}const Lje={subscribed:"border-emerald-200 bg-emerald-50 text-emerald-700",unsubscribed:"border-gray-200 bg-gray-50 text-gray-500",bounced:"border-red-200 bg-red-50 text-red-600",complained:"border-orange-200 bg-orange-50 text-orange-600",pending:"border-yellow-200 bg-yellow-50 text-yellow-700"};function $je(){const[e,t]=v.useState(""),[a,s]=v.useState("all"),[r,i]=v.useState(1),[l,d]=v.useState(new Set),[u,p]=v.useState(!1),[x,m]=v.useState(!1),[h,y]=v.useState(null),[w,b]=v.useState(!1),[j,S]=v.useState(null),O=v.useRef(null),[A,k]=v.useState({email:"",firstName:"",lastName:"",accountType:"",accountSize:"",tradingPlatform:"",country:""}),[E,D]=v.useState("date_desc"),[_,T]=v.useState(!1),[I,$]=v.useState(""),[R,B]=v.useState([]),Y=le.useUtils(),[z,Q]=v.useState("all"),[L,M]=v.useState(1),[U,Z]=v.useState(new Set),ie=50,[G,F]=v.useState(1),[H,q]=v.useState(""),J=50,[ce,se]=v.useState(!1),[ye,de]=v.useState(null),[ve,Pe]=v.useState(null),[ue,Qe]=v.useState(null),Ue=v.useRef(null),{data:xe,isLoading:$e}=le.contacts.getBounces.useQuery({page:G,limit:J,search:H||void 0},{enabled:z==="bounced"}),Te=z==="cold90"?90:z==="cold180"?180:90,{data:dt,isLoading:tt,refetch:me}=le.contacts.getColdContacts.useQuery({days:Te,page:L,limit:ie},{enabled:z==="cold90"||z==="cold180"}),{data:ut}=le.tags.list.useQuery(),pt=ut??[],ft=le.contacts.bulkAddTags.useMutation({onSuccess:ee=>{ne.success(`Tag${R.length>
8381?"s":""} applied to ${l.size} contact${l.size>1?"s":""}`),B([]),T(!1),d(new Set),xa()},onError:ee=>ne.error(ee.message)}),_t=le.contacts.importSuppressList.useMutation({onSuccess:ee=>{Qe(ee),Y.contacts.getBounces.invalidate(),Y.contacts.list.invalidate()},onError:ee=>ne.error(ee.message)}),da=ee=>{if(de(ee),Pe(null),Qe(null),!ee)return;const ke=new FileReader;ke.onload=qe=>{const at=(qe.target?.result).split(/\r?\n/).filter(Boolean),Ge=[];for(const Ie of at){const ua=Ie.split(","),Ht=ua[0]?.trim().replace(/^"|"$/g,""),Lt=ua[1]?.trim().replace(/^"|"$/g,"").toUpperCase();!Ht||Ht.toLowerCase()==="email"||(Lt==="BOUNCE"||Lt==="COMPLAINT")&&Ge.push({email:Ht,reason:Lt})}const Mt=Ge.filter(Ie=>Ie.reason==="BOUNCE").length,zt=Ge.filter(Ie=>Ie.reason==="COMPLAINT").length;Pe({entries:Ge,bounceCount:Mt,complaintCount:zt})},ke.readAsText(ee)},vt=le.contacts.bulkSuppress.useMutation({onSuccess:ee=>{ne.success(`${ee.suppressed} contacts suppressed`),Z(new Set),me()},onError:ee=>ne.error(ee.message)}),Xt=50,{data:Ct,isLoading:Zt,refetch:xa}=le.contacts.list.useQuery({search:e||void 0,status:a==="all"?void 0:a,page:r,limit:Xt,sortBy:E}),Sa=le.campaigns.importContacts.useMutation({onSuccess:ee=>{S(ee),xa(),ne.success("Import started — processing in the background. Check the Imports page for progress.")},onError:ee=>ne.error(ee.message)}),Da=()=>{if(!h)return;const ee=new FileReader;ee.onload=ke=>{const qe=ke.target?.result;Sa.mutate({csvContent:qe,updateExisting:w})},ee.readAsText(h)},Va=le.contacts.create.useMutation({onSuccess:()=>{ne.success("Contact created"),p(!1),xa(),k({email:"",firstName:"",lastName:"",accountType:"",accountSize:"",tradingPlatform:"",country:""})},onError:ee=>ne.error(ee.message)}),X=Math.ceil((Ct?.total??0)/Xt),Re=Ct?.contacts??[],Ve=Re.length>0&&Re.every(ee=>l.has(ee.id)),bt=()=>{d(Ve?new Set:new Set(Re.map(ee=>ee.id)))},Be=ee=>{d(ke=>{const qe=new Set(ke);return qe.has(ee)?qe.delete(ee):qe.add(ee),qe})};return n.jsx(Pt,{"data-loc":"client/src/pages/client/Contacts.tsx:227",title:"Contacts",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:228",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:231",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:232",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Contacts.tsx:233",className:"text-xl font-semibold text-foreground",children:"Contacts"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:234",className:"text-sm text-muted-foreground mt-0.5",children:[Ct?.total?.toLocaleString()??0," total contacts"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:238",className:"flex items-center gap-2",children:[n.jsxs(qa,{"data-loc":"client/src/pages/client/Contacts.tsx:240",open:x,onOpenChange:ee=>{m(ee),ee||(y(null),S(null))},children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Contacts.tsx:241",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:242",variant:"outline",size:"sm",className:"gap-1.5",children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Contacts.tsx:243",className:"w-4 h-4"}),"Import"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Contacts.tsx:247",className:"max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Contacts.tsx:248",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Contacts.tsx:248",children:"Import Contacts from CSV"})}),j?n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:250",className:"space-y-4 pt-2 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:251",className:"w-12 h-12 rounded-full bg-amber-100 flex items-center justify-center mx-auto",children:n.jsxs("svg",{"data-loc":"client/src/pages/client/Contacts.tsx:252",className:"w-6 h-6 text-amber-500 animate-spin",fill:"none",viewBox:"0 0 24 24",children:[n.jsx("circle",{"data-loc":"client/src/pages/client/Contacts.tsx:252",className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),n.jsx("path",{"data-loc":"client/src/pages/client/Contacts.tsx:252",className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:254",className:"text-sm font-medium text-foreground",children:"Import started"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:255",className:"text-xs text-muted-foreground",children:["Your contacts are being processed in the background. Check the ",n.jsx("strong",{"data-loc":"client/src/pages/client/Contacts.tsx:255",children:"Imports"})," page in the Audience menu to track progress."]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:256",className:"w-full",onClick:()=>{m(!1),y(null),S(null)},children:"Done"})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:261",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:262",className:"rounded-lg border-2 border-dashed border-border p-6 text-center cursor-pointer hover:border-primary/50 hover:bg-primary/5 transition-colors",onClick:()=>O.current?.click(),children:[h?n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:267",className:"flex items-center justify-center gap-2",children:[n.jsx(hf,{"data-loc":"client/src/pages/client/Contacts.tsx:268",className:"w-5 h-5 text-primary"}),n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:269",className:"text-sm font-medium",children:h.name})]}):n.jsxs(n.Fragment,{children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Contacts.tsx:273",className:"w-8 h-8 mx-auto mb-2 text-muted-foreground"}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:274",className:"text-sm font-medium text-foreground",children:"Click to select a CSV file"}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:275",className:"text-xs text-muted-foreground mt-1",children:"Columns: email, first_name, last_name, phone, 
838country, account_type, account_size, trading_platform, tags"})]}),n.jsx("input",{"data-loc":"client/src/pages/client/Contacts.tsx:280",ref:O,type:"file",accept:".csv",className:"hidden",onChange:ee=>y(ee.target.files?.[0]??null)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:285",className:"flex items-center justify-between",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:286",className:"text-sm",children:"Update existing contacts"}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Contacts.tsx:287",checked:w,onCheckedChange:b})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:289",className:"w-full",disabled:!h||Sa.isPending,onClick:Da,children:Sa.isPending?"Importing...":"Import Contacts"})]})]})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Contacts.tsx:301",open:u,onOpenChange:p,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Contacts.tsx:302",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:303",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Contacts.tsx:304",className:"w-4 h-4"}),"Add contact"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Contacts.tsx:308",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Contacts.tsx:309",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Contacts.tsx:309",children:"Add New Contact"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:310",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:311",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:312",children:"Email *"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:313",type:"email",placeholder:"[email protected]",value:A.email,onChange:ee=>k({...A,email:ee.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:318",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:319",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:320",children:"First Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:321",placeholder:"John",value:A.firstName,onChange:ee=>k({...A,firstName:ee.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:323",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:324",children:"Last Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:325",placeholder:"Doe",value:A.lastName,onChange:ee=>k({...A,lastName:ee.target.value})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:328",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:329",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:330",children:"Account Type"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Contacts.tsx:331",value:A.accountType,onValueChange:ee=>k({...A,accountType:ee}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Contacts.tsx:332",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Contacts.tsx:332",placeholder:"Select..."})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Contacts.tsx:333",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:334",value:"challenge",children:"Challenge"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:335",value:"funded",children:"Funded Account"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:336",value:"evaluation",children:"Evaluation"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:340",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:341",children:"Account Size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Contacts.tsx:342",value:A.accountSize,onValueChange:ee=>k({...A,accountSize:ee}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Contacts.tsx:343",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Contacts.tsx:343",placeholder:"Select..."})}),n.jsx(gt,{"data-loc":"client/src/pages/client/Contacts.tsx:344",children:["10k","25k","50k","100k","200k"].map(ee=>n.jsxs(he,{"data-loc":"client/src/pages/client/Contacts.tsx:346",value:ee,children:["$",ee]},ee))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:352",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:353",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:354",children:"Platform"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Contacts.tsx:355",value:A.tradingPlatform,onValueChange:ee=>k({...A,tradingPlatform:ee}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Contacts.tsx:356",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Contacts.tsx:356",placeholder:"Select..."})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Contacts.tsx:357",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:358",value:"mt4",children:"MetaTrader 4"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:359",value:"mt5",children:"MetaTrader 5"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:360",value:"dxtrade",children:"DXtrade"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:361",value:"match_trader",children:"Match-Trader"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:365",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Contacts.tsx:366",children:"Country"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:367",placeholder:"US",value:A.country,onChange:ee=>k({...A,country:ee.target.value})})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:370",className:"w-full",onClick:()=>Va.mutate(A),disabled:Va.isPending||!A.email,children:Va.isPending?"Adding...":"Add Contact"})]})]})]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:384",className:"flex items-center gap-1 border-b border-border pb-0 -mb-1",children:[{key:"all",label:"All Contacts"},{key:"cold90",label:"Cold (90d)",icon:n.jsx(Ck,{"data-loc":"client/src/pages/client/Contacts.tsx:387",className:"w-3.5 h-3.5"})},{key:"cold180",label:"Cold (180d)",icon:n.jsx(Ck,{"data-loc":"client/src/pages/client/Contacts.tsx:388",className:"w-3.5 h-3.5"})},{key:"bounced",label:"Bounced",icon:n.jsx(Kg,{"data-loc":"client/src/pages/client/Contacts.tsx:389",className:"w-3.5 h-3.5"})}].map(ee=>n.jsxs("button",{"data-loc":"client/src/pages/client/Contacts.tsx:391",onClick:()=>{Q(ee.key),M(1),Z(new Set),F(1)},className:`flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${z===ee.key?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground"}`,children:["icon"in ee&&ee.icon,ee.label]},ee.key))}),(z==="cold90"||z==="cold180")&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:408",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:409",className:"rounded-lg border border-amber-200 bg-amber-50 p-4 flex items-start gap-3",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Contacts.tsx:410",className:"w-5 h-5 text-amber-600 mt-0.5 shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:411",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:412",className:"text-sm font-medium text-amber-800",children:[dt?.total??0," contacts haven't opened an email in ",Te," days"]}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:415",className:"text-xs text-amber-700 mt-0.5",children:"Suppressing cold contacts protects your sender reputation by keeping your engaged rate high. Suppressed contacts will be marked as unsubscribed."})]})]}),U.size>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:422",className:"flex items-center gap-3",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:423",className:"text-sm text-muted-foreground",children:[U.size," selected"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:424",size:"sm",variant:"outline",className:"h-8 gap-1.5 text-destructive border-destructive/30 hover:bg-destructive/10",disabled:vt.isPending,onClick:()=>vt.mutate({contactIds:Array.from(U)}),children:[n.jsx(YJ,{"data-loc":"client/src/pages/client/Contacts.tsx:431",className:"w-3.5 h-3.5"}),vt.isPending?"Suppressing...":`Suppress ${U.size} contacts`]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:434",size:"sm",variant:"ghost",className:"h-8",onClick:()=>Z(new Set),children:"Clear"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:437",className:"border border-border rounded-lg overflow-hidden bg-card",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Contacts.tsx:438",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Contacts.tsx:439",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:440",className:"border-b border-border bg-muted/40",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:441",className:"w-10 px-4 py-3",children:n.jsx(hd,{"data-loc":"client/src/pages/client/Contacts.tsx:442",checked:(dt?.contacts??[]).length>0&&(dt?.contacts??[]).every(ee=>U.has(ee.id)),onCheckedChange:ee=>{Z(ee?new Set((dt?.contacts??[]).map(ke=>ke.id)):new Set)}})}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:450",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Contact"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:451",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden md:table-cell",children:"Added"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Contacts.tsx:454",children:tt?[...Array(5)].map((ee,ke)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:457",className:"border-b border-border",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:458",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:458",className:"w-4 h-4 rounded"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:459",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:459",className:"h-4 w-48"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:460",className:"px-4 py-3 hidden md:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:460",className:"h-4 w-24"})})]},ke)):(dt?.contacts??[]).length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:464",children:n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:464",colSpan:3,className:"py-12 text-center text-sm text-muted-foreground",children:"No cold contacts found — great engagement!"})}):(dt?.contacts??[]).map(ee=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:467",className:"border-b border-border last:border-0 hover:bg-muted/30",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:468",className:"px-4 py-3",children:n.jsx(hd,{"data-loc":"client/src/pages/client/Contacts.tsx:469",checked:U.has(ee.id),onCheckedChange:ke=>{Z(qe=>{const Ye=new Set(qe);
838return ke?Ye.add(ee.id):Ye.delete(ee.id),Ye})}})}),n.jsxs("td",{"data-loc":"client/src/pages/client/Contacts.tsx:476",className:"px-4 py-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:477",className:"text-sm font-medium text-foreground",children:ee.firstName||ee.lastName?`${ee.firstName??""} ${ee.lastName??""}`.trim():ee.email}),(ee.firstName||ee.lastName)&&n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:480",className:"text-xs text-muted-foreground",children:ee.email})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:482",className:"px-4 py-3 hidden md:table-cell",children:n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:483",className:"text-sm text-muted-foreground",children:new Date(ee.createdAt).toLocaleDateString()})})]},ee.id))})]})}),(dt?.total??0)>ie&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:492",className:"flex items-center justify-between",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:493",className:"text-xs text-muted-foreground",children:["Showing ",(L-1)*ie+1,"–",Math.min(L*ie,dt?.total??0)," of ",dt?.total," cold contacts"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:494",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:495",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:L===1,onClick:()=>M(ee=>ee-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Contacts.tsx:495",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:496",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:L*ie>=(dt?.total??0),onClick:()=>M(ee=>ee+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Contacts.tsx:496",className:"w-4 h-4"})})]})]})]}),z==="bounced"&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:505",className:"space-y-4",children:[n.jsx(qa,{"data-loc":"client/src/pages/client/Contacts.tsx:507",open:ce,onOpenChange:ee=>{se(ee),ee||(de(null),Pe(null),Qe(null))},children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Contacts.tsx:508",className:"max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Contacts.tsx:509",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Contacts.tsx:510",children:"Import SES Suppression List"})}),ue?n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:513",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:514",className:"rounded-lg border border-emerald-200 bg-emerald-50 p-4 space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:515",className:"text-sm font-semibold text-emerald-800",children:"Import complete"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:516",className:"grid grid-cols-3 gap-3 text-center",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:517",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:517",className:"text-lg font-bold text-red-600",children:ue.bouncedCount}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:517",className:"text-xs text-muted-foreground",children:"Marked bounced"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:518",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:518",className:"text-lg font-bold text-orange-600",children:ue.complainedCount}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:518",className:"text-xs text-muted-foreground",children:"Marked complained"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:519",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:519",className:"text-lg font-bold text-muted-foreground",children:ue.notFoundCount}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:519",className:"text-xs text-muted-foreground",children:"Not in contacts"})]})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:522",className:"w-full",onClick:()=>se(!1),children:"Done"})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:525",className:"space-y-4",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:526",className:"text-sm text-muted-foreground",children:["Upload the CSV exported from the AWS SES Suppression List. The file should have columns: ",n.jsx("code",{"data-loc":"client/src/pages/client/Contacts.tsx:526",className:"bg-muted px-1 rounded text-xs",children:"email, reason, created_at"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:527",className:"border-2 border-dashed border-border rounded-lg p-6 text-center cursor-pointer hover:border-primary/50 transition-colors",onClick:()=>Ue.current?.click(),onDragOver:ee=>ee.preventDefault(),onDrop:ee=>{ee.preventDefault();const ke=ee.dataTransfer.files[0];ke&&da(ke)},children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Contacts.tsx:533",className:"w-8 h-8 text-muted-foreground mx-auto mb-2"}),ye?n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:535",className:"text-sm font-medium text-foreground",children:ye.name}):n.jsxs(n.Fragment,{children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:537",className:"text-sm font-medium",children:"Drop CSV here or click to browse"}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:537",className:"text-xs text-muted-foreground mt-1",children:"SES suppression list CSV format"})]}),n.jsx("input",{"data-loc":"client/src/pages/client/Contacts.tsx:539",ref:Ue,type:"file",accept:".csv",className:"hidden",onChange:ee=>da(ee.target.files?.[0]??null)})]}),ve&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:542",className:"rounded-lg border border-border bg-muted/30 p-3 space-y-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:543",className:"text-sm font-medium",children:"Preview"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:544",className:"flex gap-4 text-sm",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:545",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:545",className:"font-semibold text-red-600",children:ve.bounceCount})," bounces"]}
838),n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:546",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:546",className:"font-semibold text-orange-600",children:ve.complaintCount})," complaints"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:547",className:"text-muted-foreground",children:[ve.entries.length," total"]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:549",className:"text-xs text-muted-foreground",children:"Only contacts already in your list will be updated. Addresses not found will be skipped."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:552",className:"flex gap-2 justify-end",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:553",variant:"outline",onClick:()=>se(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:554",disabled:!ve||_t.isPending,onClick:()=>ve&&_t.mutate({entries:ve.entries}),children:_t.isPending?"Importing...":`Suppress ${ve?.entries.length??0} contacts`})]})]})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:566",className:"rounded-lg border border-red-200 bg-red-50 p-4 flex items-start justify-between gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:567",className:"flex items-start gap-3",children:[n.jsx(Kg,{"data-loc":"client/src/pages/client/Contacts.tsx:568",className:"w-5 h-5 text-red-600 mt-0.5 shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:569",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:570",className:"text-sm font-medium text-red-800",children:[xe?.total??0," bounced contacts — permanently suppressed"]}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:573",className:"text-xs text-red-700 mt-0.5",children:"Hard bounces are automatically suppressed to protect your sender reputation. Emails to these addresses will not be sent."})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:579",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:()=>se(!0),children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Contacts.tsx:580",className:"w-3.5 h-3.5"}),"Import SES list"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:586",className:"relative max-w-xs",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Contacts.tsx:587",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:588",className:"pl-9 h-9",placeholder:"Search bounced...",value:H,onChange:ee=>{q(ee.target.value),F(1)}})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:596",className:"border border-border rounded-lg overflow-hidden bg-card",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Contacts.tsx:597",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Contacts.tsx:598",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:599",className:"border-b border-border bg-muted/40",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:600",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Contact"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:601",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden md:table-cell",children:"Bounce Type"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:602",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden lg:table-cell",children:"Campaign"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:603",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Bounced At"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:604",className:"w-10 px-4 py-3"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Contacts.tsx:607",children:$e?[...Array(6)].map((ee,ke)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:610",className:"border-b border-border",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:611",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:611",className:"h-4 w-48"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:612",className:"px-4 py-3 hidden md:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:612",className:"h-5 w-24 rounded-full"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:613",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:613",className:"h-4 w-36"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:614",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:614",className:"h-4 w-24"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:615",className:"px-4 py-3"})]},ke)):(xe?.bounces??[]).length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:619",children:n.jsxs("td",{"data-loc":"client/src/pages/client/Contacts.tsx:620",colSpan:5,className:"py-16 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:621",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(Kg,{"data-loc":"client/src/pages/client/Contacts.tsx:622",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:624",className:"text-sm font-medium text-foreground",children:"No bounced contacts"}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:625",className:"text-xs text-muted-foreground mt-1",children:"Hard bounces will appear here automatically"})]})}):(xe?.bounces??[]).map(ee=>{const ke=ee.firstName||ee.lastName?`${ee.firstName??""} ${ee.lastName??""}`.trim():null;return n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:634",className:"border-b border-border last:border-0 hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:635",className:"px-4 py-3",children:n.jsx(It,{"data-loc":"client/src/pages/client/Contacts.tsx:636",href:`/contacts/${ee.id}`,children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:637",className:"cursor-pointer",children:[ke&&n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:638",className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:ke}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:639",className:`text-xs ${ke?"text-muted-foreground":"text-sm font-medium text-foreground hover:text-primary transition-colors"}`,children:ee.email})]})})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:643",className:"px-4 py-3 hidden md:table-cell",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:644",className:"flex flex-col gap-0.5",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/Contacts.tsx:645",variant:"outline",className:`text-[10px] font-semibold w-fit ${ee.bounceType==="Permanent"?"border-red-200 bg-red-50 text-red-600":ee.bounceType==="Transient"?"border-amber-200 bg-amber-50 text-amber-600":"border-gray-200 bg-gray-50 text-gray-500"}`,children:ee.bounceType??"Unknown"}),ee.bounceSubType&&ee.bounceSubType!=="General"&&n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:658",className:"text-[10px] text-muted-foreground",children:ee.bounceSubType})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:662",className:"px-4 py-3 hidden lg:table-cell",children:ee.campaignName?n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:664",className:"flex items-center gap-1.5",children:[n.jsx(UJ,{"data-loc":"client/src/pages/client/Contacts.tsx:665",className:"w-3.5 h-3.5 text-muted-foreground shrink-0"}),n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:666",className:"text-sm text-foreground truncate max-w-[200px]",children:ee.campaignName})]}):n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:669",className:"text-xs text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:672",className:"px-4 py-3",children:n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:673",className:"text-xs text-muted-foreground",children:ee.bouncedAt?new Date(ee.bouncedAt).toLocaleDateString():"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:677",className:"px-4 py-3",children:n.jsxs(xr,{"data-loc":"client/src/pages/client/Contacts.tsx:678",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Contacts.tsx:679",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:680",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 hover:opacity-100",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Contacts.tsx:681",className:"w-4 h-4"})})}),n.jsx(hr,{"data-loc":"client/src/pages/client/Contacts.tsx:684",align:"end",className:"w-40",children:n.jsx(ca,{"data-loc":"client/src/pages/client/Contacts.tsx:685",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Contacts.tsx:686",href:`/contacts/${ee.id}`,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Contacts.tsx:687",className:"w-4 h-4"}),"View profile"]})})})]})})]},ee.id)})})]})}),(xe?.total??0)>J&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:703",className:"flex items-center justify-between",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:704",className:"text-xs text-muted-foreground",children:["Showing ",(G-1)*J+1,"–",Math.min(G*J,xe?.total??0)," of ",xe?.total," bounced contacts"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:707",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:708",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:G===1,onClick:()=>F(ee=>ee-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Contacts.tsx:708",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:709",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:G*J>=(xe?.total??0),onClick:()=>F(ee=>ee+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Contacts.tsx:709",className:"w-4 h-4"})})]})]})]}),z==="all"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:719",className:"flex items-center gap-3 flex-wrap pt-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:720",className:"relative flex-1 min-w-[200px] max-w-xs",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Contacts.tsx:721",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Contacts.tsx:722",className:"pl-9 h-9",placeholder:"Search contacts...",value:e,onCh
838ange:ee=>{t(ee.target.value),i(1)}})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Contacts.tsx:729",value:a,onValueChange:ee=>{s(ee),i(1)},children:[n.jsxs(xt,{"data-loc":"client/src/pages/client/Contacts.tsx:730",className:"w-44 h-9",children:[n.jsx(ch,{"data-loc":"client/src/pages/client/Contacts.tsx:731",className:"w-3.5 h-3.5 mr-1.5 text-muted-foreground"}),n.jsx(ht,{"data-loc":"client/src/pages/client/Contacts.tsx:732"})]}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Contacts.tsx:734",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:735",value:"all",children:"All statuses"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:736",value:"subscribed",children:"Subscribed"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:737",value:"unsubscribed",children:"Unsubscribed"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:738",value:"bounced",children:"Bounced"}),n.jsx(he,{"data-loc":"client/src/pages/client/Contacts.tsx:739",value:"complained",children:"Complained"})]})]}),l.size>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:744",className:"flex items-center gap-2 ml-auto",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:745",className:"text-sm text-muted-foreground",children:[l.size," selected"]}),n.jsxs(Cd,{"data-loc":"client/src/pages/client/Contacts.tsx:748",open:_,onOpenChange:T,children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/Contacts.tsx:749",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:750",variant:"outline",size:"sm",className:"h-8 gap-1.5",children:[n.jsx(QJ,{"data-loc":"client/src/pages/client/Contacts.tsx:751",className:"w-3.5 h-3.5"}),"Add tag",R.length>0&&n.jsx(Le,{"data-loc":"client/src/pages/client/Contacts.tsx:754",variant:"secondary",className:"ml-1 px-1.5 py-0 text-xs",children:R.length})]})}),n.jsx(Ad,{"data-loc":"client/src/pages/client/Contacts.tsx:758",className:"w-64 p-0",align:"end",children:n.jsxs(Aje,{"data-loc":"client/src/pages/client/Contacts.tsx:759",children:[n.jsx(Dje,{"data-loc":"client/src/pages/client/Contacts.tsx:760",placeholder:"Search or create tag…",value:I,onValueChange:$}),n.jsxs(Oje,{"data-loc":"client/src/pages/client/Contacts.tsx:765",children:[n.jsx(kje,{"data-loc":"client/src/pages/client/Contacts.tsx:766",children:I.trim()?n.jsxs("button",{"data-loc":"client/src/pages/client/Contacts.tsx:768",className:"w-full text-left px-3 py-2 text-sm hover:bg-accent flex items-center gap-2",onClick:()=>{const ee=I.trim();R.includes(ee)||B(ke=>[...ke,ee]),$("")},children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Contacts.tsx:776",className:"w-3.5 h-3.5 text-muted-foreground"}),"Create “",I.trim(),"”"]}):n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:780",className:"px-3 py-2 text-sm text-muted-foreground",children:"No tags found"})}),n.jsxs(_je,{"data-loc":"client/src/pages/client/Contacts.tsx:783",children:[pt.filter(ee=>ee.name.toLowerCase().includes(I.toLowerCase())).map(ee=>{const ke=R.includes(ee.name);return n.jsxs(VR,{"data-loc":"client/src/pages/client/Contacts.tsx:789",value:ee.name,onSelect:()=>{B(qe=>ke?qe.filter(Ye=>Ye!==ee.name):[...qe,ee.name]),$("")},children:[n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:799",className:"w-2.5 h-2.5 rounded-full mr-2 flex-shrink-0",style:{backgroundColor:ee.color??"#6366f1"}}),ee.name,ke&&n.jsx(ss,{"data-loc":"client/src/pages/client/Contacts.tsx:804",className:"w-3.5 h-3.5 ml-auto text-primary"})]},ee.id)}),I.trim()&&!pt.some(ee=>ee.name.toLowerCase()===I.toLowerCase())&&n.jsxs(VR,{"data-loc":"client/src/pages/client/Contacts.tsx:809",value:`__create__${I}`,onSelect:()=>{const ee=I.trim();R.includes(ee)||B(ke=>[...ke,ee]),$("")},children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Contacts.tsx:817",className:"w-3.5 h-3.5 mr-2 text-muted-foreground"}),"Create “",I.trim(),"”"]})]})]}),R.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:824",className:"border-t border-border p-2 flex flex-col gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:825",className:"flex flex-wrap gap-1",children:R.map(ee=>n.jsxs(Le,{"data-loc":"client/src/pages/client/Contacts.tsx:827",variant:"secondary",className:"gap-1 text-xs",children:[ee,n.jsx("button",{"data-loc":"client/src/pages/client/Contacts.tsx:829",className:"ml-0.5 opacity-60 hover:opacity-100",onClick:()=>B(ke=>ke.filter(qe=>qe!==ee)),children:"×"})]},ee))}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:836",size:"sm",className:"w-full h-7 text-xs",disabled:ft.isPending,onClick:()=>ft.mutate({contactIds:Array.from(l),tagNames:R}),children:ft.isPending?"Applying…":`Apply to ${l.size} contact${l.size>1?"s":""}`})]})]})})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:853",variant:"outline",size:"sm",className:"h-8 text-destructive border-destructive/30 hover:bg-destructive/10",onClick:()=>{ne.info("Bulk delete coming soon"),d(new Set)},children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Contacts.tsx:858",className:"w-3.5 h-3.5 mr-1.5"}),"Delete"]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:866",className:"border border-border rounded-lg overflow-hidden bg-card mt-2",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Contacts.tsx:867",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Contacts.tsx:868",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:869",className:"border-b border-border bg-muted/40",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:870",className:"w-10 px-4 py-3",children:n.jsx(hd,{"data-loc":"client/src/pages/client/Contacts.tsx:871",checked:Ve,onCheckedChange:bt,"aria-label":"Select all"})}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:877",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Contact"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:878",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Status"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:879",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden md:table-cell",children:"Tags"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:880",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden lg:table-cell",children:"Account"}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:881",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden lg:table-cell cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>D(ee=>ee==="ltv_desc"?"ltv_asc":"ltv_desc"),children:n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:885",className:"inline-flex items-center gap-1",children:["LTV",E==="ltv_desc"?n.jsx(Tn,{"data-loc":"client/src/pages/client/Contacts.tsx:887",className:"w-3 h-3"}):E==="ltv_asc"?n.jsx(Bi,{"data-loc":"client/src/pages/client/Contacts.tsx:887",className:"w-3 h-3"}):n.jsx(DS,{"data-loc":"client/src/pages/client/Contacts.tsx:887",className:"w-3 h-3 opacity-50"})]})}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:890",className:"text-left px-4 py-3 text-xs font-semibold text-muted-foreground uppercase tracking-wide hidden lg:table-cell cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>D(ee=>ee==="date_desc"?"date_asc":"date_desc"),children:n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:894",className:"inline-flex items-center gap-1",children:["Added",E==="date_desc"?n.jsx(Tn,{"data-loc":"client/src/pages/client/Contacts.tsx:896",className:"w-3 h-3"}):E==="date_asc"?n.jsx(Bi,{"data-loc":"client/src/pages/client/Contacts.tsx:896",className:"w-3 h-3"}):n.jsx(DS,{"data-loc":"client/src/pages/client/Contacts.tsx:896",className:"w-3 h-3 opacity-50"})]})}),n.jsx("th",{"data-loc":"client/src/pages/client/Contacts.tsx:899",className:"w-10 px-4 py-3"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Contacts.tsx:902",children:Zt?[...Array(8)].map((ee,ke)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:905",className:"border-b border-border",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:906",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:906",className:"w-4 h-4 rounded"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:907",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:908",className:"space-y-1.5",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:909",className:"h-4 w-36"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:910",className:"h-3 w-24"})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:913",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:913",className:"h-5 w-20 rounded-full"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:914",className:"px-4 py-3 hidden md:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:914",className:"h-5 w-16 rounded-full"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:915",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:915",className:"h-4 w-20"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:916",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:916",className:"h-4 w-14"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:917",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Contacts.tsx:917",className:"h-4 w-16"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:918",className:"px-4 py-3"})]},ke)):Re.length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:922",children:n.jsxs("td",{"data-loc":"client/src/pages/client/Contacts.tsx:923",colSpan:8,className:"py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Contacts.tsx:924",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(wa,{"data-loc":"client/src/pages/client/Contacts.tsx:925",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:927",className:"text-sm font-medium text-foreground",children:"No contacts found"}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:928",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Import a CSV or add contacts manually to get started"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Contacts.tsx:931",size:"sm",variant:"outline",onClick:()=>m(!0),children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Contacts.tsx:932",className:"w-4 h-4 mr-1.5"}),"Import CSV"]})]})}):Re.map(ee=>{const ke=ee.firstName||ee.lastName?`${ee.firstName??""} ${ee.lastName??""}`.trim():null,qe=Lje[ee.status]??"border-gray-200 bg-gray-50 text-gray-500";return n.jsxs("tr",{"data-loc":"client/src/pages/client/Contacts.tsx:945",className:"border-b border-border hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:949",className:"px-4 py-3",children:n.jsx(hd,{"data-loc":"client/src/pages/client/Contacts.tsx:950",checked:l.has(ee.id),onCheckedChange:()=>Be(ee.id),"aria-label":`Select ${ee.email}`})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:956",className:"px-4 py-3",children:n.jsx(It,{"data-loc":"client/src/pages/client/Contacts.tsx:957",href:`/contacts/${ee.id}`,children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:958",className:"cursor-pointer",children:[ke&&n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:960",className:"text-sm font-medium text-foreground hover:text-primary transition-colors",children:ke}),n.jsx("p",{"data-loc":"client/src/pages/client/Contacts.tsx:964",className:`text-xs ${ke?"text-muted-foreground":"text-sm font-medium text-foreground hover:text-primary transition-colors"}`,children:ee.email})]})})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:970",className:"px-4 py-3",children:n.jsx(Le,{"data-loc":"client/src/pages/client/Contacts.tsx:971",variant:"outline",className:`text-[10px] font-semibold capitalize ${qe}`,children:ee.status})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:978",className:"px-4 py-3 hidden md:table-cell",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:979",className:"flex flex-wrap gap-1",children:[ee.tags?.slice(0,3).map(Ye=>n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:981",className:"inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded text-[10px] font-medium bg-primary/10 text-primary border border-primary/20",children:[n.jsx(vf,{"data-loc":"client/src/pages/client/Contacts.tsx:985",className:"w-2.5 h-2.5"}),Ye.name]},Ye.id)),(ee.tags?.length??0)>3&&n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:990",className:"text-[10px] text-muted-foreground",children:["+",ee.tags.length-3]})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:996",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:997",className:"text-sm text-muted-foreground",children:ee.accountType?`${ee.accountType}${ee.accountSize?` · $${ee.accountSize}`:""}`:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:1003",className:"px-4 py-3 hidden lg:table-cell",children:ee.ltv>0?n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:1005",className:"text-sm font-medium text-emerald-600",children:["$",(ee.ltv/100).toLocaleStr
838ing("en-US",{minimumFractionDigits:0,maximumFractionDigits:0})]}):n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:1009",className:"text-xs text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:1012",className:"px-4 py-3 hidden lg:table-cell",children:n.jsx("span",{"data-loc":"client/src/pages/client/Contacts.tsx:1013",className:"text-xs text-muted-foreground",children:new Date(ee.createdAt).toLocaleDateString()})}),n.jsx("td",{"data-loc":"client/src/pages/client/Contacts.tsx:1017",className:"px-4 py-3",children:n.jsxs(xr,{"data-loc":"client/src/pages/client/Contacts.tsx:1018",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Contacts.tsx:1019",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:1020",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 hover:opacity-100",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Contacts.tsx:1021",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Contacts.tsx:1024",align:"end",className:"w-40",children:[n.jsx(ca,{"data-loc":"client/src/pages/client/Contacts.tsx:1025",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Contacts.tsx:1026",href:`/contacts/${ee.id}`,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Contacts.tsx:1027",className:"w-4 h-4"}),"View profile"]})}),n.jsx(jf,{"data-loc":"client/src/pages/client/Contacts.tsx:1031"}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Contacts.tsx:1032",className:"text-destructive focus:text-destructive flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Delete coming soon"),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Contacts.tsx:1036",className:"w-4 h-4"}),"Delete"]})]})]})})]},ee.id)})})]})}),X>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:1052",className:"flex items-center justify-between",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Contacts.tsx:1053",className:"text-xs text-muted-foreground",children:["Showing ",(r-1)*Xt+1,"–",Math.min(r*Xt,Ct?.total??0)," of ",Ct?.total?.toLocaleString()," contacts"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Contacts.tsx:1056",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:1057",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:r===1,onClick:()=>i(ee=>ee-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Contacts.tsx:1058",className:"w-4 h-4"})}),n.jsxs("span",{"data-loc":"client/src/pages/client/Contacts.tsx:1060",className:"text-sm text-muted-foreground",children:[r," / ",X]}),n.jsx(te,{"data-loc":"client/src/pages/client/Contacts.tsx:1061",variant:"outline",size:"sm",className:"h-8 w-8 p-0",disabled:r===X,onClick:()=>i(ee=>ee+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Contacts.tsx:1062",className:"w-4 h-4"})})]})]})]})]})})}function zje(e){return e?e==="MT5"?"border-blue-500/40 text-blue-400 bg-blue-500/10":e==="Match Trader"?"border-purple-500/40 text-purple-400 bg-purple-500/10":e==="TradeLocker"?"border-emerald-500/40 text-emerald-400 bg-emerald-500/10":"border-border text-muted-foreground":"border-border text-muted-foreground"}function Uje(e){return e?e.includes("Instant")?"border-amber-500/40 text-amber-400 bg-amber-500/10":e.includes("Pro")?"border-violet-500/40 text-violet-400 bg-violet-500/10":e.startsWith("1 Step")?"border-cyan-500/40 text-cyan-400 bg-cyan-500/10":e.startsWith("2 Step")?"border-indigo-500/40 text-indigo-400 bg-indigo-500/10":"border-border text-muted-foreground":"border-border text-muted-foreground"}function qje(){const e=Yi(),t=parseInt(e.id??"0"),[,a]=La(),s=le.useUtils(),{data:r}=le.tracking.getPageViews.useQuery({contactId:t,limit:20},{enabled:t>0}),{data:i}=le.tracking.getPageViewSummary.useQuery({contactId:t},{enabled:t>0}),[l,d]=v.useState("date_desc"),{data:u}=le.contacts.getPurchasedAccounts.useQuery({contactId:t,sortBy:l},{enabled:t>0}),p=u?.accounts??[],x=u?.lifetimeValueUsd??0,m=le.contacts.resubscribe.useMutation({onSuccess:()=>{s.contacts.get.invalidate({id:t}
838),s.contacts.list.invalidate()}}),{data:h,isLoading:y}=le.contacts.get.useQuery({id:t}),[w,b]=v.useState(!1),[j,S]=v.useState(""),[O,A]=v.useState(!1),{data:k}=le.tags.list.useQuery(void 0,{enabled:w}),E=le.contacts.addTag.useMutation({onSuccess:()=>s.contacts.get.invalidate({id:t})}),D=le.contacts.removeTag.useMutation({onSuccess:()=>s.contacts.get.invalidate({id:t})}),_=le.tags.create.useMutation({onSuccess:async z=>{await E.mutateAsync({contactId:t,tagId:z.id}),S(""),A(!1)}}),T=new Set(h?.tagIds??[]),I=(k??[]).filter(z=>z.name.toLowerCase().includes(j.toLowerCase())),$=(k??[]).some(z=>z.name.toLowerCase()===j.toLowerCase()),R=Object.fromEntries((k??[]).map(z=>[z.id,z]));if(y)return n.jsx(Pt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:97",title:"Contact",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:98",className:"p-6 space-y-4",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/ContactDetail.tsx:99",className:"h-8 w-48"}),n.jsx(Me,{"data-loc":"client/src/pages/client/ContactDetail.tsx:100",className:"h-48 w-full"})]})});if(!h)return n.jsx(Pt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:108",title:"Contact Not Found",children:n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:109",className:"p-6 text-center text-muted-foreground",children:"Contact not found."})});const B=[h.firstName,h.lastName].filter(Boolean).join(" ")||h.email,Y=z=>z==="subscribed"?"badge-active":z==="unsubscribed"?"badge-paused":"badge-failed";return n.jsx(Pt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:123",title:B,children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:124",className:"p-6 space-y-6",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:125",className:"flex items-center gap-4",children:n.jsxs(te,{"data-loc":"client/src/pages/client/ContactDetail.tsx:126",variant:"ghost",size:"sm",onClick:()=>a("/contacts"),children:[n.jsx(rs,{"data-loc":"client/src/pages/client/ContactDetail.tsx:127",className:"w-4 h-4 mr-2"}),"Back"]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:131",className:"flex items-center gap-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:132",className:"w-14 h-14 rounded-2xl bg-primary/15 flex items-center justify-center",children:n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:133",className:"text-xl font-bold text-primary",children:B.slice(0,2).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:137",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/ContactDetail.tsx:138",className:"text-2xl font-bold text-foreground",children:B}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:139",className:"flex items-center gap-3 mt-1",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:140",className:"text-sm text-muted-foreground",children:h.email}),n.jsx(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:141",className:Y(h.status),variant:"outline",children:h.status}),h.emailFrequency&&h.emailFrequency!=="normal"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:143",variant:"outline",className:"text-xs border-blue-400/40 text-blue-300 gap-1",children:[n.jsx(AS,{"data-loc":"client/src/pages/client/ContactDetail.tsx:144",className:"w-3 h-3"}),h.emailFrequency==="weekly_digest"?"Weekly digest":"Monthly digest"]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:152",className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:153",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:154",children:n.jsx(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:154",className:"text-sm",children:"Contact Information"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:155",className:"space-y-3",children:[{label:"Email",value:h.email,icon:ja},{label:"Phone",value:h.phone,icon:WJ},{label:"Country",value:h.country,icon:$i},{label:"Source",value:h.source,icon:Ks}].map(({label:z,value:Q,icon:L})=>n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:162",className:"flex items-center gap-3",children:[n.jsx(L,{"data-loc":"client/src/pages/client/ContactDetail.tsx:163",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:164",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:165",className:"text-xs text-muted-foreground",children:z}),n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:166",className:"text-sm text-foreground",children:Q??"—"})]})]},z))})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:173",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:174",children:n.jsx(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:174",className:"text-sm",children:"Trading Profile"})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:175",className:"space-y-3",children:[[{label:"Account Type",value:h.accountType},{label:"Account Size",value:h.accountSize},{label:"Trading Platform",value:h.tradingPlatform?.replace("_"," ")},{label:"External ID",value:h.externalId}].map(({label:z,value:Q})=>n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:182",className:"flex items-center justify-between py-1.5 border-b border-border last:border-0",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:183",className:"text-xs text-muted-foreground",children:z}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:184",className:"text-sm text-foreground font-medium capitalize",children:Q??"—"})]},z)),u?.accounts?.[0]?.couponCode&&n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:189",className:"flex items-center justify-between py-1.5 border-t border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:190",className:"text-xs text-muted-foreground",children:"Coupon Used"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:191",className:"text-sm text-emerald-400 font-mono font-semibold",children:u.accounts[0].couponCode})]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:199",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:200",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:201",className:"flex items-center justify-between",children:[n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:202",className:"text-sm flex items-center gap-2",children:[n.jsx(vf,{"data-loc":"client/src/pages/client/ContactDetail.tsx:202",className:"w-4 h-4"}),"Tags"]}),n.jsxs(Cd,{"data-loc":"client/src/pages/client/ContactDetail.tsx:203",open:w,onOpenChange:z=>{b(z),z||S("")},children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/ContactDetail.tsx:204",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/ContactDetail.tsx:205",variant:"outline",size:"sm",className:"h-7 text-xs gap-1",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:206",className:"w-3 h-3"}),"Add Tag"]})}),n.jsxs(Ad,{"data-loc":"client/src/pages/client/ContactDetail.tsx:209",className:"w-64 p-2",align:"end",children:[n.jsx(De,{"data-loc":"client/src/pages/client/ContactDetail.tsx:210",placeholder:"Search or create tag…",value:j,onChange:z=>S(z.target.value),className:"h-8 text-sm mb-2",autoFocus:!0}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:217",className:"max-h-52 overflow-y-auto space-y-0.5",children:[I.map(z=>{const Q=T.has(z.id);return n.jsxs("button",{"data-loc":"client/src/pages/client/ContactDetail.tsx:221",onClick:()=>{Q?D.mutate({contactId:t,tagId:z.id}):E.mutate({contactId:t,tagId:z.id})},className:"w-full flex items-center justify-between px-2 py-1.5 rounded-md text-sm hover:bg-accent transition-colors",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:232",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:233",className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:z.color??"#6366f1"}}),z.name]}),Q&&n.jsx(ss,{"data-loc":"client/src/pages/client/ContactDetail.tsx:239",className:"w-3.5 h-3.5 text-primary"})]},z.id)}),j.trim()&&!$&&n.jsxs("button",{"data-loc":"client/src/pages/client/ContactDetail.tsx:244",onClick:()=>{O||(A(!0),_.mutate({name:j.trim()}))},disabled:O||_.isPending,className:"w-full flex items-center gap-2 px-2 py-1.5 rounded-md text-sm hover:bg-accent transition-colors text-primary",children:[_.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/ContactDetail.tsx:255",className:"w-3.5 h-3.5 animate-spin"}):n.jsx(Wt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:257",className:"w-3.5 h-3.5"}),"Create “",j.trim(),"”"]}
838),I.length===0&&!j.trim()&&n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:263",className:"text-xs text-muted-foreground text-center py-3",children:"No tags yet. Type to create one."})]})]})]})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:270",children:h.tagIds&&h.tagIds.length>0?n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:272",className:"flex flex-wrap gap-2",children:h.tagIds.map(z=>{const Q=R[z];return n.jsxs(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:276",variant:"outline",className:"badge-draft gap-1 pr-1",children:[Q?n.jsxs("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:278",className:"flex items-center gap-1.5",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:279",className:"w-2 h-2 rounded-full",style:{backgroundColor:Q.color??"#6366f1"}}),Q.name]}):`Tag #${z}`,n.jsx("button",{"data-loc":"client/src/pages/client/ContactDetail.tsx:285",onClick:()=>D.mutate({contactId:t,tagId:z}),className:"ml-0.5 rounded-full hover:bg-muted-foreground/20 p-0.5 transition-colors",children:n.jsx(Ui,{"data-loc":"client/src/pages/client/ContactDetail.tsx:289",className:"w-2.5 h-2.5"})})]},z)})}):n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:296",className:"text-sm text-muted-foreground",children:"No tags assigned. Click “Add Tag” to get started."})})]}),h.emailFrequency&&h.emailFrequency!=="normal"&&h.status!=="unsubscribed"&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:303",className:"bg-card border-border border-blue-500/30",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:304",children:n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:305",className:"text-sm flex items-center gap-2",children:[n.jsx(AS,{"data-loc":"client/src/pages/client/ContactDetail.tsx:306",className:"w-4 h-4 text-blue-400"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:307",className:"text-blue-400",children:"Email Frequency Preference"})]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:310",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:311",className:"flex items-center justify-between py-1.5 border-b border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:312",className:"text-xs text-muted-foreground",children:"Preferred frequency"}),n.jsx(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:313",variant:"outline",className:"text-xs border-blue-400/40 text-blue-300",children:h.emailFrequency==="weekly_digest"?"📅 Weekly digest":"🗓️ Monthly digest"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:317",className:"text-xs text-muted-foreground leading-relaxed",children:"This contact chose to receive emails less frequently instead of unsubscribing. They will only receive digest-frequency campaigns."})]})]}),h.status==="unsubscribed"&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:326",className:"bg-card border-border border-amber-500/30",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:327",children:n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:328",className:"text-sm flex items-center gap-2",children:[n.jsx($5,{"data-loc":"client/src/pages/client/ContactDetail.tsx:329",className:"w-4 h-4 text-amber-400"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:330",className:"text-amber-400",children:"Unsubscribe Details"})]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:333",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:334",className:"flex items-center justify-between py-1.5 border-b border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:335",className:"text-xs text-muted-foreground",children:"Unsubscribed on"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:336",className:"text-sm text-foreground font-medium",children:h.unsubscribedAt?new Date(h.unsubscribedAt).toLocaleDateString():"—"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:340",className:"flex items-start justify-between py-1.5",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:341",className:"text-xs text-muted-foreground",children:"Reason given"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:342",className:"text-sm text-foreground font-medium text-right max-w-[60%]",children:h.unsubscribeReason?(()=>{const z=h.unsubscribeReason,Q={too_frequent:"📬 Too many emails",not_relevant:"🎯 Not relevant to me",never_signed_up:"❓ Never signed up",taking_break:"⏸️ Taking a break from trading",switched_firm:"🔄 Switched to another firm",inbox_clutter:"🗂️ Cleaning up inbox",already_customer:"✅ Already a customer"};return z.startsWith("other: ")?`💬 ${z.slice(7)}`:Q[z]??z})():n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:358",className:"text-muted-foreground italic",children:"No reason provided"})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:362",className:"pt-3 border-t border-border mt-1",children:n.jsxs(te,{"data-loc":"client/src/pages/client/ContactDetail.tsx:363",variant:"outline",size:"sm",className:"w-full gap-2 border-emerald-500/40 text-emerald-400 hover:bg-emerald-500/10",disabled:m.isPending,onClick:()=>m.mutate({id:t}),children:[n.jsx(e9,{"data-loc":"client/src/pages/client/ContactDetail.tsx:370",className:"w-3.5 h-3.5"}),m.isPending?"Re-subscribing...":"Re-subscribe this contact"]})})]})]}),x>0&&n.jsx(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:380",className:"bg-card border-border border-emerald-500/20",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:381",className:"pt-4 pb-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:382",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:383",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:384",className:"w-8 h-8 rounded-lg bg-emerald-500/10 flex items-center justify-center",children:n.jsx(Ii,{"data-loc":"client/src/pages/client/ContactDetail.tsx:385",className:"w-4 h-4 text-emerald-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:387",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:388",className:"text-xs text-muted-foreground",children:"Lifetime Value"}),n.jsxs("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:389",className:"text-xl font-bold text-emerald-400",children:["$",(x/100).toLocaleStr
838ing("en-US",{minimumFractionDigits:0,maximumFractionDigits:2})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:394",className:"text-right",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:395",className:"text-xs text-muted-foreground",children:"Total orders"}),n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:396",className:"text-lg font-semibold text-foreground",children:p.length})]})]})})}),p.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:405",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:406",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:407",className:"flex items-center justify-between gap-3",children:[n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:408",className:"text-sm flex items-center gap-2",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/ContactDetail.tsx:409",className:"w-4 h-4 text-emerald-500"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:410",children:"Purchased Accounts"}),n.jsxs(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:411",variant:"outline",className:"text-xs border-emerald-500/40 text-emerald-400 bg-emerald-500/10",children:[p.length," account",p.length!==1?"s":""]})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:415",value:l,onValueChange:z=>d(z),children:[n.jsxs(xt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:416",className:"h-7 w-[160px] text-xs",children:[n.jsx(EJ,{"data-loc":"client/src/pages/client/ContactDetail.tsx:417",className:"w-3 h-3 mr-1 text-muted-foreground"}),n.jsx(ht,{"data-loc":"client/src/pages/client/ContactDetail.tsx:418"})]}),n.jsxs(gt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:420",children:[n.jsx(he,{"data-loc":"client/src/pages/client/ContactDetail.tsx:421",value:"date_desc",children:"Newest first"}),n.jsx(he,{"data-loc":"client/src/pages/client/ContactDetail.tsx:422",value:"date_asc",children:"Oldest first"}),n.jsx(he,{"data-loc":"client/src/pages/client/ContactDetail.tsx:423",value:"size_desc",children:"Largest size first"}),n.jsx(he,{"data-loc":"client/src/pages/client/ContactDetail.tsx:424",value:"size_asc",children:"Smallest size first"})]})]})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:429",children:n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:430",className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-3",children:p.map(z=>n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:432",className:"rounded-xl border border-border bg-background/50 p-3.5 space-y-2.5 hover:border-emerald-500/30 transition-colors",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:437",className:"flex items-start justify-between gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:438",className:"flex flex-col gap-1",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:439",variant:"outline",className:`text-xs w-fit ${Uje(z.accountType)}`,children:z.accountType??"Unknown Type"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:445",className:"text-lg font-bold text-foreground leading-none",children:z.accountSize??"—"})]}),n.jsxs(Le,{"data-loc":"client/src/pages/client/ContactDetail.tsx:449",variant:"outline",className:`text-xs flex-shrink-0 ${zje(z.platform)}`,children:[n.jsx(XI,{"data-loc":"client/src/pages/client/ContactDetail.tsx:453",className:"w-3 h-3 mr-1"}),z.platform??"—"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:459",className:"space-y-1 pt-1 border-t border-border/50",children:[z.country&&n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:461",className:"flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:462",className:"text-xs text-muted-foreground",children:"Country"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:463",className:"text-xs text-foreground font-medium",children:z.country})]}),z.orderId&&n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:467",className:"flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:468",className:"text-xs text-muted-foreground",children:"Order ID"}),n.jsxs("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:469",className:"text-xs text-foreground font-mono",children:["#",z.orderId]})]}),z.couponCode&&n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:473",className:"flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:474",className:"text-xs text-muted-foreground",children:"Coupon"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:475",className:"text-xs text-emerald-400 font-mono font-semibold",children:z.couponCode})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:478",className:"flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:479",className:"text-xs text-muted-foreground",children:"Purchased"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:480",className:"text-xs text-muted-foreground",children:new Date(z.purchasedAt).toLocaleDateString()})]})]}),z.productName&&n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:488",className:"text-xs text-muted-foreground
838/60 truncate",title:z.productName,children:z.productName})]},z.id))})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:500",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:501",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:502",className:"flex items-center justify-between",children:[n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:503",className:"text-sm flex items-center gap-2",children:[n.jsx(la,{"data-loc":"client/src/pages/client/ContactDetail.tsx:504",className:"w-4 h-4 text-blue-500"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:505",children:"Site Activity"})]}),i&&i.total>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:508",className:"flex items-center gap-3",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:509",className:"text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:510",className:"font-semibold text-foreground",children:i.pageViews})," page views"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:512",className:"text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:513",className:"font-semibold text-amber-500",children:i.checkoutViews})," checkout views"]})]})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:519",children:!r||r.rows.length===0?n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:521",className:"text-sm text-muted-foreground text-center py-4",children:"No site activity recorded yet. Install the tracking pixel to start tracking."}):n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:523",className:"space-y-0",children:[r.rows.map(z=>{const Q=z.eventType==="checkout_view",L=Q?zi:la,M=(()=>{try{return new URL(z.url??"").hostname}catch{return z.url??""}})(),U=(()=>{try{const Z=new URL(z.url??"");return Z.pathname+Z.search}catch{return""}})();return n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:530",className:"flex items-start gap-3 py-2.5 border-b border-border/50 last:border-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:531",className:`w-7 h-7 rounded-lg flex items-center justify-center flex-shrink-0 mt-0.5 ${Q?"bg-amber-500/10":"bg-blue-500/10"}`,children:n.jsx(L,{"data-loc":"client/src/pages/client/ContactDetail.tsx:534",className:`w-3.5 h-3.5 ${Q?"text-amber-500":"text-blue-500"}`})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:536",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:537",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:538",className:`text-xs font-semibold ${Q?"text-amber-600":"text-blue-600"}`,children:Q?"Checkout View":"Page View"}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:543",className:"text-xs text-muted-foreground",children:M})]}),U&&U!=="/"&&n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:546",className:"text-xs text-muted-foreground font-mono truncate mt-0.5",children:U}),z.pageTitle&&n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:549",className:"text-xs text-foreground/70 truncate",children:z.pageTitle}),z.referrer&&n.jsxs("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:552",className:"text-xs text-muted-foreground/60 truncate",children:["via ",(()=>{try{return new URL(z.referrer).hostname}catch{return z.referrer}})()]})]}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:557",className:"text-xs text-muted-foreground flex-shrink-0",children:new Date(z.createdAt).toLocaleString()})]},z.id)}),r.total>20&&n.jsxs("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:564",className:"text-xs text-muted-foreground text-center pt-3",children:["Showing 20 of ",r.total," events"]})]})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/ContactDetail.tsx:574",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/ContactDetail.tsx:575",children:n.jsxs(St,{"data-loc":"client/src/pages/client/ContactDetail.tsx:575",className:"text-sm flex items-center gap-2",children:[n.jsx(Ks,{"data-loc":"client/src/pages/client/ContactDetail.tsx:575",className:"w-4 h-4"}),"Event History"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/ContactDetail.tsx:576",children:!h.events||h.events.length===0?n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:578",className:"text-sm text-muted-foreground text-center py-4",children:"No events recorded yet."}):n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:580",className:"divide-y divide-border",children:h.events.map(z=>{const Q=z.properties;let L=n.jsx(Ks,{"data-loc":"client/src/pages/client/ContactDetail.tsx:583",className:"w-3.5 h-3.5 text-muted-foreground"}),M=z.eventName.replace(/_/g," "),U=null,Z="bg-muted text-muted-foreground";if(z.eventName==="order_completed"){L=n.jsx(zi,{"data-loc":"client/src/pages/client/ContactDetail.tsx:589",className:"w-3.5 h-3.5 text-emerald-500"});const ie=Q?.amountUsd!=null?`$${(Number(Q.amountUsd)/100).toFixed(2)}`:null,G=Q?.orderId?`#${Q.orderId}`:null;M="Completed order"+(G?` ${G}`:""),U=ie??null,Z="bg-emerald-500/10 text-emerald-600"}else if(z.eventName==="checkout_view")L=n.jsx(HI,{"data-loc":"client/src/pages/client/ContactDetail.tsx:596",className:"w-3.5 h-3.5 text-amber-500"}),M="Started checkout",U=Q?.url?(()=>{try{return new URL(String(Q.url)).pathname}catch{return String(Q.url)}})():null,Z="bg-amber-500/10 text-amber-600";else if(z.eventName==="page_view")L=n.jsx(la,{"data-loc":"client/src/pages/client/ContactDetail.tsx:601",className:"w-3.5 h-3.5 text-blue-500"}),M="Visited page",U=Q?.url?(()=>{try{return new URL(String(Q.url)).pathname}catch{return String(Q.url)}})():null,Z="bg-blue-500/10 text-blue-600";else if(z.eventName==="sent")L=n.jsx(ja,{"data-loc":"client/src/pages/client/ContactDetail.tsx:606",className:"w-3.5 h-3.5 text-muted-foreground"}),M="Email sent",U=z.campaignName??null,Z="bg-muted text-muted-foreground";else if(z.eventName==="opened")L=n.jsx(ja,{"data-loc":"client/src/pages/client/ContactDetail.tsx:611",className:"w-3.5 h-3.5 text-violet-500"}),M="Opened email",U=z.campaignName??null,Z="bg-violet-500/10 text-violet-600";else if(z.eventName==="clicked"){L=n.jsx(Ic,{"data-loc":"client/src/pages/client/ContactDetail.tsx:616",className:"w-3.5 h-3.5 text-indigo-500"}),M="Clicked email link";const ie=z.url;U=ie?(()=>{try{return new URL(String(ie)).hostname}catch{return String(ie)}})():z.campaignName??null,Z="bg-indigo-500/10 text-indigo-600"}else if(z.eventName==="bounced")L=n.jsx(ja,{"data-loc":"client/src/pages/client/ContactDetail.tsx:622",className:"w-3.5 h-3.5 text-red-500"}),M="Email bounced",U=z.campaignName??null,Z="bg-red-500/10 text-red-600";else if(z.eventName==="unsubscribed")L=n.jsx(ja,{"data-loc":"client/src/pages/client/ContactDetail.tsx:627",className:"w-3.5 h-3.5 text-orange-500"}),M="Unsubscribed",U=z.campaignName??null,Z="bg-orange-500/10 text-orange-600";else if(z.source==="api"){L=n.jsx(Pa,{"data-loc":"client/src/pages/client/ContactDetail.tsx:632",className:"w-3.5 h-3.5 text-violet-500"}),M=z.eventName.replace(/_/g," ");const ie=z.properties;
838ie&&Object.keys(ie).length>0&&(U=Object.entries(ie).slice(0,3).map(([G,F])=>`${G}: ${F}`).join(" · ")),Z="bg-violet-500/10 text-violet-600"}return n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:642",className:"flex items-start gap-3 py-2.5",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:643",className:`mt-0.5 w-6 h-6 rounded-full flex items-center justify-center flex-shrink-0 ${Z}`,children:L}),n.jsxs("div",{"data-loc":"client/src/pages/client/ContactDetail.tsx:646",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:647",className:"text-sm font-medium text-foreground capitalize",children:M}),U&&n.jsx("p",{"data-loc":"client/src/pages/client/ContactDetail.tsx:648",className:"text-xs text-muted-foreground truncate mt-0.5",children:U})]}),n.jsx("span",{"data-loc":"client/src/pages/client/ContactDetail.tsx:650",className:"text-xs text-muted-foreground flex-shrink-0",children:new Date(z.occurredAt).toLocaleString()})]},z.id)})})})]})]})})}function Fje(){const{data:e,isLoading:t,refetch:a}=le.lists.list.useQuery(),[s,r]=v.useState(!1),[i,l]=v.useState({name:"",description:""}),d=le.lists.create.useMutation({onSuccess:()=>{ne.success("List created"),r(!1),a(),l({name:"",description:""})},onError:p=>ne.error(p.message)}),u=le.lists.delete.useMutation({onSuccess:()=>{ne.success("List deleted"),a()},onError:p=>ne.error(p.message)});return n.jsx(Pt,{"data-loc":"client/src/pages/client/Lists.tsx:39",title:"Lists",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:40",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:41",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:42",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Lists.tsx:43",className:"text-xl font-semibold text-foreground",children:"Lists"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Lists.tsx:44",className:"text-sm text-muted-foreground mt-0.5",children:[e?.length??0," list",e?.length!==1?"s":""]})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Lists.tsx:48",open:s,onOpenChange:r,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Lists.tsx:49",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Lists.tsx:50",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Lists.tsx:51",className:"w-4 h-4"}),"New list"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Lists.tsx:55",className:"max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Lists.tsx:56",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Lists.tsx:56",children:"Create List"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:57",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:58",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Lists.tsx:59",children:"List name *"}),n.jsx(De,{"data-loc":"client/src/pages/client/Lists.tsx:60",placeholder:"e.g. Newsletter subscribers",value:i.name,onChange:p=>l({...i,name:p.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:66",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Lists.tsx:67",children:"Description"}),n.jsx(De,{"data-loc":"client/src/pages/client/Lists.tsx:68",placeholder:"Optional description",value:i.description,onChange:p=>l({...i,description:p.target.value})})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Lists.tsx:74",className:"w-full",disabled:!i.name||d.isPending,onClick:()=>d.mutate(i),children:d.isPending?"Creating...":"Create list"})]})]})]})]}),t?n.jsx("div",{"data-loc":"client/src/pages/client/Lists.tsx:87",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((p,x)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:89",className:"border border-border rounded-lg p-5 space-y-3",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Lists.tsx:90",className:"h-9 w-9 rounded-lg"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Lists.tsx:91",className:"h-5 w-36"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Lists.tsx:92",className:"h-4 w-20"})]},x))}):e?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Lists.tsx:111",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(p=>n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:113",className:"border border-border rounded-lg p-5 bg-card hover:border-primary/40 hover:shadow-sm transition-all group",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:117",className:"flex items-start justify-between mb-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Lists.tsx:118",className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:n.jsx(kS,{"data-loc":"client/src/pages/client/Lists.tsx:119",className:"w-4 h-4 text-primary"})}),n.jsxs(xr,{"data-loc":"client/src/pages/client/Lists.tsx:121",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Lists.tsx:122",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Lists.tsx:123",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Lists.tsx:124",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Lists.tsx:127",align:"end",className:"w-40",children:[n.jsxs(ca,{"data-loc":"client/src/pages/client/Lists.tsx:128",className:"flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Edit coming soon"),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Lists.tsx:129",className:"w-4 h-4"}),"Edit"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Lists.tsx:131",className:"flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Duplicate coming soon"),children:[n.jsx(Ra,{"data-loc":"client/src/pages/client/Lists.tsx:132",className:"w-4 h-4"}),"Duplicate"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Lists.tsx:134",className:"flex items-center gap-2 text-destructive focus:text-destructive cursor-pointer",onClick:()=>u.mutate({id:p.id}),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Lists.tsx:135",className:"w-4 h-4"}),"Delete"]})]})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Lists.tsx:140",className:"text-sm font-semibold text-foreground",children:p.name}),p.description&&n.jsx("p",{"data-loc":"client/src/pages/client/Lists.tsx:141",className:"text-xs text-muted-foreground mt-0.5 line-clamp-2",children:p.description}),n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:142",className:"flex items-center justify-between mt-4 pt-3 border-t border-border",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:143",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Lists.tsx:144",className:"w-3.5 h-3.5"}
838),p.contactCount?.toLocaleString()??0," contacts"]}),n.jsx("span",{"data-loc":"client/src/pages/client/Lists.tsx:147",className:"text-xs text-muted-foreground",children:new Date(p.createdAt).toLocaleDateString()})]})]},p.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Lists.tsx:97",className:"border border-dashed border-border rounded-lg py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Lists.tsx:98",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(kS,{"data-loc":"client/src/pages/client/Lists.tsx:99",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Lists.tsx:101",className:"text-sm font-medium text-foreground",children:"No lists yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Lists.tsx:102",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Create lists to organise your contacts into groups"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Lists.tsx:105",size:"sm",variant:"outline",onClick:()=>r(!0),children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Lists.tsx:106",className:"w-4 h-4 mr-1.5"}),"Create list"]})]})]})})}const GR=[{value:"status",label:"Subscription Status"},{value:"account_type",label:"Account Type"},{value:"account_size",label:"Account Size"},{value:"trading_platform",label:"Trading Platform"},{value:"country",label:"Country"},{value:"tag",label:"Tag"},{value:"list",label:"List"},{value:"campaign_sent",label:"Campaign"}],YR=[{value:"equals",label:"is"},{value:"not_equals",label:"is not"},{value:"contains",label:"contains"},{value:"not_contains",label:"does not contain"}],Wje=[{value:"was_sent",label:"was sent"},{value:"was_not_sent",label:"was NOT sent"}];function Hje(){const{data:e,isLoading:t,refetch:a}=le.segments.list.useQuery(),[s,r]=v.useState(!1),[i,l]=v.useState(null),[d,u]=v.useState(""),[p,x]=v.useState("all"),[m,h]=v.useState([{field:"status",operator:"equals",value:"subscribed"}]),y=le.segments.previewCount.useQuery({conditions:m,matchType:p},{enabled:s&&m.length>0}),{data:w}=le.campaigns.list.useQuery({page:1,limit:200},{enabled:s}),b=le.segments.create.useMutation({onSuccess:()=>{ne.success("Segment created"),r(!1),a(),u(""),h([{field:"status",operator:"equals",value:"subscribed"}]),x("all")},onError:k=>ne.error(k.message)}),j=le.segments.delete.useMutation({onSuccess:()=>{ne.success("Segment deleted"),l(null),a()},onError:k=>ne.error(k.message)}),S=()=>h(k=>[...k,{field:"status",operator:"equals",value:""}]),O=k=>h(E=>E.filter((D,_)=>_!==k)),A=(k,E,D)=>h(_=>_.map((T,I)=>{if(I!==k)return T;const $={...T,[E]:D};return E==="field"&&(D==="campaign_sent"?($.operator="was_not_sent",$.value=""):T.field==="campaign_sent"&&($.operator="equals",$.value="")),$}));return n.jsxs(Pt,{"data-loc":"client/src/pages/client/Segments.tsx:113",title:"Segments",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:114",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:117",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:118",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Segments.tsx:119",className:"text-xl font-semibold text-foreground",children:"Segments"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Segments.tsx:120",className:"text-sm text-muted-foreground mt-0.5",children:[e?.length??0," segment",e?.length!==1?"s":""]})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Segments.tsx:124",open:s,onOpenChange:r,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Segments.tsx:125",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Segments.tsx:126",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Segments.tsx:127",className:"w-4 h-4"}),"New segment"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Segments.tsx:131",className:"max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Segments.tsx:132",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Segments.tsx:133",children:"Create Segment"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:135",className:"space-y-5 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:136",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Segments.tsx:137",children:"Segment name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Segments.tsx:138",placeholder:"e.g. Funded traders — $100k",value:d,onChange:k=>u(k.target.value)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:145",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:146",className:"flex items-center justify-between",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Segments.tsx:147",children:"Conditions"}),m.length>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:149",className:"flex items-center gap-1 bg-muted rounded-md p-0.5",children:[n.jsx("button",{"data-loc":"client/src/pages/client/Segments.tsx:150",type:"button",onClick:()=>x("all"),className:`px-2.5 py-1 text-xs font-medium rounded transition-colors ${p==="all"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"Match ALL"}),n.jsx("button",{"data-loc":"client/src/pages/client/Segments.tsx:161",type:"button",onClick:()=>x("any"),className:`px-2.5 py-1 text-xs font-medium rounded transition-colors ${p==="any"?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"Match ANY"})]})]}),m.map((k,E)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:176",className:"space-y-1",children:[E>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:178",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:179",className:"flex-1 h-px bg-border"}),n.jsx("span",{"data-loc":"client/src/pages/client/Segments.tsx:180",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide px-1",children:p==="any"?"OR":"AND"}),n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:183",className:"flex-1 h-px bg-border"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:186",className:"flex items-center gap-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/Segments.tsx:187",value:k.field,onValueChange:D=>A(E,"field",D),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Segments.tsx:188",className:"flex-1 h-9",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Segments.tsx:189"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/Segments.tsx:191",children:GR.map(D=>n.jsx(he,{"data-loc":"client/src/pages/client/Segments.tsx:193",value:D.value,children:D.label},D.value))})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Segments.tsx:197",value:k.operator,onValueChange:D=>A(E,"operator",D),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Segments.tsx:201",className:"w-36 h-9",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Segments.tsx:202"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/Segments.tsx:204",children:(k.field==="campaign_sent"?Wje:YR).map(D=>n.jsx(he,{"data-loc":"client/src/pages/client/Segments.tsx:206",value:D.value,children:D.label},D.value))})]}),k.field==="campaign_sent"?n.jsxs(mt,{"data-loc":"client/src/pages/client/Segments.tsx:211",value:k.value,onValueChange:D=>A(E,"value",D),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Segments.tsx:215",className:"flex-1 h-9",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Segments.tsx:216",placeholder:"Select campaign..."})}),n.jsx(gt,{"data-loc":"client/src/pages/client/Segments.tsx:218",children:(w?.campaigns??[]).map(D=>n.jsx(he,{"data-loc":"client/src/pages/client/Segments.tsx:220",value:String(D.id),children:D.name},D.id))})]}):n.jsx(De,{"data-loc":"client/src/pages/client/Segments.tsx:225",className:"flex-1 h-9",placeholder:"Value",value:k.value,onChange:D=>A(E,"value",D.target.value)}),m.length>1&&n.jsx(te,{"data-loc":"client/src/pages/client/Segments.tsx:233",variant:"ghost",size:"sm",className:"h-9 w-9 p-0 text-muted-foreground hover:text-destructive",onClick:()=>O(E),children:"×"})]})]},E)),n.jsxs(te,{"data-loc":"client/src/pages/client/Segments.tsx:244",variant:"outline",size:"sm",className:"gap-1.5",onClick:S,children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Segments.tsx:245",className:"w-3.5 h-3.5"}),"Add condition"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:250",className:"rounded-lg bg-muted/50 border border-border px-4 py-3 flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:251",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Segments.tsx:252",className:"w-4 h-4"}),"Estimated contacts"]}),n.jsx("span",{"data-loc":"client/src/pages/client/Segments.tsx:255",className:"text-lg font-bold text-foreground",children:y.isLoading?"...":y.data?.count?.toLocaleStr
838ing()??"—"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Segments.tsx:260",className:"w-full",disabled:!d||m.some(k=>!k.value)||b.isPending,onClick:()=>b.mutate({name:d,conditions:m,matchType:p}),children:b.isPending?"Creating...":"Create segment"})]})]})]})]}),t?n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:274",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((k,E)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:276",className:"border border-border rounded-lg p-5 space-y-3",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Segments.tsx:277",className:"h-5 w-40"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Segments.tsx:278",className:"h-4 w-24"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:279",className:"flex gap-1.5",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Segments.tsx:280",className:"h-5 w-20 rounded-full"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Segments.tsx:281",className:"h-5 w-16 rounded-full"})]})]},E))}):e?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:301",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(k=>{const E=Array.isArray(k.conditions)?k.conditions:[];return n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:308",className:"border border-border rounded-lg p-5 bg-card hover:border-primary/40 hover:shadow-sm transition-all group",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:312",className:"flex items-start justify-between mb-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:313",className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:n.jsx(ch,{"data-loc":"client/src/pages/client/Segments.tsx:314",className:"w-4 h-4 text-primary"})}),n.jsxs(xr,{"data-loc":"client/src/pages/client/Segments.tsx:316",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Segments.tsx:317",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Segments.tsx:318",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Segments.tsx:322",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Segments.tsx:325",align:"end",className:"w-40",children:[n.jsxs(ca,{"data-loc":"client/src/pages/client/Segments.tsx:326",className:"flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Edit coming soon"),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Segments.tsx:330",className:"w-4 h-4"}),"Edit"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Segments.tsx:333",className:"flex items-center gap-2 text-destructive focus:text-destructive cursor-pointer",onClick:()=>l({id:k.id,name:k.name}),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Segments.tsx:337",className:"w-4 h-4"}),"Delete"]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:344",className:"flex items-start justify-between mb-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Segments.tsx:345",className:"text-sm font-semibold text-foreground",children:k.name}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:346",className:"flex items-center gap-1.5 shrink-0 ml-2",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Segments.tsx:347",className:"w-3.5 h-3.5 text-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/client/Segments.tsx:348",className:"text-sm font-bold text-foreground",children:(k.contactCount??0).toLocaleString()})]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Segments.tsx:353",className:"text-xs text-muted-foreground mb-3 flex items-center gap-1.5",children:[E.length," condition",E.length!==1?"s":"",E.length>1&&n.jsx("span",{"data-loc":"client/src/pages/client/Segments.tsx:356",className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold bg-muted border border-border text-muted-foreground",children:k.matchType==="any"?"OR":"AND"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:362",className:"flex flex-wrap gap-1.5 mb-4",children:[E.slice(0,2).map((D,_)=>{const T=GR.find($=>$.value===D.field)?.label??D.field,I=YR.find($=>$.value===D.operator)?.label??D.operator;return n.jsxs("span",{"data-loc":"client/src/pages/client/Segments.tsx:367",className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10px] font-medium bg-muted text-muted-foreground border border-border",children:[T," ",I," ",n.jsx("strong",{"data-loc":"client/src/pages/client/Segments.tsx:371",className:"text-foreground",children:D.value})]},_)}),E.length>2&&n.jsxs("span",{"data-loc":"client/src/pages/client/Segments.tsx:376",className:"text-[10px] text-muted-foreground",children:["+",E.length-2," more"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:380",className:"flex items-center justify-between pt-3 border-t border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Segments.tsx:381",className:"text-xs text-muted-foreground",children:new Date(k.createdAt).toLocaleDateString()}),n.jsxs(te,{"data-loc":"client/src/pages/client/Segments.tsx:384",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1 text-primary hover:text-primary",onClick:()=>a(),children:[n.jsx(Vr,{"data-loc":"client/src/pages/client/Segments.tsx:389",className:"w-3.5 h-3.5"}),"Refresh"]})]})]},k.id)})}):n.jsxs("div",{"data-loc":"client/src/pages/client/Segments.tsx:287",className:"border border-dashed border-border rounded-lg py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Segments.tsx:288",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(ch,{"data-loc":"client/src/pages/client/Segments.tsx:289",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Segments.tsx:291",className:"text-sm font-medium text-foreground",children:"No segments yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Segments.tsx:292",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Create segments to target specific groups of contacts"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Segments.tsx:295",size:"sm",variant:"outline",onClick:()=>r(!0),children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Segments.tsx:296",className:"w-4 h-4 mr-1.5"}),"Create segment"]})]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/Segments.tsx:400",open:!!i,onOpenChange:k=>!k&&l(null),children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Segments.tsx:401",className:"max-w-sm",children:[n.jsxs(Wa,{"data-loc":"client/src/pages/client/Segments.tsx:402",children:[n.jsx(Ha,{"data-loc":"client/src/pages/client/Segments.tsx:403",children:"Delete segment?"}),n.jsxs(kte,{"data-loc":"client/src/pages/client/Segments.tsx:404",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/Segments.tsx:405",children:i?.name})," will be permanently deleted. This cannot be undone."]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Segments.tsx:408",className:"gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Segments.tsx:409",variant:"outline",onClick:()=>l(null),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Segments.tsx:410",variant:"destructive",disabled:j.isPending,onClick:()=>i&&j.mutate({id:i.id}),children:j.isPending?"Deleting...":"Delete"})]})]})})]})}var xF="AlertDialog",[Vje]=Pn(xF,[N9]),Zi=N9(),gF=e=>{const{__scopeAlertDialog:t,...a}=e,s=Zi(t);return n.jsx(Gv,{...s,...a,modal:!0})};gF.displayName=xF;var Gje="AlertDialogTrigger",hF=v.forwardRef((e,t)=>
838{const{__scopeAlertDialog:a,...s}=e,r=Zi(a);return n.jsx($9,{...r,...s,ref:t})});hF.displayName=Gje;var Yje="AlertDialogPortal",vF=e=>{const{__scopeAlertDialog:t,...a}=e,s=Zi(t);return n.jsx(Yv,{...s,...a})};vF.displayName=Yje;var Kje="AlertDialogOverlay",yF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...s}=e,r=Zi(a);return n.jsx(Kv,{...r,...s,ref:t})});yF.displayName=Kje;var Dd="AlertDialogContent",[Qje,Xje]=Vje(Dd),Zje=WB("AlertDialogContent"),bF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,children:s,...r}=e,i=Zi(a),l=v.useRef(null),d=kt(t,l),u=v.useRef(null);return n.jsx(Cte,{contentName:Dd,titleName:jF,docsSlug:"alert-dialog",children:n.jsx(Qje,{scope:a,cancelRef:u,children:n.jsxs(Qv,{role:"alertdialog",...i,...r,ref:d,onOpenAutoFocus:We(r.onOpenAutoFocus,p=>{p.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:p=>p.preventDefault(),onInteractOutside:p=>p.preventDefault(),children:[n.jsx(Zje,{children:s}),n.jsx(ewe,{contentRef:l})]})})})});bF.displayName=Dd;var jF="AlertDialogTitle",wF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...s}=e,r=Zi(a);return n.jsx(X5,{...r,...s,ref:t})});wF.displayName=jF;var NF="AlertDialogDescription",SF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...s}=e,r=Zi(a);return n.jsx(Z5,{...r,...s,ref:t})});SF.displayName=NF;var Jje="AlertDialogAction",CF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...s}=e,r=Zi(a);return n.jsx(Xv,{...r,...s,ref:t})});CF.displayName=Jje;var EF="AlertDialogCancel",AF=v.forwardRef((e,t)=>{const{__scopeAlertDialog:a,...s}=e,{cancelRef:r}=Xje(EF,a),i=Zi(a),l=kt(t,r);return n.jsx(Xv,{...i,...s,ref:l})});AF.displayName=EF;var ewe=({contentRef:e})=>{const t=`\`${Dd}\` requires a description for the component to be accessible for screen reader users.
839
840You can add a description to the \`${Dd}\` by passing a \`${NF}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
841
842Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Dd}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
843
844For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},twe=gF,awe=hF,nwe=vF,swe=yF,rwe=bF,iwe=CF,cwe=AF,lwe=wF,owe=SF;function cm({...e}){return n.jsx(twe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:10","data-slot":"alert-dialog",...e})}function l5({...e}){return n.jsx(awe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:17","data-slot":"alert-dialog-trigger",...e})}function dwe({...e}){return n.jsx(nwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:25","data-slot":"alert-dialog-portal",...e})}function uwe({className:e,...t}){return n.jsx(swe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:34","data-slot":"alert-dialog-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function lm({className:e,...t}){return n.jsxs(dwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:50",children:[n.jsx(uwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:51"}),n.jsx(rwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:52","data-slot":"alert-dialog-content",className:Se("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...t})]})}function om({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:69","data-slot":"alert-dialog-header",className:Se("flex flex-col gap-2 text-center sm:text-left",e),...t})}function dm({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/alert-dialog.tsx:82","data-slot":"alert-dialog-footer",className:Se("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function um({className:e,...t}){return n.jsx(lwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:98","data-slot":"alert-dialog-title",className:Se("text-lg font-semibold",e),...t})}function pm({className:e,...t}){return n.jsx(owe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:111","data-slot":"alert-dialog-description",className:Se("text-muted-foreground text-sm",e),...t})}function fm({className:e,...t}){return n.jsx(iwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:124",className:Se(ff(),e),...t})}function mm({className:e,...t}){return n.jsx(cwe,{"data-loc":"client/src/components/ui/alert-dialog.tsx:136",className:Se(ff({variant:"outline"}),e),...t})}function Tp({field:e,current:t,dir:a}){return t!==e?n.jsx(DS,{"data-loc":"client/src/pages/client/Campaigns.tsx:58",className:"w-3 h-3 ml-1 text-muted-foreground
844/50 inline"}):a==="asc"?n.jsx(Bi,{"data-loc":"client/src/pages/client/Campaigns.tsx:60",className:"w-3 h-3 ml-1 text-foreground inline"}):n.jsx(Tn,{"data-loc":"client/src/pages/client/Campaigns.tsx:61",className:"w-3 h-3 ml-1 text-foreground inline"})}function pwe(){const[,e]=La(),[t,a]=v.useState("all"),[s,r]=v.useState("all"),[i,l]=v.useState(""),[d,u]=v.useState(1),[p,x]=v.useState(new Set),[m,h]=v.useState("date"),[y,w]=v.useState("desc"),[b,j]=v.useState(null),[S,O]=v.useState(!1),A=20,{data:k,isLoading:E,dataUpdatedAt:D,refetch:_}=le.campaigns.list.useQuery({status:t==="all"?void 0:t,page:d,limit:A}),T=le.campaigns.delete.useMutation({onSuccess:()=>{ne.success("Campaign deleted"),j(null),_()},onError:()=>ne.error("Failed to delete campaign")}),I=le.campaigns.resume.useMutation({onSuccess:()=>{ne.success("Campaign resumed"),_()},onError:q=>ne.error(q.message)}),$=le.campaigns.duplicate.useMutation({onSuccess:q=>{ne.success("Campaign duplicated"),q?.id&&e(`/campaigns/${q.id}`)},onError:()=>ne.error("Failed to duplicate campaign")}),R=q=>{m===q?w(J=>J==="asc"?"desc":"asc"):(h(q),w("desc"))},B=q=>{x(J=>{const ce=new Set(J);return ce.has(q)?ce.delete(q):ce.add(q),ce})},Y=()=>{k?.campaigns&&(p.size===k.campaigns.length?x(new Set):x(new Set(k.campaigns.map(q=>q.id))))},z=(k?.campaigns??[]).filter(q=>{const J=!i||q.name.toLowerCase().includes(i.toLowerCase()),ce=s==="all"||q.type===s;return J&&ce}).sort((q,J)=>{const ce=y==="asc"?1:-1;if(m==="name")return ce*q.name.localeCompare(J.name);if(m==="sent")return ce*((q.totalSent??0)-(J.totalSent??0));if(m==="openRate"){const de=q.totalSent?(q.totalUniqueOpens??0)/q.totalSent:0,ve=J.totalSent?(J.totalUniqueOpens??0)/J.totalSent:0;return ce*(de-ve)}if(m==="clickRate"){const de=q.totalSent?(q.totalUniqueClicks??0)/q.totalSent:0,ve=J.totalSent?(J.totalUniqueClicks??0)/J.totalSent:0;return ce*(de-ve)}const se=q.sentAt??q.scheduledAt??q.createdAt,ye=J.sentAt??J.scheduledAt??J.createdAt;return ce*(new Date(se).getTime()-new Date(ye).getTime())}),Q=Math.ceil((k?.total??0)/A),L=D?(()=>{const q=Math.floor((Date.now()-D)/1e3);return q<60?`Updated ${q}s ago`:`Updated ${Math.floor(q/60)}m ago`})():null,M=q=>({sent:"bg-blue-50 text-blue-700 border-blue-200",draft:"bg-slate-100 text-slate-600 border-slate-200",scheduled:"bg-amber-50 text-amber-700 border-amber-200",sending:"bg-emerald-50 text-emerald-700 border-emerald-200",failed:"bg-red-50 text-red-700 border-red-200",paused:"bg-orange-50 text-orange-700 border-orange-200",auto_paused:"bg-red-50 text-red-700 border-red-200"})[q]??"bg-slate-100 text-slate-600 border-slate-200",U=q=>q==="email_ab"?"bg-violet-50 text-violet-700 border-violet-200":q==="sms"?"bg-emerald-50 text-emerald-700 border-emerald-200":q==="push_notification"?"bg-orange-50 text-orange-700 border-orange-200":"bg-sky-50 text-sky-700 border-sky-200",Z=q=>{const J=q.sentAt??q.scheduledAt??q.createdAt;return new Date(J).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})},ie=(q,J)=>{if(!J||J===0)return null;const ce=((q??0)/J*100).toFixed(1),se=(q??0).toLocaleString();return{pct:ce,count:se}},G=q=>{if(!q)return null;const J=q/100;return J>=1e6?`$${(J/1e6).toFixed(1)}M`:J>=1e3?`$${(J/1e3).toFixed(1)}K`:`$${J.toFixed(2)}`},F=z.length>0&&p.size===z.length,H=p.size>0&&!F;return n.jsxs(Pt,{"data-loc":"client/src/pages/client/Campaigns.tsx:213",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:214",className:"flex flex-col h-full",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:216",className:"flex items-center justify-between px-6 py-5 border-b border-border bg-background",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Campaigns.tsx:217",className:"text-2xl font-bold text-foreground",children:"Campaigns"}),n.jsx(te,{"data-loc":"client/src/pages/client/Campaigns.tsx:218",asChild:!0,className:"bg-primary hover:bg-primary/90 text-white font-medium",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:219",href:"/campaigns/new",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Campaigns.tsx:220",className:"w-4 h-4 mr-1.5"}),"Create campaign"]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:227",className:"flex items-center gap-3 px-6 py-3 border-b border-border bg-background",children:[p.size>0?n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:230",className:"flex items-center gap-2",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/Campaigns.tsx:231",variant:"outline",size:"sm",className:"h-8 text-xs text-destructive border-destructive/30 hover:bg-destructive/5",onClick:()=>O(!0),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Campaigns.tsx:237",className:"w-3.5 h-3.5 mr-1.5"}),"Delete"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:240",className:"text-xs text-muted-foreground",children:[p.size," of ",z.length," selected"]})]}):n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:245",className:"text-xs text-muted-foreground",children:["0 of ",k?.total??0," selected"]}),n.jsx("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:250",className:"flex-1"}),L&&n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:254",className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:255",children:L}),n.jsx("button",{"data-loc":"client/src/pages/client/Campaigns.tsx:256",onClick:()=>_(),className:"p-1 rounded hover:bg-muted transition-colors",title:"Refresh",children:n.jsx(Vr,{"data-loc":"client/src/pages/client/Campaigns.tsx:261",className:"w-3 h-3"})})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Campaigns.tsx:267",value:s,onValueChange:q=>{r(q),u(1)},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Campaigns.tsx:268",className:"h-8 w-32 text-xs border-border",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Campaigns.tsx:269",placeholder:"Any type"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Campaigns.tsx:271",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:272",value:"all",children:"Any type"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:273",value:"email",children:"Email"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:274",value:"email_ab",children:"Email A/B test"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:275",value:"sms",children:"SMS"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:276",value:"push_notification",children:"Push notification"})]})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Campaigns.tsx:281",value:t,onValueChange:q=>{a(q),u(1)},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Campaigns.tsx:282",className:"h-8 w-32 text-xs border-border",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Campaigns.tsx:283",placeholder:"Any status"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Campaigns.tsx:285",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:286",value:"all",children:"Any status"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:287",value:"draft",children:"Draft"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:288",value:"scheduled",children:"Scheduled"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:289",value:"sending",children:"Sending"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:290",value:"sent",children:"Sent"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:291",value:"failed",children:"Failed"}),n.jsx(he,{"data-loc":"client/src/pages/client/Campaigns.tsx:292",value:"auto_paused",children:"Auto-paused"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:297",className:"relative",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Campaigns.tsx:298",className:"absolute left-2.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Campaigns.tsx:299",placeholder:"Search campaigns",value:i,onChange:q=>l(q.target.value),className:"h-8 pl-8 w-52 text-xs border-border"})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:309",className:"flex-1 overflow-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Campaigns.tsx:310",className:"w-full border-collapse",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Campaigns.tsx:311",className:"sticky top-0 z-10 bg-background border-b border-border",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Campaigns.tsx:312",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:314",className:"w-10 px-4 py-3",children:n.jsx("input",{"data-loc":"client/src/pages/client/Campaigns.tsx:315",type:"checkbox",checked:F,ref:q=>{q&&(q.indeterminate=H)},onChange:Y,className:"w-4 h-4 rounded border-border accent-primary curs
844or-pointer"})}),n.jsxs("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:324",className:"text-left px-3 py-3 text-xs font-semibold text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>R("name"),children:["MY CAMPAIGNS ",n.jsx(Tp,{"data-loc":"client/src/pages/client/Campaigns.tsx:328",field:"name",current:m,dir:y})]}),n.jsx("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:331",className:"text-left px-3 py-3 text-xs font-semibold text-muted-foreground w-24",children:"TYPE"}),n.jsx("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:335",className:"text-left px-3 py-3 text-xs font-semibold text-muted-foreground w-28",children:"STATUS"}),n.jsxs("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:339",className:"text-left px-3 py-3 text-xs font-semibold text-muted-foreground w-36 cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>R("date"),children:["DATE ",n.jsx(Tp,{"data-loc":"client/src/pages/client/Campaigns.tsx:343",field:"date",current:m,dir:y})]}),n.jsxs("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:346",className:"text-right px-3 py-3 text-xs font-semibold text-muted-foreground w-24 cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>R("sent"),children:["SENT ",n.jsx(Tp,{"data-loc":"client/src/pages/client/Campaigns.tsx:350",field:"sent",current:m,dir:y})]}),n.jsxs("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:353",className:"text-right px-3 py-3 text-xs font-semibold text-muted-foreground w-36 cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>R("openRate"),children:["OPEN RATE ",n.jsx(Tp,{"data-loc":"client/src/pages/client/Campaigns.tsx:357",field:"openRate",current:m,dir:y})]}),n.jsxs("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:360",className:"text-right px-3 py-3 text-xs font-semibold text-muted-foreground w-36 cursor-pointer select-none hover:text-foreground transition-colors",onClick:()=>R("clickRate"),children:["CLICK RATE ",n.jsx(Tp,{"data-loc":"client/src/pages/client/Campaigns.tsx:364",field:"clickRate",current:m,dir:y})]}),n.jsx("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:367",className:"text-right px-3 py-3 text-xs font-semibold text-muted-foreground w-32",children:"REVENUE"}),n.jsx("th",{"data-loc":"client/src/pages/client/Campaigns.tsx:371",className:"w-10 px-3 py-3"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Campaigns.tsx:374",children:E?[...Array(8)].map((q,J)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Campaigns.tsx:377",className:"border-b border-border",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:378",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:378",className:"h-4 w-4 rounded"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:379",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:379",className:"h-4 w-48"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:380",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:380",className:"h-4 w-16"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:381",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:381",className:"h-4 w-16"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:382",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:382",className:"h-4 w-24"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:383",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:383",className:"h-4 w-12 ml-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:384",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:384",className:"h-4 w-20 ml-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:385",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:385",className:"h-4 w-20 ml-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:386",className:"px-3 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Campaigns.tsx:386",className:"h-4 w-16 ml-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:387",className:"px-3 py-3"})]},J)):z.length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/Campaigns.tsx:391",children:n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:392",colSpan:10,className:"text-center py-20",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:393",className:"flex flex-col items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:394",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center",children:n.jsx(ja,{"data-loc":"client/src/pages/client/Campaigns.tsx:395",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Campaigns.tsx:397",className:"text-sm font-medium text-foreground",children:"No campaigns yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Campaigns.tsx:398",className:"text-xs text-muted-foreground",children:"Create your first campaign to start sending emails to your audience."}),n.jsx(te,{"data-loc":"client/src/pages/client/Campaigns.tsx:401",asChild:!0,size:"sm",className:"mt-1",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:402",href:"/campaigns/new",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Campaigns.tsx:403",className:"w-4 h-4 mr-1.5"}),"Create campaign"]})})]})})}):z.map(q=>{const J=ie(q.totalUniqueOpens,q.totalSent),ce=ie(q.totalUniqueClicks,q.totalSent);G(q.revenue);const se=p.has(q.id);return n.jsxs("tr",{"data-loc":"client/src/pages/client/Campaigns.tsx:418",className:Se("border-b border-border transition-colors group",se?"bg-primary/5":"hover:bg-muted/40"),children:[n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:426",className:"px-4 py-3.5",children:n.jsx("input",{"data-loc":"client/src/pages/client/Campaigns.tsx:427",type:"checkbox",checked:se,onChange:()=>B(q.id),className:"w-4 h-4 rounded border-border accent-primary curs
844or-pointer"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:436",className:"px-3 py-3.5",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:437",href:q.status==="draft"?`/campaigns/${q.id}/edit`:`/campaigns/${q.id}`,className:"block group/link",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Campaigns.tsx:438",className:"text-sm font-medium text-foreground group-hover/link:text-primary transition-colors",children:q.name}),n.jsx("p",{"data-loc":"client/src/pages/client/Campaigns.tsx:441",className:"text-xs text-muted-foreground mt-0.5 truncate max-w-xs",children:q.subject?`Sent to ${q.audienceIds?.length?"selected audience":"all contacts"}`:"No subject set"})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:450",className:"px-3 py-3.5",children:n.jsx(Le,{"data-loc":"client/src/pages/client/Campaigns.tsx:451",variant:"outline",className:Se("text-[11px] font-medium capitalize",U(q.type??"email")),children:q.type==="sms"?"SMS":q.type==="push_notification"?"Push notification":q.type==="email_ab"?"Email A/B test":"Email"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:460",className:"px-3 py-3.5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:461",className:"flex flex-col gap-1",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/Campaigns.tsx:462",variant:"outline",className:Se("text-[11px] font-medium",M(q.status)),children:q.status==="auto_paused"?n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:467",className:"flex items-center gap-1",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Campaigns.tsx:467",className:"w-3 h-3"}),"Auto-paused"]}):q.status.replace("_"," ")}),q.status==="auto_paused"&&q.autoPauseReason&&n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:471",className:"text-[10px] text-red-500 max-w-[180px] truncate",title:q.autoPauseReason,children:q.autoPauseReason})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:479",className:"px-3 py-3.5",children:n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:480",className:"text-sm text-foreground",children:Z(q)})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:484",className:"px-3 py-3.5 text-right",children:n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:485",className:"text-sm text-foreground",children:q.totalSent!=null?q.totalSent>=1e3?`${(q.totalSent/1e3).toFixed(1)}K`:q.totalSent.toLocaleString():"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:495",className:"px-3 py-3.5 text-right",children:J?n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:497",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:498",className:"text-sm font-medium text-foreground",children:[J.pct,"%"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:499",className:"text-xs text-muted-foreground ml-1",children:["(",J.count,")"]})]}):n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:502",className:"text-sm text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:507",className:"px-3 py-3.5 text-right",children:ce?n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:509",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:510",className:"text-sm font-medium text-foreground",children:[ce.pct,"%"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:511",className:"text-xs text-muted-foreground ml-1",children:["(",ce.count,")"]})]}):n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:514",className:"text-sm text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:519",className:"px-3 py-3.5 text-right",children:q.totalRevenue&&q.totalRevenue>0?n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:521",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:522",className:"text-sm font-medium text-foreground",children:G(q.totalRevenue)}),q.totalOrders&&q.totalOrders>0&&n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:524",className:"text-xs text-muted-foreground ml-1",children:["(",q.totalOrders,")"]})]}):n.jsx("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:528",className:"text-sm text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Campaigns.tsx:533",className:"px-3 py-3.5",children:n.jsxs(xr,{"data-loc":"client/src/pages/client/Campaigns.tsx:534",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Campaigns.tsx:535",asChild:!0,children:n.jsx("button",{"data-loc":"client/src/pages/client/Campaigns.tsx:536",className:"opacity-0 group-hover:opacity-100 p-1.5 rounded-md hover:bg-muted transition-all",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Campaigns.tsx:537",className:"w-4 h-4 text-muted-foreground"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Campaigns.tsx:540",align:"end",className:"w-44",children:[n.jsx(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:541",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:542",href:`/campaigns/${q.id}`,className:"cursor-pointer",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Campaigns.tsx:543",className:"w-4 h-4 mr-2"}),"View"]}
844)}),q.status==="sent"&&n.jsx(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:548",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:549",href:`/campaigns/${q.id}/report`,className:"cursor-pointer",children:[n.jsx(xf,{"data-loc":"client/src/pages/client/Campaigns.tsx:550",className:"w-4 h-4 mr-2"}),"View Report"]})}),q.status==="draft"&&n.jsx(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:556",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:557",href:`/campaigns/${q.id}/edit`,className:"cursor-pointer",children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Campaigns.tsx:558",className:"w-4 h-4 mr-2"}),"Edit"]})}),q.status==="draft"&&n.jsx(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:564",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Campaigns.tsx:565",href:`/campaigns/${q.id}/batched-send`,className:"cursor-pointer",children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/Campaigns.tsx:566",className:"w-4 h-4 mr-2"}),"Manage Batches"]})}),q.status==="auto_paused"&&n.jsxs(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:572",onClick:()=>I.mutate({id:q.id}),className:"cursor-pointer text-orange-600 focus:text-orange-600",children:[n.jsx(kJ,{"data-loc":"client/src/pages/client/Campaigns.tsx:576",className:"w-4 h-4 mr-2"}),"Resume campaign"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:580",onClick:()=>$.mutate({id:q.id}),className:"cursor-pointer",children:[n.jsx(Ra,{"data-loc":"client/src/pages/client/Campaigns.tsx:584",className:"w-4 h-4 mr-2"}),"Duplicate"]}),n.jsx(jf,{"data-loc":"client/src/pages/client/Campaigns.tsx:587"}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Campaigns.tsx:588",onClick:()=>j(q.id),className:"text-destructive focus:text-destructive cursor-pointer",children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Campaigns.tsx:592",className:"w-4 h-4 mr-2"}),"Delete"]})]})]})})]},q.id)})})]})}),Q>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:608",className:"flex items-center justify-between px-6 py-3 border-t border-border bg-background",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Campaigns.tsx:609",className:"text-xs text-muted-foreground",children:["Page ",d," of ",Q," · ",k?.total??0," campaigns"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Campaigns.tsx:612",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Campaigns.tsx:613",variant:"outline",size:"sm",className:"h-7 text-xs",disabled:d===1,onClick:()=>u(q=>q-1),children:"Previous"}),n.jsx(te,{"data-loc":"client/src/pages/client/Campaigns.tsx:622",variant:"outline",size:"sm",className:"h-7 text-xs",disabled:d===Q,onClick:()=>u(q=>q+1),children:"Next"})]})]})]}),n.jsx(cm,{"data-loc":"client/src/pages/client/Campaigns.tsx:637",open:b!==null,onOpenChange:q=>!q&&j(null),children:n.jsxs(lm,{"data-loc":"client/src/pages/client/Campaigns.tsx:638",children:[n.jsxs(om,{"data-loc":"client/src/pages/client/Campaigns.tsx:639",children:[n.jsx(um,{"data-loc":"client/src/pages/client/Campaigns.tsx:640",children:"Delete campaign?"}),n.jsx(pm,{"data-loc":"client/src/pages/client/Campaigns.tsx:641",children:"This action cannot be undone. The campaign and all its analytics data will be permanently deleted."})]}),n.jsxs(dm,{"data-loc":"client/src/pages/client/Campaigns.tsx:645",children:[n.jsx(mm,{"data-loc":"client/src/pages/client/Campaigns.tsx:646",children:"Cancel"}),n.jsx(fm,{"data-loc":"client/src/pages/client/Campaigns.tsx:647",onClick:()=>b&&T.mutate({id:b}),className:"bg-destructive hover:bg-destructive/90 text-white",children:"Delete"})]})]})}),n.jsx(cm,{"data-loc":"client/src/pages/client/Campaigns.tsx:658",open:S,onOpenChange:O,children:n.jsxs(lm,{"data-loc":"client/src/pages/client/Campaigns.tsx:659",children:[n.jsxs(om,{"data-loc":"client/src/pages/client/Campaigns.tsx:660",children:[n.jsxs(um,{"data-loc":"client/src/pages/client/Campaigns.tsx:661",children:["Delete ",p.size," campaigns?"]}),n.jsx(pm,{"data-loc":"client/src/pages/client/Campaigns.tsx:662",children:"This action cannot be undone. All selected campaigns and their analytics data will be permanently deleted."})]}),n.jsxs(dm,{"data-loc":"client/src/pages/client/Campaigns.tsx:666",children:[n.jsx(mm,{"data-loc":"client/src/pages/client/Campaigns.tsx:667",children:"Cancel"}),n.jsxs(fm,{"data-loc":"client/src/pages/client/Campaigns.tsx:668",onClick:()=>
844{Array.from(p).forEach(q=>T.mutate({id:q})),x(new Set),O(!1)},className:"bg-destructive hover:bg-destructive/90 text-white",children:["Delete ",p.size," campaigns"]})]})]})})]})}const fwe=[{id:"email",icon:n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignNew.tsx:18",className:"w-7 h-7",strokeWidth:1.5}),title:"Email",description:"Create a regular, one-time email that you can send now or schedule for later",buttonLabel:"Create email",available:!0},{id:"email_ab",icon:n.jsx("span",{"data-loc":"client/src/pages/client/CampaignNew.tsx:27",className:"text-xl font-bold tracking-tighter leading-none",style:{fontFamily:"sans-serif"},children:"A|B"}),title:"Email A/B test",description:"Send two different versions of a single email to see which comes out on top",buttonLabel:"Create A/B test",available:!0},{id:"sms",icon:n.jsx(qJ,{"data-loc":"client/src/pages/client/CampaignNew.tsx:38",className:"w-7 h-7",strokeWidth:1.5}),title:"SMS",description:"Send an SMS or MMS campaign to your selected subscribers",buttonLabel:"Create SMS",available:!0},{id:"push_notification",icon:n.jsx(mf,{"data-loc":"client/src/pages/client/CampaignNew.tsx:46",className:"w-7 h-7",strokeWidth:1.5}),title:"Push notification",description:"To turn on Push notifications, you first need to connect a dedicated app",buttonLabel:"Connect app",available:!1}];function mwe(){const[,e]=La(),t=a=>{a.available&&e(`/campaigns/create?type=${a.id}`)};return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:67",className:"fixed inset-0 z-50 bg-white flex flex-col",children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:69",className:"flex items-center justify-end px-6 py-4 border-b border-border",children:n.jsx("button",{"data-loc":"client/src/pages/client/CampaignNew.tsx:70",onClick:()=>e("/campaigns"),className:"p-2 rounded-lg hover:bg-muted transition-colors text-muted-foreground hover:text-foreground","aria-label":"Close",children:n.jsx(Ui,{"data-loc":"client/src/pages/client/CampaignNew.tsx:75",className:"w-5 h-5"})})}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:80",className:"flex-1 overflow-auto",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:81",className:"max-w-4xl mx-auto px-6 py-12",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignNew.tsx:82",className:"text-3xl font-bold text-foreground mb-10",children:"Choose campaign type"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:84",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:fwe.map(a=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:86",className:Se("relative flex flex-col p-6 rounded-xl border bg-white transition-all duration-150",a.available?"border-border hover:border-primary/40 hover:shadow-md cursor-default":"border-border opacity-90"),children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignNew.tsx:96",className:Se("w-14 h-14 rounded-xl flex items-center justify-center mb-5",a.available?"bg-primary/8 text-primary":"bg-muted text-muted-foreground"),style:{background:a.available?"rgba(26, 115, 232, 0.08)":void 0},children:n.jsx("span",{"data-loc":"client/src/pages/client/CampaignNew.tsx:105",className:a.available?"text-primary":"text-muted-foreground",children:a.icon})}),n.jsx("h2",{"data-loc":"client/src/pages/client/CampaignNew.tsx:111",className:Se("text-lg font-semibold mb-2",a.available?"text-primary":"text-foreground"),children:a.title}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignNew.tsx:121",className:"text-sm text-muted-foreground leading-relaxed flex-1 mb-6",children:a.description}),n.jsx(te,{"data-loc":"client/src/pages/client/CampaignNew.tsx:126",variant:"outline",size:"sm",className:Se("w-fit text-sm font-medium border transition-colors",a.available?"border-border hover:border-primary hover:text-primary hover:bg-primary/5":"border-border text-muted-foreground hover:border-border hover:bg-muted/50"),onClick:()=>t(a),children:a.buttonLabel})]},a.id))})]})})]})}const Pp=[{key:"settings",label:"Email settings"},{key:"template",label:"Email template"},{key:"content",label:"Edit content"},{key:"audience",label:"Campaign audience"},{key:"review",label:"Review"}],xwe=["English","Spanish","French","German","Portuguese","Italian","Dutch","Polish"];function gwe({campaignId:e}){const[t,a]=v.useState(!1),[s,r]=v.useState(null),{data:i}=le.deliverability.glock.getSetup.useQuery(),l=i?.configured??!1,d=le.deliverability.glock.runTest.useMutation({onSuccess:x=>{r(x)},onError:x=>{ne.error(x.message??"Failed to run inbox placement test")}});function u(){if(!e){ne.error("Please save your campaign first before running an inbox placement test.");return}r(null),a(!0),d.mutate({campaignId:e})}function p(){a(!1),r(null)}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:69",className:"border border-gray-200 rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:70",className:"flex items-center gap-2 mb-2",children:[n.jsx(Gp,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:71",className:"w-4 h-4 text-gray-600"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:72",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase",children:"Inbox placement test"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:74",className:"text-sm text-gray-500 mb-3 leading-relaxed",children:"Test where your email lands across Gmail, Outlook, Yahoo, and Apple Mail before sending to your list."}),n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:77",onClick:u,disabled:d.isPending,className:"flex items-center gap-2 text-sm font-medium text-[#1a7a6e] border border-gray-300 rounded-lg px-4 py-1.5 hover:bg-gray-50 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[d.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:83",className:"w-3.5 h-3.5 animate-spin"}):n.jsx(Gp,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:85",className:"w-3.5 h-3.5"}),d.isPending?"Sending to seed inboxes…":"Run inbox placement test"]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:91",open:t,onOpenChange:p,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:92",className:"max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:93",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:94",className:"flex items-center gap-2",children:[n.jsx(Gp,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:95",className:"w-4 h-4 text-[#1a7a6e]"}),"Inbox placement test"]})}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:99",className:"space-y-4 py-2",children:l?d.isPending?n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:106",className:"flex flex-col items-center gap-3 py-4 text-center",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:107",className:"w-8 h-8 animate-spin text-[#1a7a6e]"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:108",className:"text-sm text-gray-600 font-medium",children:"Sending to seed inboxes…"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:109",className:"text-xs text-gray-400",children:"This may take a few seconds while we send to ~110 addresses."})]}):s?n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:112",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:113",className:"flex items-center gap-2 text-emerald-700 bg-emerald-50 border border-emerald-200 rounded-lg px-3 py-2",children:[n.jsx(jn,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:114",className:"w-4 h-4 shrink-0"}),n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:115",className:"text-sm font-medium",children:["Sent to ",s.sent," of ",s.totalSeeds," seed inboxes",s.failed>0?` (${s.failed} failed)`:""]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:120",className:"text-sm text-gray-600 leading-relaxed",children:["Results will appear in the"," ",n.jsx("a",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:122",href:"/deliverability",className:"text-[#1a7a6e] underline underline-offset-2 hover:opacity-80",children:"Deliverability"})," ","page within a few minutes as inboxes receive the email."]}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:127",className:"text-xs text-gray-400",children:["Test ID: ",s.testId]})]}):null:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:101",className:"text-sm text-amber-700 bg-amber-50 border border-amber-200 rounded-lg px-3 py-2",children:["GlockApps is not configured. Add your API key in"," ",n.jsx("a",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:103",href:"/settings",className:"underline underline-offset-2 hover:opacity-80",children:"Settings"}),"."]})}),n.jsxs(Di,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:131",children:[n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:132",variant:"outline",onClick:p,size:"sm",children:"Close"}),s&&n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:134",asChild:!0,size:"sm",className:"bg-[#1a7a6e] hover:bg-[#15635a] text-white",children:n.jsx("a",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:135",href:"/deliverability",children:"View results"})})]})]})})]})}
844function KR(){const[,e]=La(),t=Yi(),a=t.id?parseInt(t.id):null,s=V5(),r=new URLSearchParams(s).get("step"),{user:i}=Jc(),[l,d]=v.useState(r??"settings"),[u,p]=v.useState(a),[x,m]=v.useState(null),[h,y]=v.useState("templates"),[w,b]=v.useState(null),[j,S]=v.useState([]),[O,A]=v.useState(!1),[k,E]=v.useState("prop_firm"),[D,_]=v.useState(!1),[T,I]=v.useState(!1),[$,R]=v.useState(!1),[B,Y]=v.useState(10),[z,Q]=v.useState(!1),{data:L}=le.templates.list.useQuery(),[M,U]=v.useState({name:"",subject:"",previewText:"",fromName:"",fromEmail:"",replyTo:"",preheader:"",language:"English",audienceType:"all",audienceIds:[],segmentSendIds:[],excludeSegmentIds:[],excludeListIds:[],bodyHtml:"",scheduledAt:null,sendNow:!0}),{data:Z}=le.lists.list.useQuery(),{data:ie}=le.segments.list.useQuery(),G=v.useRef(!1),{data:F}=le.campaigns.get.useQuery({id:a},{enabled:!!a,staleTime:0,refetchOnWindowFocus:!0});v.useEffect(()=>{if(F&&a&&!G.current){G.current=!0;const X=F.audienceIds??[],Re=F.excludeAudienceIds??[],Ve=F.audienceType??"all",bt=Ve==="segment"&&X.length>0?X:[null],Be=F.excludeAudienceType!=="list"&&Re.length>0?Re:[],ee=F.excludeAudienceType==="list"?Re:[];F.replyTo&&_(!0);const ke=F.scheduledAt?new Date(F.scheduledAt).toISOString().slice(0,16):null;U({name:F.name??"",subject:F.subject??"",previewText:F.previewText??"",fromName:F.fromName??"",fromEmail:F.fromEmail??"",replyTo:F.replyTo??"",preheader:F.previewText??"",language:F.language??"English",audienceType:Ve,audienceIds:X,segmentSendIds:bt,excludeSegmentIds:Be,excludeListIds:ee,bodyHtml:F.bodyHtml??"",scheduledAt:ke,sendNow:!ke});const qe=F.lastStep;qe&&!r&&d(qe)}},[F,a]),v.useEffect(()=>{F&&G.current&&U(X=>({...X,bodyHtml:F.bodyHtml??X.bodyHtml}))},[F?.bodyHtml]);const H=le.campaigns.create.useMutation({onSuccess:X=>{p(X.id)},onError:X=>ne.error(X.message)}),q=le.campaigns.update.useMutation({onError:X=>ne.error(X.message)}),J=le.campaigns.createBatchedSend.useMutation({onSuccess:X=>{ne.success(`Batched send set up! ${X.totalBatches} batches of ~${X.batchSize} contacts each.`),e(u?`/campaigns/${u}/batched-send`:"/campaigns")},onError:X=>ne.error(X.message)}),ce=le.campaigns.sendNow.useMutation({onSuccess:()=>{ne.success("Campaign sent successfully!"),e("/campaigns")},onError:X=>ne.error(X.message)}),[se,ye]=v.useState(""),[de,ve]=v.useState(!1),Pe=v.useMemo(()=>{if(M.audienceType!=="segment")return[];const X=M.segmentSendIds.filter(Boolean);return X.length?X.flatMap(Re=>{const Ve=ie?.find(bt=>bt.id===Re);return Array.isArray(Ve?.conditions)?Ve.conditions:[]}):[]},[M.audienceType,M.segmentSendIds.join(","),ie]),ue=le.segments.previewCount.useQuery({conditions:Pe},{enabled:l==="review"&&M.audienceType==="segment"&&Pe.length>0}),Qe=le.contacts.list.useQuery({status:"subscribed",limit:1},{enabled:l==="review"&&M.audienceType==="all"}),Ue=le.contacts.list.useQuery({status:"subscribed",limit:1},{enabled:l==="audience"&&M.audienceType==="all"}),xe=v.useMemo(()=>{if(M.audienceType!=="segment")return[];const X=M.segmentSendIds.filter(Boolean);return X.length?X.flatMap(Re=>{const Ve=ie?.find(bt=>bt.id===Re);return Array.isArray(Ve?.conditions)?Ve.conditions:[]}):[]},[M.audienceType,M.segmentSendIds.join(","),ie]),$e=le.segments.previewCount.useQuery({conditions:xe},{enabled:l==="audience"&&M.audienceType==="segment"&&xe.length>0}),dt=le.campaigns.getBatches.useQuery({campaignId:u??0},{enabled:!!u&&l==="review"}).data??[],tt=dt.length>0;v.useEffect(()=>{if(tt&&!z){R(!0);const X=dt[0];X?.batchPercent&&Y(X.batchPercent),Q(!0)}l!=="review"&&Q(!1)},[tt,l,z]);const me=le.campaigns.getSendTimeRecommendation.useQuery(void 0,{enabled:l==="review"}),[ut,pt]=v.useState(!1),[ft,_t]=v.useState(null),da=le.campaigns.testSend.useMutation({onSuccess:()=>{ne.success("Test email sent! Check your inbox."),ve(!1)},onError:X=>ne.error(X.message)}),vt=le.llm.generateEmailCopy.useMutation({onSuccess:X=>{const Re=String(X.content??"").split(`
845`).filter(Ve=>Ve.trim().length>0).slice(0,4);S(Re),A(!1)},onError:X=>{ne.error(X.message),A(!1)}}),Xt=()=>{A(!0),S([]),vt.mutate({type:"subject",context:{industry:k,tone:"exciting",additionalContext:M.name||"email campaign"}})},Ct=Pp.findIndex(X=>X.key===l),Zt=X=>({name:M.name||`Campaign ${new Date().toLocaleDateString()}`,subject:M.subject,previewText:M.preheader||M.previewText,fromName:M.fromName,from
845Email:M.fromEmail,replyTo:D?M.replyTo:"",language:M.language,audienceType:M.audienceType,audienceIds:M.audienceIds,excludeAudienceIds:M.excludeListIds.length>0?M.excludeListIds:M.excludeSegmentIds.filter(Boolean),excludeAudienceType:M.excludeListIds.length>0?"list":"segment",lastStep:X?.lastStep??l}),xa=async X=>{if(u)q.mutate({id:u,data:{...Zt({lastStep:X})}},{onSuccess:()=>d(X)});else{if(!M.name||!M.subject){ne.error("Campaign name and subject line are required");return}H.mutate(Zt({lastStep:X}),{onSuccess:Re=>{p(Re.id),d(X)}})}},Sa=()=>{if(!u)return ne.error("Please complete all steps first");ce.mutate({id:u})},Da=()=>{if(!M.name||!M.subject){e("/campaigns");return}const X=Zt();u?q.mutate({id:u,data:X},{onSuccess:()=>e("/campaigns")}):H.mutate(X,{onSuccess:()=>e("/campaigns")})},Va=()=>{if(M.audienceType==="all")return"All subscribed contacts";if(M.audienceType==="list"){const X=Z?.filter(Re=>M.audienceIds.includes(Re.id))??[];return X.length?X.map(Re=>Re.name).join(", "):"No lists selected"}if(M.audienceType==="segment"){const X=ie?.filter(Re=>M.audienceIds.includes(Re.id))??[];return X.length?X.map(Re=>Re.name).join(", "):"No segments selected"}return"—"};return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:472",className:"fixed inset-0 bg-white z-50 flex flex-col",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:474",className:"flex items-center justify-between px-6 py-3 border-b border-gray-200 bg-white",children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:475",className:"flex items-center gap-2 text-sm",children:Pp.map((X,Re)=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:477",className:"flex items-center gap-2",children:[n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:478",onClick:()=>{(Re<Ct||u&&Re<=Ct+1)&&d(X.key)},className:`font-medium transition-colors ${X.key===l?"text-[#0a7cff]":Re<Ct?"text-gray-500 hover:text-gray-700 cursor-pointer":"text-gray-300 cursor-default"}`,children:X.label}),Re<Pp.length-1&&n.jsx(Es,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:493",className:"w-3.5 h-3.5 text-gray-300"})]},X.key))}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:498",onClick:()=>e("/campaigns"),className:"p-1.5 rounded-lg hover:bg-gray-100 text-gray-500 transition-colors",children:n.jsx(Ui,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:502",className:"w-5 h-5"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:507",className:"flex-1 overflow-y-auto",children:[l==="settings"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:511",className:"max-w-5xl mx-auto px-8 py-10",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:512",className:"text-2xl font-semibold text-gray-900 mb-8",children:"Email settings"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:513",className:"grid grid-cols-2 gap-12",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:515",className:"space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:517",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:518",className:"text-sm font-medium text-gray-700",children:"Subject line"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:519",className:"relative",children:[n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:520",value:M.subject,onChange:X=>U({...M,subject:X.target.value}),placeholder:"",className:"pr-20 border-gray-300 focus:border-[#0a7cff] focus:ring-[#0a7cff]"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:526",className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1",children:n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:527",onClick:Xt,disabled:O,className:"p-1 rounded hover:bg-gray-100 transition-colors",title:"AI generate subject lines",children:O?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:534",className:"w-4 h-4 animate-spin text-[#0a7cff]"}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:536",className:"w-6 h-6 rounded bg-gradient-to-br from-violet-500 to-blue-500 flex items-center justify-center",children:n.jsx(qr,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:537",className:"w-3.5 h-3.5 text-white"})})})})]}),j.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:544",className:"mt-2 space-y-1.5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:545",className:"text-xs text-gray-500 font-medium",children:"AI suggestions — click to use:"}),j.map((X,Re)=>n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:547",onClick:()=>{U({...M,subject:X.replace(/^["'\d.\-\s]+/,"").trim()}),S([])},className:"w-full text-left text-sm px-3 py-2 rounded-lg bg-blue-50 hover:bg-blue-100 text-blue-700 border border-blue-200 transition-colors",children:X.replace(/^["'\d.\-\s]+/,"").trim()},Re)),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:555",className:"flex items-center gap-2 pt-1",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:556",value:k,onValueChange:X=>E(X),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:557",className:"h-7 text-xs w-32 border-gray-200",children:n.jsx(ht,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:558"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:560",children:[n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:561",value:"prop_firm",children:"Prop Firm"}),n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:562",value:"crypto",children:"Crypto"})]})]}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:565",onClick:Xt,className:"text-xs text-[#0a7cff] hover:underline",children:"Regenerate"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:572",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:573",className:"text-sm font-medium text-gray-700",children:"Sender's name"}),n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:574",value:M.fromName,onChange:X=>U({...M,fromName:X.target.value}),placeholder:i?.name??"Your company name",className:"border-gray-300 focus:border-[#0a7cff]"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:583",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:584",className:"text-sm font-medium text-gray-700",children:"Sender's email address"}),n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:585",type:"email",value:M.fromEmail,onChange:X=>U({...M,fromEmail:X.target.value}),placeholder:"[email protected]",className:"border-gray-300 focus:border-[#0a7cff]"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:595",className:"flex items-center gap-2",children:[n.jsx(hd,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:596",id:"replyto",checked:D,onCheckedChange:X=>_(!!X)}),n.jsx("label",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:601",htmlFor:"replyto",className:"text-sm text-gray-600 cursor-pointer",children:"Receive replies to a different email address"})]}),D&&n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:606",type:"email",value:M.replyTo,onChange:X=>U({...M,replyTo:X.target.value}),placeholder:"[email protected]",className:"border-gray-300 focus:border-[#0a7cff]"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:616",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:617",className:"text-sm font-medium text-gray-700",children:"Preheader"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:618",className:"relative",children:[n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:619",value:M.preheader,onCh
845ange:X=>U({...M,preheader:X.target.value}),placeholder:"",className:"pr-10 border-gray-300 focus:border-[#0a7cff]"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:625",className:"absolute right-2 top-1/2 -translate-y-1/2",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:626",className:"w-6 h-6 rounded bg-gradient-to-br from-violet-500 to-blue-500 flex items-center justify-center",children:n.jsx(qr,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:627",className:"w-3.5 h-3.5 text-white"})})})]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:631",className:"text-xs text-gray-400",children:"Short text that follows the subject line of your emails"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:635",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:636",className:"text-sm font-medium text-gray-700",children:"Campaign name"}),n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:637",value:M.name,onChange:X=>U({...M,name:X.target.value}),placeholder:"",className:"border-gray-300 focus:border-[#0a7cff]"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:643",className:"text-xs text-gray-400",children:"Optional campaign name for internal use"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:647",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:648",className:"text-sm font-medium text-gray-700",children:"Language"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:649",value:M.language,onValueChange:X=>U({...M,language:X}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:650",className:"border-gray-300",children:n.jsx(ht,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:651"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:653",children:xwe.map(X=>n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:655",value:X,children:X},X))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:663",className:"space-y-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:664",className:"text-sm font-medium text-gray-700",children:"Inbox preview"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:665",className:"border border-gray-200 rounded-xl overflow-hidden bg-white shadow-sm",children:[0,1,2,3,4].map(X=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:668",className:`flex items-center gap-3 px-4 py-3 border-b border-gray-100 ${X===1?"bg-gray-50":""}`,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:672",className:"flex flex-col gap-1 flex-1 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:673",className:"flex items-center gap-2",children:X===1?n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:675",className:"text-xs font-semibold text-gray-900 truncate",children:M.fromName||"Your Company"}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:679",className:"h-2.5 bg-gray-200 rounded w-24"})}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:682",className:"flex items-center gap-2",children:X===1?n.jsxs(n.Fragment,{children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:685",className:"text-xs font-medium text-gray-800 truncate",children:M.subject||"Email subject line"}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:688",className:"text-xs text-gray-400 truncate",children:M.preheader||"Content preheader"})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:694",className:"h-2 bg-gray-200 rounded w-32"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:695",className:"h-2 bg-gray-100 rounded w-20"})]})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:700",className:"h-2 bg-gray-100 rounded w-8 flex-shrink-0"})]},X))}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:704",className:"text-xs text-gray-400",children:"This is how your email will appear in recipients' inboxes"})]})]})]}),l==="template"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:712",className:"px-8 py-10",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:713",className:"text-2xl font-semibold text-gray-900 mb-1",children:"Choose a template"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:714",className:"text-gray-500 text-sm mb-6",children:"Pick a professionally designed template, then replace the image with your own"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:717",className:"flex items-center gap-0 border-b border-gray-200 mb-8",children:["templates","saved"].map(X=>n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:719",onClick:()=>y(X),className:`px-5 py-2.5 text-sm font-medium border-b-2 transition-colors ${h===X?"border-gray-900 text-gray-900":"border-transparent text-gray-500 hover:text-gray-700"}`,children:X==="templates"?"Templates":"Saved templates"},X))}),h==="templates"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:735",className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-
8455",children:[(L??[]).filter(X=>X.isSystem).map(X=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:737",className:`group relative rounded-xl overflow-hidden border-2 transition-all cursor-pointer ${x===String(X.id)?"border-[#0a7cff] shadow-md":"border-gray-200 hover:border-gray-300 hover:shadow-md"}`,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:746",className:"relative bg-gray-50 aspect-[3/4] overflow-hidden",children:[X.thumbnail?n.jsx("img",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:748",src:X.thumbnail,alt:X.name,className:"w-full h-full object-cover object-top"}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:750",className:"w-full h-full flex items-center justify-center",children:n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:751",className:"w-10 h-10 text-gray-300"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:755",className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2 p-3",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:756",onClick:Re=>{Re.stopPropagation(),b({name:X.name,thumbnail:X.thumbnail??"",description:X.subject??""})},className:"w-full py-2 rounded-lg bg-white/20 hover:bg-white/30 text-white text-xs font-medium flex items-center justify-center gap-1.5 transition-colors",children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:763",className:"w-3.5 h-3.5"})," Preview"]}),n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:765",onClick:Re=>{Re.stopPropagation(),m(String(X.id)),U(Ve=>({...Ve,bodyHtml:X.bodyHtml??"",subject:Ve.subject||X.subject||""})),u&&q.mutate({id:u,data:{templateId:X.id,bodyHtml:X.bodyHtml??""}})},className:"w-full py-2 rounded-lg bg-[#0a7cff] hover:bg-[#0066dd] text-white text-xs font-medium flex items-center justify-center gap-1.5 transition-colors",children:[n.jsx(ss,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:777",className:"w-3.5 h-3.5"})," Use template"]})]}),x===String(X.id)&&n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:781",className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-[#0a7cff] flex items-center justify-center",children:n.jsx(ss,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:782",className:"w-3.5 h-3.5 text-white"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:787",className:"p-3 bg-white",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:788",className:"text-sm font-semibold text-gray-900 truncate",children:X.name}),X.subject&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:789",className:"text-xs text-gray-500 truncate mt-0.5",children:X.subject})]})]},X.id)),(L??[]).filter(X=>X.isSystem).length===0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:794",className:"col-span-4 py-16 text-center text-gray-400",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:795",className:"w-10 h-10 mx-auto mb-3"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:796",className:"text-sm",children:"No system templates available yet"})]})]}),h==="saved"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:804",className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-
8455",children:[(L??[]).filter(X=>!X.isSystem).map(X=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:806",className:`group relative rounded-xl overflow-hidden border-2 transition-all cursor-pointer ${x===String(X.id)?"border-[#0a7cff] shadow-md":"border-gray-200 hover:border-gray-300 hover:shadow-md"}`,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:814",className:"relative bg-gray-50 aspect-[3/4] overflow-hidden",children:[X.thumbnail?n.jsx("img",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:816",src:X.thumbnail,alt:X.name,className:"w-full h-full object-cover object-top"}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:818",className:"w-full h-full flex items-center justify-center",children:n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:819",className:"w-10 h-10 text-gray-300"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:822",className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col items-center justify-center gap-2 p-3",children:[X.thumbnail&&n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:824",onClick:Re=>{Re.stopPropagation(),b({name:X.name,thumbnail:X.thumbnail,description:X.subject??""})},className:"w-full py-2 rounded-lg bg-white/20 hover:bg-white/30 text-white text-xs font-medium flex items-center justify-center gap-1.5 transition-colors",children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:831",className:"w-3.5 h-3.5"})," Preview"]}),n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:834",onClick:Re=>{Re.stopPropagation(),m(String(X.id)),U(Ve=>({...Ve,bodyHtml:X.bodyHtml??"",subject:Ve.subject||X.subject||""}))},className:"w-full py-2 rounded-lg bg-[#0a7cff] hover:bg-[#0066dd] text-white text-xs font-medium flex items-center justify-center gap-1.5 transition-colors",children:[n.jsx(ss,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:842",className:"w-3.5 h-3.5"})," Use template"]})]}),x===String(X.id)&&n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:846",className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-[#0a7cff] flex items-center justify-center",children:n.jsx(ss,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:847",className:"w-3.5 h-3.5 text-white"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:851",className:"p-3 bg-white",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:852",className:"text-sm font-semibold text-gray-900 truncate",children:X.name}),X.subject&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:853",className:"text-xs text-gray-500 truncate mt-0.5",children:X.subject})]})]},X.id)),(L??[]).filter(X=>!X.isSystem).length===0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:858",className:"col-span-4 py-16 text-center",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:859",className:"w-10 h-10 mx-auto mb-3 text-gray-300"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:860",className:"text-sm text-gray-500 mb-1",children:"No saved templates yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:861",className:"text-xs text-gray-400",children:"Templates you create in the Email Builder will appear here"})]})]})]}),w&&n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:871",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:()=>b(null),children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:875",className:"relative bg-white rounded-2xl shadow-2xl max-w-lg w-full mx-4 overflow-hidden",onClick:X=>X.stopPropagation(),children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:879",className:"flex items-center justify-between px-5 py-4 border-b border-gray-100",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:880",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:881",className:"font-semibold text-gray-900",children:w.name}),w.description&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:882",className:"text-xs text-gray-500 mt-0.5",children:w.description})]}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:884",onClick:()=>b(null),className:"p-1.5 rounded-lg hover:bg-gray-100 text-gray-400 hover:text-gray-600 transition-colors",children:n.jsx(Ui,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:885",className:"w-4 h-4"})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:888",className:"overflow-y-auto max-h-[70vh]",children:n.jsx("img",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:889",src:w.thumbnail,alt:w.name,className:"w-full"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:891",className:"px-5 py-4 border-t border-gray-100 flex justify-end gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:892",variant:"outline",onClick:()=>b(null),children:"Close"}),n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:893",className:"bg-[#0a7cff] hover:bg-[#0066dd] text-white",onClick:()=>{const X=(L??[]).find(Re=>Re.thumbnail===w.thumbnail);X&&(m(String(X.id)),U(Re=>({...Re,bodyHtml:X.bodyHtml??"",subject:Re.subject||X.subject||""}))),b(null)},children:"Use template"})]})]})}),l==="content"&&(()=>{const X=x?(L??[]).find(Ve=>String(Ve.id)===x):null,Re=M.bodyHtml?M.bodyHtml.match(/<img[^>]+src="([^"]+)"/)?.[1]??null:X?.thumbnail??null;return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:921",className:"max-w-5xl mx-auto px-8 py-10",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:922",className:"text-2xl font-semibold text-gray-900 mb-2",children:"Edit content"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:923",className:"text-gray-500 text-sm mb-8",children:"Upload your JPEG image to replace the template"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:925",className:"flex gap-8 items-start",children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:927",className:"flex-1 min-w-0",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:928",className:"border border-gray-200 rounded-xl overflow-hidden shadow-sm bg-white",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:929",className:"bg-gray-50 border-b border-gray-100 px-4 py-2 flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:930",className:"w-2 h-2 rounded-full bg-red-400"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:931",className:"w-2 h-2 rounded-full bg-yellow-400"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:932",className:"w-2 h-2 rounded-full bg-green-400"}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:933",className:"ml-2 text-xs text-gray-400 truncate",children:M.subject||"Email subject"})]}),Re?n.jsx("img",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:936",src:Re,alt:"Email preview",className:"w-full block"}):n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:938",className:"flex flex-col items-center justify-center py-20 text-gray-300 gap-3",children:[n.jsx(hf,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:939",className:"w-12 h-12"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:940",className:"text-sm font-medium text-gray-400",children:"No image yet"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:943",className:"bg-gray-50 border-t border-gray-100 px-4 py-2 text-center",children:n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:944",className:"text-[10px] text-gray-400",children:"Unsubscribe"})})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:950",className:"w-64 flex-shrink-0 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:951",className:"bg-white border border-gray-200 rounded-xl p-5 space-y-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:952",className:"text-sm font-semibold text-gray-900",children:"Replace image"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:953",className:"text-xs text-gray-500 leading-relaxed",children:"Open the builder to upload your own JPEG. The template image will be replaced."}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:956",onClick:()=>{e(`/builder?campaign=${u??"new"}&returnTo=wizard`)},className:"w-full bg-[#0a7cff] hover:bg-[#0066dd] text-white",children:[n.jsx(qr,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:963",className:"w-4 h-4 mr-2"}),M.bodyHtml?"Edit image":"Open Email Builder"]}),M.bodyHtml&&n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:967",className:"text-xs text-green-600 font-medium flex items-center gap-1",children:[n.jsx(ss,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:968",className:"w-3.5 h-3.5"})," Image saved"]})]}),X&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:974",className:"bg-blue-50 border border-blue-100 rounded-xl p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:975",className:"text-xs font-semibold text-blue-700 mb-1",children:"Template selected"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:976",className:"text-xs text-blue-600",children:X.name})]})]})]})]})})(),l==="audience"&&(()=>
845{const X=M.segmentSendIds.filter(Boolean).map(Ve=>ie?.find(bt=>bt.id===Ve)).filter(Boolean),Re=M.audienceType==="all"?Ue.data?.total??0:$e.data?.count??X.reduce((Ve,bt)=>Ve+(bt.contactCount??0),0);return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:996",className:"max-w-4xl mx-auto px-8 py-10",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:997",className:"text-2xl font-semibold text-gray-900 mb-8",children:"Choose email recipients"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:999",className:"flex gap-16",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1001",className:"flex items-start gap-3 pt-1",children:[n.jsx("input",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1002",type:"radio",name:"audienceType",id:"aud-all",checked:M.audienceType==="all",onChange:()=>U({...M,audienceType:"all",audienceIds:[],segmentSendIds:[],excludeSegmentIds:[]}),className:"mt-0.5 w-4 h-4 accent-[#1a7a6e] cursor-pointer"}),n.jsx("label",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1010",htmlFor:"aud-all",className:"text-sm font-medium text-gray-900 cursor-pointer",children:"All subscribers"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1014",className:"flex-1",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1015",className:"flex items-start gap-3 mb-4",children:[n.jsx("input",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1016",type:"radio",name:"audienceType",id:"aud-segment",checked:M.audienceType==="segment",onChange:()=>U({...M,audienceType:"segment",audienceIds:[],segmentSendIds:[null],excludeSegmentIds:[]}),className:"mt-0.5 w-4 h-4 accent-[#1a7a6e] cursor-pointer"}),n.jsxs("label",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1024",htmlFor:"aud-segment",className:"text-sm font-medium text-gray-900 cursor-pointer flex items-center gap-2",children:["Let me choose segments",n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1026",className:"text-xs font-medium bg-gray-800 text-white px-2 py-0.5 rounded-full",children:"Recommended to avoid spam"})]})]}),M.audienceType==="segment"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1031",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1033",className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1034",className:"text-sm font-semibold text-gray-900 mb-1",children:"Warm up your newly verified domain"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1035",className:"text-sm text-gray-600 leading-relaxed",children:"Send to a smaller, engaged segment to build trust with inbox providers. Start with your most engaged contacts, then gradually increase your audience over time."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1042",className:"space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1043",className:"text-sm font-medium text-gray-700",children:"Send to"}),M.segmentSendIds.map((Ve,bt)=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1045",className:"flex items-center gap-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1046",value:Ve?String(Ve):"",onValueChange:Be=>{const ee=[...M.segmentSendIds];ee[bt]=Be?parseInt(Be):null,U({...M,segmentSendIds:ee,audienceIds:ee.filter(Boolean)})},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1054",className:"flex-1 h-10 border-gray-300 bg-white text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1055",placeholder:"Select a segment..."})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1057",children:[ie?.map(Be=>n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1059",value:String(Be.id),children:Be.name},Be.id)),(!ie||ie.length===0)&&n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1062",className:"px-3 py-2 text-xs text-gray-400",children:"No segments yet"})]})]}),M.segmentSendIds.length>1&&n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1067",onClick:()=>{const Be=M.segmentSendIds.filter((ee,ke)=>ke!==bt);U({...M,segmentSendIds:Be,audienceIds:Be.filter(Boolean)})},className:"p-2 text-gray-400 hover:text-red-500 transition-colors",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1074",className:"w-4 h-4"})})]},bt)),n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1080",onClick:()=>U({...M,segmentSendIds:[...M.segmentSendIds,null]}),className:"flex items-center gap-2 text-sm font-medium text-gray-700 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 transition-colors mt-1",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1084",className:"w-4 h-4"})," Add another segment"]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1089",className:"pt-2",children:M.excludeSegmentIds.length===0?n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1091",onClick:()=>U({...M,excludeSegmentIds:[null]}),className:"flex items-center gap-2 text-sm font-medium text-gray-700 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 transition-colors",children:"Exclude segment"}):n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1098",className:"space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1099",className:"text-sm font-medium text-gray-700",children:"Exclude"}),M.excludeSegmentIds.map((Ve,bt)=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1101",className:"flex items-center gap-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1102",value:Ve?String(Ve):"",onValueChange:Be=>{const ee=[...M.excludeSegmentIds];ee[bt]=Be?parseInt(Be):null,U({...M,excludeSegmentIds:ee})},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1110",className:"flex-1 h-10 border-gray-300 bg-white text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1111",placeholder:"Select a segment to exclude..."})}),n.jsx(gt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1113",children:ie?.map(Be=>n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1115",value:String(Be.id),children:Be.name},Be.id))})]}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1119",onClick:()=>{const Be=M.excludeSegmentIds.filter((ee,ke)=>ke!==bt);U({...M,excludeSegmentIds:Be})},className:"p-2 text-gray-400 hover:text-red-500 transition-colors",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1126",className:"w-4 h-4"})})]},bt))]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1135",className:"pt-4 border-t border-gray-200",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1136",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase mb-3",children:"Subscribers in selected segment"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1137",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1138",className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1139",className:"text-sm text-gray-700",children:["Email subscribers: ",n.jsx("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1139",children:Re.toLocaleStr
845ing()})]})]})]})]}),M.audienceType==="all"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1146",className:"pt-4 border-t border-gray-200 mt-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1147",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1148",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase mb-3",children:"All subscribers"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1149",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1150",className:"w-2 h-2 rounded-full bg-green-500 flex-shrink-0"}),n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1151",className:"text-sm text-gray-700",children:["Email subscribers: ",n.jsx("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1151",children:Re.toLocaleString()})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1155",className:"pt-2",children:[M.excludeListIds.length===0?n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1157",onClick:()=>U({...M,excludeListIds:[]}),className:"flex items-center gap-2 text-sm font-medium text-gray-700 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 transition-colors",type:"button",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1162",className:"w-4 h-4"})," Exclude a list"]}):null,M.excludeListIds.length===0&&null,n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1170",className:"space-y-2",children:[M.excludeListIds.length>0&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1172",className:"text-sm font-medium text-gray-700",children:"Exclude contacts in"}),M.excludeListIds.map((Ve,bt)=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1175",className:"flex items-center gap-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1176",value:Ve?String(Ve):"",onValueChange:Be=>{const ee=[...M.excludeListIds];ee[bt]=parseInt(Be),U({...M,excludeListIds:ee})},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1184",className:"flex-1 h-10 border-gray-300 bg-white text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1185",placeholder:"Select a list to exclude..."})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1187",children:[Z?.map(Be=>n.jsx(he,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1189",value:String(Be.id),children:Be.name},Be.id)),(!Z||Z.length===0)&&n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1192",className:"px-3 py-2 text-xs text-gray-400",children:"No lists yet"})]})]}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1196",type:"button",onClick:()=>{const Be=M.excludeListIds.filter((ee,ke)=>ke!==bt);U({...M,excludeListIds:Be})},className:"p-2 text-gray-400 hover:text-red-500 transition-colors",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1204",className:"w-4 h-4"})})]},bt)),M.excludeListIds.length>0&&n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1209",type:"button",onClick:()=>U({...M,excludeListIds:[...M.excludeListIds,0]}),className:"flex items-center gap-2 text-sm font-medium text-gray-700 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 transition-colors mt-1",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1214",className:"w-4 h-4"})," Add another list to exclude"]}),M.excludeListIds.length===0&&n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1218",type:"button",onClick:()=>U({...M,excludeListIds:[0]}),className:"flex items-center gap-2 text-sm font-medium text-gray-700 border border-gray-300 rounded-lg px-4 py-2 hover:bg-gray-50 transition-colors",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1223",className:"w-4 h-4"})," Exclude a list"]})]})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1234",className:"mt-8 border-t border-gray-200 pt-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1235",className:"flex items-center justify-between mb-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1236",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1237",className:"text-sm font-semibold text-gray-900",children:"Batched Send (List Warmup)"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1238",className:"text-sm text-gray-500 mt-0.5",children:"Split your list into equal batches and send each one manually at your own pace."})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1240",checked:$,onCheckedChange:R})]}),$&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1244",className:"mt-4 bg-gray-50 border border-gray-200 rounded-xl p-5 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1245",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1246",className:"text-sm font-medium text-gray-700 mb-2",children:"Batch size"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1247",className:"flex flex-wrap gap-2",children:[5,10,20,25,50].map(Ve=>n.jsxs("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1249",onClick:()=>Y(Ve),className:`px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${B===Ve?"bg-[#1a7a6e] text-white border-[#1a7a6e]":"bg-white text-gray-700 border-gray-300 hover:border-[#1a7a6e]"}`,children:[Ve,"%"]},Ve))})]}),Re>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1264",className:"bg-white border border-gray-200 rounded-lg p-4",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1265",className:"text-sm text-gray-600",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1266",children:Math.ceil(100/B)})," batches  · ",n.jsxs("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1267",children:["~",Math.ceil(Re*B/100).toLocaleStr
845ing()]})," contacts each  ·  ",n.jsx("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1268",children:Re.toLocaleString()})," total"]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1270",className:"text-xs text-gray-400 mt-1",children:"You'll manually trigger each batch from the Batched Send page."})]})]})]})]})})(),l==="review"&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1282",className:"max-w-2xl mx-auto px-8 py-10",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1283",className:"text-2xl font-semibold text-gray-900 mb-8",children:"Review and confirm"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1285",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1287",className:"border border-gray-200 rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1288",className:"flex items-center gap-2 mb-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1289",className:"text-base font-semibold text-gray-900",children:"Campaign booster"}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1290",className:"text-lg",children:"🚀"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1292",className:"text-sm text-gray-500 mb-4 leading-relaxed",children:"Automatically re-send your campaign to subscribers who missed it initially. Enhance your reach and elevate open rates by targeting unengaged recipients, either through Email or SMS."}),n.jsx(Ti,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1296",checked:T,onCheckedChange:I})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1303",className:"border border-gray-200 rounded-xl p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1304",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase mb-3",children:"Settings"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1305",className:"text-sm font-semibold text-gray-900",children:M.subject||"—"}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1306",className:"text-sm text-gray-500 mt-0.5",children:[M.fromName||"Sender"," <",M.fromEmail||"[email protected]",">"]}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1309",onClick:()=>d("settings"),className:"mt-3 text-sm font-medium text-[#1a7a6e] border border-gray-300 rounded-lg px-4 py-1.5 hover:bg-gray-50 transition-colors",children:"Edit settings"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1318",className:"border border-gray-200 rounded-xl p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1319",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase mb-3",children:"Recipients"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1320",className:"text-sm font-semibold text-gray-900",children:Va()}),(()=>{const X=ue.isLoading||Qe.isLoading;let Re=null;return M.audienceType==="all"?Re=Qe.data?.total??null:M.audienceType==="segment"?Re=ue.data?.count??null:Re=M.segmentSendIds.filter(Boolean).map(Ve=>ie?.find(bt=>bt.id===Ve)?.contactCount??0).reduce((Ve,bt)=>Ve+bt,0),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1336",className:"mt-2 flex items-center gap-2",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1337",className:"w-4 h-4 text-[#1a7a6e]"}),n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1338",className:"text-sm text-gray-700",children:["Sending to"," ",n.jsx("strong",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1340",className:"text-gray-900",children:X?"...":Re!==null?`${Re.toLocaleString()} contact${Re!==1?"s":""}`:"—"})]})]})})(),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1347",onClick:()=>d("audience"),className:"mt-3 text-sm font-medium text-[#1a7a6e] border border-gray-300 rounded-lg px-4 py-1.5 hover:bg-gray-50 transition-colors",children:"Edit recipients"})]}),(()=>{const X=["free","urgent","act now","limited time","click here","buy now","100%","guaranteed","winner","prize","congratulations","cash","earn money","make money","no cost","risk free","special promotion","this is not spam"],Re=M.subject??"",Ve=M.previewText??M.preheader??"",bt=Re.toLowerCase(),Be=[{key:"subject",label:"Subject line present",pass:Re.trim().length>0,severity:"error",fix:"Add a subject line in Email Settings."},{key:"subjectLen",label:`Subject line length (${Re.length} chars)`,pass:Re.length<=60,severity:"warning",fix:"Keep subject lines under 60 characters for best mobile display."},{key:"preheader",label:"Preview text present",pass:Ve.trim().length>0,severity:"warning",fix:"Add preview text in Email Settings — it appears next to the subject in most inboxes."},{key:"from",label:"From email set",pass:!!M.fromEmail,severity:"error",fix:"Set a From email address in Email Settings."},{key:"body",label:"Email body has content",pass:(M.bodyHtml??"").trim().length>50,severity:"error",fix:"Add content to your email in the Edit Content step."},{key:"spam",label:"No spam trigger words in subject",pass:!X.some(Ye=>bt.includes(Ye)),severity:"warning",fix:`Avoid words like: ${X.filter(Ye=>bt.includes(Ye)).join(", ")}`},{key:"exclaim",label:"No excessive punctuation in subject",pass:(Re.match(/[!?]{2,}/g)??[]).length===0,severity:"warning",fix:"Multiple !! or ?? in subject lines trigger spam filters."},{key:"allcaps",label:"Subject not all-caps",pass:Re===Re.toLowerCase()||Re!==Re.toUpperCase(),severity:"warning",fix:"ALL CAPS subject lines look like spam."}],ee=Be.filter(Ye=>!Ye.pass&&Ye.severity==="error"),ke=Be.filter(Ye=>!Ye.pass&&Ye.severity==="warning"),qe=ee.length===0&&ke.length===0;return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1375",className:"border border-gray-200 rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1376",className:"flex items-center gap-2 mb-3",children:[n.jsx(js,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1377",className:"w-4 h-4 text-gray-600"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1378",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase",children:"Content check"}),qe&&n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1379",className:"ml-auto text-xs font-medium text-emerald-600 bg-emerald-50 border border-emerald-200 rounded-full px-2 py-0.5",children:"All clear"}),!qe&&ee.length>0&&n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1380",className:"ml-auto text-xs font-medium text-red-600 bg-red-50 border border-red-200 rounded-full px-2 py-0.5",children:[ee.length," issue",ee.length>
8451?"s":""," to fix"]}),!qe&&ee.length===0&&n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1381",className:"ml-auto text-xs font-medium text-amber-600 bg-amber-50 border border-amber-200 rounded-full px-2 py-0.5",children:[ke.length," warning",ke.length>1?"s":""]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1383",className:"space-y-2",children:Be.map(Ye=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1385",className:`flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${Ye.pass?"":Ye.severity==="error"?"bg-red-50 border border-red-100":"bg-amber-50 border border-amber-100"}`,children:[Ye.pass?n.jsx(jn,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1389",className:"w-3.5 h-3.5 text-emerald-500 shrink-0 mt-0.5"}):Ye.severity==="error"?n.jsx(gf,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1391",className:"w-3.5 h-3.5 text-red-500 shrink-0 mt-0.5"}):n.jsx(Ia,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1392",className:"w-3.5 h-3.5 text-amber-500 shrink-0 mt-0.5"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1393",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1394",className:`font-medium ${Ye.pass?"text-gray-600":Ye.severity==="error"?"text-red-700":"text-amber-700"}`,children:Ye.label}),!Ye.pass&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1395",className:"text-xs text-gray-500 mt-0.5",children:Ye.fix})]})]},Ye.key))})]})})(),l==="review"&&(()=>{const X=me.data,Re=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ve=bt=>{const Be=bt>=12?"PM":"AM";return`${bt%12===0?12:bt%12}:00 ${Be}`};return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1414",className:"border border-gray-200 rounded-xl p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1415",className:"flex items-center gap-2 mb-3",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1416",className:"w-4 h-4 text-[#1a7a6e]"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1417",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase",children:"Send-time optimization"})]}),me.isLoading?n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1420",className:"flex items-center gap-2 text-sm text-gray-400",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1421",className:"w-4 h-4 animate-spin"}),"Analyzing open patterns..."]}):X?.hasData?n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1429",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1430",className:"flex items-center gap-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1431",className:"bg-emerald-50 border border-emerald-200 rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1432",className:"text-xs text-emerald-600 font-medium",children:"Best time"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1433",className:"text-base font-bold text-emerald-700",children:Ve(X.bestHour)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1435",className:"bg-emerald-50 border border-emerald-200 rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1436",className:"text-xs text-emerald-600 font-medium",children:"Best day"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1437",className:"text-base font-bold text-emerald-700",children:Re[X.bestDay]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1439",className:"text-xs text-gray-400",children:["Based on ",X.totalOpens?.toLocaleString()," opens"]})]}),!M.sendNow&&n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1442",onClick:()=>{const bt=new Date,Be=X.bestDay,ee=X.bestHour,ke=(Be-bt.getDay()+7)%7||7,qe=new Date(bt);qe.setDate(bt.getDate()+ke),qe.setHours(ee,0,0,0);const Ye=Ge=>String(Ge).padStart(2,"0"),at=`${qe.getFullYear()}-${Ye(qe.getMonth()+1)}-${Ye(qe.getDate())}T${Ye(qe.getHours())}:00`;U(Ge=>({...Ge,scheduledAt:at}))},className:"text-sm font-medium text-[#1a7a6e] border border-gray-300 rounded-lg px-4 py-1.5 hover:bg-gray-50 transition-colors",children:"Apply recommended time"})]}):n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1425",className:"text-sm text-gray-500",children:"Not enough data yet — send a few campaigns first to unlock personalized send-time recommendations."})]})})(),n.jsx(gwe,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1467",campaignId:u}),$&&(()=>{const X=M.audienceType==="all"?Qe.data?.total??0:M.audienceType==="segment"?ue.data?.count??0:M.segmentSendIds.filter(
845Boolean).map(ee=>ie?.find(ke=>ke.id===ee)?.contactCount??0).reduce((ee,ke)=>ee+ke,0),Re=tt?dt.length:Math.ceil(100/B),Ve=tt?dt[0]?.batchPercent??B:B,bt=tt?dt[0]?.recipientCount??null:X>0?Math.ceil(X*B/100):null,Be=tt?dt.filter(ee=>ee.status==="sent").length:0;return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1488",className:"border-2 border-[#1a7a6e] rounded-xl p-5 bg-[#f0faf9]",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1489",className:"flex items-center justify-between mb-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1490",className:"flex items-center gap-2",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1491",className:"w-4 h-4 text-[#1a7a6e]"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1492",className:"text-xs font-semibold tracking-widest text-[#1a7a6e] uppercase",children:tt?"Batched send active":"Batched send configured"})]}),tt&&n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1497",onClick:()=>u&&e(`/campaigns/${u}/batched-send`),className:"text-sm font-semibold text-white bg-[#1a7a6e] hover:bg-[#156058] rounded-lg px-4 py-1.5 transition-colors",children:"Manage Batches →"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1505",className:"flex flex-wrap gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1506",className:"bg-white border border-[#c5e8e4] rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1507",className:"text-xs text-[#1a7a6e] font-medium",children:"Total Batches"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1508",className:"text-xl font-bold text-gray-900",children:Re})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1510",className:"bg-white border border-[#c5e8e4] rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1511",className:"text-xs text-[#1a7a6e] font-medium",children:"Batch size"}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1512",className:"text-xl font-bold text-gray-900",children:[Ve,"%"]})]}),bt!==null&&bt>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1515",className:"bg-white border border-[#c5e8e4] rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1516",className:"text-xs text-[#1a7a6e] font-medium",children:"Contacts / batch"}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1517",className:"text-xl font-bold text-gray-900",children:["~",bt.toLocaleString()]})]}),tt&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1521",className:"bg-white border border-[#c5e8e4] rounded-lg px-4 py-2.5 text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1522",className:"text-xs text-[#1a7a6e] font-medium",children:"Sent"}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1523",className:"text-xl font-bold text-gray-900",children:[Be," / ",Re]})]})]}),!tt&&n.jsxs(n.Fragment,{children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1529",className:"text-xs text-gray-500 mt-3",children:`After clicking "Set up batched send", you'll manually trigger each batch from the Batched Send page.`}),n.jsx("button",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1532",onClick:()=>d("audience"),className:"mt-3 text-sm font-medium text-[#1a7a6e] border border-gray-300 rounded-lg px-4 py-1.5 hover:bg-gray-50 transition-colors",children:"Edit batch settings"})]}),tt&&Be<Re&&n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1541",className:"text-xs text-gray-500 mt-3",children:[Re-Be," batch",Re-Be!==1?"es":"",' remaining. Click "Manage Batches" to send them.']}),tt&&Be===Re&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1546",className:"text-xs text-emerald-600 font-medium mt
845-3",children:"✓ All batches sent!"})]})})(),!$&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1554",className:"border border-gray-200 rounded-xl p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1555",className:"text-xs font-semibold tracking-widest text-gray-500 uppercase mb-4",children:"Send"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1556",className:"flex flex-col gap-3",children:[n.jsxs("label",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1557",className:"flex items-center gap-3 cursor-pointer",children:[n.jsx("input",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1558",type:"radio",name:"sendOption",checked:M.sendNow,onChange:()=>U({...M,sendNow:!0,scheduledAt:null}),className:"w-4 h-4 accent-[#1a7a6e]"}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1565",className:"text-sm font-medium text-gray-900",children:"Send now"})]}),n.jsxs("label",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1567",className:"flex items-center gap-3 cursor-pointer",children:[n.jsx("input",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1568",type:"radio",name:"sendOption",checked:!M.sendNow,onChange:()=>U({...M,sendNow:!1}),className:"w-4 h-4 accent-[#1a7a6e]"}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1575",className:"text-sm font-medium text-gray-900",children:"Schedule for later"})]}),!M.sendNow&&n.jsx("input",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1578",type:"datetime-local",value:M.scheduledAt??"",onChange:X=>U({...M,scheduledAt:X.target.value}),className:"ml-7 mt-1 text-sm border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:border-[#1a7a6e] w-fit"})]})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1594",className:"flex items-center justify-between px-8 py-4 border-t border-gray-200 bg-white",children:[n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1595",variant:"ghost",onClick:Da,className:"text-gray-600 hover:text-gray-900",children:"Save & close"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1603",className:"flex items-center gap-3",children:[Ct>0&&n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1605",variant:"outline",onClick:()=>d(Pp[Ct-1].key),className:"border-gray-300 text-gray-700",children:"Back"}),l==="review"&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1615",variant:"outline",onClick:()=>ve(!0),className:"border-gray-300 text-gray-700 hover:bg-gray-50",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1620",className:"w-4 h-4 mr-1.5"}),"Send test email"]}),l!=="review"?n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1626",onClick:()=>{l==="settings"?xa("template"):l==="template"?e(`/builder?campaign=${u??"new"}&returnTo=wizard`):l==="content"?d("audience"):l==="audience"?xa("review"):d(Pp[Ct+1].key)},disabled:H.isPending||q.isPending,className:"bg-[#1a7a6e] hover:bg-[#156058] text-white px-6",children:H.isPending||q.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1647",className:"w-4 h-4 animate-spin"}):l==="settings"?"Choose email template":l==="template"?"Edit content":l==="content"?"Choose audience":"Review campaign"}):n.jsx(n.Fragment,{children:$&&tt?n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1662",onClick:()=>u&&e(`/campaigns/${u}/batched-send`),className:"bg-[#1a7a6e] hover:bg-[#156058] text-white px-8",children:"Manage Batches →"}):n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1669",onClick:()=>{if($){if(!u)return ne.error("Save the campaign first");J.mutate({campaignId:u,batchPercent:B,subject:M.subject,previewText:M.previewText??"",bodyHtml:M.bodyHtml})}else Sa()},disabled:$?J.isPending:ce.isPending,className:"bg-[#1a7a6e] hover:bg-[#156058] text-white px-8",children:[($?J.isPending:ce.isPending)?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1688",className:"w-4 h-4 animate-spin mr-2"}):null,$?"Set up batched send":M.sendNow?"Send now":"Schedule campaign"]})})]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1699",open:de,onOpenChange:ve,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1700",className:"max-w-sm",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1701",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1702",children:"Send test email"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1704",className:"space-y-3 py-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1705",className:"text-sm text-gray-500",children:`We'll send a copy of this campaign with "[TEST]" in the subject line.`}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1706",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1707",children:"Recipient email"}),n.jsx(De,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1708",type:"email",placeholder:"[email protected]",value:se,onChange:X=>ye(X.target.value),onKeyDown:X=>{X.key==="Enter"&&se&&u&&da.mutate({id:u,toEmail:se})}})]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1721",children:[n.jsx(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1722",variant:"outline",onClick:()=>ve(!1),children:"Cancel"}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1723",onClick:()=>
845{if(!u)return ne.error("Save the campaign first");if(!se)return ne.error("Enter a recipient email");da.mutate({id:u,toEmail:se})},disabled:da.isPending,className:"bg-[#1a7a6e] hover:bg-[#156058] text-white",children:[da.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignCreate.tsx:1732",className:"w-4 h-4 animate-spin mr-2"}):null,"Send test"]})]})]})})]})}function hwe(){const e=Yi(),t=parseInt(e.id??"0"),[,a]=La(),[s,r]=v.useState(!1),[i,l]=v.useState("desktop"),[d,u]=v.useState(!1),[p,x]=v.useState(""),{data:m,isLoading:h,refetch:y}=le.campaigns.get.useQuery({id:t}),{data:w}=le.revenue.summary.useQuery(void 0,{enabled:!!t}),b=le.campaigns.sendNow.useMutation({onSuccess:()=>{ne.success("Campaign queued for sending!"),y()},onError:_=>ne.error(_.message)}),j=le.campaigns.create.useMutation({onSuccess:()=>{ne.success("Campaign duplicated! Find it in your campaigns list."),a("/campaigns")},onError:_=>ne.error(_.message)}),S=()=>{m&&j.mutate({name:`${m.name} (Copy)`,subject:m.subject,previewText:m.previewText??void 0,fromName:m.fromName??void 0,fromEmail:m.fromEmail??void 0,audienceType:m.audienceType??"all",audienceIds:m.audienceIds,bodyHtml:m.bodyHtml??void 0})},O=()=>{if(!p){ne.error("Please enter an email address");return}ne.success(`Test email sent to ${p}`),u(!1),x("")};if(h)return n.jsx(Pt,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:63",title:"Campaign",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:63",className:"p-6",children:n.jsx(Me,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:63",className:"h-48 w-full"})})});if(!m)return n.jsx(Pt,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:64",title:"Not Found",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:64",className:"p-6 text-center text-muted-foreground",children:"Campaign not found."})});const A=m.totalSent&&m.totalSent>0?((m.totalUniqueOpens??0)/m.totalSent*100).toFixed(1):null,k=m.totalSent&&m.totalSent>0?((m.totalUniqueClicks??0)/m.totalSent*100).toFixed(1):null,E=m.totalSent&&m.totalSent>0?((m.totalBounces??0)/m.totalSent*100).toFixed(2):null,D=_=>_==="sent"?"badge-sent":_==="draft"?"badge-draft":_==="scheduled"?"badge-paused":_==="sending"?"badge-active":"badge-failed";return n.jsxs(Pt,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:82",title:m.name,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:83",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:84",className:"flex items-center gap-3 flex-wrap",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:85",variant:"ghost",size:"sm",onClick:()=>a("/campaigns"),children:[n.jsx(rs,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:86",className:"w-4 h-4 mr-2"}),"Back"]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:88",className:"flex-1"}),m.bodyHtml&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:91",variant:"outline",size:"sm",onClick:()=>r(!0),children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:92",className:"w-4 h-4 mr-2"}),"Preview"]}),m.status==="draft"&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:97",variant:"outline",size:"sm",onClick:()=>a(`/campaigns/${t}/edit`),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:98",className:"w-4 h-4 mr-2"}),"Edit"]}),m.status==="draft"&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:103",variant:"outline",size:"sm",onClick:()=>a(`/campaigns/${t}/batched-send`),children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:104",className:"w-4 h-4 mr-2"}),"Batched Send"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:108",variant:"outline",size:"sm",onClick:S,disabled:j.isPending,children:[j.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:109",className:"w-4 h-4 animate-spin mr-2"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:109",className:"w-4 h-4 mr-2"}),"Duplicate"]}),m.status==="draft"&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:114",variant:"outline",size:"sm",onClick:()=>u(!0),children:[n.jsx(Dk,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:115",className:"w-4 h-4 mr-2"}),"Test Send"]}),m.status==="draft"&&n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:120",size:"sm",onClick:()=>b.mutate({id:t}),disabled:b.isPending,children:[b.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:121",className:"w-4 h-4 animate-spin mr-2"}):n.jsx(Lc,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:121",className:"w-4 h-4 mr-2"}),"Send Now"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:127",className:"flex items-start justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:128",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:129",className:"text-2xl font-bold text-foreground",children:m.name}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:130",className:"text-muted-foreground text-sm mt-1",children:m.subject})]}),n.jsx(Le,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:132",className:D(m.status),variant:"outline",children:m.status})]}),m.status==="sent"&&(()=>{const _=w?.byCampaign?.find(R=>R.campaignId===t),T=_?.revenue??0,I=_?.orders??0,$=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0}).format(T/100);return n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:142",className:"grid grid-cols-2 lg:grid-cols-6 gap-4",children:[{label:"Total Sent",value:m.totalSent?.toLocaleStr
845ing()??"0",icon:Lc,color:"text-primary"},{label:"Open Rate",value:A?`${A}%`:"—",icon:_n,color:"text-emerald-400"},{label:"Click Rate",value:k?`${k}%`:"—",icon:Yp,color:"text-violet-400"},{label:"Bounce Rate",value:E?`${E}%`:"—",icon:Ia,color:parseFloat(E??"0")>2?"text-red-400":"text-muted-foreground"},{label:"Revenue",value:T>0?$:"—",icon:Ii,color:"text-emerald-500"},{label:"Orders",value:I>0?I.toLocaleString():"—",icon:zi,color:"text-blue-400"}].map(({label:R,value:B,icon:Y,color:z})=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:151",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:152",className:"flex items-center justify-between mb-3",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:153",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:R}),n.jsx(Y,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:154",className:`w-4 h-4 ${z}`})]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:156",className:`text-2xl font-bold ${z}`,children:B})]},R))})})(),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:163",className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:164",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:165",children:n.jsx(St,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:165",className:"text-sm",children:"Campaign Details"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:166",className:"space-y-3",children:[{label:"From",value:m.fromName?`${m.fromName} <${m.fromEmail}>`:m.fromEmail},{label:"Audience",value:m.audienceType?`${m.audienceType}`:"All contacts"},{label:"Created",value:new Date(m.createdAt).toLocaleString()},{label:"Sent At",value:m.sentAt?new Date(m.sentAt).toLocaleString():"—"},{label:"Scheduled At",value:m.scheduledAt?new Date(m.scheduledAt).toLocaleString():"—"}].map(({label:_,value:T})=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:174",className:"flex items-center justify-between py-1.5 border-b border-border last:border-0",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:175",className:"text-xs text-muted-foreground",children:_}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:176",className:"text-sm text-foreground font-medium",children:T??"—"})]},_))})]}),m.status==="sent"&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:183",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:184",children:n.jsx(St,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:184",className:"text-sm",children:"Detailed Metrics"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:185",className:"space-y-3",children:[{label:"Total Opens",value:m.totalOpens?.toLocaleString()},{label:"Unique Opens",value:m.totalUniqueOpens?.toLocaleString()},{label:"Total Clicks",value:m.totalClicks?.toLocaleString()},{label:"Unique Clicks",value:m.totalUniqueClicks?.toLocaleString()},{label:"Unsubscribes",value:m.totalUnsubscribes?.toLocaleString()},{label:"Bounces",value:m.totalBounces?.toLocaleString()},{label:"Complaints",value:m.totalComplaints?.toLocaleString()}].map(({label:_,value:T})=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:195",className:"flex items-center justify-between py-1.5 border-b border-border last:border-0",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:196",className:"text-xs text-muted-foreground",children:_}),n.jsx("span",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:197",className:"text-sm text-foreground font-medium",children:T??"0"})]},_))})]})]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:207",open:s,onOpenChange:r,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:208",className:"bg-card border-border max-w-4xl max-h-[90vh] flex flex-col",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:209",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:210",className:"flex items-center gap-3",children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:211",className:"w-4 h-4 text-primary"}),"Email Preview — ",m.subject]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:215",className:"flex items-center gap-2 pb-2",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:216",variant:i==="desktop"?"default":"outline",size:"sm",onClick:()=>l("desktop"),children:[n.jsx(XI,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:221",className:"w-4 h-4 mr-2"}),"Desktop"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:223",variant:i==="mobile"?"default":"outline",size:"sm",onClick:()=>l("mobile"),children:[n.jsx(KJ,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:228",className:"w-4 h-4 mr-2"}),"Mobile"]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:231",className:"flex-1 overflow-auto bg-white rounded-lg flex items-start justify-center p-4",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:232",style:{width:i==="mobile"?"375px":"100%",maxWidth:"600px"},className:"transition-all duration-300",children:m.bodyHtml?n.jsx("iframe",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:237",srcDoc:m.bodyHtml,className:"w-full border-0 rounded",style:{minHeight:"600px"},title:"Email Preview",sandbox:"allow-same-origin"}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:245",className:"text-center text-muted-foreground p-8",children:"No HTML content to preview"})})})]})}),n.jsx(qa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:253",open:d,onOpenChange:u,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:254",className:"bg-card border-border max-w-sm",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:255",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:256",className:"flex items-center gap-2",children:[n.jsx(Dk,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:257",className:"w-4 h-4 text-primary"}),"Send Test Email"]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:261",className:"space-y-4 pt-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:262",className:"text-sm text-muted-foreground",children:"Send a test version of this campaign to verify how it looks in an inbox before sending to your full audience."}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignDetail.tsx:265",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:266",children:"Test Email Address"}),n.jsx(De,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:267",type:"email",placeholder:"[email protected]",value:p,onChange:_=>x(_.target.value),onKeyDown:_=>_.key==="Enter"&&O()})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:275",className:"w-full",onClick:O,children:[n.jsx(Lc,{"data-loc":"client/src/pages/client/CampaignDetail.tsx:276",className:"w-4 h-4 mr-2"}),"Send Test"]})]})]})})]})}function ld(e,t){return!t||t===0?"0.0":(e/t*100).toFixed(1)}function QR(e,t=60){try{const a=new URL(e),s=a.hostname+a.pathname+(a.search||"");return s.length>t?s.slice(0,t)+"…":s}catch{return e.length>t?e.slice(0,t)+"…":e}}function vwe(){const{id:e}=Yi(),[,t]=La(),a=parseInt(e??"0",10),{data:s,isLoading:r,error:i}=le.campaigns.getReport.useQuery({id:a},{enabled:!!a}),l=()=>{if(!s)return;const b=["Email","First Name","Last Name","Opened","Clicked","Bounced","Unsubscribed","Click Count","Open Count","Last Activity"],j=s.contactActivity.map(E=>[`"${E.email}"`,`"${E.firstName??""}"`,`"${E.lastName??""}"`,E.opened?"Yes":"No",E.clicked?"Yes":"No",E.bounced?"Yes":"No",E.unsubscribed?"Yes":"No",E.clickCount,E.openCount,E.lastActivity?new Date(E.lastActivity).toLocaleStr
845ing():""].join(",")),S=[b.join(","),...j].join(`
846`),O=new Blob([S],{type:"text/csv"}),A=URL.createObjectURL(O),k=document.createElement("a");k.href=A,k.download=`campaign-report-${a}-${new Date().toISOString().slice(0,10)}.csv`,k.click(),URL.revokeObjectURL(A),ne.success("Report exported")};if(r)return n.jsx(Pt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:77",title:"Campaign Report",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:78",className:"p-6 space-y-6",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/CampaignReport.tsx:79",className:"h-8 w-64"}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:80",className:"grid grid-cols-2 lg:grid-cols-6 gap-4",children:[...Array(6)].map((b,j)=>n.jsx(Me,{"data-loc":"client/src/pages/client/CampaignReport.tsx:81",className:"h-28 rounded-xl"},j))}),n.jsx(Me,{"data-loc":"client/src/pages/client/CampaignReport.tsx:83",className:"h-64 rounded-xl"}),n.jsx(Me,{"data-loc":"client/src/pages/client/CampaignReport.tsx:84",className:"h-80 rounded-xl"})]})});if(i||!s)return n.jsx(Pt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:92",title:"Campaign Report",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:93",className:"p-6",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:94",className:"text-center py-20 text-muted-foreground",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/CampaignReport.tsx:95",className:"w-10 h-10 mx-auto mb-3 text-amber-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:96",className:"text-lg font-medium",children:"Campaign not found"}),n.jsx(te,{"data-loc":"client/src/pages/client/CampaignReport.tsx:97",variant:"outline",className:"mt-4",onClick:()=>t("/campaigns"),children:"Back to Campaigns"})]})})});const{campaign:d,stats:u,topUrls:p,contactActivity:x,unsubscribeReasons:m}=s,h=u.sent||d.totalSent||0,y=[{label:"Sent",value:h.toLocaleString(),icon:Lc,color:"text-primary",sub:null},{label:"Unique Opens",value:u.uniqueOpens.toLocaleString(),icon:la,color:"text-emerald-400",sub:`${ld(u.uniqueOpens,h)}% open rate`},{label:"Unique Clicks",value:u.uniqueClicks.toLocaleString(),icon:Yp,color:"text-violet-400",sub:`${ld(u.uniqueClicks,h)}% click rate`},{label:"Click-to-Open",value:`${ld(u.uniqueClicks,u.uniqueOpens)}%`,icon:Yp,color:"text-blue-400",sub:"of openers clicked"},{label:"Bounces",value:u.bounced.toLocaleString(),icon:Ia,color:u.bounced/(h||1)>.02?"text-red-400":"text-muted-foreground",sub:`${ld(u.bounced,h)}% bounce rate`},{label:"Unsubscribes",value:u.unsubscribed.toLocaleString(),icon:Ql,color:u.unsubscribed/(h||1)>.005?"text-amber-400":"text-muted-foreground",sub:`${ld(u.unsubscribed,h)}% unsub rate`}],w=p.slice(0,8).map((b,j)=>({name:`Link ${j+1}`,clicks:b.totalClicks,unique:b.uniqueClicks,fullUrl:b.url}));return n.jsx(Pt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:127",title:"Campaign Report",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:128",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:130",className:"flex items-start justify-between flex-wrap gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:131",className:"flex items-center gap-3",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignReport.tsx:132",variant:"ghost",size:"sm",onClick:()=>t("/campaigns"),className:"text-muted-foreground hover:text-foreground",children:[n.jsx(rs,{"data-loc":"client/src/pages/client/CampaignReport.tsx:138",className:"w-4 h-4 mr-1"}),"Campaigns"]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:141",className:"w-px h-5 bg-border"}),n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:142",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/CampaignReport.tsx:143",className:"text-xl font-bold text-foreground",children:d.name}),n.jsxs("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:144",className:"text-sm text-muted-foreground mt-0.5",children:[d.subject," ·"," ",d.sentAt?new Date(d.sentAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):"Not sent yet"]})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/CampaignReport.tsx:152",variant:"outline",size:"sm",onClick:l,disabled:x.length===0,children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/CampaignReport.tsx:153",className:"w-4 h-4 mr-2"}),"Export CSV"]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:159",className:"grid grid-cols-2 lg:grid-cols-6 gap-4",children:y.map(({label:b,value:j,icon:S,color:O,sub:A})=>n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:161",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:162",className:"flex items-center justify-between mb-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:163",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:b}),n.jsx(S,{"data-loc":"client/src/pages/client/CampaignReport.tsx:164",className:Se("w-4 h-4",O)})]}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:166",className:Se("text-2xl font-bold",O),children:j}),A&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:167",className:"text-xs text-muted-foreground mt-1",children:A})]},b))}),p.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:174",className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignReport.tsx:176",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:177",className:"pb-3",children:n.jsxs(St,{"data-loc":"client/src/pages/client/CampaignReport.tsx:178",className:"text-sm flex items-center gap-2",children:[n.jsx(Yp,{"data-loc":"client/src/pages/client/CampaignReport.tsx:179",className:"w-4 h-4 text-violet-400"}
846),"Top Clicked Links"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignReport.tsx:183",className:"p-0",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:184",className:"overflow-x-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/CampaignReport.tsx:185",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/CampaignReport.tsx:186",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/CampaignReport.tsx:187",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:188",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"URL"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:189",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Total"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:190",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Unique"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:191",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Rate"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/CampaignReport.tsx:194",children:p.map((b,j)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/CampaignReport.tsx:196",className:"border-b border-border/50 hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:197",className:"px-4 py-3 max-w-xs",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:198",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:199",className:"text-xs text-muted-foreground font-mono w-5 shrink-0",children:j+1}),n.jsx("a",{"data-loc":"client/src/pages/client/CampaignReport.tsx:200",href:b.url,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline truncate block max-w-[200px] text-xs",title:b.url,children:QR(b.url)}),n.jsx(zv,{"data-loc":"client/src/pages/client/CampaignReport.tsx:209",className:"w-3 h-3 text-muted-foreground shrink-0"})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:212",className:"px-4 py-3 text-right font-medium",children:b.totalClicks}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:213",className:"px-4 py-3 text-right text-muted-foreground",children:b.uniqueClicks}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:214",className:"px-4 py-3 text-right",children:n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:215",className:"text-violet-400 font-medium",children:[ld(b.uniqueClicks,h),"%"]})})]},j))})]})})})]}),w.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignReport.tsx:227",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:228",className:"pb-3",children:n.jsx(St,{"data-loc":"client/src/pages/client/CampaignReport.tsx:229",className:"text-sm",children:"Click Distribution"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignReport.tsx:231",children:n.jsx(Eh,{"data-loc":"client/src/pages/client/CampaignReport.tsx:232",width:"100%",height:220,children:n.jsxs(yq,{"data-loc":"client/src/pages/client/CampaignReport.tsx:233",data:w,margin:{top:5,right:5,left:-20,bottom:5},children:[n.jsx(am,{"data-loc":"client/src/pages/client/CampaignReport.tsx:234",strokeDasharray:"3 3",stroke:"rgba(255,255,255,0.05)"}),n.jsx(Gc,{"data-loc":"client/src/pages/client/CampaignReport.tsx:235",dataKey:"name",tick:{fontSize:10,fill:"#6b7280"}}),n.jsx(Yc,{"data-loc":"client/src/pages/client/CampaignReport.tsx:236",tick:{fontSize:10,fill:"#6b7280"}}),n.jsx(ys,{"data-loc":"client/src/pages/client/CampaignReport.tsx:237",contentStyle:{background:"#1a1a2e",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"8px",fontSize:"12px"},formatter:(b,j,S)=>[b,j==="clicks"?"Total Clicks":"Unique Clicks"],labelFormatter:(b,j)=>{const S=j?.[0]?.payload;return S?.fullUrl?QR(S.fullUrl,50):b}}),n.jsx(Kr,{"data-loc":"client/src/pages/client/CampaignReport.tsx:245",dataKey:"clicks",name:"Total",fill:"#8b5cf6",radius:[3,3,0,0]}),n.jsx(Kr,{"data-loc":"client/src/pages/client/CampaignReport.tsx:246",dataKey:"unique",name:"Unique",fill:"#6366f1",radius:[3,3,0,0]})]})})})]})]}),m&&m.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignReport.tsx:257",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:258",className:"pb-3",children:n.jsxs(St,{"data-loc":"client/src/pages/client/CampaignReport.tsx:259",className:"text-sm flex items-center gap-2",children:[n.jsx(Ql,{"data-loc":"client/src/pages/client/CampaignReport.tsx:260",className:"w-4 h-4 text-amber-400"}),"Unsubscribe Reasons",n.jsxs(Le,{"data-loc":"client/src/pages/client/CampaignReport.tsx:262",variant:"outline",className:"text-xs ml-1",children:[u.unsubscribed," unsub",u.unsubscribed!==1?"s":""]})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignReport.tsx:265",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:266",className:"space-y-3",children:m.map(b=>{const j=m[0].count,S=j>0?b.count/j*100:0;return n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:271",className:"flex items-center gap-3",children:[n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:272",className:"text-sm text-foreground w-52 flex-shrink-0 truncate",title:b.label,children:b.label}),n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:273",className:"flex-1 bg-muted rounded-full h-2 overflow-hidden",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:274",className:"h-2 rounded-full bg-amber-400/70 transition-all",style:{width:`${S}%`}})}),n.jsxs("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:279",className:"text-xs text-muted-foreground w-16 text-right flex-shrink-0",children:[b.count," (",u.unsubscribed>0?(b.count/u.unsubscribed*100).toFixed(0):0,"%)"]})]},b.reason)})})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/CampaignReport.tsx:291",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/CampaignReport.tsx:292",className:"pb-3",children:n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:293",className:"flex items-center justify-between",children:n.jsxs(St,{"data-loc":"client/src/pages/client/CampaignReport.tsx:294",className:"text-sm flex items-center gap-2",children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignReport.tsx:295",className:"w-4 h-4 text-emerald-400"}),"Contact Activity",n.jsx(Le,{"data-loc":"client/src/pages/client/CampaignReport.tsx:297",variant:"outline",className:"text-xs ml-1",children:x.length})]})})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/CampaignReport.tsx:301",className:"p-0",children:x.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:303",className:"text-center py-12 text-muted-foreground",children:[n.jsx(la,{"data-loc":"client/src/pages/client/CampaignReport.tsx:304",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:305",className:"text-sm",children:"No contact activity recorded yet"})]}):n.jsx("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:308",className:"overflow-x-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/CampaignReport.tsx:309",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/CampaignReport.tsx:310",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/CampaignReport.tsx:311",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:312",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Contact"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:313",className:"text-center px-3 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Opened"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:314",className:"text-center px-3 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Clicked"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:315",className:"text-right px-3 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Clicks"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:316",className:"text-center px-3 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Bounced"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:317",className:"text-center px-3 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Unsub"}),n.jsx("th",{"data-loc":"client/src/pages/client/CampaignReport.tsx:318",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Last Activity"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/CampaignReport.tsx:321",children:x.map(b=>n.jsxs("tr",{"data-loc":"client/src/pages/client/CampaignReport.tsx:323",className:"border-b border-border/50 hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:324",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/CampaignReport.tsx:325",children:[n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:326",className:"font-medium text-foreground text-sm",children:[b.firstName,b.lastName].filter(
846Boolean).join(" ")||b.email}),(b.firstName||b.lastName)&&n.jsx("p",{"data-loc":"client/src/pages/client/CampaignReport.tsx:330",className:"text-xs text-muted-foreground",children:b.email})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:334",className:"px-3 py-3 text-center",children:b.opened?n.jsx(Kl,{"data-loc":"client/src/pages/client/CampaignReport.tsx:336",className:"w-4 h-4 text-emerald-400 mx-auto"}):n.jsx(gf,{"data-loc":"client/src/pages/client/CampaignReport.tsx:337",className:"w-4 h-4 text-muted-foreground/30 mx-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:339",className:"px-3 py-3 text-center",children:b.clicked?n.jsx(Kl,{"data-loc":"client/src/pages/client/CampaignReport.tsx:341",className:"w-4 h-4 text-violet-400 mx-auto"}):n.jsx(gf,{"data-loc":"client/src/pages/client/CampaignReport.tsx:342",className:"w-4 h-4 text-muted-foreground/30 mx-auto"})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:344",className:"px-3 py-3 text-right",children:b.clickCount>0?n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:346",className:"text-violet-400 font-medium",children:b.clickCount}):n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:347",className:"text-muted-foreground",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:349",className:"px-3 py-3 text-center",children:b.bounced?n.jsx(Le,{"data-loc":"client/src/pages/client/CampaignReport.tsx:351",variant:"outline",className:"text-[10px] text-red-400 border-red-400/30",children:"Bounced"}):n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:352",className:"text-muted-foreground/30 text-xs",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:354",className:"px-3 py-3 text-center",children:b.unsubscribed?n.jsx(Le,{"data-loc":"client/src/pages/client/CampaignReport.tsx:356",variant:"outline",className:"text-[10px] text-amber-400 border-amber-400/30",children:"Unsub"}):n.jsx("span",{"data-loc":"client/src/pages/client/CampaignReport.tsx:357",className:"text-muted-foreground/30 text-xs",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/CampaignReport.tsx:359",className:"px-4 py-3 text-right text-xs text-muted-foreground",children:b.lastActivity?new Date(b.lastActivity).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):"—"})]},b.contactId))})]})})})]})]})})}var ywe="Separator",XR="horizontal",bwe=["horizontal","vertical"],DF=v.forwardRef((e,t)=>{const{decorative:a,orientation:s=XR,...r}=e,i=jwe(s)?s:XR,d=a?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return n.jsx(et.div,{"data-orientation":i,...d,...r,ref:t})});DF.displayName=ywe;function jwe(e){return bwe.includes(e)}var wwe=DF;function OF({className:e,orientation:t="horizontal",decorative:a=!0,...s}){return n.jsx(wwe,{"data-loc":"client/src/components/ui/separator.tsx:13","data-slot":"separator",decorative:a,orientation:t,className:Se("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...s})}function Nwe({...e}){return n.jsx(Gv,{"data-loc":"client/src/components/ui/sheet.tsx:10","data-slot":"sheet",...e})}function Swe({...e}){return n.jsx(Yv,{"data-loc":"client/src/components/ui/sheet.tsx:28","data-slot":"sheet-portal",...e})}function Cwe({className:e,...t}){return n.jsx(Kv,{"data-loc":"client/src/components/ui/sheet.tsx:36","data-slot":"sheet-overlay",className:Se("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ewe({className:e,children:t,side:a="right",...s}){return n.jsxs(Swe,{"data-loc":"client/src/components/ui/sheet.tsx:56",children:[n.jsx(Cwe,{"data-loc":"client/src/components/ui/sheet.tsx:57"}),n.jsxs(Qv,{"data-loc":"client/src/components/ui/sheet.tsx:58","data-slot":"sheet-content",className:Se("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...s,children:[t,n.jsxs(Xv,{"data-loc":"client/src/components/ui/sheet.tsx:75",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(Ui,{"data-loc":"client/src/components/ui/sheet.tsx:76",className:"size-4"}),n.jsx("span",{"data-loc":"client/src/components/ui/sheet.tsx:77",className:"sr-only",children:"Close"})]})]})]})}function Awe({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/sheet.tsx:86","data-slot":"sheet-header",className:Se("flex flex-col gap-1.5 p-4",e),...t})}function Dwe({className:e,...t}){return n.jsx(X5,{"data-loc":"client/src/components/ui/sheet.tsx:109","data-slot":"sheet-title",className:Se("text-foreground font-semibold",e),...t})}function Owe({className:e,...t}){return n.jsx(Z5,{"data-loc":"client/src/components/ui/sheet.tsx:122","data-slot":"sheet-
846description",className:Se("text-muted-foreground text-sm",e),...t})}const zN=768;function kF(){const[e,t]=v.useState(void 0);return v.useEffect(()=>{const a=window.matchMedia(`(max-width: ${zN-1}px)`),s=()=>{t(window.innerWidth<zN)};return a.addEventListener("change",s),t(window.innerWidth<zN),()=>a.removeEventListener("change",s)},[]),!!e}const kwe="sidebar_state",_we=3600*24*7,Twe="16rem",Pwe="18rem",Mwe="3rem",Rwe="b",_F=v.createContext(null);function qy(){const e=v.useContext(_F);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Bwe({defaultOpen:e=!0,open:t,onOpenChange:a,className:s,style:r,children:i,...l}){const d=kF(),[u,p]=v.useState(!1),[x,m]=v.useState(e),h=t??x,y=v.useCallback(S=>{const O=typeof S=="function"?S(h):S;a?a(O):m(O),document.cookie=`${kwe}=${O}; path=/; max-age=${_we}`},[a,h]),w=v.useCallback(()=>d?p(S=>!S):y(S=>!S),[d,y,p]);v.useEffect(()=>{const S=O=>{O.key===Rwe&&(O.metaKey||O.ctrlKey)&&(O.preventDefault(),w())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[w]);const b=h?"expanded":"collapsed",j=v.useMemo(()=>({state:b,open:h,setOpen:y,isMobile:d,openMobile:u,setOpenMobile:p,toggleSidebar:w}),[b,h,y,d,u,p,w]);return n.jsx(_F.Provider,{"data-loc":"client/src/components/ui/sidebar.tsx:129",value:j,children:n.jsx(B5,{"data-loc":"client/src/components/ui/sidebar.tsx:130",delayDuration:0,children:n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:131","data-slot":"sidebar-wrapper",style:{"--sidebar-width":Twe,"--sidebar-width-icon":Mwe,...r},className:Se("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",s),...l,children:i})})})}function Iwe({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",disableTransition:s=!1,className:r,children:i,...l}){const{isMobile:d,state:u,openMobile:p,setOpenMobile:x}=qy();return a==="none"?n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:171","data-slot":"sidebar",className:Se("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...l,children:i}):d?n.jsx(Nwe,{"data-loc":"client/src/components/ui/sidebar.tsx:186",open:p,onOpenChange:x,...l,children:n.jsxs(Ewe,{"data-loc":"client/src/components/ui/sidebar.tsx:187","data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Pwe},side:e,children:[n.jsxs(Awe,{"data-loc":"client/src/components/ui/sidebar.tsx:199",className:"sr-only",children:[n.jsx(Dwe,{"data-loc":"client/src/components/ui/sidebar.tsx:200",children:"Sidebar"}),n.jsx(Owe,{"data-loc":"client/src/components/ui/sidebar.tsx:201",children:"Displays the mobile sidebar."})]}),n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:203",className:"flex h-full w-full flex-col",children:i})]})}):n.jsxs("div",{"data-loc":"client/src/components/ui/sidebar.tsx:210",className:"group peer text-sidebar-foreground hidden md:block","data-state":u,"data-collapsible":u==="collapsed"?a:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:219","data-slot":"sidebar-gap",className:Se("relative w-(--sidebar-width) bg-transparent",s?"transition-none":"transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:233","data-slot":"sidebar-container",className:Se("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) md:flex",s?"transition-none":"transition-[left,right,width] duration-200 ease-linear",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...l,children:n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:251","data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i})})]})}function Lwe({className:e,onClick:t,...a}){const{toggleSidebar:s}=qy();return n.jsxs(te,{"data-loc":"client/src/components/ui/sidebar.tsx:271","data-sidebar":"trigger","data-slot":"sidebar-tr
846igger",variant:"ghost",size:"icon",className:Se("size-7",e),onClick:r=>{t?.(r),s()},...a,children:[n.jsx(ZI,{"data-loc":"client/src/components/ui/sidebar.tsx:283"}),n.jsx("span",{"data-loc":"client/src/components/ui/sidebar.tsx:284",className:"sr-only",children:"Toggle Sidebar"})]})}function $we({className:e,...t}){return n.jsx("main",{"data-loc":"client/src/components/ui/sidebar.tsx:316","data-slot":"sidebar-inset",className:Se("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",e),...t})}function zwe({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:344","data-slot":"sidebar-header","data-sidebar":"header",className:Se("flex flex-col gap-2 p-2",e),...t})}function Uwe({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:355","data-slot":"sidebar-footer","data-sidebar":"footer",className:Se("flex flex-col gap-2 p-2",e),...t})}function qwe({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/sidebar.tsx:380","data-slot":"sidebar-content","data-sidebar":"content",className:Se("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Fwe({className:e,...t}){return n.jsx("ul",{"data-loc":"client/src/components/ui/sidebar.tsx:463","data-slot":"sidebar-menu","data-sidebar":"menu",className:Se("flex w-full min-w-0 flex-col gap-1",e),...t})}function ZR({className:e,...t}){return n.jsx("li",{"data-loc":"client/src/components/ui/sidebar.tsx:474","data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:Se("group/menu-item relative",e),...t})}const Wwe=I5("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function JR({asChild:e=!1,isActive:t=!1,variant:a="default",size:s="default",tooltip:r,className:i,...l}){const d=e?S5:"button",{isMobile:u,state:p}=qy(),x=n.jsx(d,{"data-loc":"client/src/components/ui/sidebar.tsx:522","data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":s,"data-active":t,className:Se(Wwe({variant:a,size:s}),i),...l});return r?(typeof r=="string"&&(r={children:r}),n.jsxs(II,{"data-loc":"client/src/components/ui/sidebar.tsx:543",children:[n.jsx(LI,{"data-loc":"client/src/components/ui/sidebar.tsx:544",asChild:!0,children:x}),n.jsx($I,{"data-loc":"client/src/components/ui/sidebar.tsx:545",side:"right",align:"center",hidden:p!=="collapsed"||u,...r})]})):x}function Hwe(){return n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:5",className:"flex min-h-screen bg-background",children:[n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:7",className:"w-[280px] border-r border-border bg-background p-4 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:9",className:"flex items-center gap-3 px-2",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:10",className:"h-8 w-8 rounded-md"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:11",className:"h-4 w-24"})]}),n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:15",className:"space-y-2 px-2",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:16",className:"h-10 w-full rounded-lg"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:17",className:"h-10 w-full rounded-lg"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:18",className:"h-10 w-full rounded-lg"})]}),n.jsx("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:22",className:"absolute bottom-4 left-4 right-4",children:n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:23",className:"flex items-center gap-3 px-1",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:24",className:"h-9 w-9 rounded-full"}),n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:25",className:"flex-1 space-y-2",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:26",className:"h-3 w-20"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:27",className:"h-2 w-32"})]})]})})]}),n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:34",className:"flex-1 p-4 space-y-4",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:36",className:"h-12 w-48 rounded-lg"}),n.jsxs("div",{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:37",className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:[n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:38",className:"h-32 rounded-xl"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:39",className:"h-32 rounded-xl"}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:40",className:"h-32 rounded-xl"})]}),n.jsx(Me,{"data-loc":"client/src/components/DashboardLayoutSkeleton.tsx:42",className:"h-64 roun
846ded-xl"})]})]})}const e7=[{icon:z5,label:"Dashboard",path:"/dashboard"},{icon:ja,label:"Campaigns",path:"/campaigns"},{icon:Pa,label:"Automations",path:"/automations"},{icon:qr,label:"Popups",path:"/popups"},{icon:$i,label:"Widgets",path:"/widgets"},{icon:Vp,label:"Audit Log",path:"/audit-log"}],UN=[{label:"Contacts",path:"/contacts"},{label:"Segments",path:"/segments"},{label:"Lists",path:"/lists"},{label:"Imports",path:"/imports"},{label:"Exports",path:"/exports"},{label:"Tags",path:"/tags"}],t7="sidebar-width",Vwe=280,Gwe=200,Ywe=480;function qN({children:e}){const[t,a]=v.useState(()=>{const i=localStorage.getItem(t7);return i?parseInt(i,10):Vwe}),{loading:s,user:r}=Jc();return v.useEffect(()=>{localStorage.setItem(t7,t.toString())},[t]),s?n.jsx(Hwe,{"data-loc":"client/src/components/DashboardLayout.tsx:69"}):r?n.jsx(Bwe,{"data-loc":"client/src/components/DashboardLayout.tsx:99",style:{"--sidebar-width":`${t}px`},children:n.jsx(Kwe,{"data-loc":"client/src/components/DashboardLayout.tsx:106",setSidebarWidth:a,children:e})}):n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:74",className:"flex items-center justify-center min-h-screen",children:n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:75",className:"flex flex-col items-center gap-8 p-8 max-w-md w-full",children:[n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:76",className:"flex flex-col items-center gap-6",children:[n.jsx("h1",{"data-loc":"client/src/components/DashboardLayout.tsx:77",className:"text-2xl font-semibold tracking-tight text-center",children:"Sign in to continue"}),n.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:80",className:"text-sm text-muted-foreground text-center max-w-sm",children:"Access to this dashboard requires authentication. Continue to launch the login flow."})]}),n.jsx(te,{"data-loc":"client/src/components/DashboardLayout.tsx:84",onClick:()=>{window.location.href=uo()},size:"lg",className:"w-full shadow-lg hover:shadow-xl transition-all",children:"Sign in"})]})})}function Kwe({children:e,setSidebarWidth:t}){const{user:a,logout:s}=Jc(),[r,i]=La(),{state:l,toggleSidebar:d}=qy(),u=l==="collapsed",[p,x]=v.useState(!1),m=v.useRef(null),h=UN.some(S=>r.startsWith(S.path)),[y,w]=v.useState(h),b=e7.find(S=>S.path===r)??UN.find(S=>S.path===r),j=kF();return v.useEffect(()=>{u&&x(!1)},[u]),v.useEffect(()=>{const S=A=>{if(!p)return;const k=m.current?.getBoundingClientRect().left??0,E=A.clientX-k;E>=Gwe&&E<=Ywe&&t(E)},O=()=>{x(!1)};return p&&(document.addEventListener("mousemove",S),document.addEventListener("mouseup",O),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",O),document.body.style.cursor="",document.body.style.userSelect=""}},[p,t]),n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:171",className:"relative",ref:m,children:[n.jsxs(Iwe,{"data-loc":"client/src/components/DashboardLayout.tsx:172",collapsible:"icon",className:"border-r-0",disableTransition:p,children:[n.jsx(zwe,{"data-loc":"client/src/components/DashboardLayout.tsx:177",className:"h-16 justify-center",children:n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:178",className:"flex items-center gap-3 px-2 transition-all w-full",children:[n.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:179",onClick:d,className:"h-8 w-8 flex items-center justify-center hover:bg-accent rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-ring shrink-0","aria-label":"Toggle navigation",children:n.jsx(ZI,{"data-loc":"client/src/components/DashboardLayout.tsx:184",className:"h-4 w-4 text-muted-foreground"})}),u?null:n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:187",className:"flex items-center gap-2 min-w-0",children:n.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:188",className:"font-semibold tracking-tight truncate",children:"Navigation"})})]})}),n.jsx(qwe,{"data-loc":"client/src/components/DashboardLayout.t
846sx:196",className:"gap-0",children:n.jsxs(Fwe,{"data-loc":"client/src/components/DashboardLayout.tsx:197",className:"px-2 py-1",children:[e7.map(S=>{const O=r===S.path||r.startsWith(S.path+"/");return n.jsx(ZR,{"data-loc":"client/src/components/DashboardLayout.tsx:201",children:n.jsxs(JR,{"data-loc":"client/src/components/DashboardLayout.tsx:202",isActive:O,onClick:()=>i(S.path),tooltip:S.label,className:"h-10 transition-all font-normal",children:[n.jsx(S.icon,{"data-loc":"client/src/components/DashboardLayout.tsx:208",className:`h-4 w-4 ${O?"text-primary":""}`}),n.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:209",children:S.label})]})},S.path)}),n.jsx(ZR,{"data-loc":"client/src/components/DashboardLayout.tsx:216",children:n.jsxs(JR,{"data-loc":"client/src/components/DashboardLayout.tsx:217",isActive:h,onClick:()=>w(S=>!S),tooltip:"Audience",className:"h-10 transition-all font-normal",children:[n.jsx(wa,{"data-loc":"client/src/components/DashboardLayout.tsx:223",className:`h-4 w-4 ${h?"text-primary":""}`}),n.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:224",children:"Audience"}),y?n.jsx(Tn,{"data-loc":"client/src/components/DashboardLayout.tsx:226",className:"ml-auto h-3.5 w-3.5 text-muted-foreground"}):n.jsx(Es,{"data-loc":"client/src/components/DashboardLayout.tsx:227",className:"ml-auto h-3.5 w-3.5 text-muted-foreground"})]})}),y&&n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:231",className:"ml-6 border-l border-border pl-2 space-y-0.5",children:UN.map(S=>{const O=r===S.path||r.startsWith(S.path+"/");return n.jsx("button",{"data-loc":"client/src/components/DashboardLayout.tsx:235",onClick:()=>i(S.path),className:`w-full text-left px-2 py-1.5 rounded-md text-sm transition-colors ${O?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"}`,children:S.label},S.path)})})]})}),n.jsx(Uwe,{"data-loc":"client/src/components/DashboardLayout.tsx:253",className:"p-3",children:n.jsxs(xr,{"data-loc":"client/src/components/DashboardLayout.tsx:254",children:[n.jsx(gr,{"data-loc":"client/src/components/DashboardLayout.tsx:255",asChild:!0,children:n.jsxs("button",{"data-loc":"client/src/components/DashboardLayout.tsx:256",className:"flex items-center gap-3 rounded-lg px-1 py-1 hover:bg-accent/50 transition-colors w-full text-left group-data-[collapsible=icon]:justify-center focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[n.jsx(Q9,{"data-loc":"client/src/components/DashboardLayout.tsx:257",className:"h-9 w-9 border shrink-0",children:n.jsx(X9,{"data-loc":"client/src/components/DashboardLayout.tsx:258",className:"text-xs font-medium",children:a?.name?.charAt(0).toUpperCase()})}),n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.tsx:262",className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:[n.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:263",className:"text-sm font-medium truncate leading-none",children:a?.name||"-"}),n.jsx("p",{"data-loc":"client/src/components/DashboardLayout.tsx:266",className:"text-xs text-muted-foreground truncate mt-1.5",children:a?.email||"-"})]})]})}),n.jsx(hr,{"data-loc":"client/src/components/DashboardLayout.tsx:272",align:"end",className:"w-48",children:n.jsxs(ca,{"data-loc":"client/src/components/DashboardLayout.tsx:273",onClick:s,className:"cursor-pointer text-destructive focus:text-destructive",children:[n.jsx(KI,{"data-loc":"client/src/components/DashboardLayout.tsx:277",className:"mr-2 h-4 w-4"}),n.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:278",children:"Sign out"})]})})]})})]}),n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:284",className:`absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-primary/20 transition-colors ${u?"hidden":""}`,onMouseDown:()=>{u||x(!0)},style:{zIndex:50}})]}),n.jsxs($we,{"data-loc":"client/src/components/DashboardLayout.tsx:294",children:[j&&n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:296",className:"flex border-b h-14 items-center justify-between bg-background/95 px-2 backdrop-blur supports-[backdrop-filter]:backdrop-blur sticky top-0 z-40",children:n.jsxs("div",{"data-loc":"client/src/components/DashboardLayout.t
846sx:297",className:"flex items-center gap-2",children:[n.jsx(Lwe,{"data-loc":"client/src/components/DashboardLayout.tsx:298",className:"h-9 w-9 rounded-lg bg-background"}),n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:299",className:"flex items-center gap-3",children:n.jsx("div",{"data-loc":"client/src/components/DashboardLayout.tsx:300",className:"flex flex-col gap-1",children:n.jsx("span",{"data-loc":"client/src/components/DashboardLayout.tsx:301",className:"tracking-tight text-foreground",children:b?.label??"Menu"})})})]})}),n.jsx("main",{"data-loc":"client/src/components/DashboardLayout.tsx:309",className:"flex-1 p-4",children:e})]})]})}function Qwe(){const e=Yi(),t=parseInt(e.id??"0"),[,a]=La(),[s,r]=v.useState(!1),[i,l]=v.useState("10"),[d,u]=v.useState(null),[p,x]=v.useState(""),[m,h]=v.useState(""),{data:y,isLoading:w}=le.campaigns.get.useQuery({id:t},{refetchInterval:3e4}),{data:b,isLoading:j,refetch:S}=le.campaigns.getBatches.useQuery({campaignId:t},{refetchInterval:B=>{const Y=B.state.data;return Y&&Y.some(Q=>Q.status==="sending")?3e3:!1}}),O=le.campaigns.createBatchedSend.useMutation({onSuccess:B=>{ne.success(`Created ${B.totalBatches} batches of ~${B.batchSize.toLocaleString()} contacts each`),r(!1),S()},onError:B=>ne.error(B.message)}),A=le.campaigns.sendBatch.useMutation({onSuccess:B=>{ne.success(B.message),S()},onError:B=>ne.error(B.message)}),k=le.campaigns.updateBatchContent.useMutation({onSuccess:()=>{ne.success("Batch content updated"),u(null),S()},onError:B=>ne.error(B.message)}),E=()=>{y&&O.mutate({campaignId:t,batchPercent:parseInt(i),subject:y.subject,previewText:y.previewText??void 0,bodyHtml:y.bodyHtml??void 0,bodyJson:y.bodyJson??void 0})},D=B=>{u(B),x(B.subject),h(B.previewText??"")},_=()=>{d&&k.mutate({batchId:d.id,subject:p,previewText:m})},T=B=>B==="sent"?n.jsx(Le,{"data-loc":"client/src/pages/client/BatchedSend.tsx:114",className:"bg-emerald-500/10 text-emerald-400 border-emerald-500/20",children:"Sent"}):B==="sending"?n.jsx(Le,{"data-loc":"client/src/pages/client/BatchedSend.tsx:115",className:"bg-blue-500/10 text-blue-400 border-blue-500/20 animate-pulse",children:"Sending…"}):B==="failed"?n.jsx(Le,{"data-loc":"client/src/pages/client/BatchedSend.tsx:116",className:"bg-red-500/10 text-red-400 border-red-500/20",children:"Failed"}):n.jsx(Le,{"data-loc":"client/src/pages/client/BatchedSend.tsx:117",className:"bg-muted text-muted-foreground border-border",children:"Pending"}),I=b?.filter(B=>B.status==="sent").length??0,$=b?.length??0,R=b?.find(B=>B.status==="pending");return w?n.jsx(qN,{"data-loc":"client/src/pages/client/BatchedSend.tsx:126",children:n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:127",className:"p-6",children:n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:127",className:"h-48 w-full bg-muted animate-pulse rounded-lg"})})}):y?n.jsxs(qN,{"data-loc":"client/src/pages/client/BatchedSend.tsx:141",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:142",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:144",className:"flex items-center gap-3 flex-wrap",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:145",variant:"ghost",size:"sm",onClick:()=>a(`/campaigns/${t}`),children:[n.jsx(rs,{"data-loc":"client/src/pages/client/BatchedSend.tsx:146",className:"w-4 h-4 mr-2"}),"Back to Campaign"]}),n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:148",className:"flex-1"}),n.jsxs(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:149",onClick:()=>r(!0),variant:"outline",size:"sm",children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:150",className:"w-4 h-4 mr-2"}),$>0?"Reconfigure Batches":"Set Up Batched Send"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:155",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:156",className:"flex items-center gap-2 mb-1",children:[n.jsx(wk,{"data-loc":"client/src/pages/client/BatchedSend.tsx:157",className:"w-5 h-5 text-orange-400"}),n.jsx("h2",{"data-loc":"client/src/pages/client/BatchedSend.tsx:158",className:"text-2xl font-bold text-foreground",children:"Batched Send"})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:160",className:"text-muted-foreground text-sm",children:[n.jsx("span",{"data-loc":"client/src/pages/client/BatchedSend.tsx:161",className:"font-medium text-foreground",children:y.name})," — Send to your audience in controlled batches for list warmup."]})]}),$>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:167",className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:168",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:169",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Total Batches"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:170",className:"text-2xl font-bold text-foreground",children:$})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:172",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:173",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Batches Sent"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:174",className:"text-2xl font-bold text-emerald-400",children:I})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:176",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:177",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Remaining"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:178",className:"text-2xl font-bold text-muted-foreground",children:$-I})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:180",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:181",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Emails Sent"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:182",className:"text-2xl font-bold text-foreground",children:(y.totalSent??0).toLocaleStr
846ing()})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:184",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:185",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Opens"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:186",className:"text-2xl font-bold text-foreground",children:(y.totalOpens??0).toLocaleString()}),(y.totalSent??0)>0&&n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:188",className:"text-xs text-muted-foreground mt-1",children:[((y.totalOpens??0)/(y.totalSent??1)*100).toFixed(1),"%"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:191",className:"stat-card p-5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:192",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Clicks"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:193",className:"text-2xl font-bold text-foreground",children:(y.totalClicks??0).toLocaleString()}),(y.totalSent??0)>0&&n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:195",className:"text-xs text-muted-foreground mt-1",children:[((y.totalClicks??0)/(y.totalSent??1)*100).toFixed(1),"%"]})]})]}),j?n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:203",className:"space-y-3",children:[1,2,3].map(B=>n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:204",className:"h-16 bg-muted animate-pulse rounded-lg"},B))}):$===0?n.jsx(Ke,{"data-loc":"client/src/pages/client/BatchedSend.tsx:207",className:"bg-card border-border",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/BatchedSend.tsx:208",className:"flex flex-col items-center justify-center py-16 text-center",children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:209",className:"w-12 h-12 text-muted-foreground mb-4"}),n.jsx("h3",{"data-loc":"client/src/pages/client/BatchedSend.tsx:210",className:"text-lg font-semibold text-foreground mb-2",children:"No batches set up yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:211",className:"text-sm text-muted-foreground mb-6 max-w-sm",children:"Set up a batched send to split your audience into equal groups. Send each batch manually at your own pace."}),n.jsxs(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:214",onClick:()=>r(!0),children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:215",className:"w-4 h-4 mr-2"}),"Set Up Batched Send"]})]})}):n.jsxs(Ke,{"data-loc":"client/src/pages/client/BatchedSend.tsx:220",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/BatchedSend.tsx:221",children:n.jsxs(St,{"data-loc":"client/src/pages/client/BatchedSend.tsx:222",className:"text-sm flex items-center gap-2",children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:223",className:"w-4 h-4 text-primary"}),"Batches — ",b[0]?.batchPercent,"% per batch"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/BatchedSend.tsx:227",className:"p-0",children:n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:228",className:"divide-y divide-border",children:b.map(B=>n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:230",className:"flex items-center gap-4 px-6 py-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:232",className:"w-10 h-10 rounded-full bg-muted flex items-center justify-center flex-shrink-0",children:B.status==="sent"?n.jsx(Kl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:234",className:"w-5 h-5 text-emerald-400"}):B.status==="sending"?n.jsx(Ot,{"data-loc":"client/src/pages/client/BatchedSend.tsx:236",className:"w-5 h-5 text-blue-400 animate-spin"}):B.status==="failed"?n.jsx(Ia,{"data-loc":"client/src/pages/client/BatchedSend.tsx:238",className:"w-5 h-5 text-red-400"}):n.jsx("span",{"data-loc":"client/src/pages/client/BatchedSend.tsx:240",className:"text-sm font-bold text-muted-foreground",children:B.batchNumber})}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:245",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:246",className:"flex items-center gap-2 mb-0.5",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/BatchedSend.tsx:247",className:"text-sm font-medium text-foreground",children:["Batch ",B.batchNumber," of ",B.totalBatches]}),T(B.status)]}),n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:250",className:"text-xs text-muted-foreground truncate",children:[B.recipientCount.toLocaleStr
846ing()," contacts · ",B.subject]}),B.status==="sent"&&B.sentAt&&n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:254",className:"text-xs text-muted-foreground mt-0.5",children:["Sent ",new Date(B.sentAt).toLocaleString()," · ",B.totalSent.toLocaleString()," delivered"]})]}),B.status==="sent"&&n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:262",className:"hidden md:flex items-center gap-6 text-center",children:n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:263",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:264",className:"text-xs text-muted-foreground",children:"Delivered"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:265",className:"text-sm font-semibold text-foreground",children:B.totalSent.toLocaleString()})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:271",className:"flex items-center gap-2 flex-shrink-0",children:[B.status==="pending"&&n.jsxs(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:273",size:"sm",variant:"outline",onClick:()=>D(B),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/BatchedSend.tsx:278",className:"w-3.5 h-3.5 mr-1.5"}),"Edit Content"]}),B.status==="pending"&&n.jsxs(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:282",size:"sm",onClick:()=>A.mutate({batchId:B.id}),disabled:A.isPending,className:R?.id===B.id?"":"opacity-50",children:[A.isPending&&A.variables?.batchId===B.id?n.jsx(Ot,{"data-loc":"client/src/pages/client/BatchedSend.tsx:289",className:"w-3.5 h-3.5 animate-spin mr-1.5"}):n.jsx(Lc,{"data-loc":"client/src/pages/client/BatchedSend.tsx:291",className:"w-3.5 h-3.5 mr-1.5"}),"Send Batch ",B.batchNumber]}),B.status==="sending"&&n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:297",className:"flex items-center gap-1.5 text-blue-400 text-sm",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/BatchedSend.tsx:298",className:"w-4 h-4 animate-spin"}),"Sending…"]})]})]},B.id))})})]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:311",open:s,onOpenChange:r,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:312",className:"bg-card border-border max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:313",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/BatchedSend.tsx:314",className:"flex items-center gap-2",children:[n.jsx(wk,{"data-loc":"client/src/pages/client/BatchedSend.tsx:315",className:"w-4 h-4 text-orange-400"}),"Set Up Batched Send"]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:319",className:"space-y-5 pt-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:320",className:"text-sm text-muted-foreground",children:"Your audience will be split into equal batches. Send each batch manually at your own pace — ideal for list warming."}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:324",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/BatchedSend.tsx:325",children:"Batch Size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/BatchedSend.tsx:326",value:i,onValueChange:l,children:[n.jsx(xt,{"data-loc":"client/src/pages/client/BatchedSend.tsx:327",children:n.jsx(ht,{"data-loc":"client/src/pages/client/BatchedSend.tsx:328"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/BatchedSend.tsx:330",children:[n.jsx(he,{"data-loc":"client/src/pages/client/BatchedSend.tsx:331",value:"5",children:"5% per batch (20 batches)"}),n.jsx(he,{"data-loc":"client/src/pages/client/BatchedSend.tsx:332",value:"10",children:"10% per batch (10 batches)"}),n.jsx(he,{"data-loc":"client/src/pages/client/BatchedSend.tsx:333",value:"20",children:"20% per batch (5 batches)"}),n.jsx(he,{"data-loc":"client/src/pages/client/BatchedSend.tsx:334",value:"25",children:"25% per batch (4 batches)"}),n.jsx(he,{"data-loc":"client/src/pages/client/BatchedSend.tsx:335",value:"50",children:"50% per batch (2 batches)"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:340",className:"bg-muted/50 rounded-lg p-4 text-sm space-y-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:341",className:"font-medium text-foreground",children:"Preview"}),n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:342",className:"text-muted-foreground",children:"Each batch will use the campaign's current subject and email content. You can edit the subject/preview text per batch after setup."})]}),$>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:348",className:"flex items-start gap-2 bg-amber-500/10 border border-amber-500/20 rounded-lg p-3",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/BatchedSend.tsx:349",className:"w-4 h-4 text-amber-400 flex-shrink-0 mt-0.5"}),n.jsxs("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:350",className:"text-xs text-amber-300",children:["This will replace your existing ",$," batches. Any unsent batches will be discarded."]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:356",className:"w-full",onClick:E,disabled:O.isPending,children:O.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/BatchedSend.tsx:362",className:"w-4 h-4 animate-spin mr-2"}),"Creating batches…"]}):n.jsxs(n.Fragment,{children:[n.jsx(Rl,{"data-loc":"client/src/pages/client/BatchedSend.tsx:364",className:"w-4 h-4 mr-2"}),"Create Batches"]})})]})]})}),n.jsx(qa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:372",open:!!d,onOpenChange:B=>!B&&u(null),children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:373",className:"bg-card border-border max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/BatchedSend.tsx:374",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/BatchedSend.tsx:375",className:"flex items-center gap-2",children:[n.jsx(mr,{"data-loc":"client/src/pages/client/BatchedSend.tsx:376",className:"w-4 h-4 text-primary"}),"Edit Batch ",d?.batchNumber," Content"]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:380",className:"space-y-4 pt-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/BatchedSend.tsx:381",className:"text-sm text-muted-foreground",children:"Customize the subject line and preview text for this batch. The email body will remain the same as the campaign unless you update it in the campaign editor."}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:384",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/BatchedSend.tsx:385",children:"Subject Line"}),n.jsx(De,{"data-loc":"client/src/pages/client/BatchedSend.tsx:386",value:p,onChange:B=>x(B.target.value),placeholder:"Email subject…"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:392",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/BatchedSend.tsx:393",children:["Preview Text ",n.jsx("span",{"data-loc":"client/src/pages/client/BatchedSend.tsx:393",className:"text-muted-foreground",children:"(optional)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/BatchedSend.tsx:394",value:m,onChange:B=>h(B.target.value),placeholder:"Short preview shown in inbox…"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/BatchedSend.tsx:400",className:"w-full",onClick:_,disabled:k.isPending,children:k.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/BatchedSend.tsx:406",className:"w-4 h-4 animate-spin mr-2"}),"Saving…"]}):"Save Changes"})]})]})})]}):n.jsx(qN,{"data-loc":"client/src/pages/client/BatchedSend.tsx:134",children:n.jsx("div",{"data-loc":"client/src/pages/client/BatchedSend.tsx:135",className:"p-6 text-center text-muted-foreground",children:"Campaign not found."})})}function Xwe(){const[e,t]=v.useState(""),{data:a,isLoading:s}=le.templates.list.useQuery(),r=a?.filter(l=>l.name.toLowerCase().includes(e.toLowerCase())||l.category?.toLowerCase().includes(e.toLowerCase())),i=l=>l==="prop_firm"?"badge-active":l==="crypto"?"badge-paused":"badge-draft";return n.jsx(Pt,{"data-loc":"client/src/pages/client/Templates.tsx:30",title:"Templates",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:31",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:32",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:33",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Templates.tsx:34",className:"text-2xl font-bold text-foreground",children:"Email Templates"}),n.jsx("p",{"data-loc":"client/src/pages/client/Templates.tsx:35",className:"text-muted-foreground text-sm mt-1",children:"Reusable email designs for campaigns and automations"})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Templates.tsx:37",asChild:!0,size:"sm",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Templates.tsx:38",href:"/builder",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Templates.tsx:38",className:"w-4 h-4 mr-2"}),"New Template"]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:42",className:"relative max-w-sm",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Templates.tsx:43",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Templates.tsx:44",className:"pl-9",placeholder:"Search templates...",value:e,onCh
846ange:l=>t(l.target.value)})]}),s?n.jsx("div",{"data-loc":"client/src/pages/client/Templates.tsx:48",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((l,d)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Templates.tsx:49",className:"h-48 rounded-xl"},d))}):r?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Templates.tsx:60",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(l=>n.jsx(Ke,{"data-loc":"client/src/pages/client/Templates.tsx:62",className:"bg-card border-border hover:border-primary/30 transition-colors group",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Templates.tsx:63",className:"p-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Templates.tsx:65",className:"h-36 bg-muted/20 rounded-t-xl border-b border-border flex items-center justify-center",children:n.jsx(ja,{"data-loc":"client/src/pages/client/Templates.tsx:66",className:"w-10 h-10 text-muted-foreground/30"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:68",className:"p-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:69",className:"flex items-start justify-between mb-2",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/Templates.tsx:70",className:"font-semibold text-foreground text-sm",children:l.name}),l.isSystem&&n.jsx(Le,{"data-loc":"client/src/pages/client/Templates.tsx:71",variant:"outline",className:"badge-sent text-xs",children:"System"})]}),l.subject&&n.jsx("p",{"data-loc":"client/src/pages/client/Templates.tsx:73",className:"text-xs text-muted-foreground mb-2 truncate",children:l.subject}),n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:74",className:"flex items-center gap-2 mb-3",children:[l.industry&&n.jsx(Le,{"data-loc":"client/src/pages/client/Templates.tsx:76",variant:"outline",className:`${i(l.industry)} text-xs`,children:l.industry.replace("_"," ")}),l.category&&n.jsx(Le,{"data-loc":"client/src/pages/client/Templates.tsx:81",variant:"outline",className:"badge-draft text-xs",children:l.category})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:84",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Templates.tsx:85",variant:"outline",size:"sm",className:"flex-1 text-xs h-7",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Templates.tsx:86",href:`/builder/${l.id}`,children:[n.jsx(U5,{"data-loc":"client/src/pages/client/Templates.tsx:87",className:"w-3 h-3 mr-1"}),"Edit"]})}),n.jsx(te,{"data-loc":"client/src/pages/client/Templates.tsx:90",variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>ne.info("Duplicate coming soon"),children:n.jsx(Ra,{"data-loc":"client/src/pages/client/Templates.tsx:91",className:"w-3.5 h-3.5"})})]})]})]})},l.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Templates.tsx:52",className:"text-center py-16 text-muted-foreground",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/Templates.tsx:53",className:"w-12 h-12 mx-auto mb-3 opacity-20"}),n.jsx("p",{"data-loc":"client/src/pages/client/Templates.tsx:54",className:"font-medium",children:"No templates yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Templates.tsx:55",className:"text-sm mt-1",children:n.jsx(It,{"data-loc":"client/src/pages/client/Templates.tsx:56",href:"/builder",className:"text-primary hover:underline",children:"Create your first template"})})]})]})})}function Zwe(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return v.useMemo(()=>s=>{t.forEach(r=>r(s))},t)}const Fy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nu(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function h4(e){return"nodeType"in e}function Gn(e){var t,a;return e?Nu(e)?e:h4(e)&&(t=(a=e.ownerDocument)==null?void 0:a.defaultView)!=null?t:window:window}function v4(e){const{Document:t}=Gn(e);return e instanceof t}function qm(e){return Nu(e)?!1:e instanceof Gn(e).HTMLElement}function TF(e){return e instanceof Gn(e).SVGElement}function Su(e){return e?Nu(e)?e.document:h4(e)?v4(e)?e:qm(e)||TF(e)?e.ownerDocument:document:document:document}const vr=Fy?v.useLayoutEffect:v.useEffect;function Wy(e){const t=v.useRef(e);return vr(()=>{t.current=e}),v.useCallback(function(){for(var a=arguments.length,s=new Array(a),r=0;r<a;r++)s[r]=arguments[r];return t.current==null?void 0:t.current(...s)},[])}function Jwe(){const e=v.useRef(null),t=v.useCallback((s,r)=>{e.current=setInterval(s,r)},[]),a=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,a]}function xm(e,t){t===void 0&&(t=[e]);const a=v.useRef(e);return vr(()=>{a.current!==e&&(a.current=e)},t),a}function Fm(e,t){const a=v.useRef();return v.useMemo(()=>{const s=e(a.current);return a.current=s,s},[...t])}function uv(e){const t=Wy(e),a=v.useRef(null),s=v.useCallback(r=>{r!==a.current&&t?.(r,a.current),a.current=r},[]);return[a,s]}function pv(e){const t=v.useRef();return v.useEffect(()=>{t.current=e},[e]),t.current}let FN={};function Wm(e,t){return v.useMemo(()=>
846{if(t)return t;const a=FN[e]==null?0:FN[e]+1;return FN[e]=a,e+"-"+a},[e,t])}function PF(e){return function(t){for(var a=arguments.length,s=new Array(a>1?a-1:0),r=1;r<a;r++)s[r-1]=arguments[r];return s.reduce((i,l)=>{const d=Object.entries(l);for(const[u,p]of d){const x=i[u];x!=null&&(i[u]=x+e*p)}return i},{...t})}}const Od=PF(1),fv=PF(-1);function e2e(e){return"clientX"in e&&"clientY"in e}function Hy(e){if(!e)return!1;const{KeyboardEvent:t}=Gn(e.target);return t&&e instanceof t}function t2e(e){if(!e)return!1;const{TouchEvent:t}=Gn(e.target);return t&&e instanceof t}function mv(e){if(t2e(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:a}=e.touches[0];return{x:t,y:a}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:a}=e.changedTouches[0];return{x:t,y:a}}}return e2e(e)?{x:e.clientX,y:e.clientY}:null}const Qc=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:a}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(a?Math.round(a):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:a}=e;return"scaleX("+t+") scaleY("+a+")"}},Transform:{toString(e){if(e)return[Qc.Translate.toString(e),Qc.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:a,easing:s}=e;return t+" "+a+"ms "+s}}}),a7="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function a2e(e){return e.matches(a7)?e:e.querySelector(a7)}const n2e={display:"none"};function s2e(e){let{id:t,value:a}=e;return W.createElement("div",{id:t,style:n2e},a)}function r2e(e){let{id:t,announcement:a,ariaLiveType:s="assertive"}=e;const r={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return W.createElement("div",{id:t,style:r,role:"status","aria-live":s,"aria-atomic":!0},a)}function i2e(){const[e,t]=v.useState("");return{announce:v.useCallback(s=>{s!=null&&t(s)},[]),announcement:e}}const MF=v.createContext(null);function c2e(e){const t=v.useContext(MF);v.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function l2e(){const[e]=v.useState(()=>new Set),t=v.useCallback(s=>(e.add(s),()=>e.delete(s)),[e]);return[v.useCallback(s=>{let{type:r,event:i}=s;e.forEach(l=>{var d;return(d=l[r])==null?void 0:d.call(l,i)})},[e]),t]}const o2e={draggable:`
847    To pick up a draggable item, press the space bar.
848    While dragging, use the arrow keys to move the item.
849    Press space again to drop the item in its new position, or press escape to cancel.
850  `},d2e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was moved over droppable area "+a.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:a}=e;return a?"Draggable item "+t.id+" was dropped over droppable area "+a.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function u2e(e){let{announcements:t=d2e,container:a,hiddenTextDescribedById:s,screenReaderInstructions:r=o2e}=e;const{announce:i,announcement:l}=i2e(),d=Wm("DndLiveRegion"),[u,p]=v.useState(!1);if(v.useEffect(()=>{p(!0)},[]),c2e(v.useMemo(()=>({onDragStart(m){let{active:h}=m;i(t.onDragStart({active:h}))},onDragMove(m){let{active:h,over:y}=m;t.onDragMove&&i(t.onDragMove({active:h,over:y}))},onDragOver(m){let{active:h,over:y}=m;i(t.onDragOver({active:h,over:y}))},onDragEnd(m){let{active:h,over:y}=m;i(t.onDragEnd({active:h,over:y}))},onDragCancel(m){let{active:h,over:y}=m;i(t.onDragCancel({active:h,over:y}))}}),[i,t])),!u)return null;const x=W.createElement(W.Fragment,null,W.createElement(s2e,{id:s,value:r.draggable}),W.createElement(r2e,{id:d,announcement:l}));return a?Br.createPortal(x,a):x}var xn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(xn||(xn={}));function xv(){}function p2e(e,t){return v.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function f2e(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return v.useMemo(()=>[...t].filter(s=>s!=null),[...t])}const yr=Object.freeze({x:0,y:0});function m2e(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function x2e(e,t){const a=mv(e);
850if(!a)return"0 0";const s={x:(a.x-t.left)/t.width*100,y:(a.y-t.top)/t.height*100};return s.x+"% "+s.y+"%"}function g2e(e,t){let{data:{value:a}}=e,{data:{value:s}}=t;return a-s}function h2e(e,t){let{data:{value:a}}=e,{data:{value:s}}=t;return s-a}function v2e(e,t){if(!e||e.length===0)return null;const[a]=e;return a[t]}function n7(e,t,a){return t===void 0&&(t=e.left),a===void 0&&(a=e.top),{x:t+e.width*.5,y:a+e.height*.5}}const y2e=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:s}=e;const r=n7(t,t.left,t.top),i=[];for(const l of s){const{id:d}=l,u=a.get(d);if(u){const p=m2e(n7(u),r);i.push({id:d,data:{droppableContainer:l,value:p}})}}return i.sort(g2e)};function b2e(e,t){const a=Math.max(t.top,e.top),s=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),l=r-s,d=i-a;if(s<r&&a<i){const u=t.width*t.height,p=e.width*e.height,x=l*d,m=x/(u+p-x);return Number(m.toFixed(4))}return 0}const j2e=e=>{let{collisionRect:t,droppableRects:a,droppableContainers:s}=e;const r=[];for(const i of s){const{id:l}=i,d=a.get(l);if(d){const u=b2e(d,t);u>0&&r.push({id:l,data:{droppableContainer:i,value:u}})}}return r.sort(h2e)};function w2e(e,t,a){return{...e,scaleX:t&&a?t.width/a.width:1,scaleY:t&&a?t.height/a.height:1}}function RF(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:yr}function N2e(e){return function(a){for(var s=arguments.length,r=new Array(s>1?s-1:0),i=1;i<s;i++)r[i-1]=arguments[i];return r.reduce((l,d)=>({...l,top:l.top+e*d.y,bottom:l.bottom+e*d.y,left:l.left+e*d.x,right:l.right+e*d.x}),{...a})}}const S2e=N2e(1);function BF(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function C2e(e,t,a){const s=BF(t);if(!s)return e;const{scaleX:r,scaleY:i,x:l,y:d}=s,u=e.left-l-(1-r)*parseFloat(a),p=e.top-d-(1-i)*parseFloat(a.slice(a.indexOf(" ")+1)),x=r?e.width/r:e.width,m=i?e.height/i:e.height;return{width:x,height:m,top:p,right:u+x,bottom:p+m,left:u}}const E2e={ignoreTransform:!1};function Cu(e,t){t===void 0&&(t=E2e);let a=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:p,transformOrigin:x}=Gn(e).getComputedStyle(e);p&&(a=C2e(a,p,x))}const{top:s,left:r,width:i,height:l,bottom:d,right:u}=a;return{top:s,left:r,width:i,height:l,bottom:d,right:u}}function s7(e){return Cu(e,{ignoreTransform:!0})}function A2e(e){const t=e.innerWidth,a=e.innerHeight;return{top:0,left:0,right:t,bottom:a,width:t,height:a}}function D2e(e,t){return t===void 0&&(t=Gn(e).getComputedStyle(e)),t.position==="fixed"}function O2e(e,t){t===void 0&&(t=Gn(e).getComputedStyle(e));const a=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(r=>{const i=t[r];return typeof i=="string"?a.test(i):!1})}function y4(e,t){const a=[];function s(r){if(t!=null&&a.length>=t||!r)return a;
850if(v4(r)&&r.scrollingElement!=null&&!a.includes(r.scrollingElement))return a.push(r.scrollingElement),a;if(!qm(r)||TF(r)||a.includes(r))return a;const i=Gn(e).getComputedStyle(r);return r!==e&&O2e(r,i)&&a.push(r),D2e(r,i)?a:s(r.parentNode)}return e?s(e):a}function IF(e){const[t]=y4(e,1);return t??null}function WN(e){return!Fy||!e?null:Nu(e)?e:h4(e)?v4(e)||e===Su(e).scrollingElement?window:qm(e)?e:null:null}function LF(e){return Nu(e)?e.scrollX:e.scrollLeft}function $F(e){return Nu(e)?e.scrollY:e.scrollTop}function o5(e){return{x:LF(e),y:$F(e)}}var wn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(wn||(wn={}));function zF(e){return!Fy||!e?!1:e===document.scrollingElement}function UF(e){const t={x:0,y:0},a=zF(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={x:e.scrollWidth-a.width,y:e.scrollHeight-a.height},r=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,l=e.scrollTop>=s.y,d=e.scrollLeft>=s.x;return{isTop:r,isLeft:i,isBottom:l,isRight:d,maxScroll:s,minScroll:t}}const k2e={x:.2,y:.2};function _2e(e,t,a,s,r){let{top:i,left:l,right:d,bottom:u}=a;s===void 0&&(s=10),r===void 0&&(r=k2e);const{isTop:p,isBottom:x,isLeft:m,isRight:h}=UF(e),y={x:0,y:0},w={x:0,y:0},b={height:t.height*r.y,width:t.width*r.x};return!p&&i<=t.top+b.height?(y.y=wn.Backward,w.y=s*Math.abs((t.top+b.height-i)/b.height)):!x&&u>=t.bottom-b.height&&(y.y=wn.Forward,w.y=s*Math.abs((t.bottom-b.height-u)/b.height)),!h&&d>=t.right-b.width?(y.x=wn.Forward,w.x=s*Math.abs((t.right-b.width-d)/b.width)):!m&&l<=t.left+b.width&&(y.x=wn.Backward,w.x=s*Math.abs((t.left+b.width-l)/b.width)),{direction:y,speed:w}}function T2e(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:l}=window;return{top:0,left:0,right:i,bottom:l,width:i,height:l}}const{top:t,left:a,right:s,bottom:r}=e.getBoundingClientRect();return{top:t,left:a,right:s,bottom:r,width:e.clientWidth,height:e.clientHeight}}function qF(e){return e.reduce((t,a)=>Od(t,o5(a)),yr)}function P2e(e){return e.reduce((t,a)=>t+LF(a),0)}function M2e(e){return e.reduce((t,a)=>t+$F(a),0)}function FF(e,t){if(t===void 0&&(t=Cu),!e)return;const{top:a,left:s,bottom:r,right:i}=t(e);IF(e)&&(r<=0||i<=0||a>=window.innerHeight||s>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const R2e=[["x",["left","right"],P2e],["y",["top","bottom"],M2e]];class b4{constructor(t,a){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const s=y4(a),r=qF(s);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,l,d]of R2e)for(const u of l)Object.defineProperty(this,u,{get:()=>{const p=d(s),x=r[i]-p;return this.rect[u]+x},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class tf{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(a=>{var s;return(s=this.target)==null?void 0:s.removeEventListener(...a)})},this.target=t}add(t,a,s){var r;(r=this.target)==null||r.addEventListener(t,a,s),this.listeners.push([t,a,s])}}function B2e(e){const{EventTarget:t}=Gn(e);return e instanceof t?e:Su(e)}function HN(e,t){const a=Math.abs(e.x),s=Math.abs(e.y);return typeof t=="number"?Math.sqrt(a**2+s**2)>t:"x"in t&&"y"in t?a>t.x&&s>t.y:"x"in t?a>t.x:"y"in t?s>t.y:!1}var Vs;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Vs||(Vs={}));function r7(e){e.preventDefault()}function I2e(e){e.stopPropagation()}var sa;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(sa||(sa={}));const WF={start:[sa.Space,sa.Enter],cancel:[sa.Esc],end:[sa.Space,sa.Enter,sa.Tab]},L2e=(e,t)=>{let{currentCoordinates:a}=t;switch(e.code){case sa.Right:return{...a,x:a.x+25};case sa.Left:return{...a,x:a.x-25};case sa.Down:return{...a,y:a.y+25};case sa.Up:return{...a,y:a.y-25}}};class HF{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:a}}=t;this.props=t,this.listeners=new tf(Su(a)),this.windowListeners=new tf(Gn(a)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Vs.Resize,this.handleCancel),this.windowListeners.add(Vs.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Vs.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:a}=this.props,s=t.node.current;s&&FF(s),a(yr)}handleKeyDown(t){if(Hy(t)){const{active:a,context:s,options:r}=this.props,{keyboardCodes:i=WF,coordinateGetter:l=L2e,scrollBehavior:d="smooth"}=r,{code:u}=t;if(i.end.includes(u)){this.handleEnd(t);return}if(i.cancel.includes(u)){this.handleCancel(t);return}const{collisionRect:p}=s.current,x=p?{x:p.left,y:p.top}:yr;this.referenceCoordinates||(this.referenceCoordinates=x);const m=l(t,{active:a,context:s.current,currentCoordinates:x});if(m){const h=fv(m,x),y={x:0,y:0},{scrollableAncestors:w}=s.current;for(const b of w){const j=t.code,{isTop:S,isRight:O,isLeft:A,isBottom:k,maxScroll:E,minScroll:D}=UF(b),_=T2e(b),T={x:Math.min(j===sa.Right?_.right-_.width/2:_.right,Math.max(j===sa.Right?_.left:_.left+_.width/2,m.x)),y:Math.min(j===sa.Down?_.bottom-_.height/2:_.bottom,Math.max(j===sa.Down?_.top:_.top+_.height/2,m.y))},I=j===sa.Right&&!O||j===sa.Left&&!A,$=j===sa.Down&&!k||j===sa.Up&&!S;
850if(I&&T.x!==m.x){const R=b.scrollLeft+h.x,B=j===sa.Right&&R<=E.x||j===sa.Left&&R>=D.x;if(B&&!h.y){b.scrollTo({left:R,behavior:d});return}B?y.x=b.scrollLeft-R:y.x=j===sa.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,y.x&&b.scrollBy({left:-y.x,behavior:d});break}else if($&&T.y!==m.y){const R=b.scrollTop+h.y,B=j===sa.Down&&R<=E.y||j===sa.Up&&R>=D.y;if(B&&!h.x){b.scrollTo({top:R,behavior:d});return}B?y.y=b.scrollTop-R:y.y=j===sa.Down?b.scrollTop-E.y:b.scrollTop-D.y,y.y&&b.scrollBy({top:-y.y,behavior:d});break}}this.handleMove(t,Od(fv(m,this.referenceCoordinates),y))}}}handleMove(t,a){const{onMove:s}=this.props;t.preventDefault(),s(a)}handleEnd(t){const{onEnd:a}=this.props;t.preventDefault(),this.detach(),a()}handleCancel(t){const{onCancel:a}=this.props;t.preventDefault(),this.detach(),a()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}HF.activators=[{eventName:"onKeyDown",handler:(e,t,a)=>{let{keyboardCodes:s=WF,onActivation:r}=t,{active:i}=a;const{code:l}=e.nativeEvent;if(s.start.includes(l)){const d=i.activatorNode.current;return d&&e.target!==d?!1:(e.preventDefault(),r?.({event:e.nativeEvent}),!0)}return!1}}];function i7(e){return!!(e&&"distance"in e)}function c7(e){return!!(e&&"delay"in e)}class j4{constructor(t,a,s){var r;s===void 0&&(s=B2e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=a;const{event:i}=t,{target:l}=i;this.props=t,this.events=a,this.document=Su(l),this.documentListeners=new tf(this.document),this.listeners=new tf(s),this.windowListeners=new tf(Gn(l)),this.initialCoordinates=(r=mv(i))!=null?r:yr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:a,bypassActivationConstraint:s}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Vs.Resize,this.handleCancel),this.windowListeners.add(Vs.DragStart,r7),this.windowListeners.add(Vs.VisibilityChange,this.handleCancel),this.windowListeners.add(Vs.ContextMenu,r7),this.documentListeners.add(Vs.Keydown,this.handleKeydown),a){if(s!=null&&s({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(c7(a)){this.timeoutId=setTimeout(this.handleStart,a.delay),this.handlePending(a);return}if(i7(a)){this.handlePending(a);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,a){const{active:s,onPending:r}=this.props;r(s,t,this.initialCoordinates,a)}handleStart(){const{initialCoordinates:t}=this,{onStart:a}=this.props;t&&(this.activated=!0,this.documentListeners.add(Vs.Click,I2e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Vs.SelectionChange,this.removeTextSelection),a(t))}handleMove(t){var a;const{activated:s,initialCoordinates:r,props:i}=this,{onMove:l,options:{activationConstraint:d}}=i;if(!r)return;const u=(a=mv(t))!=null?a:yr,p=fv(r,u);if(!s&&d){if(i7(d)){if(d.tolerance!=null&&HN(p,d.tolerance))return this.handleCancel();if(HN(p,d.distance))return this.handleStart()}if(c7(d)&&HN(p,d.tolerance))return this.handleCancel();this.handlePending(d,p);return}t.cancelable&&t.preventDefault(),l(u)}handleEnd(){const{onAbort:t,onEnd:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleCancel(){const{onAbort:t,onCancel:a}=this.props;this.detach(),this.activated||t(this.props.active),a()}handleKeydown(t){t.code===sa.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const $2e={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class w4 extends j4{constructor(t){const{event:a}=t,s=Su(a.target);super(t,$2e,s)}}w4.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:s}=t;return!a.isPrimary||a.button!==0?!1:(s?.({event:a}),!0)}}];const z2e={move:{name:"mousemove"},end:{name:"mouseup"}};var d5;(function(e){e[e.RightClick=2]="RightClick"})(d5||(d5={}));class U2e extends j4{constructor(t){super(t,z2e,Su(t.event.target))}}U2e.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:s}=t;return a.button===d5.RightClick?!1:(s?.({event:a}),!0)}}];const VN={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class q2e extends j4{constructor(t){super(t,VN)}static setup(){return window.addEventListener(VN.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(VN.move.name,t)};function t(){}}}q2e.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:a}=e,{onActivation:s}=t;const{touches:r}=a;return r.length>1?!1:(s?.({event:a}),!0)}}];var af;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(af||(af={}));var gv;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="Rever
850sedTreeOrder"})(gv||(gv={}));function F2e(e){let{acceleration:t,activator:a=af.Pointer,canScroll:s,draggingRect:r,enabled:i,interval:l=5,order:d=gv.TreeOrder,pointerCoordinates:u,scrollableAncestors:p,scrollableAncestorRects:x,delta:m,threshold:h}=e;const y=H2e({delta:m,disabled:!i}),[w,b]=Jwe(),j=v.useRef({x:0,y:0}),S=v.useRef({x:0,y:0}),O=v.useMemo(()=>{switch(a){case af.Pointer:return u?{top:u.y,bottom:u.y,left:u.x,right:u.x}:null;case af.DraggableRect:return r}},[a,r,u]),A=v.useRef(null),k=v.useCallback(()=>{const D=A.current;if(!D)return;const _=j.current.x*S.current.x,T=j.current.y*S.current.y;D.scrollBy(_,T)},[]),E=v.useMemo(()=>d===gv.TreeOrder?[...p].reverse():p,[d,p]);v.useEffect(()=>{if(!i||!p.length||!O){b();return}for(const D of E){if(s?.(D)===!1)continue;const _=p.indexOf(D),T=x[_];if(!T)continue;const{direction:I,speed:$}=_2e(D,T,O,t,h);for(const R of["x","y"])y[R][I[R]]||($[R]=0,I[R]=0);if($.x>0||$.y>0){b(),A.current=D,w(k,l),j.current=$,S.current=I;return}}j.current={x:0,y:0},S.current={x:0,y:0},b()},[t,k,s,b,i,l,JSON.stringify(O),JSON.stringify(y),w,p,E,x,JSON.stringify(h)])}const W2e={x:{[wn.Backward]:!1,[wn.Forward]:!1},y:{[wn.Backward]:!1,[wn.Forward]:!1}};function H2e(e){let{delta:t,disabled:a}=e;const s=pv(t);return Fm(r=>{if(a||!s||!r)return W2e;const i={x:Math.sign(t.x-s.x),y:Math.sign(t.y-s.y)};return{x:{[wn.Backward]:r.x[wn.Backward]||i.x===-1,[wn.Forward]:r.x[wn.Forward]||i.x===1},y:{[wn.Backward]:r.y[wn.Backward]||i.y===-1,[wn.Forward]:r.y[wn.Forward]||i.y===1}}},[a,t,s])}function V2e(e,t){const a=t!=null?e.get(t):void 0,s=a?a.node.current:null;return Fm(r=>{var i;return t==null?null:(i=s??r)!=null?i:null},[s,t])}function G2e(e,t){return v.useMemo(()=>e.reduce((a,s)=>{const{sensor:r}=s,i=r.activators.map(l=>({eventName:l.eventName,handler:t(l.handler,s)}));return[...a,...i]},[]),[e,t])}var gm;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(gm||(gm={}));var u5;(function(e){e.Optimized="optimized"})(u5||(u5={}));const l7=new Map;function Y2e(e,t){let{dragging:a,dependencies:s,config:r}=t;const[i,l]=v.useState(null),{frequency:d,measure:u,strategy:p}=r,x=v.useRef(e),m=j(),h=xm(m),y=v.useCallback(function(S){S===void 0&&(S=[]),!h.current&&l(O=>O===null?S:O.concat(S.filter(A=>!O.includes(A))))},[h]),w=v.useRef(null),b=Fm(S=>{if(m&&!a)return l7;if(!S||S===l7||x.current!==e||i!=null){const O=new Map;for(let A of e){if(!A)continue;if(i&&i.length>0&&!i.includes(A.id)&&A.rect.current){O.set(A.id,A.rect.current);continue}const k=A.node.current,E=k?new b4(u(k),k):null;A.rect.current=E,E&&O.set(A.id,E)}return O}return S},[e,i,a,m,u]);return v.useEffect(()=>{x.current=e},[e]),v.useEffect(()=>{m||y()},[a,m]),v.useEffect(()=>{i&&i.length>0&&l(null)},[JSON.stringify(i)]),v.useEffect(()=>{m||typeof d!="number"||w.current!==null||(w.current=setTimeout(()=>{y(),w.current=null},d))},[d,m,y,...s]),{droppableRects:b,measureDroppableContainers:y,measuringScheduled:i!=null};function j(){switch(p){case gm.Always:return!1;case gm.BeforeDragging:return a;default:return!a}}}function N4(e,t){return Fm(a=>e?a||(typeof t=="function"?t(e):e):null,[t,e])}function K2e(e,t){return N4(e,t)}function Q2e(e){let{callback:t,disabled:a}=e;const s=Wy(t),r=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(s)},[s,a]);return v.useEffect(()=>()=>r?.disconnect(),[r]),r}function Vy(e){let{callback:t,disabled:a}=e;const s=Wy(t),r=v.useMemo(()=>{if(a||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(s)},[a]);return v.useEffect(()=>()=>r?.disconnect(),[r]),r}function X2e(e){return new b4(Cu(e),e)}function o7(e,t,a){t===void 0&&(t=X2e);const[s,r]=v.useState(null);function i(){r(u=>{if(!e)return null;if(e.isConnected===!1){var p;return(p=u??a)!=null?p:null}const x=t(e);return JSON.stringify(u)===JSON.stringify(x)?u:x})}const l=Q2e({callback(u){if(e)for(const p of u){const{type:x,target:m}=p;if(x==="childList"&&m instanceof HTMLElement&&m.contains(e)){i();break}}}}),d=Vy({callback:i});return vr(()=>{i(),e?(d?.observe(e),l?.observe(document.body,{childList:!0,subtree:!0})):(d?.disconnect(),l?.disconnect())},[e]),s}function Z2e(e){const t=N4(e);return RF(e,t)}const d7=[];function J2e(e){const t=v.useRef(e),a=Fm(s=>e?s&&s!==d7&&e&&t.current&&e.parentNode===t.current.parentNode?s:y4(e):d7,[e]);return v.useEffect(()=>{t.current=e},[e]),a}function eNe(e){const[t,a]=v.useState(null),s=v.useRef(e),r=v.useCallback(i=>{const l=WN(i.target);l&&a(d=>d?(d.set(l,o5(l)),new Map(d)):null)},[]);return v.useEffect(()=>{const i=s.current;if(e!==i){l(i);const d=e.map(u=>{const p=WN(u);return p?(p.addEventListener("scroll",r,{passive:!0}),[p,o5(p)]):null}).filter(u=>u!=null);a(d.length?new Map(d):null),s.current=e}return()=>{l(e),l(i)};function l(d){d.forEach(u=>{const p=WN(u);p?.removeEventListener("scroll",r)})}},[r,e]),v.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,l)=>Od(i,l),yr):qF(e):yr,[e,t])}function u7(e,t){t===void 0&&(t=[]);const a=v.useRef(null);return v.useEffect(()=>{a.current=null},t),v.useEffect(()=>{const s=e!==yr;s&&!a.current&&(a.current=e),!s&&a.current&&(a.current=null)},[e]),a.current?fv(e,a.current):yr}function tNe(e){v.useEffect(()=>{if(!Fy)return;const t=e.map(a=>{let{sensor:s}=a;return s.setup==null?void 0:s.setup()});return()=>{for(const a of t)a?.()}},e.map(t=>{let{sensor:a}=t;return a}))}function aNe(e,t){return v.useMemo(()=>e.reduce((a,s)=>{let{eventName:r,handler:i}=s;return a[r]=l=>{i(l,t)},a},{}),[e,t])}function VF(e){return v.useMemo(()=>e?A2e(e):null,[e])}const p7=[];function nNe(e,t){t===void 0&&(t=Cu);const[a]=e,s=VF(a?Gn(a):null),[r,i]=v.useState(p7);function l(){i(()=>e.length?e.map(u=>zF(u)?s:new b4(t(u),u)):p7)}const d=Vy({callback:l});return vr(()=>{d?.disconnect(),l(),e.forEach(u=>d?.observe(u))},[e]),r}function GF(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return qm(t)?t:e}function sNe(e){let{measure:t}=e;const[a,s]=v.useState(null),r=v.useCallback(p=>{for(const{target:x}of p)if(qm(x)){s(m=>{const h=t(x);return m?{...m,width:h.width,height:h.height}:h});break}},[t]),i=Vy({callback:r}),l=v.useCallback(p=>{const x=GF(p);i?.disconnect(),x&&i?.observe(x),s(x?t(x):null)},[t,i]),[d,u]=uv(l);return v.useMemo(()=>({nodeRef:d,rect:a,setRef:u}),[a,d,u])}const rNe=[{sensor:w4,options:{}},{sensor:HF,options:{}}],iNe={current:{}},Jg={draggable:{measure:s7},droppable:{measure:s7,strategy:gm.WhileDragging,frequency:u5.Optimized},dragOverlay:{measure:Cu}};
850class nf extends Map{get(t){var a;return t!=null&&(a=super.get(t))!=null?a:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:a}=t;return!a})}getNodeFor(t){var a,s;return(a=(s=this.get(t))==null?void 0:s.node.current)!=null?a:void 0}}const cNe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new nf,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:xv},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Jg,measureDroppableContainers:xv,windowRect:null,measuringScheduled:!1},YF={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:xv,draggableNodes:new Map,over:null,measureDroppableContainers:xv},Hm=v.createContext(YF),KF=v.createContext(cNe);function lNe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new nf}}}function oNe(e,t){switch(t.type){case xn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case xn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case xn.DragEnd:case xn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case xn.RegisterDroppable:{const{element:a}=t,{id:s}=a,r=new nf(e.droppable.containers);return r.set(s,a),{...e,droppable:{...e.droppable,containers:r}}}case xn.SetDroppableDisabled:{const{id:a,key:s,disabled:r}=t,i=e.droppable.containers.get(a);if(!i||s!==i.key)return e;const l=new nf(e.droppable.containers);return l.set(a,{...i,disabled:r}),{...e,droppable:{...e.droppable,containers:l}}}case xn.UnregisterDroppable:{const{id:a,key:s}=t,r=e.droppable.containers.get(a);if(!r||s!==r.key)return e;const i=new nf(e.droppable.containers);return i.delete(a),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function dNe(e){let{disabled:t}=e;const{active:a,activatorEvent:s,draggableNodes:r}=v.useContext(Hm),i=pv(s),l=pv(a?.id);return v.useEffect(()=>{if(!t&&!s&&i&&l!=null){if(!Hy(i)||document.activeElement===i.target)return;const d=r.get(l);if(!d)return;const{activatorNode:u,node:p}=d;if(!u.current&&!p.current)return;requestAnimationFrame(()=>{for(const x of[u.current,p.current]){if(!x)continue;const m=a2e(x);if(m){m.focus();break}}})}},[s,t,r,l,i]),null}function QF(e,t){let{transform:a,...s}=t;return e!=null&&e.length?e.reduce((r,i)=>i({transform:r,...s}),a):a}function uNe(e){return v.useMemo(()=>({draggable:{...Jg.draggable,...e?.draggable},droppable:{...Jg.droppable,...e?.droppable},dragOverlay:{...Jg.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function pNe(e){let{activeNode:t,measure:a,initialRect:s,config:r=!0}=e;const i=v.useRef(!1),{x:l,y:d}=typeof r=="boolean"?{x:r,y:r}:r;vr(()=>{if(!l&&!d||!t){i.current=!1;return}if(i.current||!s)return;const p=t?.node.current;if(!p||p.isConnected===!1)return;const x=a(p),m=RF(x,s);if(l||(m.x=0),d||(m.y=0),i.current=!0,Math.abs(m.x)>0||Math.abs(m.y)>0){const h=IF(p);h&&h.scrollBy({top:m.y,left:m.x})}},[t,l,d,s,a])}const Gy=v.createContext({...yr,scaleX:1,scaleY:1});var Oc;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Oc||(Oc={}));const fNe=v.memo(function(t){var a,s,r,i;let{id:l,accessibility:d,autoScroll:u=!0,children:p,sensors:x=rNe,collisionDetection:m=j2e,measuring:h,modifiers:y,...w}=t;const b=v.useReducer(oNe,void 0,lNe),[j,S]=b,[O,A]=l2e(),[k,E]=v.useState(Oc.Uninitialized),D=k===Oc.Initialized,{draggable:{active:_,nodes:T,translate:I},droppable:{containers:$}}=j,R=_!=null?T.get(_):null,B=v.useRef({initial:null,translated:null}),Y=v.useMemo(()=>{var Ye;return _!=null?{id:_,data:(Ye=R?.data)!=null?Ye:iNe,rect:B}:null},[_,R]),z=v.useRef(null),[Q,L]=v.useState(null),[M,U]=v.useState(null),Z=xm(w,Object.values(w)),ie=Wm("DndDescribedBy",l),G=v.useMemo(()=>$.getEnabled(),[$]),F=uNe(h),{droppableRects:H,measureDroppableContainers:q,measuringScheduled:J}
850=Y2e(G,{dragging:D,dependencies:[I.x,I.y],config:F.droppable}),ce=V2e(T,_),se=v.useMemo(()=>M?mv(M):null,[M]),ye=qe(),de=K2e(ce,F.draggable.measure);pNe({activeNode:_!=null?T.get(_):null,config:ye.layoutShiftCompensation,initialRect:de,measure:F.draggable.measure});const ve=o7(ce,F.draggable.measure,de),Pe=o7(ce?ce.parentElement:null),ue=v.useRef({activatorEvent:null,active:null,activeNode:ce,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:$,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Qe=$.getNodeFor((a=ue.current.over)==null?void 0:a.id),Ue=sNe({measure:F.dragOverlay.measure}),xe=(s=Ue.nodeRef.current)!=null?s:ce,$e=D?(r=Ue.rect)!=null?r:ve:null,Te=!!(Ue.nodeRef.current&&Ue.rect),dt=Z2e(Te?null:ve),tt=VF(xe?Gn(xe):null),me=J2e(D?Qe??ce:null),ut=nNe(me),pt=QF(y,{transform:{x:I.x-dt.x,y:I.y-dt.y,scaleX:1,scaleY:1},activatorEvent:M,active:Y,activeNodeRect:ve,containerNodeRect:Pe,draggingNodeRect:$e,over:ue.current.over,overlayNodeRect:Ue.rect,scrollableAncestors:me,scrollableAncestorRects:ut,windowRect:tt}),ft=se?Od(se,I):null,_t=eNe(me),da=u7(_t),vt=u7(_t,[ve]),Xt=Od(pt,da),Ct=$e?S2e($e,pt):null,Zt=Y&&Ct?m({active:Y,collisionRect:Ct,droppableRects:H,droppableContainers:G,pointerCoordinates:ft}):null,xa=v2e(Zt,"id"),[Sa,Da]=v.useState(null),Va=Te?pt:Od(pt,vt),X=w2e(Va,(i=Sa?.rect)!=null?i:null,ve),Re=v.useRef(null),Ve=v.useCallback((Ye,at)=>{let{sensor:Ge,options:Mt}=at;if(z.current==null)return;const zt=T.get(z.current);if(!zt)return;const Ie=Ye.nativeEvent,ua=new Ge({active:z.current,activeNode:zt,event:Ie,options:Mt,context:ue,onAbort(Lt){if(!T.get(Lt))return;const{onDragAbort:ga}=Z.current,Ca={id:Lt};ga?.(Ca),O({type:"onDragAbort",event:Ca})},onPending(Lt,be,ga,Ca){if(!T.get(Lt))return;const{onDragPending:Ga}=Z.current,Kn={id:Lt,constraint:be,initialCoordinates:ga,offset:Ca};Ga?.(Kn),O({type:"onDragPending",event:Kn})},onStart(Lt){const be=z.current;if(be==null)return;const ga=T.get(be);if(!ga)return;const{onDragStart:Ca}=Z.current,Yn={activatorEvent:Ie,active:{id:be,data:ga.data,rect:B}};Br.unstable_batchedUpdates(()=>{Ca?.(Yn),E(Oc.Initializing),S({type:xn.DragStart,initialCoordinates:Lt,active:be}),O({type:"onDragStart",event:Yn}),L(Re.current),U(Ie)})},onMove(Lt){S({type:xn.DragMove,coordinates:Lt})},onEnd:Ht(xn.DragEnd),onCancel:Ht(xn.DragCancel)});Re.current=ua;function Ht(Lt){return async function(){const{active:ga,collisions:Ca,over:Yn,scrollAdjustedTranslate:Ga}=ue.current;let Kn=null;if(ga&&Ga){const{cancelDrop:Sr}=Z.current;Kn={activatorEvent:Ie,active:ga,collisions:Ca,delta:Ga,over:Yn},Lt===xn.DragEnd&&typeof Sr=="function"&&await Promise.resolve(Sr(Kn))&&(Lt=xn.DragCancel)}z.current=null,Br.unstable_batchedUpdates(()=>{S({type:Lt}),E(Oc.Uninitialized),Da(null),L(null),U(null),Re.current=null;const Sr=Lt===xn.DragEnd?"onDragEnd":"onDragCancel";if(Kn){const Qn=Z.current[Sr];Qn?.(Kn),O({type:Sr,event:Kn})}})}}},[T]),bt=v.useCallback((Ye,at)=>(Ge,Mt)=>{const zt=Ge.nativeEvent,Ie=T.get(Mt);if(z.current!==null||!Ie||zt.dndKit||zt.defaultPrevented)return;const ua={active:Ie};Ye(Ge,at.options,ua)===!0&&(zt.dndKit={capturedBy:at.sensor},z.current=Mt,Ve(Ge,at))},[T,Ve]),Be=G2e(x,bt);tNe(x),vr(()=>{ve&&k===Oc.Initializing&&E(Oc.Initialized)},[ve,k]),v.useEffect(()=>{const{onDragMove:Ye}=Z.current,{active:at,activatorEvent:Ge,collisions:Mt,over:zt}=ue.current;if(!at||!Ge)return;const Ie={active:at,activatorEvent:Ge,collisions:Mt,delta:{x:Xt.x,y:Xt.y},over:zt};Br.unstable_batchedUpdates(()=>{Ye?.(Ie),O({type:"onDragMove",event:Ie})})},[Xt.x,Xt.y]),v.useEffect(()=>{const{active:Ye,activatorEvent:at,collisions:Ge,droppableContainers:Mt,scrollAdjustedTranslate:zt}=ue.current;if(!Ye||z.current==null||!at||!zt)return;const{onDragOver:Ie}=Z.current,ua=Mt.get(xa),Ht=ua&&ua.rect.current?{id:ua.id,rect:ua.rect.current,data:ua.data,disabled:ua.disabled}:null,Lt={active:Ye,activatorEvent:at,collisions:Ge,delta:{x:zt.x,y:zt.y},over:Ht};Br.unstable_batchedUpdates(()=>{Da(Ht),Ie?.(Lt),O({type:"onDragOver",event:Lt})})},[xa]),vr(()=>{ue.current={activatorEvent:M,active:Y,activeNode:ce,collisionRect:Ct,collisions:Zt,droppableRects:H,draggableNodes:T,draggingNode:xe,draggingNodeRect:$e,droppableContainers:$,over:Sa,scrollableAncestors:me,scrollAdjustedTranslate:Xt},B.current={initial:$e,translated:Ct}},[Y,ce,Zt,Ct,T,xe,$e,H,$,Sa,me,Xt]),F2e({...ye,delta:I,draggingRect:Ct,pointerCoordinates:ft,scrollableAncestors:me,scrollableAncestorRects:ut});const ee=v.useMemo(()=>({active:Y,activeNode:ce,activeNodeRect:ve,activatorEvent:M,collisions:Zt,containerNodeRect:Pe,dragOverlay:Ue,draggableNodes:T,droppableContainers:$,droppableRects:H,over:Sa,measureDroppableContainers:q,scrollableAncestors:me,scrollableAncestorRects:ut,measuringConfiguration:F,measuringScheduled:J,windowRect:tt}),[Y,ce,ve,M,Zt,Pe,Ue,T,$,H,Sa,q,me,ut,F,J,tt]),ke=v.useMemo(()=>({activatorEvent:M,activators:Be,active:Y,activeNodeRect:ve,ariaDescribedById:{draggable:ie},dispatch:S,draggableNodes:T,over:Sa,measureDroppableContainers:q}),[M,Be,Y,ve,S,ie,T,Sa,q]);return W.createElement(MF.Provider,{value:A},W.createElement(Hm.Provider,{value:ke},W.createElement(KF.Provider,{value:ee},W.createElement(Gy.Provider,{value:X},p)),W.createElement(dNe,{disabled:d?.restoreFocus===!1})),W.createElement(u2e,{...d,hiddenTextDescribedById:ie}));function qe(){const Ye=Q?.autoScrollEnabled===!1,at=typeof u=="object"?u.enabled===!1:u===!1,Ge=D&&!Ye&&!at;return typeof u=="object"?{...u,enabled:Ge}:{enabled:Ge}}}),mNe=v.createContext(null),f7="button",xNe="Draggable";function gNe(e){let{id:t,data:a,disabled:s=!1,attributes:r}=e;const i=Wm(xNe),{activators:l,activatorEvent:d,active:u,activeNodeRect:p,ariaDescribedById:x,draggableNodes:m,over:h}=v.useContext(Hm),{role:y=f7,roleDescription:w="draggable",tabIndex:b=0}=r??{}
850,j=u?.id===t,S=v.useContext(j?Gy:mNe),[O,A]=uv(),[k,E]=uv(),D=aNe(l,t),_=xm(a);vr(()=>(m.set(t,{id:t,key:i,node:O,activatorNode:k,data:_}),()=>{const I=m.get(t);I&&I.key===i&&m.delete(t)}),[m,t]);const T=v.useMemo(()=>({role:y,tabIndex:b,"aria-disabled":s,"aria-pressed":j&&y===f7?!0:void 0,"aria-roledescription":w,"aria-describedby":x.draggable}),[s,y,b,j,w,x.draggable]);return{active:u,activatorEvent:d,activeNodeRect:p,attributes:T,isDragging:j,listeners:s?void 0:D,node:O,over:h,setNodeRef:A,setActivatorNodeRef:E,transform:S}}function XF(){return v.useContext(KF)}const hNe="Droppable",vNe={timeout:25};function yNe(e){let{data:t,disabled:a=!1,id:s,resizeObserverConfig:r}=e;const i=Wm(hNe),{active:l,dispatch:d,over:u,measureDroppableContainers:p}=v.useContext(Hm),x=v.useRef({disabled:a}),m=v.useRef(!1),h=v.useRef(null),y=v.useRef(null),{disabled:w,updateMeasurementsFor:b,timeout:j}={...vNe,...r},S=xm(b??s),O=v.useCallback(()=>{if(!m.current){m.current=!0;return}y.current!=null&&clearTimeout(y.current),y.current=setTimeout(()=>{p(Array.isArray(S.current)?S.current:[S.current]),y.current=null},j)},[j]),A=Vy({callback:O,disabled:w||!l}),k=v.useCallback((T,I)=>{A&&(I&&(A.unobserve(I),m.current=!1),T&&A.observe(T))},[A]),[E,D]=uv(k),_=xm(t);return v.useEffect(()=>{!A||!E.current||(A.disconnect(),m.current=!1,A.observe(E.current))},[E,A]),v.useEffect(()=>(d({type:xn.RegisterDroppable,element:{id:s,key:i,disabled:a,node:E,rect:h,data:_}}),()=>d({type:xn.UnregisterDroppable,key:i,id:s})),[s]),v.useEffect(()=>{a!==x.current.disabled&&(d({type:xn.SetDroppableDisabled,id:s,key:i,disabled:a}),x.current.disabled=a)},[s,i,a,d]),{active:l,rect:h,isOver:u?.id===s,node:E,over:u,setNodeRef:D}}function bNe(e){let{animation:t,children:a}=e;const[s,r]=v.useState(null),[i,l]=v.useState(null),d=pv(a);return!a&&!s&&d&&r(d),vr(()=>{if(!i)return;const u=s?.key,p=s?.props.id;if(u==null||p==null){r(null);return}Promise.resolve(t(p,i)).then(()=>{r(null)})},[t,s,i]),W.createElement(W.Fragment,null,a,s?v.cloneElement(s,{ref:l}):null)}const jNe={x:0,y:0,scaleX:1,scaleY:1};function wNe(e){let{children:t}=e;return W.createElement(Hm.Provider,{value:YF},W.createElement(Gy.Provider,{value:jNe},t))}const NNe={position:"fixed",touchAction:"none"},SNe=e=>Hy(e)?"transform 250ms ease":void 0,CNe=v.forwardRef((e,t)=>{let{as:a,activatorEvent:s,adjustScale:r,children:i,className:l,rect:d,style:u,transform:p,transition:x=SNe}=e;if(!d)return null;const m=r?p:{...p,scaleX:1,scaleY:1},h={...NNe,width:d.width,height:d.height,top:d.top,left:d.left,transform:Qc.Transform.toString(m),transformOrigin:r&&s?x2e(s,d):void 0,transition:typeof x=="function"?x(s):x,...u};return W.createElement(a,{className:l,style:h,ref:t},i)}),ENe=e=>t=>{let{active:a,dragOverlay:s}=t;const r={},{styles:i,className:l}=e;if(i!=null&&i.active)for(const[d,u]of Object.entries(i.active))u!==void 0&&(r[d]=a.node.style.getPropertyValue(d),a.node.style.setProperty(d,u));if(i!=null&&i.dragOverlay)for(const[d,u]of Object.entries(i.dragOverlay))u!==void 0&&s.node.style.setProperty(d,u);return l!=null&&l.active&&a.node.classList.add(l.active),l!=null&&l.dragOverlay&&s.node.classList.add(l.dragOverlay),function(){for(const[u,p]of Object.entries(r))a.node.style.setProperty(u,p);l!=null&&l.active&&a.node.classList.remove(l.active)}},ANe=e=>{let{transform:{initial:t,final:a}}=e;return[{transform:Qc.Transform.toString(t)},{transform:Qc.Transform.toString(a)}]},DNe={duration:250,easing:"ease",keyframes:ANe,sideEffects:ENe({styles:{active:{opacity:"0"}}})};function ONe(e){let{config:t,draggableNodes:a,droppableContainers:s,measuringConfiguration:r}=e;return Wy((i,l)=>{if(t===null)return;const d=a.get(i);if(!d)return;const u=d.node.current;if(!u)return;const p=GF(l);if(!p)return;const{transform:x}=Gn(l).getComputedStyle(l),m=BF(x);if(!m)return;const h=typeof t=="function"?t:kNe(t);return FF(u,r.draggable.measure),h({active:{id:i,data:d.data,node:u,rect:r.draggable.measure(u)},draggableNodes:a,dragOverlay:{node:l,rect:r.dragOverlay.measure(p)},droppableContainers:s,measuringConfiguration:r,transform:m})})}function kNe(e){const{duration:t,easing:a,sideEffects:s,keyframes:r}={...DNe,...e};return i=>{let{active:l,dragOverlay:d,transform:u,...p}=i;if(!t)return;const x={x:d.rect.left-l.rect.left,y:d.rect.top-l.rect.top},m={scaleX:u.scaleX!==1?l.rect.width*u.scaleX/d.rect.width:1,scaleY:u.scaleY!==1?l.rect.height*u.scaleY/d.rect.height:1},h={x:u.x-x.x,y:u.y-x.y,...m},y=r({...p,active:l,dragOverlay:d,transform:{initial:u,final:h}}),[w]=y,b=y[y.length-1];if(JSON.stringify(w)===JSON.stringify(b))return;const j=s?.({active:l,dragOverlay:d,...p}),S=d.node.animate(y,{duration:t,easing:a,fill:"forwards"});return new Promise(O=>{S.onfinish=()=>{j?.(),O()}})}}let m7=0;function _Ne(e){return v.useMemo(()=>
850{if(e!=null)return m7++,m7},[e])}const TNe=W.memo(e=>{let{adjustScale:t=!1,children:a,dropAnimation:s,style:r,transition:i,modifiers:l,wrapperElement:d="div",className:u,zIndex:p=999}=e;const{activatorEvent:x,active:m,activeNodeRect:h,containerNodeRect:y,draggableNodes:w,droppableContainers:b,dragOverlay:j,over:S,measuringConfiguration:O,scrollableAncestors:A,scrollableAncestorRects:k,windowRect:E}=XF(),D=v.useContext(Gy),_=_Ne(m?.id),T=QF(l,{activatorEvent:x,active:m,activeNodeRect:h,containerNodeRect:y,draggingNodeRect:j.rect,over:S,overlayNodeRect:j.rect,scrollableAncestors:A,scrollableAncestorRects:k,transform:D,windowRect:E}),I=N4(h),$=ONe({config:s,draggableNodes:w,droppableContainers:b,measuringConfiguration:O}),R=I?j.setRef:void 0;return W.createElement(wNe,null,W.createElement(bNe,{animation:$},m&&_?W.createElement(CNe,{key:_,id:m.id,ref:R,as:d,activatorEvent:x,adjustScale:t,className:u,transition:i,rect:I,style:{zIndex:p,...r},transform:T},a):null))});function hv(e,t,a){const s=e.slice();return s.splice(a<0?s.length+a:a,0,s.splice(t,1)[0]),s}function PNe(e,t){return e.reduce((a,s,r)=>{const i=t.get(s);return i&&(a[r]=i),a},Array(e.length))}function Lg(e){return e!==null&&e>=0}function MNe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++)if(e[a]!==t[a])return!1;return!0}function RNe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ZF=e=>{let{rects:t,activeIndex:a,overIndex:s,index:r}=e;const i=hv(t,s,a),l=t[r],d=i[r];return!d||!l?null:{x:d.left-l.left,y:d.top-l.top,scaleX:d.width/l.width,scaleY:d.height/l.height}},$g={scaleX:1,scaleY:1},x7=e=>{var t;let{activeIndex:a,activeNodeRect:s,index:r,rects:i,overIndex:l}=e;const d=(t=i[a])!=null?t:s;if(!d)return null;if(r===a){const p=i[l];return p?{x:0,y:a<l?p.top+p.height-(d.top+d.height):p.top-d.top,...$g}:null}const u=BNe(i,r,a);return r>a&&r<=l?{x:0,y:-d.height-u,...$g}:r<a&&r>=l?{x:0,y:d.height+u,...$g}:{x:0,y:0,...$g}};function BNe(e,t,a){const s=e[t],r=e[t-1],i=e[t+1];return s?a<t?r?s.top-(r.top+r.height):i?i.top-(s.top+s.height):0:i?i.top-(s.top+s.height):r?s.top-(r.top+r.height):0:0}const JF="Sortable",eW=W.createContext({activeIndex:-1,containerId:JF,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ZF,disabled:{draggable:!1,droppable:!1}});function g7(e){let{children:t,id:a,items:s,strategy:r=ZF,disabled:i=!1}=e;const{active:l,dragOverlay:d,droppableRects:u,over:p,measureDroppableContainers:x}=XF(),m=Wm(JF,a),h=d.rect!==null,y=v.useMemo(()=>s.map(D=>typeof D=="object"&&"id"in D?D.id:D),[s]),w=l!=null,b=l?y.indexOf(l.id):-1,j=p?y.indexOf(p.id):-1,S=v.useRef(y),O=!MNe(y,S.current),A=j!==-1&&b===-1||O,k=RNe(i);vr(()=>{O&&w&&x(y)},[O,y,w,x]),v.useEffect(()=>{S.current=y},[y]);const E=v.useMemo(()=>({activeIndex:b,containerId:m,disabled:k,disableTransforms:A,items:y,overIndex:j,useDragOverlay:h,sortedRects:PNe(y,u),strategy:r}),[b,m,k.draggable,k.droppable,A,y,j,u,h,r]);return W.createElement(eW.Provider,{value:E},t)}const INe=e=>{let{id:t,items:a,activeIndex:s,overIndex:r}=e;return hv(a,s,r).indexOf(t)},LNe=e=>{let{containerId:t,isSorting:a,wasDragging:s,index:r,items:i,newIndex:l,previousItems:d,previousContainerId:u,transition:p}=e;return!p||!s||d!==i&&r===l?!1:a?!0:l!==r&&t===u},$Ne={duration:200,easing:"ease"},tW="transform",zNe=Qc.Transition.toString({property:tW,duration:0,easing:"linear"}),UNe={roleDescription:"sortable"};function qNe(e){let{disabled:t,index:a,node:s,rect:r}=e;const[i,l]=v.useState(null),d=v.useRef(a);return vr(()=>{if(!t&&a!==d.current&&s.current){const u=r.current;if(u){const p=Cu(s.current,{ignoreTransform:!0}),x={x:u.left-p.left,y:u.top-p.top,scaleX:u.width/p.width,scaleY:u.height/p.height};(x.x||x.y)&&l(x)}}a!==d.current&&(d.current=a)},[t,a,s,r]),v.useEffect(()=>{i&&l(null)},[i]),i}function aW(e){let{animateLayoutChanges:t=LNe,attributes:a,disabled:s,data:r,getNewIndex:i=INe,id:l,strategy:d,resizeObserverConfig:u,transition:p=$Ne}=e;const{items:x,containerId:m,activeIndex:h,disabled:y,disableTransforms:w,sortedRects:b,overIndex:j,useDragOverlay:S,strategy:O}=v.useContext(eW),A=FNe(s,y),k=x.indexOf(l),E=v.useMemo(()=>({sortable:{containerId:m,index:k,items:x},...r}),[m,r,k,x]),D=v.useMemo(()=>
850x.slice(x.indexOf(l)),[x,l]),{rect:_,node:T,isOver:I,setNodeRef:$}=yNe({id:l,data:E,disabled:A.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...u}}),{active:R,activatorEvent:B,activeNodeRect:Y,attributes:z,setNodeRef:Q,listeners:L,isDragging:M,over:U,setActivatorNodeRef:Z,transform:ie}=gNe({id:l,data:E,attributes:{...UNe,...a},disabled:A.draggable}),G=Zwe($,Q),F=!!R,H=F&&!w&&Lg(h)&&Lg(j),q=!S&&M,J=q&&H?ie:null,se=H?J??(d??O)({rects:b,activeNodeRect:Y,activeIndex:h,overIndex:j,index:k}):null,ye=Lg(h)&&Lg(j)?i({id:l,items:x,activeIndex:h,overIndex:j}):k,de=R?.id,ve=v.useRef({activeId:de,items:x,newIndex:ye,containerId:m}),Pe=x!==ve.current.items,ue=t({active:R,containerId:m,isDragging:M,isSorting:F,id:l,index:k,items:x,newIndex:ve.current.newIndex,previousItems:ve.current.items,previousContainerId:ve.current.containerId,transition:p,wasDragging:ve.current.activeId!=null}),Qe=qNe({disabled:!ue,index:k,node:T,rect:_});return v.useEffect(()=>{F&&ve.current.newIndex!==ye&&(ve.current.newIndex=ye),m!==ve.current.containerId&&(ve.current.containerId=m),x!==ve.current.items&&(ve.current.items=x)},[F,ye,m,x]),v.useEffect(()=>{if(de===ve.current.activeId)return;if(de!=null&&ve.current.activeId==null){ve.current.activeId=de;return}const xe=setTimeout(()=>{ve.current.activeId=de},50);return()=>clearTimeout(xe)},[de]),{active:R,activeIndex:h,attributes:z,data:E,rect:_,index:k,newIndex:ye,items:x,isOver:I,isSorting:F,isDragging:
850M,listeners:L,node:T,overIndex:j,over:U,setNodeRef:G,setActivatorNodeRef:Z,setDroppableNodeRef:$,setDraggableNodeRef:Q,transform:Qe??se,transition:Ue()};function Ue(){if(Qe||Pe&&ve.current.newIndex===k)return zNe;if(!(q&&!Hy(B)||!p)&&(F||ue))return Qc.Transition.toString({...p,property:tW})}}function FNe(e,t){var a,s;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(a=e?.draggable)!=null?a:t.draggable,droppable:(s=e?.droppable)!=null?s:t.droppable}}sa.Down,sa.Right,sa.Up,sa.Left;function Tr(){return Math.random().toString(36).slice(2,9)}const qp="https://placehold.co/600x400/e2e8f0/94a3b8?text=Your+Email+Image+Here";function vv(e){switch(e.type){case"heading":{const t=e.headingLevel||"h2",a=e.textFont||"Inter,sans-serif",s=e.textSize||(t==="h1"?"32px":t==="h3"?"20px":"24px"),r=e.textColor||"#1a1a2e",i=e.textAlign||"left",l=e.textLineHeight||"1.3";return`<div style="${e.blockBg?`background:${e.blockBg};padding:16px 24px;`:"padding:0 24px;"}"><${t} style="font-family:${a};font-size:${s};font-weight:700;color:${r};text-align:${i};line-height:${l};margin:0 0 16px 0;">${e.content}</${t}></div>`}case"text":{const t=e.textFont||"Inter,sans-serif",a=e.textSize||"16px",s=e.textLineHeight||"1.6",r=e.textLetterSpacing==="tight"?"-0.02em":e.textLetterSpacing==="wide"?"0.05em":e.textLetterSpacing==="wider"?"0.1em":"normal",i=e.textColor||"#4a4a6a",l=e.textAlign||"left";return`<div style="${e.blockBg?`background:${e.blockBg};padding:16px 24px;`:"padding:0 24px;"}"><p style="font-family:${t};font-size:${a};color:${i};line-height:${s};letter-spacing:${r};text-align:${l};margin:0 0 16px 0;">${e.content}</p></div>`}case"button":{const t=e.blockBg?`background:${e.blockBg};`:"",a=e.btnBgColor||"#6366f1",s=e.btnTextColor||"#ffffff",r=e.btnBorderRadius||"8px",i=e.btnPaddingV||"14px",l=e.btnPaddingH||"32px",d=e.btnFontSize||"16px",u=e.btnWidth==="full"?"width:100%;display:block;":"display:inline-block;";return`<div style="${t}text-align:center;padding:24px 0;"><a href="${e.href||"#"}" style="${u}background:${a};color:${s};font-family:Inter,sans-serif;font-size:${d};font-weight:600;padding:${i} ${l};border-radius:${r};text-decoration:none;">${e.content}</a></div>`}case"image":{const t=e.imageWidth||"100%",a=e.imageBorderRadius||"0px",s=e.alignment||"center",r=e.alt||"",i=e.href,l=`<img src="${e.content}" alt="${r}" style="width:${t};max-width:100%;height:auto;display:block;border-radius:${a};" />`;return i?`<a href="${i}" target="_blank" style="display:block;text-align:${s};">${l}</a>`:`<div style="text-align:${s};">${l}</div>`}case"divider":{const t=e.dividerColor||"#e5e7eb",a=e.dividerThickness||"1px",s=e.dividerStyle||"solid",r=e.dividerWidth||"100%";return`<div style="${e.blockBg?`background:${e.blockBg};`:""}padding:8px 0;"><hr style="border:none;border-top:${a} ${s} ${t};width:${r};margin:16px auto;" /></div>`}case"spacer":return`<div style="height:${e.spacerHeight||"32px"};"></div>`;case"columns":{let t=[];try{t=JSON.parse(e.content)}catch{t=[]}const a=e.colRatio||"50-50",[s,r]=a.split("-").map(d=>`${d}%`),i=t[0]?vv(t[0]):"",l=t[1]?vv(t[1]):"";return`<table width="100%" cellpadding="0" cellspacing="0"><tr><td width="${s}" valign="top" style="padding-right:8px;">${i}</td><td width="${r}" valign="top" style="padding-left:8px;">${l}</td></tr></table>`}case"html":return e.content;default:return""}}function Mp(e,t){const a=e.map(vv).join(`
851`);return`<!DOCTYPE html>
852<html>
853<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${t}</title></head>
854<body style="margin:0;padding:0;background:#ffffff;">
855  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background:#ffffff;">
856    <tr><td align="center" style="padding:0;">
857      <table width="600" cellpadding="0" cellspacing="0" border="0">
858        <tr><td>${a}</td></tr>
859      </table>
860    </td></tr>
861    <tr><td align="center" style="padding:12px 0;">
862      <p style="font-family:Arial,sans-serif;font-size:11px;color:#9ca3af;margin:0;">
863        <a href="{{unsubscribe_url}}" style="color:#9ca3af;">Unsubscribe</a>
864      </p>
865    </td></tr>
866  </table>
867</body>
868</html>`}function zg(e,t){const a=e.map(vv).join(`
869`);return`<!DOCTYPE html>
870<html>
871<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${t}</title></head>
872<body style="margin:0;padding:0;background:#f4f4f8;font-family:Inter,sans-serif;">
873  <table width="100%" cellpadding="0" cellspacing="0" style="background:#f4f4f8;padding:40px 20px;">
874    <tr><td align="center">
875      <table width="600" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:12px;overflow:hidden;box-shadow:0 4px 24px rgba(0,0,0,0.08);">
876        <tr><td style="padding:40px 48px;">${a}</td></tr>
877        <tr><td style="padding:24px 48px;border-top:1px solid #e5e7eb;">
878          <p style="font-family:Inter,sans-serif;font-size:12px;color:#9ca3af;text-align:center;margin:0;">
879            You received this email because you subscribed to our list.<br>
880            <a href="{{unsubscribe_url}}" style="color:#6366f1;">Unsubscribe</a>
881          </p>
882        </td></tr>
883      </table>
884    </td></tr>
885  </table>
886</body>
887</html>`}const WNe=[{type:"heading",label:"Heading",icon:F5},{type:"text",label:"Text",icon:Yg},{type:"button",label:"Button",icon:Ek},{type:"image",label:"Image",icon:Fl},{type:"columns",label:"2 Columns",icon:_J},{type:"divider",label:"Divider",icon:QI},{type:"spacer",label:"Spacer",icon:Ek},{type:"html",label:"HTML Code",icon:GI}],h7=[{type:"text",label:"Text",icon:F5},{type:"button",label:"Button",icon:Ic},{type:"image",label:"Image",icon:Fl},{type:"html",label:"HTML Code",icon:GI}];function GN(e){return{heading:"New Heading",text:"Add your text here.",button:"Click Here",image:qp,divider:"",spacer:"",html:"<p>Custom HTML here</p>",columns:JSON.stringify([{id:Tr(),type:"text",content:"Left column text"},{id:Tr(),type:"text",content:"Right column text"}])}[e]}function HNe({block:e,isSelected:t,onSelect:a,onDelete:s,onDuplicate:r,onUpdate:i,onMoveUp:l,onMoveDown:d,imageUploading:u,onImageUpload:p}
887){const{attributes:x,listeners:m,setNodeRef:h,transform:y,transition:w,isDragging:b}=aW({id:e.id}),[j,S]=v.useState(!1),O=v.useRef(null),A={transform:Qc.Transform.toString(y),transition:w,opacity:b?.4:1},k=e.type==="text"||e.type==="button"||e.type==="heading",E=_=>{if(!k||j)return;_.stopPropagation();const T=_.clientX,I=_.clientY;S(!0),setTimeout(()=>{if(O.current){O.current.innerHTML||(O.current.innerHTML=e.content),O.current.focus();const $=window.getSelection();if(!($&&$.toString().length>0)){let B=!1;if(document.caretRangeFromPoint){const Y=document.caretRangeFromPoint(T,I);Y&&($?.removeAllRanges(),$?.addRange(Y),B=!0)}else if(document.caretPositionFromPoint){const Y=document.caretPositionFromPoint(T,I);if(Y){const z=document.createRange();z.setStart(Y.offsetNode,Y.offset),z.collapse(!0),$?.removeAllRanges(),$?.addRange(z),B=!0}}if(!B){const Y=document.createRange();Y.selectNodeContents(O.current),Y.collapse(!1),$?.removeAllRanges(),$?.addRange(Y)}}}},0)},D=()=>{if(!j)return;S(!1);const T=O.current&&O.current.contentEditable==="true"?O.current?.innerHTML??"":O.current?.value??O.current?.innerText??"";T.trim()&&i({content:T.trim()})};return n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:345",ref:h,style:A,onClick:a,onDoubleClick:E,className:`relative group transition-all ${j?"cursor-text":"cursor-pointer"} ${t?"ring-2 ring-[#22c55e] ring-offset-0":"hover:ring-2 hover:ring-[#22c55e]/40"}`,children:[n.jsx(yv,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:357",block:e,isEditing:j,editRef:O,onStopEditing:D}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:360",className:`absolute right-0 top-1/2 -translate-y-1/2 translate-x-full flex flex-col bg-gray-800 rounded-r-md shadow-lg z-20 transition-opacity ${t?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:364",className:"p-1.5 text-gray-300 hover:text-white hover:bg-gray-700 rounded-tr-md",title:"Move up",onClick:_=>{_.stopPropagation(),l()},children:n.jsx(Bi,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:369",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:372",className:"p-1.5 text-gray-300 hover:text-white hover:bg-gray-700",title:"Move down",onClick:_=>{_.stopPropagation(),d()},children:n.jsx(Tn,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:377",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:380",...x,...m,className:"p-1.5 text-gray-300 hover:text-white hover:bg-gray-700 cursor-grab active:cursor-grabbing",title:"Drag to reorder",onClick:_=>_.stopPropagation(),children:n.jsx(MJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:387",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:390",className:"p-1.5 text-gray-300 hover:text-white hover:bg-gray-700",title:"Duplicate",onClick:_=>{_.stopPropagation(),r()},children:n.jsx(Ra,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:395",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:398",className:"p-1.5 text-gray-300 hover:text-red-400 hover:bg-gray-700 rounded-br-md",title:"Delete",onClick:_=>{_.stopPropagation(),s()},children:n.jsx(Ua,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:403",className:"w-3.5 h-3.5"})})]})]})}function yv({block:e,isEditing:t=!1,editRef:a,onStopEditing:s}){switch(e.type){case"image":return n.jsx("img",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:424",src:e.content,alt:"Email block",className:"w-full block select-none",draggable:!1});case"text":{const r={fontFamily:e.textFont||void 0,fontSize:e.textSize||void 0,lineHeight:e.textLineHeight||void 0,letterSpacing:e.textLetterSpacing==="tight"?"-0.02em":e.textLetterSpacing==="wide"?"0.05em":e.textLetterSpacing==="wider"?"0.1em":void 0,color:e.textColor||void 0,textAlign:e.textAlign||void 0};return t?n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:441",ref:a,contentEditable:!0,suppressContentEditableWarning:!0,onBlur:s,onPaste:i=>{i.preventDefault();const l=i.clipboardData.getData("text/plain");document.execCommand("insertText",!1,l)},onKeyDown:i=>{i.key==="Escape"&&s?.(),(i.ctrlKey||i.metaKey)&&i.key==="b"&&(i.preventDefault(),document.execCommand("bold")),(i.ctrlKey||i.metaKey)&&i.key==="i"&&(i.preventDefault(),document.execCommand("italic")),(i.ctrlKey||i.metaKey)&&i.key==="u"&&(i.preventDefault(),document.execCommand("underline")),(i.ctrlKey||i.metaKey)&&i.key==="z"&&(i.preventDefault(),document.execCommand("undo")),(i.ctrlKey||i.metaKey)&&(i.key==="y"||i.shiftKey&&i.key==="z")&&(i.preventDefault(),document.execCommand("redo"))},className:"px-6 py-3 font-sans text-sm text-gray-700 leading-relaxed outline-none min-h-[40px] border-b-2 border-[#22c55e]",style:{...r,background:e.blockBg||"white"}},`text-edit-${e.id}`):n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:4
88769",className:"px-6 py-3 font-sans text-sm text-gray-700 leading-relaxed",style:{...r,background:e.blockBg||"white"},children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:470",dangerouslySetInnerHTML:{__html:e.content}}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:471",className:"ml-2 text-[10px] text-gray-300 opacity-0 group-hover:opacity-100 transition-opacity",children:"double-click to edit"})]},`text-view-${e.id}`)}case"button":{const r={backgroundColor:e.btnBgColor||"#6366f1",color:e.btnTextColor||"#ffffff",borderRadius:e.btnBorderRadius||"8px",padding:`${e.btnPaddingV||"14px"} ${e.btnPaddingH||"32px"}`,fontSize:e.btnFontSize||"16px",width:e.btnWidth==="full"?"100%":void 0,display:e.btnWidth==="full"?"block":"inline-block"};return t?n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:486",className:"flex justify-center py-4",style:{background:e.blockBg||"white"},children:n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:487",ref:a,contentEditable:!0,suppressContentEditableWarning:!0,onBlur:s,onPaste:i=>{i.preventDefault();const l=i.clipboardData.getData("text/plain");document.execCommand("insertText",!1,l)},onKeyDown:i=>{(i.key==="Enter"||i.key==="Escape")&&(i.preventDefault(),s?.())},className:"font-semibold outline-none ring-2 ring-white ring-offset-2 min-w-[80px] text-center",style:r},`button-edit-${e.id}`)},`button-edit-wrap-${e.id}`):n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:504",className:`py-4 ${e.btnWidth==="full"?"px-6":"flex justify-center"}`,style:{background:e.blockBg||"white"},children:n.jsxs("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:505",className:"font-semibold cursor-pointer",style:r,children:[e.content,n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:507",className:"ml-2 text-[10px] opacity-50 opacity-0 group-hover:opacity-100 transition-opacity",children:"double-click"})]})},`button-view-${e.id}`)}case"html":return n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:514",className:"px-4 py-2 bg-white",dangerouslySetInnerHTML:{__html:e.content}});case"heading":{const r=e.headingLevel||"h2",i={fontFamily:e.textFont||void 0,fontSize:e.textSize||void 0,lineHeight:e.textLineHeight||void 0,color:e.textColor||void 0,textAlign:e.textAlign||void 0},l=r;return t?n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:530",className:"px-6 py-3",style:{background:e.blockBg||"white"},children:n.jsx(l,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:531",ref:a,contentEditable:!0,suppressContentEditableWarning:!0,onBlur:s,onPaste:d=>{d.preventDefault();const u=d.clipboardData.getData("text/plain");document.execCommand("insertText",!1,u)},onKeyDown:d=>{(d.key==="Enter"||d.key==="Escape")&&(d.preventDefault(),s?.()),(d.ctrlKey||d.metaKey)&&d.key==="b"&&(d.preventDefault(),document.execCommand("bold")),(d.ctrlKey||d.metaKey)&&d.key==="i"&&(d.preventDefault(),document.execCommand("italic")),(d.ctrlKey||d.metaKey)&&d.key==="u"&&(d.preventDefault(),document.execCommand("underline"))},className:"font-bold text-gray-900 outline-none border-b-2 border-[#22c55e]",style:i},`heading-edit-${e.id}`)},`heading-edit-wrap-${e.id}`):n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:554",className:"px-6 py-3",style:{background:e.blockBg||"white"},children:n.jsxs(l,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:555",className:"font-bold text-gray-900",style:i,children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:556",dangerouslySetInnerHTML:{__html:e.content}}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:557",className:"ml-2 text-sm font-normal text-gray-300 opacity-0 group-hover:opacity-100 transition-opacity",children:"double-click to edit"})]})},`heading-view-${e.id}`)}case"divider":{const r=e.dividerColor||"#e5e7eb",i=e.dividerThickness||"1px",l=e.dividerStyle||"solid",d=e.dividerWidth||"100%";return n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:568",className:"px-6 py-2",style:{background:e.blockBg||"white"},children:n.jsx("hr",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:569",style:{border:"none",borderTop:`${i} ${l} ${r}`,width:d,margin:"8px auto"}})})}case"spacer":{const r=e.spacerHeight||"32px";return n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:576",style:{height:r,background:"white",position:"relative"},children:n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:577",className:"absolute inset-0 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsxs("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:578",className:"text-[10px] text-gray-400 bg-gray-100 px-2 py-0.5 rounded",children:["Spacer ",r]})})})}case"columns":{let r=[];try{r=JSON.parse(e.content)}catch{r=[]}const i=e.colRatio||"50-50",[l,d]=i.split("-").map(u=>parseInt(u));return n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:589",className:"flex",style:{background:e.blockBg||"white"},children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:590",style:{width:`${l}%`,padding:"8px 8px 8px 16px"},children:r[0]?n.jsx(yv,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:591",block:r[0],isEditing:!1,editRef:null,onStopEditing:void 0}):n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:591",className:"h-16 bg-gray-100 rounded flex items-center justify-center text-xs text-gray-400",children:"Left column"})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:593",style:{width:`${d}%`,padding:"8px 16px 8px 8px"},children:r[1]?n.jsx(yv,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:594",block:r[1],isEditing:!1,editRef:null,onStopEditing:void 0}):n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:594",className:"h-16 bg-gray-100 rounded flex items-center justify-center text-xs text-gray-400",children:"Right column"})})]})}default:return null}}function VNe({type:e,label:t,icon:a}){const{attributes:s,listeners:r,setNodeRef:i,isDragging:l}=aW({id:`palette-${e}`});return n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:609",ref:i,...s,...r,className:`flex flex-col items-center gap-2 p-3 rounded-lg border border-gray-200 hover:border-[#0a7cff] hover:bg-blue-50 transition-colors group cursor-grab active:cursor-grabbing select-none ${l?"opacity-40":""}`,children:[n.jsx(a,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:617",className:"w-5 h-5 text-gray-400 group-hover:text-[#0a7cff] transition-colors"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:618",className:"text-[11px] font-medium text-gray-600 group-hover:text-[#0a7cff] transition-colors",children:t})]})}function v7(){Yi();const[,e]=La(),t=V5(),a=new URLSearchParams(t),s=a.get("returnTo")==="wizard",r=a.get("campaign"),i=r&&r!=="new"?parseInt(r):null,l=a.get("automationStep"),d=a.get("returnTo")&&a.get("returnTo")!=="wizard"?a.get("returnTo"):null,u=!!l,[p,x]=v.useState([]),[m,h]=v.useState(null),[y,w]=v.useState(!1),[b,j]=v.useState(""),[S,O]=v.useState(!1),[A,k]=v.useState("elements"),[E,D]=v.useState(600),[_,T]=v.useState("#f4f4f4"),[I,$]=v.useState(40),[R,B]=v.useState("Arial, sans-serif"),[Y,z]=v.useState(null),[Q,L]=v.useState("desktop"),[M,U]=v.useState(null),[Z,ie]=v.useState(null),[G,F]=v.useState("text"),[H,q]=v.useState(!1),[J,ce]=v.useState(null),[se,ye]=v.useState(!1),[de,ve]=v.useState(!1),[Pe,ue]=v.useState(!1),[Qe,Ue]=v.useState(""),xe=v.useRef(null),[$e,Te]=v.useState({x:0,y:0,visible:!1}),dt=v.useRef(null),[tt,me]=v.useState({bold:!1,italic:!1,underline:!1,strikeThrough:!1});v.useEffect(()=>{const we=()=>{me({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikeThrough:document.queryCommandState("strikeThrough")});const Je=window.getSelection();if(Je&&Je.rangeCount>0&&!Je.isCollapsed){const lt=Je.getRangeAt(0),K=lt.commonAncestorContainer;if((K.nodeType===Node.TEXT_NODE?K.parentElement:K)?.closest('[contenteditable="true"]')){const nt=lt.getBoundingClientRect();if(nt.width>
8870){Te({x:nt.left+nt.width/2,y:nt.top-8,visible:!0});return}}}Te(lt=>({...lt,visible:!1}))};return document.addEventListener("selectionchange",we),()=>document.removeEventListener("selectionchange",we)},[]);const ut=()=>{const we=window.getSelection();we&&we.rangeCount>0&&(xe.current=we.getRangeAt(0).cloneRange())},pt=()=>{const we=xe.current;if(!we)return;const Je=window.getSelection();Je&&(Je.removeAllRanges(),Je.addRange(we))},ft=(we,Je)=>{pt(),document.execCommand(we,!1,Je),me({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikeThrough:document.queryCommandState("strikeThrough")})},[_t,da]=v.useState("Untitled Template"),[vt,Xt]=v.useState(""),[Ct,Zt]=v.useState([{id:Tr(),type:"heading",content:"Your Email Heading Here"},{id:Tr(),type:"text",content:"Write your email body here."},{id:Tr(),type:"button",content:"Get Started Now"}]),[xa,Sa]=v.useState(null),[Da,Va]=v.useState("edit"),[X,Re]=v.useState("prop_firm"),Ve=le.templates.create.useMutation({onSuccess:()=>{ne.success("Template saved!"),e("/templates")},onError:we=>ne.error(we.message)}),bt=le.templates.create.useMutation({onSuccess:()=>ne.success("Saved as template! It will appear in 'Saved templates'."),onError:we=>ne.error(we.message)}),Be=le.campaigns.update.useMutation({onSuccess:()=>{ne.success("Email saved!"),e(`/campaigns/${i}/edit?step=audience`)},onError:we=>ne.error(we.message)}),ee=le.llm.generateEmailCopy.useMutation({onSuccess:we=>{ce(String(we.content??"").trim()),q(!1)},onError:we=>{ne.error(we.message),q(!1)}}),ke=we=>{q(!0),ce(null),ee.mutate({type:"body",context:{industry:X,tone:"exciting"},currentContent:we.content.replace(/<[^>]+>/g,"").slice(0,200)})},{data:qe}=le.campaigns.get.useQuery({id:i},{enabled:!!i}),Ye=qe?.templateId??null,{data:at}=le.templates.get.useQuery({id:Ye},{enabled:!!Ye&&s}),Ge=v.useRef(!1);v.useEffect(()=>{if(!qe||!s||Ge.current)return;qe.subject&&Xt(qe.subject),qe.name&&da(qe.name);const we=qe.emailSettings;if(we&&(we.canvasBg&&T(we.canvasBg),typeof we.canvasPadding=="number"&&$(we.canvasPadding),typeof we.canvasWidth=="number"&&D(we.canvasWidth),we.globalFont&&B(we.globalFont)),qe.bodyJson&&Array.isArray(qe.bodyJson)&&qe.bodyJson.length>0){x(qe.bodyJson),Ge.current=!0;return}if(at){const Je=at.thumbnail??qp;x([{id:Tr(),type:"image",content:Je}]),Ge.current=!0}},[qe,s,at]),v.useEffect(()=>{at&&s&&!Ge.current&&(x([{id:Tr(),type:"image",content:at.thumbnail??qp}]),Ge.current=!0)},[at]);const Mt=async(we,Je)=>{if(!we.type.startsWith("image/")){ne.error("Please select an image file");return}if(we.size>10*1024*1024){ne.error("Image must be under 10MB");return}w(!0);try{const lt=new FormData;lt.append("file",we);const K=await fetch("/api/upload-image",{method:"POST",body:lt});if(!K.ok)throw new Error("Upload failed");const{url:He}=await K.json();Je(He),ne.success("Image uploaded")}catch{ne.error("Image upload failed")}finally{w(!1)}},zt=(we,Je)=>{const lt={id:Tr(),type:we,content:GN(we)};x(K=>{if(Je){const He=K.findIndex(Fe=>Fe.id===Je),nt=[...K];return nt.splice(He+1,0,lt),nt}return[...K,lt]}),h(lt.id),k("library")},Ie=(we,Je)=>x(lt=>lt.map(K=>K.id===we?{...K,...Je}:K)),ua=we=>{x(Je=>Je.filter(lt=>lt.id!==we)),m===we&&h(null)},Ht=we=>{const Je=p.find(K=>K.id===we);if(!Je)return;const lt={...Je,id:Tr()};x(K=>{const He=K.findIndex(Fe=>Fe.id===we),nt=[...K];return nt.splice(He+1,0,lt),nt}),h(lt.id)},Lt=(we,Je)=>{x(lt=>{const K=lt.findIndex(nt=>nt.id===we);if(K<0)return lt;const He=Je==="up"?K-1:K+1;return He<0||He>=lt.length?lt:hv(lt,K,He)})},be=p.find(we=>we.id===m),ga=()=>{if(u&&l){const we=Mp(p,vt);localStorage.setItem(`automation_email_step_${l}`,JSON.stringify({subject:vt,previewText:"",bodyHtml:we,bodyJson:p})),ne.success("Email content saved!"),e(d?decodeURIComponent(d):"/automations");return}if(s&&i){const we=Mp(p,vt),Je={canvasBg:_,canvasPadding:I,canvasWidth:E,globalFont:R};Be.mutate({id:i,data:{bodyHtml:we,bodyJson:p,subject:vt,emailSettings:Je}});return}if(!_t)return ne.error("Template name required");Ve.mutate({name:_t,subject:vt,bodyJson:Ct,bodyHtml:zg(Ct,vt),industry:X})},Ca=()=>{const we=s?Mp(p,vt):zg(Ct,vt),Je=new Blob([we],{type:"text/html"}),lt=URL.createObjectURL(Je),K=document.createElement("a");K.href=lt,K.download=`${(s?vt||"email":_t).replace(/\s+/g,"-").toLowerCase()}.html`,K.click(),URL.revokeObjectURL(lt)},Yn=f2e(p2e(w4,{activationConstraint:{distance:5}})),Ga=we=>String(we).startsWith("palette-"),Kn=we=>{U(String(we.active.id))},Sr=we=>{const Je=we.over?.id;Je&&!Ga(String(Je))?ie(String(Je)):ie(null)},Qn=we=>{const{active:Je,over:lt}=we;if(U(null),ie(null),!lt)return;const K=String(Je.id),He=String(lt.id);if(Ga(K)){const nt=K.replace("palette-","");zt(nt,Ga(He)?void 0:He)}else K!==He&&x(nt=>{const Fe=nt.findIndex(_s=>_s.id===K),ks=nt.findIndex(_s=>_s.id===He);return hv(nt,Fe,ks)})},dn=Q==="mobile"?375:E,Mn=we=>{const Je={id:Tr(),type:we,content:GN(we)};Zt(lt=>[...lt,Je]),Sa(Je.id)},Cr=(we,Je)=>Zt(lt=>lt.map(K=>K.id===we?{...K,content:Je}:K)),Au=we=>{Zt(Je=>Je.filter(lt=>lt.id!==we)),xa===we&&Sa(null)},Ym=(we,Je)=>{const lt=Ct.findIndex(He=>He.id===we);if(Je==="up"&&lt===0||Je==="down"&&lt===Ct.length-1)return;const K=[...Ct];[K[lt],K[Je==="up"?lt-1:lt+1]]=[K[Je==="up"?lt-1:lt+1],K[lt]],Zt(K)},Os=Ct.find(we=>we.id===xa),vo=le.deliverability.glock.createTestId.useMutation({onSuccess:we=>{const Je={id:`seed-${Date.now()}`,type:"text",content:we.insertInBody,style:{fontSize:"10px",color:"#ffffff"}};Zt(lt=>[...lt,Je]),ne.success("Seed test ID added to email")},onError:we=>ne.error(we.message)});if(s){const we=h7.map(K=>`palette-${K.type}`),Je=p.map(K=>K.id);[...we,...Je];const lt=M?Ga(M)?{id:M,type:M.replace("palette-",""),content:GN(M.replace("palette-",""))}:p.find(K=>K.id===M):null;return n.jsxs(fNe,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1050",sensors:Yn,collisionDetection:y2e,onDragStart:Kn,onDragOver:Sr,onDragEnd:Qn,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1057",className:"flex flex-col h-screen bg-[#f5f5f5] overflow-hidden",children:[$e.visible&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1061",ref:dt,className:"fixed z-[9999] flex items-center gap-0.5 bg-gray-900 text-white rounded-lg shadow-xl px-1.5 py-1 pointer-events-auto",style:{left:$e.x,top:$e.y,transform:"translate(-50%, -100%)"},onMouseDown:K=>K.preventDefault(),children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1072",title:"Bold (Ctrl+B)",onMouseDown:K=>{K.preventDefault(),ft("bold")},className:`w-7 h-7 flex items-center justify-center rounded transition-colors ${tt.bold?"bg-white/20":"hover:bg-white/10"}`,children:n.jsx(yk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1078",className:"w-3 h-3"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1080",title:"Italic (Ctrl+I)",onMouseDown:K=>{K.preventDefault(),ft("italic")},className:`w-7 h-7 flex items-center justify-center rounded transition-colors ${tt.italic?"bg-white/20":"hover:bg-white/10"}`,children:n.jsx(Nk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1086",className:"w-3 h-3"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1088",title:"Underline (Ctrl+U)",onMouseDown:K=>{K.preventDefault(),ft("underline")},className:`w-7 h-7 flex items-center justify-center rounded transition-colors ${tt.underline?"bg-white/20":"hover:bg-white/10"}`,children:n.jsx(Ok,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1094",className:"w-3 h-3"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1096",title:"Str
887ikethrough",onMouseDown:K=>{K.preventDefault(),ft("strikeThrough")},className:`w-7 h-7 flex items-center justify-center rounded transition-colors ${tt.strikeThrough?"bg-white/20":"hover:bg-white/10"}`,children:n.jsx(Ak,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1102",className:"w-3 h-3"})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1103",className:"w-px h-4 bg-white/20 mx-0.5"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1105",title:"Insert link",onMouseDown:K=>{K.preventDefault(),ut(),ue(!0)},className:"w-7 h-7 flex items-center justify-center rounded hover:bg-white/10 transition-colors",children:n.jsx(Sk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1109",className:"w-3 h-3"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1111",title:"Clear formatting",onMouseDown:K=>{K.preventDefault(),ft("removeFormat")},className:"w-7 h-7 flex items-center justify-center rounded hover:bg-white/10 transition-colors",children:n.jsx(jk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1115",className:"w-3 h-3"})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1117",className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-gray-900"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1122",className:"flex items-center gap-3 px-4 h-14 bg-white border-b border-gray-200 flex-shrink-0 z-10",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1123",onClick:()=>{e(u&&d?decodeURIComponent(d):u?"/automations":`/campaigns/${i}/edit`)},className:"flex items-center gap-1.5 text-gray-500 hover:text-gray-800 transition-colors mr-1",children:n.jsx(rs,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1135",className:"w-4 h-4"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1137",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1138",className:"text-sm font-semibold text-gray-900 truncate max-w-[180px]",children:qe?.name||vt||"Campaign"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1141",className:"text-xs text-[#0a7cff] hover:underline font-medium",onClick:()=>{const K=prompt("Campaign name:",qe?.name||vt||"");K&&i&&Be.mutate({id:i,data:{name:K}})},children:"Edit"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1154",className:"flex-1 flex items-center justify-center gap-4",children:[Be.isSuccess&&n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1156",className:"text-xs text-gray-400",children:"Changes saved"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1158",className:"flex items-center gap-1 bg-gray-100 rounded-lg p-1",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1159",onClick:()=>L("desktop"),className:`flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors ${Q==="desktop"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:n.jsxs("svg",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1163",className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:[n.jsx("rect",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1164",x:"2",y:"4",width:"20",height:"14",rx:"2"}),n.jsx("path",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1164",d:"M8 20h8M12 18v2"})]})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1167",onClick:()=>L("mobile"),className:`flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors ${Q==="mobile"?"bg-white text-gray-900 shadow-sm":"text-gray-500 hover:text-gray-700"}`,children:n.jsxs("svg",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1171",className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:[n.jsx("rect",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1172",x:"6",y:"2",width:"12",height:"20",rx:"2"}),n.jsx("circle",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1172",cx:"12",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1176",className:"flex items-center gap-1",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1177",className:"w-7 h-7 flex items-center justify-center rounded text-gray-400 hover:bg-gray-100 transition-colors",title:"Undo",children:n.jsxs("svg",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1178",className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:[n.jsx("path",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1178",d:"M9 14 4 9l5-5"}),n.jsx("path",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1178",d:"M4 9h10a5 5 0 0 1 0 10h-1"})]})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1180",className:"w-7 h-7 flex items-center justify-center rounded text-gray-400 hover:bg-gray-100 transition-colors",title:"Redo",children:n.jsxs("svg",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1181",className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:[n.jsx("path",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1181",d:"m15 14 5-5-5-5"}),n.jsx("path",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1181",d:"M20 9H10a5 5 0 0 0 0 10h1"})]})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1186",className:"flex items-center gap-2",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1187",variant:"outline",size:"sm",className:"text-xs h-8 gap-1.5 border-gray-300",onClick:Ca,children:[n.jsx(la,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1188",className:"w-3.5 h-3.5"})," Preview & test"]}),S?n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1202",className:"flex items-center gap-1.5 bg-white border border-gray-300 rounded-md px-2 h-8",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1203",autoFocus:!0,t
887ype:"text",value:b,onChange:K=>j(K.target.value),onKeyDown:K=>{if(K.key==="Escape"&&O(!1),K.key==="Enter"){const nt=p.find(ks=>ks.type==="image")?.content??qp,Fe=Mp(p,vt);bt.mutate({name:b.trim(),category:"promotion",industry:"prop_firm",subject:vt,bodyJson:p,bodyHtml:Fe,thumbnail:nt},{onSuccess:()=>{O(!1),j("")}})}},placeholder:"Template name",className:"text-xs w-36 bg-transparent outline-none placeholder-gray-400"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1228",className:"text-[#0a7cff] text-xs font-semibold hover:underline disabled:opacity-50",disabled:bt.isPending||!b.trim(),onClick:()=>{const He=p.find(Fe=>Fe.type==="image")?.content??qp,nt=Mp(p,vt);bt.mutate({name:b.trim(),category:"promotion",industry:"prop_firm",subject:vt,bodyJson:p,bodyHtml:nt,thumbnail:He},{onSuccess:()=>{O(!1),j("")}})},children:bt.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1246",className:"w-3 h-3 animate-spin inline"}):"Save"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1248",className:"text-gray-400 hover:text-gray-600 text-xs",onClick:()=>O(!1),children:"✕"})]}):n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1193",variant:"outline",size:"sm",className:"text-xs h-8 gap-1.5 border-gray-300",onClick:()=>{j(vt||"My Template"),O(!0)},children:[n.jsx(DJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1199",className:"w-3.5 h-3.5"})," Save as template"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1252",size:"sm",className:"text-xs h-8 bg-[#0d9488] hover:bg-[#0f766e] text-white gap-1.5 px-4",onClick:ga,disabled:Be.isPending,children:[Be.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1258",className:"w-3.5 h-3.5 animate-spin"}):n.jsx(Md,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1258",className:"w-3.5 h-3.5"}),u?"Save & return to automation":"Save & choose recipients"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1265",className:"flex flex-1 overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1268",className:"w-[220px] bg-white border-r border-gray-200 flex flex-col flex-shrink-0 overflow-y-auto",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1269",className:"px-4 pt-4 pb-2 border-b border-gray-200",children:n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1270",className:"text-xs font-semibold text-gray-700",children:"Add Elements"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1273",className:"flex-1 overflow-y-auto px-3 pt-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1274",className:"text-[10px] font-semibold text-gray-400 uppercase tracking-wide mb-3",children:"Drag to canvas or click to add"}),n.jsx(g7,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1275",items:we,strategy:x7,children:n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1276",className:"grid grid-cols-2 gap-2",children:h7.map(({type:K,label:He,icon:nt})=>n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1278",onClick:()=>zt(K),children:n.jsx(VNe,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1279",type:K,label:He,icon:nt})},K))})})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1289",className:"flex-1 overflow-y-auto flex flex-col items-center py-8 px-4",style:{background:_},onClick:()=>h(null),children:n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1294",className:"bg-white shadow-xl rounded-sm overflow-visible transition-all duration-300 relative",style:{width:`${dn}px`,maxWidth:"100%",fontFamily:R,padding:`${I}px`},onClick:K=>K.stopPropagation(),children:[p.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1300",className:"flex flex-col items-center justify-center py-24 text-gray-300 gap-4",children:[n.jsx(Fl,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1301",className:"w-14 h-14"}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1302",className:"text-sm font-medium text-gray-400",children:"Drag elements here or upload an image"})]}):n.jsx(g7,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1305",items:Je,strategy:x7,children:p.map(K=>n.jsx(HNe,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1307",block:K,isSelected:m===K.id,onSelect:()=>h(K.id),onDelete:()=>ua(K.id),onDuplicate:()=>Ht(K.id),onMoveUp:()=>Lt(K.id,"up"),onMoveDown:()=>Lt(K.id,"down"),onUpdate:He=>Ie(K.id,He),imageUploading:y,onImageUpload:Mt},K.id))}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1323",className:"bg-gray-50 border-t border-gray-100 py-3 text-center",children:n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1324",className:"text-[10px] text-gray-400",children:"Unsubscribe"})})]})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1330",className:"w-[280px] bg-white border-l border-gray-200 flex flex-col flex-shrink-0 overflow-y-auto",onMouseDown:K=>{K.target.closest("input, textarea, [contenteditable]")||K.preventDefault()},children:be?n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1344",className:"px-5 pt-5 pb-3 border-b border-gray-100 flex items-center justify-between",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1345",className:"text-sm font-semibold text-gray-900 capitalize",children:[be.type," properties"]}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1346",onClick:()=>h(null),className:"text-gray-400 hover:text-gray-600",children:n.jsx(Ui,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1346",className:"w-4 h-4"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1348",className:"px-5 py-4 space-y-4",children:[be.type==="text"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1350",className:"-mx-5 -mt-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1352",className:"flex border-b border-gray-200 px-5 pt-4",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1353",onClick:()=>F("text"),className:`text-xs font-semibold pb-2 mr-5 border-b-2 transition-colors ${G==="text"?"border-gray-900 text-gray-900":"border-transparent text-gray-400 hover:text-gray-600"}`,children:"Text"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1359",onClick:()=>F("layout"),className:`text-xs font-semibold pb-2 border-b-2 transition-colors ${G==="layout"?"border-gray-900 text-gray-900":"border-transparent text-gray-400 hover:text-gray-600"}`,children:"Layout"})]}),G==="text"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1368",className:"px-5 pt-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1370",className:"rounded-xl bg-gray-50 border border-gray-200 p-3 space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1371",className:"text-xs font-bold text-gray-900",children:"AI Writer"}),H?n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1373",className:"flex items-center gap-2 text-xs text-gray-500",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1374",className:"w-3 h-3 animate-spin"}),"Generating suggestion..."]}):J?n.jsxs(n.Fragment,{children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1379",className:"text-xs text-gray-600 leading-relaxed line-clamp-3",children:J}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1380",className:"flex gap-2",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1381",onClick:()=>{Ie(be.id,{content:J}),ce(null)},className:"text-xs font-semibold text-[#0a7cff] hover:underline",children:"Apply"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1385",onClick:()=>ce(null),className:"text-xs text-gray-400 hover:text-gray-600",children:"Dismiss"})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1390",className:"text-xs text-gray-400 leading-relaxed",children:be.content?"Let AI improve this text block":"The text block is empty — add content to get suggestions"}),n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1393",onClick:()=>
887ke(be),className:"flex items-center gap-1.5 text-xs font-semibold text-[#0a7cff] hover:underline",children:[n.jsx(qr,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1397",className:"w-3.5 h-3.5"}),"Modify Text with AI"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1405",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1406",className:"text-xs font-medium text-gray-700",children:"Text style"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1407",value:be.textPreset||"body",onValueChange:K=>{const He={h1:{textPreset:"h1",textSize:"32px",textFont:"Inter,sans-serif",textLineHeight:"1.2"},h2:{textPreset:"h2",textSize:"24px",textFont:"Inter,sans-serif",textLineHeight:"1.3"},h3:{textPreset:"h3",textSize:"20px",textFont:"Inter,sans-serif",textLineHeight:"1.4"},body:{textPreset:"body",textSize:"16px",textFont:"Inter,sans-serif",textLineHeight:"1.6"},footnote:{textPreset:"footnote",textSize:"12px",textFont:"Arial,sans-serif",textLineHeight:"1.5"}};Ie(be.id,He[K]||{})},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1420",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1421"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1423",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1424",value:"h1",children:"Heading 1"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1425",value:"h2",children:"Heading 2"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1426",value:"h3",children:"Heading 3"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1427",value:"body",children:"Body"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1428",value:"footnote",children:"Footnote*"})]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1433",className:"border-t border-gray-100"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1436",className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1437",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1438",className:"text-xs font-medium text-gray-700",children:"Font"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1439",value:be.textFont||"Inter,sans-serif",onValueChange:K=>{Ie(be.id,{textFont:K});const He=K.split(",")[0].replace(/'/g,"");ft("fontName",He)},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1448",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1449"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1451",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1452",value:"Inter,sans-serif",children:"Inter"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1453",value:"Arial,sans-serif",children:"Arial"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1454",value:"Georgia,serif",children:"Georgia"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1455",value:"'Times New Roman',serif",children:"Times New Roman"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1456",value:"'Courier New',monospace",children:"Courier New"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1457",value:"Verdana,sans-serif",children:"Verdana"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1458",value:"Trebuchet MS,sans-serif",children:"Trebuchet MS"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1462",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1463",className:"text-xs font-medium text-gray-700",children:"Size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1464",value:be.textSize||"16px",onValueChange:K=>{Ie(be.id,{textSize:K});const He=window.getSelection();He&&He.rangeCount>0&&!He.isCollapsed&&(document.execCommand("fontSize",!1,"7"),document.querySelectorAll('font[size="7"]').forEach(Fe=>{const ks=document.createElement("span");ks.style.fontSize=K,ks.innerHTML=Fe.innerHTML,Fe.parentNode?.replaceChild(ks,Fe)}))},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1484",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1485"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1487",children:["10px","11px","12px","13px","14px","16px","18px","20px","22px","24px","28px","32px","36px","48px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1489",value:K,children:K},K))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1497",className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1498",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1499",className:"text-xs font-medium text-gray-700",children:"Line height"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1500",value:be.textLineHeight||"1.5",onValueChange:K=>Ie(be.id,{textLineHeight:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1504",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1505"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1507",children:["1","1.2","1.4","1.5","1.6","1.8","2","2.5"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1509",value:K,children:K},K))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1514",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1515",className:"text-xs font-medium text-gray-700",children:"Letter spacing"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1516",value:be.textLetterSpacing||"normal",onValueChange:K=>Ie(be.id,{textLetterSpacing:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1520",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1521"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1523",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1524",value:"tight",children:"Tight"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1525",value:"normal",children:"Normal"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1526",value:"wide",children:"Wide"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1527",value:"wider",children:"Wider"})]})]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1533",className:"border-t border-gray-100"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1536",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1537",className:"flex items-center gap-0.5 flex-wrap",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1539",title:"Bold",onMouseDown:K=>{K.preventDefault(),ft("bold")},className:`w-8 h-8 flex items-center justify-center rounded transition-colors ${tt.bold?"bg-gray-200 text-gray-900":"hover:bg-gray-100 text-gray-700"}`,children:n.jsx(yk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1545",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1547",title:"Italic",onMouseDown:K=>{K.preventDefault(),ft("italic")},className:`w-8 h-8 flex items-center justify-center rounded transition-colors ${tt.italic?"bg-gray-200 text-gray-900":"hover:bg-gray-100 text-gray-700"}`,children:n.jsx(Nk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1553",className:"w-3.5 h-3.5"})}),n.jsxs(Cd,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1555",open:se,onOpenChange:ye,children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1556",asChild:!0,children:n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1557",title:"Text color",onMouseDown:K=>{K.preventDefault(),ut()},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700 relative",children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1558",className:"text-xs font-bold",style:{fontFamily:"serif"},children:"A"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1559",className:"absolute bottom-1 left-1/2 -translate-x-1/2 w-4 h-0.5 rounded-full",style:{background:be.textColor||"#000000"}})]})}),n.jsxs(Ad,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1565",className:"w-52 p-3",align:"start",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1566",className:"text-xs font-medium text-gray-700 mb-2",children:"Text color"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1567",className:"grid grid-cols-8 gap-1 mb-2",children:["#000000","#374151","#6b7280","#9ca3af","#ffffff","#ef4444","#f97316","#eab308","#22c55e","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#ec4899","#0a7cff","#1a1a2e"].map(K=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1569",title:K,onMouseDown:He=>{He.preventDefault(),pt(),document.execCommand("foreColor",!1,K),Ie(be.id,{textColor:K}
887),ye(!1)},className:"w-5 h-5 rounded border border-gray-200 hover:scale-110 transition-transform",style:{background:K}},K))}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1584",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1585",type:"color",value:be.textColor||"#000000",onChange:K=>Ie(be.id,{textColor:K.target.value}),className:"w-8 h-8 rounded cursor-pointer border-0 bg-transparent"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1591",value:be.textColor||"",onChange:K=>Ie(be.id,{textColor:K.target.value}),placeholder:"#000000",className:"h-7 text-xs flex-1"})]})]})]}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1601",title:"Underline",onMouseDown:K=>{K.preventDefault(),ft("underline")},className:`w-8 h-8 flex items-center justify-center rounded transition-colors ${tt.underline?"bg-gray-200 text-gray-900":"hover:bg-gray-100 text-gray-700"}`,children:n.jsx(Ok,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1607",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1609",title:"Strikethrough",onMouseDown:K=>{K.preventDefault(),ft("strikeThrough")},className:`w-8 h-8 flex items-center justify-center rounded transition-colors ${tt.strikeThrough?"bg-gray-200 text-gray-900":"hover:bg-gray-100 text-gray-700"}`,children:n.jsx(Ak,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1615",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1617",title:"Clear formatting",onMouseDown:K=>{K.preventDefault(),ft("removeFormat")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(jk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1621",className:"w-3.5 h-3.5"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1625",className:"flex items-center gap-0.5 mt-1",children:[[{align:"left",icon:Yg,label:"Align left"},{align:"center",icon:w1,label:"Align center"},{align:"right",icon:N1,label:"Align right"},{align:"justify",icon:vk,label:"Justify"}].map(({align:K,icon:He,label:nt})=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1632",title:nt,onClick:()=>Ie(be.id,{textAlign:K}),className:`w-8 h-8 flex items-center justify-center rounded transition-colors ${(be.textAlign||"left")===K?"bg-gray-200 text-gray-900":"hover:bg-gray-100 text-gray-700"}`,children:n.jsx(He,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1641",className:"w-3.5 h-3.5"})},K)),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1644",title:"Ordered list",onMouseDown:K=>{K.preventDefault(),ft("insertOrderedList")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx($J,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1648",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1650",title:"Unordered list",onMouseDown:K=>{K.preventDefault(),ft("insertUnorderedList")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(kS,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1654",className:"w-3.5 h-3.5"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1658",className:"flex items-center gap-0.5 mt-1",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1660",title:"Undo (Ctrl+Z)",onMouseDown:K=>{K.preventDefault(),ft("undo")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(ZJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1664",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1666",title:"Redo (Ctrl+Y)",onMouseDown:K=>{K.preventDefault(),ft("redo")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(VJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1670",className:"w-3.5 h-3.5"})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1671",className:"w-px h-5 bg-gray-200 mx-0.5"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1673",title:"Outdent",onMouseDown:K=>{K.preventDefault(),ft("outdent")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(IJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1677",className:"w-3.5 h-3.5"})}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1679",title:"Indent",onMouseDown:K=>{K.preventDefault(),ft("indent")},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(LJ,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1683",className:"w-3.5 h-3.5"})}),n.jsxs(Cd,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1685",open:Pe,onOpenChange:ue,children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1686",asChild:!0,children:n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1687",title:"Insert link",onMouseDown:K=>{K.preventDefault(),ut()},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx(Sk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1692",className:"w-3.5 h-3.5"})})}),n.jsxs(Ad,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1695",className:"w-64 p-3",align:"start",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1696",className:"text-xs font-medium text-gray-700 mb-2",children:"Insert link"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1697",value:Qe,onCh
887ange:K=>Ue(K.target.value),placeholder:"https://...",className:"h-7 text-xs mb-2",onKeyDown:K=>{K.key==="Enter"&&Qe&&(ft("createLink",Qe),ue(!1),Ue(""))}}),n.jsx(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1710",size:"sm",className:"w-full h-7 text-xs",onClick:()=>{Qe&&(ft("createLink",Qe),ue(!1),Ue(""))},children:"Apply"})]})]}),n.jsxs(Cd,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1724",open:de,onOpenChange:ve,children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1725",asChild:!0,children:n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1726",title:"Personalization",onMouseDown:K=>{K.preventDefault(),ut()},className:"w-8 h-8 flex items-center justify-center rounded hover:bg-gray-100 text-gray-700",children:n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1731",className:"text-[10px] font-mono font-bold text-gray-600",children:"{}"})})}),n.jsxs(Ad,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1734",className:"w-52 p-2",align:"start",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1735",className:"text-xs font-medium text-gray-700 mb-1.5 px-1",children:"Personalization"}),[{label:"First name",token:"{{first_name}}"},{label:"Last name",token:"{{last_name}}"},{label:"Full name",token:"{{full_name}}"},{label:"Email address",token:"{{email}}"}].map(({label:K,token:He})=>n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1742",onMouseDown:nt=>{nt.preventDefault(),ft("insertText",He),ve(!1)},className:"w-full text-left px-2 py-1.5 rounded text-xs hover:bg-gray-100 flex items-center justify-between",children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1751",className:"text-gray-700",children:K}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1752",className:"text-gray-400 font-mono text-[10px]",children:He})]},He))]})]})]})]})]}),G==="layout"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1763",className:"px-5 pt-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1765",className:"space-y-2",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1766",className:"text-xs font-medium text-gray-700",children:"Padding"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1767",className:"grid grid-cols-2 gap-2",children:[{label:"Top",field:"paddingTop"},{label:"Bottom",field:"paddingBottom"},{label:"Left",field:"paddingLeft"},{label:"Right",field:"paddingRight"}].map(({label:K,field:He})=>n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1769",className:"space-y-1",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1770",className:"text-[10px] text-gray-500",children:K}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1771",value:be[He]||"16px",onValueChange:nt=>Ie(be.id,{[He]:nt}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1772",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1772"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1773",children:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px"].map(nt=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1774",value:nt,children:nt},nt))})]})]},He))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1782",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1783",className:"text-xs font-medium text-gray-700",children:"Block background"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1784",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1785",type:"color",value:be.blockBg||"#ffffff",onChange:K=>Ie(be.id,{blockBg:K.target.value}),className:"w-8 h-8 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1786",value:be.blockBg||"",placeholder:"#ffffff (transparent)",onChange:K=>Ie(be.id,{blockBg:K.target.value||void 0}),className:"h-8 text-xs font-mono"}),be.blockBg&&n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1787",onMouseDown:K=>{K.preventDefault(),Ie(be.id,{blockBg:void 0})},className:"text-[10px] text-gray-400 hover:text-gray-600",children:"Clear"})]})]})]})]}),be.type==="heading"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1795",className:"-mx-5 -mt-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1797",className:"px-5 pt-4 pb-3 border-b border-gray-100",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1798",className:"text-xs font-medium text-gray-700 block mb-2",children:"Heading level"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1799",className:"flex rounded-md border border-gray-200 overflow-hidden",children:["h1","h2","h3"].map(K=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1801",onClick:()=>Ie(be.id,{headingLevel:K}),className:`flex-1 py-1.5 text-xs font-medium transition-colors ${(be.headingLevel||"h2")===K?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:K.toUpperCase()},K))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1814",className:"px-5 pt-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1816",className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1817",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1818",className:"text-xs font-medium text-gray-700",children:"Font"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1819",value:be.textFont||"Inter,s
887ans-serif",onValueChange:K=>Ie(be.id,{textFont:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1823",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1823"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1824",children:["Inter,sans-serif","Arial,sans-serif","Georgia,serif","'Times New Roman',serif","'Courier New',monospace","Verdana,sans-serif"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1826",value:K,children:K.split(",")[0].replace(/'/g,"")},K))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1831",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1832",className:"text-xs font-medium text-gray-700",children:"Size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1833",value:be.textSize||"24px",onValueChange:K=>Ie(be.id,{textSize:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1837",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1837"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1838",children:["16px","18px","20px","22px","24px","28px","32px","36px","40px","48px","56px","64px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1840",value:K,children:K},K))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1848",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1849",className:"text-xs font-medium text-gray-700",children:"Color"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1850",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1851",type:"color",value:be.textColor||"#1a1a2e",onChange:K=>Ie(be.id,{textColor:K.target.value}),className:"w-8 h-8 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1857",value:be.textColor||"#1a1a2e",onChange:K=>Ie(be.id,{textColor:K.target.value}),className:"h-8 text-xs font-mono",placeholder:"#1a1a2e"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1867",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1868",className:"text-xs font-medium text-gray-700",children:"Alignment"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1869",className:"flex rounded-md border border-gray-200 overflow-hidden",children:["left","center","right","justify"].map(K=>n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1871",onClick:()=>Ie(be.id,{textAlign:K}),className:`flex-1 py-1.5 flex items-center justify-center transition-colors ${(be.textAlign||"left")===K?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:[K==="left"&&n.jsx(Yg,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1880",className:"w-3 h-3"}),K==="center"&&n.jsx(w1,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1881",className:"w-3 h-3"}),K==="right"&&n.jsx(N1,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1882",className:"w-3 h-3"}),K==="justify"&&n.jsx(vk,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1883",className:"w-3 h-3"})]},K))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1890",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1891",className:"text-xs font-medium text-gray-700",children:"Line height"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1892",value:be.textLineHeight||"1.3",onValueChange:K=>Ie(be.id,{textLineHeight:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1896",className:"h-9 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1896"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1897",children:["1","1.1","1.2","1.3","1.4","1.5","1.6","1.8","2"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1899",value:K,children:K},K))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1906",className:"space-y-2 border-t border-gray-100 pt-3",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1907",className:"text-xs font-medium text-gray-700",children:"Padding"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1908",className:"grid grid-cols-2 gap-2",children:[{label:"Top",field:"paddingTop"},{label:"Bottom",field:"paddingBottom"},{label:"Left",field:"paddingLeft"},{label:"Right",field:"paddingRight"}].map(({label:K,field:He})=>n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1910",className:"space-y-1",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1911",className:"text-[10px] text-gray-500",children:K}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1912",value:be[He]||"8px",onValueChange:nt=>Ie(be.id,{[He]:nt}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1913",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1913"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1914",children:["0px","4px","8px","12px","16px","20px","24px","32px","40px","48px"].map(nt=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1915",value:nt,children:nt},nt))})]})]},He))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1924",className:"space-y-1.5 border-t border-gray-100 pt-3",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1925",className:"text-xs font-medium text-gray-700",children:"Block background"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1926",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1927",type:"color",value:be.blockBg||"#ffffff",onChange:K=>Ie(be.id,{blockBg:K.target.value}),className:"w-8 h-8 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1928",value:be.blockBg||"",placeholder:"#ffffff (transparent)",onChange:K=>Ie(be.id,{blockBg:K.target.value||void 0}),className:"h-8 text-xs font-mono"}),be.blockBg&&n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1929",onMouseDown:K=>{K.preventDefault(),Ie(be.id,{blockBg:void 0})},className:"text-[10px] text-gray-400 hover:text-gray-600",children:"Clear"})]})]})]})]}),be.type==="button"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1936",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1938",className:"flex border-b border-gray-200 -mx-5 px-5",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1939",className:"text-xs font-semibold text-gray-900 border-b-2 border-gray-900 pb-2 mr-4",children:"Button"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1940",className:"text-xs text-gray-500 pb-2 hover:text-gray-700",children:"Layout"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1944",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1945",className:"text-xs font-medium text-gray-700",children:"Button label"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1946",value:be.content,onChange:K=>Ie(be.id,{content:K.target.value}),className:"h-8 text-xs"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1948",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1949",className:"text-xs font-medium text-gray-700",children:"Link URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1950",value:be.href??"",onChange:K=>Ie(be.id,{href:K.target.value}),className:"h-8 text-xs",placeholder:"https://..."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1953",className:"border-t border-gray-100 pt-3 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1955",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1956",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1957",className:"text-xs font-medium text-gray-700",children:"Backgroun
887d"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1958",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1959",type:"color",value:be.btnBgColor||"#6366f1",onChange:K=>Ie(be.id,{btnBgColor:K.target.value}),className:"w-8 h-8 rounded cursor-pointer border border-gray-200 p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1965",value:be.btnBgColor||"#6366f1",onChange:K=>Ie(be.id,{btnBgColor:K.target.value}),className:"h-8 text-xs font-mono"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1972",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1973",className:"text-xs font-medium text-gray-700",children:"Text color"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1974",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1975",type:"color",value:be.btnTextColor||"#ffffff",onChange:K=>Ie(be.id,{btnTextColor:K.target.value}),className:"w-8 h-8 rounded cursor-pointer border border-gray-200 p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1981",value:be.btnTextColor||"#ffffff",onChange:K=>Ie(be.id,{btnTextColor:K.target.value}),className:"h-8 text-xs font-mono"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1991",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1992",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1993",className:"text-xs font-medium text-gray-700",children:"Font size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1994",value:be.btnFontSize||"16px",onValueChange:K=>Ie(be.id,{btnFontSize:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1995",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1995"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1996",children:["12px","14px","16px","18px","20px","24px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:1997",value:K,children:K},K))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2001",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2002",className:"text-xs font-medium text-gray-700",children:"Border radius"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2003",value:be.btnBorderRadius||"8px",onValueChange:K=>Ie(be.id,{btnBorderRadius:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2004",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2004"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2005",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2006",value:"0px",children:"None (0px)"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2007",value:"4px",children:"Small (4px)"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2008",value:"8px",children:"Medium (8px)"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2009",value:"12px",children:"Large (12px)"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2010",value:"24px",children:"Pill (24px)"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2011",value:"9999px",children:"Full pill"})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2018",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2019",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2020",className:"text-xs font-medium text-gray-700",children:"Padding top/bottom"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2021",value:be.btnPaddingV||"14px",onValueChange:K=>Ie(be.id,{btnPaddingV:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2022",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2022"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2023",children:["8px","10px","12px","14px","16px","20px","24px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2024",value:K,children:K},K))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2028",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2029",className:"text-xs font-medium text-gray-700",children:"Padding left/right"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2030",value:be.btnPaddingH||"32px",onValueChange:K=>Ie(be.id,{btnPaddingH:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2031",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2031"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2032",children:["16px","20px","24px","32px","40px","48px","64px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2033",value:K,children:K},K))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2040",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2041",className:"text-xs font-medium text-gray-700",children:"Width"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2042",className:"flex gap-2",children:["auto","full"].map(K=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2044",onMouseDown:He=>{He.preventDefault(),Ie(be.id,{btnWidth:K})},className:`flex-1 h-8 text-xs rounded border transition-colors ${(be.btnWidth||"auto")===K?"bg-gray-900 text-white border-gray-900":"bg-white text-gray-700 border-gray-200 hover:border-gray-400"}`,children:K==="auto"?"Auto":"Full width"},K))})]})]})]}),be.type==="image"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2062",className:"space-y-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2064",className:"flex border-b border-gray-200 mb-4 -mx-5 px-5",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2065",className:"text-xs font-semibold text-gray-900 border-b-2 border-gray-900 pb-2 mr-4",children:"Image"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2066",className:"text-xs text-gray-500 pb-2 hover:text-gray-700",children:"Layout"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2070",className:"text-xs font-semibold text-gray-900 mb-1",children:"Image"}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2071",className:"text-[11px] text-gray-500 mb-3",children:"You can use JPG, PNG, and GIF formats, each under 2000px in dimension"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2074",className:"flex items-center gap-3 mb-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2075",className:"w-12 h-12 rounded border border-gray-200 overflow-hidden flex-shrink-0 bg-gray-50",children:be.content&&(be.content.startsWith("http")||be.content.startsWith("/"))?n.jsx("img",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2077",src:be.content,alt:"",className:"w-full h-full object-cover"}):n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2079",className:"w-full h-full flex items-center justify-center",children:n.jsx(Fl,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2079",className:"w-5 h-5 text-gray-300"})})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2082",className:"flex gap-2",children:[n.jsxs("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2083",className:"cursor-pointer",children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2084",className:"inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium border border-gray-300 rounded-md hover:bg-gray-50 transition-colors",children:y?n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2085",className:"w-3 h-3 animate-spin"}):"Replace"}),n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2087",type:"file",accept:"image/*",className:"hidden",onChange:K=>{const He=K.target.files?.[0];He&&Mt(He,nt=>Ie(be.id,{content:nt}))}})]}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2089",onClick:()=>Ie(be.id,{content:""}),className:"px-3 py-1.5 text-xs font-medium border border-gray-300 rounded-md hover:bg-gray-50 transition-colors text-gray-700",children:"Remove"})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2099",className:"text-xs font-semibold text-[#0a7cff] mb-3",children:"Edit Image"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2102",className:"space-y-1.5 mb-3",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2103",className:"text-xs font-medium text-gray-700",children:"Alt text"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2104",value:be.alt??"",onChange:K=>Ie(be.id,{alt:K.target.value}),className:"h-8 text-xs",placeholder:"Describe your image"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2113",className:"space-y-1.5 mb-4",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2114",className:"text-xs font-medium text-gray-700",children:"Link to"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2115",value:be.href??"",onChange:K=>Ie(be.id,{href:K.target.value}),className:"h-8 text-xs",placeholder:"https://"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2123",className:"border-t border-gray-100 pt-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2125",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2126",className:"text-xs font-medium text-gray-700",children:"Width"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2127",className:"flex rounded-md border border-gray-200 overflow-hidden",children:["25%","50%","75%","100%"].map(K=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2129",onClick:()=>Ie(be.id,{imageWidth:K}),className:`flex-1 py-1.5 text-xs font-medium transition-colors ${(be.imageWidth??"100%")===K?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:K},K))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2143",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2144",className:"text-xs font-medium text-gray-700",children:"Corner radius"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2145",className:"flex rounded-md border border-gray-200 overflow-hidden",children:[{label:"None",val:"0px"},{label:"SM",val:"4px"},{label:"MD",val:"8px"}
887,{label:"LG",val:"16px"},{label:"Full",val:"9999px"}].map(({label:K,val:He})=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2147",onClick:()=>Ie(be.id,{imageBorderRadius:He}),className:`flex-1 py-1.5 text-xs font-medium transition-colors ${(be.imageBorderRadius??"0px")===He?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:K},He))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2161",className:"space-y-2",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2162",className:"text-xs font-medium text-gray-700",children:"Alignment"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2163",className:"flex rounded-md border border-gray-200 overflow-hidden",children:["left","center","right"].map(K=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2165",onClick:()=>Ie(be.id,{alignment:K}),className:`flex-1 py-1.5 text-xs font-medium capitalize transition-colors ${(be.alignment??"center")===K?"bg-gray-900 text-white":"bg-white text-gray-600 hover:bg-gray-50"}`,children:K.charAt(0).toUpperCase()+K.slice(1)},K))})]})]})]}),be.type==="html"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2183",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2184",className:"text-xs font-medium text-gray-700",children:"HTML code"}),n.jsx("textarea",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2185",value:be.content,onChange:K=>Ie(be.id,{content:K.target.value}),rows:10,className:"w-full text-xs font-mono px-3 py-2 rounded-md border border-gray-200 focus:outline-none focus:ring-1 focus:ring-[#0a7cff] resize-none"})]}),be.type==="divider"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2196",className:"space-y-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2197",className:"flex border-b border-gray-200 -mx-5 px-5",children:n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2198",className:"text-xs font-semibold text-gray-900 border-b-2 border-gray-900 pb-2 mr-4",children:"Divider"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2201",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2202",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2203",className:"text-xs font-medium text-gray-700",children:"Color"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2204",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2205",type:"color",value:be.dividerColor||"#e5e7eb",onChange:K=>Ie(be.id,{dividerColor:K.target.value}),className:"w-8 h-8 rounded cursor-pointer border border-gray-200 p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2206",value:be.dividerColor||"#e5e7eb",onChange:K=>Ie(be.id,{dividerColor:K.target.value}),className:"h-8 text-xs font-mono"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2209",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2210",className:"text-xs font-medium text-gray-700",children:"Thickness"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2211",value:be.dividerThickness||"1px",onValueChange:K=>Ie(be.id,{dividerThickness:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2212",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2212"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2213",children:["1px","2px","3px","4px","6px","8px"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2214",value:K,children:K},K))})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2220",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2221",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2222",className:"text-xs font-medium text-gray-700",children:"Style"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2223",value:be.dividerStyle||"solid",onValueChange:K=>Ie(be.id,{dividerStyle:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2224",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2224"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2225",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2226",value:"solid",children:"Solid"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2227",value:"dashed",children:"Dashed"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2228",value:"dotted",children:"Dotted"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2232",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2233",className:"text-xs font-medium text-gray-700",children:"Width"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2234",value:be.dividerWidth||"100%",onValueChange:K=>Ie(be.id,{dividerWidth:K}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2235",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2235"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2236",children:["25%","50%","75%","100%"].map(K=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2237",value:K,children:K},K))})]})]})]})]}),be.type==="spacer"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2247",className:"space-y-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2248",className:"flex border-b border-gray-200 -mx-5 px-5",children:n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2249",className:"text-xs font-semibold text-gray-900 border-b-2 border-gray-900 pb-2 mr-4",children:"Spacer"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2251",className:"space-y-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2252",className:"flex items-center justify-between",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2253",className:"text-xs font-medium text-gray-700",children:"Height"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2254",className:"text-xs font-mono text-gray-500",children:be.spacerHeight||"32px"})]}),n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2256",type:"range",min:8,max:200,step:4,value:parseInt(be.spacerHeight||"32"),onChange:K=>Ie(be.id,{spacerHeight:`${K.target.value}px`}),className:"w-full accent-gray-900"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2263",className:"flex justify-between text-[10px] text-gray-400",children:[n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2264",children:"8px"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2264",children:"200px"})]})]})]}),be.type==="columns"&&(()=>{let K=[];try{K=JSON.parse(be.content)}catch{K=[]}const He=(Fe,ks)=>{const _s=[...K];_s[Fe]||(_s[Fe]={id:`col-${Fe}`,type:"text",content:"Column text"}),_s[Fe]={..._s[Fe],...ks},Ie(be.id,{content:JSON.stringify(_s)})},nt=Y!==null?K[Y]:null;return n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2282",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2283",className:"flex border-b border-gray-200 -mx-5 px-5",children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2284",onClick:()=>z(null),className:`text-xs pb-2 mr-4 border-b-2 transition-colors ${Y===null?"font-semibold text-gray-900 border-gray-900":"text-gray-500 border-transparent hover:text-gray-700"}`,children:"Columns"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2290",onClick:()=>z(0),className:`text-xs pb-2 mr-4 border-b-2 transition-colors ${Y===0?"font-semibold text-gray-900 border-gray-900":"text-gray-500 border-transparent hover:text-gray-700"}`,children:"Left"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2296",onClick:()=>z(1),className:`text-xs pb-2 border-b-2 transition-colors ${Y===1?"font-semibold text-gray-900 border-gray-900":"text-gray-500 border-transparent hover:text-gray-700"}`,children:"Right"})]}),Y===null&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2305",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2306",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2307",className:"text-xs font-medium text-gray-700",children:"Column ratio"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2308",className:"grid grid-cols-3 gap-1.5",children:["50-50","60-40","40-60","33-67","67-33"].map(Fe=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2310",onClick:()=>Ie(be.id,{colRatio:Fe}),className:`py-1.5 text-[11px] font-medium rounded border transition-colors ${(be.colRatio||"50-50")===Fe?"bg-gray-900 text-white border-gray-900":"bg-white text-gray-600 border-gray-200 hover:border-gray-400"}`,children:Fe.replace("-"," / ")},Fe))})]}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2322",className:"text-[11px] text-gray-400",children:`Click "Left" or "Right" tab above to edit each column's content and style.`})]}),Y!==null&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2327",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2329",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2330",className:"text-xs font-medium text-gray-700",children:"Content type"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2331",className:"flex gap-2",children:["text","image","button"].map(Fe=>n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2333",onClick:()=>He(Y,{type:Fe,content:Fe==="text"?"Column text":Fe==="image"?"":"Click here"}),className:`flex-1 py-1.5 text-[11px] font-medium rounded border capitalize transition-colors ${(nt?.type||"text")===Fe?"bg-gray-900 text-white border-gray-900":"bg-white text-gray-600 border-gray-200 hover:border-gray-400"}`,children:Fe},Fe))})]}),(nt?.type||"text")==="text"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2348",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2349",className:"text-xs font-medium text-gray-700",children:"Text"}),n.jsx("textarea",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2350",value:nt?.content||"",onChange:Fe=>He(Y,{content:Fe.target.value}),className:"w-full border border-gray-200 rounded text-xs p-2 resize-none h-20 focu
887s:outline-none focus:ring-1 focus:ring-gray-400",placeholder:"Column text..."}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2356",className:"grid grid-cols-2 gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2357",className:"space-y-1",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2358",className:"text-[10px] text-gray-500",children:"Font size"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2359",value:nt?.textSize||"14px",onValueChange:Fe=>He(Y,{textSize:Fe}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2360",className:"h-7 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2360"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2361",children:["12px","14px","16px","18px","20px","24px"].map(Fe=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2361",value:Fe,children:Fe},Fe))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2364",className:"space-y-1",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2365",className:"text-[10px] text-gray-500",children:"Align"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2366",className:"flex rounded border border-gray-200 overflow-hidden h-7",children:["left","center","right"].map(Fe=>n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2368",onClick:()=>He(Y,{textAlign:Fe}),className:`flex-1 flex items-center justify-center text-[10px] transition-colors ${(nt?.textAlign||"left")===Fe?"bg-gray-900 text-white":"bg-white text-gray-500 hover:bg-gray-50"}`,children:[Fe==="left"&&n.jsx(Yg,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2369",className:"w-3 h-3"}),Fe==="center"&&n.jsx(w1,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2370",className:"w-3 h-3"}),Fe==="right"&&n.jsx(N1,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2371",className:"w-3 h-3"})]},Fe))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2377",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2378",type:"color",value:nt?.textColor||"#1a1a2e",onChange:Fe=>He(Y,{textColor:Fe.target.value}),className:"w-7 h-7 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2379",value:nt?.textColor||"#1a1a2e",onChange:Fe=>He(Y,{textColor:Fe.target.value}),className:"h-7 text-xs font-mono",placeholder:"Text color"})]})]}),nt?.type==="image"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2386",className:"space-y-2",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2387",className:"text-xs font-medium text-gray-700",children:"Image URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2388",value:nt?.content||"",onChange:Fe=>He(Y,{content:Fe.target.value}),className:"h-8 text-xs",placeholder:"https://..."}),n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2394",className:"text-xs font-medium text-gray-700",children:"Alt text"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2395",value:nt?.alt||"",onChange:Fe=>He(Y,{alt:Fe.target.value}),className:"h-8 text-xs",placeholder:"Image description"})]}),nt?.type==="button"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2406",className:"space-y-2",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2407",className:"text-xs font-medium text-gray-700",children:"Button label"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2408",value:nt?.content||"",onChange:Fe=>He(Y,{content:Fe.target.value}),className:"h-8 text-xs"}),n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2409",className:"text-xs font-medium text-gray-700",children:"Link URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2410",value:nt?.href||"",onChange:Fe=>He(Y,{href:Fe.target.value}),className:"h-8 text-xs",placeholder:"https://..."}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2411",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2412",type:"color",value:nt?.btnBgColor||"#6366f1",onChange:Fe=>He(Y,{btnBgColor:Fe.target.value}),className:"w-7 h-7 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2413",className:"text-[10px] text-gray-500",children:"Backgroun
887d"}),n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2414",type:"color",value:nt?.btnTextColor||"#ffffff",onChange:Fe=>He(Y,{btnTextColor:Fe.target.value}),className:"w-7 h-7 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2415",className:"text-[10px] text-gray-500",children:"Text"})]})]})]})]})})(),["text","heading","button","divider"].includes(be.type)&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2427",className:"border-t border-gray-100 pt-3 space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2428",className:"text-xs font-medium text-gray-700",children:"Block background"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2429",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2430",type:"color",value:be.blockBg||"#ffffff",onChange:K=>Ie(be.id,{blockBg:K.target.value}),className:"w-8 h-8 rounded cursor-pointer border border-gray-200 p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2436",value:be.blockBg||"",placeholder:"#ffffff (transparent)",onChange:K=>Ie(be.id,{blockBg:K.target.value||void 0}),className:"h-8 text-xs font-mono"}),be.blockBg&&n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2443",onMouseDown:K=>{K.preventDefault(),Ie(be.id,{blockBg:void 0})},className:"text-[10px] text-gray-400 hover:text-gray-600 whitespace-nowrap",children:"Clear"})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2452",size:"sm",variant:"outline",className:"w-full text-xs text-red-500 border-red-200 hover:bg-red-50 hover:text-red-600",onClick:()=>ua(be.id),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2453",className:"w-3 h-3 mr-1"})," Remove element"]})]})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2459",className:"px-5 pt-5 pb-3 border-b border-gray-100",children:n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2460",className:"text-sm font-semibold text-gray-900",children:"Email settings"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2462",className:"px-5 py-4 space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2463",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2464",className:"text-xs font-medium text-gray-700",children:"Canvas width"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2465",type:"number",value:E,min:320,max:900,onChange:K=>D(Number(K.target.value)||600),className:"h-9 text-sm"}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2466",className:"text-[10px] text-gray-400",children:"We recommend using a 600-700px width"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2468",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2469",className:"text-xs font-medium text-gray-700",children:"Content padding"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2470",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2471",type:"range",min:0,max:80,step:4,value:I,onChange:K=>$(Number(K.target.value)),className:"flex-1 h-1.5 accent-gray-900"}),n.jsxs("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2478",className:"text-xs text-gray-600 w-10 text-right",children:[I,"px"]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2480",className:"text-[10px] text-gray-400",children:"Inner padding around the email body"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2482",className:"space-y-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2483",className:"text-xs font-semibold text-gray-700",children:"Theme settings"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2486",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2487",className:"text-xs font-medium text-gray-700",children:"Canvas background"}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2488",className:"flex items-center gap-2",children:[n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2489",type:"color",value:_,onCh
887ange:K=>T(K.target.value),className:"w-8 h-8 rounded border border-gray-200 cursor-pointer p-0.5"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2490",value:_,onChange:K=>T(K.target.value),className:"h-8 text-xs font-mono"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2495",className:"space-y-1.5 pt-1 border-t border-gray-100",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2496",className:"text-xs font-semibold text-gray-700",children:"Inbox placement"}),n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2497",className:"text-[10px] text-gray-400 leading-relaxed",children:"Embeds a GlockApps tracking ID at the bottom of the email so deliverability results are recorded automatically."}),n.jsx(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2498",variant:"outline",size:"sm",className:"w-full h-8 text-xs gap-1.5",disabled:vo.isPending,onClick:()=>vo.mutate(),children:vo.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2506",className:"w-3.5 h-3.5 animate-spin"}),"Generating…"]}):n.jsxs(n.Fragment,{children:[n.jsx(Gp,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2508",className:"w-3.5 h-3.5"}),"Generate seed test ID"]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2514",className:"space-y-1.5",children:[n.jsx("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2515",className:"text-xs font-medium text-gray-700",children:"Default font"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2516",value:R,onValueChange:B,children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2517",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2517"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2518",children:[{label:"Arial",value:"Arial, sans-serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Helvetica",value:"Helvetica, Arial, sans-serif"},{label:"Times New Roman",value:"'Times New Roman', Times, serif"},{label:"Trebuchet MS",value:"'Trebuchet MS', sans-serif"},{label:"Verdana",value:"Verdana, Geneva, sans-serif"}].map(({label:K,value:He})=>n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2527",value:He,children:K},He))})]})]})]})]})]})})]})]}),n.jsx(TNe,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2541",children:lt?n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2543",className:"shadow-2xl rounded-sm overflow-hidden opacity-90 bg-white",style:{width:"200px"},children:n.jsx(yv,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2544",block:lt})}):null})]})}return n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2556",className:"flex h-screen bg-background overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2557",className:"w-56 border-r border-border bg-sidebar flex flex-col flex-shrink-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2558",className:"px-4 py-4 border-b border-sidebar-border",children:n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2559",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2560",variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>e("/templates"),children:n.jsx(rs,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2561",className:"w-4 h-4"})}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2563",className:"text-xs font-semibold text-sidebar-foreground",children:"Email Builder"})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2566",className:"p-3 border-b border-sidebar-border",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2567",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2",children:"Add Blocks"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2568",className:"grid grid-cols-2 gap-1.5",children:WNe.map(({type:we,label:Je,icon:lt})=>n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2570",onClick:()=>Mn(we),className:"flex flex-col items-center gap-1 p-2 rounded-lg hover:bg-sidebar-accent transition-colors text-sidebar-foreground
887/70 hover:text-sidebar-foreground",children:[n.jsx(lt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2572",className:"w-4 h-4"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2573",className:"text-[10px] font-medium",children:Je})]},we))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2578",className:"p-3 flex-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2579",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2",children:"Industry"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2580",value:X,onValueChange:we=>Re(we),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2581",className:"h-7 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2581"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2582",children:[n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2583",value:"prop_firm",children:"Prop Firm"}),n.jsx(he,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2584",value:"crypto",children:"Crypto"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2588",className:"p-3 border-t border-sidebar-border space-y-1.5",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2589",size:"sm",className:"w-full text-xs",onClick:ga,disabled:Ve.isPending,children:[Ve.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2590",className:"w-3 h-3 mr-1 animate-spin"}):n.jsx(Md,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2590",className:"w-3 h-3 mr-1"}),"Save Template"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2593",size:"sm",variant:"outline",className:"w-full text-xs",onClick:Ca,children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2594",className:"w-3 h-3 mr-1"}),"Export HTML"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2599",className:"flex-1 flex flex-col min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2600",className:"flex items-center gap-3 px-4 py-3 border-b border-border bg-background/80 backdrop-blur-sm flex-shrink-0",children:[n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2601",value:_t,onChange:we=>da(we.target.value),className:"max-w-xs h-8 text-sm font-medium bg-transparent border-transparent hover:border-border focus:border-border"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2602",className:"flex-1"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2603",className:"flex items-center gap-1 bg-muted rounded-lg p-1",children:[{mode:"edit",icon:F5,label:"Edit"},{mode:"preview",icon:la,label:"Preview"},{mode:"code",icon:WI,label:"HTML"}].map(({mode:we,icon:Je,label:lt})=>n.jsxs("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2609",onClick:()=>Va(we),className:`flex items-center gap-1.5 px-3 py-1 rounded-md text-xs font-medium transition-colors ${Da===we?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:[n.jsx(Je,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2611",className:"w-3.5 h-3.5"}),lt]},we))})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2616",className:"flex-1 overflow-y-auto bg-muted/20 p-6",children:[Da==="edit"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2618",className:"max-w-2xl mx-auto",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2619",className:"mb-4 space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2620",className:"text-xs text-muted-foreground",children:"Subject line"}),n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2621",placeholder:"Email subject...",value:vt,onChange:we=>Xt(we.target.value),className:"bg-background"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2623",className:"bg-white rounded-xl shadow-lg overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2624",className:"bg-gray-50 border-b border-gray-100 px-8 py-4 flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2625",className:"w-3 h-3 rounded-full bg-red-400"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2626",className:"w-3 h-3 rounded-full bg-yellow-400"}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2627",className:"w-3 h-3 rounded-full bg-green-400"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2629",className:"p-8 space-y-2",children:[Ct.map(we=>n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2631",onClick:()=>Sa(we.id),className:`relative group rounded-lg transition-all cursor-pointer ${xa===we.id?"ring-2 ring-indigo-500 ring-offset-2":"hover:ring-1 hover:ring-gray-200"}`,children:[n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2633",className:`absolute -top-3 right-2 flex items-center gap-1 bg-white border border-gray-200 rounded-md shadow-sm px-1 py-0.5 z-10 transition-opacity ${xa===we.id?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:[n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2634",onClick:Je=>{Je.stopPropagation(),Ym(we.id,"up")},className:"p-0.5 hover:bg-gray-100 rounded text-gray-500 text-xs",children:"↑"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2635",onClick:Je=>{Je.stopPropagation(),Ym(we.id,"down")},className:"p-0.5 hover:bg-gray-100 rounded text-gray-500 text-xs",children:"↓"}),n.jsx("button",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2636",onClick:Je=>{Je.stopPropagation(),Au(we.id)},className:"p-0.5 hover:bg-red-50 rounded text-red-400 text-xs",children:"✕"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2638",className:"p-2",children:[we.type==="heading"&&n.jsx("h2",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2639",className:"text-2xl font-bold text-gray-900",children:we.content}),we.type==="text"&&n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2640",className:"text-gray-600 leading-relaxed",children:we.content}),we.type==="button"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2641",className:"flex justify-center",children:n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2641",className:"inline-block bg-indigo-600 text-white font-semibold px-8 py-3 rounded-lg",children:we.content})}),we.type==="image"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2643",className:"bg-gray-100 rounded-lg overflow-hidden",children:we.content&&(we.content.startsWith("http")||we.content.startsWith("/"))?n.jsx("img",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2645",src:we.content,alt:"",className:"w-full object-cover"}):n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2647",className:"h-32 flex items-center justify-center gap-2 text-gray-400",children:[n.jsx(Fl,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2648",className:"w-8 h-8"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2648",className:"text-xs",children:"Image placeholder"})]})}),we.type==="divider"&&n.jsx("hr",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2653",className:"border-gray-200"}),we.type==="spacer"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2654",className:"h-8"}),we.type==="html"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2655",dangerouslySetInnerHTML:{__html:we.content}})]})]},we.id)),Ct.length===0&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2660",className:"text-center py-16 text-gray-400",children:n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2661",className:"text-sm",children:"Add blocks from the left panel"})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2665",className:"bg-gray-50 border-t border-gray-100 px-8 py-4 text-center",children:n.jsx("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2666",className:"text-xs text-gray-400",children:"Unsubscribe | View in browser"})})]})]}),Da==="preview"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2672",className:"max-w-2xl mx-auto",children:n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2673",dangerouslySetInnerHTML:{__html:zg(Ct,vt)}})}),Da==="code"&&n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2677",className:"max-w-4xl mx-auto",children:n.jsx("pre",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2678",className:"bg-card border border-border rounded-xl p-6 text-xs font-mono text-muted-foreground overflow-x-auto whitespace-pre-wrap",children:zg(Ct,vt)})})]})]}),Os&&Da==="edit"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2687",className:"w-64 border-l border-border bg-sidebar flex flex-col flex-shrink-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2688",className:"px-4 py-4 border-b border-sidebar-border",children:n.jsxs("p",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2689",className:"text-xs font-semibold text-sidebar-foreground capitalize",children:[Os.type," Properties"]})}),n.jsx("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2691",className:"p-4 space-y-4 flex-1 overflow-y-auto",children:Os.type!=="divider"&&Os.type!=="spacer"&&n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2693",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2694",className:"text-xs",children:"Content"}),Os.type==="image"?n.jsxs("div",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2696",className:"space-y-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2697",value:Os.content,onChange:we=>Cr(Os.id,we.target.value),className:"text-xs",placeholder:"Image URL"}),n.jsxs("label",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2698",className:"flex items-center justify-center gap-1.5 w-full h-8 border border-dashed border-border rounded-md cursor-pointer hover:bg-muted/30 transition-colors",children:[y?n.jsx(Ot,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2699",className:"w-3 h-3 animate-spin text-muted-foreground"}):n.jsxs(n.Fragment,{children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2700",className:"w-3 h-3 text-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2700",className:"text-[10px] text-muted-foreground",children:"Upload image"})]}),n.jsx("input",{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2702",type:"file",accept:"image/*",className:"hidden",onChange:we=>{const Je=we.target.files?.[0];Je&&Mt(Je,lt=>Cr(Os.id,lt))}})]})]}):n.jsx(De,{"data-loc":"client/src/pages/client/EmailBuilder.tsx:2706",value:Os.content,onChange:we=>Cr(Os.id,we.target.value),className:"text-xs"})]})})]})]})}const Ug={account_funded:{label:"Account Funded",icon:_n,color:"text-emerald-600",bg:"bg-emerald-50"},challenge_passed:{label:"Challenge Passed",icon:Kl,color:"text-teal-600",bg:"bg-teal-50"},challenge_failed:{label:"Challenge Failed",icon:Pa,color:"text-red-500",bg:"bg-red-50"},payout_requested:{label:"Payout Requested",icon:zi,color:"text-violet-600",bg:"bg-violet-50"},payout_approved:{label:"Payout Approved",icon:zi,color:"text-blue-600",bg:"bg-blue-50"},kyc_submitted:{label:"KYC Submitted",icon:wa,color:"text-orange-600",bg:"bg-orange-50"}
887,kyc_approved:{label:"KYC Approved",icon:wa,color:"text-green-600",bg:"bg-green-50"},contact_created:{label:"Contact Created",icon:wa,color:"text-blue-600",bg:"bg-blue-50"},tag_added:{label:"Tag Applied",icon:vf,color:"text-pink-600",bg:"bg-pink-50"},list_joined:{label:"List Joined",icon:wa,color:"text-indigo-600",bg:"bg-indigo-50"},custom_event:{label:"Custom Event",icon:TS,color:"text-gray-600",bg:"bg-gray-100"},scheduled:{label:"Scheduled",icon:AS,color:"text-amber-600",bg:"bg-amber-50"},welcome:{label:"Welcome Series",icon:Pa,color:"text-primary",bg:"bg-primary/10"},popup_submitted:{label:"Popup Submitted",icon:Ic,color:"text-fuchsia-600",bg:"bg-fuchsia-50"}},GNe=[{trigger:"welcome",label:"Welcome Series",desc:"Greet new subscribers"},{trigger:"account_funded",label:"Account Funded",desc:"Celebrate funded traders"},{trigger:"challenge_passed",label:"Challenge Passed",desc:"Congratulate passers"},{trigger:"payout_requested",label:"Payout Requested",desc:"Payout flow emails"},{trigger:"popup_submitted",label:"Popup / Spin Wheel",desc:"Welcome spin wheel winners"}];function YNe(){const{data:e,isLoading:t,refetch:a}=le.automations.list.useQuery(),s=le.automations.toggle.useMutation({onSuccess:()=>{ne.success("Automation updated"),a()},onError:l=>ne.error(l.message)}),r=e?.filter(l=>l.status==="active").length??0,i=e?.length??0;return n.jsx(Pt,{"data-loc":"client/src/pages/client/Automations.tsx:73",title:"Automations",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:74",className:"p-6 max-w-7xl mx-auto space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:77",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:78",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Automations.tsx:79",className:"text-xl font-semibold text-foreground",children:"Automations"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Automations.tsx:80",className:"text-sm text-muted-foreground mt-0.5",children:[i," automation",i!==1?"s":""," · ",r," active"]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Automations.tsx:84",asChild:!0,size:"sm",className:"gap-1.5",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Automations.tsx:85",href:"/automations/new",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Automations.tsx:86",className:"w-4 h-4"}),"New automation"]})})]}),!t&&i===0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:94",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:95",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-3",children:"Start with a template"}),n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:98",className:"grid grid-cols-2 lg:grid-cols-4 gap-3",children:GNe.map(({trigger:l,label:d,desc:u})=>{const p=Ug[l]??Ug.custom_event,x=p.icon;return n.jsx(It,{"data-loc":"client/src/pages/client/Automations.tsx:103",href:`/automations/new?trigger=${l}`,children:n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:104",className:"border border-border rounded-lg p-4 hover:border-primary/40 hover:bg-primary/5 transition-colors cursor-pointer group",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:105",className:`w-8 h-8 rounded-lg ${p.bg} flex items-center justify-center mb-3`,children:n.jsx(x,{"data-loc":"client/src/pages/client/Automations.tsx:106",className:`w-4 h-4 ${p.color}`})}),n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:108",className:"text-sm font-semibold text-foreground group-hover:text-primary transition-colors",children:d}),n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:109",className:"text-xs text-muted-foreground mt-0.5",children:u})]})},l)})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:119",className:"border border-border rounded-lg overflow-hidden bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:121",className:"grid grid-cols-[2fr_1fr_1fr_1fr_80px] gap-4 px-4 py-3 bg-muted/40 border-b border-border text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Automations.tsx:122",children:"Automation"}),n.jsx("span",{"data-loc":"client/src/pages/client/Automations.tsx:123",children:"Status"}),n.jsx("span",{"data-loc":"client/src/pages/client/Automations.tsx:124",children:"Enrolled"}),n.jsx("span",{"data-loc":"client/src/pages/client/Automations.tsx:125",children:"Completed"}),n.jsx("span",{"data-loc":"client/src/pages/client/Automations.tsx:126",className:"text-right",children:"Actions"})]}),t?n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:131",className:"divide-y divide-border",children:[...Array(4)].map((l,d)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:133",className:"grid grid-cols-[2fr_1fr_1fr_1fr_80px] gap-4 px-4 py-4 items-center",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:134",className:"flex items-center gap-3",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:135",className:"w-9 h-9 rounded-lg flex-shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:136",className:"space-y-1.5",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:137",className:"h-4 w-40"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:138",className:"h-3 w-24"})]})]}),n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:141",className:"h-5 w-16 rounded-full"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:142",className:"h-4 w-12"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:143",className:"h-4 w-12"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Automations.tsx:144",className:"h-8 w-8 ml-auto rounded"})]},d))}):e?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:165",className:"divide-y divide-border",children:e.map(l=>{const d=Ug[l.triggerType]??Ug.custom_event,u=d.icon,p=l.status==="active";return n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:172",className:"grid grid-cols-[2fr_1fr_1fr_1fr_80px] gap-4 px-4 py-4 items-center hover:bg-muted/30 transition-colors",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:177",className:"flex items-center gap-3 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:178",className:`w-9 h-9 rounded-lg flex items-center justify-center flex-shrink-0 ${d.bg}`,children:n.jsx(u,{"data-loc":"client/src/pages/client/Automations.tsx:179",className:`w-4 h-4 ${d.color}`})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:181",className:"min-w-0",children:[n.jsx(It,{"data-loc":"client/src/pages/client/Automations.tsx:182",href:`/automations/${l.id}`,children:n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:183",className:"text-sm font-medium text-foreground hover:text-primary truncate cursor-pointer transition-colors",children:l.name})}),n.jsxs("p",{"data-loc":"client/src/pages/client/Automations.tsx:187",className:"text-xs text-muted-foreground mt-0.5 flex items-center gap-1",children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Automations.tsx:188",className:"w-3 h-3 flex-shrink-0"}),d.label]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:195",className:"flex items-center gap-2",children:[n.jsx(Ti,{"data-loc":"client/src/pages/client/Automations.tsx:196",checked:p,onCheckedChange:x=>s.mutate({id:l.id,status:x?"active":"paused"}),className:"data-[state=checked]:bg-primary"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Automations.tsx:203",variant:"outline",className:p?"border-emerald-200 bg-emerald-50 text-emerald-700 text-[10px] font-semibold":"border-gray-200 bg-gray-50 text-gray-500 text-[10px] font-semibold",children:p?"Active":"Paused"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:216",className:"flex items-center gap-1.5 text-sm text-foreground",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Automations.tsx:217",className:"w-3.5 h-3.5 text-muted-foreground"}
887),l.totalEnrolled?.toLocaleString()??"—"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:222",className:"flex items-center gap-1.5 text-sm text-foreground",children:[n.jsx(Kl,{"data-loc":"client/src/pages/client/Automations.tsx:223",className:"w-3.5 h-3.5 text-muted-foreground"}),l.totalCompleted?.toLocaleString()??"—"]}),n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:228",className:"flex justify-end",children:n.jsxs(xr,{"data-loc":"client/src/pages/client/Automations.tsx:229",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Automations.tsx:230",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Automations.tsx:231",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Automations.tsx:232",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Automations.tsx:235",align:"end",className:"w-44",children:[n.jsx(ca,{"data-loc":"client/src/pages/client/Automations.tsx:236",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Automations.tsx:237",href:`/automations/${l.id}`,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Automations.tsx:238",className:"w-4 h-4"}),"View"]})}),n.jsx(ca,{"data-loc":"client/src/pages/client/Automations.tsx:242",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/Automations.tsx:243",href:`/automations/${l.id}`,className:"flex items-center gap-2 cursor-pointer",children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Automations.tsx:244",className:"w-4 h-4"}),"Edit"]})}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Automations.tsx:248",className:"flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Duplicate coming soon"),children:[n.jsx(Ra,{"data-loc":"client/src/pages/client/Automations.tsx:252",className:"w-4 h-4"}),"Duplicate"]}),n.jsx(jf,{"data-loc":"client/src/pages/client/Automations.tsx:255"}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Automations.tsx:256",className:"flex items-center gap-2 text-destructive focus:text-destructive cursor-pointer",onClick:()=>ne.info("Delete coming soon"),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Automations.tsx:260",className:"w-4 h-4"}),"Delete"]})]})]})})]},l.id)})}):n.jsxs("div",{"data-loc":"client/src/pages/client/Automations.tsx:149",className:"py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Automations.tsx:150",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(eee,{"data-loc":"client/src/pages/client/Automations.tsx:151",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:153",className:"text-sm font-medium text-foreground",children:"No automations yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Automations.tsx:154",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Create your first automation to start engaging contacts automatically"}),n.jsx(te,{"data-loc":"client/src/pages/client/Automations.tsx:157",asChild:!0,size:"sm",variant:"outline",children:n.jsxs(It,{"data-loc":"client/src/pages/client/Automations.tsx:158",href:"/automations/new",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Automations.tsx:159",className:"w-4 h-4 mr-1.5"}),"Create automation"]})})]})]})]})})}const y7=[{value:"popup_submitted",label:"Popup Submitted",description:"Triggered when a visitor submits a popup or spin wheel"},{value:"welcome",label:"Welcome (Contact Created)",description:"Triggered when a new contact is created"},{value:"account_funded",label:"Account Funded",description:"Triggered when a trading account is funded"},{value:"challenge_passed",label:"Challenge Passed",description:"Triggered when a trader passes a challenge"},{value:"challenge_failed",label:"Challenge Failed",description:"Triggered when a trader fails a challenge"},{value:"payout_requested",label:"Payout Requested",description:"Triggered when a payout is requested"},{value:"payout_approved",label:"Payout Approved",description:"Triggered when a payout is approved"},{value:"kyc_submitted",label:"KYC Submitted",description:"Triggered when KYC documents are submitted"},{value:"kyc_approved",label:"KYC Approved",description:"Triggered when KYC is approved"},{value:"contact_created",label:"Contact Created",description:"Triggered when any contact is added"}
887,{value:"tag_added",label:"Tag Added",description:"Triggered when a tag is added to a contact"},{value:"custom_event",label:"Custom Event",description:"Triggered by a custom webhook event"}];function KNe(){return Math.random().toString(36).slice(2,9)}function YN(){const[,e]=La(),t=V5(),a=Yi(),s=new URLSearchParams(t),r=a.id?parseInt(a.id):null,i=s.get("returnStep");s.get("returnHtml");const[l,d]=v.useState("New Automation"),[u,p]=v.useState("popup_submitted"),[x,m]=v.useState({}),[h,y]=v.useState([]),[w,b]=v.useState("draft"),[j,S]=v.useState(!1),[O,A]=v.useState(!1),[k,E]=v.useState([]),{data:D,isLoading:_}=le.automations.get.useQuery({id:r},{enabled:!!r});v.useEffect(()=>{D&&(d(D.name),p(D.triggerType),m(D.triggerConfig??{}),y(D.workflowJson??[]),b(D.status),E(D.exitConditions??[]))},[D]),v.useEffect(()=>{if(i){const H=localStorage.getItem(`automation_email_step_${i}`);if(H)try{const{subject:q,bodyHtml:J,bodyJson:ce,previewText:se}=JSON.parse(H);y(ye=>ye.map(de=>de.id===i?{...de,subject:q,bodyHtml:J,bodyJson:ce,previewText:se}:de)),localStorage.removeItem(`automation_email_step_${i}`),ne.success("Email content saved to step")}catch{}}},[i]);const{data:T}=le.spinWheel.list.useQuery(void 0,{enabled:u==="popup_submitted"}),{data:I}=le.leadPopups.list.useQuery(void 0,{enabled:u==="popup_submitted"}),$=le.automations.create.useMutation({onSuccess:H=>{ne.success("Automation created!"),e("/automations")},onError:H=>ne.error(H.message)}),R=le.automations.update.useMutation({onSuccess:()=>{ne.success("Automation saved!")},onError:H=>ne.error(H.message)}),B=le.automations.toggle.useMutation({onSuccess:(H,q)=>{b(q.status),ne.success(q.status==="active"?"Automation activated!":"Automation paused")},onError:H=>ne.error(H.message)}),Y=H=>{const q={email:{subject:"",previewText:"",bodyHtml:"",delayAmount:0,delayUnit:"minutes"},delay:{delayAmount:1,delayUnit:"hours"}};y(J=>[...J,{id:KNe(),type:H,...q[H]}])},z=(H,q)=>{y(J=>J.map(ce=>ce.id===H?{...ce,...q}:ce))},Q=H=>{y(q=>q.filter(J=>J.id!==H))},L=()=>h,M=()=>{if(!l.trim())return ne.error("Automation name is required");if(h.length===0)return ne.error("Add at least one step");const H={name:l,triggerType:u,triggerConfig:u==="popup_submitted"||u==="custom_event"?x:void 0,workflowJson:L(),exitConditions:k.length>0?k:null};r?R.mutate({id:r,data:{...H,workflowJson:L()}}):$.mutate({...H,steps:L().map((q,J)=>({id:q.id,stepType:q.type,stepOrder:J,config:q}))})},U=()=>{if(!r)return ne.error("Save the automation first");const H=w==="active"?"paused":"active";B.mutate({id:r,status:H})},Z=H=>{localStorage.setItem(`automation_builder_state_${r??"new"}`,JSON.stringify({name:l,triggerType:u,triggerConfig:x,steps:h,status:w}));const q=r?`/automations/${r}/edit?returnStep=${H.id}`:`/automations/new?returnStep=${H.id}`;e(`/builder?automationStep=${H.id}&returnTo=${encodeURIComponent(q)}&subject=${encodeURIComponent(H.subject??"")}`)},ie=$.isPending||R.isPending,G=y7.find(H=>H.value===u),F=[...(T??[]).map(H=>({id:H.id,name:H.name,type:"spin_wheel"})),...(I??[]).map(H=>({id:H.id,name:H.name,type:"lead_popup"}))];return _?n.jsx(Pt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:219",title:"Automation",children:n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:220",className:"flex items-center justify-center h-64",children:n.jsx(Ot,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:221",className:"w-6 h-6 animate-spin text-muted-foreground"})})}):n.jsx(Pt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:228",title:r?"Edit Automation":"New Automation",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:229",className:"p-6 max-w-2xl mx-auto space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:232",className:"flex items-center gap-3",children:[n.jsx(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:233",variant:"ghost",size:"sm",asChild:!0,children:n.jsxs(It,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:234",href:"/automations",children:[n.jsx(rs,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:234",className:"w-4 h-4 mr-1"}),"Back"]})}),n.jsx("h2",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:236",className:"text-xl font-bold text-foreground flex-1",children:r?"Edit Automation":"Build Automation"}),r&&n.jsxs(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:240",variant:"outline",size:"sm",onClick:U,disabled:B.isPending,className:w==="active"?"border-amber-500/30 text-amber-400 hover:bg-amber-500/10":"border-green-500/30 text-green-400 hover:bg-green-500/10",children:[w==="active"?n.jsx(FJ,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:247",className:"w-3.5 h-3.5 mr-1.5"}):n.jsx(HJ,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:247",className:"w-3.5 h-3.5 mr-1.5"}),w==="active"?"Pause":"Activate"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:251",size:"sm",onClick:M,disabled:ie,children:[ie?n.jsx(Ot,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:252",className:"w-4 h-4 animate-spin"}):n.jsx(Md,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:252",className:"w-4 h-4 mr-1.5"}),"Save"]})]}),r&&n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:259",className:"flex items-center gap-2",children:n.jsx(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:260",variant:w==="active"?"default":"secondary",className:w==="active"?"bg-green-500/20 text-green-400 border-green-500/30":w==="paused"?"bg-amber-500/20 text-amber-400 border-amber-500/30":"bg-muted text-muted-foreground",children:w==="active"?"● Active":w==="paused"?"⏸ Paused":"Draft"})}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:271",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:272",className:"pb-3",children:n.jsxs(St,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:273",className:"text-sm flex items-center gap-2",children:[n.jsx(t9,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:274",className:"w-4 h-4 text-muted-foreground"}),"Automation Settings"]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:278",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:279",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:280",children:"Automation Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:281",placeholder:"e.g. Spin Wheel Welcome — 60% Off",value:l,onCh
887ange:H=>d(H.target.value)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:287",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:288",children:"Trigger Event"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:289",value:u,onValueChange:H=>{p(H),m({})},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:290",children:n.jsx(ht,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:291"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:293",children:y7.map(H=>n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:295",value:H.value,children:H.label},H.value))})]}),G&&n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:300",className:"text-xs text-muted-foreground",children:G.description})]}),u==="custom_event"&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:306",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:307",className:"text-xs font-medium",children:["Event Name ",n.jsx("span",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:307",className:"text-destructive",children:"*"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:308",className:"h-8 text-xs font-mono",placeholder:"e.g. passed_challenge, deposited, kyc_approved",value:x.eventName??"",onChange:H=>m(q=>({...q,eventName:H.target.value||null}))}),n.jsxs("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:314",className:"text-xs text-muted-foreground",children:["Must match the ",n.jsx("code",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:314",className:"text-xs bg-muted px-1 rounded",children:"event"})," field sent to ",n.jsx("code",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:314",className:"text-xs bg-muted px-1 rounded",children:"POST /api/events"})," exactly (case-sensitive)"]})]}),u==="popup_submitted"&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:320",className:"rounded-lg border border-border bg-muted/20 p-3 space-y-3",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:321",className:"flex items-center gap-2 text-xs font-semibold text-muted-foreground uppercase tracking-wide w-full text-left",onClick:()=>S(!j),children:[n.jsx(ch,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:325",className:"w-3.5 h-3.5"}),"Trigger Filters",j?n.jsx(Bi,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:327",className:"w-3.5 h-3.5 ml-auto"}):n.jsx(Tn,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:327",className:"w-3.5 h-3.5 ml-auto"})]}),j&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:331",className:"space-y-3 pt-1",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:332",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:333",className:"text-xs",children:"Specific Popup / Spin Wheel"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:334",value:x.popupId?.toString()??"any",onValueChange:H=>{if(H==="any")m(q=>({...q,popupId:null,popupType:null}));else{const q=F.find(J=>J.id.toString()===H);m(J=>({...J,popupId:parseInt(H),popupType:q?.type??null}))}},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:345",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:346",placeholder:"Any popup or spin wheel"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:348",children:[n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:349",value:"any",children:"Any popup or spin wheel"}),T&&T.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:352",className:"px-2 py-1 text-xs text-muted-foreground font-semibold",children:"Spin Wheels"}),T.map(H=>n.jsxs(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:354",value:H.id.toString(),children:["🎡 ",H.name]},`sw-${H.id}`))]}),I&&I.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:360",className:"px-2 py-1 text-xs text-muted-foreground font-semibold",children:"Lead Popups"}),I.map(H=>n.jsxs(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:362",value:H.id.toString(),children:["📋 ",H.name]},`lp-${H.id}`))]})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:368",className:"text-xs text-muted-foreground",children:"Leave blank to trigger for any popup submission"})]}),(x.popupType==="spin_wheel"||!x.popupId&&T&&T.length>0)&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:374",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:375",className:"text-xs",children:"Prize Won (optional)"}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:376",className:"h-8 text-xs",placeholder:"e.g. 60% Discount (leave blank for any)",value:x.prizeLabel??"",onChange:H=>m(q=>({...q,prizeLabel:H.target.value||null}))}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:382",className:"text-xs text-muted-foreground",children:"Filter by the exact prize label the visitor won"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:384",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:385",className:"text-xs",children:"Coupon Code (optional)"}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:386",className:"h-8 text-xs",placeholder:"e.g. SPIN60 (leave blank for any)",value:x.couponCode??"",onChange:H=>m(q=>({...q,couponCode:H.target.value||null}))}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:392",className:"text-xs text-muted-foreground",children:"Filter by the specific coupon code assigned to the prize"})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:401",className:"rounded-lg border border-border bg-muted/20 p-3 space-y-3",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:402",className:"flex items-center gap-2 text-xs font-semibold text-muted-foreground uppercase tracking-wide w-full text-left",onClick:()=>A(!O),children:[n.jsx("span",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:406",className:"text-sm",children:"🚪"}),"Exit Conditions",k.length>0&&n.jsx(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:409",variant:"secondary",className:"text-xs h-4 px-1.5 ml-1",children:k.length}),O?n.jsx(Bi,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:411",className:"w-3.5 h-3.5 ml-auto"}):n.jsx(Tn,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:411",className:"w-3.5 h-3.5 ml-auto"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:413",className:"text-xs text-muted-foreground -mt-1",children:"Remove c
887ontacts from this flow when a condition is met"}),O&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:416",className:"space-y-2 pt-1",children:[k.map((H,q)=>n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:418",className:"flex items-start gap-2 p-2.5 rounded-lg border border-border bg-background",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:419",className:"flex-1 space-y-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:420",value:H.type,onValueChange:J=>{const ce=[...k];ce[q]={type:J},E(ce)},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:428",className:"h-7 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:429"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:431",children:[n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:432",value:"coupon_used",children:"🎟️ Coupon code used"}),n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:433",value:"any_purchase",children:"🛒 Any purchase made"}),n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:434",value:"unsubscribed",children:"🚫 Contact unsubscribed"}),n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:435",value:"tag_added",children:"🏷️ Tag added to contact"})]})]}),H.type==="coupon_used"&&n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:439",className:"h-7 text-xs",placeholder:"Coupon code (e.g. SPIN60) — leave blank to match any",value:H.couponCode??"",onChange:J=>{const ce=[...k];ce[q]={...H,couponCode:J.target.value||void 0},E(ce)}}),H.type==="tag_added"&&n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:451",className:"h-7 text-xs",placeholder:"Tag name (e.g. purchased)",value:H.tagName??"",onChange:J=>{const ce=[...k];ce[q]={...H,tagName:J.target.value||void 0},E(ce)}})]}),n.jsx(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:463",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-destructive hover:text-destructive flex-shrink-0",onClick:()=>E(J=>J.filter((ce,se)=>se!==q)),children:n.jsx(Ua,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:468",className:"w-3.5 h-3.5"})})]},q)),n.jsxs(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:472",variant:"outline",size:"sm",className:"w-full h-7 text-xs border-dashed",onClick:()=>E(H=>[...H,{type:"coupon_used"}]),children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:477",className:"w-3 h-3 mr-1.5"})," Add exit condition"]})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:486",className:"space-y-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:488",className:"flex items-center gap-3 p-4 rounded-xl border-2 border-primary/30 bg-primary/5",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:489",className:"w-9 h-9 rounded-xl bg-primary/20 flex items-center justify-center flex-shrink-0",children:n.jsx(Pa,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:490",className:"w-4 h-4 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:492",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:493",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:"Trigger"}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:494",className:"text-sm font-semibold text-foreground",children:G?.label??u}),u==="popup_submitted"&&(x.popupId||x.prizeLabel||x.couponCode)&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:498",className:"flex flex-wrap gap-1 mt-1",children:[x.popupId&&n.jsx(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:500",variant:"secondary",className:"text-xs h-4 px-1.5",children:F.find(H=>H.id===x.popupId)?.name??`Popup #${x.popupId}`}),x.prizeLabel&&n.jsxs(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:505",variant:"secondary",className:"text-xs h-4 px-1.5",children:["Prize: ",x.prizeLabel]}),x.couponCode&&n.jsxs(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:508",variant:"secondary",className:"text-xs h-4 px-1.5",children:["Code: ",x.couponCode]})]}),u==="custom_event"&&x.eventName&&n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:513",className:"flex flex-wrap gap-1 mt-1",children:n.jsx(Le,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:514",variant:"secondary",className:"text-xs h-4 px-1.5 font-mono",children:x.eventName})})]})]}),h.map((H,q)=>n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:522",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:523",className:"flex justify-center py-2",children:n.jsx(S1,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:524",className:"w-4 h-4 text-muted-foreground"})}),n.jsx(QNe,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:526",step:H,onUpdate:J=>z(H.id,J),onRemove:()=>Q(H.id),onOpenBuilder:()=>Z(H)})]},H.id)),n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:536",className:"flex justify-center py-2",children:n.jsx(S1,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:537",className:"w-4 h-4 text-muted-foreground"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:539",className:"rounded-xl border-2 border-dashed border-border p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:540",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide text-center mb-3",children:"Add Step"}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:541",className:"flex gap-2 justify-center",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:542",onClick:()=>Y("email"),className:"flex items-center gap-2 px-4 py-2.5 rounded-lg border border-border hover:border-primary/40 hover:bg-primary/5 transition-colors",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:546",className:"w-6 h-6 rounded-md bg-primary/10 flex items-center justify-center",children:n.jsx(ja,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:547",className:"w-3 h-3 text-primary"})}),n.jsx("span",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:549",className:"text-xs font-medium text-foreground",children:"Send Email"})]}),n.jsxs("button",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:551",onClick:()=>Y("delay"),className:"flex items-center gap-2 px-4 py-2.5 rounded-lg border border-border hover:border-amber-500/40 hover:bg-amber-500/5 transition-colors",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:555",className:"w-6 h-6 rounded-md bg-amber-500/10 flex items-center justify-center",children:n.jsx(jr,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:556",className:"w-3 h-3 text-amber-400"})}),n.jsx("span",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:558",className:"text-xs font-medium text-foreground",children:"Wait / Delay"})]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:564",className:"flex justify-center py-2",children:n.jsx(S1,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:565",className:"w-4 h-4 text-muted-foreground"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:567",className:"flex items-center gap-3 p-3 rounded-xl border border-dashed border-border bg-muted/10",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:568",className:"w-7 h-7 rounded-lg bg-muted/30 flex items-center justify-center flex-shrink-0",children:n.jsx("span",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:569",className:"text-xs text-muted-foreground",children:"⛳"})}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:571",className:"text-xs text-muted-foreground font-medium",children:"Exit"})]})]})]})})}function QNe({step:e,onUpdate:t,onRemove:a,onOpenBuilder:s}){const r=e.type==="email",i=e.type==="delay",l=r&&e.bodyHtml&&e.bodyHtml.length>50;return n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:597",className:"rounded-xl border border-border bg-card p-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:598",className:"flex items-start gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:599",className:`w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0 mt-0.5 ${r?"bg-primary/10":"bg-amber-500/10"}`,children:r?n.jsx(ja,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:602",className:"w-4 h-4 text-primary"}):n.jsx(jr,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:602",className:"w-4 h-4 text-amber-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:604",className:"flex-1 space-y-3 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:605",className:"flex items-center justify-between",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:606",className:"text-sm font-semibold text-foreground",children:r?"Send Email":"Wait / Delay"}),n.jsx(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:609",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 text-destructive hover:text-destructive",onClick:a,children:n.jsx(Ua,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:610",className:"w-3.5 h-3.5"})})]}),r&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:615",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:616",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:617",className:"text-xs",children:"Subject Line"}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:618",className:"h-8 text-xs",placeholder:"e.g. 🎉 You won {{prize}} — here's your code!",value:e.subject??"",onChange:d=>t({subject:d.target.value})}),n.jsxs("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:624",className:"text-xs text-muted-foreground",children:["Available tokens: ",n.jsx("code",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:625",className:"text-xs bg-muted px-1 rounded",children:"{{firstName}}"})," ",n.jsx("code",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:626",className:"text-xs bg-muted px-1 rounded",children:"{{prize}}"})," ",n.jsx("code",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:627",className:"text-xs bg-muted px-1 rounded",children:"{{couponCode}}"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:630",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:631",className:"text-xs",children:"Preview Text"}),n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:632",className:"h-8 text-xs",placeholder:"Short preview shown in inbox...",value:e.previewText??"",onChange:d=>t({previewText:d.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:639",className:"rounded-lg border border-border bg-muted/20 p-3 flex items-center justify-between gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:640",className:"min-w-0",children:l?n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:642",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:643",className:"text-xs font-medium text-foreground",children:"Email content saved"}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:644",className:"text-xs text-muted-foreground truncate",children:e.subject||"No subject"})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:649",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:650",className:"text-xs font-medium text-foreground",children:"No email content yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:651",className:"text-xs text-muted-foreground",children:"Design the email body using the email builder"})]})}),n.jsxs(te,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:655",variant:"outline",size:"sm",className:"shrink-0 h-8 text-xs gap-1.5",onClick:s,children:[n.jsx(zv,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:661",className:"w-3 h-3"}),l?"Edit Content":"Design Email"]})]})]}),i&&n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:669",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:670",className:"text-xs",children:"Wait duration"}),n.jsxs("div",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:671",className:"flex gap-2 items-center",children:[n.jsx(De,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:672",type:"number",className:"h-8 text-xs w-20",min:1,value:e.delayAmount??1,onChange:d=>t({delayAmount:parseInt(d.target.value)||1})}),n.jsxs(mt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:679",value:e.delayUnit??"hours",onValueChange:d=>t({delayUnit:d}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:683",className:"h-8 text-xs w-28",children:n.jsx(ht,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:683"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:684",children:[n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:685",value:"minutes",children:"Minutes"}),n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:686",value:"hours",children:"Hours"}),n.jsx(he,{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:687",value:"days",children:"Days"})]})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/AutomationBuilder.tsx:691",className:"text-xs text-muted-foreground",children:"The next step will execute after this delay"})]})]})]})})}function XNe(){const[e,t]=v.useState(30),{data:a,isLoading:s}=le.analytics.overview.useQuery({days:e}),{data:r}=le.contacts.list.useQuery({limit:1}),{data:i,isLoading:l}=le.analytics.unsubscribeReasons.useQuery(),d=a?.campaigns??[],u=d.reduce((k,E)=>k+(E.totalSent??0),0),p=d.reduce((k,E)=>k+(E.totalUniqueOpens??0),0),x=d.reduce((k,E)=>k+(E.totalUniqueClicks??0),0),m=d.reduce((k,E)=>k+(E.totalBounces??0),0),h=d.reduce((k,E)=>k+(E.totalUnsubscribes??0),0),y=u>0?(p/u*100).toFixed(1):"0.0",w=u>0?(x/u*100).toFixed(1):"0.0",b=u>0?(m/u*100).toFixed(2):"0.00",j=u>0?(h/u*100).toFixed(2):"0.00",S=d.slice(0,10).map(k=>({name:k.name.length>16?k.name.slice(0,16)+"…":k.name,opens:k.totalSent?parseFloat(((k.totalUniqueOpens??0)/k.totalSent*100).toFixed(1)):0,clicks:k.totalSent?parseFloat(((k.totalUniqueClicks??0)/k.totalSent*100).toFixed(1)):0,sent:k.totalSent??0})),O=v.useMemo(()=>{const k=new Date,E=e<=7?7:e<=30?10:12,D=e/E;return Array.from({length:E},(_,T)=>{const $=new Date(k.getTime()-(E-1-T)*D*24*60*60*1e3).toLocaleDateString("en-US",{month:"short",day:"numeric"}),R=r?.total??0,B=Math.floor(R*(.85+T/E*.15));return{date:$,contacts:B}})},[e,r?.total]),A=()=>{if(d.length===0){ne.error("No campaign data to export");return}const k=["Campaign","Status","Sent","Opens","Open Rate","Clicks","Click Rate","Bounces","Unsubscribes"],E=d.map($=>{const R=$.totalSent?(($.totalUniqueOpens??0)/$.totalSent*100).toFixed(1):"0",B=$.totalSent?(($.totalUniqueClicks??0)/$.totalSent*100).toFixed(1):"0";return[`"${$.name}"`,$.status,$.totalSent??0,$.totalUniqueOpens??0,`${R}%`,$.totalUniqueClicks??0,`${B}%`,$.totalBounces??0,$.totalUnsubscribes??0].join(",")}),D=[k.join(","),...E].join(`
888`),_=new Blob([D],{type:"text/csv"}),T=URL.createObjectURL(_),I=document.createElement("a");I.href=T,I.download=`boostiko-analytics-${new Date().toISOString().slice(0,10)}.csv`,I.click(),URL.revokeObjectURL(T),ne.success("Analytics report exported")};return n.jsx(Pt,{"data-loc":"client/src/pages/client/Analytics.tsx:85",title:"Analytics",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.
888tsx:86",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:87",className:"flex items-center justify-between flex-wrap gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:88",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Analytics.tsx:89",className:"text-2xl font-bold text-foreground",children:"Analytics"}),n.jsx("p",{"data-loc":"client/src/pages/client/Analytics.tsx:90",className:"text-muted-foreground text-sm mt-1",children:"Email performance across all campaigns"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:92",className:"flex items-center gap-2",children:[n.jsxs(mt,{"data-loc":"client/src/pages/client/Analytics.tsx:93",value:e.toString(),onValueChange:k=>t(parseInt(k)),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Analytics.tsx:94",className:"w-36",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Analytics.tsx:95"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Analytics.tsx:97",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Analytics.tsx:98",value:"7",children:"Last 7 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Analytics.tsx:99",value:"30",children:"Last 30 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Analytics.tsx:100",value:"90",children:"Last 90 days"})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Analytics.tsx:103",variant:"outline",size:"sm",onClick:A,children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/Analytics.tsx:104",className:"w-4 h-4 mr-2"}),"Export CSV"]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:110",className:"grid grid-cols-2 lg:grid-cols-5 gap-4",children:s?[...Array(5)].map((k,E)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Analytics.tsx:112",className:"h-28 rounded-xl"},E)):[{label:"Total Sent",value:u.toLocaleString(),icon:Lc,color:"text-primary"},{label:"Avg Open Rate",value:`${y}%`,icon:_n,color:"text-emerald-400"},{label:"Avg Click Rate",value:`${w}%`,icon:Yp,color:"text-violet-400"},{label:"Bounce Rate",value:`${b}%`,icon:Ia,color:parseFloat(b)>2?"text-red-400":"text-muted-foreground"},{label:"Unsub Rate",value:`${j}%`,icon:Ql,color:parseFloat(j)>.5?"text-amber-400":"text-muted-foreground"}].map(({label:k,value:E,icon:D,color:_})=>n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:120",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:121",className:"flex items-center justify-between mb-3",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Analytics.tsx:122",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:k}),n.jsx(D,{"data-loc":"client/src/pages/client/Analytics.tsx:123",className:`w-4 h-4 ${_}`})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Analytics.tsx:125",className:`text-2xl font-bold ${_}`,children:E})]},k))}),n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:131",className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[S.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/Analytics.tsx:134",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Analytics.tsx:135",children:n.jsx(St,{"data-loc":"client/src/pages/client/Analytics.tsx:135",className:"text-sm",children:"Open & Click Rates by Campaign"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Analytics.tsx:136",children:n.jsx(Eh,{"data-loc":"client/src/pages/client/Analytics.tsx:137",width:"100%",height:220,children:n.jsxs(yq,{"data-loc":"client/src/pages/client/Analytics.tsx:138",data:S,margin:{top:5,right:5,left:-20,bottom:40},children:[n.jsx(am,{"data-loc":"client/src/pages/client/Analytics.tsx:139",strokeDasharray:"3 3",stroke:"rgba(255,255,255,0.05)"}),n.jsx(Gc,{"data-loc":"client/src/pages/client/Analytics.tsx:140",dataKey:"name",tick:{fontSize:10,fill:"#6b7280"},angle:-30,textAnchor:"end"}),n.jsx(Yc,{"data-loc":"client/src/pages/client/Analytics.tsx:141",tick:{fontSize:10,fill:"#6b7280"},unit:"%"}),n.jsx(ys,{"data-loc":"client/src/pages/client/Analytics.tsx:142",contentStyle:{background:"#1a1a2e",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"8px",fontSize:"12px"},formatter:k=>[`${k}%`]}),n.jsx(Kr,{"data-loc":"client/src/pages/client/Analytics.tsx:146",dataKey:"opens",name:"Open Rate",fill:"#10b981",radius:[3,3,0,0]}),n.jsx(Kr,{"data-loc":"client/src/pages/client/Analytics.tsx:147",dataKey:"clicks",name:"Click Rate",fill:"#8b5cf6",radius:[3,3,0,0]})]})})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Analytics.tsx:155",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Analytics.tsx:156",children:n.jsxs(St,{"data-loc":"client/src/pages/client/Analytics.tsx:157",className:"text-sm flex items-center gap-2",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Analytics.tsx:158",className:"w-4 h-4 text-primary"}),"Contact Growth"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Analytics.tsx:162",children:n.jsx(Eh,{"data-loc":"client/src/pages/client/Analytics.tsx:163",width:"100%",height:220,children:n.jsxs(bq,{"data-loc":"client/src/pages/client/Analytics.tsx:164",data:O,margin:{top:5,right:5,left:-20,bottom:5},children:[n.jsx("defs",{"data-loc":"client/src/pages/client/Analytics.tsx:165",children:n.jsxs("linearGradient",{"data-loc":"client/src/pages/client/Analytics.tsx:166",id:"contactGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[n.jsx("stop",{"data-loc":"client/src/pages/client/Analytics.tsx:167",offset:"5%",
888stopColor:"#6366f1",stopOpacity:.3}),n.jsx("stop",{"data-loc":"client/src/pages/client/Analytics.tsx:168",offset:"95%",stopColor:"#6366f1",stopOpacity:0})]})}),n.jsx(am,{"data-loc":"client/src/pages/client/Analytics.tsx:171",strokeDasharray:"3 3",stroke:"rgba(255,255,255,0.05)"}),n.jsx(Gc,{"data-loc":"client/src/pages/client/Analytics.tsx:172",dataKey:"date",tick:{fontSize:10,fill:"#6b7280"}}),n.jsx(Yc,{"data-loc":"client/src/pages/client/Analytics.tsx:173",tick:{fontSize:10,fill:"#6b7280"}}),n.jsx(ys,{"data-loc":"client/src/pages/client/Analytics.tsx:174",contentStyle:{background:"#1a1a2e",border:"1px solid rgba(255,255,255,0.1)",borderRadius:"8px",fontSize:"12px"},formatter:k=>[k.toLocaleString(),"Contacts"]}),n.jsx(Qr,{"data-loc":"client/src/pages/client/Analytics.tsx:178",type:"monotone",dataKey:"contacts",stroke:"#6366f1",strokeWidth:2,fill:"url(#contactGradient)"})]})})})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Analytics.tsx:186",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Analytics.tsx:187",children:n.jsxs(St,{"data-loc":"client/src/pages/client/Analytics.tsx:188",className:"text-sm flex items-center gap-2",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/Analytics.tsx:189",className:"w-4 h-4 text-emerald-400"}),"Revenue Attribution"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Analytics.tsx:193",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:194",className:"py-6 text-center text-muted-foreground",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/Analytics.tsx:195",className:"w-10 h-10 mx-auto mb-3 opacity-20"}),n.jsx("p",{"data-loc":"client/src/pages/client/Analytics.tsx:196",className:"font-medium text-sm",children:"Revenue attribution coming soon"}),n.jsx("p",{"data-loc":"client/src/pages/client/Analytics.tsx:197",className:"text-xs mt-1 max-w-sm mx-auto",children:"Connect your trading platform via webhook to track conversions — account funded, challenge purchases, and payouts — attributed to specific email campaigns."}),n.jsx(te,{"data-loc":"client/src/pages/client/Analytics.tsx:200",variant:"outline",size:"sm",className:"mt-4",onClick:()=>window.location.href="/webhooks",children:"Configure Webhooks"})]})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Analytics.tsx:208",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Analytics.tsx:209",className:"flex flex-row items-center justify-between",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Analytics.tsx:210",className:"text-sm",children:"Campaign Performance Breakdown"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Analytics.tsx:211",variant:"ghost",size:"sm",onClick:A,className:"text-xs",children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/Analytics.tsx:212",className:"w-3.5 h-3.5 mr-1.5"}),"Export"]})]}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Analytics.tsx:215",children:s?n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:217",className:"space-y-2",children:[...Array(5)].map((k,E)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Analytics.tsx:217",className:"h-10"},E))}):d.length===0?n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:219",className:"text-center py-8 text-muted-foreground text-sm",children:"No campaign data for this period."}):n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:221",className:"overflow-x-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Analytics.tsx:222",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Analytics.tsx:223",children:n.jsx("tr",{"data-loc":"client/src/pages/client/Analytics.tsx:224",className:"border-b border-border",children:["Campaign","Status","Sent","Open Rate","Click Rate","Bounces","Unsubs"].map(k=>n.jsx("th",{"data-loc":"client/src/pages/client/Analytics.tsx:226",className:"text-left py-2 text-xs text-muted-foreground font-medium pr-4",children:k},k))})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Analytics.tsx:230",children:d.map(k=>{const E=k.totalSent?((k.totalUniqueOpens??0)/k.totalSent*100).toFixed(1):null,D=k.totalSent?((k.totalUniqueClicks??0)/k.totalSent*100).toFixed(1):null;return n.jsxs("tr",{"data-loc":"client/src/pages/client/Analytics.tsx:235",className:"border-b border-border/50 data-table-row",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:236",className:"py-2.5 text-sm text-foreground font-medium pr-4",children:k.name}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:237",className:"py-2.5 pr-4",children:n.jsx(Le,{"data-loc":"client/src/pages/client/Analytics.tsx:238",variant:"outline",className:k.status==="sent"?"badge-sent":"badge-draft",children:k.status})}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:242",className:"py-2.5 text-sm text-foreground pr-4",children:k.totalSent?.toLocaleStr
888ing()??"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:243",className:"py-2.5 text-sm text-emerald-400 pr-4",children:E?`${E}%`:"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:244",className:"py-2.5 text-sm text-violet-400 pr-4",children:D?`${D}%`:"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:245",className:"py-2.5 text-sm text-amber-400 pr-4",children:k.totalBounces?.toLocaleString()??"0"}),n.jsx("td",{"data-loc":"client/src/pages/client/Analytics.tsx:246",className:"py-2.5 text-sm text-muted-foreground",children:k.totalUnsubscribes?.toLocaleString()??"0"})]},k.id)})})]})})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:257",className:"mt-6",children:n.jsxs(Ke,{"data-loc":"client/src/pages/client/Analytics.tsx:258",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Analytics.tsx:259",children:n.jsxs(St,{"data-loc":"client/src/pages/client/Analytics.tsx:260",className:"text-sm flex items-center gap-2",children:[n.jsx(Ql,{"data-loc":"client/src/pages/client/Analytics.tsx:261",className:"w-4 h-4 text-amber-400"}),"Unsubscribe Reasons"]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Analytics.tsx:265",children:l?n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:267",className:"space-y-3",children:[1,2,3].map(k=>n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:269",className:"flex items-center gap-3",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Analytics.tsx:270",className:"h-4 w-48"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Analytics.tsx:271",className:"h-2 flex-1"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Analytics.tsx:272",className:"h-4 w-16"})]},k))}):!i||i.length===0?n.jsx("p",{"data-loc":"client/src/pages/client/Analytics.tsx:277",className:"text-sm text-muted-foreground text-center py-6",children:"No unsubscribes recorded yet."}):n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:279",className:"space-y-3",children:i.map(k=>n.jsxs("div",{"data-loc":"client/src/pages/client/Analytics.tsx:281",className:"flex items-center gap-3",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Analytics.tsx:282",className:"text-sm text-foreground w-52 flex-shrink-0",children:k.label}),n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:283",className:"flex-1 bg-muted rounded-full h-2 overflow-hidden",children:n.jsx("div",{"data-loc":"client/src/pages/client/Analytics.tsx:284",className:"h-2 rounded-full bg-amber-400 transition-all duration-500",style:{width:`${k.pct}%`}})}),n.jsxs("span",{"data-loc":"client/src/pages/client/Analytics.tsx:289",className:"text-sm text-muted-foreground w-20 text-right flex-shrink-0",children:[k.count," (",k.pct,"%)"]})]},k.reason))})})]})})]})})}const b7=[{value:"account_funded",label:"Account Funded",group:"Trading"},{value:"challenge_passed",label:"Challenge Passed",group:"Trading"},{value:"challenge_failed",label:"Challenge Failed",group:"Trading"},{value:"payout_requested",label:"Payout Requested",group:"Trading"},{value:"payout_approved",label:"Payout Approved",group:"Trading"},{value:"kyc_submitted",label:"KYC Submitted",group:"Compliance"},{value:"kyc_approved",label:"KYC Approved",group:"Compliance"},{value:"contact_created",label:"Contact Created",group:"Contacts"},{value:"contact_unsubscribed",label:"Contact Unsubscribed",group:"Contacts"},{value:"custom_event",label:"Custom Event",group:"Custom"}];function ZNe(){const[e,t]=v.useState(!1),[a,s]=v.useState({name:"",url:"",events:[],secret:""}),{data:r,isLoading:i,refetch:l}=le.webhooks.list.useQuery(),{data:d}=le.settings.getApiKey.useQuery(),u=le.webhooks.create.useMutation({onSuccess:()=>{ne.success("Webhook created"),t(!1),l(),s({name:"",url:"",events:[],secret:""})},onError:y=>ne.error(y.message)}),p=le.webhooks.delete.useMutation({onSuccess:()=>{ne.success("Webhook deleted"),l()},onError:y=>ne.error(y.message)}),x=y=>{s(w=>({...w,events:w.events.includes(y)?w.events.filter(b=>b!==y):[...w.events,y]}))},m=y=>{navigator.clipboard.writeText(y),ne.success("Copied to clipboard")},h=Array.from(new Set(b7.map(y=>y.group)));return n.jsx(Pt,{"data-loc":"client/src/pages/client/Webhooks.tsx:60",title:"Webhooks & API",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:61",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:62",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:63",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Webhooks.tsx:64",className:"text-2xl font-bold text-foreground",children:"Webhooks & API"}),n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:65",className:"text-muted-foreground text-sm mt-1",children:"Integrate with MetaTrader, DXtrade, Match-Trader, and more"})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Webhooks.tsx:67",o
888pen:e,onOpenChange:t,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Webhooks.tsx:68",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Webhooks.tsx:69",size:"sm",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Webhooks.tsx:69",className:"w-4 h-4 mr-2"}),"New Webhook"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Webhooks.tsx:71",className:"bg-card border-border max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Webhooks.tsx:72",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Webhooks.tsx:72",children:"Create Webhook"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:73",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:74",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Webhooks.tsx:75",children:"Webhook Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Webhooks.tsx:76",placeholder:"e.g. MT5 Account Events",value:a.name,onChange:y=>s({...a,name:y.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:78",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Webhooks.tsx:79",children:"Endpoint URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/Webhooks.tsx:80",type:"url",placeholder:"https://your-platform.com/webhook",value:a.url,onChange:y=>s({...a,url:y.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:82",className:"space-y-2",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Webhooks.tsx:83",children:"Events to Listen"}),h.map(y=>n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:85",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:86",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1.5",children:y}),n.jsx("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:87",className:"space-y-1.5 pl-2",children:b7.filter(w=>w.group===y).map(w=>n.jsxs("label",{"data-loc":"client/src/pages/client/Webhooks.tsx:89",className:"flex items-center gap-2.5 cursor-pointer",children:[n.jsx(hd,{"data-loc":"client/src/pages/client/Webhooks.tsx:90",checked:a.events.includes(w.value),onCheckedChange:()=>x(w.value)}),n.jsx("span",{"data-loc":"client/src/pages/client/Webhooks.tsx:94",className:"text-sm text-foreground",children:w.label})]},w.value))})]},y))]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:101",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Webhooks.tsx:102",children:"Secret (optional)"}),n.jsx(De,{"data-loc":"client/src/pages/client/Webhooks.tsx:103",placeholder:"Webhook signing secret",value:a.secret,onChange:y=>s({...a,secret:y.target.value})})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Webhooks.tsx:105",className:"w-full",onClick:()=>u.mutate(a),disabled:u.isPending||!a.name||!a.url,children:u.isPending?"Creating...":"Create Webhook"})]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Webhooks.tsx:114",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Webhooks.tsx:115",className:"flex flex-row items-center gap-2 pb-3",children:[n.jsx(WI,{"data-loc":"client/src/pages/client/Webhooks.tsx:116",className:"w-4 h-4 text-primary"}),n.jsx(St,{"data-loc":"client/src/pages/client/Webhooks.tsx:117",className:"text-sm",children:"Your API Key"})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Webhooks.tsx:119",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:120",className:"text-xs text-muted-foreground mb-3",children:"Use this key to sync contacts and trigger events from your trading platform via the Boostiko API."}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:123",className:"flex items-center gap-2",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Webhooks.tsx:124",className:"flex-1 bg-muted/50 rounded-lg px-3 py-2 text-xs font-mono text-muted-foreground truncate",children:d?.key??"Loading..."}),n.jsx(te,{"data-loc":"client/src/pages/client/Webhooks.tsx:127",variant:"outline",size:"sm",onClick:()=>m(d?.key??""),children:n.jsx(Ra,{"data-loc":"client/src/pages/client/Webhooks.tsx:128",className:"w-3.5 h-3.5"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:131",className:"mt-4 p-3 bg-muted/30 rounded-lg",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:132",className:"text-xs font-semibold text-foreground mb-2",children:"Example: Tr
888igger account_funded event"}),n.jsx("pre",{"data-loc":"client/src/pages/client/Webhooks.tsx:133",className:"text-xs text-muted-foreground overflow-x-auto",children:`POST https://api.boostiko.com/v1/events
889Authorization: Bearer YOUR_API_KEY
890Content-Type: application/json
891
892{
893  "event": "account_funded",
894  "email": "[email protected]",
895  "data": {
896    "accountSize": "100000",
897    "platform": "mt5"
898  }
899}`})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Webhooks.tsx:150",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Webhooks.tsx:151",className:"flex flex-row items-center gap-2 pb-3",children:[n.jsx($i,{"data-loc":"client/src/pages/client/Webhooks.tsx:152",className:"w-4 h-4 text-cyan-400"}),n.jsx(St,{"data-loc":"client/src/pages/client/Webhooks.tsx:153",className:"text-sm",children:"Inbound Webhook Endpoint"})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Webhooks.tsx:155",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:156",className:"text-xs text-muted-foreground mb-3",children:"Send POST requests to this URL from your trading platform to trigger automations."}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:159",className:"flex items-center gap-2",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Webhooks.tsx:160",className:"flex-1 bg-muted/50 rounded-lg px-3 py-2 text-xs font-mono text-muted-foreground truncate",children:`https://api.boostiko.com/v1/inbound/${d?.clientId??"YOUR_CLIENT_ID"}`}),n.jsx(te,{"data-loc":"client/src/pages/client/Webhooks.tsx:163",variant:"outline",size:"sm",onClick:()=>m(`https://api.boostiko.com/v1/inbound/${d?.clientId??""}`),children:n.jsx(Ra,{"data-loc":"client/src/pages/client/Webhooks.tsx:164",className:"w-3.5 h-3.5"})})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:171",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/Webhooks.tsx:172",className:"text-sm font-semibold text-foreground mb-3",children:"Configured Webhooks"}),i?n.jsx("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:174",className:"space-y-3",children:[...Array(3)].map((y,w)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Webhooks.tsx:174",className:"h-20 rounded-xl"},w))}):r?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:182",className:"space-y-3",children:r.map(y=>n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:184",className:"glass-card rounded-xl p-4 flex items-start gap-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:185",className:"w-9 h-9 rounded-xl bg-cyan-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx(TS,{"data-loc":"client/src/pages/client/Webhooks.tsx:186",className:"w-4 h-4 text-cyan-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:188",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:189",className:"flex items-center gap-2 mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:190",className:"text-sm font-semibold text-foreground",children:y.name}),n.jsx(Le,{"data-loc":"client/src/pages/client/Webhooks.tsx:191",variant:"outline",className:y.isActive?"badge-active":"badge-paused",children:y.isActive?"Active":"Inactive"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:195",className:"text-xs text-muted-foreground truncate",children:y.url}),n.jsx("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:196",className:"flex flex-wrap gap-1 mt-2",children:y.events.map(w=>n.jsx(Le,{"data-loc":"client/src/pages/client/Webhooks.tsx:198",variant:"outline",className:"badge-draft text-[10px]",children:w.replace(/_/g," ")},w))})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Webhooks.tsx:202",variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-destructive hover:text-destructive flex-shrink-0",onClick:()=>p.mutate({id:y.id}),children:n.jsx(Ua,{"data-loc":"client/src/pages/client/Webhooks.tsx:204",className:"w-3.5 h-3.5"})})]},y.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Webhooks.tsx:176",className:"text-center py-12 text-muted-foreground",children:[n.jsx(TS,{"data-loc":"client/src/pages/client/Webhooks.tsx:177",className:"w-10 h-10 mx-auto mb-3 opacity-20"}),n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:178",className:"text-sm font-medium",children:"No webhooks configured"}),n.jsx("p",{"data-loc":"client/src/pages/client/Webhooks.tsx:179",className:"text-xs mt-1",children:"Add a webhook to receive real-time events from your platform"})]})]})]})})}function JNe(){const{data:e}=le.settings.get.useQuery(),t=le.revenue.setAttributionWindow.useMutation({onSuccess:()=>ne.success("Attribution window updated"),onError:l=>ne.error(l.message)}),[a,s]=v.useState("");v.useEffect(()=>{e?.attributionWindowHours!==void 0&&s(String(e.attributionWindowHours))},[e?.attributionWindowHours]);const r=e?.attributionWindowHours??24,i=r===1?"1 hour":r<24?`${r} hours`:r===24?"24 hours (1 day)":`${r} hours (${Math.round(r/24)} days)`;return n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:35",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:36",className:"flex flex-row items-center gap-2 pb-4",children:[n.jsx(Ii,{"data-loc":"client/src/pages/client/Settings.tsx:37",className:"w-4 h-4 text-emerald-400"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:38",className:"flex-1",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:39",className:"text-sm",children:"Revenue Attribution Window"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:40",className:"text-xs text-muted-foreground mt-0.5",children:["Currently: ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:41",children:i})," — conversions within this window after a click are attributed to the campaign."]})]})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:45",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:46",className:"flex items-end gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:47",className:"space-y-1.5 flex-1",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:48",children:"Attribution Window (hours)"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:49",type:"number",min:1,max:720,value:a,onChange:l=>s(l.target.value),placeholder:"24",className:"w-32"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:58",className:"text-xs text-muted-foreground",children:"1–720 hours (up to 30 days). Default is 24 hours."})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:60",size:"sm",disabled:t.isPending||!a||isNaN(Number(a)),onClick:()=>t.mutate({hours:Number(a)}),children:[t.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:65",className:"w-4 h-4 animate-spin mr-2"}):n.jsx(Md,{"data-loc":"client/src/pages/client/Settings.tsx:65",className:"w-4 h-4 mr-2"}),"Save"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:69",className:"flex items-start gap-2 rounded-md bg-muted/50 border border-border px-3 py-2.5 text-xs text-muted-foreground",children:[n.jsx(Uv,{"data-loc":"client/src/pages/client/Settings.tsx:70",className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-blue-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:71",children:"Last-click attribution: when a contact clicks a link in a campaign and then converts within the window, the revenue is credited to that campaign. If multiple clicks occur, the most recent one is used."})]})]})]})}function eSe({status:e}){return e==="verified"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:81",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30 gap-1",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:81",className:"w-3 h-3"}),"Verified"]}):e==="failed"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:82",className:"bg-red-500/15 text-red-400 border-red-500/30 gap-1",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:82",className:"w-3 h-3"}),"Failed"]}):n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:83",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 gap-1",children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:83",className:"w-3 h-3"}),"Pending"]})}function tSe({status:e}){return e==="verified"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:87",variant:"outline",className:"text-emerald-400 border-emerald-500/30 gap-1 text-xs",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:87",className:"w-3 h-3"}),"DKIM Active"]}):e==="failed"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:88",variant:"outline",className:"text-red-400 border-red-500/30 gap-1 text-xs",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:88",className:"w-3 h-3"}),"DKIM Failed"]}):n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:89",variant:"outline",className:"text-amber-400 border-amber-500/30 gap-1 text-xs",children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:89",className:"w-3 h-3"}),"DKIM Pending"]})}function aSe({status:e}){return e==="verified"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:93",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30 gap-1 text-xs",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:93",className:"w-3 h-3"}),"Verified"]}):e==="failed"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:94",className:"bg-red-500/15 text-red-400 border-red-500/30 gap-1 text-xs",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:94",className:"w-3 h-3"}),"Failed"]}):n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:95",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 gap-1 text-xs",children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:95",className:"w-3 h-3"}),"Pending"]})}function j7({status:e}){return e?e==="verified"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:100",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30 gap-1 text-xs",children:[n.jsx(q5,{"data-loc":"client/src/pages/client/Settings.tsx:100",className:"w-3 h-3"}),"MAIL FROM Active"]}):e==="failed"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:101",className:"bg-red-500/15 text-red-400 border-red-500/30 gap-1 text-xs",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:101",className:"w-3 h-3"}),"MAIL FROM Failed"]}):n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:102",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 gap-1 text-xs",children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:102",className:"w-3 h-3"}),"MAIL FROM Pending"]}):null}function nSe({domain:e,onRefresh:t,onDelete:a,onSetDefault:s,onSetMailFrom:r,onCheckMailFrom:i,onSetTrackingDomain:l}){const[d,u]=v.useState(e.verificationStatus!=="verified"),[p,x]=v.useState(null),[m,h]=v.useState(e.mailFromDomain??`mail.${e.domain}`),[y,w]=v.useState(!1),b=(S,O)=>
899{navigator.clipboard.writeText(S),x(O),setTimeout(()=>x(null),2e3),ne.success("Copied to clipboard")},j=e.dkimTokens??[];return n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:149",className:"border border-border rounded-lg overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:151",className:"flex items-center gap-3 px-4 py-3 bg-card",children:[n.jsx($i,{"data-loc":"client/src/pages/client/Settings.tsx:152",className:"w-4 h-4 text-muted-foreground shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:153",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:154",className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:155",className:"font-mono text-sm font-medium text-foreground",children:e.domain}),n.jsx(eSe,{"data-loc":"client/src/pages/client/Settings.tsx:156",status:e.verificationStatus}),n.jsx(tSe,{"data-loc":"client/src/pages/client/Settings.tsx:157",status:e.dkimStatus}),e.isDefault&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:159",className:"bg-primary/15 text-primary border-primary/30 text-xs gap-1",children:[n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:160",className:"w-3 h-3"}),"Default"]}),e.isTrackingDomain&&n.jsxs(n.Fragment,{children:[e.trackingDomainStatus==="pending"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:166",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 text-xs gap-1",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:167",className:"w-3 h-3 animate-spin"}),"Provisioning..."]}),e.trackingDomainStatus==="active"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:171",className:"bg-violet-500/15 text-violet-400 border-violet-500/30 text-xs gap-1",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:172",className:"w-3 h-3"}),"Tracking Domain"]}),e.trackingDomainStatus==="error"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:176",className:"bg-red-500/15 text-red-400 border-red-500/30 text-xs gap-1",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:177",className:"w-3 h-3"}),"Provisioning Error"]}),!e.trackingDomainStatus&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:181",className:"bg-violet-500/15 text-violet-400 border-violet-500/30 text-xs gap-1",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:182",className:"w-3 h-3"}),"Tracking Domain"]})]}),e.mailFromDomain&&n.jsx(j7,{"data-loc":"client/src/pages/client/Settings.tsx:187",status:e.mailFromStatus}),e.spfStatus==="verified"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:188",variant:"outline",className:"text-emerald-400 border-emerald-500/30 gap-1 text-xs",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:188",className:"w-3 h-3"}),"SPF"]}),e.dmarcStatus==="verified"&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:189",variant:"outline",className:"text-emerald-400 border-emerald-500/30 gap-1 text-xs",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:189",className:"w-3 h-3"}),"DMARC"]})]}),e.lastCheckedAt&&n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:192",className:"text-[10px] text-muted-foreground mt-0.5",children:["Last checked ",new Date(e.lastCheckedAt).toLocaleString()]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:197",className:"flex items-center gap-1 shrink-0",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:198",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>t(e.id),title:"Check status",children:n.jsx(Vr,{"data-loc":"client/src/pages/client/Settings.tsx:199",className:"w-3.5 h-3.5"})}),e.verificationStatus==="verified"&&!e.isDefault&&n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:202",variant:"ghost",size:"sm",className:"h-7 text-xs px-2 text-primary",onClick:()=>s(e.id),children:"Set default"}),e.verificationStatus==="verified"&&n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:207",variant:"ghost",size:"sm",className:`h-7 text-xs px-2 ${e.isTrackingDomain?"text-violet-400":"text-muted-foreground"}`,onClick:()=>l(e.id,!e.isTrackingDomain),disabled:e.trackingDomainStatus==="pending",title:e.isTrackingDomain?"Disable as tracking domain":"Use as tracking domain for click links",children:e.trackingDomainStatus==="pending"?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:216",className:"w-3 h-3 animate-spin mr-1"}),"Provisioning"]}):e.isTrackingDomain?"Tracking: On":"Use for tracking"}),n.jsxs(cm,{"data-loc":"client/src/pages/client/Settings.tsx:220",children:[n.jsx(l5,{"data-loc":"client/src/pages/client/Settings.tsx:221",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:222",variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/Settings.tsx:223",className:"w-3.5 h-3.5"})})}),n.jsxs(lm,{"data-loc":"client/src/pages/client/Settings.tsx:226",children:[n.jsxs(om,{"data-loc":"client/src/pages/client/Settings.tsx:227",children:[n.jsx(um,{"data-loc":"client/src/pages/client/Settings.tsx:228",children:"Remove domain?"}),n.jsxs(pm,{"data-loc":"client/src/pages/client/Settings.tsx:229",children:["This will remove ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:230",children:e.domain})," from your verified domains and revoke DKIM signing. You can re-add it later."]})]}),n.jsxs(dm,{"data-loc":"client/src/pages/client/Settings.tsx:233",children:[n.jsx(mm,{"data-loc":"client/src/pages/client/Settings.tsx:234",children:"Cancel"}),n.jsx(fm,{"data-loc":"client/src/pages/client/Settings.tsx:235",onClick:()=>a(e.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:241",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>u(!d),children:d?n.jsx(Bi,{"data-loc":"client/src/pages/client/Settings.tsx:242",className:"w-3.5 h-3.5"}):n.jsx(Tn,{"data-loc":"client/src/pages/client/Settings.tsx:242",className:"w-3.5 h-3.5"})})]})]}),d&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:249",className:"border-t border-border bg-muted/30 p-4 space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:251",className:"rounded-md border border-border bg-card overflow-hidden",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:252",className:"px-3 py-2 bg-muted/50 text-xs font-medium text-muted-foreground border-b border-border",children:"Authentication status"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:253",className:"divide-y divide-border",children:[{label:"DKIM",status:e.dkimStatus,desc:"Cryptographic email signing via CNAME records"},{label:"SPF",status:e.spfStatus??"pending",desc:"Authorizes SES to send on your behalf"}
899,{label:"DMARC",status:e.dmarcStatus??"pending",desc:"Policy enforcement for SPF + DKIM alignment"},{label:"MAIL FROM",status:e.mailFromDomain?e.mailFromStatus??"pending":"pending",desc:"Custom bounce subdomain"}].map(({label:S,status:O,desc:A})=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:260",className:"flex items-center gap-3 px-3 py-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:261",className:"w-16 text-xs font-medium text-foreground",children:S}),O==="verified"?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:263",className:"w-3.5 h-3.5 text-emerald-400 shrink-0"}):O==="failed"?n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:265",className:"w-3.5 h-3.5 text-red-400 shrink-0"}):n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:267",className:"w-3.5 h-3.5 text-amber-400 shrink-0"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:269",className:"text-xs text-muted-foreground",children:A})]},S))})]}),j.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:277",className:"space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:278",className:"text-xs font-medium text-foreground",children:"DKIM DNS records (add to your domain provider):"}),j.map((S,O)=>{const A=`${S}._domainkey.${e.domain}`,k=`${S}.dkim.amazonses.com`;return n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:283",className:"rounded-md border border-border bg-card overflow-hidden",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:284",className:"grid grid-cols-[80px_1fr_32px] text-xs",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:285",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border",children:"Type"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:286",className:"px-3 py-2 text-muted-foreground",children:"CNAME"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:287"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:288",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border border-t border-border",children:"Host"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:289",className:"px-3 py-2 font-mono text-[11px] break-all border-t border-border",children:A}),n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:290",onClick:()=>b(A,O*2),className:"border-t border-border flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===O*2?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:291",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:291",className:"w-3 h-3 text-muted-foreground"})}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:293",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border border-t border-border",children:"Value"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:294",className:"px-3 py-2 font-mono text-[11px] break-all border-t border-border",children:k}),n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:295",onClick:()=>b(k,O*2+1),className:"border-t border-border flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===O*2+1?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:296",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:296",className:"w-3 h-3 text-muted-foreground"})})]})},O)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:307",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:308",className:"flex items-center gap-1.5",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:309",className:"w-3.5 h-3.5 text-violet-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:310",className:"text-xs font-medium text-foreground",children:"SPF & DMARC records"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:311",className:"text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:"Required by Gmail & Yahoo"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:313",className:"text-xs text-muted-foreground",children:"Add these two records to your DNS to complete the authentication trifecta (DKIM + SPF + DMARC). Without them, Gmail and Yahoo may route your emails to spam."}),[{label:"SPF",type:"TXT",host:e.domain,value:"v=spf1 include:amazonses.com ~all",desc:"Authorizes Amazon SES to send email on behalf of your domain",copyIdx:200},{label:"DMARC",type:"TXT",host:`_dmarc.${e.domain}`,value:`v=DMARC1; p=none; rua=mailto:dmarc-reports@${e.domain}; ruf=mailto:dmarc-reports@${e.domain}; fo=1`,desc:"Monitoring mode — reports alignment failures without blocking mail. Upgrade to p=quarantine after 30 days.",copyIdx:201}].map(S=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:332",className:"rounded-md border border-border bg-card overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:333",className:"flex items-center justify-between px-3 py-1.5 bg-muted/50 border-b border-border",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:334",className:"text-xs font-medium text-foreground",children:S.label}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:335",className:"text-[10px] text-muted-foreground",children:S.desc})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:337",className:"grid grid-cols-[60px_1fr_32px] text-xs",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:338",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border",children:"Type"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:339",className:"px-3 py-2 text-muted-foreground",children:S.t
899ype}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:340"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:341",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border border-t border-border",children:"Host"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:342",className:"px-3 py-2 font-mono text-[11px] break-all border-t border-border",children:S.host}),n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:343",onClick:()=>b(S.host,S.copyIdx),className:"border-t border-border flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===S.copyIdx?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:344",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:344",className:"w-3 h-3 text-muted-foreground"})}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:346",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border border-t border-border",children:"Value"}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:347",className:"px-3 py-2 font-mono text-[11px] break-all border-t border-border",children:S.value}),n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:348",onClick:()=>b(S.value,S.copyIdx+10),className:"border-t border-border flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===S.copyIdx+10?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:349",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:349",className:"w-3 h-3 text-muted-foreground"})})]})]},S.label))]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:359",className:"space-y-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:360",className:"flex items-center gap-1.5",children:[n.jsx(q5,{"data-loc":"client/src/pages/client/Settings.tsx:361",className:"w-3.5 h-3.5 text-cyan-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:362",className:"text-xs font-medium text-foreground",children:"MAIL FROM subdomain"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:363",className:"text-[10px] text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:"Recommended"})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:365",className:"text-xs text-muted-foreground",children:["Routes bounce emails through a subdomain (e.g. ",n.jsxs("span",{"data-loc":"client/src/pages/client/Settings.tsx:366",className:"font-mono",children:["mail.",e.domain]}),") instead of the root domain, protecting your domain reputation."]}),e.mailFromDomain&&!y?n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:370",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:371",className:"flex-1 rounded-md border border-border bg-card px-3 py-2 font-mono text-xs text-foreground",children:e.mailFromDomain}),n.jsx(j7,{"data-loc":"client/src/pages/client/Settings.tsx:374",status:e.mailFromStatus}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:375",variant:"ghost",size:"icon",className:"h-7 w-7",onClick:()=>i(e.id),title:"Check MAIL FROM status",children:n.jsx(Vr,{"data-loc":"client/src/pages/client/Settings.tsx:376",className:"w-3.5 h-3.5"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:378",variant:"ghost",size:"sm",className:"h-7 text-xs px-2",onClick:()=>w(!0),children:"Change"})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:383",className:"flex gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:384",value:m,onChange:S=>h(S.target.value),placeholder:`mail.${e.domain}`,className:"font-mono text-xs h-8"}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:390",size:"sm",className:"h-8 shrink-0",onClick:()=>{r(e.id,m),w(!1)},children:"Save"}),y&&n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:401",variant:"ghost",size:"sm",className:"h-8",onClick:()=>w(!1),children:"Cancel"})]}),e.isTrackingDomain&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:410",className:"space-y-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:411",className:"flex items-center gap-1.5",children:[e.trackingDomainStatus==="pending"?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:413",className:"w-3.5 h-3.5 text-amber-400 animate-spin"}):e.trackingDomainStatus==="error"?n.jsx(Ia,{"data-loc":"client/src/pages/client/Settings.tsx:415",className:"w-3.5 h-3.5 text-red-400"}):n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:417",className:"w-3.5 h-3.5 text-violet-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:419",className:"text-xs font-medium text-foreground",children:"Tracking Domain Setup"}),e.trackingDomainStatus==="pending"&&n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:421",className:"text-[10px] bg-amber-500/10 text-amber-400 px-1.5 py-0.5 rounded",children:"Provisioning TLS cert..."}),e.trackingDomainStatus==="active"&&n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:424",className:"text-[10px] bg-violet-500/10 text-violet-400 px-1.5 py-0.5 rounded",children:"Active"}),e.trackingDomainStatus==="error"&&n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:427",className:"text-[10px] bg-red-500/10 text-red-400 px-1.5 py-0.5 rounded",children:"Error — contact support"})]}),e.trackingDomainStatus==="pending"&&n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:432",className:"text-xs text-amber-400/80",children:["Cloudflare is issuing a TLS certificate for ",n.jsxs("span",{"data-loc":"client/src/pages/client/Settings.tsx:433",className:"font-mono font-semibold",children:["click.",e.domain]}),". This typically takes 1–2 minutes. Once complete, the badge above will change to Active."]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:437",className:"text-xs text-muted-foreground",children:["Add the CNAME record below to the DNS settings of ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:438",className:"font-mono font-semibold text-foreground",children:e.domain})," through your domain's DNS provider (Cloudflare, GoDaddy, Namecheap, etc.) — ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:438",className:"font-semibold text-foreground",children:"not"})," through Boostiko. SSL and routing are provisioned automatically by Boostiko."]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:440",className:"rounded-md border border-border bg-card overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:441",className:"px-3 py-2 bg-muted/50 text-xs font-medium text-muted-foreground border-b border-border",children:["Add this CNAME record in your DNS provider for ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:442",className:"font-mono",children:e.domain}),":"]}),[{label:"Type",value:"CNAME",copyIdx:-1},{label:"Host",value:`click.${e.domain}`,copyIdx:300},{label:"Value",value:"app.boostiko.com",copyIdx:301}].map(S=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:449",className:"grid grid-cols-[60px_1fr_32px] text-xs border-t border-border",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:450",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border",children:S.label}),n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:451",className:"px-3 py-2 font-mono text-[11px] break-all",children:S.value}),S.copyIdx>=0?n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:453",onClick:()=>b(S.value,S.copyIdx),className:"flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===S.copyIdx?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:454",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:454",className:"w-3 h-3 text-muted-foreground"})}):n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:456"})]},S.label))]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:460",className:"text-[10px] text-muted-foreground",children:["Once the CNAME propagates (usually a few minutes), all email click links will use ",n.jsxs("span",{"data-loc":"client/src/pages/client/Settings.tsx:461",className:"font-mono",children:["click.",e.domain]})," automatically. TLS is handled by Cloudflare — no additional setup needed."]})]}),e.mailFromDomain&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:468",className:"rounded-md border border-border bg-card overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:469",className:"px-3 py-2 bg-muted/50 text-xs font-medium text-muted-foreground border-b border-border",children:["Add these DNS records for ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:470",className:"font-mono",children:e.mailFromDomain}),":"]}),[{type:"MX",host:e.mailFromDomain,value:"10 feedback-smtp.us-east-1.amazonses.com"},{type:"TXT",host:e.mailFromDomain,value:'"v=spf1 include:amazonses.com ~all"'}].map((S,O)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:476",className:"grid grid-cols-[60px_1fr_32px] text-xs border-t border-border",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:477",className:"px-3 py-2 bg-muted/50 font-medium text-muted-foreground border-r border-border",children:S.t
899ype}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:478",className:"px-3 py-2 font-mono text-[11px] break-all",children:[S.host," → ",S.value]}),n.jsx("button",{"data-loc":"client/src/pages/client/Settings.tsx:479",onClick:()=>b(`${S.host} ${S.value}`,100+O),className:"flex items-center justify-center hover:bg-muted/50 transition-colors",children:p===100+O?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:483",className:"w-3 h-3 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:483",className:"w-3 h-3 text-muted-foreground"})})]},O))]})]})]})]})}function w7({role:e}){return e==="admin"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:500",className:"bg-purple-500/15 text-purple-400 border-purple-500/30 gap-1 text-xs",children:[n.jsx(TJ,{"data-loc":"client/src/pages/client/Settings.tsx:500",className:"w-3 h-3"}),"Admin"]}):e==="editor"?n.jsxs(Le,{"data-loc":"client/src/pages/client/Settings.tsx:501",className:"bg-blue-500/15 text-blue-400 border-blue-500/30 gap-1 text-xs",children:[n.jsx(U5,{"data-loc":"client/src/pages/client/Settings.tsx:501",className:"w-3 h-3"}),"Editor"]}):n.jsx(Le,{"data-loc":"client/src/pages/client/Settings.tsx:502",className:"bg-slate-500/15 text-slate-400 border-slate-500/30 text-xs",children:"Viewer"})}function sSe({status:e}){return e==="active"?n.jsx(Le,{"data-loc":"client/src/pages/client/Settings.tsx:506",className:"bg-emerald-500/15 text-emerald-400 border-emerald-500/30 text-xs",children:"Active"}):e==="suspended"?n.jsx(Le,{"data-loc":"client/src/pages/client/Settings.tsx:507",className:"bg-red-500/15 text-red-400 border-red-500/30 text-xs",children:"Suspended"}):n.jsx(Le,{"data-loc":"client/src/pages/client/Settings.tsx:508",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 text-xs",children:"Invited"})}function rSe({onUploaded:e,currentLogoUrl:t}){const[a,s]=v.useState(t),[r,i]=v.useState(!1),l=le.settings.uploadLogo.useMutation({onSuccess:()=>{ne.success("Logo updated"),e()},onError:p=>ne.error(p.message)}),d=le.settings.removeLogo.useMutation({onSuccess:()=>{s(null),ne.success("Logo removed"),e()},onError:p=>ne.error(p.message)});v.useEffect(()=>{s(t)},[t]);const u=p=>{if(!p.type.startsWith("image/")){ne.error("Please upload an image file");return}if(p.size>2*1024*1024){ne.error("Image must be under 2MB");return}const x=new FileReader;x.onload=m=>{const h=m.target?.result;s(h),l.mutate({base64:h,mimeType:p.type})},x.readAsDataURL(p)};return n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:540",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:541",className:"flex flex-row items-center gap-2 pb-4",children:[n.jsx(Fl,{"data-loc":"client/src/pages/client/Settings.tsx:542",className:"w-4 h-4 text-primary"}),n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:543",className:"text-sm",children:"Brand Logo"})]}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:545",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:546",className:"flex items-start gap-6",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:548",className:"flex-shrink-0 w-24 h-24 rounded-xl border-2 border-dashed border-border bg-muted/30 flex items-center justify-center overflow-hidden",children:a?n.jsx("img",{"data-loc":"client/src/pages/client/Settings.tsx:550",src:a,alt:"Brand logo",className:"w-full h-full object-contain p-1"}):n.jsx(Fl,{"data-loc":"client/src/pages/client/Settings.tsx:552",className:"w-8 h-8 text-muted-foreground/40"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:556",className:"flex-1 space-y-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:557",className:"text-sm text-muted-foreground",children:"Upload your company logo. It will appear in the sidebar instead of the Boostiko icon. Recommended: square PNG or SVG, under 2MB."}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:558",className:`border-2 border-dashed rounded-lg p-4 text-center cursor-pointer transition-colors ${r?"border-primary bg-primary/5":"border-border hover:border-primary/50 hover:bg-muted/30"}`,onDragOver:p=>{p.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:p=>{p.preventDefault(),i(!1);const x=p.dataTransfer.files[0];x&&u(x)},onClick:()=>document.getElementById("logo-file-input")?.click(),children:[n.jsx("input",{"data-loc":"client/src/pages/client/Settings.tsx:567",id:"logo-file-input",type:"file",accept:"image/*",className:"hidden",onChange:p=>{const x=p.target.files?.[0];x&&u(x)}}),l.isPending?n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:575",className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:576",className:"w-4 h-4 animate-spin"})," Uploading..."]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:579",className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Settings.tsx:580",className:"w-4 h-4"})," Click or drag to upload"]})]}),a&&n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:585",variant:"outline",size:"sm",onClick:()=>d.mutate(),disabled:d.isPending,className:"text-destructive hover:text-destructive",children:[n.jsx(Ui,{"data-loc":"client/src/pages/client/Settings.tsx:592",className:"w-3.5 h-3.5 mr-1.5"})," Remove logo"]})]})]})})]})}function iSe(){const{data:e,isLoading:t,refetch:a}=le.settings.get.useQuery(),{data:s}=le.settings.getApiKey.useQuery(),[r,i]=v.useState(!1),l=le.domains.syncTrackingDomainStatus.useMutation(),d=le.domains.checkStatus.useMutation(),{data:u,refetch:p}=le.domains.list.useQuery(void 0,{refetchInterval:r});v.useEffect(()=>{const me=(u??[]).some(pt=>pt.isTrackingDomain&&pt.trackingDomainStatus==="pending"),ut=(u??[]).some(pt=>pt.verificationStatus==="pending");i(me?1e4:ut?3e4:!1),me&&l.mutateAsync().then(pt=>{pt?.updated&&p()}).catch(()=>{}),ut&&(u??[]).filter(ft=>ft.verificationStatus==="pending").forEach(ft=>{d.mutateAsync({id:ft.id}).then(()=>{p()}).catch(()=>{})})},[u]);const{data:x,refetch:m}=le.verifiedEmails.list.useQuery(),{data:h,refetch:y}=le.team.list.useQuery(),[w,b]=v.useState(!1),[j,S]=v.useState(null),[O,A]=v.useState(!1),k=le.useUtils(),E=le.
899settings.regenerateApiKey.useMutation({onSuccess:me=>{S(me.key),k.settings.getApiKey.invalidate()},onError:()=>ne.error("Failed to regenerate API key")}),[D,_]=v.useState(""),[T,I]=v.useState(!1),[$,R]=v.useState(""),[B,Y]=v.useState(""),[z,Q]=v.useState(""),[L,M]=v.useState("editor"),[U,Z]=v.useState({companyName:"",defaultFromName:"",defaultFromEmail:"",defaultReplyTo:"",industry:"prop_firm",timezone:"UTC",unsubscribePageUrl:"",physicalAddress:"",autoSuppressEnabled:!1,autoSuppressDays:90});v.useEffect(()=>{e&&Z({companyName:e.name??"",defaultFromName:e.fromName??"",defaultFromEmail:e.fromEmail??"",defaultReplyTo:e.replyToEmail??"",industry:e.industry??"prop_firm",timezone:"UTC",unsubscribePageUrl:"",physicalAddress:e.companyAddress??"",autoSuppressEnabled:e.autoSuppressEnabled??!1,autoSuppressDays:e.autoSuppressDays??90})},[e?.id]);const ie=le.settings.update.useMutation({onSuccess:()=>{ne.success("Settings saved"),a()},onError:me=>ne.error(me.message)}),G=le.domains.add.useMutation({onSuccess:()=>{ne.success("Domain added — add the DNS records below to complete verification"),_(""),I(!1),p()},onError:me=>{ne.error(me.message),I(!1)}}),F=le.domains.checkStatus.useMutation({onSuccess:me=>{p(),me?.verificationStatus==="verified"?ne.success("Domain verified! DKIM signing is active."):ne.info("DNS records not yet detected — propagation can take up to 72 hours")},onError:me=>ne.error(me.message)}),H=le.domains.delete.useMutation({onSuccess:()=>{ne.success("Domain removed"),p()},onError:me=>ne.error(me.message)}),q=le.domains.setDefault.useMutation({onSuccess:()=>{ne.success("Default sending domain updated"),p()},onError:me=>ne.error(me.message)}),J=le.domains.setMailFrom.useMutation({onSuccess:()=>{ne.success("MAIL FROM subdomain saved — add the DNS records shown below"),p()},onError:me=>ne.error(me.message)}),ce=le.domains.setAsTrackingDomain.useMutation({onSuccess:(me,ut)=>{ut.enable?me.status==="error"?ne.error("Cloudflare provisioning failed — please contact support"):me.status==="active"?ne.success("Tracking domain enabled — add the CNAME record below to your DNS"):ne.success("Tracking domain enabled — provisioning TLS cert (1–2 min) — add the CNAME record below"):ne.success("Tracking domain disabled"),p()},onError:me=>ne.error(me.message)}),se=le.domains.checkMailFromStatus.useMutation({onSuccess:me=>{p(),me?.mailFromStatus==="verified"?ne.success("MAIL FROM subdomain is active!"):ne.info("MAIL FROM DNS records not yet detected — propagation can take a few hours")},onError:me=>ne.error(me.message)}),ye=le.verifiedEmails.add.useMutation({onSuccess:()=>{ne.success("Verification email sent — ask the recipient to click the link"),R(""),m()},onError:me=>ne.error(me.message)}),de=le.verifiedEmails.checkStatus.useMutation({onSuccess:me=>{m(),me?.status==="verified"?ne.success("Email address verified!"):ne.info("Not yet verified — the recipient needs to click the link in the verification email")},onError:me=>ne.error(me.message)}),ve=le.verifiedEmails.remove.useMutation({onSuccess:()=>{ne.success("Email address removed"),m()},onError:me=>ne.error(me.message)}),Pe=le.team.invite.useMutation({onSuccess:()=>{ne.success(`Invite sent to ${B}`),Y(""),Q(""),M("editor"),y()},onError:me=>ne.error(me.message)}),ue=le.team.remove.useMutation({onSuccess:()=>{ne.success("Member removed"),y()},onError:me=>ne.error(me.message)}),Qe=le.team.updateRole.useMutation({onSuccess:()=>{ne.success("Role updated"),y()},onError:me=>ne.error(me.message)}),Ue=()=>{const me=D.trim().toLowerCase().replace(/^https?:\/\//,"").replace(/\/$/,"");me&&(I(!0),G.mutate({domain:me}))},xe=()=>{if(!B||!z){ne.error("Please enter name and email");return}Pe.mutate({email:B,name:z,role:L,origin:window.location.origin})},$e=()=>{s?.key&&(navigator.clipboard.writeText(s.key),b(!0),setTimeout(()=>b(!1),2e3),ne.success("API key copied to clipboard"))},Te=h?.members??[],dt=(h?.invites??[]).filter(me=>!me.acceptedAt),tt=x??[];return n.jsx(Pt,{"data-loc":"client/src/pages/client/Settings.tsx:838",title:"Settings",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:839",className:"p-6 max-w-2xl mx-auto 
899space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:840",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Settings.tsx:841",className:"text-2xl font-bold text-foreground",children:"Workspace Settings"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:842",className:"text-muted-foreground text-sm mt-1",children:"Configure your sending identity, verified domains, email addresses, team members, and workspace preferences"})]}),n.jsx(rSe,{"data-loc":"client/src/pages/client/Settings.tsx:846",onUploaded:a,currentLogoUrl:e?.logoUrl??null}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:849",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:850",className:"flex flex-row items-center gap-2 pb-4",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/Settings.tsx:851",className:"w-4 h-4 text-primary"}),n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:852",className:"text-sm",children:"Sending Identity"})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:854",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:855",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:856",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:857",children:"Default From Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:858",placeholder:"Your Company Name",value:U.defaultFromName,onChange:me=>Z({...U,defaultFromName:me.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:860",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:861",children:"Default From Email"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:862",type:"email",placeholder:"[email protected]",value:U.defaultFromEmail,onChange:me=>Z({...U,defaultFromEmail:me.target.value})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:865",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:866",children:"Default Reply-To Email"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:867",type:"email",placeholder:"[email protected]",value:U.defaultReplyTo,onChange:me=>Z({...U,defaultReplyTo:me.target.value})})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:869",onClick:()=>ie.mutate(U),disabled:ie.isPending,size:"sm",children:[ie.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:870",className:"w-4 h-4 animate-spin mr-2"}):n.jsx(Md,{"data-loc":"client/src/pages/client/Settings.tsx:870",className:"w-4 h-4 mr-2"}),"Save Identity"]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:877",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:878",className:"flex flex-row items-center gap-2 pb-2",children:[n.jsx(AJ,{"data-loc":"client/src/pages/client/Settings.tsx:879",className:"w-4 h-4 text-violet-400"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:880",className:"flex-1",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:881",className:"text-sm",children:"Email Addresses"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:882",className:"text-xs text-muted-foreground mt-0.5",children:"Verify individual email addresses to use as senders. SES sends a verification email — the recipient clicks the link to confirm."})]})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:887",className:"space-y-3",children:[tt.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:890",className:"rounded-md border border-border overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:891",className:"grid grid-cols-[1fr_auto_auto_auto] text-xs bg-muted/50 px-3 py-2 border-b border-border gap-3",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:892",className:"font-medium text-muted-foreground uppercase tracking-wide",children:"Email address"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:893",className:"font-medium text-muted-foreground uppercase tracking-wide",children:"Status"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:894",className:"font-medium text-muted-foreground uppercase tracking-wide",children:"Verified on"}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:895"})]}),tt.map(me=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:898",className:"grid grid-cols-[1fr_auto_auto_auto] items-center px-3 py-2.5 border-b border-border last:border-0 gap-3 bg-card",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:899",className:"text-sm font-mono text-foreground truncate",children:me.email}),n.jsx(aSe,{"data-loc":"client/src/pages/client/Settings.tsx:900",status:me.status}),n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:901",className:"text-xs text-muted-foreground whitespace-nowrap",children:me.verifiedAt?new Date(me.verifiedAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"—"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:904",className:"flex items-center gap-1",children:[me.status!=="verified"&&n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:906",variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>
899de.mutate({id:me.id}),title:"Check verification status",children:n.jsx(Vr,{"data-loc":"client/src/pages/client/Settings.tsx:911",className:"w-3 h-3"})}),n.jsxs(cm,{"data-loc":"client/src/pages/client/Settings.tsx:914",children:[n.jsx(l5,{"data-loc":"client/src/pages/client/Settings.tsx:915",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:916",variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/Settings.tsx:917",className:"w-3 h-3"})})}),n.jsxs(lm,{"data-loc":"client/src/pages/client/Settings.tsx:920",children:[n.jsxs(om,{"data-loc":"client/src/pages/client/Settings.tsx:921",children:[n.jsxs(um,{"data-loc":"client/src/pages/client/Settings.tsx:922",children:["Remove ",me.email,"?"]}),n.jsx(pm,{"data-loc":"client/src/pages/client/Settings.tsx:923",children:"This will remove the email address from SES and your verified senders list."})]}),n.jsxs(dm,{"data-loc":"client/src/pages/client/Settings.tsx:927",children:[n.jsx(mm,{"data-loc":"client/src/pages/client/Settings.tsx:928",children:"Cancel"}),n.jsx(fm,{"data-loc":"client/src/pages/client/Settings.tsx:929",onClick:()=>ve.mutate({id:me.id}),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})]})]})]},me.id))]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:942",className:"flex gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:943",type:"email",placeholder:"[email protected]",value:$,onChange:me=>R(me.target.value),onKeyDown:me=>me.key==="Enter"&&$&&ye.mutate({email:$}),className:"text-sm"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:951",size:"sm",onClick:()=>$&&ye.mutate({email:$}),disabled:ye.isPending||!$.trim(),className:"shrink-0",children:[ye.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:957",className:"w-4 h-4 animate-spin mr-1.5"}):n.jsx(Wt,{"data-loc":"client/src/pages/client/Settings.tsx:957",className:"w-4 h-4 mr-1.5"}),"Add address"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:962",className:"flex items-start gap-2 rounded-md bg-muted/50 border border-border px-3 py-2.5 text-xs text-muted-foreground",children:[n.jsx(Uv,{"data-loc":"client/src/pages/client/Settings.tsx:963",className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-blue-400"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:964",children:"SES sends a verification email to the address. The recipient must click the link before it can be used as a sender. If you have a verified domain, you can use any address at that domain without individual verification."})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:970",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:971",className:"flex flex-row items-center gap-2 pb-2",children:[n.jsx($i,{"data-loc":"client/src/pages/client/Settings.tsx:972",className:"w-4 h-4 text-blue-400"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:973",className:"flex-1",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:974",className:"text-sm",children:"Sending Domains"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:975",className:"text-xs text-muted-foreground mt-0.5",children:"Verify your domain to send from any address at that domain, enable DKIM signing, and configure a MAIL FROM subdomain for better deliverability"})]})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:978",className:"space-y-3",children:[u&&u.length>0&&n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:981",className:"space-y-2",children:u.map(me=>n.jsx(nSe,{"data-loc":"client/src/pages/client/Settings.tsx:983",domain:me,onRefresh:ut=>F.mutate({id:ut}),onDelete:ut=>H.mutate({id:ut}),onSetDefault:ut=>q.mutate({id:ut}),onSetMailFrom:(ut,pt)=>J.mutate({id:ut,mailFromSubdomain:pt}),onCheckMailFrom:ut=>se.mutate({id:ut}),onSetTrackingDomain:(ut,pt)=>ce.mutate({id:ut,enable:pt})},me.id))}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:998",className:"flex gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:999",placeholder:"nextlevelfunded.
899com",value:D,onChange:me=>_(me.target.value),onKeyDown:me=>me.key==="Enter"&&Ue(),className:"font-mono text-sm"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:1006",size:"sm",onClick:Ue,disabled:T||!D.trim(),className:"shrink-0",children:[T?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:1012",className:"w-4 h-4 animate-spin mr-1.5"}):n.jsx(Wt,{"data-loc":"client/src/pages/client/Settings.tsx:1012",className:"w-4 h-4 mr-1.5"}),"Add Domain"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1017",className:"rounded-md bg-muted/50 border border-border px-3 py-2.5 text-xs text-muted-foreground space-y-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1018",className:"font-medium text-foreground",children:"How domain verification works"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1019",children:"1. Enter your domain and click Add Domain — we'll generate DKIM CNAME records"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1020",children:"2. Add the CNAME records to your DNS provider (Cloudflare, GoDaddy, etc.)"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1021",children:"3. Click the refresh icon — verification typically completes within minutes to a few hours"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1022",children:["4. Once verified, set a MAIL FROM subdomain (e.g. ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:1022",className:"font-mono",children:"mail.yourdomain.com"}),") for best deliverability"]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:1028",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:1029",className:"flex flex-row items-center gap-2 pb-2",children:[n.jsx(mf,{"data-loc":"client/src/pages/client/Settings.tsx:1030",className:"w-4 h-4 text-amber-400"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1031",className:"flex-1",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:1032",className:"text-sm",children:"SES Bounce & Complaint Notifications"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1033",className:"text-xs text-muted-foreground mt-0.5",children:"Configure AWS SNS to automatically suppress bounced and complained contacts"})]})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:1036",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1037",className:"rounded-md bg-emerald-500/10 border border-emerald-500/20 px-3 py-2.5 text-xs text-emerald-400 flex items-start gap-2",children:[n.jsx(js,{"data-loc":"client/src/pages/client/Settings.tsx:1038",className:"w-3.5 h-3.5 mt-0.5 shrink-0"}),n.jsxs("span",{"data-loc":"client/src/pages/client/Settings.tsx:1039",children:["Bounce suppression is ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:1039",children:"active"})," — when SES notifies Boostiko of a bounce or complaint, the contact is automatically marked as bounced/complained and excluded from all future sends."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1041",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1042",className:"text-xs",children:"SNS Notification Endpoint (HTTPS subscription URL)"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1043",className:"flex items-center gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1044",readOnly:!0,value:`${window.location.origin}/api/ses/notifications/${e?.id??"[tenant-id]"}`,className:"font-mono text-xs"}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1049",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(`${window.location.origin}/api/ses/notifications/${e?.id??""}`),ne.success("SNS endpoint URL copied")},children:n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:1053",className:"w-4 h-4"})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1057",className:"rounded-md bg-muted/50 border border-border px-3 py-2.5 text-xs text-muted-foreground space-y-1.5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1058",className:"font-medium text-foreground",children:"How to configure in AWS Console"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1059",children:["1. Go to ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:1059",children:"Amazon SNS → Topics"})," and create a new Standard topic"]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1060",children:["2. Create a subscription: Protocol = ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:1060",children:"HTTPS"}),", Endpoint = the URL above. Boostiko auto-confirms it."]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1061",children:["3. Go to ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:1061",children:"Amazon SES → Configuration Sets"}),", open your config set (or create one)"]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1062",children:["4. Add an ",n.jsx("strong",{"data-loc":"client/src/pages/client/Settings.tsx:1062",children:"Event Destination"}),": Event types = Bounce + Complaint, Destination = your SNS topic"]}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1063",children:"5. In SES, set your sending identity to use this configuration set"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1064",className:"text-amber-400/80",children:"Tip: Set a MAIL FROM subdomain (above) so bounce DSN emails route to a subdomain instead of your From address inbox."})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:1070",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:1071",className:"flex flex-row items-center gap-2 pb-2",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Settings.tsx:1072",className:"w-4 h-4 text-violet-400"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1073",className:"flex-1",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:1074",className:"text-sm",children:"Team Members"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1075",className:"text-xs text-muted-foreground mt-0.5",children:"Invite team members to access this workspace. They sign in with email and password — no Manus account required."})]})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:1080",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1082",className:"rounded-md border border-border bg-muted/30 p-4 space-y-3",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1083",className:"text-xs font-medium text-foreground flex items-center gap-1.5",children:[n.jsx(kk,{"data-loc":"client/src/pages/client/Settings.tsx:1084",className:"w-3.5 h-3.5 text-violet-400"}),"Invite a new member"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1087",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1088",className:"space-y-1",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1089",className:"text-xs",children:"Full name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1090",placeholder:"Spencer Johnson",value:z,onChange:me=>Q(me.target.value),className:"h-8 text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1092",className:"space-y-1",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1093",className:"text-xs",children:"Email address"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1094",type:"email",placeholder:"spencer@nextlevelfunded.
899com",value:B,onChange:me=>Y(me.target.value),className:"h-8 text-sm"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1097",className:"flex items-end gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1098",className:"space-y-1 flex-1",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1099",className:"text-xs",children:"Role"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Settings.tsx:1100",value:L,onValueChange:me=>M(me),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Settings.tsx:1101",className:"h-8 text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Settings.tsx:1101"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Settings.tsx:1102",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1103",value:"admin",children:"Admin — full access"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1104",value:"editor",children:"Editor — create & send campaigns"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1105",value:"viewer",children:"Viewer — read-only analytics"})]})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:1109",size:"sm",onClick:xe,disabled:Pe.isPending||!B||!z,className:"h-8 shrink-0",children:[Pe.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:1110",className:"w-3.5 h-3.5 animate-spin mr-1.5"}):n.jsx(kk,{"data-loc":"client/src/pages/client/Settings.tsx:1110",className:"w-3.5 h-3.5 mr-1.5"}),"Send invite"]})]})]}),Te.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1118",className:"space-y-2",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1119",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Active members (",Te.length,")"]}),Te.map(me=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1121",className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-border bg-card",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:1122",className:"w-7 h-7 rounded-full bg-primary/20 flex items-center justify-center shrink-0",children:n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:1123",className:"text-xs font-bold text-primary",children:me.name.split(" ").map(ut=>ut[0]).join("").toUpperCase().slice(0,2)})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1127",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1128",className:"text-sm font-medium text-foreground truncate",children:me.name}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1129",className:"text-xs text-muted-foreground truncate",children:me.email})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1131",className:"flex items-center gap-2 shrink-0",children:[n.jsx(w7,{"data-loc":"client/src/pages/client/Settings.tsx:1132",role:me.role}),n.jsx(sSe,{"data-loc":"client/src/pages/client/Settings.tsx:1133",status:me.status}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Settings.tsx:1134",value:me.role,onValueChange:ut=>Qe.mutate({id:me.id,role:ut}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Settings.tsx:1135",className:"h-6 w-auto text-xs border-0 bg-transparent px-1 focus:ring-0",children:n.jsx(U5,{"data-loc":"client/src/pages/client/Settings.tsx:1136",className:"w-3 h-3 text-muted-foreground"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Settings.tsx:1138",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1139",value:"admin",children:"Admin"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1140",value:"editor",children:"Editor"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1141",value:"viewer",children:"Viewer"})]})]}),n.jsxs(cm,{"data-loc":"client/src/pages/client/Settings.tsx:1144",children:[n.jsx(l5,{"data-loc":"client/src/pages/client/Settings.tsx:1145",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1146",variant:"ghost",size:"icon",className:"h-6 w-6 text-destructive hover:text-destructive",children:n.jsx(Ql,{"data-loc":"client/src/pages/client/Settings.tsx:1147",className:"w-3.5 h-3.5"})})}),n.jsxs(lm,{"data-loc":"client/src/pages/client/Settings.tsx:1150",children:[n.jsxs(om,{"data-loc":"client/src/pages/client/Settings.tsx:1151",children:[n.jsxs(um,{"data-loc":"client/src/pages/client/Settings.tsx:1152",children:["Remove ",me.name,"?"]}),n.jsx(pm,{"data-loc":"client/src/pages/client/Settings.tsx:1153",children:"This will revoke their access immediately. They'll need a new invite to regain access."})]}),n.jsxs(dm,{"data-loc":"client/src/pages/client/Settings.tsx:1155",children:[n.jsx(mm,{"data-loc":"client/src/pages/client/Settings.tsx:1156",children:"Cancel"}),n.jsx(fm,{"data-loc":"client/src/pages/client/Settings.tsx:1157",onClick:()=>
899ue.mutate({id:me.id}),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Remove"})]})]})]})]})]},me.id))]}),dt.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1169",className:"space-y-2",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1170",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Pending invites (",dt.length,")"]}),dt.map(me=>n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1172",className:"flex items-center gap-3 px-3 py-2.5 rounded-md border border-dashed border-border bg-muted/20",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Settings.tsx:1173",className:"w-7 h-7 rounded-full bg-amber-500/15 flex items-center justify-center shrink-0",children:n.jsx(jr,{"data-loc":"client/src/pages/client/Settings.tsx:1174",className:"w-3.5 h-3.5 text-amber-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1176",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1177",className:"text-sm font-medium text-foreground truncate",children:me.name}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1178",className:"text-xs text-muted-foreground truncate",children:[me.email," · Expires ",new Date(me.expiresAt).toLocaleDateString()]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1180",className:"flex items-center gap-2 shrink-0",children:[n.jsx(w7,{"data-loc":"client/src/pages/client/Settings.tsx:1181",role:me.role}),n.jsx(Le,{"data-loc":"client/src/pages/client/Settings.tsx:1182",className:"bg-amber-500/15 text-amber-400 border-amber-500/30 text-xs",children:"Pending"})]})]},me.id))]}),Te.length===0&&dt.length===0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1190",className:"text-center py-6 text-muted-foreground text-sm",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Settings.tsx:1191",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1192",children:"No team members yet. Invite someone above."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1196",className:"rounded-md bg-muted/50 border border-border px-3 py-2.5 text-xs text-muted-foreground space-y-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1197",className:"font-medium text-foreground",children:"How member login works"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1198",children:"1. Enter the member's name, email, and role above and click Send invite"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1199",children:"2. They receive an email with a link to set their password (valid 72 hours)"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1200",children:["3. After accepting, they sign in at ",n.jsx("span",{"data-loc":"client/src/pages/client/Settings.tsx:1200",className:"font-mono",children:"/member-login"})," with email + password"]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:1206",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:1207",className:"flex flex-row items-center gap-2 pb-4",children:[n.jsx(OS,{"data-loc":"client/src/pages/client/Settings.tsx:1208",className:"w-4 h-4 text-emerald-400"}),n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:1209",className:"text-sm",children:"API Access"})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:1211",className:"space-y-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1212",className:"text-xs text-muted-foreground",children:"Use this API key to sync contacts and trigger automations from external platforms (Match-Trader, DXtrade, MetaTrader, crypto platforms)."}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1215",className:"flex items-center gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1216",readOnly:!0,value:s?.key??"Loading...",className:"font-mono text-xs"}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1217",variant:"outline",size:"sm",onClick:$e,title:"Copy masked key",children:w?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:1218",className:"w-4 h-4 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:1218",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1220",variant:"outline",size:"sm",onClick:()=>{confirm("Regenerate your API key? Your current key will stop working immediately.")&&E.mutate()},disabled:E.isPending,title:"Regenerate API key",children:E.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:1231",className:"w-4 h-4 animate-spin"}):n.jsx(Vr,{"data-loc":"client/src/pages/client/Settings.tsx:1231",className:"w-4 h-4"})})]}),j&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1237",className:"rounded-lg border border-emerald-500/30 bg-emerald-500/5 p-3 space-y-2",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1238",className:"text-xs font-semibold text-emerald-600 flex items-center gap-1.5",children:[n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:1239",className:"w-3.5 h-3.5"}),"New API key generated — copy it now, it won't be shown again"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1242",className:"flex items-center gap-2",children:[n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1243",readOnly:!0,value:j,className:"font-mono text-xs bg-background"}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1244",variant:"outline",size:"sm",onClick:()=>{navigator.clipboard.writeText(j),A(!0),setTimeout(()=>A(!1),2e3),ne.success("Full API key copied!")},children:O?n.jsx(jn,{"data-loc":"client/src/pages/client/Settings.tsx:1254",className:"w-4 h-4 text-emerald-400"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Settings.tsx:1254",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Settings.tsx:1256",variant:"ghost",size:"sm",onClick:()=>S(null),children:n.jsx(Ui,{"data-loc":"client/src/pages/client/Settings.tsx:1257",className:"w-4 h-4"})})]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Settings.tsx:1262",className:"text-xs text-muted-foreground",children:["Webhook inbou
899nd URL: ",n.jsxs("span",{"data-loc":"client/src/pages/client/Settings.tsx:1263",className:"font-mono",children:["POST /api/webhooks/",e?.id??"[tenant-id]","/[endpoint-id]"]})]})]})]}),n.jsx(JNe,{"data-loc":"client/src/pages/client/Settings.tsx:1269"}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Settings.tsx:1272",className:"bg-card border-border",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Settings.tsx:1273",className:"flex flex-row items-center gap-2 pb-4",children:[n.jsx(qI,{"data-loc":"client/src/pages/client/Settings.tsx:1274",className:"w-4 h-4 text-cyan-400"}),n.jsx(St,{"data-loc":"client/src/pages/client/Settings.tsx:1275",className:"text-sm",children:"Company Information"})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Settings.tsx:1277",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1278",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1279",children:"Company Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1280",placeholder:"Alpha Prop Firm",value:U.companyName,onChange:me=>Z({...U,companyName:me.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1282",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1283",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1284",children:"Industry"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Settings.tsx:1285",value:U.industry,onValueChange:me=>Z({...U,industry:me}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Settings.tsx:1286",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Settings.tsx:1286"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Settings.tsx:1287",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1288",value:"prop_firm",children:"Prop Trading Firm"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1289",value:"crypto",children:"Crypto / Web3"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1290",value:"other",children:"Other"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1294",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1295",children:"Timezone"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Settings.tsx:1296",value:U.timezone,onValueChange:me=>Z({...U,timezone:me}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Settings.tsx:1297",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Settings.tsx:1297"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Settings.tsx:1298",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1299",value:"UTC",children:"UTC"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1300",value:"America/New_York",children:"Eastern (ET)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1301",value:"America/Chicago",children:"Central (CT)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1302",value:"America/Los_Angeles",children:"Pacific (PT)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1303",value:"Europe/London",children:"London (GMT)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1304",value:"Europe/Berlin",children:"Berlin (CET)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1305",value:"Asia/Dubai",children:"Dubai (GST)"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1306",value:"Asia/Singapore",children:"Singapore (SGT)"})]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1311",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1312",children:"Physical Address"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1313",placeholder:"123 Main St, City, Country (required for CAN-SPAM compliance)",value:U.physicalAddress,onChange:me=>Z({...U,physicalAddress:me.target.value})}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1314",className:"text-xs text-muted-foreground",children:"Required by CAN-SPAM and GDPR — appears in email footers"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1316",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1317",children:"Custom Unsubscribe Page URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/Settings.tsx:1318",type:"url",placeholder:"https://yourfirm.com/unsub
899scribe",value:U.unsubscribePageUrl,onChange:me=>Z({...U,unsubscribePageUrl:me.target.value})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1322",className:"border border-border rounded-lg p-4 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1323",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1324",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1325",className:"text-sm font-medium",children:"Engagement-Based Suppression"}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1326",className:"text-xs text-muted-foreground mt-0.5",children:"Automatically suppress contacts who haven't opened an email in the configured period. Protects sender reputation."})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Settings.tsx:1328",checked:U.autoSuppressEnabled,onCheckedChange:me=>Z({...U,autoSuppressEnabled:me})})]}),U.autoSuppressEnabled&&n.jsxs("div",{"data-loc":"client/src/pages/client/Settings.tsx:1334",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Settings.tsx:1335",className:"text-xs",children:"Suppress after (days of inactivity)"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Settings.tsx:1336",value:String(U.autoSuppressDays),onValueChange:me=>Z({...U,autoSuppressDays:Number(me)}),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Settings.tsx:1340",className:"w-40",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Settings.tsx:1341"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Settings.tsx:1343",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1344",value:"30",children:"30 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1345",value:"60",children:"60 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1346",value:"90",children:"90 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1347",value:"120",children:"120 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1348",value:"180",children:"180 days"}),n.jsx(he,{"data-loc":"client/src/pages/client/Settings.tsx:1349",value:"365",children:"365 days"})]})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Settings.tsx:1352",className:"text-xs text-muted-foreground",children:"Contacts with no opens in this period will appear in the Cold Contacts tab for bulk suppression."})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Settings.tsx:1357",onClick:()=>ie.mutate(U),disabled:ie.isPending,size:"sm",children:[ie.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/Settings.tsx:1358",className:"w-4 h-4 animate-spin mr-2"}):n.jsx(Md,{"data-loc":"client/src/pages/client/Settings.tsx:1358",className:"w-4 h-4 mr-2"}),"Save Company Info"]})]})]})]})})}function cSe(){const[e,t]=v.useState(""),[a,s]=v.useState(!1),[r,i]=v.useState(""),[l,d]=v.useState(1),{data:u,isLoading:p,refetch:x}=le.contacts.list.useQuery({status:"unsubscribed",search:e||void 0,page:l,limit:50}),{data:m}=le.contacts.list.useQuery({status:"bounced",limit:1}),{data:h}=le.contacts.list.useQuery({status:"complained",limit:1});le.contacts.update.useMutation({onSuccess:()=>{ne.success("Contact added to suppression list"),s(!1),i(""),x()},onError:S=>ne.error(S.message)});const y=le.contacts.update.useMutation({onSuccess:()=>{ne.success("Contact resubscribed"),x()},onError:S=>ne.error(S.message)}),w=u?.contacts??[],b=u?.total??0,j=()=>{if(w.length===0){ne.error("No data to export");return}const S=["Email","First Name","Last Name","Status","Unsubscribed At"],O=w.map(_=>[`"${_.email}"`,`"${_.firstName??""}"`,`"${_.lastName??""}"`,_.status,_.updatedAt?new Date(_.updatedAt).toISOString().slice(0,10):""].join(",")),A=[S.join(","),...O].join(`
900`),k=new Blob([A],{type:"text/csv"}),E=URL.createObjectURL(k),D=document.createElement("a");D.href=E,D.download=`suppression-list-${new Date().toISOString().slice(0,10)}.csv`,D.click(),URL.revokeObjectURL(E),ne.success("Suppression list exported")};return n.jsx(Pt,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:79",title:"Unsubscribes",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:80",className:"p-6 space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:81",className:"flex items-center justify-between flex-wrap gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:82",children:[n.jsx("h2",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:83",className:"text-2xl font-bold text-foreground",children:"Suppression List"}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:84",className:"text-muted-foreground text-sm mt-1",children:"Contacts who have unsubscribed, bounced, or complained"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:86",className:"flex items-center gap-2",children:n.jsxs(te,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:87",variant:"outline",size:"sm",onClick:j,children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:88",className:"w-4 h-4 mr-2"}),"Export CSV"]})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:94",className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{label:"Unsubscribed",value:b,icon:Ql,color:"text-amber-400",desc:"Opted out manually"},{label:"Hard Bounced",value:m?.total??0,icon:Qg,color:"text-red-400",desc:"Invalid addresses"},{label:"Complained",value:h?.total??0,icon:Qg,color:"text-rose-400",desc:"Marked as spam"}].map(({label:S,value:O,icon:A,color:k,desc:E})=>n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:100",className:"stat-card p-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:101",className:"flex items-center justify-between mb-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:102",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:S}),n.jsx(A,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:103",className:`w-4 h-4 ${k}`})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:105",className:`text-2xl font-bold ${k}
900`,children:O.toLocaleString()}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:106",className:"text-xs text-muted-foreground mt-1",children:E})]},S))}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:112",className:"bg-amber-500/5 border-amber-500/20",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:113",className:"p-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:114",className:"flex items-start gap-3",children:[n.jsx(Qg,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:115",className:"w-5 h-5 text-amber-400 flex-shrink-0 mt-0.5"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:116",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:117",className:"text-sm font-semibold text-amber-300",children:"CAN-SPAM & GDPR Compliance"}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:118",className:"text-xs text-muted-foreground mt-1",children:"Contacts on this list are automatically excluded from all campaign sends. Unsubscribe requests are processed within 10 business days as required by CAN-SPAM. Hard bounces and spam complaints are suppressed immediately. Never send to suppressed contacts."})]})]})})}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:127",className:"bg-card border-border",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:128",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:129",className:"flex items-center justify-between gap-3 flex-wrap",children:[n.jsxs(St,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:130",className:"text-sm",children:["Unsubscribed Contacts (",b.toLocaleString(),")"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:131",className:"relative w-64",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:132",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:133",placeholder:"Search by email...",value:e,onChange:S=>{t(S.target.value),d(1)},className:"pl-9 h-8 text-sm"})]})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:142",children:p?n.jsx("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:144",className:"space-y-2",children:[...Array(8)].map((S,O)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:144",className:"h-12"},O))}):w.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:146",className:"text-center py-12",children:[n.jsx(Ql,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:147",className:"w-10 h-10 mx-auto mb-3 text-muted-foreground/30"}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:148",className:"text-muted-foreground text-sm font-medium",children:"No unsubscribed contacts"}),n.jsx("p",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:149",className:"text-xs text-muted-foreground mt-1",children:"Contacts who unsubscribe will appear here automatically"})]}):n.jsxs(n.Fragment,{children:[n.jsxs("table",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:153",className:"w-full",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:154",children:n.jsx("tr",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:155",className:"border-b border-border",children:["Email","Name","Status","Date","Actions"].map(S=>n.jsx("th",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:157",className:"text-left py-2 text-xs text-muted-foreground font-medium pr-4",children:S},S))})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:161",children:w.map(S=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:163",className:"border-b border-border/50 data-table-row",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:164",className:"py-2.5 text-sm text-foreground pr-4",children:S.email}),n.jsx("td",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:165",className:"py-2.5 text-sm text-muted-foreground pr-4",children:[S.firstName,S.lastName].filter(
900Boolean).join(" ")||"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:168",className:"py-2.5 pr-4",children:n.jsx(Le,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:169",variant:"outline",className:S.status==="bounced"?"border-red-500/40 text-red-400":S.status==="complained"?"border-rose-500/40 text-rose-400":"border-amber-500/40 text-amber-400",children:S.status})}),n.jsx("td",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:177",className:"py-2.5 text-xs text-muted-foreground pr-4",children:S.updatedAt?new Date(S.updatedAt).toLocaleDateString():"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:180",className:"py-2.5",children:S.status==="unsubscribed"&&n.jsx(te,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:182",variant:"ghost",size:"sm",className:"h-7 text-xs text-muted-foreground hover:text-foreground",onClick:()=>y.mutate({id:S.id,data:{status:"subscribed"}}),children:"Resubscribe"})})]},S.id))})]}),b>50&&n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:199",className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:200",className:"text-xs text-muted-foreground",children:["Showing ",(l-1)*50+1,"–",Math.min(l*50,b)," of ",b.toLocaleString()]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Unsubscribes.tsx:203",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:204",variant:"outline",size:"sm",disabled:l===1,onClick:()=>d(S=>S-1),children:"Previous"}),n.jsx(te,{"data-loc":"client/src/pages/client/Unsubscribes.tsx:205",variant:"outline",size:"sm",disabled:l*50>=b,onClick:()=>d(S=>S+1),children:"Next"})]})]})]})})]})]})})}const N7=["bg-primary/10 text-primary border-primary/20","bg-emerald-50 text-emerald-700 border-emerald-200","bg-violet-50 text-violet-700 border-violet-200","bg-amber-50 text-amber-700 border-amber-200","bg-rose-50 text-rose-700 border-rose-200","bg-cyan-50 text-cyan-700 border-cyan-200","bg-orange-50 text-orange-700 border-orange-200","bg-indigo-50 text-indigo-700 border-indigo-200"];function lSe(){const{data:e,isLoading:t,refetch:a}=le.tags.list.useQuery(),[s,r]=v.useState(!1),[i,l]=v.useState(""),d=le.tags.create.useMutation({onSuccess:()=>{ne.success("Tag created"),r(!1),a(),l("")},onError:u=>ne.error(u.message)});return n.jsx(Pt,{"data-loc":"client/src/pages/client/Tags.tsx:45",title:"Tags",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:46",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:47",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:48",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Tags.tsx:49",className:"text-xl font-semibold text-foreground",children:"Tags"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Tags.tsx:50",className:"text-sm text-muted-foreground mt-0.5",children:[e?.length??0," tag",e?.length!==1?"s":""]})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Tags.tsx:54",open:s,onOpenChange:r,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Tags.tsx:55",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Tags.tsx:56",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Tags.tsx:57",className:"w-4 h-4"}),"New tag"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Tags.tsx:61",className:"max-w-sm",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Tags.tsx:62",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Tags.tsx:62",children:"Create Tag"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:63",className:"space-y-4 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:64",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Tags.tsx:65",children:"Tag name *"}),n.jsx(De,{"data-loc":"client/src/pages/client/Tags.tsx:66",placeholder:"e.g. funded-trader",value:i,onChange:u=>l(u.target.value),onKeyDown:u=>u.key==="Enter"&&i&&d.mutate({name:i})})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Tags.tsx:73",className:"w-full",disabled:!i||d.isPending,onClick:()=>d.mutate({name:i}),children:d.isPending?"Creating...":"Create tag"})]})]})]})]}),t?n.jsx("div",{"data-loc":"client/src/pages/client/Tags.tsx:86",className:"flex flex-wrap gap-3",children:[...Array(12)].map((u,p)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Tags.tsx:88",className:"h-9 w-28 rounded-full"},p))}):e?.length?n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:106",className:"border border-border rounded-lg overflow-hidden bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:107",className:"grid grid-cols-[1fr_1fr_120px] gap-4 px-4 py-3 bg-muted/40 border-b border-border text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Tags.tsx:108",children:"Tag"}),n.jsx("span",{"data-loc":"client/src/pages/client/Tags.tsx:109",children:"Contacts"}),n.jsx("span",{"data-loc":"client/src/pages/client/Tags.tsx:110",className:"text-right",children:"Actions"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Tags.tsx:112",className:"divide-y divide-border",children:e.map((u,p)=>
900{const x=N7[p%N7.length];return n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:116",className:"grid grid-cols-[1fr_1fr_120px] gap-4 px-4 py-3 items-center hover:bg-muted/30 transition-colors group",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Tags.tsx:117",className:"flex items-center gap-2",children:n.jsxs("span",{"data-loc":"client/src/pages/client/Tags.tsx:118",className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border ${x}`,children:[n.jsx(vf,{"data-loc":"client/src/pages/client/Tags.tsx:119",className:"w-3 h-3"}),u.name]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:123",className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Tags.tsx:124",className:"w-3.5 h-3.5"}),u.contactCount?.toLocaleString()??0]}),n.jsx("div",{"data-loc":"client/src/pages/client/Tags.tsx:127",className:"flex justify-end",children:n.jsxs(xr,{"data-loc":"client/src/pages/client/Tags.tsx:128",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Tags.tsx:129",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Tags.tsx:130",variant:"ghost",size:"sm",className:"h-7 w-7 p-0 opacity-0 group-hover:opacity-100 transition-opacity",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Tags.tsx:131",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Tags.tsx:134",align:"end",className:"w-36",children:[n.jsxs(ca,{"data-loc":"client/src/pages/client/Tags.tsx:135",className:"flex items-center gap-2 cursor-pointer",onClick:()=>ne.info("Rename coming soon"),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Tags.tsx:136",className:"w-4 h-4"}),"Rename"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Tags.tsx:138",className:"flex items-center gap-2 text-destructive focus:text-destructive cursor-pointer",onClick:()=>ne.info("Delete coming soon"),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Tags.tsx:139",className:"w-4 h-4"}),"Delete"]})]})]})})]},u.id)})})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Tags.tsx:92",className:"border border-dashed border-border rounded-lg py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Tags.tsx:93",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(vf,{"data-loc":"client/src/pages/client/Tags.tsx:94",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Tags.tsx:96",className:"text-sm font-medium text-foreground",children:"No tags yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Tags.tsx:97",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Tags help you label and filter contacts"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Tags.tsx:100",size:"sm",variant:"outline",onClick:()=>r(!0),children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Tags.tsx:101",className:"w-4 h-4 mr-1.5"}),"Create tag"]})]})]})})}var S4="Progress",C4=100,[oSe]=Pn(S4),[dSe,uSe]=oSe(S4),nW=v.forwardRef((e,t)=>{const{__scopeProgress:a,value:s=null,max:r,getValueLabel:i=pSe,...l}=e;(r||r===0)&&!S7(r)&&console.error(fSe(`${r}`,"Progress"));const d=S7(r)?r:C4;s!==null&&!C7(s,d)&&console.error(mSe(`${s}`,"Progress"));const u=C7(s,d)?s:null,p=bv(u)?i(u,d):void 0;return n.jsx(dSe,{scope:a,value:u,max:d,children:n.jsx(et.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":bv(u)?u:void 0,"aria-valuetext":p,role:"progressbar","data-state":iW(u,d),"data-value":u??void 0,"data-max":d,...l,ref:t})})});nW.displayName=S4;var sW="ProgressIndicator",rW=v.forwardRef((e,t)=>{const{__scopeProgress:a,...s}=e,r=uSe(sW,a);return n.jsx(et.div,{"data-state":iW(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...s,ref:t})});rW.displayName=sW;function pSe(e,t){return`${Math.round(e/t*100)}%`}function iW(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function bv(e){return typeof e=="number"}function S7(e){return bv(e)&&!isNaN(e)&&e>0}function C7(e,t){return bv(e)&&!isNaN(e)&&e<=t&&e>=0}function fSe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${C4}\`.`}function mSe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
901  - a positive number
902  - less than the value passed to \`max\` (or ${C4} if no \`max\` prop is set)
903  - \`null\` or \`undefined\` if the progress is indeterminate.
904
905Defaulting to \`null\`.`}var xSe=nW,gSe=rW;function hSe({className:e,value:t,...a}){return n.jsx(xSe,{"data-loc":"client/src/components/ui/progress.tsx:12","data-slot":"progress",className:Se("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...a,children:n.jsx(gSe,{"data-loc":"client/src/components/ui/progress.tsx:20","data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function vSe(){const[e,t]=v.useState(!1),[a,s]=v.useState(null),[r,i]=v.useState(!1),l=v.useRef(null),d=le.useUtils(),{data:u=[],isLoading:p}=le.campaigns.getImportHistory.useQuery(void 0,{refetchInterval:b=>{const j=b.state.data;return Array.isArray(j)&&j.some(S=>S.status==="processing")?3e3:!1}}),x=u.some(b=>b.status==="processing"),m=le.campaigns.importContacts.useMutation({onSuccess:()=>{ne.success("Import started — processing in the background"),t(!1),s(null),d.campaigns.getImportHistory.invalidate()},onError:b=>ne.error(b.message)}),h=()=>
905{if(!a)return;const b=new FileReader;b.onload=j=>{const S=j.target?.result;m.mutate({csvContent:S,updateExisting:r,fileName:a.name})},b.readAsText(a)},y=({status:b})=>b==="complete"?n.jsx(Kl,{"data-loc":"client/src/pages/client/Imports.tsx:56",className:"w-4 h-4 text-emerald-500"}):b==="error"?n.jsx($5,{"data-loc":"client/src/pages/client/Imports.tsx:57",className:"w-4 h-4 text-red-500"}):n.jsx(Ot,{"data-loc":"client/src/pages/client/Imports.tsx:58",className:"w-4 h-4 text-amber-500 animate-spin"}),w=({status:b})=>b==="complete"?n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:62",className:"text-xs text-emerald-600 font-medium",children:"Complete"}):b==="error"?n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:63",className:"text-xs text-red-500 font-medium",children:"Error"}):n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:64",className:"text-xs text-amber-500 font-medium",children:"Processing…"});return n.jsx(Pt,{"data-loc":"client/src/pages/client/Imports.tsx:68",title:"Imports",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:69",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:70",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:71",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Imports.tsx:72",className:"text-xl font-semibold text-foreground",children:"Imports"}),n.jsx("p",{"data-loc":"client/src/pages/client/Imports.tsx:73",className:"text-sm text-muted-foreground mt-0.5",children:"Import contacts from CSV files"})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Imports.tsx:75",open:e,onOpenChange:b=>{t(b),b||s(null)},children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Imports.tsx:76",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Imports.tsx:77",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Imports.tsx:78",className:"w-4 h-4"}),"New import"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Imports.tsx:82",className:"max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Imports.tsx:83",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Imports.tsx:83",children:"Import Contacts"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:84",className:"space-y-5 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:85",className:"rounded-lg border-2 border-dashed border-border p-8 text-center cursor-pointer hover:border-primary/50 hover:bg-primary/5 transition-colors",onClick:()=>l.current?.click(),children:[a?n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:90",className:"flex items-center justify-center gap-2",children:[n.jsx(hf,{"data-loc":"client/src/pages/client/Imports.tsx:91",className:"w-5 h-5 text-primary"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:92",className:"text-sm font-medium",children:a.name}),n.jsxs("span",{"data-loc":"client/src/pages/client/Imports.tsx:93",className:"text-xs text-muted-foreground",children:["(",(a.size/1024).toFixed(1)," KB)"]})]}):n.jsxs(n.Fragment,{children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Imports.tsx:97",className:"w-10 h-10 mx-auto mb-3 text-muted-foreground"}),n.jsx("p",{"data-loc":"client/src/pages/client/Imports.tsx:98",className:"text-sm font-medium text-foreground",children:"Click to select a CSV file"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Imports.tsx:99",className:"text-xs text-muted-foreground mt-1",children:["Required column: ",n.jsx("strong",{"data-loc":"client/src/pages/client/Imports.tsx:100",children:"email"}),". Optional: first_name, last_name, phone, country"]})]}),n.jsx("input",{"data-loc":"client/src/pages/client/Imports.tsx:104",ref:l,type:"file",accept:".csv",className:"hidden",onChange:b=>s(b.target.files?.[0]??null)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:109",className:"flex items-center justify-between py-2 border-y border-border",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:110",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Imports.tsx:111",className:"text-sm font-medium",children:"Update existing contacts"}),n.jsx("p",{"data-loc":"client/src/pages/client/Imports.tsx:112",className:"text-xs text-muted-foreground mt-0.5",children:"Overwrite data for contacts already in your list"})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Imports.tsx:114",checked:r,onCheckedChange:i})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Imports.tsx:116",className:"w-full",disabled:!a||m.isPending,onClick:h,children:m.isPending?n.jsxs(n.Fragment,{children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/Imports.tsx:122",className:"w-4 h-4 mr-2 animate-spin"}),"Uploading…"]}):"Start import"})]})]})]})]}),x&&n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:131",className:"flex items-center gap-2 text-sm text-amber-600 bg-amber-50 border border-amber-200 rounded-lg px-4 py-3",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/Imports.tsx:132",className:"w-4 h-4 animate-spin flex-shrink-0"}),"Import in progress — this page refreshes automatically every 3 seconds."]}),p?n.jsx("div",{"data-loc":"client/src/pages/client/Imports.tsx:138",className:"space-y-2",children:[1,2,3].map(b=>n.jsx(Me,{"data-loc":"client/src/pages/client/Imports.tsx:139",className:"h-14 w-full rounded-lg"},b))}):u.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:142",className:"border border-dashed border-border rounded-lg py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Imports.tsx:143",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(Ns,{"data-loc":"client/src/pages/client/Imports.tsx:144",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Imports.tsx:146",className:"text-sm font-medium text-foreground",children:"No imports yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Imports.tsx:147",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Upload a CSV file to add contacts to your workspace"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Imports.tsx:150",size:"sm",variant:"outline",onClick:()=>t(!0),children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Imports.tsx:151",className:"w-4 h-4 mr-1.5"}),"Import CSV"]})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:156",className:"border border-border rounded-lg overflow-hidden bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:157",className:"grid grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr] gap-4 px-4 py-3 bg-muted/40 border-b border-border text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:158",children:"File"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:159",children:"Status"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:160",children:"Imported"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:161",children:"Updated"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:162",children:"Skipped"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:163",children:"Date"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Imports.tsx:165",className:"divide-y divide-border",children:u.map(b=>n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:167",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:168",className:"grid grid-cols-[2fr_1fr_1fr_1fr_1fr_1fr] gap-4 px-4 py-4 items-center hover:bg-muted/30 transition-colors",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:169",className:"flex items-center gap-2 min-w-0",children:[n.jsx(hf,{"data-loc":"client/src/pages/client/Imports.tsx:170",className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:171",className:"text-sm font-medium text-foreground truncate",children:b.fileName})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:173",className:"flex items-center gap-1.5",children:[n.jsx(y,{"data-loc":"client/src/pages/client/Imports.tsx:174",status:b.status}),n.jsx(w,{"data-loc":"client/src/pages/client/Imports.tsx:175",status:b.status})]}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:177",className:"text-sm text-emerald-600 font-medium",children:b.status==="processing"?"—":`+${b.imported}`}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:180",className:"text-sm text-blue-600 font-medium",children:b.status==="processing"?"—":b.updated}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:183",className:"text-sm text-muted-foreground",children:b.status==="processing"?"—":b.skipped}),n.jsx("span",{"data-loc":"client/src/pages/client/Imports.tsx:186",className:"text-xs text-muted-foreground",children:new Date(b.createdAt).toLocaleDateString()})]}),b.status==="processing"&&b.total>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:189",className:"px-4 pb-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Imports.tsx:190",className:"flex items-center justify-between text-xs text-muted-foreground mb-1",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Imports.tsx:191",children:["Processing ",b.total.toLocaleStr
905ing()," contacts…"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Imports.tsx:192",children:[b.imported.toLocaleString()," done"]})]}),n.jsx(hSe,{"data-loc":"client/src/pages/client/Imports.tsx:194",value:Math.round(b.imported/b.total*100),className:"h-1.5"})]})]},b.id))})]})]})})}function ySe(){const[e,t]=v.useState(!1),[a,s]=v.useState("all"),[r,i]=v.useState([]),l=le.useUtils(),d=async()=>{try{const p=(await l.contacts.list.fetch({limit:1e4}))?.contacts??[],x=["email","first_name","last_name","status","account_type","account_size","trading_platform","country","created_at"],m=p.map(j=>[j.email,j.firstName??"",j.lastName??"",j.status,j.accountType??"",j.accountSize??"",j.tradingPlatform??"",j.country??"",new Date(j.createdAt).toISOString()]),h=[x,...m].map(j=>j.map(S=>`"${String(S).replace(/"/g,'""')}"`).join(",")).join(`
906`),y=new Blob([h],{type:"text/csv"}),w=URL.createObjectURL(y),b=document.createElement("a");b.href=w,b.download=`contacts-export-${new Date().toISOString().split("T")[0]}.csv`,b.click(),URL.revokeObjectURL(w),i(j=>[{id:Date.now().toString(),type:"Contacts",filter:a==="all"?"All contacts":a,status:"complete",count:p.length,date:new Date},...j]),ne.success(`Exported ${p.length} contacts`),t(!1)}catch(u){ne.error(u.message??"Export failed")}};return n.jsx(Pt,{"data-loc":"client/src/pages/client/Exports.tsx:67",title:"Exports",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:68",className:"p-6 max-w-7xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:69",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:70",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Exports.tsx:71",className:"text-xl font-semibold text-foreground",children:"Exports"}),n.jsx("p",{"data-loc":"client/src/pages/client/Exports.tsx:72",className:"text-sm text-muted-foreground mt-0.5",children:"Download your contact data as CSV"})]}),n.jsxs(qa,{"data-loc":"client/src/pages/client/Exports.tsx:74",open:e,onOpenChange:t,children:[n.jsx(qi,{"data-loc":"client/src/pages/client/Exports.tsx:75",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Exports.tsx:76",size:"sm",className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Exports.tsx:77",className:"w-4 h-4"}),"New export"]})}),n.jsxs(Fa,{"data-loc":"client/src/pages/client/Exports.tsx:81",className:"max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Exports.tsx:82",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Exports.tsx:82",children:"Export Contacts"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:83",className:"space-y-5 pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:84",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Exports.tsx:85",children:"Filter"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Exports.tsx:86",value:a,onValueChange:s,children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Exports.tsx:87",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Exports.tsx:88"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Exports.tsx:90",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Exports.tsx:91",value:"all",children:"All contacts"}),n.jsx(he,{"data-loc":"client/src/pages/client/Exports.tsx:92",value:"subscribed",children:"Subscribed only"}),n.jsx(he,{"data-loc":"client/src/pages/client/Exports.tsx:93",value:"unsubscribed",children:"Unsubscribed only"})]})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Exports.tsx:97",className:"rounded-lg bg-muted/50 border border-border p-4 text-sm text-muted-foreground",children:"The export will include: email, first name, last name, status, account type, account size, trading platform, country, and creation date."}),n.jsxs(te,{"data-loc":"client/src/pages/client/Exports.tsx:100",className:"w-full gap-1.5",onClick:d,children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/Exports.tsx:101",className:"w-4 h-4"}),"Export as CSV"]})]})]})]})]}),r.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:110",className:"border border-dashed border-border rounded-lg py-20 text-center",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Exports.tsx:111",className:"w-12 h-12 rounded-full bg-muted flex items-center justify-center mx-auto mb-3",children:n.jsx(Bc,{"data-loc":"client/src/pages/client/Exports.tsx:112",className:"w-6 h-6 text-muted-foreground"})}),n.jsx("p",{"data-loc":"client/src/pages/client/Exports.tsx:114",className:"text-sm font-medium text-foreground",children:"No exp
906orts yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Exports.tsx:115",className:"text-xs text-muted-foreground mt-1 mb-4",children:"Export your contacts to a CSV file for use in other tools"}),n.jsxs(te,{"data-loc":"client/src/pages/client/Exports.tsx:118",size:"sm",variant:"outline",onClick:()=>t(!0),children:[n.jsx(Bc,{"data-loc":"client/src/pages/client/Exports.tsx:119",className:"w-4 h-4 mr-1.5"}),"Export contacts"]})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:124",className:"border border-border rounded-lg overflow-hidden bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:125",className:"grid grid-cols-[2fr_1fr_1fr_1fr] gap-4 px-4 py-3 bg-muted/40 border-b border-border text-xs font-semibold text-muted-foreground uppercase tracking-wide",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:126",children:"Export"}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:127",children:"Status"}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:128",children:"Records"}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:129",children:"Date"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Exports.tsx:131",className:"divide-y divide-border",children:r.map(u=>n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:133",className:"grid grid-cols-[2fr_1fr_1fr_1fr] gap-4 px-4 py-4 items-center hover:bg-muted/30 transition-colors",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:134",className:"flex items-center gap-2",children:[n.jsx(hf,{"data-loc":"client/src/pages/client/Exports.tsx:135",className:"w-4 h-4 text-muted-foreground"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:136",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Exports.tsx:137",className:"text-sm font-medium text-foreground",children:u.type}),n.jsx("p",{"data-loc":"client/src/pages/client/Exports.tsx:138",className:"text-xs text-muted-foreground",children:u.filter})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Exports.tsx:141",className:"flex items-center gap-1.5",children:[u.status==="complete"?n.jsx(Kl,{"data-loc":"client/src/pages/client/Exports.tsx:143",className:"w-4 h-4 text-emerald-500"}):n.jsx(jr,{"data-loc":"client/src/pages/client/Exports.tsx:144",className:"w-4 h-4 text-amber-500 animate-pulse"}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:146",className:"text-xs capitalize text-muted-foreground",children:u.status})]}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:148",className:"text-sm text-foreground font-medium",children:u.count.toLocaleString()}),n.jsx("span",{"data-loc":"client/src/pages/client/Exports.tsx:149",className:"text-xs text-muted-foreground",children:u.date.toLocaleDateString()})]},u.id))})]})]})})}function Yy({className:e,onKeyDown:t,onCompositionStart:a,onCompositionEnd:s,...r}){const i=J5(),{onCompositionStart:l,onCompositionEnd:d,onKeyDown:u}=q9({onKeyDown:p=>{const x=p.nativeEvent.isComposing||i.justEndedComposing();p.key==="Enter"&&!p.shiftKey&&x||t?.(p)},onCompositionStart:p=>{i.setComposing(!0),a?.(p)},onCompositionEnd:p=>{i.markCompositionEnd(),setTimeout(()=>{i.setComposing(!1)},100),s?.(p)}});return n.jsx("textarea",{"data-loc":"client/src/components/ui/textarea.tsx:53","data-slot":"textarea",className:Se("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),onCompositionStart:l,onCompositionEnd:d,onKeyDown:u,...r})}var Ky="Tabs",[bSe]=Pn(Ky,[ey]),cW=ey(),[jSe,E4]=bSe(Ky),lW=v.forwardRef((e,t)=>{const{__scopeTabs:a,value:s,onValueChange:r,defaultValue:i,orientation:l="horizontal",dir:d,activationMode:u="automatic",...p}=e,x=Dm(d),[m,h]=Zs({prop:s,onChange:r,defaultProp:i??"",caller:Ky});return n.jsx(jSe,{scope:a,baseId:hn(),value:m,onValueChange:h,orientation:l,dir:x,activationMode:u,children:n.jsx(et.div,{dir:x,"data-orientation":l,...p,ref:t})})});
906lW.displayName=Ky;var oW="TabsList",dW=v.forwardRef((e,t)=>{const{__scopeTabs:a,loop:s=!0,...r}=e,i=E4(oW,a),l=cW(a);return n.jsx(nL,{asChild:!0,...l,orientation:i.orientation,dir:i.dir,loop:s,children:n.jsx(et.div,{role:"tablist","aria-orientation":i.orientation,...r,ref:t})})});dW.displayName=oW;var uW="TabsTrigger",pW=v.forwardRef((e,t)=>{const{__scopeTabs:a,value:s,disabled:r=!1,...i}=e,l=E4(uW,a),d=cW(a),u=xW(l.baseId,s),p=gW(l.baseId,s),x=s===l.value;return n.jsx(sL,{asChild:!0,...d,focusable:!r,active:x,children:n.jsx(et.button,{type:"button",role:"tab","aria-selected":x,"aria-controls":p,"data-state":x?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:u,...i,ref:t,onMouseDown:We(e.onMouseDown,m=>{!r&&m.button===0&&m.ctrlKey===!1?l.onValueChange(s):m.preventDefault()}),onKeyDown:We(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(s)}),onFocus:We(e.onFocus,()=>{const m=l.activationMode!=="manual";!x&&!r&&m&&l.onValueChange(s)})})})});pW.displayName=uW;var fW="TabsContent",mW=v.forwardRef((e,t)=>{const{__scopeTabs:a,value:s,forceMount:r,children:i,...l}=e,d=E4(fW,a),u=xW(d.baseId,s),p=gW(d.baseId,s),x=s===d.value,m=v.useRef(x);return v.useEffect(()=>{const h=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(h)},[]),n.jsx(Hn,{present:r||x,children:({present:h})=>n.jsx(et.div,{"data-state":x?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:p,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:h&&i})})});mW.displayName=fW;function xW(e,t){return`${e}-trigger-${t}`}function gW(e,t){return`${e}-content-${t}`}var wSe=lW,NSe=dW,SSe=pW,CSe=mW;function hm({className:e,...t}){return n.jsx(wSe,{"data-loc":"client/src/components/ui/tabs.tsx:11","data-slot":"tabs",className:Se("flex flex-col gap-2",e),...t})}function vm({className:e,...t}){return n.jsx(NSe,{"data-loc":"client/src/components/ui/tabs.tsx:24","data-slot":"tabs-list",className:Se("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Nn({className:e,...t}){return n.jsx(SSe,{"data-loc":"client/src/components/ui/tabs.tsx:40","data-slot":"tabs-trigger",className:Se("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function Fn({className:e,...t}){return n.jsx(CSe,{"data-loc":"client/src/components/ui/tabs.tsx:56","data-slot":"tabs-content",className:Se("flex-1 outline-none",e),...t})}function ESe({headline:e,subheadline:t,discountCode:a,ctaText:s,countdown:r,dismissText:i}){const[l,d]=v.useState(r*60);v.useEffect(()=>{d(r*60)},[r]),v.useEffect(()=>{const p=setInterval(()=>d(x=>Math.max(0,x-1)),1e3);return()=>clearInterval(p)},[]);const u=p=>`${Math.floor(p/60)}:${String(p%60).padStart(2,"0")}`;return n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:41",className:"relative w-full rounded-xl overflow-hidden flex items-center justify-center",style:{minHeight:360,background:"rgba(0,0,0,0.7)"},children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:43",className:"relative text-center rounded-2xl p-8 w-full max-w-sm mx-4",style:{background:"#0B130A",border:"1px solid rgba(0,230,118,0.25)",boxShadow:"0 0 40px rgba(0,230,118,0.12)"},children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:45",className:"inline-block mb-3 px-3 py-1 rounded-full text-xs font-bold tracking-wider uppercase",style:{background:"rgba(0,230,118,0.12)",border:"1px solid rgba(0,230,118,0.3)",color:"#00E676"},children:"Limited Time Offer"}),n.jsx("h2",{"data-loc":"client/src/pages/client/Popups.tsx:49",className:"text-xl font-extrabold text-white mb-2",children:e||"Wait — Before You Go"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:50",className:"text-sm mb-4",style:{color:"rgba(255,255,255,0.6)"},children:t||"This offer expires soon."}),a&&n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:52",className:"flex items-center justify-between rounded-lg px-4 py-3 mb-3",style:{background:"rgba(0,230,118,0.08)",border:"2px dashed rgba(0,230,118,0.4)"},children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:54",className:"text-left",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:55",className:"text-xs uppercase tracking-wider mb-0.5",style:{color:"rgba(255,255,255,0.4)"},children:"Discount Code"}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:56",className:"text-lg font-extrabold tracking-widest",style:{color:"#00E676"},children:a})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:58",className:"text-xs font-semibold px-2 py-1 rounded",style:{background:"rgba(0,230,118,0.15)",color:"#00E676"},children:"Copy"})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Popups.tsx:62",className:"text-xs mb-4",style:{color:"rgba(255,255,255,0.45)"},children:["Expires in ",n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:63",className:"font-bold",style:{color:"#00E676"},children:u(l)})]}),n.jsx("button",{"data-loc":"client/src/pages/client/Popups.tsx:65",className:"w-full py-3 rounded-xl font-extrabold text-sm mb-3",style:{background:"linear-gradient(135deg, #00E676, #00C853)",color:"#0B130A"},children:s||"Claim My Discount"}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:69",className:"text-xs underline",style:{color:"rgba(255,255,255,0.3)"},children:i||"No thanks"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:71",className:"absolute top-2 left-2 text-xs px-2 py-0.5 rounded bg-black/40 text-white/50",children:"Preview"})]})}function ASe({position:e,payouts:t}){const a=t.filter(d=>d.isActive),[s,r]=v.useState(0);v.useEffect(()=>{if(!a.length)return;const d=setInterval(()=>r(u=>(u+1)%a.length),3e3);return()=>clearInterval(d)},[a.length]);const i=a[s%Math.max(a.length,1)],l=d=>
906"$"+(d/100).toLocaleString("en-US");return n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:91",className:"relative w-full rounded-xl overflow-hidden",style:{minHeight:140,background:"#f0f0f0"},children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:92",className:"absolute inset-0 flex items-end p-3",style:{justifyContent:e==="bottom_right"?"flex-end":"flex-start"},children:a.length?i?n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:100",className:"flex items-center gap-3 rounded-xl px-4 py-3 w-60",style:{background:"#0B130A",border:"1px solid rgba(0,230,118,0.2)"},children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:102",className:"w-8 h-8 rounded-full flex items-center justify-center text-base flex-shrink-0",style:{background:"rgba(0,230,118,0.12)"},children:i.countryFlag||"💰"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:104",className:"flex-1 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:105",className:"text-xs font-bold text-white truncate",children:i.traderName}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:106",className:"text-sm font-extrabold",style:{color:"#00E676"},children:l(i.amount)})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:108",className:"text-xs font-bold px-1.5 py-0.5 rounded flex-shrink-0",style:{background:"rgba(0,230,118,0.15)",color:"#00E676"},children:"✓"})]}):null:n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:95",className:"rounded-xl px-4 py-3 text-xs text-center w-60",style:{background:"#0B130A",border:"1px solid rgba(0,230,118,0.2)",color:"rgba(255,255,255,0.4)"},children:"Add payout entries to preview"})}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:113",className:"absolute top-2 left-2 text-xs px-2 py-0.5 rounded bg-black/40 text-white/50",children:"Preview"})]})}function DSe({popup:e,onDelete:t,onToggle:a}){const[,s]=La(),r=e.status==="active";return n.jsx(Ke,{"data-loc":"client/src/pages/client/Popups.tsx:126",className:"hover:shadow-md transition-shadow",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Popups.tsx:127",className:"p-5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:128",className:"flex items-start justify-between gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:129",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:130",className:"flex items-center gap-2 mb-1",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/Popups.tsx:131",className:"font-semibold text-sm truncate",children:e.name}),n.jsx(Le,{"data-loc":"client/src/pages/client/Popups.tsx:132",variant:r?"default":"secondary",className:"text-xs shrink-0",children:r?"Active":"Draft"}),e.generatedHtml&&n.jsxs(Le,{"data-loc":"client/src/pages/client/Popups.tsx:136",variant:"outline",className:"text-xs shrink-0 gap-1",children:[n.jsx(qr,{"data-loc":"client/src/pages/client/Popups.tsx:137",className:"w-2.5 h-2.5"})," AI"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:141",className:"flex items-center gap-4 text-xs text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Popups.tsx:142",className:"flex items-center gap-1",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Popups.tsx:143",className:"w-3 h-3"})," ",e.stats?.views??0," views"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Popups.tsx:145",className:"flex items-center gap-1",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Popups.tsx:146",className:"w-3 h-3"})," ",e.stats?.submissions??0," leads"]}),(e.stats?.views??0)>0&&n.jsxs("span",{"data-loc":"client/src/pages/client/Popups.tsx:149",className:"flex items-center gap-1",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/Popups.tsx:150",className:"w-3 h-3"}),((e.stats?.submissions??0)/(e.stats?.views??1)*100).toFixed(1),"% CVR"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:155",className:"flex items-center gap-1.5 mt-2 text-xs text-muted-foreground",children:[e.triggerType==="exit_intent"&&n.jsxs(n.Fragment,{children:[n.jsx(Ic,{"data-loc":"client/src/pages/client/Popups.tsx:156",className:"w-3 h-3"})," Exit Intent"]}),e.triggerType==="time_delay"&&n.jsxs(n.Fragment,{children:[n.jsx(jr,{"data-loc":"client/src/pages/client/Popups.tsx:157",className:"w-3 h-3"})," ",e.triggerValue,"s delay"]}),e.triggerType==="scroll"&&n.jsxs(n.Fragment,{children:[n.jsx(_n,{"data-loc":"client/src/pages/client/Popups.tsx:158",className:"w-3 h-3"})," ",e.triggerValue,"% scroll"]}),e.triggerType==="manual"&&n.jsxs(n.Fragment,{children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/Popups.tsx:159",className:"w-3 h-3"})," Always show"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:163",className:"flex items-center gap-1 shrink-0",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:164",variant:"ghost",size:"sm",onClick:()=>s(`/popups/${e.id}/edit`),className:"h-8 w-8 p-0",children:n.jsx(mr,{"data-loc":"client/src/pages/client/Popups.tsx:165",className:"w-3.5 h-3.5"})}),n.jsxs(xr,{"data-loc":"client/src/pages/client/Popups.tsx:167",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Popups.tsx:168",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:169",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Popups.tsx:170",className:"w-3.5 h-3.5"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Popups.tsx:173",align:"end",children:[n.jsx(ca,{"data-loc":"client/src/pages/client/Popups.tsx:174",onClick:a,children:r?n.jsxs(n.Fragment,{children:[n.jsx(a9,{"data-loc":"client/src/pages/client/Popups.tsx:175",className:"w-4 h-4 mr-2"})," Set to Draft"]}):n.jsxs(n.Fragment,{children:[n.jsx(n9,{"data-loc":"client/src/pages/client/Popups.tsx:175",className:"w-4 h-4 mr-2"})," Activate"]})}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Popups.tsx:177",onClick:()=>s(`/popups/${e.id}/edit`),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Popups.tsx:178",className:"w-4 h-4 mr-2"})," Edit"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Popups.tsx:180",onClick:t,className:"text-destructive focus:text-destructive",children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Popups.tsx:181",className:"w-4 h-4 mr-2"})," Delete"]})]})]})]})]})})})}function OSe(){const[,e]=La(),{data:t,isLoading:a,refetch:s}=le.leadPopups.list.useQuery(),r=le.leadPopups.create.useMutation({onSuccess:X=>{u(!1),x(""),s(),X?.id&&e(`/popups/${X.id}/edit`)},onError:X=>ne.error(X.message)}),i=le.leadPopups.update.useMutation({onSuccess:()=>{ne.success("Updated"),s()},onError:X=>ne.error(X.message)}),l=le.leadPopups.delete.useMutation({onSuccess:()=>{ne.success("Deleted"),s()},onError:X=>ne.error(X.message)}),[d,u]=v.useState(!1),[p,x]=v.useState(""),{data:m,isLoading:h,refetch:y}
906=le.spinWheel.list.useQuery(),w=le.spinWheel.create.useMutation({onSuccess:X=>{y(),X?.id&&e(`/popups/spin/${X.id}`)},onError:X=>ne.error(X.message)}),b=le.spinWheel.delete.useMutation({onSuccess:()=>{ne.success("Deleted"),y()},onError:X=>ne.error(X.message)}),j=le.spinWheel.update.useMutation({onSuccess:()=>{ne.success("Updated"),y()},onError:X=>ne.error(X.message)}),[S,O]=v.useState(!1),[A,k]=v.useState(""),{data:E,isLoading:D,refetch:_}=le.widgets.getConfig.useQuery(),{data:T,isLoading:I,refetch:$}=le.widgets.listPayouts.useQuery(),[R,B]=v.useState(!1),[Y,z]=v.useState("Wait — Before You Go"),[Q,L]=v.useState("This offer expires in 10 minutes."),[M,U]=v.useState("NLFEXIT20"),[Z,ie]=v.useState("Get 20% OFF your first evaluation"),[G,F]=v.useState("Claim My Discount"),[H,q]=v.useState(""),[J,ce]=v.useState(10),[se,ye]=v.useState("No thanks, I'll pay full price"),[de,ve]=v.useState(!1),[Pe,ue]=v.useState(45),[Qe,Ue]=v.useState("bottom_left");v.useEffect(()=>{E&&(B(E.exitPopupEnabled??!1),z(E.exitPopupHeadline??"Wait — Before You Go"),L(E.exitPopupSubheadline??"This offer expires in 10 minutes."),U(E.exitPopupDiscountCode??"NLFEXIT20"),ie(E.exitPopupDiscountLabel??"Get 20% OFF your first evaluation"),F(E.exitPopupCtaText??"Claim My Discount"),q(E.exitPopupCtaUrl??""),ce(E.exitPopupCountdownMinutes??10),ye(E.exitPopupDismissText??"No thanks, I'll pay full price"),ve(E.payoutToastEnabled??!1),ue(E.payoutToastIntervalSeconds??45),Ue(E.payoutToastPosition??"bottom_left"))},[E]);const xe=le.widgets.saveConfig.useMutation({onSuccess:()=>{ne.success("Widget settings saved"),_()},onError:X=>ne.error(X.message)}),$e=le.widgets.addPayout.useMutation({onSuccess:()=>{ne.success("Payout entry added"),$(),me(!1),Zt()},onError:X=>ne.error(X.message)}),Te=le.widgets.updatePayout.useMutation({onSuccess:()=>{ne.success("Updated"),$()},onError:X=>ne.error(X.message)}),dt=le.widgets.deletePayout.useMutation({onSuccess:()=>{ne.success("Deleted"),$()},onError:X=>ne.error(X.message)}),[tt,me]=v.useState(!1),[ut,pt]=v.useState(""),[ft,_t]=v.useState(""),[da,vt]=v.useState(""),[Xt,Ct]=v.useState("");function Zt(){pt(""),_t(""),vt(""),Ct("")}function xa(){const X=Math.round(parseFloat(ft.replace(/[^0-9.]/g,""))*100);if(!ut||isNaN(X)||X<=0){ne.error("Enter a valid name and amount");return}$e.mutate({traderName:ut,amount:X,country:da||void 0,countryFlag:Xt||void 0})}function Sa(){xe.mutate({exitPopupEnabled:R,exitPopupHeadline:Y,exitPopupSubheadline:Q,exitPopupDiscountCode:M,exitPopupDiscountLabel:Z,exitPopupCtaText:G,exitPopupCtaUrl:H,exitPopupCountdownMinutes:J,exitPopupDismissText:se,payoutToastEnabled:de,payoutToastIntervalSeconds:Pe,payoutToastPosition:Qe})}const Da=E?.tenantId??T?.[0]?.tenantId,Va=Da?`<script src="https://app.boostiko.com/widget.js" data-tenant="${Da}"><\/script>`:'<script src="https://app.boostiko.com/widget.js" data-tenant="YOUR_TENANT_ID"><\/script>';return n.jsxs(Pt,{"data-loc":"client/src/pages/client/Popups.tsx:311",title:"Popups & Widgets",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:312",className:"p-6 max-w-7xl mx-auto space-y-5",children:n.jsxs(hm,{"data-loc":"client/src/pages/client/Popups.tsx:313",defaultValue:"lead-capture",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:314",className:"flex items-start justify-between gap-4 mb-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:315",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Popups.tsx:316",className:"text-xl font-semibold text-foreground",children:"Popups & Widgets"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:317",className:"text-sm text-muted-foreground mt-0.5",children:"Capture leads and show social proof on your website."})]}),n.jsxs(vm,{"data-loc":"client/src/pages/client/Popups.tsx:319",children:[n.jsxs(Nn,{"data-loc":"client/src/pages/client/Popups.tsx:320",value:"lead-capture",className:"text-xs",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Popups.tsx:321",className:"w-3.5 h-3.5 mr-1.5"})," Lead Capture"]}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Popups.tsx:323",value:"spin-w
906heel",className:"text-xs",children:[n.jsx(C1,{"data-loc":"client/src/pages/client/Popups.tsx:324",className:"w-3.5 h-3.5 mr-1.5"})," Spin Wheel"]}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Popups.tsx:326",value:"widgets",className:"text-xs",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/Popups.tsx:327",className:"w-3.5 h-3.5 mr-1.5"})," Widgets"]})]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Popups.tsx:333",value:"lead-capture",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:334",className:"flex items-center justify-between",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:335",className:"text-sm text-muted-foreground",children:"Create embeddable popups that collect visitor emails and add them to your contact list."}),n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:338",size:"sm",onClick:()=>u(!0),className:"gap-1.5 shrink-0",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Popups.tsx:339",className:"w-4 h-4"})," New Popup"]})]}),a?n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:344",className:"space-y-3",children:[1,2].map(X=>n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:345",className:"h-24 rounded-xl bg-muted animate-pulse"},X))}):t?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:359",className:"space-y-3",children:t.map(X=>n.jsx(DSe,{"data-loc":"client/src/pages/client/Popups.tsx:361",popup:X,onDelete:()=>l.mutate({id:X.id}),onToggle:()=>i.mutate({id:X.id,data:{status:X.status==="active"?"draft":"active"}})},X.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:348",className:"border border-dashed rounded-xl py-16 text-center",children:[n.jsx(Ic,{"data-loc":"client/src/pages/client/Popups.tsx:349",className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:350",className:"text-sm font-medium",children:"No popups yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:351",className:"text-xs text-muted-foreground mt-1 mb-5 max-w-xs mx-auto",children:"Create your first lead-capture popup to start collecting visitor emails."}),n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:354",size:"sm",onClick:()=>u(!0),className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Popups.tsx:355",className:"w-4 h-4"})," Create your first popup"]})]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Popups.tsx:373",value:"spin-wheel",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:374",className:"flex items-center justify-between",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:375",className:"text-sm text-muted-foreground",children:"Gamified spin wheel popups — visitors enter their email and spin to win a prize. Every entry wins."}),n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:378",size:"sm",onClick:()=>O(!0),className:"gap-1.5 shrink-0",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Popups.tsx:379",className:"w-4 h-4"})," New Spin Wheel"]})]}),h?n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:384",className:"space-y-3",children:[1,2].map(X=>n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:385",className:"h-24 rounded-xl bg-muted animate-pulse"},X))}):m?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:399",className:"space-y-3",children:m.map(X=>n.jsx(Ke,{"data-loc":"client/src/pages/client/Popups.tsx:401",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Popups.tsx:402",className:"p-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:403",className:"flex items-center justify-between gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:404",className:"flex items-center gap-3 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:405",className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center flex-shrink-0",children:n.jsx(C1,{"data-loc":"client/src/pages/client/Popups.tsx:406",className:"w-4 h-4 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:408",className:"min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:409",className:"flex items-center gap-2",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:410",className:"font-medium text-sm truncate",children:X.name}),n.jsx(Le,{"data-loc":"client/src/pages/client/Popups.tsx:411",variant:X.status==="active"?"default":"secondary",className:"text-xs",children:X.status==="active"?"Active":"Draft"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:415",className:"flex items-center gap-3 mt-0.5 text-xs text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Popups.tsx:416",className:"flex items-center gap-1",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Popups.tsx:416",className:"w-3 h-3"})," ",X.totalSpins??0," spins"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Popups.tsx:417",children:[X.prizes?.length??0," prizes"]})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:421",className:"flex items-center gap-2 flex-shrink-0",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:422",variant:"outline",size:"sm",onClick:()=>e(`/popups/spin/${X.id}`),children:[n.jsx(mr,{"data-loc":"client/src/pages/client/Popups.tsx:423",className:"w-3.5 h-3.5 mr-1.5"})," Edit"]}),n.jsxs(xr,{"data-loc":"client/src/pages/client/Popups.tsx:425",children:[n.jsx(gr,{"data-loc":"client/src/pages/client/Popups.tsx:426",asChild:!0,children:n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:427",variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:n.jsx(Li,{"data-loc":"client/src/pages/client/Popups.tsx:428",className:"w-4 h-4"})})}),n.jsxs(hr,{"data-loc":"client/src/pages/client/Popups.tsx:431",align:"end",children:[n.jsxs(ca,{"data-loc":"client/src/pages/client/Popups.tsx:432",onClick:()=>j.mutate({id:X.id,status:X.status==="active"?"draft":"active"}),children:[X.status==="active"?n.jsx(a9,{"data-loc":"client/src/pages/client/Popups.tsx:433",className:"w-4 h-4 mr-2"}):n.jsx(n9,{"data-loc":"client/src/pages/client/Popups.tsx:433",className:"w-4 h-4 mr-2"}),X.status==="active"?"Deactivate":"Activate"]}),n.jsxs(ca,{"data-loc":"client/src/pages/client/Popups.tsx:436",className:"text-destructive",onClick:()=>b.mutate({id:X.id}),children:[n.jsx(Ua,{"data-loc":"client/src/pages/client/Popups.tsx:437",className:"w-4 h-4 mr-2"})," Delete"]})]})]})]})]})})},X.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:388",className:"border border-dashed rounded-xl py-16 text-center",children:[n.jsx(C1,{"data-loc":"client/src/pages/client/Popups.tsx:389",className:"w-10 h-10 text-muted-foreground mx-auto mb-3"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:390",className:"text-sm font-medium",children:"No spin wheels yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:391",className:"text-xs text-muted-foreground mt-1 mb-5 max-w-xs mx-auto",children:"Create a gamified spin wheel to capture leads and reward visitors with prizes."}),n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:394",size:"sm",onClick:()=>O(!0),className:"gap-1.5",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Popups.tsx:395",className:"w-4 h-4"})," Create your first spin wheel"]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/Popups.tsx:450",open:S,onOpenChange:O,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Popups.tsx:451",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Popups.tsx:452",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Popups.tsx:453",children:"New Spin Wheel"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:455",className:"py-2",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:456",className:"text-sm mb-1.5 block",children:"Wheel Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:457",placeholder:"e.g. NLF Spin to Win",value:A,onChange:X=>k(X.target.value),onKeyDown:X=>X.key==="Enter"&&A.trim()&&w.mutate({name:A.trim()}),autoFocus:!0})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Popups.tsx:465",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:466",variant:"outline",onClick:()=>O(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:467",onClick:()=>w.mutate({name:A.trim()}),disabled:!A.trim()||w.isPending,children:w.isPending?"Creating...":"Create & Edit"})]})]})})]}),n.jsx(Fn,{"data-loc":"client/src/pages/client/Popups.tsx:479",value:"widgets",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:480",className:"grid grid-cols-1 xl:grid-cols-[1fr_380px] gap-6 items-start",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:481",className:"space-y-5",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/client/Popups.tsx:483",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Popups.tsx:484",className:"pb-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:485",className:"flex items-center gap-2",children:[n.jsx(FI,{"data-loc":"client/src/pages/client/Popups.tsx:486",className:"h-4 w-4 text-primary"}),n.jsx(St,{"data-loc":"client/src/pages/client/Popups.tsx:487",className:"text-sm font-semibold",children:"Embed Code"})]}),n.jsxs(j1,{"data-loc":"client/src/pages/client/Popups.tsx:489",className:"text-xs",children:["Paste before the closing ",n.jsx("code",{"data-loc":"client/src/pages/client/Popups.tsx:489",children:"</body>"})," tag."]})]}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Popups.tsx:491",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:492",className:"flex items-center gap-2 bg-muted rounded-lg p-3 font-mono text-xs overflow-x-auto",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Popups.tsx:493",className:"flex-1 whitespace-nowrap",children:Va}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:494",variant:"ghost",size:"sm",onClick:()=>{navigator.clipboard?.writeText(Va),ne.success("Copied!")},className:"shrink-0",children:n.jsx(Ra,{"data-loc":"client/src/pages/client/Popups.tsx:495",className:"h-3.5 w-3.5"})})]})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Popups.tsx:502",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Popups.tsx:503",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:504",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:505",className:"flex items-center gap-2",children:[n.jsx(Ic,{"data-loc":"client/src/pages/client/Popups.tsx:506",className:"h-4 w-4 text-orange-500"}),n.jsx(St,{"data-loc":"client/src/pages/client/Popups.tsx:507",className:"text-sm font-semibold",children:"Exit-Intent Discount Popup"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Popups.tsx:508",variant:R?"default":"secondary",className:"text-xs",children:R?"Active":"Disabled"})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Popups.tsx:510",checked:R,onCheckedChange:B})]}),n.jsx(j1,{"data-loc":"client/src/pages/client/Popups.tsx:512",className:"text-xs",children:"Shows a discount code when visitor moves cursor toward the browser bar."})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Popups.tsx:514",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:515",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:516",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:517",className:"text-xs",children:"Headline"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:518",value:Y,onChange:X=>z(X.target.value),className:"text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:520",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:521",className:"text-xs",children:"Discount Code"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:522",value:M,onChange:X=>U(X.target.value),className:"font-mono uppercase text-sm"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:525",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:526",className:"text-xs",children:"Subheadline / Offer Description"}),n.jsx(Yy,{"data-loc":"client/src/pages/client/Popups.tsx:527",value:Q,onChange:X=>L(X.target.value),rows:2,className:"text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:529",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:530",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:531",className:"text-xs",children:"CTA Button Text"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:532",value:G,onChange:X=>F(X.target.value),className:"text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:534",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:535",className:"text-xs",children:"CTA Button URL"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:536",value:H,onChange:X=>
906q(X.target.value),placeholder:"https://nextlevelfunded.com/challenges",className:"text-sm"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:539",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:540",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:541",className:"text-xs",children:"Countdown Timer (minutes)"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:542",type:"number",min:1,max:60,value:J,onChange:X=>ce(parseInt(X.target.value)||10),className:"text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:544",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:545",className:"text-xs",children:"Dismiss Link Text"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:546",value:se,onChange:X=>ye(X.target.value),className:"text-sm"})]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Popups.tsx:553",children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Popups.tsx:554",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:555",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:556",className:"flex items-center gap-2",children:[n.jsx(mf,{"data-loc":"client/src/pages/client/Popups.tsx:557",className:"h-4 w-4 text-green-500"}),n.jsx(St,{"data-loc":"client/src/pages/client/Popups.tsx:558",className:"text-sm font-semibold",children:"Live Payout Toast"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Popups.tsx:559",variant:de?"default":"secondary",className:"text-xs",children:de?"Active":"Disabled"})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Popups.tsx:561",checked:de,onCheckedChange:ve})]}),n.jsx(j1,{"data-loc":"client/src/pages/client/Popups.tsx:563",className:"text-xs",children:"Bottom-corner notification showing recent trader payouts."})]}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Popups.tsx:565",className:"space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:566",className:"grid grid-cols-2 gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:567",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:568",className:"text-xs",children:"Rotation Interval (seconds)"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:569",type:"number",min:5,max:300,value:Pe,onChange:X=>ue(parseInt(X.target.value)||45),className:"text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:571",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:572",className:"text-xs",children:"Position"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/Popups.tsx:573",value:Qe,onValueChange:X=>Ue(X),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Popups.tsx:574",className:"text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Popups.tsx:574"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Popups.tsx:575",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Popups.tsx:576",value:"bottom_left",children:"Bottom Left"}),n.jsx(he,{"data-loc":"client/src/pages/client/Popups.tsx:577",value:"bottom_right",children:"Bottom Right"})]})]})]})]}),n.jsx(OF,{"data-loc":"client/src/pages/client/Popups.tsx:582"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:583",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:584",className:"flex items-center justify-between",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Popups.tsx:585",className:"text-xs font-semibold",children:["Payout Entries (",T?.length??0,")"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Popups.tsx:586",size:"sm",variant:"outline",onClick:()=>me(!0),className:"h-7 text-xs",children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Popups.tsx:587",className:"h-3 w-3 mr-1"})," Add Entry"]})]}),I?n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:590",className:"text-sm text-muted-foreground",children:"Loading…"}):T?.length?n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:596",className:"space-y-2",children:T.map(X=>n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:598",className:"flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/40 transition-colors",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:599",className:"text-xl",children:X.countryFlag||"💰"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:600",className:"flex-1 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:601",className:"font-medium text-sm",children:X.traderName}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:602",className:"text-xs text-muted-foreground",children:["$",(X.amount/100).toLocaleStr
906ing()," ",X.country?`· ${X.country}`:""]})]}),n.jsx(Ti,{"data-loc":"client/src/pages/client/Popups.tsx:604",checked:X.isActive,onCheckedChange:Re=>Te.mutate({id:X.id,isActive:Re})}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:605",variant:"ghost",size:"sm",onClick:()=>dt.mutate({id:X.id}),className:"text-destructive hover:text-destructive h-7 w-7 p-0",children:n.jsx(Ua,{"data-loc":"client/src/pages/client/Popups.tsx:606",className:"h-3.5 w-3.5"})})]},X.id))}):n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:591",className:"border border-dashed rounded-lg p-5 text-center",children:[n.jsx(Ii,{"data-loc":"client/src/pages/client/Popups.tsx:592",className:"h-6 w-6 text-muted-foreground mx-auto mb-2"}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:593",className:"text-sm text-muted-foreground",children:"No payout entries yet."})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:613",onClick:Sa,disabled:xe.isPending||D,size:"sm",className:"w-full",children:xe.isPending?"Saving…":"Save Widget Settings"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:621",className:"space-y-4 xl:sticky xl:top-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:622",className:"flex items-center gap-2",children:[n.jsx(la,{"data-loc":"client/src/pages/client/Popups.tsx:623",className:"h-4 w-4 text-primary"}),n.jsx("h2",{"data-loc":"client/src/pages/client/Popups.tsx:624",className:"text-sm font-semibold",children:"Live Preview"})]}),n.jsxs(hm,{"data-loc":"client/src/pages/client/Popups.tsx:626",defaultValue:"popup",children:[n.jsxs(vm,{"data-loc":"client/src/pages/client/Popups.tsx:627",className:"w-full",children:[n.jsxs(Nn,{"data-loc":"client/src/pages/client/Popups.tsx:628",value:"popup",className:"flex-1 text-xs",children:[n.jsx(Ic,{"data-loc":"client/src/pages/client/Popups.tsx:628",className:"h-3.5 w-3.5 mr-1.5"})," Exit Popup"]}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Popups.tsx:629",value:"toast",className:"flex-1 text-xs",children:[n.jsx(mf,{"data-loc":"client/src/pages/client/Popups.tsx:629",className:"h-3.5 w-3.5 mr-1.5"})," Payout Toast"]})]}),n.jsx(Fn,{"data-loc":"client/src/pages/client/Popups.tsx:631",value:"popup",className:"mt-3",children:n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:632",className:"rounded-xl overflow-hidden border",children:n.jsx(ESe,{"data-loc":"client/src/pages/client/Popups.tsx:633",headline:Y,subheadline:Q,discountCode:M,ctaText:G,countdown:J,dismissText:se})})}),n.jsx(Fn,{"data-loc":"client/src/pages/client/Popups.tsx:636",value:"toast",className:"mt-3",children:n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:637",className:"rounded-xl overflow-hidden border",children:n.jsx(ASe,{"data-loc":"client/src/pages/client/Popups.tsx:638",position:Qe,payouts:T??[]})})})]})]})]})})]})}),n.jsx(qa,{"data-loc":"client/src/pages/client/Popups.tsx:649",open:d,onOpenChange:u,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Popups.tsx:650",className:"max-w-sm",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Popups.tsx:651",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Popups.tsx:652",children:"Create New Popup"})}),n.jsx("div",{"data-loc":"client/src/pages/client/Popups.tsx:654",className:"space-y-3 py-2",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:655",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:656",children:"Popup Name"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:657",value:p,onChange:X=>x(X.target.value),placeholder:"e.g. Homepage Lead Capture",onKeyDown:X=>X.key==="Enter"&&p.trim()&&r.mutate({name:p.trim()})}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:663",className:"text-xs text-muted-foreground",children:"Internal name — visitors won't see this."})]})}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Popups.tsx:666",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:667",variant:"outline",onClick:()=>u(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:668",onClick:()=>r.mutate({name:p.trim()}),disabled:!p.trim()||r.isPending,children:r.isPending?"Creating…":"Create & Edit"})]})]})}),n.jsx(qa,{"data-loc":"client/src/pages/client/Popups.tsx:679",open:tt,onOpenChange:me,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Popups.tsx:680",className:"max-w-sm",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Popups.tsx:681",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Popups.tsx:681",children:"Add Payout Entry"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:682",className:"space-y-4 py-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:683",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Popups.tsx:684",children:["Trader Name ",n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:684",className:"text-muted-foreground text-xs",children:"(partial for privacy)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:685",value:ut,onChange:X=>pt(X.target.value),placeholder:"Marcus W."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:687",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Popups.tsx:688",children:"Payout Amount (USD)"}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:689",value:ft,onCh
vendor: 4,469 bytes, line 906
906ange:X=>_t(X.target.value),placeholder:"4775",type:"number",min:1}),n.jsx("p",{"data-loc":"client/src/pages/client/Popups.tsx:690",className:"text-xs text-muted-foreground",children:"Enter dollar amount (e.g. 4775 for $4,775)"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:692",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:693",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Popups.tsx:694",children:["Country ",n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:694",className:"text-muted-foreground text-xs",children:"(optional)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:695",value:da,onChange:X=>vt(X.target.value),placeholder:"Sweden"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Popups.tsx:697",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Popups.tsx:698",children:["Flag Emoji ",n.jsx("span",{"data-loc":"client/src/pages/client/Popups.tsx:698",className:"text-muted-foreground text-xs",children:"(optional)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/Popups.tsx:699",value:Xt,onChange:X=>Ct(X.target.value),placeholder:"🇸🇪"})]})]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Popups.tsx:703",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:704",variant:"outline",onClick:()=>me(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Popups.tsx:705",onClick:xa,disabled:$e.isPending,children:$e.isPending?"Adding…":"Add Entry"})]})]})})]})}var Qy="Collapsible",[kSe]=Pn(Qy),[_Se,A4]=kSe(Qy),hW=v.forwardRef((e,t)=>{const{__scopeCollapsible:a,open:s,defaultOpen:r,disabled:i,onOpenChange:l,...d}=e,[u,p]=Zs({prop:s,defaultProp:r??!1,onChange:l,caller:Qy});return n.jsx(_Se,{scope:a,disabled:i,contentId:hn(),open:u,onOpenToggle:v.useCallback(()=>p(x=>!x),[p]),children:n.jsx(et.div,{"data-state":O4(u),"data-disabled":i?"":void 0,...d,ref:t})})});hW.displayName=Qy;var vW="CollapsibleTrigger",yW=v.forwardRef((e,t)=>{const{__scopeCollapsible:a,...s}=e,r=A4(vW,a);return n.jsx(et.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":O4(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...s,ref:t,onClick:We(e.onClick,r.onOpenToggle)})});yW.displayName=vW;var D4="CollapsibleContent",bW=v.forwardRef((e,t)=>{const{forceMount:a,...s}=e,r=A4(D4,e.__scopeCollapsible);return n.jsx(Hn,{present:a||r.open,children:({present:i})=>n.jsx(TSe,{...s,ref:t,present:i})})});bW.displayName=D4;var TSe=v.forwardRef((e,t)=>{const{__scopeCollapsible:a,present:s,children:r,...i}=e,l=A4(D4,a),[d,u]=v.useState(s),p=v.useRef(null),x=kt(t,p),m=v.useRef(0),h=m.current,y=v.useRef(0),w=y.current,b=l.open||d,j=v.useRef(b),S=v.useRef(void 0);return v.useEffect(()=>{const O=requestAnimationFrame(()=>j.current=!1);return()=>cancelAnimationFrame(O)},[]),on(()=>{const O=p.current;if(O){S.current=S.current||{transitionDuration:O.style.transitionDuration,animationName:O.style.animationName},O.style.transitionDuration="0s",O.style.animationName="none";const A=O.getBoundingClientRect();m.current=A.height,y.current=A.width,j.current||(O.style.transitionDuration=S.current.transitionDuration,O.style.animationName=S.current.animationName),u(s)}},[l.open,s]),n.jsx(et.div,{"data-state":O4(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!b,...i,ref:x,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:b&&r})});function O4(e){return e?"open":"closed"}var PSe=hW;function E7({...e}){return n.jsx(PSe,{"data-loc":"client/src/components/ui/collapsible.tsx:6","data-slot":"collapsible",...e})}function A7({...e}){return n.jsx(yW,{"data-loc":"client/src/components/ui/collapsible.tsx:13","data-slot":"collapsible-trigger",...e})}function D7({...e}){return n.jsx(bW,{"data-loc":"client/src/components/ui/collapsible.tsx:24","data-slot":"collapsible-content",...e})}const MSe=["Create a dark, modern exit-intent popup for a prop trading firm. Use green neon accents. Offer 20% off with code TRADE20. Include email and first name fields.","Make a minimalist white popup with orange CTA button. Headline: 'Get Early Access'. Collect email only. Clean, professional look.","Design a bold popup with a gradient background (dark blue to purple). For a crypto trading platform. Include email and ph
906one fields.","Create an urgent popup with a countdown feel. Red and black color scheme. 'Limited spots available' messaging. Email only."];function RSe(){const[,e]=p9("/popups/:id/edit"),[,t]=La(),a=e?.id?parseInt(e.id):0,[s,r]=v.useState([]),[i,l]=v.useState(""),[d,u]=v.useState(null),[p,x]=v.useState(!1),[m,h]=v.useState(!1),[y,w]=v.useState(!1),b=v.useRef(null),{data:j,refetch:S}=le.leadPopups.get.useQuery({id:a},{enabled:!!a}),O=le.leadPopups.update.useMutation(),A=le.leadPopups.generatePopup.useMutation();v.useEffect(()=>{j&&(j.conversationHistory&&Array.isArray(j.conversationHistory)&&r(j.conversationHistory),j.generatedHtml&&u(j.generatedHtml))},[j?.id]),v.useEffect(()=>{b.current?.scrollIntoView({behavior:"smooth"})},[s]);const k=async R=>{const B=(R??i).trim();if(!B||A.isPending)return;const Y=[...s,{role:"user",content:B}];r(Y),l("");try{const z=await A.mutateAsync({popupId:a,messages:Y}),Q={role:"assistant",content:"Here's your popup! It's rendered in the preview on the right. Let me know if you'd like any changes — colors, copy, layout, anything."};r([...Y,Q]),u(z.generatedHtml)}catch(z){ne.error("Failed to generate popup: "+(z.message??"Unknown error")),r(s)}},E=R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),k())},D=async R=>{await O.mutateAsync({id:a,data:{status:R}}),S(),ne.success(R==="active"?"Popup is now live!":"Popup set to draft.")},_=async R=>{await O.mutateAsync({id:a,data:{triggerType:R}}),ne.success("Trigger updated.")},T=`<script src="https://app.boostiko.com/popup-widget.js" data-tenant="${j?.tenantId}" data-popup="${a}"><\/script>`,I=()=>{navigator.clipboard.writeText(T),w(!0),setTimeout(()=>w(!1),2e3)},$=s.length===0;return n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:130",className:"flex flex-col h-screen bg-background",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:132",className:"flex items-center justify-between px-4 py-3 border-b bg-background/95 backdrop-blur-sm sticky top-0 z-10",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:133",className:"flex items-center gap-3",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:134",variant:"ghost",size:"sm",onClick:()=>t("/popups"),className:"gap-1.5",children:[n.jsx(rs,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:135",className:"w-4 h-4"}),"Back"]}),n.jsx(OF,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:138",orientation:"vertical",className:"h-5"}),n.jsx("span",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:139",className:"font-semibold text-sm",children:j?.name??"Loading..."}),j&&n.jsx(Le,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:141",variant:j.status==="active"?"default":"secondary",className:"text-xs",children:j.status==="active"?"Live":"Draft"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:146",className:"flex items-center gap-2",children:n.jsxs(mt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:147",value:j?.status??"draft",onValueChange:R=>D(R),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:151",className:"w-28 h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:152"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:154",children:[n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:155",value:"draft",children:"Draft"}),n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:156",value:"active",children:"Active"})]})]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:163",className:"flex flex-1 overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:165",className:"flex flex-col w-[420px] min-w-[340px] border-r bg-background",children:[n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:167",className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:$?n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:169",className:"flex flex-col items-center justify-center h-full gap-6 text-center px-4",children:[n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:170",className:"w-14 h-14 roun
906ded-2xl bg-primary/10 flex items-center justify-center",children:n.jsx(qr,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:171",className:"w-7 h-7 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:173",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:174",className:"font-semibold text-base mb-1",children:"AI Popup Designer"}),n.jsx("p",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:175",className:"text-sm text-muted-foreground leading-relaxed",children:"Describe the popup you want and I'll design it for you. You can iterate as many times as you like."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:179",className:"w-full space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:180",className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:"Try these prompts"}),MSe.map((R,B)=>n.jsx("button",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:182",onClick:()=>k(R),disabled:A.isPending,className:"w-full text-left text-xs p-3 rounded-lg border border-border hover:border-primary/50 hover:bg-primary/5 transition-all duration-150 text-muted-foreground hover:text-foreground leading-relaxed disabled:opacity-50",children:R},B))]})]}):n.jsxs(n.Fragment,{children:[s.map((R,B)=>n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:196",className:`flex gap-3 ${R.role==="user"?"justify-end":"justify-start"}`,children:[R.role==="assistant"&&n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:198",className:"w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:n.jsx(qr,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:199",className:"w-3.5 h-3.5 text-primary"})}),n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:202",className:`max-w-[85%] rounded-2xl px-4 py-2.5 text-sm leading-relaxed ${R.role==="user"?"bg-primary text-primary-foreground rounded-tr-sm":"bg-muted text-foreground rounded-tl-sm"}`,children:R.content})]},B)),A.isPending&&n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:214",className:"flex gap-3 justify-start",children:[n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:215",className:"w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:n.jsx(qr,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:216",className:"w-3.5 h-3.5 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:218",className:"bg-muted rounded-2xl rounded-tl-sm px-4 py-3 flex items-center gap-2",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:219",className:"w-3.5 h-3.5 animate-spin text-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:220",className:"text-sm text-muted-foreground",children:"Designing your popup..."})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:224",ref:b})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:230",className:"border-t",children:[n.jsxs(E7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:231",open:p,onOpenChange:x,children:[n.jsx(A7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:232",asChild:!0,children:n.jsxs("button",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:233",className:"w-full flex items-center justify-between px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:234",className:"flex items-center gap-1.5",children:[n.jsx(t9,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:234",className:"w-3.5 h-3.5"})," Trigger & Settings"]}),n.jsx(Tn,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:235",className:`w-3.5 h-3.5 transition-transform ${p?"rotate-180":""}`})]})}),n.jsx(D7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:238",children:n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:239",className:"px-4 pb-3 pt-1 space-y-3 bg-muted/30",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:240",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:241",className:"text-xs",children:"Trigger"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:242",value:j?.triggerType??"exit_intent",onValueChange:_,children:[n.jsx(xt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:246",className:"h-8 text-xs",children:n.jsx(ht,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:247"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:249",children:[n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:250",value:"exit_intent",children:"Exit Intent"}),n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:251",value:"time_delay",children:"Time Delay"}),n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:252",value:"scroll",children:"Scroll Depth"}),n.jsx(he,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:253",value:"manual",children:"Always Show"})]})]})]}),j?.triggerType==="time_delay"&&n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:258",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:259",className:"text-xs",children:"Delay (seconds)"}),n.jsx(De,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:260",type:"number",className:"h-8 text-xs",defaultValue:j?.triggerValue??5,onBlur:R=>O.mutateAsync({id:a,data:{triggerValue:parseInt(R.target.value)}})})]}),j?.triggerType==="scroll"&&n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:269",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:270",className:"text-xs",children:"Scroll Depth (%)"}),n.jsx(De,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:271",type:"number",className:"h-8 text-xs",defaultValue:j?.triggerValue??50,onBlur:R=>O.mutateAsync({id:a,data:{triggerValue:parseInt(R.target.value)}})})]})]})})]}),n.jsxs(E7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:283",open:m,onOpenChange:h,children:[n.jsx(A7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:284",asChild:!0,children:n.jsxs("button",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:285",className:"w-full flex items-center justify-between px-4 py-2.5 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors border-t",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:286",className:"flex items-center gap-1.5",children:[n.jsx(FI,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:286",className:"w-3.5 h-3.5"})," Embed Code"]}),n.jsx(Tn,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:287",className:`w-3.5 h-3.5 transition-transform ${m?"rotate-180":""}`})]})}),n.jsx(D7,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:290",children:n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:291",className:"px-4 pb-3 pt-1 bg-muted/30",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:292",className:"text-xs text-muted-foreground mb-2",children:["Paste before ",n.jsx("code",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:292",className:"bg-muted px-1 rounded",children:"</body>"})," on your website"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:293",className:"relative",children:[n.jsx("pre",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:294",className:"text-xs bg-muted rounded-lg p-3 overflow-x-auto whitespace-pre-wrap break-all leading-relaxed",children:T}),n.jsx(te,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:295",size:"sm",variant:"ghost",className:"absolute top-1.5 right-1.5 h-6 w-6 p-0",onClick:I,children:y?n.jsx(ss,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:301",className:"w-3 h-3 text-green-500"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:301",className:"w-3 h-3"})})]})]})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:310",className:"p-3 border-t bg-background",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:311",className:"flex gap-2 items-end",children:[n.jsx(Yy,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:312",value:i,onChange:R=>l(R.target.value),onKeyDown:E,placeholder:$?"Describe the popup you want...":"Ask for changes...",className:"min-h-[60
906px] max-h-[140px] resize-none text-sm",disabled:A.isPending}),n.jsx(te,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:320",size:"icon",onClick:()=>k(),disabled:!i.trim()||A.isPending,className:"h-10 w-10 flex-shrink-0",children:A.isPending?n.jsx(Ot,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:327",className:"w-4 h-4 animate-spin"}):n.jsx(Lc,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:329",className:"w-4 h-4"})})]}),n.jsx("p",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:333",className:"text-xs text-muted-foreground mt-1.5 px-0.5",children:"Enter to send · Shift+Enter for new line"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:338",className:"flex-1 flex flex-col bg-muted/30 overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:339",className:"flex items-center justify-between px-4 py-2.5 border-b bg-background/80 backdrop-blur-sm",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:340",className:"flex items-center gap-2",children:[n.jsx(la,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:341",className:"w-4 h-4 text-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:342",className:"text-sm font-medium",children:"Live Preview"}),d&&n.jsxs(Le,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:344",variant:"outline",className:"text-xs gap-1",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:345",className:"w-2.5 h-2.5"}),"AI Generated"]})]}),d&&n.jsxs(te,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:351",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>{const R=d;u(null),setTimeout(()=>u(R),50)},children:[n.jsx(Vr,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:361",className:"w-3 h-3"}),"Refresh"]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:367",className:"flex-1 overflow-hidden relative",children:d?n.jsx("iframe",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:369",srcDoc:d,className:"w-full h-full border-0",sandbox:"allow-scripts allow-same-origin",title:"Popup Preview"},d.slice(0,80)):n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:377",className:"flex flex-col items-center justify-center h-full gap-4 text-center px-8",children:[n.jsx("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:378",className:"w-16 h-16 rounded-2xl bg-muted flex items-center justify-center",children:n.jsx(la,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:379",className:"w-8 h-8 text-muted-foreground/40"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:381",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:382",className:"font-semibold text-base text-muted-foreground mb-1",children:"Preview will appear here"}),n.jsx("p",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:383",className:"text-sm text-muted-foreground/70 leading-relaxed max-w-xs",children:"Describe your popup in the chat on the left and the AI will design it in real-time."})]}),A.isPending&&n.jsxs("div",{"data-loc":"client/src/pages/client/PopupBuilder.tsx:388",className:"flex items-center gap-2 text-sm text-muted-foreground",children:[n.jsx(Ot,{"data-loc":"client/src/pages/client/PopupBuilder.tsx:389",className:"w-4 h-4 animate-spin"}),"Generating your popup..."]})]})})]})]})]})}var jW=["PageUp","PageDown"],wW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],NW={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Eu="Slider",[p5,BSe,ISe]=Jv(Eu),[SW]=Pn(Eu,[ISe]),[LSe,Xy]=SW(Eu),CW=v.forwardRef((e,t)=>{const{name:a,min:s=0,max:r=100,step:i=1,orientation:l="horizontal",disabled:d=!1,minStepsBetweenThumbs:u=0,defaultValue:p=[s],value:x,onValueChange:m=()=>{},onValueCommit:h=()=>{},inverted:y=!1,form:w,...b}=e,j=v.useRef(new Set),S=v.useRef(0),A=l==="horizontal"?$Se:zSe,[k=[],E]=Zs({prop:x,defaultProp:p,onChange:R=>{[...j.current][S.current]?.focus(),m(R)}}),D=v.useRef(k);function _(R){const B=HSe(k,R);$(R,B)}function T(R){$(R,S.current)}function I(){const R=D.current[S.current];k[S.current]!==R&&h(k)}function $(R,B,{commit:Y}={commit:!1}){const z=KSe(i),Q=QSe(Math.round((R-s)/i)*i+s,z),L=ph(Q,[s,r]);E((M=[])=>{const U=FSe(M,L,B);if(YSe(U,u*i)){S.current=U.indexOf(L);const Z=String(U)!==String(M);return Z&&Y&&h(U),Z?U:M}else return M})}return n.jsx(LSe,{scope:e.__scopeSlider,name:a,disabled:d,min:s,max:r,valueIndexToChangeRef:S,thumbs:j.current,values:k,orientation:l,form:w,children:n.jsx(p5.Provider,{scope:e.__scopeSlider,children:n.jsx(p5.Slot,{scope:e.__scopeSlider,children:n.jsx(A,{"aria-disabled":d,"data-disabled":d?"":void 0,...b,ref:t,onPointerDown:We(b.onPointerDown,()=>{d||(D.current=k)}),min:s,max:r,inverted:y,onSlideStart:d?void 0:_,onSlideMove:d?void 0:T,onSlideEnd:d?void 0:I,onHomeKeyDown:()=>!d&&$(s,0,{commit:!0}),onEndKeyDown:()=>!d&&$(r,k.length-1,{commit:!0}),onStepKeyDown:({event:R,direction:B})=>{if(!d){const Q=jW.includes(R.key)||R.shiftKey&&wW.includes(R.key)?10:1,L=S.current,M=k[L],U=i*Q*B;$(M+U,L,{commit:!0})}}})})})})});CW.displayName=Eu;var[EW,AW]=SW(Eu,{startEdge:"left",endEdge:"right",size:"width",direction:1}),$Se=v.forwardRef((e,t)=>
906{const{min:a,max:s,dir:r,inverted:i,onSlideStart:l,onSlideMove:d,onSlideEnd:u,onStepKeyDown:p,...x}=e,[m,h]=v.useState(null),y=kt(t,A=>h(A)),w=v.useRef(void 0),b=Dm(r),j=b==="ltr",S=j&&!i||!j&&i;function O(A){const k=w.current||m.getBoundingClientRect(),E=[0,k.width],_=k4(E,S?[a,s]:[s,a]);return w.current=k,_(A-k.left)}return n.jsx(EW,{scope:e.__scopeSlider,startEdge:S?"left":"right",endEdge:S?"right":"left",direction:S?1:-1,size:"width",children:n.jsx(DW,{dir:b,"data-orientation":"horizontal",...x,ref:y,style:{...x.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:A=>{const k=O(A.clientX);l?.(k)},onSlideMove:A=>{const k=O(A.clientX);d?.(k)},onSlideEnd:()=>{w.current=void 0,u?.()},onStepKeyDown:A=>{const E=NW[S?"from-left":"from-right"].includes(A.key);p?.({event:A,direction:E?-1:1})}})})}),zSe=v.forwardRef((e,t)=>{const{min:a,max:s,inverted:r,onSlideStart:i,onSlideMove:l,onSlideEnd:d,onStepKeyDown:u,...p}=e,x=v.useRef(null),m=kt(t,x),h=v.useRef(void 0),y=!r;function w(b){const j=h.current||x.current.getBoundingClientRect(),S=[0,j.height],A=k4(S,y?[s,a]:[a,s]);return h.current=j,A(b-j.top)}return n.jsx(EW,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:n.jsx(DW,{"data-orientation":"vertical",...p,ref:m,style:{...p.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const j=w(b.clientY);i?.(j)},onSlideMove:b=>{const j=w(b.clientY);l?.(j)},onSlideEnd:()=>{h.current=void 0,d?.()},onStepKeyDown:b=>{const S=NW[y?"from-bottom":"from-top"].includes(b.key);u?.({event:b,direction:S?-1:1})}})})}),DW=v.forwardRef((e,t)=>{const{__scopeSlider:a,onSlideStart:s,onSlideMove:r,onSlideEnd:i,onHomeKeyDown:l,onEndKeyDown:d,onStepKeyDown:u,...p}=e,x=Xy(Eu,a);return n.jsx(et.span,{...p,ref:t,onKeyDown:We(e.onKeyDown,m=>{m.key==="Home"?(l(m),m.preventDefault()):m.key==="End"?(d(m),m.preventDefault()):jW.concat(wW).includes(m.key)&&(u(m),m.preventDefault())}),onPointerDown:We(e.onPointerDown,m=>{const h=m.target;h.setPointerCapture(m.pointerId),m.preventDefault(),x.thumbs.has(h)?h.focus():s(m)}),onPointerMove:We(e.onPointerMove,m=>{m.target.hasPointerCapture(m.pointerId)&&r(m)}),onPointerUp:We(e.onPointerUp,m=>{const h=m.target;h.hasPointerCapture(m.pointerId)&&(h.releasePointerCapture(m.pointerId),i(m))})})}),OW="SliderTrack",kW=v.forwardRef((e,t)=>{const{__scopeSlider:a,...s}=e,r=Xy(OW,a);return n.jsx(et.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...s,ref:t})});kW.displayName=OW;var f5="SliderRange",_W=v.forwardRef((e,t)=>{const{__scopeSlider:a,...s}=e,r=Xy(f5,a),i=AW(f5,a),l=v.useRef(null),d=kt(t,l),u=r.values.length,p=r.values.map(h=>MW(h,r.min,r.max)),x=u>1?Math.min(...p):0,m=100-Math.max(...p);return n.jsx(et.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...s,ref:d,style:{...e.style,[i.startEdge]:x+"%",[i.endEdge]:m+"%"}})});_W.displayName=f5;var m5="SliderThumb",TW=v.forwardRef((e,t)=>{const a=BSe(e.__scopeSlider),[s,r]=v.useState(null),i=kt(t,d=>r(d)),l=v.useMemo(()=>s?a().findIndex(d=>d.ref.current===s):-1,[a,s]);return n.jsx(USe,{...e,ref:i,index:l})}),USe=v.forwardRef((e,t)=>{const{__scopeSlider:a,index:s,name:r,...i}=e,l=Xy(m5,a),d=AW(m5,a),[u,p]=v.useState(null),x=kt(t,O=>p(O)),m=u?l.form||!!u.closest("form"):!0,h=Mv(u),y=l.values[s],w=y===void 0?0:MW(y,l.min,l.max),b=WSe(s,l.values.length),j=h?.[d.size],S=j?VSe(j,w,d.direction):0;return v.useEffect(()=>{if(u)return l.thumbs.add(u),()=>{l.thumbs.delete(u)}},[u,l.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[d.startEdge]:`calc(${w}% + ${S}px)`},children:[n.jsx(p5.ItemSlot,{scope:e.__scopeSlider,children:n.jsx(et.span,{role:"slider","aria-label":e["aria-label"]||b,"aria-valuemin":l.min,"aria-valuenow":y,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...i,ref:x,style:y===void 0?{display:"none"}:e.style,onFocus:We(e.onFocus,()=>{l.valueIndexToChangeRef.current=s})})}),m&&n.jsx(PW,{name:r??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:y},s)]})});TW.displayName=m5;var qSe="RadioBubbleInput",PW=v.forwardRef(({__scopeSlider:e,value:t,...a},s)=>{const r=v.useRef(null),i=kt(r,s),l=sy(t);return v.useEffect(()=>{const d=r.current;if(!d)return;const u=window.HTMLInputElement.prototype,x=Object.getOwnPropertyDescriptor(u,"value").set;if(l!==t&&x){const m=new Event("input",{bubbles:!0});x.call(d,t),d.dispatchEvent(m)}},[l,t]),n.jsx(et.input,{style:{display:"none"},...a,ref:i,defaultValue:t})});PW.displayName=qSe;function FSe(e=[],t,a){const s=[...e];return s[a]=t,s.sort((r,i)=>r-i)}function MW(e,t,a){const i=100/(a-t)*(e-t);return ph(i,[0,100])}function WSe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function HSe(e,t){if(e.length===1)return 0;const a=e.map(r=>Math.abs(r-t)),s=Math.min(...a);return a.indexOf(s)}function VSe(e,t,a){const s=e/2,i=k4([0,50],[0,s]);return(s-i(t)*a)*a}function GSe(e){return e.slice(0,-1).map((t,a)=>e[a+1]-t)}function YSe(e,t){if(t>0){const a=GSe(e);return Math.min(...a)>=t}return!0}function k4(e,t){return a=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(a-e[0])}}function KSe(e){return(String(e).split(".")[1]||"").length}function QSe(e,t){const a=Math.pow(10,t);return Math.round(e*a)/a}var XSe=CW,ZSe=kW,JSe=_W,eCe=TW;function KN({className:e,defaultValue:t,value:a,min:s=0,max:r=100,...i}){const l=v.useMemo(()=>Array.isArray(a)?a:Array.isArray(t)?t:[s,r],[a,t,s,r]);return n.jsxs(XSe,{"data-loc":"client/src/components/ui/slider.tsx:25","data-slot":"slider",defaultValue:t,value:a,min:s,max:r,className:Se("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",e),...i,children:[n.jsx(ZSe,{"data-loc":"client/src/components/ui/slider.tsx:37","data-slot":"slider-track",className:Se("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:n.jsx(JSe,{"data-loc":"client/src/components/ui/slider.tsx:43","data-slot":"slider-range",className:Se("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:l.length},(d,u)=>n.jsx(eCe,{"data-loc":"client/src/components/ui/slider.tsx:51","data-slot":"slider-thumb",className:"border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},u))]})}function O7({className:e,...t}){return n.jsx("div",{"data-loc":"client/src/components/ui/table.tsx:7","data-slot":"table-container",className:"relative w-full overflow-x-auto",children:n.jsx("table",{"data-loc":"client/src/components/ui/table.tsx:11","data-slot":"table",className:Se("w-full caption-bottom text-sm",e),...t})})}function k7({className:e,...t}){return n.jsx("thead",{"data-loc":"client/src/components/ui/table.tsx:22","data-slot":"table-header",className:Se("[&_tr]:border-b",e),...t})}function _7({className:e,...t}){return n.jsx("tbody",{"data-loc":"client/src/components/ui/table.tsx:32","data-slot":"table-body",className:Se("[&_tr:last-child]:border-0",e),...t})}function qg({className:e,...t}){return n.jsx("tr",{"data-loc":"client/src/components/ui/table.tsx:55","data-slot":"table-row",className:Se("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function Al({className:e,...t}){return n.jsx("th",{"data-loc":"client/src/components/ui/table.tsx:68","data-slot":"table-head",className:Se("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function Dl({className:e,...t}){return n.jsx("td",{"data-loc":"client/src/components/ui/table.tsx:81","data-slot":"table-cell",className:Se("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}const T7={bgColor:"#0f0f0f",buttonColor:"#22c55e",buttonFontColor:"#ffffff",buttonFontFamily:"system-ui, sans-serif",buttonFontSize:14,contentFontFamily:"system-ui, sans-serif",contentFontSize:14,contentFontColor:"#ffffff",overlayColor:"#000000",overlayOpacity:.75,logoUrl:""},od=["#22c55e","#f97316","#8b5cf6","#3b82f6","#ef4444","#eab308","#06b6d4","#ec4899","#14b8a6","#f59e0b"],P7=[{label:"System Default",value:"system-ui, sans-serif"},{label:"Inter",value:"'Inter', sans-serif"},{label:"Roboto",value:"'Roboto', sans-serif"},{label:"Montserrat",value:"'Montserrat', sans-serif"},{label:"Poppins",value:"'Poppins', sans-serif"},{label:"Oswald",value:"'Oswald', sans-serif"},{label:"Playfair Display",value:"'Playfair Display', serif"},{label:"Georgia",value:"Georgia, serif"},{label:"Courier New",value:"'Courier New', monospace"}];
906function Rp({value:e,onChange:t,label:a}){return n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:71",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:72",className:"text-xs text-muted-foreground",children:a}),n.jsxs("label",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:73",className:"flex items-center gap-2 cursor-pointer group",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:74",className:"w-8 h-8 rounded-lg border border-border shadow-sm flex-shrink-0 overflow-hidden",style:{background:e}}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:78",className:"text-xs font-mono text-muted-foreground group-hover:text-foreground transition-colors",children:e.toUpperCase()}),n.jsx("input",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:81",type:"color",value:e,onChange:s=>t(s.target.value),className:"sr-only"})]})]})}function Fg({icon:e,label:t,value:a,sub:s,color:r}){return n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:181",className:"bg-card border rounded-xl p-4 flex items-start gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:182",className:`p-2 rounded-lg ${r??"bg-primary/10"}`,children:n.jsx(e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:183",className:`h-4 w-4 ${r?"text-white":"text-primary"}`})}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:185",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:186",className:"text-xs text-muted-foreground",children:t}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:187",className:"text-2xl font-bold tracking-tight",children:a}),s&&n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:188",className:"text-xs text-muted-foreground mt-0.5",children:s})]})]})}function tCe({wheelId:e,tenantId:t}){const{data:a,isLoading:s}=le.spinWheel.getStats.useQuery({id:e},{enabled:!!e,refetchInterval:3e4});if(s)return n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:202",className:"flex items-center justify-center py-12",children:n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:203",className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})});if(!a)return null;const r=typeof a.conversionRate=="number"?a.conversionRate.toFixed(1):"0.0";return n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:215",className:"space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:217",className:"grid grid-cols-2 gap-3",children:[n.jsx(Fg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:218",icon:la,label:"Total Views",value:a.totalViews.toLocaleString(),sub:"Times wheel was shown"}),n.jsx(Fg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:219",icon:Ic,label:"Total Spins",value:a.totalSpins.toLocaleString(),sub:"Emails captured"}),n.jsx(Fg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:220",icon:_n,label:"Conversion Rate",value:`${r}%`,sub:"Views → Spins"}),n.jsx(Fg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:221",icon:ja,label:"Email Sent",value:a.spins.filter(i=>i.emailSent).length.toLocaleString(),sub:"Confirmation emails sent"})]}),a.prizeBreakdown.length>0&&n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:226",children:[n.jsxs("h4",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:227",className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[n.jsx(xf,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:228",className:"h-4 w-4 text-muted-foreground"})," Prize Breakdown"]}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:230",className:"border rounded-xl overflow-hidden",children:n.jsxs(O7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:231",children:[n.jsx(k7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:232",children:n.jsxs(qg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:233",children:[n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:234",children:"Prize"}),n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:235",children:"Coupon Code"}),n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:236",className:"text-right",children:"Won"})]})}),n.jsx(_7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:239",children:a.prizeBreakdown.map((i,l)=>n.jsxs(qg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:241",children:[n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:242",className:"font-medium text-sm",children:i.prizeLabel}),n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:243",children:i.couponCode?n.jsx("code",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:245",className:"bg-muted px-1.5 py-0.5 rounded text-xs font-mono",children:i.couponCode}):n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:246",className:"text-muted-foreground text-xs",children:"—"})}),n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:248",className:"text-right font-semibold",children:Number(i.count).toLocaleStr
906ing()})]},l))})]})})]}),a.spins.length>0?n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:259",children:[n.jsxs("h4",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:260",className:"text-sm font-semibold mb-2 flex items-center gap-2",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:261",className:"h-4 w-4 text-muted-foreground"})," Submissions"]}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:263",className:"border rounded-xl overflow-hidden",children:n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:264",className:"max-h-80 overflow-y-auto",children:n.jsxs(O7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:265",children:[n.jsx(k7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:266",children:n.jsxs(qg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:267",children:[n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:268",children:"Email"}),n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:269",children:"Won"}),n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:270",children:"Code"}),n.jsx(Al,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:271",className:"text-right",children:"Date"})]})}),n.jsx(_7,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:274",children:a.spins.map(i=>n.jsxs(qg,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:276",children:[n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:277",className:"text-sm font-mono",children:i.email}),n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:278",className:"text-sm",children:i.prizeLabel}),n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:279",children:i.couponCode?n.jsx("code",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:281",className:"bg-muted px-1.5 py-0.5 rounded text-xs font-mono",children:i.couponCode}):n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:282",className:"text-muted-foreground text-xs",children:"—"})}),n.jsx(Dl,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:284",className:"text-right text-xs text-muted-foreground",children:new Date(i.createdAt).toLocaleDateString()})]},i.id))})]})})})]}):n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:295",className:"text-center py-10 text-muted-foreground",children:[n.jsx(xf,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:296",className:"h-8 w-8 mx-auto mb-2 opacity-30"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:297",className:"text-sm",children:"No spins yet. Set the wheel to Active and embed it on your site."})]})]})}function aCe(){const[,e]=p9("/popups/spin/:id"),[,t]=La(),a=parseInt(e?.id||"0",10),{data:s,isLoading:r}=le.spinWheel.get.useQuery({id:a},{enabled:!!a}),i=le.spinWheel.update.useMutation({onSuccess:()=>ne.success("Saved!"),onError:()=>ne.error("Failed to save")}),[l,d]=v.useState(""),[u,p]=v.useState("draft"),[x,m]=v.useState("Spin to Win!"),[h,y]=v.useState("Enter your email for a chance to win an exclusive prize!"),[w,b]=v.useState("SPIN NOW"),[j,S]=v.useState("exit_intent"),[O,A]=v.useState(0),[k,E]=v.useState([{label:"Free 10k Account",color:"#22c55e",probability:1,couponCode:"FREE10K",redirectUrl:""},{label:"60% Off Your First Account",color:"#f97316",probability:90,couponCode:"SPIN60",redirectUrl:""},{label:"Free 100% Profit Split Add-On",color:"#8b5cf6",probability:9,couponCode:"SPLIT100",redirectUrl:""}]),[D,_]=v.useState({...T7}),[T,I]=v.useState(!1),[$,R]=v.useState(!1),[B,Y]=v.useState(!1),z=async xe=>{if(!xe.type.startsWith("image/")){ne.error("Please select an image file");return}if(xe.size>2*1024*1024){ne.error("Image must be under 2MB");return}Y(!0);try{const $e=new FormData;$e.append("file",xe);const Te=await fetch("/api/upload-image",{method:"POST",body:$e});if(!Te.ok)throw new Error("Upload failed");const{url:dt}=await Te.json();ye("logoUrl",dt),ne.success("Logo uploaded")}catch{ne.error("Failed to upload logo")}finally{Y(!1)}},[Q,L]=v.useState("email"),[M,U]=v.useState(""),[Z,ie]=v.useState(null),G=v.useRef(null),F=v.useRef(null),H=v.useCallback(xe=>{const $e=G.current;if(!$e||k.length===0)return;const Te=$e.getContext("2d"),dt=$e.width,tt=dt/2,me=dt/2,ut=dt/2-4,pt=2*Math.PI/k.length,ft=ut*.58;
906Te.clearRect(0,0,dt,dt),k.forEach((_t,da)=>{const vt=xe+da*pt,Xt=vt+pt;Te.beginPath(),Te.moveTo(tt,me),Te.arc(tt,me,ut,vt,Xt),Te.closePath(),Te.fillStyle=_t.color||"#22c55e",Te.fill(),Te.strokeStyle="#0f0f0f",Te.lineWidth=2,Te.stroke(),Te.save(),Te.translate(tt,me),Te.rotate(vt+pt/2);let Ct=12;Te.font=`bold ${Ct}px system-ui, sans-serif`;let Zt=_t.label;for(;Te.measureText(Zt).width>ft&&Ct>7;)Ct-=.5,Te.font=`bold ${Ct}px system-ui, sans-serif`;for(;Te.measureText(Zt).width>ft&&Zt.length>3;)Zt=Zt.slice(0,-2)+"…";Te.textAlign="right",Te.fillStyle="#fff",Te.shadowColor="rgba(0,0,0,0.7)",Te.shadowBlur=3,Te.fillText(Zt,ut-10,Ct/3),Te.restore()}),Te.beginPath(),Te.arc(tt,me,22,0,2*Math.PI),Te.fillStyle="#0f0f0f",Te.fill(),Te.strokeStyle=D.buttonColor||"#22c55e",Te.lineWidth=3,Te.stroke()},[k,D.buttonColor]);v.useEffect(()=>{Q==="email"&&H(-Math.PI/2)},[k,Q,H]);function q(){if(!M||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(M))return;const xe=k.reduce((vt,Xt)=>vt+Xt.probability,0);let $e=Math.random()*xe,Te=0;for(let vt=0;vt<k.length;vt++)if($e-=k[vt].probability,$e<=0){Te=vt;break}const dt=k[Te];L("spinning");const tt=2*Math.PI/k.length,me=-Math.PI/2-(Te*tt+tt/2),ut=Math.PI*2*8+me,pt=4e3;let ft=null;function _t(vt){return 1-Math.pow(1-vt,4)}function da(vt){ft||(ft=vt);const Xt=Math.min((vt-ft)/pt,1);H(ut*_t(Xt)),Xt<1?F.current=requestAnimationFrame(da):(ie(dt),L("reveal"))}F.current=requestAnimationFrame(da)}function J(){F.current&&cancelAnimationFrame(F.current),L("email"),U(""),ie(null)}v.useEffect(()=>{s&&(d(s.name),p(s.status),m(s.headline||"Spin to Win!"),y(s.subheadline||""),b(s.buttonText||"SPIN NOW"),S(s.triggerType||"exit_intent"),A(s.triggerValue||0),s.prizes&&Array.isArray(s.prizes)&&E(s.prizes),s.styling&&_({...T7,...s.styling}))},[s]);const ce=k.reduce((xe,$e)=>xe+$e.probability,0);function se(){R(!0)}function ye(xe,$e){_(Te=>({...Te,[xe]:$e})),se()}function de(){i.mutate({id:a,name:l,status:u,headline:x,subheadline:h,buttonText:w,triggerType:j,triggerValue:O,prizes:k,styling:D},{onSuccess:()=>R(!1)})}function ve(){E(xe=>[...xe,{label:"New Prize",color:od[xe.length%od.length],probability:5,couponCode:"",redirectUrl:""}]),se()}function Pe(xe){if(k.length<=2)return ne.error("Need at least 2 prizes");E($e=>$e.filter((Te,dt)=>dt!==xe)),se()}function ue(xe,$e,Te){E(dt=>dt.map((tt,me)=>me===xe?{...tt,[$e]:Te}:tt)),se()}const Qe=`<script src="https://app.boostiko.com/spin-wheel.js" data-tenant="TENANT_ID" data-wheel="${a}"><\/script>`;function Ue(){navigator.clipboard.writeText(Qe),I(!0),setTimeout(()=>I(!1),2e3),ne.success("Embed code copied!")}return r?n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:536",className:"flex items-center justify-center h-64",children:n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:537",className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"})}):n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:543",className:"min-h-screen bg-background",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:545",className:"border-b bg-background sticky top-0 z-10",children:n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:546",className:"flex items-center gap-4 px-6 py-3",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:547",variant:"ghost",size:"sm",onClick:()=>t("/popups"),children:[n.jsx(rs,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:548",className:"h-4 w-4 mr-1"})," Back"]}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:550",className:"font-semibold text-foreground",children:l||"Spin Wheel"}),n.jsx(Le,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:551",variant:u==="active"?"default":"secondary",className:"ml-1",children:u==="active"?"Active":"Draft"}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:554",className:"ml-auto flex items-center gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:555",className:"flex items-center gap-2",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:556",className:"text-sm text-muted-foreground",children:"Status"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:557",value:u,onValueChange:xe=>{p(xe),se()},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:558",className:"w-28 h-8",children:n.jsx(ht,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:559"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:561",children:[n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:562",value:"draft",children:"Draft"}),n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:563",value:"active",children:"Active"})]})]})]}),n.jsx(te,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:56
9067",onClick:de,disabled:i.isPending||!$,size:"sm",children:i.isPending?"Saving...":"Save Changes"})]})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:574",className:"flex h-[calc(100vh-57px)]",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:576",className:"w-[540px] border-r overflow-y-auto flex-shrink-0",children:n.jsxs(hm,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:577",defaultValue:"prizes",className:"p-6",children:[n.jsxs(vm,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:578",className:"w-full mb-6 grid grid-cols-6",children:[n.jsx(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:579",value:"prizes",children:"Prizes"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:580",value:"content",children:"Content"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:581",value:"styling",children:"Styling"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:582",value:"trigger",children:"Trigger"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:583",value:"embed",children:"Embed"}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:584",value:"analytics",className:"flex items-center gap-1",children:[n.jsx(xf,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:585",className:"h-3.5 w-3.5"}),"Analytics"]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:590",value:"prizes",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:591",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:592",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:593",className:"font-semibold text-sm",children:"Prize Slices"}),n.jsxs("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:594",className:"text-xs text-muted-foreground mt-0.5",children:["Total probability:"," ",n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:596",className:ce===100?"text-green-500 font-semibold":"text-red-500 font-semibold",children:[ce,"%"]}),ce!==100&&" (must equal 100%)"]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:602",size:"sm",variant:"outline",onClick:ve,children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:603",className:"h-3.5 w-3.5 mr-1"})," Add Prize"]})]}),k.map((xe,$e)=>n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:608",className:"border rounded-xl p-4 space-y-3 bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:610",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:611",className:"w-4 h-4 rounded-full flex-shrink-0 border border-white/20",style:{background:xe.color}}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:615",value:xe.label,onChange:Te=>ue($e,"label",Te.target.value),className:"h-8 text-sm flex-1",placeholder:"Prize label"}),n.jsx(te,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:621",variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive flex-shrink-0",onClick:()=>Pe($e),children:n.jsx(Ua,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:627",className:"h-3.5 w-3.5"})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:632",className:"space-y-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:633",className:"flex gap-1.5 flex-wrap",children:od.map(Te=>n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:635",className:"w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",style:{background:Te,borderColor:xe.color===Te?"#fff":"transparent",boxShadow:xe.color===Te?`0 0 0 2px ${Te}`:"none"},onClick:()=>ue($e,"color",Te)},Te))}),n.jsxs("label",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:647",className:"flex items-center gap-2 cursor-pointer group",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:648",className:"w-7 h-7 rounded-lg border-2 border-dashed border-muted-foreground
906/40 group-hover:border-muted-foreground flex items-center justify-center overflow-hidden transition-colors",style:{background:od.includes(xe.color)?"transparent":xe.color},children:od.includes(xe.color)&&n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:655",className:"text-muted-foreground text-[10px] font-bold",children:"+"})}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:658",className:"text-xs text-muted-foreground group-hover:text-foreground transition-colors",children:od.includes(xe.color)?"Custom color":xe.color.toUpperCase()}),n.jsx("input",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:661",type:"color",value:xe.color,onChange:Te=>ue($e,"color",Te.target.value),className:"sr-only"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:670",className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:671",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:672",className:"text-xs text-muted-foreground mb-1 block",children:"Probability (%)"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:673",type:"number",min:1,max:99,value:xe.probability,onChange:Te=>ue($e,"probability",parseInt(Te.target.value)||1),className:"h-8 text-sm"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:682",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:683",className:"text-xs text-muted-foreground mb-1 block",children:"Coupon Code"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:684",value:xe.couponCode||"",onChange:Te=>ue($e,"couponCode",Te.target.value),className:"h-8 text-sm",placeholder:"e.g. SPIN60"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:692",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:693",className:"text-xs text-muted-foreground mb-1 block",children:"Redirect URL after winning (optional)"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:694",value:xe.redirectUrl||"",onChange:Te=>ue($e,"redirectUrl",Te.target.value),className:"h-8 text-sm",placeholder:"https://nextlevelfunded.com/challenges"})]})]},$e))]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:706",value:"content",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:707",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:708",className:"text-sm font-medium mb-1.5 block",children:"Wheel Name (internal)"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:709",value:l,onChange:xe=>{d(xe.target.value),se()},placeholder:"e.g. NLF Spin to Win"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:711",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:712",className:"text-sm font-medium mb-1.5 block",children:"Headline"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:713",value:x,onChange:xe=>{m(xe.target.value),se()},placeholder:"Spin to Win!"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:715",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:716",className:"text-sm font-medium mb-1.5 block",children:"Subheadline"}),n.jsx(Yy,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:717",value:h,onChange:xe=>{y(xe.target.value),se()},placeholder:"Enter your email for a chance to win an exclusive prize!",rows:2})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:724",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:725",className:"text-sm font-medium mb-1.5 block",children:"Button Text"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:726",value:w,onChange:xe=>{b(xe.target.value),se()},placeholder:"SPIN NOW"})]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:731",value:"styling",className:"space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:733",className:"space-y-3",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:734",className:"text-sm font-semibold border-b pb-2",children:"Logo"}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:735",children:D.logoUrl?n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:737",className:"flex items-center gap-3 p-3 border border-border rounded-lg bg-muted/30",children:[n.jsx("img",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:738",src:D.logoUrl,alt:"Logo",className:"h-10 max-w-[120px] object-contain rounded",onError:xe=>xe.currentTarget.style.display="none"}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:744",className:"flex-1 min-w-0",children:n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:745",className:"text-xs text-muted-foreground truncate",children:"Logo uploaded"})}),n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:747",className:"text-xs text-destructive hover:text-destructive/80 border border-border rounded-md px-2 py-1 shrink-0",onClick:()=>ye("logoUrl",""),children:"Remove"})]}):n.jsxs("label",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:753",className:`flex flex-col items-center justify-center gap-2 border-2 border-dashed border-border rounded-lg p-6 cursor-pointer transition-colors hover:border-primary/50 hover:bg-muted/30 ${B?"opacity-50 pointer-events-none":""}`,onDragOver:xe=>xe.preventDefault(),onDrop:xe=>{xe.preventDefault();const $e=xe.dataTransfer.files[0];$e&&z($e)},children:[n.jsx("input",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:758",type:"file",accept:"image/*",className:"hidden",onChange:xe=>{const $e=xe.target.files?.[0];$e&&z($e)}}),B?n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:766",className:"w-5 h-5 border-2 border-primary border-t-transparent roun
906ded-full animate-spin"}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:767",className:"text-xs text-muted-foreground",children:"Uploading..."})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:771",className:"text-2xl",children:"🖼️"}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:772",className:"text-sm font-medium",children:"Click to upload logo"}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:773",className:"text-xs text-muted-foreground",children:"PNG, JPG, SVG up to 2MB"})]})]})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:782",className:"space-y-3",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:783",className:"text-sm font-semibold border-b pb-2",children:"Popup Background"}),n.jsx(Rp,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:784",label:"Background Color",value:D.bgColor,onChange:xe=>ye("bgColor",xe)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:792",className:"space-y-3",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:793",className:"text-sm font-semibold border-b pb-2",children:"Page Overlay"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:794",className:"text-xs text-muted-foreground",children:"The dimmed backdrop shown behind the popup on your website."}),n.jsx(Rp,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:795",label:"Overlay Color",value:D.overlayColor,onChange:xe=>ye("overlayColor",xe)}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:800",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:801",className:"flex items-center justify-between mb-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:802",className:"text-xs text-muted-foreground",children:"Overlay Opacity"}),n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:803",className:"text-xs font-mono text-muted-foreground",children:[Math.round(D.overlayOpacity*100),"%"]})]}),n.jsx(KN,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:805",min:0,max:100,step:5,value:[Math.round(D.overlayOpacity*100)],onValueChange:([xe])=>ye("overlayOpacity",xe/100)})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:816",className:"space-y-3",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:817",className:"text-sm font-semibold border-b pb-2",children:"Content Typography"}),n.jsx(Rp,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:818",label:"Text Color",value:D.contentFontColor,onChange:xe=>ye("contentFontColor",xe)}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:823",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:824",className:"text-xs text-muted-foreground mb-1.5 block",children:"Font Family"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:825",value:D.contentFontFamily,onValueChange:xe=>ye("contentFontFamily",xe),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:826",className:"h-9",children:n.jsx(ht,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:827"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:829",children:P7.map(xe=>n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:831",value:xe.value,children:xe.label},xe.value))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:836",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:837",className:"flex items-center justify-between mb-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:838",className:"text-xs text-muted-foreground",children:"Font Size"}),n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:839",className:"text-xs font-mono text-muted-foreground",children:[D.contentFontSize,"px"]})]}),n.jsx(KN,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:841",min:10,max:24,step:1,value:[D.contentFontSize],onValueChange:([xe])=>ye("contentFontSize",xe)})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:852",className:"space-y-3",children:[n.jsx("h3",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:853",className:"text-sm font-semibold border-b pb-2",children:"Button"}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:854",className:"grid grid-cols-2 gap-4",children:[n.jsx(Rp,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:855",label:"Button Color",value:D.buttonColor,onChange:xe=>ye("buttonColor",xe)}),n.jsx(Rp,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:860",label:"Button Text Color",value:D.buttonFontColor,onChange:xe=>ye("buttonFontColor",xe)})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:866",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:867",className:"text-xs text-muted-foreground mb-1.5 block",children:"Button Font Family"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:868",value:D.buttonFontFamily,onValueChange:xe=>ye("buttonFontFamily",xe),children:[n.jsx(xt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:869",className:"h-9",children:n.jsx(ht,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:870"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:872",children:P7.map(xe=>n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:874",value:xe.value,children:xe.label},xe.value))})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:879",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:880",className:"flex items-center justify-between mb-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:881",className:"text-xs text-muted-foreground",children:"Button Font Size"}),n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:882",className:"text-xs font-mono text-muted-foreground",children:[D.buttonFontSize,"px"]})]}),n.jsx(KN,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:884",min:10,max:22,step:1,value:[D.buttonFontSize],onValueChange:([xe])=>ye("buttonFontSize",xe)})]})]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:896",value:"trigger",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:897",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:898",className:"text-sm font-medium mb-1.5 block",children:"Trigger Type"}),n.jsxs(mt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:899",value:j,onValueChange:xe=>{S(xe),se()},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:900",children:n.jsx(ht,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:901"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:903",children:[n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:904",value:"exit_intent",children:"Exit Intent (cursor leaves page top)"}),n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:905",value:"time_delay",children:"Time Delay (seconds after page load
906)"}),n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:906",value:"scroll",children:"Scroll Depth (%)"}),n.jsx(he,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:907",value:"manual",children:"Manual (window.BoostikoSpinWheel.show())"})]})]})]}),(j==="time_delay"||j==="scroll")&&n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:913",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:914",className:"text-sm font-medium mb-1.5 block",children:j==="time_delay"?"Delay (seconds)":"Scroll Depth (%)"}),n.jsx(De,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:917",type:"number",min:0,max:j==="scroll"?100:300,value:O,onChange:xe=>{A(parseInt(xe.target.value)||0),se()}})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:927",className:"bg-muted/50 rounded-lg p-4 text-sm text-muted-foreground space-y-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:928",className:"font-medium text-foreground",children:"Contact suppression"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:929",children:"The wheel automatically hides for visitors whose email is already in your contact list. They won't see it even if they visit again."})]})]}),n.jsx(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:934",value:"analytics",className:"space-y-5",children:n.jsx(tCe,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:935",wheelId:a,tenantId:s?.tenantId??0})}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:939",value:"embed",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:940",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:941",className:"text-sm font-medium mb-2 block",children:"Embed Code"}),n.jsxs("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:942",className:"text-sm text-muted-foreground mb-3",children:["Paste this before the ",n.jsx("code",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:943",className:"bg-muted px-1 rounded text-xs",children:"</body>"})," tag on your website. Replace ",n.jsx("code",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:943",className:"bg-muted px-1 rounded text-xs",children:"TENANT_ID"})," with your tenant ID."]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:945",className:"relative",children:[n.jsx("pre",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:946",className:"bg-muted rounded-lg p-4 text-xs overflow-x-auto whitespace-pre-wrap break-all font-mono",children:Qe}),n.jsx(te,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:949",size:"sm",variant:"outline",className:"absolute top-2 right-2",onClick:Ue,children:T?n.jsx(ss,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:955",className:"h-3 w-3"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:955",className:"h-3 w-3"})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:960",className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 text-sm",children:[n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:961",className:"font-medium text-amber-800 dark:text-amber-200 mb-1",children:"Set to Active first"}),n.jsxs("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:962",className:"text-amber-700 dark:text-amber-300",children:["The wheel only shows on your website when the status is set to ",n.jsx("strong",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:962",children:"Active"}),"."]})]})]})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:969",className:"flex-1 bg-[#111] overflow-y-auto flex flex-col",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:970",className:"p-4 border-b border-white/10 flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:971",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:972",className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:973",className:"text-sm text-white/60 font-medium",children:"Live Preview"}),n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:974",className:"text-xs text-white/30 ml-1",children:[Q==="email"&&"— Enter email to try the flow",Q==="spinning"&&"— Spinning...",Q==="reveal"&&"— Prize revealed!"]})]}),Q!=="email"&&n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:981",className:"text-xs text-white/40 hover:text-white/70 border border-white/10 rounded-md px-2.5 py-1 transition-colors",onClick:J,children:"↺ Reset"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:990",className:"flex-1 flex items-center justify-center p-8",style:{background:D.overlayColor?`rgba(${parseInt(D.overlayColor.slice(1,3),16)},${parseInt(D.overlayColor.slice(3,5),16)},${parseInt(D.overlayColor.slice(5,7),16)},${D.overlayOpacity})`:`rgba(0,0,0,${D.overlayOpacity})`},children:n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:998",className:"relative rounded-2xl p-8 w-full max-w-[420px]",style:{background:D.bgColor,border:"1px solid rgba(255,255,255,0.08)",boxShadow:"0 0 60px rgba(34,197,94,0.15), 0 20px 60px rgba(0,0,0,0.6)",fontFamily:D.contentFontFamily},children:[n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1007",className:"absolute top-4 right-4 hover:opacity-70 text-xl leading-none",style:{color:D.contentFontColor},onClick:J,children:"×"}),D.logoUrl&&n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1015",className:"flex justify-center mb-4",children:n.jsx("img",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1016",src:D.logoUrl,alt:"Logo",className:"h-10 max-w-[160px] object-contain",onError:xe=>xe.currentTarget.style.display="none"})}),Q!=="reveal"&&n.jsxs(n.Fragment,{children:[n.jsx("h2",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1028",className:"font-extrabold text-center mb-2 tracking-tight",style:{fontSize:`${D.contentFontSize+10}px`,fontFamily:D.contentFontFamily,color:D.contentFontColor},children:x||"Spin to Win!"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1034",className:"text-center mb-6 leading-relaxed",style:{fontSize:`${D.contentFontSize}px`,fontFamily:D.contentFontFamily,color:D.contentFontColor,opacity:.7},children:h||"Enter your email for a chance to win an exclusive prize!"}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1042",className:"relative flex justify-center mb-6",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1043",className:"absolute -top-3 left-1/2 -translate-x-1/2 w-0 h-0",style:{borderLeft:"12px solid transparent",borderRight:"12px solid transparent",borderTop:`24px s
906olid ${D.buttonColor||"#22c55e"}`,filter:"drop-shadow(0 2px 4px rgba(0,0,0,0.5))"}}),n.jsx("canvas",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1052",ref:G,width:260,height:260,className:"rounded-full",style:{boxShadow:"0 0 30px rgba(34,197,94,0.2)"}})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1061",className:"space-y-3",children:[n.jsx("input",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1062",className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-white/30 outline-none focus:border-white/30 transition-colors",style:{fontSize:`${D.contentFontSize}px`,fontFamily:D.contentFontFamily},placeholder:"Enter your email address",value:M,onChange:xe=>U(xe.target.value),onKeyDown:xe=>xe.key==="Enter"&&q(),disabled:Q==="spinning"}),n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1071",className:"w-full py-3.5 rounded-xl font-bold uppercase tracking-wide transition-all active:scale-[0.98]",style:{background:D.buttonColor,color:D.buttonFontColor,fontSize:`${D.buttonFontSize}px`,fontFamily:D.buttonFontFamily,opacity:Q==="spinning"?.6:1,cursor:Q==="spinning"?"not-allowed":"pointer"},onClick:q,disabled:Q==="spinning",children:Q==="spinning"?"Spinning...":w||"SPIN NOW"}),Q==="email"&&!M&&n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1087",className:"text-xs text-center",style:{fontFamily:D.contentFontFamily,color:D.contentFontColor,opacity:.4},children:"👆 Enter any email above to preview the full flow"}),Q==="email"&&M&&n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1092",className:"text-xs text-center",style:{fontFamily:D.contentFontFamily,color:D.contentFontColor,opacity:.35},children:"No spam. Unsubscribe anytime."})]})]}),Q==="reveal"&&Z&&n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1102",className:"text-center py-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1103",className:"text-5xl mb-3",children:"🎉"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1104",className:"text-sm mb-1",style:{fontFamily:D.contentFontFamily,color:D.contentFontColor,opacity:.6},children:"You won!"}),n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1105",className:"font-black text-2xl mb-5 tracking-tight",style:{color:D.buttonColor,fontFamily:D.contentFontFamily},children:Z.label}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1113",className:"rounded-xl p-4 text-left mb-4",style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)"},children:[n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1117",className:"text-sm font-bold mb-1",style:{fontFamily:D.contentFontFamily,color:D.contentFontColor},children:"📬 Check your inbox!"}),n.jsxs("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1118",className:"text-xs leading-relaxed",style:{fontFamily:D.contentFontFamily,color:D.contentFontColor,opacity:.6},children:["We just sent your code to"," ",n.jsx("strong",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1120",className:"text-white/80",children:M||"[email protected]"}),"."," ","Open it now — check your Primary or Promotions tab."]})]}),Z.redirectUrl&&n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1126",className:"w-full py-3.5 rounded-xl font-bold uppercase tracking-wide text-center text-sm",style:{background:D.buttonColor,color:D.buttonFontColor,fontFamily:D.buttonFontFamily},children:"Claim My Prize →"}),n.jsx("button",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1134",className:"mt-4 text-xs text-white/30 hover:text-white/60 transition-colors",onClick:J,children:"↺ Preview again"})]})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1146",className:"p-4 border-t border-white/10",children:[n.jsx("p",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1147",className:"text-white/40 text-xs font-medium mb-2 uppercase tracking-wide",children:"Prize Odds"}),n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1148",className:"flex flex-wrap gap-2",children:k.map((xe,$e)=>n.jsxs("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1150",className:"flex items-center gap-1.5 bg-white/5 rounded-full px-3 py-1",children:[n.jsx("div",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1151",className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{background:xe.color}}),n.jsx("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1152",className:"text-white/70 text-xs",children:xe.label}),n.jsxs("span",{"data-loc":"client/src/pages/client/SpinWheelEditor.tsx:1153",className:"text-white/40 text-xs",children:["— ",xe.probability,"%"]})]},$e))})]})]})]})]})}function nCe({score:e}){const a=2*Math.PI*54,s=e/100*a,r=e>=80?"#34d399":e>=50?"#f59e0b":"#f87171",i=e>=80?"Excellent":e>=60?"Good":e>=40?"Fair":"Poor";return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:25",className:"relative flex items-center justify-center w-40 h-40",children:[n.jsxs("svg",{"data-loc":"client/src/pages/client/Deliverability.tsx:26",width:"160",height:"160",className:"-rotate-90",children:[n.jsx("circle",{"data-loc":"client/src/pages/client/Deliverability.tsx:27",cx:"80",cy:"80",r:54,fill:"none",stroke:"hsl(var(--border))",strokeWidth:"10"}),n.jsx("circle",{"data-loc":"client/src/pages/client/Deliverability.tsx:28",cx:"80",cy:"80",r:54,fill:"none",stroke:r,strokeWidth:"10",strokeDasharray:`${s} ${a}`,strokeLinecap:"round",style:{transition:"stroke-dasharray 0.8s cubic-bezier(0.23,1,0.32,1)"}})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:36",className:"absolute flex flex-col items-center",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:37",className:"text-4xl font-bold text-foreground",children:e}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:38",className:"text-xs text-muted-foreground mt-0.5",children:i})]})]})}function sCe({check:e}){return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:49",className:`flex items-start gap-3 p-3 rounded-lg border transition-colors ${e.pass?"border-emerald-500/20 bg-emerald-500/5":"border-red-500/20 bg-red-500/5"}`,children:[n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:52",className:"shrink-0 mt-0.5",children:e.pass?n.jsx(jn,{"data-loc":"client/src/pages/client/Deliverability.tsx:54",className:"w-4 h-4 text-emerald-400"}):n.jsx(gf,{"data-loc":"client/src/pages/client/Deliverability.tsx:55",className:"w-4 h-4 text-red-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:57",className:"flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:58",className:"flex items-center gap-2 flex-wrap",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:59",className:"text-sm font-medium text-foreground",children:e.label}),n.jsxs(Le,{"data-loc":"client/src/pages/client/Deliverability.tsx:60",variant:"outline",className:"text-[10px] px-1.5 py-0",children:["+",e.weight," pts"]})]}),!e.pass&&n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:63",className:"text-xs text-muted-foreground mt-1",children:e.fix})]})]})}function QN({title:e,icon:t,checks:a,color:s}){const r=a.filter(i=>i.pass).length;return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:79",className:"space-y-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:80",className:"flex items-center gap-2",children:[n.jsx(t,{"data-loc":"client/src/pages/client/Deliverability.tsx:81",className:`w-4 h-4 ${s}`}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:82",className:"text-sm font-semibold text-foreground",children:e}),n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:83",className:"text-xs text-muted-foreground",children:["(",r,"/",a.length," passed)"]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:85",className:"space-y-2",children:a.map(i=>n.jsx(sCe,{"data-loc":"client/src/pages/client/Deliverability.tsx:86",check:i},i.key))})]})}function M7({pct:e,size:t=80}
906){const a=t*.38,s=2*Math.PI*a,r=e/100*s,i=e>=80?"#34d399":e>=50?"#f59e0b":"#f87171";return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:99",className:"relative flex items-center justify-center",style:{width:t,height:t},children:[n.jsxs("svg",{"data-loc":"client/src/pages/client/Deliverability.tsx:100",width:t,height:t,className:"-rotate-90",children:[n.jsx("circle",{"data-loc":"client/src/pages/client/Deliverability.tsx:101",cx:t/2,cy:t/2,r:a,fill:"none",stroke:"hsl(var(--border))",strokeWidth:t*.09}),n.jsx("circle",{"data-loc":"client/src/pages/client/Deliverability.tsx:102",cx:t/2,cy:t/2,r:a,fill:"none",stroke:i,strokeWidth:t*.09,strokeDasharray:`${r} ${s}`,strokeLinecap:"round",style:{transition:"stroke-dasharray 0.6s cubic-bezier(0.23,1,0.32,1)"}})]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:110",className:"absolute text-sm font-bold text-foreground",children:[Math.round(e),"%"]})]})}function rCe({provider:e}){const t=e.total>0?e.inbox/e.total*100:0,a=e.total>0?e.spam/e.total*100:0,s=e.total>0?e.other/e.total*100:0;return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:123",className:"flex items-center gap-3 py-2.5 border-b border-border/50 last:border-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:124",className:"w-28 shrink-0",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:125",className:"text-sm font-medium text-foreground",children:e.provider}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:126",className:"text-[10px] text-muted-foreground",children:[e.total," seed",e.total!==1?"s":""]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:128",className:"flex-1 flex items-center gap-1 h-4 rounded-full overflow-hidden bg-muted/30",children:[t>0&&n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:130",className:"h-full bg-emerald-500 transition-all",style:{width:`${t}%`},title:`Inbox: ${Math.round(t)}%`}),a>0&&n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:133",className:"h-full bg-red-500 transition-all",style:{width:`${a}%`},title:`Spam: ${Math.round(a)}%`}),s>0&&n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:136",className:"h-full bg-muted transition-all",style:{width:`${s}%`},title:`Other: ${Math.round(s)}%`})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:139",className:"flex gap-3 shrink-0 text-xs",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:140",className:"text-emerald-400 font-medium w-10 text-right",children:[Math.round(t),"%"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:141",className:"text-red-400 w-10 text-right",children:[Math.round(a),"%"]})]})]})}function iCe(){const[e,t]=v.useState(null),[a,s]=v.useState(!1),{data:r}=le.deliverability.glock.getSetup.useQuery(),{data:i,isLoading:l}=le.deliverability.glock.getProject.useQuery(void 0,{enabled:!!r?.configured}),{data:d,isLoading:u,refetch:p}=le.deliverability.glock.getTests.useQuery({page:1},{enabled:!!r?.configured}),{data:x,isLoading:m}=le.deliverability.glock.getTestDetail.useQuery({testId:e},{enabled:!!e}),h=S=>{navigator.clipboard.writeText(S),s(!0),ne.success("Seed email copied!"),setTimeout(()=>s(!1),2e3)};if(!r?.configured)return n.jsx(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:175",className:"border-dashed",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:176",className:"pt-6 flex flex-col items-center gap-3 text-center py-10",children:[n.jsx(Gp,{"data-loc":"client/src/pages/client/Deliverability.tsx:177",className:"w-10 h-10 text-muted-foreground/40"}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:178",className:"text-sm font-medium text-foreground",children:"GlockApps not connected"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:179",className:"text-xs text-muted-foreground max-w-sm",children:["Connect your GlockApps account in ",n.jsx(It,{"data-loc":"client/src/pages/client/Deliverability.tsx:180",href:"/settings",className:"text-primary underline",children:"Settings → Integrations"})," to see real inbox placement data from 90+ seed addresses across Gmail, Outlook, Yahoo, and more."]})]})});const y=i?.autoTestEmail,w=d?.results?.[0],b=w?w.stats.inbox+w.stats.spam+w.stats.other+w.stats.notDelivered:0,j=w&&b>0?Math.round(w.stats.inbox/b*100):null;return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:193",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:195",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:196",className:"flex items-center gap-2",children:[n.jsx(BJ,{"data-loc":"client/src/pages/client/Deliverability.tsx:197",className:"w-5 h-5 text-cyan-400"}),n.jsx("h2",{"data-loc":"client/src/pages/client/Deliverability.tsx:198",className:"text-lg font-semibold text-foreground",children:"Inbox Placement Tests"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Deliverability.tsx:199",variant:"outline",className:"text-[10px]",children:"via GlockApps"})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Deliverability.tsx:201",variant:"outline",size:"sm",onClick:()=>p(),className:"gap-2",children:[n.jsx(Vr,{"data-loc":"client/src/pages/client/Deliverability.tsx:202",className:"w-3.5 h-3.5"}),"Refresh"]})]}),y&&n.jsx(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:209",className:"border-cyan-500/20 bg-cyan-500/5",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:210",className:"pt-4 pb-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:211",className:"flex items-start gap-3",children:[n.jsx(ja,{"data-loc":"client/src/pages/client/Deliverability.tsx:212",className:"w-4 h-4 text-cyan-400 shrink-0 mt-0.5"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:213",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:214",className:"text-sm font-medium text-foreground",children:"Your Seed Email Address"}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:215",className:"text-xs text-muted-foreground mt-0.5 mb-2",children:"Add this address to your campaign's recipient list, send the email, then check back here for results."}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:218",className:"flex items-center gap-2",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Deliverability.tsx:219",className:"text-xs bg-background border border-border rounded px-2 py-1 font-mono flex-1 truncate",children:y}),n.jsxs(te,{"data-loc":"client/src/pages/client/Deliverability.tsx:222",size:"sm",variant:"outline",className:"shrink-0 gap-1.5",onClick:()=>h(y),children:[n.jsx(Ra,{"data-loc":"client/src/pages/client/Deliverability.tsx:223",className:"w-3 h-3"}),a?"Copied!":"Copy"]})]})]})]})})}),u?n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:235",className:"grid grid-cols-3 gap-3",children:[...Array(3)].map((S,O)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Deliverability.tsx:236",className:"h-24 rounded-xl"},O))}):w?n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:239",className:"grid grid-cols-3 gap-3",children:[n.jsxs(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:240",className:"flex flex-col items-center justify-center py-4 gap-1 cursor-pointer hover:border-primary/40 transition-colors",onClick:()=>t(w.testId),children:[n.jsx(M7,{"data-loc":"client/src/pages/client/Deliverability.tsx:241",pct:j??0}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:242",className:"text-xs text-muted-foreground",children:"Inbox"})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:244",className:"flex flex-col items-center justify-center py-4 gap-1",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:245",className:"text-2xl font-bold text-red-400",children:[b>0?Math.round(w.stats.spam/b*100):0,"%"]}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:246",className:"text-xs text-muted-foreground",children:"Spam"})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:248",className:"flex flex-col items-center justify-center py-4 gap-1",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:249",className:"text-2xl font-bold text-muted-foreground",children:w.stats.inbox+w.stats.spam+w.stats.other+w.stats.notDelivered}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:250",className:"text-xs text-muted-foreground",children:"Seeds tested"})]})]}):n.jsx(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:254",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:255",className:"py-8 text-center text-sm text-muted-foreground",children:"No tests yet. Send your seed email to run your first inbox placement test."})}),d&&d.results.length>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:263",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Deliverability.tsx:264",className:"pb-2",children:n.jsx(St,{"data-loc":"client/src/pages/client/Deliverability.tsx:265",className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Test History"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:267",className:"p-0",children:d.results.map(S=>{const O=S.stats.inbox+S.stats.spam+S.stats.other+S.stats.notDelivered,A=O>0?Math.round(S.stats.inbox/O*100):0,k=O>0?Math.round(S.stats.spam/O*100):0,E=e===S.testId;return n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:274",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/Deliverability.tsx:275",className:`w-full flex items-center gap-3 px-4 py-3 hover:bg-muted/30 transition-colors text-left border-b border-border/50 last:border-0 ${E?"bg-muted/20":""}`,onClick:()=>t(E?null:S.testId),children:[n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:279",className:"shrink-0",children:n.jsx(M7,{"data-loc":"client/src/pages/client/Deliverability.tsx:280",pct:A,size:44})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:282",className:"flex-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:283",className:"text-sm font-medium text-foreground truncate",children:S.letter?.subject||"Untitled test"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:284",className:"text-xs text-muted-foreground",children:[new Date(S.created).toLocaleDateString()," · ",S.stats.inbox+S.stats.spam+S.stats.other+S.stats.notDelivered," seeds"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:288",className:"flex items-center gap-3 shrink-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:289",className:"flex items-center gap-1 text-xs",children:[n.jsx(zJ,{"data-loc":"client/src/pages/client/Deliverability.tsx:290",className:"w-3.5 h-3.5 text-emerald-400"}),n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:291",className:"text-emerald-400 font-medium",children:[A,"%"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:293",className:"flex items-center gap-1 text-xs",children:[n.jsx(Kg,{"data-loc":"client/src/pages/client/Deliverability.tsx:294",className:"w-3.5 h-3.5 text-red-400"}),n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:295",className:"text-red-400",children:[k,"%"]})]}),n.jsx(Es,{"data-loc":"client/src/pages/client/Deliverability.tsx:297",className:`w-4 h-4 text-muted-foreground transition-transform ${E?"rotate-90":""}`})]})]}),E&&n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:303",className:"px-4 pb-4 bg-muted/10 border-b border-border/50",children:m?n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:305",className:"space-y-2 pt-3",children:[...Array(4)].map((D,_)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Deliverability.tsx:306",className:"h-8"},_))}):x?n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:309",className:"pt-3 space-y-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:311",className:"flex gap-4 flex-wrap",children:(()=>{const D=x.inboxes?.[0];return[{label:"SPF",value:D?.spf},{label:"DKIM",value:D?.dkim},{label:"DMARC",value:D?.dmarc}]})().map(({label:D,value:_})=>n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:320",className:"flex items-center gap-1.5",children:[_==="pass"?n.jsx(jn,{"data-loc":"client/src/pages/client/Deliverability.tsx:321",className:"w-3.5 h-3.5 text-emerald-400"}):_==="fail"?n.jsx(gf,{"data-loc":"client/src/pages/client/Deliverability.tsx:322",className:"w-3.5 h-3.5 text-red-400"}):n.jsx(QI,{"data-loc":"client/src/pages/client/Deliverability.tsx:323",className:"w-3.5 h-3.5 text-muted-foreground"}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:324",className:"text-xs font-medium text-foreground",children:D}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:325",className:"text-xs text-muted-foreground capitalize",children:_||"n/a"})]},D))}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:330",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:331",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2",children:"Provider Breakdown"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:332",className:"flex items-center gap-3 mb-1.5 text-[10px] text-muted-foreground",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:333",className:"w-28 shrink-0"}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:334",className:"flex-1"}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:335",className:"w-10 text-right text-emerald-400",children:"Inbox"}),n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:336",className:"w-10 text-right text-red-400",children:"Spam"})]}),x.providerBreakdown.map(D=>n.jsx(rCe,{"data-loc":"client/src/pages/client/Deliverability.tsx:339",provider:D},D.provider))]})]}):null})]},S.testId)})})]})]})}function cCe(){const{data:e,isLoading:t,refetch:a,isFetching:s}=le.deliverability.getScore.useQuery(),r=e?.checks.filter(p=>p.category==="authentication")??[],i=e?.checks.filter(p=>p.category==="sending")??[],l=e?.checks.filter(p=>p.category==="list")??[],d=e?.checks.filter(p=>p.pass).length??0,u=e?.checks.length??8;return n.jsx(Pt,{"data-loc":"client/src/pages/client/Deliverability.tsx:368",title:"Deliverability",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:369",className:"p-6 max-w-4xl mx-auto 
906space-y-10",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:371",className:"space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:372",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:373",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Deliverability.tsx:374",className:"text-2xl font-bold text-foreground",children:"Deliverability Score"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:375",className:"text-sm text-muted-foreground mt-1",children:["A real-time health check of your sending setup and list quality.",e?.domain&&n.jsxs("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:377",className:"ml-1",children:["Checking ",n.jsx("span",{"data-loc":"client/src/pages/client/Deliverability.tsx:377",className:"font-mono text-foreground",children:e.domain}),"."]})]})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Deliverability.tsx:380",variant:"outline",size:"sm",onClick:()=>a(),disabled:s,className:"gap-2",children:[n.jsx(Vr,{"data-loc":"client/src/pages/client/Deliverability.tsx:381",className:`w-3.5 h-3.5 ${s?"animate-spin":""}`}),"Refresh"]})]}),t?n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:387",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[...Array(3)].map((p,x)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Deliverability.tsx:388",className:"h-32 rounded-xl"},x))}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:392",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[n.jsx(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:393",className:"md:col-span-1 flex items-center justify-center py-6",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:394",className:"flex flex-col items-center gap-3",children:[n.jsx(nCe,{"data-loc":"client/src/pages/client/Deliverability.tsx:395",score:e?.score??0}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:396",className:"text-xs text-muted-foreground text-center",children:[d," of ",u," checks passing"]})]})}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:401",className:"md:col-span-2",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Deliverability.tsx:402",className:"pb-3",children:n.jsx(St,{"data-loc":"client/src/pages/client/Deliverability.tsx:403",className:"text-sm font-semibold text-muted-foreground uppercase tracking-wide",children:"Sending Stats (last 30 days)"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:407",children:n.jsx("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:408",className:"grid grid-cols-2 gap-4",children:[{label:"Emails Sent",value:(e?.stats.totalSent??0).toLocaleString(),icon:ja,color:"text-blue-400"},{label:"Bounce Rate",value:`${(e?.stats.bounceRate??0).toFixed(2)}%`,icon:(e?.stats.bounceRate??0)<2?lh:_n,color:(e?.stats.bounceRate??0)<2?"text-emerald-400":"text-red-400",threshold:"< 2%"},{label:"Complaint Rate",value:`${(e?.stats.complaintRate??0).toFixed(3)}%`,icon:(e?.stats.complaintRate??0)<.1?lh:_n,color:(e?.stats.complaintRate??0)<.1?"text-emerald-400":"text-red-400",threshold:"< 0.1%"},{label:"List Engagement",value:`${(e?.stats.engagementRate??0).toFixed(1)}%`,icon:wa,color:(e?.stats.engagementRate??0)>=20?"text-emerald-400":"text-amber-400",threshold:"≥ 20%"}].map(({label:p,value:x,icon:m,color:h,threshold:y})=>n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:415",className:"flex items-start gap-2",children:[n.jsx(m,{"data-loc":"client/src/pages/client/Deliverability.tsx:416",className:`w-4 h-4 mt-0.5 shrink-0 ${h}`}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:417",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:418",className:"text-xs text-muted-foreground",children:p}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:419",className:"text-lg font-semibold text-foreground",children:x}),y&&n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:420",className:"text-[10px] text-muted-foreground",children:["Target: ",y]})]})]},p))})})]})]}),!e?.domain||e.domain==="your domain"?n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:430",className:"flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-500/5 p-4",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Deliverability.tsx:431",className:"w-4 h-4 text-amber-400 shrink-0 mt-0.5"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:432",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:433",className:"text-sm font-medium text-foreground",children:"No sending domain configured"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:434",className:"text-xs text-muted-foreground mt-1",children:["Add a verified sending domain in"," ",n.jsx(It,{"data-loc":"client/src/pages/client/Deliverability.tsx:436",href:"/settings",className:"text-primary underline",children:"Settings → Sending Domains"})," ","to unlock full authentication checks (DKIM, SPF, DMARC)."]})]})]}):null,n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:443",className:"space-y-6",children:[n.jsx(QN,{"data-loc":"client/src/pages/client/Deliverability.tsx:444",title:"Email Authentication",icon:js,checks:r,color:"text-violet-400"}),n.jsx(QN,{"data-loc":"client/src/pages/client/Deliverability.tsx:445",title:"Sending Health",icon:Pa,checks:i,color:"text-blue-400"}),n.jsx(QN,{"data-loc":"client/src/pages/client/Deliverability.tsx:446",title:"List Quality",icon:wa,checks:l,color:"text-cyan-400"})]}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Deliverability.tsx:449",className:"border-primary/20 bg-primary/5",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Deliverability.tsx:450",className:"pt-4",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:451",className:"flex items-start gap-3",children:[n.jsx(Uv,{"data-loc":"client/src/pages/client/Deliverability.tsx:452",className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Deliverability.tsx:453",className:"space-y-1.5 text-xs text-muted-foreground",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:454",className:"font-medium text-foreground text-sm",children:"Pro tips for inbox placement"}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:455",children:"• Aim for a score of 80+ before sending to large lists. Gmail and Yahoo use authentication signals as a primary spam filter."}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:456",children:["• After adding SPF and DMARC records, click ",n.jsx("strong",{"data-loc":"client/src/pages/client/Deliverability.tsx:456",children:"Refresh"})," above or use the refresh button on your domain in Settings to update the status."]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:457",children:["• DMARC in ",n.jsx("code",{"data-loc":"client/src/pages/client/Deliverability.tsx:457",children:"p=none"})," mode is safe to deploy immediately — it monitors without blocking. Upgrade to ",n.jsx("code",{"data-loc":"client/src/pages/client/Deliverability.tsx:457",children:"p=quarantine"})," after 30 days of clean reports."]}),n.jsx("p",{"data-loc":"client/src/pages/client/Deliverability.tsx:458",children:"• List engagement below 20% signals to inbox providers that recipients don't want your emails. Suppress cold contacts regularly."})]})]})})})]})]}),n.jsx(iCe,{"data-loc":"client/src/pages/client/Deliverability.tsx:468"})]})})}function lCe(e,t,a="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:a}).format(t).split(/\s/g).slice(2).join(" ")}const oCe={},Fp={};function ql(e,t){try{const s=(oCe[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return s in Fp?Fp[s]:R7(s,s.split(":"))}catch{if(e in Fp)return Fp[e];const a=e?.match(dCe);return a?R7(e,a.slice(1)):NaN}}const dCe=/([+-]\d\d):?(\d\d)?/;function R7(e,t){const a=+(t[0]||0),s=+(t[1]||0),r=+(t[2]||0)/60;return Fp[e]=a*60+s>0?a*60+s+r:a*60-s-r}class zr extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ql(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])
vendor: 4,424 bytes, line 906
906):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),RW(this),x5(this)):this.setTime(Date.now())}static tz(t,...a){return a.length?new zr(...a,t):new zr(Date.now(),t)}withTimeZone(t){return new zr(+this,t)}getTimezoneOffset(){const t=-ql(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),x5(this),+this}[Symbol.for("constructDateFrom")](t){return new zr(+new Date(t),this.timeZone)}}const B7=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!B7.test(e))return;const t=e.replace(B7,"$1UTC");zr.prototype[t]&&(e.startsWith("get")?zr.prototype[e]=function(){return this.internal[t]()}:(zr.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),uCe(this),+this},zr.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),x5(this),+this}))});function x5(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-ql(e.timeZone,e)*60))}function uCe(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),RW(e)}function RW(e){const t=ql(e.timeZone,e),a=t>0?Math.floor(t):Math.ceil(t),s=new Date(+e);s.setUTCHours(s.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),i=-new Date(+s).getTimezoneOffset(),l=r-i,d=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();l&&d&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+l);const u=r-a;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const p=new Date(+e);p.setUTCSeconds(0);const x=r>0?p.getSeconds():(p.getSeconds()-60)%60,m=Math.round(-(ql(e.timeZone,e)*60))%60;(m||x)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+m),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+m+x));const h=ql(e.timeZone,e),y=h>0?Math.floor(h):Math.ceil(h),b=-new Date(+e).getTimezoneOffset()-y,j=y!==a,S=b-u;if(j&&S){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S);const O=ql(e.timeZone,e),A=O>0?Math.floor(O):Math.ceil(O),k=y-A;k&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+k),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+k))}}class In extends zr{static tz(t,...a){return a.length?new In(...a,t):new In(Date.now(),t)}toISOString(){const[t,a,s]=this.tzComponents(),r=`${t}${a}:${s}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,a,s,r]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${s} ${a} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[a,s,r]=this.tzComponents();return`${t} GMT${a}${s}${r} (${lCe(this.timeZone,this)})`}toLocaleString(t,a){return Date.prototype.toLocaleString.call(this,t,{...a,timeZone:a?.timeZone||this.timeZone})}toLocaleDateString(t,a){return Date.prototype.toLocaleDateString.call(this,t,{...a,timeZone:a?.timeZone||this.timeZone})}toLocaleTimeString(t,a){return Date.prototype.toLocaleTimeString.call(this,t,{...a,timeZone:a?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),a=t>0?"-":"+",s=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[a,s,r]}withTimeZone(t){return new In(+this,t)}[Symbol.for("constructDateFrom")](t){return new In(+new Date(t),this.timeZone)}}const I7=5,pCe=4;function fCe(e,t){const a=t.startOfMonth(e),s=a.getDay()>0?a.getDay():7,r=t.addDays(e,-s+1),i=t.addDays(r,I7*7-1);return t.getMonth(e)===t.getMonth(i)?I7:pCe}function BW(e,t){const a=t.startOfMonth(e),s=a.getDay();return s===1?a:s===0?t.addDays(a,-6):t.addDays(a,-1*(s-1))}function mCe(e,t){const a=BW(e,t),s=fCe(e,t);return t.addDays(a,s*7-1)}class Ds{constructor(t,a){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?In.tz(this.options.timeZone):new this.Date,this.newDate=(s,r,i)=>this.overrides?.newDate?this.overrides.newDate(s,r,i):this.options.timeZone?new In(s,r,i,this.options.timeZone):new Date(s,r,i),this.addDays=(s,r)=>this.overrides?.addDays?this.overrides.addDays(s,r):Sq(s,r),this.addMonths=(s,r)=>this.overrides?.addMonths?this.overrides.addMonths(s,r):Cq(s,r),this.addWeeks=(s,r)=>
vendor: 7,231 bytes, line 906
906this.overrides?.addWeeks?this.overrides.addWeeks(s,r):t0e(s,r),this.addYears=(s,r)=>this.overrides?.addYears?this.overrides.addYears(s,r):a0e(s,r),this.differenceInCalendarDays=(s,r)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(s,r):Aq(s,r),this.differenceInCalendarMonths=(s,r)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(s,r):c0e(s,r),this.eachMonthOfInterval=s=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(s):o0e(s),this.eachYearOfInterval=s=>{const r=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(s):p0e(s),i=new Set(r.map(d=>this.getYear(d)));if(i.size===r.length)return r;const l=[];return i.forEach(d=>{l.push(new Date(d,0,1))}),l},this.endOfBroadcastWeek=s=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(s):mCe(s,this),this.endOfISOWeek=s=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(s):f0e(s),this.endOfMonth=s=>this.overrides?.endOfMonth?this.overrides.endOfMonth(s):l0e(s),this.endOfWeek=(s,r)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(s,r):_q(s,this.options),this.endOfYear=s=>this.overrides?.endOfYear?this.overrides.endOfYear(s):u0e(s),this.format=(s,r,i)=>{const l=this.overrides?.format?this.overrides.format(s,r,this.options):ef(s,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(l):l},this.getISOWeek=s=>this.overrides?.getISOWeek?this.overrides.getISOWeek(s):Tq(s),this.getMonth=(s,r)=>this.overrides?.getMonth?this.overrides.getMonth(s,this.options):d1e(s,this.options),this.getYear=(s,r)=>this.overrides?.getYear?this.overrides.getYear(s,this.options):u1e(s,this.options),this.getWeek=(s,r)=>this.overrides?.getWeek?this.overrides.getWeek(s,this.options):Mq(s,this.options),this.isAfter=(s,r)=>this.overrides?.isAfter?this.overrides.isAfter(s,r):p1e(s,r),this.isBefore=(s,r)=>this.overrides?.isBefore?this.overrides.isBefore(s,r):f1e(s,r),this.isDate=s=>this.overrides?.isDate?this.overrides.isDate(s):Dq(s),this.isSameDay=(s,r)=>this.overrides?.isSameDay?this.overrides.isSameDay(s,r):r0e(s,r),this.isSameMonth=(s,r)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(s,r):m1e(s,r),this.isSameYear=(s,r)=>this.overrides?.isSameYear?this.overrides.isSameYear(s,r):x1e(s,r),this.max=s=>this.overrides?.max?this.overrides.max(s):n0e(s),this.min=s=>this.overrides?.min?this.overrides.min(s):s0e(s),this.setMonth=(s,r)=>this.overrides?.setMonth?this.overrides.setMonth(s,r):_1e(s,r),this.setYear=(s,r)=>this.overrides?.setYear?this.overrides.setYear(s,r):T1e(s,r),this.startOfBroadcastWeek=(s,r)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(s,this):BW(s,this),this.startOfDay=s=>this.overrides?.startOfDay?this.overrides.startOfDay(s):im(s),this.startOfISOWeek=s=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(s):rm(s),this.startOfMonth=s=>this.overrides?.startOfMonth?this.overrides.startOfMonth(s):d0e(s),this.startOfWeek=(s,r)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(s,this.options):nu(s,this.options),this.startOfYear=s=>this.overrides?.startOfYear?this.overrides.startOfYear(s):kq(s),this.options={locale:f4,...t},this.overrides=a}getDigitMap(){const{numerals:t="latn"}=this.options,a=new Intl.NumberFormat("en-US",{numberingSystem:t}),s={};for(let r=0;r<10;r++)s[r.toString()]=a.format(r);return s}replaceDigits(t){const a=this.getDigitMap();return t.replace(/\d/g,s=>a[s]||s)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){const t=this.options.locale?.code;return t&&Ds.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:a,timeZone:s,numerals:r}=this.options,i=a?.code;if(i&&Ds.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:s,numberingSystem:r}).format(t)}catch{}const l=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,l)}}Ds.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const ei=new Ds;class IW{constructor(t,a,s=ei){this.date=t,this.displayMonth=a,this.outside=!!(a&&!s.isSameMonth(t,a)),this.dateLib=s}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class xCe{constructor(t,a){this.date=t,this.weeks=a}}class gCe{constructor(t,a){this.days=a,this.weekNumber=t}}function hCe(e){return W.createElement("button",{...e})}function vCe(e){return W.createElement("span",{...e})}function yCe(e){const{size:t=24,orientation:a="left",className:s}=e;return W.createElement("svg",{className:s,width:t,height:t,viewBox:"0 0 24 24"},a==="up"&&W.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),a==="down"&&W.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),a==="left"&&W.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),a==="right"&&W.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function bCe(e){const{day:t,modifiers:a,...s}=e;return W.createElement("td",{...s})}function jCe(e){const{day:t,modifiers:a,...s}=e,r=W.useRef(null);return W.useEffect(()=>{a.focused&&r.current?.focus()},[a.focused]),W.createElement("button",{ref:r,...s})}var yt;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(yt||(yt={}));var $a;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})($a||($a={}));var or;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(or||(or={}));var vs;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(vs||(vs={}));function wCe(e){const{options:t,className:a,components:s,classNames:r,...i}=e,l=[r[yt.Dropdown],a].join(" "),d=t?.find(({value:u})=>u===i.value);return W.createElement("span",{"data-disabled":i.disabled,className:r[yt.DropdownRoot]},W.createElement(s.Select,{className:l,...i},t?.map(({value:u,label:p,disabled:x})=>W.createElement(s.Option,{key:u,value:u,disabled:x},p))),W.createElement("span",{className:r[yt.CaptionLabel],"aria-hidden":!0},d?.label,W.createElement(s.Chevron,{orientation:"down",size:18,className:r[yt.Chevron]}
vendor: 17,973 bytes, line 906
906)))}function NCe(e){return W.createElement("div",{...e})}function SCe(e){return W.createElement("div",{...e})}function CCe(e){const{calendarMonth:t,displayIndex:a,...s}=e;return W.createElement("div",{...s},e.children)}function ECe(e){const{calendarMonth:t,displayIndex:a,...s}=e;return W.createElement("div",{...s})}function ACe(e){return W.createElement("table",{...e})}function DCe(e){return W.createElement("div",{...e})}const LW=v.createContext(void 0);function Vm(){const e=v.useContext(LW);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function OCe(e){const{components:t}=Vm();return W.createElement(t.Dropdown,{...e})}function kCe(e){const{onPreviousClick:t,onNextClick:a,previousMonth:s,nextMonth:r,...i}=e,{components:l,classNames:d,labels:{labelPrevious:u,labelNext:p}}=Vm(),x=v.useCallback(h=>{r&&a?.(h)},[r,a]),m=v.useCallback(h=>{s&&t?.(h)},[s,t]);return W.createElement("nav",{...i},W.createElement(l.PreviousMonthButton,{type:"button",className:d[yt.PreviousMonthButton],tabIndex:s?void 0:-1,"aria-disabled":s?void 0:!0,"aria-label":u(s),onClick:m},W.createElement(l.Chevron,{disabled:s?void 0:!0,className:d[yt.Chevron],orientation:"left"})),W.createElement(l.NextMonthButton,{type:"button",className:d[yt.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":p(r),onClick:x},W.createElement(l.Chevron,{disabled:r?void 0:!0,orientation:"right",className:d[yt.Chevron]})))}function _Ce(e){const{components:t}=Vm();return W.createElement(t.Button,{...e})}function TCe(e){return W.createElement("option",{...e})}function PCe(e){const{components:t}=Vm();return W.createElement(t.Button,{...e})}function MCe(e){const{rootRef:t,...a}=e;return W.createElement("div",{...a,ref:t})}function RCe(e){return W.createElement("select",{...e})}function BCe(e){const{week:t,...a}=e;return W.createElement("tr",{...a})}function ICe(e){return W.createElement("th",{...e})}function LCe(e){return W.createElement("thead",{"aria-hidden":!0},W.createElement("tr",{...e}))}function $Ce(e){const{week:t,...a}=e;return W.createElement("th",{...a})}function zCe(e){return W.createElement("th",{...e})}function UCe(e){return W.createElement("tbody",{...e})}function qCe(e){const{components:t}=Vm();return W.createElement(t.Dropdown,{...e})}const FCe=Object.freeze(Object.defineProperty({__proto__:null,Button:hCe,CaptionLabel:vCe,Chevron:yCe,Day:bCe,DayButton:jCe,Dropdown:wCe,DropdownNav:NCe,Footer:SCe,Month:CCe,MonthCaption:ECe,MonthGrid:ACe,Months:DCe,MonthsDropdown:OCe,Nav:kCe,NextMonthButton:_Ce,Option:TCe,PreviousMonthButton:PCe,Root:MCe,Select:RCe,Week:BCe,WeekNumber:$Ce,WeekNumberHeader:zCe,Weekday:ICe,Weekdays:LCe,Weeks:UCe,YearsDropdown:qCe},Symbol.toStringTag,{value:"Module"}));function Ei(e,t,a=!1,s=ei){let{from:r,to:i}=e;const{differenceInCalendarDays:l,isSameDay:d}=s;return r&&i?(l(i,r)<0&&([r,i]=[i,r]),l(t,r)>=(a?1:0)&&l(i,t)>=(a?1:0)):!a&&i?d(i,t):!a&&r?d(r,t):!1}function $W(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function _4(e){return!!(e&&typeof e=="object"&&"from"in e)}function zW(e){return!!(e&&typeof e=="object"&&"after"in e)}function UW(e){return!!(e&&typeof e=="object"&&"before"in e)}function qW(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function FW(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ai(e,t,a=ei){const s=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:i,isAfter:l}=a;return s.some(d=>{if(typeof d=="boolean")return d;if(a.isDate(d))return r(e,d);if(FW(d,a))return d.includes(e);if(_4(d))return Ei(d,e,!1,a);if(qW(d))return Array.isArray(d.dayOfWeek)?d.dayOfWeek.includes(e.getDay()):d.dayOfWeek===e.getDay();if($W(d)){const u=i(d.before,e),p=i(d.after,e),x=u>0,m=p<0;return l(d.before,d.after)?m&&x:x||m}return zW(d)?i(e,d.after)>0:UW(d)?i(d.before,e)>0:typeof d=="function"?d(e):!1})}function WCe(e,t,a,s,r){const{disabled:i,hidden:l,modifiers:d,showOutsideDays:u,broadcastCalendar:p,today:x}=t,{isSameDay:m,isSameMonth:h,startOfMonth:y,isBefore:w,endOfMonth:b,isAfter:j}=r,S=a&&y(a),O=s&&b(s),A={[$a.focused]:[],[$a.outside]:[],[$a.disabled]:[],[$a.hidden]:[],[$a.today]:[]},k={};for(const E of e){const{date:D,displayMonth:_}=E,T=!!(_&&!h(D,_)),I=!!(S&&w(D,S)),$=!!(O&&j(D,O)),R=!!(i&&Ai(D,i,r)),B=!!(l&&Ai(D,l,r))||I||$||!p&&!u&&T||p&&u===!1&&T,Y=m(D,x??r.today());T&&A.outside.push(E),R&&A.disabled.push(E),B&&A.hidden.push(E),Y&&A.today.push(E),d&&Object.keys(d).forEach(z=>{const Q=d?.[z];Q&&Ai(D,Q,r)&&(k[z]?k[z].push(E):k[z]=[E])})}return E=>{const D={[$a.focused]:!1,[$a.disabled]:!1,[$a.hidden]:!1,[$a.outside]:!1,[$a.today]:!1},_={};for(const T in A){const I=A[T];D[T]=I.some($=>$===E)}for(const T in k)_[T]=k[T].some(I=>I===E);return{...D,..._}}}function HCe(e,t,a={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[i])=>(a[i]?r.push(a[i]):t[$a[i]]?r.push(t[$a[i]]):t[or[i]]&&r.push(t[or[i]]),r),[t[yt.Day]])}function VCe(e){return{...FCe,...e}}function GCe(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([a,s])=>{a.startsWith("data-")&&(t[a]=s)}),t}function T4(){const e={};for(const t in yt)e[yt[t]]=`rdp-${yt[t]}`;for(const t in $a)e[$a[t]]=`rdp-${$a[t]}`;for(const t in or)e[or[t]]=`rdp-${or[t]}`;for(const t in vs)e[vs[t]]=`rdp-${vs[t]}`;return e}function WW(e,t,a){return(a??new Ds(t)).formatMonthYear(e)}const YCe=WW;function KCe(e,t,a){return(a??new Ds(t)).format(e,"d")}function QCe(e,t=ei){return t.format(e,"LLLL")}function XCe(e,t,a){return(a??new Ds(t)).format(e,"cccccc")}function ZCe(e,t=ei){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function JCe(){return""}function HW(e,t=ei){return t.format(e,"yyyy")}const e5e=HW,t5e=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:WW,formatDay:KCe,formatMonthCaption:YCe,formatMonthDropdown:QCe,formatWeekNumber:ZCe,formatWeekNumberHeader:JCe,formatWeekdayName:XCe,formatYearCaption:e5e,formatYearDropdown:HW},Symbol.toStringTag,{value:"Module"}));function a5e(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...t5e,...e}}function n5e(e,t,a,s,r){const{startOfMonth:i,startOfYear:l,endOfYear:d,eachMonthOfInterval:u,getMonth:p}=r;return u({start:l(e),end:d(e)}).map(h=>{const y=s.formatMonthDropdown(h,r),w=p(h),b=t&&h<i(t)||a&&h>i(a)||!1;return{value:w,label:y,disabled:b}})}function s5e(e,t={},a={}){let s={...t?.[yt.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{s={...s,...a?.[r]}}),s}function r5e(e,t,a){const s=e.today(),r=t?e.startOfISOWeek(s):e.startOfWeek(s),i=[];for(let l=0;l<7;l++){const d=e.addDays(r,l);i.push(d)}return i}function i5e(e,t,a,s,r=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:l,eachYearOfInterval:d,getYear:u}=s,p=i(e),x=l(t),m=d({start:p,end:x});return r&&m.reverse(),m.map(h=>{const y=a.formatYearDropdown(h,s);return{value:u(h),label:y,disabled:!1}})}function VW(e,t,a,s){let r=(s??new Ds(a)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const c5e=VW;function GW(e,t,a){return(a??new Ds(t)).formatMonthYear(e)}const l5e=GW;function o5e(e,t,a,s){let r=(s??new Ds(a)).format(e,"PPPP");return t?.today&&(r=`Today, ${r}`),r}function d5e(e){return"Choose the Month"}function u5e(){return""}function p5e(e){return"Go to the Next Month"}function f5e(e){return"Go to the Previous Month"}function m5e(e,t,a){return(a??new Ds(t)).format(e,"cccc")}function x5e(e,t){return`Week ${e}`}function g5e(e){return"Week Number"}function h5e(e){return"Choose the Year"}const v5e=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:l5e,labelDay:c5e,labelDayButton:VW,labelGrid:GW,labelGridcell:o5e,labelMonthDropdown:d5e,labelNav:u5e,labelNext:p5e,labelPrevious:f5e,labelWeekNumber:x5e,labelWeekNumberHeader:g5e,labelWeekday:m5e,labelYearDropdown:h5e},Symbol.toStringTag,{value:"Module"})),Gm=e=>e instanceof HTMLElement?e:null,XN=e=>[...e.querySelectorAll("[data-animated-month]")??[]],y5e=e=>Gm(e.querySelector("[data-animated-month]")),ZN=e=>Gm(e.querySelector("[data-animated-caption]")),JN=e=>Gm(e.querySelector("[data-animated-weeks]")),b5e=e=>Gm(e.querySelector("[data-animated-nav]")),j5e=e=>Gm(e.querySelector("[data-animated-weekdays]"));function w5e(e,t,{classNames:a,months:s,focused:r,dateLib:i}){const l=v.useRef(null),d=v.useRef(s),u=v.useRef(!1);v.useLayoutEffect(()=>{const p=d.current;if(d.current=s,!t||!e.current||!(e.current instanceof HTMLElement)||s.length===0||p.length===0||s.length!==p.length)return;const x=i.isSameMonth(s[0].date,p[0].date),m=i.isAfter(s[0].date,p[0].date),h=m?a[vs.caption_after_enter]:a[vs.caption_before_enter],y=m?a[vs.weeks_after_enter]:a[vs.weeks_before_enter],w=l.current,b=e.current.cloneNode(!0);if(b instanceof HTMLElement?(XN(b).forEach(A=>{if(!(A instanceof HTMLElement))return;const k=y5e(A);k&&A.contains(k)&&A.removeChild(k);const E=ZN(A);E&&E.classList.remove(h);const D=JN(A);D&&D.classList.remove(y)}),l.current=b):l.current=null,u.current||x||r)return;const j=w instanceof HTMLElement?XN(w):[],S=XN(e.current);if(S?.every(O=>O instanceof HTMLElement)&&j&&j.every(O=>O instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const O=b5e(e.current);O&&(O.style.zIndex="1"),S.forEach((A,k)=>{const E=j[k];if(!E)return;A.style.position="relative",A.style.overflow="hidden";const D=ZN(A);D&&D.classList.add(h);const _=JN(A);_&&_.classList.add(y);const T=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),O&&(O.style.zIndex=""),D&&D.classList.remove(h),_&&_.classList.remove(y),A.style.position="",A.style.overflow="",A.contains(E)&&A.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=j5e(E);I&&(I.style.opacity="0");const $=ZN(E);$&&($.classList.add(m?a[vs.caption_before_exit]:a[vs.caption_after_exit]),$.addEventListener("animationend",T));const R=JN(E);R&&R.classList.add(m?a[vs.weeks_before_exit]:a[vs.weeks_after_exit]),A.insertBefore(E,A.firstChild)})}})}function N5e(e,t,a,s){const r=e[0],i=e[e.length-1],{ISOWeek:l,fixedWeeks:d,broadcastCalendar:u}=a??{},{addDays:p,differenceInCalendarDays:x,differenceInCalendarMonths:m,endOfBroadcastWeek:h,endOfISOWeek:y,endOfMonth:w,endOfWeek:b,isAfter:j,startOfBroadcastWeek:S,startOfISOWeek:O,startOfWeek:A}=s,k=u?S(r,s):l?O(r):A(r),E=u?h(i):l?y(w(i)):b(w(i)),D=x(E,k),_=m(i,r)+1,T=[];for(let R=0;R<=D;R++){const B=p(k,R);if(t&&j(B,t))break;T.push(B)}const $=(u?35:42)*_;if(d&&T.length<$){const R=$-T.length;for(let B=0;B<R;B++){const Y=p(T[T.length-1],1);T.push(Y)}}return T}function S5e(e){const t=[];return e.reduce((a,s)=>{const r=s.weeks.reduce((i,l)=>i.concat(l.days.slice()),t.slice());return a.concat(r.slice())},t.slice())}function C5e(e,t,a,s){const{numberOfMonths:r=1}=a,i=[];for(let l=0;l<r;l++){const d=s.addMonths(e,l);if(t&&d>t)break;i.push(d)}return i}function L7(e,t,a,s){const{month:r,defaultMonth:i,today:l=s.today(),numberOfMonths:d=1}=e;let u=r||i||l;const{differenceInCalendarMonths:p,addMonths:x,startOfMonth:m}=s;if(a&&p(a,u)<d-1){const h=-1*(d-1);u=x(a,h)}return t&&p(u,t)<0&&(u=t),m(u)}function E5e(e,t,a,s){const{addDays:r,endOfBroadcastWeek:i,endOfISOWeek:l,endOfMonth:d,endOfWeek:u,getISOWeek:p,getWeek:x,startOfBroadcastWeek:m,startOfISOWeek:h,startOfWeek:y}=s,w=e.reduce((b,j)=>{const S=a.broadcastCalendar?m(j,s):a.ISOWeek?h(j):y(j),O=a.broadcastCalendar?i(j):a.ISOWeek?l(d(j)):u(d(j)),A=t.filter(_=>_>=S&&_<=O),k=a.broadcastCalendar?35:42;if(a.fixedWeeks&&A.length<k){const _=t.filter(T=>{const I=k-A.length;return T>O&&T<=r(O,I)});A.push(..._)}const E=A.reduce((_,T)=>{const I=a.ISOWeek?p(T):x(T),$=_.find(B=>B.weekNumber===I),R=new IW(T,j,s);return $?$.days.push(R):_.push(new gCe(I,[R])),_},[]),D=new xCe(j,E);return b.push(D),b},[]);return a.reverseMonths?w.reverse():w}function A5e(e,t){let{startMonth:a,endMonth:s}=e;const{startOfYear:r,startOfDay:i,startOfMonth:l,endOfMonth:d,addYears:u,endOfYear:p,newDate:x,today:m}=t,{fromYear:h,toYear:y,fromMonth:w,toMonth:b}=e;!a&&w&&(a=w),!a&&h&&(a=t.newDate(h,0,1)),!s&&b&&(s=b),!s&&y&&(s=x(y,11,31));const j=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return a?a=l(a):h?a=x(h,0,1):!a&&j&&(a=r(u(e.today??m(),-100))),s?s=d(s):y?s=x(y,11,31):!s&&j&&(s=p(e.today??m())),[a&&i(a),s&&i(s)]}function D5e(e,t,a,s){if(a.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:i=1}=a,{startOfMonth:l,addMonths:d,differenceInCalendarMonths:u}=s,p=r?i:1,x=l(e);if(!t)return d(x,p);if(!(u(t,e)<i))return d(x,p)}function O5e(e,t,a,s){if(a.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:i}=a,{startOfMonth:l,addMonths:d,differenceInCalendarMonths:u}=s,p=r?i??1:1,x=l(e);if(!t)return d(x,-p);if(!(u(x,t)<=0))return d(x,-p)}function k5e(e){const t=[];return e.reduce((a,s)=>a.concat(s.weeks.slice()),t.slice())}function Zy(e,t){const[a,s]=v.useState(e);return[t===void 0?a:t,s]}function _5e(e,t){const[a,s]=A5e(e,t),{startOfMonth:r,endOfMonth:i}=t,l=L7(e,a,s,t),[d,u]=Zy(l,e.month?l:void 0);v.useEffect(()=>{const D=L7(e,a,s,t);u(D)},[e.timeZone]);const p=C5e(d,s,e,t),x=N5e(p,e.endMonth?i(e.endMonth):void 0,e,t),m=E5e(p,x,e,t),h=k5e(m),y=S5e(m),w=O5e(d,a,e,t),b=D5e(d,s,e,t),{disableNavigation:j,onMonthChange:S}=e,O=D=>h.some(_=>_.days.some(T=>T.isEqualTo(D))),A=D=>{if(j)return;let _=r(D);a&&_<r(a)&&(_=r(a)),s&&_>r(s)&&(_=r(s)),u(_),S?.(_)};return{months:m,weeks:h,days:y,navStart:a,navEnd:s,previousMonth:w,nextMonth:b,goToMonth:A,goToDay:D=>{O(D)||A(D.date)}}}var Pr;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Pr||(Pr={}));function $7(e){return!e[$a.disabled]&&!e[$a.hidden]&&!e[$a.outside]}function T5e(e,t,a,s){let r,i=-1;for(const l of e){const d=t(l);$7(d)&&(d[$a.focused]&&i<Pr.FocusedModifier?(r=l,i=Pr.FocusedModifier):s?.isEqualTo(l)&&i<Pr.LastFocused?(r=l,i=Pr.LastFocused):a(l.date)&&i<Pr.Selected?(r=l,i=Pr.Selected):d[$a.today]&&i<Pr.Today&&(r=l,i=Pr.Today))}return r||(r=e.find(l=>$7(t(l)))),r}function P5e(e,t,a,s,r,i,l){const{ISOWeek:d,broadcastCalendar:u}=i,{addDays:p,addMonths:x,addWeeks:m,addYears:h,endOfBroadcastWeek:y,endOfISOWeek:w,endOfWeek:b,max:j,min:S,startOfBroadcastWeek:O,startOfISOWeek:A,startOfWeek:k}=l;let D={day:p,week:m,month:x,year:h,startOfWeek:_=>u?O(_,l):d?A(_):k(_),endOfWeek:_=>u?y(_):d?w(_):b(_)}[e](a,t==="after"?1:-1);return t==="before"&&s?D=j([s,D]):t==="after"&&r&&(D=S([r,D])),D}function YW(e,t,a,s,r,i,l,d=0){if(d>365)return;const u=P5e(e,t,a.date,s,r,i,l),p=!!(i.disabled&&Ai(u,i.disabled,l)),x=!!(i.hidden&&Ai(u,i.hidden,l)),m=u,h=new IW(u,m,l);return!p&&!x?h:YW(e,t,h,s,r,i,l,d+1)}function M5e(e,t,a,s,r){const{autoFocus:i}=e,[l,d]=v.useState(),u=T5e(t.days,a,s||(()=>!1),l),[p,x]=v.useState(i?u:void 0);return{isFocusTarget:b=>!!u?.isEqualTo(b),setFocused:x,focused:p,blur:()=>{d(p),x(void 0)},moveFocus:(b,j)=>{if(!p)return;const S=YW(b,j,p,t.navStart,t.navEnd,e,r);S&&(e.disableNavigation&&!t.days.some(A=>A.isEqualTo(S))||(t.goToDay(S),x(S)))}}}function R5e(e,t){const{selected:a,required:s,onSelect:r}=e,[i,l]=Zy(a,r?a:void 0),d=r?a:i,{isSameDay:u}=t,p=y=>d?.some(w=>u(w,y))??!1,{min:x,max:m}=e;return{selected:d,select:(y,w,b)=>{let j=[...d??[]];if(p(y)){if(d?.length===x||s&&d?.length===1)return;j=d?.filter(S=>!u(S,y))}else d?.length===m?j=[y]:j=[...j,y];return r||l(j),r?.(j,y,w,b),j},isSelected:p}}function B5e(e,t,a=0,s=0,r=!1,i=ei){const{from:l,to:d}=t||{},{isSameDay:u,isAfter:p,isBefore:x}=i;let m;if(!l&&!d)m={from:e,to:a>0?void 0:e};else if(l&&!d)u(l,e)?a===0?m={from:l,to:e}:r?m={from:l,to:void 0}:m=void 0:x(e,l)?m={from:e,to:l}:m={from:l,to:e};else if(l&&d)if(u(l,e)&&u(d,e))r?m={from:l,to:d}:m=void 0;else if(u(l,e))m={from:l,to:a>0?void 0:e};else if(u(d,e))m={from:e,to:a>0?void 0:e};else if(x(e,l))m={from:e,to:d};else if(p(e,l))m={from:l,to:e};else if(p(e,d))m={from:l,to:e};else throw new Error("Invalid range");if(m?.from&&m?.to){const h=i.differenceInCalendarDays(m.to,m.from);s>0&&h>s?m={from:e,to:void 0}:a>1&&h<a&&(m={from:e,to:void 0})}return m}function I5e(e,t,a=ei){const s=Array.isArray(t)?t:[t];let r=e.from;const i=a.differenceInCalendarDays(e.to,e.from),l=Math.min(i,6);for(let d=0;d<=l;d++){if(s.includes(r.getDay()))return!0;r=a.addDays(r,1)}return!1}function z7(e,t,a=ei){return Ei(e,t.from,!1,a)||Ei(e,t.to,!1,a)||Ei(t,e.from,!1,a)||Ei(t,e.to,!1,a)}function L5e(e,t,a=ei){const s=Array.isArray(t)?t:[t];if(s.filter(d=>typeof d!="function").some(d=>typeof d=="boolean"?d:a.isDate(d)?Ei(e,d,!1,a):FW(d,a)?d.some(u=>Ei(e,u,!1,a)):_4(d)?d.from&&d.to?z7(e,{from:d.from,to:d.to},a):!1:qW(d)?I5e(e,d.dayOfWeek,a):$W(d)?a.isAfter(d.before,d.after)?z7(e,{from:a.addDays(d.after,1),to:a.addDays(d.before,-1)},a):Ai(e.from,d,a)||Ai(e.to,d,a):zW(d)||UW(d)?Ai(e.from,d,a)||Ai(e.to,d,a):!1))return!0;const l=s.filter(d=>typeof d=="function");if(l.length){let d=e.from;const u=a.differenceInCalendarDays(e.to,e.from);for(let p=0;p<=u;p++){if(l.some(x=>x(d)))return!0;d=a.addDays(d,1)}}return!1}function $5e(e,t){const{disabled:a,excludeDisabled:s,selected:r,required:i,onSelect:l}=e,[d,u]=Zy(r,l?r:void 0),p=l?r:d;return{selected:p,select:(h,y,w)=>{const{min:b,max:j}=e,S=h?B5e(h,p,b,j,i,t):void 0;return s&&a&&S?.from&&S.to&&L5e({from:S.from,to:S.to},a,t)&&(S.from=h,S.to=void 0),l||u(S),l?.(S,h,y,w),S},isSelected:h=>p&&Ei(p,h,!1,t)}}function z5e(e,t){const{selected:a,required:s,onSelect:r}=e,[i,l]=Zy(a,r?a:void 0),d=r?a:i,{isSameDay:u}=t;return{selected:d,select:(m,h,y)=>{let w=m;return!s&&d&&d&&u(m,d)&&(w=void 0),r||l(w),r?.(w,m,h,y),w},isSelected:m=>d?u(d,m):!1}}function U5e(e,t){const a=z5e(e,t),s=R5e(e,t),r=$5e(e,t);
906switch(e.mode){case"single":return a;case"multiple":return s;case"range":return r;default:return}}function q5e(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new In(t.today,t.timeZone)),t.month&&(t.month=new In(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new In(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new In(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new In(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new In(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(Be=>new In(Be,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new In(t.selected.from,t.timeZone):void 0,to:t.selected.to?new In(t.selected.to,t.timeZone):void 0}));const{components:a,formatters:s,labels:r,dateLib:i,locale:l,classNames:d}=v.useMemo(()=>{const Be={...f4,...t.locale};return{dateLib:new Ds({locale:Be,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:VCe(t.components),formatters:a5e(t.formatters),labels:{...v5e,...t.labels},locale:Be,classNames:{...T4(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:p,navLayout:x,numberOfMonths:m=1,onDayBlur:h,onDayClick:y,onDayFocus:w,onDayKeyDown:b,onDayMouseEnter:j,onDayMouseLeave:S,onNextClick:O,onPrevClick:A,showWeekNumber:k,styles:E}=t,{formatCaption:D,formatDay:_,formatMonthDropdown:T,formatWeekNumber:I,formatWeekNumberHeader:$,formatWeekdayName:R,formatYearDropdown:B}=s,Y=_5e(t,i),{days:z,months:Q,navStart:L,navEnd:M,previousMonth:U,nextMonth:Z,goToMonth:ie}=Y,G=WCe(z,t,L,M,i),{isSelected:F,select:H,selected:q}=U5e(t,i)??{},{blur:J,focused:ce,isFocusTarget:se,moveFocus:ye,setFocused:de}=M5e(t,Y,G,F??(()=>!1),i),{labelDayButton:ve,labelGridcell:Pe,labelGrid:ue,labelMonthDropdown:Qe,labelNav:Ue,labelPrevious:xe,labelNext:$e,labelWeekday:Te,labelWeekNumber:dt,labelWeekNumberHeader:tt,labelYearDropdown:me}=r,ut=v.useMemo(()=>r5e(i,t.ISOWeek),[i,t.ISOWeek]),pt=p!==void 0||y!==void 0,ft=v.useCallback(()=>{U&&(ie(U),A?.(U))},[U,ie,A]),_t=v.useCallback(()=>{Z&&(ie(Z),O?.(Z))},[ie,Z,O]),da=v.useCallback((Be,ee)=>ke=>{ke.preventDefault(),ke.stopPropagation(),de(Be),H?.(Be.date,ee,ke),y?.(Be.date,ee,ke)},[H,y,de]),vt=v.useCallback((Be,ee)=>ke=>{de(Be),w?.(Be.date,ee,ke)},[w,de]),Xt=v.useCallback((Be,ee)=>ke=>{J(),h?.(Be.date,ee,ke)},[J,h]),Ct=v.useCallback((Be,ee)=>ke=>{const qe={ArrowLeft:[ke.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ke.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ke.shiftKey?"year":"week","after"],ArrowUp:[ke.shiftKey?"year":"week","before"],PageUp:[ke.shiftKey?"year":"month","before"],PageDown:[ke.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(qe[ke.key]){ke.preventDefault(),ke.stopPropagation();const[Ye,at]=qe[ke.key];ye(Ye,at)}b?.(Be.date,ee,ke)},[ye,b,t.dir]),Zt=v.useCallback((Be,ee)=>ke=>{j?.(Be.date,ee,ke)},[j]),xa=v.useCallback((Be,ee)=>ke=>{S?.(Be.date,ee,ke)},[S]),Sa=v.useCallback(Be=>ee=>{const ke=Number(ee.target.value),qe=i.setMonth(i.startOfMonth(Be),ke);ie(qe)},[i,ie]),Da=v.useCallback(Be=>ee=>{const ke=Number(ee.target.value),qe=i.setYear(i.startOfMonth(Be),ke);ie(qe)},[i,ie]),{className:Va,style:X}=v.useMemo(()=>({className:[d[yt.Root],t.className].filter(Boolean).join(" "),style:{...E?.[yt.Root],...t.style}}),[d,t.className,t.style,E]),Re=GCe(t),Ve=v.useRef(null);w5e(Ve,!!t.animate,{classNames:d,months:Q,focused:ce,dateLib:i});const bt={dayPickerProps:t,selected:q,select:H,isSelected:F,months:Q,nextMonth:Z,previousMonth:U,goToMonth:ie,getModifiers:G,components:a,classNames:d,styles:E,labels:r,formatters:s};return W.createElement(LW.Provider,{value:bt},W.createElement(a.Root,{rootRef:t.animate?Ve:void 0,className:Va,style:X,dir:t.dir,id:t.
vendor: 6,058 bytes, line 906
906id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Re},W.createElement(a.Months,{className:d[yt.Months],style:E?.[yt.Months]},!t.hideNavigation&&!x&&W.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:d[yt.Nav],style:E?.[yt.Nav],"aria-label":Ue(),onPreviousClick:ft,onNextClick:_t,previousMonth:U,nextMonth:Z}),Q.map((Be,ee)=>W.createElement(a.Month,{"data-animated-month":t.animate?"true":void 0,className:d[yt.Month],style:E?.[yt.Month],key:ee,displayIndex:ee,calendarMonth:Be},x==="around"&&!t.hideNavigation&&ee===0&&W.createElement(a.PreviousMonthButton,{type:"button",className:d[yt.PreviousMonthButton],tabIndex:U?void 0:-1,"aria-disabled":U?void 0:!0,"aria-label":xe(U),onClick:ft,"data-animated-button":t.animate?"true":void 0},W.createElement(a.Chevron,{disabled:U?void 0:!0,className:d[yt.Chevron],orientation:t.dir==="rtl"?"right":"left"})),W.createElement(a.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:d[yt.MonthCaption],style:E?.[yt.MonthCaption],calendarMonth:Be,displayIndex:ee},u?.startsWith("dropdown")?W.createElement(a.DropdownNav,{className:d[yt.Dropdowns],style:E?.[yt.Dropdowns]},(()=>{const ke=u==="dropdown"||u==="dropdown-months"?W.createElement(a.MonthsDropdown,{key:"month",className:d[yt.MonthsDropdown],"aria-label":Qe(),classNames:d,components:a,disabled:!!t.disableNavigation,onChange:Sa(Be.date),options:n5e(Be.date,L,M,s,i),style:E?.[yt.Dropdown],value:i.getMonth(Be.date)}):W.createElement("span",{key:"month"},T(Be.date,i)),qe=u==="dropdown"||u==="dropdown-years"?W.createElement(a.YearsDropdown,{key:"year",className:d[yt.YearsDropdown],"aria-label":me(i.options),classNames:d,components:a,disabled:!!t.disableNavigation,onChange:Da(Be.date),options:i5e(L,M,s,i,!!t.reverseYears),style:E?.[yt.Dropdown],value:i.getYear(Be.date)}):W.createElement("span",{key:"year"},B(Be.date,i));return i.getMonthYearOrder()==="year-first"?[qe,ke]:[ke,qe]})(),W.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},D(Be.date,i.options,i))):W.createElement(a.CaptionLabel,{className:d[yt.CaptionLabel],role:"status","aria-live":"polite"},D(Be.date,i.options,i))),x==="around"&&!t.hideNavigation&&ee===m-1&&W.createElement(a.NextMonthButton,{type:"button",className:d[yt.NextMonthButton],tabIndex:Z?void 0:-1,"aria-disabled":Z?void 0:!0,"aria-label":$e(Z),onClick:_t,"data-animated-button":t.animate?"true":void 0},W.createElement(a.Chevron,{disabled:Z?void 0:!0,className:d[yt.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ee===m-1&&x==="after"&&!t.hideNavigation&&W.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:d[yt.Nav],style:E?.[yt.Nav],"aria-label":Ue(),onPreviousClick:ft,onNextClick:_t,previousMonth:U,nextMonth:Z}),W.createElement(a.MonthGrid,{role:"grid","aria-multiselectable":p==="multiple"||p==="range","aria-label":ue(Be.date,i.options,i)||void 0,className:d[yt.MonthGrid],style:E?.[yt.MonthGrid]},!t.hideWeekdays&&W.createElement(a.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:d[yt.Weekdays],style:E?.[yt.Weekdays]},k&&W.createElement(a.WeekNumberHeader,{"aria-label":tt(i.options),className:d[yt.WeekNumberHeader],style:E?.[yt.WeekNumberHeader],scope:"col"},$()),ut.map(ke=>W.createElement(a.Weekday,{"aria-label":Te(ke,i.options,i),className:d[yt.Weekday],key:String(ke),style:E?.[yt.Weekday],scope:"col"},R(ke,i.options,i)))),W.createElement(a.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:d[yt.Weeks],style:E?.[yt.Weeks]},Be.weeks.map(ke=>W.createElement(a.Week,{className:d[yt.Week],key:ke.weekNumber,style:E?.[yt.Week],week:ke},k&&W.createElement(a.WeekNumber,{week:ke,style:E?.[yt.WeekNumber],"aria-label":dt(ke.weekNumber,{locale:l}),className:d[yt.WeekNumber],scope:"row",role:"rowheader"},I(ke.weekNumber,i)),ke.days.map(qe=>{const{date:Ye}=qe,at=G(qe);if(at[$a.focused]=!at.hidden&&!!ce?.isEqualTo(qe),at[or.selected]=F?.(Ye)||at.selected,_4(q)){const{from:Ie,to:ua}=q;at[or.range_start]=!!(Ie&&ua&&i.isSameDay(Ye,Ie)),at[or.range_end]=!!(Ie&&ua&&i.isSameDay(Ye,ua)),at[or.range_middle]=Ei(q,Ye,!0,i)}const Ge=s5e(at,E,t.modifiersStyles),Mt=HCe(at,d,t.modifiersClassNames),zt=!pt&&!at.hidden?Pe(Ye,at,i.options,i):void 0;return W.createElement(a.Day,{key:`${i.format(Ye,"yyyy-MM-dd")}_${i.format(qe.displayMonth,"yyyy-MM")}`,day:qe,modifiers:at,className:Mt.join(" "),style:Ge,role:"gridcell","aria-selected":at.selected||void 0,"aria-label":zt,"data-day":i.format(Ye,"yyyy-MM-dd"),"data-month":qe.outside?i.format(Ye,"yyyy-MM"):void 0,"data-selected":at.selected||void 0,"data-disabled":at.disabled||void 0,"data-hidden":at.hidden||void 0,"data-outside":qe.outside||void 0,"data-focused":at.focused||void 0,"data-today":at.today||void 0},!at.hidden&&pt?W.createElement(a.DayButton,{className:d[yt.DayButton],style:E?.[yt.DayButton],type:"button",day:qe,modifiers:at,disabled:at.disabled||void 0,tabIndex:se(qe)?0:-1,"aria-label":ve(Ye,at,i.options,i),onClick:da(qe,at),onBlur:Xt(qe,at),onFocus:vt(qe,at),onKeyDown:Ct(qe,at),onMouseEnter:Zt(qe,at),onMouseLeave:xa(qe,at)},_(Ye,i.options,i)):!at.hidden&&_(qe.date,i.options,i))})))))))),t.footer&&W.createElement(a.Footer,{className:d[yt.Footer],style:E?.[yt.Footer],role:"status","aria-live":"polite"},t.footer)))}function F5e({className:e,classNames:t,showOutsideDays:a=!0,captionLayout:s="label",buttonVariant:r="ghost",formatters:i,components:l,...d}){const u=T4();return n.jsx(q5e,{"data-loc":"client/src/components/ui/calendar.tsx:27",showOutsideDays:a,className:Se("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:s,formatters:{formatMonthDropdown:p=>
vendor: 4,450 bytes, line 906
906p.toLocaleString("default",{month:"short"}),...i},classNames:{root:Se("w-fit",u.root),months:Se("flex gap-4 flex-col md:flex-row relative",u.months),month:Se("flex flex-col w-full gap-4",u.month),nav:Se("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",u.nav),button_previous:Se(ff({variant:r}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",u.button_previous),button_next:Se(ff({variant:r}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",u.button_next),month_caption:Se("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",u.month_caption),dropdowns:Se("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",u.dropdowns),dropdown_root:Se("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",u.dropdown_root),dropdown:Se("absolute bg-popover inset-0 opacity-0",u.dropdown),caption_label:Se("select-none font-medium",s==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",u.caption_label),table:"w-full border-collapse",weekdays:Se("flex",u.weekdays),weekday:Se("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",u.weekday),week:Se("flex w-full mt-2",u.week),week_number_header:Se("select-none w-(--cell-size)",u.week_number_header),week_number:Se("text-[0.8rem] select-none text-muted-foreground",u.week_number),day:Se("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",u.day),range_start:Se("rounded-l-md bg-accent",u.range_start),range_middle:Se("rounded-none",u.range_middle),range_end:Se("rounded-r-md bg-accent",u.range_end),today:Se("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",u.today),outside:Se("text-muted-foreground aria-selected:text-muted-foreground",u.outside),disabled:Se("text-muted-foreground opacity-50",u.disabled),hidden:Se("invisible",u.hidden),...t},components:{Root:({className:p,rootRef:x,...m})=>n.jsx("div",{"data-loc":"client/src/components/ui/calendar.tsx:128","data-slot":"calendar",ref:x,className:Se(p),...m}),Chevron:({className:p,orientation:x,...m})=>x==="left"?n.jsx(Rc,{"data-loc":"client/src/components/ui/calendar.tsx:139",className:Se("size-4",p),...m}):x==="right"?n.jsx(Es,{"data-loc":"client/src/components/ui/calendar.tsx:145",className:Se("size-4",p),...m}):n.jsx(Tn,{"data-loc":"client/src/components/ui/calendar.tsx:153",className:Se("size-4",p),...m}),DayButton:W5e,WeekNumber:({children:p,...x})=>n.jsx("td",{"data-loc":"client/src/components/ui/calendar.tsx:159",...x,children:n.jsx("div",{"data-loc":"client/src/components/ui/calendar.tsx:160",className:"flex size-(--cell-size) items-center justify-center text-center",children:p})}),...l},...d})}function W5e({className:e,day:t,modifiers:a,...s}){const r=T4(),i=v.useRef(null);return v.useEffect(()=>{a.focused&&i.current?.focus()},[a.focused]),n.jsx(te,{"data-loc":"client/src/components/ui/calendar.tsx:187",ref:i,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":a.selected&&!a.range_start&&!a.range_end&&!a.range_middle,"data-range-start":a.range_start,"data-range-end":a.range_end,"data-range-middle":a.range_middle,className:Se("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",r.day,e),...s})}function Sc(e,t="USD"){return new Intl.NumberFormat("en-US",{style:"currency",currency:t,minimumFractionDigits:2}).format(e/100)}
906function H5e(e){return e?new Date(e).toLocaleString():"—"}function V5e(e){const t=new Date,a=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59,999);if(e==="today")return{startDate:new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0),endDate:a};if(e==="7d"){const s=new Date(t.getTime()-5184e5);return s.setHours(0,0,0,0),{startDate:s,endDate:a}}if(e==="30d"){const s=new Date(t.getTime()-25056e5);return s.setHours(0,0,0,0),{startDate:s,endDate:a}}if(e==="90d"){const s=new Date(t.getTime()-76896e5);return s.setHours(0,0,0,0),{startDate:s,endDate:a}}return{}}function G5e(){const[e,t]=v.useState(1),[a,s]=v.useState("all"),[r,i]=v.useState("30d"),[l,d]=v.useState(void 0),[u,p]=v.useState(!1),x=25,m=a==="attributed"?!0:a==="unattributed"?!1:void 0,h=v.useMemo(()=>r==="custom"?{startDate:l?.from,endDate:l?.to?new Date(l.to.getFullYear(),l.to.getMonth(),l.to.getDate(),23,59,59,999):l?.from}:V5e(r),[r,l]),y=v.useMemo(()=>{if(r==="custom"&&l?.from){const A=k=>k.toLocaleDateString("en-US",{month:"short",day:"numeric"});return l.to&&l.to.getTime()!==l.from.getTime()?`${A(l.from)} – ${A(l.to)}`:A(l.from)}return null},[r,l]),{data:w,isLoading:b}=le.revenue.summary.useQuery(h),{data:j,isLoading:S}=le.revenue.list.useQuery({page:e,limit:x,attributed:m,...h}),O=Math.max(1,Math.ceil((j?.total??0)/x));return n.jsx(Pt,{"data-loc":"client/src/pages/client/Revenue.tsx:127",title:"Revenue Attribution",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:128",className:"p-6 space-y-6 max-w-7xl mx-auto",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:131",className:"flex items-start justify-between gap-4 flex-wrap",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:132",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Revenue.tsx:133",className:"text-2xl font-bold text-foreground",children:"Revenue"}),n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:134",className:"text-sm text-muted-foreground mt-1",children:"Track total store revenue and attribute orders to email campaigns via last-click attribution."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:140",className:"flex items-center gap-1.5 flex-wrap",children:[["today","7d","30d","90d","all"].map(A=>n.jsx(te,{"data-loc":"client/src/pages/client/Revenue.tsx:142",variant:r===A?"default":"outline",size:"sm",className:"h-8 text-xs px-3",onClick:()=>{i(A),t(1)},children:A==="today"?"Today":A==="7d"?"7 Days":A==="30d"?"30 Days":A==="90d"?"90 Days":"All Time"},A)),n.jsxs(Cd,{"data-loc":"client/src/pages/client/Revenue.tsx:152",open:u,onOpenChange:p,children:[n.jsx(Ed,{"data-loc":"client/src/pages/client/Revenue.tsx:153",asChild:!0,children:n.jsxs(te,{"data-loc":"client/src/pages/client/Revenue.tsx:154",variant:r==="custom"?"default":"outline",size:"sm",className:"h-8 text-xs px-3 gap-1.5",onClick:()=>i("custom"),children:[n.jsx(OJ,{"data-loc":"client/src/pages/client/Revenue.tsx:160",className:"w-3.5 h-3.5"}),r==="custom"&&y?y:"Custom"]})}),n.jsx(Ad,{"data-loc":"client/src/pages/client/Revenue.tsx:164",className:"w-auto p-0",align:"end",children:n.jsx(F5e,{"data-loc":"client/src/pages/client/Revenue.tsx:165",mode:"range",selected:l,onSelect:A=>{d(A),i("custom"),t(1),A?.from&&A?.to&&p(!1)},numberOfMonths:2,disabled:{after:new Date}})})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:183",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:184",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-3",children:"Total Store Revenue"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:185",className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[n.jsx(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:186",className:"border-emerald-500/30 bg-emerald-500/5",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:187",className:"p-5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:188",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:189",className:"w-10 h-10 rounded-lg bg-emerald-500/15 flex items-center justify-center flex-shrink-0",children:n.jsx(Ii,{"data-loc":"client/src/pages/client/Revenue.tsx:190",className:"w-5 h-5 text-emerald-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:192",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:193",className:"text-xs text-muted-foreground font-medium",children:"Total Revenue"}),b?n.jsx(Me,{"data-loc":"client/src/pages/client/Revenue.tsx:195",className:"h-6 w-24 mt-1"}):n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:197",className:"text-xl font-bold text-foreground",children:Sc(w?.totalRevenue??0)}),n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:201",className:"text-[10px] text-muted-foreground mt-0.5",children:"All orders tracked"})]})]})})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:207",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:208",className:"p-5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:209",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:210",className:"w-10 h-10 rounded-lg bg-blue-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx(zi,{"data-loc":"client/src/pages/client/Revenue.tsx:211",className:"w-5 h-5 text-blue-500"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:213",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:214",className:"text-xs text-muted-foreground font-medium",children:"Total Orders"}),b?n.jsx(Me,{"data-loc":"client/src/pages/client/Revenue.tsx:216",className:"h-6 w-16 mt-1"}):n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:218",className:"text-xl font-bold text-foreground",children:(w?.totalOrders??0).toLocaleStr
906ing()}),n.jsxs("p",{"data-loc":"client/src/pages/client/Revenue.tsx:222",className:"text-[10px] text-muted-foreground mt-0.5",children:["Avg. ",Sc(w?.avgOrderValue??0)]})]})]})})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:230",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:231",className:"p-5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:232",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:233",className:"w-10 h-10 rounded-lg bg-violet-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx(XJ,{"data-loc":"client/src/pages/client/Revenue.tsx:234",className:"w-5 h-5 text-violet-500"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:236",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:237",className:"text-xs text-muted-foreground font-medium",children:"Email-Attributed"}),b?n.jsx(Me,{"data-loc":"client/src/pages/client/Revenue.tsx:239",className:"h-6 w-20 mt-1"}):n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:241",className:"text-xl font-bold text-foreground",children:Sc(w?.attributedRevenue??0)}),n.jsxs("p",{"data-loc":"client/src/pages/client/Revenue.tsx:245",className:"text-[10px] text-muted-foreground mt-0.5",children:[w?.attributedOrders??0," orders · ",w?.attributionRate??0,"% of total"]})]})]})})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:253",children:n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:254",className:"p-5",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:255",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:256",className:"w-10 h-10 rounded-lg bg-amber-500/10 flex items-center justify-center flex-shrink-0",children:n.jsx(L5,{"data-loc":"client/src/pages/client/Revenue.tsx:257",className:"w-5 h-5 text-amber-500"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:259",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:260",className:"text-xs text-muted-foreground font-medium",children:"Unattributed"}),b?n.jsx(Me,{"data-loc":"client/src/pages/client/Revenue.tsx:262",className:"h-6 w-16 mt-1"}):n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:264",className:"text-xl font-bold text-foreground",children:Sc(w?.unattributedRevenue??0)}),n.jsxs("p",{"data-loc":"client/src/pages/client/Revenue.tsx:268",className:"text-[10px] text-muted-foreground mt-0.5",children:[w?.unattributedOrders??0," orders · direct / other"]})]})]})})})]})]}),(w?.totalOrders??0)>0&&n.jsx(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:280",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:281",className:"p-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:282",className:"flex items-center justify-between mb-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:283",className:"text-xs font-medium text-foreground",children:"Revenue Attribution Split"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:284",className:"flex items-center gap-4 text-xs text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Revenue.tsx:285",className:"flex items-center gap-1.5",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Revenue.tsx:286",className:"w-2.5 h-2.5 rounded-full bg-violet-500 inline-block"}),"Email-attributed ",w?.attributionRate??0,"%"]}),n.jsxs("span",{"data-loc":"client/src/pages/client/Revenue.tsx:289",className:"flex items-center gap-1.5",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Revenue.tsx:290",className:"w-2.5 h-2.5 rounded-full bg-amber-400 inline-block"}),"Unattributed ",100-(w?.attributionRate??0),"%"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:295",className:"h-3 rounded-full bg-muted overflow-hidden flex",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:296",className:"h-full bg-violet-500 transition-all duration-700",style:{width:`${w?.attributionRate??0}%`}}),n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:300",className:"h-full bg-amber-400 transition-all duration-700",style:{width:`${100-(w?.attributionRate??0)}%`}})]})]})}),(w?.byCampaign?.length??0)>0&&n.jsxs(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:311",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Revenue.tsx:312",className:"pb-3",children:n.jsx(St,{"data-loc":"client/src/pages/client/Revenue.tsx:313",className:"text-sm font-semibold",children:"Email-Attributed Revenue by Campaign"})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:315",className:"p-0",children:n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:316",className:"overflow-x-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Revenue.tsx:317",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Revenue.tsx:318",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Revenue.tsx:319",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:320",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Campaign"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:321",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Orders"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:322",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Revenue"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:323",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Avg. Order"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:324",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground hidden md:table-cell",children:"% of Total"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Revenue.tsx:327",children:w?.byCampaign.map(A=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Revenue.tsx:329",className:"border-b border-border/50 hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:330",className:"px-4 py-3 font-medium text-foreground",children:A.campaignName}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:333",className:"px-4 py-3 text-right text-muted-foreground",children:A.orders.toLocaleStr
906ing()}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:336",className:"px-4 py-3 text-right font-semibold text-emerald-600",children:Sc(A.revenue)}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:339",className:"px-4 py-3 text-right text-muted-foreground",children:A.orders>0?Sc(Math.round(A.revenue/A.orders)):"—"}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:342",className:"px-4 py-3 text-right text-muted-foreground hidden md:table-cell",children:(w?.totalRevenue??0)>0?`${Math.round(A.revenue/w.totalRevenue*100)}%`:"—"})]},A.campaignId))})]})})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Revenue.tsx:357",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Revenue.tsx:358",className:"pb-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:359",className:"flex items-center justify-between",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Revenue.tsx:360",className:"text-sm font-semibold",children:"All Conversions"}),n.jsx(hm,{"data-loc":"client/src/pages/client/Revenue.tsx:361",value:a,onValueChange:A=>{s(A),t(1)},children:n.jsxs(vm,{"data-loc":"client/src/pages/client/Revenue.tsx:362",className:"h-7",children:[n.jsx(Nn,{"data-loc":"client/src/pages/client/Revenue.tsx:363",value:"all",className:"text-xs h-6 px-3",children:"All"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/Revenue.tsx:364",value:"attributed",className:"text-xs h-6 px-3",children:"Email-attributed"}),n.jsx(Nn,{"data-loc":"client/src/pages/client/Revenue.tsx:365",value:"unattributed",className:"text-xs h-6 px-3",children:"Unattributed"})]})})]})}),n.jsx(Ze,{"data-loc":"client/src/pages/client/Revenue.tsx:370",className:"p-0",children:S?n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:372",className:"p-4 space-y-3",children:[...Array(5)].map((A,k)=>n.jsx(Me,{"data-loc":"client/src/pages/client/Revenue.tsx:374",className:"h-10 w-full"},k))}):(j?.rows?.length??0)===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:378",className:"py-16 text-center",children:[n.jsx(Ii,{"data-loc":"client/src/pages/client/Revenue.tsx:379",className:"w-10 h-10 text-muted-foreground/30 mx-auto mb-3"}),n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:380",className:"text-sm text-muted-foreground",children:"No conversions yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Revenue.tsx:381",className:"text-xs text-muted-foreground/70 mt-1",children:"Install the tracking pixel on your checkout page to start tracking revenue."})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{"data-loc":"client/src/pages/client/Revenue.tsx:387",className:"overflow-x-auto",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Revenue.tsx:388",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Revenue.tsx:389",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Revenue.tsx:390",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:391",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Order ID"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:392",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Email"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:393",className:"text-right px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Amount"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:394",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground",children:"Attribution"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:395",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground hidden lg:table-cell",children:"Source"}),n.jsx("th",{"data-loc":"client/src/pages/client/Revenue.tsx:396",className:"text-left px-4 py-2.5 text-xs font-medium text-muted-foreground hidden lg:table-cell",children:"Converted"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Revenue.tsx:399",children:j?.rows.map(A=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Revenue.tsx:401",className:"border-b border-border/50 hover:bg-muted/30 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:402",className:"px-4 py-3 font-mono text-xs text-muted-foreground",children:A.orderId.length>20?A.orderId.slice(0,20)+"…":A.orderId}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:405",className:"px-4 py-3 text-foreground",children:A.email}),n.jsxs("td",{"data-loc":"client/src/pages/client/Revenue.tsx:406",className:"px-4 py-3 text-right font-semibold text-emerald-600",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Revenue.tsx:408",title:A.currency&&A.currency!=="USD"?`Original: ${Sc(A.amount,A.currency)} (1 USD = ${Number(A.exchangeRate??1).toFixed(4)} ${A.currency})`:void 0,className:A.currency&&A.currency!=="USD"?"cursor-help underline decoration-dotted decoration-muted-foreground
906/50":"",children:Sc(A.amountUsd??A.amount)}),A.currency&&A.currency!=="USD"&&n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:415",className:"text-[10px] font-normal text-muted-foreground mt-0.5",children:[A.currency," ",(A.amount/100).toLocaleString()]})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:420",className:"px-4 py-3",children:A.campaignId?n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:422",className:"flex items-center gap-1.5",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/Revenue.tsx:423",variant:"secondary",className:"text-[10px] bg-violet-500/10 text-violet-600 border-violet-500/20",children:"Email"}),n.jsx("span",{"data-loc":"client/src/pages/client/Revenue.tsx:426",className:"text-xs text-muted-foreground truncate max-w-[120px]",title:A.campaignName??"",children:A.campaignName??"—"})]}):n.jsx(Le,{"data-loc":"client/src/pages/client/Revenue.tsx:431",variant:"outline",className:"text-[10px] text-muted-foreground",children:"Unattributed"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:436",className:"px-4 py-3 text-xs text-muted-foreground hidden lg:table-cell capitalize",children:A.source??"pixel"}),n.jsx("td",{"data-loc":"client/src/pages/client/Revenue.tsx:439",className:"px-4 py-3 text-xs text-muted-foreground hidden lg:table-cell",children:H5e(A.createdAt)})]},A.id))})]})}),O>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:448",className:"flex items-center justify-between px-4 py-3 border-t border-border",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Revenue.tsx:449",className:"text-xs text-muted-foreground",children:["Showing ",(e-1)*x+1,"–",Math.min(e*x,j?.total??0)," of ",j?.total?.toLocaleString()," conversions"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Revenue.tsx:452",className:"flex items-center gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Revenue.tsx:453",variant:"outline",size:"sm",className:"h-7 w-7 p-0",disabled:e===1,onClick:()=>t(A=>A-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Revenue.tsx:454",className:"w-3.5 h-3.5"})}),n.jsxs("span",{"data-loc":"client/src/pages/client/Revenue.tsx:456",className:"text-xs text-muted-foreground",children:[e," / ",O]}),n.jsx(te,{"data-loc":"client/src/pages/client/Revenue.tsx:457",variant:"outline",size:"sm",className:"h-7 w-7 p-0",disabled:e===O,onClick:()=>t(A=>A+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Revenue.tsx:458",className:"w-3.5 h-3.5"})})]})]})]})})]})]})})}function ji({text:e,label:t="Copy"}){const[a,s]=v.useState(!1),r=()=>{navigator.clipboard.writeText(e),s(!0),ne.success("Copied to clipboard"),setTimeout(()=>s(!1),2e3)};return n.jsxs(te,{"data-loc":"client/src/pages/client/Integrations.tsx:37",variant:"outline",size:"sm",className:"h-7 gap-1.5 text-xs flex-shrink-0",onClick:r,children:[a?n.jsx(ss,{"data-loc":"client/src/pages/client/Integrations.tsx:38",className:"w-3 h-3 text-emerald-500"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/Integrations.tsx:38",className:"w-3 h-3"}),a?"Copied!":t]})}function Y5e(){const{data:e}=le.revenue.getPixelSnippet.useQuery(),{data:t}=le.tracking.getPixelSnippet.useQuery(),a=e?.webhookUrl??"<your-webhook-url>",s=e?.couponWebhookUrl??"<your-coupon-webhook-url>",r=`// Paste in WooCommerce → Code Snippets (or functions.php)
907add_action('woocommerce_order_status_completed', 'boostiko_track_coupon', 10, 1);
908
909function boostiko_track_coupon($order_id) {
910    $order = wc_get_order($order_id);
911    if (!$order) return;
912    $coupons = $order->get_coupon_codes();
913    if (empty($coupons)) return; // no coupon used — skip
914
915    foreach ($coupons as $coupon_code) {
916        wp_remote_post('${s}', [
917            'method'  => 'POST',
918            'headers' => ['Content-Type' => 'application/json'],
919            'body'    => json_encode([
920                'email'      => $order->get_billing_email(),
921                'couponCode' => strtoupper($coupon_code),
922                'orderId'    => (string) $order->get_id(),
923                'orderTotal' => (float) $order->get_total(),
924            ]),
925            'timeout' => 10,
926        ]);
927    }
928}`,i=`<!-- Add these attributes to any element on your thank-you page -->
929<div
930  data-boostiko-order-id="{{ order.id }}"
931  data-boostiko-amount="{{ order.total_cents }}"
932  data-boostiko-email="{{ customer.email }}"
933  data-boostiko-currency="USD"
934></div>
935
936<!-- Then paste the pixel snippet below -->
937${e?.snippet??"<!-- Loading pixel snippet... -->"}`,l=`<!-- Redirect to your thank-you page with these URL params:
938  /thank-you?boostiko_order_id=ORDER-123&boostiko_amount=9900&[email protected]
939
940The pixel auto-reads them — no extra code needed.
941Works with WooCommerce, Shopify, custom stores, etc. -->
942
943<!-- Paste the pixel snippet on your thank-you page: -->
944${e?.snippet??"<!-- Loading pixel snippet... -->"}`,d=`# cURL
945curl -X POST "${a}" \\
946  -H "Content-Type: application/json" \\
947  -d '{
948    "email": "[email protected]",
949    "orderId": "ORDER-12345",
950    "amount": 9900,
951    "currency": "USD",
952    "source": "api"
953  }'
954
955# Node.js / fetch
956await fetch("${a}", {
957  method: "POST",
958  headers: { "Content-Type": "application/json" },
959  body: JSON.stringify({
960    email: order.customerEmail,
961    orderId: order.id,
962    amount: Math.round(order.total * 100), // convert to cents
963    currency: "USD",
964    source: "api",
965  }),
966});
967
968# PHP (WooCommerce functions.php)
969add_action('woocommerce_order_status_completed', 'boostiko_track_order', 10, 1);
970
971function boostiko_track_order($order_id) {
972    $order = wc_get_order($order_id);
973    if (!$order) return;
974
975    // Build lineItems array from order items
976    $line_items = [];
977    foreach ($order->get_items() as $item) {
978        $line_items[] = [
979            'name'     => $item->get_name(),
980            'quantity' => (int) $item->get_quantity(),
981        ];
982    }
983
984    wp_remote_post('${a}', [
985        'method'  => 'POST',
986        'headers' => ['Content-Type' => 'application/json'],
987        'body'    => json_encode([
988            'email'          => $order->get_billing_email(),
989            'orderId'        => (string) $order->get_id(),
990            'amount'         => (int) round($order->get_total() * 100),
991            'currency'       => $order->get_currency(),
992            'firstName'      => $order->get_billing_first_name(),
993            'lastName'       => $order->get_billing_last_name(),
994            'billingCountry' => $order->get_billing_country(),
995            'lineItems'      => $line_items,
996            'couponCodes'    => array_values(array_map('strtoupper', $order->get_coupon_codes())),
997            'source'         => 'woocommerce',
998        ]),
999        'timeout' => 10,
1000    ]);
1001}`,u=`<!-- Paste the pixel snippet in your <head> -->
1002${e?.snippet??"<!-- Loading pixel snippet... -->"}
1003
1004<!-- Then call BoostikoTrack manually when the order is confirmed -->
1005<script>
1006  window.BoostikoTrack({
1007    email: "{{ customer.email }}",
1008    orderId: "{{ order.id }}",
1009    amount: {{ order.total_cents }},  // integer, in cents
1010    currency: "USD"
1011  });
1012<\/script>`;return n.jsx(Pt,{"data-loc":"client/src/pages/client/Integrations.tsx:168",title:"Integrations",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:169",className:"p-6 space-y-6 max-w-5xl mx-auto",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:172",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Integrations.tsx:173",className:"text-2xl font-bold text-foreground",children:"Integrations"}),n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:174",className:"text-sm text-muted-foreground mt-1",children:"Connect your store to Boostiko to track revenue and attribute orders to email campaigns."})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:180",className:"grid grid-cols-1 sm:grid-cols-4 gap-4",children:[n.jsx(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:181",className:"border-emerald-500/30 bg-emerald-500/5",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:182",className:"p-4 flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:183",className:"w-9 h-9 rounded-lg bg-emerald-500/15 flex items-center justify-center flex-shrink-0",children:n.jsx(Ii,{"data-loc":"client/src/pages/client/Integrations.tsx:184",className:"w-4 h-4 text-emerald-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:186",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:187",className:"text-sm font-semibold text-foreground",children:"Revenue Tracking"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Integrations.tsx:188",variant:"secondary",className:"text-xs mt-0.5 bg-emerald-500/10 text-emerald-700 border-emerald-500/20",children:"Active"})]})]})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:192",className:"border-blue-500/30 bg-blue-500/5",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:193",className:"p-4 flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:194",className:"w-9 h-9 rounded-lg bg-blue-500/15 flex items-center justify-center flex-shrink-0",children:n.jsx(la,{"data-loc":"client/src/pages/client/Integrations.tsx:195",className:"w-4 h-4 text-blue-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:197",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:198",className:"text-sm font-semibold text-foreground",children:"Site Tracking"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Integrations.tsx:199",variant:"secondary",className:"text-xs mt-0.5 bg-blue-500/10 text-blue-700 border-blue-500/20",children:"Active"})]})]})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:203",className:"opacity-50",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:204",className:"p-4 flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:205",className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center flex-shrink-0",children:n.jsx(zi,{"data-loc":"client/src/pages/client/Integrations.tsx:206",className:"w-4 h-4 text-muted-foreground"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:208",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:209",className:"text-sm font-semibold text-foreground",children:"Shopify"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Integrations.tsx:210",variant:"outline",className:"text-xs mt-0.5",children:"Coming Soon"})]})]})}),n.jsx(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:214",className:"opacity-50",children:n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:215",className:"p-4 flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:216",className:"w-9 h-9 rounded-lg bg-muted flex items-center justify-center flex-shrink-0",children:n.jsx(JI,{"data-loc":"client/src/pages/client/Integrations.tsx:217",className:"w-4 h-4 text-muted-foreground"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:219",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:220",className:"text-sm font-semibold text-foreground",children:"Zapier"}),n.jsx(Le,{"data-loc":"client/src/pages/client/Integrations.tsx:221",variant:"outline",className:"text-xs mt-0.5",children:"Coming Soon"})]})]})})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:228",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Integrations.tsx:229",className:"pb-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:230",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:231",className:"w-8 h-8 rounded-lg bg-emerald-500/15 flex items-center justify-center",children:n.jsx(Ii,{"data-loc":"client/src/pages/client/Integrations.tsx:232",className:"w-4 h-4 text-emerald-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:234",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Integrations.tsx:235",className:"text-base font-semibold",children:"Revenue Tracking Setup"}),n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:236",className:"text-xs text-muted-foreground mt-0.5",children:"Works with any platform — WooCommerce, Shopify, custom stores, or any checkout system."})]}),n.jsxs(II,{"data-loc":"client/src/pages/client/Integrations.tsx:240",children:[n.jsx(LI,{"data-loc":"client/src/pages/client/Integrations.tsx:241",asChild:!0,children:n.jsx(Uv,{"data-loc":"client/src/pages/client/Integrations.tsx:242",className:"w-3.5 h-3.5 text-muted-foreground cursor-help ml-1"})}),n.jsx($I,{"data-loc":"client/src/pages/client/Integrations.tsx:244",className:"max-w-xs",children:n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:245",className:"text-xs",children:"Fire the webhook for every order — attributed or not. Boostiko will link it to a campaign if there was a click within the attribution window, and store it as unattributed otherwise."})})]})]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:252",className:"space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:255",className:"rounded-lg bg-muted/40 border border-border p-4 space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:256",className:"text-xs font-semibold text-foreground",children:"How it works"}),n.jsxs("ol",{"data-loc":"client/src/pages/client/Integrations.tsx:257",className:"space-y-1.5 text-xs text-muted-foreground list-decimal list-inside",children:[n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:258",children:["Fire the webhook for ",n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:258",className:"text-foreground",children:"every completed order"})," on your store"]}),n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:259",children:"Boostiko checks if the customer clicked an email within your attribution window"}),n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:260",children:"If yes → order is attributed to that campaign. If no → stored as unattributed revenue"}),n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:261",children:["New customers are automatically added to your contact list with source ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:261",className:"bg-muted px-1 rounded",children:"conversion"})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:266",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:267",className:"text-xs font-medium text-muted-foreground mb-1.5",children:"Your Webhook URL"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:268",className:"flex items-center gap-2",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:269",className:"flex-1 text-xs bg-muted rounded-md px-3 py-2 font-mono text-foreground truncate",children:a}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:272",text:a,label:"Copy URL"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:277",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:278",className:"text-xs font-medium text-muted-foreground mb-2",children:"Choose your integration method"}),n.jsxs(hm,{"data-loc":"client/src/pages/client/Integrations.tsx:279",defaultValue:"server-side",children:[n.jsxs(vm,{"data-loc":"client/src/pages/client/Integrations.tsx:280",className:"h-8 w-full justify-start gap-1",children:[n.jsxs(Nn,{"data-loc":"client/src/pages/client/Integrations.tsx:281",value:"server-side",className:"text-xs h-7 gap-1.5",children:[n.jsx(q5,{"data-loc":"client/src/pages/client/Integrations.tsx:282",className:"w-3 h-3"}),"Server-Side"]}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Integrations.tsx:284",value:"data-attrs",className:"text-xs h-7 gap-1.5",children:[n.jsx($i,{"data-loc":"client/src/pages/client/Integrations.tsx:285",className:"w-3 h-3"}),"Data Attributes"]}),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Integrations.tsx:287",value:"query-params",className:"text-xs h-7 gap-1.5",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/Integrations.tsx:288",className:"w-3 h-3"}),"URL Params"]}
1012),n.jsxs(Nn,{"data-loc":"client/src/pages/client/Integrations.tsx:290",value:"manual-js",className:"text-xs h-7 gap-1.5",children:[n.jsx(_n,{"data-loc":"client/src/pages/client/Integrations.tsx:291",className:"w-3 h-3"}),"Manual JS"]})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Integrations.tsx:295",value:"server-side",className:"mt-3 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:296",className:"rounded-lg bg-violet-500/5 border border-violet-500/20 p-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:297",className:"text-xs font-semibold text-violet-600 mb-1",children:"Recommended — Most reliable, any platform"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:298",className:"text-xs text-muted-foreground",children:["Send a POST request from your server after every order is confirmed. More reliable than client-side pixels — works even if the customer closes the tab early. Includes a ready-to-use ",n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:301",children:"WooCommerce PHP snippet"}),"."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:304",className:"flex items-center justify-between mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:305",className:"text-xs font-medium text-muted-foreground",children:"cURL / Node.js / PHP (WooCommerce)"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:306",text:d})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:308",className:"text-xs bg-muted rounded-lg p-4 overflow-x-auto font-mono text-foreground/80 leading-relaxed whitespace-pre-wrap break-all",children:d})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Integrations.tsx:313",value:"data-attrs",className:"mt-3 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:314",className:"rounded-lg bg-blue-500/5 border border-blue-500/20 p-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:315",className:"text-xs font-semibold text-blue-600 mb-1",children:"Best for: Custom HTML thank-you pages"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:316",className:"text-xs text-muted-foreground",children:["Add ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:317",className:"bg-blue-500/10 px-1 rounded",children:"data-boostiko-*"})," attributes to any element on your thank-you page. The pixel reads them automatically on page load."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:321",className:"flex items-center justify-between mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:322",className:"text-xs font-medium text-muted-foreground",children:"Code"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:323",text:i})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:325",className:"text-xs bg-muted rounded-lg p-4 overflow-x-auto font-mono text-foreground/80 leading-relaxed whitespace-pre-wrap break-all",children:i})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Integrations.tsx:330",value:"query-params",className:"mt-3 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:331",className:"rounded-lg bg-emerald-500/5 border border-emerald-500/20 p-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:332",className:"text-xs font-semibold text-emerald-600 mb-1",children:"Best for: WooCommerce, Shopify, redirect-based checkouts"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:333",className:"text-xs text-muted-foreground",children:["Redirect to your thank-you page with order data in the URL. The pixel reads"," ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:335",className:"bg-emerald-500/10 px-1 rounded",children:"?boostiko_order_id="}),","," ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:336",className:"bg-emerald-500/10 px-1 rounded",children:"?boostiko_amount="}),", and"," ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:337",className:"bg-emerald-500/10 px-1 rounded",children:"?boostiko_email="})," automatically."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:340",className:"flex items-center justify-between mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:341",className:"text-xs font-medium text-muted-foreground",children:"Code"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:342",text:l})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:344",className:"text-xs bg-muted rounded-lg p-4 overflow-x-auto font-mono text-foreground
1012/80 leading-relaxed whitespace-pre-wrap break-all",children:l})]}),n.jsxs(Fn,{"data-loc":"client/src/pages/client/Integrations.tsx:349",value:"manual-js",className:"mt-3 space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:350",className:"rounded-lg bg-amber-500/5 border border-amber-500/20 p-3",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:351",className:"text-xs font-semibold text-amber-600 mb-1",children:"Best for: Custom JS checkout flows, SPAs"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:352",className:"text-xs text-muted-foreground",children:["Load the pixel in your ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:353",className:"bg-amber-500/10 px-1 rounded",children:"<head>"}),", then call"," ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:354",className:"bg-amber-500/10 px-1 rounded",children:"window.BoostikoTrack({...})"})," when the order is confirmed."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:357",className:"flex items-center justify-between mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:358",className:"text-xs font-medium text-muted-foreground",children:"Code"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:359",text:u})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:361",className:"text-xs bg-muted rounded-lg p-4 overflow-x-auto font-mono text-foreground/80 leading-relaxed whitespace-pre-wrap break-all",children:u})]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:369",className:"rounded-lg bg-muted/50 border border-border p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:370",className:"text-xs font-semibold text-foreground mb-2",children:"Webhook Payload Reference"}),n.jsxs("table",{"data-loc":"client/src/pages/client/Integrations.tsx:371",className:"w-full text-xs",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Integrations.tsx:372",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:373",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:374",className:"text-left py-1.5 pr-4 font-medium text-muted-foreground",children:"Field"}),n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:375",className:"text-left py-1.5 pr-4 font-medium text-muted-foreground",children:"Type"}),n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:376",className:"text-left py-1.5 font-medium text-muted-foreground",children:"Description"})]})}),n.jsxs("tbody",{"data-loc":"client/src/pages/client/Integrations.tsx:379",className:"text-muted-foreground",children:[n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:380",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:381",className:"py-1.5 pr-4 font-mono text-foreground",children:"email"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:382",className:"py-1.5 pr-4",children:["string ",n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:382",className:"text-red-500",children:"*"})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:383",className:"py-1.5",children:"Customer email address"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:385",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:386",className:"py-1.5 pr-4 font-mono text-foreground",children:"orderId"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:387",className:"py-1.5 pr-4",children:["string ",n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:387",className:"text-red-500",children:"*"})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:388",className:"py-1.5",children:"Unique order ID (used for deduplication)"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:390",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:391",className:"py-1.5 pr-4 font-mono text-foreground",children:"amount"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:392",className:"py-1.5 pr-4",children:["integer ",n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:392",className:"text-red-500",children:"*"})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:393",className:"py-1.5",children:"Order total in cents (e.g. 9900 = $99.00)"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:395",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:396",className:"py-1.5 pr-4 font-mono text-foreground",children:"currency"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:397",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:398",className:"py-1.5",children:'ISO currency code, default "USD"'})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:400",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:401",className:"py-1.5 pr-4 font-mono text-foreground",children:"source"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:402",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:403",className:"py-1.5",children:"pixel | api | woocommerce | shopify"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:405",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:406",className:"py-1.5 pr-4 font-mono text-foreground",children:"firstName"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:407",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:408",className:"py-1.5",children:"Customer first name (used for auto-contact creation)"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:410",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:411",className:"py-1.5 pr-4 font-mono text-foreground",children:"lastName"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:412",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:413",className:"py-1.5",children:"Customer last name (used for auto-contact creation)"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:415",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:416",className:"py-1.5 pr-4 font-mono text-foreground",children:"lineItems"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:417",className:"py-1.5 pr-4",children:"array"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:418",className:"py-1.5",children:["Order line items: ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:418",className:"bg-muted px-1 rounded",children:"{name, quantity?}[]"}
1012)," — used to auto-create Purchased Account records per contact"]})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:420",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:421",className:"py-1.5 pr-4 font-mono text-foreground",children:"billingCountry"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:422",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:423",className:"py-1.5",children:'ISO 2-letter country code (e.g. "US") — stored on each Purchased Account record'})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:425",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:426",className:"py-1.5 pr-4 font-mono text-foreground",children:"metadata"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:427",className:"py-1.5 pr-4",children:"object"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:428",className:"py-1.5",children:"Any extra data to store with the conversion"})]})]})]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:438",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Integrations.tsx:439",className:"pb-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:440",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:441",className:"w-8 h-8 rounded-lg bg-fuchsia-500/15 flex items-center justify-center",children:n.jsx(Pa,{"data-loc":"client/src/pages/client/Integrations.tsx:442",className:"w-4 h-4 text-fuchsia-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:444",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Integrations.tsx:445",className:"text-base font-semibold",children:"Coupon Webhook (Automation Exit Conditions)"}),n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:446",className:"text-xs text-muted-foreground mt-0.5",children:"Tell Boostiko when a coupon code is used so contacts are removed from automation flows automatically."})]})]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:452",className:"space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:454",className:"rounded-lg bg-fuchsia-500/5 border border-fuchsia-500/20 p-4 space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:455",className:"text-xs font-semibold text-fuchsia-700",children:"How it works"}),n.jsxs("ol",{"data-loc":"client/src/pages/client/Integrations.tsx:456",className:"space-y-1.5 text-xs text-muted-foreground list-decimal list-inside",children:[n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:457",children:"A visitor spins your wheel and wins a coupon code (e.g. SPIN60)"}),n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:458",children:"They receive the code by email and use it to purchase"}),n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:459",children:"WooCommerce fires this webhook when the order completes"}),n.jsx("li",{"data-loc":"client/src/pages/client/Integrations.tsx:460",children:"Boostiko removes them from any automation flow with a matching exit condition — no more follow-up emails"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:464",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:465",className:"text-xs font-medium text-muted-foreground mb-1.5",children:"Your Coupon Webhook URL"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:466",className:"flex items-center gap-2",children:[n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:467",className:"flex-1 text-xs bg-muted rounded-md px-3 py-2 font-mono text-foreground truncate",children:s}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:470",text:s,label:"Copy URL"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:474",className:"space-y-1.5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:475",className:"flex items-center justify-between mb-1",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:476",className:"text-xs font-medium text-muted-foreground",children:"WooCommerce PHP snippet (functions.php or Code Snippets plugin)"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:477",text:r})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:479",className:"text-xs bg-muted rounded-lg p-4 overflow-x-auto font-mono text-foreground
1012/80 leading-relaxed whitespace-pre-wrap break-all",children:r})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:484",className:"rounded-lg bg-muted/50 border border-border p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:485",className:"text-xs font-semibold text-foreground mb-2",children:"Payload Reference"}),n.jsxs("table",{"data-loc":"client/src/pages/client/Integrations.tsx:486",className:"w-full text-xs",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Integrations.tsx:487",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:488",className:"border-b border-border",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:489",className:"text-left py-1.5 pr-4 font-medium text-muted-foreground",children:"Field"}),n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:490",className:"text-left py-1.5 pr-4 font-medium text-muted-foreground",children:"Type"}),n.jsx("th",{"data-loc":"client/src/pages/client/Integrations.tsx:491",className:"text-left py-1.5 font-medium text-muted-foreground",children:"Description"})]})}),n.jsxs("tbody",{"data-loc":"client/src/pages/client/Integrations.tsx:494",className:"text-muted-foreground",children:[n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:495",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:496",className:"py-1.5 pr-4 font-mono text-foreground",children:"email"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:497",className:"py-1.5 pr-4",children:["string ",n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:497",className:"text-red-500",children:"*"})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:498",className:"py-1.5",children:"Customer email address"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:500",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:501",className:"py-1.5 pr-4 font-mono text-foreground",children:"couponCode"}),n.jsxs("td",{"data-loc":"client/src/pages/client/Integrations.tsx:502",className:"py-1.5 pr-4",children:["string ",n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:502",className:"text-red-500",children:"*"})]}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:503",className:"py-1.5",children:"The coupon code that was used (case-insensitive)"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:505",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:506",className:"py-1.5 pr-4 font-mono text-foreground",children:"orderId"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:507",className:"py-1.5 pr-4",children:"string"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:508",className:"py-1.5",children:"Order ID for deduplication"})]}),n.jsxs("tr",{"data-loc":"client/src/pages/client/Integrations.tsx:510",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:511",className:"py-1.5 pr-4 font-mono text-foreground",children:"orderTotal"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:512",className:"py-1.5 pr-4",children:"number"}),n.jsx("td",{"data-loc":"client/src/pages/client/Integrations.tsx:513",className:"py-1.5",children:"Order total in dollars (e.g. 99.00)"})]})]})]})]})]})]}),n.jsxs(Ke,{"data-loc":"client/src/pages/client/Integrations.tsx:523",children:[n.jsx(Nt,{"data-loc":"client/src/pages/client/Integrations.tsx:524",className:"pb-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:525",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Integrations.tsx:526",className:"w-8 h-8 rounded-lg bg-blue-500/15 flex items-center justify-center",children:n.jsx(la,{"data-loc":"client/src/pages/client/Integrations.tsx:527",className:"w-4 h-4 text-blue-600"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:529",children:[n.jsx(St,{"data-loc":"client/src/pages/client/Integrations.tsx:530",className:"text-base font-semibold",children:"Site Tracking Setup"}),n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:531",className:"text-xs text-muted-foreground mt-0.5",children:"Track site visits and checkout visits for identified contacts. Paste the pixel on every page."})]})]})}),n.jsxs(Ze,{"data-loc":"client/src/pages/client/Integrations.tsx:537",className:"space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:540",className:"rounded-lg bg-blue-500/5 border border-blue-500/20 p-4 space-y-2",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:541",className:"text-sm font-semibold text-blue-700",children:"How identity resolution works"}),n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:542",className:"text-xs text-muted-foreground",children:"The pixel identifies visitors using this priority order:"}),n.jsxs("ol",{"data-loc":"client/src/pages/client/Integrations.tsx:543",className:"text-xs text-muted-foreground space-y-1 list-decimal list-inside",children:[n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:544",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:544",children:"Email link click"})," — when a contact clicks a link in your campaign, Boostiko automatically appends a secure token to the URL. The pixel resolves this token to their email instantly."]}),n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:545",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:545",children:"?email= param"})," — WooCommerce appends the customer email to the thank-you page URL. The pixel reads 
1012it and saves it."]}),n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:546",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:546",children:"First-party cookie"})," — once identified, a 1-year cookie is set on the root domain so the visitor is recognised on every return visit across all subdomains."]}),n.jsxs("li",{"data-loc":"client/src/pages/client/Integrations.tsx:547",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:547",children:"localStorage fallback"})," — for browsers that block cookies."]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:549",className:"text-xs text-muted-foreground mt-1",children:["Once identified, the pixel records ",n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:550",children:"page_view"})," events on your main domain and ",n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:550",children:"checkout_view"})," events on your checkout/payment subdomain. SPA navigation is tracked automatically."]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:555",className:"space-y-1.5",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:556",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:["Step 1 — Paste this in ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:556",className:"font-mono bg-muted px-1 rounded normal-case",children:"<head>"})," on ",n.jsx("strong",{"data-loc":"client/src/pages/client/Integrations.tsx:556",children:"both"})," domains"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:557",className:"flex items-center justify-between mb-1",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:558",className:"text-xs text-muted-foreground",children:"One line. No inline JS. Loads asynchronously."}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:559",text:`<script src="${t?.trackingUrl??""}"><\/script>`})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:561",className:"text-xs bg-muted/60 rounded-lg p-4 overflow-x-auto font-mono border border-border/50",children:`<script src="${t?.trackingUrl??"Loading..."}"><\/script>`})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:567",className:"space-y-1.5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:568",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Step 2 — WooCommerce server-side checkout tracking (optional but recommended)"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:569",className:"text-xs text-muted-foreground mb-1",children:["Add this to Code Snippets in WordPress. Fires a ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:569",className:"font-mono bg-muted px-1 rounded",children:"checkout_view"})," event from the server when a logged-in customer loads the checkout page — works even with JS disabled or ad blockers."]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:570",className:"flex items-center justify-between mb-1",children:[n.jsx("span",{"data-loc":"client/src/pages/client/Integrations.tsx:571",className:"text-xs text-muted-foreground",children:"functions.php or Code Snippets plugin"}),n.jsx(ji,{"data-loc":"client/src/pages/client/Integrations.tsx:572",text:`add_action('woocommerce_checkout_init', 'boostiko_track_checkout');
1013function boostiko_track_checkout() {
1014    if (!is_user_logged_in()) return;
1015    $user = wp_get_current_user();
1016    $email = $user->user_email;
1017    if (!$email) return;
1018    wp_remote_post('${t?.serverTrackingUrl??"https://your-boostiko-url/api/track/server/TENANT_ID"}', [
1019        'method'  => 'POST',
1020        'headers' => ['Content-Type' => 'application/json'],
1021        'body'    => json_encode([
1022            'email'     => $email,
1023            'event'     => 'checkout_view',
1024            'url'       => wc_get_checkout_url(),
1025            'pageTitle' => 'Checkout',
1026        ]),
1027        'timeout' => 5,
1028    ]);
1029}`})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:591",className:"text-xs bg-muted/60 rounded-lg p-4 overflow-x-auto whitespace-pre font-mono border border-border/50",children:`add_action('woocommerce_checkout_init', 'boostiko_track_checkout');
1030function boostiko_track_checkout() {
1031    if (!is_user_logged_in()) return;
1032    $user = wp_get_current_user();
1033    $email = $user->user_email;
1034    if (!$email) return;
1035    wp_remote_post('${t?.serverTrackingUrl??"https://your-boostiko-url/api/track/server/TENANT_ID"}', [
1036        'method'  => 'POST',
1037        'headers' => ['Content-Type' => 'application/json'],
1038        'body'    => json_encode([
1039            'email'     => $email,
1040            'event'     => 'checkout_view',
1041            'url'       =>
1041 wc_get_checkout_url(),
1042            'pageTitle' => 'Checkout',
1043        ]),
1044        'timeout' => 5,
1045    ]);
1046}`})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Integrations.tsx:612",className:"space-y-1.5",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Integrations.tsx:613",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Step 3 — Identify visitors on form submit (optional)"}),n.jsxs("p",{"data-loc":"client/src/pages/client/Integrations.tsx:614",className:"text-xs text-muted-foreground mb-1",children:["Call ",n.jsx("code",{"data-loc":"client/src/pages/client/Integrations.tsx:614",className:"font-mono bg-muted px-1 rounded",children:"Boostiko.identify(email)"})," when a visitor submits any form (quiz, lead magnet, sign-up). This identifies them before they ever make a purchase."]}),n.jsx("pre",{"data-loc":"client/src/pages/client/Integrations.tsx:615",className:"text-xs bg-muted/60 rounded-lg p-4 overflow-x-auto font-mono border border-border/50",children:`// On any form submit
1047document.querySelector('#my-form').addEventListener('submit', function(e) {
1048  var email = document.querySelector('#email-input').value;
1049  if (window.Boostiko && email) {
1050    window.Boostiko.identify(email);
1051  }
1052});`})]})]})]})]})})}function K5e(e){const t=Date.now(),a=new Date(e).getTime(),s=Math.floor((t-a)/1e3);return s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:s<604800?`${Math.floor(s/86400)}d ago`:new Date(e).toLocaleDateString()}function Q5e(e,t,a){return e&&t?`${e[0]}${t[0]}`.toUpperCase():e?e.slice(0,2).toUpperCase():a?a.slice(0,2).toUpperCase():"?"}function X5e(e){const t=["bg-blue-500","bg-violet-500","bg-emerald-500","bg-amber-500","bg-rose-500","bg-cyan-500","bg-indigo-500","bg-pink-500"];let a=0;for(let s=0;s<e.length;s++)a=e.charCodeAt(s)+((a<<5)-a);return t[Math.abs(a)%t.length]}function Z5e(){const[e,t]=v.useState(1),[a,s]=v.useState("all"),r=50,{data:i,isLoading:l}=le.activity.getFeed.useQuery({page:e,limit:r,eventType:a==="all"?void 0:a},{refetchInterval:3e4}),d=i?Math.ceil(i.total/r):1;function u(h){return h==="purchase"?n.jsx(zi,{"data-loc":"client/src/pages/client/Activity.tsx:63",className:"w-3.5 h-3.5"}):h==="checkout_view"?n.jsx(HI,{"data-loc":"client/src/pages/client/Activity.tsx:64",className:"w-3.5 h-3.5"}):h==="api_event"?n.jsx(Pa,{"data-loc":"client/src/pages/client/Activity.tsx:65",className:"w-3.5 h-3.5"}):n.jsx(la,{"data-loc":"client/src/pages/client/Activity.tsx:66",className:"w-3.5 h-3.5"})}function p(h){if(h.type==="purchase"){const w=h.amountUsd!=null?` · $${(h.amountUsd/100).toFixed(2)}`:"";return`completed order #${h.orderId??""}${w}`}return h.type==="checkout_view"?"started checkout":h.type==="api_event"?`triggered event: ${h.eventName??"unknown"}`:`visited ${(h.url?(()=>{try{return new URL(h.url).pathname}catch{return h.url}})():"")||"a page"}`}function x(h){return h==="purchase"?"default":h==="checkout_view"?"secondary":"outline"}function m(h){return h==="purchase"?"Purchase":h==="checkout_view"?"Checkout":h==="api_event"?"API Event":"Page View"}return n.jsx(Pt,{"data-loc":"client/src/pages/client/Activity.tsx:98",title:"Activity Feed",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:99",className:"p-6 max-w-4xl mx-auto space-y-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:101",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:102",children:[n.jsxs("h1",{"data-loc":"client/src/pages/client/Activity.tsx:103",className:"text-xl font-semibold flex items-center gap-2",children:[n.jsx(Ks,{"data-loc":"client/src/pages/client/Activity.tsx:104",className:"w-5 h-5 text-primary"}),"Activity Feed"]}),n.jsx("p",{"data-loc":"client/src/pages/client/Activity.tsx:107",className:"text-sm text-muted-foreground mt-0.5",children:"Real-time events from your contacts — purchases, checkout views, and page visits."})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:111",className:"flex items-center gap-2",children:n.jsxs(mt,{"data-loc":"client/src/pages/client/Activity.tsx:112",value:a,onValueChange:h=>{s(h),t(1)},children:[n.jsx(xt,{"data-loc":"client/src/pages/client/Activity.tsx:113",className:"w-40 h-8 text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/Activity.tsx:114"})}),n.jsxs(gt,{"data-loc":"client/src/pages/client/Activity.tsx:116",children:[n.jsx(he,{"data-loc":"client/src/pages/client/Activity.tsx:117",value:"all",children:"All events"}),n.jsx(he,{"data-loc":"client/src/pages/client/Activity.tsx:118",value:"purchase",children:"Purchases"}),n.jsx(he,{"data-loc":"client/src/pages/client/Activity.tsx:119",value:"checkout_view",children:"Checkout views"}),n.jsx(he,{"data-loc":"client/src/pages/client/Activity.tsx:120",value:"page_view",children:"Page views"}),n.jsx(he,{"data-loc":"client/src/pages/client/Activity.tsx:121",value:"api_event",children:"API Events"})]})]})})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:128",className:"rounded-xl border bg-card overflow-hidden",children:l?n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:130",className:"divide-y",children:Array.from({length:10}).map((h,y)=>n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:132",className:"flex items-center gap-3 px-4 py-3",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Activity.tsx:133",className:"w-8 h-8 rounded-full flex-shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:134",className:"flex-1 space-y-1.5",children:[n.jsx(Me,{"data-loc":"client/src/pages/client/Activity.tsx:135",className:"h-3.5 w-64"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Activity.tsx:136",className:"h-3 w-40"})]}),n.jsx(Me,{"data-loc":"client/src/pages/client/Activity.tsx:138",className:"h-5 w-16 rounded-full"}),n.jsx(Me,{"data-loc":"client/src/pages/client/Activity.tsx:139",className:"h-3 w-14"})]},y))}):!i||i.items.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:144",className:"flex flex-col items-center justify-center py-20 text-center",children:[n.jsx(Ks,{"data-loc":"client/src/pages/client/Activity.tsx:145",className:"w-10 h-10 text-muted-foreground
1052/40 mb-3"}),n.jsx("p",{"data-loc":"client/src/pages/client/Activity.tsx:146",className:"text-sm font-medium text-muted-foreground",children:"No activity yet"}),n.jsx("p",{"data-loc":"client/src/pages/client/Activity.tsx:147",className:"text-xs text-muted-foreground/70 mt-1",children:"Events will appear here once contacts start visiting your site or making purchases."})]}):n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:152",className:"divide-y",children:i.items.map(h=>{const y=h.firstName&&h.lastName?`${h.firstName} ${h.lastName[0]}.`:h.firstName??h.email?.split("@")[0]??"Unknown",w=h.email??h.contactId?.toString()??"?";return n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:159",className:"flex items-center gap-3 px-4 py-3 hover:bg-muted/30 transition-colors",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:161",className:`w-8 h-8 rounded-full flex items-center justify-center text-white text-xs font-semibold flex-shrink-0 ${X5e(w)}`,children:Q5e(h.firstName,h.lastName,h.email)}),n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:166",className:"flex-1 min-w-0",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Activity.tsx:167",className:"text-sm leading-snug truncate",children:[h.contactId?n.jsx(It,{"data-loc":"client/src/pages/client/Activity.tsx:169",href:`/contacts/${h.contactId}`,className:"font-medium hover:underline",children:y}):n.jsx("span",{"data-loc":"client/src/pages/client/Activity.tsx:173",className:"font-medium",children:y})," ",n.jsx("span",{"data-loc":"client/src/pages/client/Activity.tsx:175",className:"text-muted-foreground",children:p(h)})]}),h.type==="page_view"&&h.url&&n.jsxs("p",{"data-loc":"client/src/pages/client/Activity.tsx:178",className:"text-xs text-muted-foreground/70 truncate mt-0.5 flex items-center gap-1",children:[n.jsx(zv,{"data-loc":"client/src/pages/client/Activity.tsx:179",className:"w-2.5 h-2.5 flex-shrink-0"}),h.url]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Activity.tsx:186",className:"flex items-center gap-1.5 flex-shrink-0",children:n.jsxs(Le,{"data-loc":"client/src/pages/client/Activity.tsx:187",variant:x(h.type),className:`text-xs gap-1 ${h.type==="purchase"?"bg-emerald-500/15 text-emerald-600 border-emerald-500/20 hover:bg-emerald-500/20":h.type==="checkout_view"?"bg-amber-500/15 text-amber-600 border-amber-500/20 hover:bg-amber-500/20":h.type==="api_event"?"bg-violet-500/15 text-violet-500 border-violet-500/20 hover:bg-violet-500/20":""}`,children:[u(h.type),m(h.type)]})}),n.jsx("span",{"data-loc":"client/src/pages/client/Activity.tsx:197",className:"text-xs text-muted-foreground flex-shrink-0 w-16 text-right",children:K5e(h.occurredAt)})]},h.id)})})}),i&&i.total>r&&n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:209",className:"flex items-center justify-between text-sm text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Activity.tsx:210",children:[i.total.toLocaleString()," total events"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Activity.tsx:211",className:"flex items-center gap-1",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Activity.tsx:212",variant:"outline",size:"sm",className:"h-7 w-7 p-0",disabled:e<=1,onClick:()=>t(h=>h-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Activity.tsx:213",className:"w-3.5 h-3.5"})}),n.jsxs("span",{"data-loc":"client/src/pages/client/Activity.tsx:215",className:"px-2 text-xs",children:["Page ",e," of ",d]}),n.jsx(te,{"data-loc":"client/src/pages/client/Activity.tsx:216",variant:"outline",size:"sm",className:"h-7 w-7 p-0",disabled:e>=d,onClick:()=>t(h=>h+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Activity.tsx:217",className:"w-3.5 h-3.5"})})]})]})]})})}function J5e(){const[e,t]=v.useState(1),[a,s]=v.useState(""),[r,i]=v.useState(""),[l,d]=v.useState(!1),[u,p]=v.useState(!1),[x,m]=v.useState(""),[h,y]=v.useState(""),[w,b]=v.useState(""),[j,S]=v.useState(""),O=50,A=le.useUtils(),{data:k,isLoading:E}=le.blacklist.list.useQuery({page:e,limit:O,search:a}),D=le.blacklist.add.useMutation({onSuccess:()=>
1052{ne.success("Email added to blacklist"),A.blacklist.list.invalidate(),d(!1),m(""),y("")},onError:B=>ne.error(B.message)}),_=le.blacklist.bulkAdd.useMutation({onSuccess:B=>{ne.success(`${B.added} email${B.added!==1?"s":""} added to blacklist`),A.blacklist.list.invalidate(),p(!1),b(""),S("")},onError:B=>ne.error(B.message)}),T=le.blacklist.remove.useMutation({onSuccess:()=>{ne.success("Removed from blacklist"),A.blacklist.list.invalidate()},onError:B=>ne.error(B.message)}),I=B=>{B.preventDefault(),s(r),t(1)},$=()=>{const B=w.split(/[\n,;]+/).map(Y=>Y.trim()).filter(Y=>Y.includes("@"));if(B.length===0){ne.error("No valid email addresses found");return}_.mutate({emails:B,reason:j||void 0})},R=k?Math.ceil(k.total/O):1;return n.jsx(Pt,{"data-loc":"client/src/pages/client/Blacklist.tsx:81",title:"Blacklist",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:82",className:"p-6 max-w-5xl mx-auto space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:84",className:"flex items-center justify-between",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:85",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:86",className:"w-9 h-9 rounded-lg bg-red-500/15 flex items-center justify-center",children:n.jsx(_S,{"data-loc":"client/src/pages/client/Blacklist.tsx:87",className:"w-5 h-5 text-red-400"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:89",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/Blacklist.tsx:90",className:"text-xl font-semibold text-foreground",children:"Blacklist"}),n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:91",className:"text-sm text-muted-foreground",children:"Banned traders are permanently suppressed from all future sends"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:96",className:"flex gap-2",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:97",variant:"outline",size:"sm",onClick:()=>p(!0),children:[n.jsx(Ns,{"data-loc":"client/src/pages/client/Blacklist.tsx:98",className:"w-4 h-4 mr-1.5"}),"Bulk import"]}),n.jsxs(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:101",size:"sm",onClick:()=>d(!0),children:[n.jsx(Wt,{"data-loc":"client/src/pages/client/Blacklist.tsx:102",className:"w-4 h-4 mr-1.5"}),"Add email"]})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:109",className:"flex items-center gap-4 p-4 rounded-lg border border-border bg-card",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:110",className:"text-center",children:[n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:111",className:"text-2xl font-bold text-foreground",children:k?.total??"—"}),n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:112",className:"text-xs text-muted-foreground",children:"Total blacklisted"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:114",className:"h-10 w-px bg-border"}),n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:115",className:"text-sm text-muted-foreground",children:"These emails will be silently skipped during campaign sends, even if the contact is subscribed."})]}),n.jsxs("form",{"data-loc":"client/src/pages/client/Blacklist.tsx:121",onSubmit:I,className:"flex gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:122",className:"relative flex-1 max-w-sm",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Blacklist.tsx:123",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Blacklist.tsx:124",className:"pl-9",placeholder:"Search by email…",value:r,onChange:B=>i(B.target.value)})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:131",type:"submit",variant:"outline",size:"sm",children:"Search"}),a&&n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:133",variant:"ghost",size:"sm",onClick:()=>{s(""),i(""),t(1)},children:"Clear"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:140",className:"rounded-lg border border-border overflow-hidden",children:n.jsxs("table",{"data-loc":"client/src/pages/client/Blacklist.tsx:141",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/Blacklist.tsx:142",className:"bg-muted/40 border-b border-border",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/Blacklist.tsx:143",children:[n.jsx("th",{"data-loc":"client/src/pages/client/Blacklist.tsx:144",className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Email"}),n.jsx("th",{"data-loc":"client/src/pages/client/Blacklist.tsx:145",className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Reason"}),n.jsx("th",{"data-loc":"client/src/pages/client/Blacklist.tsx:146",className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Added"}),n.jsx("th",{"data-loc":"client/src/pages/client/Blacklist.tsx:147",className:"px-4 py-3 w-12"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/Blacklist.tsx:150",children:E?Array.from({length:8}).map((B,Y)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Blacklist.tsx:153",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:154",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Blacklist.tsx:154",className:"h-4 w-48"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:155",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Blacklist.tsx:155",className:"h-4 w-32"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:156",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/Blacklist.tsx:156",className:"h-4 w-24"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:157",className:"px-4 py-3"})]},Y)):k?.rows.length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/Blacklist.tsx:161",children:n.jsxs("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:162",colSpan:4,className:"px-4 py-12 text-center text-muted-foreground",children:[n.jsx(_S,{"data-loc":"client/src/pages/client/Blacklist.tsx:163",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:164",children:a?"No results for that search.":"No emails blacklisted yet."})]})}):k?.rows.map(B=>n.jsxs("tr",{"data-loc":"client/src/pages/client/Blacklist.tsx:169",className:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:170",className:"px-4 py-3 font-mono text-xs text-foreground",children:B.email}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:171",className:"px-4 py-3 text-muted-foreground text-xs",children:B.reason?n.jsx(Le,{"data-loc":"client/src/pages/client/Blacklist.tsx:173",variant:"outline",className:"text-xs font-normal",children:B.reason}):n.jsx("span",{"data-loc":"client/src/pages/client/Blacklist.tsx:175",className:"opacity-40",children:"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:178",className:"px-4 py-3 text-muted-foreground text-xs",children:new Date(B.createdAt).toLocaleDateString()}),n.jsx("td",{"data-loc":"client/src/pages/client/Blacklist.tsx:181",className:"px-4 py-3",children:n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:182",variant:"ghost",size:"icon",className:"w-7 h-7 text-muted-foreground hover:text-destructive",onClick:()=>T.mutate({id:B.id}),disabled:T.isPending,children:n.jsx(Ua,{"data-loc":"client/src/pages/client/Blacklist.tsx:189",className:"w-3.5 h-3.5"})})})]},B.id))})]})}),R>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:201",className:"flex items-center justify-between text-sm text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/Blacklist.tsx:202",children:["Showing ",(e-1)*O+1,"–",Math.min(e*O,k?.total??0)," of ",k?.total??0]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:205",className:"flex gap-1",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:206",variant:"outline",size:"icon",className:"w-8 h-8",disabled:e<=1,onClick:()=>t(B=>B-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/Blacklist.tsx:207",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:209",variant:"outline",size:"icon",className:"w-8 h-8",disabled:e>=R,onClick:()=>t(B=>B+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/Blacklist.tsx:210",className:"w-4 h-4"})})]})]}),n.jsx(qa,{"data-loc":"client/src/pages/client/Blacklist.tsx:217",open:l,onOpenChange:d,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Blacklist.tsx:218",className:"sm:max-w-md",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Blacklist.tsx:219",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Blacklist.tsx:220",children:"Add to Blacklist"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:222",className:"space-y-4 py-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:223",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Blacklist.tsx:224",children:"Email address"}),n.jsx(De,{"data-loc":"client/src/pages/client/Blacklist.tsx:225",placeholder:"[email protected]",value:x,onChange:B=>m(B.target.value),onKeyDown:B=>B.key==="Enter"&&D.mutate({email:x,reason:h||void 0})})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:232",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Blacklist.tsx:233",children:["Reason ",n.jsx("span",{"data-loc":"client/src/pages/client/Blacklist.tsx:233",className:"text-muted-foreground text-xs",children:"(optional)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/Blacklist.tsx:234",placeholder:"e.g. Banned for fraud",value:h,onChange:B=>y(B.target.value)})]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Blacklist.tsx:241",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:242",variant:"outline",onClick:()=>d(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:243",onClick:()=>D.mutate({email:x,reason:h||void 0}),disabled:!x||D.isPending,children:"Add to blacklist"})]})]})}),n.jsx(qa,{"data-loc":"client/src/pages/client/Blacklist.tsx:254",open:u,onOpenChange:p,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Blacklist.tsx:255",className:"sm:max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Blacklist.tsx:256",children:n.jsx(Ha,{"data-loc":"client/src/pages/client/Blacklist.tsx:257",children:"Bulk Import Emails"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:259",className:"space-y-4 py-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:260",className:"space-y-1.5",children:[n.jsx(_e,{"data-loc":"client/src/pages/client/Blacklist.tsx:261",children:"Email addresses"}),n.jsx(Yy,{"data-loc":"client/src/pages/client/Blacklist.tsx:262",placeholder:`Paste one email per line, or comma/semicolon separated:
1053
1054[email protected]
1055[email protected]`,className:"font-mono text-xs min-h-[180px]",value:w,onChange:B=>b(B.target.value)}),n.jsx("p",{"data-loc":"client/src/pages/client/Blacklist.tsx:268",className:"text-xs text-muted-foreground",children:w?`${w.split(/[\n,;]+/).map(B=>
1055B.trim()).filter(B=>B.includes("@")).length} valid emails detected`:"Accepts one per line, or comma/semicolon separated"})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Blacklist.tsx:274",className:"space-y-1.5",children:[n.jsxs(_e,{"data-loc":"client/src/pages/client/Blacklist.tsx:275",children:["Reason ",n.jsx("span",{"data-loc":"client/src/pages/client/Blacklist.tsx:275",className:"text-muted-foreground text-xs",children:"(optional, applied to all)"})]}),n.jsx(De,{"data-loc":"client/src/pages/client/Blacklist.tsx:276",placeholder:"e.g. Banned traders batch",value:j,onChange:B=>S(B.target.value)})]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Blacklist.tsx:283",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:284",variant:"outline",onClick:()=>p(!1),children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Blacklist.tsx:285",onClick:$,disabled:!w||_.isPending,children:_.isPending?"Importing…":"Import"})]})]})})]})})}const e3e=[{value:"",label:"All actions"},{value:"member",label:"Team / Login"},{value:"campaign",label:"Campaigns"},{value:"contacts",label:"Contacts"},{value:"domain",label:"Domains"},{value:"api_key",label:"API Keys"}],t3e={"member.login":"Logged in","member.invited":"Invited member","member.removed":"Removed member","member.role_updated":"Updated role","campaign.batch_sent":"Sent campaign batch","contacts.imported":"Imported contacts","domain.added":"Added domain","domain.removed":"Removed domain","api_key.created":"Created API key","api_key.revoked":"Revoked API key"},a3e={"member.login":JJ,"member.invited":wa,"member.removed":wa,"member.role_updated":wa,"campaign.batch_sent":Lc,"contacts.imported":Ns,"domain.added":$i,"domain.removed":$i,"api_key.created":OS,"api_key.revoked":OS},n3e={"member.login":"bg-blue-500/15 text-blue-400","member.invited":"bg-green-500/15 text-green-400","member.removed":"bg-red-500/15 text-red-400","member.role_updated":"bg-yellow-500/15 text-yellow-400","campaign.batch_sent":"bg-purple-500/15 text-purple-400","contacts.imported":"bg-cyan-500/15 text-cyan-400","domain.added":"bg-emerald-500/15 text-emerald-400","domain.removed":"bg-red-500/15 text-red-400","api_key.created":"bg-orange-500/15 text-orange-400","api_key.revoked":"bg-red-500/15 text-red-400"},Bp=50;function s3e(e,t){if(!t)return null;if(e==="contacts.imported"){const a=t.rowCount;return a?`${a.toLocaleString()} rows`:null}if(e==="campaign.batch_sent"){const a=t.contactCount,s=t.batchNumber;return a?`Batch ${s} · ${a.toLocaleString()} contacts`:null}return e==="member.role_updated"?`${t.previousRole} → ${t.newRole}`:(e==="member.invited"||e==="member.removed")&&(t.invitedEmail||t.removedEmail)||null}function r3e(){const[e,t]=v.useState(1),[a,s]=v.useState(""),[r,i]=v.useState(""),[l,d]=v.useState(""),u=v.useMemo(()=>({limit:Bp,offset:(e-1)*Bp,search:a||void 0,action:l||void 0}),[e,a,l]),{data:p,isLoading:x}=le.audit.list.useQuery(u),m=p?Math.ceil(p.total/Bp):1,h=w=>{w.preventDefault(),s(r),t(1)},y=w=>{d(w==="all"?"":w),t(1)};return n.jsx(Pt,{"data-loc":"client/src/pages/client/AuditLog.tsx:110",title:"Audit Log",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:111",className:"p-6 max-w-6xl mx-auto space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:113",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:114",className:"w-9 h-9 rounded-lg bg-primary/10 flex items-center justify-center",children:n.jsx(Vp,{"data-loc":"client/src/pages/client/AuditLog.tsx:115",className:"w-5 h-5 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:117",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/AuditLog.tsx:118",className:"text-xl font-semibold text-foreground",children:"Audit Log"}),n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:119",className:"text-sm text-muted-foreground",children:"A complete record of who did what and when in this workspace"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:126",className:"flex flex-wrap gap-2 items-center",children:[n.jsxs("form",{"data-loc":"client/src/pages/client/AuditLog.tsx:127",onSubmit:h,className:"flex gap-2 flex-1 min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:128",className:"relative flex-1 max-w-sm",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/AuditLog.tsx:129",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/AuditLog.tsx:130",className:"pl-9",placeholder:"Search by user, email, or entity…",value:r,onChange:w=>i(w.target.value)})]}),n.jsx(te,{"data-loc":"client/src/pages/client/AuditLog.tsx:137",type:"submit",variant:"outline",size:"sm",children:"Search"}),(a||l)&&n.jsx(te,{"data-loc":"client/src/pages/client/AuditLog.tsx:139",variant:"ghost",size:"sm",onClick:()=>{s(""),i(""),d(""),t(1)},children:"Clear"})]}),n.jsxs(mt,{"data-loc":"client/src/pages/client/AuditLog.tsx:154",value:l||"all",onValueChange:y,children:[n.jsx(xt,{"data-loc":"client/src/pages/client/AuditLog.tsx:155",className:"w-44 h-9 text-sm",children:n.jsx(ht,{"data-loc":"client/src/pages/client/AuditLog.tsx:156",placeholder:"All actions"})}),n.jsx(gt,{"data-loc":"client/src/pages/client/AuditLog.tsx:158",children:e3e.map(w=>n.jsx(he,{"data-loc":"client/src/pages/client/AuditLog.tsx:160",value:w.value||"all",children:w.label},w.value||"all"))})]})]}),p&&n.jsxs("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:170",className:"text-sm text-muted-foreground",children:[p.total.toLocaleStr
1055ing()," event",p.total!==1?"s":"",a||l?" matching your filters":" total"]}),n.jsx("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:177",className:"rounded-lg border border-border overflow-hidden",children:n.jsxs("table",{"data-loc":"client/src/pages/client/AuditLog.tsx:178",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/AuditLog.tsx:179",className:"bg-muted/40 border-b border-border",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/AuditLog.tsx:180",children:[n.jsx("th",{"data-loc":"client/src/pages/client/AuditLog.tsx:181",className:"text-left px-4 py-3 font-medium text-muted-foreground w-44",children:"Action"}),n.jsx("th",{"data-loc":"client/src/pages/client/AuditLog.tsx:182",className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"User"}),n.jsx("th",{"data-loc":"client/src/pages/client/AuditLog.tsx:183",className:"text-left px-4 py-3 font-medium text-muted-foreground",children:"Details"}),n.jsx("th",{"data-loc":"client/src/pages/client/AuditLog.tsx:184",className:"text-left px-4 py-3 font-medium text-muted-foreground w-36",children:"IP Address"}),n.jsx("th",{"data-loc":"client/src/pages/client/AuditLog.tsx:185",className:"text-left px-4 py-3 font-medium text-muted-foreground w-40",children:"When"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/AuditLog.tsx:188",children:x?Array.from({length:10}).map((w,b)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/AuditLog.tsx:191",className:"border-b border-border/50",children:[n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:192",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/AuditLog.tsx:192",className:"h-5 w-32"})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:193",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/AuditLog.tsx:193",className:"h-4 w-40"})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:194",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/AuditLog.tsx:194",className:"h-4 w-28"})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:195",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/AuditLog.tsx:195",className:"h-4 w-24"})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:196",className:"px-4 py-3",children:n.jsx(Me,{"data-loc":"client/src/pages/client/AuditLog.tsx:196",className:"h-4 w-32"})})]},b)):p?.logs.length===0?n.jsx("tr",{"data-loc":"client/src/pages/client/AuditLog.tsx:200",children:n.jsxs("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:201",colSpan:5,className:"px-4 py-16 text-center text-muted-foreground",children:[n.jsx(Vp,{"data-loc":"client/src/pages/client/AuditLog.tsx:202",className:"w-8 h-8 mx-auto mb-2 opacity-30"}),n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:203",children:a||l?"No events match your filters.":"No audit events recorded yet."}),n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:204",className:"text-xs mt-1 opacity-60",children:"Events will appear here as your team takes actions."})]})}):p?.logs.map(w=>{const b=a3e[w.action]??Vp,j=n3e[w.action]??"bg-muted text-muted-foreground",S=t3e[w.action]??w.action,O=s3e(w.action,w.metadata),A=new Date(w.createdAt);return n.jsxs("tr",{"data-loc":"client/src/pages/client/AuditLog.tsx:216",className:"border-b border-border/50 hover:bg-muted/20 transition-colors",children:[n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:217",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:218",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:219",className:`w-6 h-6 rounded-md flex items-center justify-center shrink-0 ${j}`,children:n.jsx(b,{"data-loc":"client/src/pages/client/AuditLog.tsx:220",className:"w-3.5 h-3.5"})}),n.jsx("span",{"data-loc":"client/src/pages/client/AuditLog.tsx:222",className:"font-medium text-foreground text-xs leading-tight",children:S})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:225",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:226",className:"flex items-center gap-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:227",className:"w-6 h-6 rounded-full bg-muted flex items-center justify-center text-xs font-medium text-muted-foreground shrink-0",children:w.userName?.charAt(0)?.toUpperCase()??"?"}),n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:230",className:"min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:231",className:"text-xs font-medium text-foreground truncate",children:w.userName}),n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:232",className:"text-xs text-muted-foreground truncate",children:w.userEmail})]})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:236",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:237",className:"space-y-0.5",children:[w.entityName&&n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:239",className:"text-xs text-foreground truncate max-w-xs",children:w.entityName}),O&&n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:242",className:"text-xs text-muted-foreground",children:O}),w.userRole&&n.jsx(Le,{"data-loc":"client/src/pages/client/AuditLog.tsx:245",variant:"outline",className:"text-xs font-normal py-0 px-1.5 h-4",children:w.userRole})]})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:251",className:"px-4 py-3",children:n.jsx("span",{"data-loc":"client/src/pages/client/AuditLog.tsx:252",className:"text-xs text-muted-foreground font-mono",children:w.ipAddress??"—"})}),n.jsx("td",{"data-loc":"client/src/pages/client/AuditLog.tsx:256",className:"px-4 py-3",children:n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:257",children:[n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:258",className:"text-xs text-foreground",children:A.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),n.jsx("p",{"data-loc":"client/src/pages/client/AuditLog.tsx:261",className:"text-xs text-muted-foreground",children:A.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})})]})})]},w.id)})})]})}),m>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:276",className:"flex items-center justify-between text-sm text-muted-foreground",children:[n.jsxs("span",{"data-loc":"client/src/pages/client/AuditLog.tsx:277",children:["Showing ",(e-1)*Bp+1,"–",Math.min(e*Bp,p?.total??0)," of ",(p?.total??0).toLocaleStr
1055ing()]}),n.jsxs("div",{"data-loc":"client/src/pages/client/AuditLog.tsx:280",className:"flex gap-1",children:[n.jsx(te,{"data-loc":"client/src/pages/client/AuditLog.tsx:281",variant:"outline",size:"icon",className:"w-8 h-8",disabled:e<=1,onClick:()=>t(w=>w-1),children:n.jsx(Rc,{"data-loc":"client/src/pages/client/AuditLog.tsx:288",className:"w-4 h-4"})}),n.jsx(te,{"data-loc":"client/src/pages/client/AuditLog.tsx:290",variant:"outline",size:"icon",className:"w-8 h-8",disabled:e>=m,onClick:()=>t(w=>w+1),children:n.jsx(Es,{"data-loc":"client/src/pages/client/AuditLog.tsx:297",className:"w-4 h-4"})})]})]})]})})}function KW({status:e}){const t={subscribed:"bg-emerald-100 text-emerald-700 border-emerald-200",unsubscribed:"bg-gray-100 text-gray-600 border-gray-200",bounced:"bg-red-100 text-red-700 border-red-200",complained:"bg-orange-100 text-orange-700 border-orange-200"};return n.jsx("span",{"data-loc":"client/src/pages/client/Duplicates.tsx:40",className:Se("text-xs px-2 py-0.5 rounded-full border font-medium",t[e]??"bg-gray-100 text-gray-600 border-gray-200"),children:e})}function i3e({group:e,onMerge:t,onFlag:a}){const[s,r]=v.useState(!0),i=e.contacts.some(l=>l.customFields?._fraudFlag);return n.jsxs(Ke,{"data-loc":"client/src/pages/client/Duplicates.tsx:56",className:Se("border transition-colors",i?"border-red-300 bg-red-50/30":"border-border"),children:[n.jsxs(Nt,{"data-loc":"client/src/pages/client/Duplicates.tsx:57",className:"pb-2 pt-4 px-5",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:58",className:"flex items-center justify-between gap-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:59",className:"flex items-center gap-2 min-w-0",children:[i&&n.jsx(Qg,{"data-loc":"client/src/pages/client/Duplicates.tsx:60",className:"w-4 h-4 text-red-500 flex-shrink-0"}),n.jsx(St,{"data-loc":"client/src/pages/client/Duplicates.tsx:61",className:"text-base font-semibold capitalize truncate",children:e.normalizedName||"Unknown Name"}),n.jsxs(Le,{"data-loc":"client/src/pages/client/Duplicates.tsx:64",variant:"secondary",className:"flex-shrink-0 text-xs",children:[e.contactCount," accounts"]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:68",className:"flex items-center gap-2 flex-shrink-0",children:[n.jsxs(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:69",size:"sm",variant:"outline",className:"gap-1.5 text-xs h-7",onClick:()=>t(e),children:[n.jsx(YI,{"data-loc":"client/src/pages/client/Duplicates.tsx:75",className:"w-3.5 h-3.5"}),"Merge"]}),n.jsx("button",{"data-loc":"client/src/pages/client/Duplicates.tsx:78",onClick:()=>r(l=>!l),className:"text-muted-foreground hover:text-foreground transition-colors p-1",children:s?n.jsx(Bi,{"data-loc":"client/src/pages/client/Duplicates.tsx:82",className:"w-4 h-4"}):n.jsx(Tn,{"data-loc":"client/src/pages/client/Duplicates.tsx:82",className:"w-4 h-4"})})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:86",className:"text-xs text-muted-foreground mt-1",children:["First seen ",new Date(e.firstSeen).toLocaleDateString()," · Last seen ",new Date(e.lastSeen).toLocaleDateString()]})]}),s&&n.jsx(Ze,{"data-loc":"client/src/pages/client/Duplicates.tsx:92",className:"px-5 pb-4",children:n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:93",className:"divide-y divide-border rounded-md border bg-background overflow-hidden",children:e.contacts.map((l,d)=>{const u=l.customFields?._fraudFlag===!0;return n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:97",className:Se("flex items-center justify-between gap-3 px-4 py-2.5 text-sm",u?"bg-red-50":d%2===0?"bg-background":"bg-muted/30"),children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:104",className:"flex items-center gap-3 min-w-0",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:105",className:"w-7 h-7 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-bold flex-shrink-0",children:(l.firstName?.[0]??l.email[0]).toUpperCase()}
1055),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:108",className:"min-w-0",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:109",className:"font-medium truncate",children:[l.firstName," ",l.lastName,u&&n.jsx("span",{"data-loc":"client/src/pages/client/Duplicates.tsx:111",className:"ml-2 text-xs text-red-600 font-normal",children:"(flagged as fraud)"})]}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:113",className:"text-xs text-muted-foreground truncate",children:l.email})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:116",className:"flex items-center gap-2 flex-shrink-0",children:[n.jsx(KW,{"data-loc":"client/src/pages/client/Duplicates.tsx:117",status:l.status}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:118",className:"text-xs text-muted-foreground whitespace-nowrap",children:new Date(l.createdAt).toLocaleDateString()}),n.jsxs(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:121",size:"sm",variant:u?"destructive":"outline",className:"h-6 text-xs px-2 gap-1",onClick:()=>a(l.id,!u),children:[n.jsx(PJ,{"data-loc":"client/src/pages/client/Duplicates.tsx:127",className:"w-3 h-3"}),u?"Unflag":"Flag"]})]})]},l.id)})})})]})}function c3e({group:e,open:t,onClose:a}){const[s,r]=v.useState(null),i=le.useUtils(),l=le.contacts.mergeContacts.useMutation({onSuccess:p=>{ne.success(`Merged ${p.mergedCount} duplicate contact(s) into primary.`),i.contacts.getDuplicates.invalidate(),a(),r(null)},onError:p=>ne.error(p.message)});if(!e)return null;const d=s??e.contacts[0]?.id,u=e.contacts.filter(p=>p.id!==d).map(p=>p.id);return n.jsx(qa,{"data-loc":"client/src/pages/client/Duplicates.tsx:165",open:t,onOpenChange:a,children:n.jsxs(Fa,{"data-loc":"client/src/pages/client/Duplicates.tsx:166",className:"max-w-lg",children:[n.jsx(Wa,{"data-loc":"client/src/pages/client/Duplicates.tsx:167",children:n.jsxs(Ha,{"data-loc":"client/src/pages/client/Duplicates.tsx:168",className:"flex items-center gap-2",children:[n.jsx(YI,{"data-loc":"client/src/pages/client/Duplicates.tsx:169",className:"w-5 h-5 text-primary"}),"Merge Duplicate Contacts"]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:174",className:"space-y-3 py-2",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/Duplicates.tsx:175",className:"text-sm text-muted-foreground",children:["Select which contact to ",n.jsx("strong",{"data-loc":"client/src/pages/client/Duplicates.tsx:176",children:"keep"}),". All email history, campaign data, and list memberships from the other contacts will be transferred to the primary contact, and the duplicates will be permanently deleted."]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:179",className:"space-y-2",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:180",className:"text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-1",children:"Select primary contact to keep:"}),e.contacts.map(p=>n.jsxs("button",{"data-loc":"client/src/pages/client/Duplicates.tsx:182",onClick:()=>r(p.id),className:Se("w-full flex items-center gap-3 p-3 rounded-lg border text-left transition-colors",(s??e.contacts[0]?.id)===p.id?"border-primary bg-primary/5":"border-border hover:bg-muted/50"),children:[n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:192",className:"w-8 h-8 rounded-full bg-primary/10 text-primary flex items-center justify-center text-sm font-bold flex-shrink-0",children:(p.firstName?.[0]??p.email[0]).toUpperCase()}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:195",className:"min-w-0 flex-1",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:196",className:"font-medium text-sm",children:[p.firstName," ",p.lastName]}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:197",className:"text-xs text-muted-foreground",children:p.email})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:199",className:"flex items-center gap-2",children:[n.jsx(KW,{"data-loc":"client/src/pages/client/Dupl
1055icates.tsx:200",status:p.status}),(s??e.contacts[0]?.id)===p.id&&n.jsx(Le,{"data-loc":"client/src/pages/client/Duplicates.tsx:202",className:"text-xs bg-primary text-primary-foreground",children:"Primary"})]})]},p.id))]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:209",className:"rounded-md bg-amber-50 border border-amber-200 p-3 text-xs text-amber-800 flex gap-2",children:[n.jsx(Ia,{"data-loc":"client/src/pages/client/Duplicates.tsx:210",className:"w-4 h-4 flex-shrink-0 mt-0.5"}),n.jsxs("span",{"data-loc":"client/src/pages/client/Duplicates.tsx:211",children:[n.jsxs("strong",{"data-loc":"client/src/pages/client/Duplicates.tsx:212",children:[u.length," contact(s)"]})," will be permanently deleted after merging. This action cannot be undone."]})]})]}),n.jsxs(Di,{"data-loc":"client/src/pages/client/Duplicates.tsx:217",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:218",variant:"outline",onClick:a,children:"Cancel"}),n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:219",variant:"destructive",disabled:l.isPending||u.length===0,onClick:()=>l.mutate({primaryId:d,duplicateIds:u}),children:l.isPending?"Merging...":`Merge & Delete ${u.length} Duplicate(s)`})]})]})})}function l3e(){const[e,t]=v.useState(""),[a,s]=v.useState(""),[r,i]=v.useState(1),[l,d]=v.useState(null),u=le.useUtils(),{data:p,isLoading:x}=le.contacts.getDuplicates.useQuery({page:r,limit:25,search:e||void 0}),m=le.contacts.flagFraud.useMutation({onSuccess:()=>{u.contacts.getDuplicates.invalidate()},onError:y=>ne.error(y.message)}),h=p?Math.ceil(p.total/25):1;return n.jsx(Pt,{"data-loc":"client/src/pages/client/Duplicates.tsx:251",title:"Duplicate Contacts",children:n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:252",className:"p-6 max-w-4xl mx-auto space-y-6",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:254",className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:255",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:256",className:"flex items-center gap-2 mb-1",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Duplicates.tsx:257",className:"w-5 h-5 text-primary"}),n.jsx("h1",{"data-loc":"client/src/pages/client/Duplicates.tsx:258",className:"text-xl font-bold",children:"Duplicate Contacts"})]}),n.jsx("p",{"data-loc":"client/src/pages/client/Duplicates.tsx:260",className:"text-sm text-muted-foreground",children:"Contacts sharing the same name across different email addresses — potential coupon fraud or duplicate signups."})]}),p&&n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:265",className:"flex-shrink-0 text-right",children:[n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:266",className:"text-2xl font-bold text-foreground",children:p.total}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:267",className:"text-xs text-muted-foreground",children:"duplicate groups"})]})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:273",className:"flex gap-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:274",className:"relative flex-1",children:[n.jsx(Gr,{"data-loc":"client/src/pages/client/Duplicates.tsx:275",className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),n.jsx(De,{"data-loc":"client/src/pages/client/Duplicates.tsx:276",className:"pl-9",placeholder:"Search by name...",value:a,onChange:y=>s(y.target.value),onKeyDown:y=>{y.key==="Enter"&&(t(a),i(1))}})]}),n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:289",onClick:()=>{t(a),i(1)},children:"Search"}),e&&n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:291",variant:"outline",onClick:()=>{t(""),s(""),i(1)},children:"Clear"})]}),x?n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:299",className:"space-y-3",children:[1,2,3].map(y=>n.jsx(Me,{"data-loc":"client/src/pages/client/Duplicates.tsx:300",className:"h-32 w-full rounded-lg"},y))}):!p||p.groups.length===0?n.jsxs("div",{"data-loc":"client/src/pages/client/Dupl
1055icates.tsx:303",className:"text-center py-16 text-muted-foreground",children:[n.jsx(wa,{"data-loc":"client/src/pages/client/Duplicates.tsx:304",className:"w-10 h-10 mx-auto mb-3 opacity-30"}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:305",className:"font-medium",children:e?"No duplicate groups match your search.":"No duplicate contacts found."}),n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:308",className:"text-sm mt-1",children:!e&&"Contacts with the same name but different emails will appear here."})]}):n.jsx("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:313",className:"space-y-3",children:p.groups.map(y=>n.jsx(i3e,{"data-loc":"client/src/pages/client/Duplicates.tsx:315",group:y,onMerge:d,onFlag:(w,b)=>m.mutate({contactId:w,flagged:b})},y.normalizedName))}),h>1&&n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:327",className:"flex items-center justify-between pt-2",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:328",className:"text-sm text-muted-foreground",children:["Page ",r," of ",h," · ",p?.total," groups total"]}),n.jsxs("div",{"data-loc":"client/src/pages/client/Duplicates.tsx:331",className:"flex gap-2",children:[n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:332",variant:"outline",size:"sm",disabled:r<=1,onClick:()=>i(y=>y-1),children:"Previous"}),n.jsx(te,{"data-loc":"client/src/pages/client/Duplicates.tsx:335",variant:"outline",size:"sm",disabled:r>=h,onClick:()=>i(y=>y+1),children:"Next"})]})]}),n.jsx(c3e,{"data-loc":"client/src/pages/client/Duplicates.tsx:342",group:l,open:!!l,onClose:()=>d(null)})]})})}function Ol({code:e,language:t="json"}){const[a,s]=v.useState(!1),r=()=>{navigator.clipboard.writeText(e),s(!0),ne.success("Copied to clipboard"),setTimeout(()=>s(!1),2e3)};return n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:22",className:"relative rounded-lg border border-border bg-zinc-950 overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:23",className:"flex items-center justify-between px-4 py-2 border-b border-border bg-zinc-900",children:[n.jsx("span",{"data-loc":"client/src/pages/client/ApiDocs.tsx:24",className:"text-xs text-zinc-400 font-mono",children:t}),n.jsxs(te,{"data-loc":"client/src/pages/client/ApiDocs.tsx:25",variant:"ghost",size:"sm",className:"h-6 px-2 text-xs text-zinc-400 hover:text-white",onClick:r,children:[a?n.jsx(ss,{"data-loc":"client/src/pages/client/ApiDocs.tsx:31",className:"h-3 w-3 mr-1"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/ApiDocs.tsx:31",className:"h-3 w-3 mr-1"}),a?"Copied":"Copy"]})]}),n.jsx("pre",{"data-loc":"client/src/pages/client/ApiDocs.tsx:35",className:"p-4 text-sm font-mono text-zinc-200 overflow-x-auto leading-relaxed whitespace-pre",children:e})]})}function Cc({title:e,children:t,defaultOpen:a=!0}){const[s,r]=v.useState(a);return n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:46",className:"border border-border rounded-xl overflow-hidden",children:[n.jsxs("button",{"data-loc":"client/src/pages/client/ApiDocs.tsx:47",className:"w-full flex items-center justify-between px-5 py-4 bg-card hover:bg-muted/50 transition-colors text-left",onClick:()=>r(!s),children:[n.jsx("span",{"data-loc":"client/src/pages/client/ApiDocs.tsx:51",className:"font-semibold text-sm",children:e}),s?n.jsx(Tn,{"data-loc":"client/src/pages/client/ApiDocs.tsx:52",className:"h-4 w-4 text-muted-foreground"}):n.jsx(Es,{"data-loc":"client/src/pages/client/ApiDocs.tsx:52",className:"h-4 w-4 text-muted-foreground"})]}),s&&n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:55",className:"px-5 py-4 border-t border-border bg-card/50 space-y-4",children:t})]})}function o3e({rows:e}){return n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:66",className:"overflow-x-auto rounded-lg border border-border",children:n.jsxs("table",{"data-loc":"client/src/pages/client/ApiDocs.tsx:67",className:"w-full text-sm",children:[n.jsx("thead",{"data-loc":"client/src/pages/client/ApiDocs.tsx:68",children:n.jsxs("tr",{"data-loc":"client/src/pages/client/ApiDocs.tsx:69",className:"border-b border-border bg-muted/50",children:[n.jsx("th",{"data-loc":"client/src/pages/client/ApiDocs.tsx:70",className:"text-left px-4 py-2 font-medium text-muted-foreground",children:"Field"}),n.jsx("th",{"data-loc":"client/src/pages/client/ApiDocs.tsx:71",className:"text-left px-4 py-2 font-medium text-muted-foreground",children:"Type"}),n.jsx("th",{"data-loc":"client/src/pages/client/ApiDocs.tsx:72",className:"text-left px-4 py-2 font-medium text-muted-foreground",children:"Required"}),n.jsx("th",{"data-loc":"client/src/pages/client/ApiDocs.tsx:73",className:"text-left px-4 py-2 font-medium text-muted-foreground",children:"Description"})]})}),n.jsx("tbody",{"data-loc":"client/src/pages/client/ApiDocs.tsx:76",children:e.map((t,a)=>n.jsxs("tr",{"data-loc":"client/src/pages/client/ApiDocs.tsx:78",className:"border-b border-border last:border-0",children:[n.jsx("td",{"data-loc":"client/src/pages/client/ApiDocs.tsx:79",className:"px-4 py-2 font-mono text-xs text-emerald-400",children:t.field}),n.jsx("td",{"data-loc":"client/src/pages/client/ApiDocs.tsx:80",className:"px-4 py-2 font-mono text-xs text-blue-400",children:t.type}),n.jsx("td",{"data-loc":"client/src/pages/client/ApiDocs.tsx:81",className:"px-4 py-2",children:t.required?n.jsx(Le,{"data-loc":"client/src/pages/client/ApiDocs.tsx:83",variant:"destructive",className:"text-xs py-0",children:"required"}):n.jsx(Le,{"data-loc":"client/src/pages/client/ApiDocs.tsx:84",variant:"outline",className:"text-xs py-0 text-muted-foreground",children:"optional"})}),n.jsx("td",{"data-loc":"client/src/pages/client/ApiDocs.tsx:87",className:"px-4 py-2 text-muted-foreground text-xs",children:t.description})]},a))})]})})}function d3e(){const{data:e}=le.settings.getApiKey.useQuery(),[t,a]=v.useState(!1),s=e?.key??"bsk_YOUR_API_KEY",r=typeof window<"u"?window.location.origin:"https://app.boostiko.com",i=()=>{navigator.clipboard.writeText(s),a(!0),ne.success("API key copied"),setTimeout(()=>a(!1),2e3)},l=`curl -X POST ${r}/api/events \\
1056  -H "Authorization: Bearer ${s}" \\
1057  -H "Content-Type: application/json" \\
1058  -d '{
1059    "event": "deposited",
1060    "email": "[email protected]",
1061    "firstName": "Alex",
1062    "lastName": "Smith",
1063    "properties": {
1064      "amount": 500,
1065      "currency": "USD",
1066      "plan": "standard_challenge"
1067    }
1068  }'`,d=`{
1069  "success": true,
1070  "contactId": 1234
1071}`,u=`{
1072  "error": "Invalid or inactive API key."
1073}`,p=`const response = await fetch("${r}/api/events", {
1074  method: "POST",
1075  headers: {
1076    "Authorization": "Bearer ${s}",
1077    "Content-Type": "application/json",
1078  },
1079  body: JSON.stringify({
1080    event: "passed_challenge",
1081    email: "[email protected]",
1082    properties: {
1083      accountSize: 100000,
1084      platform: "MT5",
1085    },
1086  }),
1087});
1088
1089const data = await response.json();
1090// { success: true, contactId: 1234 }`,x=`import requests
1091
1092response = requests.post(
1093    "${r}/api/events",
1094    headers={
1095        "Authorization": "Bearer ${s}",
1096        "Content-Type": "application/json",
1097    },
1098    json={
1099        "event": "kyc_approved",
1100        "email": "[email protected]",
1101        "firstName": "Alex",
1102        "properties": {
1103            "country": "US",
1104            "verifiedAt": "2024-01-15T10:30:00Z",
1105        },
1106    },
1107)
1108print(response.json())  # {'success': True, 'contactId': 1234}`,m=[{name:"deposited",description:"Trader made a deposit or purchased a challenge",example:{event:"deposited",email:"[email protected]",properties:{amount:500,plan:"standard_challenge",currency:"USD"}}},{name:"passed_challenge",description:"Trader successfully passed a funded account challenge",example:{event:"passed_challenge",email:"[email protected]",properties:{accountSize:1e5,platform:"MT5",phase:1}}},{name:"breached_account",description:"Trader breached their account rules (drawdown, daily loss, etc.)",example:{event:"breached_account",email:"[email protected]",properties:{accountSize:5e4,reason:"daily_loss_limit",lossAmount:1500}}},{name:"kyc_approved",description:"Trader's KYC / identity verification was approved",example:{event:"kyc_approved",email:"[email protected]",properties:{country:"US",verifiedAt:"2024-01-15T10:30:00Z"}}},{name:"payout_requested",description:"Trader submitted a payout request",example:{event:"payout_requested",email:"[email protected]",properties:{amount:2500,currency:"USD",method:"crypto"}}},{name:"payout_paid",description:"Trader's payout was processed and paid",example:{event:"payout_paid",email:"[email protected]",properties:{amount:2500,currency:"USD",txId:"abc123"}}}];return n.jsx(Pt,{"data-loc":"client/src/pages/client/ApiDocs.tsx:208",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:209",className:"max-w-4xl mx-auto px-6 py-8 space-y-8",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:211",className:"space-y-2",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:212",className:"flex items-center gap-3",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:213",className:"p-2 rounded-lg bg-primary/10",children:n.jsx(UI,{"data-loc":"client/src/pages/client/ApiDocs.tsx:214",className:"h-5 w-5 text-primary"})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:216",children:[n.jsx("h1",{"data-loc":"client/src/pages/client/ApiDocs.tsx:217",className:"text-2xl font-bold",children:"Event API"}),n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:218",className:"text-muted-foreground text-sm",children:"Send any event from your platform to trigger automations and update contacts in real time."})]})]})}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:226",className:"rounded-xl border border-border bg-card p-5 flex items-center justify-between gap-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:227",className:"space-y-1 min-w-0",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:228",className:"text-xs text-muted-foreground font-medium uppercase tracking-wide",children:"Your API Key"}),n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:229",className:"font-mono text-sm text-emerald-400 truncate",children:s})]}),n.jsxs(te,{"data-loc":"client/src/pages/client/ApiDocs.tsx:231",variant:"outline",size:"sm",onClick:i,className:"shrink-0",children:[t?n.jsx(ss,{"data-loc":"client/src/pages/client/ApiDocs.tsx:232",className:"h-3.5 w-3.5 mr-1.5"}):n.jsx(Ra,{"data-loc":"client/src/pages/client/ApiDocs.tsx:232",className:"h-3.5 w-3.5 mr-1.5"}),t?"Copied":"Copy key"]})]}),n.jsxs(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:238",title:"Endpoint",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:239",className:"flex items-center gap-3",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/ApiDocs.tsx:240",className:"bg-emerald-600 text-white font-mono text-xs px-2 py-1",children:"POST"}),n.jsxs("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:241",className:"font-mono text-sm text-zinc-200 bg-zinc-900 px-3 py-1.5 rounded-lg border border-border",children:[r,"/api/events"]})]}),n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:245",className:"text-sm text-muted-foreground",children:["Accepts any event name and contact properties. The contact is upserted by email — created if new, or updated if they already exist. Any matching ",n.jsx("strong",{"data-loc":"client/src/pages/client/ApiDocs.tsx:246",children:"Custom Event"})," automations are triggered immediately."]})]}),n.jsxs(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:251",title:"Authentication",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:252",className:"text-sm text-muted-foreground",children:["Include your API key in the ",n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:253",className:"font-mono text-xs bg-muted px-1 py-0.5 rounded",children:"Authorization"})," header as a Bearer token, or in the ",n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:253",className:"font-mono text-xs bg-muted px-1 py-0.5 rounded",children:"X-API-Key"})," header."]}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:255",language:"http",code:`Authorization: Bearer ${s}
1109
1110# or alternatively:
1111X-API-Key: ${s}`}),n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:256",className:"text-xs text-muted-foreground",children:"Your API key is scoped to your workspace. Keep it secret — do not expose it in client-side JavaScript or public repositories."})]}),n.jsx(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:262",title:"Request Body",children:n.jsx(o3e,{"data-loc":"client/src/pages/client/ApiDocs.tsx:263",rows:[{field:"event",type:"string",required:!0,description:'Event name (e.g. "deposited", "passed_challenge"). Used to match Custom Event automations.'},{field:"email",type:"string",required:!0,description:"Contact's email address. Used to identify or create the contact."},{field:"firstName",type:"string",required:!1,description:"Contact's first name. Updates the contact record 
1111if provided."},{field:"lastName",type:"string",required:!1,description:"Contact's last name. Updates the contact record if provided."},{field:"properties",type:"object",required:!1,description:"Any additional key-value data. Merged into the contact's custom fields and passed to automation context."}]})}),n.jsx(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:273",title:"Response",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:274",className:"space-y-3",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:275",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:276",className:"flex items-center gap-2 mb-2",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/ApiDocs.tsx:277",className:"bg-emerald-600/20 text-emerald-400 border-emerald-600/30 text-xs",children:"200 OK"}),n.jsx("span",{"data-loc":"client/src/pages/client/ApiDocs.tsx:278",className:"text-xs text-muted-foreground",children:"Event received and processed"})]}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:280",language:"json",code:d})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:282",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:283",className:"flex items-center gap-2 mb-2",children:[n.jsx(Le,{"data-loc":"client/src/pages/client/ApiDocs.tsx:284",className:"bg-red-600/20 text-red-400 border-red-600/30 text-xs",children:"401 Unauthorized"}),n.jsx("span",{"data-loc":"client/src/pages/client/ApiDocs.tsx:285",className:"text-xs text-muted-foreground",children:"Missing or invalid API key"})]}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:287",language:"json",code:u})]})]})}),n.jsx(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:293",title:"Code Examples",children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:294",className:"space-y-4",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:295",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:296",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"cURL"}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:297",language:"bash",code:l})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:299",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:300",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Node.js / TypeScript"}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:301",language:"typescript",code:p})]}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:303",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:304",className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:"Python"}),n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:305",language:"python",code:x})]})]})}),n.jsxs(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:311",title:"Prop Firm Event Reference",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:312",className:"text-sm text-muted-foreground",children:"Recommended event names for prop trading firms. Use these consistently to take advantage of pre-built automation templates."}),n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:315",className:"space-y-3",children:m.map(h=>n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:317",className:"rounded-lg border border-border overflow-hidden",children:[n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:318",className:"flex items-start gap-3 px-4 py-3 bg-card",children:[n.jsx(Pa,{"data-loc":"client/src/pages/client/ApiDocs.tsx:319",className:"h-4 w-4 text-primary mt-0.5 shrink-0"}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:320",className:"min-w-0 flex-1",children:[n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:321",className:"flex items-center gap-2 mb-1",children:n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:322",className:"font-mono text-sm text-emerald-400",children:h.name})}),n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:324",className:"text-xs text-muted-foreground",children:h.description})]})]}),n.jsx("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:327",className:"border-t border-border",children:n.jsx(Ol,{"data-loc":"client/src/pages/client/ApiDocs.tsx:328",language:"json",code:JSON.stringify(h.example,null,2)})})]},h.name))})]}),n.jsx(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:336",title:"Setting Up Automations",defaultOpen:!1,children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:337",className:"space-y-3 text-sm text-muted-foreground",children:[n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:338",children:["To trigger an automation when a specific event is received, create a new automation and set the trigger type to ",n.jsx("strong",{"data-loc":"client/src/pages/client/ApiDocs.tsx:339",className:"text-foreground",children:"Custom Event"}),". In the trigger configuration, enter the exact event name (e.g. ",n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:339",className:"font-mono text-xs bg-muted px-1 py-0.5 rounded",children:"passed_challenge"}),")."]}),n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:341",children:"When the Event API receives a matching event, the automation will immediately enroll the contact and execute the first step. If the contact is already enrolled in that automation, they will not be re-enrolled."}),n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:344",className:"rounded-lg border border-amber-500/30 bg-amber-500/10 p-4",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:345",className:"text-amber-400 text-xs font-medium mb-1",children:"Tip: Event name matching is exact"}),n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:346",className:"text-xs text-muted-foreground",children:["The event name in your API call must exactly match the event name configured in the automation trigger. For example, ",n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:347",className:"font-mono text-xs",children:"deposited"})," and ",n.jsx("code",{"data-loc":"client/src/pages/client/ApiDocs.tsx:347",className:"font-mono text-xs",children:"Deposited"})," are treated as different events."]})]})]})}),n.jsx(Cc,{"data-loc":"client/src/pages/client/ApiDocs.tsx:354",title:"Rate Limits & Notes",defaultOpen:!1,children:n.jsxs("div",{"data-loc":"client/src/pages/client/ApiDocs.tsx:355",className:"space-y-2 text-sm text-muted-foreground",children:[n.jsx("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:356",children:"The Event API is designed for server-to-server communication. Each request is processed synchronously — the response is returned only after the contact has been upserted and matching automations have been triggered."}),n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:359",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/ApiDocs.tsx:360",className:"text-foreground",children:"Contact deduplication:"})," Contacts are identified by email address (case-insensitive). If a contact with the given email already exists, their record 
1111is updated with any new properties. A new contact is created only if no match is found."]}),n.jsxs("p",{"data-loc":"client/src/pages/client/ApiDocs.tsx:362",children:[n.jsx("strong",{"data-loc":"client/src/pages/client/ApiDocs.tsx:363",className:"text-foreground",children:"Automation deduplication:"})," A contact will not be re-enrolled in the same automation if they are already actively enrolled. This prevents duplicate email sequences from being sent."]})]})})]})})}function u3e(){return n.jsxs(Nee,{"data-loc":"client/src/App.tsx:57",children:[n.jsx(At,{"data-loc":"client/src/App.tsx:59",path:"/",component:Lk}),n.jsx(At,{"data-loc":"client/src/App.tsx:60",path:"/login",component:Lk}),n.jsx(At,{"data-loc":"client/src/App.tsx:61",path:"/member-login",component:Mte}),n.jsx(At,{"data-loc":"client/src/App.tsx:62",path:"/invite/accept",component:Pte}),n.jsx(At,{"data-loc":"client/src/App.tsx:65",path:"/admin",component:Nne}),n.jsx(At,{"data-loc":"client/src/App.tsx:66",path:"/admin/clients",component:cse}),n.jsx(At,{"data-loc":"client/src/App.tsx:67",path:"/admin/clients/:id",component:lse}),n.jsx(At,{"data-loc":"client/src/App.tsx:68",path:"/admin/sending-health",component:ose}),n.jsx(At,{"data-loc":"client/src/App.tsx:71",path:"/dashboard",component:L1e}),n.jsx(At,{"data-loc":"client/src/App.tsx:72",path:"/contacts",component:$je}),n.jsx(At,{"data-loc":"client/src/App.tsx:73",path:"/contacts/duplicates",component:l3e}),n.jsx(At,{"data-loc":"client/src/App.tsx:74",path:"/contacts/:id",component:qje}),n.jsx(At,{"data-loc":"client/src/App.tsx:75",path:"/lists",component:Fje}),n.jsx(At,{"data-loc":"client/src/App.tsx:76",path:"/segments",component:Hje}),n.jsx(At,{"data-loc":"client/src/App.tsx:77",path:"/campaigns",component:pwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:78",path:"/campaigns/new",component:mwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:79",path:"/campaigns/create",component:KR}),n.jsx(At,{"data-loc":"client/src/App.tsx:80",path:"/campaigns/:id/edit",component:KR}),n.jsx(At,{"data-loc":"client/src/App.tsx:81",path:"/campaigns/:id/report",component:vwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:82",path:"/campaigns/:id/batched-send",component:Qwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:83",path:"/campaigns/:id",component:hwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:84",path:"/templates",component:Xwe}),n.jsx(At,{"data-loc":"client/src/App.tsx:85",path:"/builder",component:v7}),n.jsx(At,{"data-loc":"client/src/App.tsx:86",path:"/builder/:id",component:v7}),n.jsx(At,{"data-loc":"client/src/App.tsx:87",path:"/automations",component:YNe}),n.jsx(At,{"data-loc":"client/src/App.tsx:88",path:"/automations/new",component:YN}),n.jsx(At,{"data-loc":"client/src/App.tsx:89",path:"/automations/:id",component:YN}),n.jsx(At,{"data-loc":"client/src/App.tsx:90",path:"/automations/:id/edit",component:YN}),n.jsx(At,{"data-loc":"client/src/App.tsx:91",path:"/analytics",component:XNe}),n.jsx(At,{"data-loc":"client/src/App.tsx:92",path:"/webhooks",component:ZNe}),n.jsx(At,{"data-loc":"client/src/App.tsx:93",path:"/settings",component:iSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:94",path:"/unsubscribes",component:cSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:95",path:"/tags",component:lSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:96",path:"/imports",component:vSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:97",path:"/exports",component:ySe}),n.jsx(At,{"data-loc":"client/src/App.tsx:98",path:"/popups",component:OSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:99",path:"/popups/:id/edit",component:RSe}),n.jsx(At,{"data-loc":"client/src/App.tsx:100",path:"/popups/spin/:id",component:aCe}),n.jsx(At,{"data-loc":"client/src/App.tsx:101",path:"/deliverability",component:cCe}),n.jsx(At,{"data-loc":"client/src/App.tsx:102",path:"/revenue",component:G5e}),n.jsx(At,{"data-loc":"client/src/App.tsx:103",path:"/activity",component:Z5e}),n.jsx(At,{"data-loc":"client/src/App.tsx:104",path:"/integrations",component:Y5e}),n.jsx(At,{"data-loc":"client/src/App.tsx:105",path:"/blacklist",component:J5e}),n.jsx(At,{"data-loc":"client/src/App.tsx:106",path:"/audit-log",component:r3e}),n.jsx(At,{"data-loc":"client/src/App.tsx:107",path:"/api-docs",component:d3e}),n.jsx(At,{"data-loc":"client/src/App.tsx:108",path:"/widgets",children:()=>(window.location.replace("/popups"),null)}),n.jsx(At,{"data-loc":"client/src/App.tsx:111",path:"/404",component:Ik}),n.jsx(At,{"data-loc":"client/src/App.tsx:112",component:Ik})]})}function p3e(){return n.jsx(See,{"data-loc":"client/src/App.tsx:119",children:n.jsx(Eee,{"data-loc":"client/src/App.tsx:120",defaultTheme:"light",children:n.jsxs(B5,{"data-loc":"client/src/App.tsx:121",children:[n.jsx(_Q,{"data-loc":"client/src/App.tsx:122",theme:"light",position:"top-right",toastOptions:{style:{background:"oklch(1.0 0 0)",border:"1px solid oklch(0.90 0.006 262)",color:"oklch(0.12 0.01 262)"}}}),n.jsx(u3e,{"data-loc":"client/src/App.tsx:133"})]})})})}const jv=new PG,QW=e=>{e instanceof kd&&(typeof window>"u"||e.message===mK&&(window.location.href=uo()))};jv.getQueryCache().subscribe(e=>{if(e.type==="updated"&&e.action.type==="error"){const t=e.query.state.error;QW(t),console.error("[API Query Error]",t)}});jv.getMutationCache().subscribe(e=>{if(e.type==="updated"&&e.action.type==="error"){const t=e.mutation.state.error;QW(t),console.error("[API Mutation Error]",t)}});const f3e="boostiko_impersonation",m3e=le.createClient({links:[UY({url:"/api/trpc",transformer:Gi,headers(){try{const e=sessionStorage.getItem(f3e);
1111if(e){const t=JSON.parse(e);if(t?.isImpersonating&&t?.tenantId)return{"x-impersonate-tenant":String(t.tenantId)}}}catch{}return{}},fetch(e,t){return globalThis.fetch(e,{...t??{},credentials:"include"})}})]});bK.createRoot(document.getElementById("root")).render(n.jsx(le.Provider,{"data-loc":"client/src/main.tsx:69",client:m3e,queryClient:jv,children:n.jsx(RG,{"data-loc":"client/src/main.tsx:70",client:jv,children:n.jsx(Bte,{"data-loc":"client/src/main.tsx:71",children:n.jsx(p3e,{"data-loc":"client/src/main.tsx:72"})})})}));

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.