vendor: 4,419 bytes, lines 1-9
1var D6=Object.defineProperty;var tE=e=>{throw TypeError(e)};var O6=(e,t,n)=>t in e?D6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var nE=(e,t,n)=>O6(e,typeof t!="symbol"?t+"":t,n),Qx=(e,t,n)=>t.has(e)||tE("Cannot "+n);var W=(e,t,n)=>(Qx(e,t,"read from private field"),n?n.call(e):t.get(e)),Fe=(e,t,n)=>t.has(e)?tE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ee=(e,t,n,r)=>(Qx(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(Qx(e,t,"access private method"),n);var Yf=(e,t,n,r)=>({set _(s){Ee(e,t,s,n)},get _(){return W(e,t,r)}});function M6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var mm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Lg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xj={exports:{}},Fg={},Jj={exports:{}},at={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var mf=Symbol.for("react.element"),R6=Symbol.for("react.portal"),L6=Symbol.for("react.fragment"),F6=Symbol.for("react.strict_mode"),B6=Symbol.for("react.profiler"),U6=Symbol.for("react.provider"),$6=Symbol.for("react.context"),z6=Symbol.for("react.forward_ref"),H6=Symbol.for("react.suspense"),W6=Symbol.for("react.memo"),V6=Symbol.for("react.lazy"),rE=Symbol.iterator;function q6(e){return e===null||typeof e!="object"?null:(e=rE&&e[rE]||e["@@iterator"],typeof e=="function"?e:null)}var Zj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},e3=Object.assign,t3={};function vu(e,t,n){this.props=e,this.context=t,this.refs=t3,this.updater=n||Zj}vu.prototype.isReactComponent={};vu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};vu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function n3(){}n3.prototype=vu.prototype;function s_(e,t,n){this.props=e,this.context=t,this.refs=t3,this.updater=n||Zj}var i_=s_.prototype=new n3;i_.constructor=s_;e3(i_,vu.prototype);i_.isPureReactComponent=!0;var sE=Array.isArray,r3=Object.prototype.hasOwnProperty,a_={current:null},s3={key:!0,ref:!0,__self:!0,__source:!0};function i3(e,t,n){var r,s={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)r3.call(t,r)&&!s3.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:mf,type:e,key:i,ref:a,props:s,_owner:a_.current}}function Y6(e,t){return{$$typeof:mf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function o_(e){return typeof e=="object"&&e!==null&&e.$$typeof===mf}function G6(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var iE=/\/+/g;function Xx(e,t){return typeof e=="object"&&e!==null&&e.key!=null?G6(""+e.key):t.toString(36)}
vendor: 4,788 bytes, lines 9-17
9function Mp(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case mf:case R6:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+Xx(a,0):r,sE(s)?(n="",e!=null&&(n=e.replace(iE,"$&/")+"/"),Mp(s,t,n,"",function(u){return u})):s!=null&&(o_(s)&&(s=Y6(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(iE,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",sE(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+Xx(i,l);a+=Mp(i,t,n,c,s)}else if(c=q6(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+Xx(i,l++),a+=Mp(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Gf(e,t,n){if(e==null)return e;var r=[],s=0;return Mp(e,r,"","",function(i){return t.call(n,i,s++)}),r}function K6(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Lr={current:null},Rp={transition:null},Q6={ReactCurrentDispatcher:Lr,ReactCurrentBatchConfig:Rp,ReactCurrentOwner:a_};function a3(){throw Error("act(...) is not supported in production builds of React.")}at.Children={map:Gf,forEach:function(e,t,n){Gf(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Gf(e,function(){t++}),t},toArray:function(e){return Gf(e,function(t){return t})||[]},only:function(e){if(!o_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};at.Component=vu;at.Fragment=L6;at.Profiler=B6;at.PureComponent=s_;at.StrictMode=F6;at.Suspense=H6;at.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q6;at.act=a3;at.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=e3({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=a_.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)r3.call(t,c)&&!s3.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:mf,type:e.type,key:s,ref:i,props:r,_owner:a}};at.createContext=function(e){return e={$$typeof:$6,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:U6,_context:e},e.Consumer=e};at.createElement=i3;at.createFactory=function(e){var t=i3.bind(null,e);return t.type=e,t};at.createRef=function(){return{current:null}};at.forwardRef=function(e){return{$$typeof:z6,render:e}};at.isValidElement=o_;at.lazy=function(e){return{$$typeof:V6,_payload:{_status:-1,_result:e},_init:K6}};at.memo=function(e,t){return{$$typeof:W6,type:e,compare:t===void 0?null:t}};at.startTransition=function(e){var t=Rp.transition;Rp.transition={};try{e()}finally{Rp.transition=t}};at.unstable_act=a3;at.useCallback=function(e,t){return Lr.current.useCallback(e,t)};at.useContext=function(e){return Lr.current.useContext(e)};at.useDebugValue=function(){};at.useDeferredValue=function(e){return Lr.current.useDeferredValue(e)};at.useEffect=function(e,t){return Lr.current.useEffect(e,t)};at.useId=function(){return Lr.current.useId()};at.useImperativeHandle=function(e,t,n){return Lr.current.useImperativeHandle(e,t,n)};at.useInsertionEffect=function(e,t){return Lr.current.useInsertionEffect(e,t)};at.useLayoutEffect=function(e,t){return Lr.current.useLayoutEffect(e,t)};at.useMemo=function(e,t){return Lr.current.useMemo(e,t)};at.useReducer=function(e,t,n){return Lr.current.useReducer(e,t,n)};at.useRef=function(e){return Lr.current.useRef(e)};at.useState=function(e){return Lr.current.useState(e)};at.useSyncExternalStore=function(e,t,n){return Lr.current.useSyncExternalStore(e,t,n)};at.useTransition=function(){return Lr.current.useTransition()};at.version="18.3.1";Jj.exports=at;var y=Jj.exports;const ye=Lg(y),X6=M6({__proto__:null,default:ye},[y]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var J6=y,Z6=Symbol.for("react.element"),eR=Symbol.for("react.fragment"),tR=Object.prototype.hasOwnProperty,nR=J6.__SECRET_INT
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,rR={key:!0,ref:!0,__self:!0,__source:!0};function o3(e,t,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)tR.call(t,r)&&!rR.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Z6,type:e,key:i,ref:a,props:s,_owner:nR.current}}Fg.Fragment=eR;Fg.jsx=o3;Fg.jsxs=o3;Xj.exports=Fg;var o=Xj.exports,_u=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(){}},Jo,Fa,Dc,Uj,sR=(Uj=class extends _u{constructor(){super();Fe(this,Jo);Fe(this,Fa);Fe(this,Dc);Ee(this,Dc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){W(this,Fa)||this.setEventListener(W(this,Dc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Fa))==null||t.call(this),Ee(this,Fa,void 0))}setEventListener(t){var n;Ee(this,Dc,t),(n=W(this,Fa))==null||n.call(this),Ee(this,Fa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){W(this,Jo)!==t&&(Ee(this,Jo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof W(this,Jo)=="boolean"?W(this,Jo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jo=new WeakMap,Fa=new WeakMap,Dc=new WeakMap,Uj),l_=new sR,iR={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ba,r_,$j,aR=($j=class{constructor(){Fe(this,Ba,iR);Fe(this,r_,!1)}setTimeoutProvider(e){Ee(this,Ba,e)}setTimeout(e,t){return W(this,Ba).setTimeout(e,t)}clearTimeout(e){W(this,Ba).clearTimeout(e)}setInterval(e,t){return W(this,Ba).setInterval(e,t)}clearInterval(e){W(this,Ba).clearInterval(e)}},Ba=new WeakMap,r_=new WeakMap,$j),Vo=new aR;function oR(e){setTimeout(e,0)}var lR=typeof window>"u"||"Deno"in globalThis;function Pr(){}function cR(e,t){return typeof e=="function"?e(t):e}function Yy(e){return typeof e=="number"&&e>=0&&e!==1/0}function l3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Za(e,t){return typeof e=="function"?e(t):e}function rs(e,t){return typeof e=="function"?e(t):e}function aE(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:l}=e;if(a){if(r){if(t.queryHash!==c_(a,t.options))return!1}else if(!bh(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||i&&!i(t))}function oE(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(pl(t.options.mutationKey)!==pl(i))return!1}else if(!bh(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function c_(e,t){return((t==null?void 0:t.queryKeyHashFn)||pl)(e)}function pl(e){return JSON.stringify(e,(t,n)=>Gy(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function bh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>bh(e[n],t[n])):!1}var uR=Object.prototype.hasOwnProperty;function c3(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=lE(e)&&lE(t);if(!r&&!(Gy(e)&&Gy(t)))return t;const i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),l=a.length,c=r?new Array(l):{};let u=0;for(let d=0;d<l;d++){const h=r?d:a[d],f=e[h],p=t[h];if(f===p){c[h]=f,(r?d<i:uR.call(e,h))&&u++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){c[h]=p;continue}const m=c3(f,p,n+1);c[h]=m,m===f&&u++}return i===l&&u===i?e:c}function gm(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function lE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gy(e){if(!cE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;
17return!(!cE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function cE(e){return Object.prototype.toString.call(e)==="[object Object]"}function dR(e){return new Promise(t=>{Vo.setTimeout(t,e)})}function Ky(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?c3(e,t):t}function hR(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function fR(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var u_=Symbol();function u3(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===u_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function d_(e,t){return typeof e=="function"?e(...t):!!e}function pR(e,t,n){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var vh=(()=>{let e=()=>lR;return{isServer(){return e()},setIsServer(t){e=t}}})();function Qy(){let e,t;const n=new Promise((s,i)=>{e=s,t=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},n.reject=s=>{r({status:"rejected",reason:s}),t(s)},n}var mR=oR;function gR(){let e=[],t=0,n=l=>{l()},r=l=>{l()},s=mR;const i=l=>{t?e.push(l):s(()=>{n(l)})},a=()=>{const l=e;e=[],l.length&&s(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||a()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{s=l}}}var Hn=gR(),Oc,Ua,Mc,zj,xR=(zj=class extends _u{constructor(){super();Fe(this,Oc,!0);Fe(this,Ua);Fe(this,Mc);Ee(this,Mc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){W(this,Ua)||this.setEventListener(W(this,Mc))}onUnsubscribe(){var t;this.hasListeners()||((t=W(this,Ua))==null||t.call(this),Ee(this,Ua,void 0))}setEventListener(t){var n;Ee(this,Mc,t),(n=W(this,Ua))==null||n.call(this),Ee(this,Ua,t(this.setOnline.bind(this)))}setOnline(t){W(this,Oc)!==t&&(Ee(this,Oc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return W(this,Oc)}},Oc=new WeakMap,Ua=new WeakMap,Mc=new WeakMap,zj),xm=new xR;function yR(e){return Math.min(1e3*2**e,3e4)}function d3(e){return(e??"online")==="online"?xm.isOnline():!0}var Xy=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function h3(e){let t=!1,n=0,r;const s=Qy(),i=()=>s.status!=="pending",a=x=>{var w;if(!i()){const g=new Xy(x);f(g),(w=e.onCancel)==null||w.call(e,g)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>l_.isFocused()&&(e.networkMode==="always"||xm.isOnline())&&e.canRun(),d=()=>d3(e.networkMode)&&e.canRun(),h=x=>{i()||(r==null||r(),s.resolve(x))},f=x=>{i()||(r==null||r(),s.reject(x))},p=()=>new Promise(x=>{var w;r=g=>{(i()||u())&&x(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var x;r=void 0,i()||(x=e.onContinue)==null||x.call(e)}),m=()=>{if(i())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(h).catch(g=>{var N;if(i())return;const b=e.retry??(vh.isServer()?0:3),_=e.retryDelay??yR,k=typeof _=="function"?_(n,g):_,T=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,g);if(t||!T){f(g);return}n++,(N=e.onFail)==null||N.call(e,n,g),dR(k).then(()=>u()?void 0:p()).then(()=>{t?f(g):m()})})};return{promise:s,status:()=>s.status,cancel:a,continue:()=>(r==null||r(),s),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?m():p().then(m),s)}}var Zo,Hj,f3=(Hj=class{constructor(){Fe(this,Zo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Yy(this.gcTime)&&Ee(this,Zo,Vo.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vh.isServer()?1/0:5*60*1e3))}clearGcTimeout(){W(this,Zo)!==void 0&&(Vo.clearTimeout(W(this,Zo)
17),Ee(this,Zo,void 0))}},Zo=new WeakMap,Hj);function bR(e){return{onFetch:(t,n)=>{var d,h,f,p,m;const r=t.options,s=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let x=!1;const w=_=>{pR(_,()=>t.signal,()=>x=!0)},g=u3(t.options,t.fetchOptions),b=async(_,k,T)=>{if(x)return Promise.reject(t.signal.reason);if(k==null&&_.pages.length)return Promise.resolve(_);const C=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:k,direction:T?"backward":"forward",meta:t.options.meta};return w(j),j})(),S=await g(C),{maxPages:I}=t.options,E=T?fR:hR;return{pages:E(_.pages,S,I),pageParams:E(_.pageParams,k,I)}};if(s&&i.length){const _=s==="backward",k=_?vR:uE,T={pages:i,pageParams:a},N=k(r,T);l=await b(T,N,_)}else{const _=e??i.length;do{const k=c===0?a[0]??r.initialPageParam:uE(r,l);if(c>0&&k==null)break;l=await b(l,k),c++}while(c<_)}return l};t.options.persister?t.fetchFn=()=>{var x,w;return(w=(x=t.options).persister)==null?void 0:w.call(x,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function uE(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function vR(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Rc,el,Lc,Ns,tl,Qn,uf,nl,ns,p3,Li,Wj,_R=(Wj=class extends f3{constructor(t){super();Fe(this,ns);Fe(this,Rc);Fe(this,el);Fe(this,Lc);Fe(this,Ns);Fe(this,tl);Fe(this,Qn);Fe(this,uf);Fe(this,nl);Ee(this,nl,!1),Ee(this,uf,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ee(this,tl,t.client),Ee(this,Ns,W(this,tl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ee(this,el,hE(this.options)),this.state=t.state??W(this,el),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return W(this,Rc)}get promise(){var t;return(t=W(this,Qn))==null?void 0:t.promise}setOptions(t){if(this.options={...W(this,uf),...t},t!=null&&t._type&&Ee(this,Rc,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=hE(this.options);n.data!==void 0&&(this.setState(dE(n.data,n.dataUpdatedAt)),Ee(this,el,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&W(this,Ns).remove(this)}setData(t,n){const r=Ky(this.state.data,t,this.options);return Ke(this,ns,Li).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){Ke(this,ns,Li).call(this,{type:"setState",state:t})}cancel(t){var r,s;const n=(r=W(this,Qn))==null?void 0:r.promise;return(s=W(this,Qn))==null||s.cancel(t),n?n.then(Pr).catch(Pr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return W(this,el)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>rs(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===u_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Za(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!l3(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Qn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=W(this,Qn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),W(this,Ns).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(W(this,Qn)&&(W(this,nl)||Ke(this,ns,p3).call(this)?W(this,Qn).cancel({revert:!0}):W(this,Qn).cancelRetry()),this.scheduleGc()),W(this,Ns).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,ns,Li).call(this,{type:"invalidate"})}async fetch(t,n){var u,d,h,f,p,m,x,w,g,b,_;if(this.state.fetchStatus!=="idle"&&((u=W(this,Qn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});
17else if(W(this,Qn))return W(this,Qn).continueRetry(),W(this,Qn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const k=this.observers.find(T=>T.options.queryFn);k&&this.setOptions(k.options)}const r=new AbortController,s=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(Ee(this,nl,!0),r.signal)})},i=()=>{const k=u3(this.options,n),N=(()=>{const C={client:W(this,tl),queryKey:this.queryKey,meta:this.meta};return s(C),C})();return Ee(this,nl,!1),this.options.persister?this.options.persister(k,N,this):k(N)},l=(()=>{const k={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:W(this,tl),state:this.state,fetchFn:i};return s(k),k})(),c=W(this,Rc)==="infinite"?bR(this.options.pages):this.options.behavior;c==null||c.onFetch(l,this),Ee(this,Lc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ke(this,ns,Li).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Ee(this,Qn,h3({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:k=>{k instanceof Xy&&k.revert&&this.setState({...W(this,Lc),fetchStatus:"idle"}),r.abort()},onFail:(k,T)=>{Ke(this,ns,Li).call(this,{type:"failed",failureCount:k,error:T})},onPause:()=>{Ke(this,ns,Li).call(this,{type:"pause"})},onContinue:()=>{Ke(this,ns,Li).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const k=await W(this,Qn).start();if(k===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(k),(p=(f=W(this,Ns).config).onSuccess)==null||p.call(f,k,this),(x=(m=W(this,Ns).config).onSettled)==null||x.call(m,k,this.state.error,this),k}catch(k){if(k instanceof Xy){if(k.silent)return W(this,Qn).promise;if(k.revert){if(this.state.data===void 0)throw k;return this.state.data}}throw Ke(this,ns,Li).call(this,{type:"error",error:k}),(g=(w=W(this,Ns).config).onError)==null||g.call(w,k,this),(_=(b=W(this,Ns).config).onSettled)==null||_.call(b,this.state.data,k,this),k}finally{this.scheduleGc()}}},Rc=new WeakMap,el=new WeakMap,Lc=new WeakMap,Ns=new WeakMap,tl=new WeakMap,Qn=new WeakMap,uf=new WeakMap,nl=new WeakMap,ns=new WeakSet,p3=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Li=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...m3(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...dE(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ee(this,Lc,t.manual?s:void 0),s;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Hn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),W(this,Ns).notify({query:this,type:"updated",action:t})})},Wj);function m3(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:d3(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var zr,ct,df,jr,rl,Fc,Hi,$a,hf,Bc,Uc,sl,il,za,$c,Nt,Nd,Jy,Zy,eb,tb,nb,rb,sb,g3,Vj,wR=(Vj=class extends _u{constructor(t,n){super();Fe(this,Nt);Fe(this,zr);Fe(this,ct);Fe(this,df);Fe(this,jr);Fe(this,rl);Fe(this,Fc);Fe(this,Hi);Fe(this,$a);Fe(this,hf);Fe(this,Bc);Fe(this,Uc);Fe(this,sl);Fe(this,il);Fe(this,za);Fe(this,$c,new Set);this.options=n,Ee(this,zr,t),Ee(this,$a,null),Ee(this,Hi,Qy()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}
vendor: 4,418 bytes, line 17
17onSubscribe(){this.listeners.size===1&&(W(this,ct).addObserver(this),fE(W(this,ct),this.options)?Ke(this,Nt,Nd).call(this):this.updateResult(),Ke(this,Nt,tb).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ib(W(this,ct),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ib(W(this,ct),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,Nt,nb).call(this),Ke(this,Nt,rb).call(this),W(this,ct).removeObserver(this)}setOptions(t){const n=this.options,r=W(this,ct);if(this.options=W(this,zr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof rs(this.options.enabled,W(this,ct))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,Nt,sb).call(this),W(this,ct).setOptions(this.options),n._defaulted&&!gm(this.options,n)&&W(this,zr).getQueryCache().notify({type:"observerOptionsUpdated",query:W(this,ct),observer:this});const s=this.hasListeners();s&&pE(W(this,ct),r,this.options,n)&&Ke(this,Nt,Nd).call(this),this.updateResult(),s&&(W(this,ct)!==r||rs(this.options.enabled,W(this,ct))!==rs(n.enabled,W(this,ct))||Za(this.options.staleTime,W(this,ct))!==Za(n.staleTime,W(this,ct)))&&Ke(this,Nt,Jy).call(this);const i=Ke(this,Nt,Zy).call(this);s&&(W(this,ct)!==r||rs(this.options.enabled,W(this,ct))!==rs(n.enabled,W(this,ct))||i!==W(this,za))&&Ke(this,Nt,eb).call(this,i)}getOptimisticResult(t){const n=W(this,zr).getQueryCache().build(W(this,zr),t),r=this.createResult(n,t);return NR(this,r)&&(Ee(this,jr,r),Ee(this,Fc,this.options),Ee(this,rl,W(this,ct).state)),r}getCurrentResult(){return W(this,jr)}trackResult(t,n){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&W(this,Hi).status==="pending"&&W(this,Hi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){W(this,$c).add(t)}getCurrentQuery(){return W(this,ct)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=W(this,zr).defaultQueryOptions(t),r=W(this,zr).getQueryCache().build(W(this,zr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ke(this,Nt,Nd).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),W(this,jr)))}createResult(t,n){var I;const r=W(this,ct),s=this.options,i=W(this,jr),a=W(this,rl),l=W(this,Fc),u=t!==r?t.state:W(this,df),{state:d}=t;let h={...d},f=!1,p;if(n._optimisticResults){const E=this.hasListeners(),j=!E&&fE(t,n),P=E&&pE(t,r,n,s);(j||P)&&(h={...h,...m3(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:x,status:w}=h;p=h.data;let g=!1;if(n.placeholderData!==void 0&&p===void 0&&w==="pending"){let E;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(E=i.data,g=!0):E=typeof n.placeholderData=="function"?n.placeholderData((I=W(this,Uc))==null?void 0:I.state.data,W(this,Uc)):n.placeholderData,E!==void 0&&(w="success",p=Ky(i==null?void 0:i.data,E,n),f=!0)}if(n.select&&p!==void 0&&!g)if(i&&p===(a==null?void 0:a.data)&&n.select===W(this,hf))p=W(this,Bc);else try{Ee(this,hf,n.select),p=n.select(p),p=Ky(i==null?void 0:i.data,p,n),Ee(this,Bc,p),Ee(this,$a,null)}catch(E){Ee(this,$a,E)}W(this,$a)&&(m=W(this,$a),p=W(this,Bc),x=Date.now(),w="error");const b=h.fetchStatus==="fetching",_=w==="pending",k=w==="error",T=_&&b,N=p!==void 0,S={status:w,fetchStatus:h.fetchStatus,isPending:_,isSuccess:w==="success",isError:k,isInitialLoading:T,isLoading:T,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:x,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!_,isLoadingError:k&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:k&&N,isStale:h_(t,n),refetch:this.refetch,promise:W(this,Hi),isEnabled:rs(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const E=S.data!==void 0,j=S.status==="error"&&!E,P=R=>{j?R.reject(S.error):E&&R.resolve(S.data)},L=()=>{const R=Ee(this,Hi,S.promise=Qy());P(R)},z=W(this,Hi);
vendor: 4,126 bytes, line 17
17switch(z.status){case"pending":t.queryHash===r.queryHash&&P(z);break;case"fulfilled":(j||S.data!==z.value)&&L();break;case"rejected":(!j||S.error!==z.reason)&&L();break}}return S}updateResult(){const t=W(this,jr),n=this.createResult(W(this,ct),this.options);if(Ee(this,rl,W(this,ct).state),Ee(this,Fc,this.options),W(this,rl).data!==void 0&&Ee(this,Uc,W(this,ct)),gm(n,t))return;Ee(this,jr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!W(this,$c).size)return!0;const a=new Set(i??W(this,$c));return this.options.throwOnError&&a.add("error"),Object.keys(W(this,jr)).some(l=>{const c=l;return W(this,jr)[c]!==t[c]&&a.has(c)})};Ke(this,Nt,g3).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,Nt,tb).call(this)}},zr=new WeakMap,ct=new WeakMap,df=new WeakMap,jr=new WeakMap,rl=new WeakMap,Fc=new WeakMap,Hi=new WeakMap,$a=new WeakMap,hf=new WeakMap,Bc=new WeakMap,Uc=new WeakMap,sl=new WeakMap,il=new WeakMap,za=new WeakMap,$c=new WeakMap,Nt=new WeakSet,Nd=function(t){Ke(this,Nt,sb).call(this);let n=W(this,ct).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Pr)),n},Jy=function(){Ke(this,Nt,nb).call(this);const t=Za(this.options.staleTime,W(this,ct));if(vh.isServer()||W(this,jr).isStale||!Yy(t))return;const r=l3(W(this,jr).dataUpdatedAt,t)+1;Ee(this,sl,Vo.setTimeout(()=>{W(this,jr).isStale||this.updateResult()},r))},Zy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(W(this,ct)):this.options.refetchInterval)??!1},eb=function(t){Ke(this,Nt,rb).call(this),Ee(this,za,t),!(vh.isServer()||rs(this.options.enabled,W(this,ct))===!1||!Yy(W(this,za))||W(this,za)===0)&&Ee(this,il,Vo.setInterval(()=>{(this.options.refetchIntervalInBackground||l_.isFocused())&&Ke(this,Nt,Nd).call(this)},W(this,za)))},tb=function(){Ke(this,Nt,Jy).call(this),Ke(this,Nt,eb).call(this,Ke(this,Nt,Zy).call(this))},nb=function(){W(this,sl)!==void 0&&(Vo.clearTimeout(W(this,sl)),Ee(this,sl,void 0))},rb=function(){W(this,il)!==void 0&&(Vo.clearInterval(W(this,il)),Ee(this,il,void 0))},sb=function(){const t=W(this,zr).getQueryCache().build(W(this,zr),this.options);if(t===W(this,ct))return;const n=W(this,ct);Ee(this,ct,t),Ee(this,df,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},g3=function(t){Hn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(W(this,jr))}),W(this,zr).getQueryCache().notify({query:W(this,ct),type:"observerResultsUpdated"})})},Vj);function ER(e,t){return rs(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&rs(t.retryOnMount,e)===!1)}function fE(e,t){return ER(e,t)||e.state.data!==void 0&&ib(e,t,t.refetchOnMount)}function ib(e,t,n){if(rs(t.enabled,e)!==!1&&Za(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&h_(e,t)}return!1}function pE(e,t,n,r){return(e!==t||rs(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&h_(e,n)}function h_(e,t){return rs(t.enabled,e)!==!1&&e.isStaleByTime(Za(t.staleTime,e))}function NR(e,t){return!gm(e.getCurrentResult(),t)}var ff,hi,gr,al,fi,Ca,qj,kR=(qj=class extends f3{constructor(t){super();Fe(this,fi);Fe(this,ff);Fe(this,hi);Fe(this,gr);Fe(this,al);Ee(this,ff,t.client),this.mutationId=t.mutationId,Ee(this,gr,t.mutationCache),Ee(this,hi,[]),this.state=t.state||x3(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){W(this,hi).includes(t)||(W(this,hi).push(t),this.clearGcTimeout(),W(this,gr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ee(this,hi,W(this,hi).filter(n=>n!==t)),this.scheduleGc(),W(this,gr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){W(this,hi).length||(this.state.status==="pending"?this.scheduleGc():W(this,gr).remove(this))}continue(){var t;return((t=W(this,al))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,l,c,u,d,h,f,p,m,x,w,g,b,_,k,T,N,C;const n=()=>
17{Ke(this,fi,Ca).call(this,{type:"continue"})},r={client:W(this,ff),meta:this.options.meta,mutationKey:this.options.mutationKey};Ee(this,al,h3({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(S,I)=>{Ke(this,fi,Ca).call(this,{type:"failed",failureCount:S,error:I})},onPause:()=>{Ke(this,fi,Ca).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>W(this,gr).canRun(this)}));const s=this.state.status==="pending",i=!W(this,al).canStart();try{if(s)n();else{Ke(this,fi,Ca).call(this,{type:"pending",variables:t,isPaused:i}),W(this,gr).config.onMutate&&await W(this,gr).config.onMutate(t,this,r);const I=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t,r));I!==this.state.context&&Ke(this,fi,Ca).call(this,{type:"pending",context:I,variables:t,isPaused:i})}const S=await W(this,al).start();return await((u=(c=W(this,gr).config).onSuccess)==null?void 0:u.call(c,S,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,S,t,this.state.context,r)),await((p=(f=W(this,gr).config).onSettled)==null?void 0:p.call(f,S,null,this.state.variables,this.state.context,this,r)),await((x=(m=this.options).onSettled)==null?void 0:x.call(m,S,null,t,this.state.context,r)),Ke(this,fi,Ca).call(this,{type:"success",data:S}),S}catch(S){try{await((g=(w=W(this,gr).config).onError)==null?void 0:g.call(w,S,t,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((_=(b=this.options).onError)==null?void 0:_.call(b,S,t,this.state.context,r))}catch(I){Promise.reject(I)}try{await((T=(k=W(this,gr).config).onSettled)==null?void 0:T.call(k,void 0,S,this.state.variables,this.state.context,this,r))}catch(I){Promise.reject(I)}try{await((C=(N=this.options).onSettled)==null?void 0:C.call(N,void 0,S,t,this.state.context,r))}catch(I){Promise.reject(I)}throw Ke(this,fi,Ca).call(this,{type:"error",error:S}),S}finally{W(this,gr).runNext(this)}}},ff=new WeakMap,hi=new WeakMap,gr=new WeakMap,al=new WeakMap,fi=new WeakSet,Ca=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Hn.batch(()=>{W(this,hi).forEach(r=>{r.onMutationUpdate(t)}),W(this,gr).notify({mutation:this,type:"updated",action:t})})},qj);function x3(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Wi,Ys,pf,Yj,TR=(Yj=class extends _u{constructor(t={}){super();Fe(this,Wi);Fe(this,Ys);Fe(this,pf);this.config=t,Ee(this,Wi,new Set),Ee(this,Ys,new Map),Ee(this,pf,0)}build(t,n,r){const s=new kR({client:t,mutationCache:this,mutationId:++Yf(this,pf)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){W(this,Wi).add(t);const n=Kf(t);if(typeof n=="string"){const r=W(this,Ys).get(n);r?r.push(t):W(this,Ys).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(W(this,Wi).delete(t)){const n=Kf(t);if(typeof n=="string"){const r=W(this,Ys).get(n);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&W(this,Ys).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Kf(t);if(typeof n=="string"){const r=W(this,Ys).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const n=Kf(t);if(typeof n=="string"){const s=(r=W(this,Ys).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Hn.batch(()=>
vendor: 5,508 bytes, line 17
17{W(this,Wi).forEach(t=>{this.notify({type:"removed",mutation:t})}),W(this,Wi).clear(),W(this,Ys).clear()})}getAll(){return Array.from(W(this,Wi))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>oE(n,r))}findAll(t={}){return this.getAll().filter(n=>oE(t,n))}notify(t){Hn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Hn.batch(()=>Promise.all(t.map(n=>n.continue().catch(Pr))))}},Wi=new WeakMap,Ys=new WeakMap,pf=new WeakMap,Yj);function Kf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Vi,Ha,Hr,qi,ia,Lp,ab,Gj,SR=(Gj=class extends _u{constructor(n,r){super();Fe(this,ia);Fe(this,Vi);Fe(this,Ha);Fe(this,Hr);Fe(this,qi);Ee(this,Vi,n),this.setOptions(r),this.bindMethods(),Ke(this,ia,Lp).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=W(this,Vi).defaultMutationOptions(n),gm(this.options,r)||W(this,Vi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:W(this,Hr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&pl(r.mutationKey)!==pl(this.options.mutationKey)?this.reset():((s=W(this,Hr))==null?void 0:s.state.status)==="pending"&&W(this,Hr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=W(this,Hr))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,ia,Lp).call(this),Ke(this,ia,ab).call(this,n)}getCurrentResult(){return W(this,Ha)}reset(){var n;(n=W(this,Hr))==null||n.removeObserver(this),Ee(this,Hr,void 0),Ke(this,ia,Lp).call(this),Ke(this,ia,ab).call(this)}mutate(n,r){var s;return Ee(this,qi,r),(s=W(this,Hr))==null||s.removeObserver(this),Ee(this,Hr,W(this,Vi).getMutationCache().build(W(this,Vi),this.options)),W(this,Hr).addObserver(this),W(this,Hr).execute(n)}},Vi=new WeakMap,Ha=new WeakMap,Hr=new WeakMap,qi=new WeakMap,ia=new WeakSet,Lp=function(){var r;const n=((r=W(this,Hr))==null?void 0:r.state)??x3();Ee(this,Ha,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ab=function(n){Hn.batch(()=>{var r,s,i,a,l,c,u,d;if(W(this,qi)&&this.hasListeners()){const h=W(this,Ha).variables,f=W(this,Ha).context,p={client:W(this,Vi),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(r=W(this,qi)).onSuccess)==null||s.call(r,n.data,h,f,p)}catch(m){Promise.reject(m)}try{(a=(i=W(this,qi)).onSettled)==null||a.call(i,n.data,null,h,f,p)}catch(m){Promise.reject(m)}}else if((n==null?void 0:n.type)==="error"){try{(c=(l=W(this,qi)).onError)==null||c.call(l,n.error,h,f,p)}catch(m){Promise.reject(m)}try{(d=(u=W(this,qi)).onSettled)==null||d.call(u,void 0,n.error,h,f,p)}catch(m){Promise.reject(m)}}}this.listeners.forEach(h=>{h(W(this,Ha))})})},Gj),pi,Kj,CR=(Kj=class extends _u{constructor(t={}){super();Fe(this,pi);this.config=t,Ee(this,pi,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??c_(s,n);let a=this.get(i);return a||(a=new _R({client:t,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(a)),a}add(t){W(this,pi).has(t.queryHash)||(W(this,pi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=W(this,pi).get(t.queryHash);n&&(t.destroy(),n===t&&W(this,pi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Hn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return W(this,pi).get(t)}getAll(){return[...W(this,pi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>aE(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>aE(t,r)):n}notify(t){Hn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Hn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Hn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},pi=new WeakMap,Kj),gn,Wa,Va,zc,Hc,qa,Wc,Vc,Qj,jR=(Qj=class{constructor(e={}){Fe(this,gn);Fe(this,Wa);Fe(this,Va);Fe(this,zc);Fe(this,Hc);Fe(this,qa);Fe(this,Wc);Fe(this,Vc);Ee(this,gn,e.queryCache||new CR),Ee(this,Wa,e.mutationCache||new TR),Ee(this,Va,e.defaultOptions||{}),Ee(this,zc,new Map),Ee(this,Hc,new Map),Ee(this,qa,0)}mount(){Yf(this,qa)._++,W(this,qa)===1&&(Ee(this,Wc,l_.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,gn).onFocus())})),Ee(this,Vc,xm.subscribe(async e=>{e&&(await this.resumePausedMutations(),W(this,gn).onOnline())})))}unmount(){var e,t;Yf(this,qa)._--,W(this,qa)===0&&((e=W(this,Wc))==null||e.call(this),Ee(this,Wc,void 0),(t=W(this,Vc))==null||t.call(this),Ee(this,Vc,void 0))}isFetching(e){return W(this,gn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return W(this,Wa).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,gn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=W(this,gn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Za(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return W(this,gn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=W(this,gn).get(r.queryHash),i=s==null?void 0:s.state.data,a=cR(t,i);if(a!==void 0)return W(this,gn).build(this,r).setData(a,{...n,manual:!0})}
17setQueriesData(e,t,n){return Hn.batch(()=>W(this,gn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=W(this,gn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=W(this,gn);Hn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=W(this,gn);return Hn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Hn.batch(()=>W(this,gn).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Pr).catch(Pr)}invalidateQueries(e,t={}){return Hn.batch(()=>(W(this,gn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Hn.batch(()=>W(this,gn).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Pr)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Pr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=W(this,gn).build(this,t);return n.isStaleByTime(Za(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pr).catch(Pr)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pr).catch(Pr)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return xm.isOnline()?W(this,Wa).resumePausedMutations():Promise.resolve()}getQueryCache(){return W(this,gn)}getMutationCache(){return W(this,Wa)}getDefaultOptions(){return W(this,Va)}setDefaultOptions(e){Ee(this,Va,e)}setQueryDefaults(e,t){W(this,zc).set(pl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...W(this,zc).values()],n={};return t.forEach(r=>{bh(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){W(this,Hc).set(pl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...W(this,Hc).values()],n={};return t.forEach(r=>{bh(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...W(this,Va).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=c_(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===u_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...W(this,Va).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){W(this,gn).clear(),W(this,Wa).clear()}},gn=new WeakMap,Wa=new WeakMap,Va=new WeakMap,zc=new WeakMap,Hc=new WeakMap,qa=new WeakMap,Wc=new WeakMap,Vc=new WeakMap,Qj),y3=y.createContext(void 0),Yt=e=>{const t=y.useContext(y3);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},AR=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),o.jsx(y3.Provider,{value:e,children:t})),b3=y.createContext(!1),IR=()=>y.useContext(b3);b3.Provider;function PR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var DR=y.createContext(PR()),OR=()=>y.useContext(DR),MR=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?d_(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},RR=e=>{y.useEffect(()=>{e.clearReset()},[e])},LR=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||d_(n,[e.error,r])),FR=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>n(r(...s)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},BR=(e,t)=>e.isLoading&&e.isFetching&&!t,UR=(e,t)=>
17(e==null?void 0:e.suspense)&&t.isPending,mE=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $R(e,t,n){var f,p,m,x;const r=IR(),s=OR(),i=Yt(),a=i.defaultQueryOptions(e);(p=(f=i.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||p.call(f,a);const l=i.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",FR(a),MR(a,s,l),RR(s);const c=!i.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(i,a)),d=u.getOptimisticResult(a),h=!r&&e.subscribed!==!1;if(y.useSyncExternalStore(y.useCallback(w=>{const g=h?u.subscribe(Hn.batchCalls(w)):Pr;return u.updateResult(),g},[u,h]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a)},[a,u]),UR(a,d))throw mE(a,u,s);if(LR({result:d,errorResetBoundary:s,throwOnError:a.throwOnError,query:l,suspense:a.suspense}))throw d.error;if((x=(m=i.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||x.call(m,a,d),a.experimental_prefetchInRender&&!vh.isServer()&&BR(d,r)){const w=c?mE(a,u,s):l==null?void 0:l.promise;w==null||w.catch(Pr).finally(()=>{u.updateResult()})}return a.notifyOnChangeProps?d:u.trackResult(d)}function wt(e,t){return $R(e,wR)}function vn(e,t){const n=Yt(),[r]=y.useState(()=>new SR(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const s=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Hn.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((a,l)=>{r.mutate(a,l).catch(Pr)},[r]);if(s.error&&d_(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}var X=typeof window<"u"?window:void 0,Wn=typeof globalThis<"u"?globalThis:X;typeof self>"u"&&(Wn.self=Wn),typeof File>"u"&&(Wn.File=function(){});var is=Wn==null?void 0:Wn.navigator,ve=Wn==null?void 0:Wn.document,ir=Wn==null?void 0:Wn.location,ob=Wn==null?void 0:Wn.fetch,lb=Wn!=null&&Wn.XMLHttpRequest&&"withCredentials"in new Wn.XMLHttpRequest?Wn.XMLHttpRequest:void 0,gE=Wn==null?void 0:Wn.AbortController,zR=Wn==null?void 0:Wn.CompressionStream,Wr=is==null?void 0:is.userAgent,Me=X??{},xE="1.375.0",Ar={DEBUG:!1,LIB_VERSION:xE,LIB_NAME:"web",JS_SDK_VERSION:xE};function yE(e,t,n,r,s,i,a){try{var l=e[i](a),c=l.value}catch(u){return void n(u)}l.done?t(c):Promise.resolve(c).then(r,s)}function ss(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function a(c){yE(i,r,s,a,l,"next",c)}function l(c){yE(i,r,s,a,l,"throw",c)}a(void 0)})}}function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pe.apply(null,arguments)}function v3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var qu,bE=function(e){return e.GZipJS="gzip-js",e.Base64="base64",e}({}),HR=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],_3="NativeGzipValidationError",cb=e=>e.length>=2&&e[0]===31&&e[1]===139,vE=e=>!(!e||typeof e!="object")&&("name"in e?String(e.name):"")==="NotReadableError",Qf=e=>{var t=new Error("Native gzip produced invalid output: "+e);throw t.name=_3,t},WR=function(){var e=ss(function*(t,n){18>t.size&&Qf("too-short");var r=new Uint8Array(yield t.slice(0,10).arrayBuffer());cb(r)&&r[2]===8||Qf("invalid-header");var s=new DataView(yield t.slice(t.size-8).arrayBuffer());s.getUint32(0,!0)!==(a=>{for(var l=(()=>{if(qu)return qu;qu=[];for(var d=0;256>d;d++){for(var h=d,f=0;8>f;f++)h=1&h?3988292384^h>>>1:h>>>1;qu[d]=h>>>0}return qu})(),c=4294967295,u=0;a.length>u;u++)c=l[255&(c^a[u])]^c>>>8;return(4294967295^c)>>>0})(n)&&Qf("invalid-crc");var i=n.length>>>0;s.getUint32(4,!0)!==i&&Qf("invalid-size")});return function(t,n){return e.apply(this,arguments)}}();function ub(){return ub=ss(function*(e,t,n){t===void 0&&(t=!0);try{var r=new TextEncoder().encode(e),s=new CompressionStream("gzip"),i=s.writable.getWriter(),a=i.write(r).then(()=>i.close()).catch(function(){var u=ss(function*(d){try{yield i.abort(d)}catch{}throw d});return function(d){return u.apply(this,arguments)}}()),l=new Response(s.readable).blob(),[c]=yield Promise.all([l,a]);return yield WR(c,r),c}catch(u){if(n!=null&&n.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}}),ub.apply(this,arguments)}var VR=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hub
17spot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],_E=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return VR.concat(t).some(r=>{var s=r.toLowerCase();return n.indexOf(s)!==-1})};function et(e,t){return e.indexOf(t)!==-1}var Bg=function(e){return e.trim()},db=function(e){return e.replace(/^\$/,"")},w3=Object.prototype,E3=w3.hasOwnProperty,Ug=w3.toString,ft=Array.isArray||function(e){return Ug.call(e)==="[object Array]"},$i=e=>typeof e=="function",kn=e=>e===Object(e)&&!ft(e),ec=e=>{if(kn(e)){for(var t in e)if(E3.call(e,t))return!1;return!0}return!1},we=e=>e===void 0,un=e=>Ug.call(e)=="[object String]",Fp=e=>un(e)&&e.trim().length===0,fa=e=>e===null,st=e=>we(e)||fa(e),Ds=e=>Ug.call(e)=="[object Number]"&&e==e,Gl=e=>Ds(e)&&e>0,vi=e=>Ug.call(e)==="[object Boolean]",qR=e=>e instanceof FormData,YR=e=>et(HR,e);function N3(e){return e===null||typeof e!="object"}function ym(e,t){return{}.toString.call(e)==="[object "+t+"]"}function f_(e){return typeof Event<"u"&&function(t,n){try{return t instanceof n}catch{return!1}}(e,Event)}var GR=[!0,"true",1,"1","yes"],Jx=e=>et(GR,e),KR=[!1,"false",0,"0","no"];function _i(e,t,n,r,s){return t>n&&(r.warn("min cannot be greater than max."),t=n),Ds(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+s),_i(s||n,t,n,r))}let QR=class{constructor(t){this.$t={},this.zt=t.zt,this.Zt=_i(t.bucketSize,0,100,t.Gt),this.Qt=_i(t.refillRate,0,this.Zt,t.Gt),this.Jt=_i(t.refillInterval,0,864e5,t.Gt)}Kt(t,n){var r=Math.floor((n-t.lastAccess)/this.Jt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Qt,this.Zt),t.lastAccess=t.lastAccess+r*this.Jt)}consumeRateLimit(t){var n,r=Date.now(),s=String(t),i=this.$t[s];return i?this.Kt(i,r):this.$t[s]=i={tokens:this.Zt,lastAccess:r},i.tokens===0||(i.tokens--,i.tokens===0&&((n=this.zt)==null||n.call(this,t)),i.tokens===0)}stop(){this.$t={}}};var Xf,wE,Zx,os="Mobile",bm="iOS",Qi="Android",qc="Tablet",k3=Qi+" "+qc,T3="iPad",S3="Apple",C3=S3+" Watch",Wd="Safari",Yc="BlackBerry",j3="Samsung",A3=j3+"Browser",I3=j3+" Internet",ol="Chrome",XR=ol+" OS",P3=ol+" "+bm,p_="Internet Explorer",D3=p_+" "+os,m_="Opera",JR=m_+" Mini",g_="Edge",O3="Microsoft "+g_,wc="Firefox",M3=wc+" "+bm,_h="Nintendo",wh="PlayStation",Ec="Xbox",R3=Qi+" "+os,L3=os+" "+Wd,kd="Windows",hb=kd+" Phone",EE="Nokia",fb="Ouya",F3="Generic",ZR=F3+" "+os.toLowerCase(),B3=F3+" "+qc.toLowerCase(),pb="Konqueror",U3="Oculus Browser",pr="(\\d+(\\.\\d+)?)",e0=new RegExp("Version/"+pr),eL=new RegExp(Ec,"i"),tL=new RegExp(wh+" \\w+","i"),nL=new RegExp(_h+" \\w+","i"),x_=new RegExp(Yc+"|PlayBook|BB10","i"),rL={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},$3=function(e,t){return t=t||"",et(e," OPR/")&&et(e,"Mini")?JR:et(e," OPR/")?m_:x_.test(e)?Yc:et(e,"IE"+os)||et(e,"WPDesktop")?D3:et(e,"OculusBrowser")?U3:et(e,A3)?I3:et(e,g_)||et(e,"Edg/")?O3:et(e,"FBIOS")?"Facebook "+os:et(e,"UCWEB")||et(e,"UCBrowser")?"UC Browser":et(e,"CriOS")?P3:et(e,"CrMo")||et(e,ol)?ol:et(e,Qi)&&et(e,Wd)?R3:et(e,"FxiOS")?M3:et(e.toLowerCase(),pb.toLowerCase())?pb:((n,r)=>r&&et(r,S3)||function(s){return et(s,Wd)&&!et(s,ol)&&!et(s,Qi)}(n))(e,t)?et(e,os)?L3:Wd:et(e,wc)?wc:et(e,"MSIE")||et(e,"Trident/")?p_:et(e,"Gecko")?wc:""},sL={[D3]:[new RegExp("rv:"+pr)],[O3]:[new RegExp(g_+"?\\/"+pr)],[ol]:[new RegExp("("+ol+"|CrMo)\\/"+pr)],[P3]:[new RegExp("CriOS\\/"+pr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+pr)],[Wd]:[e0],[L3]:[e0],[m_]:[new RegExp("(Opera|OPR)\\/"+pr)],[wc]:[new RegExp(wc+"\\/"+pr)],[M3]:[new RegExp("FxiOS\\/"+pr)],[pb]:[new RegExp("Konqueror[:/]?"+pr,"i")],[Yc]:[new RegExp(Yc+" "+pr),e0],[R3]:[new RegExp("android\\s"+pr,"i")],[I3]:[new RegExp(A3+"\\/"+pr)],[U3]:[new RegExp("OculusBrowser\\/"+pr)],[p_]:[new RegExp("(rv:|MSIE )"+pr)],Mozilla:[new RegExp("rv:"+pr)]},iL=function(e,t){var n=$3(e,t),r=sL[n];if(we(r))return null;for(var s=0;r.length>s;s++){var i=e.match(r[s]);if(i)return parseFloat(i[i.length-2])}return null},NE=[[new RegExp(Ec+"; "+Ec+" (.*?)[);]","i"),e=>[Ec,e&&e[1]||""]],[new RegExp(_h,"i"),[_h,""]],[new RegExp(wh,"i"),[wh,""]],[x_,[Yc,""]],[new RegExp(kd,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[hb,""];if(new RegExp(os).test(t)&&!/IEMobile\b/.test(t))return[kd+" "+os,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=rL[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[kd,r]}return[kd,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[bm,[e[3],e[4],e[5]||"0"].join(".")]:[bm,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=we(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Qi+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Qi+")","i"),e=>e&&e[2]?[Qi,[e[2],e[3],e[4]||"0"].join(".")]:[Qi,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[XR,""]],[/Linux|debian/i,["Linux",""]]],kE=function(e){return nL.test(e)?_h:tL.test(e)?wh:eL.test(e)?Ec:new RegExp(fb,"i").test(e)?fb:new RegExp("("+hb+"|WPDesktop)","i").test(e)?hb:/iPad/.test(e)?T3:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?C3:x_.test(e)?Yc:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(EE,"i").test(e)?EE:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(os).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?Qi:k3:new RegExp("(pda|"+os+")","i").test(e)?ZR:new RegExp(qc,"i").test(e)&&!new RegExp(qc+" pc","i").test(e)?B3:""},aL=e=>e instanceof Error,z3={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},oL=z3.info;function H3(e){if(vi(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(ft(e))return{arrayValue:{values:e.map(t=>H3(t))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function TE(e){var t=[];for(var n in e){var r=e[n];fa(r)||we(r)||t.push({key:n,value:H3(r)})}return t}function lL(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return Zx&&n.length===wE||(wE=n.length,Zx=n.reduce((r,s)=>{Xf||(Xf={});var i=Xf[s];if(i)r[i[0]]=i[1];else for(var a=e(s),l=a.length-1;l>=0;l--){var c=a[l],u=c==null?void 0:c.filename,d=t[s];if(u&&d){r[u]=d,Xf[s]=[u,d];break}}return r},{})),Zx}}let cL=class{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(r,n,0).apply(t),i=this.buildParsingContext(n),a=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(a,r),$exception_level:"error"}}modifyFrames(t){var n=this;return ss(function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&ft(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t})()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,s;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(s=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),pe({},t,{cause:r,stack:s})}applyChunkIds(t,n){return t.map(r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return ss(function*(){var r=t;for(var s of n.modifiers)r=yield s(r);return r})()}convertToExceptionList(t,n){var r,s,i,a={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(s=n.handled)===null||s===void 0||s,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(a.stacktrace={type:"raw",frames:t.stack});var l=[a];return t.cause!=null&&l.push(...this.convertToExceptionList(t.cause,pe({},n,{handled:!0}))),l}buildParsingContext(t){var n;return{chunkIdMap:lL(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var s=(i,a)=>
vendor: 4,721 bytes, line 17
17{if(4>=a){var l=this.buildCoercingContext(t,n,a);return this.applyCoercers(i,l)}};return pe({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:i=>s(i,r),next:i=>s(i,r+1)})}};var Gc="?";function mb(e,t,n,r,s){var i={platform:e,filename:t,function:n==="<anonymous>"?Gc:n,in_app:!0};return we(r)||(i.lineno=r),we(s)||(i.colno=s),i}var W3=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Gc,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},uL=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,dL=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,hL=/\((\S*)(?::(\d+))(?::(\d+))\)/,fL=(e,t)=>{var n=uL.exec(e);if(n){var[,r,s,i]=n;return mb(t,r,Gc,+s,+i)}var a=dL.exec(e);if(a){if(a[2]&&a[2].indexOf("eval")===0){var l=hL.exec(a[2]);l&&(a[2]=l[1],a[3]=l[2],a[4]=l[3])}var[c,u]=W3(a[1]||Gc,a[2]);return mb(t,u,c,a[3]?+a[3]:void 0,a[4]?+a[4]:void 0)}},pL=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,mL=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,gL=(e,t)=>{var n=pL.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=mL.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var s=n[3],i=n[1]||Gc;return[i,s]=W3(i,s),mb(t,s,i,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},SE=/\(error: (.*)\)/;let xL=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=un(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return ym(t,"DOMException")}isDOMError(t){return ym(t,"DOMError")}},yL=class{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(t){return t.stacktrace||t.stack||void 0}},bL=class{constructor(){}match(t){return ym(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}};var vL=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let _L=class{match(t){return typeof t=="string"}coerce(t,n){var r,[s,i]=this.getInfos(t);return{type:s??"Error",value:i??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,s=t.match(vL);return s&&(n=s[1],r=s[2]),[n,r]}};var wL=["fatal","error","warning","log","info","debug"];function V3(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var s=n.slice(0,r).join(", ");if(t>=s.length)return r===n.length?s:s.length>t?s.slice(0,t)+"...":s}return""}let EL=class{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,s=this.getErrorPropertyFromObject(t);return s?n.apply(s):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return f_(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+V3(t)}isSeverityLevel(t){return un(t)&&!Fp(t)&&wL.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var r=t[n];if(aL(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}},NL=class{match(t){return f_(t)}coerce(t,n){var r,s=t.constructor.name;return{type:s,value:s+" captured as exception with keys: "+V3(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}},kL=class{match(t){return N3(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}},TL=class{match(t){return ym(t,"PromiseRejectionEvent")||this.isCu
17stomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!f_(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var r,s=this.getUnhandledRejectionReason(t);return N3(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(s)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}};var vm="$message",_m="$timestamp",SL=new Set([vm,_m]),t0={enabled:!0,max_bytes:32768};function wm(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:t0.enabled,max_bytes:jL(e.max_bytes,t0.max_bytes)}:pe({},t0)}let CL=class{constructor(t){this.Yt=[],this.Xt=0,this.qt=wm(t)}setConfig(t){this.qt=wm(t),this.er()}add(t){var n=function(s){var i=function(d){var h=new WeakSet;try{return JSON.stringify(d,(f,p)=>{if(typeof p=="bigint")return p.toString();if(typeof p!="function"&&typeof p!="symbol"){if(p instanceof Date)return p.toISOString();if(p instanceof Error)return{name:p.name,message:p.message,stack:p.stack};if(p&&typeof p=="object"){if(h.has(p))return"[Circular]";h.add(p)}return p}})}catch{return}}(s);if(i)try{var a=JSON.parse(i);if(!kn(a))return;var l=a,c=l[vm],u=l[_m];return!un(c)||c.trim().length===0||!un(u)&&!Ds(u)?void 0:{step:l,json:i}}catch{return}}(t);if(n){var r=function(s){if(typeof TextEncoder<"u")return new TextEncoder().encode(s).length;for(var i=encodeURIComponent(s),a=0,l=0;i.length>l;l++)i[l]==="%"?(a+=1,l+=2):a+=1;return a}(n.json);r>this.qt.max_bytes||(this.Yt.push({step:n.step,bytes:r}),this.Xt+=r,this.er())}}getAttachable(){return this.Yt.map(t=>t.step)}clear(){this.Yt=[],this.Xt=0}size(){return this.Yt.length}er(){for(;this.Xt>this.qt.max_bytes&&this.Yt.length>0;){var t=this.Yt.shift();t&&(this.Xt-=t.bytes)}}};function jL(e,t){if(!Ds(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var q3=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={k(s){if(X&&(Ar.DEBUG||Me.POSTHOG_DEBUG||n)&&!we(X.console)&&X.console){for(var i=("__rrweb_original__"in X.console[s])?X.console[s].__rrweb_original__:X.console[s],a=arguments.length,l=new Array(a>1?a-1:0),c=1;a>c;c++)l[c-1]=arguments[c];i(e,...l)}},debug(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("debug",...i)},info(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("log",...i)},warn(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("warn",...i)},error(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];r.k("error",...i)},critical(){for(var s=arguments.length,i=new Array(s),a=0;s>a;a++)i[a]=arguments[a];console.error(e,...i)},uninitializedWarning(s){r.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>q3(e+" "+s,i)};return r},be=q3("[PostHog.js]"),nn=be.createLogger,AL=nn("[ExternalScriptsLoader]"),n0=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return AL.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=ve==null?void 0:ve.querySelectorAll("script");if(r){for(var s,i=function(){if(r[a].src===t){var c=r[a];return c.__posthog_loading_callback_fired?{v:n()}:(c.addEventListener("load",u=>{c.__posthog_loading_callback_fired=!0,n(void 0,u)}),c.onerror=u=>n(u),{v:void 0})}},a=0;r.length>a;a++)if(s=i())return s.v}var l=()=>{if(!ve)return n("document not found");var c=ve.createElement("script");if(c.type="text/javascript",c.crossOrigin="anonymous",c.src=t,c.onload=h=>{c.__posthog_loading_callback_fired=!0,n(void 0,h)},c.onerror=h=>n(h),e.config.prepare_external_dependency_script&&(c=e.config.prepare_external_dependency_script(c)),!c)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")ve.head.appendChild(c);else{var u,d=ve.querySelectorAll("body > script");d.length>0?(u=d[0].parentNode)==null||u.insertBefore(c,d[0]):ve.body.appendChild(c)}};ve!=null&&ve.body?l():ve==null||ve.addEventListener("DOMContentLoaded",l)};Me.__PosthogExtensions__=Me.__PosthogExtensions__||{},Me.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var s="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var i=3e5;
17s=s+"&t="+Math.floor(Date.now()/i)*i}r=e.requestRouter.endpointFor("assets",s)}n0(e,r,n)}else{var a=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");n0(e,a,n)}},Me.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);n0(e,r,n)};var Y3="$people_distinct_id",Em="$device_id",Td="__alias",Sd="__timers",gb="$autocapture_disabled_server_side",xb="$heatmaps_enabled_server_side",yb="$exception_capture_enabled_server_side",bb="$error_tracking_suppression_rules",vb="$error_tracking_capture_extension_exceptions",_b="$web_vitals_enabled_server_side",y_="$dead_clicks_enabled_server_side",wb="$product_tours_enabled_server_side",Eb="$web_vitals_allowed_metrics",qo="$session_recording_remote_config",G3="$replay_override_sampling",K3="$replay_override_linked_flag",Q3="$replay_override_url_trigger",X3="$replay_override_event_trigger",Nm="$sesid",b_="$session_is_sampled",tc="$enabled_feature_flags",Bp="$active_feature_flags",Cd="$early_access_features",Nb="$feature_flag_details",kb="$feature_flag_payloads",Tb="$feature_flag_request_id",Fi="$override_feature_flags",Kl="$override_feature_flag_payloads",jd="$stored_person_properties",Mo="$stored_group_properties",Sb="$surveys",Cb="$surveys_activated",Up="ph_product_tours",Vd="$flag_call_reported",jb="$flag_call_reported_session_id",Ab="$feature_flag_errors",km="$feature_flag_evaluated_at",Hs="$user_state",Ib="$client_session_props",Pb="$capture_rate_limit",Db="$initial_campaign_params",Ob="$initial_referrer_info",Tm="$initial_person_info",Sm="$epp",J3="__POSTHOG_TOOLBAR__",Jf="$posthog_cookieless",Z3="$sdk_debug_extensions_init_method",eA="$sdk_debug_extensions_init_time_ms",tA="$sdk_debug_recording_script_not_loaded",v_="PostHog loadExternalDependency extension not found.",Ro="on_reject",Yi="always",Ml="anonymous",Rl="identified",Mb="identified_only",Cm="visibilitychange",jm="beforeunload",Ql="$pageview",r0="$pageleave",s0="$identify",CE="$groupidentify";function Zf(e,t){ft(e)&&e.forEach(t)}function Ht(e,t){if(!st(e))if(ft(e))e.forEach(t);else if(qR(e))e.forEach((r,s)=>t(r,s));else for(var n in e)E3.call(e,n)&&t(e[n],n)}var bn=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var s of n)for(var i in s)s[i]!==void 0&&(e[i]=s[i]);return e};function $p(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var jE=function(e){try{return e()}catch{return}},IL=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(s){be.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),be.critical(s)}}},__=function(e){var t={};return Ht(e,function(n,r){(un(n)&&n.length>0||Ds(n))&&(t[r]=n)}),t},PL=["herokuapp.com","vercel.app","netlify.app"];function DL(e){var t=e==null?void 0:e.hostname;if(!un(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of PL)if(n===r)return!1;return!0}function On(e,t,n,r){var{capture:s=!1,passive:i=!0}=r??{};e==null||e.addEventListener(t,n,{capture:s,passive:i})}function nA(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Ds(e)&&isFinite(e)&&Math.floor(e)===e});class Am{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,s){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(s)||0>t||0>n||0>r||0>s||t>0xffffffffffff||n>4095||r>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|n>>>8,i[7]=n,i[8]=128|r>>>24,i[9]=r>>>16,i[10]=r>>>8,i[11]=r,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new Am(i)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Am(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class OL{constructor(){this.S=0,this.C=0,this.I=new ML}generate(){var t=this.generateOrAbort();if(we(t)){this.S=0;var n=this.generateOrAbort();if(we(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.S)this.S=t,this.T();else{if(this.S>=t+1e4)return;this.C++,this.C>4398046511103&&(this.S++,this.T())}return Am.fromFieldsV7(this.S,Math.trunc(this.C/Math.pow(2,30)),this.C&Math.pow(2,30)-1,this.I.nextUint32())}T(){this.C=1024*this.I.nextUint32()+(1023&this.I.nextUint32())}}var AE,rA=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};X&&!we(X.crypto)&&crypto.getRandomValues&&(rA=e=>crypto.getRandomValues(e));class ML{constructor(){this.M=new Uint32Array(8),this.O=1/0}nextUint32(){return this.M.length>this.O||(rA(this.M),this.O=0),this.M[this.O++]}}var Ma=()=>RL().toString(),RL=()=>(AE||(AE=new OL)).generate(),Yu="",LL=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,yi={R:()=>!!ve,D(e){be.error("cookieStore error: "+e)},A(e){if(ve){try{for(var t=e+"=",n=ve.cookie.split(";").filter(i=>i.length),r=0;n.length>r;r++){for(var s=n[r];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}}catch{}return null}},F(e){var t;try{t=JSON.parse(yi.A(e))||{}}catch{}return t}
17,N(e,t,n,r,s){if(ve)try{var i="",a="",l=function(d,h){if(h){var f=function(m,x){if(x===void 0&&(x=ve),Yu)return Yu;if(!x||["localhost","127.0.0.1"].includes(m))return"";for(var w=m.split("."),g=Math.min(w.length,8),b="dmn_chk_"+Ma();!Yu&&g--;){var _=w.slice(g).join("."),k=b+"=1;domain=."+_+";path=/";x.cookie=k+";max-age=3",x.cookie.includes(b)&&(x.cookie=k+";max-age=0",Yu=_)}return Yu}(d);if(!f){var p=(m=>{var x=m.match(LL);return x?x[0]:""})(d);p!==f&&be.info("Warning: cookie subdomain discovery mismatch",p,f),f=p}return f?"; domain=."+f:""}return""}(ve.location.hostname,r);if(n){var c=new Date;c.setTime(c.getTime()+864e5*n),i="; expires="+c.toUTCString()}s&&(a="; secure");var u=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+l+a;return u.length>3686.4&&be.warn("cookieStore warning: large cookie, len="+u.length),ve.cookie=u,u}catch{return}},q(e,t){if(ve!=null&&ve.cookie)try{yi.N(e,"",-1,t)}catch{return}}},i0=null,ln={R(){if(!fa(i0))return i0;var e=!0;if(we(X))e=!1;else try{var t="__mplssupport__";ln.N(t,"xyz"),ln.A(t)!=='"xyz"'&&(e=!1),ln.q(t)}catch{e=!1}return e||be.error("localStorage unsupported; falling back to cookie store"),i0=e,e},D(e){be.error("localStorage error: "+e)},A(e){try{return X==null?void 0:X.localStorage.getItem(e)}catch(t){ln.D(t)}return null},F(e){try{return JSON.parse(ln.A(e))||{}}catch{}return null},N(e,t){try{X==null||X.localStorage.setItem(e,JSON.stringify(t))}catch(n){ln.D(n)}},q(e){try{X==null||X.localStorage.removeItem(e)}catch(t){ln.D(t)}}},FL=[Em,"distinct_id",Nm,b_,Sm,Tm,Hs],ep={},BL={R:()=>!0,D(e){be.error("memoryStorage error: "+e)},A:e=>ep[e]||null,F:e=>ep[e]||null,N(e,t){ep[e]=t},q(e){delete ep[e]}},Co=null,ar={R(){if(!fa(Co))return Co;if(Co=!0,we(X))Co=!1;else try{var e="__support__";ar.N(e,"xyz"),ar.A(e)!=='"xyz"'&&(Co=!1),ar.q(e)}catch{Co=!1}return Co},D(e){be.error("sessionStorage error: ",e)},A(e){try{return X==null?void 0:X.sessionStorage.getItem(e)}catch(t){ar.D(t)}return null},F(e){try{return JSON.parse(ar.A(e))||null}catch{}return null},N(e,t){try{X==null||X.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){ar.D(n)}},q(e){try{X==null||X.sessionStorage.removeItem(e)}catch(t){ar.D(t)}}};class UL{constructor(t){this._instance=t}get qt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.qt.cookieless_mode===Yi||this.isRejected()||this.consent===-1&&this.qt.cookieless_mode===Ro}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.qt.opt_out_capturing_by_default}optInOut(t){this.nr.N(this.sr,t?1:0,this.qt.cookie_expiration,this.qt.cross_subdomain_cookie,this.qt.secure_cookie)}reset(){this.nr.q(this.sr,this.qt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.A(this.sr);return Jx(t)?1:et(KR,t)?0:-1}get nr(){var t=this.qt.opt_out_capturing_persistence_type,n=t==="localStorage"?ln:yi;if(!this.ar||this.ar!==n){this.ar=n;var r=t==="localStorage"?yi:ln;r.A(this.sr)&&(this.ar.A(this.sr)||this.optInOut(Jx(r.A(this.sr))),r.q(this.sr,this.qt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.qt.respect_dnt&&[is==null?void 0:is.doNotTrack,is==null?void 0:is.msDoNotTrack,Me.doNotTrack].some(t=>Jx(t))}}var tp=nn("[Dead Clicks]"),$L=()=>!0,zL=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(y_)),r=e.instance.config.capture_dead_clicks;return vi(r)?r:!!kn(r)||n};class IE{get lazyLoadedDeadClicksAutocapture(){return this.ur}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[y_]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.lr(()=>{this.hr()}):this.stop()}lr(t){var n,r;(n=Me.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=Me.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?tp.error("failed to load script",s):t()})}hr(){var t;if(ve){if(!this.ur&&(t=Me.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=kn(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.ur=Me.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.ur.start(ve),tp.info("starting...")}}else tp.error("`document` not found. Cannot start.")}stop(){this.ur&&(this.ur.stop(),this.ur=void 0,tp.info("stopping..."))}}var a0=nn("[SegmentIntegration]"),sA="posthog-js";function iA(e,t){var{organization:n,projectId:r,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:a=!0}=t===void 0?{}:t;return l=>{var c,u,d,h,f;if(i!=="*"&&!i.includes(l.level)||!e.__loaded)return l;l.tags||(l.tags={});var p=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/pers
17on/"+e.get_distinct_id());l.tags["PostHog Person URL"]=p,e.sessionRecordingStarted()&&(l.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var m,x=((c=l.exception)==null?void 0:c.values)||[],w=x.map(b=>pe({},b,{stacktrace:b.stacktrace?pe({},b.stacktrace,{type:"raw",frames:(b.stacktrace.frames||[]).map(_=>pe({},_,{platform:"web:javascript"}))}):void 0})),g={$exception_message:((u=x[0])==null?void 0:u.value)||l.message,$exception_type:(d=x[0])==null?void 0:d.type,$exception_level:l.level,$exception_list:w,$sentry_event_id:l.event_id,$sentry_exception:l.exception,$sentry_exception_message:((h=x[0])==null?void 0:h.value)||l.message,$sentry_exception_type:(f=x[0])==null?void 0:f.type,$sentry_tags:l.tags};return n&&r&&(g.$sentry_url=(s||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+l.event_id),a&&((m=e.exceptions)==null||m.sendExceptionEvent(g)),l}}class HL{constructor(t,n,r,s,i,a){this.name=sA,this.setupOnce=function(l){l(iA(t,{organization:n,projectId:r,prefix:s,severityAllowList:i,sendExceptionsToPostHog:a==null||a}))}}}class PE{constructor(t){this.cr=(n,r,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength)&&(be.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:s}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,n){var r,s=this.gr(t,n);return this.dr={pathname:(r=X==null?void 0:X.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),s}doPageLeave(t){var n;return this.gr(t,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,n){var r=this.dr;if(!r)return{$pageview_id:n};var s={$pageview_id:n,$prev_pageview_id:r.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:a,lastScrollY:l,maxScrollY:c,maxContentHeight:u,lastContentY:d,maxContentY:h}=i;if(!(we(a)||we(l)||we(c)||we(u)||we(d)||we(h))){a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d),h=Math.ceil(h);var f=a>1?_i(l/a,0,1,be):1,p=a>1?_i(c/a,0,1,be):1,m=u>1?_i(d/u,0,1,be):1,x=u>1?_i(h/u,0,1,be):1;s=bn(s,{$prev_pageview_last_scroll:l,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:c,$prev_pageview_max_scroll_percentage:p,$prev_pageview_last_content:d,$prev_pageview_last_content_percentage:m,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:x})}}return r.pathname&&(s.$prev_pageview_pathname=r.pathname),r.timestamp&&(s.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),s}}var WL={[Y3]:{exposure:"hidden"},[Td]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Sd]:{exposure:"hidden"},[gb]:{exposure:"event"},[xb]:{exposure:"hidden"},[yb]:{exposure:"event"},[bb]:{exposure:"hidden"},[vb]:{exposure:"event"},[_b]:{exposure:"event"},[y_]:{exposure:"event"},[wb]:{exposure:"hidden"},[Eb]:{exposure:"event"},[qo]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Nm]:{exposure:"hidden"},[b_]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[tc]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!kn(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[Bp]:{exposure:"event"},[Cd]:{exposure:"hidden"},[Nb]:{exposure:"hidden"},[kb]:{exposure:"event"},[Tb]:{exposure:"event"},[Fi]:{exposure:"event"},[Kl]:{exposure:"hidden"},[jd]:{exposure:"hidden"}
17,[Mo]:{exposure:"hidden"},[Sb]:{exposure:"hidden"},[Cb]:{exposure:"event"},[Up]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[Vd]:{exposure:"hidden"},[jb]:{exposure:"hidden"},[Ab]:{exposure:"hidden"},[km]:{exposure:"hidden"},[Hs]:{exposure:"hidden"},[Ib]:{exposure:"hidden"},[Pb]:{exposure:"hidden"},[Db]:{exposure:"hidden"},[Ob]:{exposure:"hidden"},[Tm]:{exposure:"hidden"},[Sm]:{exposure:"hidden"},[G3]:{exposure:"event"},[K3]:{exposure:"event"},[Q3]:{exposure:"event"},[X3]:{exposure:"event"},[Z3]:{exposure:"event"},[eA]:{exposure:"event"},[tA]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},VL=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Im=e=>{var t=ve==null?void 0:ve.createElement("a");return we(t)?null:(t.href=e,t)},Eh=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;r.length>s;s++){var i=r[s].split("=");if(i[0]===t){n=i;break}}if(!ft(n)||2>n.length)return"";var a=n[1];try{a=decodeURIComponent(a)}catch{be.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},Nh=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),s=r[1],i=(r[0]||"").split("?"),a=i[1],l=i[0],c=(a||"").split("&"),u=[],d=0;c.length>d;d++){var h=c[d].split("=");ft(h)&&(t.includes(h[0])?u.push(h[0]+"="+n):u.push(c[d]))}var f=l;return a!=null&&(f+="?"+u.join("&")),s!=null&&(f+="#"+s),f},Pm=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},np="https?://(.*)",Kc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],qL=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Kc],kh="<masked>",YL=["li_fat_id"];function aA(e,t,n){if(!ve)return{};var r,s=t?[...Kc,...n||[]]:[],i=oA(Nh(ve.URL,s,kh),e),a=(r={},Ht(YL,function(l){var c=yi.A(l);r[l]=c||null}),r);return bn(a,i)}function oA(e,t){var n=qL.concat(t||[]),r={};return Ht(n,function(s){var i=Eh(e,s);r[s]=i||null}),r}function lA(e){var t=function(i){return i?i.search(np+"google.([^/?]*)")===0?"google":i.search(np+"bing.com")===0?"bing":i.search(np+"yahoo.com")===0?"yahoo":i.search(np+"duckduckgo.com")===0?"duckduckgo":null:null}(e),n=t!="yahoo"?"q":"p",r={};if(!fa(t)){r.$search_engine=t;var s=ve?Eh(ve.referrer,n):"";s.length&&(r.ph_keyword=s)}return r}function DE(){return navigator.language||navigator.userLanguage}var Dm="$direct";function cA(){return(ve==null?void 0:ve.referrer)||Dm}function uA(e,t){var n=e?[...Kc,...t||[]]:[],r=ir==null?void 0:ir.href.substring(0,1e3);return{r:cA().substring(0,1e3),u:r?Nh(r,n,kh):void 0}}function dA(e){var t,{r:n,u:r}=e,s={$referrer:n,$referring_domain:n==null?void 0:n==Dm?Dm:(t=Im(n))==null?void 0:t.host};if(r){s.$current_url=r;var i=Im(r);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var a=oA(r);bn(s,a)}if(n){var l=lA(n);bn(s,l)}return s}function hA(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function GL(){try{return new Date().getTimezoneOffset()}catch{return}}var KL=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class o0{constructor(t,n){this.qt=t,this.props={},this.mr=!1,this.yr=(r=>{var s="";return r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+s+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&be.info("Persistence loaded",t.persistence,pe({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this._r}br(t){KL.indexOf(t.persistence.toLowerCase())===-1&&(be.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=function(s){s===void 0&&(s=[]);var i=[...FL,...s];return pe({},ln,{F(a){try{var l={};try{l=yi.F(a)||{}}catch{}var c=bn(l,JSON.parse(ln.A(a)||"{}"));return ln.N(a,c),c}catch{}return null},N(a,l,c,u,d,h){try{ln.N(a,l,void 0,void 0,h);var f={};
17i.forEach(p=>{l[p]&&(f[p]=l[p])}),Object.keys(f).length&&yi.N(a,f,c,u,d,h)}catch(p){ln.D(p)}},q(a,l){try{X==null||X.localStorage.removeItem(a),yi.q(a,l)}catch(c){ln.D(c)}}})}(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&ln.R()?ln:r==="localstorage+cookie"&&n.R()?n:r==="sessionstorage"&&ar.R()?ar:r==="memory"?BL:r==="cookie"?yi:n.R()?n:yi}wr(t){var n=t??this.qt.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[km];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return Ht(this.props,(n,r)=>{var s=(i=>{var a=WL[i];if(a)return a;for(var[l,c]of VL)if(i.indexOf(l)===0)return c})(r);if((s==null?void 0:s.exposure)==="derived"){if(s.shouldSkipFromEventProperties!=null&&s.shouldSkipFromEventProperties(n,r===tc?()=>this.wr():()=>!1))return;s.transformToEventProperties&&bn(t,s.transformToEventProperties(n))}else s&&s.exposure!=="event"||(t[r]=n)}),t}load(){if(!this._r){var t=this.nr.F(this.yr);t&&(this.props=bn({},t))}}save(){this._r||this.nr.N(this.yr,this.props,this.Sr,this.kr,this.Cr,this.qt.debug)}remove(){this.nr.q(this.yr,!1),this.nr.q(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(kn(t)){we(n)&&(n="None"),this.Sr=we(r)?this.Ir:r;var s=!1;if(Ht(t,(i,a)=>{this.props.hasOwnProperty(a)&&this.props[a]!==n||(this.Tr(a,i),s=!0)}),s)return this.save(),!0}return!1}register(t,n){if(kn(t)){this.Sr=we(n)?this.Ir:n;var r=!1;if(Ht(t,(s,i)=>{t.hasOwnProperty(i)&&this.props[i]!==s&&(this.Tr(i,s),r=!0)}),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Er(t),this.save())}update_campaign_params(){if(!this.mr){var t=aA(this.qt.custom_campaign_params,this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties);ec(__(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=ve==null?void 0:ve.referrer)?lA(t):{})}update_referrer_info(){var t;this.register_once({$referrer:cA(),$referring_domain:ve!=null&&ve.referrer&&((t=Im(ve.referrer))==null?void 0:t.host)||Dm},void 0)}set_initial_person_info(){this.props[Db]||this.props[Ob]||this.register_once({[Tm]:uA(this.qt.mask_personal_data_properties,this.qt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};Ht([Ob,Db],a=>{var l=this.props[a];l&&Ht(l,function(c,u){t["$initial_"+db(u)]=c})});var n,r,s=this.props[Tm];if(s){var i=(n=dA(s),r={},Ht(n,function(a,l){r["$initial_"+db(l)]=a}),r);bn(t,i)}return t}safe_merge(t){return Ht(this.props,function(n,r){r in t||(t[r]=n)}),t}update_config(t,n,r){if(this.Ir=this.Sr=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((a,l)=>{if(a.length!==l.length)return!1;var c=[...a].sort(),u=[...l].sort();return c.every((d,h)=>d===u[h])})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var s=this.br(t),i=this.props;this.clear(),this.nr=s,this.props=i,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.kr&&(this.kr=t,this.remove(),this.save())}set_secure(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[Sd]||{};r[t]=n,this.Tr(Sd,r),this.save()}remove_event_timer(t){var n=this.props[Sd]||{},r=n[t];return we(r)||(delete n[t],this.Tr(Sd,n),this.save()),r}get_property(t){return this.props[t]}set_property(t,n){this.Tr(t,n),this.save()}Tr(t,n){this.props[t]=n}Er(t){delete this.props[t]}}var Gu={Activation:"events",Cancellation:"cancelEvents"},l0={Popover:"popover",API:"api",Widget:"widget"},Ad={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},c0={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Rb={Popover:"popover",Inline:"inline"},QL={SHOWN:"product tour shown"},OE={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},ME=nn("[RateLimiter]");class XL{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;
17if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach(s=>{ME.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void ME.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,s;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:a}=this,l=new Date().getTime(),c=(n=(r=this.instance.persistence)==null?void 0:r.get_property(Pb))!==null&&n!==void 0?n:{tokens:i,last:l};c.tokens+=(l-c.last)/1e3*a,c.last=l,c.tokens>i&&(c.tokens=i);var u=1>c.tokens;return u||t||(c.tokens=Math.max(0,c.tokens-1)),!u||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+a+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=u,(s=this.instance.persistence)==null||s.set_property(Pb,c),{isRateLimited:u,remainingTokens:c.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var Ku=nn("[RemoteConfig]");class fA{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Me._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Mr(t){var n,r;(n=Me.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=Me.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",()=>t(this.remoteConfig)):t()}Pr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return Ku.info("Using preloaded remote config",this.remoteConfig),this.Rr(this.remoteConfig),void this.Or();if(this._instance.Lr())return void Ku.warn("Remote config is disabled. Falling back to local config.");this.Mr(t=>{if(!t)return Ku.info("No config found after loading remote JS config. Falling back to JSON."),void this.Pr(n=>{this.Rr(n),this.Or()});this.Rr(t),this.Or()})}catch(t){Ku.error("Error loading remote config",t)}}stop(){this.Fr&&(clearInterval(this.Fr),this.Fr=void 0)}refresh(){!this._instance.Lr()&&ve&&ve.visibilityState!=="hidden"&&this._instance.reloadFeatureFlags()}Or(){var t;if(!this.Fr){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Fr=setInterval(()=>{this.refresh()},n))}}Rr(t){var n;t||Ku.error("Failed to fetch remote config from PostHog."),this._instance.Rr(t??{}),(t==null?void 0:t.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var mi={GZipJS:"gzip-js",Base64:"base64"},Is=Uint8Array,Yr=Uint16Array,Qc=Uint32Array,w_=new Is([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),E_=new Is([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),RE=new Is([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),pA=function(e,t){for(var n=new Yr(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var s=new Qc(n[30]);for(r=1;30>r;++r)for(var i=n[r];n[r+1]>i;++i)s[i]=i-n[r]<<5|r;return[n,s]},mA=pA(w_,2),Lb=mA[1];mA[0][28]=258,Lb[258]=28;for(var LE=pA(E_,0)[1],gA=new Yr(32768),Wt=0;32768>Wt;++Wt){var Ll=(43690&Wt)>>>1|(21845&Wt)<<1;gA[Wt]=((65280&(Ll=(61680&(Ll=(52428&Ll)>>>2|(13107&Ll)<<2))>>>4|(3855&Ll)<<4))>>>8|(255&Ll)<<8)>>>1}var qd=function(e,t,n){for(var r=e.length,s=0,i=new Yr(t);r>s;++s)++i[e[s]-1];var a,l=new Yr(t);for(s=0;t>s;++s)l[s]=l[s-1]+i[s-1]<<1;for(a=new Yr(r),s=0;r>s;++s)a[s]=gA[l[e[s]-1]++]>>>15-e[s];return a},ml=new Is(288);for(Wt=0;144>Wt;++Wt)ml[Wt]=8;for(Wt=144;256>Wt;++Wt)ml[Wt]=9;for(Wt=256;280>Wt;++Wt)ml[Wt]=7;for(Wt=280;288>Wt;++Wt)ml[Wt]=8;var Om=new Is(32);for(Wt=0;32>Wt;++Wt)Om[Wt]=5;var JL=qd(ml,9),ZL=qd(Om,5),xA=function(e){return(e/8>>0)+(7&e&&1)},yA=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Yr?Yr:e instanceof Qc?Qc:Is)(n-t);return r.set(e.subarray(t,n)),r},Di=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},Qu=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},u0=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,i=n.slice();if(!s)return[new Is(0),0];if(s==1){var a=new Is(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort(function(T,N){return T.f-N.f}),n.push({s:-1,f:25001});var l=n[0],c=n[1],u=0,d=1,h=2;for(n[0]={s:-1,f:l.f+c.f,l,r:c};d!=s-1;)l=n[n[h].f>n[u].f?u++:h++],c=n[u!=d&&n[h].f>n[u].f?u++:h++],n[d++]={s:-1,f:l.f+c.f,l,r:c};var f=i[0].s;for(r=1;s>r;++r)i[r].s>f&&(f=i[r].s);var p=new Yr(f+1),m=Fb(n[d-1],p,0);if(m>t){r=0;var x=0,w=m-t,g=1<<w;for(i.sort(function(T,N){return p[N.s]-p[T.s]||T.f-N.f});s>r;++r){var b=i[r].s;if(t>=p[b])break;x+=g-(1<<m-p[b]),p[b]=t}for(x>>>=w;x>0;){var _=i[r].s;t>p[_]?x-=1<<t-p[_]++-1:++r}for(;r>=0&&x;--r){var k=i[r].s;p[k]==t&&(--p[k],++x)}m=t}return[new Is(p),m]},Fb=function(e,t,n){return e.s==-1?Math.max(Fb(e.l,t,n+1),Fb(e.r,t,n+1)):t[e.s]=n},FE=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Yr(++t),r=0,s=e[0],i=1,a=function(c){n[r++]=c},l=1;t>=l;++l)if(e[l]==s&&l!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(s),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(s);i=1,s=e[l]}return[n.subarray(0,r),t]},Xu=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},Bb=function(e,t,n){var r=n.length,s=xA(t+2);e[s]=255&r,e[s+1]=r>>>8,e[s+2]=255^e[s],e[s+3]=255^e[s+1];for(var i=0;r>i;++i)e[s+i+4]=n[i];return 8*(s+4+r)},BE=function(e,t,n,r,s,i,a,l,c,u,d){Di(t,d++,n),++s[256];for(var h=u0(s,15),f=h[0],p=h[1],m=u0(i,15),x=m[0],w=m[1],g=FE(f),b=g[0],_=g[1],k=FE(x),T=k[0],N=k[1],C=new Yr(19),S=0;b.length>S;++S)C[31&b[S]]++;for(S=0;T.length>S;++S)C[31&T[S]]++;for(var I=u0(C,7),E=I[0],j=I[1],P=19;P>4&&!E[RE[P-1]];--P);var L,z,R,B,O=u+5<<3,U=Xu(s,ml)+Xu(i,Om)+a,H=Xu(s,f)+Xu(i,x)+a+14+3*P+Xu(C,E)+(2*C[16]+3*C[17]+7*C[18]);if(U>=O&&H>=O)return Bb(t,d,e.subarray(c,c+u));if(Di(t,d,1+(U>H)),d+=2,U>H){L=qd(f,p),z=f,R=qd(x,w),B=x;var A=qd(E,j);for(Di(t,d,_-257),Di(t,d+5,N-1),Di(t,d+10,P-4),d+=14,S=0;P>S;++S)Di(t,d+3*S,E[RE[S]]);d+=3*P;for(var q=[b,T],V=0;2>V;++V){var D=q[V];for(S=0;D.length>S;++S)Di(t,d,A[te=31&D[S]]),d+=E[te],te>15&&(Di(t,d,D[S]>>>5&127),d+=D[S]>>>12)}}else L=JL,z=ml,R=ZL,B=Om;for(S=0;l>S;++S)if(r[S]>255){var te;Qu(t,d,L[257+(te=r[S]>>>18&31)]),d+=z[te+257],te>
177&&(Di(t,d,r[S]>>>23&31),d+=w_[te]);var J=31&r[S];Qu(t,d,R[J]),d+=B[J],J>3&&(Qu(t,d,r[S]>>>5&8191),d+=E_[J])}else Qu(t,d,L[r[S]]),d+=z[r[S]];return Qu(t,d,L[256]),d+z[256]},e8=new Qc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),t8=function(){for(var e=new Qc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e}(),d0=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function n8(e,t){t===void 0&&(t={});var n=function(){var h=4294967295;return{p(f){for(var p=h,m=0;f.length>m;++m)p=t8[255&p^f[m]]^p>>>8;h=p},d(){return 4294967295^h}}}(),r=e.length;n.p(e);var s,i,a,l,c,u=(l=10+((s=t).filename&&s.filename.length+1||0),c=8,function(h,f,p,m,x,w){var g=h.length,b=new Is(m+g+5*(1+Math.floor(g/7e3))+x),_=b.subarray(m,b.length-x),k=0;if(!f||8>g)for(var T=0;g>=T;T+=65535){var N=T+65535;g>N?k=Bb(_,k,h.subarray(T,N)):(_[T]=!0,k=Bb(_,k,h.subarray(T,g)))}else{for(var C=e8[f-1],S=C>>>13,I=8191&C,E=(1<<p)-1,j=new Yr(32768),P=new Yr(E+1),L=Math.ceil(p/3),z=2*L,R=function(le){return(h[le]^h[le+1]<<L^h[le+2]<<z)&E},B=new Qc(25e3),O=new Yr(288),U=new Yr(32),H=0,A=0,q=(T=0,0),V=0,D=0;g>T;++T){var te=R(T),J=32767&T,ue=P[te];if(j[J]=ue,P[te]=J,T>=V){var Ne=g-T;if((H>7e3||q>24576)&&Ne>423){k=BE(h,_,0,B,O,U,A,q,D,T-D,k),q=H=A=0,D=T;for(var Ie=0;286>Ie;++Ie)O[Ie]=0;for(Ie=0;30>Ie;++Ie)U[Ie]=0}var Pe=2,Ue=0,ot=I,Ye=J-ue&32767;if(Ne>2&&te==R(T-Ye))for(var ae=Math.min(S,Ne)-1,Ge=Math.min(32767,T),nt=Math.min(258,Ne);Ge>=Ye&&--ot&&J!=ue;){if(h[T+Pe]==h[T+Pe-Ye]){for(var De=0;nt>De&&h[T+De]==h[T+De-Ye];++De);if(De>Pe){if(Pe=De,Ue=Ye,De>ae)break;var Gt=Math.min(Ye,De-2),Lt=0;for(Ie=0;Gt>Ie;++Ie){var St=T-Ye+Ie+32768&32767,rn=St-j[St]+32768&32767;rn>Lt&&(Lt=rn,ue=St)}}}Ye+=(J=ue)-(ue=j[J])+32768&32767}if(Ue){B[q++]=268435456|Lb[Pe]<<18|LE[Ue];var Kt=31&Lb[Pe],sn=31&LE[Ue];A+=w_[Kt]+E_[sn],++O[257+Kt],++U[sn],V=T+Pe,++H}else B[q++]=h[T],++O[h[T]]}}k=BE(h,_,!0,B,O,U,A,q,D,T-D,k)}return yA(b,0,m+xA(k)+x)}(i=e,(a=t).level==null?6:a.level,a.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+a.mem,l,c)),d=u.length;return function(h,f){var p=f.filename;if(h[0]=31,h[1]=139,h[2]=8,h[8]=2>f.level?4:f.level==9?2:0,h[9]=3,f.mtime!=0&&d0(h,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),p){h[3]=8;for(var m=0;p.length>=m;++m)h[m+10]=p.charCodeAt(m)}}(u,t),d0(u,d-8,n.d()),d0(u,d-4,r),u}var r8=!!lb||!!ob,bA="text/plain",zp=!1,s8=(e,t)=>{var[n,r]=e.split("#"),[s,i]=n.split("?");if(!i)return e;var a=i.split("&").filter(l=>l.split("=")[0]!==t).join("&");return s+(a?"?"+a:"")+(r?"#"+r:"")},$g=function(e,t,n){var r;n===void 0&&(n=!0);var[s,i]=e.split("?"),a=pe({},t),l=(r=i==null?void 0:i.split("&").map(u=>{var d,[h,f]=u.split("="),p=n&&(d=a[h])!==null&&d!==void 0?d:f;return delete a[h],h+"="+p}))!==null&&r!==void 0?r:[],c=function(u,d){var h,f;d===void 0&&(d="&");var p=[];return Ht(u,function(m,x){we(m)||we(x)||x==="undefined"||(h=encodeURIComponent((w=>w instanceof File)(m)?m.name:m.toString()),f=encodeURIComponent(x),p[p.length]=f+"="+h)}),p.join(d)}(a);return c&&l.push(c),s+"?"+l.join("&")},nc=(e,t)=>JSON.stringify(e,(n,r)=>typeof r=="bigint"?r.toString():r,t),UE=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===mi.GZipJS){var r=n8(function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var d=new Is(l.length+(l.length>>>1)),h=0,f=function(w){d[h++]=w},p=0;u>p;++p){if(h+5>d.length){var m=new Is(h+8+(u-p<<1));m.set(d),d=m}var x=l.charCodeAt(p);128>x?f(x):2048>x?(f(192|x>>>6),f(128|63&x)):x>55295&&57344>x?(f(240|(x=65536+(1047552&x)|1023&l.charCodeAt(++p))>>>18),f(128|x>>>12&63),f(128|x>>>6&63),f(128|63&x)):(f(224|x>>>12),f(128|x>>>6&63),f(128|63&x))}return yA(d,0,h)}(nc(t)),{mtime:0});return{contentType:bA,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===mi.Base64){var s=function(l){return l&&btoa(encodeURIComponent(l).replace(/%([0-9A-F]{2})/g,(c,u)=>String.fromCharCode(parseInt(u,16))))}(nc(t)),i=(l=>"data="+encodeURIComponent(typeof l=="string"?l:nc(l)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var a=nc(t);return{contentType:"application/json",body:a,estimatedSize:new Blob([a]).size}}},h0=e=>{var t,n,r,s=UE(e);return!s||(n=e.compression,r=Eh(e.url,"compression"),n!==bE.GZipJS&&r!==bE.GZipJS&&r!=="gzip")||((t=s.body)instanceof ArrayBuffer?cb(new
17Uint8Array(t)):ArrayBuffer.isView(t)&&cb(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)))?{url:e.url,encodedBody:s}:(zp=!0,{url:s8(e.url,"compression"),encodedBody:UE(pe({},e,{compression:void 0,tr:void 0}))})},i8=function(){var e=ss(function*(t){var n=nc(t.data),r=yield function(i,a,l){return ub.apply(this,arguments)}(n,Ar.DEBUG,{rethrow:!0});if(!r)return t;var s=yield r.arrayBuffer();return pe({},t,{tr:{contentType:bA,body:s,estimatedSize:s.byteLength}})});return function(t){return e.apply(this,arguments)}}(),$E=(e,t)=>$g(e,{_:new Date().getTime().toString(),ver:Ar.JS_SDK_VERSION,compression:t}),Hp=[];ob&&Hp.push({transport:"fetch",method(e){var t,{url:n,encodedBody:r}=h0(e),{contentType:s,body:i,estimatedSize:a}=r??{},l=new Headers;Ht(e.headers,function(d,h){l.append(h,d)}),s&&l.append("Content-Type",s);var c=null;if(gE){var u=new gE;c={signal:u.signal,timeout:setTimeout(()=>u.abort(),e.timeout)}}ob(n,pe({method:(e==null?void 0:e.method)||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(a||0),body:i,signal:(t=c)==null?void 0:t.signal},e.fetchOptions)).then(d=>d.text().then(h=>{var f={statusCode:d.status,text:h};if(d.status===200)try{f.json=JSON.parse(h)}catch(p){be.error(p)}e.callback==null||e.callback(f)})).catch(d=>{be.error(d),e.callback==null||e.callback({statusCode:0,error:d})}).finally(()=>c?clearTimeout(c.timeout):null)}}),lb&&Hp.push({transport:"XHR",method(e){var t=new lb,{url:n,encodedBody:r}=h0(e);t.open(e.method||"GET",n,!0);var{contentType:s,body:i}=r??{};Ht(e.headers,function(a,l){t.setRequestHeader(l,a)}),s&&t.setRequestHeader("Content-Type",s),e.timeout&&(t.timeout=e.timeout),e.disableXHRCredentials||(t.withCredentials=!0),t.onreadystatechange=()=>{if(t.readyState===4){var a={statusCode:t.status,text:t.responseText};if(t.status===200)try{a.json=JSON.parse(t.responseText)}catch{}e.callback==null||e.callback(a)}},t.send(i)}}),is!=null&&is.sendBeacon&&Hp.push({transport:"sendBeacon",method(e){try{var{url:t,encodedBody:n}=h0(e),r=$g(t,{beacon:"1"}),{contentType:s,body:i}=n??{};if(!i)return;var a=i instanceof Blob?i:new Blob([i],{type:s});is.sendBeacon(r,a)}catch{}}});var Ub=3e3;class a8{constructor(t,n){this.Ar=!0,this.Nr=[],this.$r=_i((n==null?void 0:n.flush_interval_ms)||Ub,250,5e3,be.createLogger("flush interval"),Ub),this.Dr=t}enqueue(t){this.Nr.push(t),this.qr||this.jr()}unload(){this.Hr();var t=this.Nr.length>0?this.Ur():{},n=Object.values(t);[...n.filter(r=>r.url.indexOf("/e")===0),...n.filter(r=>r.url.indexOf("/e")!==0)].map(r=>{this.Dr(pe({},r,{transport:"sendBeacon"}))})}enable(){this.Ar=!1,this.jr()}jr(){var t=this;this.Ar||(this.qr=setTimeout(()=>{if(this.Hr(),this.Nr.length>0){var n=this.Ur(),r=function(){var i=n[s],a=new Date().getTime();i.data&&ft(i.data)&&Ht(i.data,l=>{l.offset=Math.abs(l.timestamp-a),delete l.timestamp}),t.Dr(i)};for(var s in n)r()}},this.$r))}Hr(){clearTimeout(this.qr),this.qr=void 0}Ur(){var t={};return Ht(this.Nr,n=>{var r,s=n,i=(s?s.batchKey:null)||s.url;we(t[i])&&(t[i]=pe({},s,{data:[]})),(r=t[i].data)==null||r.push(s.data)}),this.Nr=[],t}}var o8=["retriesPerformedSoFar"];class l8{constructor(t){this.Br=!1,this.zr=3e3,this.Nr=[],this._instance=t,this.Nr=[],this.Vr=!0,!we(X)&&"onLine"in X.navigator&&(this.Vr=X.navigator.onLine,this.Wr=()=>{this.Vr=!0,this.Zr()},this.Gr=()=>{this.Vr=!1},On(X,"online",this.Wr),On(X,"offline",this.Gr))}get length(){return this.Nr.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=v3(t,o8);Gl(n)&&(r.url=$g(r.url,{retry_count:n})),this._instance._send_request(pe({},r,{callback:s=>{s.statusCode===200||s.statusCode>=400&&500>s.statusCode||(n??0)>=10?r.callback==null||r.callback(s):this.Qr(pe({retriesPerformedSoFar:n},r))}}))}Qr(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=function(a){var l=3e3*Math.pow(2,a),c=l/2,u=Math.min(18e5,l),d=Math.random()-.5;return Math.ceil(u+d*(u-c))}(n),s=Date.now()+r;this.Nr.push({retryAt:s,requestOptions:t});var i="Enqueued failed request for retry in "+r;navigator.onLine||(i+=" (Browser is offline)"),be.warn(i),this.Br||(this.Br=!0,this.Jr())}Jr(){if(this.Kr&&clearTimeout(this.Kr),this.Nr.length===0)return this.Br=!1,void(this.Kr=void 0);this.Kr=setTimeout(()=>{this.Vr&&this.Nr.length>0&&this.Zr(),this.Jr()},this.zr)}Zr(){var t=Date.now(),n=[],r=this.Nr.filter(i=>t>i.retryAt||(n.push(i),!1));if(this.Nr=n,r.length>0)for(var{requestOptions:s}of r)this.retriableRequest(s)}unload(){for(var{requestOptions:t}of(this.Kr&&(clearTimeout(this.Kr),this.Kr=void 0),this.Br=!1,we(X)||(this.Wr&&(X.removeEventListener("online",this.Wr),this.Wr=void 0),this.Gr&&(X.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Nr))try{this._instance._send_request(pe({},t,{transport:"sendBeacon"}))}catch(n){be.error(n)}this.Nr=[]}}class c8{constructor(t){this.Yr=()=>{var n,r,s,i;this.Xr||(this.Xr={});var a=this.scrollElement(),l=this.scrollY(),c=a?Math.max(0,a.scrollHeight-a.clientHeight):0,u=l+((a==null?void 0:a.clientHeight)||0),d=(a==null?void 0:a.scrollHeight)||0;this.Xr.lastScrollY=Math.ceil(l),this.Xr.maxScrollY=Math.max(l,(n=this.Xr.maxScrollY)!==null&&n!==void 0?n:0),this.Xr.maxScrollHeight=Math.max(c,(r=this.Xr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Xr.lastContentY=u,this.Xr.maxContentY=Math.max(u,(s=this.Xr.maxContentY)!==null&&s!==void 0?s:0),this.Xr.maxContentHeight=Math.max(d,(i=this.Xr.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Xr}resetContext(){var t=this.Xr;return setTimeout(this.Yr,0),t}startMeasuringScrollPosition(){On(X,"scroll",this.Yr,{capture:!0}),On(X,"scrollend",this.Yr,{capture:!0}),On(X,"resize",this.Yr)}scrollElement(){if(!this.ei)return X==null?void 0:X.document.documentElement;var t=ft(this.ei)?this.ei:[this.ei];for(var n of t){var r=X==null?void 0:X.document.querySelector(n);if(r)return r}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return X&&(X.scrollY||X.pageYOffset||X.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return X&&(X.scrollX||X.pageXOffset||X.document.documentElement.scrollLeft)||0}}var u8=e=>uA(e==null?void 0:e.config.mask_personal_data_properties,e==null?void 0:e.config.custom_personal_data_properties);class zE{constructor(t,n,r,s){this.ti=i=>{var a=this.ri();if(!a||a.sessionId!==i){var l={sessionId:i,props:this.ii(this._instance)};this.ni.register({[Ib]:l})}},this._instance=t,this.si=n,this.ni=r,this.ii=s||u8,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Ib]}getSetOnceProps(){var t,n=(t=this.ri())==null?void 0:t.props;return n?"r"in n?dA(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return Ht(__(this.getSetOnceProps()),(n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+db(r)]=n}),t}}
vendor: 4,118 bytes, line 17
17class N_{constructor(){this.oi={}}on(t,n){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(n),()=>{this.oi[t]=this.oi[t].filter(r=>r!==n)}}emit(t,n){for(var r of this.oi[t]||[])r(n);for(var s of this.oi["*"]||[])s(t,n)}}var f0=nn("[SessionId]");class HE{on(t,n){return this.ai.on(t,n)}constructor(t,n,r){var s;if(this.ui=[],this.li=void 0,this.ai=new N_,this.hi=(u,d)=>!(!Gl(u)||!Gl(d))&&Math.abs(u-d)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===Yi)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.qt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=n||Ma,this.fi=r||Ma;var i=this.qt.persistence_name||this.qt.token;if(this._sessionTimeoutMs=1e3*_i(this.qt.session_idle_timeout_seconds||1800,60,36e3,f0.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+i+"_window_id",this.mi="ph_"+i+"_primary_window_exists",this.yi()){var a=ar.F(this.gi),l=ar.F(this.mi);a&&!l?this.ci=a:ar.q(this.gi),ar.N(this.mi,!0)}if((s=this.qt.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var d=this.qt.bootstrap.sessionID.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})();this.bi(this.qt.bootstrap.sessionID,new Date().getTime(),c)}catch(u){f0.error("Invalid sessionID in bootstrap",u)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return we(this.ui)&&(this.ui=[]),this.ui.push(t),this.di&&t(this.di,this.ci),()=>{this.ui=this.ui.filter(n=>n!==t)}}yi(){return this.qt.persistence!=="memory"&&!this.ni._r&&ar.R()}xi(t){t!==this.ci&&(this.ci=t,this.yi()&&ar.N(this.gi,t))}Si(){return this.ci?this.ci:this.yi()?ar.F(this.gi):null}bi(t,n,r){t===this.di&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.di=t,this.ni.register({[Nm]:[n,t,r]}))}ki(){var t=this.ni.props[Nm];return ft(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.Ci),this.Ci=void 0,this.li&&X&&(X.removeEventListener(jm,this.li,{capture:!1}),this.li=void 0),this.ui=[]}wi(){this.li=()=>{this.yi()&&ar.q(this.mi)},On(X,jm,this.li,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.qt.cookieless_mode===Yi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[s,i,a]=this.ki(),l=this.Si(),c=Gl(a)&&Math.abs(r-a)>864e5,u=!1,d=!i,h=!d&&!t&&this.hi(r,s);d||h||c?(i=this.vi(),l=this.fi(),f0.info("new session ID generated",{sessionId:i,windowId:l,changeReason:{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}}),a=r,u=!0):l||(l=this.fi(),u=!0);var f=Gl(s)&&t&&!c?s:r,p=Gl(a)?a:new Date().getTime();return this.xi(l),this.bi(i,f,p),t||this.pi(),u&&this.ui.forEach(m=>m(i,l,u?{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}:void 0)),{sessionId:i,windowId:l,sessionStartTimestamp:p,changeReason:u?{noSessionId:d,activityTimeout:h,sessionPastMaximumLength:c}:void 0,lastActivityTimestamp:s}}pi(){clearTimeout(this.Ci),this.Ci=setTimeout(()=>{var[t]=this.ki();if(this.hi(new Date().getTime(),t)){var n=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:n})}},1.1*this.sessionTimeoutMs)}}var vA=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&_E(n,t))return!0;try{var r=e==null?void 0:e.userAgentData;if(r!=null&&r.brands&&r.brands.some(s=>_E(s==null?void 0:s.brand,t)))return!0}catch{}return!!e.webdriver},Mm=function(e,t){if(!function(n){try{new RegExp(n)}catch{return!1}return!0}(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function WE(e,t,n){return nc({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var _A={exact:(e,t)=>t.some(n=>e.some(r=>n===r)),is_not:(e,t)=>
17t.every(n=>e.every(r=>n!==r)),regex:(e,t)=>t.some(n=>e.some(r=>Mm(n,r))),not_regex:(e,t)=>t.every(n=>e.every(r=>!Mm(n,r))),icontains:(e,t)=>t.map(rp).some(n=>e.map(rp).some(r=>n.includes(r))),not_icontains:(e,t)=>t.map(rp).every(n=>e.map(rp).every(r=>!n.includes(r))),gt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r>parseFloat(s))}),lt:(e,t)=>t.some(n=>{var r=parseFloat(n);return!isNaN(r)&&e.some(s=>r<parseFloat(s))})},rp=e=>e.toLowerCase();function wA(e,t){return!e||Object.entries(e).every(n=>{var[r,s]=n,i=t==null?void 0:t[r];if(we(i)||fa(i))return!1;var a=[String(i)],l=_A[s.operator];return!!l&&l(s.values,a)})}var $b="custom",VE="i.posthog.com",d8=/^\/static\//;class h8{constructor(t){this.Ii={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+VE,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.Ii[this.apiHost]||(this.Ii[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":$b),this.Ii[this.apiHost]}Ti(t){var n=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof n=="string"&&d8.test(t))return n.trim().replace(/\/$/,"")||void 0}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var r=this.Ti(n);if(r)return""+r+n}if(this.region===$b)return this.apiHost+n;var s=VE+n;switch(t){case"assets":return"https://"+this.region+"-assets."+s;case"api":return"https://"+this.region+"."+s}}}var Ct=nn("[Surveys]"),zb="seenSurvey_",f8=[l0.Popover,l0.Widget,l0.API],p8={ignoreConditions:!1,ignoreDelay:!1,displayType:Rb.Popover},m8=nn("[PostHog ExternalIntegrations]"),g8={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class x8{constructor(t){this._instance=t}lr(t,n){var r;(r=Me.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,s=>{if(s)return m8.error("failed to load script",s);n()})}startIfEnabledOrStop(){var t=this,n=function(a){var l,c,u;!s||(l=Me.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[a]||t.lr(g8[a],()=>{var d;(d=Me.__PosthogExtensions__)==null||(d=d.integrations)==null||(d=d[a])==null||d.start(t._instance)}),!s&&(c=Me.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[a]&&((u=Me.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[a])==null||u.stop())};for(var[r,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;n(r)}}}var Fl,Yd={},p0=0,Hb=()=>{},qE='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',Ju="Surveys module not available",YE="sanitize_properties is deprecated. Use before_send instead",EA="Invalid value for property_denylist config: ",Xl="posthog",NA=!r8&&(Wr==null?void 0:Wr.indexOf("MSIE"))===-1&&(Wr==null?void 0:Wr.indexOf("Mozilla"))===-1,GE=e=>{var t;return pe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:DL(ve==null?void 0:ve.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Hb,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:ir&&un(ir==null?void 0:ir.search)&&ir.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(X==null||(t=X.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){be.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Mb,before_send:void 0,request_queue_config:{flush_interval_ms:Ub},error_tracking:{},_onCapture:Hb,__preview_eager_load_replay:!1},(n=>({rageclick:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},y8=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],KE=e=>{var t={};for(var[n,r]of y8)we(e[n])||(t[r]=e[n]);var s=bn({},t,e);return ft(e.property_blacklist)&&(we(e.property_denylist)?s.property_denylist=e.property_blacklist:ft(e.property_denylist)?s.property_denylist=[...e.property_blacklist,...e.property_denylist]:be.error(EA+e.property_denylist)),s};class b8{constructor(){this.__forceAllowLocalhost=!1}get Ei(){return this.__forceAllowLocalhost}set Ei(t){be.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class ks{Mi(t,n){if(t){var r=this.Pi.indexOf(t);r!==-1&&this.Pi.splice(r,1)}return this.Pi.push(n),n.initialize==null||n.initialize(),n}Ri(){return this.config.cookieless_mode===Yi||this.config.cookieless_mode===Ro&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new b8,this.Oi=!1,this.version=Ar.LIB_VERSION,this.Li=new N_,this.Pi=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=GE(),this.SentryIntegration=HL,this.sentryIntegration=r=>function(s,i){var a=iA(s,i);return{name:sA,processEvent:l=>a(l)}}(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Fi=!1,this.Ai=null,this.Ni=null,this.$i=null,this.scrollManager=new c8(this),this.pageViewM
17anager=new PE(this),this.rateLimiter=new XL(this),this.requestRouter=new h8(this),this.consent=new UL(this),this.externalIntegrations=new x8(this);var n=(t=ks.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,s,i)=>{var a=un(r)?{[r]:s}:r;this.setPersonProperties(a),i==null||i({})},set_once:(r,s,i)=>{var a=un(r)?{[r]:s}:r;this.setPersonProperties(void 0,a),i==null||i({})}},this.on("eventCaptured",r=>be.info('send "'+(r==null?void 0:r.event)+'"',r))}init(t,n,r){if(r&&r!==Xl){var s,i=(s=Yd[r])!==null&&s!==void 0?s:new ks;return i._init(t,n,r),Yd[r]=i,Yd[Xl][r]=i,i}return this._init(t,n,r)}_init(t,n,r){var s,i;if(n===void 0&&(n={}),we(t)||Fp(t))return be.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Di(n.debug),this.qi=n,this.ji=[],n.person_profiles?this.Ni=n.person_profiles:n.process_person&&(this.Ni=n.process_person),this.set_config(bn({},GE(n.defaults),KE(n),{name:r,token:t})),this.config.on_xhr_error&&be.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:mi.GZipJS;var a=this.Hi();this.persistence=new o0(this.config,a),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new o0(pe({},this.config,{persistence:"sessionStorage"}),a);var l=pe({},this.persistence.props),c=pe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Ui=new a8(w=>this.Bi(w),this.config.request_queue_config),this.zi=new l8(this),this.__request_queue=[];var u=this.Ri();if(u||(this.sessionManager=new HE(this),this.sessionPropsManager=new zE(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(be.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Vi(u)},0)):(be.info("Initializing extensions synchronously"),this.Vi(u)),Ar.DEBUG=Ar.DEBUG||this.config.debug,Ar.DEBUG&&be.info("Starting in debug mode",{this:this,config:n,thisC:pe({},this.config),p:l,s:c}),!this.config.identity_distinct_id||(s=n.bootstrap)!=null&&s.distinctID||(n.bootstrap=pe({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=n.bootstrap)==null?void 0:i.distinctID)!==void 0){var d=n.bootstrap.distinctID,h=this.get_distinct_id(),f=this.persistence.get_property(Hs);if(n.bootstrap.isIdentifiedID&&h!=null&&h!==d&&f===Ml)this.identify(d);else if(n.bootstrap.isIdentifiedID&&h!=null&&h!==d&&f===Rl)be.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var p=this.config.get_device_id(Ma()),m=n.bootstrap.isIdentifiedID?p:d;this.persistence.set_property(Hs,n.bootstrap.isIdentifiedID?Rl:Ml),this.register({distinct_id:d,$device_id:m})}}if(u)this.register_once({distinct_id:Jf,$device_id:null},"");else if(!this.get_distinct_id()){var x=this.config.get_device_id(Ma());this.register_once({distinct_id:x,$device_id:x},""),this.persistence.set_property(Hs,Ml)}return On(X,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?function(w,g){var b=w.config.segment;if(!b)return g();(function(_,k){var T=_.config.segment;if(!T)return k();var N=S=>{var I=()=>S.anonymousId()||Ma();_.config.get_device_id=I,S.id()&&(_.register({distinct_id:S.id(),$device_id:I()}),_.persistence.set_property(Hs,Rl)),k()},C=T.user();"then"in C&&$i(C.then)?C.then(N):N(C)})(w,()=>{b.register((_=>{Promise&&Promise.resolve||a0.warn("This browser does not have Promise support, and can not use the segment integration");var k=(T,N)=>{if(!N)return T;T.event.userId||T.event.anonymousId===_.get_distinct_id()||(a0.info("No userId set, resetting PostHog"),_.reset()),T.event.userId&&T.event.userId!==_.get_distinct_id()&&(a0.info("UserId set, identifying with PostHog"),_.identify(T.event.userId)
17);var C=_.calculateEventProperties(N,T.event.properties);return T.event.properties=Object.assign({},C,T.event.properties),T};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:T=>k(T,T.event.event),page:T=>k(T,Ql),identify:T=>k(T,s0),screen:T=>k(T,"$screen")}})(w)).then(()=>{g()})})}(this,()=>this.Wi()):this.Wi(),$i(this.config._onCapture)&&this.config._onCapture!==Hb&&(be.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",w=>this.config._onCapture(w.event,w))),this.config.ip&&be.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Vi(t){var n,r,s,i,a,l,c,u=performance.now(),d=pe({},ks.__defaultExtensionClasses,this.config.__extensionClasses),h=[];d.featureFlags&&this.Pi.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new d.featureFlags(this)),d.exceptions&&this.Pi.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new d.exceptions(this)),d.historyAutocapture&&this.Pi.push(this.historyAutocapture=new d.historyAutocapture(this)),d.tracingHeaders&&this.Pi.push(new d.tracingHeaders(this)),d.siteApps&&this.Pi.push(this.siteApps=new d.siteApps(this)),d.sessionRecording&&!t&&this.Pi.push(this.sessionRecording=new d.sessionRecording(this)),this.config.disable_scroll_properties||h.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),d.autocapture&&this.Pi.push(this.autocapture=new d.autocapture(this)),d.surveys&&this.Pi.push(this.surveys=(s=this.surveys)!==null&&s!==void 0?s:new d.surveys(this)),d.logs&&this.Pi.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new d.logs(this)),d.conversations&&this.Pi.push(this.conversations=(a=this.conversations)!==null&&a!==void 0?a:new d.conversations(this)),d.productTours&&this.Pi.push(this.productTours=new d.productTours(this)),d.heatmaps&&this.Pi.push(this.heatmaps=new d.heatmaps(this)),d.webVitalsAutocapture&&this.Pi.push(this.webVitalsAutocapture=new d.webVitalsAutocapture(this)),d.exceptionObserver&&this.Pi.push(this.exceptionObserver=new d.exceptionObserver(this)),d.deadClicksAutocapture&&this.Pi.push(this.deadClicksAutocapture=new d.deadClicksAutocapture(this,zL)),d.toolbar&&this.Pi.push(this.toolbar=(l=this.toolbar)!==null&&l!==void 0?l:new d.toolbar(this)),d.experiments&&this.Pi.push(this.experiments=(c=this.experiments)!==null&&c!==void 0?c:new d.experiments(this)),this.Pi.forEach(f=>{f.initialize&&h.push(()=>{f.initialize==null||f.initialize()})}),h.push(()=>{if(this.Zi){var f=this.Zi;this.Zi=void 0,this.Rr(f)}}),this.Gi(h,u)}Gi(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout(()=>{this.Gi(t,n)},0);var r=t.shift();if(r)try{r()}catch(i){be.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-n);this.register_for_session({[Z3]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[eA]:s}),this.config.__preview_deferred_init_extensions&&be.info("PostHog extensions initialized ("+s+"ms)")}Rr(t){var n;if(!ve||!ve.body)return be.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.Rr(t)},500);this.config.__preview_deferred_init_extensions&&(this.Zi=t),this.Qi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=et(t.supportedCompression,mi.GZipJS)?mi.GZipJS:et(t.supportedCompression,mi.Base64)?mi.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Ni?this.Ni:Mb}),this.Pi.forEach(r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(t))}Wi(){try{this.config.loaded(this)}catch(r){be.critical("`loaded` function failed",r)}if(this.Ji(),this.config.internal_or_test_user_hostname&&ir!=null&&ir.hostname){var t=ir.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.Ri())&&this.Ki()},1),this.Yi=new fA(this),this.Yi.load()}Ji(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Ui)==null||t.enable())}_dom_loaded(){this.is_capturing()&&Zf(this.__request_queue,t=>this.Bi(t)),this.__request_queue=[],this.Ji()}_handle_unload(){var t,n,r,s;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Xi()&&this.capture(r0),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Ui)==null||r.unload(),(s=this.zi)==null||s.unload()):this.Xi()&&this.capture(r0,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(NA?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=$g(t.url,{ip:this.config.ip?1:0}),t.headers=pe({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,
17(n=>{var r,s,i,a=pe({},n);a.timeout=a.timeout||6e4,a.url=$E(a.url,a.compression);var l=(r=a.transport)!==null&&r!==void 0?r:"fetch",c=Hp.filter(d=>!a.disableTransport||!d.transport||!a.disableTransport.includes(d.transport)),u=(s=(i=function(d,h){for(var f=0;d.length>f;f++)if(d[f].transport===l)return d[f]}(c))==null?void 0:i.method)!==null&&s!==void 0?s:c[0].method;if(!u)throw new Error("No available transport method");l!=="sendBeacon"&&a.data&&a.compression===mi.GZipJS&&zR&&!zp?i8(a).then(d=>{u(d)}).catch(d=>{if(vE(d))return zp=!0,void u(pe({},a,{compression:void 0,url:$E(n.url,void 0)}));(h=>{if(!h||typeof h!="object")return!1;var f="name"in h?String(h.name):"";return vE(h)||f===_3})(d)&&(zp=!0),u(a)}):u(a)})(pe({},t,{callback:n=>{var r,s;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(s=this.config).on_request_error)==null||r.call(s,n),t.callback==null||t.callback(n)}}))))}Bi(t){this.zi?this.zi.retriableRequest(t):this._send_request(t)}_execute_array(t){p0++;try{var n,r=[],s=[],i=[];Zf(t,l=>{if(l)if(ft(n=l[0]))i.push(l);else if($i(l))try{l.call(this)}catch(c){be.error("Error executing queued PostHog call",l,c)}else ft(l)&&n==="alias"?r.push(l):ft(l)&&n.indexOf("capture")!==-1&&$i(this[n])?i.push(l):s.push(l)});var a=function(l,c){Zf(l,function(u){try{if(ft(u[0])){var d=c;Ht(u,function(h){d=d[h[0]].apply(d,h.slice(1))})}else c[u[0]].apply(c,u.slice(1))}catch(h){be.error("Error executing queued PostHog call",u,h)}})};a(r,this),a(s,this),a(i,this)}finally{p0--}}push(t){if(p0>0&&ft(t)&&un(t[0])){var n=ks.prototype[t[0]];$i(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var s,i,a,l,c;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Ui){if(this.is_capturing())if(!we(t)&&un(t)){var u=!this.config.opt_out_useragent_filter&&this._is_bot();if(!u||this.config.__preview_capture_bot_pageviews){var d=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(d==null||!d.isRateLimited){n!=null&&n.$current_url&&!un(n==null?void 0:n.$current_url)&&(be.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.en||be.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var h=new Date,f=(r==null?void 0:r.timestamp)||h,p=(r==null?void 0:r.uuid)||Ma(),m={uuid:p,event:t,properties:this.calculateEventProperties(t,n||{},f,p)};t===Ql&&this.config.__preview_capture_bot_pageviews&&u&&(m.event="$bot_pageview",m.properties.$browser_type="bot"),d&&(m.properties.$lib_rate_limit_remaining_tokens=d.remainingTokens),r!=null&&r.$set&&(m.$set=r==null?void 0:r.$set);var x,w,g,b=this.tn(r==null?void 0:r.$set_once,t!==CE,t===s0);if(b&&(m.$set_once=b),r!=null&&r._noTruncate||(i=this.config.properties_string_max_length,a=m,l=I=>un(I)?I.slice(0,i):I,c=new Set,m=function I(E,j){return E!==Object(E)?l?l(E):E:c.has(E)?void 0:(c.add(E),ft(E)?(P=[],Zf(E,L=>{P.push(I(L))})):(P={},Ht(E,(L,z)=>{c.has(L)||(P[z]=I(L))})),P);var P}(a)),m.timestamp=f,we(r==null?void 0:r.timestamp)||(m.properties.$event_time_override_provided=!0,m.properties.$event_time_override_system_time=h),t===Ad.DISMISSED||t===Ad.SENT){var _=n==null?void 0:n[c0.SURVEY_ID],k=n==null?void 0:n[c0.SURVEY_ITERATION];(I=>{try{var E=(j=>((P,L)=>{var z=""+zb+L.id;return L.current_iteration&&L.current_iteration>0&&(z=""+zb+L.id+"_"+L.current_iteration),z})(0,j))(I);if(localStorage.getItem(E))return;localStorage.setItem(E,"true")}catch(j){Ct.error("Failed to persist survey seen state",j)}})({id:_,current_iteration:k}),m.$set=pe({},m.$set,{[(x={id:_,current_iteration:k},w=t===Ad.SENT?"responded":"dismissed",g="$survey_"+w+"/"+x.id,x.current_iteration&&x.current_iteration>0&&(g="$survey_"+w+"/"+x.id+"/"+x.current_iteration),g)]:!0})}else t===Ad.SHOWN&&(m.$set=pe({},m.$set,{[c0.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===QL.SHOWN){var T=n==null?void 0:n[OE.TOUR_TYPE];T&&(m.$set=pe({},m.$set,{[OE.TOUR_LAST_SEEN_DATE+"/"+T]:new Date().toISOString()}))}var N=pe({},m.properties.$set,m.$set);if(ec(N)||this.setPersonPropertiesForFlags(N),!st(this.config.before_send)){var C=this.rn(m);if(!C)return;m=C}this.Li.emit("eventCaptured",m);var S={method:"POST",url:(s=r==null?void 0:r._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:m,compression:"best-available",batchKey:r==null?void 0:r._batchKey,transport:r==null?void 0:r.transport};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Bi(S):this.Ui.enqueue(S),m}be.critical("This capture call is ignored due to client rate limiting.")}}else be.error("No event name provided to posthog.capture")}else be.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",n=>t(n.event,n))}calculateEventProperties(t,n,r,s,i){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var a=i?void 0:this.persistence.remove_event_timer(t),l=pe({},n);if(l.token=this.config.token,l.$config_defaults=this.config.defaults,this.Ri()&&(l.$cookieless_mode=!0),t==="$snapshot"){var c=pe({},this.persistence.properties(),this.sessionPersistence.properties());return l.distinct_id=c.distinct_id,(!un(l.distinct_id)&&!Ds(l.distinct_id)||Fp(l.distinct_id))&&be.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),l}var u,d=function(g,b){var _,k,T,N;if(!Wr)return{};var C,S,I,E,j,P,L,z,R=g?[...Kc,...b||[]]:[],[B,O]=function(U){for(var H=0;NE.length>H;H++){var[A,q]=NE[H],V=A.exec(U),D=V&&($i(q)?q(V,U):q);
17if(D)return D}return["",""]}(Wr);return bn(__({$os:B,$os_version:O,$browser:$3(Wr,navigator.vendor),$device:kE(Wr),$device_type:(S=Wr,I={userAgentDataPlatform:(_=navigator)==null||(_=_.userAgentData)==null?void 0:_.platform,maxTouchPoints:(k=navigator)==null?void 0:k.maxTouchPoints,screenWidth:X==null||(T=X.screen)==null?void 0:T.width,screenHeight:X==null||(N=X.screen)==null?void 0:N.height,devicePixelRatio:X==null?void 0:X.devicePixelRatio},z=kE(S),z===T3||z===k3||z==="Kobo"||z==="Kindle Fire"||z===B3?qc:z===_h||z===Ec||z===wh||z===fb?"Console":z===C3?"Wearable":z?os:(I==null?void 0:I.userAgentDataPlatform)==="Android"&&((E=I==null?void 0:I.maxTouchPoints)!==null&&E!==void 0?E:0)>0?600>Math.min((j=I==null?void 0:I.screenWidth)!==null&&j!==void 0?j:0,(P=I==null?void 0:I.screenHeight)!==null&&P!==void 0?P:0)/((L=I==null?void 0:I.devicePixelRatio)!==null&&L!==void 0?L:1)?os:qc:"Desktop"),$timezone:hA(),$timezone_offset:GL()}),{$current_url:Nh(ir==null?void 0:ir.href,R,kh),$host:ir==null?void 0:ir.host,$pathname:ir==null?void 0:ir.pathname,$raw_user_agent:Wr.length>1e3?Wr.substring(0,997)+"...":Wr,$browser_version:iL(Wr,navigator.vendor),$browser_language:DE(),$browser_language_prefix:(C=DE(),typeof C=="string"?C.split("-")[0]:void 0),$screen_height:X==null?void 0:X.screen.height,$screen_width:X==null?void 0:X.screen.width,$viewport_height:X==null?void 0:X.innerHeight,$viewport_width:X==null?void 0:X.innerWidth,$lib:Ar.LIB_NAME,$lib_version:Ar.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(i,r.getTime());l.$session_id=h,l.$window_id=f}this.sessionPropsManager&&bn(l,this.sessionPropsManager.getSessionProps());try{var p;this.sessionRecording&&bn(l,this.sessionRecording.sdkDebugProperties),l.$sdk_debug_retry_queue_size=(p=this.zi)==null?void 0:p.length}catch(g){l.$sdk_debug_error_capturing_properties=String(g)}if(this.requestRouter.region===$b&&(l.$lib_custom_api_host=this.config.api_host),u=t!==Ql||i?t!==r0||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,s),l=bn(l,u),t===Ql&&ve&&(l.title=ve.title),!we(a)){var m=r.getTime()-a;l.$duration=parseFloat((m/1e3).toFixed(3))}Wr&&this.config.opt_out_useragent_filter&&(l.$browser_type=this._is_bot()?"bot":"browser"),(l=bn({},d,this.persistence.properties(),this.sessionPersistence.properties(),l)).$is_identified=this._isIdentified(),ft(this.config.property_denylist)?Ht(this.config.property_denylist,function(g){delete l[g]}):be.error(EA+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var x=this.config.sanitize_properties;x&&(be.error(YE),l=x(l,t));var w=this.nn();return l.$process_person_profile=w,w&&!i&&this.sn("_calculate_event_properties"),l}tn(t,n,r){var s;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.nn()||this.Oi&&!r)return t;var i=this.persistence.get_initial_props(),a=(s=this.sessionPropsManager)==null?void 0:s.getSetOnceProps(),l=bn({},i,a||{},t||{}),c=this.config.sanitize_properties;return c&&(be.error(YE),l=c(l,"$set_once")),n&&(this.Oi=!0),ec(l)?void 0:l}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var s;(s=this.persistence)==null||s.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}an(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,r){var s;(s=this.featureFlags)==null||s.updateFlags(t,n,r)}updateEarlyAccessFeatureEnrollment(t,n,r){var s;(s=this.featureFlags)==null||s.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){var s;return n===void 0&&(n=!1),(s=this.featureFlags)==null?void 0:s.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Li.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:Ju}),()=>{})}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:Ju})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:Ju})}renderSurvey(t,n){var r;(r=this.surveys)==null||r.renderSurvey(t,n)}displaySurvey(t,n){var r;n===void 0&&(n=p8),(r=this.surveys)==null||r.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:Ju}}canRenderSurveyAsync(t,n){var r,s;return n===void 0&&(n=!1),(r=(s=this.surveys)==null?void 0:s.canRenderSurveyAsync(t,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:Ju})}un(t){return!t||Fp(t)?(be.critical("Unique user id has not been set in posthog.identify"),!1):t===Jf?(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||(be.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
17ot a hardcoded string.'),!1)}identify(t,n,r){if(!this.__loaded||!this.persistence)return be.uninitializedWarning("posthog.identify");if(Ds(t)&&(t=t.toString(),be.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.un(t)&&this.sn("posthog.identify")){var s=this.get_distinct_id();this.register({$user_id:t}),this.get_property(Em)||this.register_once({$had_persisted_distinct_id:!0,$device_id:s},""),t!==s&&t!==this.get_property(Td)&&(this.unregister(Td),this.register({distinct_id:t}));var i,a=(this.persistence.get_property(Hs)||Ml)===Ml;t!==s&&a?(this.persistence.set_property(Hs,Rl),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(s0,{distinct_id:t,$anon_distinct_id:s},{$set:n||{},$set_once:r||{}}),this.$i=WE(t,n,r),(i=this.featureFlags)==null||i.setAnonymousDistinctId(s)):(n||r)&&this.setPersonProperties(n,r),t!==s&&(this.reloadFeatureFlags(),this.unregister(Vd))}}setPersonProperties(t,n){if((t||n)&&this.sn("posthog.setPersonProperties")){var r=WE(this.get_distinct_id(),t,n);this.$i!==r?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.$i=r):be.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var s=this.getGroups(),i=s[t]!==n;if(i&&this.resetGroupPropertiesForFlags(t),this.register({$groups:pe({},s,{[t]:n})}),i||r){var a={$group_type:t,$group_key:n};r&&(a.$group_set=r),this.capture(CE,a)}r&&this.setGroupPropertiesForFlags({[t]:r}),i&&!r&&this.reloadFeatureFlags()}else be.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,r,s,i,a,l,c,u;if(be.info("reset"),!this.__loaded)return be.uninitializedWarning("posthog.reset");var d,h=this.get_property(Em),f=this.get_property(qo);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),we(f)||(d=this.persistence)==null||d.register({[qo]:f}),(s=this.surveys)==null||s.reset(),(i=this.Yi)==null||i.stop(),(a=this.featureFlags)==null||a.reset(),(l=this.conversations)==null||l.reset(),(c=this.persistence)==null||c.set_property(Hs,Ml),(u=this.sessionManager)==null||u.resetSessionId(),this.$i=null,this.config.cookieless_mode===Yi)this.register_once({distinct_id:Jf,$device_id:null},"");else{var p=this.config.get_device_id(Ma());this.register_once({distinct_id:p,$device_id:t?p:h},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var r;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(r=this.conversations)==null||r.ln()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var i,a=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!r)return s;
17s+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-a,0)}return s}alias(t,n){return t===this.get_property(Y3)?(be.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(we(n)&&(n=this.get_distinct_id()),t!==n?(this.an(Td,t),this.capture("$create_alias",{alias:t,distinct_id:n})):(be.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=pe({},this.config);if(kn(t)){var r,s,i,a,l,c,u,d,h,f;bn(this.config,KE(t));var p=this.Hi();(r=this.persistence)==null||r.update_config(this.config,n,p),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new o0(pe({},this.config,{persistence:"sessionStorage"}),p);var m=this.Di(this.config.debug);vi(m)&&(this.config.debug=m),vi(this.config.debug)&&(this.config.debug?(Ar.DEBUG=!0,ln.R()&&ln.N("ph_debug",!0),be.info("set_config",{config:t,oldConfig:n,newConfig:pe({},this.config)})):(Ar.DEBUG=!1,ln.R()&&ln.q("ph_debug"))),(s=this.exceptionObserver)==null||s.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(l=this.autocapture)==null||l.startIfEnabled(),(c=this.heatmaps)==null||c.startIfEnabled(),(u=this.exceptionObserver)==null||u.startIfEnabledOrStop(),(d=this.deadClicksAutocapture)==null||d.startIfEnabledOrStop(),(h=this.surveys)==null||h.loadIfEnabled(),this.cn(),(f=this.externalIntegrations)==null||f.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){Ar.LIB_NAME=t,Ar.LIB_VERSION=n}startSessionRecording(t){var n,r,s,i,a,l=t===!0,c={sampling:l||!(t==null||!t.sampling),linked_flag:l||!(t==null||!t.linked_flag),url_trigger:l||!(t==null||!t.url_trigger),event_trigger:l||!(t==null||!t.event_trigger)};Object.values(c).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),c.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),c.linked_flag&&((s=this.sessionRecording)==null||s.overrideLinkedFlag()),c.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),c.event_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(pe({},s,n))}}addExceptionStep(t,n){var r;(r=this.exceptions)==null||r.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:ks.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:Xl;return n!==Xl&&(n=Xl+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(Hs))===Rl||((n=this.sessionPersistence)==null?void 0:n.get_property(Hs))===Rl}nn(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===Mb&&!this._isIdentified()&&ec(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[Td])&&((n=this.persistence)==null||(n=n.props)==null||!n[Sm]))}Xi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?(be.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(Sm,!0),!0)}Hi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Ro)}cn(){var t,n,r,s,i=this.Hi();return((t=this.persistence)==null?void 0:t._r)!==i&&((r=this.persistence)==null||r.set_disabled(i)),((n=this.sessionPersistence)==null?void 0:n._r)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==Yi){if(this.Ri()){var r,s,i,a,l;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(s=this.pageViewM
17anager)==null||s.destroy(),this.sessionManager=new HE(this),this.pageViewManager=new PE(this),this.persistence&&(this.sessionPropsManager=new zE(this,this.sessionManager,this.persistence));var c,u=(i=(a=this.config.__extensionClasses)==null?void 0:a.sessionRecording)!==null&&i!==void 0?i:(l=ks.__defaultExtensionClasses)==null?void 0:l.sessionRecording;u&&(this.sessionRecording=this.Mi(this.sessionRecording,new u(this)),this.Qi&&((c=this.sessionRecording)==null||c.onRemoteConfig==null||c.onRemoteConfig(this.Qi)))}var d,h;this.consent.optInOut(!0),this.cn(),this.Ji(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Ro&&((d=this.surveys)==null||d.loadIfEnabled()),(we(t==null?void 0:t.captureEventName)||t!=null&&t.captureEventName)&&this.capture((h=t==null?void 0:t.captureEventName)!==null&&h!==void 0?h:"$opt_in",t==null?void 0:t.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ki()}else be.warn(qE)}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!==Yi?(this.config.cookieless_mode===Ro&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===Ro&&(this.register({distinct_id:Jf,$device_id:null}),(t=this.sessionRecording)==null||t.stopRecording(),this.sessionRecording=void 0,(n=this.sessionManager)==null||n.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,this.Ki())):be.warn(qE)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===Yi||(this.config.cookieless_mode===Ro?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return is?vA(is,this.config.custom_blocked_useragents):void 0}Ki(){ve&&(ve.visibilityState==="visible"?this.Fi||(this.Fi=!0,this.capture(Ql,{title:ve.title},{send_instantly:!0}),this.Ai&&(ve.removeEventListener(Cm,this.Ai),this.Ai=null)):this.Ai||(this.Ai=this.Ki.bind(this),On(ve,Cm,this.Ai)))}debug(t){t===!1?(X==null||X.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(X==null||X.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Lr(){var t,n,r,s,i,a,l=this.qi||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(be.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",s=be,i=(n="advanced_disable_flags")in(t=l)&&!st(t[n]),a=r in t&&!st(t[r]),i?t[n]:!!a&&(s&&s.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]))}rn(t){if(st(this.config.before_send))return t;var n=ft(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var s of n){if(r=s(r),st(r)){var i="Event '"+t.event+"' was rejected in beforeSend function";return YR(t.event)?be.warn(i+". This can cause unexpected behavior."):be.info(i),null}r.properties&&!ec(r.properties)||be.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Di(t){var n=vi(t)&&!t,r=ln.R()&&ln.A("ph_debug")==="true";return!n&&(!!r||t)}}ks.__defaultExtensionClasses={},ks.dn={trace:Fl=()=>{},debug:Fl,info:Fl,warn:Fl,error:Fl,fatal:Fl},function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=IL(e.prototype[t[n]])}(ks,["identify"]);var v8=1,_8=3,w8=11;function QE(e){return e instanceof Element&&(e.id===J3||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function gl(e){return!!e&&e.nodeType===v8}function Xs(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function kA(e){return!!e&&e.nodeType===_8}function TA(e){return!!e&&e.nodeType===w8&&gl(e.host)}function k_(e){return e?Bg(e).split(/\s+/):[]}function XE(e){var t=X==null?void 0:X.location.href;return!!(t&&e&&e.some(n=>t.match(n)))}function Rm(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return k_(t)}function SA(e){return st(e)?null:Bg(e).split(/(\s+)/).filter(t=>Gd(t)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Th(e){var t="";return Vb(e)&&!jA(e)&&e.childNodes&&e.childNodes.length&&Ht(e.childNodes,function(n){var r;kA(n)&&n.textContent&&(t+=(r=SA(n.textContent))!==null&&r!==void 0?r:"")}),Bg(t)}function JE(e){return we(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var T_=["a","button","form","input","select","textarea","label"];function ZE(e,t){if(we(t))return!0;var n,r=function(i){if(t.some(a=>i.matches(a)))return{v:!0}};for(var s of e)if(n=r(s))return n.v;return!1}function CA(e){var t=e.parentNode;return!(!t||!gl(t))&&t}var E8=["next","previous","prev",">","<"],eN=[".ph-no-rageclick",".ph-no-capture"],Wb=e=>!e||Xs(e,"html")||!gl(e),tN=(e,t)=>{if(!X||Wb(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],s=e;s.parentNode&&!Xs(s,"body");)if(TA(s.parentNode))r.push(s.parentNode.host),s=s.parentNode.host;else{var i=CA(s);if(!i)break;if(t||T_.indexOf(i.tagName.toLowerCase())>-1)n=!0;else{var a=X.getComputedStyle(i);a&&a.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(i),s=i}return{parentIsUsefulElement:n,targetElementList:r}};function Vb(e){for(var t=e;t.parentNode&&!Xs(t,"body");t=t.parentNode){var n=Rm(t);if(et(n,"ph-sensitive")||et(n,"ph-no-capture"))return!1}if(et(Rm(e),"ph-include"))return!0;var r=e.type||"";if(un(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}
17var s=e.name||e.id||"";return!un(s)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,""))}function jA(e){return!!(Xs(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Xs(e,"select")||Xs(e,"textarea")||e.getAttribute("contenteditable")==="true")}var AA="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",N8=new RegExp("^(?:"+AA+")$"),k8=new RegExp(AA),IA="\\d{3}-?\\d{2}-?\\d{4}",T8=new RegExp("^("+IA+")$"),S8=new RegExp("("+IA+")");function Gd(e,t){return t===void 0&&(t=!0),!(st(e)||un(e)&&(e=Bg(e),(t?N8:k8).test((e||"").replace(/[- ]/g,""))||(t?T8:S8).test(e)))}function nN(e){var t=Th(e);return Gd(t=(t+" "+PA(e)).trim())?t:""}function PA(e){var t="";return e&&e.childNodes&&e.childNodes.length&&Ht(e.childNodes,function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var s=Th(n);t=(t+" "+s).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+PA(n)).trim())}catch(i){be.error("[AutoCapture]",i)}}),t}function rN(e){return e.replace(/"|\\"/g,'\\"')}function C8(e){var t=e.attr__class;return t?ft(t)?t:k_(t):void 0}class sN{constructor(t){this.disabled=t===!1;var n=kn(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(t-s.x)+Math.abs(n-s.y)<this.thresholdPx&&this.timeoutMs>r-s.timestamp){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var m0="$copy_autocapture",g0=nn("[AutoCapture]");function x0(e,t){return t.length>e?t.slice(0,e)+"...":t}function j8(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!gl(t));return t}function A8(e,t){var n,r,{e:s,maskAllElementAttributes:i,maskAllText:a,elementAttributeIgnoreList:l,elementsChainAsString:c}=t;if(!gl(e))return{props:{}};for(var u=[e],d=e;d.parentNode&&!Xs(d,"body");)if(TA(d.parentNode))u.push(d.parentNode.host),d=d.parentNode.host;else{if(!gl(d.parentNode))break;u.push(d.parentNode),d=d.parentNode}var h,f,p=[],m={},x=!1,w=!1;if(Ht(u,T=>{var N=Vb(T);if(Xs(T,"a")){var C=T.getAttribute("href");x=N&&!!C&&Gd(C)&&C}et(Rm(T),"ph-no-capture")&&(w=!0),p.push(function(I,E,j,P){var L=I.tagName.toLowerCase(),z={tag_name:L};T_.indexOf(L)>-1&&!j&&(z.$el_text=L.toLowerCase()==="a"||L.toLowerCase()==="button"?x0(1024,nN(I)):x0(1024,Th(I)));var R=Rm(I);R.length>0&&(z.classes=R.filter(function(H){return H!==""})),Ht(I.attributes,function(H){var A;if((!jA(I)||["name","id","class","aria-label"].indexOf(H.name)!==-1)&&(P==null||!P.includes(H.name))&&!E&&Gd(H.value)&&(!un(A=H.name)||A.substring(0,10)!=="_ngcontent"&&A.substring(0,7)!=="_nghost")){var q=H.value;H.name==="class"&&(q=k_(q).join(" ")),z["attr__"+H.name]=x0(1024,q)}});for(var B=1,O=1,U=I;U=j8(U);)B++,U.tagName===I.tagName&&O++;return z.nth_child=B,z.nth_of_type=O,z}(T,i,a,l));var S=function(I){if(!Vb(I))return{};var E={};return Ht(I.attributes,function(j){if(j.name&&j.name.indexOf("data-ph-capture-attribute")===0){var P=j.name.replace("data-ph-capture-attribute-",""),L=j.value;P&&L&&Gd(L)&&(E[P]=L)}}),E}(T);bn(m,S)}),w)return{props:{},explicitNoCapture:w};if(a||(p[0].$el_text=Xs(e,"a")||Xs(e,"button")?nN(e):Th(e)),x){var g,b;p[0].attr__href=x;var _=(g=Im(x))==null?void 0:g.host,k=X==null||(b=X.location)==null?void 0:b.host;_&&k&&_!==k&&(h=x)}return{props:bn({$event_type:s.type,$ce_version:1},c?{}:{$elements:p},{$elements_chain:(f=p,function(T){return T.map(N=>{var C,S,I="";if(N.tag_name&&(I+=N.tag_name),N.attr_class)for(var E of(N.attr_class.sort(),N.attr_class))I+="."+E.replace(/"/g,"");var j=pe({},N.text?{text:N.text}:{},{"nth-child":(C=N.nth_child)!==null&&C!==void 0?C:0,"nth-of-type":(S=N.nth_of_type)!==null&&S!==void 0?S:0},N.href?{href:N.href}:{},N.attr_id?{attr_id:N.attr_id}:{},N.attributes),P={};return $p(j).sort((L,z)=>
17{var[R]=L,[B]=z;return R.localeCompare(B)}).forEach(L=>{var[z,R]=L;return P[rN(z.toString())]=rN(R.toString())}),(I+=":")+$p(P).map(L=>{var[z,R]=L;return z+'="'+R+'"'}).join("")}).join(";")}(function(T){return T.map(N=>{var C,S,I={text:(C=N.$el_text)==null?void 0:C.slice(0,400),tag_name:N.tag_name,href:(S=N.attr__href)==null?void 0:S.slice(0,2048),attr_class:C8(N),attr_id:N.attr__id,nth_child:N.nth_child,nth_of_type:N.nth_of_type,attributes:{}};return $p(N).filter(E=>{var[j]=E;return j.indexOf("attr__")===0}).forEach(E=>{var[j,P]=E;return I.attributes[j]=P}),I})}(f)))},(n=p[0])!=null&&n.$el_text?{$el_text:(r=p[0])==null?void 0:r.$el_text}:{},h&&s.type==="click"?{$external_click_url:h}:{},m)}}var Zu=nn("[ExceptionAutocapture]");function iN(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],s=n(r);return $i(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=s,()=>{e[t]=r}}catch{return()=>{}}}var I8=nn("[TracingHeaders]"),jo=nn("[Web Vitals]"),aN=9e5,oN="disabled",lN="lazy_loading",ed="awaiting_config",sp="missing_config";nn("[SessionRecording]"),nn("[SessionRecording]");var qb="[SessionRecording]",Oi=nn(qb),P8=nn("[Heatmaps]");function cN(e){return kn(e)&&"clientX"in e&&"clientY"in e&&Ds(e.clientX)&&Ds(e.clientY)}var uN=nn("[Product Tours]"),D8=["$set_once","$set"],wa=nn("[SiteApps]"),dN="Error while initializing PostHog app with config id ";function Bl(e,t,n){if(st(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}let O8=class{constructor(t){this.vn=new N_,this.fn=(n,r)=>this.pn(n,r)&&this.gn(n,r)&&this.mn(n,r)&&this.yn(n,r),this.pn=(n,r)=>r==null||!r.event||(n==null?void 0:n.event)===(r==null?void 0:r.event),this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,n;we((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook((r,s)=>{this.on(r,s)})}register(t){var n,r;if(!we((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach(a=>{var l,c;(l=this._n)==null||l.add(a),(c=a.steps)==null||c.forEach(u=>{var d;
vendor: 5,593 bytes, line 17
17(d=this.bn)==null||d.add((u==null?void 0:u.event)||"")})}),(r=this._instance)!=null&&r.autocapture)){var s,i=new Set;t.forEach(a=>{var l;(l=a.steps)==null||l.forEach(c=>{c!=null&&c.selector&&i.add(c==null?void 0:c.selector)})}),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(t,n){var r;n!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(n==null?void 0:n.event))&&this._n&&((r=this._n)==null?void 0:r.size)>0&&this._n.forEach(s=>{this.wn(n,s)&&this.vn.emit("actionCaptured",s.name)})}xn(t){this.onAction("actionCaptured",n=>t(n))}wn(t,n){if((n==null?void 0:n.steps)==null)return!1;for(var r of n.steps)if(this.fn(t,r))return!0;return!1}onAction(t,n){return this.vn.on(t,n)}gn(t,n){if(n!=null&&n.url){var r,s=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!s||typeof s!="string"||!Bl(s,n.url,n.url_matching||"contains"))return!1}return!0}mn(t,n){return!!this.Sn(t,n)&&!!this.kn(t,n)&&!!this.Cn(t,n)}Sn(t,n){var r;if(n==null||!n.href)return!0;var s=this.In(t);if(s.length>0)return s.some(l=>Bl(l.href,n.href,n.href_matching||"exact"));var i,a=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!a&&Bl((i=a.match(/(?::|")href="(.*?)"/))?i[1]:"",n.href,n.href_matching||"exact")}kn(t,n){var r;if(n==null||!n.text)return!0;var s=this.In(t);if(s.length>0)return s.some(u=>Bl(u.text,n.text,n.text_matching||"exact")||Bl(u.$el_text,n.text,n.text_matching||"exact"));var i,a,l,c=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!c&&(i=function(u){for(var d,h=[],f=/(?::|")text="(.*?)"/g;!st(d=f.exec(u));)h.includes(d[1])||h.push(d[1]);return h}(c),a=n.text,l=n.text_matching||"exact",i.some(u=>Bl(u,a,l)))}Cn(t,n){var r,s;if(n==null||!n.selector)return!0;var i=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(i!=null&&i.includes(n.selector))return!0;var a=(t==null||(s=t.properties)==null?void 0:s.$elements_chain)||"";if(n.selector_regex&&a)try{return new RegExp(n.selector_regex).test(a)}catch{return!1}return!1}In(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t==null?void 0:t.properties.$elements}yn(t,n){return n==null||!n.properties||n.properties.length===0||wA(n.properties.reduce((r,s)=>{var i=ft(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return r[s.key]={values:i,operator:s.operator||"exact"},r},{}),t==null?void 0:t.properties)}},M8=class{constructor(t){this._instance=t,this.Tn=new Map,this.En=new Map,this.Mn=new Map}Pn(t,n){return!!t&&wA(t.propertyFilters,n==null?void 0:n.properties)}Rn(t,n){var r=new Map;return t.forEach(s=>{var i;(i=s.conditions)==null||(i=i[n])==null||(i=i.values)==null||i.forEach(a=>{if(a!=null&&a.name){var l=r.get(a.name)||[];l.push(s.id),r.set(a.name,l)}})}),r}On(t,n,r){var s=(r===Gu.Activation?this.Tn:this.En).get(t),i=[];return this.Ln(a=>{i=a.filter(l=>s==null?void 0:s.includes(l.id))}),i.filter(a=>{var l,c=(l=a.conditions)==null||(l=l[r])==null||(l=l.values)==null?void 0:l.find(u=>u.name===t);return this.Pn(c,n)})}register(t){var n;we((n=this._instance)==null?void 0:n._addCaptureHook)||(this.Fn(t),this.An(t))}An(t){var n=t.filter(r=>{var s,i;return((s=r.conditions)==null?void 0:s.actions)&&((i=r.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0});n.length!==0&&(this.Nn==null&&(this.Nn=new O8(this._instance),this.Nn.init(),this.Nn.xn(r=>{this.onAction(r)})),n.forEach(r=>{var s,i,a,l,c;r.conditions&&(s=r.conditions)!=null&&s.actions&&(i=r.conditions)!=null&&(i=i.actions)!=null&&i.values&&((a=r.conditions)==null||(a=a.actions)==null||(a=a.values)==null?void 0:a.length)>0&&((l=this.Nn)==null||l.register(r.conditions.actions.values),(c=r.conditions)==null||(c=c.actions)==null||(c=c.values)==null||c.forEach(u=>{if(u&&u.name){var d=this.Mn.get(u.name);d&&d.push(r.id),this.Mn.set(u.name,d||[r.id])}}))}))}Fn(t){var n,r=t.filter(i=>{var a,l;return((a=i.conditions)==null?void 0:a.events)&&((l=i.conditions)==null||(l=l.events)==null||(l=l.values)==null?void 0:l.length)>0}),s=t.filter(i=>{var a,l;return((a=i.conditions)==null?void 0:a.cancelEvents)&&((l=i.conditions)==null||(l=l.cancelEvents)==null||(l=l.values)==null?void 0:l.length)>0});r.length===0&&s.length===0||((n=this._instance)==null||n._addCaptureHook((i,a)=>{this.onEvent(i,a)}),this.Tn=this.Rn(t,Gu.Activation),this.En=this.Rn(t,Gu.Cancellation))}onEvent(t,n){var r,s=this.le(),i=this.$n(),a=this.Dn(),l=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[i])||[];if(a===t&&n&&l.length>0){var c,u;s.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:l});var d=(n==null||(c=n.properties)==null?void 0:c.$survey_id)||(n==null||(u=n.properties)==null?void 0:u.$product_tour_id);if(d){var h=l.indexOf(d);0>h||(l.splice(h,1),this.qn(l))}}else{if(this.En.has(t)){var f=this.On(t,n,Gu.Cancellation);f.length>0&&(s.info("cancel event matched, cancelling items",{event:t,itemsToCancel:f.map(m=>m.id)}),f.forEach(m=>{var x=l.indexOf(m.id);0>x||l.splice(x,1),this.jn(m.id)}),this.qn(l))}if(this.Tn.has(t)){s.info("event name matched",{event:t,eventPayload:n,items:this.Tn.get(t)});var p=this.On(t,n,Gu.Activation);this.qn(l.concat(p.map(m=>m.id)||[]))}}}onAction(t){var n,r=this.$n(),s=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.Mn.has(t)&&this.qn(s.concat(this.Mn.get(t)||[]))}qn(t){var n=this.le(),r=[...new Set(t)].filter(s=>!this.Hn(s));n.info("updating activated items",{activatedItems:r}),this.Un(r)}getActivatedIds(){var t,n=this.$n();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}
17getEventToItemsMap(){return this.Tn}Bn(){return this.Nn}},R8=class extends M8{constructor(t){super(t)}$n(){return Cb}Dn(){return Ad.SHOWN}Ln(t){var n;(n=this._instance)==null||n.getSurveys(t)}jn(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}le(){return Ct}Un(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[Cb]:t})}Hn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}};var y0="SDK is not enabled or survey functionality is not yet loaded",hN="Disabled. Not loading surveys.",L8=X!=null&&X.location?Pm(X.location.hash,"__posthog")||Pm(location.hash,"state"):null,fN="_postHogToolbarParams",pN=nn("[Toolbar]"),nr=nn("[FeatureFlags]"),Ao=nn("[FeatureFlags]",{debugEnabled:!0}),b0=`" failed. Feature flags didn't load in time.`,mN=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},gN=e=>{var t={};for(var[n,r]of $p(e||{}))r&&(t[n]=r);return t},Mi=nn("[Error tracking]"),xN="Refusing to render web experiment since the viewer is a likely bot",F8={icontains:(e,t)=>!!X&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!X&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!X&&Mm(t.href,e),not_regex:(e,t)=>!!X&&!Mm(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class mr{get qt(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments(s=>{mr.zn("retrieved web experiments from the server"),n.Vn=new Map,s.forEac
17h(i=>{if(i.feature_flag_key){var a;n.Vn&&(mr.zn("setting flag key ",i.feature_flag_key," to web experiment ",i),(a=n.Vn)==null||a.set(i.feature_flag_key,i));var l=n._instance.getFeatureFlag(i.feature_flag_key);un(l)&&i.variants[l]&&n.Wn(i.name,l,i.variants[l].transforms)}else if(i.variants)for(var c in i.variants){var u=i.variants[c];mr.Zn(u)&&n.Wn(i.name,c,u.transforms)}})},r)},this._instance=t,this._instance.onFeatureFlags(r=>{this.onFeatureFlags(r)})}initialize(){}onFeatureFlags(t){if(this._is_bot())mr.zn(xN);else if(!this.qt.disable_web_experiments){if(st(this.Vn))return this.Vn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();mr.zn("applying feature flags",t),t.forEach(n=>{var r;if(this.Vn&&(r=this.Vn)!=null&&r.has(n)){var s,i=this._instance.getFeatureFlag(n),a=(s=this.Vn)==null?void 0:s.get(n);i&&a!=null&&a.variants[i]&&this.Wn(a.name,i,a.variants[i].transforms)}})}}previewWebExperiment(){var t=mr.getWindowLocation();if(t!=null&&t.search){var n=Eh(t==null?void 0:t.search,"__experiment_id"),r=Eh(t==null?void 0:t.search,"__experiment_variant");n&&r&&(mr.zn("previewing web experiments "+n+" && "+r),this.getWebExperiments(s=>{this.Gn(parseInt(n),r,s)},!1,!0))}}loadIfEnabled(){this.qt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this.qt.disable_web_experiments&&!r)return t([]);var s=this._instance.get_property("$web_experiments");if(s&&!n)return t(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.qt.token),method:"GET",callback:i=>t(i.statusCode===200&&i.json&&i.json.experiments||[])})}Gn(t,n,r){var s=r.filter(i=>i.id===t);s&&s.length>0&&(mr.zn("Previewing web experiment ["+s[0].name+"] with variant ["+n+"]"),this.Wn(s[0].name,n,s[0].variants[n].transforms))}static Zn(t){return!st(t.conditions)&&mr.Qn(t)&&mr.Jn(t)}static Qn(t){var n;if(st(t.conditions)||st((n=t.conditions)==null?void 0:n.url))return!0;var r,s,i,a=mr.getWindowLocation();return!!a&&((r=t.conditions)==null||!r.url||F8[(s=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](t.conditions.url,a))}
17static getWindowLocation(){return X==null?void 0:X.location}static Jn(t){var n;if(st(t.conditions)||st((n=t.conditions)==null?void 0:n.utm))return!0;var r=aA();if(r.utm_source){var s,i,a,l,c,u,d,h,f=(s=t.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==r.utm_campaign,p=(a=t.conditions)==null||(a=a.utm)==null||!a.utm_source||((l=t.conditions)==null||(l=l.utm)==null?void 0:l.utm_source)==r.utm_source,m=(c=t.conditions)==null||(c=c.utm)==null||!c.utm_medium||((u=t.conditions)==null||(u=u.utm)==null?void 0:u.utm_medium)==r.utm_medium,x=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_term||((h=t.conditions)==null||(h=h.utm)==null?void 0:h.utm_term)==r.utm_term;return f&&m&&x&&p}return!1}static zn(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;n>s;s++)r[s-1]=arguments[s];be.info("[WebExperiments] "+t,r)}Wn(t,n,r){this._is_bot()?mr.zn(xN):n!=="control"?r.forEach(s=>{if(s.selector){var i;mr.zn("applying transform of variant "+n+" for experiment "+t+" ",s);var a=(i=document)==null?void 0:i.querySelectorAll(s.selector);a==null||a.forEach(l=>{var c=l;s.html&&(c.innerHTML=s.html),s.css&&c.setAttribute("style",s.css)})}}):mr.zn("Control variants leave the page unmodified.")}_is_bot(){return is&&this._instance?vA(is,this.qt.custom_blocked_useragents):void 0}}var bs=nn("[Conversations]"),Io="Conversations not available yet.",zg={featureFlags:class{constructor(e){this.Kn=!1,this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get qt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}us(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.qt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}ls(){return!!this.us()&&(this.ss||this.Xn||(this.ss=!0,nr.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.qt.evaluation_contexts)!==null&&e!==void 0?e:this.qt.evaluation_environments;return!this.qt.evaluation_environments||this.qt.evaluation_contexts||this.ns||(nr.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter(n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||nr.error("Invalid evaluation context found:",n,"Expected non-empty string"),r}):[]}cs(){return this.hs().length>0}ds(){var e=this.qt.flag_keys;if(!we(e)){if(ft(e))return e.filter(t=>{var n=t&&typeof t=="string"&&t.trim().length>0;return n||nr.error("Invalid flag key found:",t,"Expected non-empty string"),n});nr.error("Invalid flag_keys found:",e,"Expected array of non-empty strings")}}initialize(){var e,t,{config:n}=this._instance,r=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(r).length){var s,i,a=(s=(i=n.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&s!==void 0?s:{},l=Object.keys(r).filter(u=>!!r[u]).reduce((u,d)=>(u[d]=r[d]||!1,u),{}),c=Object.keys(a).filter(u=>l[u]).reduce((u,d)=>(a[d]&&(u[d]=a[d]),u),{});this.receivedFeatureFlags({featureFlags:l,featureFlagPayloads:c})}}updateFlags(e,t,n){var r=n!=null&&n.merge?this.getFlagVariants():{},s=n!=null&&n.merge?this.getFlagPayloads():{},i=pe({},r,e),a=pe({},s,t),l={};for(var[c,u]of Object.entries(i)){var d=typeof u=="string";l[c]={key:c,enabled:!!d||!!u,variant:d?u:void 0,reason:void 0,metadata:we(a==null?void 0:a[c])?void 0:{id:0,version:void 0,description:void 0,payload:a[c]}}}this.receivedFeatureFlags({flags:l})}get hasLoadedFlags(){return this.Yn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(Nb),t=this.os(Fi),n=this.os(Kl);if(!n&&!t)return e||{};var r=bn({},e||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var i of s){var a,l,c=r[i],u=t==null?void 0:t[i],d=we(u)?(a=c==null?void 0:c.enabled)!==null&&a!==void 0&&a:!!u,h=we(u)?c.variant:typeof u=="string"?u:void 0,f=n==null?void 0:n[i],p=pe({},c,{enabled:d,variant:d?h??(c==null?void 0:c.variant):void 0});d!==(c==null?void 0:c.enabled)&&(p.original_enabled=c==null?void 0:c.enabled),h!==(c==null?void 0:c.variant)&&(p.original_variant=c==null?void 0:c.variant),f&&(p.metadata=pe({},c==null?void 0:c.metadata,{payload:f,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),r[i]=p}return this.Kn||(nr.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Kn=!0),r}getFlagVariants(){var e=this.os(tc),t=this.os(Fi);if(!t)return e||{};for(var n=bn({},e),r=Object.keys(t),s=0;r.length>s;s++)n[r[s]]=t[r[s]];return this.Kn||(nr.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Kn=!0),n}getFlagPayloads(){var e=this.os(kb),t=this.os(Kl);if(!t)return e||{};for(var n=bn({},e||{}),r=Object.keys(t),s=0;r.length>s;s++)n[r[s]]=t[r[s]];return this.Kn||(nr.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Kn=!0),n}reloadFeatureFlags(){this.es||this.qt.advanced_disable_feature_flags||this.vs||(this._instance.Li.emit("featureFlagsReloading",!0),this.vs=setTimeout(()=>{this.fs()},5))}ps(){clearTimeout(this.vs),this.vs=void 0}ensureFlagsLoaded(){this.Yn||this.Xn||this.vs||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}fs(e){var t;if(this.ps(),!this._instance.Lr())if(this.Xn)this.ts=!0;else{var n=this.qt.token,r=this.os(Em),s={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:pe({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(jd)||{}),group_properties:this.os(Mo),timezone:hA()};fa(r)||we(r)||(s.$device_id=r),(e!=null&&e.disableFlags||this.qt.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.cs()&&(s.evaluation_contexts=this.hs());var i=this.ds();we(i)||(s.flag_keys=i);var a=!!this.qt.advanced_only_evaluate_survey_feature_flags,l=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.qt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Xn=!0,this._instance._send_request({method:"POST",url:l,data:s,compression:this.qt.disable_compression?void 0:mi.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback:c=>{var u,d,h,f=!0;if(c.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),f=!1),this.Xn=!1,!s.disable_flags||this.ts){this.rs=!f;var p=[];c.error?c.error instanceof Error?p.push(c.error.name==="AbortError"?"timeout":"connection_error"):p.push("unknown_error"):c.statusCode!==200&&p.push("api_error_"+c.statusCode),(u=c.json)!=null&&u.errorsWhileComputingFlags&&p.push("errors_while_computing_flags");var m,x=!((d=c.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));x&&p.push("quota_limited"),(h=this.ni)==null||h.register({[Ab]:p}),x?nr.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(s.disable_flags||this.receivedFeatureFlags((m=c.json)!==null&&m!==void 0?m:{},f,{partialResponse:a}),this.ts&&(this.ts=!1,this.fs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var r=this.getFeatureFlagResult(e,t);return(n=r==null?void 0:r.variant)!==null&&n!==void 0?n:r==null?void 0:r.enabled}}else nr.warn('getFeatureFlag for key "'+e+b0)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t==null?void 0:t.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Yn||this.getFlags()&&this.getFlags().length>0){if(!this.ls()){var n=this.getFlagVariants(),r=e in n,s=n[e],i=this.getFlagPayloads()[e],a=String(s),l=this.os(Tb)||void 0,c=this.os(km)||void 0,u=this.os(Vd)||{};if(this.qt.advanced_feature_flags_dedup_per_session){var d,h=this._instance.get_session_id(),f=this.os(jb);h&&h!==f&&(u={},(d=this.ni)==null||d.register({[Vd]:u,[jb]:h}))}if((t.send_event||!("send_event"in t))&&(!(e in u)||!u[e].includes(a))){var p,m,x,w,g,b,_,k,T,N;ft(u[e])?u[e].push(a):u[e]=[a],(p=this.ni)==null||p.register({[Vd]:u});var C=this.getFeatureFlagDetails(e),S=[...(m=this.os(Ab))!==null&&m!==void 0?m:[]];we(s)&&S.push("flag_missing");var I={$feature_flag:e,$feature_flag_response:s,$feature_flag_payload:i||null,$feature_flag_request_id:l,$feature_flag_evaluated_at:c,$feature_flag_bootstrapped_response:((x=this.qt.bootstrap)==null||(x=x.featureFlags)==null?void 0:x[e])||null,$feature_flag_bootstrapped_payload:((w=this.qt.bootstrap)==null||(w=w.featureFlagPayloads)==null?void 0:w[e])||null,$used_bootstrap_value:!this.rs};we(C==null||(g=C.metadata)==null?void 0:g.version)||(I.$feature_flag_version=C.metadata.version);var E,j=(b=C==null||(_=C.reason)==null?void 0:_.description)!==null&&b!==void 0?b:C==null||(k=C.reason)==null?void 0:k.code;j&&(I.$feature_flag_reason=j),C!=null&&(T=C.metadata)!=null&&T.id&&(I.$feature_flag_id=C.metadata.id),we(C==null?void 0:C.original_variant)&&we(C==null?void 0:C.original_enabled)||(I.$feature_flag_original_response=we(C.original_variant)?C.original_enabled:C.original_variant),C!=null&&(N=C.metadata)!=null&&N.original_payload&&(I.$feature_flag_original_payload=C==null||(E=C.metadata)==null?void 0:E.original_payload),S.length&&(I.$feature_flag_error=S.join(",")),this._instance.capture("$feature_flag_called",I)}if(r){var P=i;if(!we(i))try{P=JSON.parse(i)}catch{}return{key:e,enabled:!!s,variant:typeof s=="string"?s:void 0,payload:P}}}}else nr.warn('getFeatureFlagResult for key "'+e+b0)}getRemoteConfigPayload(e,t){var n=this.qt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs());var s=this.ds();we(s)||(r.flag_keys=s),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.qt.disable_compression?void 0:mi.Base64,timeout:this.qt.feature_flag_request_timeout_ms,callback(i){var a,l=(a=i.json)==null?void 0:a.featureFlagPayloads;t((l==null?void 0:l[e])||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Yn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return we(n)?void 0:!!n}nr.warn('isFeatureEnabled for key "'+e+b0)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(t=>t!==e)}
17receivedFeatureFlags(e,t,n){if(this.ni){this.Yn=!0;var r=this.getFlagVariants(),s=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(a,l,c,u,d,h){c===void 0&&(c={}),u===void 0&&(u={}),d===void 0&&(d={});var f=(S=>{var I=S.flags;return I?(S.featureFlags=Object.fromEntries(Object.keys(I).map(E=>{var j;return[E,(j=I[E].variant)!==null&&j!==void 0?j:I[E].enabled]})),S.featureFlagPayloads=Object.fromEntries(Object.keys(I).filter(E=>I[E].enabled).filter(E=>{var j;return(j=I[E].metadata)==null?void 0:j.payload}).map(E=>{var j;return[E,(j=I[E].metadata)==null?void 0:j.payload]}))):nr.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),S})(a),p=f.flags,m=f.featureFlags,x=f.featureFlagPayloads;if(m){var w=a.requestId,g=a.evaluatedAt;if(ft(m)){nr.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var b={};if(m)for(var _=0;m.length>_;_++)b[m[_]]=!0;l&&l.register({[Bp]:m,[tc]:b})}else{var k=m,T=x,N=p;if(h!=null&&h.partialResponse)k=pe({},c,k),T=pe({},u,T),N=pe({},d,N);else if(a.errorsWhileComputingFlags)if(p){var C=new Set(Object.keys(p).filter(S=>{var I;return!((I=p[S])!=null&&I.failed)}));k=pe({},c,Object.fromEntries(Object.entries(k).filter(S=>{var[I]=S;return C.has(I)}))),T=pe({},u,Object.fromEntries(Object.entries(T||{}).filter(S=>{var[I]=S;return C.has(I)}))),N=pe({},d,Object.fromEntries(Object.entries(N||{}).filter(S=>{var[I]=S;return C.has(I)})))}else k=pe({},c,k),T=pe({},u,T),N=pe({},d,N);l&&l.register(pe({[Bp]:Object.keys(gN(k)),[tc]:k||{},[kb]:T||{},[Nb]:N||{}},w?{[Tb]:w}:{},g?{[km]:g}:{}))}}})(e,this.ni,r,s,i,n),t||(this.ss=!1),this.gs(t)}}override(e,t){t===void 0&&(t=!1),nr.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return nr.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(Fi),this.ni.unregister(Kl),this.gs(),Ao.info("All overrides cleared");if(ft(e)){var t=mN(e);return this.ni.register({[Fi]:t}),this.gs(),Ao.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Kn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.ni.unregister(Fi),Ao.info("Flag overrides cleared");else if(r.flags){if(ft(r.flags)){var s=mN(r.flags);this.ni.register({[Fi]:s})}else this.ni.register({[Fi]:r.flags});Ao.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.ni.unregister(Kl),Ao.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[Kl]:r.payloads}),Ao.info("Payload overrides set",{payloads:r.payloads}))),void this.gs()}if(e&&typeof e=="object")return this.ni.register({[Fi]:e}),this.gs(),Ao.info("Flag overrides set",{flags:e});nr.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Yn){var{flags:t,flagVariants:n}=this.ys();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,s=(this.os(Cd)||[]).find(c=>c.flagKey===e),i={["$feature_enrollment/"+e]:t},a={$feature_flag:e,$feature_enrollment:t,$set:i};s&&(a.$early_access_feature_name=s.name),n&&(a.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",a),this.setPersonPropertiesForFlags(i,!1);var l=pe({},this.getFlagVariants(),{[e]:t});(r=this.ni)==null||r.register({[Bp]:Object.keys(gN(l)),[tc]:l}),this.gs()}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.os(Cd),s=n?"&"+n.map(i=>"stage="+i).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.qt.token+s),method:"GET",callback:i=>{var a,l;if(i.json){var c=i.json.earlyAccessFeatures;return(a=this.ni)==null||a.unregister(Cd),(l=this.ni)==null||l.register({[Cd]:c}),e(c)}}})}ys(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter(n=>t[n]),flagVariants:Object.keys(t).filter(n=>t[n]).reduce((n,r)=>(n[r]=t[r],n),{})}}gs(e){var{flags:t,flagVariants:n}=this.ys();
17this.featureFlagEventHandlers.forEach(r=>r(t,n,{errorsLoading:e}))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(jd)||{},r=(e==null?void 0:e.$set)||(e!=null&&e.$set_once?{}:e),s=e==null?void 0:e.$set_once,i={};if(s)for(var a in s)({}).hasOwnProperty.call(s,a)&&(a in n||(i[a]=s[a]));this._instance.register({[jd]:pe({},n,i,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(jd)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Mo)||{};Object.keys(n).length!==0&&Object.keys(n).forEach(r=>{n[r]=pe({},n[r],e[r]),delete e[r]}),this._instance.register({[Mo]:pe({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(Mo)||{};this._instance.register({[Mo]:pe({},t,{[e]:{}})})}else this._instance.unregister(Mo)}reset(){this.Yn=!1,this.Xn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.ps(),this.Kn=!1}}},B8={sessionRecording:class{get qt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.bs)==null||!e.isStarted)}get status(){var e,t;return this._s===ed||this._s===sp?this._s:(e=(t=this.bs)==null?void 0:t.status)!==null&&e!==void 0?e:this._s}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this._s=oN,this.ws=void 0,this._instance=e,!this._instance.sessionManager)throw Oi.error("started without valid sessionManager"),new Error(qb+" started without valid sessionManager. This is a bug.");if(this.qt.cookieless_mode===Yi)throw new Error(qb+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get xs(){var e,t=!((e=this._instance.get_property(qo))==null||!e.enabled),n=!this.qt.disable_session_recording,r=this.qt.disable_session_recording||this._instance.consent.isOptedOut();return X&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.xs||(t=this.bs)==null||!t.isStarted){var n=!we(Object.assign)&&!we(Array.from);this.xs&&n?(this.Ss(e),Oi.info("starting")):(this._s=oN,this.stopRecording())}}Ss(e){var t,n,r;this.xs&&(this._s!==ed&&this._s!==sp&&(this._s=lN),Me!=null&&(t=Me.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=Me.__PosthogExtensions__)!=null&&n.initSessionRecording?this.ks(e):(r=Me.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Cs,s=>{if(s)return Oi.error("could not load recorder",s);this.ks(e)}))}stopRecording(){var e,t;(e=this.ws)==null||e.call(this),this.ws=void 0,(t=this.bs)==null||t.stop()}Is(){var e,t;(e=this.ws)==null||e.call(this),this.ws=void 0,(t=this.bs)==null||t.discard()}Ts(){var e;(e=this.ni)==null||e.unregister(b_)}Es(e,t){if(st(e))return null;var n,r=Ds(e)?e:parseFloat(e);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(Oi.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}Ms(e){if(this.ni){var t,n,r=this.ni,s=()=>{var i,a=e.sessionRecording===!1?void 0:e.sessionRecording,l=this.Es((i=this.qt.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),c=this.Es(a==null?void 0:a.sampleRate,"remote config sampleRate"),u=l??c;st(u)&&this.Ts();var d=a==null?void 0:a.minimumDurationMilliseconds;r.register({[qo]:pe({cache_timestamp:Date.now(),enabled:!!a},a,{networkPayloadCapture:pe({capturePerformance:e.capturePerformance},a==null?void 0:a.networkPayloadCapture),canvasRecording:{enabled:a==null?void 0:a.recordCanvas,fps:a==null?void 0:a.canvasFps,quality:a==null?void 0:a.canvasQuality},sampleRate:u,minimumDurationMilliseconds:we(d)?null:d,endpoint:a==null?void 0:a.endpoint,triggerMatchType:a==null?void 0:a.triggerMatchType,masking:a==null?void 0:a.masking,urlTriggers:a==null?void 0:a.urlTriggers,version:a==null?void 0:a.version,triggerGroups:a==null?void 0:a.triggerGroups})})};s(),(t=this.ws)==null||t.call(this),this.ws=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.Ms(e),void this.Is()):(this.Ms(e),void this.startIfEnabledOrStop()):(this._s===ed&&(this._s=sp,Oi.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.bs)!=null&&n.log?this.bs.log(e,t):Oi.warn("log called before recorder was ready")}get Cs(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(qo);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Ps(){var e,t,n=this._instance.get_property(qo);if(!n)return!1;try{t=typeof n=="object"?n:JSON.parse(n)}catch(s){return Oi.warn("persisted remote config for session recording is invali
17d and will be ignored",s),!1}var r=(e=t.cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-r}ks(e){var t,n;if((t=Me.__PosthogExtensions__)==null||!t.initSessionRecording)return Oi.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[tA]:!0});if(this.bs||(this.bs=(n=Me.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.bs._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Ps())return this._s===sp||this._s===ed?void 0:(this._s=ed,Oi.info("persisted remote config is stale, requesting fresh config before starting"),void new fA(this._instance).load());this._s=lN,this.bs.start(e)}onRRwebEmit(e){var t;(t=this.bs)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.bs||(t=this.ni)==null||t.register({[K3]:!0}),(e=this.bs)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.bs||(t=this.ni)==null||t.register({[G3]:!0}),(e=this.bs)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.bs||(n=this.ni)==null||n.register({[e==="url"?Q3:X3]:!0}),(t=this.bs)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.bs)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.bs)==null||!n.tryAddCustomEvent(e,t))}}},U8={autocapture:class{constructor(e){this.Rs=!1,this.Os=null,this.Ls=!1,this.instance=e,this.rageclicks=new sN(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get qt(){var e,t,n=kn(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map(r=>new RegExp(r)),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map(r=>new RegExp(r)),n}As(){if(this.isBrowserSupported()){if(X&&ve){var e=n=>{n=n||(X==null?void 0:X.event);try{this.Ns(n)}catch(r){g0.error("Failed to capture event",r)}};if(On(ve,"submit",e,{capture:!0}),On(ve,"change",e,{capture:!0}),On(ve,"click",e,{capture:!0}),this.qt.capture_copied_text){var t=n=>{n=n||(X==null?void 0:X.event);try{this.Ns(n,m0)}catch(r){g0.error("Failed to capture copy/cut event",r)}};On(ve,"copy",t,{capture:!0}),On(ve,"cut",t,{capture:!0})}}}else g0.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.As(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ls=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[gb]:!!e.autocapture_opt_out}),this.Os=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,n=[];return(t=this.Fs)==null||t.forEach(r=>{var s=ve==null?void 0:ve.querySelectorAll(r);s==null||s.forEach(i=>{e===i&&n.push(r)})}),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[gb];if(fa(this.Os)&&!vi(n)&&!this.instance.Lr())return!1;var r=(t=this.Os)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}Ns(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=JE(e);kA(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&function(h,f){if(!X||Wb(h))return!1;var p,m,x;if(vi(f)?(p=!!f&&eN,m=void 0):(p=(x=f==null?void 0:f.css_selector_ignorelist)!==null&&x!==void 0?x:eN,m=f==null?void 0:f.content_ignorelist),p===!1)return!1;var{targetElementList:w}=tN(h,!1);return!function(g,b){if(g===!1||we(g))return!1;var _;if(g===!0)_=E8;else{if(!ft(g))return!1;if(g.length>10)return be.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;_=g.map(k=>k.toLowerCase())}return b.some(k=>{var{safeText:T,ariaLabel:N}=k;return _.some(C=>T.includes(C)||N.includes(C))})}(m,w.map(g=>{var b;return{safeText:Th(g).toLowerCase(),ariaLabel:((b=g.getAttribute("aria-label"))==null?void 0:b.toLowerCase().trim())||""}}))&&!ZE(w,p)}(r,this.instance.config.rageclick)&&this.Ns(e,"$rageclick");var s=t===m0;if(r&&function(h,f,p,m,x){var w,g,b,_;if(p===void 0&&(p=void 0),!X||Wb(h)||(w=p)!=null&&w.url_allowlist&&!XE(p.url_allowlist)||(g=p)!=null&&g.url_ignorelist&&XE(p.url_ignorelist))return!1;if((b=p)!=null&&b.dom_event_allowlist){var k=p.dom_event_allowlist;if(k&&!k.some(I=>f.type===I))return!1}var{parentIsUsefulElement:T,targetElementList:N}=tN(h,m);if(!function(I,E){var j=E==null?void 0:E.element_allowlist;if(we(j))return!0;var P,L=function(R){if(j.some(B=>R.tagName.toLowerCase()===B))return{v:!0}};for(var z of I)if(P=L(z))return P.v;return!1}(N,p)||!ZE(N,(_=p)==null?void 0:_.css_selector_allowlist))return!1;var C=X.getComputedStyle(h);if(C&&C.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0;var S=h.tagName.toLowerCase();switch(S){case"html":return!1;case"form":return(x||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(x||["change","click"]).indexOf(f.type)>=0;default:return T?(x||["click"]).indexOf(f.type)>=0:(x||["click"]).indexOf(f.type)>=0&&(T_.indexOf(S)>-1||h.getAttribute("contenteditable")==="true")}}(r,e,this.qt,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:a}=A8(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.qt.element_attribute_ignorelist,elementsC
17hainAsString:this.Ls});if(a)return!1;var l=this.getElementSelectors(r);if(l&&l.length>0&&(i.$element_selectors=l),t===m0){var c,u=SA(X==null||(c=X.getSelection())==null?void 0:c.toString()),d=e.type||"clipboard";if(!u)return!1;i.$selected_content=u,i.$copy_type=d}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return $i(ve==null?void 0:ve.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.$s=(X==null||(t=X.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(be.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,be.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(X&&X.history){var n=this;(e=X.history.pushState)!=null&&e.__posthog_wrapped__||iN(X.history,"pushState",r=>function(s,i,a){r.call(this,s,i,a),n.qs("pushState")}),(t=X.history.replaceState)!=null&&t.__posthog_wrapped__||iN(X.history,"replaceState",r=>function(s,i,a){r.call(this,s,i,a),n.qs("replaceState")}),this.js()}}qs(e){try{var t,n=X==null||(t=X.location)==null?void 0:t.pathname;if(!n)return;n!==this.$s&&this.isEnabled&&this._instance.capture(Ql,{navigation_type:e}),this.$s=n}catch(r){be.error("Error capturing "+e+" pageview",r)}}js(){if(!this.Ds){var e=()=>{this.qs("popstate")};On(X,"popstate",e),this.Ds=()=>{X&&X.removeEventListener("popstate",e)}}}},heatmaps:class{get qt(){return this.instance.config}constructor(e){var t;this.Hs=!1,this.Rs=!1,this.Us=null,this.instance=e,this.Hs=!((t=this.instance.persistence)==null||!t.props[xb]),this.rageclicks=new sN(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return kn(this.qt.capture_heatmaps)&&this.qt.capture_heatmaps.flush_interval_milliseconds&&(e=this.qt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return st(this.qt.capture_heatmaps)?st(this.qt.enable_heatmaps)?this.Hs:this.qt.enable_heatmaps:this.qt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;P8.info("starting..."),this.Bs(),this.At()}else{var e;clearInterval((e=this.Us)!==null&&e!==void 0?e:void 0),this.zs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[xb]:t}),this.Hs=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.M;return this.M=void 0,e}Vs(e){this.Mt(e.originalEvent,"deadclick")}At(){this.Us&&clearInterval(this.Us),this.Us=(ve==null?void 0:ve.visibilityState)==="visible"?setInterval(this.Zr.bind(this),this.flushIntervalMilliseconds):null}Bs(){X&&ve&&(this.Ws=this.Zr.bind(this),On(X,jm,this.Ws),this.Zs=e=>this.Mt(e||(X==null?void 0:X.event)),On(ve,"click",this.Zs,{capture:!0}),this.Gs=e=>this.Qs(e||(X==null?void 0:X.event)),On(ve,"mousemove",this.Gs,{capture:!0}),this.Js=new IE(this.instance,$L,this.Vs.bind(this)),this.Js.startIfEnabledOrStop(),this.Ks=this.At.bind(this),On(ve,Cm,this.Ks),this.Rs=!0)}zs(){var e;X&&ve&&(this.Ws&&X.removeEventListener(jm,this.Ws),this.Zs&&ve.removeEventListener("click",this.Zs,{capture:!0}),this.Gs&&ve.removeEventListener("mousemove",this.Gs,{capture:!0}),this.Ks&&ve.removeEventListener(Cm,this.Ks),clearTimeout(this.Ys),(e=this.Js)==null||e.stop(),this.Rs=!1)}Xs(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=function(a,l,c){for(var u=a;u&&gl(u)&&!Xs(u,"body");){if(u===c)return!1;if(et(l,X==null?void 0:X.getComputedStyle(u).position))return!0;u=CA(u)}return!1}(JE(e),["fixed","sticky"],s);return{x:e.clientX+(i?0:r),y:e.clientY+(i?0:n),target_fixed:i,type:t}}Mt(e,t){var n;if(t===void 0&&(t="click"),!QE(e.target)&&cN(e)){var r=this.Xs(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.eo(pe({},r,{type:"rageclick"})),this.eo(r)}}Qs(e){!QE(e.target)&&cN(e)&&(clearTimeout(this.Ys),this.Ys=setTimeout(()=>{this.eo(this.Xs(e,"mousemove"))},500))}eo(e){if(X){var t=X.location.href,n=this.qt.custom_personal_data_properties,r=this.qt.mask_personal_data_properties?[...Kc,...n||[]]:[],s=Nh(t,r,kh);this.M=this.M||{},this.M[s]||(this.M[s]=[]),this.M[s].push(e)}}Zr(){this.M&&!ec(this.M)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:IE,webVitalsAutocapture:class{constructor(e){var t;this.Hs=!1,this.Rs=!1,this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.ro=()=>{clearTimeout(this.io),this.M.metrics.length!==0&&(this._instance.capture("$web_vitals",this.M.metrics.reduce((n,r)=>pe({},n,{["$web_vitals_"+r.name+"_event"]:pe({},r),["$web_vitals_"+r.name+"_value"]:r.value}),{})),this.M={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var r;this.M=this.M||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.no();if(!we(s))if(st(n==null?void 0:n.name)||st(n==null?void 0:n.value))jo.error("Invalid metric received",n);else if(!this.so||this.so>n.value){this.M.url!==s&&(this.ro(),this.io=setTimeout(this.ro,this.flushToCaptureTimeoutMs)),we(this.M.url)&&(this.M.url=s),this.M.firstMetricTimestamp=we(this.M.firstMetricTimestamp)?Date.now():this.M.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0);var i=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0),a=pe({},n,{$current_url:s,timestamp:Date.now()});we(i)||(a.$session_id=i.sessionId,a.$window_id=i.windowId),this.M.metrics.push(a),this.M.metrics.length===this.allowedMetrics.length&&this.ro()}else jo.error("Ignoring metric with value >= "+this.so,n)},this.oo=()=>
17{if(!this.Rs){var n,r,s,i,a=Me.__PosthogExtensions__;we(a)||we(a.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:s,onINP:i}=a.postHogWebVitalsCallbacks),n&&r&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ht.bind(this)),this.Rs=!0):jo.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.Hs=!((t=this._instance.persistence)==null||!t.props[_b]),this.startIfEnabled()}get ao(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=kn(this.ao)?(e=this.ao)==null?void 0:e.web_vitals_allowed_metrics:void 0;return st(n)?((t=this._instance.persistence)==null?void 0:t.props[Eb])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(kn(this.ao)?this.ao.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=kn(this.ao)?this.ao.web_vitals_attribution:void 0;return e!=null&&e}get so(){var e=kn(this.ao)&&Ds(this.ao.__web_vitals_max_value)?this.ao.__web_vitals_max_value:aN;return e>0&&6e4>=e?aN:e}get isEnabled(){var e=ir==null?void 0:ir.protocol;if(e!=="http:"&&e!=="https:")return jo.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=kn(this.ao)?this.ao.web_vitals:vi(this.ao)?this.ao:void 0;return vi(t)?t:this.Hs}startIfEnabled(){this.isEnabled&&!this.Rs&&(jo.info("enabled, starting..."),this.lr(this.oo))}onRemoteConfig(e){if("capturePerformance"in e){var t=kn(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=kn(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[_b]:t}),this._instance.persistence.register({[Eb]:n})),this.Hs=t,this.startIfEnabled()}}lr(e){var t,n;(t=Me.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=Me.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",r=>{r?jo.error("failed to load script",r):e()})}no(){var e=X?X.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Kc,...t||[]]:[];return Nh(e,n,kh)}jo.error("Could not determine current URL")}}},$8={exceptionObserver:class{constructor(e){var t,n,r;this.oo=()=>{var s;if(X&&this.isEnabled&&(s=Me.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var i=Me.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,a=Me.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Me.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.uo&&this.qt.capture_unhandled_errors&&(this.uo=i(this.captureException.bind(this))),!this.lo&&this.qt.capture_unhandled_rejections&&(this.lo=a(this.captureException.bind(this))),!this.ho&&this.qt.capture_console_errors&&(this.ho=l(this.captureException.bind(this)))}catch(c){Zu.error("failed to start",c),this.co()}}},this._instance=e,this.do=!((t=this._instance.persistence)==null||!t.props[yb]),this.vo=new QR({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Gt:Zu}),this.qt=this.fo(),this.startIfEnabledOrStop()}fo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return kn(e)?t=pe({},t,e):(we(e)?this.do:e)&&(t=pe({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.qt.capture_console_errors||this.qt.capture_unhandled_errors||this.qt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(Zu.info("enabled"),this.co(),this.lr(this.oo)):this.co()}lr(e){var t,n;(t=Me.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=Me.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",r=>{if(r)return Zu.error("failed to load script",r);e()})}co(){var e,t,n;(e=this.uo)==null||e.call(this),this.uo=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(n=this.ho)==null||n.call(this),this.ho=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.do=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[yb]:this.do}),this.qt=this.fo(),this.startIfEnabledOrStop())}onConfigChange(){this.qt=this.fo()}captureException(e){var t,n,r,s=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.vo.consumeRateLimit(s)?Zu.info("Skipping exception capture because of client rate limiting.",{exception:s}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.po=[],this.mo=new cL([new xL,new TL,new bL,new yL,new NL,new EL,new _L,new kL],function(r){for(var s=arguments.length,i=new Array(s>1?s-1:0),a=1;s>a;a++)i[a-1]=arguments[a];return function(l,c){c===void 0&&(c=0);for(var u=[],d=l.split(` 18`),h=c;d.length>h;h++){var f=d[h];if(1024>=f.length){var p=SE.test(f)?f.replace(SE,"$1"):f;if(!p.match(/\S*Error: /)){for(var m of i){var x=m(p,r);if(x){u.push(x);break}}if(u.length>=50)break}}}return function(w){if(!w.length)return[];var g=Array.from(w);return g.reverse(),g.slice(0,50).map(b=>{return pe({},b,{filename:b.filename||(_=g,_[_.length-1]||{}).filename,function:b.function||Gc});var _})}(u)}}("web:javascript",fL,gL)),this._instance=e,this.po=(t=(n=this._instance.persistence)==null?void 0:n.get_property(bb))!==null&&t!==void 0?t:[],this.yo=wm(this.bo()),this._o=new CL(this.yo)}onConfigChange(){this.yo=wm(this.bo()),this._o.setConfig(this.yo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var s=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],i=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.po=s,this._instance.persistence&&this._instance.persistence.register({[bb]:this.po,[vb]:i})}}get wo(){var e,t=!!this._instance.get_property(vb),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.mo.buildFromUnknown(e,{syntheticException:t==null?void 0:t.syntheticException,mechanism:{handled:t==null?void 0:t.handled}})}addExceptionStep(e,t){if(this.yo.enabled)try{if(!un(e)||e.trim().length===0)return void Mi.warn("Ignoring exception step because message must be a non-empty string");var n=this.xo(t),{sanitizedProperties:r,droppedKeys:s}=function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var a=[];return{sanitizedProperties:Object.keys(i).reduce((l,c)=>SL.has(c)?(a.push(c),l):(l[c]=i[c],l),{}),droppedKeys:a}}(n);s.length>0&&Mi.warn("Ignoring reserved exception step fields",{droppedKeys:s}),this._o.add(pe({[vm]:e,[_m]:new Date().toISOString()},r))}catch(i){Mi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.So(t)){if(this.ko(t))return this.Co("Exception dropped: matched a suppression rule"),void Mi.info("Skipping exception capture because a suppression rule matched");if(!this.wo&&this.Io(t))return this.Co("Exception dropped: thrown by a browser extension"),void Mi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.To(t))return this.Co("Exception dropped: thrown by the PostHog SDK"),void Mi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.yo.enabled&&st(e.$exception_steps)?this.Eo(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this._o.clear(),r}catch(s){return Mi.error("Failed to capture exception event. Dropping this exception.",s),void this._o.clear()}}catch(s){return void Mi.error("Failed to process exception event. Ignoring this exception.",s)}}Eo(e){try{var t=this._o.getAttachable();return t.length===0?e:pe({},e,{$exception_steps:t})}catch(n){return Mi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}Co(e){this.yo.enabled&&this._o.add({[vm]:e,[_m]:new Date().toISOString()})}xo(e){return kn(e)?pe({},e):{}}bo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}ko(e){if(e.length===0)return!1;var t=e.reduce((n,r)=>{var{type:s,value:i}=r;return un(s)&&s.length>0&&n.$exception_types.push(s),un(i)&&i.length>0&&n.$exception_values.push(i),n},{$exception_types:[],$exception_values:[]});return this.po.some(n=>{var r=n.values.map(s=>{var i,a=_A[s.operator],l=ft(s.value)?s.value:[s.value],c=(i=t[s.key])!==null&&i!==void 0?i:[];return l.length>0&&a(l,c)});return n.type==="OR"?r.some(Boolean):r.every(Boolean)})}Io(e){return e.flatMap(t=>{var n,r;
vendor: 13,727 bytes, line 18
18return(n=(r=t.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]}).some(t=>t.filename&&t.filename.startsWith("chrome-extension://"))}To(e){if(e.length>0){var t,n,r,s,i=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],a=i[i.length-1];return(r=a==null||(s=a.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}So(e){return!st(e)&&ft(e)}}},z8=pe({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Mo=null,this.Po=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[wb]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Mo||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(wb)||this.lr(()=>this.Ro())}lr(e){var t,n;(t=Me.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=Me.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",r=>{r?uN.error("Could not load product tours script",r):e()})}Ro(){var e;!this.Mo&&(e=Me.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Mo=Me.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!ft(this.Po)||t){var n=this.ni;if(n){var r=n.props[Up];if(ft(r)&&!t)return this.Po=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:s=>{var i=s.statusCode;if(i!==200||!s.json){var a="Product Tours API could not be loaded, status: "+i;return uN.error(a),void e([],{isLoaded:!1,error:a})}var l=ft(s.json.product_tours)?s.json.product_tours:[];this.Po=l,n&&n.register({[Up]:l}),e(l,{isLoaded:!0})}})}else e(this.Po,{isLoaded:!0})}getActiveProductTours(e){st(this.Mo)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Mo.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Mo)==null||t.showTourById(e)}previewTour(e){this.Mo?this.Mo.previewTour(e):this.lr(()=>{var t;this.Ro(),(t=this.Mo)==null||t.previewTour(e)})}dismissProductTour(){var e;(e=this.Mo)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Mo)==null||e.nextStep()}previousStep(){var e;(e=this.Mo)==null||e.previousStep()}clearCache(){var e;this.Po=null,(e=this.ni)==null||e.unregister(Up)}resetTour(e){var t;(t=this.Mo)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Mo)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Mo)==null||t.cancelPendingTour(e)}}},zg),H8={siteApps:class{constructor(e){this._instance=e,this.Oo=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Lo(e,t){if(t){var n=this.globalsForEvent(t);this.Oo.push(n),this.Oo.length>1e3&&(this.Oo=this.Oo.slice(10))}}get siteAppLoaders(){var e;return(e=Me._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Lo.bind(this));this.Fo=()=>{e(),this.Oo=[],this.Fo=void 0}}}globalsForEvent(e){var t,n,r,s,i,a,l;if(!e)throw new Error("Event payload is required");var c={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[h,f]of Object.entries(d))c[h]={id:u[h],type:h,properties:f};var{$set_once:p,$set:m}=e;return{event:pe({},v3(e,D8),{properties:pe({},e.properties,m?{$set:pe({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},m)}:{},p?{$set_once:pe({},(r=(s=e.properties)==null?void 0:s.$set_once)!==null&&r!==void 0?r:{},p)}:{}),elements_chain:(i=(a=e.properties)==null?void 0:a.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(l=e.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var a;!t.errored&&this.Oo.length&&(wa.info("Processing "+this.Oo.length+" events for site app with id "+e.id),this.Oo.forEach(l=>t.processEvent==null?void 0:t.processEvent(l)),t.processedBuffer=!0),Object.values(this.apps).every(l=>l.processedBuffer||l.errored)&&((a=this.Fo)==null||a.call(this))},r=!1,s=a=>{t.errored=!a,t.loaded=!0,wa.info("Site app with id "+e.id+" "+(a?"loaded":"errored")),r&&n()};try{var{processEvent:i}=e.init({posthog:this._instance,callback(a){s(a)}});i&&(t.processEvent=i),r=!0}catch(a){wa.error(dN+e.id,a),s(!1)}if(r&&t.loaded)try{n()}catch(a){wa.error("Error while processing buffered events PostHog app with config id "+e.id,a),t.errored=!0}}Ao(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}No(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){wa.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,s=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Ao(),void this._instance.on("eventCaptured",c=>this.No(c))):void wa.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Fo)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var i=function(c){var u;Me["__$$ph_site_app_"+c]=s._instance,(u=Me.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(s._instance,l,d=>{if(d)return wa.error(dN+c,d)})};for(var{id:a,url:l}of e.siteApps)i(a)}else wa.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},W8={tracingHeaders:class{constructor(e){this.$o=void 0,this.Do=void 0,this.oo=()=>{var t,n,r=this.qo()||[];we(this.$o)&&((t=Me.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(r,this._instance.get_distinct_id(),this._instance.sessionManager)),we(this.Do)&&((n=Me.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(r,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}lr(e){var t,n;(t=Me.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=Me.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",r=>{if(r)return I8.error("failed to load script",r);e()})}qo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.qo()?this.lr(this.oo):((e=this.$o)==null||e.call(this),(t=this.Do)==null||t.call(this),this.$o=void 0,this.Do=void 0)}}},V8=pe({surveys:class{get qt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.Ho=!1,this.Uo=[],this.Bo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.qt.disable_surveys){var t=e.surveys;if(st(t))return Ct.warn("Flags not loaded yet. Not loading surveys.");var n=ft(t);this.jo=n?t.length>0:t,Ct.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(zb)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach(r=>localStorage.removeItem(r))}loadIfEnabled(){if(!this._surveyManager)if(this.Ho)Ct.info("Already initializing surveys, skipping...");else if(this.qt.disable_surveys)Ct.info(hN);else if(this.qt.cookieless_mode&&this._instance.consent.isOptedOut())Ct.info("Not loading surveys in cookieless mode without consent.");else{var e=Me==null?void 0:Me.__PosthogExtensions__;if(e){if(!we(this.jo)||this.qt.advanced_enable_surveys){var t=this.jo||this.qt.advanced_enable_surveys;this.Ho=!0;try{var n=e.generateSurveys;if(n)return void this.zo(n,t);var r=e.loadExternalDependency;if(!r)return void this.Vo(v_);r(this._instance,"surveys",s=>{s||!e.generateSurveys?this.Vo("Could not load surveys script",s):this.zo(e.generateSurveys,t)})}catch(s){throw this.Vo("Error initializing surveys",s),s}finally{this.Ho=!1}}}else Ct.error("PostHog Extensions not found.")}}zo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new R8(this._instance),Ct.info("Surveys loaded successfully"),this.Wo({isLoaded:!0})}Vo(e,t){Ct.error(e,t),this.Wo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.Uo.push(e),this._surveyManager&&this.Wo({isLoaded:!0}),()=>{this.Uo=this.Uo.filter(t=>t!==e)}}getSurveys(e,t){if(t===void 0&&(t=!1),this.qt.disable_surveys)return Ct.info(hN),e([]);var n,r=this._instance.get_property(Sb);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<"u"&&this.Bo?this.Bo.then(s=>{var{surveys:i,context:a}=s;return e(i,a)}):(typeof Promise<"u"&&(this.Bo=new Promise(s=>{n=s})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.qt.token),method:"GET",timeout:this.qt.surveys_request_timeout_ms,callback:s=>{var i;this.Bo=null;var a=s.statusCode;if(a!==200||!s.json){var l="Surveys API could not be loaded, status: "+a;Ct.error(l);var c={isLoaded:!1,error:l};return e([],c),void(n==null||n({surveys:[],context:c}))}var u,d=s.json.surveys||[],h=d.filter(p=>function(m){return!(!m.start_date||m.end_date)}(p)&&(function(m){var x;return!((x=m.conditions)==null||(x=x.events)==null||(x=x.values)==null||!x.length)}(p)||function(m){var x;return!((x=m.conditions)==null||(x=x.actions)==null||(x=x.values)==null||!x.length)}(p)));h.length>0&&((u=this._surveyEventReceiver)==null||u.register(h)),(i=this._instance.persistence)==null||i.register({[Sb]:d});var f={isLoaded:!0};e(d,f),n==null||n({surveys:d,context:f})}}))}Wo(e){for(var t of this.Uo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){Ct.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!st(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Ct.warn("init was not called")}Zo(e){var t=null;return this.getSurveys(n=>{var r;t=(r=n.find(s=>s.id===e))!==null&&r!==void 0?r:null}),t}Go(e){if(st(this._surveyManager))return{eligible:!1,reason:y0};var t=typeof e=="string"?this.Zo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(st(this._surveyManager))return Ct.warn("init was not called"),{visible:!1,disabledReason:y0};var t=this.Go(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return st(this._surveyManager)?(Ct.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:y0})):new Promise(n=>{this.getSurveys(r=>{var s,i=(s=r.find(l=>l.id===e))!==null&&s!==void 0?s:null;if(i){var a=this.Go(i);n({visible:a.eligible,disabledReason:a.reason})}else n({visible:!1,disabledReason:"Survey not found"})},t)})}renderSurvey(e,t,n){var r;if(st(this._surveyManager))Ct.warn("init was not called");else{var s=typeof e=="string"?this.Zo(e):e;if(s!=null&&s.id)if(f8.includes(s.type)){var i=ve==null?void 0:ve.querySelector(t);if(i)return(r=s.appearance)!=null&&r.surveyPopupDelaySeconds?(Ct.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var a,l;Ct.info("Rendering survey "+s.id+" with delay of "+((a=s.appearance)==null?void 0:a.surveyPopupDelaySeconds)+" seconds"),(l=this._surveyManager)==null||l.renderSurvey(s,i,n),Ct.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i,n);Ct.warn("Survey element not found")}else Ct.warn("Surveys of type "+s.type+" cannot be rendered in the app");else Ct.warn("Survey not found")}}displaySurvey(e,t){var n;if(st(this._surveyManager))Ct.warn("init was not called");else{var r=this.Zo(e);if(r){var s=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(s=pe({},r,{appearance:pe({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Rb.Popover&&t.initialResponses&&Ct.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(r);if(!i.visible)return void Ct.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Rb.Inline?this._surveyManager.handlePopoverSurvey(s,t):this.renderSurvey(s,t.selector,t.properties)}else Ct.warn("Survey not found")}}cancelPendingSurvey(e){st(this._surveyManager)?Ct.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},zg),q8={toolbar:class{constructor(e){this.instance=e}Qo(e){Me.ph_toolbar_state=e}Jo(){var e;return(e=Me.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),nA(this.instance.config)||!X||!ve)return!1;e=e??X.location,n=n??X.history;try{if(!t){try{X.localStorage.setItem("test","test"),X.localStorage.removeItem("test")}catch{return!1}t=X==null?void 0:X.localStorage}var r,s=L8||Pm(e.hash,"__posthog")||Pm(e.hash,"state"),i=s?jE(()=>JSON.parse(atob(decodeURIComponent(s))))||jE(()=>JSON.parse(decodeURIComponent(s))):null;return i&&i.action==="ph_authorize"?((r=i).source="url",r&&Object.keys(r).length>0&&(i.desiredHash?e.hash=i.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(fN)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Ko(e){var t=Me.ph_load_toolbar||Me.ph_load_editor;
18!st(t)&&$i(t)?t(e,this.instance):pN.warn("No toolbar load function found")}loadToolbar(e){var t=!(ve==null||!ve.getElementById(J3));if(!X||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=pe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(X.localStorage.setItem(fN,JSON.stringify(pe({},r,{source:void 0}))),this.Jo()===2)this.Ko(r);else if(this.Jo()===0){var s;this.Qo(1),(s=Me.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",i=>{if(i)return pN.error("[Toolbar] Failed to load",i),void this.Qo(0);this.Qo(2),this.Ko(r)}),On(X,"turbolinks:load",()=>{this.Qo(0),this.loadToolbar(r)})}return!0}Yo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},Y8=pe({experiments:mr},zg),G8={conversations:class{constructor(e){this.Xo=void 0,this._conversationsManager=null,this.ea=!1,this.ta=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;st(t)||(vi(t)?this.Xo=t:(this.Xo=t.enabled,this.ta=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Xo=void 0,this.ta=null}loadIfEnabled(){if(!(this._conversationsManager||this.ea||this._instance.config.disable_conversations||nA(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=Me==null?void 0:Me.__PosthogExtensions__;if(e&&!we(this.Xo)&&this.Xo)if(this.ta&&this.ta.token){this.ea=!0;try{var t=e.initConversations;if(t)return this.ra(t),void(this.ea=!1);var n=e.loadExternalDependency;if(!n)return void this.ia(v_);n(this._instance,"conversations",r=>{r||!e.initConversations?this.ia("Could not load conversations script",r):this.ra(e.initConversations),this.ea=!1})}catch(r){this.ia("Error initializing conversations",r),this.ea=!1}}else bs.error("Conversations enabled but missing token in remote config.")}}ra(e){if(this.ta)try{this._conversationsManager=e(this.ta,this._instance),bs.info("Conversations loaded successfully")}catch(t){this.ia("Error completing conversations initialization",t)}else bs.error("Cannot complete initialization: remote config is null")}ia(e,t){bs.error(e,t),this._conversationsManager=null,this.ea=!1}show(){this._conversationsManager?this._conversationsManager.show():bs.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Xo===!0&&!fa(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var r=this;return ss(function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(bs.warn(Io),null)})()}getMessages(e,t){var n=this;return ss(function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(bs.warn(Io),null)})()}markAsRead(e){var t=this;return ss(function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(bs.warn(Io),null)})()}getTickets(e){var t=this;return ss(function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(bs.warn(Io),null)})()}requestRestoreLink(e){var t=this;return ss(function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(bs.warn(Io),null)})()}restoreFromToken(e){var t=this;return ss(function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(bs.warn(Io),null)})()}restoreFromUrlToken(){var e=this;return ss(function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(bs.warn(Io),null)})()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}ln(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},K8={logs:class{constructor(e){var t;this.na=!1,this.sa=!1,this.Gt=nn("[logs]"),this.oa=[],this.aa=0,this.ua=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.na=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!st(n)&&n&&(this.na=!0,this.loadIfEnabled())}reset(){this.oa=[],this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.aa=0,this.ua=0,this.la=!1}loadIfEnabled(){if(this.na&&!this.sa){var e=Me==null?void 0:Me.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",n=>{var r;n||(r=e.logs)==null||!r.initializeLogs?this.Gt.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.sa=!0)}):this.Gt.error(v_)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,s,i,a;if(this._instance.is_capturing())if(e&&e.body){var l=(t=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&t!==void 0?t:3e3,c=(r=(s=this._instance.config.logs)==null?void 0:s.maxLogsPerInterval)!==null&&r!==void 0?r:1e3,u=Date.now();if(l>u-this.ua||(this.ua=u,this.aa=0,this.la=!1),c>this.aa){this.aa++;var d=function(h,f){var p=h.level||"info",{text:m,number:x}=z3[p]||oL,w=String(Date.now())+"000000",g={};f.distinctId&&(g.posthogDistinctId=f.distinctId),f.sessionId&&(g.sessionId=f.sessionId),f.currentUrl&&(g["url.full"]=f.currentUrl),f.screenName&&(g["screen.name"]=f.screenName),f.appState&&(g["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(g.feature_flags=f.activeFeatureFlags);var b=pe({},g,h.attributes||{}
vendor: 13,698 bytes, lines 18-35
18),_={timeUnixNano:w,observedTimeUnixNano:w,severityNumber:x,severityText:m,body:{stringValue:h.body},attributes:TE(b)};return h.trace_id&&(_.traceId=h.trace_id),h.span_id&&(_.spanId=h.span_id),we(h.trace_flags)||(_.flags=h.trace_flags),_}(e,this.ha());this.oa.push({record:d}),((i=(a=this._instance.config.logs)==null?void 0:a.maxBufferSize)!==null&&i!==void 0?i:100)>this.oa.length?this.ca():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+c+" logs per "+l+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.da||(this.da={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.da}flushLogs(e){if(this.qr&&(clearTimeout(this.qr),this.qr=void 0),this.oa.length!==0){var t=this.oa;this.oa=[];var n=this._instance.config.logs,r=pe({"service.name":(n==null?void 0:n.serviceName)||"unknown_service"},(n==null?void 0:n.environment)&&{"deployment.environment":n.environment},(n==null?void 0:n.serviceVersion)&&{"service.version":n.serviceVersion},n==null?void 0:n.resourceAttributes),s=function(a,l,c,u){return{resourceLogs:[{resource:{attributes:TE(l)},scopeLogs:[{scope:{name:c,version:u},logRecords:a}]}]}}(t.map(a=>a.record),r,Ar.LIB_NAME,Ar.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Bi({method:"POST",url:i,data:s,compression:"best-available",batchKey:"logs",transport:e})}}ca(){var e,t;this.qr||(this.qr=setTimeout(()=>{this.qr=void 0,this.flushLogs()},(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ha(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(Me!=null&&(e=Me.location)!=null&&e.href&&(t.currentUrl=Me.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},Q8=pe({},zg,B8,U8,$8,z8,H8,V8,W8,q8,Y8,G8,K8);ks.__defaultExtensionClasses=pe({},Q8);var yN,Ot=(yN=Yd[Xl]=new ks,function(){function e(){e.done||(e.done=!0,NA=!1,Ht(Yd,function(t){t._dom_loaded()}))}ve!=null&&ve.addEventListener?ve.readyState==="complete"?e():On(ve,"DOMContentLoaded",e,{capture:!1}):X&&be.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),yN),DA={exports:{}},gs={},OA={exports:{}},MA={};/** 19 * @license React 20 * scheduler.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */(function(e){function t(U,H){var A=U.length;U.push(H);e:for(;0<A;){var q=A-1>>>1,V=U[q];if(0<s(V,H))U[q]=H,U[A]=V,A=q;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var H=U[0],A=U.pop();if(A!==H){U[0]=A;e:for(var q=0,V=U.length,D=V>>>1;q<D;){var te=2*(q+1)-1,J=U[te],ue=te+1,Ne=U[ue];if(0>s(J,A))ue<V&&0>s(Ne,J)?(U[q]=Ne,U[ue]=A,q=ue):(U[q]=J,U[te]=A,q=te);else if(ue<V&&0>s(Ne,A))U[q]=Ne,U[ue]=A,q=ue;else break e}}return H}function s(U,H){var A=U.sortIndex-H.sortIndex;return A!==0?A:U.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var H=n(u);H!==null;){if(H.callback===null)r(u);else if(H.startTime<=U)r(u),H.sortIndex=H.expirationTime,t(c,H);else break;H=n(u)}}function k(U){if(x=!1,_(U),!m)if(n(c)!==null)m=!0,B(T);else{var H=n(u);H!==null&&O(k,H.startTime-U)}}function T(U,H){m=!1,x&&(x=!1,g(S),S=-1),p=!0;var A=f;try{for(_(H),h=n(c);h!==null&&(!(h.expirationTime>H)||U&&!j());){var q=h.callback;if(typeof q=="function"){h.callback=null,f=h.priorityLevel;var V=q(h.expirationTime<=H);H=e.unstable_now(),typeof V=="function"?h.callback=V:h===n(c)&&r(c),_(H)}else r(c);h=n(c)}if(h!==null)var D=!0;else{var te=n(u);te!==null&&O(k,te.startTime-H),D=!1}return D}finally{h=null,f=A,p=!1}}var N=!1,C=null,S=-1,I=5,E=-1;function j(){return!(e.unstable_now()-E<I)}function P(){if(C!==null){var U=e.unstable_now();E=U;var H=!0;try{H=C(!0,U)}finally{H?L():(N=!1,C=null)}}else N=!1}var L;if(typeof b=="function")L=function(){b(P)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,R=z.port2;z.port1.onmessage=P,L=function(){R.postMessage(null)}}else L=function(){w(P,0)};function B(U){C=U,N||(N=!0,L())}function O(U,H){S=w(function(){U(e.unstable_now())},H)}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(U){U.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,B(T))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(U){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var A=f;f=H;try{return U()}finally{f=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,H){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var A=f;f=U;try{return H()}finally{f=A}},e.unstable_scheduleCallback=function(U,H,A){var q=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?q+A:q):A=q,U){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=A+V,U={id:d++,callback:H,priorityLevel:U,startTime:A,expirationTime:V,sortIndex:-1},A>q?(U.sortIndex=A,t(u,U),n(c)===null&&U===n(u)&&(x?(g(S),S=-1):x=!0,O(k,A-q))):(U.sortIndex=V,t(c,U),m||p||(m=!0,B(T))),U},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(U){var H=f;return function(){var A=f;f=H;try{return U.apply(this,arguments)}finally{f=A}}}})(MA);OA.exports=MA;var X8=OA.exports;/** 27 * @license React 28 * react-dom.production.min.js 29 * 30 * Copyright (c) Facebook, Inc. and its affiliates. 31 * 32 * This source code is licensed under the MIT license found in the 33 * LICENSE file in the root directory of this source tree. 34 */var J8=y,hs=X8;function he(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var RA=new Set,Sh={};function kl(e,t){Xc(e,t),Xc(e+"Capture",t)}function Xc(e,t){for(Sh[e]=t,e=0;e<t.length;e++)RA.add(t[e])}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yb=Object.prototype.hasOwnProperty,Z8=/^[: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]*$/,bN={},vN={};function eF(e){return Yb.call(vN,e)?!0:Yb.call(bN,e)?!1:Z8.test(e)?vN[e]=!0:(bN[e]=!0,!1)}function tF(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function nF(e,t,n,r){if(t===null||typeof t>"u"||tF(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Fr(e,t,n,r,s,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var cr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){cr[e]=new Fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];cr[t]=new Fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){cr[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){cr[e]=new Fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){cr[e]=new Fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){cr[e]=new Fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){cr[e]=new Fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){cr[e]=new Fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){cr[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var S_=/[\-:]([a-z])/g;function C_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(S_,C_);cr[t]=new Fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(S_,C_);cr[t]=new Fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(S_,C_);cr[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){cr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)});cr.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){cr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function j_(e,t,n,r){var s=cr.hasOwnProperty(t)?cr[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(nF(t,n,s,r)&&(n=null),r||s===null?eF(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var pa=J8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ip=Symbol.for("react.element"),rc=Symbol.for("react.portal"),sc=Symbol.for("react.fragment"),A_=Symbol.for("react.strict_mode"),Gb=Symbol.for("react.profiler"),LA=Symbol.for("react.provider"),FA=Symbol.for("react.context"),I_=Symbol.for("react.forward_ref"),Kb=Symbol.for("react.suspense"),Qb=Symbol.for("react.suspense_list"),P_=Symbol.for("react.memo"),Da=Symbol.for("react.lazy"),BA=Symbol.for("react.offscreen"),_N=Symbol.iterator;function td(e){return e===null||typeof e!="object"?null:(e=_N&&e[_N]||e["@@iterator"],typeof e=="function"?e:null)}var hn=Object.assign,v0;function Id(e){if(v0===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);v0=t&&t[1]||""}return` 35`+v0+e}var _0=!1;function w0(e,t){if(!e||_0)return"";_0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}
vendor: 15,613 bytes, lines 35-38
35catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(` 36`),i=r.stack.split(` 37`),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var c=` 38`+s[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=l);break}}}finally{_0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Id(e):""}function rF(e){switch(e.tag){case 5:return Id(e.type);case 16:return Id("Lazy");case 13:return Id("Suspense");case 19:return Id("SuspenseList");case 0:case 2:case 15:return e=w0(e.type,!1),e;case 11:return e=w0(e.type.render,!1),e;case 1:return e=w0(e.type,!0),e;default:return""}}function Xb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sc:return"Fragment";case rc:return"Portal";case Gb:return"Profiler";case A_:return"StrictMode";case Kb:return"Suspense";case Qb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case FA:return(e.displayName||"Context")+".Consumer";case LA:return(e._context.displayName||"Context")+".Provider";case I_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P_:return t=e.displayName||null,t!==null?t:Xb(e.type)||"Memo";case Da:t=e._payload,e=e._init;try{return Xb(e(t))}catch{}}return null}function sF(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xb(t);case 8:return t===A_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function uo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UA(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function iF(e){var t=UA(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ap(e){e._valueTracker||(e._valueTracker=iF(e))}function $A(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UA(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Jb(e,t){var n=t.checked;return hn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function wN(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=uo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zA(e,t){t=t.checked,t!=null&&j_(e,"checked",t,!1)}function Zb(e,t){zA(e,t);var n=uo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?e1(e,t.type,n):t.hasOwnProperty("defaultValue")&&e1(e,t.type,uo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function EN(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function e1(e,t,n){(t!=="number"||Lm(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pd=Array.isArray;function Nc(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+uo(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function t1(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(he(91));return hn({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function NN(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(he(92));if(Pd(n)){if(1<n.length)throw Error(he(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:uo(n)}}function HA(e,t){var n=uo(t.value),r=uo(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function kN(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function WA(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function n1(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?WA(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var op,VA=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(op=op||document.createElement("div"),op.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=op.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ch(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},aF=["Webkit","ms","Moz","O"];Object.keys(Kd).forEach(function(e){aF.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kd[t]=Kd[e]})});function qA(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kd.hasOwnProperty(e)&&Kd[e]?(""+t).trim():t+"px"}function YA(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=qA(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var oF=hn({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function r1(e,t){if(t){if(oF[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(he(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(he(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(he(61))}if(t.style!=null&&typeof t.style!="object")throw Error(he(62))}}function s1(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i1=null;function D_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var a1=null,kc=null,Tc=null;function TN(e){if(e=yf(e)){if(typeof a1!="function")throw Error(he(280));var t=e.stateNode;t&&(t=Yg(t),a1(e.stateNode,e.type,t))}}function GA(e){kc?Tc?Tc.push(e):Tc=[e]:kc=e}function KA(){if(kc){var e=kc,t=Tc;if(Tc=kc=null,TN(e),t)for(e=0;e<t.length;e++)TN(t[e])}}function QA(e,t){return e(t)}function XA(){}var E0=!1;function JA(e,t,n){if(E0)return e(t,n);E0=!0;try{return QA(e,t,n)}finally{E0=!1,(kc!==null||Tc!==null)&&(XA(),KA())}}function jh(e,t){var n=e.stateNode;if(n===null)return null;var r=Yg(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(he(231,t,typeof n));return n}var o1=!1;if(aa)try{var nd={};Object.defineProperty(nd,"passive",{get:function(){o1=!0}}),window.addEventListener("test",nd,nd),window.removeEventListener("test",nd,nd)}catch{o1=!1}function lF(e,t,n,r,s,i,a,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var Qd=!1,Fm=null,Bm=!1,l1=null,cF={onError:function(e){Qd=!0,Fm=e}};function uF(e,t,n,r,s,i,a,l,c){Qd=!1,Fm=null,lF.apply(cF,arguments)}function dF(e,t,n,r,s,i,a,l,c){if(uF.apply(this,arguments),Qd){if(Qd){var u=Fm;Qd=!1,Fm=null}else throw Error(he(198));Bm||(Bm=!0,l1=u)}}function Tl(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ZA(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function SN(e){if(Tl(e)!==e)throw Error(he(188))}function hF(e){var t=e.alternate;if(!t){if(t=Tl(e),t===null)throw Error(he(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return SN(s),e;if(i===r)return SN(s),t;i=i.sibling}throw Error(he(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a)throw Error(he(189))}}if(n.alternate!==r)throw Error(he(190))}if(n.tag!==3)throw Error(he(188));return n.stateNode.current===n?e:t}function eI(e){return e=hF(e),e!==null?tI(e):null}function tI(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=tI(e);if(t!==null)return t;e=e.sibling}return null}var nI=hs.unstable_scheduleCallback,CN=hs.unstable_cancelCallback,fF=hs.unstable_shouldYield,pF=hs.unstable_requestPaint,Tn=hs.unstable_now,mF=hs.unstable_getCurrentPriorityLevel,O_=hs.unstable_ImmediatePriority,rI=hs.unstable_UserBlockingPriority,Um=hs.unstable_NormalPriority,gF=hs.unstable_LowPriority,sI=hs.unstable_IdlePriority,Hg=null,Ei=null;function xF(e){if(Ei&&typeof Ei.onCommitFiberRoot=="function")try{Ei.onCommitFiberRoot(Hg,e,void 0,(e.current.flags&128)===128)}catch{}}var Zs=Math.clz32?Math.clz32:vF,yF=Math.log,bF=Math.LN2;function vF(e){return e>>>=0,e===0?32:31-(yF(e)/bF|0)|0}var lp=64,cp=4194304;function Dd(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $m(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Dd(l):(i&=a,i!==0&&(r=Dd(i)))}else a=n&~s,a!==0?r=Dd(a):i!==0&&(r=Dd(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Zs(t),s=1<<n,r|=e[n],t&=~s;return r}function _F(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wF(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-Zs(i),l=1<<a,c=s[a];c===-1?(!(l&n)||l&r)&&(s[a]=_F(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function c1(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function iI(){var e=lp;return lp<<=1,!(lp&4194240)&&(lp=64),e}function N0(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gf(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zs(t),e[t]=n}function EF(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Zs(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function M_(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Zs(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Tt=0;function aI(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var oI,R_,lI,cI,uI,u1=!1,up=[],eo=null,to=null,no=null,Ah=new Map,Ih=new Map,Ra=[],NF="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function jN(e,t){switch(e){case"focusin":case"focusout":eo=null;break;case"dragenter":case"dragleave":to=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":Ah.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ih.delete(t.pointerId)}}function rd(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=yf(t),t!==null&&R_(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}
vendor: 11,707 bytes, line 38
38function kF(e,t,n,r,s){switch(t){case"focusin":return eo=rd(eo,e,t,n,r,s),!0;case"dragenter":return to=rd(to,e,t,n,r,s),!0;case"mouseover":return no=rd(no,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Ah.set(i,rd(Ah.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ih.set(i,rd(Ih.get(i)||null,e,t,n,r,s)),!0}return!1}function dI(e){var t=Yo(e.target);if(t!==null){var n=Tl(t);if(n!==null){if(t=n.tag,t===13){if(t=ZA(n),t!==null){e.blockedOn=t,uI(e.priority,function(){lI(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Wp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=d1(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);i1=r,n.target.dispatchEvent(r),i1=null}else return t=yf(n),t!==null&&R_(t),e.blockedOn=n,!1;t.shift()}return!0}function AN(e,t,n){Wp(e)&&n.delete(t)}function TF(){u1=!1,eo!==null&&Wp(eo)&&(eo=null),to!==null&&Wp(to)&&(to=null),no!==null&&Wp(no)&&(no=null),Ah.forEach(AN),Ih.forEach(AN)}function sd(e,t){e.blockedOn===t&&(e.blockedOn=null,u1||(u1=!0,hs.unstable_scheduleCallback(hs.unstable_NormalPriority,TF)))}function Ph(e){function t(s){return sd(s,e)}if(0<up.length){sd(up[0],e);for(var n=1;n<up.length;n++){var r=up[n];r.blockedOn===e&&(r.blockedOn=null)}}for(eo!==null&&sd(eo,e),to!==null&&sd(to,e),no!==null&&sd(no,e),Ah.forEach(t),Ih.forEach(t),n=0;n<Ra.length;n++)r=Ra[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ra.length&&(n=Ra[0],n.blockedOn===null);)dI(n),n.blockedOn===null&&Ra.shift()}var Sc=pa.ReactCurrentBatchConfig,zm=!0;function SF(e,t,n,r){var s=Tt,i=Sc.transition;Sc.transition=null;try{Tt=1,L_(e,t,n,r)}finally{Tt=s,Sc.transition=i}}function CF(e,t,n,r){var s=Tt,i=Sc.transition;Sc.transition=null;try{Tt=4,L_(e,t,n,r)}finally{Tt=s,Sc.transition=i}}function L_(e,t,n,r){if(zm){var s=d1(e,t,n,r);if(s===null)O0(e,t,r,Hm,n),jN(e,r);else if(kF(s,e,t,n,r))r.stopPropagation();else if(jN(e,r),t&4&&-1<NF.indexOf(e)){for(;s!==null;){var i=yf(s);if(i!==null&&oI(i),i=d1(e,t,n,r),i===null&&O0(e,t,r,Hm,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else O0(e,t,r,null,n)}}var Hm=null;function d1(e,t,n,r){if(Hm=null,e=D_(r),e=Yo(e),e!==null)if(t=Tl(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ZA(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Hm=e,null}function hI(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(mF()){case O_:return 1;case rI:return 4;case Um:case gF:return 16;case sI:return 536870912;default:return 16}default:return 16}}var Ya=null,F_=null,Vp=null;function fI(){if(Vp)return Vp;var e,t=F_,n=t.length,r,s="value"in Ya?Ya.value:Ya.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Vp=s.slice(e,1<r?1-r:void 0)}function qp(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function dp(){return!0}function IN(){return!1}function xs(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?dp:IN,this.isPropagationStopped=IN,this}return hn(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=dp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=dp)},persist:function(){},isPersistent:dp}),t}var wu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},B_=xs(wu),xf=hn({},wu,{view:0,detail:0}),jF=xs(xf),k0,T0,id,Wg=hn({},xf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:U_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==id&&(id&&e.type==="mousemove"?(k0=e.screenX-id.screenX,T0=e.screenY-id.screenY):T0=k0=0,id=e),k0)},movementY:function(e){return"movementY"in e?e.movementY:T0}}),PN=xs(Wg),AF=hn({},Wg,{dataTransfer:0}),IF=xs(AF),PF=hn({},xf,{relatedTarget:0}),S0=xs(PF),DF=hn({},wu,{animationName:0,elapsedTime:0,pseudoElement:0}),OF=xs(DF),MF=hn({},wu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),RF=xs(MF),LF=hn({},wu,{data:0}),DN=xs(LF),FF={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BF={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"},UF={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $F(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=UF[e])?!!t[e]:!1}function U_(){return $F}var zF=hn({},xf,{key:function(e){if(e.key){var t=FF[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BF[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:U_,charCode:function(e){return e.type==="keypress"?qp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),HF=xs(zF),WF=hn({},Wg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ON=xs(WF),VF=hn({},xf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:U_}),qF=xs(VF),YF=hn({},wu,{propertyName:0,elapsedTime:0,pseudoElement:0}),GF=xs(YF),KF=hn({},Wg,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),QF=xs(KF),XF=[9,13,27,32],$_=aa&&"CompositionEvent"in window,Xd=null;aa&&"documentMode"in document&&(Xd=document.documentMode);var JF=aa&&"TextEvent"in window&&!Xd,pI=aa&&(!$_||Xd&&8<Xd&&11>=Xd),MN=" ",RN=!1;function mI(e,t){switch(e){case"keyup":return XF.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gI(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ic=!1;function ZF(e,t){switch(e){case"compositionend":return gI(t);case"keypress":return t.which!==32?null:(RN=!0,MN);case"textInput":return e=t.data,e===MN&&RN?null:e;default:return null}}function e9(e,t){if(ic)return e==="compositionend"||!$_&&mI(e,t)?(e=fI(),Vp=F_=Ya=null,ic=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return pI&&t.locale!=="ko"?null:t.data;default:return null}}var t9={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 LN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!t9[e.type]:t==="textarea"}function xI(e,t,n,r){GA(r),t=Wm(t,"onChange"),0<t.length&&(n=new B_("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jd=null,Dh=null;function n9(e){CI(e,0)}function Vg(e){var t=lc(e);if($A(t))return e}function r9(e,t){if(e==="change")return t}var yI=!1;if(aa){var C0;if(aa){var j0="oninput"in document;if(!j0){var FN=document.createElement("div");FN.setAttribute("oninput","return;"),j0=typeof FN.oninput=="function"}C0=j0}else C0=!1;yI=C0&&(!document.documentMode||9<document.documentMode)}function BN(){Jd&&(Jd.detachEvent("onpropertychange",bI),Dh=Jd=null)}function bI(e){if(e.propertyName==="value"&&Vg(Dh)){var t=[];xI(t,Dh,e,D_(e)),JA(n9,t)}}function s9(e,t,n){e==="focusin"?(BN(),Jd=t,Dh=n,Jd.attachEvent("onpropertychange",bI)):e==="focusout"&&BN()}function i9(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Vg(Dh)}function a9(e,t){if(e==="click")return Vg(t)}function o9(e,t){if(e==="input"||e==="change")return Vg(t)}function l9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ri=typeof Object.is=="function"?Object.is:l9;function Oh(e,t){if(ri(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Yb.call(t,s)||!ri(e[s],t[s]))return!1}return!0}function UN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $N(e,t){var n=UN(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=UN(n)}}function vI(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vI(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _I(){for(var e=window,t=Lm();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lm(e.document)}return t}function z_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function c9(e){var t=_I(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&vI(n.ownerDocument.documentElement,n)){if(r!==null&&z_(n)){if
vendor: 4,424 bytes, line 38
38(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=$N(n,i);var a=$N(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var u9=aa&&"documentMode"in document&&11>=document.documentMode,ac=null,h1=null,Zd=null,f1=!1;function zN(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;f1||ac==null||ac!==Lm(r)||(r=ac,"selectionStart"in r&&z_(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zd&&Oh(Zd,r)||(Zd=r,r=Wm(h1,"onSelect"),0<r.length&&(t=new B_("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ac)))}function hp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var oc={animationend:hp("Animation","AnimationEnd"),animationiteration:hp("Animation","AnimationIteration"),animationstart:hp("Animation","AnimationStart"),transitionend:hp("Transition","TransitionEnd")},A0={},wI={};aa&&(wI=document.createElement("div").style,"AnimationEvent"in window||(delete oc.animationend.animation,delete oc.animationiteration.animation,delete oc.animationstart.animation),"TransitionEvent"in window||delete oc.transitionend.transition);function qg(e){if(A0[e])return A0[e];if(!oc[e])return e;var t=oc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wI)return A0[e]=t[n];return e}var EI=qg("animationend"),NI=qg("animationiteration"),kI=qg("animationstart"),TI=qg("transitionend"),SI=new Map,HN="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function go(e,t){SI.set(e,t),kl(t,[e])}for(var I0=0;I0<HN.length;I0++){var P0=HN[I0],d9=P0.toLowerCase(),h9=P0[0].toUpperCase()+P0.slice(1);go(d9,"on"+h9)}go(EI,"onAnimationEnd");go(NI,"onAnimationIteration");go(kI,"onAnimationStart");go("dblclick","onDoubleClick");go("focusin","onFocus");go("focusout","onBlur");go(TI,"onTransitionEnd");Xc("onMouseEnter",["mouseout","mouseover"]);Xc("onMouseLeave",["mouseout","mouseover"]);Xc("onPointerEnter",["pointerout","pointerover"]);Xc("onPointerLeave",["pointerout","pointerover"]);kl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));kl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));kl("onBeforeInput",["compositionend","keypress","textInput","paste"]);kl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));kl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));kl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Od="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(" "),f9=new Set("cancel close invalid load scroll toggle".split(" ").concat(Od));function WN(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,dF(r,t,void 0,e),e.currentTarget=null}
vendor: 4,257 bytes, line 38
38function CI(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;WN(s,l,u),i=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;WN(s,l,u),i=c}}}if(Bm)throw e=l1,Bm=!1,l1=null,e}function $t(e,t){var n=t[y1];n===void 0&&(n=t[y1]=new Set);var r=e+"__bubble";n.has(r)||(jI(t,e,2,!1),n.add(r))}function D0(e,t,n){var r=0;t&&(r|=4),jI(n,e,r,t)}var fp="_reactListening"+Math.random().toString(36).slice(2);function Mh(e){if(!e[fp]){e[fp]=!0,RA.forEach(function(n){n!=="selectionchange"&&(f9.has(n)||D0(n,!1,e),D0(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fp]||(t[fp]=!0,D0("selectionchange",!1,t))}}function jI(e,t,n,r){switch(hI(t)){case 1:var s=SF;break;case 4:s=CF;break;default:s=L_}n=s.bind(null,t,n,e),s=void 0,!o1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function O0(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&(c=a.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;a=a.return}for(;l!==null;){if(a=Yo(l),a===null)return;if(c=a.tag,c===5||c===6){r=i=a;continue e}l=l.parentNode}}r=r.return}JA(function(){var u=i,d=D_(n),h=[];e:{var f=SI.get(e);if(f!==void 0){var p=B_,m=e;switch(e){case"keypress":if(qp(n)===0)break e;case"keydown":case"keyup":p=HF;break;case"focusin":m="focus",p=S0;break;case"focusout":m="blur",p=S0;break;case"beforeblur":case"afterblur":p=S0;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=PN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=IF;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=qF;break;case EI:case NI:case kI:p=OF;break;case TI:p=GF;break;case"scroll":p=jF;break;case"wheel":p=QF;break;case"copy":case"cut":case"paste":p=RF;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=ON}var x=(t&4)!==0,w=!x&&e==="scroll",g=x?f!==null?f+"Capture":null:f;x=[];for(var b=u,_;b!==null;){_=b;var k=_.stateNode;if(_.tag===5&&k!==null&&(_=k,g!==null&&(k=jh(b,g),k!=null&&x.push(Rh(b,k,_)))),w)break;b=b.return}0<x.length&&(f=new p(f,m,null,n,d),h.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==i1&&(m=n.relatedTarget||n.fromElement)&&(Yo(m)||m[oa]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?Yo(m):null,m!==null&&(w=Tl(m),m!==w||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(x=PN,k="onMouseLeave",g="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(x=ON,k="onPointerLeave",g="onPointerEnter",b="pointer"),w=p==null?f:lc(p),_=m==null?f:lc(m),f=new x(k,b+"leave",p,n,d),f.target=w,f.relatedTarget=_,k=null,Yo(d)===u&&(x=new x(g,b+"enter",m,n,d),x.target=_,x.relatedTarget=w,k=x),w=k,p&&m)t:{for(x=p,g=m,b=0,_=x;_;_=Ul(_))b++;for(_=0,k=g;k;k=Ul(k))_++;for(;0<b-_;)x=Ul(x),b--;for(;0<_-b;)g=Ul(g),_--;for(;b--;){if(x===g||g!==null&&x===g.alternate)break t;x=Ul(x),g=Ul(g)}x=null}else x=null;p!==null&&VN(h,f,p,x,!1),m!==null&&w!==null&&VN(h,w,m,x,!0)}}e:{if(f=u?lc(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var T=r9;else if(LN(f))if(yI)T=o9;else{T=i9;var N=s9}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(T=a9);if(T&&(T=T(e,u))){xI(h,T,n,d);break e}N&&N(e,f,u),e==="focusout"&&(N=f._wrapperState)&&N.controlled&&f.type==="number"&&e1(f,"
38number",f.value)}switch(N=u?lc(u):window,e){case"focusin":(LN(N)||N.contentEditable==="true")&&(ac=N,h1=u,Zd=null);break;case"focusout":Zd=h1=ac=null;break;case"mousedown":f1=!0;break;case"contextmenu":case"mouseup":case"dragend":f1=!1,zN(h,n,d);break;case"selectionchange":if(u9)break;case"keydown":case"keyup":zN(h,n,d)}var C;if($_)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else ic?mI(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(pI&&n.locale!=="ko"&&(ic||S!=="onCompositionStart"?S==="onCompositionEnd"&&ic&&(C=fI()):(Ya=d,F_="value"in Ya?Ya.value:Ya.textContent,ic=!0)),N=Wm(u,S),0<N.length&&(S=new DN(S,e,null,n,d),h.push({event:S,listeners:N}),C?S.data=C:(C=gI(n),C!==null&&(S.data=C)))),(C=JF?ZF(e,n):e9(e,n))&&(u=Wm(u,"onBeforeInput"),0<u.length&&(d=new DN("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=C))}CI(h,t)})}function Rh(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wm(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=jh(e,n),i!=null&&r.unshift(Rh(e,i,s)),i=jh(e,t),i!=null&&r.push(Rh(e,i,s))),e=e.return}return r}function Ul(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function VN(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=jh(n,i),c!=null&&a.unshift(Rh(n,c,l))):s||(c=jh(n,i),c!=null&&a.push(Rh(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var p9=/\r\n?/g,m9=/\u0000|\uFFFD/g;function qN(e){return(typeof e=="string"?e:""+e).replace(p9,` 39`).replace(m9,"")}function pp(e,t,n){if(t=qN(t),qN(e)!==t&&n)throw Error(he(425))}function Vm(){}var p1=null,m1=null;function g1(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var x1=typeof setTimeout=="function"?setTimeout:void 0,g9=typeof clearTimeout=="function"?clearTimeout:void 0,YN=typeof Promise=="function"?Promise:void 0,x9=typeof queueMicrotask=="function"?queueMicrotask:typeof YN<"u"?function(e){return YN.resolve(null).then(e).catch(y9)}:x1;function y9(e){setTimeout(function(){throw e})}function M0(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ph(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ph(t)}function ro(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function GN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Eu=Math.random().toString(36).slice(2),bi="__reactFiber$"+Eu,Lh="__reactProps$"+Eu,oa="__reactContainer$"+Eu,y1="__reactEvents$"+Eu,b9="__reactListeners$"+Eu,v9="__reactHandles$"+Eu;function Yo(e){var t=e[bi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[oa]||n[bi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=GN(e);e!==null;){if(n=e[bi])return n;e=GN(e)}return t}e=n,n=e.parentNode}return null}function yf(e){return e=e[bi]||e[oa],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function lc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(he(33))}function Yg(e){return e[Lh]||null}var b1=[],cc=-1;function xo(e){return{current:e}}function Vt(e){0>cc||(e.current=b1[cc],b1[cc]=null,cc--)}function Mt(e,t){cc++,b1[cc]=e.current,e.current=t}var ho={},wr=xo(ho),Kr=xo(!1),xl=ho;function Jc(e,t){var n=e.type.contextTypes;if(!n)return ho;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Qr(e){return e=e.childContextTypes,e!=null}function qm(){Vt(Kr),Vt(wr)}function KN(e,t,n){if(wr.current!==ho)throw Error(he(168));Mt(wr,t),Mt(Kr,n)}function AI(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(he(108,sF(e)||"Unknown",s));return hn({},n,r)}function Ym(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ho,xl=wr.current,Mt(wr,e),Mt(Kr,Kr.current),!0}function QN(e,t,n){var r=e.stateNode;if(!r)throw Error(he(169));n?(e=AI(e,t,xl),r.__reactInternalMemoizedMergedChildContext=e,Vt(Kr),Vt(wr),Mt(wr,e)):Vt(Kr),Mt(Kr,n)}var zi=null,Gg=!1,R0=!1;function II(e){zi===null?zi=[e]:zi.push(e)}
vendor: 24,911 bytes, lines 39-41
39function _9(e){Gg=!0,II(e)}function yo(){if(!R0&&zi!==null){R0=!0;var e=0,t=Tt;try{var n=zi;for(Tt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}zi=null,Gg=!1}catch(s){throw zi!==null&&(zi=zi.slice(e+1)),nI(O_,yo),s}finally{Tt=t,R0=!1}}return null}var uc=[],dc=0,Gm=null,Km=0,Ts=[],Ss=0,yl=null,Xi=1,Ji="";function Lo(e,t){uc[dc++]=Km,uc[dc++]=Gm,Gm=e,Km=t}function PI(e,t,n){Ts[Ss++]=Xi,Ts[Ss++]=Ji,Ts[Ss++]=yl,yl=e;var r=Xi;e=Ji;var s=32-Zs(r)-1;r&=~(1<<s),n+=1;var i=32-Zs(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Xi=1<<32-Zs(t)+s|n<<s|r,Ji=i+e}else Xi=1<<i|n<<s|r,Ji=e}function H_(e){e.return!==null&&(Lo(e,1),PI(e,1,0))}function W_(e){for(;e===Gm;)Gm=uc[--dc],uc[dc]=null,Km=uc[--dc],uc[dc]=null;for(;e===yl;)yl=Ts[--Ss],Ts[Ss]=null,Ji=Ts[--Ss],Ts[Ss]=null,Xi=Ts[--Ss],Ts[Ss]=null}var ls=null,as=null,Zt=!1,Qs=null;function DI(e,t){var n=As(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function XN(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ls=e,as=ro(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ls=e,as=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=yl!==null?{id:Xi,overflow:Ji}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=As(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ls=e,as=null,!0):!1;default:return!1}}function v1(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _1(e){if(Zt){var t=as;if(t){var n=t;if(!XN(e,t)){if(v1(e))throw Error(he(418));t=ro(n.nextSibling);var r=ls;t&&XN(e,t)?DI(r,n):(e.flags=e.flags&-4097|2,Zt=!1,ls=e)}}else{if(v1(e))throw Error(he(418));e.flags=e.flags&-4097|2,Zt=!1,ls=e}}}function JN(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ls=e}function mp(e){if(e!==ls)return!1;if(!Zt)return JN(e),Zt=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!g1(e.type,e.memoizedProps)),t&&(t=as)){if(v1(e))throw OI(),Error(he(418));for(;t;)DI(e,t),t=ro(t.nextSibling)}if(JN(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(he(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){as=ro(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}as=null}}else as=ls?ro(e.stateNode.nextSibling):null;return!0}function OI(){for(var e=as;e;)e=ro(e.nextSibling)}function Zc(){as=ls=null,Zt=!1}function V_(e){Qs===null?Qs=[e]:Qs.push(e)}var w9=pa.ReactCurrentBatchConfig;function ad(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(he(309));var r=n.stateNode}if(!r)throw Error(he(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(a){var l=s.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(he(284));if(!n._owner)throw Error(he(290,e))}return e}function gp(e,t){throw e=Object.prototype.toString.call(t),Error(he(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZN(e){var t=e._init;return t(e._payload)}function MI(e){function t(g,b){if(e){var _=g.deletions;_===null?(g.deletions=[b],g.flags|=16):_.push(b)}}function n(g,b){if(!e)return null;for(;b!==null;)t(g,b),b=b.sibling;return null}function r(g,b){for(g=new Map;b!==null;)b.key!==null?g.set(b.key,b):g.set(b.index,b),b=b.sibling;return g}function s(g,b){return g=oo(g,b),g.index=0,g.sibling=null,g}function i(g,b,_){return g.index=_,e?(_=g.alternate,_!==null?(_=_.index,_<b?(g.flags|=2,b):_):(g.flags|=2,b)):(g.flags|=1048576,b)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,b,_,k){return b===null||b.tag!==6?(b=H0(_,g.mode,k),b.return=g,b):(b=s(b,_),b.return=g,b)}function c(g,b,_,k){var T=_.type;return T===sc?d(g,b,_.props.children,k,_.key):b!==null&&(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Da&&ZN(T)===b.type)?(k=s(b,_.props),k.ref=ad(g,b,_),k.return=g,k):(k=Zp(_.type,_.key,_.props,null,g.mode,k),k.ref=ad(g,b,_),k.return=g,k)}function u(g,b,_,k){return b===null||b.tag!==4||b.stateNode.containerInfo!==_.containerInfo||b.stateNode.implementation!==_.implementation?(b=W0(_,g.mode,k),b.return=g,b):(b=s(b,_.children||[]),b.return=g,b)}function d(g,b,_,k,T){return b===null||b.tag!==7?(b=cl(_,g.mode,k,T),b.return=g,b):(b=s(b,_),b.return=g,b)}function h(g,b,_){if(typeof b=="string"&&b!==""||typeof b=="number")return b=H0(""+b,g.mode,_),b.return=g,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ip:return _=Zp(b.type,b.key,b.props,null,g.mode,_),_.ref=ad(g,null,b),_.return=g,_;case rc:return b=W0(b,g.mode,_),b.return=g,b;case Da:var k=b._init;return h(g,k(b._payload),_)}if(Pd(b)||td(b))return b=cl(b,g.mode,_,null),b.return=g,b;gp(g,b)}return null}function f(g,b,_,k){var T=b!==null?b.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return T!==null?null:l(g,b,""+_,k);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ip:return _.key===T?c(g,b,_,k):null;case rc:return _.key===T?u(g,b,_,k):null;case Da:return T=_._init,f(g,b,T(_._payload),k)}if(Pd(_)||td(_))return T!==null?null:d(g,b,_,k,null);gp(g,_)}return null}function p(g,b,_,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return g=g.get(_)||null,l(b,g,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ip:return g=g.get(k.key===null?_:k.key)||null,c(b,g,k,T);case rc:return g=g.get(k.key===null?_:k.key)||null,u(b,g,k,T);case Da:var N=k._init;return p(g,b,_,N(k._payload),T)}if(Pd(k)||td(k))return g=g.get(_)||null,d(b,g,k,T,null);gp(b,k)}return null}function m(g,b,_,k){for(var T=null,N=null,C=b,S=b=0,I=null;C!==null&&S<_.length;S++){C.index>S?(I=C,C=null):I=C.sibling;var E=f(g,C,_[S],k);if(E===null){C===null&&(C=I);break}e&&C&&E.alternate===null&&t(g,C),b=i(E,b,S),N===null?T=E:N.sibling=E,N=E,C=I}if(S===_.length)return n(g,C),Zt&&Lo(g,S),T;if(C===null){for(;S<_.length;S++)C=h(g,_[S],k),C!==null&&(b=i(C,b,S),N===null?T=C:N.sibling=C,N=C);return Zt&&Lo(g,S),T}for(C=r(g,C);S<_.length;S++)I=p(C,g,S,_[S],k),I!==null&&(e&&I.alternate!==null&&C.delete(I.key===null?S:I.key),b=i(I,b,S),N===null?T=I:N.sibling=I,N=I);return e&&C.forEach(function(j){return t(g,j)}),Zt&&Lo(g,S),T}function x(g,b,_,k){var T=td(_);if(typeof T!="function")throw Error(he(150));if(_=T.call(_),_==null)throw Error(he(151));for(var N=T=null,C=b,S=b=0,I=null,E=_.next();C!==null&&!E.done;S++,E=_.next()){C.index>S?(I=C,C=null):I=C.sibling;var j=f(g,C,E.value,k);if(j===null){C===null&&(C=I);break}e&&C&&j.alternate===null&&t(g,C),b=i(j,b,S),N===null?T=j:N.sibling=j,N=j,C=I}if(E.done)return n(g,C),Zt&&Lo(g,S),T;if(C===null){for(;!E.done;S++,E=_.next())E=h(g,E.value,k),E!==null&&(b=i(E,b,S),N===null?T=E:N.sibling=E,N=E);return Zt&&Lo(g,S),T}for(C=r(g,C);!E.done;S++,E=_.next())E=p(C,g,S,E.value,k),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?S:E.key),b=i(E,b,S),N===null?T=E:N.sibling=E,N=E);return e&&C.forEach(function(P){return t(g,P)}),Zt&&Lo(g,S),T}function w(g,b,_,k){if(typeof _=="object"&&_!==null&&_.type===sc&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case ip:e:{for(var T=_.key,N=b;N!==null;){if(N.key===T){if(T=_.type,T===sc){if(N.tag===7){n(g,N.sibling),b=s(N,_.props.children),b.return=g,g=b;break e}}else if(N.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Da&&ZN(T)===N.type){n(g,N.sibling),b=s(N,_.props),b.ref=ad(g,N,_),b.return=g,g=b;break e}n(g,N);break}else t(g,N);N=N.sibling}_.type===sc?(b=cl(_.props.children,g.mode,k,_.key),b.return=g,g=b):(k=Zp(_.type,_.key,_.props,null,g.mode,k),k.ref=ad(g,b,_),k.return=g,g=k)}return a(g);case rc:e:{for(N=_.key;b!==null;){if(b.key===N)if(b.tag===4&&b.stateNode.containerInfo===_.containerInfo&&b.stateNode.implementation===_.implementation){n(g,b.sibling),b=s(b,_.children||[]),b.return=g,g=b;break e}else{n(g,b);break}else t(g,b);b=b.sibling}b=W0(_,g.mode,k),b.return=g,g=b}return a(g);case Da:return N=_._init,w(g,b,N(_._payload),k)}if(Pd(_))return m(g,b,_,k);if(td(_))return x(g,b,_,k);gp(g,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,b!==null&&b.tag===6?(n(g,b.sibling),b=s(b,_),b.return=g,g=b):(n(g,b),b=H0(_,g.mode,k),b.return=g,g=b),a(g)):n(g,b)}return w}var eu=MI(!0),RI=MI(!1),Qm=xo(null),Xm=null,hc=null,q_=null;function Y_(){q_=hc=Xm=null}function G_(e){var t=Qm.current;Vt(Qm),e._currentValue=t}function w1(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Cc(e,t){Xm=e,q_=hc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Gr=!0),e.firstContext=null)}function Os(e){var t=e._currentValue;if(q_!==e)if(e={context:e,memoizedValue:t,next:null},hc===null){if(Xm===null)throw Error(he(308));hc=e,Xm.dependencies={lanes:0,firstContext:e}}else hc=hc.next=e;return t}var Go=null;function K_(e){Go===null?Go=[e]:Go.push(e)}function LI(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,K_(t)):(n.next=s.next,s.next=n),t.interleaved=n,la(e,r)}function la(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Oa=!1;function Q_(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function FI(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ta(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function so(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,xt&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,la(e,n)}return s=r.interleaved,s===null?(t.next=t,K_(r)):(t.next=s.next,s.next=t),r.interleaved=t,la(e,n)}function Yp(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,M_(e,n)}}function ek(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Jm(e,t,n,r){var s=e.updateQueue;Oa=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=s.baseState;a=0,d=u=c=null,l=i;do{var f=l.lane,p=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,x=l;switch(f=t,p=n,x.tag){case 1:if(m=x.payload,typeof m=="function"){h=m.call(p,h,f);break e}h=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=x.payload,f=typeof m=="function"?m.call(p,h,f):m,f==null)break e;h=hn({},h,f);break e;case 2:Oa=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,a|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;f=l,l=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);vl|=a,e.lanes=a,e.memoizedState=h}}function tk(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(he(191,s));s.call(r)}}}var bf={},Ni=xo(bf),Fh=xo(bf),Bh=xo(bf);function Ko(e){if(e===bf)throw Error(he(174));return e}function X_(e,t){switch(Mt(Bh,t),Mt(Fh,e),Mt(Ni,bf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:n1(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=n1(t,e)}Vt(Ni),Mt(Ni,t)}function tu(){Vt(Ni),Vt(Fh),Vt(Bh)}function BI(e){Ko(Bh.current);var t=Ko(Ni.current),n=n1(t,e.type);t!==n&&(Mt(Fh,e),Mt(Ni,n))}function J_(e){Fh.current===e&&(Vt(Ni),Vt(Fh))}var cn=xo(0);function Zm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var L0=[];function Z_(){for(var e=0;e<L0.length;e++)L0[e]._workInProgressVersionPrimary=null;L0.length=0}var Gp=pa.ReactCurrentDispatcher,F0=pa.ReactCurrentBatchConfig,bl=0,dn=null,$n=null,Xn=null,eg=!1,eh=!1,Uh=0,E9=0;function hr(){throw Error(he(321))}function e2(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ri(e[n],t[n]))return!1;return!0}function t2(e,t,n,r,s,i){if(bl=i,dn=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gp.current=e===null||e.memoizedState===null?S9:C9,e=n(r,s),eh){i=0;do{if(eh=!1,Uh=0,25<=i)throw Error(he(301));i+=1,Xn=$n=null,t.updateQueue=null,Gp.current=j9,e=n(r,s)}while(eh)}if(Gp.current=tg,t=$n!==null&&$n.next!==null,bl=0,Xn=$n=dn=null,eg=!1,t)throw Error(he(300));return e}function n2(){var e=Uh!==0;return Uh=0,e}function ci(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Xn===null?dn.memoizedState=Xn=e:Xn=Xn.next=e,Xn}function Ms(){if($n===null){var e=dn.alternate;e=e!==null?e.memoizedState:null}else e=$n.next;var t=Xn===null?dn.memoizedState:Xn.next;if(t!==null)Xn=t,$n=e;else{if(e===null)throw Error(he(310));$n=e,e={memoizedState:$n.memoizedState,baseState:$n.baseState,baseQueue:$n.baseQueue,queue:$n.queue,next:null},Xn===null?dn.memoizedState=Xn=e:Xn=Xn.next=e}return Xn}function $h(e,t){return typeof t=="function"?t(e):t}function B0(e){var t=Ms(),n=t.queue;if(n===null)throw Error(he(311));n.lastRenderedReducer=e;var r=$n,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=a=null,c=null,u=i;do{var d=u.lane;if((bl&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,a=r):c=c.next=h,dn.lanes|=d,vl|=d}u=u.next}while(u!==null&&u!==i);c===null?a=r:c.next=l,ri(r,t.memoizedState)||(Gr=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,dn.lanes|=i,vl|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function U0(e){var t=Ms(),n=t.queue;if(n===null)throw Error(he(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);ri(i,t.memoizedState)||(Gr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function UI(){}function $I(e,t){var n=dn,r=Ms(),s=t(),i=!ri(r.memoizedState,s);if(i&&(r.memoizedState=s,Gr=!0),r=r.queue,r2(WI.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Xn!==null&&Xn.memoizedState.tag&1){if(n.flags|=2048,zh(9,HI.bind(null,n,r,s,t),void 0,null),Zn===null)throw Error(he(349));bl&30||zI(n,t,s)}return s}function zI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=dn.updateQueue,t===null?(t={lastEffect:null,stores:null},dn.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function HI(e,t,n,r){t.value=n,t.getSnapshot=r,VI(t)&&qI(e)}function WI(e,t,n){return n(function(){VI(t)&&qI(e)})}function VI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ri(e,n)}catch{return!0}}function qI(e){var t=la(e,1);t!==null&&ei(t,e,1,-1)}function nk(e){var t=ci();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:$h,lastRenderedState:e},t.queue=e,e=e.dispatch=T9.bind(null,dn,e),[t.memoizedState,e]}function zh(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=dn.updateQueue,t===null?(t={lastEffect:null,stores:null},dn.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function YI(){return Ms().memoizedState}function Kp(e,t,n,r){var s=ci();dn.flags|=e,s.memoizedState=zh(1|t,n,void 0,r===void 0?null:r)}function Kg(e,t,n,r){var s=Ms();r=r===void 0?null:r;var i=void 0;if($n!==null){var a=$n.memoizedState;if(i=a.destroy,r!==null&&e2(r,a.deps)){s.memoizedState=zh(t,n,i,r);return}}dn.flags|=e,s.memoizedState=zh(1|t,n,i,r)}function rk(e,t){return Kp(8390656,8,e,t)}function r2(e,t){return Kg(2048,8,e,t)}function GI(e,t){return Kg(4,2,e,t)}function KI(e,t){return Kg(4,4,e,t)}function QI(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function XI(e,t,n){return n=n!=null?n.concat([e]):null,Kg(4,4,QI.bind(null,t,e),n)}function s2(){}function JI(e,t){var n=Ms();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&e2(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ZI(e,t){var n=Ms();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&e2(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function e5(e,t,n){return bl&21?(ri(n,t)||(n=iI(),dn.lanes|=n,vl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Gr=!0),e.memoizedState=n)}function N9(e,t){var n=Tt;Tt=n!==0&&4>n?n:4,e(!0);var r=F0.transition;F0.transition={};try{e(!1),t()}finally{Tt=n,F0.transition=r}}function t5(){return Ms().memoizedState}function k9(e,t,n){var r=ao(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},n5(e))r5(t,n);else if(n=LI(e,t,n,r),n!==null){var s=Mr();ei(n,e,r,s),s5(n,t,r)}}function T9(e,t,n){var r=ao(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(n5(e))r5(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(s.hasEagerState=!0,s.eagerState=l,ri(l,a)){var c=t.interleaved;c===null?(s.next=s,K_(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=LI(e,t,s,r),n!==null&&(s=Mr(),ei(n,e,r,s),s5(n,t,r))}}function n5(e){var t=e.alternate;return e===dn||t!==null&&t===dn}function r5(e,t){eh=eg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function s5(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,M_(e,n)}}var tg={readContext:Os,useCallback:hr,useContext:hr,useEffect:hr,useImperativeHandle:hr,useInsertionEffect:hr,useLayoutEffect:hr,useMemo:hr,useReducer:hr,useRef:hr,useState:hr,useDebugValue:hr,useDeferredValue:hr,useTransition:hr,useMutableSource:hr,useSyncExternalStore:hr,useId:hr,unstable_isNewReconciler:!1},S9={readContext:Os,useCallback:function(e,t){return ci().memoizedState=[e,t===void 0?null:t],e},useContext:Os,useEffect:rk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kp(4194308,4,QI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kp(4,2,e,t)},useMemo:function(e,t){var n=ci();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ci();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=k9.bind(null,dn,e),[r.memoizedState,e]},useRef:function(e){var t=ci();return e={current:e},t.memoizedState=e},useState:nk,useDebugValue:s2,useDeferredValue:function(e){return ci().memoizedState=e},useTransition:function(){var e=nk(!1),t=e[0];return e=N9.bind(null,e[1]),ci().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dn,s=ci();if(Zt){if(n===void 0)throw Error(he(407));n=n()}else{if(n=t(),Zn===null)throw Error(he(349));bl&30||zI(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,rk(WI.bind(null,r,i,e),[e]),r.flags|=2048,zh(9,HI.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=ci(),t=Zn.identifierPrefix;if(Zt){var n=Ji,r=Xi;n=(r&~(1<<32-Zs(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Uh++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=E9++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},C9={readContext:Os,useCallback:JI,useContext:Os,useEffect:r2,useImperativeHandle:XI,useInsertionEffect:GI,useLayoutEffect:KI,useMemo:ZI,useReducer:B0,useRef:YI,useState:function(){return B0($h)},useDebugValue:s2,useDeferredValue:function(e){var t=Ms();return e5(t,$n.memoizedState,e)},useTransition:function(){var e=B0($h)[0],t=Ms().memoizedState;return[e,t]},useMutableSource:UI,useSyncExternalStore:$I,useId:t5,unstable_isNewReconciler:!1},j9={readContext:Os,useCallback:JI,useContext:Os,useEffect:r2,useImperativeHandle:XI,useInsertionEffect:GI,useLayoutEffect:KI,useMemo:ZI,useReducer:U0,useRef:YI,useState:function(){return U0($h)},useDebugValue:s2,useDeferredValue:function(e){var t=Ms();return $n===null?t.memoizedState=e:e5(t,$n.memoizedState,e)},useTransition:function(){var e=U0($h)[0],t=Ms().memoizedState;return[e,t]},useMutableSource:UI,useSyncExternalStore:$I,useId:t5,unstable_isNewReconciler:!1};function Vs(e,t){if(e&&e.defaultProps){t=hn({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function E1(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:hn({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Qg={isMounted:function(e){return(e=e._reactInternals)?Tl(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Mr(),s=ao(e),i=ta(r,s);i.payload=t,n!=null&&(i.callback=n),t=so(e,i,s),t!==null&&(ei(t,e,s,r),Yp(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Mr(),s=ao(e),i=ta(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=so(e,i,s),t!==null&&(ei(t,e,s,r),Yp(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Mr(),r=ao(e),s=ta(n,r);s.tag=2,t!=null&&(s.callback=t),t=so(e,s,r),t!==null&&(ei(t,e,r,n),Yp(t,e,r))}};function sk(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Oh(n,r)||!Oh(s,i):!0}function i5(e,t,n){var r=!1,s=ho,i=t.contextType;return typeof i=="object"&&i!==null?i=Os(i):(s=Qr(t)?xl:wr.current,r=t.contextTypes,i=(r=r!=null)?Jc(e,s):ho),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qg,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ik(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Qg.enqueueReplaceState(t,t.state,null)}function N1(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Q_(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=Os(i):(i=Qr(t)?xl:wr.current,s.context=Jc(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(E1(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Qg.enqueueReplaceState(s,s.state,null),Jm(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function nu(e,t){try{var n="",r=t;do n+=rF(r),r=r.return;while(r);var s=n}catch(i){s=` 40Error generating stack: `+i.message+` 41`+i.stack}return{value:e,source:t,stack:s,digest:null}}
vendor: 11,790 bytes, line 41
41function $0(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function k1(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var A9=typeof WeakMap=="function"?WeakMap:Map;function a5(e,t,n){n=ta(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){rg||(rg=!0,M1=r),k1(e,t)},n}function o5(e,t,n){n=ta(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){k1(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){k1(e,t),typeof r!="function"&&(io===null?io=new Set([this]):io.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function ak(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new A9;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=W9.bind(null,e,t,n),t.then(e,e))}function ok(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function lk(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ta(-1,1),t.tag=2,so(n,t,1))),n.lanes|=1),e)}var I9=pa.ReactCurrentOwner,Gr=!1;function Ir(e,t,n,r){t.child=e===null?RI(t,null,n,r):eu(t,e.child,n,r)}function ck(e,t,n,r,s){n=n.render;var i=t.ref;return Cc(t,s),r=t2(e,t,n,r,i,s),n=n2(),e!==null&&!Gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ca(e,t,s)):(Zt&&n&&H_(t),t.flags|=1,Ir(e,t,r,s),t.child)}function uk(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!h2(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,l5(e,t,i,r,s)):(e=Zp(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Oh,n(a,r)&&e.ref===t.ref)return ca(e,t,s)}return t.flags|=1,e=oo(i,r),e.ref=t.ref,e.return=t,t.child=e}function l5(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Oh(i,r)&&e.ref===t.ref)if(Gr=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Gr=!0);else return t.lanes=e.lanes,ca(e,t,s)}return T1(e,t,n,r,s)}function c5(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mt(pc,es),es|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mt(pc,es),es|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Mt(pc,es),es|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Mt(pc,es),es|=r;return Ir(e,t,s,n),t.child}function u5(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function T1(e,t,n,r,s){var i=Qr(n)?xl:wr.current;return i=Jc(t,i),Cc(t,s),n=t2(e,t,n,r,i,s),r=n2(),e!==null&&!Gr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ca(e,t,s)):(Zt&&r&&H_(t),t.flags|=1,Ir(e,t,n,s),t.child)}function dk(e,t,n,r,s){if(Qr(n)){var i=!0;Ym(t)}else i=!1;if(Cc(t,s),t.stateNode===null)Qp(e,t),i5(t,n,r),N1(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Os(u):(u=Qr(n)?xl:wr.current,u=Jc(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";h||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||c!==u)&&ik(t,a,r,u),Oa=!1;var f=t.memoizedState;a.state=f,Jm(t,r,a,s),c=t.memoizedState,l!==r||f!==c||Kr.current||Oa?(typeof d=="function"&&(E1(t,n,d,r),c=t.memoizedState),(l=Oa||sk(t,n,l,r,f,c,u))?(h||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),a.props=r,a.state=c,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,FI(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Vs(t.type,l),a.props=u,h=t.pendingProps,f=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=Os(c):(c=Qr(n)?xl:wr.current,c=Jc(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==h||f!==c)&&ik(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,Jm(t,r,a,s);var m=t.memoizedState;l!==h||f!==m||Kr.current||Oa?(typeof p=="function"&&(E1(t,n,p,r),m=t.memoizedState),(u=Oa||sk(t,n,u,r,f,m,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return S1(e,t,n,r,i,s)}function S1(e,t,n,r,s,i){u5(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&QN(t,n,!1),ca(e,t,i);r=t.stateNode,I9.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=eu(t,e.child,null,i),t.child=eu(t,null,l,i)):Ir(e,t,l,i),t.memoizedState=r.state,s&&QN(t,n,!0),t.child}function d5(e){var t=e.stateNode;t.pendingContext?KN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&KN(e,t.context,!1),X_(e,t.containerInfo)}function hk(e,t,n,r,s){return Zc(),V_(s),t.flags|=256,Ir(e,t,n,r),t.child}var C1={dehydrated:null,treeContext:null,retryLane:0};function j1(e){return{baseLanes:e,cachePool:null,transitions:null}}function h5(e,t,n){var r=t.pendingProps,s=cn.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Mt(cn,s&1),e===null)return _1(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Zg(a,r,0,null),e=cl(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=j1(n),t.memoizedState=C1,e):i2(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return P9(e,t,a,r,l,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=oo(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=oo(l,i):(i=cl(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?j1(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=C1,r}return i=e.child,e=i.sibling,r=oo(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function i2(e,t){return t=Zg({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xp(e,t,n,r){return r!==null&&V_(r),eu(t,e.child,null,n),e=i2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function P9(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=$0(Error(he(422))),xp(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Zg({mode:"visible",children:r.children},s,0,null),i=cl(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&eu(t,e.child,null,a),t.child.memoizedState=j1(a),t.memoizedState=C1,i);if(!(t.mode&1))return xp(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(he(419)),r=$0(i,r,void 0),xp(e,t,a,r)}if(l=(a&e.childLanes)!==0,Gr||l){if(r=Zn,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,la(e,s),ei(r,e,s,-1))}return d2(),r=$0(Error(he(421))),xp(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=V9.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,as=ro(s.nextSibling),ls=t,Zt=!0,Qs=null,e!==null&&(Ts[Ss++]=Xi,Ts[Ss++]=Ji,Ts[Ss++]=yl,Xi=e.id,Ji=e.overflow,yl=t),t=i2(t,r.children),t.flags|=4096,t)}function fk(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),w1(e.return,t,n)}function z0(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function f5(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ir(e,t,r.children,n),r=cn.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&fk(e,n,t);else if(e.tag===19)fk(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mt(cn,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Zm(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),z0(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Zm(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}z0(t,!0,n,null,i);break;case"together":z0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qp(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ca(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(he(153));if(t.child!==null){for(e=t.child,n=oo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function D9(e,t,n){switch(t.tag){case 3:d5(t),Zc();break;case 5:BI(t);break;case 1:Qr(t.type)&&Ym(t);break;case 4:X_(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Mt(Qm,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Mt(cn,cn.current&1),t.flags|=128,null):n&t.child.childLanes?h5(e,t,n):(Mt(cn,cn.current&1),e=ca(e,t,n
vendor: 4,851 bytes, line 41
41),e!==null?e.sibling:null);Mt(cn,cn.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return f5(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Mt(cn,cn.current),r)break;return null;case 22:case 23:return t.lanes=0,c5(e,t,n)}return ca(e,t,n)}var p5,A1,m5,g5;p5=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};A1=function(){};m5=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Ko(Ni.current);var i=null;switch(n){case"input":s=Jb(e,s),r=Jb(e,r),i=[];break;case"select":s=hn({},s,{value:void 0}),r=hn({},r,{value:void 0}),i=[];break;case"textarea":s=t1(e,s),r=t1(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Vm)}r1(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Sh.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Sh.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&$t("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};g5=function(e,t,n,r){n!==r&&(t.flags|=4)};function od(e,t){if(!Zt)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function O9(e,t,n){var r=t.pendingProps;switch(W_(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fr(t),null;case 1:return Qr(t.type)&&qm(),fr(t),null;case 3:return r=t.stateNode,tu(),Vt(Kr),Vt(wr),Z_(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(mp(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qs!==null&&(F1(Qs),Qs=null))),A1(e,t),fr(t),null;case 5:J_(t);var s=Ko(Bh.current);if(n=t.type,e!==null&&t.stateNode!=null)m5(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(he(166));return fr(t),null}if(e=Ko(Ni.current),mp(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bi]=t,r[Lh]=i,e=(t.mode&1)!==0,n){case"dialog":$t("cancel",r),$t("close",r);break;case"iframe":case"object":case"embed":$t("load",r);break;case"video":case"audio":for(s=0;s<Od.length;s++)$t(Od[s],r);break;case"source":$t("error",r);break;case"img":case"image":case"link":$t("error",r),$t("load",r);break;case"details":$t("toggle",r);break;case"input":wN(r,i),$t("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},$t("invalid",r);break;case"textarea":NN(r,i),$t("invalid",r)}r1(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&pp(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&pp(r.textContent,l,e),s=["children",""+l]):Sh.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&$t("scroll",r)}switch(n){case"input":ap(r),EN(r,i,!0);break;case"textarea":ap(r),kN(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Vm)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=WA(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>
41",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bi]=t,e[Lh]=r,p5(e,t,!1,!1),t.stateNode=e;e:{switch(a=s1(n,r),n){case"dialog":$t("cancel",e),$t("close",e),s=r;break;case"iframe":case"object":case"embed":$t("load",e),s=r;break;case"video":case"audio":for(s=0;s<Od.length;s++)$t(Od[s],e);s=r;break;case"source":$t("error",e),s=r;break;case"img":case"image":case"link":$t("error",e),$t("load",e),s=r;break;case"details":$t("toggle",e),s=r;break;case"input":wN(e,r),s=Jb(e,r),$t("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=hn({},r,{value:void 0}),$t("invalid",e);break;case"textarea":NN(e,r),s=t1(e,r),$t("invalid",e);break;default:s=r}r1(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?YA(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&VA(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Ch(e,c):typeof c=="number"&&Ch(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Sh.hasOwnProperty(i)?c!=null&&i==="onScroll"&&$t("scroll",e):c!=null&&j_(e,i,c,a))}switch(n){case"input":ap(e),EN(e,r,!1);break;case"textarea":ap(e),kN(e);break;case"option":r.value!=null&&e.setAttribute("value",""+uo(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Nc(e,!!r.multiple,i,!1):r.defaultValue!=null&&Nc(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Vm)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return fr(t),null;case 6:if(e&&t.stateNode!=null)g5(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(he(166));if(n=Ko(Bh.current),Ko(Ni.current),mp(t)){if(r=t.stateNode,n=t.memoizedProps,r[bi]=t,(i=r.nodeValue!==n)&&(e=ls,e!==null))switch(e.tag){case 3:pp(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&pp(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[bi]=t,t.stateNode=r}return fr(t),null;case 13:if(Vt(cn),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Zt&&as!==null&&t.mode&1&&!(t.flags&128))OI(),Zc(),t.flags|=98560,i=!1;else if(i=mp(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(he(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(he(317));i[bi]=t}else Zc(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;fr(t),i=!1}else Qs!==null&&(F1(Qs),Qs=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||cn.current&1?Vn===0&&(Vn=3):d2())),t.updateQueue!==null&&(t.flags|=4),fr(t),null);case 4:return tu(),A1(e,t),e===null&&Mh(t.stateNode.containerInfo),fr(t),null;case 10:return G_(t.type._context),fr(t),null;case 17:return Qr(t.type)&&qm(),fr(t),null;case 19:if(Vt(cn),i=t.memoizedState,i===null)return fr(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)od(i,!1);else{if(Vn!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Zm(e),a!==null){for(t.flags|=128,od(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Mt(cn,cn.current&1|2),t.child}e=e.sibling}i.tail!==null&&Tn()>ru&&(t.flags|=128,r=!0,od(i,!1),t.lanes=4194304)}else{if(!r)if(e=Zm(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),od(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Zt)return fr(t),null}else 2*Tn()-i.renderingStartTime>ru&&n!==1073741824&&(t.flags|=128,r=!0,od(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Tn(),t.sibling=null,n=cn.current,Mt(cn,r?n&1|2:n&1),t):(fr(t),null);case 22:case 23:return u2(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?es&1073741824&&(fr(t),t.subtreeFlags&6&&(t.flags|=8192)):fr(t),null;case 24:return null;case 25:return null}throw Error(he(156,t.tag))}function M9(e,t){switch(W_(t),t.tag){case 1:return Qr(t.type)&&qm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 23,232 bytes, line 41
41case 3:return tu(),Vt(Kr),Vt(wr),Z_(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return J_(t),null;case 13:if(Vt(cn),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(he(340));Zc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vt(cn),null;case 4:return tu(),null;case 10:return G_(t.type._context),null;case 22:case 23:return u2(),null;case 24:return null;default:return null}}var yp=!1,vr=!1,R9=typeof WeakSet=="function"?WeakSet:Set,je=null;function fc(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){yn(e,t,r)}else n.current=null}function I1(e,t,n){try{n()}catch(r){yn(e,t,r)}}var pk=!1;function L9(e,t){if(p1=zm,e=_I(),z_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||s!==0&&h.nodeType!==3||(l=a+s),h!==i||r!==0&&h.nodeType!==3||(c=a+r),h.nodeType===3&&(a+=h.nodeValue.length),(p=h.firstChild)!==null;)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===s&&(l=a),f===i&&++d===r&&(c=a),(p=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(m1={focusedElem:e,selectionRange:n},zm=!1,je=t;je!==null;)if(t=je,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,je=e;else for(;je!==null;){t=je;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var x=m.memoizedProps,w=m.memoizedState,g=t.stateNode,b=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:Vs(t.type,x),w);g.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(he(163))}}catch(k){yn(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,je=e;break}je=t.return}return m=pk,pk=!1,m}function th(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&I1(t,n,i)}s=s.next}while(s!==r)}}function Xg(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function P1(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function x5(e){var t=e.alternate;t!==null&&(e.alternate=null,x5(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bi],delete t[Lh],delete t[y1],delete t[b9],delete t[v9])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function y5(e){return e.tag===5||e.tag===3||e.tag===4}function mk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||y5(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function D1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vm));else if(r!==4&&(e=e.child,e!==null))for(D1(e,t,n),e=e.sibling;e!==null;)D1(e,t,n),e=e.sibling}function O1(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(O1(e,t,n),e=e.sibling;e!==null;)O1(e,t,n),e=e.sibling}var rr=null,Gs=!1;function Ea(e,t,n){for(n=n.child;n!==null;)b5(e,t,n),n=n.sibling}function b5(e,t,n){if(Ei&&typeof Ei.onCommitFiberUnmount=="function")try{Ei.onCommitFiberUnmount(Hg,n)}catch{}switch(n.tag){case 5:vr||fc(n,t);case 6:var r=rr,s=Gs;rr=null,Ea(e,t,n),rr=r,Gs=s,rr!==null&&(Gs?(e=rr,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):rr.removeChild(n.stateNode));break;case 18:rr!==null&&(Gs?(e=rr,n=n.stateNode,e.nodeType===8?M0(e.parentNode,n):e.nodeType===1&&M0(e,n),Ph(e)):M0(rr,n.stateNode));break;case 4:r=rr,s=Gs,rr=n.stateNode.containerInfo,Gs=!0,Ea(e,t,n),rr=r,Gs=s;break;case 0:case 11:case 14:case 15:if(!vr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&I1(n,t,a),s=s.next}while(s!==r)}Ea(e,t,n);break;case 1:if(!vr&&(fc(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){yn(n,t,l)}Ea(e,t,n);break;case 21:Ea(e,t,n);break;case 22:n.mode&1?(vr=(r=vr)||n.memoizedState!==null,Ea(e,t,n),vr=r):Ea(e,t,n);break;default:Ea(e,t,n)}}function gk(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new R9),t.forEach(function(r){var s=q9.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function $s(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:rr=l.stateNode,Gs=!1;break e;case 3:rr=l.stateNode.containerInfo,Gs=!0;break e;case 4:rr=l.stateNode.containerInfo,Gs=!0;break e}l=l.return}if(rr===null)throw Error(he(160));b5(i,a,s),rr=null,Gs=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){yn(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)v5(t,e),t=t.sibling}function v5(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if($s(t,e),oi(e),r&4){try{th(3,e,e.return),Xg(3,e)}catch(x){yn(e,e.return,x)}try{th(5,e,e.return)}catch(x){yn(e,e.return,x)}}break;case 1:$s(t,e),oi(e),r&512&&n!==null&&fc(n,n.return);break;case 5:if($s(t,e),oi(e),r&512&&n!==null&&fc(n,n.return),e.flags&32){var s=e.stateNode;try{Ch(s,"")}catch(x){yn(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&zA(s,i),s1(l,a);var u=s1(l,i);for(a=0;a<c.length;a+=2){var d=c[a],h=c[a+1];d==="style"?YA(s,h):d==="dangerouslySetInnerHTML"?VA(s,h):d==="children"?Ch(s,h):j_(s,d,h,u)}switch(l){case"input":Zb(s,i);break;case"textarea":HA(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Nc(s,!!i.multiple,p,!1):f!==!!i.multiple&&(i.defaultValue!=null?Nc(s,!!i.multiple,i.defaultValue,!0):Nc(s,!!i.multiple,i.multiple?[]:"",!1))}s[Lh]=i}catch(x){yn(e,e.return,x)}}break;case 6:if($s(t,e),oi(e),r&4){if(e.stateNode===null)throw Error(he(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(x){yn(e,e.return,x)}}break;case 3:if($s(t,e),oi(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ph(t.containerInfo)}catch(x){yn(e,e.return,x)}break;case 4:$s(t,e),oi(e);break;case 13:$s(t,e),oi(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(l2=Tn())),r&4&&gk(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(vr=(u=vr)||d,$s(t,e),vr=u):$s(t,e),oi(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(je=e,d=e.child;d!==null;){for(h=je=d;je!==null;){switch(f=je,p=f.child,f.tag){case 0:case 11:case 14:case 15:th(4,f,f.return);break;case 1:fc(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(x){yn(r,n,x)}}break;case 5:fc(f,f.return);break;case 22:if(f.memoizedState!==null){yk(h);continue}}p!==null?(p.return=f,je=p):yk(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=h.stateNode,c=h.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=qA("display",a))}catch(x){yn(e,e.return,x)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(x){yn(e,e.return,x)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:$s(t,e),oi(e),r&4&&gk(e);break;case 21:break;default:$s(t,e),oi(e)}}function oi(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(y5(n)){var r=n;break e}n=n.return}throw Error(he(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Ch(s,""),r.flags&=-33);var i=mk(e);O1(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=mk(e);D1(e,l,a);break;default:throw Error(he(161))}}catch(c){yn(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function F9(e,t,n){je=e,_5(e)}function _5(e,t,n){for(var r=(e.mode&1)!==0;je!==null;){var s=je,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||yp;if(!a){var l=s.alternate,c=l!==null&&l.memoizedState!==null||vr;l=yp;var u=vr;if(yp=a,(vr=c)&&!u)for(je=s;je!==null;)a=je,c=a.child,a.tag===22&&a.memoizedState!==null?bk(s):c!==null?(c.return=a,je=c):bk(s);for(;i!==null;)je=i,_5(i),i=i.sibling;je=s,yp=l,vr=u}xk(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,je=i):xk(e)}}function xk(e){for(;je!==null;){var t=je;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:vr||Xg(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!vr)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:Vs(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&tk(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}tk(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Ph(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(he(163))}vr||t.flags&512&&P1(t)}catch(f){yn(t,t.return,f)}}if(t===e){je=null;break}if(n=t.sibling,n!==null){n.return=t.return,je=n;break}je=t.return}}function yk(e){for(;je!==null;){var t=je;if(t===e){je=null;break}var n=t.sibling;if(n!==null){n.return=t.return,je=n;break}je=t.return}}function bk(e){for(;je!==null;){var t=je;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xg(4,t)}catch(c){yn(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){yn(t,s,c)}}var i=t.return;try{P1(t)}catch(c){yn(t,i,c)}break;case 5:var a=t.return;try{P1(t)}catch(c){yn(t,a,c)}}}catch(c){yn(t,t.return,c)}if(t===e){je=null;break}var l=t.sibling;if(l!==null){l.return=t.return,je=l;break}je=t.return}}var B9=Math.ceil,ng=pa.ReactCurrentDispatcher,a2=pa.ReactCurrentOwner,Ps=pa.ReactCurrentBatchConfig,xt=0,Zn=null,Rn=null,lr=0,es=0,pc=xo(0),Vn=0,Hh=null,vl=0,Jg=0,o2=0,nh=null,Vr=null,l2=0,ru=1/0,Bi=null,rg=!1,M1=null,io=null,bp=!1,Ga=null,sg=0,rh=0,R1=null,Xp=-1,Jp=0;function Mr(){return xt&6?Tn():Xp!==-1?Xp:Xp=Tn()}function ao(e){return e.mode&1?xt&2&&lr!==0?lr&-lr:w9.transition!==null?(Jp===0&&(Jp=iI()),Jp):(e=Tt,e!==0||(e=window.event,e=e===void 0?16:hI(e.type)),e):1}function ei(e,t,n,r){if(50<rh)throw rh=0,R1=null,Error(he(185));gf(e,n,r),(!(xt&2)||e!==Zn)&&(e===Zn&&(!(xt&2)&&(Jg|=n),Vn===4&&La(e,lr)),Xr(e,r),n===1&&xt===0&&!(t.mode&1)&&(ru=Tn()+500,Gg&&yo()))}function Xr(e,t){var n=e.callbackNode;wF(e,t);var r=$m(e,e===Zn?lr:0);if(r===0)n!==null&&CN(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&CN(n),t===1)e.tag===0?_9(vk.bind(null,e)):II(vk.bind(null,e)),x9(function(){!(xt&6)&&yo()}),n=null;else{switch(aI(r)){case 1:n=O_;break;case 4:n=rI;break;case 16:n=Um;break;case 536870912:n=sI;break;default:n=Um}n=j5(n,w5.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function w5(e,t){if(Xp=-1,Jp=0,xt&6)throw Error(he(327));var n=e.callbackNode;if(jc()&&e.callbackNode!==n)return null;var r=$m(e,e===Zn?lr:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ig(e,r);else{t=r;var s=xt;xt|=2;var i=N5();(Zn!==e||lr!==t)&&(Bi=null,ru=Tn()+500,ll(e,t));do try{z9();break}catch(l){E5(e,l)}while(!0);Y_(),ng.current=i,xt=s,Rn!==null?t=0:(Zn=null,lr=0,t=Vn)}if(t!==0){if(t===2&&(s=c1(e),s!==0&&(r=s,t=L1(e,s))),t===1)throw n=Hh,ll(e,0),La(e,r),Xr(e,Tn()),n;if(t===6)La(e,r);else{if(s=e.current.alternate,!(r&30)&&!U9(s)&&(t=ig(e,r),t===2&&(i=c1(e),i!==0&&(r=i,t=L1(e,i))),t===1))throw n=Hh,ll(e,0),La(e,r),Xr(e,Tn()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(he(345));case 2:Fo(e,Vr,Bi);break;case 3:if(La(e,r),(r&130023424)===r&&(t=l2+500-Tn(),10<t)){if($m(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Mr(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=x1(Fo.bind(null,e,Vr,Bi),t);break}Fo(e,Vr,Bi);break;case 4:if(La(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-Zs(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=Tn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*B9(r/1960))-r,10<r){e.timeoutHandle=x1(Fo.bind(null,e,Vr,Bi),r);break}Fo(e,Vr,Bi);break;case 5:Fo(e,Vr,Bi);break;default:throw Error(he(329))}}}return Xr(e,Tn()),e.callbackNode===n?w5.bind(null,e):null}function L1(e,t){var n=nh;return e.current.memoizedState.isDehydrated&&(ll(e,t).flags|=256),e=ig(e,t),e!==2&&(t=Vr,Vr=n,t!==null&&F1(t)),e}function F1(e){Vr===null?Vr=e:Vr.push.apply(Vr,e)}function U9(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!ri(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function La(e,t){for(t&=~o2,t&=~Jg,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Zs(t),r=1<<n;e[n]=-1,t&=~r}}function vk(e){if(xt&6)throw Error(he(327));jc();var t=$m(e,0);if(!(t&1))return Xr(e,Tn()),null;var n=ig(e,t);if(e.tag!==0&&n===2){var r=c1(e);r!==0&&(t=r,n=L1(e,r))}if(n===1)throw n=Hh,ll(e,0),La(e,t),Xr(e,Tn()),n;if(n===6)throw Error(he(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fo(e,Vr,Bi),Xr(e,Tn()),null}function c2(e,t){var n=xt;xt|=1;try{return e(t)}finally{xt=n,xt===0&&(ru=Tn()+500,Gg&&yo())}}function _l(e){Ga!==null&&Ga.tag===0&&!(xt&6)&&jc();var t=xt;xt|=1;var n=Ps.transition,r=Tt;try{if(Ps.transition=null,Tt=1,e)return e()}finally{Tt=r,Ps.transition=n,xt=t,!(xt&6)&&yo()}}function u2(){es=pc.current,Vt(pc)}function ll(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,g9(n)),Rn!==null)for(n=Rn.return;n!==null;){var r=n;switch(W_(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&qm();break;case 3:tu(),Vt(Kr),Vt(wr),Z_();break;case 5:J_(r);break;case 4:tu();break;case 13:Vt(cn);break;case 19:Vt(cn);break;case 10:G_(r.type._context);break;case 22:case 23:u2()}n=n.return}if(Zn=e,Rn=e=oo(e.current,null),lr=es=t,Vn=0,Hh=null,o2=Jg=vl=0,Vr=nh=null,Go!==null){for(t=0;t<Go.length;t++)if(n=Go[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}Go=null}return e}function E5(e,t){do{var n=Rn;try{if(Y_(),Gp.current=tg,eg){for(var r=dn.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eg=!1}if(bl=0,Xn=$n=dn=null,eh=!1,Uh=0,a2.current=null,n===null||n.return===null){Vn=1,Hh=t,Rn=null;break}e:{var i=e,a=n.return,l=n,c=t;if(t=lr,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=ok(a);if(p!==null){p.flags&=-257,lk(p,a,l,i,t),p.mode&1&&ak(i,u,t),t=p,c=u;var m=t.updateQueue;if(m===null){var x=new Set;x.add(c),t.updateQueue=x}else m.add(c);break e}else{if(!(t&1)){ak(i,u,t),d2();break e}c=Error(he(426))}}else if(Zt&&l.mode&1){var w=ok(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),lk(w,a,l,i,t),V_(nu(c,l));break e}}i=c=nu(c,l),Vn!==4&&(Vn=2),nh===null?nh=[i]:nh.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=a5(i,c,t);ek(i,g);break e;case 1:l=c;var b=i.type,_=i.stateNode;if(!(i.flags&128)&&(typeof b.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(io===null||!io.has(_)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=o5(i,l,t);ek(i,k);break e}}i=i.return}while(i!==null)}T5(n)}catch(T){t=T,Rn===n&&n!==null&&(Rn=n=n.return);continue}break}while(!0)}function N5(){var e=ng.current;return ng.current=tg,e===null?tg:e}function d2(){(Vn===0||Vn===3||Vn===2)&&(Vn=4),Zn===null||!(vl&268435455)&&!(Jg&268435455)||La(Zn,lr)}function ig(e,t){var n=xt;xt|=2;var r=N5();(Zn!==e||lr!==t)&&(Bi=null,ll(e,t));do try{$9();break}catch(s){E5(e,s)}while(!0);if(Y_(),xt=n,ng.current=r,Rn!==null)throw Error(he(261));return Zn=null,lr=0,Vn}function $9(){for(;Rn!==null;)k5(Rn)}function z9(){for(;Rn!==null&&!fF();)k5(Rn)}function k5(e){var t=C5(e.alternate,e,es);e.memoizedProps=e.pendingProps,t===null?T5(e):Rn=t,a2.current=null}function T5(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=M9(n,t),n!==null){n.flags&=32767,Rn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Vn=6,Rn=null;return}}else if(n=O9(n,t,es),n!==null){Rn=n;return}if(t=t.sibling,t!==null){Rn=t;return}Rn=t=e}while(t!==null);Vn===0&&(Vn=5)}function Fo(e,t,n){var r=Tt,s=Ps.transition;try{Ps.transition=null,Tt=1,H9(e,t,n,r)}finally{Ps.transition=s,Tt=r}return null}function H9(e,t,n,r){do jc();while(Ga!==null);if(xt&6)throw Error(he(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(he(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(EF(e,i),e===Zn&&(Rn=Zn=null,lr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||bp||(bp=!0,j5(Um,function(){return jc(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Ps.transition,Ps.transition=null;var a=Tt;Tt=1;var l=xt;xt|=4,a2.current=null,L9(e,n),v5(n,e),c9(m1),zm=!!p1,m1=p1=null,e.current=n,F9(n),pF(),xt=l,Tt=a,Ps.transition=i}else e.current=n;if(bp&&(bp=!1,Ga=e,sg=s),i=e.pendingLanes,i===0&&(io=null),xF(n.stateNode),Xr(e,Tn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(rg)throw rg=!1,e=M1,M1=null,e;return sg&1&&e.tag!==0&&jc(),i=e.pendingLanes,i&1?e===R1?rh++:(rh=0,R1=e):rh=0,yo(),null}function jc(){if(Ga!==null){var e=aI(sg),t=Ps.transition,n=Tt;try{if(Ps.transition=null,Tt=16>e?16:e,Ga===null)var r=!1;else{if(e=Ga,Ga=null,sg=0,xt&6)throw Error(he(331));var s=xt;for(xt|=4,je=e.current;je!==null;){var i=je,a=i.child;if(je.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(je=u;je!==null;){var d=je;switch(d.tag){case 0:case 11:case 15:th(8,d,i)}var h=d.child;if(h!==null)h.return=d,je=h;else for(;je!==null;){d=je;var f=d.sibling,p=d.return;if(x5(d),d===u){je=null;break}if(f!==null){f.return=p,je=f;break}je=p}}}var m=i.alternate;if(m!==null){var x=m.child;if(x!==null){m.child=null;do{var w=x.sibling;x.sibling=null,x=w}while(x!==null)}}je=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,je=a;else e:for(;je!==null;){if(i=je,i.flags&2048)switch(i.tag){case 0:case 11:case 15:th(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,je=g;break e}je=i.return}}var b=e.current;for(je=b;je!==null;){a=je;var _=a.child;if(a.subtreeFlags&2064&&_!==null)_.return=a,je=_;else e:for(a=b;je!==null;){if(l=je,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Xg(9,l)}}catch(T){yn(l,l.return,T)}if(l===a){je=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,je=k;break e}je=l.return}}if(xt=s,yo(),Ei&&typeof Ei.onPostCommitFiberRoot=="function")try{Ei.onPostCommitFiberRoot(Hg,e)}catch{}r=!0}return r}finally{Tt=n,Ps.transition=t}}return!1}function _k(e,t,n){t=nu(n,t),t=a5(e,t,1),e=so(e,t,1),t=Mr(),e!==null&&(gf(e,1,t),Xr(e,t))}function yn(e,t,n){if(e.tag===3)_k(e,e,n);else for(;t!==null;){if(t.tag===3){_k(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(io===null||!io.has(r))){e=nu(n,e),e=o5(t,e,1),t=so(t,e,1),e=Mr(),t!==null&&(gf(t,1,e),Xr(t,e));break}}t=t.return}}function W9(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Mr(),e.pingedLanes|=e.suspendedLanes&n,Zn===e&&(lr&n)===n&&(Vn===4||Vn===3&&(lr&130023424)===lr&&500>Tn()-l2?ll(e,0):o2|=n),Xr(e,t)}function S5(e,t){t===0&&(e.mode&1?(t=cp,cp<<=1,!(cp&130023424)&&(cp=4194304)):t=1);var n=Mr();e=la(e,t),e!==null&&(gf(e,t,n),Xr(e,n))}function V9(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),S5(e,n)}function q9(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(he(314))}r!==null&&r.delete(t),S5(e,n)}var C5;C5=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kr.current)Gr=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Gr=!1,D9(e,t,n);Gr=!!(e.flags&131072)}else Gr=!1,Zt&&t.flags&1048576&&PI(t,Km,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qp(e,t),e=t.pendingProps;var s=Jc(t,wr.current);Cc(t,n),s=t2(null,t,r,e,s,n);var i=n2();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qr(r)?(i=!0,Ym(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Q_(t),s.updater=Qg,t.stateNode=s,s._reactInternals=t,N1(t,r,e,n),t=S1(null,t,r,!0,i,n)):(t.tag=0,Zt&&i&&H_(t),Ir(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qp(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=G9(r),e=Vs(r,e),s){case 0:t=T1(null,t,r,e,n);break e;case 1:t=dk(null,t,r,e,n);break e;case 11:t=ck(null,t,r,e,n);break e;case 14:t=uk(null,t,r,Vs(r.type,e),n);break e}throw Error(he(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Vs(r,s),T1(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Vs(r,s),dk(e,t,r,s,n);case 3:e:{if(d5(t),e===null)throw Error(he(387));
vendor: 4,734 bytes, line 41
41r=t.pendingProps,i=t.memoizedState,s=i.element,FI(e,t),Jm(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=nu(Error(he(423)),t),t=hk(e,t,r,n,s);break e}else if(r!==s){s=nu(Error(he(424)),t),t=hk(e,t,r,n,s);break e}else for(as=ro(t.stateNode.containerInfo.firstChild),ls=t,Zt=!0,Qs=null,n=RI(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zc(),r===s){t=ca(e,t,n);break e}Ir(e,t,r,n)}t=t.child}return t;case 5:return BI(t),e===null&&_1(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,g1(r,s)?a=null:i!==null&&g1(r,i)&&(t.flags|=32),u5(e,t),Ir(e,t,a,n),t.child;case 6:return e===null&&_1(t),null;case 13:return h5(e,t,n);case 4:return X_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=eu(t,null,r,n):Ir(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Vs(r,s),ck(e,t,r,s,n);case 7:return Ir(e,t,t.pendingProps,n),t.child;case 8:return Ir(e,t,t.pendingProps.children,n),t.child;case 12:return Ir(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,Mt(Qm,r._currentValue),r._currentValue=a,i!==null)if(ri(i.value,a)){if(i.children===s.children&&!Kr.current){t=ca(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=ta(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),w1(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(he(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),w1(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ir(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Cc(t,n),s=Os(s),r=r(s),t.flags|=1,Ir(e,t,r,n),t.child;case 14:return r=t.type,s=Vs(r,t.pendingProps),s=Vs(r.type,s),uk(e,t,r,s,n);case 15:return l5(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Vs(r,s),Qp(e,t),t.tag=1,Qr(r)?(e=!0,Ym(t)):e=!1,Cc(t,n),i5(t,r,s),N1(t,r,s,n),S1(null,t,r,!0,e,n);case 19:return f5(e,t,n);case 22:return c5(e,t,n)}throw Error(he(156,t.tag))};function j5(e,t){return nI(e,t)}function Y9(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function As(e,t,n,r){return new Y9(e,t,n,r)}function h2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function G9(e){if(typeof e=="function")return h2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===I_)return 11;if(e===P_)return 14}return 2}function oo(e,t){var n=e.alternate;return n===null?(n=As(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Zp(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")h2(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case sc:return cl(n.children,s,i,t);case A_:a=8,s|=8;break;case Gb:return e=As(12,n,t,s|2),e.elementType=Gb,e.lanes=i,e;case Kb:return e=As(13,n,t,s),e.elementType=Kb,e.lanes=i,e;case Qb:return e=As(19,n,t,s),e.elementType=Qb,e.lanes=i,e;case BA:return Zg(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case LA:a=10;break e;case FA:a=9;break e;case I_:a=11;break e;case P_:a=14;break e;case Da:a=16,r=null;break e}throw Error(he(130,e==null?e:typeof e,""))}return t=As(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function cl(e,t,n,r){return e=As(7,e,r,t),e.lanes=n,e}function Zg(e,t,n,r){return e=As(22,e,r,t),e.elementType=BA,e.lanes=n,e.stateNode={isHidden:!1},e}function H0(e,t,n){return e=As(6,e,null,t),e.lanes=n,e}
vendor: 5,640 bytes, line 41
41function W0(e,t,n){return t=As(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function K9(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=N0(0),this.expirationTimes=N0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=N0(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function f2(e,t,n,r,s,i,a,l,c){return e=new K9(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=As(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q_(i),e}function Q9(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:rc,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function A5(e){if(!e)return ho;e=e._reactInternals;e:{if(Tl(e)!==e||e.tag!==1)throw Error(he(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Qr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(he(171))}if(e.tag===1){var n=e.type;if(Qr(n))return AI(e,n,t)}return t}function I5(e,t,n,r,s,i,a,l,c){return e=f2(n,r,!0,e,s,i,a,l,c),e.context=A5(null),n=e.current,r=Mr(),s=ao(n),i=ta(r,s),i.callback=t??null,so(n,i,s),e.current.lanes=s,gf(e,s,r),Xr(e,r),e}function ex(e,t,n,r){var s=t.current,i=Mr(),a=ao(s);return n=A5(n),t.context===null?t.context=n:t.pendingContext=n,t=ta(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=so(s,t,a),e!==null&&(ei(e,s,a,i),Yp(e,s,a)),a}function ag(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function wk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function p2(e,t){wk(e,t),(e=e.alternate)&&wk(e,t)}function X9(){return null}var P5=typeof reportError=="function"?reportError:function(e){console.error(e)};function m2(e){this._internalRoot=e}tx.prototype.render=m2.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(he(409));ex(e,t,null,null)};tx.prototype.unmount=m2.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_l(function(){ex(null,e,null,null)}),t[oa]=null}};function tx(e){this._internalRoot=e}tx.prototype.unstable_scheduleHydration=function(e){if(e){var t=cI();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ra.length&&t!==0&&t<Ra[n].priority;n++);Ra.splice(n,0,e),n===0&&dI(e)}};function g2(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nx(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ek(){}function J9(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=ag(a);i.call(u)}}var a=I5(t,r,e,0,null,!1,!1,"",Ek);return e._reactRootContainer=a,e[oa]=a.current,Mh(e.nodeType===8?e.parentNode:e),_l(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=ag(c);l.call(u)}}var c=f2(e,0,!1,null,null,!1,!1,"",Ek);return e._reactRootContainer=c,e[oa]=c.current,Mh(e.nodeType===8?e.parentNode:e),_l(function(){ex(t,c,n,r)}),c}function rx(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var c=ag(a);l.call(c)}}ex(t,a,e,s)}else a=J9(n,t,e,s,r);return ag(a)}oI=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Dd(t.pendingLanes);n!==0&&(M_(t,n|1),Xr(t,Tn()),!(xt&6)&&(ru=Tn()+500,yo()))}break;case 13:_l(function(){var r=la(e,1);if(r!==null){var s=Mr();ei(r,e,1,s)}}),p2(e,1)}};R_=function(e){if(e.tag===13){var t=la(e,134217728);if(t!==null){var n=Mr();ei(t,e,134217728,n)}p2(e,134217728)}};lI=function(e){if(e.tag===13){var t=ao(e),n=la(e,t);if(n!==null){var r=Mr();ei(n,e,t,r)}p2(e,t)}};cI=function(){return Tt};uI=function(e,t){var n=Tt;try{return Tt=e,t()}finally{Tt=n}};a1=function(e,t,n){switch(t){case"input":if(Zb(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=Yg(r);if(!s)throw Error(he(90));$A(r),Zb(r,s)}}}break;case"textarea":HA(e,n);break;case"select":t=n.value,t!=null&&Nc(e,!!n.multiple,t,!1)}};QA=c2;XA=_l;var Z9={usingClientEntryPoint:!1,Events:[yf,lc,Yg,GA,KA,c2]},ld={findFiberByHostInstance:Yo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},eB={bundleType:ld.bundleType,version:ld.version,rendererPackageName:ld.rendererPackageName,rendererConfig:ld.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=eI(e),e===null?null:e.stateNode},findFiberByHostInstance:ld.findFiberByHostInstance||X9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
41if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vp.isDisabled&&vp.supportsFiber)try{Hg=vp.inject(eB),Ei=vp}catch{}}gs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Z9;gs.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g2(t))throw Error(he(200));return Q9(e,t,null,n)};gs.createRoot=function(e,t){if(!g2(e))throw Error(he(299));var n=!1,r="",s=P5;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=f2(e,1,!1,null,null,n,!1,r,s),e[oa]=t.current,Mh(e.nodeType===8?e.parentNode:e),new m2(t)};gs.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(he(188)):(e=Object.keys(e).join(","),Error(he(268,e)));return e=eI(t),e=e===null?null:e.stateNode,e};gs.flushSync=function(e){return _l(e)};gs.hydrate=function(e,t,n){if(!nx(t))throw Error(he(200));return rx(null,e,t,!0,n)};gs.hydrateRoot=function(e,t,n){if(!g2(e))throw Error(he(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=P5;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=I5(t,null,e,1,n??null,s,!1,i,a),e[oa]=t.current,Mh(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new tx(t)};gs.render=function(e,t,n){if(!nx(t))throw Error(he(200));return rx(null,e,t,!1,n)};gs.unmountComponentAtNode=function(e){if(!nx(e))throw Error(he(40));return e._reactRootContainer?(_l(function(){rx(null,null,e,!1,function(){e._reactRootContainer=null,e[oa]=null})}),!0):!1};gs.unstable_batchedUpdates=c2;gs.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nx(n))throw Error(he(200));if(e==null||e._reactInternals===void 0)throw Error(he(38));return rx(e,t,n,!1,r)};gs.version="18.3.1-next-f1338f8080-20240426";function D5(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(D5)}catch(e){console.error(e)}}D5(),DA.exports=gs;var Er=DA.exports,O5,Nk=Er;O5=Nk.createRoot,Nk.hydrateRoot;function tB(e={}){const{nonce:t,locale:n,onScriptLoadSuccess:r,onScriptLoadError:s}=e,[i,a]=y.useState(!1),l=y.useRef(r);l.current=r;const c=y.useRef(s);return c.current=s,y.useEffect(()=>{const u=document.createElement("script");return u.src="https://accounts.google.com/gsi/client",n&&(u.src+=`?hl=${n}`),u.async=!0,u.defer=!0,u.nonce=t,u.onload=()=>{var d;a(!0),(d=l.current)===null||d===void 0||d.call(l)},u.onerror=()=>{var d;a(!1),(d=c.current)===null||d===void 0||d.call(c)},document.body.appendChild(u),()=>{document.body.removeChild(u)}},[t]),i}const M5=y.createContext(null);function nB({clientId:e,nonce:t,locale:n,onScriptLoadSuccess:r,onScriptLoadError:s,children:i}){const a=tB({nonce:t,onScriptLoadSuccess:r,onScriptLoadError:s,locale:n}),l=y.useMemo(()=>({locale:n,clientId:e,scriptLoadedSuccessfully:a}),[e,a]);return ye.createElement(M5.Provider,{value:l},i)}function rB(){const e=y.useContext(M5);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function sB(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const iB={large:40,medium:32,small:20};function aB({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:s="standard",theme:i="outline",size:a="large",text:l,shape:c,logo_alignment:u,width:d,click_listener:h,state:f,containerProps:p,login_hint:m,...x}){const w=y.useRef(null),{clientId:g,locale:b,scriptLoadedSuccessfully:_}=rB(),k=y.useRef(e);k.current=e;const T=y.useRef(t);T.current=t;const N=y.useRef(r);return N.current=r,y.useEffect(()=>{var C,S,I,E,j,P,L,z,R;if(_)return(I=(S=(C=window==null?void 0:window.google)===null||C===void 0?void 0:C.accounts)===null||S===void 0?void 0:S.id)===null||I===void 0||I.initialize({client_id:g,callback:B=>{var O;if(!(B!=null&&B.credential))return(O=T.current)===null||O===void 0?void 0:O.call(T);const{credential:U,select_by:H}=B;k.current({credential:U,clientId:sB(B),select_by:H})},login_hint:m,...x}),(P=(j=(E=window==null?void 0:window.google)===null||E===void 0?void 0:E.accounts)===null||j===void 0?void 0:j.id)===null||P===void 0||P.renderButton(w.current,{type:s,theme:i,size:a,text:l,shape:c,logo_alignment:u,width:d,locale:b,click_listener:h,state:f}),n&&((R=(z=(L=window==null?void 0:window.google)===null||L===void 0?void 0:L.accounts)===null||z===void 0?void 0:z.id)===null||R===void 0||R.prompt(N.current)),()=>{var B,O,U;n&&((U=(O=(B=window==null?void 0:window.google)===null||B===void 0?void 0:B.accounts)===null||O===void 0?void 0:O.id)===null||U===void 0||U.cancel())}},[g,_,n,s,i,a,l,c,u,d,b,m]),ye.createElement("div",{...p,ref:w,style:{height:iB[a],...p==null?void 0:p.style}})}const x2=y.createContext({});function bo(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const sx=y.createContext(null),ix=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class oB extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function lB({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=y.useContext(ix);return y.useInsertionEffect(()=>{const{width:a,height:l,top:c,left:u}=s.current;if(t||!r.current||!a||!l)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return i&&(d.nonce=i),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` 42 [data-motion-pop-id="${n}"] { 43 position: absolute !important; 44 width: ${a}px !important; 45 height: ${l}px !important; 46 top: ${c}px !important; 47 left: ${u}px !important; 48 } 49 `),()=>{document.head.removeChild(d)}},[t]),o.jsx(oB,{isPresent:t,childRef:r,sizeRef:s,children:y.cloneElement(e,{ref:r})})}const cB=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:a})=>{const l=bo(uB),c=y.useId(),u=y.useCallback(h=>{l.set(h,!0);for(const f of l.values())if(!f)return;r&&r()},[l,r]),d=y.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:u,register:h=>(l.set(h,!1),()=>l.delete(h))}),i?[Math.random(),u]:[n,u]);return y.useMemo(()=>{l.forEach((h,f)=>l.set(f,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),a==="popLayout"&&(e=o.jsx(lB,{isPresent:n,children:e})),o.jsx(sx.Provider,{value:d,children:e})};function uB(){return new Map}function R5(e=!0){const t=y.useContext(sx);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=y.useId();y.useEffect(()=>{e&&s(i)},[e]);const a=y.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,a]:[!0]}
vendor: 15,699 bytes, line 49
49const _p=e=>e.key||"";function kk(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const y2=typeof window<"u",b2=y2?y.useLayoutEffect:y.useEffect,He=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:a=!1})=>{const[l,c]=R5(a),u=y.useMemo(()=>kk(e),[e]),d=a&&!l?[]:u.map(_p),h=y.useRef(!0),f=y.useRef(u),p=bo(()=>new Map),[m,x]=y.useState(u),[w,g]=y.useState(u);b2(()=>{h.current=!1,f.current=u;for(let k=0;k<w.length;k++){const T=_p(w[k]);d.includes(T)?p.delete(T):p.get(T)!==!0&&p.set(T,!1)}},[w,d.length,d.join("-")]);const b=[];if(u!==m){let k=[...u];for(let T=0;T<w.length;T++){const N=w[T],C=_p(N);d.includes(C)||(k.splice(T,0,N),b.push(N))}i==="wait"&&b.length&&(k=b),g(kk(k)),x(u);return}const{forceRender:_}=y.useContext(x2);return o.jsx(o.Fragment,{children:w.map(k=>{const T=_p(k),N=a&&!l?!1:u===w||d.includes(T),C=()=>{if(p.has(T))p.set(T,!0);else return;let S=!0;p.forEach(I=>{I||(S=!1)}),S&&(_==null||_(),g(f.current),a&&(c==null||c()),r&&r())};return o.jsx(cB,{isPresent:N,initial:!h.current||n?void 0:!1,custom:N?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:N?void 0:C,children:k},T)})})},cs=e=>e;let L5=cs;function v2(e){let t;return()=>(t===void 0&&(t=e()),t)}const su=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},na=e=>e*1e3,ra=e=>e/1e3,dB={useManualTiming:!1};function hB(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){i.has(u)&&(c.schedule(u),e()),u(a)}const c={schedule:(u,d=!1,h=!1)=>{const p=h&&r?t:n;return d&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(a=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,s&&(s=!1,c.process(u))}};return c}const wp=["read","resolveKeyframes","update","preRender","render","postRender"],fB=40;function F5(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=wp.reduce((g,b)=>(g[b]=hB(i),g),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:h,postRender:f}=a,p=()=>{const g=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(g-s.timestamp,fB),1),s.timestamp=g,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),h.process(s),f.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:wp.reduce((g,b)=>{const _=a[b];return g[b]=(k,T=!1,N=!1)=>(n||m(),_.schedule(k,T,N)),g},{}),cancel:g=>{for(let b=0;b<wp.length;b++)a[wp[b]].cancel(g)},state:s,steps:a}}const{schedule:Rt,cancel:ua,state:sr,steps:V0}=F5(typeof requestAnimationFrame<"u"?requestAnimationFrame:cs,!0),B5=y.createContext({strict:!1}),Tk={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},iu={};for(const e in Tk)iu[e]={isEnabled:t=>Tk[e].some(n=>!!t[n])};function pB(e){for(const t in e)iu[t]={...iu[t],...e[t]}}const mB=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function og(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||mB.has(e)}let U5=e=>!og(e);function gB(e){e&&(U5=t=>t.startsWith("on")?!og(t):e(t))}try{gB(require("@emotion/is-prop-valid").default)}catch{}function xB(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(U5(s)||n===!0&&og(s)||!t&&!og(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function yB(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const ax=y.createContext({});function Wh(e){return typeof e=="string"||Array.isArray(e)}function ox(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const _2=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],w2=["initial",..._2];function lx(e){return ox(e.animate)||w2.some(t=>Wh(e[t]))}function $5(e){return!!(lx(e)||e.variants)}function bB(e,t){if(lx(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Wh(n)?n:void 0,animate:Wh(r)?r:void 0}}return e.inherit!==!1?t:{}}function vB(e){const{initial:t,animate:n}=bB(e,y.useContext(ax));return y.useMemo(()=>({initial:t,animate:n}),[Sk(t),Sk(n)])}function Sk(e){return Array.isArray(e)?e.join(" "):e}const _B=Symbol.for("motionComponentSymbol");function mc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function wB(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):mc(n)&&(n.current=r))},[t])}const E2=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),EB="framerAppearId",z5="data-"+E2(EB),{schedule:N2}=F5(queueMicrotask,!1),H5=y.createContext({});function NB(e,t,n,r,s){var i,a;const{visualElement:l}=y.useContext(ax),c=y.useContext(B5),u=y.useContext(sx),d=y.useContext(ix).reducedMotion,h=y.useRef(null);r=r||c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=h.current,p=y.useContext(H5);f&&!f.projection&&s&&(f.type==="html"||f.type==="svg")&&kB(h.current,n,s,p);const m=y.useRef(!1);y.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const x=n[z5],w=y.useRef(!!x&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,x))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,x)));return b2(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),N2.render(f.render),w.current&&f.animationState&&f.animationState.animateChanges())}),y.useEffect(()=>{f&&(!w.current&&f.animationState&&f.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var g;(g=window.MotionHandoffMarkAsComplete)===null||g===void 0||g.call(window,x)}),w.current=!1))}),f}function kB(e,t,n,r){const{layoutId:s,layout:i,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:W5(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!a||l&&mc(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function W5(e){if(e)return e.options.allowProjection!==!1?e.projection:W5(e.parent)}function TB({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,a;e&&pB(e);function l(u,d){let h;const f={...y.useContext(ix),...u,layoutId:SB(u)},{isStatic:p}=f,m=vB(u),x=r(u,p);if(!p&&y2){CB();const w=jB(f);h=w.MeasureLayout,m.visualElement=NB(s,x,f,t,w.ProjectionNode)}return o.jsxs(ax.Provider,{value:m,children:[h&&m.visualElement?o.jsx(h,{visualElement:m.visualElement,...f}):null,n(s,u,wB(x,m.visualElement,d),x,p,m.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(a=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&a!==void 0?a:""})`}`;const c=y.forwardRef(l);return c[_B]=s,c}function SB({layoutId:e}){const t=y.useContext(x2).id;return t&&e!==void 0?t+"-"+e:e}function CB(e,t){y.useContext(B5).strict}function jB(e){const{drag:t,layout:n}=iu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const AB=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function k2(e){return typeof e!="string"||e.includes("-")?!1:!!(AB.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ck(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function T2(e,t,n,r){if(typeof t=="function"){const[s,i]=Ck(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=Ck(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const B1=e=>Array.isArray(e),IB=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),PB=e=>B1(e)?e[e.length-1]||0:e,or=e=>!!(e&&e.getVelocity);function em(e){const t=or(e)?e.get():e;return IB(t)?t.toValue():t}function DB({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const a={latestValues:OB(r,s,i,e),renderState:t()};return n&&(a.onMount=l=>n({props:r,current:l,...a}),a.onUpdate=l=>n(l)),a}const V5=e=>(t,n)=>{const r=y.useContext(ax),s=y.useContext(sx),i=()=>DB(e,t,r,s);return n?i():bo(i)};function OB(e,t,n,r){const s={},i=r(e,{});for(const f in i)s[f]=em(i[f]);let{initial:a,animate:l}=e;const c=lx(e),u=$5(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const h=d?l:a;if(h&&typeof h!="boolean"&&!ox(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const m=T2(e,f[p]);if(m){const{transitionEnd:x,transition:w,...g}=m;for(const b in g){let _=g[b];if(Array.isArray(_)){const k=d?_.length-1:0;_=_[k]}_!==null&&(s[b]=_)}for(const b in x)s[b]=x[b]}}}return s}const Nu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sl=new Set(Nu),q5=e=>t=>typeof t=="string"&&t.startsWith(e),Y5=q5("--"),MB=q5("var(--"),S2=e=>MB(e)?RB.test(e.split("/*")[0].trim()):!1,RB=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,G5=(e,t)=>t&&typeof e=="number"?t.transform(e):e,da=(e,t,n)=>n>t?t:n<e?e:n,ku={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Vh={...ku,transform:e=>da(0,1,e)},Ep={...ku,default:1},vf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ja=vf("deg"),ki=vf("%"),ze=vf("px"),LB=vf("vh"),FB=vf("vw"),jk={...ki,parse:e=>ki.parse(e)/100,transform:e=>ki.transform(e*100)},BB={borderWidth:ze,borderTopWidth:ze,borderRightWidth:ze,borderBottomWidth:ze,borderLeftWidth:ze,borderRadius:ze,radius:ze,borderTopLeftRadius:ze,borderTopRightRadius:ze,borderBottomRightRadius:ze,borderBottomLeftRadius:ze,width:ze,maxWidth:ze,height:ze,maxHeight:ze,top:ze,right:ze,bottom:ze,left:ze,padding:ze,paddingTop:ze,paddingRight:ze,paddingBottom:ze,paddingLeft:ze,margin:ze,marginTop:ze,marginRight:ze,marginBottom:ze,marginLeft:ze,backgroundPositionX:ze,backgroundPositionY:ze},UB={rotate:ja,rotateX:ja,rotateY:ja,rotateZ:ja,scale:Ep,scaleX:Ep,scaleY:Ep,scaleZ:Ep,skew:ja,skewX:ja,skewY:ja,distance:ze,translateX:ze,translateY:ze,translateZ:ze,x:ze,y:ze,z:ze,perspective:ze,transformPerspective:ze,opacity:Vh,originX:jk,originY:jk,originZ:ze},Ak={...ku,transform:Math.round},C2={...BB,...UB,zIndex:Ak,size:ze,fillOpacity:Vh,strokeOpacity:Vh,numOctaves:Ak},$B={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zB=Nu.length;function HB(e,t,n){let r="",s=!0;for(let i=0;i<zB;i++){const a=Nu[i],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=G5(l,C2[a]);if(!c){s=!1;const d=$B[a]||a;r+=`${d}(${u}) `}n&&(t[a]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function j2(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(Sl.has(c)){a=!0;continue}else if(Y5(c)){s[c]=u;continue}else{const d=G5(u,C2[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(a||n?r.transform=HB(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const WB={offset:"stroke-dashoffset",array:"stroke-dasharray"},VB={offset:"strokeDashoffset",array:"strokeDasharray"};function qB(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?WB:VB;e[i.offset]=ze.transform(-r);const a=ze.transform(t),l=ze.transform(n);e[i.array]=`${a} ${l}`}function Ik(e,t,n){return typeof e=="string"?e:ze.transform(t+n*e)}function YB(e,t,n){const r=Ik(t,e.x,e.width),s=Ik(n,e.y,e.height);return`${r} ${s}`}function A2(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,h){if(j2(e,u,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=YB(m,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),a!==void 0&&qB(f,a,l,c,!1)}const I2=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),K5=()=>({...I2(),attrs:{}}),P2=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Q5(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const X5=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function J5(e,t,n,r){Q5(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(X5.has(s)?s:E2(s),t.attrs[s])}const lg={};function GB(e){Object.assign(lg,e)}function Z5(e,{layout:t,layoutId:n}){return Sl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!lg[e]||e==="opacity")}function D2(e,t,n){var r;const{style:s}=e,i={};for(const a in s)(or(s[a])||t.style&&or(t.style[a])||Z5(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[a]=s[a]);return i}function eP(e,t,n){const r=D2(e,t,n);for(const s in e)if(or(e[s])||or(t[s])){const i=Nu.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function KB(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Pk=["x","y","width","height","cx","cy","r"],QB={useVisualState:V5({scrapeMotionValuesFromProps:eP,createRenderState:K5,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in s)if(Sl.has(l)){i=!0;break}}if(!i)return;let a=!t;if(t)for(let l=0;l<Pk.length;l++){const c=Pk[l];e[c]!==t[c]&&(a=!0)}a&&Rt.read(()=>{KB(n,r),Rt.render(()=>{A2(r,s,P2(n.tagName),e.transformTemplate),J5(n,r)})})}})},XB={useVisualState:V5({scrapeMotionValuesFromProps:D2,createRenderState:I2})};function tP(e,t,n){for(const r in t)!or(t[r])&&!Z5(r,n)&&(e[r]=t[r])}function JB({transformTemplate:e},t){return y.useMemo(()=>{const n=I2();return j2(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ZB(e,t){const n=e.style||{},r={};return tP(r,n,e),Object.assign(r,JB(e,t)),r}function e7(e,t){const n={},r=ZB(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}
49`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function t7(e,t,n,r){const s=y.useMemo(()=>{const i=K5();return A2(i,t,P2(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};tP(i,e.style,e),s.style={...i,...s.style}}return s}function n7(e=!1){return(n,r,s,{latestValues:i},a)=>{const c=(k2(n)?t7:e7)(r,i,a,n),u=xB(r,typeof n=="string",e),d=n!==y.Fragment?{...u,...c,ref:s}:{},{children:h}=r,f=y.useMemo(()=>or(h)?h.get():h,[h]);return y.createElement(n,{...d,children:f})}}function r7(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const a={...k2(r)?QB:XB,preloadedFeatures:e,useRender:n7(s),createVisualElement:t,Component:r};return TB(a)}}function nP(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function cx(e,t,n){const r=e.getProps();return T2(r,t,n!==void 0?n:r.custom,e)}const s7=v2(()=>window.ScrollTimeline!==void 0);class i7{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(s7()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class a7 extends i7{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function O2(e,t){return e?e[t]||e.default||e:void 0}const U1=2e4;function rP(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<U1;)t+=n,r=e.next(t);return t>=U1?1/0:t}function M2(e){return typeof e=="function"}function Dk(e,t){e.timeline=t,e.onfinish=null}const R2=e=>Array.isArray(e)&&typeof e[0]=="number",o7={linearEasing:void 0};function l7(e,t){const n=v2(e);return()=>{var r;return(r=o7[t])!==null&&r!==void 0?r:n()}}const cg=l7(()=>{try{document.createElement("div").animate({opacity:0}
vendor: 19,356 bytes, line 49
49,{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sP=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(su(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function iP(e){return!!(typeof e=="function"&&cg()||!e||typeof e=="string"&&(e in $1||cg())||R2(e)||Array.isArray(e)&&e.every(iP))}const Md=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,$1={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Md([0,.65,.55,1]),circOut:Md([.55,0,1,.45]),backIn:Md([.31,.01,.66,-.59]),backOut:Md([.33,1.53,.69,.99])};function aP(e,t){if(e)return typeof e=="function"&&cg()?sP(e,t):R2(e)?Md(e):Array.isArray(e)?e.map(n=>aP(n,t)||$1.easeOut):$1[e]}const Ws={x:!1,y:!1};function oP(){return Ws.x||Ws.y}function lP(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function cP(e,t){const n=lP(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function Ok(e){return t=>{t.pointerType==="touch"||oP()||e(t)}}function c7(e,t,n={}){const[r,s,i]=cP(e,n),a=Ok(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=Ok(h=>{u(h),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,s)});return r.forEach(l=>{l.addEventListener("pointerenter",a,s)}),i}const uP=(e,t)=>t?e===t?!0:uP(e,t.parentElement):!1,L2=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,u7=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function d7(e){return u7.has(e.tagName)||e.tabIndex!==-1}const Rd=new WeakSet;function Mk(e){return t=>{t.key==="Enter"&&e(t)}}function q0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const h7=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Mk(()=>{if(Rd.has(n))return;q0(n,"down");const s=Mk(()=>{q0(n,"up")}),i=()=>q0(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Rk(e){return L2(e)&&!oP()}function f7(e,t,n={}){const[r,s,i]=cP(e,n),a=l=>{const c=l.currentTarget;if(!Rk(l)||Rd.has(c))return;Rd.add(c);const u=t(l),d=(p,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),!(!Rk(p)||!Rd.has(c))&&(Rd.delete(c),typeof u=="function"&&u(p,{success:m}))},h=p=>{d(p,n.useGlobalTarget||uP(c,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",f,s)};return r.forEach(l=>{!d7(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,s),l.addEventListener("focus",u=>h7(u,s),s)}),i}function p7(e){return e==="x"||e==="y"?Ws[e]?null:(Ws[e]=!0,()=>{Ws[e]=!1}):Ws.x||Ws.y?null:(Ws.x=Ws.y=!0,()=>{Ws.x=Ws.y=!1})}const dP=new Set(["width","height","top","left","right","bottom",...Nu]);let tm;function m7(){tm=void 0}const Ti={now:()=>(tm===void 0&&Ti.set(sr.isProcessing||dB.useManualTiming?sr.timestamp:performance.now()),tm),set:e=>{tm=e,queueMicrotask(m7)}};function F2(e,t){e.indexOf(t)===-1&&e.push(t)}function B2(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function g7([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const s=n<0?e.length+n:n,[i]=e.splice(t,1);e.splice(s,0,i)}return e}class U2{constructor(){this.subscriptions=[]}add(t){return F2(this.subscriptions,t),()=>B2(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const a=this.subscriptions[i];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function hP(e,t){return t?e*(1e3/t):0}const Lk=30,x7=e=>!isNaN(parseFloat(e)),sh={current:void 0};class y7{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=Ti.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ti.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=x7(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new U2);const r=this.events[t].add(n);return t==="change"?()=>{r(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return sh.current&&sh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Ti.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Lk)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Lk);return hP(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function au(e,t){return new y7(e,t)}function b7(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,au(n))}function v7(e,t){const n=cx(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const a in i){const l=PB(i[a]);b7(e,a,l)}}function _7(e){return!!(or(e)&&e.add)}function z1(e,t){const n=e.getValue("willChange");if(_7(n))return n.add(t)}function fP(e){return e.props[z5]}const pP=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,w7=1e-7,E7=12;function N7(e,t,n,r,s){let i,a,l=0;do a=t+(n-t)/2,i=pP(a,r,s)-e,i>0?n=a:t=a;while(Math.abs(i)>w7&&++l<E7);return a}function _f(e,t,n,r){if(e===t&&n===r)return cs;const s=i=>N7(i,0,1,e,n);return i=>i===0||i===1?i:pP(s(i),t,r)}const mP=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gP=e=>t=>1-e(1-t),xP=_f(.33,1.53,.69,.99),$2=gP(xP),yP=mP($2),bP=e=>(e*=2)<1?.5*$2(e):.5*(2-Math.pow(2,-10*(e-1))),z2=e=>1-Math.sin(Math.acos(e)),vP=gP(z2),_P=mP(z2),wP=e=>/^0[^.\s]+$/u.test(e);function k7(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||wP(e):!0}const ih=e=>Math.round(e*1e5)/1e5,H2=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T7(e){return e==null}const S7=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,W2=(e,t)=>n=>!!(typeof n=="string"&&S7.test(n)&&n.startsWith(e)||t&&!T7(n)&&Object.prototype.hasOwnProperty.call(n,t)),EP=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,a,l]=r.match(H2);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},C7=e=>da(0,255,e),Y0={...ku,transform:e=>Math.round(C7(e))},Qo={test:W2("rgb","red"),parse:EP("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Y0.transform(e)+", "+Y0.transform(t)+", "+Y0.transform(n)+", "+ih(Vh.transform(r))+")"};function j7(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const H1={test:W2("#"),parse:j7,transform:Qo.transform},gc={test:W2("hsl","hue"),parse:EP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ki.transform(ih(t))+", "+ki.transform(ih(n))+", "+ih(Vh.transform(r))+")"},xr={test:e=>Qo.test(e)||H1.test(e)||gc.test(e),parse:e=>Qo.test(e)?Qo.parse(e):gc.test(e)?gc.parse(e):H1.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Qo.transform(e):gc.transform(e)},A7=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function I7(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(H2))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(A7))===null||n===void 0?void 0:n.length)||0)>0}const NP="number",kP="color",P7="var",D7="var(",Fk="${}",O7=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function qh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(O7,c=>(xr.test(c)?(r.color.push(i),s.push(kP),n.push(xr.parse(c))):c.startsWith(D7)?(r.var.push(i),s.push(P7),n.push(c)):(r.number.push(i),s.push(NP),n.push(parseFloat(c))),++i,Fk)).split(Fk);return{values:n,split:l,indexes:r,types:s}}function TP(e){return qh(e).values}function SP(e){const{split:t,types:n}=qh(e),r=t.length;return s=>{let i="";for(let a=0;a<r;a++)if(i+=t[a],s[a]!==void 0){const l=n[a];l===NP?i+=ih(s[a]):l===kP?i+=xr.transform(s[a]):i+=s[a]}return i}}const M7=e=>typeof e=="number"?0:e;function R7(e){const t=TP(e);return SP(e)(t.map(M7))}const fo={test:I7,parse:TP,createTransformer:SP,getAnimatableNone:R7},L7=new Set(["brightness","contrast","saturate","opacity"]);function F7(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(H2)||[];if(!r)return e;const s=n.replace(r,"");let i=L7.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const B7=/\b([a-z-]*)\(.*?\)/gu,W1={...fo,getAnimatableNone:e=>{const t=e.match(B7);return t?t.map(F7).join(" "):e}},U7={...C2,color:xr,backgroundColor:xr,outlineColor:xr,fill:xr,stroke:xr,borderColor:xr,borderTopColor:xr,borderRightColor:xr,borderBottomColor:xr,borderLeftColor:xr,filter:W1,WebkitFilter:W1},V2=e=>U7[e];function CP(e,t){let n=V2(e);return n!==W1&&(n=fo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const $7=new Set(["auto","none","0"]);function z7(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!$7.has(i)&&qh(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=CP(n,s)}const Bk=e=>e===ku||e===ze,Uk=(e,t)=>parseFloat(e.split(", ")[t]),$k=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return Uk(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?Uk(i[1],e):0}},H7=new Set(["x","y","z"]),W7=Nu.filter(e=>!H7.has(e));function V7(e){const t=[];return W7.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const ou={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:$k(4,13),y:$k(5,14)};ou.translateX=ou.x;ou.translateY=ou.y;const ul=new Set;let V1=!1,q1=!1;function jP(){if(q1){const e=Array.from(ul).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=V7(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,a])=>{var l;(l=r.getValue(i))===null||l===void 0||l.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}q1=!1,V1=!1,ul.forEach(e=>e.complete()),ul.clear()}function AP(){ul.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(q1=!0)})}function q7(){AP(),jP()}class q2{constructor(t,n,r,s,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ul.add(this),V1||(V1=!0,Rt.read(AP),Rt.resolveKeyframes(jP))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const a=s==null?void 0:s.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&a===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ul.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ul.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const IP=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Y7=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function G7(e){const t=Y7.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function PP(e,t,n=1){const[r,s]=G7(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const a=i.trim();return IP(a)?parseFloat(a):a}return S2(s)?PP(s,t,n+1):s}const DP=e=>t=>t.test(e),K7={test:e=>e==="auto",parse:e=>e},OP=[ku,ze,ki,ja,FB,LB,K7],zk=e=>OP.find(DP(e));class MP extends q2{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),S2(u))){const d=PP(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!dP.has(r)||t.length!==2)return;const[s,i]=t,a=zk(s),l=zk(i);if(a!==l)if(Bk(a)&&Bk(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)k7(t[s])&&r.push(s);r.length&&z7(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ou[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const a=s.length-1,l=s[a];s[a]=ou[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Hk=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(fo.test(e)||e==="0")&&!e.startsWith("url("));function Q7(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function X7(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],a=Hk(s,t),l=Hk(i,t);return!a||!l?!1:Q7(e)||(n==="spring"||M2(n))&&r}const J7=e=>e!==null;function ux(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(J7),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const Z7=40;class RP{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ti.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Z7?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&q7(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Ti.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!X7(t,r,s,i))if(a)this.options.duration=0;else{c&&c(ux(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const en=(e,t,n)=>e+(t-e)*n;function G0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function eU({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,a=0;if(!t)s=i=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=G0(c,l,e+1/3),i=G0(c,l,e),a=G0(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(a*255),alpha:r}}function ug(e,t){return n=>n>0?t:e}const K0=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},tU=[H1,Qo,gc],nU=e=>tU.find(t=>t.test(e));function Wk(e){const t=nU(e);if(!t)return!1;let n=t.parse(e);return t===gc&&(n=eU(n)),n}const Vk=(e,t)=>{const n=Wk(e),r=Wk(t);if(!n||!r)return ug(e,t);const s={...n};return i=>(s.red=K0(n.red,r.red,i),s.green=K0(n.green,r.green,i),s.blue=K0(n.blue,r.blue,i),s.alpha=en(n.alpha,r.alpha,i),Qo.transform(s))},rU=(e,t)=>n=>t(e(n)),wf=(...e)=>e.reduce(rU),Y1=new Set(["none","hidden"]);function sU(e,t){return Y1.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function iU(e,t){return n=>en(e,t,n)}function Y2(e){return typeof e=="number"?iU:typeof e=="string"?S2(e)?ug:xr.test(e)?Vk:lU:Array.isArray(e)?LP:typeof e=="object"?xr.test(e)?Vk:aU:ug}function LP(e,t){const n=[...e],r=n.length,s=e.map((i,a)=>Y2(i)(i,t[a]));return i=>{for(let a=0;a<r;a++)n[a]=s[a](i);return n}}function aU(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Y2(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function oU(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],l=e.indexes[a][s[a]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[i]=c,s[a]++}return r}const lU=(e,t)=>{const n=fo.createTransformer(t),r=qh(e),s=qh(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?Y1.has(e)&&!s.values.length||Y1.has(t)&&!r.values.length?sU(e,t):wf(LP(oU(r,s),s.values),n):ug(e,t)};function FP(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?en(e,t,n
vendor: 5,407 bytes, line 49
49):Y2(e)(e,t)}const cU=5;function BP(e,t,n){const r=Math.max(t-cU,0);return hP(n-e(r),t-r)}const xn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Q0=.001;function uU({duration:e=xn.duration,bounce:t=xn.bounce,velocity:n=xn.velocity,mass:r=xn.mass}){let s,i,a=1-t;a=da(xn.minDamping,xn.maxDamping,a),e=da(xn.minDuration,xn.maxDuration,ra(e)),a<1?(s=u=>{const d=u*a,h=d*e,f=d-n,p=G1(u,a),m=Math.exp(-h);return Q0-f/p*m},i=u=>{const h=u*a*e,f=h*n+n,p=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-h),x=G1(Math.pow(u,2),a);return(-s(u)+Q0>0?-1:1)*((f-p)*m)/x}):(s=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-Q0+d*h},i=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=hU(s,i,l);if(e=na(e),isNaN(c))return{stiffness:xn.stiffness,damping:xn.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:a*2*Math.sqrt(r*u),duration:e}}}const dU=12;function hU(e,t,n){let r=n;for(let s=1;s<dU;s++)r=r-e(r)/t(r);return r}function G1(e,t){return e*Math.sqrt(1-t*t)}const fU=["duration","bounce"],pU=["stiffness","damping","mass"];function qk(e,t){return t.some(n=>e[n]!==void 0)}function mU(e){let t={velocity:xn.velocity,stiffness:xn.stiffness,damping:xn.damping,mass:xn.mass,isResolvedFromDuration:!1,...e};if(!qk(e,pU)&&qk(e,fU))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*da(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:xn.mass,stiffness:s,damping:i}}else{const n=uU(e);t={...t,...n,mass:xn.mass},t.isResolvedFromDuration=!0}return t}function UP(e=xn.visualDuration,t=xn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=mU({...n,velocity:-ra(n.velocity||0)}),m=f||0,x=u/(2*Math.sqrt(c*d)),w=a-i,g=ra(Math.sqrt(c/d)),b=Math.abs(w)<5;r||(r=b?xn.restSpeed.granular:xn.restSpeed.default),s||(s=b?xn.restDelta.granular:xn.restDelta.default);let _;if(x<1){const T=G1(g,x);_=N=>{const C=Math.exp(-x*g*N);return a-C*((m+x*g*w)/T*Math.sin(T*N)+w*Math.cos(T*N))}}else if(x===1)_=T=>a-Math.exp(-g*T)*(w+(m+g*w)*T);else{const T=g*Math.sqrt(x*x-1);_=N=>{const C=Math.exp(-x*g*N),S=Math.min(T*N,300);return a-C*((m+x*g*w)*Math.sinh(S)+T*w*Math.cosh(S))/T}}const k={calculatedDuration:p&&h||null,next:T=>{const N=_(T);if(p)l.done=T>=h;else{let C=0;x<1&&(C=T===0?na(m):BP(_,T,N));const S=Math.abs(C)<=r,I=Math.abs(a-N)<=s;l.done=S&&I}return l.value=l.done?a:N,l},toString:()=>{const T=Math.min(rP(k),U1),N=sP(C=>k.next(T*C).value,T,30);return T+"ms "+N}};return k}function Yk({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},p=S=>l!==void 0&&S<l||c!==void 0&&S>c,m=S=>l===void 0?c:c===void 0||Math.abs(l-S)<Math.abs(c-S)?l:c;let x=n*t;const w=h+x,g=a===void 0?w:a(w);g!==w&&(x=g-h);const b=S=>-x*Math.exp(-S/r),_=S=>g+b(S),k=S=>{const I=b(S),E=_(S);f.done=Math.abs(I)<=u,f.value=f.done?g:E};let T,N;const C=S=>{p(f.value)&&(T=S,N=UP({keyframes:[f.value,m(f.value)],velocity:BP(_,S,f.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:S=>{let I=!1;return!N&&T===void 0&&(I=!0,k(S),C(S)),T!==void 0&&S>=T?N.next(S-T):(!I&&k(S),f)}}}const gU=_f(.42,0,1,1),xU=_f(0,0,.58,1),$P=_f(.42,0,.58,1),yU=e=>Array.isArray(e)&&typeof e[0]!="number",bU={linear:cs,easeIn:gU,easeInOut:$P,easeOut:xU,circIn:z2,circInOut:_P,circOut:vP,backIn:$2,backInOut:yP,backOut:xP,anticipate:bP},Gk=e=>{if(R2(e)){L5(e.length===4);const[t,n,r,s]=e;return _f(t,n,r,s)}else if(typeof e=="string")return bU[e];return e};function vU(e,t,n){const r=[],s=n||FP,i=e.length-1;for(let a=0;a<i;a++){let l=s(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||cs:t;l=wf(c,l)}r.push(l)}return r}function zP(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(L5(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=vU(t,r,s),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=su(e[h],e[h+1],d);return l[h](f)};return n?d=>u(da(e[0],e[i-1],d)):u}function _U(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=su(0,t,r);e.push(en(n,1,s))}}function wU(e){const t=[0];return _U(t,e.length-1),t}function EU(e,t){return e.map(n=>n*t)}function NU(e,t){return e.map(()=>t||$P).splice(0,e.length-1)}function dg({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=yU(r)?r.map(Gk):Gk(r),i={done:!1,value:t[0]},a=EU(n&&n.length===t.length?n:wU(t),e),l=zP(a,t,{ease:Array.isArray(s)?s:NU(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const kU=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Rt.update(t,!0),stop:()=>ua(t),now:()=>sr.isProcessing?sr.timestamp:Ti.now()}},TU={decay:Yk,inertia:Yk,tween:dg,keyframes:dg,spring:UP},SU=e=>e/100;class G2 extends RP{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>
vendor: 56,617 bytes, line 49
49{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,a=(s==null?void 0:s.KeyframeResolver)||q2,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(i,l,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:a=0}=this.options,l=M2(n)?n:TU[n]||dg;let c,u;l!==dg&&typeof t[0]!="number"&&(c=wf(SU,FP(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=rP(d));const{calculatedDuration:h}=d,f=h+s,p=f*(r+1)-s;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:h,resolvedDuration:f,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:h}=r;if(this.startTime===null)return i.next(0);const{delay:f,repeat:p,repeatType:m,repeatDelay:x,onUpdate:w}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-f*(this.speed>=0?1:-1),b=this.speed>=0?g<0:g>d;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let _=this.currentTime,k=i;if(p){const S=Math.min(this.currentTime,d)/h;let I=Math.floor(S),E=S%1;!E&&S>=1&&(E=1),E===1&&I--,I=Math.min(I,p+1),!!(I%2)&&(m==="reverse"?(E=1-E,x&&(E-=x/h)):m==="mirror"&&(k=a)),_=da(0,1,E)*h}const T=b?{done:!1,value:c[0]}:k.next(_);l&&(T.value=l(T.value));let{done:N}=T;!b&&u!==null&&(N=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return C&&s!==void 0&&(T.value=ux(c,this.options,s)),w&&w(T.value),C&&this.finish(),T}get duration(){const{resolved:t}=this;return t?ra(t.calculatedDuration):0}get time(){return ra(this.currentTime)}set time(t){t=na(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ra(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=kU,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const CU=new Set(["opacity","clipPath","filter","transform"]);function jU(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:a="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=aP(l,s);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:a==="reverse"?"alternate":"normal"})}const AU=v2(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),hg=10,IU=2e4;function PU(e){return M2(e.type)||e.type==="spring"||!iP(e.ease)}function DU(e,t){const n=new G2({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<IU;)r=n.sample(i),s.push(r.value),i+=hg;return{times:void 0,keyframes:s,duration:i-hg,ease:"linear"}}const HP={anticipate:bP,backInOut:yP,circInOut:_P};function OU(e){return e in HP}class Kk extends RP{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new MP(i,(a,l)=>this.onKeyframesResolved(a,l),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&cg()&&OU(i)&&(i=HP[i]),PU(this.options)){const{onComplete:h,onUpdate:f,motionValue:p,element:m,...x}=this.options,w=DU(t,x);t=w.keyframes,t.length===1&&(t[1]=t[0]),r=w.duration,s=w.times,i=w.ease,a="keyframes"}const d=jU(l.owner.current,c,t,{...this.options,duration:r,times:s,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(Dk(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:h}=this.options;l.set(ux(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:s,type:a,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ra(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ra(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=na(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return cs;const{animation:r}=n;Dk(r,t)}return cs}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:h,element:f,...p}=this.options,m=new G2({...p,keyframes:r,duration:s,type:i,ease:a,times:l,isGenerator:!0}),x=na(this.time);u.setWithVelocity(m.sample(x-hg).value,m.sample(x).value,hg)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return AU()&&r&&CU.has(r)&&!c&&!u&&!s&&i!=="mirror"&&a!==0&&l!=="inertia"}}const MU={type:"spring",stiffness:500,damping:25,restSpeed:10},RU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LU={type:"keyframes",duration:.8},FU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BU=(e,{keyframes:t})=>t.length>2?LU:Sl.has(e)?e.startsWith("scale")?RU(t[1]):MU:FU;function UU({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const K2=(e,t,n,r={},s,i)=>a=>{const l=O2(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-na(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};UU(l)||(d={...d,...BU(e,d)}),d.duration&&(d.duration=na(d.duration)),d.repeatDelay&&(d.repeatDelay=na(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(h=!0)),h&&!i&&t.get()!==void 0){const f=ux(d.keyframes,l);if(f!==void 0)return Rt.update(()=>{d.onUpdate(f),d.onComplete()}),new a7([])}return!i&&Kk.supports(d)?new Kk(d):new G2(d)};function $U({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function WP(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(a=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const h in c){const f=e.getValue(h,(i=e.latestValues[h])!==null&&i!==void 0?i:null),p=c[h];if(p===void 0||d&&$U(d,h))continue;const m={delay:n,...O2(a||{},h)};let x=!1;if(window.MotionHandoffAnimation){const g=fP(e);if(g){const b=window.MotionHandoffAnimation(g,h,Rt);b!==null&&(m.startTime=b,x=!0)}}z1(e,h),f.start(K2(h,f,p,e.shouldReduceMotion&&dP.has(h)?{type:!1}:m,e,x));const w=f.animation;w&&u.push(w)}return l&&Promise.all(u).then(()=>{Rt.update(()=>{l&&v7(e,l)})}),u}function K1(e,t,n={}){var r;const s=cx(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const a=s?()=>Promise.all(WP(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=i;return zU(e,t,d+u,h,f,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[a,l]:[l,a];return u().then(()=>d())}else return Promise.all([a(),l(n.delay)])}function zU(e,t,n=0,r=0,s=1,i){const a=[],l=(e.variantChildren.size-1)*r,c=s===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(HU).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(K1(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function HU(e,t){return e.sortNodePosition(t)}function WU(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>K1(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=K1(e,t,n);else{const s=typeof t=="function"?cx(e,t,n.custom):t;r=Promise.all(WP(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const VU=w2.length;function VP(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?VP(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<VU;n++){const r=w2[n],s=e.props[r];(Wh(s)||s===!1)&&(t[r]=s)}return t}const qU=[..._2].reverse(),YU=_2.length;function GU(e){return t=>Promise.all(t.map(({animation:n,options:r})=>WU(e,n,r)))}function KU(e){let t=GU(e),n=Qk(),r=!0;const s=c=>(u,d)=>{var h;const f=cx(e,d,c==="exit"?(h=e.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:m,...x}=f;u={...u,...x,...m}}return u};function i(c){t=c(e)}function a(c){const{props:u}=e,d=VP(e.parent)||{},h=[],f=new Set;let p={},m=1/0;for(let w=0;w<YU;w++){const g=qU[w],b=n[g],_=u[g]!==void 0?u[g]:d[g],k=Wh(_),T=g===c?b.isActive:null;T===!1&&(m=w);let N=_===d[g]&&_!==u[g]&&k;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),b.protectedKeys={...p},!b.isActive&&T===null||!_&&!b.prevProp||ox(_)||typeof _=="boolean")continue;const C=QU(b.prevProp,_);let S=C||g===c&&b.isActive&&!N&&k||w>m&&k,I=!1;const E=Array.isArray(_)?_:[_];let j=E.reduce(s(g),{});T===!1&&(j={});const{prevResolvedValues:P={}}=b,L={...P,...j},z=O=>{S=!0,f.has(O)&&(I=!0,f.delete(O)),b.needsAnimating[O]=!0;const U=e.getValue(O);U&&(U.liveStyle=!1)};for(const O in L){const U=j[O],H=P[O];if(p.hasOwnProperty(O))continue;let A=!1;B1(U)&&B1(H)?A=!nP(U,H):A=U!==H,A?U!=null?z(O):f.add(O):U!==void 0&&f.has(O)?z(O):b.protectedKeys[O]=!0}b.prevProp=_,b.prevResolvedValues=j,b.isActive&&(p={...p,...j}),r&&e.blockInitialAnimation&&(S=!1),S&&(!(N&&C)||I)&&h.push(...E.map(O=>({animation:O,options:{type:g}})))}if(f.size){const w={};f.forEach(g=>{const b=e.getBaseTarget(g),_=e.getValue(g);_&&(_.liveStyle=!0),w[g]=b??null}),h.push({animation:w})}let x=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(x=!1),r=!1,x?t(h):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const h=a(c);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Qk(),r=!0}}}function QU(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nP(t,e):!1}function Po(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Qk(){return{animate:Po(!0),whileInView:Po(),whileHover:Po(),whileTap:Po(),whileDrag:Po(),whileFocus:Po(),exit:Po()}}class vo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class XU extends vo{constructor(t){super(t),t.animationState||(t.animationState=KU(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ox(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let JU=0;class ZU extends vo{constructor(){super(...arguments),this.id=JU++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const e$={animation:{Feature:XU},exit:{Feature:ZU}};function Yh(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ef(e){return{point:{x:e.pageX,y:e.pageY}}}const t$=e=>t=>L2(t)&&e(t,Ef(t));function ah(e,t,n,r){return Yh(e,t,t$(n),r)}const Xk=(e,t)=>Math.abs(e-t);function n$(e,t){const n=Xk(e.x,t.x),r=Xk(e.y,t.y);return Math.sqrt(n**2+r**2)}class qP{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=J0(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=n$(h.offset,{x:0,y:0})>=3;if(!f&&!p)return;const{point:m}=h,{timestamp:x}=sr;this.history.push({...m,timestamp:x});const{onStart:w,onMove:g}=this.handlers;f||(w&&w(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=X0(f,this.transformPagePoint),Rt.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:p,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const w=J0(h.type==="pointercancel"?this.lastMoveEventInfo:X0(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(h,w),m&&m(h,w)},!L2(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const a=Ef(t),l=X0(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=sr;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,J0(l,this.history)),this.removeListeners=wf(ah(this.contextWindow,"pointermove",this.handlePointerMove),ah(this.contextWindow,"pointerup",this.handlePointerUp),ah(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ua(this.updatePoint)}}function X0(e,t){return t?{point:t(e.point)}:e}function Jk(e,t){return{x:e.x-t.x,y:e.y-t.y}}function J0({point:e},t){return{point:e,delta:Jk(e,YP(t)),offset:Jk(e,r$(t)),velocity:s$(t,.1)}}function r$(e){return e[0]}function YP(e){return e[e.length-1]}function s$(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=YP(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>na(t)));)n--;if(!r)return{x:0,y:0};const i=ra(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const a={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}const GP=1e-4,i$=1-GP,a$=1+GP,KP=.01,o$=0-KP,l$=0+KP;function fs(e){return e.max-e.min}function c$(e,t,n){return Math.abs(e-t)<=n}function Zk(e,t,n,r=.5){e.origin=r,e.originPoint=en(t.min,t.max,e.origin),e.scale=fs(n)/fs(t),e.translate=en(n.min,n.max,e.origin)-e.originPoint,(e.scale>=i$&&e.scale<=a$||isNaN(e.scale))&&(e.scale=1),(e.translate>=o$&&e.translate<=l$||isNaN(e.translate))&&(e.translate=0)}function oh(e,t,n,r){Zk(e.x,t.x,n.x,r?r.originX:void 0),Zk(e.y,t.y,n.y,r?r.originY:void 0)}function eT(e,t,n){e.min=n.min+t.min,e.max=e.min+fs(t)}function u$(e,t,n){eT(e.x,t.x,n.x),eT(e.y,t.y,n.y)}function tT(e,t,n){e.min=t.min-n.min,e.max=e.min+fs(t)}function lh(e,t,n){tT(e.x,t.x,n.x),tT(e.y,t.y,n.y)}function d$(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?en(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?en(n,e,r.max):Math.min(e,n)),e}function nT(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function h$(e,{top:t,left:n,bottom:r,right:s}){return{x:nT(e.x,n,s),y:nT(e.y,t,r)}}function rT(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function f$(e,t){return{x:rT(e.x,t.x),y:rT(e.y,t.y)}}function p$(e,t){let n=.5;const r=fs(e),s=fs(t);return s>r?n=su(t.min,t.max-r,e.min):r>s&&(n=su(e.min,e.max-s,t.min)),da(0,1,n)}function m$(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Q1=.35;function g$(e=Q1){return e===!1?e=0:e===!0&&(e=Q1),{x:sT(e,"left","right"),y:sT(e,"top","bottom")}}function sT(e,t,n){return{min:iT(e,t),max:iT(e,n)}}function iT(e,t){return typeof e=="number"?e:e[t]||0}const aT=()=>({translate:0,scale:1,origin:0,originPoint:0}),xc=()=>({x:aT(),y:aT()}),oT=()=>({min:0,max:0}),Nn=()=>({x:oT(),y:oT()});function ws(e){return[e("x"),e("y")]}function QP({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function x$({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function y$(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Z0(e){return e===void 0||e===1}function X1({scale:e,scaleX:t,scaleY:n}){return!Z0(e)||!Z0(t)||!Z0(n)}function Bo(e){return X1(e)||XP(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function XP(e){return lT(e.x)||lT(e.y)}function lT(e){return e&&e!=="0%"}function fg(e,t,n){const r=e-n,s=t*r;return n+s}function cT(e,t,n,r,s){return s!==void 0&&(e=fg(e,s,r)),fg(e,n,r)+t}function J1(e,t=0,n=1,r,s){e.min=cT(e.min,t,n,r,s),e.max=cT(e.max,t,n,r,s)}function JP(e,{x:t,y:n}){J1(e.x,t.translate,t.scale,t.originPoint),J1(e.y,n.translate,n.scale,n.originPoint)}const uT=.999999999999,dT=1.0000000000001;function b$(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,a;for(let l=0;l<s;l++){i=n[l],a=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&bc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,JP(e,a)),r&&Bo(i.latestValues)&&bc(e,i.latestValues))}t.x<dT&&t.x>uT&&(t.x=1),t.y<dT&&t.y>uT&&(t.y=1)}function yc(e,t){e.min=e.min+t,e.max=e.max+t}function hT(e,t,n,r,s=.5){const i=en(e.min,e.max,s);J1(e,t,n,i,r)}function bc(e,t){hT(e.x,t.x,t.scaleX,t.scale,t.originX),hT(e.y,t.y,t.scaleY,t.scale,t.originY)}function ZP(e,t){return QP(y$(e.getBoundingClientRect(),t))}function v$(e,t,n){const r=ZP(e,n),{scroll:s}=t;return s&&(yc(r.x,s.offset.x),yc(r.y,s.offset.y)),r}const e4=({current:e})=>e?e.ownerDocument.defaultView:null,_$=new WeakMap;class w${constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Nn(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ef(d).point)},i=(d,h)=>{const{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=p7(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ws(w=>{let g=this.getAxisMotionValue(w).get()||0;if(ki.test(g)){const{projection:b}=this.visualElement;if(b&&b.layout){const _=b.layout.layoutBox[w];_&&(g=fs(_)*(parseFloat(g)/100))}}this.originPoint[w]=g}),m&&Rt.postRender(()=>m(d,h)),z1(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},a=(d,h)=>{const{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:x}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:w}=h;if(p&&this.currentDirection===null){this.currentDirection=E$(w),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,w),this.updateAxis("y",h.point,w),this.visualElement.render(),x&&x(d,h)},l=(d,h)=>this.stop(d,h),c=()=>ws(d=>{var h;return this.getAnimationState(d)==="paused"&&((h=this.getAxisMotionValue(d).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new qP(t,{onSessionStart:s,onStart:i,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:e4(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Rt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Np(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=d$(a,this.constraints[t],this.elastic[t])),i.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&mc(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=h$(s.layoutBox,n):this.constraints=!1,this.elastic=g$(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&ws(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=m$(s.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!mc(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=v$(r,s.root,this.visualElement.getTransformPagePoint());let a=f$(s.layout.layoutBox,i);if(n){const l=n(x$(a));this.hasMutatedConstraints=!!l,l&&(a=QP(l))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=ws(d=>{if(!Np(d,n,this.currentDirection))return;let h=c&&c[d]||{};a&&(h={min:0,max:0});const f=s?200:1e6,p=s?40:1e7,m={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...h};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return z1(this.visualElement,t),r.start(K2(t,r,0,n,this.visualElement,!1))}stopAnimation(){ws(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ws(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ws(n=>{const{drag:r}=this.getProps();if(!Np(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:a,max:l}=s.layout.layoutBox[n];i.set(t[n]-en(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!mc(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};ws(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();s[a]=p$({min:c,max:c},this.constraints[a])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ws(a=>{if(!Np(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(en(c,u,s[a]))})}addListeners(){if(!this.visualElement.current)return;_$.set(this.visualElement,this);const t=this.visualElement.current,n=ah(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();mc(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),Rt.read(r);const a=Yh(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(ws(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:a=Q1,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:a,dragMomentum:l}}}function Np(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function E$(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class N$ extends vo{constructor(t){super(t),this.removeGroupControls=cs,this.removeListeners=cs,this.controls=new w$(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cs}unmount(){this.removeGroupControls(),this.removeListeners()}}const fT=e=>(t,n)=>{e&&Rt.postRender(()=>e(t,n))};class k$ extends vo{constructor(){super(...arguments),this.removePointerDownListener=cs}onPointerDown(t){this.session=new qP(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:e4(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:fT(t),onStart:fT(n),onMove:r,onEnd:(i,a)=>{delete this.session,s&&Rt.postRender(()=>s(i,a))}}}mount(){this.removePointerDownListener=ah(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const nm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const cd={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ze.test(e))e=parseFloat(e);else return e;const n=pT(e,t.target.x),r=pT(e,t.target.y);return`${n}% ${r}%`}},T$={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=fo.parse(e);if(s.length>5)return r;const i=fo.createTransformer(e),a=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+a]/=l,s[1+a]/=c;const u=en(l,c,.5);return typeof s[2+a]=="number"&&(s[2+a]/=u),typeof s[3+a]=="number"&&(s[3+a]/=u),i(s)}};class S$ extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;GB(C$),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),nm.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,a=r.projection;return a&&(a.isPresent=i,s||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?a.promote():a.relegate()||Rt.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),N2.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function t4(e){const[t,n]=R5(),r=y.useContext(x2);return o.jsx(S$,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(H5),isPresent:t,safeToRemove:n})}const C$={borderRadius:{...cd,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:cd,borderTopRightRadius:cd,borderBottomLeftRadius:cd,borderBottomRightRadius:cd,boxShadow:T$};function j$(e,t,n){const r=or(e)?e:au(e);return r.start(K2("",r,t,n)),r.animation}function A$(e){return e instanceof SVGElement&&e.tagName!=="svg"}const I$=(e,t)=>e.depth-t.depth;class P${constructor(){this.children=[],this.isDirty=!1}add(t){F2(this.children,t),this.isDirty=!0}remove(t){B2(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(I$),this.isDirty=!1,this.children.forEach(t)}}function D$(e,t){const n=Ti.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(ua(r),e(i-t))};return Rt.read(r,!0),()=>ua(r)}const n4=["TopLeft","TopRight","BottomLeft","BottomRight"],O$=n4.length,mT=e=>typeof e=="string"?parseFloat(e):e,gT=e=>typeof e=="number"||ze.test(e);function M$(e,t,n,r,s,i){s?(e.opacity=en(0,n.opacity!==void 0?n.opacity:1,R$(r)),e.opacityExit=en(t.opacity!==void 0?t.opacity:1,0,L$(r))):i&&(e.opacity=en(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<O$;a++){const l=`border${n4[a]}Radius`;let c=xT(t,l),u=xT(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||gT(c)===gT(u)?(e[l]=Math.max(en(mT(c),mT(u),r),0),(ki.test(u)||ki.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=en(t.rotate||0,n.rotate||0,r))}function xT(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const R$=r4(0,.5,vP),L$=r4(.5,.95,cs);function r4(e,t,n){return r=>r<e?0:r>t?1:n(su(e,t,r))}function yT(e,t){e.min=t.min,e.max=t.max}function vs(e,t){yT(e.x,t.x),yT(e.y,t.y)}function bT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function vT(e,t,n,r,s){return e-=t,e=fg(e,1/n,r),s!==void 0&&(e=fg(e,1/s,r)),e}function F$(e,t=0,n=1,r=.5,s,i=e,a=e){if(ki.test(t)&&(t=parseFloat(t),t=en(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=en(i.min,i.max,r);e===i&&(l-=t),e.min=vT(e.min,t,n,l,s),e.max=vT(e.max,t,n,l,s)}function _T(e,t,[n,r,s],i,a){F$(e,t[n],t[r],t[s],t.scale,i,a)}const B$=["x","scaleX","originX"],U$=["y","scaleY","originY"];function wT(e,t,n,r){_T(e.x,t,B$,n?n.x:void 0,r?r.x:void 0),_T(e.y,t,U$,n?n.y:void 0,r?r.y:void 0)}function ET(e){return e.translate===0&&e.scale===1}function s4(e){return ET(e.x)&&ET(e.y)}function NT(e,t){return e.min===t.min&&e.max===t.max}function $$(e,t){return NT(e.x,t.x)&&NT(e.y,t.y)}function kT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i4(e,t){return kT(e.x,t.x)&&kT(e.y,t.y)}function TT(e){return fs(e.x)/fs(e.y)}function ST(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z${constructor(){this.members=[]}add(t){F2(this.members,t),t.scheduleRender()}remove(t){if(B2(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function H$(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((s||i||a)&&(r=`translate3d(${s}px, ${i}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:p,skewY:m}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),m&&(r+=`skewY(${m}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const Uo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ld=typeof window<"u"&&window.MotionDebug!==void 0,ey=["","X","Y","Z"],W$={visibility:"hidden"},CT=1e3;let V$=0;function ty(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function a4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=fP(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Rt,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&a4(r)}function o4({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(a={},l=t==null?void 0:t()){this.id=V$++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ld&&(Uo.totalNodes=Uo.resolvedTargetDeltas=Uo.recalculatedProjection=0),this.nodes.forEach(G$),this.nodes.forEach(Z$),this.nodes.forEach(ez),this.nodes.forEach(K$),Ld&&window.MotionDebug.record(Uo)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new P$)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new U2),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=A$(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let h;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=D$(f,250),nm.hasAnimatedSinceResize&&(nm.hasAnimatedSinceResize=!1,this.nodes.forEach(AT))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const x=this.options.transition||d.getDefaultTransition()||iz,{onLayoutAnimationStart:w,onLayoutAnimationComplete:g}=d.getProps(),b=!this.targetLayout||!i4(this.targetLayout,m)||p,_=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||_||f&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,_);const k={...O2(x,"layout"),onPlay:w,onComplete:g};(d.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k)}else f||AT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ua(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(tz),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&a4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(jT);return}this.isUpdating||this.nodes.forEach(X$),this.isUpdating=!1,this.nodes.forEach(J$),this.nodes.forEach(q$),this.nodes.forEach(Y$),this.clearAllSnapshots();const l=Ti.now();sr.delta=da(0,1e3/60,l-sr.timestamp),sr.timestamp=l,sr.isProcessing=!0,V0.update.process(sr),V0.preRender.process(sr),V0.render.process(sr),sr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,N2.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Q$),this.sharedNodes.forEach(nz)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Nn(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!s4(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||Bo(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),az(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:l}=this.options;if(!l)return Nn();const c=l.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(oz))){const{scroll:d}=this.root;d&&(yc(c.x,d.offset.x),yc(c.y,d.offset.y))}return c}removeElementScroll(a){var l;const c=Nn();if(vs(c,a),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&vs(c,a),yc(c.x,h.offset.x),yc(c.y,h.offset.y))}return c}applyTransform(a,l=!1){const c=Nn();vs(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&bc(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Bo(d.latestValues)&&bc(c,d.latestValues)}return Bo(this.latestValues)&&bc(c,this.latestValues),c}removeTransform(a){const l=Nn();vs(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Bo(u.latestValues))continue;X1(u.latestValues)&&u.updateSnapshot();const d=Nn(),h=u.measurePageBox();vs(d,h),wT(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Bo(this.latestValues)&&wT(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==sr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=sr.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Nn(),this.relativeTargetOrigin=Nn(),lh(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),vs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Nn(),this.targetWithTransforms=Nn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),u$(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):vs(this.target,this.layout.layoutBox),JP(this.target,this.targetDelta)):vs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Nn(),this.relativeTargetOrigin=Nn(),lh(this.relativeTargetOrigin,this.target,p.target),vs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ld&&Uo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||X1(this.parent.latestValues)||XP(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===sr.timestamp&&(u=!1),u)return;const{layout:d,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||h))return;vs(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,p=this.treeScale.y;b$(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=Nn());const{target:m}=l;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(bT(this.prevProjectionDelta.x,this.projectionDelta.x),bT(this.prevProjectionDelta.y,this.projectionDelta.y)),oh(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!ST(this.projectionDelta.x,this.prevProjectionDelta.x)||!ST(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),Ld&&Uo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xc(),this.projectionDelta=xc(),this.projectionDeltaWithTransform=xc()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=xc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Nn(),p=c?c.source:void 0,m=this.layout?this.layout.source:void 0,x=p!==m,w=this.getStack(),g=!w||w.members.length<=1,b=!!(x&&!g&&this.options.crossfade===!0&&!this.path.some(sz));this.animationProgress=0;let _;this.mixTargetDelta=k=>{const T=k/1e3;IT(h.x,a.x,T),IT(h.y,a.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(lh(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),rz(this.relativeTarget,this.relativeTargetOrigin,f,T),_&&$$(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=Nn()),vs(_,this.relativeTarget)),x&&(this.animationValues=d,M$(d,u,this.latestValues,T,b,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ua(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rt.update(()=>{nm.hasAnimatedSinceResize=!0,this.currentAnimation=j$(0,CT,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&l4(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Nn();const h=fs(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+h;const f=fs(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}vs(l,c),bc(l,d),oh(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new z$),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:l}=this.options;return l?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:l}=this.options;return l?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&ty("z",a,u,this.animationValues);for(let d=0;d<ey.length;d++)ty(`rotate${ey[d]}`,a,u,this.animationValues),ty(`skew${ey[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return W$;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=em(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const x={};return this.options.layoutId&&(x.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,x.pointerEvents=em(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Bo(this.latestValues)&&(x.transform=d?d({},""):"none",this.hasProjected=!1),x}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=H$(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:p,y:m}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,h.animationValues?u.opacity=h===this?(c=(l=f.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=h===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const x in lg){if(f[x]===void 0)continue;const{correct:w,applyTo:g}=lg[x],b=u.transform==="none"?f[x]:w(f[x],h);if(g){const _=g.length;for(let k=0;k<_;k++)u[g[k]]=b}else u[x]=b}return this.options.layoutId&&(u.pointerEvents=h===this?em(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(jT),this.root.sharedNodes.clear()}}}function q$(e){e.updateLayout()}function Y$(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;i==="size"?ws(h=>{const f=a?n.measuredBox[h]:n.layoutBox[h],p=fs(f);f.min=r[h].min,f.max=f.min+p}):l4(i,n.layoutBox,r)&&ws(h=>{const f=a?n.measuredBox[h]:n.layoutBox[h],p=fs(r[h]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+p)});const l=xc();oh(l,r,n.layoutBox);const c=xc();a?oh(c,e.applyTransform(s,!0),n.measuredBox):oh(c,r,n.layoutBox);const u=!s4(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:p}=h;if(f&&p){const m=Nn();lh(m,n.layoutBox,f.layoutBox);const x=Nn();lh(x,r,p.layoutBox),i4(m,x)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=x,e.relativeTargetOrigin=m,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function G$(e){Ld&&Uo.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function K$(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Q$(e){e.clearSnapshot()}function jT(e){e.clearMeasurements()}
vendor: 6,944 bytes, line 49
49function X$(e){e.isLayoutDirty=!1}function J$(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function AT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Z$(e){e.resolveTargetDelta()}function ez(e){e.calcProjection()}function tz(e){e.resetSkewAndRotation()}function nz(e){e.removeLeadSnapshot()}function IT(e,t,n){e.translate=en(t.translate,0,n),e.scale=en(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function PT(e,t,n,r){e.min=en(t.min,n.min,r),e.max=en(t.max,n.max,r)}function rz(e,t,n,r){PT(e.x,t.x,n.x,r),PT(e.y,t.y,n.y,r)}function sz(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const iz={duration:.45,ease:[.4,0,.1,1]},DT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),OT=DT("applewebkit/")&&!DT("chrome/")?Math.round:cs;function MT(e){e.min=OT(e.min),e.max=OT(e.max)}function az(e){MT(e.x),MT(e.y)}function l4(e,t,n){return e==="position"||e==="preserve-aspect"&&!c$(TT(t),TT(n),.2)}function oz(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const lz=o4({attachResizeListener:(e,t)=>Yh(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ny={current:void 0},c4=o4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ny.current){const e=new lz({});e.mount(window),e.setOptions({layoutScroll:!0}),ny.current=e}return ny.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),cz={pan:{Feature:k$},drag:{Feature:N$,ProjectionNode:c4,MeasureLayout:t4}};function RT(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&Rt.postRender(()=>i(t,Ef(t)))}class uz extends vo{mount(){const{current:t}=this.node;t&&(this.unmount=c7(t,n=>(RT(this.node,n,"Start"),r=>RT(this.node,r,"End"))))}unmount(){}}class dz extends vo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=wf(Yh(this.node.current,"focus",()=>this.onFocus()),Yh(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function LT(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&Rt.postRender(()=>i(t,Ef(t)))}class hz extends vo{mount(){const{current:t}=this.node;t&&(this.unmount=f7(t,n=>(LT(this.node,n,"Start"),(r,{success:s})=>LT(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Z1=new WeakMap,ry=new WeakMap,fz=e=>{const t=Z1.get(e.target);t&&t(e)},pz=e=>{e.forEach(fz)};function mz({root:e,...t}){const n=e||document;ry.has(n)||ry.set(n,{});const r=ry.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(pz,{root:e,...t})),r[s]}function gz(e,t,n){const r=mz(t);return Z1.set(e,n),r.observe(e),()=>{Z1.delete(e),r.unobserve(e)}}const xz={some:0,all:1};class yz extends vo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:xz[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return gz(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(bz(t,n))&&this.startObserver()}unmount(){}}function bz({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const vz={inView:{Feature:yz},tap:{Feature:hz},focus:{Feature:dz},hover:{Feature:uz}},_z={layout:{ProjectionNode:c4,MeasureLayout:t4}},pg={current:null},Q2={current:!1};function u4(){if(Q2.current=!0,!!y2)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>pg.current=e.matches;e.addListener(t),t()}else pg.current=!1}const wz=[...OP,xr,fo],Ez=e=>wz.find(DP(e)),FT=new WeakMap;function Nz(e,t,n){for(const r in t){const s=t[r],i=n[r];if(or(s))e.addValue(r,s);else if(or(i))e.addValue(r,au(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(s):a.hasAnimated||a.set(s)}else{const a=e.getStaticValue(r);e.addValue(r,au(a!==void 0?a:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const BT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kz{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=q2,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=Ti.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,Rt.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=lx(n),this.isVariantNode=$5(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const m=f[p];c[p]!==void 0&&or(m)&&m.set(c[p],!1)}}mount(t){this.current=t,FT.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
vendor: 5,932 bytes, line 49
49h((n,r)=>this.bindToMotionValue(r,n)),Q2.current||u4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:pg.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){FT.delete(this.current),this.projection&&this.projection.unmount(),ua(this.notifyUpdate),ua(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Sl.has(t),s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Rt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in iu){const n=iu[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Nn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<BT.length;r++){const s=BT[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,a=t[i];a&&(this.propEventSubscriptions[s]=this.on(s,a))}this.prevMotionValues=Nz(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=au(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(IP(s)||wP(s))?s=parseFloat(s):!Ez(s)&&fo.test(n)&&(s=CP(t,n)),this.setBaseTarget(t,or(s)?s.get():s)),or(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const a=T2(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(s=a[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!or(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new U2),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class d4 extends kz{constructor(){super(...arguments),this.KeyframeResolver=MP}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;or(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Tz(e){return window.getComputedStyle(e)}class Sz extends d4{constructor(){super(...arguments),this.type="html",this.renderInstance=Q5}readValueFromInstance(t,n){if(Sl.has(n)){const r=V2(n);return r&&r.default||0}else{const r=Tz(t),s=(Y5(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ZP(t,n)}build(t,n,r){j2(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return D2(t,n,r)}}class Cz extends d4{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Nn}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Sl.has(n)){const r=V2(n);return r&&r.default||0}return n=X5.has(n)?n:E2(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return eP(t,n,r)}build(t,n,r){A2(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){J5(t,n,r,s)}mount(t){this.isSVGTag=P2(t.tagName),super.mount(t)}}const jz=(e,t)=>
49k2(e)?new Cz(t):new Sz(t,{allowProjection:e!==y.Fragment}),Az=r7({...e$,...vz,...cz,..._z},jz),se=yB(Az);function h4(e){const t=bo(()=>au(e)),{isStatic:n}=y.useContext(ix);if(n){const[,r]=y.useState(e);y.useEffect(()=>t.on("change",r),[])}return t}function f4(e,t){const n=h4(t()),r=()=>n.set(t());return r(),b2(()=>{const s=()=>Rt.preRender(r,!1,!0),i=e.map(a=>a.on("change",s));return()=>{i.forEach(a=>a()),ua(r)}}),n}const Iz=e=>e&&typeof e=="object"&&e.mix,Pz=e=>Iz(e)?e.mix:void 0;function Dz(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],s=e[1+n],i=e[2+n],a=e[3+n],l=zP(s,i,{mixer:Pz(i[0]),...a});return t?l(r):l}function Oz(e){sh.current=[],e();const t=f4(sh.current,e);return sh.current=void 0,t}function Mz(e,t,n,r){if(typeof e=="function")return Oz(e);const s=typeof t=="function"?t:Dz(t,n,r);return Array.isArray(e)?UT(e,s):UT([e],([i])=>s(i))}function UT(e,t){const n=bo(()=>[]);return f4(e,()=>{n.length=0;const r=e.length;for(let s=0;s<r;s++)n[s]=e[s].get();return t(n)})}function Rz(){!Q2.current&&u4();const[e]=y.useState(pg.current);return e}class Lz{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const Fz=()=>new Lz;function p4(){return bo(Fz)}const Bz={some:0,all:1};function Uz(e,t,{root:n,margin:r,amount:s="some"}={}){const i=lP(e),a=new WeakMap,l=u=>{u.forEach(d=>{const h=a.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=t(d);typeof f=="function"?a.set(d.target,f):c.unobserve(d.target)}else typeof h=="function"&&(h(d),a.delete(d.target))})},c=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof s=="number"?s:Bz[s]});return i.forEach(u=>c.observe(u)),()=>c.disconnect()}function Tu(e,{root:t,margin:n,amount:r,once:s=!1}={}){const[i,a]=y.useState(!1);return y.useEffect(()=>{if(!e.current||s&&i)return;const l=()=>(a(!0),s?void 0:()=>a(!1)),c={root:t&&t.current||void 0,margin:n,amount:r};return Uz(e.current,l,c)},[t,e,n,s,r]),i}const m4=y.createContext(null);function $z(e,t,n,r){if(!r)return e;const s=e.findIndex(d=>d.value===t);if(s===-1)return e;const i=r>0?1:-1,a=e[s+i];if(!a)return e;const l=e[s],c=a.layout,u=en(c.min,c.max,.5);return i===1&&l.layout.max+n>u||i===-1&&l.layout.min+n<u?g7(e,s,s+i):e}function zz({children:e,as:t="ul",axis:n="y",onReorder:r,values:s,...i},a){const l=bo(()=>se[t]),c=[],u=y.useRef(!1),d={axis:n,registerItem:(h,f)=>{const p=c.findIndex(m=>h===m.value);p!==-1?c[p].layout=f[n]:c.push({value:h,layout:f[n]}),c.sort(Wz)},updateOrder:(h,f,p)=>{if(u.current)return;const m=$z(c,h,f,p);c!==m&&(u.current=!0,r(m.map(Hz).filter(x=>s.indexOf(x)!==-1)))}};return y.useEffect(()=>{u.current=!1}),o.jsx(l,{...i,ref:a,ignoreStrict:!0,children:o.jsx(m4.Provider,{value:d,children:e})})}const dx=y.forwardRef(zz);function Hz(e){return e.value}function Wz(e,t){return e.layout.min-t.layout.min}function $T(e,t=0){return or(e)?e:h4(t)}function Vz({children:e,style:t={},value:n,as:r="li",onDrag:s,layout:i=!0,...a},l){const c=bo(()=>se[r]),u=y.useContext(m4),d={x:$T(t.x),y:$T(t.y)},h=Mz([d.x,d.y],([x,w])=>x||w?1:"unset"),{axis:f,registerItem:p,updateOrder:m}=u;return o.jsx(c,{drag:f,...a,dragSnapToOrigin:!0,style:{...t,x:d.x,y:d.y,zIndex:h},layout:i,onDrag:(x,w)=>{const{velocity:g}=w;g[f]&&m(n,d[f].get(),g[f]),s&&s(x,w)},onLayoutMeasure:x=>p(n,x),ref:l,ignoreStrict:!0,children:e})}const hx=y.forwardRef(Vz);/** 50 * @license lucide-react v0.439.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 qz=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),g4=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** 55 * @license lucide-react v0.439.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 Yz={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.439.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 Gz=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...l},c)=>y.createElement("svg",{ref:c,...Yz,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:g4("lucide",s),...l},[...a.map(([u,d])=>y.createElement(u,d)),...Array.isArray(i)?i:[i]]));/** 65 * @license lucide-react v0.439.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 me=(e,t)=>
69{const n=y.forwardRef(({className:r,...s},i)=>y.createElement(Gz,{ref:i,iconNode:t,className:g4(`lucide-${qz(e)}`,r),...s}));return n.displayName=`${e}`,n};/** 70 * @license lucide-react v0.439.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 fx=me("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 75 * @license lucide-react v0.439.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 Ka=me("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 80 * @license lucide-react v0.439.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 x4=me("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** 85 * @license lucide-react v0.439.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 zT=me("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 90 * @license lucide-react v0.439.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 Kz=me("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]);/** 95 * @license lucide-react v0.439.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 Nf=me("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** 100 * @license lucide-react v0.439.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 X2=me("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** 105 * @license lucide-react v0.439.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 px=me("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 110 * @license lucide-react v0.439.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 mx=me("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 115 * @license lucide-react v0.439.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 y4=me("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"}]]);/** 120 * @license lucide-react v0.439.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 Qz=me("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** 125 * @license lucide-react v0.439.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 sy=me("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"}]]);/** 130 * @license lucide-react v0.439.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 yt=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 135 * @license lucide-react v0.439.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 tn=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 140 * @license lucide-react v0.439.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 b4=me("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** 145 * @license lucide-react v0.439.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 ma=me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 150 * @license lucide-react v0.439.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 HT=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 155 * @license lucide-react v0.439.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 Gh=me("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"}]]);/** 160 * @license lucide-react v0.439.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 Xz=me("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 165 * @license lucide-react v0.439.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 Jz=me("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 170 * @license lucide-react v0.439.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 gx=me("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"}]]);/** 175 * @license lucide-react v0.439.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 Zz=me("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"}]]);/** 180 * @license lucide-react v0.439.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 mg=me("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 185 * @license lucide-react v0.439.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 Nr=me("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"}]]);/** 190 * @license lucide-react v0.439.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 eH=me("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
194],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** 195 * @license lucide-react v0.439.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 WT=me("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"}]]);/** 200 * @license lucide-react v0.439.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 J2=me("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"}]]);/** 205 * @license lucide-react v0.439.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 tH=me("Dumbbell",[["path",{d:"M14.4 14.4 9.6 9.6",key:"ic80wn"}],["path",{d:"M18.657 21.485a2 2 0 1 1-2.829-2.828l-1.767 1.768a2 2 0 1 1-2.829-2.829l6.364-6.364a2 2 0 1 1 2.829 2.829l-1.768 1.767a2 2 0 1 1 2.828 2.829z",key:"nnl7wr"}],["path",{d:"m21.5 21.5-1.4-1.4",key:"1f1ice"}],["path",{d:"M3.9 3.9 2.5 2.5",key:"1evmna"}],["path",{d:"M6.404 12.768a2 2 0 1 1-2.829-2.829l1.768-1.767a2 2 0 1 1-2.828-2.829l2.828-2.828a2 2 0 1 1 2.829 2.828l1.767-1.768a2 2 0 1 1 2.829 2.829z",key:"yhosts"}]]);/** 210 * @license lucide-react v0.439.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 Su=me("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"}]]);/** 215 * @license lucide-react v0.439.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 ha=me("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"}]]);/** 220 * @license lucide-react v0.439.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 nH=me("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"}]]);/** 225 * @license lucide-react v0.439.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 ev=me("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"}]]);/** 230 * @license lucide-react v0.439.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 Rr=me("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"}]]);/** 235 * @license lucide-react v0.439.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 Z2=me("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** 240 * @license lucide-react v0.439.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 rH=me("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** 245 * @license lucide-react v0.439.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 sH=me("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** 250 * @license lucide-react v0.439.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 kf=me("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"}]]);/** 255 * @license lucide-react v0.439.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 VT=me("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 260 * @license lucide-react v0.439.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 Tf=me("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"}]]);/** 265 * @license lucide-react v0.439.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 qT=me("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** 270 * @license lucide-react v0.439.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 v4=me("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"}]]);/** 275 * @license lucide-react v0.439.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 iH=me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 280 * @license lucide-react v0.439.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 aH=me("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"}]]);/** 285 * @license lucide-react v0.439.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 oH=me("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"}]]);/** 290 * @license lucide-react v0.439.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 lH=me("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"}]]);/** 295 * @license lucide-react v0.439.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 cH=me("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 300 * @license lucide-react v0.439.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 ew=me("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 305 * @license lucide-react v0.439.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 uH=me("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 310 * @license lucide-react v0.439.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 tv=me("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"}]]);/** 315 * @license lucide-react v0.439.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 dH=me("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"}]]);/** 320 * @license lucide-react v0.439.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 hH=me("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 325 * @license lucide-react v0.439.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 tw=me("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 330 * @license lucide-react v0.439.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 Cu=me("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"}]]);/** 335 * @license lucide-react v0.439.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 nv=me("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** 340 * @license lucide-react v0.439.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 fH=me("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/** 345 * @license lucide-react v0.439.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 pH=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/** 350 * @license lucide-react v0.439.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 mH=me("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"}]]);/** 355 * @license lucide-react v0.439.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 gH=me("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 360 * @license lucide-react v0.439.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 xH=me("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** 365 * @license lucide-react v0.439.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 _4=me("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}
369],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]]);/** 370 * @license lucide-react v0.439.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 yH=me("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/** 375 * @license lucide-react v0.439.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 Kh=me("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** 380 * @license lucide-react v0.439.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 w4=me("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"}]]);/** 385 * @license lucide-react v0.439.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 qn=me("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"}]]);/** 390 * @license lucide-react v0.439.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 bH=me("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"}]]);/** 395 * @license lucide-react v0.439.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 us=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 400 * @license lucide-react v0.439.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 ju=me("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"}]]);/** 405 * @license lucide-react v0.439.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 E4=me("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"}]]);/** 410 * @license lucide-react v0.439.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 N4=me("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/** 415 * @license lucide-react v0.439.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 vH=me("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]);/** 420 * @license lucide-react v0.439.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 nw=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 425 * @license lucide-react v0.439.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 k4=me("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"}]]);/** 430 * @license lucide-react v0.439.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 rv=me("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"}]]);/** 435 * @license lucide-react v0.439.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 _H=me("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",ke
439y:"oel41y"}]]);/** 440 * @license lucide-react v0.439.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 wH=me("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** 445 * @license lucide-react v0.439.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 Si=me("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"}]]);/** 450 * @license lucide-react v0.439.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 iy=me("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** 455 * @license lucide-react v0.439.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 T4=me("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** 460 * @license lucide-react v0.439.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 EH=me("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** 465 * @license lucide-react v0.439.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 NH=me("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 470 * @license lucide-react v0.439.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 S4=me("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"}]]);/** 475 * @license lucide-react v0.439.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 xx=me("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/** 480 * @license lucide-react v0.439.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 yx=me("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/** 485 * @license lucide-react v0.439.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 Yn=me("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"}]]);/** 490 * @license lucide-react v0.439.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 C4=me("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"}]]);/** 495 * @license lucide-react v0.439.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 mt=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
499],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 500 * @license lucide-react v0.439.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 kH=me("ZapOff",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 505 * @license lucide-react v0.439.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 po=me("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"}]]),j4=y.createContext(null);function Sf(){const e=y.useContext(j4);if(!e)throw new Error("useToast must be used inside <ToastProvider>");return e}function TH({children:e}){const[t,n]=y.useState([]),r=y.useRef({}),s=y.useCallback(l=>{n(c=>c.filter(u=>u.id!==l)),clearTimeout(r.current[l]),delete r.current[l]},[]),i=y.useCallback((l,c={})=>{const u=Math.random().toString(36).slice(2),d=c.duration??3500;n(h=>[...h.slice(-4),{id:u,message:l,kind:"info",...c}]),d>0&&(r.current[u]=setTimeout(()=>s(u),d))},[s]),a={toast:i,success:(l,c)=>i(l,{kind:"success",...c}),error:(l,c)=>i(l,{kind:"error",duration:0,...c}),info:(l,c)=>i(l,{kind:"info",...c})};return o.jsxs(j4.Provider,{value:a,children:[e,o.jsx(CH,{toasts:t,onDismiss:s})]})}const SH={success:{Icon:Xz,cls:"text-success"},error:{Icon:gx,cls:"text-error"},info:{Icon:iH,cls:"text-accent"}};function CH({toasts:e,onDismiss:t}){return o.jsx("div",{className:"fixed bottom-6 left-1/2 -translate-x-1/2 z-toast flex flex-col gap-2 items-center pointer-events-none",children:o.jsx(He,{initial:!1,children:e.map(n=>{const{Icon:r,cls:s}=SH[n.kind];return o.jsxs(se.div,{layout:!0,initial:{opacity:0,y:16,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.95},transition:{duration:.18,ease:"easeOut"},className:"pointer-events-auto flex items-center gap-3 rounded-xl border border-border bg-bg shadow-modal px-4 py-3 min-w-0 w-[calc(100vw-2rem)] sm:min-w-[280px] sm:w-auto sm:max-w-[420px]",children:[o.jsx(r,{size:15,className:`shrink-0 ${s}`}),o.jsx("p",{className:"text-sm text-text flex-1 leading-snug",children:n.message}),n.action&&o.jsx("button",{onClick:()=>{n.action.onClick(),t(n.id)},className:"text-xs text-accent hover:underline shrink-0 font-medium",children:n.action.label}),o.jsx("button",{onClick:()=>t(n.id),className:"shrink-0 text-text-tertiary hover:text-text transition-colors","aria-label":"Dismiss",children:o.jsx(mt,{size:13})})]},n.id)})})})}/** 510 * @remix-run/router v1.23.2 511 * 512 * Copyright (c) Remix Software Inc. 513 * 514 * This source code is licensed under the MIT license found in the 515 * LICENSE.md file in the root directory of this source tree. 516 * 517 * @license MIT 518 */function Qh(){return Qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qh.apply(this,arguments)}var Qa;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Qa||(Qa={}));const YT="popstate";function jH(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:l}=r.location;return sv("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:gg(s)}return IH(t,n,null,e)}function _n(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function rw(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function AH(){return Math.random().toString(36).substr(2,8)}function GT(e,t){return{usr:e.state,key:e.key,idx:t}}function sv(e,t,n,r){return n===void 0&&(n=null),Qh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Au(t):t,{state:n,key:t&&t.key||r||AH()})}function gg(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Au(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function IH(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,l=Qa.Pop,c=null,u=d();u==null&&(u=0,a.replaceState(Qh({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function h(){l=Qa.Pop;let w=d(),g=w==null?null:w-u;u=w,c&&c({action:l,location:x.location,delta:g})}function f(w,g){l=Qa.Push;let b=sv(x.location,w,g);u=d()+1;let _=GT(b,u),k=x.createHref(b);try{a.pushState(_,"",k)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;s.location.assign(k)}i&&c&&c({action:l,location:x.location,delta:1})}function p(w,g){l=Qa.Replace;let b=sv(x.location,w,g);u=d();let _=GT(b,u),k=x.createHref(b);a.replaceState(_,"",k),i&&c&&c({action:l,location:x.location,delta:0})}function m(w){let g=s.location.origin!=="null"?s.location.origin:s.location.href,b=typeof w=="string"?w:gg(w);return b=b.replace(/ $/,"%20"),_n(g,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,g)}let x={get action(){return l},get location(){return e(s,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(YT,h),c=w,()=>{s.removeEventListener(YT,h),c=null}},createHref(w){return t(s,w)},createURL:m,encodeLocation(w){let g=m(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:p,go(w){return a.go(w)}};return x}var KT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(KT||(KT={}));function PH(e,t,n){return n===void 0&&(n="/"),DH(e,t,n)}function DH(e,t,n,r){let s=typeof t=="string"?Au(t):t,i=lu(s.pathname||"/",n);if(i==null)return null;let a=A4(e);OH(a);let l=null;for(let c=0;l==null&&c<a.length;++c){let u=VH(i);l=HH(a[c],u)}return l}function A4(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(_n(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not val
518id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=lo([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(_n(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),A4(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:$H(u,i.index),routesMeta:d})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,a);else for(let c of I4(i.path))s(i,a,c)}),t}function I4(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=I4(r.join("/")),l=[];return l.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...a),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function OH(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:zH(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const MH=/^:[\w-]+$/,RH=3,LH=2,FH=1,BH=10,UH=-2,QT=e=>e==="*";function $H(e,t){let n=e.split("/"),r=n.length;return n.some(QT)&&(r+=UH),t&&(r+=LH),n.filter(s=>!QT(s)).reduce((s,i)=>s+(MH.test(i)?RH:i===""?FH:BH),r)}function zH(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function HH(e,t,n){let{routesMeta:r}=e,s={},i="/",a=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",h=iv({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h)return null;
vendor: 4,678 bytes, lines 518-527
518Object.assign(s,h.params),a.push({params:s,pathname:lo([i,h.pathname]),pathnameBase:QH(lo([i,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(i=lo([i,h.pathnameBase]))}return a}function iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=WH(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:p}=d;if(f==="*"){let x=l[h]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const m=l[h];return p&&!m?u[f]=void 0:u[f]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:e}}function WH(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),rw(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function VH(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return rw(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function lu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const qH=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,YH=e=>qH.test(e);function GH(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Au(e):e,i;if(n)if(YH(n))i=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),rw(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?i=XT(n.substring(1),"/"):i=XT(n,t)}else i=t;return{pathname:i,search:XH(r),hash:JH(s)}}function XT(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function ay(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function KH(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function P4(e,t){let n=KH(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function D4(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Au(e):(s=Qh({},e),_n(!s.pathname||!s.pathname.includes("?"),ay("?","pathname","search",s)),_n(!s.pathname||!s.pathname.includes("#"),ay("#","pathname","hash",s)),_n(!s.search||!s.search.includes("#"),ay("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),h-=1;s.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=GH(s,l),u=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const lo=e=>e.join("/").replace(/\/\/+/g,"/"),QH=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),XH=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,JH=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function ZH(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const O4=["post","put","patch","delete"];new Set(O4);const eW=["get",...O4];new Set(eW);/** 519 * React Router v6.30.3 520 * 521 * Copyright (c) Remix Software Inc. 522 * 523 * This source code is licensed under the MIT license found in the 524 * LICENSE.md file in the root directory of this source tree. 525 * 526 * @license MIT 527 */function Xh(){return Xh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xh.apply(this,arguments)}const bx=y.createContext(null),M4=y.createContext(null),_o=y.createContext(null),vx=y.createContext(null),wo=y.createContext({outlet:null,matches:[],isDataRoute:!1}),R4=y.createContext(null);function tW(e,t){let{relative:n}=t===void 0?{}:t;
vendor: 4,859 bytes, line 527
527Cf()||_n(!1);let{basename:r,navigator:s}=y.useContext(_o),{hash:i,pathname:a,search:l}=_x(e,{relative:n}),c=a;return r!=="/"&&(c=a==="/"?r:lo([r,a])),s.createHref({pathname:c,search:l,hash:i})}function Cf(){return y.useContext(vx)!=null}function ga(){return Cf()||_n(!1),y.useContext(vx).location}function L4(e){y.useContext(_o).static||y.useLayoutEffect(e)}function Iu(){let{isDataRoute:e}=y.useContext(wo);return e?pW():nW()}function nW(){Cf()||_n(!1);let e=y.useContext(bx),{basename:t,future:n,navigator:r}=y.useContext(_o),{matches:s}=y.useContext(wo),{pathname:i}=ga(),a=JSON.stringify(P4(s,n.v7_relativeSplatPath)),l=y.useRef(!1);return L4(()=>{l.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=D4(u,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:lo([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,a,i,e])}function F4(){let{matches:e}=y.useContext(wo),t=e[e.length-1];return t?t.params:{}}function _x(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(_o),{matches:s}=y.useContext(wo),{pathname:i}=ga(),a=JSON.stringify(P4(s,r.v7_relativeSplatPath));return y.useMemo(()=>D4(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function rW(e,t){return sW(e,t)}function sW(e,t,n,r){Cf()||_n(!1);let{navigator:s}=y.useContext(_o),{matches:i}=y.useContext(wo),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let u=ga(),d;if(t){var h;let w=typeof t=="string"?Au(t):t;c==="/"||(h=w.pathname)!=null&&h.startsWith(c)||_n(!1),d=w}else d=u;let f=d.pathname||"/",p=f;if(c!=="/"){let w=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=PH(e,{pathname:p}),x=cW(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:lo([c,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:lo([c,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return t&&x?y.createElement(vx.Provider,{value:{location:Xh({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Qa.Pop}},x):x}function iW(){let e=fW(),t=ZH(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,null)}const aW=y.createElement(iW,null);class oW extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(wo.Provider,{value:this.props.routeContext},y.createElement(R4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lW(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(bx);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(wo.Provider,{value:t},r)}function cW(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||_n(!1),a=a.slice(0,Math.min(a.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let h=a[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:p}=n,m=h.route.loader&&f[h.route.id]===void 0&&(!p||p[h.route.id]===void 0);if(h.route.lazy||m){c=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,h,f)=>{let p,m=!1,x=null,w=null;n&&(p=l&&h.route.id?l[h.route.id]:void 0,x=h.route.errorElement||aW,c&&(u<0&&f===0?(mW("route-fallback"),m=!0,w=null):u===f&&(m=!0,w=h.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,f+1)),b=()=>{let _;return p?_=x:m?_=w:h.route.Component?_=y.createElement(h.route.Component,null):h.route.element?_=h.route.element:_=d,y.createElement(lW,{match:h,routeC
527ontext:{outlet:d,matches:g,isDataRoute:n!=null},children:_})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?y.createElement(oW,{location:n.location,revalidation:n.revalidation,component:x,error:p,children:b(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):b()},null)}var B4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(B4||{}),U4=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(U4||{});function uW(e){let t=y.useContext(bx);return t||_n(!1),t}function dW(e){let t=y.useContext(M4);return t||_n(!1),t}function hW(e){let t=y.useContext(wo);return t||_n(!1),t}function $4(e){let t=hW(),n=t.matches[t.matches.length-1];return n.route.id||_n(!1),n.route.id}function fW(){var e;let t=y.useContext(R4),n=dW(),r=$4();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function pW(){let{router:e}=uW(B4.UseNavigateStable),t=$4(U4.UseNavigateStable),n=y.useRef(!1);return L4(()=>{n.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Xh({fromRouteId:t},i)))},[e,t])}const JT={};function mW(e,t,n){JT[e]||(JT[e]=!0)}function gW(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function yr(e){_n(!1)}function xW(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Qa.Pop,navigator:i,static:a=!1,future:l}=e;Cf()&&_n(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:i,static:a,future:Xh({v7_relativeSplatPath:!1},l)}),[c,l,i,a]);typeof r=="string"&&(r=Au(r));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:m="default"}=r,x=y.useMemo(()=>{let w=lu(d,c);return w==null?null:{location:{pathname:w,search:h,hash:f,state:p,key:m},navigationType:s}},[c,d,h,f,p,m,s]);return x==null?null:y.createElement(_o.Provider,{value:u},y.createElement(vx.Provider,{children:n,value:x}))}function z4(e){let{children:t,location:n}=e;return rW(av(t),n)}new Promise(()=>{});function av(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,s)=>{if(!y.isValidElement(r))return;let i=[...t,s];if(r.type===y.Fragment){n.push.apply(n,av(r.props.children,i));return}r.type!==yr&&_n(!1),!r.props.index||!r.props.children||_n(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=av(r.props.children,i)),n.push(a)}),n}/** 528 * React Router DOM v6.30.3 529 * 530 * Copyright (c) Remix Software Inc. 531 * 532 * This source code is licensed under the MIT license found in the 533 * LICENSE.md file in the root directory of this source tree. 534 * 535 * @license MIT 536 */function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function H4(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function yW(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bW(e,t){return e.button===0&&(!t||t==="_self")&&!yW(e)}function ov(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function vW(e,t){let n=ov(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const _W=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wW=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],EW="6";try{window.__reactRouterVersion=EW}catch{}const NW=y.createContext({isTransitioning:!1}),kW="startTransition",ZT=X6[kW];function TW(e){let{basename:t,children:n,future:r,window:s}=e,i=y.useRef();i.current==null&&(i.current=jH({window:s,v5Compat:!0}));let a=i.current,[l,c]=y.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=y.useCallback(h=>{u&&ZT?ZT(()=>c(h)):c(h)},[c,u]);return y.useLayoutEffect(()=>a.listen(d),[a,d]),y.useEffect(()=>gW(r),[r]),y.createElement(xW,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const SW=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CW=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Eo=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=H4(t,_W),{basename:p}=y.useContext(_o),m,x=!1;if(typeof u=="string"&&CW.test(u)&&(m=u,SW))try{let _=new URL(window.location.href),k=u.startsWith("//")?new URL(_.protocol+u):new URL(u),T=lu(k.pathname,p);k.origin===_.origin&&T!=null?u=T+k.search+k.hash:x=!0}catch{}let w=tW(u,{relative:s}),g=AW(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function b(_){r&&r(_),_.defaultPrevented||g(_)}return y.createElement("a",xg({},f,{href:m||w,onClick:x||i?r:b,ref:n,target:c}))}),oy=y.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:a=!1,style:l,to:c,viewTransition:u,children:d}=t,h=H4(t,wW),f=_x(c,{relative:h.relative}),p=ga(),m=y.useContext(M4),{navigator:x,basename:w}=y.useContext(_o),g=m!=null&&PW(f)&&u===!0,b=x.encodeLocation?x.encodeLocation(f).pathname:f.pathname,_=p.pathname,k=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;s||(_=_.toLowerCase(),k=k?k.toLowerCase():null,b=b.toLowerCase()),k&&w&&(k=lu(k,w)||k);const T=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let N=_===b||!a&&_.startsWith(b)&&_.charAt(T)==="/",C=k!=null&&(k===b||!a&&k.startsWith(b)&&k.charAt(b.length)==="/"),S={isActive:N,isPending:C,isTransitioning:g},I=N?r:void 0,E;typeof i=="function"?E=i(S):E=[i,N?"active":null,C?"pending":null,g?"transitioning":null].filter(
536Boolean).join(" ");let j=typeof l=="function"?l(S):l;return y.createElement(Eo,xg({},h,{"aria-current":I,className:E,ref:n,style:j,to:c,viewTransition:u}),typeof d=="function"?d(S):d)});var lv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lv||(lv={}));var eS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(eS||(eS={}));function jW(e){let t=y.useContext(bx);return t||_n(!1),t}function AW(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:l}=t===void 0?{}:t,c=Iu(),u=ga(),d=_x(e,{relative:a});return y.useCallback(h=>{if(bW(h,n)){h.preventDefault();let f=r!==void 0?r:gg(u)===gg(d);c(e,{replace:f,state:s,preventScrollReset:i,relative:a,viewTransition:l})}},[u,c,d,r,s,n,e,i,a,l])}function IW(e){let t=y.useRef(ov(e)),n=y.useRef(!1),r=ga(),s=y.useMemo(()=>vW(r.search,n.current?null:t.current),[r.search]),i=Iu(),a=y.useCallback((l,c)=>{const u=ov(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,a]}function PW(e,t){t===void 0&&(t={});let n=y.useContext(NW);n==null&&_n(!1);let{basename:r}=jW(lv.useViewTransitionState),s=_x(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=lu(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=lu(n.nextLocation.pathname,r)||n.nextLocation.pathname;return iv(s.pathname,a)!=null||iv(s.pathname,i)!=null}const sa="/api";let cu=localStorage.getItem("auth_token");function cv(e){cu=e,e?localStorage.setItem("auth_token",e):localStorage.removeItem("auth_token")}function uu(){return cu}let rm=null;function DW(e){rm=e}function co(){return cu?{Authorization:`Bearer ${cu}`}:{}}function wl(){cv(null),rm==null||rm()}async function vt(e,t){const n=await fetch(`${sa}${e}`,{method:"POST",headers:{"Content-Type":"application/json",...co()},body:JSON.stringify(t)});if(n.status===401)throw wl(),new Error("Unauthorized");if(!n.ok)throw new Error(await n.text());return n.json()}async function gt(e){const t=await fetch(`${sa}${e}`,{headers:co()});if(t.status===401)throw wl(),new Error("Unauthorized");if(!t.ok)throw new Error(await t.text());return t.json()}async function mn(e,t){const n=await fetch(`${sa}${e}`,{method:"PATCH",headers:{"Content-Type":"application/json",...co()},body:JSON.stringify(t)});if(n.status===401)throw wl(),new Error("Unauthorized");if(!n.ok)throw Object.assign(new Error(await n.text()),{status:n.status});return n.json()}async function kp(e,t){const n=await fetch(`${sa}${e}`,{method:"PUT",headers:{"Content-Type":"application/json",...co()},body:JSON.stringify(t)});if(n.status===401)throw wl(),new Error("Unauthorized");if(!n.ok)throw new Error(await n.text());return n.json()}async function _s(e){const t=await fetch(`${sa}${e}`,{method:"DELETE",headers:co()});if(t.status===401)throw wl(),new Error("Unauthorized");if(!t.ok)throw new Error(await t.text());return t.json()}function tS(e){const t=`${sa}${e}`;return cu?`${t}?token=${encodeURIComponent(cu)}`:t}const G={applications:{list:()=>gt("/applications"),get:e=>gt(`/applications/${e}`),delete:e=>_s(`/applications/${e}`),trash:()=>gt("/applications/trash"),restore:e=>vt(`/applications/${e}/restore`,{}),update:(e,t)=>mn(`/applications/${e}`,t),resumeUrl:e=>tS(`/applications/${e}/resume`),coverLetterUrl:e=>tS(`/applications/${e}/cover-letter`),bulletEdits:{list:e=>gt(`/applications/${e}/bullet-edits`),upsert:(e,t)=>kp(`/applications/${e}/bullet-edits`,t)},recompile:(e,t)=>vt(`/applications/${e}/recompile`,t),recompileCoverLetter:(e,t)=>vt(`/applications/${e}/recompile-cover-letter`,t),generateCoverLetter:async(e,t)=>{const n=uu(),r=await fetch(`/api/applications/${e}/cover-letter/generate`,{method:"POST",headers:n?{Authorization:`Bearer ${n}`}:{},signal:t});if(!r.ok)throw new Error(await r.text());return r.body}},orgs:{list:()=>gt("/orgs"),create:e=>vt("/orgs",e),update:(e,t)=>mn(`/orgs/${e}`,t),delete:e=>_s(`/orgs/${e}`)},roles:{list:()=>gt("/roles"),create:e=>vt("/roles",e),update:(e,t)=>
536mn(`/roles/${e}`,t),delete:e=>_s(`/roles/${e}`)},stories:{list:()=>gt("/stories"),create:e=>vt("/stories",{name:e.title,raw_content:e.content,role_id:e.role_id,tags:e.tags,facts:e.facts}),update:(e,t)=>t.raw_content!==void 0?mn(`/stories/${e}/content`,{content:t.raw_content}):mn(`/projects/${e}`,t),synthesize:e=>vt(`/stories/${e}/synthesize`,{}),pin:(e,t)=>mn(`/projects/${e}`,{is_pinned:t}),delete:e=>_s(`/projects/${e}`),listQA:()=>gt("/stories/qa"),saveToVoiceBank:(e,t)=>vt("/stories/qa",{question:e,answer:t})},projects:{list:()=>gt("/projects"),create:e=>vt("/projects",e),update:(e,t)=>mn(`/projects/${e}`,t),pin:(e,t)=>mn(`/projects/${e}`,{is_pinned:t}),setVisibility:(e,t)=>mn(`/projects/${e}`,t),delete:e=>_s(`/projects/${e}`),sections:e=>gt(`/projects/${e}/sections`),updateSection:(e,t,n)=>mn(`/projects/${e}/sections/update`,{heading:t,content:n}),addSection:(e,t,n)=>vt(`/projects/${e}/sections/add`,{heading:t,content:n}),versions:{list:e=>gt(`/projects/${e}/versions`),restore:(e,t)=>vt(`/projects/${e}/versions/restore`,{version_num:t})},synthesize:e=>vt(`/projects/${e}/synthesize`,{}),convert:e=>vt(`/projects/${e}/convert`,{})},confirmProposal:e=>vt("/chat/confirm_proposal",e),qa:(e,t,n,r=[])=>vt("/qa",{question:e,job_description:t,resume_type:n,history:r}),userProfile:{get:()=>gt("/user-profile"),update:e=>mn("/user-profile",e),regenerateBio:()=>vt("/bio/regenerate",{}),uploadSignature:async e=>{const t=new FormData;t.append("file",e,"signature.png");const n=await fetch(`${sa}/profile/signature`,{method:"POST",headers:co(),body:t});if(n.status===401)throw wl(),new Error("Unauthorized");if(!n.ok)throw new Error(await n.text())},deleteSignature:async()=>{const e=await fetch(`${sa}/profile/signature`,{method:"DELETE",headers:co()});if(e.status===401)throw wl(),new Error("Unauthorized");if(!e.ok&&e.status!==404)throw new Error(await e.text())},signatureUrl:()=>"/api/profile/signature"},resumeSettings:{get:()=>gt("/resume-settings")},resumeTypes:{list:()=>gt("/resume-types"),create:e=>vt("/resume-types",e),update:(e,t)=>mn(`/resume-types/${e}`,t),delete:e=>_s(`/resume-types/${e}`),classify:e=>vt("/resume-types/classify",{job_description:e})},credentials:{list:()=>gt("/credentials"),create:e=>vt("/credentials",e),update:(e,t)=>mn(`/credentials/${e}`,t),delete:e=>_s(`/credentials/${e}`)},apiKeys:{list:()=>gt("/keys"),create:e=>vt("/keys",{name:e}),revoke:e=>_s(`/keys/${e}`)},conversations:{list:()=>gt("/conversations"),get:e=>gt(`/conversations/${e}`),upsert:(e,t)=>kp(`/conversations/${e}`,t),rename:(e,t)=>mn(`/conversations/${e}`,{title:t}),delete:e=>_s(`/conversations/${e}`),uploadAttachment:async(e,t)=>{const n=new FormData;n.append("file",t);const r=await fetch(`${sa}/conversations/${e}/attachments`,{method:"POST",headers:co(),body:n});if(!r.ok)throw new Error(`Attachment upload failed: ${r.status}`);return r.json()},attachmentUrl:(e,t)=>{const n=t.split("/"),r=n[n.length-1];return gt(`/conversations/${e}/attachments/${r}`)}},identity:{synthesize:(e=!1)=>vt(`/identity/synthesize${e?"?force=true":""}`,{})},portfolio:{get:()=>gt("/portfolio"),save:e=>kp("/portfolio",e),analytics:(e=30)=>gt(`/portfolio/analytics?days=${e}`),versions:{list:()=>gt("/portfolio/versions"),create:e=>vt("/portfolio/versions",e),delete:e=>_s(`/portfolio/versions/${e}`)}},pipeline:{summary:()=>gt("/pipeline/summary"),updateApplication:(e,t)=>mn(`/pipeline/applications/${e}`,t),stages:{list:e=>gt(`/pipeline/applications/${e}/stages`),create:e=>vt("/pipeline/stages",e),update:(e,t)=>mn(`/pipeline/stages/${e}`,t),delete:e=>_s(`/pipeline/stages/${e}`)},goals:{get:()=>gt("/pipeline/goals"),upsert:e=>kp("/pipeline/goals",e)},duplicates:()=>gt("/pipeline/duplicates"),recordings:{forStage:e=>gt(`/recordings/stage/${e}`),forApplication:e=>gt(`/recordings/application/${e}`),unlinked:()=>gt("/recordings/unlinked"),updateNotes:(e,t)=>mn(`/recordings/${e}/notes`,{notes:t}),link:(e,t,n)=>mn(`/recordings/${e}/link`,{application_id:t,stage_id:n}),retryDebrief:e=>vt(`/recordings/${e}/retry-debrief`,{}),delete:e=>_s(`/recordings/${e}`)}},billing:{status:()=>gt("/billing/status"),checkout:(e,t)=>vt("/billing/checkout",{success_url:e,cancel_url:t}),portal:e=>vt("/billing/portal",{return_url:e}),redeemPromo:e=>vt("/billing/promo",{code:e})},prep:{active:()=>gt("/prep/active"),get:e=>gt(`/prep/applications/${e}`),generate:(e,t=!0)=>vt(`/prep/applications/${e}/generate`,{refresh_intel:t}),enrich:(e,t)=>mn(`/prep/applications/${e}/enrich`,{enrichment_notes:t}),updateQuestions:(e,t)=>mn(`/prep/applications/${e}/questions`,{questions:t}),questionFeedback:(e,t,n)=>vt("/prep/questions/feedback",{application_id:e,question:t,rating:n}),trains:{update:(e,t)=>
536mn(`/prep/trains/${e}`,t)},drill:{start:e=>vt(`/prep/applications/${e}/drill/start`,{}),finish:(e,t)=>mn(`/prep/drill/${e}/finish`,t)}},feedback:{submit:e=>vt("/feedback",e)},brain:{get:()=>gt("/kb/brain")}},W4=y.createContext({user:null,token:null,login:async()=>{},demoLogin:async()=>{},logout:()=>{},updateCustomPicture:()=>{},updateName:()=>{}});function Cl(){return y.useContext(W4)}function V4(e){try{return JSON.parse(atob(e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/")))}catch{return{}}}function OW(){return o.jsxs("svg",{width:"18",height:"18",viewBox:"-1 -1 20 20",xmlns:"http://www.w3.org/2000/svg",children:[o.jsx("path",{d:"M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.875 2.684-6.615z",fill:"#4285F4"}),o.jsx("path",{d:"M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332A8.997 8.997 0 0 0 9 18z",fill:"#34A853"}),o.jsx("path",{d:"M3.964 10.707A5.41 5.41 0 0 1 3.682 9c0-.593.102-1.17.282-1.707V4.961H.957A8.996 8.996 0 0 0 0 9c0 1.452.348 2.827.957 4.039l3.007-2.332z",fill:"#FBBC05"}),o.jsx("path",{d:"M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0A8.997 8.997 0 0 0 .957 4.961L3.964 7.293C4.672 5.163 6.656 3.58 9 3.58z",fill:"#EA4335"})]})}function MW(){const{login:e,demoLogin:t}=Cl(),[n,r]=y.useState(!1),[s,i]=y.useState(null),a=async()=>{r(!0),i(null);try{await t()}catch(l){const c=l instanceof Error?l.message:"Demo login failed";i(c)}finally{r(!1)}};return o.jsxs("div",{className:"min-h-[100dvh] bg-bg flex flex-col items-center justify-center",children:[o.jsxs(se.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.3},className:"flex flex-col items-center gap-6 flex-1 justify-center",children:[o.jsxs("div",{className:"flex flex-col items-center gap-4",children:[o.jsx("img",{src:"/icon.svg",alt:"Pave",className:"w-14 h-14"}),o.jsxs("div",{className:"text-center",children:[o.jsx("h1",{className:"text-2xl font-serif italic tracking-tight text-text",children:"Pave"}),o.jsx("p",{className:"text-sm text-text-secondary mt-1.5",children:"Pave your path."})]})]}),o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsxs("div",{className:"relative group cursor-pointer rounded-full border border-border bg-bg-secondary hover:bg-bg-tertiary hover:border-border-focus transition-colors duration-150",children:[o.jsxs("div",{className:"pointer-events-none flex items-center gap-2.5 px-5 py-2.5 text-sm font-medium text-text",children:[o.jsx(OW,{}),"Sign in with Google"]}),o.jsx("div",{className:"absolute inset-x-0 opacity-0",style:{to
536p:"-8px",bottom:"-8px"},children:o.jsx(aB,{onSuccess:l=>{l.credential&&e(l.credential)},onError:()=>console.error("Google login failed"),shape:"pill",text:"signin_with",width:300,use_fedcm_for_prompt:!1})})]}),o.jsxs("div",{className:"flex items-center gap-3 w-full",children:[o.jsx("div",{className:"flex-1 h-px bg-border"}),o.jsx("span",{className:"text-2xs text-text-tertiary",children:"or"}),o.jsx("div",{className:"flex-1 h-px bg-border"})]}),o.jsx("button",{onClick:a,disabled:n,className:"rounded-full border border-border bg-bg-secondary hover:bg-bg-tertiary hover:border-border-focus transition-colors duration-150 px-5 py-2.5 text-sm font-medium text-text-secondary hover:text-text disabled:opacity-50",children:n?"Loadingâ¦":"Try a demo account"}),s&&o.jsx("p",{className:"text-xs text-red-500 text-center max-w-[220px]",children:s})]})]}),o.jsxs("p",{className:"pb-6 text-2xs text-text/30 text-center",children:["By signing in you agree to our"," ",o.jsx("a",{href:"/terms",className:"underline hover:text-text/60 transition-colors",children:"Terms"})," ","and"," ",o.jsx("a",{href:"/privacy",className:"underline hover:text-text/60 transition-colors",children:"Privacy Policy"})]})]})}function RW({size:e=14,className:t}){return o.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,children:[o.jsx("circle",{cx:"6",cy:"19",r:"3"}),o.jsx("path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"}),o.jsx("circle",{cx:"18",cy:"5",r:"3"})]})}function q4(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=q4(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function LW(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=q4(e))&&(r&&(r+=" "),r+=t);return r}const sw="-",FW=e=>{const t=UW(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const l=a.split(sw);return l[0]===""&&l.length!==1&&l.shift(),Y4(l,t)||BW(a)},getConflictingClassGroupIds:(a,l)=>{const c=n[a]||[];return l&&r[a]?[...c,...r[a]]:c}}},Y4=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Y4(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const i=e.join(sw);return(a=t.validators.find(({validator:l})=>l(i)))==null?void 0:a.classGroupId},nS=/^\[(.+)\]$/,BW=e=>{if(nS.test(e)){const t=nS.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},UW=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return zW(Object.entries(e.classGroups),n).forEach(([i,a])=>{uv(a,r,i,t)}),r},uv=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const i=s===""?t:rS(t,s);i.classGroupId=n;return}if(typeof s=="function"){if($W(s)){uv(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{uv(a,rS(t,i),n,r)})})},rS=(e,t)=>{let n=e;
vendor: 4,761 bytes, line 536
536return t.split(sw).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$W=e=>e.isThemeGetter,zW=(e,t)=>t?e.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,l])=>[t+a,l])):i);return[n,s]}):e,HW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},G4="!",WW=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,s=t[0],i=t.length,a=l=>{const c=[];let u=0,d=0,h;for(let w=0;w<l.length;w++){let g=l[w];if(u===0){if(g===s&&(r||l.slice(w,w+i)===t)){c.push(l.slice(d,w)),d=w+i;continue}if(g==="/"){h=w;continue}}g==="["?u++:g==="]"&&u--}const f=c.length===0?l:l.substring(d),p=f.startsWith(G4),m=p?f.substring(1):f,x=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:x}};return n?l=>n({className:l,parseClassName:a}):a},VW=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qW=e=>({cache:HW(e.cacheSize),parseClassName:WW(e),...FW(e)}),YW=/\s+/,GW=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=t,i=[],a=e.trim().split(YW);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:p}=n(u);let m=!!p,x=r(m?f.substring(0,p):f);if(!x){if(!m){l=u+(l.length>0?" "+l:l);continue}if(x=r(f),!x){l=u+(l.length>0?" "+l:l);continue}m=!1}const w=VW(d).join(":"),g=h?w+G4:w,b=g+x;if(i.includes(b))continue;i.push(b);const _=s(x,m);for(let k=0;k<_.length;++k){const T=_[k];i.push(g+T)}l=u+(l.length>0?" "+l:l)}return l};function KW(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=K4(t))&&(r&&(r+=" "),r+=n);return r}const K4=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=K4(e[r]))&&(n&&(n+=" "),n+=t);return n};function QW(e,...t){let n,r,s,i=a;function a(c){const u=t.reduce((d,h)=>h(d),e());return n=qW(u),r=n.cache.get,s=n.cache.set,i=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=GW(c,n);return s(c,d),d}return function(){return i(KW.apply(null,arguments))}}const Ut=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Q4=/^\[(?:([a-z-]+):)?(.+)\]$/i,XW=/^\d+\/\d+$/,JW=new Set(["px","full","screen"]),ZW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eV=/\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$/,tV=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nV=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rV=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ri=e=>Ac(e)||JW.has(e)||XW.test(e),Na=e=>Pu(e,"length",dV),Ac=e=>!!e&&!Number.isNaN(Number(e)),ly=e=>Pu(e,"number",Ac),ud=e=>!!e&&Number.isInteger(Number(e)),sV=e=>e.endsWith("%")&&Ac(e.slice(0,-1)),Qe=e=>Q4.test(e),ka=e=>ZW.test(e),iV=new Set(["length","size","percentage"]),aV=e=>Pu(e,iV,X4),oV=e=>Pu(e,"position",X4),lV=new Set(["image","url"]),cV=e=>Pu(e,lV,fV),uV=e=>Pu(e,"",hV),dd=()=>!0,Pu=(e,t,n)=>{const r=Q4.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},dV=e=>eV.test(e)&&!tV.test(e),X4=()=>!1,hV=e=>nV.test(e),fV=e=>rV.test(e),pV=()=>{const e=Ut("colors"),t=Ut("spacing"),n=Ut("blur"),r=Ut("brightness"),s=Ut("borderColor"),i=Ut("borderRadius"),a=Ut("borderSpacing"),l=Ut("borderWidth"),c=Ut("contrast"),u=Ut("grayscale"),d=Ut("hueRotate"),h=Ut("invert"),f=Ut("gap"),p=Ut("gradientColorStops"),m=Ut("gradientColorStopPositions"),x=Ut("inset"),w=Ut("margin"),g=Ut("opacity"),b=Ut("padding"),_=Ut("saturate"),k=Ut("scale"),T=Ut("sepia"),N=Ut("skew"),C=Ut("space"),S=Ut("translate"),I=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Qe,t],P=()=>[Qe,t],L=()=>["",Ri,Na],z=()=>["auto",Ac,Qe],R=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",Qe],A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Ac,Qe];return{cacheSize:500,separator:":",theme:{colors:[dd],spacing:[Ri,Na],blur:["none","",ka,Qe],brightness:q(),borderColor:[e],borderRadius:["n
vendor: 4,683 bytes, line 536
536one","","full",ka,Qe],borderSpacing:P(),borderWidth:L(),contrast:q(),grayscale:H(),hueRotate:q(),invert:H(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[sV,Na],inset:j(),margin:j(),opacity:q(),padding:P(),saturate:q(),scale:q(),sepia:H(),skew:q(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Qe]}],container:["container"],columns:[{columns:[ka]}],"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"],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:[...R(),Qe]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ud,Qe]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Qe]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",ud,Qe]}],"grid-cols":[{"grid-cols":[dd]}],"col-start-end":[{col:["auto",{span:["full",ud,Qe]},Qe]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[dd]}],"row-start-end":[{row:["auto",{span:[ud,Qe]},Qe]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Qe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Qe,t]}],"min-w":[{"min-w":[Qe,t,"min","max","fit"]}],"max-w":[{"max-w":[Qe,t,"none","full","min","max","fit","prose",{screen:[ka]},ka]}],h:[{h:[Qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ka,Na]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ly]}],"font-family":[{font:[dd]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Qe]}],"line-clamp":[{"line-clamp":["none",Ac,ly]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ri,Qe]}],"list-image":[{"list-image":["none",Qe]}
vendor: 5,584 bytes, line 536
536],"list-style-type":[{list:["none","disc","decimal",Qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ri,Na]}],"underline-offset":[{"underline-offset":["auto",Ri,Qe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...R(),oV]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",aV]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cV]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:B()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Ri,Qe]}],"outline-w":[{outline:[Ri,Na]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Ri,Na]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ka,uV]}],"shadow-color":[{shadow:[dd]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ka,Qe]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Qe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Qe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[ud,Qe]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Qe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","
vendor: 11,264 bytes, line 536
536none","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",Qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ri,Na,ly]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mV=QW(pV);function re(...e){return mV(LW(e))}const J4=y.createContext({mobileControls:null,setMobileControls:()=>{},mobileRightControls:null,setMobileRightControls:()=>{}});function gV({children:e}){const[t,n]=y.useState(null),[r,s]=y.useState(null);return o.jsx(J4.Provider,{value:{mobileControls:t,setMobileControls:n,mobileRightControls:r,setMobileRightControls:s},children:e})}function wx(){return y.useContext(J4)}const Ex=864e5,sS=260,Tp=210,iS=4,aS=8,Z4=64,xV="https://pave.bio",du="https://pave.bio/mcp",oS=[{to:"/stories",icon:_4,label:"Experience",prefetchKey:"kb"},{to:"/generate",icon:Rr,label:"Generate",prefetchKey:"generate"},{to:"/pipeline",icon:px,label:"Pipeline",prefetchKey:"pipeline"},{to:"/chat",icon:X2,label:"Chat",prefetchKey:"chat"}];function yV(){const e=Yt();return{home:()=>{e.prefetchQuery({queryKey:["home"],queryFn:async()=>({synthesis:await G.identity.synthesize().catch(n=>(console.warn("Identity prefetch failed:",n),null))})})},kb:()=>{e.prefetchQuery({queryKey:["kb"],queryFn:async()=>{const[t,n,r]=await Promise.all([G.orgs.list(),G.roles.list(),G.projects.list()]);return{orgs:t,roles:n,projects:r}}})},generate:()=>{e.prefetchQuery({queryKey:["resumeTypes"],queryFn:()=>G.resumeTypes.list()})},chat:()=>{e.prefetchQuery({queryKey:["conversations"],queryFn:()=>G.conversations.list()})},pipeline:()=>{e.prefetchQuery({queryKey:["pipeline"],queryFn:()=>G.pipeline.summary()})}}}function bV({user:e,logout:t,inDock:n}){const[r,s]=y.useState(!1),i=y.useRef(null),a=Iu(),l=u=>{var d;(d=i.current)!=null&&d.contains(u.relatedTarget)||s(!1)},c=e.customPicture??e.picture?o.jsx("img",{src:e.customPicture??e.picture,alt:e.name,className:"w-6 h-6 rounded-full"}):o.jsx("div",{className:"w-6 h-6 rounded-full bg-accent/20 flex items-center justify-center",children:o.jsx("span",{className:"text-2xs font-semibold text-accent-text",children:e.name[0].toUpperCase()})});return n?o.jsxs("div",{ref:i,className:"relative",onBlur:l,children:[o.jsx("button",{onClick:()=>s(u=>!u),className:"focus:outline-none",children:c}),r&&o.jsxs("div",{className:"absolute bottom-full right-0 mb-2 w-44 rounded-lg border border-border bg-bg shadow-lg z-50 py-1 overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 border-b border-border",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate",children:e.name.split(" ")[0]}),o.jsx("p",{className:"text-xs text-text-tertiary truncate",children:e.email})]}),o.jsxs("button",{onClick:()=>{s(!1),a("/settings")},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-text-secondary hover:text-text hover:bg-bg-hover transition-colors",children:[o.jsx(rv,{size:12}),"Settings"]}),o.jsxs("button",{onClick:()=>{s(!1),t()},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-text-secondary hover:text-text hover:bg-bg-hover transition-colors",children:[o.jsx(tv,{size:12}),"Sign out"]})]})]}):o.jsxs("div",{ref:i,className:"relative",onBlur:l,children:[o.jsx("button",{onClick:()=>s(u=>!u),className:"flex items-center justify-center gap-1.5 rounded-full min-h-[44px] min-w-[44px] sm:min-h-0 sm:min-w-0 focus:outline-none focus:ring-2 focus:ring-accent/40",children:c}),r&&o.jsxs("div",{className:"absolute right-0 top-full mt-1.5 w-44 rounded-lg border border-border bg-bg shadow-lg z-50 py-1 overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 border-b border-border",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate",children:e.name.split(" ")[0]}),o.jsx("p",{className:"text-xs text-text-tertiary truncate",children:e.email})]}),o.jsxs("button",{onClick:()=>{s(!1),a("/settings")},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-text-secondary hover:text-text hover:bg-bg-hover transition-colors",children:[o.jsx(rv,{size:12}),"Settings"]}),o.jsxs("button",{onClick:()=>{s(!1),t()},className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-text-secondary hover:text-text hover:bg-bg-hover transition-colors",children:[o.jsx(tv,{size:12}),"Sign out"]})]})]})}function vV(){const{user:e,logout:t}=Cl(),n=yV(),{mobileControls:r,mobileRightControls:s}=wx();return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:re("shrink-0",r?"h-12":"h-0 sm:h-12")}),o.jsxs("nav",{className:re("fixed top-0 left-0 right-0 z-50 flex items-center px-4 bg-bg/80 backdrop-blur-md",r?"h-12 border-b border-border":"h-0 sm:h-12 overflow-hidden sm:overflow-visible sm:border-b sm:border-border"),children:[r&&o.jsx("div",{className:"sm:hidden flex items-center gap-1 mr-2",children:r}),o.jsxs(Eo,{to:"/",className:"hidden sm:flex items-center gap-2 mr-4 sm:mr-8 hover:opacity-80 transition-opacity",children:[o.jsx("div",{className:"w-6 h-6 rounded-md bg-accent flex items-center justify-center shrink-0",children:o.jsx(RW,{size:13,className:"text-bg"})}),o.jsx("span",{className:"text-sm font-semibold text-text tracking-tight font-serif italic",children:"Pave"})]}),o.jsx("div",{className:"hidden sm:flex items-center gap-0.5",children:oS.map(({to:i,icon:a,label:l,prefetchKey:c})=>o.jsx(oy,{to:i,end:i==="/",onMouseEnter:c?n[c]:void 0,onFocus:c?n[c]:void 0,className:({isActive:u})=>re("relative flex items-center gap-1.5 h-7 px-2.5 rounded text-xs font-medium transition-colors duration-150",u?"text-text":"text-text-secondary hover:text-text hover:bg-bg-hover"),children:({isActive:u})=>o.jsxs(o.Fragment,{children:[o.jsx(a,{size:13}),o.jsx("span",{children:l}),u&&o.jsx(se.div,{layoutId:"nav-indicator",className:"absolute inset-0 -z-10 bg-bg-active rounded",transition:{type:"spring",stiffness:400,damping:35}})]})},i))}),s&&o.jsx("div",{className:"sm:hidden flex items-center gap-1 ml-auto",children:s}),e&&o.jsx("div",{className:"hidden sm:block ml-auto",children:o.jsx(bV,{user:e,logout:t})})]}),o.jsxs("nav",{className:"sm:hidden fixed left-0 right-0 z-50 flex items-stretch border-t border-border bg-bg/90 backdrop-blur-md",style:{bottom:0,paddingBottom:"env(safe-area-inset-bottom)",minHeight:Z4,opacity:"calc(1 - var(--keyboard-open, 0))"},children:[oS.map(({to:i,icon:a,label:l,prefetchKey:c})=>o.jsx(oy,{to:i,end:i==="/",onFocus:c?n[c]:void 0,className:({isActive:u})=>re("relative flex flex-col items-center justify-center gap-1 flex-1 py-3 text-[10px] font-medium transition-colors duration-150",u?"text-text":"text-text-tertiary"),children:({isActive:u})=>o.jsxs(o.Fragment,{children:[o.jsx(a,{size:22}),o.jsx("span",{children:l}),u&&o.jsx(se.div,{layoutId:"bottom-nav-indicator",className:"absolute inset-x-4 top-0 h-0.5 bg-accent rounded-full",transition:{type:"spring",stiffness:400,damping:35}})]})},i)),e&&o.jsxs(oy,{to:"/settings",className:({isActive:i})=>re("relative flex flex-col items-center justify-center gap-1 flex-1 py-3 text-[10px] font-medium transition-colors duration-150",i?"text-text":"text-text-tertiary"),children:[e.customPicture??e.picture?o.jsx("img",{src:e.customPicture??e.picture,alt:e.name,className:"w-[22px] h-[22px] rounded-full"}):o.jsx("div",{className:"w-[22px] h-[22px] rounded-full bg-accent/20 flex items-center justify-center",children:o.jsx("span",{className:"text-2xs font-semibold text-accent-text",children:e.name[0].toUpperCase()})}),o.jsx("span",{children:"Profile"})]})]})]})}function _V(e){const[t,n]=y.useState(()=>typeof window>"u"?!1:window.matchMedia(e).matches);return y.useEffect(()=>{if(typeof window>"u")return;const r=window.matchMedia(e),s=i=>n(i.matches);
536return r.addEventListener("change",s),n(r.matches),()=>r.removeEventListener("change",s)},[e]),t}const lS='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function Du({open:e,onClose:t,side:n="auto",children:r,title:s,titleActions:i,maxHeightMobile:a="80dvh",widthDesktop:l,ariaLabel:c,className:u,mobileOnly:d=!1,initialFocusRef:h}){const f=_V("(min-width: 640px)"),p=Rz(),m=y.useRef(null),x=y.useRef(null),w=n==="auto"?f?"right":"bottom":n,g=e&&!(d&&f);if(y.useEffect(()=>{if(!g)return;x.current=document.activeElement;const S=(h==null?void 0:h.current)??m.current;return requestAnimationFrame(()=>{h!=null&&h.current?h.current.focus():S&&(S.querySelector(lS)??S).focus()}),()=>{var I,E;(E=(I=x.current)==null?void 0:I.focus)==null||E.call(I)}},[g,h]),y.useEffect(()=>{if(!g)return;const S=I=>{if(I.key==="Escape"){I.stopPropagation(),t();return}if(I.key!=="Tab"||!m.current)return;const E=Array.from(m.current.querySelectorAll(lS)).filter(z=>!z.hasAttribute("disabled")&&z.tabIndex!==-1);if(E.length===0){I.preventDefault(),m.current.focus();return}const j=E[0],P=E[E.length-1],L=document.activeElement;I.shiftKey&&(L===j||!m.current.contains(L))?(I.preventDefault(),P.focus()):!I.shiftKey&&L===P&&(I.preventDefault(),j.focus())};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[g,t]),y.useLayoutEffect(()=>{if(!g)return;const S=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=S}},[g]),typeof document>"u")return null;const b=p?0:.25,_=[.32,.72,0,1],k={bottom:{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}},right:{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"}},left:{initial:{x:"-100%"},animate:{x:0},exit:{x:"-100%"}}},T=w==="bottom"?"fixed bottom-0 left-0 right-0 rounded-t-2xl border-t border-border bg-bg-secondary flex flex-col outline-none":w==="right"?"fixed right-0 top-0 bottom-0 border-l border-border bg-bg shadow-modal flex flex-col outline-none":"fixed left-0 top-0 bottom-0 border-r border-border bg-bg shadow-modal flex flex-col outline-none",N=w==="bottom"?{maxHeight:a}:{width:l??"480px",maxWidth:"95vw"},C=(S,I)=>{(I.offset.y>100||I.velocity.y>500)&&t()};return Er.createPortal(o.jsx(He,{children:g&&o.jsxs("div",{className:"fixed inset-0 z-modal","aria-hidden":!1,children:[o.jsx(se.div,{className:"absolute inset-0 bg-bg/60 backdrop-blur-sm",initial:{opacity:0}
536,animate:{opacity:1},exit:{opacity:0},transition:{duration:p?0:.15},onClick:t}),o.jsxs(se.div,{ref:m,role:"dialog","aria-modal":"true","aria-label":s??c,tabIndex:-1,className:re(T,u),style:N,initial:k[w].initial,animate:k[w].animate,exit:k[w].exit,transition:{duration:b,ease:_},drag:w==="bottom"?"y":!1,dragConstraints:{top:0,bottom:0},dragElastic:{top:0,bottom:.3},onDragEnd:w==="bottom"?C:void 0,children:[w==="bottom"&&o.jsx("div",{className:"flex justify-center pt-2 pb-1 cursor-grab active:cursor-grabbing touch-none",children:o.jsx("div",{className:"w-8 h-1 rounded-full bg-border"})}),s&&o.jsxs("div",{className:"flex items-center px-3 h-10 border-b border-border shrink-0 gap-1",children:[o.jsx("h2",{className:"text-sm font-semibold text-text flex-1",children:s}),i,o.jsx("button",{type:"button",onClick:t,"aria-label":"Close",className:"inline-flex items-center justify-center min-h-[44px] min-w-[44px] sm:min-h-[28px] sm:min-w-[28px] text-text-tertiary hover:text-text rounded",children:o.jsx(mt,{size:13})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:r})]})]})}),document.body)}function iw({app:e,onClose:t,onRecompiled:n}){const r=Yt(),s=e.cover_letter_structured,[i,a]=y.useState((s==null?void 0:s.opening)??"Dear Hiring Team,"),[l,c]=y.useState((s==null?void 0:s.body)??e.cover_letter_plain_text??""),u=vn({mutationFn:()=>G.applications.recompileCoverLetter(e.job_id,{opening:i,body:l}),onSuccess:()=>{r.invalidateQueries({queryKey:["pipeline"]}),r.invalidateQueries({queryKey:["application",e.job_id]}),n()}});return o.jsxs(Du,{open:!0,onClose:t,side:"auto",title:"Edit Cover Letter",widthDesktop:"480px",maxHeightMobile:"90dvh",children:[o.jsx("div",{className:"px-5 pt-3 pb-1",children:o.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.company_name," · ",e.job_title]})}),o.jsxs("div",{className:"flex-1 px-5 py-4 space-y-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-2",children:"Opening"}),o.jsx("input",{value:i,onChange:d=>a(d.target.value),className:"w-full text-sm sm:text-xs text-text bg-bg border border-border rounded px-3 py-2 outline-none focus:border-border-focus leading-relaxed"})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-2",children:"Body"}),o.jsx("textarea",{value:l,onChange:d=>c(d.target.value),className:"w-full text-sm sm:text-xs text-text bg-bg border border-border rounded px-3 py-2 outline-none focus:border-border-focus leading-relaxed resize-none",rows:22})]})]}),o.jsx("div",{className:"sticky bottom-0 bg-bg flex flex-row-reverse px-5 py-3.5 border-t border-border shrink-0",children:o.jsx("button",{onClick:()=>u.mutate(),disabled:u.isPending,className:"text-xs px-4 py-2 min-h-[40px] sm:min-h-0 sm:py-1.5 rounded-md border border-border bg-bg text-text hover:bg-bg-active disabled:opacity-50 transition-colors",children:u.isPending?"Regeneratingâ¦":"Regenerate PDF"})})]})}function wV({text:e,index:t,sectionKey:n,section:r,jobId:s,existingEdit:i,onEdited:a,onDelete:l,dragHandle:c}){const[u,d]=y.useState(!1),[h,f]=y.useState((i==null?void 0:i.edited_text)??e),p=(i==null?void 0:i.edited_text)??e,m=i==null?void 0:i.rating,x=!!(i!=null&&i.edited_text)&&i.edited_text!==e,w=async(b,_)=>{await G.applications.bulletEdits.upsert(s,{section:r,section_key:n,bullet_index:t,original_text:e,edited_text:b!==e?b:void 0,rating:_??(i==null?void 0:i.rating)}),a()},g=b=>{const _=m===b?void 0:b;w((i==null?void 0:i.edited_text)??e,_)};return o.jsx("div",{className:"group/bullet relative px-1 py-1 rounded hover:bg-bg-active transition-colors",children:o.jsxs("div",{className:"flex items-center gap-1",children:[c,o.jsx("div",{className:"flex-1 min-w-0",children:u?o.jsxs("div",{className:"space-y-1",children:[o.jsx("textarea",{autoFocus:!0,value:h,onChange:b=>f(b.target.value),className:"w-full text-xs text-text bg-bg-active border border-border rounded px-2 py-1 resize-none outline-none leading-relaxed",rows:3,onKeyDown:b=>{b.key==="Escape"&&(f((i==null?void 0:i.edited_text)??e),d(!1))}}),o.jsx("div",{className:"flex justify-end",children:o.jsx("button",{onClick:()=>{w(h),d(!1)},className:"text-2xs px-2 py-0.5 rounded bg-bg-active border border-border text-text hover:bg-bg-secondary transition-colors",children:"Save"})})]}):o.jsxs("p",{className:re("text-xs leading-relaxed",x?"text-text":"text-text-secondary"),children:[p,x&&o.jsx("button",{onClick:()=>{w(e,i==null?void 0:i.rating),f(e)},className:"ml-1.5 text-2xs text-text-tertiary/50 hover:text-text-tertiary transition-colors align-middle",title:"Revert to original",children:o.jsx(E4,{size:9})})]})}),!u&&o.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/bullet:opacity-100 transition-opacity shrink-0",children:[o.jsx("button",{onClick:()=>{f((i==null?void 0:i.edited_text)??e),d(!0)},className:"p-1 rounded text-text-tertiary hover:text-text transition-colors",title:"Edit",children:o.jsx(qn,{size:10})}),o.jsx("button",{onClick:()=>g("thumbs_up"),className:re("p-1 rounded transition-colors",m==="thumbs_up"?"text-success":"text-text-tertiary hover:text-success"),title:"Good bullet",children:o.jsx(yx,{size:10})}),o.jsx("button",{onClick:()=>g("thumbs_down"),className:re("p-1 rounded transition-colors",m==="thumbs_down"?"text-error":"text-text-tertiary hover:text-error"),title:"Weak bullet",children:o.jsx(xx,{size:10})}),o.jsx("button",{onClick:l,className:"p-1 rounded text-text-tertiary hover:text-error transition-colors",title:"Delete bullet",children:o.jsx(Yn,{size:10})})]})]})})}function EV({bullet:e,index:t,sectionKey:n,section:r,jobId:s,editsMap:i,onEdited:a,onDelete:l}){const c=p4();return o.jsx(hx,{value:e,dragListener:!1,dragControls:c,className:"list-none",children:o.jsx(wV,{text:e,index:t,section:r,sectionKey:n,jobId:s,existingEdit:i.get(`${r}::${n}::${t}`),onEdited:a,onDelete:l,dragHandle:o.jsx("span",{onPointerDown:u=>c.start(u),className:"cursor-grab active:cursor-grabbing text-text-tertiary/30 hover:text-text-tertiary transition-colors shrink-0 touch-none",children:o.jsx(Tf,{size:11})})})})}function cS({bullets:e,sectionKey:t,section:n,jobId:r,editsMap:s,onEdited:i,onReorder:a,onDeleteBullet:l,onAddBullet:c}){return o.jsxs("div",{children:[o.jsx(dx,{axis:"y",values:e,onReorder:a,className:"space-y-0.5",children:e.map((u,d)=>o.jsx(EV,{bullet:u,index:d,section:n,sectionKey:t,jobId:r,editsMap:s,onEdited:i,onDelete:()=>l(d)},u+d))}),o.jsxs("button",{onClick:c,className:"mt-1 ml-1 flex items-center gap-1 text-2xs text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(us,{size:10})," Add bullet"]})]})}function NV({category:e,items:t,onChange:n,onRename:r}){const[s,i]=y.useState(""),a=c=>n(t.filter((u,d)=>d!==c)),l=()=>{const c=s.trim();c&&!t.includes(c)&&n([...t,c]),i("")};return o.jsxs("div",{children:[o.jsx("input",{defaultValue:e,onBlur:c=>
536{const u=c.target.value.trim();u&&u!==e&&r(u)},onKeyDown:c=>{c.key==="Enter"&&c.currentTarget.blur()},className:"text-2xs text-text-tertiary mb-1.5 bg-transparent outline-none border-b border-transparent hover:border-border focus:border-border-focus transition-colors w-full"}),o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[t.map((c,u)=>o.jsxs("span",{className:"group/chip flex items-center gap-1 text-2xs px-2 py-0.5 rounded-full bg-bg-active border border-border text-text-secondary",children:[c,o.jsx("button",{onClick:()=>a(u),className:"opacity-0 group-hover/chip:opacity-100 transition-opacity text-text-tertiary hover:text-error",children:o.jsx(mt,{size:9})})]},u)),o.jsx("input",{value:s,onChange:c=>i(c.target.value),onKeyDown:c=>{(c.key==="Enter"||c.key===",")&&(c.preventDefault(),l()),c.key==="Backspace"&&!s&&t.length>0&&n(t.slice(0,-1))},onBlur:l,placeholder:"Add skillâ¦",className:"text-2xs px-1 py-0.5 bg-transparent outline-none text-text placeholder:text-text-tertiary/50 min-w-[80px]"})]})]})}function aw({app:e,onClose:t,onRecompiled:n}){const r=Yt(),s=e.resume_structured,[i,a]=y.useState((s==null?void 0:s.work)??[]),[l,c]=y.useState((s==null?void 0:s.projects)??{}),[u,d]=y.useState((s==null?void 0:s.summary)??""),[h,f]=y.useState(()=>{try{const S=((s==null?void 0:s.skills_json_str)??"{}").replace(/```json/g,"").replace(/```/g,"").trim();return JSON.parse(S)}catch{return{}}}),{data:p,refetch:m}=wt({queryKey:["bullet-edits",e.job_id],queryFn:()=>G.applications.bulletEdits.list(e.job_id),enabled:!!s}),x=new Map;for(const S of p??[])x.set(`${S.section}::${S.section_key}::${S.bullet_index}`,S);function w(){const S=i.map(E=>({...E,bullets:E.bullets.map((j,P)=>{const L=`work::${E.org_id??E.org_name}::${P}`,z=x.get(L);return(z==null?void 0:z.edited_text)??j})})),I={};for(const[E,j]of Object.entries(l))I[E]={...j,bullets:j.bullets.map((P,L)=>{const z=`project::${E}::${L}`,R=x.get(z);return(R==null?void 0:R.edited_text)??P})};return{work:S,projects:I}}const g=vn({mutationFn:()=>{const{work:S,projects:I}=w();return G.applications.recompile(e.job_id,{work:S,projects:I,summary:u,skills_json_str:JSON.stringify(h)})},onSuccess:()=>{r.invalidateQueries({queryKey:["pipeline"]}),r.invalidateQueries({queryKey:["application",e.job_id]}),n()}}),b=(S,I)=>{a(E=>E.map((j,P)=>P===S?{...j,bullets:j.bullets.filter((L,z)=>z!==I)}:j))},_=S=>{a(I=>I.map((E,j)=>j===S?{...E,bullets:[...E.bullets,""]}:E))},k=S=>{a(I=>I.filter((E,j)=>j!==S))},T=(S,I)=>{c(E=>({...E,[S]:{...E[S],bullets:E[S].bullets.filter((j,P)=>P!==I)}}))},N=S=>{c(I=>({...I,[S]:{...I[S],bullets:[...I[S].bullets,""]}}))},C=S=>{c(I=>{const E={...I};return delete E[S],E})};return o.jsxs(Du,{open:!0,onClose:t,side:"auto",title:"Edit Resume",widthDesktop:"480px",maxHeightMobile:"90dvh",children:[o.jsx("div",{className:"px-5 pt-3 pb-1",children:o.jsxs("p",{className:"text-xs text-text-tertiary",children:[e.company_name," · ",e.job_title]})}),s?o.jsxs("div",{className:"px-5 py-5 space-y-6",children:[s.summary!==void 0&&s.summary!==""&&o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-2",children:"Summary"}),o.jsx("textarea",{value:u,onChange:S=>d(S.target.value),rows:4,className:"w-full text-xs text-text bg-bg-active border border-border rounded px-2 py-1.5 resize-none outline-none leading-relaxed focus:border-accent/50 transition-colors"})]}),i.length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-3",children:"Work Experience"}),o.jsx("div",{className:"space-y-4",children:i.map((S,I)=>o.jsxs("div",{className:"group/role",children:[o.jsxs("div",{className:"flex items-baseline gap-2 mb-0.5",children:[o.jsx("p",{className:"text-xs font-medium text-text flex-1",children:S.title}),o.jsx("button",{onClick:()=>k(I),className:"opacity-0 group-hover/role:opacity-100 transition-opacity text-text-tertiary hover:text-error",title:"Remove role",children:o.jsx(Yn,{size:11})})]}),o.jsx("p",{className:"text-2xs text-text-tertiary mb-1.5",children:S.org_name}),o.jsx(cS,{bullets:S.bullets,sectionKey:S.org_id??S.org_name,section:"work",jobId:e.job_id,editsMap:x,onEdited:m,onReorder:E=>{a(j=>j.map((P,L)=>L===I?{...P,bullets:E}:P))},onDeleteBullet:E=>b(I,E),onAddBullet:()=>_(I)})]},I))})]}),i.length>0&&Object.keys(l).length>0&&o.jsx("hr",{className:"border-border"}),Object.keys(l).length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-3",children:"Projects"}),o.jsx("div",{className:"space-y-4",children:Object.entries(l).map(([S,I])=>o.jsxs("div",{className:"group/proj",children:[o.jsxs("div",{className:"flex items-baseline gap-2 mb-1.5",children:[o.jsx("p",{className:"text-xs font-medium text-text flex-1",children:S}),o.jsx("button",{onClick:()=>C(S),className:"opacity-0 group-hover/proj:opacity-100 transition-opacity text-text-tertiary hover:text-error",title:"Remove project",children:o.jsx(Yn,{size:11})})]}),o.jsx(cS,{bullets:I.bullets,sectionKey:S,section:"project",jobId:e.job_id,editsMap:x,onEdited:m,onReorder:E=>{c(j=>({...j,[S]:{...j[S],bullets:E}}))},onDeleteBullet:E=>T(S,E),onAddBullet:()=>N(S)})]},S))})]}),Object.keys(h).length>0&&o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary/60 uppercase tracking-wider mb-3",children:"Skills"}),o.jsx("div",{className:"space-y-3",children:Object.entries(h).map(([S,I])=>o.jsx(NV,{category:S,items:I,onChange:E=>f(j=>({...j,[S]:E})),onRename:E=>f(j=>{const P=Object.entries(j).map(([L,z])=>L===S?[E,z]:[L,z]);return Object.fromEntries(P)})},S))})]})]}):o.jsx("div",{className:"px-5 py-8 text-xs text-text-tertiary",children:"No structured data â regenerate the resume to enable editing."}),s&&o.jsx("div",{className:"sticky bottom-0 bg-bg flex flex-row-reverse px-5 py-3.5 border-t border-border shrink-0",children:o.jsx("button",{onClick:()=>g.mutate(),disabled:g.isPending,className:"text-xs px-4 py-2 min-h-[40px] sm:min-h-0 sm:py-1.5 rounded-md border border-border bg-bg text-text hover:bg-bg-active disabled:opacity-50 transition-colors",children:g.isPending?"Regeneratingâ¦":"Regenerate PDF"})})]})}
536const kV={purple:"bg-accent-subtle text-accent-text border-accent/20",blue:"bg-blue-500/10 text-blue-400 border-blue-500/20",amber:"bg-amber-500/10 text-amber-400 border-amber-500/20",green:"bg-success/10 text-success border-success/20",red:"bg-error/10 text-error border-error/20",gray:"bg-bg-tertiary text-text-secondary border-border",ds:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20",pm:"bg-cyan-500/10 text-cyan-400 border-cyan-500/20",cons:"bg-amber-500/10 text-amber-400 border-amber-500/20"};function eD({children:e,color:t="gray",className:n}){return o.jsx("span",{className:re("inline-flex items-center px-1.5 py-0.5 rounded text-xs font-medium border",kV[t],n),children:e})}const TV={primary:"bg-accent hover:bg-accent-hover text-bg shadow-sm",secondary:"bg-bg-tertiary hover:bg-bg-hover border border-border text-text",ghost:"hover:bg-bg-hover text-text-secondary hover:text-text",danger:"bg-error/10 hover:bg-error/20 border border-error/30 text-error"},SV={sm:"h-7 min-h-[44px] sm:min-h-0 px-2.5 text-xs gap-1.5",md:"h-8 min-h-[44px] sm:min-h-0 px-3 text-sm gap-2",lg:"h-9 min-h-[44px] sm:min-h-0 px-4 text-sm gap-2"},jt=y.forwardRef(({variant:e="secondary",size:t="md",loading:n,icon:r,children:s,className:i,disabled:a,...l},c)=>o.jsxs(se.button,{ref:c,whileTap:{scale:.97},className:re("inline-flex items-center justify-center font-medium rounded transition-colors duration-150 select-none","disabled:opacity-40 disabled:pointer-events-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50",TV[e],SV[t],i),disabled:a||n,...l,children:[n?o.jsxs("svg",{className:"animate-spin h-3.5 w-3.5 opacity-70",fill:"none",viewBox:"0 0 24 24",children:[o.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]}):r?o.jsx("span",{className:"opacity-70",children:r}):null,s]}));jt.displayName="Button";function ow({className:e}){return o.jsxs("svg",{className:re("animate-spin w-4 h-4",e),fill:"none",viewBox:"0 0 24 24",children:[o.jsx("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),o.jsx("path",{className:"opacity-80",fill:"currentColor",d:"M4 12a8 8 0 018-8v8H4z"})]})}function tD({title:e,text:t,onClose:n}){const[r,s]=y.useState(!1);y.useEffect(()=>{const a=l=>{l.key==="Escape"&&n()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[n]);const i=async()=>{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),2e3)};return Er.createPortal(o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",onClick:n,children:[o.jsx("div",{className:"absolute inset-0 bg-black/50"}),o.jsxs("div",{className:"relative z-10 w-full max-w-2xl max-h-[80vh] flex flex-col rounded-xl border border-border bg-bg shadow-xl",onClick:a=>a.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[o.jsx("span",{className:"text-sm font-medium text-text",children:e}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsxs("button",{onClick:i,title:"Copy",className:"flex items-center gap-1 px-2 py-1 rounded text-2xs text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:[r?o.jsx(yt,{size:11,className:"text-success"}):o.jsx(Nr,{size:11}),r?"Copied":"Copy"]}),o.jsx("button",{onClick:n,title:"Close",className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(mt,{size:13})})]})]}),o.jsx("pre",{className:"flex-1 overflow-y-auto px-4 py-3 text-xs text-text-secondary whitespace-pre-wrap font-sans leading-relaxed",children:t})]})]}),document.body)}const qt="text-2xs font-medium uppercase tracking-widest text-text-tertiary",yg="rounded-xl border border-border bg-bg-secondary",CV="fixed inset-0 bg-black/40 backdrop-blur-sm";function jV(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)|0;return["ds","pm","cons"][Math.abs(t)%3]}function AV({text:e}){const[t,n]=y.useState(!1),r=async()=>{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return o.jsx(jt,{size:"sm",variant:"ghost",icon:t?o.jsx(yt,{size:12,className:"text-success"}):o.jsx(Nr,{size:12}),onClick:r,children:t?"Copied":"Copy text"})}function uS({url:e,title:t,onEdit:n}){return o.jsxs("div",{className:"flex flex-col rounded-lg border border-border overflow-hidden h-full",children:[o.jsxs("div",{className:"flex items-center justify-between px-3 h-10 border-b border-border bg-bg-secondary shrink-0",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary",children:t}),o.jsxs("div",{className:"flex gap-1",children:[n&&o.jsx(jt,{size:"sm",variant:"ghost",icon:o.jsx(qn,{size:12}),onClick:n,children:"Edit"}),o.jsx(jt,{size:"sm",variant:"ghost",icon:o.jsx(ha,{size:12}),onClick:()=>window.open(e,"_blank"),children:"Open"}),o.jsx(jt,{size:"sm",variant:"ghost",icon:o.jsx(J2,{size:12}),onClick:()=>{const r=document.createElement("a");r.href=e,r.download=t+".pdf",r.click()},children:"Download"})]})]}),o.jsx("iframe",{src:e,className:"flex-1 w-full bg-bg",title:t})]})}function IV({app:e,onSave:t}){const[n,r]=y.useState(!1),[s,i]=y.useState(e.job_title||""),[a,l]=y.useState(e.company_name||""),[c,u]=y.useState(!1),d=y.useRef(null);y.useEffect(()=>{i(e.job_title||""),l(e.company_name||"")},[e.job_title,e.company_name]),y.useEffect(()=>{var p;n&&((p=d.current)==null||p.focus())},[n]);async function h(){u(!0);try{await t({company_name:a.trim(),job_title:s.trim()}),r(!1)}finally{u(!1)}}function f(){i(e.job_title||""),l(e.company_name||""),r(!1)}if(!n){const p=e.job_title||"Untitled role",m=e.company_name||"Unknown company";return o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-1.5 min-w-0",children:[o.jsx("span",{className:"text-sm font-semibold text-text truncate",children:p}),o.jsx("span",{className:"text-xs text-text-tertiary",children:"at"}),o.jsx("span",{className:"text-sm text-text-secondary truncate",children:m})]}),o.jsx(eD,{color:jV(e.resume_type),children:e.resume_type}),o.jsx("button",{onClick:()=>r(!0),className:"shrink-0 p-1 rounded text-text-tertiary hover:text-text hover:bg-bg-secondary transition-colors",title:"Rename",children:o.jsx(qn,{size:11})})]})}return o.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[o.jsx("input",{ref:d,value:s,onChange:p=>i(p.target.value),onKeyDown:p=>{p.key==="Enter"&&h(),p.key==="Escape"&&f()},placeholder:"Job title",className:"min-w-0 flex-1 max-w-[180px] text-sm font-medium bg-bg border border-border rounded px-2 py-1 text-text placeholder:text-text-tertiary/50 focus:outline-none focus:border-border-focus"}),o.jsx("span",{className:"text-xs text-text-tertiary",children:"at"}),o.jsx("input",{value:a,onChange:p=>l(p.target.value),onKeyDown:p=>{p.key==="Enter"&&h(),p.key==="Escape"&&f()},placeholder:"Company",className:"min-w-0 flex-1 max-w-[180px] text-sm bg-bg border border-border rounded px-2 py-1 text-text placeholder:text-text-tertiary/50 focus:outline-none focus:border-border-focus"}),o.jsx(jt,{size:"sm",variant:"ghost",icon:o.jsx(yt,{size:12,className:"text-success"}
536),onClick:h,disabled:c,children:"Save"}),o.jsx(jt,{size:"sm",variant:"ghost",icon:o.jsx(mt,{size:12}),onClick:f,children:"Cancel"})]})}function PV(){const{jobId:e}=F4(),t=Iu(),n=Yt(),[r,s]=y.useState(!1),[i,a]=y.useState(!1),[l,c]=y.useState(!1),[u,d]=y.useState(Date.now()),[h,f]=y.useState(Date.now()),{data:p,isLoading:m}=wt({queryKey:["application",e],queryFn:()=>G.applications.get(e),enabled:!!e}),x=m&&!p,w=vn({mutationFn:T=>G.applications.update(e,T),onSuccess:T=>{n.setQueryData(["application",e],T),n.invalidateQueries({queryKey:["applications"]})}});async function g(T){!e||!p||await w.mutateAsync(T)}if(x)return o.jsx("div",{className:"flex items-center justify-center h-full py-20",children:o.jsx(ow,{className:"w-5 h-5 text-text-tertiary"})});if(!p)return o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx("p",{className:"text-sm text-text-secondary",children:"Application not found"})});const b=`${G.applications.resumeUrl(p.job_id)}&t=${u}`,_=p.cover_letter_gcs_path?`${G.applications.coverLetterUrl(p.job_id)}&t=${h}`:null,k=p.job_description??"";return o.jsxs(se.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2},className:"flex flex-col h-[calc(100dvh-3rem)]",children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 sm:px-6 py-4 border-b border-border shrink-0",children:[o.jsx(jt,{variant:"ghost",size:"sm",icon:o.jsx(fx,{size:13}),onClick:()=>t(-1),children:"Back"}),o.jsx("div",{className:"w-px h-4 bg-border"}),o.jsx(IV,{app:p,onSave:g}),o.jsxs("div",{className:"flex items-center gap-2 ml-auto shrink-0",children:[k&&o.jsxs("button",{onClick:()=>s(!0),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(Rr,{size:11}),"JD"]}),o.jsx("span",{className:"text-xs text-text-tertiary",children:new Date(p.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})]}),r&&k&&o.jsx(tD,{title:"Job Description",text:k,onClose:()=>s(!1)}),o.jsx("div",{className:"flex-1 flex overflow-hidden",children:o.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-4 gap-4",children:[o.jsxs("div",{className:re("flex-1 grid gap-3 min-h-0",_?"grid-cols-1 sm:grid-cols-2":"grid-cols-1"),children:[o.jsx(uS,{url:b,title:"Resume",onEdit:p.resume_structured?()=>a(!0):void 0}),_&&o.jsx(uS,{url:_,title:"Cover Letter",onEdit:p.cover_letter_structured?()=>c(!0):void 0})]}),p.cover_letter_plain_text&&o.jsxs("div",{className:re("rounded-lg border border-border bg-bg-secondary shrink-0"),children:[o.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[o.jsx("span",{className:qt,children:"Cover letter text"}),o.jsx(AV,{text:p.cover_letter_plain_text})]}),o.jsx("pre",{className:"px-4 py-3 text-xs text-text-secondary whitespace-pre-wrap font-sans leading-relaxed max-h-36 overflow-y-auto",children:p.cover_letter_plain_text})]})]})}),o.jsxs(He,{children:[i&&o.jsx(aw,{app:p,onClose:()=>a(!1),onRecompiled:()=>{d(Date.now()),a(!1)}}),l&&o.jsx(iw,{app:p,onClose:()=>c(!1),onRecompiled:()=>{f(Date.now()),c(!1)}})]})]})}function lw({label:e,actions:t,onCollapse:n,collapseIcon:r="chevron",className:s=""}){const i=r==="x"?mt:b4;return o.jsxs("div",{className:`flex items-center justify-between px-3 h-10 border-b border-border shrink-0 ${s}`,children:[typeof e=="string"?o.jsx("span",{className:qt,children:e}):e,o.jsxs("div",{className:"flex items-center gap-1",children:[t,n&&o.jsx("button",{onClick:n,className:"inline-flex items-center justify-center min-h-[44px] min-w-[44px] sm:min-h-[28px] sm:min-w-[28px] rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",title:r==="x"?"Close":"Collapse sidebar",children:o.jsx(i,{size:13})})]})]})}function DV(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")+".com"}function nD({orgId:e,companyName:t,onConfirm:n,onSkip:r}){const s=DV(t),i=`https://logo.clearbit.com/${s}`,[a,l]=y.useState(i),[c,u]=y.useState(!0),[d,h]=y.useState(""),[f,p]=y.useState(!1);function m(){u(!1)}function x(){const w=d.trim();w&&(l(w),u(!0),p(!1),h(""))}return o.jsxs("div",{className:"my-2 rounded-xl border border-border bg-surface p-4 max-w-xs",children:[o.jsxs("p",{className:"text-xs text-text-tertiary mb-3",children:["Logo for ",t]}),o.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[c?o.jsx("img",{src:a,alt:t,onError:m,className:"w-12 h-12 rounded-lg object-contain border border-border bg-white p-1"}):o.jsx("div",{className:"w-12 h-12 rounded-lg border border-border bg-surface-raised flex items-center justify-center text-text-tertiary text-xs text-center leading-tight px-1",children:"No logo found"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:t}),c&&o.jsx("p",{className:"text-2xs text-text-tertiary mt-0.5",children:s})]})]}),f?o.jsxs("div",{className:"flex gap-2 mb-3",children:[o.jsx("input",{type:"url",value:d,onChange:w=>h(w.target.value),onKeyDown:w=>w.key==="Enter"&&x(),placeholder:"Paste logo URLâ¦",className:"flex-1 text-xs rounded-lg border border-border bg-surface-raised px-2 py-1.5 text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent",autoFocus:!0}),o.jsx("button",{onClick:x,className:"px-2 py-1.5 rounded-lg bg-accent text-white text-xs",children:"Use"}),o.jsx("button",{onClick:()=>p(!1),className:"px-2 py-1.5 rounded-lg border border-border text-xs text-text-tertiary",children:o.jsx(mt,{size:12})})]}):null,o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:()=>n(c?a:""),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-accent text-white text-xs font-medium",children:[o.jsx(yt,{size:12}),c?"Use this":"Skip"]}),c&&o.jsxs("button",{onClick:()=>p(!0),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(ju,{size:12}),"Replace"]}),o.jsx("button",{onClick:r,className:"ml-auto px-3 py-1.5 rounded-lg text-xs text-text-tertiary hover:text-text transition-colors",children:"Skip"})]})]})}const bg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dS=new Date().getFullYear(),OV=Array.from({length:dS-1989},(e,t)=>String(dS-t));function MV(e){const t=(e||"").trim();if(/^\d{4}-\d{2}$/.test(t)){const[r,s]=t.split("-"),i=parseInt(s,10)-1;return{m:bg[i]??"",y:r}}const n=t.split(/\s+/);return n.length===2&&bg.includes(n[0])?{m:n[0],y:n[1]}:n.length===1&&n[0]?{m:"",y:n[0]}:{m:"",y:""}}function hS(e,t){if(e&&t){const n=bg.indexOf(e)+1;return`${t}-${String(n).padStart(2,"0")}`}return t||""}
vendor: 4,382 bytes, line 536
536function vg({value:e,onChange:t,className:n="",size:r="md"}){const s=MV(e),[i,a]=y.useState(s.m),[l,c]=y.useState(s.y),u=f=>{a(f),t(hS(f,l))},d=f=>{c(f),t(hS(i,f))},h=["flex-1 min-w-0 rounded border border-border bg-bg-secondary text-text","focus:outline-none focus:border-border-focus transition-colors appearance-none",r==="sm"?"px-1.5 py-0.5 text-2xs":"px-2 py-1.5 text-xs",n].join(" ");return o.jsxs("div",{className:"flex gap-1.5 flex-1",children:[o.jsxs("select",{value:i,onChange:f=>u(f.target.value),className:h,children:[o.jsx("option",{value:"",children:"Month"}),bg.map(f=>o.jsx("option",{value:f,children:f},f))]}),o.jsxs("select",{value:l,onChange:f=>d(f.target.value),className:h,children:[o.jsx("option",{value:"",children:"Year"}),OV.map(f=>o.jsx("option",{value:f,children:f},f))]})]})}function fS(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(s,r).trim();(a||!i)&&t.push(a),s=r+1,r=n.indexOf(",",s)}return t}function rD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const RV=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,LV=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,FV={};function pS(e,t){return(FV.jsx?LV:RV).test(e)}const BV=/[ \t\n\f\r]/g;function UV(e){return typeof e=="object"?e.type==="text"?mS(e.value):!1:mS(e)}function mS(e){return e.replace(BV,"")===""}class jf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}jf.prototype.normal={};jf.prototype.property={};jf.prototype.space=void 0;function sD(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new jf(n,r,t)}function Jh(e){return e.toLowerCase()}class Jr{constructor(t,n){this.attribute=n,this.property=t}}Jr.prototype.attribute="";Jr.prototype.booleanish=!1;Jr.prototype.boolean=!1;Jr.prototype.commaOrSpaceSeparated=!1;Jr.prototype.commaSeparated=!1;Jr.prototype.defined=!1;Jr.prototype.mustUseProperty=!1;Jr.prototype.number=!1;Jr.prototype.overloadedBoolean=!1;Jr.prototype.property="";Jr.prototype.spaceSeparated=!1;Jr.prototype.space=void 0;let $V=0;const Xe=jl(),Dn=jl(),dv=jl(),fe=jl(),Dt=jl(),Ic=jl(),Zr=jl();function jl(){return 2**++$V}const hv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:Dn,commaOrSpaceSeparated:Zr,commaSeparated:Ic,number:fe,overloadedBoolean:dv,spaceSeparated:Dt},Symbol.toStringTag,{value:"Module"})),cy=Object.keys(hv);class cw extends Jr{constructor(t,n,r,s){let i=-1;if(super(t,n),gS(this,"space",s),typeof r=="number")for(;++i<cy.length;){const a=cy[i];gS(this,cy[i],(r&hv[a])===hv[a])}}}cw.prototype.defined=!0;function gS(e,t,n){n&&(e[t]=n)}function Ou(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new cw(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Jh(r)]=r,n[Jh(i.attribute)]=r}return new jf(t,n,e.space)}const iD=Ou({properties:{ariaActiveDescendant:null,ariaAtomic:Dn,ariaAutoComplete:null,ariaBusy:Dn,ariaChecked:Dn,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:Dt,ariaCurrent:null,ariaDescribedBy:Dt,ariaDetails:null,ariaDisabled:Dn,ariaDropEffect:Dt,ariaErrorMessage:null,ariaExpanded:Dn,ariaFlowTo:Dt,ariaGrabbed:Dn,ariaHasPopup:null,ariaHidden:Dn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Dt,ariaLevel:fe,ariaLive:null,ariaModal:Dn,ariaMultiLine:Dn,ariaMultiSelectable:Dn,ariaOrientation:null,ariaOwns:Dt,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:Dn,ariaReadOnly:Dn,ariaRelevant:null,ariaRequired:Dn,ariaRoleDescription:Dt,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:Dn,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function aD(e,t){return t in e?e[t]:t}function oD(e,t){return aD(e,t.toLowerCase())}const zV=Ou({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ic,acceptCharset:Dt,accessKey:Dt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Dt,autoF
536ocus:Xe,autoPlay:Xe,blocking:Dt,capture:null,charSet:null,checked:Xe,cite:null,className:Dt,cols:fe,colSpan:null,content:null,contentEditable:Dn,controls:Xe,controlsList:Dt,coords:fe|Ic,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:dv,draggable:Dn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Dt,height:fe,hidden:dv,high:fe,href:null,hrefLang:null,htmlFor:Dt,httpEquiv:Dt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Dt,itemRef:Dt,itemScope:Xe,itemType:Dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xe,optimum:fe,pattern:null,ping:Dt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Dt,required:Xe,reversed:Xe,rows:fe,rowSpan:fe,sandbox:Dt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:Dn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:Dn,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Dt,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:Dn,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:oD}),HV=Ou({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRen
536dering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zr,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:Dt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRen
536dering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ic,g2:Ic,glyphName:Ic,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:aD}),lD=Ou({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}
vendor: 4,830 bytes, lines 536-537
536,space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),cD=Ou({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:oD}),uD=Ou({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),WV={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},VV=/[A-Z]/g,xS=/-[a-z]/g,qV=/^data[-\w.:]+$/i;function Nx(e,t){const n=Jh(t);let r=t,s=Jr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&qV.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(xS,GV);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!xS.test(i)){let a=i.replace(VV,YV);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=cw}return new s(r,t)}function YV(e){return"-"+e.toLowerCase()}function GV(e){return e.charAt(1).toUpperCase()}const Af=sD([iD,zV,lD,cD,uD],"html"),No=sD([iD,HV,lD,cD,uD],"svg");function yS(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dD(e){return e.join(" ").trim()}var uw={},bS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,KV=/\n/g,QV=/^\s*/,XV=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,JV=/^:\s*/,ZV=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eq=/^[;\s]*/,tq=/^\s+|\s+$/g,nq=` 537`,vS="/",_S="*",zo="",rq="comment",sq="declaration";function iq(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function s(m){var x=m.match(KV);x&&(n+=x.length);var w=m.lastIndexOf(nq);r=~w?m.length-w:r+m.length}function i(){var m={line:n,column:r};return function(x){return x.position=new a(m),u(),x}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function l(m){var x=new Error(t.source+":"+n+":"+r+": "+m);if(x.reason=m,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function c(m){var x=m.exec(e);if(x){var w=x[0];return s(w),e=e.slice(w.length),x}}function u(){c(QV)}function d(m){var x;for(m=m||[];x=h();)x!==!1&&m.push(x);return m}function h(){var m=i();if(!(vS!=e.charAt(0)||_S!=e.charAt(1))){for(var x=2;zo!=e.charAt(x)&&(_S!=e.charAt(x)||vS!=e.charAt(x+1));)++x;if(x+=2,zo===e.charAt(x-1))return l("End of comment missing");var w=e.slice(2,x-2);return r+=2,s(w),e=e.slice(x),r+=2,m({type:rq,comment:w})}}function f(){var m=i(),x=c(XV);if(x){if(h(),!c(JV))return l("property missing ':'");var w=c(ZV),g=m({type:sq,property:wS(x[0].replace(bS,zo)),value:w?wS(w[0].replace(bS,zo)):zo});return c(eq),g}}function p(){var m=[];d(m);for(var x;x=f();)x!==!1&&(m.push(x),d(m));return m}return u(),p()}function wS(e){return e?e.replace(tq,zo):zo}var aq=iq,oq=mm&&mm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(uw,"__esModule",{value:!0});uw.default=cq;const lq=oq(aq);function cq(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,lq.default)(e),s=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:a,value:l}=i;s?t(a,l,i):l&&(n=n||{},n[a]=l)}),n}var kx={};Object.defineProperty(kx,"__esModule",{value:!0});kx.camelCase=void 0;var uq=/^--[a-zA-Z0-9_-]+$/,dq=/-([a-z])/g,hq=/^[^-]+$/,fq=/^-(webkit|moz|ms|o|khtml)-/,pq=/^-(ms)-/,mq=function(e){return!e||hq.test(e)||uq.test(e)},gq=function(e,t){return t.toUpperCase()},ES=function(e,t){return"".concat(t,"-")},xq=function(e,t){return t===void 0&&(t={}),mq(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(pq,ES):e=e.replace(fq,ES),e.replace(dq,gq))};kx.camelCase=xq;var yq=mm&&mm.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bq=yq(uw),vq=kx;function fv(e,t){var n={};return!e||typeof e!="string"||(0,bq.default)(e,function(r,s){r&&s&&(n[(0,vq.camelCase)(r,t)]=s)}),n}fv.default=fv;var _q=fv;const wq=Lg(_q),Tx=hD("end"),Ci=hD("start");function hD(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Eq(e){const t=Ci(e),n=Tx(e);if(t&&n)return{start:t,end:n}}function ch(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?NS(e.position):"start"in e||"end"in e?NS(e):"line"in e||"column"in e?pv(e):""}function pv(e){return kS(e&&e.line)+":"+kS(e&&e.column)}function NS(e){return pv(e&&e.start)+"-"+pv(e&&e.end)}function kS(e){return e&&typeof e=="number"?e:1}
vendor: 1,921 bytes, line 537
537class kr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(a=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=ch(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}kr.prototype.file="";kr.prototype.name="";kr.prototype.reason="";kr.prototype.message="";kr.prototype.stack="";kr.prototype.column=void 0;kr.prototype.line=void 0;kr.prototype.ancestors=void 0;kr.prototype.cause=void 0;kr.prototype.fatal=void 0;kr.prototype.place=void 0;kr.prototype.ruleId=void 0;kr.prototype.source=void 0;const dw={}.hasOwnProperty,Nq=new Map,kq=/[A-Z]/g,Tq=new Set(["table","tbody","thead","tfoot","tr"]),Sq=new Set(["td","th"]),fD="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Cq(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Rq(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");
vendor: 5,854 bytes, line 537
537if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Mq(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?No:Af,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=pD(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function pD(e,t,n){if(t.type==="element")return jq(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Aq(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Pq(e,t,n);if(t.type==="mdxjsEsm")return Iq(e,t);if(t.type==="root")return Dq(e,t,n);if(t.type==="text")return Oq(e,t)}function jq(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=No,e.schema=s),e.ancestors.push(t);const i=gD(e,t.tagName,!1),a=Lq(e,t);let l=fw(e,t);return Tq.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!UV(c):!0})),mD(e,a,i,t),hw(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Aq(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Zh(e,t.position)}function Iq(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zh(e,t.position)}function Pq(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=No,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:gD(e,t.name,!0),a=Fq(e,t),l=fw(e,t);return mD(e,a,i,t),hw(a,l),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Dq(e,t,n){const r={};return hw(r,fw(e,t)),e.create(t,e.Fragment,r,n)}function Oq(e,t){return t.value}function mD(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hw(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Mq(e,t,n){return r;function r(s,i,a,l){const u=Array.isArray(a.children)?n:t;return l?u(i,a,l):u(i,a)}}function Rq(e,t){return n;function n(r,s,i,a){const l=Array.isArray(i.children),c=Ci(r);return t(s,i,a,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Lq(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&dw.call(t.properties,s)){const i=Bq(e,s,t.properties[s]);if(i){const[a,l]=i;e.tableCellAlignToStyle&&a==="align"&&typeof l=="string"&&Sq.has(t.tagName)?r=l:n[a]=l}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Fq(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const l=a.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Zh(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else Zh(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function fw(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:Nq;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=s.get(c)||0;a=c+"-"+u,s.set(c,u+1)}}const l=pD(e,i,a);l!==void 0&&n.push(l)}return n}function Bq(e,t,n){const r=Nx(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?rD(n):dD(n)),r.property==="style"){let s=typeof n=="object"?n:Uq(e,String(n));return e.stylePropertyNameCase==="css"&&(s=$q(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?WV[r.property]||r.property:r.attribute,n]}}function Uq(e,t){try{return wq(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new kr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=fD+"#cannot-parse-style-attribute",s}}function gD(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,a;for(;++i<s.length;){const l=pS(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};a=a?{type:"MemberExpression",object:a,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}r=a}else r=pS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return dw.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Zh(e)}function Zh(e,t){const n=new kr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=fD+"#cannot-handle-mdx-estrees-without-createevaluater",n}function $q(e){const t={};let n;for(n in e)dw.call(e,n)&&(t[zq(n)]=e[n]);return t}function zq(e){let t=e.replace(kq,Hq);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Hq(e){return"-"+e.toLowerCase()}const uy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Wq={};function pw(e,t){const n=Wq,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xD(e,r,s)}
vendor: 12,712 bytes, line 537
537function xD(e,t,n){if(Vq(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return TS(e.children,t,n)}return Array.isArray(e)?TS(e,t,n):""}function TS(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=xD(e[s],t,n);return r.join("")}function Vq(e){return!!(e&&typeof e=="object")}const SS=document.createElement("i");function mw(e){const t="&"+e+";";SS.innerHTML=t;const n=SS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ds(e,t,n,r){const s=e.length;let i=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Cs(e,t){return e.length>0?(ds(e,e.length,0,t),e):t}const CS={}.hasOwnProperty;function yD(e){const t={};let n=-1;for(;++n<e.length;)qq(t,e[n]);return t}function qq(e,t){let n;for(n in t){const s=(CS.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){CS.call(s,a)||(s[a]=[]);const l=i[a];Yq(s[a],Array.isArray(l)?l:l?[l]:[])}}}function Yq(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ds(e,0,0,r)}function bD(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ti(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dr=ko(/[A-Za-z]/),_r=ko(/[\dA-Za-z]/),Gq=ko(/[#-'*+\--9=?A-Z^-~]/);function _g(e){return e!==null&&(e<32||e===127)}const mv=ko(/\d/),Kq=ko(/[\dA-Fa-f]/),Qq=ko(/[!-/:-@[-`{-~]/);function $e(e){return e!==null&&e<-2}function Pt(e){return e!==null&&(e<0||e===32)}function it(e){return e===-2||e===-1||e===32}const Sx=ko(new RegExp("\\p{P}|\\p{S}","u")),El=ko(/\s/);function ko(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Mu(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&_r(e.charCodeAt(n+1))&&_r(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(a=String.fromCharCode(i,l),s=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function pt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return it(c)?(e.enter(n),l(c)):t(c)}function l(c){return it(c)&&i++<s?(e.consume(c),l):(e.exit(n),t(c))}}const Xq={tokenize:Jq};function Jq(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),pt(e,t,"linePrefix")}function s(l){return e.enter("paragraph"),i(l)}function i(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(l)}function a(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return $e(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),a)}}const Zq={tokenize:eY},jS={tokenize:tY};function eY(e){const t=this,n=[];let r=0,s,i,a;return l;function l(_){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,c,u)(_)}return u(_)}function c(_){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&b();const k=t.events.length;let T=k,N;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){N=t.events[T][1].end;break}g(r);let C=k;for(;C<t.events.length;)t.events[C][1].end={...N},C++;return ds(t.events,T+1,0,t.events.slice(k)),t.events.length=C,u(_)}return l(_)}function u(_){if(r===n.length){if(!s)return f(_);if(s.currentConstruct&&s.currentConstruct.concrete)return m(_);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jS,d,h)(_)}function d(_){return s&&b(),g(r),f(_)}function h(_){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(_)}function f(_){return t.containerState={},e.attempt(jS,p,m)(_)}function p(_){return r++,n.push([t.currentConstruct,t.containerState]),f(_)}function m(_){if(_===null){s&&b(),g(0),e.consume(_);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),x(_)}function x(_){if(_===null){w(e.exit("chunkFlow"),!0),g(0),e.consume(_);return}return $e(_)?(e.consume(_),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(_),x)}function w(_,k){const T=t.sliceStream(_);if(k&&T.push(null),_.previous=i,i&&(i.next=_),i=_,s.defineSkip(_.start),s.write(T),t.parser.lazy[_.start.line]){let N=s.events.length;for(;N--;)if(s.events[N][1].start.offset<a&&(!s.events[N][1].end||s.events[N][1].end.offset>a))return;const C=t.events.length;let S=C,I,E;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){if(I){E=t.events[S][1].end;break}I=!0}for(g(r),N=C;N<t.events.length;)t.events[N][1].end={...E},N++;ds(t.events,S+1,0,t.events.slice(C)),t.events.length=N}}function g(_){let k=n.length;for(;k-- >_;){const T=n[k];t.containerState=T[1],T[0].exit.call(t,e)}n.length=_}function b(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function tY(e,t,n){return pt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hu(e){if(e===null||Pt(e)||El(e))return 1;if(Sx(e))return 2}function Cx(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const gv={name:"attention",resolveAll:nY,tokenize:rY};function nY(e,t){let n=-1,r,s,i,a,l,c,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h={...e[r][1].end},f={...e[n][1].start};AS(h,-c),AS(f,c),a={type:c>1?"strongSequence":"emphasisSequence",start:h,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...l.end}},e[r][1].end={...a.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Cs(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Cs(u,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Cs(u,Cx(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Cs(u,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=Cs(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,ds(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function rY(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=hu(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===i)return e.consume(c),l;const u=e.exit("attentionSequence"),d=hu(c),h=!d||d===2&&s||n.includes(c),f=!s||s===2&&d||n.includes(r);return u._open=!!(i===42?h:h&&(s||!f)),u._close=!!(i===42?f:f&&(d||!h)),t(c)}}function AS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const sY={name:"autolink",tokenize:iY};function iY(e,t,n){let r=0;return s;function s(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return Dr(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||_r(p)?(r=1,l(p)):u(p)}function l(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||_r(p))&&r++<32?(e.consume(p),l):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||_g(p)?n(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),d):Gq(p)?(e.consume(p),u):n(p)}function d(p){return _r(p)?h(p):n(p)}function h(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||_r(p))&&r++<63){const m=p===45?f:h;return e.consume(p),m}return n(p)}}const If={partial:!0,tokenize:aY};function aY(e,t,n){return r;function r(i){return it(i)?pt(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||$e(i)?t(i):n(i)}}const vD={continuation:{tokenize:lY},exit:cY,name:"blockQuote",tokenize:oY};function oY(e,t,n){const r=this;return s;function s(a){if(a===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return it(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function lY(e,t,n){const r=this;return s;function s(a){return it(a)?pt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(vD,t,n)(a)}}function cY(e){e.exit("blockQuote")}const _D={name:"characterEscape",tokenize:uY};function uY(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return Qq(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const wD={name:"characterReference",tokenize:dY};function dY(e,t,n){const r=this;let s=0,i,a;return l;function l(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=_r,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=Kq,d):(e.enter("characterReferenceValue"),i=7,a=mv,d(h))}function d(h){if(h===59&&s){const f=e.exit("characterReferenceValue");return a===_r&&!mw(r.sliceSerialize(f))?n(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(h)&&s++<i?(e.consume(h),d):n(h)}}const IS={partial:!0,tokenize:fY},PS={concrete:!0,name:"codeFenced",tokenize:hY};function hY(e,t,n){const r=this,s={partial:!0,tokenize:T};let i=0,a=0,l;return c;function c(N){return u(N)}function u(N){const C=r.events[r.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===l?(a++,e.consume(N),d):a<3?n(N):(e.exit("codeFencedFenceSequence"),it(N)?pt(e,h,"whitespace")(N):h(N))}function h(N){return N===null||$e(N)?(e.exit("codeFencedFence"),r.interrupt?t(N):e.check(IS,x,k)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(N))}function f(N){return N===null||$e(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(N)):it(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pt(e,p,"whitespace")(N)):N===96&&N===l?n(N):(e.consume(N),f)}function p(N){return N===null||$e(N)?h(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(N))}function m(N){return N===null||$e(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(N)):N===96&&N===l?n(N):(e.consume(N),m)}function x(N){return e.attempt(s,k,w)(N)}function w(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return i>0&&it(N)?pt(e,b,"linePrefix",i+1)(N):b(N)}function b(N){return N===null||$e(N)?e.check(IS,x,k)(N):(e.enter("codeFlowValue"),_(N))}function _(N){return N===null||$e(N)?(e.exit("codeFlowValue"),b(N)):(e.consume(N),_)}function k(N){return e.exit("codeFenced"),t(N)}function T(N,C,S){let I=0;return E;function E(R){return N.enter("lineEnding"),N.consume(R),N.exit("lineEnding"),j}
vendor: 5,795 bytes, line 537
537function j(R){return N.enter("codeFencedFence"),it(R)?pt(N,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):P(R)}function P(R){return R===l?(N.enter("codeFencedFenceSequence"),L(R)):S(R)}function L(R){return R===l?(I++,N.consume(R),L):I>=a?(N.exit("codeFencedFenceSequence"),it(R)?pt(N,z,"whitespace")(R):z(R)):S(R)}function z(R){return R===null||$e(R)?(N.exit("codeFencedFence"),C(R)):S(R)}}}function fY(e,t,n){const r=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const dy={name:"codeIndented",tokenize:mY},pY={partial:!0,tokenize:gY};function mY(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),pt(e,i,"linePrefix",5)(u)}function i(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?c(u):$e(u)?e.attempt(pY,a,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||$e(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function gY(e,t,n){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?n(a):$e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):pt(e,i,"linePrefix",5)(a)}function i(a){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):$e(a)?s(a):n(a)}}const xY={name:"codeText",previous:bY,resolve:yY,tokenize:vY};function yY(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function bY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vY(e,t,n){let r=0,s,i;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),l(h)}function l(h){return h===96?(e.consume(h),r++,l):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?n(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(i=e.enter("codeTextSequence"),s=0,d(h)):$e(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||$e(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),s++,d):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(h)):(i.type="codeTextData",u(h))}}class _Y{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&hd(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),hd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hd(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);hd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hd(this.left,n.reverse())}}}function hd(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ED(e){const t={};let n=-1,r,s,i,a,l,c,u;const d=new _Y(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,wY(d,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(a=d.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(d.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(r[1].end={...d.get(s)[1].start},l=d.slice(s,n),l.unshift(r),d.splice(s,n-s+1,l))}}return ds(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function wY(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const l=a.events,c=[],u={};let d,h,f=-1,p=n,m=0,x=0;const w=[x];for(;p;){for(;e.get(++s)[1]!==p;);i.push(s),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),h&&a.defineSki
vendor: 18,558 bytes, line 537
537p(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(x=f+1,w.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):w.pop(),f=w.length;f--;){const g=l.slice(w[f],w[f+1]),b=i.pop();c.push([b,b+g.length-1]),e.splice(b,2,g)}for(c.reverse(),f=-1;++f<c.length;)u[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return u}const EY={resolve:kY,tokenize:TY},NY={partial:!0,tokenize:SY};function kY(e){return ED(e),e}function TY(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(l)}function s(l){return l===null?i(l):$e(l)?e.check(NY,a,i)(l):(e.consume(l),s)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function a(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function SY(e,t,n){const r=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),pt(e,i,"linePrefix")}function i(a){if(a===null||$e(a))return n(a);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function ND(e,t,n,r,s,i,a,l,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(g){return g===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(g),e.exit(i),f):g===null||g===32||g===41||_g(g)?n(g):(e.enter(r),e.enter(a),e.enter(l),e.enter("chunkString",{contentType:"string"}),x(g))}function f(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(l),f(g)):g===null||g===60||$e(g)?n(g):(e.consume(g),g===92?m:p)}function m(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function x(g){return!d&&(g===null||g===41||Pt(g))?(e.exit("chunkString"),e.exit(l),e.exit(a),e.exit(r),t(g)):d<u&&g===40?(e.consume(g),d++,x):g===41?(e.consume(g),d--,x):g===null||g===32||g===40||_g(g)?n(g):(e.consume(g),g===92?w:x)}function w(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function kD(e,t,n,r,s,i){const a=this;let l=0,c;return u;function u(p){return e.enter(r),e.enter(s),e.consume(p),e.exit(s),e.enter(i),d}function d(p){return l>999||p===null||p===91||p===93&&!c||p===94&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(i),e.enter(s),e.consume(p),e.exit(s),e.exit(r),t):$e(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||$e(p)||l++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!it(p)),p===92?f:h)}function f(p){return p===91||p===92||p===93?(e.consume(p),l++,h):h(p)}}function TD(e,t,n,r,s,i){let a;return l;function l(f){return f===34||f===39||f===40?(e.enter(r),e.enter(s),e.consume(f),e.exit(s),a=f===40?41:f,c):n(f)}function c(f){return f===a?(e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===a?(e.exit(i),c(a)):f===null?n(f):$e(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),pt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===a||f===null||$e(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?h:d)}function h(f){return f===a||f===92?(e.consume(f),d):d(f)}}function uh(e,t){let n;return r;function r(s){return $e(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):it(s)?pt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const CY={name:"definition",tokenize:AY},jY={partial:!0,tokenize:IY};function AY(e,t,n){const r=this;let s;return i;function i(p){return e.enter("definition"),a(p)}function a(p){return kD.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function l(p){return s=ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):n(p)}function c(p){return Pt(p)?uh(e,u)(p):u(p)}function u(p){return ND(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(jY,h,h)(p)}function h(p){return it(p)?pt(e,f,"whitespace")(p):f(p)}function f(p){return p===null||$e(p)?(e.exit("definition"),r.parser.defined.push(s),t(p)):n(p)}}function IY(e,t,n){return r;function r(l){return Pt(l)?uh(e,s)(l):n(l)}function s(l){return TD(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return it(l)?pt(e,a,"whitespace")(l):a(l)}function a(l){return l===null||$e(l)?t(l):n(l)}}const PY={name:"hardBreakEscape",tokenize:DY};function DY(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return $e(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const OY={name:"headingAtx",resolve:MY,tokenize:RY};function MY(e,t){let n=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ds(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function RY(e,t,n){let r=0;return s;function s(d){return e.enter("atxHeading"),i(d)}function i(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Pt(d)?(e.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||$e(d)?(e.exit("atxHeading"),t(d)):it(d)?pt(e,l,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),l(d))}function u(d){return d===null||d===35||Pt(d)?(e.exit("atxHeadingText"),l(d)):(e.consume(d),u)}}const LY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],DS=["pre","script","style","textarea"],FY={concrete:!0,name:"htmlFlow",resolveTo:$Y,tokenize:zY},BY={partial:!0,tokenize:WY},UY={partial:!0,tokenize:HY};function $Y(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zY(e,t,n){const r=this;let s,i,a,l,c;return u;function u(D){return d(D)}function d(D){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(D),h}function h(D){return D===33?(e.consume(D),f):D===47?(e.consume(D),i=!0,x):D===63?(e.consume(D),s=3,r.interrupt?t:A):Dr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function f(D){return D===45?(e.consume(D),s=2,p):D===91?(e.consume(D),s=5,l=0,m):Dr(D)?(e.consume(D),s=4,r.interrupt?t:A):n(D)}function p(D){return D===45?(e.consume(D),r.interrupt?t:A):n(D)}function m(D){const te="CDATA[";return D===te.charCodeAt(l++)?(e.consume(D),l===te.length?r.interrupt?t:P:m):n(D)}function x(D){return Dr(D)?(e.consume(D),a=String.fromCharCode(D),w):n(D)}function w(D){if(D===null||D===47||D===62||Pt(D)){const te=D===47,J=a.toLowerCase();return!te&&!i&&DS.includes(J)?(s=1,r.interrupt?t(D):P(D)):LY.includes(a.toLowerCase())?(s=6,te?(e.consume(D),g):r.interrupt?t(D):P(D)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(D):i?b(D):_(D))}return D===45||_r(D)?(e.consume(D),a+=String.fromCharCode(D),w):n(D)}function g(D){return D===62?(e.consume(D),r.interrupt?t:P):n(D)}function b(D){return it(D)?(e.consume(D),b):E(D)}function _(D){return D===47?(e.consume(D),E):D===58||D===95||Dr(D)?(e.consume(D),k):it(D)?(e.consume(D),_):E(D)}function k(D){return D===45||D===46||D===58||D===95||_r(D)?(e.consume(D),k):T(D)}function T(D){return D===61?(e.consume(D),N):it(D)?(e.consume(D),T):_(D)}function N(D){return D===null||D===60||D===61||D===62||D===96?n(D):D===34||D===39?(e.consume(D),c=D,C):it(D)?(e.consume(D),N):S(D)}function C(D){return D===c?(e.consume(D),c=null,I):D===null||$e(D)?n(D):(e.consume(D),C)}function S(D){return D===null||D===34||D===39||D===47||D===60||D===61||D===62||D===96||Pt(D)?T(D):(e.consume(D),S)}function I(D){return D===47||D===62||it(D)?_(D):n(D)}function E(D){return D===62?(e.consume(D),j):n(D)}function j(D){return D===null||$e(D)?P(D):it(D)?(e.consume(D),j):n(D)}function P(D){return D===45&&s===2?(e.consume(D),B):D===60&&s===1?(e.consume(D),O):D===62&&s===4?(e.consume(D),q):D===63&&s===3?(e.consume(D),A):D===93&&s===5?(e.consume(D),H):$e(D)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(BY,V,L)(D)):D===null||$e(D)?(e.exit("htmlFlowData"),L(D)):(e.consume(D),P)}function L(D){return e.check(UY,z,V)(D)}function z(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),R}function R(D){return D===null||$e(D)?L(D):(e.enter("htmlFlowData"),P(D))}function B(D){return D===45?(e.consume(D),A):P(D)}function O(D){return D===47?(e.consume(D),a="",U):P(D)}function U(D){if(D===62){const te=a.toLowerCase();return DS.includes(te)?(e.consume(D),q):P(D)}return Dr(D)&&a.length<8?(e.consume(D),a+=String.fromCharCode(D),U):P(D)}function H(D){return D===93?(e.consume(D),A):P(D)}function A(D){return D===62?(e.consume(D),q):D===45&&s===2?(e.consume(D),A):P(D)}function q(D){return D===null||$e(D)?(e.exit("htmlFlowData"),V(D)):(e.consume(D),q)}function V(D){return e.exit("htmlFlow"),t(D)}}function HY(e,t,n){const r=this;return s;function s(a){return $e(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function WY(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(If,t,n)}}const VY={name:"htmlText",tokenize:qY};function qY(e,t,n){const r=this;let s,i,a;return l;function l(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),c}function c(A){return A===33?(e.consume(A),u):A===47?(e.consume(A),T):A===63?(e.consume(A),_):Dr(A)?(e.consume(A),S):n(A)}function u(A){return A===45?(e.consume(A),d):A===91?(e.consume(A),i=0,m):Dr(A)?(e.consume(A),b):n(A)}function d(A){return A===45?(e.consume(A),p):n(A)}function h(A){return A===null?n(A):A===45?(e.consume(A),f):$e(A)?(a=h,O(A)):(e.consume(A),h)}function f(A){return A===45?(e.consume(A),p):h(A)}function p(A){return A===62?B(A):A===45?f(A):h(A)}function m(A){const q="CDATA[";return A===q.charCodeAt(i++)?(e.consume(A),i===q.length?x:m):n(A)}function x(A){return A===null?n(A):A===93?(e.consume(A),w):$e(A)?(a=x,O(A)):(e.consume(A),x)}function w(A){return A===93?(e.consume(A),g):x(A)}function g(A){return A===62?B(A):A===93?(e.consume(A),g):x(A)}function b(A){return A===null||A===62?B(A):$e(A)?(a=b,O(A)):(e.consume(A),b)}function _(A){return A===null?n(A):A===63?(e.consume(A),k):$e(A)?(a=_,O(A)):(e.consume(A),_)}function k(A){return A===62?B(A):_(A)}function T(A){return Dr(A)?(e.consume(A),N):n(A)}function N(A){return A===45||_r(A)?(e.consume(A),N):C(A)}function C(A){return $e(A)?(a=C,O(A)):it(A)?(e.consume(A),C):B(A)}function S(A){return A===45||_r(A)?(e.consume(A),S):A===47||A===62||Pt(A)?I(A):n(A)}function I(A){return A===47?(e.consume(A),B):A===58||A===95||Dr(A)?(e.consume(A),E):$e(A)?(a=I,O(A)):it(A)?(e.consume(A),I):B(A)}function E(A){return A===45||A===46||A===58||A===95||_r(A)?(e.consume(A),E):j(A)}function j(A){return A===61?(e.consume(A),P):$e(A)?(a=j,O(A)):it(A)?(e.consume(A),j):I(A)}function P(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),s=A,L):$e(A)?(a=P,O(A)):it(A)?(e.consume(A),P):(e.consume(A),z)}function L(A){return A===s?(e.consume(A),s=void 0,R):A===null?n(A):$e(A)?(a=L,O(A)):(e.consume(A),L)}function z(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||Pt(A)?I(A):(e.consume(A),z)}function R(A){return A===47||A===62||Pt(A)?I(A):n(A)}function B(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function O(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),U}function U(A){return it(A)?pt(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):H(A)}function H(A){return e.enter("htmlTextData"),a(A)}}const gw={name:"labelEnd",resolveAll:QY,resolveTo:XY,tokenize:JY},YY={tokenize:ZY},GY={tokenize:eG},KY={tokenize:tG};function QY(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&ds(e,0,e.length,n),e}function XY(e,t){let n=e.length,r=0,s,i,a,l;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=Cs(l,e.slice(i+1,i+r+3)),l=Cs(l,[["enter",d,t]]),l=Cs(l,Cx(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),l=Cs(l,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),l=Cs(l,e.slice(a+1)),l=Cs(l,[["exit",c,t]]),ds(e,i,e.length,l),e}function JY(e,t,n){const r=this;let s=r.events.length,i,a;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return l;function l(f){return i?i._inactive?h(f):(a=r.parser.defined.includes(ti(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(YY,d,a?d:h)(f):f===91?e.attempt(GY,d,a?u:h)(f):a?d(f):h(f)}function u(f){return e.attempt(KY,d,h)(f)}function d(f){return t(f)}function h(f){return i._balanced=!0,n(f)}}function ZY(e,t,n){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),s}function s(h){return Pt(h)?uh(e,i)(h):i(h)}function i(h){return h===41?d(h):ND(e,a,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return Pt(h)?uh(e,c)(h):d(h)}function l(h){return n(h)}function c(h){return h===34||h===39||h===40?TD(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return Pt(h)?uh(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),t):n(h)}}function eG(e,t,n){const r=this;return s;function s(l){return kD.call(r,e,i,a,"reference","referenceMarker","referenceString")(l)}function i(l){return r.parser.defined.includes(ti(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function a(l){return n(l)}}function tG(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const nG={name:"labelStartImage",resolveAll:gw.resolveAll,tokenize:rG};function rG(e,t,n){const r=this;return s;function s(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),a):n(l)}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const sG={name:"labelStartLink",resolveAll:gw.resolveAll,tokenize:iG};function iG(e,t,n){const r=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const hy={name:"lineEnding",tokenize:aG};function aG(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),pt(e,t,"linePrefix")}}const sm={name:"thematicBreak",tokenize:oG};function oG(e,t,n){let r=0,s;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return s=u,l(u)}function l(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||$e(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),it(u)?pt(e,l,"whitespace")(u):l(u))}}const $r={continuation:{tokenize:dG},exit:fG,name:"list",tokenize:uG},lG={partial:!0,tokenize:pG},cG={partial:!0,tokenize:hG};function uG(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return l;function l(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:mv(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(sm,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return n(p)}function c(p){return mv(p)&&++a<10?(e.consume(p),c):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(If,r.interrupt?n:d,e.attempt(lG,f,h))}
vendor: 5,359 bytes, line 537
537function d(p){return r.containerState.initialBlankLine=!0,i++,f(p)}function h(p){return it(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):n(p)}function f(p){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function dG(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(If,s,i);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,pt(e,t,"listItemIndent",r.containerState.size+1)(l)}function i(l){return r.containerState.furtherBlankLines||!it(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cG,t,a)(l))}function a(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,pt(e,e.attempt($r,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function hG(e,t,n){const r=this;return pt(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function fG(e){e.exit(this.containerState.type)}function pG(e,t,n){const r=this;return pt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!it(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const OS={name:"setextUnderline",resolveTo:mG,tokenize:gG};function mG(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function gG(e,t,n){const r=this;let s;return i;function i(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),s=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===s?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),it(u)?pt(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||$e(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const xG={tokenize:yG};function yG(e){const t=this,n=e.attempt(If,r,e.attempt(this.parser.constructs.flowInitial,s,pt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(EY,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bG={resolveAll:CD()},vG=SD("string"),_G=SD("text");function SD(e){return{resolveAll:CD(e==="text"?wG:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,a,l);return a;function a(d){return u(d)?i(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return u(d)?(n.exit("data"),i(d)):(n.consume(d),c)}function u(d){if(d===null)return!0;const h=s[d];let f=-1;if(h)for(;++f<h.length;){const p=h[f];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function CD(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function wG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let i=s.length,a=-1,l=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)l++,a--;if(a)break;a=-1}else if(u===-2)c=!0,l++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const EG={42:$r,43:$r,45:$r,48:$r,49:$r,50:$r,51:$r,52:$r,53:$r,54:$r,55:$r,56:$r,57:$r,62:vD},NG={91:CY},kG={[-2]:dy,[-1]:dy,32:dy},TG={35:OY,42:sm,45:[OS,sm],60:FY,61:OS,95:sm,96:PS,126:PS},SG={38:wD,92:_D},CG={[-5]:hy,[-4]:hy,[-3]:hy,33:nG,38:wD,42:gv,60:[sY,VY],91:sG,92:[PY,_D],93:gw,95:gv,96:xY},jG={null:[gv,bG]},AG={null:[42,95]},IG={null:[]},PG=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:AG,contentInitial:NG,disable:IG,document:EG,flow:TG,flowInitial:kG,insideSpan:jG,string:SG,text:CG},Symbol.toStringTag,{value:"Module"}));function DG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 12,159 bytes, lines 537-539
537olumn:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let a=[],l=[];const c={attempt:C(T),check:C(N),consume:b,enter:_,exit:k,interrupt:C(N,{interrupt:!0})},u={code:null,containerState:{},defineSkip:x,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:h};let d=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function h(j){return a=Cs(a,j),w(),a[a.length-1]!==null?[]:(S(t,0),u.events=Cx(i,u.events,u),u.events)}function f(j,P){return MG(p(j),P)}function p(j){return OG(a,j)}function m(){const{_bufferIndex:j,_index:P,line:L,column:z,offset:R}=r;return{_bufferIndex:j,_index:P,line:L,column:z,offset:R}}function x(j){s[j.line]=j.column,E()}function w(){let j;for(;r._index<a.length;){const P=a[r._index];if(typeof P=="string")for(j=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===j&&r._bufferIndex<P.length;)g(P.charCodeAt(r._bufferIndex));else g(P)}}function g(j){d=d(j)}function b(j){$e(j)?(r.line++,r.column=1,r.offset+=j===-3?2:1,E()):j!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=j}function _(j,P){const L=P||{};return L.type=j,L.start=m(),u.events.push(["enter",L,u]),l.push(L),L}function k(j){const P=l.pop();return P.end=m(),u.events.push(["exit",P,u]),P}function T(j,P){S(j,P.from)}function N(j,P){P.restore()}function C(j,P){return L;function L(z,R,B){let O,U,H,A;return Array.isArray(z)?V(z):"tokenize"in z?V([z]):q(z);function q(ue){return Ne;function Ne(Ie){const Pe=Ie!==null&&ue[Ie],Ue=Ie!==null&&ue.null,ot=[...Array.isArray(Pe)?Pe:Pe?[Pe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return V(ot)(Ie)}}function V(ue){return O=ue,U=0,ue.length===0?B:D(ue[U])}function D(ue){return Ne;function Ne(Ie){return A=I(),H=ue,ue.partial||(u.currentConstruct=ue),ue.name&&u.parser.constructs.disable.null.includes(ue.name)?J():ue.tokenize.call(P?Object.assign(Object.create(u),P):u,c,te,J)(Ie)}}function te(ue){return j(H,A),R}function J(ue){return A.restore(),++U<O.length?D(O[U]):B}}}function S(j,P){j.resolveAll&&!i.includes(j)&&i.push(j),j.resolve&&ds(u.events,P,u.events.length-P,j.resolve(u.events.slice(P),u)),j.resolveTo&&(u.events=j.resolveTo(u.events,u))}function I(){const j=m(),P=u.previous,L=u.currentConstruct,z=u.events.length,R=Array.from(l);return{from:z,restore:B};function B(){r=j,u.previous=P,u.currentConstruct=L,u.events.length=z,l=R,E()}}function E(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function OG(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(r,i)];else{if(a=e.slice(n,s),r>-1){const l=a[0];typeof l=="string"?a[0]=l.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function MG(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=` 538`;break}case-3:{a=`\r 539`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(i)}s=i===-2,r.push(a)}return r.join("")}function RG(e){const r={constructs:yD([PG,...(e||{}).extensions||[]]),content:s(Xq),defined:[],document:s(Zq),flow:s(xG),lazy:{},string:s(vG),text:s(_G)};return r;function s(i){return a;function a(l){return DG(r,i,l)}}}function LG(e){for(;!ED(e););return e}const MS=/[\0\t\n\r]/g;function FG(){let e=1,t="",n=!0,r;return s;function s(i,a,l){const c=[];let u,d,h,f,p;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),h=0,t="",n&&(i.charCodeAt(0)===65279&&h++,n=void 0);h<i.length;){if(MS.lastIndex=h,u=MS.exec(i),f=u&&u.index!==void 0?u.index:i.length,p=i.charCodeAt(f),!u){t=i.slice(h);break}if(p===10&&h===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<f&&(c.push(i.slice(h,f)),e+=f-h),p){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=f+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const BG=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function UG(e){return e.replace(BG,$G)}function $G(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return bD(n.slice(i?2:1),i?16:10)}return mw(n)||e}const jD={}.hasOwnProperty;function zG(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),HG(n)(LG(RG(n).document().write(FG()(e,t,!0))))}function HG(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(St),autolinkProtocol:I,autolinkEmail:I,atxHeading:i(nt),blockQuote:i(Ue),characterEscape:I,characterReference:I,codeFenced:i(ot),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(ot,a),codeText:i(Ye,a),codeTextData:I,data:I,codeFlowValue:I,definition:i(ae),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(Ge),hardBreakEscape:i(De),hardBreakTrailing:i(De),htmlFlow:i(Gt,a),htmlFlowData:I,htmlText:i(Gt,a),htmlTextData:I,image:i(Lt),label:a,link:i(St),listItem:i(Kt),listItemValue:f,listOrdered:i(rn,h),listUnordered:i(rn),paragraph:i(sn),reference:D,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(nt),strong:i(le),thematicBreak:i(It)},exit:{atxHeading:c(),atxHeadingSequence:T,autolink:c(),autolinkEmail:Pe,autolinkProtocol:Ie,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:ue,characterReference:Ne,codeFenced:c(w),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(g),codeText:c(R),codeTextData:E,data:E,definition:c(),definitionDestinationString:k,definitionLabelString:b,definitionTitleString:_,emphasis:c(),hardBreakEscape:c(P),hardBreakTrailing:c(P),htmlFlow:c(L),htmlFlowData:E,htmlText:c(z),htmlTextData:E,image:c(O),label:H,labelText:U,lineEnding:j,link:c(B),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:te,resourceDestinationString:A,resourceTitleString:q,resource:V,setextHeading:c(S),setextHeadingLineSequence:C,setextHeadingText:N,strong:c(),thematicBreak:c()}};AD(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let de={type:"root",children:[]};const Re={stack:[de],tokenStack:[],config:t,enter:l,exit:u,buffer:a,resume:d,data:n},Ve=[];let Je=-1;for(;++Je<Z.length;)if(Z[Je][1].type==="listOrdered"||Z[Je][1].type==="listUnordered")if(Z[Je][0]==="enter")Ve.push(Je);else{const Ft=Ve.pop();Je=s(Z,Ft,Je)}for(Je=-1;++Je<Z.length;){const Ft=t[Z[Je][0]];jD.call(Ft,Z[Je][1].type)&&Ft[Z[Je][1].type].call(Object.assign({sliceSerialize:Z[Je][2].sliceSerialize},Re),Z[Je][1])}if(Re.tokenStack.length>0){const Ft=Re.tokenStack[Re.tokenStack.length-1];(Ft[1]||RS).call(Re,void 0,Ft[0])}for(de.position={start:Ta(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ta(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Je=-1;++Je<t.transforms.length;)de=t.transforms[Je](de)||de;return de}function s(Z,de,Re){let Ve=de-1,Je=-1,Ft=!1,Et,fn,K,ge;for(;++Ve<=Re;){const Te=Z[Ve];switch(Te[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Te[0]==="enter"?Je++:Je--,ge=void 0;break}case"lineEndingBlank":{Te[0]==="enter"&&(Et&&!ge&&!Je&&!K&&(K=Ve),ge=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ge=void 0}if(!Je&&Te[0]==="enter"&&Te[1].type==="listItemPrefix"||Je===-1&&Te[0]==="exit"&&(Te[1].type==="listUnordered"||Te[1].type==="listOrdered")){if(Et){let lt=Ve;for(fn=void 0;lt--;){const bt=Z[lt];if(bt[1].type==="lineEnding"||bt[1].type==="lineEndingBlank"){if(bt[0]==="exit")continue;fn&&(Z[fn][1].type="lineEndingBlank",Ft=!0),bt[1].type="lineEnding",fn=lt}else if(!(bt[1].type==="linePrefix"||bt[1].type==="blockQuotePrefix"||bt[1].type==="blockQuotePrefixWhitespace"||bt[1].type==="blockQuoteMarker"||bt[1].type==="listItemIndent"))break}K&&(!fn||K<fn)&&(Et._spread=!0),Et.end=Object.assign({},fn?Z[fn][1].start:Te[1].end),Z.splice(fn||Ve,0,["exit",Et,Te[2]]),Ve++,Re++}if(Te[1].type==="listItemPrefix"){const lt={type:"listItem",_spread:!1,start:Object.assign({},Te[1].start),end:void 0};Et=lt,Z.splice(Ve,0,["enter",lt,Te[2]]),Ve++,Re++,K=void 0,ge=!0}}}return Z[de][1]._spread=Ft,Re}function i(Z,de){return Re;function Re(Ve){l.call(this,Z(Ve),Ve),de&&de.call(this,Ve)}}function a(){this.stack.push({type:"fragment",children:[]})}function l(Z,de,Re){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([de,Re||void 0]),Z.position={start:Ta(de.start),end:void 0}}function c(Z){return de;function de(Re){Z&&Z.call(this,Re),u.call(this,Re)}}function u(Z,de){const Re=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==Z.type&&(de?de.call(this,Z,Ve[0]):(Ve[1]||RS).call(this,Z,Ve[0]));else throw new Error("Cannot close `"+Z.type+"` ("+ch({start:Z.start,end:Z.end})+"): itâs not open");Re.position.end=Ta(Z.end)}function d(){return pw(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function f(Z){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function p(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.lang=Z}function m(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.meta=Z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.value=Z.replace(/(\r?\n|\r)$/g,"")}function b(Z){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=ti(this.sliceSerialize(Z)).toLowerCase()}function _(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.title=Z}function k(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.url=Z}function T(Z){const de=this.stack[this.stack.length-1];if(!de.depth){const Re=this.sliceSerialize(Z).length;de.depth=Re}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function C(Z){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function I(Z){const Re=this.stack[this.stack.length-1].children;let Ve=Re[Re.length-1];(!Ve||Ve.type!=="text")&&(Ve=Fn(),Ve.position={start:Ta(Z.start),end:void 0},Re.push(Ve)),this.stack.push(Ve)}function E(Z){const de=this.stack.pop();de.value+=this.sliceSerialize(Z),de.position.end=Ta(Z.end)}function j(Z){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=de.children[de.children.length-1];Re.position.end=Ta(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(I.call(this,Z),E.call(this,Z))}function P(){this.data.atHardBreak=!0}function L(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.value=Z}function z(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.value=Z}function R(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.value=Z}function B(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=de,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function O(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=de,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function U(Z){const de=this.sliceSerialize(Z),Re=this.stack[this.stack.length-2];Re.label=UG(de),Re.identifier=ti(de).toLowerCase()}function H(){const Z=this.stack[this.stack.length-1],de=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const Ve=Z.children;Re.children=Ve}
vendor: 4,338 bytes, lines 539-541
539else Re.alt=de}function A(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.url=Z}function q(){const Z=this.resume(),de=this.stack[this.stack.length-1];de.title=Z}function V(){this.data.inReference=void 0}function D(){this.data.referenceType="collapsed"}function te(Z){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=ti(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function J(Z){this.data.characterReferenceType=Z.type}function ue(Z){const de=this.sliceSerialize(Z),Re=this.data.characterReferenceType;let Ve;Re?(Ve=bD(de,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=mw(de);const Je=this.stack[this.stack.length-1];Je.value+=Ve}function Ne(Z){const de=this.stack.pop();de.position.end=Ta(Z.end)}function Ie(Z){E.call(this,Z);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(Z)}function Pe(Z){E.call(this,Z);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(Z)}function Ue(){return{type:"blockquote",children:[]}}function ot(){return{type:"code",lang:null,meta:null,value:""}}function Ye(){return{type:"inlineCode",value:""}}function ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ge(){return{type:"emphasis",children:[]}}function nt(){return{type:"heading",depth:0,children:[]}}function De(){return{type:"break"}}function Gt(){return{type:"html",value:""}}function Lt(){return{type:"image",title:null,url:"",alt:null}}function St(){return{type:"link",title:null,url:"",children:[]}}function rn(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Kt(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function sn(){return{type:"paragraph",children:[]}}function le(){return{type:"strong",children:[]}}function Fn(){return{type:"text",value:""}}function It(){return{type:"thematicBreak"}}}function Ta(e){return{line:e.line,column:e.column,offset:e.offset}}function AD(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?AD(e,r):WG(e,r)}}function WG(e,t){let n;for(n in t)if(jD.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function RS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ch({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ch({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ch({start:t.start,end:t.end})+") is still open")}function VG(e){const t=this;t.parser=n;function n(r){return zG(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qG(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function YG(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 540`}]}function GG(e,t){const n=t.value?t.value+` 541`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function KG(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QG(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XG(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Mu(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};
vendor: 5,931 bytes, lines 541-543
541return e.patch(t,u),e.applyData(t,u)}function JG(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZG(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ID(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function eK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ID(e,t);const s={src:Mu(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function tK(e,t){const n={src:Mu(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function nK(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function rK(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ID(e,t);const s={href:Mu(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function sK(e,t){const n={href:Mu(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function iK(e,t,n){const r=e.all(t),s=n?aK(n):PD(t),i={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const d=r[l];(s||l!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:` 542`}),d.type==="element"&&d.tagName==="p"&&!s?a.push(...d.children):a.push(d)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:` 543`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function aK(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=PD(n[r])}return t}function PD(e){const t=e.spread;return t??e.children.length>1}function oK(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const a=r[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function lK(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cK(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function uK(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dK(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Ci(t.children[1]),c=Tx(t.children[t.children.length-1]);l&&c&&(a.position={start:l,end:c}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}function hK(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,l=a?a.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const h=t.children[c],f={},p=a?a[c]:void 0;p&&(f.align=p);let m={type:"element",tagName:i,properties:f,children:[]};h&&(m.children=e.all(h),e.patch(h,m),m=e.applyData(h,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function fK(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const LS=9,FS=32;function pK(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(BS(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(BS(t.slice(s),s>0,!1)),i.join("")}function BS(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===LS||i===FS;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===LS||i===FS;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function mK(e,t){const n={type:"text",value:pK(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gK(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const xK={blockquote:qG,break:YG,code:GG,delete:KG,emphasis:QG,footnoteReference:XG,heading:JG,html:ZG,imageReference:eK,image:tK,inlineCode:nK,linkReference:rK,link:sK,listItem:iK,list:oK,paragraph:lK,root:cK,strong:uK,table:dK,tableCell:fK,tableRow:hK,text:mK,thematicBreak:gK,toml:Sp,yaml:Sp,definition:Sp,footnoteDefinition:Sp};function Sp(){}const DD=-1,jx=0,dh=1,wg=2,xw=3,yw=4,bw=5,vw=6,OD=7,MD=8,yK=typeof self=="object"?self:globalThis,US=(e,t)=>
vendor: 5,712 bytes, lines 543-545
543{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new yK[e](t)},bK=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=t[s];switch(i){case jx:case DD:return n(a,s);case dh:{const l=n([],s);for(const c of a)l.push(r(c));return l}case wg:{const l=n({},s);for(const[c,u]of a)l[r(c)]=r(u);return l}case xw:return n(new Date(a),s);case yw:{const{source:l,flags:c}=a;return n(new RegExp(l,c),s)}case bw:{const l=n(new Map,s);for(const[c,u]of a)l.set(r(c),r(u));return l}case vw:{const l=n(new Set,s);for(const c of a)l.add(r(c));return l}case OD:{const{name:l,message:c}=a;return n(US(l,c),s)}case MD:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:l}=new Uint8Array(a);return n(new DataView(l),a)}}return n(US(i,a),s)};return r},$S=e=>bK(new Map,e)(0),$l="",{toString:vK}={},{keys:_K}=Object,fd=e=>{const t=typeof e;if(t!=="object"||!e)return[jx,t];const n=vK.call(e).slice(8,-1);switch(n){case"Array":return[dh,$l];case"Object":return[wg,$l];case"Date":return[xw,$l];case"RegExp":return[yw,$l];case"Map":return[bw,$l];case"Set":return[vw,$l];case"DataView":return[dh,n]}return n.includes("Array")?[dh,n]:n.includes("Error")?[OD,n]:[wg,n]},Cp=([e,t])=>e===jx&&(t==="function"||t==="symbol"),wK=(e,t,n,r)=>{const s=(a,l)=>{const c=r.push(a)-1;return n.set(l,c),c},i=a=>{if(n.has(a))return n.get(a);let[l,c]=fd(a);switch(l){case jx:{let d=a;switch(c){case"bigint":l=MD,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return s([DD],a)}return s([l,d],a)}case dh:{if(c){let f=a;return c==="DataView"?f=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(a)),s([c,[...f]],a)}const d=[],h=s([l,d],a);for(const f of a)d.push(i(f));return h}case wg:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const d=[],h=s([l,d],a);for(const f of _K(a))(e||!Cp(fd(a[f])))&&d.push([i(f),i(a[f])]);return h}case xw:return s([l,a.toISOString()],a);case yw:{const{source:d,flags:h}=a;return s([l,{source:d,flags:h}],a)}case bw:{const d=[],h=s([l,d],a);for(const[f,p]of a)(e||!(Cp(fd(f))||Cp(fd(p))))&&d.push([i(f),i(p)]);return h}case vw:{const d=[],h=s([l,d],a);for(const f of a)(e||!Cp(fd(f)))&&d.push(i(f));return h}}const{message:u}=a;return s([l,{name:c,message:u}],a)};return i},zS=(e,{json:t,lossy:n}={})=>{const r=[];return wK(!(t||n),!!t,new Map,r)(e),r},fu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$S(zS(e,t)):structuredClone(e):(e,t)=>$S(zS(e,t));function EK(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function NK(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kK(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||EK,r=e.options.footnoteBackLabel||NK,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const d=e.all(u),h=String(u.identifier).toUpperCase(),f=Mu(h.toLowerCase());let p=0;const m=[],x=e.footnoteCounts.get(h);for(;x!==void 0&&++p<=x;){m.length>0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(c,p);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,p),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const w=d[d.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const b=w.children[w.children.length-1];b&&b.type==="text"?b.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...m)}else d.push(...m);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(d,!0)};e.patch(u,g),l.push(g)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...fu(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` 544`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 545`}]}}const Ax=function(e){if(e==null)return jK;if(typeof e=="function")return Ix(e);if(typeof e=="object")return Array.isArray(e)?TK(e):SK(e);if(typeof e=="string")return CK(e);throw new Error("Expected function, string, or object as test")};function TK(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ax(e[n]);return Ix(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function SK(e){const t=e;return Ix(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function CK(e){return Ix(t);function t(n){return n&&n.type===e}}function Ix(e){return t;function t(n,r,s){return!!(AK(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function jK(){return!0}function AK(e){return e!==null&&typeof e=="object"&&"type"in e}const RD=[],IK=!0,xv=!1,PK="skip";function LD(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=Ax(s),a=r?-1:1;l(e,void 0,[])();function l(c,u,d){const h=c&&typeof c=="object"?c:{};if(typeof h.type=="string"){const p=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;
vendor: 20,034 bytes, lines 545-549
545Object.defineProperty(f,"name",{value:"node ("+(c.type+(p?"<"+p+">":""))+")"})}return f;function f(){let p=RD,m,x,w;if((!t||i(c,u,d[d.length-1]||void 0))&&(p=DK(n(c,d)),p[0]===xv))return p;if("children"in c&&c.children){const g=c;if(g.children&&p[0]!==PK)for(x=(r?g.children.length:-1)+a,w=d.concat(g);x>-1&&x<g.children.length;){const b=g.children[x];if(m=l(b,x,w)(),m[0]===xv)return m;x=typeof m[1]=="number"?m[1]:x+a}}return p}}}function DK(e){return Array.isArray(e)?e:typeof e=="number"?[IK,e]:e==null?RD:[e]}function Px(e,t,n,r){let s,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,s=n):(i=t,a=n,s=r),LD(e,i,l,s);function l(c,u){const d=u[u.length-1],h=d?d.children.indexOf(c):void 0;return a(c,h,d)}}const yv={}.hasOwnProperty,OK={};function MK(e,t){const n=t||OK,r=new Map,s=new Map,i=new Map,a={...xK,...n.handlers},l={all:u,applyData:LK,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:a,one:c,options:n,patch:RK,wrap:BK};return Px(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const h=d.type==="definition"?r:s,f=String(d.identifier).toUpperCase();h.has(f)||h.set(f,d)}}),l;function c(d,h){const f=d.type,p=l.handlers[f];if(yv.call(l.handlers,f)&&p)return p(l,d,h);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in d){const{children:x,...w}=d,g=fu(w);return g.children=l.all(d),g}return fu(d)}return(l.options.unknownHandler||FK)(l,d,h)}function u(d){const h=[];if("children"in d){const f=d.children;let p=-1;for(;++p<f.length;){const m=l.one(f[p],d);if(m){if(p&&f[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=HS(m.value)),!Array.isArray(m)&&m.type==="element")){const x=m.children[0];x&&x.type==="text"&&(x.value=HS(x.value))}Array.isArray(m)?h.push(...m):h.push(m)}}}return h}}function RK(e,t){e.position&&(t.position=Eq(e))}function LK(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,fu(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function FK(e,t){const n=t.data||{},r="value"in t&&!(yv.call(n,"hProperties")||yv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BK(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 546`});++r<e.length;)r&&n.push({type:"text",value:` 547`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 548`}),n}function HS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function WS(e,t){const n=MK(e,t),r=n.one(e,void 0),s=kK(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` 549`},s),i}function UK(e,t){return e&&"run"in e?async function(n,r){const s=WS(n,{file:r,...t});await e.run(s,r)}:function(n,r){return WS(n,{file:r,...e||t})}}function VS(e){if(e)throw e}var im=Object.prototype.hasOwnProperty,FD=Object.prototype.toString,qS=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,GS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):FD.call(t)==="[object Array]"},KS=function(t){if(!t||FD.call(t)!=="[object Object]")return!1;var n=im.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&im.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var s;for(s in t);return typeof s>"u"||im.call(t,s)},QS=function(t,n){qS&&n.name==="__proto__"?qS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},XS=function(t,n){if(n==="__proto__")if(im.call(t,n)){if(YS)return YS(t,n).value}else return;return t[n]},$K=function e(){var t,n,r,s,i,a,l=arguments[0],c=1,u=arguments.length,d=!1;for(typeof l=="boolean"&&(d=l,l=arguments[1]||{},c=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});c<u;++c)if(t=arguments[c],t!=null)for(n in t)r=XS(l,n),s=XS(t,n),l!==s&&(d&&s&&(KS(s)||(i=GS(s)))?(i?(i=!1,a=r&&GS(r)?r:[]):a=r&&KS(r)?r:{},QS(l,{name:n,newValue:e(d,a,s)})):typeof s<"u"&&QS(l,{name:n,newValue:s}));return l};const fy=Lg($K);function bv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zK(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);l(null,...s);function l(c,...u){const d=e[++i];let h=-1;if(c){a(c);return}for(;++h<s.length;)(u[h]===null||u[h]===void 0)&&(u[h]=s[h]);s=u,d?HK(d,l)(...u):a(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function HK(e,t){let n;return r;function r(...a){const l=e.length>a.length;let c;l&&a.push(s);try{c=e.apply(this,a)}catch(u){const d=u;if(l&&n)throw d;return s(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...l){n||(n=!0,t(a,...l))}function i(a){s(null,a)}}const ui={basename:WK,dirname:VK,extname:qK,join:YK,sep:"/"};function WK(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Pf(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,l=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else a<0&&(i=!0,a=s+1),l>-1&&(e.codePointAt(s)===t.codePointAt(l--)?l<0&&(r=s):(l=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function VK(e){if(Pf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function qK(e){Pf(e);let t=e.length,n=-1,r=0,s=-1,i=0,a;for(;t--;){const l=e.codePointAt(t);if(l===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),l===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function YK(...e){let t=-1,n;for(;++t<e.length;)Pf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":GK(n)}function GK(e){Pf(e);const t=e.codePointAt(0)===47;let n=KK(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function KK(e,t){let n="",r=0,s=-1,i=0,a=-1,l,c;for(;++a<=e.length;){if(a<e.length)l=e.codePointAt(a);else{if(l===47)break;l=47}if(l===47){if(!(s===a-1||i===1))if(s!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=a,i=0;continue}}else if(n.length>0){n="",r=0,s=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),r=a-s-1;s=a,i=0}else l===46&&i>-1?i++:i=-1}return n}function Pf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QK={cwd:XK};function XK(){return"/"}function vv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function JK(e){if(typeof e=="string")e=new URL(e);else if(!vv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ZK(e)}function ZK(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const py=["history","path","basename","stem","extname","dirname"];class BD{constructor(t){let n;t?vv(t)?n={path:t}:typeof t=="string"||eQ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QK.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<py.length;){const i=py[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)py.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ui.basename(this.path):void 0}set basename(t){gy(t,"basename"),my(t,"basename"),this.path=ui.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ui.dirname(this.path):void 0}set dirname(t){JS(this.basename,"dirname"),this.path=ui.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ui.extname(this.path):void 0}set extname(t){if(my(t,"extname"),JS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ui.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vv(t)&&(t=JK(t)),gy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ui.basename(this.path,this.extname):void 0}set stem(t){gy(t,"stem"),my(t,"stem"),this.path=ui.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new kr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function my(e,t){if(e&&e.includes(ui.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ui.sep+"`")}function gy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function JS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function eQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const tQ=function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},nQ={}.hasOwnProperty;class _w extends tQ{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zK()}copy(){const t=new _w;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(fy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(by("data",this.frozen),this.namespace[t]=n,this):nQ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(by("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=jp(t),r=this.parser||this.Parser;return xy("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),xy("process",this.parser||this.Parser),yy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,a){const l=jp(t),c=r.parse(l);r.run(c,l,function(d,h,f){if(d||!h||!f)return u(d);const p=h,m=r.stringify(p,f);iQ(m)?f.value=m:f.result=m,u(d,f)});function u(d,h){d||!h?a(d):i?i(h):n(void 0,h)}}}processSync(t){let n=!1,r;return this.freeze(),xy("processSync",this.parser||this.Parser),yy("processSync",this.compiler||this.Compiler),this.process(t,s),eC("processSync","process",n),r;function s(i,a){n=!0,VS(i),r=a}}run(t,n,r){ZS(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,l){const c=jp(n);s.run(t,c,u);function u(d,h,f){const p=h||t;d?l(d):a?a(p):r(void 0,p,f)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),eC("runSync","run",r),s;function i(a,l){VS(a),s=l,r=!0}}stringify(t,n){this.freeze();const r=jp(n),s=this.compiler||this.Compiler;return yy("stringify",s),ZS(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(by("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...h]=u;c(d,h)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(s.settings=fy(!0,s.settings,u.settings))}function l(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const h=u[d];i(h)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,d){let h=-1,f=-1;for(;++h<r.length;)if(r[h][0]===u){f=h;break}if(f===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const x=r[f][1];bv(x)&&bv(p)&&(p=fy(!0,x,p)),r[f]=[u,p,...m]}}}}const rQ=new _w().freeze();function xy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function by(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZS(e){if(!bv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function jp(e){return sQ(e)?e:new BD(e)}function sQ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function iQ(e){return typeof e=="string"||aQ(e)}function aQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tC=[],nC={allowDangerousHtml:!0},lQ=/^(https?|ircs?|mailto|xmpp)$/i,cQ=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function mo(e){const t=uQ(e),n=dQ(e);return hQ(t.runSync(t.parse(n),n),e)}function uQ(e){const t=e.rehypePlugins||tC,n=e.remarkPlugins||tC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...nC}:nC;return rQ().use(VG).use(n).use(UK,r).use(t)}function dQ(e){const t=e.children||"",n=new BD;return typeof t=="string"&&(n.value=t),n}function hQ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,i=t.disallowedElements,a=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||fQ;for(const d of cQ)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+oQ+d.id,void 0);return Px(e,u),Cq(e,{Fragment:o.Fragment,components:s,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function u(d,h,f){if(d.type==="raw"&&f&&typeof h=="number")return a?f.children.splice(h,1):f.children[h]={type:"text",value:d.value},h;if(d.type==="element"){let p;for(p in uy)if(Object.hasOwn(uy,p)&&Object.hasOwn(d.properties,p)){const m=d.properties[p],x=uy[p];(x===null||x.includes(d.tagName))&&(d.properties[p]=c(String(m||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):i?i.includes(d.tagName):!1;if(!p&&r&&typeof h=="number"&&(p=!r(d,h,f)),p&&f&&typeof h=="number")return l&&d.children?f.children.splice(h,1,...d.children):f.children.splice(h,1),h}}}function fQ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||lQ.test(e.slice(0,t))?e:""}function rC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function pQ(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mQ(e,t,n){const s=Ax((n||{}).ignore||[]),i=gQ(t);let a=-1;for(;++a<i.length;)LD(e,"text",l);function l(u,d){let h=-1,f;for(;++h<d.length;){const p=d[h],m=f?f.children:void 0;if(s(p,m?m.indexOf(p):void 0,f))return;f=p}if(f)return c(u,d)}function c(u,d){const h=d[d.length-1],f=i[a][0],p=i[a][1];let m=0;const w=h.children.indexOf(u);let g=!1,b=[];f.lastIndex=0;let _=f.exec(u.value);for(;_;){const k=_.index,T={index:_.index,input:_.input,stack:[...d,u]};let N=p(..._,T);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?f.lastIndex=k+1:(m!==k&&b.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(N)?b.push(...N):N&&b.push(N),m=k+_[0].length,g=!0),!f.global)break;_=f.exec(u.value)}return g?(m<u.value.length&&b.push({type:"text",value:u.value.slice(m)}),h.children.splice(w,1,...b)):b=[u],w+b.length}}function gQ(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([xQ(s[0]),yQ(s[1])])}return t}function xQ(e){return typeof e=="string"?new RegExp(pQ(e),"g"):e}function yQ(e){return typeof e=="function"?e:function(){return e}}const vy="phrasing",_y=["autolink","link","image","label"];function bQ(){return{transforms:[TQ],enter:{literalAutolink:_Q,literalAutolinkEmail:wy,literalAutolinkHttp:wy,literalAutolinkWww:wy},exit:{literalAutolink:kQ,literalAutolinkEmail:NQ,literalAutolinkHttp:wQ,literalAutolinkWww:EQ}}}function vQ(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vy,notInConstruct:_y},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vy,notInConstruct:_y},{character:":",before:"[ps]",after:"\\/",inConstruct:vy,notInConstruct:_y}]}}function _Q(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wy(e){this.config.enter.autolinkProtocol.call(this,e)}function wQ(e){this.config.exit.autolinkProtocol.call(this,e)}function EQ(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function NQ(e){this.config.exit.autolinkEmail.call(this,e)}function kQ(e){this.exit(e)}function TQ(e){mQ(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SQ],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S}
549)([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CQ]],{ignore:["link","linkReference"]})}function SQ(e,t,n,r,s){let i="";if(!UD(s)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!jQ(n)))return!1;const a=AQ(n+r);if(!a[0])return!1;const l={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[l,{type:"text",value:a[1]}]:l}function CQ(e,t,n,r){return!UD(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jQ(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function AQ(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=rC(e,"(");let i=rC(e,")");for(;r!==-1&&s>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function UD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||El(n)||Sx(n))&&(!t||n!==47)}$D.peek=BQ;function IQ(){this.buffer()}function PQ(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function DQ(){this.buffer()}function OQ(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function MQ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RQ(e){this.exit(e)}function LQ(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ti(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FQ(e){this.exit(e)}function BQ(){return"["}function $D(e,t,n,r){const s=n.createTracker(r);let i=s.move("[^");const a=n.enter("footnoteReference"),l=n.enter("reference");return i+=s.move(n.safe(n.associationId(e),{after:"]",before:i})),l(),a(),i+=s.move("]"),i}function UQ(){return{enter:{gfmFootnoteCallString:IQ,gfmFootnoteCall:PQ,gfmFootnoteDefinitionLabelString:DQ,gfmFootnoteDefinition:OQ},exit:{gfmFootnoteCallString:MQ,gfmFootnoteCall:RQ,gfmFootnoteDefinitionLabelString:LQ,gfmFootnoteDefinition:FQ}}}function $Q(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:$D},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,i,a){const l=i.createTracker(a);let c=l.move("[^");const u=i.enter("footnoteDefinition"),d=i.enter("label");return c+=l.move(i.safe(i.associationId(r),{before:c,after:"]"})),d(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((t?` 550`:" ")+i.indentLines(i.containerFlow(r,l.current()),t?zD:zQ))),u(),c}}function zQ(e,t,n){return t===0?e:zD(e,t,n)}function zD(e,t,n){return(n?"":" ")+e}const HQ=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];HD.peek=GQ;function WQ(){return{canContainEols:["delete"],enter:{strikethrough:qQ},exit:{strikethrough:YQ}}}function VQ(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:HQ}],handlers:{delete:HD}}}function qQ(e){this.enter({type:"delete",children:[]},e)}function YQ(e){this.exit(e)}function HD(e,t,n,r){const s=n.createTracker(r),i=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function GQ(){return"~"}function KQ(e){return e.length}function QQ(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||KQ,i=[],a=[],l=[],c=[];let u=0,d=-1;for(;++d<e.length;){const x=[],w=[];let g=-1;for(e[d].length>u&&(u=e[d].length);++g<e[d].length;){const b=XQ(e[d][g]);if(n.alignDelimiters!==!1){const _=s(b);w[g]=_,(c[g]===void 0||_>c[g])&&(c[g]=_)}x.push(b)}a[d]=x,l[d]=w}let h=-1;if(typeof r=="object"&&"length"in r)for(;++h<u;)i[h]=sC(r[h]);else{const x=sC(r);for(;++h<u;)i[h]=x}h=-1;const f=[],p=[];for(;++h<u;){const x=i[h];let w="",g="";x===99?(w=":",g=":"):x===108?w=":":x===114&&(g=":");let b=n.alignDelimiters===!1?1:Math.max(1,c[h]-w.length-g.length);const _=w+"-".repeat(b)+g;n.alignDelimiters!==!1&&(b=w.length+b+g.length,b>c[h]&&(c[h]=b),p[h]=b),f[h]=_}a.splice(1,0,f),l.splice(1,0,p),d=-1;const m=[];for(;++d<a.length;){const x=a[d],w=l[d];h=-1;const g=[];for(;++h<u;){const b=x[h]||"";let _="",k="";if(n.alignDelimiters!==!1){const T=c[h]-(w[h]||0),N=i[h];N===114?_=" ".repeat(T):N===99?T%2?(_=" ".repeat(T/2+.5),k=" ".repeat(T/2-.5)):(_=" ".repeat(T/2),k=_):k=" ".repeat(T)}n.delimiterStart!==!1&&!h&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||h)&&g.push(" "),n.alignDelimiters!==!1&&g.push(_),g.push(b),n.alignDelimiters!==!1&&g.push(k),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||h!==u-1)&&g.push("|")}m.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return m.join(` 551`)}function XQ(e){return e==null?"":String(e)}function sC(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const iC={}.hasOwnProperty;function WD(e,t){const n=t||{};
vendor: 6,946 bytes, lines 551-562
551function r(s,...i){let a=r.invalid;const l=r.handlers;if(s&&iC.call(s,e)){const c=String(s[e]);a=iC.call(l,c)?l[c]:r.unknown}if(a)return a.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}function JQ(e,t,n,r){const s=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),ZQ);return s(),a}function ZQ(e,t,n){return">"+(n?"":" ")+e}function eX(e,t){return aC(e,t.inConstruct,!0)&&!aC(e,t.notInConstruct,!1)}function aC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function oC(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===` 552`&&eX(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\ 553`}function tX(e,t){const n=String(e);let r=n.indexOf(t),s=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++i>a&&(a=i):i=1,s=r+t.length,r=n.indexOf(t,s);return a}function nX(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function rX(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function sX(e,t,n,r){const s=rX(n),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(nX(e,n)){const h=n.enter("codeIndented"),f=n.indentLines(i,iX);return h(),f}const l=n.createTracker(r),c=s.repeat(Math.max(tX(i,s)+1,3)),u=n.enter("codeFenced");let d=l.move(c);if(e.lang){const h=n.enter(`codeFencedLang${a}`);d+=l.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...l.current()})),h()}if(e.lang&&e.meta){const h=n.enter(`codeFencedMeta${a}`);d+=l.move(" "),d+=l.move(n.safe(e.meta,{before:d,after:` 554`,encode:["`"],...l.current()})),h()}return d+=l.move(` 555`),i&&(d+=l.move(i+` 556`)),d+=l.move(c),u(),d}function iX(e,t,n){return(n?"":" ")+e}function ww(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function aX(e,t,n,r){const s=ww(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":` 557`,...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),a(),u}function oX(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ef(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Eg(e,t,n){const r=hu(e),s=hu(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}VD.peek=lX;function VD(e,t,n,r){const s=oX(n),i=n.enter("emphasis"),a=n.createTracker(r),l=a.move(s);let c=a.move(n.containerPhrasing(e,{after:s,before:l,...a.current()}));const u=c.charCodeAt(0),d=Eg(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=ef(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=Eg(r.after.charCodeAt(0),h,s);f.inside&&(c=c.slice(0,-1)+ef(h));const p=a.move(s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+p}function lX(e,t,n){return n.options.emphasis||"*"}function cX(e,t){let n=!1;return Px(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,xv}),!!((!e.depth||e.depth<3)&&pw(e)&&(t.options.setext||n))}function uX(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(cX(e,n)){const d=n.enter("headingSetext"),h=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:` 558`,after:` 559`});return h(),d(),f+` 560`+(s===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(` 561`))+1))}const a="#".repeat(s),l=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:` 562`,...i.current()});return/^[\t ]/.test(u)&&(u=ef(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),l(),u}qD.peek=dX;function qD(e){return e.value||""}function dX(){return"<"}YD.peek=hX;function YD(e,t,n,r){const s=ww(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let l=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(l=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),l()),u+=c.move(")"),a(),u}function hX(){return"!"}GD.peek=fX;function GD(e,t,n,r){const s=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("![");const u=n.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,i(),s==="full"||!u||u!==h?c+=l.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function fX(){return"!"}KD.peek=pX;function KD(e,t,n){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],l=n.compilePattern(a);let c;if(a.atBreak)for(;c=l.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return s+r+s}function pX(){return"`"}function QD(e,t){const n=pw(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}XD.peek=mX;function XD(e,t,n,r){const s=ww(n),i=s==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let l,c;if(QD(e,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let h=a.move("<");return h+=a.move(n.containerPhrasing(e,{before:h,after:">",...a.current()})),h+=a.move(">
562"),l(),n.stack=d,h}l=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(n.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),l(),u}function mX(e,t,n){return QD(e,n)?"<":"["}JD.peek=gX;function JD(e,t,n,r){const s=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const l=n.createTracker(r);let c=l.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const h=n.safe(n.associationId(e),{before:c,after:"]",...l.current()});return a(),n.stack=d,i(),s==="full"||!u||u!==h?c+=l.move(h+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function gX(){return"["}function Ew(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function xX(e){const t=Ew(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function yX(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ZD(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function bX(e,t,n,r){const s=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?yX(n):Ew(n);const l=e.ordered?a==="."?")":".":xX(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ZD(n)===a&&d){let h=-1;for(;++h<e.children.length;){const f=e.children[h];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=l),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,s(),u}function vX(e){const t=e.options.listItemIndent||"one";
vendor: 5,809 bytes, lines 562-564
562if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function _X(e,t,n,r){const s=vX(n);let i=n.bulletCurrent||Ew(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const l=n.createTracker(r);l.move(i+" ".repeat(a-i.length)),l.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,l.current()),d);return c(),u;function d(h,f,p){return f?(p?"":" ".repeat(a))+h:(p?i:i+" ".repeat(a-i.length))+h}}function wX(e,t,n,r){const s=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),s(),a}const EX=Ax(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function NX(e,t,n,r){return(e.children.some(function(a){return EX(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function kX(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}eO.peek=TX;function eO(e,t,n,r){const s=kX(n),i=n.enter("strong"),a=n.createTracker(r),l=a.move(s+s);let c=a.move(n.containerPhrasing(e,{after:s,before:l,...a.current()}));const u=c.charCodeAt(0),d=Eg(r.before.charCodeAt(r.before.length-1),u,s);d.inside&&(c=ef(u)+c.slice(1));const h=c.charCodeAt(c.length-1),f=Eg(r.after.charCodeAt(0),h,s);f.inside&&(c=c.slice(0,-1)+ef(h));const p=a.move(s+s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:d.outside},l+c+p}function TX(e,t,n){return n.options.strong||"*"}function SX(e,t,n,r){return n.safe(e.value,r)}function CX(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jX(e,t,n){const r=(ZD(n)+(n.options.ruleSpaces?" ":"")).repeat(CX(n));return n.options.ruleSpaces?r.slice(0,-1):r}const tO={blockquote:JQ,break:oC,code:sX,definition:aX,emphasis:VD,hardBreak:oC,heading:uX,html:qD,image:YD,imageReference:GD,inlineCode:KD,link:XD,linkReference:JD,list:bX,listItem:_X,paragraph:wX,root:NX,strong:eO,text:SX,thematicBreak:jX};function AX(){return{enter:{table:IX,tableData:lC,tableHeader:lC,tableRow:DX},exit:{codeText:OX,table:PX,tableData:Ey,tableHeader:Ey,tableRow:Ey}}}function IX(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function PX(e){this.exit(e),this.data.inTable=void 0}function DX(e){this.enter({type:"tableRow",children:[]},e)}function Ey(e){this.exit(e)}function lC(e){this.enter({type:"tableCell",children:[]},e)}function OX(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,MX));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function MX(e,t){return t==="|"?t:e}function RX(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` 563`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:c,tableRow:l}};function a(p,m,x,w){return u(d(p,x,w),p.align)}function l(p,m,x,w){const g=h(p,x,w),b=u([g]);return b.slice(0,b.indexOf(` 564`))}function c(p,m,x,w){const g=x.enter("tableCell"),b=x.enter("phrasing"),_=x.containerPhrasing(p,{...w,before:i,after:i});return b(),g(),_}function u(p,m){return QQ(p,{align:m,alignDelimiters:r,padding:n,stringLength:s})}function d(p,m,x){const w=p.children;let g=-1;const b=[],_=m.enter("table");for(;++g<w.length;)b[g]=h(w[g],m,x);return _(),b}function h(p,m,x){const w=p.children;let g=-1;const b=[],_=m.enter("tableRow");for(;++g<w.length;)b[g]=c(w[g],p,m,x);return _(),b}function f(p,m,x){let w=tO.inlineCode(p,m,x);return x.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function LX(){return{exit:{taskListCheckValueChecked:cC,taskListCheckValueUnchecked:cC,paragraph:BX}}}function FX(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UX}}}function cC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BX(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let i=-1,a;for(;++i<s.length;){const l=s[i];if(l.type==="paragraph"){a=l;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function UX(e,t,n,r){const s=e.children[0],i=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);i&&l.move(a);let c=tO.listItem(e,t,n,{...r,...l.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(d){return d+a}}function $X(){return[bQ(),UQ(),WQ(),AX(),LX()]}function zX(e){return{extensions:[vQ(),$Q(e),VQ(),RX(e),FX()]}}const HX={tokenize:KX,partial:!0},nO={tokenize:QX,partial:!0},rO={tokenize:XX,partial:!0},sO={tokenize:JX,partial:!0},WX={tokenize:ZX,partial:!0},iO={name:"wwwAutolink",tokenize:YX,previous:oO},aO={name:"protocolAutolink",tokenize:GX,previous:lO}
vendor: 9,458 bytes, line 564
564,xa={name:"emailAutolink",tokenize:qX,previous:cO},ji={};function VX(){return{text:ji}}let Do=48;for(;Do<123;)ji[Do]=xa,Do++,Do===58?Do=65:Do===91&&(Do=97);ji[43]=xa;ji[45]=xa;ji[46]=xa;ji[95]=xa;ji[72]=[xa,aO];ji[104]=[xa,aO];ji[87]=[xa,iO];ji[119]=[xa,iO];function qX(e,t,n){const r=this;let s,i;return a;function a(h){return!_v(h)||!cO.call(r,r.previous)||Nw(r.events)?n(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(h))}function l(h){return _v(h)?(e.consume(h),l):h===64?(e.consume(h),c):n(h)}function c(h){return h===46?e.check(WX,d,u)(h):h===45||h===95||_r(h)?(i=!0,e.consume(h),c):d(h)}function u(h){return e.consume(h),s=!0,c}function d(h){return i&&s&&Dr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(h)):n(h)}}function YX(e,t,n){const r=this;return s;function s(a){return a!==87&&a!==119||!oO.call(r,r.previous)||Nw(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(HX,e.attempt(nO,e.attempt(rO,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function GX(e,t,n){const r=this;let s="",i=!1;return a;function a(h){return(h===72||h===104)&&lO.call(r,r.previous)&&!Nw(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(h),e.consume(h),l):n(h)}function l(h){if(Dr(h)&&s.length<5)return s+=String.fromCodePoint(h),e.consume(h),l;if(h===58){const f=s.toLowerCase();if(f==="http"||f==="https")return e.consume(h),c}return n(h)}function c(h){return h===47?(e.consume(h),i?u:(i=!0,c)):n(h)}function u(h){return h===null||_g(h)||Pt(h)||El(h)||Sx(h)?n(h):e.attempt(nO,e.attempt(rO,d),n)(h)}function d(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(h)}}function KX(e,t,n){let r=0;return s;function s(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),s):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function QX(e,t,n){let r,s,i;return a;function a(u){return u===46||u===95?e.check(sO,c,l)(u):u===null||Pt(u)||El(u)||u!==45&&Sx(u)?c(u):(i=!0,e.consume(u),a)}function l(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),a}function c(u){return s||r||!i?n(u):t(u)}}function XX(e,t){let n=0,r=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(sO,t,i)(a):a===null||Pt(a)||El(a)?t(a):(e.consume(a),s)}function i(a){return a===41&&r++,e.consume(a),s}}function JX(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),i):l===93?(e.consume(l),s):l===60||l===null||Pt(l)||El(l)?t(l):n(l)}function s(l){return l===null||l===40||l===91||Pt(l)||El(l)?t(l):r(l)}function i(l){return Dr(l)?a(l):n(l)}function a(l){return l===59?(e.consume(l),r):Dr(l)?(e.consume(l),a):n(l)}}function ZX(e,t,n){return r;function r(i){return e.consume(i),s}function s(i){return _r(i)?n(i):t(i)}}function oO(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pt(e)}function lO(e){return!Dr(e)}function cO(e){return!(e===47||_v(e))}function _v(e){return e===43||e===45||e===46||e===95||_r(e)}function Nw(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const eJ={tokenize:lJ,partial:!0};function tJ(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:iJ,continuation:{tokenize:aJ},exit:oJ}},text:{91:{name:"gfmFootnoteCall",tokenize:sJ},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nJ,resolveTo:rJ}}}}function nJ(e,t,n){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!a||!a._balanced)return n(c);const u=ti(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function rJ(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function sJ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return l;function l(h){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),c}function c(h){return h!==94?n(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(h){if(i>999||h===93&&!a||h===null||h===91||Pt(h))return n(h);if(h===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return s.includes(ti(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(h)}return Pt(h)||(a=!0),i++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),i++,u):u(h)}}function iJ(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,l;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(a>999||m===93&&!l||m===null||m===91||Pt(m))return n(m);if(m===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return i=ti(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Pt(m)||(l=!0),a++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),s.includes(i)||s.push(i),pt(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function aJ(e,t,n){return e.check(If,t,e.attempt(eJ,t,n))}function oJ(e){e.exit("gfmFootnoteDefinition")}function lJ(e,t,n){const r=this;return pt(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function cJ(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,l){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},h={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},f=[["enter",d,l],["enter",a[u][1],l],["exit",a[u][1],l],["enter",h,l]],p=l.parser.constructs.insideSpan.null;p&&ds(f,f.length,0,Cx(p,a.slice(u+1,c),l)),ds(f,f.length,0,[["exit",h,l],["enter",a[c][1],l],["exit",a[c][1],l],["exit",d,l]]),ds(a,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,l,c){const u=this.previous,d=this.events;let h=0;return f;function f(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?c(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const x=hu(u);if(m===126)return h>1?c(m):(a.consume(m),h++,p);if(h<2&&!n)return c(m);const w=a.exit("strikethroughSequenceTemporary"),g=hu(m);return w._open=!g||g===2&&!!x,w._close=!x||x===2&&!!g,l(m)}}}class uJ{constructor(){this.map=[]}add(t,n,r){dJ(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];
vendor: 5,153 bytes, line 564
564r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const i of s)t.push(i);s=r.pop()}this.map.length=0}}function dJ(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function hJ(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function fJ(){return{flow:{null:{name:"table",tokenize:pJ,resolveAll:mJ}}}}function pJ(e,t,n){const r=this;let s=0,i=0,a;return l;function l(E){let j=r.events.length-1;for(;j>-1;){const z=r.events[j][1].type;if(z==="lineEnding"||z==="linePrefix")j--;else break}const P=j>-1?r.events[j][1].type:null,L=P==="tableHead"||P==="tableRow"?N:c;return L===N&&r.parser.lazy[r.now().line]?n(E):L(E)}function c(E){return e.enter("tableHead"),e.enter("tableRow"),u(E)}function u(E){return E===124||(a=!0,i+=1),d(E)}function d(E){return E===null?n(E):$e(E)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):n(E):it(E)?pt(e,d,"whitespace")(E):(i+=1,a&&(a=!1,s+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),h(E)))}function h(E){return E===null||E===124||Pt(E)?(e.exit("data"),d(E)):(e.consume(E),E===92?f:h)}function f(E){return E===92||E===124?(e.consume(E),h):h(E)}function p(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),a=!1,it(E)?pt(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):m(E))}function m(E){return E===45||E===58?w(E):E===124?(a=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),x):T(E)}function x(E){return it(E)?pt(e,w,"whitespace")(E):w(E)}function w(E){return E===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),g):E===45?(i+=1,g(E)):E===null||$e(E)?k(E):T(E)}function g(E){return E===45?(e.enter("tableDelimiterFiller"),b(E)):T(E)}function b(E){return E===45?(e.consume(E),b):E===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),_):(e.exit("tableDelimiterFiller"),_(E))}function _(E){return it(E)?pt(e,k,"whitespace")(E):k(E)}function k(E){return E===124?m(E):E===null||$e(E)?!a||s!==i?T(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):T(E)}function T(E){return n(E)}function N(E){return e.enter("tableRow"),C(E)}function C(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),C):E===null||$e(E)?(e.exit("tableRow"),t(E)):it(E)?pt(e,C,"whitespace")(E):(e.enter("data"),S(E))}function S(E){return E===null||E===124||Pt(E)?(e.exit("data"),C(E)):(e.consume(E),E===92?I:S)}function I(E){return E===92||E===124?(e.consume(E),S):S(E)}}function mJ(e,t){let n=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],l=!1,c=0,u,d,h;const f=new uJ;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(l=!1,c!==0&&(uC(f,t,c,u,d),d=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,h=void 0,i=[0,0,0,0],a=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",d,t]])),s=m.type==="tableDelimiterRow"?2:d?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],h=Ap(f,t,i,s,void 0,h),i=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],h=Ap(f,t,i,s,void 0,h)),i=a,a=[i[1],n,0,0])):m.type==="tableHead"?(l=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],h=Ap(f,t,i,s,n,h)):a[1]!==0&&(h=Ap(f,t,a,s,n,h)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&uC(f,t,c,u,d),f.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=hJ(t.events,n))}return e}function Ap(e,t,n,r,s,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(i.end=Object.assign({},Jl(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=Jl(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=Jl(t.events,n[2]),d=Jl(t.events,n[3]),h={type:l,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",h,t]]),r!==2){const f=t.events[n[2]],p=t.events[n[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,x=n[3]-n[2]-1;e.add(m,x,[])}}e.add(n[3]+1,0,[["exit",h,t]])}return s!==void 0&&(i.end=Object.assign({},Jl(t.events,s)),e.add(s,0,[["exit",i,t]]),i=void 0),i}
vendor: 18,468 bytes, lines 564-565
564function uC(e,t,n,r,s){const i=[],a=Jl(t.events,n);s&&(s.end=Object.assign({},a),i.push(["exit",s,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function Jl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gJ={name:"tasklistCheck",tokenize:yJ};function xJ(){return{text:{91:gJ}}}function yJ(e,t,n){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Pt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(c)}function l(c){return $e(c)?t(c):it(c)?e.check({tokenize:bJ},t,n)(c):n(c)}}function bJ(e,t,n){return pt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function vJ(e){return yD([VX(),tJ(),cJ(e),fJ(),xJ()])}const _J={};function Dx(e){const t=this,n=e||_J,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(vJ(n)),i.push($X()),a.push(zX(n))}const dC=/[#.]/g;function wJ(e,t){const n=e||"",r={};let s=0,i,a;for(;s<n.length;){dC.lastIndex=s;const l=dC.exec(n),c=n.slice(s,l?l.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:a=c,s+=c.length),l&&(i=l[0],s++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function uO(e,t,n){const r=n?TJ(n):void 0;function s(i,a,...l){let c;if(i==null){c={type:"root",children:[]};const u=a;l.unshift(u)}else{c=wJ(i,t);const u=c.tagName.toLowerCase(),d=r?r.get(u):void 0;if(c.tagName=d||u,EJ(a))l.unshift(a);else for(const[h,f]of Object.entries(a))NJ(e,c.properties,h,f)}for(const u of l)wv(c.children,u);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return s}function EJ(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const i=s;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function NJ(e,t,n,r){const s=Nx(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?s.spaceSeparated?i=yS(r):s.commaSeparated?i=fS(r):s.commaOrSpaceSeparated?i=yS(fS(r).join(" ")):i=hC(s,s.property,r):Array.isArray(r)?i=[...r]:i=s.property==="style"?kJ(r):String(r);if(Array.isArray(i)){const a=[];for(const l of i)a.push(hC(s,s.property,l));i=a}s.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[s.property]=i}}function wv(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)wv(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?wv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function hC(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Jh(n)===Jh(t)))return!0}return n}function kJ(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function TJ(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const SJ=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],CJ=uO(Af,"div"),jJ=uO(No,"g",SJ);function AJ(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let l=n[a];if(l===void 0){const c=fC(t,n[a-1]);l=c===-1?t.length+1:c+1,n[a]=l}if(l>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function s(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const l=n[n.length-1],c=fC(t,l),u=c===-1?t.length+1:c+1;if(l===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function fC(e,t){const n=e.indexOf("\r",t),r=e.indexOf(` 565`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},dO={}.hasOwnProperty,IJ=Object.prototype;function PJ(e,t){const n=t||{};return kw({file:n.file||void 0,location:!1,schema:n.space==="svg"?No:Af,verbose:n.verbose||!1},e)}function kw(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},am(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:hO(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const i=String(e.file),a=AJ(i),l=a.toPoint(0),c=a.toPoint(i.length);n.position={start:l,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},am(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},am(e,r,n),n}default:return n=DJ(e,t),n}}function hO(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=kw(e,t[n]);r.push(s)}return r}function DJ(e,t){const n=e.schema;e.schema=t.namespaceURI===Xo.svg?No:Af;let r=-1;const s={};for(;++r<t.attrs.length;){const l=t.attrs[r],c=(l.prefix?l.prefix+":":"")+l.name;dO.call(IJ,c)||(s[c]=l.value)}const a=(e.schema.space==="svg"?jJ:CJ)(t.tagName,s,hO(e,t.childNodes));if(am(e,t,a),a.tagName==="template"){const l=t,c=l.sourceCodeLocation,u=c&&c.startTag&&vc(c.startTag),d=c&&c.endTag&&vc(c.endTag),h=kw(e,l.content);u&&d&&e.file&&(h.position={start:u.end,end:d.start}),a.content=h}return e.schema=n,a}function am(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=OJ(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function OJ(e,t,n){const r=vc(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)dO.call(n.attrs,a)&&(i[Nx(e.schema,a).property]=vc(n.attrs[a]));n.startTag;const l=vc(n.startTag),c=n.endTag?vc(n.endTag):void 0,u={opening:l};c&&(u.closing=c),u.properties=i,t.data={position:u}}}return r}function vc(e){const t=pC({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=pC({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function pC(e){return e.line&&e.column?e:void 0}const MJ={},RJ={}.hasOwnProperty,fO=WD("type",{handlers:{root:FJ,element:HJ,text:$J,comment:zJ,doctype:UJ}});function LJ(e,t){const r=(t||MJ).space;return fO(e,r==="svg"?No:Af)}function FJ(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Tw(e.children,n,t),Ru(e,n),n}function BJ(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Tw(e.children,n,t),Ru(e,n),n}function UJ(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ru(e,t),t}function $J(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ru(e,t),t}function zJ(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ru(e,t),t}function HJ(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=No);const s=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&RJ.call(e.properties,i)){const c=WJ(r,i,e.properties[i]);c&&s.push(c)}}const a=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Xo[a],childNodes:[],parentNode:null};return l.childNodes=Tw(e.children,l,r),Ru(e,l),e.tagName==="template"&&e.content&&(l.content=BJ(e.content,r)),l}function WJ(e,t,n){const r=Nx(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?rD(n):dD(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=s.name.indexOf(":");i<0?s.prefix="":(s.name=s.name.slice(i+1),s.prefix=r.attribute.slice(0,i)),s.namespace=Xo[r.space]}return s}function Tw(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const i=fO(e[r],n);i.parentNode=t,s.push(i)}return s}function Ru(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const VJ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],qJ=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Jt="�";var M;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(M||(M={}));const Ur={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function pO(e){return e>=55296&&e<=57343}function YJ(e){return e>=56320&&e<=57343}function GJ(e,t){return(e-55296)*1024+9216+t}function mO(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function gO(e){return e>=64976&&e<=65007||qJ.has(e)}var ee;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ee||(ee={}));const KJ=65536;class QJ{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=KJ,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:i}=this,a=s+n,l=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(YJ(n))return this.pos++,this._addGap(),GJ(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,M.EOF;return this._err(ee.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,M.EOF;const r=this.html.charCodeAt(n);return r===M.CARRIAGE_RETURN?M.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,M.EOF;let t=this.html.charCodeAt(this.pos);return t===M.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,M.LINE_FEED):t===M.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,pO(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===M.LINE_FEED||t===M.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){mO(t)?this._err(ee.controlCharacterInInputStream):gO(t)&&this._err(ee.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var tt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(tt||(tt={}));function xO(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const XJ=new Uint16Array('
vendor: 16,129 bytes, line 565
565áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 565
565ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 565
565astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
565'.split("").map(e=>e.charCodeAt(0))),JJ=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function ZJ(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=JJ.get(e))!==null&&t!==void 0?t:e}var Jn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Jn||(Jn={}));const eZ=32;var Xa;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Xa||(Xa={}));function Ev(e){return e>=Jn.ZERO&&e<=Jn.NINE}function tZ(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_F||e>=Jn.LOWER_A&&e<=Jn.LOWER_F}function nZ(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_Z||e>=Jn.LOWER_A&&e<=Jn.LOWER_Z||Ev(e)}function rZ(e){return e===Jn.EQUALS||nZ(e)}var Kn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Kn||(Kn={}));var Gi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Gi||(Gi={}));class sZ{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Kn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Gi.Strict}startEntity(t){this.decodeMode=t,this.state=Kn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Kn.EntityStart:return t.charCodeAt(n)===Jn.NUM?(this.state=Kn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Kn.NamedEntity,this.stateNamedEntity(t,n));case Kn.NumericStart:return this.stateNumericStart(t,n);case Kn.NumericDecimal:return this.stateNumericDecimal(t,n);case Kn.NumericHex:return this.stateNumericHex(t,n);case Kn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|eZ)===Jn.LOWER_X?(this.state=Kn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Kn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const i=r-n;this.result=this.result*Math.pow(s,i)+Number.parseInt(t.substr(n,i),s),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Ev(s)||tZ(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Ev(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Jn.SEMI)this.consumed+=1;else if(this.decodeMode===Gi.Strict)return 0;return this.emitCodePoint(ZJ(this.result),this.consumed),this.errors&&(t!==Jn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],i=(s&Xa.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=iZ(r,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Gi.Attribute&&(i===0||rZ(a))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],i=(s&Xa.VALUE_LENGTH)>>14,i!==0){if(a===Jn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Gi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&Xa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Xa.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Kn.NamedEntity:return this.result!==0&&(this.decodeMode!==Gi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Kn.NumericDecimal:return this.emitNumericEntity(0,2);case Kn.NumericHex:return this.emitNumericEntity(0,3);case Kn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Kn.EntityStart:return 0}}}function iZ(e,t,n,r){const s=(t&Xa.BRANCH_LENGTH)>>7,i=t&Xa.JUMP_TABLE;if(s===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=s?-1:e[n+c]-1}let a=n,l=a+s-1;for(;a<=l;){const c=a+l>>>1,u=e[c];if(u<r)a=c+1;else if(u>r)l=c-1;else return e[c+s]}return-1}var ie;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ie||(ie={}));var dl;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(dl||(dl={}));var js;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(js||(js={}));var Q;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="str
565ike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Q||(Q={}));var v;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(v||(v={}));const aZ=new Map([[Q.A,v.A],[Q.ADDRESS,v.ADDRESS],[Q.ANNOTATION_XML,v.ANNOTATION_XML],[Q.APPLET,v.APPLET],[Q.AREA,v.AREA],[Q.ARTICLE,v.ARTICLE],[Q.ASIDE,v.ASIDE],[Q.B,v.B],[Q.BASE,v.BASE],[Q.BASEFONT,v.BASEFONT],[Q.BGSOUND,v.BGSOUND],[Q.BIG,v.BIG],[Q.BLOCKQUOTE,v.BLOCKQUOTE],[Q.BODY,v.BODY],[Q.BR,v.BR],[Q.BUTTON,v.BUTTON],[Q.CAPTION,v.CAPTION],[Q.CENTER,v.CENTER],[Q.CODE,v.CODE],[Q.COL,v.COL],[Q.COLGROUP,v.COLGROUP],[Q.DD,v.DD],[Q.DESC,v.DESC],[Q.DETAILS,v.DETAILS],[Q.DIALOG,v.DIALOG],[Q.DIR,v.DIR],[Q.DIV,v.DIV],[Q.DL,v.DL],[Q.DT,v.DT],[Q.EM,v.EM],[Q.EMBED,v.EMBED],[Q.FIELDSET,v.FIELDSET],[Q.FIGCAPTION,v.FIGCAPTION],[Q.FIGURE,v.FIGURE],[Q.FONT,v.FONT],[Q.FOOTER,v.FOOTER],[Q.FOREIGN_OBJECT,v.FOREIGN_OBJECT],[Q.FORM,v.FORM],[Q.FRAME,v.FRAME],[Q.FRAMESET,v.FRAMESET],[Q.H1,v.H1],[Q.H2,v.H2],[Q.H3,v.H3],[Q.H4,v.H4],[Q.H5,v.H5],[Q.H6,v.H6],[Q.HEAD,v.HEAD],[Q.HEADER,v.HEADER],[Q.HGROUP,v.HGROUP],[Q.HR,v.HR],[Q.HTML,v.HTML],[Q.I,v.I],[Q.IMG,v.IMG],[Q.IMAGE,v.IMAGE],[Q.INPUT,v.INPUT],[Q.IFRAME,v.IFRAME],[Q.KEYGEN,v.KEYGEN],[Q.LABEL,v.LABEL],[Q.LI,v.LI],[Q.LINK,v.LINK],[Q.LISTING,v.LISTING],[Q.MAIN,v.MAIN],[Q.MALIGNMARK,v.MALIGNMARK],[Q.MARQUEE,v.MARQUEE],[Q.MATH,v.MATH],[Q.MENU,v.MENU],[Q.META,v.META],[Q.MGLYPH,v.MGLYPH],[Q.MI,v.MI],[Q.MO,v.MO],[Q.MN,v.MN],[Q.MS,v.MS
vendor: 15,146 bytes, line 565
565],[Q.MTEXT,v.MTEXT],[Q.NAV,v.NAV],[Q.NOBR,v.NOBR],[Q.NOFRAMES,v.NOFRAMES],[Q.NOEMBED,v.NOEMBED],[Q.NOSCRIPT,v.NOSCRIPT],[Q.OBJECT,v.OBJECT],[Q.OL,v.OL],[Q.OPTGROUP,v.OPTGROUP],[Q.OPTION,v.OPTION],[Q.P,v.P],[Q.PARAM,v.PARAM],[Q.PLAINTEXT,v.PLAINTEXT],[Q.PRE,v.PRE],[Q.RB,v.RB],[Q.RP,v.RP],[Q.RT,v.RT],[Q.RTC,v.RTC],[Q.RUBY,v.RUBY],[Q.S,v.S],[Q.SCRIPT,v.SCRIPT],[Q.SEARCH,v.SEARCH],[Q.SECTION,v.SECTION],[Q.SELECT,v.SELECT],[Q.SOURCE,v.SOURCE],[Q.SMALL,v.SMALL],[Q.SPAN,v.SPAN],[Q.STRIKE,v.STRIKE],[Q.STRONG,v.STRONG],[Q.STYLE,v.STYLE],[Q.SUB,v.SUB],[Q.SUMMARY,v.SUMMARY],[Q.SUP,v.SUP],[Q.TABLE,v.TABLE],[Q.TBODY,v.TBODY],[Q.TEMPLATE,v.TEMPLATE],[Q.TEXTAREA,v.TEXTAREA],[Q.TFOOT,v.TFOOT],[Q.TD,v.TD],[Q.TH,v.TH],[Q.THEAD,v.THEAD],[Q.TITLE,v.TITLE],[Q.TR,v.TR],[Q.TRACK,v.TRACK],[Q.TT,v.TT],[Q.U,v.U],[Q.UL,v.UL],[Q.SVG,v.SVG],[Q.VAR,v.VAR],[Q.WBR,v.WBR],[Q.XMP,v.XMP]]);function Lu(e){var t;return(t=aZ.get(e))!==null&&t!==void 0?t:v.UNKNOWN}const ce=v,oZ={[ie.HTML]:new Set([ce.ADDRESS,ce.APPLET,ce.AREA,ce.ARTICLE,ce.ASIDE,ce.BASE,ce.BASEFONT,ce.BGSOUND,ce.BLOCKQUOTE,ce.BODY,ce.BR,ce.BUTTON,ce.CAPTION,ce.CENTER,ce.COL,ce.COLGROUP,ce.DD,ce.DETAILS,ce.DIR,ce.DIV,ce.DL,ce.DT,ce.EMBED,ce.FIELDSET,ce.FIGCAPTION,ce.FIGURE,ce.FOOTER,ce.FORM,ce.FRAME,ce.FRAMESET,ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6,ce.HEAD,ce.HEADER,ce.HGROUP,ce.HR,ce.HTML,ce.IFRAME,ce.IMG,ce.INPUT,ce.LI,ce.LINK,ce.LISTING,ce.MAIN,ce.MARQUEE,ce.MENU,ce.META,ce.NAV,ce.NOEMBED,ce.NOFRAMES,ce.NOSCRIPT,ce.OBJECT,ce.OL,ce.P,ce.PARAM,ce.PLAINTEXT,ce.PRE,ce.SCRIPT,ce.SECTION,ce.SELECT,ce.SOURCE,ce.STYLE,ce.SUMMARY,ce.TABLE,ce.TBODY,ce.TD,ce.TEMPLATE,ce.TEXTAREA,ce.TFOOT,ce.TH,ce.THEAD,ce.TITLE,ce.TR,ce.TRACK,ce.UL,ce.WBR,ce.XMP]),[ie.MATHML]:new Set([ce.MI,ce.MO,ce.MN,ce.MS,ce.MTEXT,ce.ANNOTATION_XML]),[ie.SVG]:new Set([ce.TITLE,ce.FOREIGN_OBJECT,ce.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Nv=new Set([ce.H1,ce.H2,ce.H3,ce.H4,ce.H5,ce.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var F;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(F||(F={}));const Sn={DATA:F.DATA,RCDATA:F.RCDATA,RAWTEXT:F.RAWTEXT,SCRIPT_DATA:F.SCRIPT_DATA,PLAINTEXT:F.PLAINTEXT,CDATA_SECTION:F.CDATA_SECTION};function lZ(e){return e>=M.DIGIT_0&&e<=M.DIGIT_9}function Fd(e){return e>=M.LATIN_CAPITAL_A&&e<=M.LATIN_CAPITAL_Z}function cZ(e){return e>=M.LATIN_SMALL_A&&e<=M.LATIN_SMALL_Z}function Aa(e){return cZ(e)||Fd(e)}function mC(e){return Aa(e)||lZ(e)}function Ip(e){return e+32}function yO(e){return e===M.SPACE||e===M.LINE_FEED||e===M.TABULATION||e===M.FORM_FEED}function gC(e){return yO(e)||e===M.SOLIDUS||e===M.GREATER_THAN_SIGN}function uZ(e){return e===M.NULL?ee.nullCharacterReference:e>1114111?ee.characterReferenceOutsideUnicodeRange:pO(e)?ee.surrogateCharacterReference:gO(e)?ee.noncharacterCharacterReference:mO(e)||e===M.CARRIAGE_RETURN?ee.controlCharacterReference:null}class dZ{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=F.DATA,this.returnState=F.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new QJ(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new sZ(XJ,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ee.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ee.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=uZ(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:tt.START_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:tt.END_TAG,tagName:"",tagID:v.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:tt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:tt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(xO(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ee.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Lu(t.tagName),t.type===tt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ee.endTagWithAttributes),t.selfClosing&&this._err(ee.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case tt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case tt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case tt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:tt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=yO(t)?tt.WHITESPACE_CHARACTER:t===M.NULL?tt.NULL_CHARACTER:tt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(tt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=F.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Gi.Attribute:Gi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===F.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case F.DATA:{this._stateData(t);break}case F.RCDATA:{this._stateRcdata(t);break}case F.RAWTEXT:{this._stateRawtext(t);break}case F.SCRIPT_DATA:{this._stateScriptData(t);break}case F.PLAINTEXT:{this._statePlaintext(t);break}case F.TAG_OPEN:{this._stateTagOpen(t);break}case F.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case F.TAG_NAME:{this._stateTagName(t);break}case F.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case F.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case F.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case F.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case F.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case F.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case F.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case F.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case F.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case F.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case F.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case F.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case F.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case F.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscape
vendor: 5,361 bytes, line 565
565Start(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case F.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case F.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case F.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case F.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case F.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case F.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case F.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case F.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case F.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case F.BOGUS_COMMENT:{this._stateBogusComment(t);break}case F.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case F.COMMENT_START:{this._stateCommentStart(t);break}case F.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case F.COMMENT:{this._stateComment(t);break}case F.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case F.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case F.COMMENT_END:{this._stateCommentEnd(t);break}case F.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case F.DOCTYPE:{this._stateDoctype(t);break}case F.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case F.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case F.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case F.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case F.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case F.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case F.CDATA_SECTION:{this._stateCdataSection(t);break}case F.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case F.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case F.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case F.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case M.LESS_THAN_SIGN:{this.state=F.TAG_OPEN;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitCodePoint(t);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case M.AMPERSAND:{this._startCharacterReference();break}case M.LESS_THAN_SIGN:{this.state=F.RCDATA_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case M.LESS_THAN_SIGN:{this.state=F.RAWTEXT_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Aa(t))this._createStartTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case M.EXCLAMATION_MARK:{this.state=F.MARKUP_DECLARATION_OPEN;break}case M.SOLIDUS:{this.state=F.END_TAG_OPEN;break}case M.QUESTION_MARK:{this._err(ee.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t);break}case M.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}
vendor: 89,707 bytes, line 565
565default:this._err(ee.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=F.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Aa(t))this._createEndTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case M.GREATER_THAN_SIGN:{this._err(ee.missingEndTagName),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ee.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.BEFORE_ATTRIBUTE_NAME;break}case M.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.tagName+=Jt;break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Fd(t)?Ip(t):t)}}_stateRcdataLessThanSign(t){t===M.SOLIDUS?this.state=F.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Aa(t)?(this.state=F.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=F.BEFORE_ATTRIBUTE_NAME,!1;case M.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=F.SELF_CLOSING_START_TAG,!1;case M.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=F.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===M.SOLIDUS?this.state=F.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Aa(t)?(this.state=F.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case M.SOLIDUS:{this.state=F.SCRIPT_DATA_END_TAG_OPEN;break}case M.EXCLAMATION_MARK:{this.state=F.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=F.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Aa(t)?(this.state=F.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===M.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===M.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case M.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case M.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case M.HYPHEN_MINUS:{this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case M.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===M.SOLIDUS?this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Aa(t)?(this._emitChars("<"),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Aa(t)?(this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ur.SCRIPT,!1)&&gC(this.preprocessor.peek(Ur.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ur.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case M.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case M.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case M.HYPHEN_MINUS:{this._emitChars("-");break}case M.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case M.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Jt);break}case M.EOF:{this._err(ee.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===M.SOLIDUS?(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ur.SCRIPT,!1)&&gC(this.preprocessor.peek(Ur.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ur.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.SOLIDUS:case M.GREATER_THAN_SIGN:case M.EOF:{this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case M.EQUALS_SIGN:{this._err(ee.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=F.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:case M.SOLIDUS:case M.GREATER_THAN_SIGN:case M.EOF:{this._leaveAttrName(),this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case M.EQUALS_SIGN:{this._leaveAttrName(),this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case M.QUOTATION_MARK:case M.APOSTROPHE:case M.LESS_THAN_SIGN:{this._err(ee.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.name+=Jt;break}default:this.currentAttr.name+=String.fromCodePoint(Fd(t)?Ip(t):t)}}_stateAfterAttributeName(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case M.EQUALS_SIGN:{this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{this.state=F.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this.state=F.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingAttributeValue),this.state=F.DATA,this.emitCurrentTagToken();break}default:this.state=F.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case M.QUOTATION_MARK:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=Jt;break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case M.APOSTROPHE:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=Jt;break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case M.AMPERSAND:{this._startCharacterReference();break}case M.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),this.currentAttr.value+=Jt;break}case M.QUOTATION_MARK:case M.APOSTROPHE:case M.LESS_THAN_SIGN:case M.EQUALS_SIGN:case M.GRAVE_ACCENT:{this._err(ee.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case M.SOLIDUS:{this._leaveAttrValue(),this.state=F.SELF_CLOSING_START_TAG;break}case M.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBetweenAttributes),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case M.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=F.DATA,this.emitCurrentTagToken();break}case M.EOF:{this._err(ee.eofInTag),this._emitEOFToken();break}default:this._err(ee.unexpectedSolidusInTag),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case M.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=Jt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ur.DASH_DASH,!0)?(this._createCommentToken(Ur.DASH_DASH.length+1),this.state=F.COMMENT_START):this._consumeSequenceIfMatch(Ur.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ur.DOCTYPE.length+1),this.state=F.DOCTYPE):this._consumeSequenceIfMatch(Ur.CDATA_START,!0)?this.inForeignNode?this.state=F.CDATA_SECTION:(this._err(ee.cdataInHtmlContent),this._createCommentToken(Ur.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=F.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ee.incorrectlyOpenedComment),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case M.HYPHEN_MINUS:{this.state=F.COMMENT_START_DASH;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=F.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptClosingOfEmptyComment),this.state=F.DATA,this.emitCurrentComment(n);break}case M.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=F.COMMENT_END_DASH;break}case M.LESS_THAN_SIGN:{n.data+="<",this.state=F.COMMENT_LESS_THAN_SIGN;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.data+=Jt;break}case M.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case M.EXCLAMATION_MARK:{n.data+="!",this.state=F.COMMENT_LESS_THAN_SIGN_BANG;break}case M.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===M.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=F.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===M.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=F.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==M.GREATER_THAN_SIGN&&t!==M.EOF&&this._err(ee.nestedComment),this.state=F.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case M.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case M.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case M.EXCLAMATION_MARK:{this.state=F.COMMENT_END_BANG;break}case M.HYPHEN_MINUS:{n.data+="-";break}case M.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case M.HYPHEN_MINUS:{n.data+="--!",this.state=F.COMMENT_END_DASH;break}case M.GREATER_THAN_SIGN:{this._err(ee.incorrectlyClosedComment),this.state=F.DATA,this.emitCurrentComment(n);break}case M.EOF:{this._err(ee.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=F.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case M.EOF:{this._err(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingWhitespaceBeforeDoctypeName),this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Fd(t))this._createDoctypeToken(String.fromCharCode(Ip(t))),this.state=F.DOCTYPE_NAME;else switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.NULL:{this._err(ee.unexpectedNullCharacter),this._createDoctypeToken(Jt),this.state=F.DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=F.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.AFTER_DOCTYPE_NAME;break}case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.name+=Jt;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Fd(t)?Ip(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ur.PUBLIC,!1)?this.state=F.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ur.SYSTEM,!1)?this.state=F.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ee.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case M.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=Jt;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case M.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.publicId+=Jt;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case M.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.QUOTATION_MARK:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ee.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.QUOTATION_MARK:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{this._err(ee.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case M.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case M.GREATER_THAN_SIGN:{this._err(ee.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case M.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=Jt;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case M.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case M.NULL:{this._err(ee.unexpectedNullCharacter),n.systemId+=Jt;break}case M.GREATER_THAN_SIGN:{this._err(ee.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case M.SPACE:case M.LINE_FEED:case M.TABULATION:case M.FORM_FEED:break;case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.EOF:{this._err(ee.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ee.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case M.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case M.NULL:{this._err(ee.unexpectedNullCharacter);break}case M.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case M.RIGHT_SQUARE_BRACKET:{this.state=F.CDATA_SECTION_BRACKET;break}case M.EOF:{this._err(ee.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===M.RIGHT_SQUARE_BRACKET?this.state=F.CDATA_SECTION_END:(this._emitChars("]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case M.GREATER_THAN_SIGN:{this.state=F.DATA;break}case M.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(M.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&mC(this.preprocessor.peek(1))?F.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){mC(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===M.SEMICOLON&&this._err(ee.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const bO=new Set([v.DD,v.DT,v.LI,v.OPTGROUP,v.OPTION,v.P,v.RB,v.RP,v.RT,v.RTC]),xC=new Set([...bO,v.CAPTION,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]),Ng=new Set([v.APPLET,v.CAPTION,v.HTML,v.MARQUEE,v.OBJECT,v.TABLE,v.TD,v.TEMPLATE,v.TH]),hZ=new Set([...Ng,v.OL,v.UL]),fZ=new Set([...Ng,v.BUTTON]),yC=new Set([v.ANNOTATION_XML,v.MI,v.MN,v.MO,v.MS,v.MTEXT]),bC=new Set([v.DESC,v.FOREIGN_OBJECT,v.TITLE]),pZ=new Set([v.TR,v.TEMPLATE,v.HTML]),mZ=new Set([v.TBODY,v.TFOOT,v.THEAD,v.TEMPLATE,v.HTML]),gZ=new Set([v.TABLE,v.TEMPLATE,v.HTML]),xZ=new Set([v.TD,v.TH]);class yZ{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=v.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===v.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ie.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==ie.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Nv,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(xZ,ie.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(gZ,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(mZ,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(pZ,ie.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===v.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===v.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ie.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case ie.SVG:{if(bC.has(s))return!1;break}case ie.MATHML:{if(yC.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ng)}hasInListItemScope(t){return this.hasInDynamicScope(t,hZ)}hasInButtonScope(t){return this.hasInDynamicScope(t,fZ)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Nv.has(n))return!0;if(Ng.has(n))return!1;break}case ie.SVG:{if(bC.has(n))return!1;break}case ie.MATHML:{if(yC.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case v.TABLE:case v.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ie.HTML)switch(this.tagIDs[t]){case v.TBODY:case v.THEAD:case v.TFOOT:return!0;case v.TABLE:case v.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case v.OPTION:case v.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&bO.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&xC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&xC.has(this.currentTagId);)this.pop()}}const Ny=3;var gi;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(gi||(gi={}));const vC={type:gi.Marker};class bZ{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const c=this.entries[l];if(c.type===gi.Marker)break;const{element:u}=c;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const d=this.treeAdapter.getAttrList(u);d.length===s&&r.push({idx:l,attrs:d})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Ny)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Ny)return;const s=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const l=r[a];l.attrs.every(c=>s.get(c.name)===c.value)&&(i+=1,i>=Ny&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(vC)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:gi.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:gi.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(vC);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===gi.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===gi.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===gi.Element&&n.element===t)}}const Ia={createDocument(){return{nodeName:"#document",mode:js.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ia.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ia.isTextNode(n)){n.value+=t;return}}Ia.appendChild(e,Ia.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ia.isTextNode(r)?r.value+=t:Ia.insertBefore(e,Ia.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},vO="html",vZ="about:legacy-compat",_Z="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",_O=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],wZ=[..._O,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],EZ=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),wO=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],NZ=[...wO,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function _C(e,t){return t.some(n=>e.startsWith(n))}function kZ(e){return e.name===vO&&e.publicId===null&&(e.systemId===null||e.systemId===vZ)}function TZ(e){if(e.name!==vO)return js.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===_Z)return js.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),EZ.has(n))return js.QUIRKS;let r=t===null?wZ:_O;if(_C(n,r))return js.QUIRKS;if(r=t===null?wO:NZ,_C(n,r))return js.LIMITED_QUIRKS}return js.NO_QUIRKS}const wC={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},SZ="definitionurl",CZ="definitionURL",jZ=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),AZ=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),IZ=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),PZ=new Set([v.B,v.BIG,v.BLOCKQUOTE,v.BODY,v.BR,v.CENTER,v.CODE,v.DD,v.DIV,v.DL,v.DT,v.EM,v.EMBED,v.H1,v.H2,v.H3,v.H4,v.H5,v.H6,v.HEAD,v.HR,v.I,v.IMG,v.LI,v.LISTING,v.MENU,v.META,v.NOBR,v.OL,v.P,v.PRE,v.RUBY,v.S,v.SMALL,v.SPAN,v.STRONG,v.STRIKE,v.SUB,v.SUP,v.TABLE,v.TT,v.U,v.UL,v.VAR]);function DZ(e){const t=e.tagID;return t===v.FONT&&e.attrs.some(({name:r})=>r===dl.COLOR||r===dl.SIZE||r===dl.FACE)||PZ.has(t)}function EO(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===SZ){e.attrs[t].name=CZ;break}}function NO(e){for(let t=0;t<e.attrs.length;t++){const n=jZ.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sw(e){for(let t=0;t<e.attrs.length;t++){const n=AZ.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function OZ(e){const t=IZ.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Lu(e.tagName))}function MZ(e,t){return t===ie.MATHML&&(e===v.MI||e===v.MO||e===v.MN||e===v.MS||e===v.MTEXT)}function RZ(e,t,n){if(t===ie.MATHML&&e===v.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===dl.ENCODING){const s=n[r].value.toLowerCase();return s===wC.TEXT_HTML||s===wC.APPLICATION_XML}}return t===ie.SVG&&(e===v.FOREIGN_OBJECT||e===v.DESC||e===v.TITLE)}function LZ(e,t,n,r){return(!r||r===ie.HTML)&&RZ(e,t,n)||(!r||r===ie.MATHML)&&MZ(e,t)}const FZ="hidden",BZ=8,UZ=3;var $;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})($||($={}));const $Z={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},kO=new Set([v.TABLE,v.TBODY,v.TFOOT,v.THEAD,v.TR]),EC={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ia,onParseError:null};class NC{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=$.INITIAL,this.originalInsertionMode=$.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...EC,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new dZ(this.options,this),this.activeFormattingElements=new bZ(this.treeAdapter),this.fragmentContextID=r?Lu(this.treeAdapter.getTagName(r)):v.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new yZ(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...EC,...n};t??(t=r.treeAdapter.createElement(Q.TEMPLATE,ie.HTML,[]));const s=r.treeAdapter.createElement("documentmock",ie.HTML,[]),i=new this(r,s,t);return i.fragmentContextID===v.TEMPLATE&&i.tmplInsertionModeStack.unshift($.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const i=(s=t.location)!==null&&s!==void 0?s:$Z,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=Sn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case v.TITLE:case v.TEXTAREA:{this.tokenizer.state=Sn.RCDATA;break}case v.STYLE:case v.XMP:case v.IFRAME:case v.NOEMBED:case v.NOFRAMES:case v.NOSCRIPT:{this.tokenizer.state=Sn.RAWTEXT;break}case v.SCRIPT:{this.tokenizer.state=Sn.SCRIPT_DATA;break}case v.PLAINTEXT:{this.tokenizer.state=Sn.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Q.HTML,ie.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,v.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),i=r?s.lastIndexOf(r):s.length,a=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:d}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:d})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),i=n.type===tt.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===v.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===v.MGLYPH||t.tagID===v.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case tt.CHARACTER:{this.onCharacter(t);break}case tt.NULL_CHARACTER:{this.onNullCharacter(t);break}case tt.COMMENT:{this.onComment(t);break}case tt.DOCTYPE:{this.onDoctype(t);break}case tt.START_TAG:{this._processStartTag(t);break}case tt.END_TAG:{this.onEndTag(t);break}case tt.EOF:{this.onEof(t);break}case tt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return LZ(t,s,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===gi.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(v.P),this.openElements.popUntilTagNamePopped(v.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case v.TR:{this.insertionMode=$.IN_ROW;return}case v.TBODY:case v.THEAD:case v.TFOOT:{this.insertionMode=$.IN_TABLE_BODY;return}case v.CAPTION:{this.insertionMode=$.IN_CAPTION;return}case v.COLGROUP:{this.insertionMode=$.IN_COLUMN_GROUP;return}case v.TABLE:{this.insertionMode=$.IN_TABLE;return}case v.BODY:{this.insertionMode=$.IN_BODY;return}case v.FRAMESET:{this.insertionMode=$.IN_FRAMESET;return}case v.SELECT:{this._resetInsertionModeForSelect(t);return}case v.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case v.HTML:{this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return}case v.TD:case v.TH:{if(t>0){this.insertionMode=$.IN_CELL;return}break}case v.HEAD:{if(t>0){this.insertionMode=$.IN_HEAD;return}break}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===v.TEMPLATE)break;if(r===v.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(t){return kO.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case v.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ie.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case v.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return oZ[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){xte(this,t);return}switch(this.insertionMode){case $.INITIAL:{pd(this,t);break}case $.BEFORE_HTML:{hh(this,t);break}case $.BEFORE_HEAD:{fh(this,t);break}case $.IN_HEAD:{ph(this,t);break}case $.IN_HEAD_NO_SCRIPT:{mh(this,t);break}case $.AFTER_HEAD:{gh(this,t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:{SO(this,t);break}case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{ky(this,t);break}case $.IN_TABLE_TEXT:{DO(this,t);break}case $.IN_COLUMN_GROUP:{kg(this,t);break}case $.AFTER_BODY:{Tg(this,t);break}case $.AFTER_AFTER_BODY:{om(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){gte(this,t);return}switch(this.insertionMode){case $.INITIAL:{pd(this,t);break}case $.BEFORE_HTML:{hh(this,t);break}case $.BEFORE_HEAD:{fh(this,t);break}case $.IN_HEAD:{ph(this,t);break}case $.IN_HEAD_NO_SCRIPT:{mh(this,t);break}case $.AFTER_HEAD:{gh(this,t);break}case $.TEXT:{this._insertCharacters(t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{ky(this,t);break}case $.IN_COLUMN_GROUP:{kg(this,t);break}case $.AFTER_BODY:{Tg(this,t);break}case $.AFTER_AFTER_BODY:{om(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){kv(this,t);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{kv(this,t);break}case $.IN_TABLE_TEXT:{md(this,t);break}case $.AFTER_BODY:{GZ(this,t);break}case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{KZ(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:{QZ(this,t);break}case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:{this._err(t,ee.misplacedDoctype);break}case $.IN_TABLE_TEXT:{md(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ee.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?yte(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{pd(this,t);break}case $.BEFORE_HTML:{XZ(this,t);break}case $.BEFORE_HEAD:{ZZ(this,t);break}case $.IN_HEAD:{si(this,t);break}case $.IN_HEAD_NO_SCRIPT:{nee(this,t);break}case $.AFTER_HEAD:{see(this,t);break}case $.IN_BODY:{Tr(this,t);break}case $.IN_TABLE:{pu(this,t);break}case $.IN_TABLE_TEXT:{md(this,t);break}case $.IN_CAPTION:{ete(this,t);break}case $.IN_COLUMN_GROUP:{Aw(this,t);break}case $.IN_TABLE_BODY:{Rx(this,t);break}case $.IN_ROW:{Lx(this,t);break}case $.IN_CELL:{rte(this,t);break}case $.IN_SELECT:{RO(this,t);break}case $.IN_SELECT_IN_TABLE:{ite(this,t);break}case $.IN_TEMPLATE:{ote(this,t);break}case $.AFTER_BODY:{cte(this,t);break}case $.IN_FRAMESET:{ute(this,t);break}case $.AFTER_FRAMESET:{hte(this,t);break}case $.AFTER_AFTER_BODY:{pte(this,t);break}case $.AFTER_AFTER_FRAMESET:{mte(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?bte(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case $.INITIAL:{pd(this,t);break}case $.BEFORE_HTML:{JZ(this,t);break}case $.BEFORE_HEAD:{eee(this,t);break}case $.IN_HEAD:{tee(this,t);break}case $.IN_HEAD_NO_SCRIPT:{ree(this,t);break}case $.AFTER_HEAD:{iee(this,t);break}case $.IN_BODY:{Mx(this,t);break}case $.TEXT:{Wee(this,t);break}case $.IN_TABLE:{tf(this,t);break}case $.IN_TABLE_TEXT:{md(this,t);break}case $.IN_CAPTION:{tte(this,t);break}case $.IN_COLUMN_GROUP:{nte(this,t);break}case $.IN_TABLE_BODY:{Tv(this,t);break}case $.IN_ROW:{MO(this,t);break}case $.IN_CELL:{ste(this,t);break}case $.IN_SELECT:{LO(this,t);break}case $.IN_SELECT_IN_TABLE:{ate(this,t);break}case $.IN_TEMPLATE:{lte(this,t);break}case $.AFTER_BODY:{BO(this,t);break}case $.IN_FRAMESET:{dte(this,t);break}case $.AFTER_FRAMESET:{fte(this,t);break}case $.AFTER_AFTER_BODY:{om(this,t);break}}}onEof(t){switch(this.insertionMode){case $.INITIAL:{pd(this,t);break}case $.BEFORE_HTML:{hh(this,t);break}case $.BEFORE_HEAD:{fh(this,t);break}case $.IN_HEAD:{ph(this,t);break}case $.IN_HEAD_NO_SCRIPT:{mh(this,t);break}case $.AFTER_HEAD:{gh(this,t);break}case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:{IO(this,t);break}case $.TEXT:{Vee(this,t);break}case $.IN_TABLE_TEXT:{md(this,t);break}case $.IN_TEMPLATE:{FO(this,t);break}case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{jw(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===M.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:{this._insertCharacters(t);break}case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:{TO(this,t);break}case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:{ky(this,t);break}case $.IN_TABLE_TEXT:{PO(this,t);break}}}}function zZ(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):AO(e,t),n}function HZ(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function WZ(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let i=0,a=s;a!==n;i++,a=s){s=e.openElements.getCommonAncestor(a);const l=e.activeFormattingElements.getElementEntry(a),c=l&&i>=UZ;!l||c?(c&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(a)):(a=VZ(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function VZ(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function qZ(e,t,n){const r=e.treeAdapter.getTagName(t),s=Lu(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);s===v.TEMPLATE&&i===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function YZ(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,i=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,s.tagID)}function Cw(e,t){for(let n=0;n<BZ;n++){const r=zZ(e,t);if(!r)break;const s=HZ(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const i=WZ(e,s,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&qZ(e,a,i),YZ(e,s,r)}}function kv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function GZ(e,t){e._appendCommentNode(t,e.openElements.items[0])}function KZ(e,t){e._appendCommentNode(t,e.document)}function jw(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function QZ(e,t){e._setDocumentType(t);const n=t.forceQuirks?js.QUIRKS:TZ(t);kZ(t)||e._err(t,ee.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function pd(e,t){e._err(t,ee.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,js.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function XZ(e,t){t.tagID===v.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=$.BEFORE_HEAD):hh(e,t)}function JZ(e,t){const n=t.tagID;(n===v.HTML||n===v.HEAD||n===v.BODY||n===v.BR)&&hh(e,t)}function hh(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function ZZ(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break}default:fh(e,t)}}function eee(e,t){const n=t.tagID;n===v.HEAD||n===v.BODY||n===v.HTML||n===v.BR?fh(e,t):e._err(t,ee.endTagWithoutMatchingOpenElement)}function fh(e,t){e._insertFakeElement(Q.HEAD,v.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function si(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case v.TITLE:{e._switchToTextParsing(t,Sn.RCDATA);break}case v.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Sn.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break}case v.NOFRAMES:case v.STYLE:{e._switchToTextParsing(t,Sn.RAWTEXT);break}case v.SCRIPT:{e._switchToTextParsing(t,Sn.SCRIPT_DATA);break}case v.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break}case v.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:ph(e,t)}}function tee(e,t){switch(t.tagID){case v.HEAD:{e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break}case v.BODY:case v.BR:case v.HTML:{ph(e,t);break}case v.TEMPLATE:{Al(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function Al(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==v.TEMPLATE&&e._err(t,ee.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ee.endTagWithoutMatchingOpenElement)}function ph(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function nee(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.BASEFONT:case v.BGSOUND:case v.HEAD:case v.LINK:case v.META:case v.NOFRAMES:case v.STYLE:{si(e,t);break}case v.NOSCRIPT:{e._err(t,ee.nestedNoscriptInHead);break}default:mh(e,t)}}function ree(e,t){switch(t.tagID){case v.NOSCRIPT:{e.openElements.pop(),e.insertionMode=$.IN_HEAD;break}case v.BR:{mh(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function mh(e,t){const n=t.type===tt.EOF?ee.openElementsLeftAfterEof:ee.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function see(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break}case v.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=$.IN_FRAMESET;break}case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{e._err(t,ee.abandonedHeadElementChild),e.openElements.push(e.headElement,v.HEAD),si(e,t),e.openElements.remove(e.headElement);break}case v.HEAD:{e._err(t,ee.misplacedStartTagForHeadElement);break}default:gh(e,t)}}function iee(e,t){switch(t.tagID){case v.BODY:case v.HTML:case v.BR:{gh(e,t);break}case v.TEMPLATE:{Al(e,t);break}default:e._err(t,ee.endTagWithoutMatchingOpenElement)}}function gh(e,t){e._insertFakeElement(Q.BODY,v.BODY),e.insertionMode=$.IN_BODY,Ox(e,t)}function Ox(e,t){switch(t.type){case tt.CHARACTER:{SO(e,t);break}case tt.WHITESPACE_CHARACTER:{TO(e,t);break}case tt.COMMENT:{kv(e,t);break}case tt.START_TAG:{Tr(e,t);break}case tt.END_TAG:{Mx(e,t);break}case tt.EOF:{IO(e,t);break}}}function TO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function SO(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function aee(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function oee(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function lee(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_FRAMESET)}function cee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function uee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Nv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function dee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function hee(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function fee(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===v.LI&&s===v.LI||(n===v.DD||n===v.DT)&&(s===v.DD||s===v.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==v.ADDRESS&&s!==v.DIV&&s!==v.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function pee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Sn.PLAINTEXT}function mee(e,t){e.openElements.hasInScope(v.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function gee(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Cw(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yee(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(v.NOBR)&&(Cw(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function vee(e,t){e.treeAdapter.getDocumentMode(e.document)!==js.QUIRKS&&e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function CO(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function jO(e){const t=xO(e,dl.TYPE);return t!=null&&t.toLowerCase()===FZ}function _ee(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),jO(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function wee(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function Eee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Nee(e,t){t.tagName=Q.IMG,t.tagID=v.IMG,CO(e,t)}function kee(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Sn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function Tee(e,t){e.openElements.hasInButtonScope(v.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Sn.RAWTEXT)}function See(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Sn.RAWTEXT)}function kC(e,t){e._switchToTextParsing(t,Sn.RAWTEXT)}function Cee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function jee(e,t){e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function Aee(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function Iee(e,t){e.openElements.hasInScope(v.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(v.RTC),e._insertElement(t,ie.HTML)}function Pee(e,t){e._reconstructActiveFormattingElements(),EO(t),Sw(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function Dee(e,t){e._reconstructActiveFormattingElements(),NO(t),Sw(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function TC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function Tr(e,t){switch(t.tagID){case v.I:case v.S:case v.B:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.SMALL:case v.STRIKE:case v.STRONG:{xee(e,t);break}case v.A:{gee(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{uee(e,t);break}case v.P:case v.DL:case v.OL:case v.UL:case v.DIV:case v.DIR:case v.NAV:case v.MAIN:case v.MENU:case v.ASIDE:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.DETAILS:case v.ADDRESS:case v.ARTICLE:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{cee(e,t);break}case v.LI:case v.DD:case v.DT:{fee(e,t);break}case v.BR:case v.IMG:case v.WBR:case v.AREA:case v.EMBED:case v.KEYGEN:{CO(e,t);break}case v.HR:{Eee(e,t);break}case v.RB:case v.RTC:{Aee(e,t);break}case v.RT:case v.RP:{Iee(e,t);break}case v.PRE:case v.LISTING:{dee(e,t);break}case v.XMP:{Tee(e,t);break}case v.SVG:{Dee(e,t);break}case v.HTML:{aee(e,t);break}case v.BASE:case v.LINK:case v.META:case v.STYLE:case v.TITLE:case v.SCRIPT:case v.BGSOUND:case v.BASEFONT:case v.TEMPLATE:{si(e,t);break}case v.BODY:{oee(e,t);break}case v.FORM:{hee(e,t);break}case v.NOBR:{yee(e,t);break}case v.MATH:{Pee(e,t);break}case v.TABLE:{vee(e,t);break}case v.INPUT:{_ee(e,t);break}case v.PARAM:case v.TRACK:case v.SOURCE:{wee(e,t);break}case v.IMAGE:{Nee(e,t);break}case v.BUTTON:{mee(e,t);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{bee(e,t);break}case v.IFRAME:{See(e,t);break}case v.SELECT:{Cee(e,t);break}case v.OPTION:case v.OPTGROUP:{jee(e,t);break}case v.NOEMBED:case v.NOFRAMES:{kC(e,t);break}case v.FRAMESET:{lee(e,t);break}case v.TEXTAREA:{kee(e,t);break}case v.NOSCRIPT:{e.options.scriptingEnabled?kC(e,t):TC(e,t);break}case v.PLAINTEXT:{pee(e,t);break}case v.COL:case v.TH:case v.TD:case v.TR:case v.HEAD:case v.FRAME:case v.TBODY:case v.TFOOT:case v.THEAD:case v.CAPTION:case v.COLGROUP:break;default:TC(e,t)}}function Oee(e,t){if(e.openElements.hasInScope(v.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Mee(e,t){e.openElements.hasInScope(v.BODY)&&(e.insertionMode=$.AFTER_BODY,BO(e,t))}function Ree(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Lee(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(v.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(v.FORM):n&&e.openElements.remove(n))}function Fee(e){e.openElements.hasInButtonScope(v.P)||e._insertFakeElement(Q.P,v.P),e._closePElement()}function Bee(e){e.openElements.hasInListItemScope(v.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(v.LI),e.openElements.popUntilTagNamePopped(v.LI))}function Uee(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function $ee(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function zee(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Hee(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,v.BR),e.openElements.pop(),e.framesetOk=!1}function AO(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const i=e.openElements.items[s],a=e.openElements.tagIDs[s];if(r===a&&(r!==v.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(i,a))break}}function Mx(e,t){switch(t.tagID){case v.A:case v.B:case v.I:case v.S:case v.U:case v.EM:case v.TT:case v.BIG:case v.CODE:case v.FONT:case v.NOBR:case v.SMALL:case v.STRIKE:case v.STRONG:{Cw(e,t);break}case v.P:{Fee(e);break}case v.DL:case v.UL:case v.OL:case v.DIR:case v.DIV:case v.NAV:case v.PRE:case v.MAIN:case v.MENU:case v.ASIDE:case v.BUTTON:case v.CENTER:case v.FIGURE:case v.FOOTER:case v.HEADER:case v.HGROUP:case v.DIALOG:case v.ADDRESS:case v.ARTICLE:case v.DETAILS:case v.SEARCH:case v.SECTION:case v.SUMMARY:case v.LISTING:case v.FIELDSET:case v.BLOCKQUOTE:case v.FIGCAPTION:{Ree(e,t);break}case v.LI:{Bee(e);break}case v.DD:case v.DT:{Uee(e,t);break}case v.H1:case v.H2:case v.H3:case v.H4:case v.H5:case v.H6:{$ee(e);break}case v.BR:{Hee(e);break}case v.BODY:{Oee(e,t);break}case v.HTML:{Mee(e,t);break}case v.FORM:{Lee(e);break}case v.APPLET:case v.OBJECT:case v.MARQUEE:{zee(e,t);break}case v.TEMPLATE:{Al(e,t);break}default:AO(e,t)}}function IO(e,t){e.tmplInsertionModeStack.length>0?FO(e,t):jw(e,t)}function Wee(e,t){var n;t.tagID===v.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function Vee(e,t){e._err(t,ee.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ky(e,t){if(e.openElements.currentTagId!==void 0&&kO.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case tt.CHARACTER:{DO(e,t);break}case tt.WHITESPACE_CHARACTER:{PO(e,t);break}}else Df(e,t)}function qee(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_CAPTION}function Yee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function Gee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,v.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,Aw(e,t)}function Kee(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_TABLE_BODY}function Qee(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,v.TBODY),e.insertionMode=$.IN_TABLE_BODY,Rx(e,t)}function Xee(e,t){e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Jee(e,t){jO(t)?e._appendElement(t,ie.HTML):Df(e,t),t.ackSelfClosing=!0}function Zee(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function pu(e,t){switch(t.tagID){case v.TD:case v.TH:case v.TR:{Qee(e,t);break}case v.STYLE:case v.SCRIPT:case v.TEMPLATE:{si(e,t);break}case v.COL:{Gee(e,t);break}case v.FORM:{Zee(e,t);break}case v.TABLE:{Xee(e,t);break}case v.TBODY:case v.TFOOT:case v.THEAD:{Kee(e,t);break}case v.INPUT:{Jee(e,t);break}case v.CAPTION:{qee(e,t);break}case v.COLGROUP:{Yee(e,t);break}default:Df(e,t)}}function tf(e,t){switch(t.tagID){case v.TABLE:{e.openElements.hasInTableScope(v.TABLE)&&(e.openElements.popUntilTagNamePopped(v.TABLE),e._resetInsertionMode());break}case v.TEMPLATE:{Al(e,t);break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:Df(e,t)}}function Df(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ox(e,t),e.fosterParentingEnabled=n}function PO(e,t){e.pendingCharacterTokens.push(t)}function DO(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function md(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Df(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const OO=new Set([v.CAPTION,v.COL,v.COLGROUP,v.TBODY,v.TD,v.TFOOT,v.TH,v.THEAD,v.TR]);function ete(e,t){const n=t.tagID;OO.has(n)?e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,pu(e,t)):Tr(e,t)}function tte(e,t){const n=t.tagID;switch(n){case v.CAPTION:case v.TABLE:{e.openElements.hasInTableScope(v.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(v.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_TABLE,n===v.TABLE&&tf(e,t));break}case v.BODY:case v.COL:case v.COLGROUP:case v.HTML:case v.TBODY:case v.TD:case v.TFOOT:case v.TH:case v.THEAD:case v.TR:break;default:Mx(e,t)}}function Aw(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case v.TEMPLATE:{si(e,t);break}default:kg(e,t)}}function nte(e,t){switch(t.tagID){case v.COLGROUP:{e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE);break}case v.TEMPLATE:{Al(e,t);break}case v.COL:break;default:kg(e,t)}}function kg(e,t){e.openElements.currentTagId===v.COLGROUP&&(e.openElements.pop(),e.insertionMode=$.IN_TABLE,e._processToken(t))}function Rx(e,t){switch(t.tagID){case v.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_ROW;break}case v.TH:case v.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,v.TR),e.insertionMode=$.IN_ROW,Lx(e,t);break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,pu(e,t));break}default:pu(e,t)}}function Tv(e,t){const n=t.tagID;switch(t.tagID){case v.TBODY:case v.TFOOT:case v.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE);break}case v.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE,tf(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:case v.TR:break;default:tf(e,t)}}function Lx(e,t){switch(t.tagID){case v.TH:case v.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=$.IN_CELL,e.activeFormattingElements.insertMarker();break}case v.CAPTION:case v.COL:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Rx(e,t));break}default:pu(e,t)}}function MO(e,t){switch(t.tagID){case v.TR:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY);break}case v.TABLE:{e.openElements.hasInTableScope(v.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Tv(e,t));break}case v.TBODY:case v.TFOOT:case v.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(v.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=$.IN_TABLE_BODY,Tv(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:case v.TD:case v.TH:break;default:tf(e,t)}}function rte(e,t){const n=t.tagID;OO.has(n)?(e.openElements.hasInTableScope(v.TD)||e.openElements.hasInTableScope(v.TH))&&(e._closeTableCell(),Lx(e,t)):Tr(e,t)}function ste(e,t){const n=t.tagID;switch(n){case v.TD:case v.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=$.IN_ROW);break}case v.TABLE:case v.TBODY:case v.TFOOT:case v.THEAD:case v.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),MO(e,t));break}case v.BODY:case v.CAPTION:case v.COL:case v.COLGROUP:case v.HTML:break;default:Mx(e,t)}}function RO(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case v.OPTGROUP:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case v.HR:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case v.INPUT:case v.KEYGEN:case v.TEXTAREA:case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),t.tagID!==v.SELECT&&e._processStartTag(t));break}case v.SCRIPT:case v.TEMPLATE:{si(e,t);break}}}function LO(e,t){switch(t.tagID){case v.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===v.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===v.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===v.OPTGROUP&&e.openElements.pop();break}case v.OPTION:{e.openElements.currentTagId===v.OPTION&&e.openElements.pop();break}case v.SELECT:{e.openElements.hasInSelectScope(v.SELECT)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode());break}case v.TEMPLATE:{Al(e,t);break}}}function ite(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e._processStartTag(t)):RO(e,t)}function ate(e,t){const n=t.tagID;n===v.CAPTION||n===v.TABLE||n===v.TBODY||n===v.TFOOT||n===v.THEAD||n===v.TR||n===v.TD||n===v.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(v.SELECT),e._resetInsertionMode(),e.onEndTag(t)):LO(e,t)}function ote(e,t){switch(t.tagID){case v.BASE:case v.BASEFONT:case v.BGSOUND:case v.LINK:case v.META:case v.NOFRAMES:case v.SCRIPT:case v.STYLE:case v.TEMPLATE:case v.TITLE:{si(e,t);break}case v.CAPTION:case v.COLGROUP:case v.TBODY:case v.TFOOT:case v.THEAD:{e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,pu(e,t);break}case v.COL:{e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,Aw(e,t);break}case v.TR:{e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,Rx(e,t);break}case v.TD:case v.TH:{e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,Lx(e,t);break}default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,Tr(e,t)}}function lte(e,t){t.tagID===v.TEMPLATE&&Al(e,t)}function FO(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(v.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):jw(e,t)}function cte(e,t){t.tagID===v.HTML?Tr(e,t):Tg(e,t)}function BO(e,t){var n;if(t.tagID===v.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===v.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Tg(e,t)}function Tg(e,t){e.insertionMode=$.IN_BODY,Ox(e,t)}function ute(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.FRAMESET:{e._insertElement(t,ie.HTML);break}case v.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case v.NOFRAMES:{si(e,t);break}}}function dte(e,t){t.tagID===v.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==v.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function hte(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.NOFRAMES:{si(e,t);break}}}function fte(e,t){t.tagID===v.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function pte(e,t){t.tagID===v.HTML?Tr(e,t):om(e,t)}function om(e,t){e.insertionMode=$.IN_BODY,Ox(e,t)}function mte(e,t){switch(t.tagID){case v.HTML:{Tr(e,t);break}case v.NOFRAMES:{si(e,t);break}}}function gte(e,t){t.chars=Jt,e._insertCharacters(t)}function xte(e,t){e._insertCharacters(t),e.framesetOk=!1}function UO(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.o
565penElements.current);)e.openElements.pop()}function yte(e,t){if(DZ(t))UO(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?EO(t):r===ie.SVG&&(OZ(t),NO(t)),Sw(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function bte(e,t){if(t.tagID===v.P||t.tagID===v.BR){UO(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===ie.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const vte=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,_te=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),SC={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function $O(e,t){const n=Ite(e),r=WD("type",{handlers:{root:wte,element:Ete,text:Nte,comment:HO,doctype:kte,raw:Ste},unknown:Cte}),s={parser:n?new NC(SC):NC.getFragmentParser(void 0,SC),handle(l){r(l,s)},stitches:!1,options:t||{}};r(e,s),Fu(s,Ci());const i=n?s.parser.document:s.parser.getFragment(),a=PJ(i,{file:s.options.file});return s.stitches&&Px(a,"comment",function(l,c,u){const d=l;if(d.value.stitch&&u&&c!==void 0){const h=u.children;return h[c]=d.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function zO(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function wte(e,t){zO(e.children,t)}function Ete(e,t){jte(e,t),zO(e.children,t),Ate(e,t)}function Nte(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:tt.CHARACTER,chars:e.value,location:Of(e)};Fu(t,Ci(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function kte(e,t){const n={type:tt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Of(e)};Fu(t,Ci(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Tte(e,t){t.stitches=!0;const n=Pte(e);if("children"in e&&"children"in n){const r=$O({type:"root",children:e.children},t.options);n.children=r.children}HO({type:"comment",value:{stitch:n}},t)}function HO(e,t){const n=e.value,r={type:tt.COMMENT,data:n,location:Of(e)};Fu(t,Ci(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ste(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,WO(t,Ci(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(vte,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Cte(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Tte(n,t);else{let r="";throw _te.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function Fu(e,t){WO(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Sn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function WO(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function jte(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Sn.PLAINTEXT)return;Fu(t,Ci(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Xo.html;s===Xo.html&&n==="svg"&&(s=Xo.svg);const i=LJ({...e,children:[]},{space:s===Xo.svg?"svg":"html"}),a={type:tt.START_TAG,tagName:n,tagID:Lu(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Of(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ate(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&VJ.includes(n)||t.parser.tokenizer.state===Sn.PLAINTEXT)return;Fu(t,Tx(e));const r={type:tt.END_TAG,tagName:n,tagID:Lu(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Of(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Sn.RCDATA||t.parser.tokenizer.state===Sn.RAWTEXT||t.parser.tokenizer.state===Sn.SCRIPT_DATA)&&(t.parser.tokenizer.state=Sn.DATA)}function Ite(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Of(e){const t=Ci(e)||{line:void 0,column:void 0,offset:void 0},n=Tx(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Pte(e){return"children"in e?fu({...e,children:[]}):fu(e)}function Dte(e){return function(t,n){return $O(t,{...e,file:n})}}const Ote="pave_onboarding_v1";function Mte(){return Promise.all([G.orgs.list(),G.roles.list(),G.projects.list(),G.stories.list()]).then(([e,t,n,r])=>({orgs:e,roles:t,projects:n,stories:r}))}function Mf(){const{data:e}=wt({queryKey:["kb"],queryFn:Mte,staleTime:3e4}),t=e!==void 0,r=t&&e.projects.length===0&&e.roles.length===0,s=t&&e.orgs.length>0&&e.roles.length>0,i=y.useCallback(()=>{localStorage.setItem(Ote,"complete")},[]);return{isNewUser:r,kbLoaded:t,hasMinimalKB:s,completeOnboarding:i}}function VO(e="base"){const t=e==="sm"?"text-sm":"text-base";return{p:({children:n})=>o.jsx("p",{className:`${t} text-text leading-relaxed`,children:n}),strong:({children:n})=>o.jsx("strong",{className:"font-semibold text-text",children:n}),em:({children:n})=>o.jsx("em",{className:"italic",children:n}),ul:({children:n})=>o.jsx("ul",{className:`list-disc list-outside ml-5 space-y-1 ${t} text-text leading-relaxed`,children:n}),ol:({children:n})=>o.jsx("ol",{className:`list-decimal list-outside ml-5 space-y-1 ${t} text-text leading-relaxed`,children:n}),li:({children:n})=>o.jsx("li",{className:"leading-relaxed",children:n}),h1:({children:n})=>o.jsx("h1",{className:"text-base font-semibold text-text mt-2 mb-1",children:n}),h2:({children:n})=>o.jsx("h2",{className:"text-base font-semibold text-text mt-2 mb-1",children:n}),h3:({children:n})=>o.jsx("h3",{className:"text-sm font-semibold text-text mt-1 mb-1",children:n}),code:({children:n,className:r})=>/language-/.test(r||"")?o.jsx("pre",{className:"bg-bg-tertiary border border-border-subtle rounded-lg p-3 text-xs overflow-x-auto my-2",children:o.jsx("code",{className:"text-text-secondary",children:n})}):o.jsx("code",{className:"px-1.5 py-0.5 rounded bg-bg-tertiary text-accent text-sm font-mono",children:n}),a:({children:n,href:r})=>o.jsx("a",{href:r,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n}),blockquote:({children:n})=>o.jsx("blockquote",{className:"border-l-2 border-border pl-3 text-text-secondary italic",children:n}),hr:()=>o.jsx("hr",{className:"border-border-subtle my-3"})}}const qO=VO("base"),Rte=VO("sm");var YO={exports:{}};(function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},n=-1,r=1,s=0;t.Diff=function(i,a){return[i,a]},t.prototype.diff_main=function(i,a,l,c){typeof c>"u"&&(this.Diff_Timeout<=0?c=Number.MAX_VALUE:c=new Date().getTime()+this.Diff_Timeout*1e3);var u=c;if(i==null||a==null)throw new Error("Null input. (diff_main)");if(i==a)return i?[new t.Diff(s,i)]:[];typeof l>"u"&&(l=!0);var d=l,h=this.diff_commonPrefix(i,a),f=i.substring(0,h);i=i.substring(h),a=a.substring(h),h=this.diff_commonSuffix(i,a);var p=i.substring(i.length-h);i=i.substring(0,i.length-h),a=a.substring(0,a.length-h);var m=this.diff_compute_(i,a,d,u);return f&&m.unshift(new t.Diff(s,f)),p&&m.push(new t.Diff(s,p)),this.diff_cleanupMerge(m),m},t.prototype.diff_compute_=function(i,a,l,c){var u;if(!i)return[new t.Diff(r,a)];if(!a)return[new t.Diff(n,i)];var d=i.length>a.length?i:a,h=i.length>a.length?a:i,f=d.indexOf(h);if(f!=-1)return u=[new t.Diff(r,d.substring(0,f)),new t.Diff(s,h),new t.Diff(r,d.substring(f+h.length))],i.length>a.length&&(u[0][0]=u[2][0]=n),u;if(h.length==1)return[new t.Diff(n,i),new t.Diff(r,a)];var p=this.diff_halfMatch_(i,a);if(p){var m=p[0],x=p[1],w=p[2],g=p[3],b=p[4],_=this.diff_main(m,w,l,c),k=this.diff_main(x,g,l,c);return _.concat([new t.Diff(s,b)],k)}return l&&i.length>100&&a.length>100?this.diff_lineMode_(i,a,c):this.diff_bisect_(i,a,c)},t.prototype.diff_lineMode_=function(i,a,l){var c=this.diff_linesToChars_(i,a);i=c.chars1,a=c.chars2;var u=c.lineArray,d=this.diff_main(i,a,!1,l);this.diff_charsToLines_(d,u),this.diff_cleanupSemantic(d),d.push(new t.Diff(s,""));for(var h=0,f=0,p=0,m="",x="";h<d.length;){switch(d[h][0]){case r:p++,x+=d[h][1];break;case n:f++,m+=d[h][1];break;case s:if(f>=1&&p>=1){d.splice(h-f-p,f+p),h=h-f-p;for(var w=this.diff_main(m,x,!1,l),g=w.length-1;g>=0;g--)d.splice(h,0,w[g]);h=h+w.length}p=0,f=0,m="",x="";break}h++}return d.pop(),d},t.prototype.diff_bisect_=function(i,a,l){for(var c=i.length,u=a.length,d=Math.ceil((c+u)/2),h=d,f=2*d,p=new Array(f),m=new Array(f),x=0;x<f;x++)p[x]=-1,m[x]=-1;p[h+1]=0,m[h+1]=0;for(var w=c-u,g=w%2!=0,b=0,_=0,k=0,T=0,N=0;N<d&&!(new Date().getTime()>l);N++){for(var C=-N+b;C<=N-_;C+=2){var S=h+C,I;C==-N||C!=N&&p[S-1]<p[S+1]?I=p[S+1]:I=p[S-1]+1;for(var E=I-C;I<c&&E<u&&i.charAt(I)==a.charAt(E);)I++,E++;if(p[S]=I,I>c)_+=2;else if(E>u)b+=2;else if(g){var j=h+w-C;if(j>=0&&j<f&&m[j]!=-1){var P=c-m[j];if(I>=P)return this.diff_bisectSplit_(i,a,I,E,l)}}}for(var L=-N+k;L<=N-T;L+=2){var j=h+L,P;
565L==-N||L!=N&&m[j-1]<m[j+1]?P=m[j+1]:P=m[j-1]+1;for(var z=P-L;P<c&&z<u&&i.charAt(c-P-1)==a.charAt(u-z-1);)P++,z++;if(m[j]=P,P>c)T+=2;else if(z>u)k+=2;else if(!g){var S=h+w-L;if(S>=0&&S<f&&p[S]!=-1){var I=p[S],E=h+I-S;if(P=c-P,I>=P)return this.diff_bisectSplit_(i,a,I,E,l)}}}}return[new t.Diff(n,i),new t.Diff(r,a)]},t.prototype.diff_bisectSplit_=function(i,a,l,c,u){var d=i.substring(0,l),h=a.substring(0,c),f=i.substring(l),p=a.substring(c),m=this.diff_main(d,h,!1,u),x=this.diff_main(f,p,!1,u);return m.concat(x)},t.prototype.diff_linesToChars_=function(i,a){var l=[],c={};l[0]="";function u(p){for(var m="",x=0,w=-1,g=l.length;w<p.length-1;){w=p.indexOf(` 566`,x),w==-1&&(w=p.length-1);var b=p.substring(x,w+1);(c.hasOwnProperty?c.hasOwnProperty(b):c[b]!==void 0)?m+=String.fromCharCode(c[b]):(g==d&&(b=p.substring(x),w=p.length),m+=String.fromCharCode(g),c[b]=g,l[g++]=b),x=w+1}return m}var d=4e4,h=u(i);d=65535;var f=u(a);return{chars1:h,chars2:f,lineArray:l}},t.prototype.diff_charsToLines_=function(i,a){for(var l=0;l<i.length;l++){for(var c=i[l][1],u=[],d=0;d<c.length;d++)u[d]=a[c.charCodeAt(d)];i[l][1]=u.join("")}},t.prototype.diff_commonPrefix=function(i,a){if(!i||!a||i.charAt(0)!=a.charAt(0))return 0;for(var l=0,c=Math.min(i.length,a.length),u=c,d=0;l<u;)i.substring(d,u)==a.substring(d,u)?(l=u,d=l):c=u,u=Math.floor((c-l)/2+l);return u},t.prototype.diff_commonSuffix=function(i,a){if(!i||!a||i.charAt(i.length-1)!=a.charAt(a.length-1))return 0;for(var l=0,c=Math.min(i.length,a.length),u=c,d=0;l<u;)i.substring(i.length-u,i.length-d)==a.substring(a.length-u,a.length-d)?(l=u,d=l):c=u,u=Math.floor((c-l)/2+l);return u},t.prototype.diff_commonOverlap_=function(i,a){var l=i.length,c=a.length;if(l==0||c==0)return 0;l>c?i=i.substring(l-c):l<c&&(a=a.substring(0,l));var u=Math.min(l,c);if(i==a)return u;for(var d=0,h=1;;){var f=i.substring(u-h),p=a.indexOf(f);if(p==-1)return d;h+=p,(p==0||i.substring(u-h)==a.substring(0,h))&&(d=h,h++)}},t.prototype.diff_halfMatch_=function(i,a){if(this.Diff_Timeout<=0)return null;var l=i.length>a.length?i:a,c=i.length>a.length?a:i;if(l.length<4||c.length*2<l.length)return null;var u=this;function d(_,k,T){for(var N=_.substring(T,T+Math.floor(_.length/4)),C=-1,S="",I,E,j,P;(C=k.indexOf(N,C+1))!=-1;){var L=u.diff_commonPrefix(_.substring(T),k.substring(C)),z=u.diff_commonSuffix(_.substring(0,T),k.substring(0,C));S.length<z+L&&(S=k.substring(C-z,C)+k.substring(C,C+L),I=_.substring(0,T-z),E=_.substring(T+L),j=k.substring(0,C-z),P=k.substring(C+L))}return S.length*2>=_.length?[I,E,j,P,S]:null}var h=d(l,c,Math.ceil(l.length/4)),f=d(l,c,Math.ceil(l.length/2)),p;if(!h&&!f)return null;f?h?p=h[4].length>f[4].length?h:f:p=f:p=h;var m,x,w,g;i.length>a.length?(m=p[0],x=p[1],w=p[2],g=p[3]):(w=p[0],g=p[1],m=p[2],x=p[3]);var b=p[4];return[m,x,w,g,b]},t.prototype.diff_cleanupSemantic=function(i){for(var a=!1,l=[],c=0,u=null,d=0,h=0,f=0,p=0,m=0;d<i.length;)i[d][0]==s?(l[c++]=d,h=p,f=m,p=0,m=0,u=i[d][1]):(i[d][0]==r?p+=i[d][1].length:m+=i[d][1].length,u&&u.length<=Math.max(h,f)&&u.length<=Math.max(p,m)&&(i.splice(l[c-1],0,new t.Diff(n,u)),i[l[c-1]+1][0]=r,c--,c--,d=c>0?l[c-1]:-1,h=0,f=0,p=0,m=0,u=null,a=!0)),d++;for(a&&this.diff_cleanupMerge(i),this.diff_cleanupSemanticLossless(i),d=1;d<i.length;){if(i[d-1][0]==n&&i[d][0]==r){var x=i[d-1][1],w=i[d][1],g=this.diff_commonOverlap_(x,w),b=this.diff_commonOverlap_(w,x);g>=b?(g>=x.length/2||g>=w.length/2)&&(i.splice(d,0,new t.Diff(s,w.substring(0,g))),i[d-1][1]=x.substring(0,x.length-g),i[d+1][1]=w.substring(g),d++):(b>=x.length/2||b>=w.length/2)&&(i.splice(d,0,new t.Diff(s,x.substring(0,b))),i[d-1][0]=r,i[d-1][1]=w.substring(0,w.length-b),i[d+1][0]=n,i[d+1][1]=x.substring(b),d++),d++}d++}},t.prototype.diff_cleanupSemanticLossless=function(i){function a(b,_){if(!b||!_)return 6;var k=b.charAt(b.length-1),T=_.charAt(0),N=k.match(t.nonAlphaNumericRegex_),C=T.match(t.nonAlphaNumericRegex_),S=N&&k.match(t.whitespaceRegex_),I=C&&T.match(t.whitespaceRegex_),E=S&&k.match(t.linebreakRegex_),j=I&&T.match(t.linebreakRegex_),P=E&&b.match(t.blanklineEndRegex_),L=j&&_.match(t.blanklineStartRegex_);return P||L?5:E||j?4:N&&!S&&I?3:S||I?2:N||C?1:0}for(var l=1;l<i.length-1;){if(i[l-1][0]==s&&i[l+1][0]==s){var c=i[l-1][1],u=i[l][1],d=i[l+1][1],h=this.diff_commonSuffix(c,u);if(h){var f=u.substring(u.length-h);c=c.substring(0,c.length-h),u=f+u.substring(0,u.length-h),d=f+d}for(var p=c,m=u,x=d,w=a(c,u)+a(u,d);u.charAt(0)===d.charAt(0);){c+=u.charAt(0),u=u.substring(1)+d.charAt(0),d=d.substring(1);var g=a(c,u)+a(u,d);g>=w&&(w=g,p=c,m=u,x=d)}i[l-1][1]!=p&&(p?i[l-1][1]=p:(i.splice(l-1,1),l--),i[l][1]=m,x?i[l+1][1]=x:(i.splice(l+1,1),l--))}l++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(i){for(var a=!1,l=[],c=0,u=null,d=0,h=!1,f=!1,p=!1,m=!1;d<i.length;)i[d][0]==s?(i[d][1].length<this.Diff_EditCost&&(p||m)?(l[c++]=d,h=p,f=m,u=i[d][1]):(c=0,u=null),p=m=!1):(i[d][0]==n?m=!0:p=!0,u&&(h&&f&&p&&m||u.length<this.Diff_EditCost/2&&h+f+p+m==3)&&(i.splice(l[c-1],0,new t.Diff(n,u)),i[l[c-1]+1][0]=r,c--,u=null,h&&f?(p=m=!0,c=0):(c--,d=c>0?l[c-1]:-1,p=m=!1),a=!0)),d++;a&&this.diff_cleanupMerge(i)},t.prototype.diff_cleanupMerge=function(i){i.push(new t.Diff(s,""));for(var a=0,l=0,c=0,u="",d="",h;a<i.length;)switch(i[a][0]){case r:c++,d+=i[a][1],a++;break;case n:l++,u+=i[a][1],a++;break;case s:l+c>1?(l!==0&&c!==0&&(h=this.diff_commonPrefix(d,u),h!==0&&(a-l-c>0&&i[a-l-c-1][0]==s?i[a-l-c-1][1]+=d.substring(0,h):(i.splice(0,0,new t.Diff(s,d.substring(0,h))),a++),d=d.substring(h),u=u.substring(h)),h=this.diff_commonSuffix(d,u),h!==0&&(i[a][1]=d.substring(d.length-h)+i[a][1],d=d.substring(0,d.length-h),u=u.substring(0,u.length-h))),a-=l+c,i.splice(a,l+c),u.length&&(i.splice(a,0,new t.Diff(n,u)),a++),d.length&&(i.splice(a,0,new t.Diff(r,d)),a++),a++):a!==0&&i[a-1][0]==s?(i[a-1][1]+=i[a][1],i.splice(a,1)):a++,c=0,l=0,u="",d="";break}i[i.length-1][1]===""&&i.pop();var f=!1;for(a=1;a<i.length-1;
566)i[a-1][0]==s&&i[a+1][0]==s&&(i[a][1].substring(i[a][1].length-i[a-1][1].length)==i[a-1][1]?(i[a][1]=i[a-1][1]+i[a][1].substring(0,i[a][1].length-i[a-1][1].length),i[a+1][1]=i[a-1][1]+i[a+1][1],i.splice(a-1,1),f=!0):i[a][1].substring(0,i[a+1][1].length)==i[a+1][1]&&(i[a-1][1]+=i[a+1][1],i[a][1]=i[a][1].substring(i[a+1][1].length)+i[a+1][1],i.splice(a+1,1),f=!0)),a++;f&&this.diff_cleanupMerge(i)},t.prototype.diff_xIndex=function(i,a){var l=0,c=0,u=0,d=0,h;for(h=0;h<i.length&&(i[h][0]!==r&&(l+=i[h][1].length),i[h][0]!==n&&(c+=i[h][1].length),!(l>a));h++)u=l,d=c;return i.length!=h&&i[h][0]===n?d:d+(a-u)},t.prototype.diff_prettyHtml=function(i){for(var a=[],l=/&/g,c=/</g,u=/>/g,d=/\n/g,h=0;h<i.length;h++){var f=i[h][0],p=i[h][1],m=p.replace(l,"&").replace(c,"<").replace(u,">").replace(d,"¶<br>");switch(f){case r:a[h]='<ins style="background:#e6ffe6;">'+m+"</ins>";break;case n:a[h]='<del style="background:#ffe6e6;">'+m+"</del>";break;case s:a[h]="<span>"+m+"</span>";break}}return a.join("")},t.prototype.diff_text1=function(i){for(var a=[],l=0;l<i.length;l++)i[l][0]!==r&&(a[l]=i[l][1]);return a.join("")},t.prototype.diff_text2=function(i){for(var a=[],l=0;l<i.length;l++)i[l][0]!==n&&(a[l]=i[l][1]);return a.join("")},t.prototype.diff_levenshtein=function(i){for(var a=0,l=0,c=0,u=0;u<i.length;u++){var d=i[u][0],h=i[u][1];switch(d){case r:l+=h.length;break;case n:c+=h.length;break;case s:a+=Math.max(l,c),l=0,c=0;break}}return a+=Math.max(l,c),a},t.prototype.diff_toDelta=function(i){for(var a=[],l=0;l<i.length;l++)switch(i[l][0]){case r:a[l]="+"+encodeURI(i[l][1]);break;case n:a[l]="-"+i[l][1].length;break;case s:a[l]="="+i[l][1].length;break}return a.join(" ").replace(/%20/g," ")},t.prototype.diff_fromDelta=function(i,a){for(var l=[],c=0,u=0,d=a.split(/\t/g),h=0;h<d.length;h++){var f=d[h].substring(1);switch(d[h].charAt(0)){case"+":try{l[c++]=new t.Diff(r,decodeURI(f))}catch{throw new Error("Illegal escape in diff_fromDelta: "+f)}break;case"-":case"=":var p=parseInt(f,10);if(isNaN(p)||p<0)throw new Error("Invalid number in diff_fromDelta: "+f);var m=i.substring(u,u+=p);d[h].charAt(0)=="="?l[c++]=new t.Diff(s,m):l[c++]=new t.Diff(n,m);break;default:if(d[h])throw new Error("Invalid diff operation in diff_fromDelta: "+d[h])}}if(u!=i.length)throw new Error("Delta length ("+u+") does not equal source text length ("+i.length+").");return l},t.prototype.match_main=function(i,a,l){if(i==null||a==null||l==null)throw new Error("Null input. (match_main)");return l=Math.max(0,Math.min(l,i.length)),i==a?0:i.length?i.substring(l,l+a.length)==a?l:this.match_bitap_(i,a,l):-1},t.prototype.match_bitap_=function(i,a,l){if(a.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var c=this.match_alphabet_(a),u=this;function d(I,E){var j=I/a.length,P=Math.abs(l-E);return u.Match_Distance?j+P/u.Match_Distance:P?1:j}var h=this.Match_Threshold,f=i.indexOf(a,l);f!=-1&&(h=Math.min(d(0,f),h),f=i.lastIndexOf(a,l+a.length),f!=-1&&(h=Math.min(d(0,f),h)));var p=1<<a.length-1;f=-1;for(var m,x,w=a.length+i.length,g,b=0;b<a.length;b++){for(m=0,x=w;m<x;)d(b,l+x)<=h?m=x:w=x,x=Math.floor((w-m)/2+m);w=x;var _=Math.max(1,l-x+1),k=Math.min(l+x,i.length)+a.length,T=Array(k+2);T[k+1]=(1<<b)-1;for(var N=k;N>=_;N--){var C=c[i.charAt(N-1)];if(b===0?T[N]=(T[N+1]<<1|1)&C:T[N]=(T[N+1]<<1|1)&C|((g[N+1]|g[N])<<1|1)|g[N+1],T[N]&p){var S=d(b,N-1);if(S<=h)if(h=S,f=N-1,f>l)_=Math.max(1,2*l-f);else break}}if(d(b+1,l)>h)break;g=T}return f},t.prototype.match_alphabet_=function(i){for(var a={},l=0;l<i.length;l++)a[i.charAt(l)]=0;for(var l=0;l<i.length;l++)a[i.charAt(l)]|=1<<i.length-l-1;return a},t.prototype.patch_addContext_=function(i,a){if(a.length!=0){if(i.start2===null)throw Error("patch not initialized");for(var l=a.substring(i.start2,i.start2+i.length1),c=0;a.indexOf(l)!=a.lastIndexOf(l)&&l.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)c+=this.Patch_Margin,l=a.substring(i.start2-c,i.start2+i.length1+c);c+=this.Patch_Margin;var u=a.substring(i.start2-c,i.start2);u&&i.diffs.unshift(new t.Diff(s,u));var d=a.substring(i.start2+i.length1,i.start2+i.length1+c);d&&i.diffs.push(new t.Diff(s,d)),i.start1-=u.length,i.start2-=u.length,i.length1+=u.length+d.length,i.length2+=u.length+d.length}},t.prototype.patch_make=function(i,a,l){var c,u;
566if(typeof i=="string"&&typeof a=="string"&&typeof l>"u")c=i,u=this.diff_main(c,a,!0),u.length>2&&(this.diff_cleanupSemantic(u),this.diff_cleanupEfficiency(u));else if(i&&typeof i=="object"&&typeof a>"u"&&typeof l>"u")u=i,c=this.diff_text1(u);else if(typeof i=="string"&&a&&typeof a=="object"&&typeof l>"u")c=i,u=a;else if(typeof i=="string"&&typeof a=="string"&&l&&typeof l=="object")c=i,u=l;else throw new Error("Unknown call format to patch_make.");if(u.length===0)return[];for(var d=[],h=new t.patch_obj,f=0,p=0,m=0,x=c,w=c,g=0;g<u.length;g++){var b=u[g][0],_=u[g][1];switch(!f&&b!==s&&(h.start1=p,h.start2=m),b){case r:h.diffs[f++]=u[g],h.length2+=_.length,w=w.substring(0,m)+_+w.substring(m);break;case n:h.length1+=_.length,h.diffs[f++]=u[g],w=w.substring(0,m)+w.substring(m+_.length);break;case s:_.length<=2*this.Patch_Margin&&f&&u.length!=g+1?(h.diffs[f++]=u[g],h.length1+=_.length,h.length2+=_.length):_.length>=2*this.Patch_Margin&&f&&(this.patch_addContext_(h,x),d.push(h),h=new t.patch_obj,f=0,x=w,p=m);break}b!==r&&(p+=_.length),b!==n&&(m+=_.length)}return f&&(this.patch_addContext_(h,x),d.push(h)),d},t.prototype.patch_deepCopy=function(i){for(var a=[],l=0;l<i.length;l++){var c=i[l],u=new t.patch_obj;u.diffs=[];for(var d=0;d<c.diffs.length;d++)u.diffs[d]=new t.Diff(c.diffs[d][0],c.diffs[d][1]);u.start1=c.start1,u.start2=c.start2,u.length1=c.length1,u.length2=c.length2,a[l]=u}return a},t.prototype.patch_apply=function(i,a){if(i.length==0)return[a,[]];i=this.patch_deepCopy(i);var l=this.patch_addPadding(i);a=l+a+l,this.patch_splitMax(i);for(var c=0,u=[],d=0;d<i.length;d++){var h=i[d].start2+c,f=this.diff_text1(i[d].diffs),p,m=-1;if(f.length>this.Match_MaxBits?(p=this.match_main(a,f.substring(0,this.Match_MaxBits),h),p!=-1&&(m=this.match_main(a,f.substring(f.length-this.Match_MaxBits),h+f.length-this.Match_MaxBits),(m==-1||p>=m)&&(p=-1))):p=this.match_main(a,f,h),p==-1)u[d]=!1,c-=i[d].length2-i[d].length1;else{u[d]=!0,c=p-h;var x;if(m==-1?x=a.substring(p,p+f.length):x=a.substring(p,m+this.Match_MaxBits),f==x)a=a.substring(0,p)+this.diff_text2(i[d].diffs)+a.substring(p+f.length);else{var w=this.diff_main(f,x,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(w)/f.length>this.Patch_DeleteThreshold)u[d]=!1;else{this.diff_cleanupSemanticLossless(w);for(var g=0,b,_=0;_<i[d].diffs.length;_++){var k=i[d].diffs[_];k[0]!==s&&(b=this.diff_xIndex(w,g)),k[0]===r?a=a.substring(0,p+b)+k[1]+a.substring(p+b):k[0]===n&&(a=a.substring(0,p+b)+a.substring(p+this.diff_xIndex(w,g+k[1].length))),k[0]!==n&&(g+=k[1].length)}}}}}return a=a.substring(l.length,a.length-l.length),[a,u]},t.prototype.patch_addPadding=function(i){for(var a=this.Patch_Margin,l="",c=1;c<=a;c++)l+=String.fromCharCode(c);for(var c=0;c<i.length;c++)i[c].start1+=a,i[c].start2+=a;var u=i[0],d=u.diffs;if(d.length==0||d[0][0]!=s)d.unshift(new t.Diff(s,l)),u.start1-=a,u.start2-=a,u.length1+=a,u.length2+=a;else if(a>d[0][1].length){var h=a-d[0][1].length;d[0][1]=l.substring(d[0][1].length)+d[0][1],u.start1-=h,u.start2-=h,u.length1+=h,u.length2+=h}if(u=i[i.length-1],d=u.diffs,d.length==0||d[d.length-1][0]!=s)d.push(new t.Diff(s,l)),u.length1+=a,u.length2+=a;else if(a>d[d.length-1][1].length){var h=a-d[d.length-1][1].length;d[d.length-1][1]+=l.substring(0,h),u.length1+=h,u.length2+=h}return l},t.prototype.patch_splitMax=function(i){for(var a=this.Match_MaxBits,l=0;l<i.length;l++)if(!(i[l].length1<=a)){var c=i[l];i.splice(l--,1);for(var u=c.start1,d=c.start2,h="";c.diffs.length!==0;){var f=new t.patch_obj,p=!0;for(f.start1=u-h.length,f.start2=d-h.length,h!==""&&(f.length1=f.length2=h.length,f.diffs.push(new t.Diff(s,h)));c.diffs.length!==0&&f.length1<a-this.Patch_Margin;){var m=c.diffs[0][0],x=c.diffs[0][1];m===r?(f.length2+=x.length,d+=x.length,f.diffs.push(c.diffs.shift()),p=!1):m===n&&f.diffs.length==1&&f.diffs[0][0]==s&&x.length>2*a?(f.length1+=x.length,u+=x.length,p=!1,f.diffs.push(new t.Diff(m,x)),c.diffs.shift()):(x=x.substring(0,a-f.length1-this.Patch_Margin),f.length1+=x.length,u+=x.length,m===s?(f.length2+=x.length,d+=x.length):p=!1,f.diffs.push(new t.Diff(m,x)),x==c.diffs[0][1]?c.diffs.shift():c.diffs[0][1]=c.diffs[0][1].substring(x.length))}h=this.diff_text2(f.diffs),h=h.substring(h.length-this.Patch_Margin);var w=this.diff_text1(c.diffs).substring(0,this.Patch_Margin);w!==""&&(f.length1+=w.length,f.length2+=w.length,f.diffs.length!==0&&f.diffs[f.diffs.length-1][0]===s?f.diffs[f.diffs.length-1][1]+=w:f.diffs.push(new t.Diff(s,w))),p||i.splice(++l,0,f)}}},t.prototype.patch_toText=function(i){for(var a=[],l=0;l<i.length;l++)a[l]=i[l];return a.join("")},t.prototype.patch_fromText=function(i){var a=[];if(!i)return a;for(var l=i.split(` 567`),c=0,u=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;c<l.length;){var d=l[c].match(u);if(!d)throw new Error("Invalid patch string: "+l[c]);var h=new t.patch_obj;for(a.push(h),h.start1=parseInt(d[1],10),d[2]===""?(h.start1--,h.length1=1):d[2]=="0"?h.length1=0:(h.start1--,h.length1=parseInt(d[2],10)),h.start2=parseInt(d[3],10),d[4]===""?(h.start2--,h.length2=1):d[4]=="0"?h.length2=0:(h.start2--,h.length2=parseInt(d[4],10)),c++;c<l.length;){var f=l[c].charAt(0);try{var p=decodeURI(l[c].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+p)}if(f=="-")h.diffs.push(new t.Diff(n,p));else if(f=="+")h.diffs.push(new t.Diff(r,p));else if(f==" ")h.diffs.push(new t.Diff(s,p));else{if(f=="@")break;if(f!=="")throw new Error('Invalid patch mode "'+f+'" in: '+p)}c++}}return a},t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},t.patch_obj.prototype.toString=function(){var i,a;this.length1===0?i=this.start1+",0":this.length1==1?i=this.start1+1:i=this.start1+1+","+this.length1,this.length2===0?a=this.start2+",0":this.length2==1?a=this.start2+1:a=this.start2+1+","+this.length2;
567for(var l=["@@ -"+i+" +"+a+` @@ 568`],c,u=0;u<this.diffs.length;u++){switch(this.diffs[u][0]){case r:c="+";break;case n:c="-";break;case s:c=" ";break}l[u+1]=c+encodeURI(this.diffs[u][1])+` 569`}return l.join("").replace(/%20/g," ")},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=n,e.exports.DIFF_INSERT=r,e.exports.DIFF_EQUAL=s})(YO);var Lte=YO.exports;const Ty=Lg(Lte),Fte=[["New York","NY"],["Los Angeles","CA"],["Chicago","IL"],["Houston","TX"],["Phoenix","AZ"],["Philadelphia","PA"],["San Antonio","TX"],["San Diego","CA"],["Dallas","TX"],["San Jose","CA"],["Austin","TX"],["Jacksonville","FL"],["Fort Worth","TX"],["Columbus","OH"],["Charlotte","NC"],["Indianapolis","IN"],["San Francisco","CA"],["Seattle","WA"],["Denver","CO"],["Nashville","TN"],["Oklahoma City","OK"],["El Paso","TX"],["Washington","DC"],["Boston","MA"],["Las Vegas","NV"],["Portland","OR"],["Louisville","KY"],["Memphis","TN"],["Baltimore","MD"],["Milwaukee","WI"],["Albuquerque","NM"],["Tucson","AZ"],["Fresno","CA"],["Sacramento","CA"],["Mesa","AZ"],["Kansas City","MO"],["Atlanta","GA"],["Omaha","NE"],["Colorado Springs","CO"],["Raleigh","NC"],["Long Beach","CA"],["Virginia Beach","VA"],["Minneapolis","MN"],["Tampa","FL"],["New Orleans","LA"],["Arlington","TX"],["Bakersfield","CA"],["Honolulu","HI"],["Anaheim","CA"],["Aurora","CO"],["Santa Ana","CA"],["Corpus Christi","TX"],["Riverside","CA"],["Lexington","KY"],["St. Louis","MO"],["Pittsburgh","PA"],["Stockton","CA"],["Anchorage","AK"],["Cincinnati","OH"],["St. Paul","MN"],["Greensboro","NC"],["Toledo","OH"],["Newark","NJ"],["Plano","TX"],["Henderson","NV"],["Orlando","FL"],["Lincoln","NE"],["Jersey City","NJ"],["Chandler","AZ"],["St. Petersburg","FL"],["Laredo","TX"],["Norfolk","VA"],["Madison","WI"],["Durham","NC"],["Lubbock","TX"],["Winston-Salem","NC"],["Garland","TX"],["Glendale","AZ"],["Hialeah","FL"],["Reno","NV"],["Baton Rouge","LA"],["Irvine","CA"],["Chesapeake","VA"],["Irving","TX"],["Scottsdale","AZ"],["North Las Vegas","NV"],["Fremont","CA"],["Gilbert","AZ"],["San Bernardino","CA"],["Birmingham","AL"],["Rochester","NY"],["Richmond","VA"],["Spokane","WA"],["Des Moines","IA"],["Montgomery","AL"],["Modesto","CA"],["Fayetteville","NC"],["Tacoma","WA"],["Shreveport","LA"],["Fontana","CA"],["Moreno Valley","CA"],["Glendale","CA"],["Akron","OH"],["Huntington Beach","CA"],["Little Rock","AR"],["Columbus","GA"],["Augusta","GA"],["Grand Rapids","MI"],["Oxnard","CA"],["Tallahassee","FL"],["Worcester","MA"],["Knoxville","TN"],["Providence","RI"],["Brownsville","TX"],["Santa Clarita","CA"],["Garden Grove","CA"],["Oceanside","CA"],["Chattanooga","TN"],["Fort Lauderdale","FL"],["Rancho Cucamonga","CA"],["Salt Lake City","UT"],["Tempe","AZ"],["Cape Coral","FL"],["Ontario","CA"],["Elk Grove","CA"],["Overland Park","KS"],["Eugene","OR"],["Pembroke Pines","FL"],["Salem","OR"],["Corona","CA"],["Fort Collins","CO"],["Jackson","MS"],["Alexandria","VA"],["Hayward","CA"],["Lancaster","CA"],["Salinas","CA"],["Palmdale","CA"],["Sunnyvale","CA"],["Pomona","CA"],["Escondido","CA"],["Kansas City","KS"],["Rockford","IL"],["Torrance","CA"],["Paterson","NJ"],["Bridgeport","CT"],["Savannah","GA"],["Pasadena","TX"],["Syracuse","NY"],["Hollywood","FL"],["Macon","GA"],["Mesquite","TX"],["Lakewood","CO"],["Hampton","VA"],["Warren","MI"],["Bellevue","WA"],["Clarksville","TN"],["Surprise","AZ"],["Topeka","KS"],["Cary","NC"],["Murfreesboro","TN"],["Pasadena","CA"],["Fullerton","CA"],["Roseville","CA"],["Killeen","TX"],["Denton","TX"],["McAllen","TX"],["Dayton","OH"],["Miramar","FL"],["Olathe","KS"],["Sioux Falls","SD"],["Tallahassee","FL"],["Frisco","TX"],["Columbia","SC"],["Columbia","MO"],["Fargo","ND"],["Hartford","CT"],["Huntsville","AL"],["Glendale","WI"],["Tempe","AZ"],["Springfield","MO"],["Springfield","IL"],["Springfield","MA"],["Vancouver","WA"],["Santa Rosa","CA"],["Peoria","IL"],["Peoria","AZ"],["Boise","ID"],["Tacoma","WA"],["Amarillo","TX"],["Buffalo","NY"],["Yonkers","NY"],["Chandler","AZ"],["Scottsdale","AZ"],["Reno","NV"],["Laredo","TX"],["Lubbock","TX"],["Chula Vista","CA"],["Fort Wayne","IN"],["St. Petersburg","FL"],["Chandler","AZ"],["Plano","TX"],["Anchorage","AK"],["Hen
569derson","NV"],["Palo Alto","CA"],["Mountain View","CA"],["Menlo Park","CA"],["Cupertino","CA"],["Redwood City","CA"],["San Mateo","CA"],["Oakland","CA"],["Berkeley","CA"],["Santa Cruz","CA"],["Santa Barbara","CA"],["San Luis Obispo","CA"],["Burbank","CA"],["Santa Monica","CA"],["Beverly Hills","CA"],["Culver City","CA"],["Thousand Oaks","CA"],["Ventura","CA"],["Inglewood","CA"],["Compton","CA"],["Downey","CA"],["Costa Mesa","CA"],["Santa Clara","CA"],["Sunnyvale","CA"],["San Ramon","CA"],["Walnut Creek","CA"],["Concord","CA"],["Richmond","CA"],["Vallejo","CA"],["Antioch","CA"],["Daly City","CA"],["South San Francisco","CA"],["Burlingame","CA"],["San Bruno","CA"],["Milpitas","CA"],["Fremont","CA"],["Union City","CA"],["Newark","CA"],["Livermore","CA"],["Pleasanton","CA"],["Dublin","CA"],["Napa","CA"],["Petaluma","CA"],["Novato","CA"],["Evanston","IL"],["Naperville","IL"],["Aurora","IL"],["Joliet","IL"],["Elgin","IL"],["Waukegan","IL"],["Cicero","IL"],["Champaign","IL"],["Bloomington","IL"],["Decatur","IL"],["Peoria","IL"],["Rockford","IL"],["Hoboken","NJ"],["Edison","NJ"],["Woodbridge","NJ"],["Hamilton","NJ"],["Trenton","NJ"],["Camden","NJ"],["Clifton","NJ"],["Passaic","NJ"],["Ann Arbor","MI"],["Flint","MI"],["Lansing","MI"],["Sterling Heights","MI"],["Detroit","MI"],["Dearborn","MI"],["Livonia","MI"],["Troy","MI"],["Cambridge","MA"],["Lowell","MA"],["New Bedford","MA"],["Brockton","MA"],["Quincy","MA"],["Lynn","MA"],["Fall River","MA"],["Newton","MA"],["Miami","FL"],["Hialeah","FL"],["Tampa","FL"],["Orlando","FL"],["Jacksonville","FL"],["St. Petersburg","FL"],["Fort Lauderdale","FL"],["Pembroke Pines","FL"],["Hollywood","FL"],["Miramar","FL"],["Coral Springs","FL"],["Clearwater","FL"],["Gainesville","FL"],["Tallahassee","FL"],["Cape Coral","FL"],["Port St. Lucie","FL"],["West Palm Beach","FL"],["Boca Raton","FL"],["Pompano Beach","FL"],["Davie","FL"],["Lakeland","FL"],["Deltona","FL"]];function Bte(e){if(!e||e.length<2)return[];const t=e.toLowerCase(),n=new Set;return Fte.filter(([r])=>{const s=r.toLowerCase();return!s.startsWith(t)||n.has(s)?!1:(n.add(s),!0)}).slice(0,6)}const Ute=["What did you work on today?","Ship anything worth remembering?","Walk me through a recent projectâ¦","Any wins worth capturing?","What's a problem you just solved?","Tell me about a meeting that mattered.","What did you learn this week?","Drop a story â messy is fine."],$te=["My most recent job was atâ¦","My LinkedIn isâ¦","I'm based inâ¦","Drop a screenshot of your LinkedInâ¦"],zte=["Software Engineer at Acmeâ¦","I was a PM at Googleâ¦","Product Designer at Figmaâ¦","Before that I was atâ¦","Done"],Hte=10*1024*1024,Wte=new Set(["image/png","image/jpeg","image/gif","image/webp"]);async function Vte(e){if(e.size>Hte)return null;if(e.type==="application/pdf"||e.name.toLowerCase().endsWith(".pdf")){const t=await CC(e);return{id:crypto.randomUUID(),name:e.name,kind:"pdf",mediaType:"application/pdf",data:t,size:e.size}}if(Wte.has(e.type)){const t=await CC(e);return{id:crypto.randomUUID(),name:e.name,kind:"image",mediaType:e.type,data:t,size:e.size}}if(e.type.startsWith("text/")||/\.(txt|md|json|csv|log)$/i.test(e.name)||!e.type){const t=await e.text();return{id:crypto.randomUUID(),name:e.name,kind:"text",mediaType:"text/plain",data:t,size:e.size}}return null}function CC(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=r.result,i=s.indexOf(",");t(i>=0?s.slice(i+1):s)}
569,r.onerror=n,r.readAsDataURL(e)})}function qte(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function Yte(e,t,n,r){const s=Date.now();return e.find(a=>a.id===t)?e.map(a=>a.id===t?{...a,title:n,model:r,updatedAt:s}:a):[{id:t,title:n,messages:[],model:r,createdAt:s,updatedAt:s},...e]}const Gte=[{label:"Log something new",prompt:"Help me add something new to my knowledge base"},{label:"Show my top achievements",prompt:"What are my strongest achievements?"},{label:"Find my best-fit roles",prompt:"What roles am I best suited for based on my experience?"},{label:"Strengthen my projects",prompt:"Walk me through my projects and help me strengthen them"}],jC=["parse_linkedin","collect_stories","complete"],Kte={parse_linkedin:"Import",collect_basics:"Your info",collect_stories:"Add stories",complete:"Done"};function Qte({onStart:e,onManual:t}){return o.jsx("div",{className:"flex-1 flex flex-col min-w-0 overflow-y-auto",children:o.jsxs("div",{className:"flex flex-col items-center justify-center min-h-full px-6 py-10 text-center gap-8 max-w-sm mx-auto w-full",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-2xl bg-accent/10 border border-accent/20 mx-auto mb-4",children:o.jsx(Si,{size:22,className:"text-accent"})}),o.jsx("h1",{className:"text-xl font-semibold text-text",children:"Let's build your profile"}),o.jsx("p",{className:"text-sm text-text-tertiary leading-relaxed",children:"Takes about 5 minutes. You'll walk away with a resume ready to tailor to any job."})]}),o.jsx("div",{className:"w-full space-y-3 text-left",children:[{icon:Nf,label:"Import your work history",sub:"LinkedIn screenshot or type it in"},{icon:Cu,label:"Capture a few stories",sub:"Moments that make your resume sound like you"},{icon:Rr,label:"Generate your first resume",sub:"Tailored to any job description"}].map(({icon:n,label:r,sub:s},i)=>o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("div",{className:"flex-shrink-0 w-7 h-7 rounded-lg bg-bg-secondary border border-border flex items-center justify-center mt-0.5",children:o.jsx(n,{size:13,className:"text-text-secondary"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:r}),o.jsx("p",{className:"text-xs text-text-tertiary",children:s})]})]},i))}),o.jsxs("div",{className:"w-full space-y-3",children:[o.jsxs("button",{onClick:e,className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl bg-accent text-black text-sm font-medium hover:bg-accent/90 transition-colors",children:["Get started ",o.jsx(Ka,{size:15})]}),o.jsxs("details",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3 text-left group",children:[o.jsxs("summary",{className:"flex items-center gap-1.5 cursor-pointer select-none list-none text-xs font-medium text-text",children:[o.jsx(N4,{size:12,className:"text-accent shrink-0"}),"Connect Pave to Claude",o.jsx("span",{className:"text-text-tertiary font-normal ml-1",children:"(optional)"}),o.jsx(ma,{size:11,className:"ml-auto text-text-tertiary group-open:rotate-90 transition-transform"})]}),o.jsxs("div",{className:"mt-3 space-y-2",children:[o.jsxs("ol",{className:"list-decimal list-inside space-y-1 text-xs text-text-secondary",children:[o.jsxs("li",{children:[o.jsx("a",{href:"https://claude.ai/new?modal=add-custom-connector#settings/customize-connectors",target:"_blank",rel:"noreferrer",className:"font-medium text-accent hover:underline",children:"Open the connector dialog"})," â or go to ",o.jsx("span",{className:"font-medium text-text",children:"Settings â Connectors"})," in the left sidebar"]}),o.jsxs("li",{children:["Click ",o.jsx("span",{className:"font-medium text-text",children:"Add"})," â ",o.jsx("span",{className:"font-medium text-text",children:"Add custom connector"})]}),o.jsxs("li",{children:["Name it ",o.jsx("span",{className:"font-mono font-medium text-text",children:"Pave"})," and paste this URL:"]})]}),o.jsxs("div",{className:"flex items-center gap-2 font-mono bg-bg rounded border border-border px-3 py-1.5 text-xs",children:[o.jsx("span",{className:"flex-1 text-text select-all truncate",children:du}),o.jsx("button",{onClick:()=>navigator.clipboard.writeText(du).catch(()=>{}),className:"text-text-tertiary hover:text-text transition-colors shrink-0",title:"Copy",children:o.jsx(Nr,{size:11})})]}),o.jsxs("p",{className:"text-xs text-text-tertiary",children:["Click ",o.jsx("span",{className:"font-medium text-text",children:"Add"}),", authenticate with Google. Once the tool list loads, you're connected."]})]})]})]})]})})}const qs="w-full rounded-lg border border-border bg-bg px-2.5 py-1.5 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent/20 transition-colors";function lm(e){const t=e.trim();return!t||/^https?:\/\//i.test(t)?t:"https://"+t}function xi(e,t){const n=e.trim();if(!n)return null;if(/\s/.test(n))return"URLs can't have spaces";
569if(/,com\b/i.test(n))return'Typo: looks like ",com" â did you mean ".com"?';if(/\.con\b/i.test(n))return'Typo: ".con" â did you mean ".com"?';if(/\.\./i.test(n))return"Double dot in URL";if(!n.includes("."))return"Missing a dot â should look like linkedin.com/in/you";if(n.endsWith("."))return"URL ends with a dot";try{const r=new URL(lm(n));return["http:","https:"].includes(r.protocol)?t&&!r.hostname.replace(/^www\./,"").startsWith(t.replace(/^www\./,""))?`Should be a ${t} link â check for typos`:null:"Must be an http or https link"}catch{return"Not a valid URL â check for typos"}}function Xte({onSubmit:e,initialSaved:t=!1,initialName:n="",initialLocation:r=""}){const[s,i]=y.useState(()=>t?n.split(" ")[0]??"":""),[a,l]=y.useState(()=>t?n.split(" ").slice(1).join(" "):""),[c,u]=y.useState(""),[d,h]=y.useState(""),[f,p]=y.useState(""),[m,x]=y.useState(()=>{var V;return t?((V=r.split(",")[0])==null?void 0:V.trim())??"":""}),[w,g]=y.useState(()=>{var V;return t?((V=r.split(",")[1])==null?void 0:V.trim())??"":""}),[b,_]=y.useState([]),k=y.useRef(null),[T,N]=y.useState(""),[C,S]=y.useState(t),[I,E]=y.useState(!1),[j,P]=y.useState(!0),[L,z]=y.useState({}),[R,B]=y.useState({});y.useEffect(()=>{if(!C)return;const V=setTimeout(()=>P(!1),1e4);return()=>clearTimeout(V)},[C]),s.trim().length>0&&a.trim().length>0;const O=`${s.trim()} ${a.trim()}`.trim(),U=[m.trim(),w.trim()].filter(Boolean).join(", "),H={firstName:L.firstName&&!s.trim()?"Required":null,lastName:L.lastName&&!a.trim()?"Required":null,linkedinUrl:L.linkedinUrl?xi(f,"linkedin.com"):null,githubUrl:L.githubUrl?xi(d,"github.com"):null,websiteUrl:L.websiteUrl?xi(T):null};Object.values(H).some(Boolean);const A=()=>{z({firstName:!0,lastName:!0,linkedinUrl:!0,githubUrl:!0,websiteUrl:!0});const D={firstName:s.trim()?null:"Required",lastName:a.trim()?null:"Required",linkedinUrl:xi(f,"linkedin.com"),githubUrl:xi(d,"g
569ithub.com"),websiteUrl:xi(T)};if(Object.values(D).some(Boolean))return;const te=J=>J.trim().replace(/\b\w/g,ue=>ue.toUpperCase());S(!0),e({display_name:te(O),phone:c.trim(),github_url:d?lm(d.trim()):"",linkedin_url:f?lm(f.trim()):"",location:[te(m),w.trim().toUpperCase()].filter(Boolean).join(", "),website_url:T?lm(T.trim()):""})};if(!j)return null;if(C&&!I)return o.jsx(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.2},className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:o.jsxs("div",{className:"px-3 py-2.5 flex items-center gap-2",children:[o.jsx(yt,{size:13,className:"text-success shrink-0"}),o.jsx("span",{className:"text-xs text-text flex-1",children:O.replace(/\b\w/g,V=>V.toUpperCase())}),U&&o.jsx("span",{className:"text-2xs text-text-tertiary",children:U}),o.jsx("button",{type:"button",onClick:()=>{E(!0),P(!0)},className:"text-2xs text-text-tertiary hover:text-text transition-colors ml-2",children:"edit"})]})});const q=V=>H[V]?"border-error focus:border-error focus:ring-error/20":"";return o.jsxs(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-medium text-text",children:"Your info"}),C&&o.jsx("button",{type:"button",onClick:()=>E(!1),className:"text-2xs text-text-tertiary hover:text-text transition-colors",children:"done"})]}),o.jsxs("div",{className:"px-3 py-3 space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-2xs text-text-tertiary",children:"First name"}),o.jsx("input",{className:`${qs} ${q("firstName")}`,value:s,onChange:V=>i(V.target.value),onBlur:()=>{z(V=>({...V,firstName:!0})),R.firstName||(i(V=>V.charAt(0).toUpperCase()+V.slice(1)),B(V=>({...V,firstName:!0})))},placeholder:"First",autoFocus:!C,disabled:C,autoComplete:"given-name",autoCapitalize:"words"}),H.firstName&&o.jsx("p",{className:"text-2xs text-error",children:H.firstName})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-2xs text-text-tertiary",children:"Last name"}),o.jsx("input",{className:`${qs} ${q("lastName")}`,value:a,onChange:V=>l(V.target.value),onBlur:()=>{z(V=>({...V,lastName:!0})),R.lastName||(l(V=>V.charAt(0).toUpperCase()+V.slice(1)),B(V=>({...V,lastName:!0})))},placeholder:"Last",disabled:C,autoComplete:"family-name",autoCapitalize:"words"}),H.lastName&&o.jsx("p",{className:"text-2xs text-error",children:H.lastName})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",ref:k,children:[o.jsx("label",{className:"text-2xs text-text-tertiary",children:"City"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{className:qs,value:m,onChange:V=>{x(V.target.value),_(Bte(V.target.value))},onBlur:()=>setTimeout(()=>_([]),150),placeholder:"San Francisco",disabled:C,autoComplete:"off",autoCapitalize:"words"}),b.length>0&&o.jsx("div",{className:"absolute z-50 left-0 right-0 top-full mt-0.5 rounded-lg border border-border bg-bg shadow-lg overflow-hidden",children:b.map(([V,D])=>o.jsxs("button",{type:"button",onMouseDown:()=>{x(V),g(D),_([])},className:"w-full text-left px-2.5 py-1.5 text-xs text-text hover:bg-bg-hover transition-colors flex items-center justify-between",children:[o.jsx("span",{children:V}),o.jsx("span",{className:"text-text-tertiary",children:D})]},`${V}-${D}`))})]})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-2xs text-text-tertiary",children:"State"}),o.jsx("input",{className:qs,value:w,onChange:V=>g(V.target.value),placeholder:"CA",disabled:C,autoComplete:"address-level1"})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["Phone ",o.jsx("span",{className:"text-text-tertiary/60",children:"(optional)"})]}),o.jsx("input",{className:qs,value:c,onChange:V=>u(V.target.value),placeholder:"+1 (555) 000-0000",type:"tel",disabled:C,autoComplete:"tel"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["LinkedIn ",o.jsx("span",{className:"text-text-tertiary/60",children:"(optional)"})]}),o.jsx("input",{className:`${qs} ${q("linkedinUrl")}`,value:f,onChange:V=>p(V.target.value),onBlur:()=>z(V=>({...V,linkedinUrl:!0})),placeholder:"linkedin.com/in/you",disabled:C}),H.linkedinUrl&&o.jsx("p",{className:"text-2xs text-error",children:H.linkedinUrl})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["GitHub ",o.jsx("span",{className:"text-text-tertiary/60",children:"(optional)"})]}),o.jsx("input",{className:`${qs} ${q("githubUrl")}`,value:d,onChange:V=>h(V.target.value),onBlur:()=>z(V=>({...V,githubUrl:!0})),placeholder:"github.com/you",disabled:C}),H.githubUrl&&o.jsx("p",{className:"text-2xs text-error",children:H.githubUrl})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["Website ",o.jsx("span",{className:"text-text-tertiary/60",children:"(optional)"})]}),o.jsx("input",{className:`${qs} ${q("websiteUrl")}`,value:T,onChange:V=>N(V.target.value),onBlur:()=>z(V=>({...V,websiteUrl:!0})),placeholder:"yoursite.com",disabled:C}),H.websiteUrl&&o.jsx("p",{className:"text-2xs text-error",children:H.websiteUrl})]})]}),!C&&o.jsx("button",{type:"button",onClick:A,className:"w-full py-2 rounded-lg bg-accent text-black text-xs font-medium hover:bg-accent/90 disabled:opacity-50 transition-colors",children:"Save"})]})]})}const GO=["Bachelor's","Master's","PhD","Associate's","Certificate","Bootcamp","High School","Other"],KO={"Bachelor's":["B.S.","B.A.","B.F.A.","B.B.A.","B.S.N.","B.Mus.","B.Ed."],"Master's":["M.S.","M.A.","M.B.A.","M.F.A.","M.Ed.","M.Eng.","M.P.H."],PhD:["Ph.D.","Ed.D.","M.D.","J.D.","Psy.D."],"Associate's":["A.A.","A.S.","A.A.S."]},Sy=[{value:"nonprofit",label:"Nonprofit"},{value:"research",label:"Research"},{value:"military",label:"Military"},{value:"club",label:"Club"},{value:"sports",label:"Sports"},{value:"creative",label:"Creative"},{value:"open_source",label:"Open Source"},{value:"religious",label:"Religious"},{value:"other",label:"Other"}],Jte=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Zte=new Date().getFullYear(),ene=Array.from({length:40},(e,t)=>String(Zte-t));function Sg({value:e,placeholder:t,options:n,onChange:r,disabled:s,flex:i,shrink:a}){const[l,c]=y.useState(!1),[u,d]=y.useState({top:0,left:0,width:0}),h=y.useRef(null),f=n.find(m=>m.value===e);y.useEffect(()=>{if(!l)return;const m=x=>{var g;const w=document.getElementById("portal-dropdown-menu");w!=null&&w.contains(x.target)||(g=h.current)!=null&&g.contains(x.target)||c(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)}
569,[l]);const p=()=>{if(!s){if(h.current){const m=h.current.getBoundingClientRect();d({top:m.bottom+4,left:m.left,width:m.width})}c(m=>!m)}};return o.jsxs(o.Fragment,{children:[o.jsxs("button",{ref:h,type:"button",onClick:p,disabled:s,style:i?{flex:i}:{},className:`flex items-center justify-between gap-1 rounded-lg border px-2 py-1.5 text-xs transition-colors focus:outline-none ${s?"opacity-50 cursor-default":"cursor-pointer"} ${l?"border-accent ring-1 ring-accent/20":"border-border"} bg-bg text-text ${a?"w-auto":"w-full"}`,children:[o.jsx("span",{className:f?"text-text":"text-text-tertiary",children:(f==null?void 0:f.label)??t}),o.jsx(tn,{size:11,className:"text-text-tertiary shrink-0"})]}),l&&Er.createPortal(o.jsx("div",{id:"portal-dropdown-menu",style:{position:"fixed",top:u.top,left:u.left,width:Math.max(u.width,100),zIndex:9999},className:"rounded-lg border border-border bg-bg shadow-lg overflow-y-auto max-h-52",children:n.map(m=>o.jsx("button",{type:"button",onMouseDown:()=>{r(m.value),c(!1)},className:`w-full text-left px-3 py-1.5 text-xs transition-colors hover:bg-bg-secondary ${m.value===e?"text-accent":"text-text"}`,children:m.label},m.value))}),document.body)]})}function AC({month:e,year:t,onMonth:n,onYear:r,placeholder:s="Present",disabled:i}){const a=!e&&!t,l=Jte.map((u,d)=>({value:String(d+1).padStart(2,"0"),label:u})),c=ene.map(u=>({value:u,label:u}));return o.jsxs("div",{className:"flex gap-1.5",children:[o.jsx(Sg,{value:e??"",placeholder:"Mo.",options:l,onChange:n,disabled:i,flex:"1"}),o.jsx(Sg,{value:t??"",placeholder:a?s:"Year",options:c,onChange:r,disabled:i,flex:"1.4"})]})}function Cg({values:e,onChange:t,placeholder:n}){const[r,s]=y.useState(""),i=y.useRef(null),a=y.useRef(),l=d=>d.replace(/(^|\s)\S/g,h=>h.toUpperCase()),c=d=>{clearTimeout(a.current);const h=l(d.trim());h&&!e.includes(h)&&t([...e,h]),s("")},u=d=>t(e.filter(h=>h!==d));return o.jsxs("div",{className:"flex flex-wrap gap-1.5 min-h-[30px] p-1.5 rounded-lg border border-border bg-bg cursor-text focus-within:border-accent focus-within:ring-1 focus-within:ring-accent/20",onClick:()=>{var d;return(d=i.current)==null?void 0:d.focus()},children:[e.map(d=>o.jsxs("span",{className:"inline-flex items-center gap-1 h-5 pl-2 pr-1 rounded bg-bg-secondary text-xs text-text",children:[d,o.jsx("button",{type:"button",onClick:h=>{h.stopPropagation(),u(d)},className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:10})})]},d)),o.jsx("input",{ref:i,value:r,onChange:d=>{s(d.target.value),clearTimeout(a.current),d.target.value.trim()&&(a.current=setTimeout(()=>c(d.target.value),1500))},onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),c(r)),d.key==="Backspace"&&!r&&e.length&&u(e[e.length-1])},onBlur:()=>{r.trim()&&c(r)},placeholder:e.length===0?n:"",className:"flex-1 min-w-16 bg-transparent text-xs text-text placeholder:text-text-tertiary outline-none px-1"})]})}function tne({value:e,onChange:t}){var d;const[n,r]=y.useState(!1),[s,i]=y.useState({top:0,left:0}),a=y.useRef(null),l=Sy.some(h=>h.value===e),c=(d=Sy.find(h=>h.value===e))==null?void 0:d.label;y.useEffect(()=>{if(!n)return;const h=f=>{const p=document.getElementById("org-type-more-portal");p&&p.contains(f.target)||a.current&&a.current.contains(f.target)||r(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[n]);const u=()=>{if(a.current){const h=a.current.getBoundingClientRect();i({top:h.bottom+4,left:h.left})}r(h=>!h)};return o.jsxs(o.Fragment,{children:[l?o.jsxs("button",{type:"button",onClick:()=>t("company"),className:"px-2 py-0.5 rounded text-2xs border bg-accent/10 border-accent/30 text-accent flex items-center gap-1",children:[c,o.jsx(mt,{size:9})]}):o.jsx("button",{ref:a,type:"button",onClick:u,className:"px-2 py-0.5 rounded text-2xs border border-border text-text-tertiary hover:border-border-focus hover:text-text transition-colors",children:"More"}),n&&Er.createPortal(o.jsx("div",{id:"org-type-more-portal",style:{position:"fixed",top:s.top,left:s.left,zIndex:9999},className:"w-36 rounded-lg border border-border bg-bg shadow-lg overflow-hidden",children:Sy.map(h=>o.jsx("button",{type:"button",onMouseDown:()=>{t(h.value),r(!1)},className:"w-full text-left px-3 py-1.5 text-xs text-text hover:bg-bg-secondary transition-colors",children:h.label},h.value))}),document.body)]})}function QO({onSubmit:e,initialSaved:t=!1,initialOrgs:n,initialStories:r}){const s=()=>({id:crypto.randomUUID(),org_name:"",org_type:"company",roles:[{id:crypto.randomUUID(),role_title:"",kind:"degree"}]}),[i,a]=y.useState(()=>n??(t?[]:[s()])),[l,c]=y.useState(()=>r??[]),[u,d]=y.useState(t),[h,f]=y.useState(!1),[p,m]=y.useState(!0),[x,w]=y.useState(null),g=y.useRef(),b=y.useRef({});y.useEffect(()=>{if(!u)return;const R=setTimeout(()=>m(!1),1e4);return()=>clearTimeout(R)},[u]);const _=(R,B)=>a(O=>O.map(U=>U.id===R?{...U,...B}:U)),k=(R,B,O)=>a(U=>U.map(H=>H.id===R?{...H,roles:H.roles.map(A=>A.id===B?{...A,...O}:A)}:H)),T=R=>a(B=>B.map(O=>O.id===R?{...O,roles:[...O.roles,{id:crypto.randomUUID(),role_title:"",kind:"degree"}]}:O)),N=(R,B)=>a(O=>O.map(U=>U.id===R?{...U,roles:U.roles.filter(H=>H.id!==B)}:U).filter(U=>U.roles.length>0)),C=R=>a(B=>B.filter(O=>
569O.id!==R)),S=(R,B)=>{if(_(R,{org_name:B,logo_url:void 0}),clearTimeout(g.current),B.length<2){w(null);return}g.current=setTimeout(async()=>{const O=uu();try{const A=(await(await fetch(`/api/orgs/suggest?q=${encodeURIComponent(B)}`,{headers:O?{Authorization:`Bearer ${O}`}:{}})).json()).map(q=>({name:q.name,domain:q.domain,logo:q.domain?`https://www.google.com/s2/favicons?domain=${q.domain}&sz=128`:""}));A.length>0?w({orgId:R,list:A}):w(null)}catch{w(null)}},200)},I=(R,B)=>{const O=/\.(edu|ac\.|university|college|school)/.test(B.domain??"");_(R,{org_name:B.name,logo_url:B.logo,...O?{org_type:"education"}:{}}),w(null)},E=(R,B)=>{if(B!=="present")return R&&B?`${B}-${R}`:B||void 0},j=(R,B)=>{var O;if(R.org_type==="education"&&B.kind!=="activity"){const U=B.degree_subtype||B.degree_type||"";return U?(O=B.major)!=null&&O.length?`${U} in ${B.major.join(" & ")}`:U:B.role_title.trim()}return B.role_title.trim()},P=()=>{const R=i.flatMap(B=>B.roles.map(O=>{var A,q;const U=j(B,O),H={};return B.org_type==="education"&&(H.kind=O.kind??"degree",O.kind!=="activity"&&(O.degree_type&&(H.degree_type=O.degree_type),O.degree_subtype&&(H.degree_subtype=O.degree_subtype),(A=O.major)!=null&&A.length&&(H.major=O.major),(q=O.minor)!=null&&q.length&&(H.minors=O.minor))),{role_title:U,org_name:B.org_name.trim(),org_type:B.org_type,logo_url:B.logo_url,start_date:E(O.start_month,O.start_year),end_date:E(O.end_month,O.end_year),metadata:H}})).filter(B=>B.org_name);R.length===0&&l.length===0||(d(!0),e(R,l.filter(B=>B.content.trim())))};if(!p)return null;const L=i.reduce((R,B)=>R+B.roles.length,0),z=i.map(R=>R.org_name).filter(Boolean);return u&&!h?o.jsx(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.2},className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:o.jsxs("div",{className:"px-3 py-2.5 flex items-center gap-2",children:[o.jsx(yt,{size:13,className:"text-success shrink-0"}),o.jsxs("span",{className:"text-xs text-text flex-1",children:[L," ",L===1?"role":"roles",z.length>0?` at ${z.join(", ")}`:""]}),o.jsx("button",{type:"button",onClick:()=>{f(!0),m(!0)},className:"text-2xs text-text-tertiary hover:text-text transition-colors ml-2",children:"edit"})]})}):o.jsxs(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 border-b border-border flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-medium text-text",children:"Work history"}),u&&o.jsx("button",{type:"button",onClick:()=>f(!1),className:"text-2xs text-text-tertiary hover:text-text transition-colors",children:"done"})]}),o.jsx("div",{className:"divide-y divide-border",children:i.map((R,B)=>o.jsxs("div",{className:"px-3 pt-3 pb-4 space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>{var O;return(O=b.current[R.id])==null?void 0:O.focus()},className:"shrink-0 w-7 h-7 rounded-md border border-border bg-bg-tertiary flex items-center justify-center overflow-hidden hover:border-accent transition-colors",children:R.logo_url?o.jsx("img",{src:R.logo_url,alt:"",className:"w-full h-full object-contain",onError:()=>_(R.id,{logo_url:void 0})}):o.jsx("span",{className:"text-text-tertiary text-2xs",children:"?"})}),o.jsxs("div",{className:"relative flex-1",children:[o.jsx("input",{ref:O=>{b.current[R.id]=O},className:qs,value:R.org_name,onChange:O=>S(R.id,O.target.value),onBlur:()=>setTimeout(()=>w(null),150),placeholder:"Company / school / org",disabled:u,autoFocus:!u&&B===0}),(x==null?void 0:x.orgId)===R.id&&o.jsx("div",{className:"absolute top-full left-0 right-0 mt-1 z-10 rounded-lg border border-border bg-bg shadow-lg overflow-hidden",children:x.list.slice(0,4).map(O=>o.jsxs("button",{type:"button",onMouseDown:()=>I(R.id,O),className:"flex items-center gap-2 w-full px-2.5 py-1.5 text-xs text-text hover:bg-bg-secondary transition-colors text-left",children:[O.logo&&o.jsx("img",{src:O.logo,alt:"",className:"w-4 h-4 object-contain shrink-0"}),O.name]},O.domain))})]}),!u&&o.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[["company","education"].map(O=>o.jsx("button",{type:"button",onClick:()=>_(R.id,{org_type:O}),className:`px-2 py-0.5 rounded text-2xs border transition-colors ${R.org_type===O?"bg-accent/10 border-accent/30 text-accent":"border-border text-text-tertiary hover:border-border-focus hover:text-text"}`,children:O==="company"?"Work":"School"}
569,O)),o.jsx(tne,{value:R.org_type,onChange:O=>_(R.id,{org_type:O})})]}),!u&&i.length>1&&o.jsx("button",{type:"button",onClick:()=>C(R.id),className:"shrink-0 text-text-tertiary hover:text-error transition-colors",children:o.jsx(mt,{size:13})})]}),o.jsxs("div",{className:"space-y-2 pl-9",children:[R.roles.map((O,U)=>{const H=R.org_type==="education",A=O.degree_type==="High School",q=H&&O.kind!=="activity",V=q?KO[O.degree_type??""]??[]:[];return o.jsxs("div",{className:"rounded-lg border border-border bg-bg px-3 py-3 space-y-2.5",children:[H&&!A&&o.jsx("div",{className:"flex gap-1 p-0.5 rounded-md bg-bg-tertiary border border-border",children:["degree","activity"].map(D=>o.jsx("button",{type:"button",disabled:u,onClick:()=>k(R.id,O.id,{kind:D}),className:`flex-1 py-1 rounded text-2xs font-medium transition-all ${O.kind===D||!O.kind&&D==="degree"?"bg-bg text-text shadow-sm border border-border":"text-text-tertiary hover:text-text"}`,children:D==="degree"?"Degree":"Activity / Position"},D))}),o.jsxs("div",{className:"flex items-center gap-2",children:[q&&!A?o.jsx(Sg,{value:O.degree_type??"",placeholder:"Degree typeâ¦",options:GO.map(D=>({value:D,label:D})),onChange:D=>k(R.id,O.id,{degree_type:D,degree_subtype:""}),disabled:u,flex:"1"}):o.jsx("input",{className:"flex-1 bg-transparent text-xs text-text placeholder:text-text-tertiary focus:outline-none border-b border-border focus:border-accent transition-colors pb-1.5",value:O.role_title,onChange:D=>k(R.id,O.id,{role_title:D.target.value}),placeholder:A?"e.g. Diploma (optional)":H?"e.g. Research Assistant":U===0?"Most recent title":"Previous title",disabled:u}),!u&&R.roles.length>1&&o.jsx("button",{type:"button",onClick:()=>N(R.id,O.id),className:"shrink-0 text-text-tertiary hover:text-error transition-colors",children:o.jsx(mt,{size:11})})]}),q&&V.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1",children:V.map(D=>o.jsx("button",{type:"button",disabled:u,onClick:()=>k(R.id,O.id,{degree_subtype:O.degree_subtype===D?"":D}),className:`px-2 py-0.5 rounded text-2xs border transition-colors ${O.degree_subtype===D?"bg-accent/10 border-accent/30 text-accent":"border-border text-text-tertiary hover:border-border-focus hover:text-text"}`,children:D},D))}),q&&O.degree_type!=="High School"&&o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx(Cg,{values:O.major??[],onChange:D=>k(R.id,O.id,{major:D}),placeholder:"Major"}),o.jsx(Cg,{values:O.minor??[],onChange:D=>k(R.id,O.id,{minor:D}),placeholder:"Minor"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-2xs text-text-tertiary w-[calc(50%-4px)]",children:"Start"}),o.jsxs("span",{className:"text-2xs text-text-tertiary",children:["End ",o.jsx("span",{className:"text-text-tertiary/50 font-normal",children:"(leave blank if current)"})]}),!u&&o.jsxs("button",{type:"button",onClick:()=>k(R.id,O.id,O.end_year==="present"?{end_year:"",end_month:""}:{end_year:"present",end_month:""}),className:`flex items-center gap-1 text-2xs transition-colors ml-auto ${O.end_year==="present"?"text-accent":"text-text-tertiary hover:text-text"}`,children:[o.jsx("div",{className:`w-5 h-2.5 rounded-full transition-colors relative shrink-0 ${O.end_year==="present"?"bg-accent":"bg-border"}`,children:o.jsx("div",{className:`absolute top-0.5 w-1.5 h-1.5 rounded-full bg-white transition-all ${O.end_year==="present"?"left-3":"left-0.5"}`})}),"Current"]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx(AC,{month:O.start_month,year:O.start_year,onMonth:D=>k(R.id,O.id,{start_month:D}),onYear:D=>k(R.id,O.id,{start_year:D}),placeholder:"Year",disabled:u}),O.end_year==="present"?o.jsx("div",{className:"flex items-center px-2 py-1.5 rounded-lg border border-accent/30 bg-accent/5",children:o.jsx("span",{className:"text-xs text-accent",children:"Present"})}):o.jsx(AC,{month:O.end_month,year:O.end_year,onMonth:D=>k(R.id,O.id,{end_month:D}),onYear:D=>k(R.id,O.id,{end_year:D}),placeholder:"Present",disabled:u})]})]})]},O.id)}),!u&&o.jsxs("button",{type:"button",onClick:()=>T(R.id),className:"text-2xs text-text-tertiary hover:text-text transition-colors flex items-center gap-1 pt-0.5",children:[o.jsx(us,{size:11})," add role"]})]})]},R.id))}),l.length>0&&o.jsxs("div",{className:"border-t border-border px-3 py-3 space-y-3",children:[o.jsx("span",{className:"text-2xs uppercase tracking-widest text-text-tertiary",children:"Stories"}),l.map((R,B)=>o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{value:R.title,onChange:O=>c(U=>U.map((H,A)=>A===B?{...H,title:O.target.value}:H)),className:qs+" text-xs font-medium",placeholder:"Story title",disabled:u}),!u&&o.jsx("button",{type:"button",onClick:()=>c(O=>O.filter((U,H)=>H!==B)),className:"shrink-0 text-text-tertiary hover:text-error transition-colors",children:o.jsx(mt,{size:13})})]}),o.jsx("textarea",{value:R.content,onChange:O=>c(U=>U.map((H,A)=>A===B?{...H,content:O.target.value}:H)),rows:3,className:qs+" resize-none leading-relaxed",placeholder:"What happened, what you did, what the outcome was...",disabled:u})]},R.id)),!u&&o.jsxs("button",{type:"button",onClick:()=>c(R=>[...R,{id:crypto.randomUUID(),title:"",content:""}]),className:"text-2xs text-text-tertiary hover:text-text transition-colors flex items-center gap-1",children:[o.jsx(us,{size:11})," add story"]})]}),!u&&o.jsxs("div",{className:"px-3 py-3 border-t border-border space-y-2",children:[o.jsxs("button",{type:"button",onClick:()=>a(R=>[...R,s()]),className:"text-2xs text-text-tertiary hover:text-text transition-colors flex items-center gap-1",children:[o.jsx(us,{size:11})," add another org"]}),o.jsx("button",{type:"button",onClick:P,className:"w-full py-2 rounded-lg bg-accent text-black text-xs font-medium hover:bg-accent/90 transition-colors",children:"Save"})]})]})}function nne({step:e,storiesSaved:t}){const n=e==="confirm_logo"?"collect_stories":e==="collect_basics"?"parse_linkedin":e,r=jC.indexOf(n);return o.jsx("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-border bg-background shrink-0",children:jC.map((s,i)=>{const a=i<r||n==="complete",l=i===r&&n!=="complete",c=s==="collect_stories"&&l?`Stories ${t}/3`:Kte[s];return o.jsxs("div",{className:"flex items-center gap-2",children:[i>0&&o.jsx("div",{className:`h-px w-5 ${a?"bg-accent":"bg-border"}`}),o.jsxs("div",{className:`flex items-center gap-1.5 text-2xs ${a?"text-accent":l?"text-text":"text-text-tertiary"}`,children:[o.jsx("div",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${a?"bg-accent":l?"bg-text":"bg-border"}`}),c]})]},s)})})}function rne({toolParts:e,isStreaming:t}){const[n,r]=y.useState(!1),[s,i]=y.useState(()=>!t);y.useEffect(()=>{if(!t){const u=setTimeout(()=>r(!0),1200),d=setTimeout(()=>i(!0),5e3);return()=>{clearTimeout(u),clearTimeout(d)}}},[t]);const a=n,l=e.filter(u=>u.status==="done"),c=l.length===1?l[0].label.replace(/â¦$/,""):`${l.length} actions`;return o.jsx("div",{className:`transition-opacity duration-150 ${s?"opacity-0 group-hover:opacity-100":"opacity-100"}`,children:o.jsx(He,{mode:"wait",children:a?o.jsxs(se.button,{initial:{opacity:0}
569,animate:{opacity:1},onClick:()=>r(!1),className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full border border-border text-2xs text-text-tertiary hover:text-text hover:border-text-tertiary transition-colors",children:[o.jsx(po,{size:10,className:"text-accent"}),c]},"pill"):o.jsxs(se.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},className:"flex flex-col gap-1",children:[e.map((u,d)=>o.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-text-tertiary",children:[u.status==="pending"?o.jsx(se.div,{className:"w-2.5 h-2.5 rounded-full border border-accent border-t-transparent",animate:{rotate:360},transition:{duration:.8,repeat:1/0,ease:"linear"}}):o.jsx(yt,{size:10,className:"text-accent shrink-0"}),o.jsx("span",{children:u.label.replace(/â¦$/,u.status==="pending"?"â¦":"")})]},d)),!t&&o.jsx("button",{onClick:()=>r(!0),className:"text-2xs text-text-tertiary hover:text-text transition-colors text-left mt-0.5",children:"collapse"})]},"list")})})}function IC({toolParts:e,isStreaming:t}){return o.jsx(rne,{toolParts:e,isStreaming:t})}function Sv(){return o.jsx("div",{className:"flex items-center gap-1 py-1",children:[0,1,2].map(e=>o.jsx(se.div,{className:"w-1.5 h-1.5 rounded-full bg-text-tertiary",animate:{opacity:[.3,1,.3],scale:[.8,1,.8]},transition:{duration:1.2,repeat:1/0,delay:e*.2,ease:"easeInOut"}},e))})}function PC(e){return e.replace(/\n?---+\s*$/g,"").replace(/^\s*---+\n?/g,"").trim()}const sne={...qO,del:({children:e})=>o.jsx("del",{style:{textDecoration:"line-through"},className:"text-error opacity-70",children:e}),mark:({children:e})=>o.jsx("mark",{className:"bg-transparent text-success font-medium",children:e})};function DC({oldText:e,newText:t}){const n=new Ty,r=n.diff_main(PC(e),PC(t));n.diff_cleanupSemantic(r);const s=r.map(([i,a])=>i===Ty.DIFF_EQUAL?a:i===Ty.DIFF_DELETE?`<del>${a}</del>`:`<mark>${a}</mark>`).join("");return o.jsx("div",{className:"text-xs leading-relaxed",children:o.jsx(mo,{remarkPlugins:[Dx],rehypePlugins:[Dte],components:sne,children:s})})}const XO="pave_confirmed_proposals_v2",JO="pave_superseded_stories";function ZO(){try{return new Set(JSON.parse(localStorage.getItem(JO)??"[]"))}catch{return new Set}}function ine(e){try{const t=ZO();t.add(e),localStorage.setItem(JO,JSON.stringify([...t]))}catch{}}function Cv(e){const t=e.item_name??e.project_name??e.story_title??e.role_title??"";return[e.type,e.project_id??"",e.story_id??"",e.item_id??"",e.role_id??"",e.heading??"",t,(e.new_content??"").slice(0,80)].join("|")}function jv(){try{return JSON.parse(localStorage.getItem(XO)??"{}")}catch{return{}}}function zl(e,t){try{const n=jv();n[Cv(e)]=t??"confirmed",localStorage.setItem(XO,JSON.stringify(n))}catch{}}function ane({part:e,onResolved:t,onFirstMemorySaved:n,onOnboardingConfirm:r,onOnboardingSkipLogo:s}){var H,A;const i=e.proposal,a=Cv(i)in jv(),l=jv()[Cv(i)],c=!!(l&&l!=="confirmed"&&ZO().has(l)),[u,d]=y.useState(a?"saved":"pending"),[h,f]=y.useState(""),[p,m]=y.useState(!1),[x,w]=y.useState(!1);if(i.type==="onboarding_parsed"&&r){const q=i,V=K=>K.map(ge=>ge.org_type!=="education"?ge:{...ge,kind:ge.kind??"degree"}),[D,te]=y.useState(V(q.roles??[])),[J,ue]=y.useState(q.display_name??""),[Ne,Ie]=y.useState(""),[Pe,Ue]=y.useState(""),[ot,Ye]=y.useState(q.linkedin_url??""),[ae,Ge]=y.useState(!1),[nt,De]=y.useState({}),[Gt,Lt]=y.useState(null),St=y.useRef(),rn=y.useRef({}),Kt={displayName:nt.displayName&&!J.trim()?"Required":null,linkedinUrl:nt.linkedinUrl?xi(ot,"linkedin.com"):null,githubUrl:nt.githubUrl?xi(Pe,"github.com"):null},sn=Object.values(Kt).some(Boolean),le=K=>Kt[K]?"border-error focus:border-error focus:ring-error/20":"",Fn=[];D.forEach((K,ge)=>{const Te=Fn.find(lt=>lt.org_name===K.org_name&<.org_name!=="");Te?Te.indices.push(ge):Fn.push({org_name:K.org_name,org_type:K.org_type??"company",logo_url:K.logo_url,indices:[ge]})});const It=(K,ge)=>te(Te=>Te.map((lt,bt)=>bt===K?{...lt,...ge}:lt)),Z=(K,ge)=>te(Te=>Te.map((lt,bt)=>K.includes(bt)?{...lt,...ge}:lt)),de=(K,ge,Te)=>te(lt=>[...lt,{role_title:"",org_name:K,org_type:ge,logo_url:Te}]),Re=()=>te(K=>[...K,{role_title:"",org_name:"",org_type:"company"}]),Ve=K=>te(ge=>ge.filter((Te,lt)=>lt!==K));y.useEffect(()=>
569{(q.roles??[]).forEach(async(K,ge)=>{if(!K.org_name||K.logo_url)return;const Te=uu();try{const wn=(await(await fetch(`/api/orgs/suggest?q=${encodeURIComponent(K.org_name)}`,{headers:Te?{Authorization:`Bearer ${Te}`}:{}})).json())[0];wn!=null&&wn.domain&&It(ge,{logo_url:`https://www.google.com/s2/favicons?domain=${wn.domain}&sz=128`})}catch{}})},[]);const Je=(K,ge)=>{if(Z(K,{org_name:ge,logo_url:void 0}),clearTimeout(St.current),ge.length<2){Lt(null);return}St.current=setTimeout(async()=>{const Te=uu();try{const wn=(await(await fetch(`/api/orgs/suggest?q=${encodeURIComponent(ge)}`,{headers:Te?{Authorization:`Bearer ${Te}`}:{}})).json()).map(Se=>({name:Se.name,domain:Se.domain,logo:Se.domain?`https://www.google.com/s2/favicons?domain=${Se.domain}&sz=128`:""}));wn.length>0?Lt({orgKey:K[0],list:wn}):Lt(null)}catch{Lt(null)}},200)},Ft=(K,ge)=>{Z(K,{org_name:ge.name,logo_url:ge.logo}),Lt(null)},Et="w-full rounded-lg border border-border bg-bg px-2.5 py-1.5 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent focus:ring-1 focus:ring-accent/20 transition-colors",fn=["company","education","nonprofit","research","military","club","sports","creative","open_source","religious","other"];return o.jsxs(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"my-2 rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[o.jsx("div",{className:"flex items-center px-3 py-2 border-b border-border",children:o.jsx("span",{className:"text-xs font-medium text-text",children:"Your profile"})}),o.jsxs("div",{className:"px-3 py-3 space-y-2 border-b border-border",children:[o.jsx("span",{className:"text-2xs font-medium text-text-secondary uppercase tracking-wide",children:"Contact info"}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["Full name ",Kt.displayName&&o.jsx("span",{className:"text-error ml-1",children:Kt.displayName})]}),o.jsx("input",{className:`${Et} ${le("displayName")}`,value:J,onChange:K=>ue(K.target.value),onBlur:()=>De(K=>({...K,displayName:!0})),placeholder:"Your name"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsx("label",{className:"text-2xs text-text-tertiary",children:"Phone"}),o.jsx("input",{className:Et,value:Ne,onChange:K=>Ie(K.target.value),placeholder:"+1 (555) 000-0000",type:"tel"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["LinkedIn URL ",Kt.linkedinUrl&&o.jsx("span",{className:"text-error ml-1",children:Kt.linkedinUrl})]}),o.jsx("input",{className:`${Et} ${le("linkedinUrl")}`,value:ot,onChange:K=>Ye(K.target.value),onBlur:()=>De(K=>({...K,linkedinUrl:!0})),placeholder:"linkedin.com/in/you"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("label",{className:"text-2xs text-text-tertiary",children:["GitHub URL ",Kt.githubUrl&&o.jsx("span",{className:"text-error ml-1",children:Kt.githubUrl})]}),o.jsx("input",{className:`${Et} ${le("githubUrl")}`,value:Pe,onChange:K=>Ue(K.target.value),onBlur:()=>De(K=>({...K,githubUrl:!0})),placeholder:"github.com/you"})]})]})]}),o.jsx("div",{className:"divide-y divide-border",children:Fn.map(K=>o.jsxs("div",{className:"px-3 py-3 space-y-3",children:[o.jsxs("div",{className:"space-y-1 relative",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{type:"button",onClick:()=>{var ge;Je(K.indices,K.org_name),(ge=rn.current[K.indices[0]])==null||ge.focus()},className:"shrink-0 w-6 h-6 rounded border border-border bg-bg-tertiary flex items-center justify-center overflow-hidden hover:border-accent transition-colors",children:K.logo_url?o.jsx("img",{src:K.logo_url,alt:"",className:"w-full h-full object-contain",onError:()=>Z(K.indices,{logo_url:void 0})}):o.jsx("span",{className:"text-text-tertiary text-2xs",children:"?"})}),o.jsx("input",{ref:ge=>{rn.current[K.indices[0]]=ge},className:Et,value:K.org_name,onChange:ge=>Je(K.indices,ge.target.value),onBlur:()=>setTimeout(()=>Lt(null),150),placeholder:"Company name",disabled:ae}),o.jsxs("div",{className:"relative shrink-0",children:[o.jsx("select",{value:K.org_type,onCh
569ange:ge=>Z(K.indices,{org_type:ge.target.value}),disabled:ae,className:"appearance-none rounded border border-border bg-bg-secondary px-1.5 py-0.5 text-2xs text-text focus:outline-none focus:border-border-focus transition-colors pr-4 leading-none h-[calc(1.25rem+2px)]",children:fn.map(ge=>o.jsx("option",{value:ge,children:ge.charAt(0).toUpperCase()+ge.slice(1).replace("_"," ")},ge))}),o.jsx(tn,{size:10,className:"absolute right-1.5 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"})]})]}),(Gt==null?void 0:Gt.orgKey)===K.indices[0]&&Gt.list.length>0&&o.jsx("div",{className:"absolute left-0 right-0 top-full mt-1 z-50 rounded-lg border border-border bg-bg shadow-lg overflow-hidden",children:Gt.list.map(ge=>o.jsxs("button",{onMouseDown:()=>Ft(K.indices,ge),className:"flex items-center gap-3 w-full px-3 py-2 text-left hover:bg-bg-hover transition-colors",children:[ge.logo?o.jsx("img",{src:ge.logo,alt:"",className:"w-5 h-5 rounded object-contain shrink-0",onError:Te=>{Te.target.style.display="none"}}):o.jsx("div",{className:"w-5 h-5 rounded bg-bg-tertiary shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate",children:ge.name}),ge.domain&&o.jsx("p",{className:"text-2xs text-text-tertiary",children:ge.domain})]})]},ge.domain||ge.name))})]}),o.jsxs("div",{className:"space-y-2 pl-8",children:[K.indices.map(ge=>{const Te=D[ge],lt=K.org_type==="education",bt=Te.degree_type==="High School",wn=lt&&Te.kind!=="activity",Se=wn?KO[Te.degree_type??""]??[]:[];return o.jsxs("div",{className:"space-y-2 pb-2 border-b border-border/50 last:border-0 last:pb-0",children:[lt&&!bt&&o.jsx("div",{className:"flex gap-1 p-0.5 rounded-md bg-bg-tertiary border border-border",children:["degree","activity"].map(Ae=>o.jsx("button",{type:"button",disabled:ae,onClick:()=>It(ge,{kind:Ae}),className:`flex-1 py-1 rounded text-2xs font-medium transition-all ${Te.kind===Ae||!Te.kind&&Ae==="degree"?"bg-bg text-text shadow-sm border border-border":"text-text-tertiary hover:text-text"}`,children:Ae==="degree"?"Degree":"Activity / Position"},Ae))}),o.jsxs("div",{className:"flex items-center gap-2",children:[wn&&!bt?o.jsx(Sg,{value:Te.degree_type??"",placeholder:"Degree typeâ¦",options:GO.map(Ae=>({value:Ae,label:Ae})),onChange:Ae=>It(ge,{degree_type:Ae,degree_subtype:""}),disabled:ae,flex:"1"}):o.jsx("input",{className:Et,value:Te.role_title,onChange:Ae=>It(ge,{role_title:Ae.target.value}),placeholder:bt?"e.g. Diploma (optional)":lt?"e.g. Research Assistant":"Job title",disabled:ae}),!ae&&K.indices.length>1&&o.jsx("button",{type:"button",onClick:()=>Ve(ge),className:"shrink-0 text-text-tertiary hover:text-error transition-colors",children:o.jsx(mt,{size:11})})]}),wn&&Se.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1",children:Se.map(Ae=>o.jsx("button",{type:"button",disabled:ae,onClick:()=>It(ge,{degree_subtype:Te.degree_subtype===Ae?"":Ae}),className:`px-2 py-0.5 rounded text-2xs border transition-colors ${Te.degree_subtype===Ae?"bg-accent/10 border-accent/30 text-accent":"border-border text-text-tertiary hover:border-border-focus hover:text-text"}`,children:Ae},Ae))}),wn&&Te.degree_type!=="High School"&&o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx(Cg,{values:Te.major??[],onChange:Ae=>It(ge,{major:Ae}),placeholder:"Major"}),o.jsx(Cg,{values:Te.minor??[],onChange:Ae=>It(ge,{minor:Ae}),placeholder:"Minor"})]}),o.jsxs("div",{className:"grid grid-cols-[1fr_1fr] gap-2",children:[o.jsxs("div",{className:"space-y-1",children:[o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsxs("label",{className:"text-2xs font-medium text-text-secondary uppercase tracking-wide",children:["Start ",!Te.start_date&&o.jsx("span",{className:"text-warning",children:"·"})]})}),o.jsx(vg,{value:Te.start_date??"",onChange:Ae=>It(ge,{start_date:Ae||void 0}),size:"sm"})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("label",{className:"text-2xs font-medium text-text-secondary uppercase tracking-wide",children:"End"}),!ae&&o.jsxs("button",{type:"button",onClick:()=>It(ge,{end_date:Te.end_date==="present"?void 0:"present"}),className:`flex items-center gap-1 text-2xs ml-auto transition-colors ${Te.end_date==="present"?"text-accent":"text-text-tertiary hover:text-text"}`,children:[o.jsx("div",{className:`w-5 h-2.5 rounded-full transition-colors relative shrink-0 ${Te.end_date==="present"?"bg-accent":"bg-border"}`,children:o.jsx("div",{className:`absolute top-0.5 w-1.5 h-1.5 rounded-full bg-white transition-all ${Te.end_date==="present"?"left-3":"left-0.5"}`})}),"Current"]})]}),Te.end_date==="present"?o.jsx("div",{className:"flex items-center px-1.5 h-[calc(1.25rem+2px)] rounded border border-accent/30 bg-accent/5",children:o.jsx("span",{className:"text-2xs text-accent",children:"Present"})}):o.jsx(vg,{value:Te.end_date??"",onChange:Ae=>
569It(ge,{end_date:Ae||void 0}),size:"sm"})]})]})]},ge)}),!ae&&o.jsxs("button",{type:"button",onClick:()=>de(K.org_name,K.org_type,K.logo_url),className:"text-2xs text-text-tertiary hover:text-accent transition-colors flex items-center gap-1",children:[o.jsx(us,{size:10})," add title"]})]})]},K.indices[0]))}),o.jsx("div",{className:"px-3 py-2.5 border-t border-border flex items-center gap-2",children:ae?o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-success",children:[o.jsx(yt,{size:13}),o.jsxs("span",{children:["Saved â ",D.length," role",D.length!==1?"s":""," added"]})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>{De({displayName:!0,linkedinUrl:!0,githubUrl:!0});const ge={displayName:J.trim()?null:"Required",linkedinUrl:xi(ot,"linkedin.com"),githubUrl:xi(Pe,"github.com")};Object.values(ge).some(Boolean)||(Ge(!0),r({...i,roles:D,display_name:J,phone:Ne,github_url:Pe,linkedin_url:ot}))},disabled:D.length===0||sn,className:"px-3 py-1.5 rounded-lg bg-accent text-xs font-medium text-black disabled:opacity-40",children:"Save"}),o.jsx("button",{type:"button",onClick:Re,className:"px-3 py-1.5 rounded-lg border border-border text-xs text-text-secondary hover:text-text hover:border-border-focus transition-colors",children:"+ Add org"}),D.some(K=>!K.start_date)&&o.jsx("span",{className:"text-2xs text-warning ml-auto",children:"Some roles missing a start date"})]})})]})}if(i.type==="open_work_history_form"&&r){const q=i,V=J=>{const[ue,Ne]=(J.start_date??"").split("-"),[Ie,Pe]=(J.end_date??"").split("-");return{id:crypto.randomUUID(),org_name:J.org_name,org_type:J.org_type??"company",roles:[{id:crypto.randomUUID(),role_title:J.role_title,kind:J.org_type==="education"?"degree":void 0,start_year:ue,start_month:Ne,end_year:Ie||void 0,end_month:Pe||void 0}]}},D=(q.roles??[]).reduce((J,ue)=>{const Ne=J.find(Ie=>Ie.org_name.toLowerCase()===ue.org_name.toLowerCase());if(Ne){const[Ie,Pe]=(ue.start_date??"").split("-"),[Ue,ot]=(ue.end_date??"").split("-");return Ne.roles.push({id:crypto.randomUUID(),role_title:ue.role_title,kind:ue.org_type==="education"?"degree":void 0,start_year:Ie,start_month:Pe,end_year:Ue||void 0,end_month:ot||void 0}),J}return[...J,V(ue)]},[]),te=(q.stories??[]).map(J=>({id:crypto.randomUUID(),title:J.title,content:J.content}));return a?o.jsxs("div",{className:"my-2 rounded-xl border border-border bg-bg-secondary px-3 py-2.5 flex items-center gap-2 text-xs text-success",children:[o.jsx(yt,{size:13}),o.jsx("span",{children:"Work history saved"})]}):o.jsx(QO,{initialOrgs:D.length>0?D:void 0,initialStories:te.length>0?te:void 0,onSubmit:async(J,ue)=>{zl(i),await r({...i,roles:J,stories:ue})}})}if(i.type==="logo_picker"&&r&&s)return o.jsx(nD,{orgId:String(i.org_id??""),companyName:String(i.company_name??""),onConfirm:q=>r(i,{logo_url:q}),onSkip:s});if(i.status==="error")return((H=i.detail)==null?void 0:H.includes("is required for create_"))||((A=i.detail)==null?void 0:A.includes("new_content is required"))?null:o.jsx(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"my-2 rounded-xl border border-error/30 bg-error/5 px-3 py-2 text-xs text-error",children:i.detail??"Proposal failed â Claude must call get_project_sections before proposing an edit"});const g=i.type==="create_item"&&i.item_type==="story"||i.type==="story"||i.type==="create_story",[b,_]=y.useState(i.role_id),[k,T]=y.useState(!1),{data:N}=wt({queryKey:["kb"],queryFn:()=>Promise.all([G.orgs.list(),G.roles.list()]).then(([q,V])=>({orgs:q,roles:V,projects:[],stories:[]})),enabled:g,staleTime:6e4}),C=g?((N==null?void 0:N.roles)??[]).map(q=>{var V;return{role_id:q.role_id,title:q.title,org_name:((V=N==null?void 0:N.orgs.find(D=>D.org_id===q.org_id))==null?void 0:V.name)??""}}):[],S=i.type==="project_section"||i.type==="story",I=i.type==="create_item"||i.type==="create_project"||i.type==="create_story"||i.type==="create_role",E=i.type==="delete_item"||i.type==="delete_project"||i.type==="delete_story"||i.type==="delete_role",j=i.type==="update_profile",P=i.type==="project_section"?[i.project_name??"Project",i.heading].filter(
569Boolean).join(" â "):i.type==="story"?i.story_title??"Story":i.type==="create_item"?`Save: ${i.item_name??i.project_name??i.story_title??"Untitled"}`:i.type==="delete_item"?`Delete${i.item_name??i.project_name??i.story_title?`: ${i.item_name??i.project_name??i.story_title}`:""}`:i.type==="create_project"?`Create project: ${i.project_name??"Untitled"}`:i.type==="create_story"?`Create story: ${i.story_title??"Untitled"}`:i.type==="create_role"?`Add role: ${i.role_title??"Untitled"}${i.org_name?` at ${i.org_name}`:""}`:i.type==="delete_project"?`Delete project${i.project_name?`: ${i.project_name}`:""}`:i.type==="delete_story"?`Delete story${i.story_title?`: ${i.story_title}`:""}`:i.type==="delete_role"?`Delete role${i.role_title?`: ${i.role_title}`:""}`:i.type==="update_role"?`Update role: ${i.role_title??i.role_id??""}`:i.type==="rename_project"?`Rename project to: ${i.project_name??""}`:i.type==="add_project_section"?`Add section: ${[i.project_name??"Project",i.heading].filter(Boolean).join(" â ")}`:i.type==="remove_project_section"?`Remove section: ${[i.project_name??"Project",i.heading].filter(Boolean).join(" â ")}`:i.type==="append_to_project"?`Append to: ${i.project_name??"Project"}`:i.type==="restore_project_version"?`Restore version ${i.version_num} of ${i.project_name??"Project"}`:i.type==="update_profile"?"Save to your profile":"Proposed change",L=E||i.type==="remove_project_section"?"Delete":I?"Create":"Save",z=E||i.type==="remove_project_section"?"Done":I?"Created":"Saved",R=i.type==="project_section"||i.type==="add_project_section"?`The "${i.heading}" section content was saved to "${i.project_name??"project"}". The AI summary will regenerate automatically. Please continue â do not say "description".`:j?"Profile saved. Please continue.":`${P} â confirmed. Please continue.`,B=q=>`Role saved. role_id=${q} â use this role_id in all subsequent create_item calls for items from this role. Now ask what they worked on.`,O=async()=>{var q;d("saving"),f("");try{if(i.type==="project_section"){if(!i.project_id||!i.heading)throw Object.assign(new Error("Missing project_id or heading â Claude must call get_project_sections first"),{status:422});try{await G.projects.updateSection(i.project_id,i.heading,i.new_content)}catch(V){const D=V==null?void 0:V.status;if(D===404||D===400)await G.projects.addSection(i.project_id,i.heading,i.new_content);else throw V}zl(i)}else if(i.type==="story"){if(!i.story_id)throw Object.assign(new Error("Missing story_id"),{status:422});await G.stories.update(i.story_id,{raw_content:i.new_content}),zl(i),ine(i.story_id)}else if(r&&(g||i.type==="create_role")){const V=g?{...i,role_id:b??i.role_id}:i;await r(V),zl(i)}else{const V=await G.confirmProposal({type:i.type,project_id:i.project_id,heading:i.heading,after_heading:i.after_heading,story_id:i.story_id,role_id:g&&b?b:i.role_id,item_id:i.item_id,item_name:i.item_name,item_type:i.item_type,new_content:i.new_content,project_name:i.project_name,story_title:i.story_title,role_title:i.role_title,org_name:i.org_name,start_date:i.start_date,end_date:i.end_date,tags:i.tags,version_num:i.version_num,display_name:i.display_name,phone:i.phone,linkedin_url:i.linkedin_url,github_url:i.github_url,location:i.location,alt_email:i.alt_email});V.needs_summary&&m(!0);const D=V.item_id??V.role_id??V.project_id??V.story_id;if(i.type==="create_role"&&V.role_id){t==null||t(B(V.role_id)),d("saved"),zl(i,D),I&&(n==null||n());return}zl(i,D)}d("saved"),I&&(n==null||n()),r||t==null||t(R)}catch(V){const D=(V==null?void 0:V.status)??((q=V==null?void 0:V.response)==null?void 0:q.status),te=V==null?void 0:V.message;f(D===404?"Not found â ask Claude to check the IDs and try again":D===422&&te?te:"Failed â try again"),d("error")}},U=!!(i.old_content&&i.new_content&&u==="pending"&&S);return o.jsxs(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2},className:"my-2 rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[o.jsx("span",{className:"text-xs font-medium text-text",children:P}),u==="skipped"&&o.jsx("span",{className:"text-2xs text-text-tertiary",children:"Skipped"}),u==="saved"&&c&&o.jsx("span",{className:"text-2xs text-text-tertiary",children:"Revised"}),u==="error"&&o.jsx("span",{className:"text-2xs text-error",children:h||"Failed â try again"})]}),u==="saved"?o.jsxs("div",{className:"flex flex-col gap-1 px-3 py-3",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs text-success",children:[o.jsx(yt,{size:14}),o.jsx("span",{children:z}),i.new_content&&o.jsx("button",{onClick:()=>w(q=>!q),className:"ml-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:x?"hide":"view"})]}),x&&i.new_content&&o.jsx("div",{className:"mt-1 pl-5 text-xs text-text-secondary leading-relaxed border-l border-border ml-1",children:U&&i.old_content?o.jsx(DC,{oldText:i.old_content,newText:i.new_content}):o.jsx(Iv,{text:i.new_content})}),p&&o.jsx("p",{className:"text-2xs text-text-tertiary pl-5",children:"Add more detail to generate a summary â open the item in Experience to regenerate."})]}):u==="skipped"?null:o.jsx("div",{className:"px-3 py-2",children:E||i.type==="remove_project_section"?o.jsx("p",{className:"text-xs text-text-secondary",children:"This action cannot be undone."}):i.type==="restore_project_version"?o.jsx("p",{className:"text-xs text-text-secondary",children:"This will over
569write the current version. The current state is snapshotted first so you can restore it later."}):j?o.jsxs("div",{className:"space-y-1",children:[i.display_name&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"Name: "}),i.display_name]}),i.phone&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"Phone: "}),i.phone]}),i.linkedin_url&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"LinkedIn: "}),i.linkedin_url]}),i.github_url&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"GitHub: "}),i.github_url]}),i.location&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"Location: "}),i.location]}),i.alt_email&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"Email: "}),i.alt_email]})]}):U?o.jsx(DC,{oldText:i.old_content,newText:i.new_content}):i.new_content?o.jsx("div",{className:"text-xs text-text leading-relaxed",children:o.jsx(Iv,{text:i.new_content})}):i.type==="create_role"?o.jsxs("div",{className:"space-y-0.5",children:[i.org_name&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"Company: "}),i.org_name]}),i.start_date&&o.jsxs("p",{className:"text-xs text-text",children:[o.jsx("span",{className:"text-text-tertiary",children:"From: "}),i.start_date,i.end_date?` â ${i.end_date}`:" â present"]})]}):null}),(u==="pending"||u==="error")&&o.jsxs("div",{className:"flex items-center gap-2 px-3 pb-3",children:[o.jsxs("button",{onClick:O,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-bg text-xs font-medium transition-colors ${E||i.type==="remove_project_section"?"bg-error hover:bg-error/80":"bg-accent hover:bg-accent-hover"}`,children:[o.jsx(yt,{size:11}),L]}),!a&&!c&&o.jsx("button",{onClick:()=>{d("skipped"),r&&i.type==="create_item"?r({...i,skipped:!0}):t==null||t("I skipped that. Please continue.")},className:"px-3 py-1.5 rounded-lg text-xs text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:"Skip"}),g&&C.length>0&&o.jsxs("div",{className:"relative ml-auto",children:[o.jsxs("button",{onClick:()=>T(q=>!q),className:"flex items-center gap-1 px-2 py-1.5 rounded-lg text-2xs text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:[o.jsx(px,{size:10}),(()=>{const q=C.find(V=>V.role_id===b);return q?`${q.title} · ${q.org_name}`:"Assign role"})(),o.jsx(tn,{size:9})]}),k&&o.jsx("div",{className:"absolute right-0 bottom-full mb-1 z-50 w-56 rounded-lg border border-border bg-bg-secondary shadow-lg overflow-hidden",children:C.map(q=>o.jsxs("button",{onClick:()=>{_(q.role_id),T(!1)},className:`w-full text-left px-3 py-2 text-xs transition-colors hover:bg-bg-hover ${q.role_id===b?"text-accent":"text-text-secondary"}`,children:[o.jsx("span",{className:"font-medium text-text",children:q.title}),q.org_name&&o.jsxs("span",{className:"text-text-tertiary ml-1",children:["· ",q.org_name]})]},q.role_id))})]})]}),u==="saving"&&o.jsx("div",{className:"flex items-center gap-2 px-3 pb-3",children:o.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-bg-tertiary text-text-secondary text-xs font-medium",children:[o.jsx(ew,{size:11,className:"animate-spin"}),L==="Delete"?"Deletingâ¦":L==="Create"?"Creatingâ¦":"Savingâ¦"]})})]})}function Av({attachment:e,onRemove:t,variant:n="input"}){const r=e.kind==="image"?v4:Rr;return o.jsxs(se.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",stiffness:500,damping:28},className:`group inline-flex items-center gap-2 rounded-lg px-2.5 py-1.5 text-xs ${n==="input"?"bg-bg-tertiary border border-border":"bg-bg-active/60 border border-border-subtle"}`,children:[e.kind==="image"&&e.data&&e.data.length<2e5?o.jsx("img",{src:`data:${e.mediaType};base64,${e.data}`,alt:e.name,className:"w-5 h-5 rounded object-cover shrink-0"}):o.jsx("div",{className:`w-5 h-5 rounded flex items-center justify-center shrink-0 ${e.kind==="pdf"?"bg-error/20 text-error":e.kind==="image"?"bg-pm/20 text-pm":"bg-accent/20 text-accent"}`,children:o.jsx(r,{size:11})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsx("span",{className:"text-text truncate max-w-[180px]",children:e.name}),o.jsx("span",{className:"text-xs sm:text-2xs text-text-tertiary",children:qte(e.size)})]}),t&&o.jsx("button",{onClick:t,className:"ml-1 p-1.5 sm:p-0.5 rounded text-text-tertiary hover:text-error hover:bg-error/10 transition-colors",children:o.jsx(mt,{size:11})})]})}function one({parts:e,attachments:t}){const n=e.filter(r=>r.type==="text").map(r=>r.text).join("");return o.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[t&&t.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5 justify-end max-w-[75%]",children:t.map(r=>o.jsx(Av,{attachment:r,variant:"message"},r.id))}),n&&o.jsx("div",{className:"max-w-[75%] bg-bg-active rounded-2xl rounded-br-sm px-4 py-2.5 text-sm text-text leading-relaxed whitespace-pre-wrap",children:n})]})}const lne=qO;function cne({messageId:e,text:t}){const[n,r]=y.useState(()=>{try{return JSON.parse(localStorage.getItem("pave_chat_feedback_v1")??"{}")[e]??null}catch{return null}}),[s,i]=y.useState(!1),a=u=>{const d=n===u?null:u;r(d);try{const h=JSON.parse(localStorage.getItem("pave_chat_feedback_v1")??"{}");d?h[e]=d:delete h[e],localStorage.setItem("pave_chat_feedback_v1",JSON.stringify(h))}catch{}},l=async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),1500)}catch{}},c="p-1.5 rounded-md text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors";return o.jsxs("div",{className:"flex items-center gap-0.5 mt-1.5 -ml-1.5 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity duration-150",children:[o.jsx("button",{onClick:l,className:c,title:s?"Copied!":"Copy",children:s?o.jsx(yt,{size:12,className:"text-success"}):o.jsx(Nr,{size:12})}),o.jsx("button",{onClick:()=>a("up"),className:`${c} ${n==="up"?"text-accent hover:text-accent":""}`,title:"Good response",children:o.jsx(yx,{size:12,className:n==="up"?"fill-current":""})}),o.jsx("button",{onClick:()=>a("down"),className:`${c} ${n==="down"?"text-error hover:text-error":""}`,title:"Bad response",children:o.jsx(xx,{size:12,className:n==="down"?"fill-current":""})})]})}const Iv=y.memo(function({text:t}){return o.jsx(mo,{remarkPlugins:[Dx],components:lne,children:t})});function une({messageId:e,parts:t,isStreaming:n,isThinking:r,isLast:s,onProposalResolved:i,onFirstMemorySaved:a,onOnboardingConfirm:l,onOnboardingSkipLogo:c}){const u=n&&s,d=t.filter(k=>k.type==="tool"),h=t.filter(k=>k.type==="text"),f=d.filter(k=>k.name!=="propose_edit"),p=f.length>0,m=d.some(k=>k.name==="propose_edit"&&k.status==="done"),x=u&&!r,w=r&&s&&!m,g=h.map(k=>k.text).join(` 570 571`),b=!n&&h.length>0;let _=0;return o.jsxs("div",{className:"group relative w-full",children:[(p||w)&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"sm:hidden mb-1",children:p?o.jsx(IC,{toolParts:f,isStreaming:u}):o.jsx(Sv,{})}),o.jsx("div",{className:"hidden sm:block absolute left-0 top-0 -translate-x-full pr-2",children:p?o.jsx(IC,{toolParts:f,isStreaming:u}):o.jsx(Sv,{})})]}),o.jsxs("div",{className:"flex flex-col gap-1.5 min-w-0",children:[o.jsx("div",{className:"flex flex-col gap-2",children:t.map((k,T)=>{if(k.type==="text"){const N=_++,C=x&&N===h.length-1;return o.jsxs("div",{className:"space-y-2",children:[o.jsx(Iv,{text:k.text}),C&&o.jsx("span",{className:"streaming-cursor"})]},T)}return k.type==="tool"&&k.name==="propose_edit"&&k.proposal&&k.status==="done"?o.jsx(ane,{part:k,onResolved:i,onFirstMemorySaved:a,onOnboardingConfirm:l,onOnboardingSkipLogo:c},T):null})}),b&&o.jsx(cne,{messageId:e,text:g})]})]})}const gd=[{id:"title",question:"What's your most recent job title?",placeholder:"e.g. Product Manager"}
571,{id:"company",question:"What company was that at?",placeholder:"e.g. Acme Corp"},{id:"dates",question:"When did you start? (Still there?)",placeholder:"e.g. Aug 2023 â present"}];function dne({onDone:e}){const[t,n]=y.useState(0),[r,s]=y.useState({}),[i,a]=y.useState(""),[l,c]=y.useState(!1),[u,d]=y.useState(""),h=y.useRef(null),f=Yt(),p=gd[t];y.useEffect(()=>{a(""),d(""),setTimeout(()=>{var g;return(g=h.current)==null?void 0:g.focus()},50)},[t]);const m=g=>{const b=g.toLowerCase(),_=/current|present|now|still|today/.test(b),k=g.split(/[-ââto]+/).map(S=>S.trim()).filter(Boolean),T=S=>{const I=S.match(/(\d{4})[/\-](\d{1,2})/);if(I)return`${I[1]}-${I[2].padStart(2,"0")}`;const E=S.match(/([a-z]+)\s+(\d{4})/i);if(E){const L={jan:"01",feb:"02",mar:"03",apr:"04",may:"05",jun:"06",jul:"07",aug:"08",sep:"09",oct:"10",nov:"11",dec:"12"}[E[1].toLowerCase().slice(0,3)];return L?`${E[2]}-${L}`:`${E[2]}-01`}const j=S.match(/\b(20\d{2}|19\d{2})\b/);return j?`${j[1]}-01`:S},N=T(k[0]??g),C=_?null:k[1]?T(k[1]):null;return{start:N,end:C}},x=async()=>{const g=i.trim();if(!g)return;if(t<gd.length-1){s(T=>({...T,[p.id]:g})),n(T=>T+1);return}const b={...r,[p.id]:g},{start:_,end:k}=m(b.dates??g);c(!0),d("");try{const T=await G.confirmProposal({type:"create_role",role_title:b.title,org_name:b.company,start_date:_,end_date:k??void 0});await f.invalidateQueries({queryKey:["kb"]}),await f.invalidateQueries({queryKey:["roles"]}),e(T.role_id??"")}catch{d("Couldn't save â check your connection and try again."),c(!1)}},w=gd.slice(0,t).map(g=>({label:g.question,value:r[g.id]??""}));return o.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-6 gap-8",children:[w.length>0&&o.jsx("div",{className:"w-full max-w-sm space-y-2",children:w.map(g=>o.jsxs("div",{className:"flex gap-3 text-sm",children:[o.jsx("span",{className:"text-text-tertiary shrink-0 text-xs pt-0.5",children:"â"}),o.jsx("span",{className:"text-text-secondary",children:g.value})]},g.label))}),o.jsx(He,{mode:"wait",children:o.jsxs(se.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.25,ease:"easeOut"},className:"w-full max-w-sm space-y-4",children:[o.jsx("p",{className:"text-base font-medium text-text",children:p.question}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{ref:h,value:i,onChange:g=>a(g.target.value),onKeyDown:g=>{g.key==="Enter"&&x()},placeholder:p.placeholder,disabled:l,className:"flex-1 bg-bg-secondary border border-border rounded-xl px-4 py-2.5 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/20 transition-all disabled:opacity-50"}),o.jsx("button",{onClick:x,disabled:!i.trim()||l,className:"w-10 h-10 rounded-xl bg-accent flex items-center justify-center text-bg hover:bg-accent-hover disabled:opacity-30 transition-colors shrink-0",children:l?o.jsx(se.div,{className:"w-4 h-4 rounded-full border-2 border-bg border-t-transparent",animate:{rotate:360},transition:{duration:.7,repeat:1/0,ease:"linear"}}):t<gd.length-1?o.jsx(Ka,{size:15}):o.jsx(yt,{size:15})})]}),u&&o.jsx("p",{className:"text-xs text-error",children:u})]},p.id)}),o.jsx("div",{className:"flex gap-1.5",children:gd.map((g,b)=>o.jsx("div",{className:`w-1.5 h-1.5 rounded-full transition-colors ${b===t?"bg-accent":b<t?"bg-accent/40":"bg-border"}`},g.id))})]})}function hne(){const{token:e,updateName:t}=Cl(),n=Yt(),{setMobileControls:r,setMobileRightControls:s}=wx(),{success:i}=Sf(),a=ga(),{isNewUser:l,completeOnboarding:c}=Mf(),[u,d]=y.useState(!1),h=new URLSearchParams(a.search).get("onboard")==="1"||new URLSearchParams(a.search).get("onboarding")==="1",[f,p]=y.useState(h),[m,x]=y.useState(!1),[w,g]=y.useState(!1),[b,_]=y.useState(""),[k,T]=y.useState(""),[N,C]=y.useState(null),[S,I]=y.useState(!1),[E,j]=y.useState(!1),[P,L]=y.useState(null),[z,R]=y.useState(!1),B=y.useRef(null);y.useEffect(()=>{const Y=P==null?void 0:P.step;Y==="complete"&&B.current!=="complete"&&setTimeout(()=>R(!0),1200),B.current=Y??null},[P==null?void 0:P.step]);const[O,U]=y.useState([]),[H,A]=y.useState(null),[q,V]=y.useState([]),[D,te]=y.useState(h?"haiku":"gemini-flash"),[J,ue]=y.useState(""),[Ne,Ie]=y.useState([]),[Pe,Ue]=y.useState(!1),[ot,Ye]=y.useState(!1),[ae,Ge]=y.useState(!0),[nt,De]=y.useState(!1),[Gt,Lt]=y.useState(!1),[St,rn]=y.useState(!1),[Kt,sn]=y.useState(!1),[le,Fn]=y.useState(240),It=y.useRef({active:!1,startX:0,startW:0}),[Z,de]=y.useState(null),[Re,Ve]=y.useState({top:0,right:0}),[Je,Ft]=y.useState(null),[Et,fn]=y.useState(""),[K,ge]=y.useState(0),[Te,lt]=y.useState(!1),bt=y.useRef(null),wn=y.useRef(null),Se=y.useRef(null),Ae=y.useRef(null),Le=y.useRef(null),rt=y.useRef(null),an=y.useRef(0),qe=y.useRef(""),ya=y.useRef(null),ba=y.useRef(null),Ii=y.useCallback(Y=>{if(!Y)return;const oe=ya.current;oe&&V(ne=>{const Oe=ne[ne.length-1];if(!Oe||Oe.id!==oe)return[...ne,{id:oe,role:"assistant",parts:[{type:"text",text:Y}],createdAt:Date.now()}];const _e=Oe.parts[Oe.parts.length-1],Ce=(_e==null?void 0:_e.type)==="text"?[...Oe.parts.slice(0,-1),{type:"text",text:_e.text+Y}]:[...Oe.parts,{type:"text",text:Y}];return[...ne.slice(0,-1),{...Oe,parts:Ce}]})},[]),Ls=y.useCallback(()=>
571{if(!qe.current)return;const Y=qe.current;qe.current="",Ii(Y)},[Ii]);y.useEffect(()=>{if(J.length>0||m)return;const Y=setInterval(()=>ge(oe=>oe+1),4500);return()=>clearInterval(Y)},[J.length,m]),y.useEffect(()=>{const Y=window.visualViewport;if(!Y)return;const oe=/iP(hone|ad|od)/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,ne=window.innerWidth<640,Oe=`calc(${Z4+16}px + env(safe-area-inset-bottom, 0px))`;ne&&Le.current&&(Le.current.style.bottom=Oe);const _e=()=>{const Ce=Math.max(0,window.innerHeight-Y.height-Y.offsetTop),xe=Ce>50;oe&&Le.current&&(Le.current.style.bottom=xe?`${Ce}px`:Oe),document.documentElement.style.setProperty("--keyboard-open",xe?"1":"0")};return Y.addEventListener("resize",_e),Y.addEventListener("scroll",_e),()=>{Y.removeEventListener("resize",_e),Y.removeEventListener("scroll",_e),document.documentElement.style.setProperty("--keyboard-open","0")}},[]),y.useEffect(()=>{if(!Pe)return;let Y=performance.now();const oe=ne=>{const Oe=ne-Y;Y=ne;const _e=qe.current;if(_e.length>0){const xe=Math.max(80,_e.length*1.6),ht=Math.max(1,Math.floor(Oe/1e3*xe)),jn=_e.slice(0,ht);qe.current=_e.slice(ht),Ii(jn)}ba.current=requestAnimationFrame(oe)};return ba.current=requestAnimationFrame(oe),()=>{ba.current&&cancelAnimationFrame(ba.current)}},[Pe,Ii]),y.useEffect(()=>{const Y=wn.current,oe=bt.current;if(!Y||!oe)return;const ne=new IntersectionObserver(([Oe])=>Ge(Oe.isIntersecting),{root:oe,threshold:.1});return ne.observe(Y),()=>ne.disconnect()},[]),y.useLayoutEffect(()=>{ae&&bt.current&&(bt.current.scrollTop=bt.current.scrollHeight)},[q,ot,Pe,ae]);const{data:Fs}=wt({queryKey:["conversations"],queryFn:()=>G.conversations.list(),enabled:!!e});y.useEffect(()=>{Fs&&U(Y=>{const oe=new Map(Y.map(ne=>[ne.id,ne.messages]));return Fs.map(ne=>({id:ne.conversation_id,title:ne.title,model:ne.model,messages:oe.get(ne.conversation_id)??[],createdAt:new Date(ne.created_at).getTime(),updatedAt:new Date(ne.updated_at).getTime(),pinned:ne.pinned??!1,chatType:ne.chat_type??"regular"}))})},[Fs]);const Uf=y.useCallback(async Y=>{const oe=O.find(ne=>ne.id===Y);if((oe==null?void 0:oe.chatType)==="onboarding"){A(Y),V([]),Ie([]),Ge(!0);try{const[ne,Oe]=await Promise.all([fetch("/api/onboarding/state",{headers:{Authorization:`Bearer ${e}`}}).then(Ce=>Ce.json()),G.conversations.get(Y)]);ne.active&&L({step:ne.step,stories_saved:ne.stories_saved,roles_saved:ne.roles_saved,logo_done:ne.logo_done});const _e=Oe.messages.map((Ce,xe)=>({id:Ce.message_id,role:Ce.role,parts:Ce.parts??[],attachments:(Ce.attachments??[]).length>0?Ce.attachments:void 0,createdAt:new Date(Ce.created_at).getTime()+xe}));if(ne.active&&ne.pending_proposal){const Ce=_e.map(xe=>xe.role).lastIndexOf("assistant");if(Ce>=0){const xe=_e[Ce];xe.parts.some(jn=>jn.type==="tool")||(_e[Ce]={...xe,parts:[...xe.parts,{type:"tool",id:crypto.randomUUID(),name:"propose_edit",label:"Proposal",status:"done",proposal:ne.pending_proposal}]})}}V(_e)}catch{}return}if(oe&&oe.messages.length>0){A(Y),V(oe.messages),te(oe.model??"gemini-flash"),Ie([]),Ge(!0),L(null);return}A(Y),V([]),Ie([]),Ge(!0),L(null);try{const ne=await G.conversations.get(Y),Oe=ne.messages.map((_e,Ce)=>({id:_e.message_id,role:_e.role,parts:_e.parts??[],attachments:(_e.attachments??[]).length>0?_e.attachments:void 0,createdAt:new Date(_e.created_at).getTime()+Ce}));V(Oe),te(ne.model??"gemini-flash"),U(_e=>_e.map(Ce=>Ce.id===Y?{...Ce,messages:Oe,title:ne.title,model:ne.model}:Ce))}catch{}},[O,e]),va=y.useCallback(()=>{A(null),V([]),ue(""),Ie([]),Ge(!0),setTimeout(()=>{var Y;return(Y=Se.current)==null?void 0:Y.focus()},50)},[]);y.useEffect(()=>(r(o.jsx("button",{onClick:()=>sn(!0),className:"p-1.5 rounded-lg text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(tw,{size:16})})),s(o.jsx("button",{onClick:va,className:"p-2 rounded-lg text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(iy,{size:14})})),()=>{r(null),s(null)}),[r,s,va]);const Il=y.useCallback(async Y=>{const oe=Array.from(Y),Oe=(await Promise.all(oe.map(Vte))).filter(_e=>_e!==null);Oe.length<oe.length,Ie(_e=>[..._e,...Oe])},[]),$f=Y=>{Ie(oe=>oe.filter(ne=>ne.id!==Y))};y.useEffect(()=>{const Y=_e=>{var Ce;(Ce=_e.dataTransfer)!=null&&Ce.types.includes("Files")&&(an.current+=1,De(!0))},oe=()=>{an.current-=1,an.current<=0&&(an.current=0,De(!1))},ne=_e=>{_e.preventDefault()},Oe=async _e=>{var Ce;_e.preventDefault(),an.current=0,De(!1),(Ce=_e.dataTransfer)!=null&&Ce.files&&await Il(_e.dataTransfer.files)};return window.addEventListener("dragenter",Y),window.addEventListener("dragleave",oe),window.addEventListener("dragover",ne),window.addEventListener("drop",Oe),()=>{window.removeEventListener("dragenter",Y),window.removeEventListener("dragleave",oe),window.removeEventListener("dragover",ne),window.removeEventListener("drop",Oe)}},[Il]);const Pl=y.useCallback(Y=>{U(oe=>oe.filter(ne=>ne.id!==Y)),H===Y&&va(),G.conversations.delete(Y).catch(()=>{})},[H,va]),Pi=y.useCallback((Y,oe)=>{U(ne=>ne.map(Oe=>Oe.id===Y?{...Oe,title:oe}:Oe)),G.conversations.rename(Y,oe).catch(()=>{})},[]),Hu=Y=>{Y.style.height="auto",Y.style.height=`${Math.max(24,Math.min(Y.scrollHeight,144))}px`},ke=()=>{var Y;(Y=rt.current)==null||Y.abort(),Ue(!1),Ye(!1)},ut=y.useCallback(async(Y,oe)=>{var Bs;const ne=(Y??J).trim(),Oe=!Y&&Ne.length>0;if(!ne&&!Oe||Pe)return;const _e=H??crypto.randomUUID(),Ce=ne==="__onboarding_start__",xe=ne.startsWith("__onboarding_projects__"),ht=xe?ne.replace("__onboarding_projects__",""):"",jn=Ce||xe,ii=jn?"":ne,ai=xe?`Role saved. Now ask me what I worked on there so you can save my first project. My role_id is ${ht}.`:ne,Sr=Ce||xe?"Career intake":ne.slice(0,40)||(((Bs=Ne[0])==null?void 0:Bs.name)??"Attachment"),Gn=Sr.charAt(0).toUpperCase()+Sr.slice(1),Cr=Ne,Bn={id:crypto.randomUUID(),role:"user",parts:ii?[{type:"text",text:ii}]:[],attachments:Cr.length>0?Cr:void 0,createdAt:Date.now()},Xt=jn?{...Bn,parts:[{type:"text",text:ai}]}:Bn,An=oe?[...q]:[...q,Bn],Br=[...q,Xt];V(An),ue(""),Ie([]),Ye(!0),Ue(!0),Ge(!0),H||A(_e),Se.current&&(Se.current.value="",
571Se.current.style.height="auto");const ur=new AbortController;rt.current=ur;const In=crypto.randomUUID();ya.current=In,qe.current="";const qf=Br.map(Bt=>{const dr=Bt.parts.filter(pn=>pn.type==="text").map(pn=>pn.text).join(""),Un=Bt.attachments??[];if(Un.length===0)return{role:Bt.role,content:dr};const tr=[];let En=dr;for(const pn of Un)pn.kind==="text"&&(En+=` 572 573--- 574Attached file: ${pn.name} 575 576${pn.data}`);En.trim()&&tr.push({type:"text",text:En});for(const pn of Un)pn.kind==="image"?tr.push({type:"image",source:{type:"base64",media_type:pn.mediaType,data:pn.data}}):pn.kind==="pdf"&&tr.push({type:"document",source:{type:"base64",media_type:"application/pdf",data:pn.data}});return{role:Bt.role,content:tr.length>0?tr:dr}}).filter(Bt=>typeof Bt.content=="string"?Bt.content.trim():Bt.content.length>0);try{const Bt=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({messages:qf,conversation_id:_e,model:D,is_onboarding:h}),signal:ur.signal});if(!Bt.ok){if(Bt.status===402){lt(!0),Ue(!1),Ye(!1);return}throw new Error("Connection failed")}if(!Bt.body)throw new Error("Connection failed");const dr=Bt.body.getReader(),Un=new TextDecoder;let tr="";const En=pn=>{V(_a=>_a.find(Us=>Us.id===In)?_a.map(Us=>Us.id===In?{...Us,parts:pn(Us.parts)}:Us):[..._a,{id:In,role:"assistant",parts:pn([]),createdAt:Date.now()}])};for(;;){const{value:pn,done:_a}=await dr.read();if(_a)break;tr+=Un.decode(pn,{stream:!0});const Vu=tr.split(` 577`);tr=Vu.pop()??"";for(const Us of Vu){if(!Us.startsWith("data: "))continue;let Pn;try{Pn=JSON.parse(Us.slice(6))}catch{continue}if(Pn.type==="text_delta")Ye(!1),qe.current+=Pn.text;else if(Pn.type==="tool_start"){Ye(!1),Ls();const Kx={type:"tool",id:Pn.id,name:Pn.name,label:Pn.label,status:"pending"};En(Ol=>[...Ol,Kx])}else if(Pn.type==="tool_result")En(Kx=>Kx.map(Ol=>Ol.type==="tool"&&Ol.id===Pn.id?{...Ol,status:"done",label:Pn.label,...Pn.proposal?{proposal:Pn.proposal}:{}}:Ol));else{if(Pn.type==="message_stop")break;if(Pn.type==="error"){Ls(),En(()=>[{type:"text",text:`Error: ${Pn.message}`}]);break}}}}}catch(Bt){Bt.name!=="AbortError"&&V(dr=>{const Un=dr.find(En=>En.id===In),tr={id:In,role:"assistant",parts:[{type:"text",text:"Something went wrong. Please try again."}],createdAt:Date.now()};return Un?dr:[...dr,tr]})}finally{Ls(),ya.current=null,Ue(!1),Ye(!1),V(Bt=>(U(dr=>Yte(dr,_e,Gn,D)),(async()=>{const dr=await Promise.all(Bt.map(async Un=>{if(!Un.attachments||Un.attachments.length===0)return Un;const tr=await Promise.all(Un.attachments.map(async En=>{if(En.storagePath||!En.data||En.kind==="text")return{...En,data:En.kind==="text"?En.data:void 0};try{const pn=atob(En.data),_a=new Uint8Array(pn.length);for(let Pn=0;Pn<pn.length;Pn++)_a[Pn]=pn.charCodeAt(Pn);const Vu=new File([_a],En.name,{type:En.mediaType}),Us=await G.conversations.uploadAttachment(_e,Vu);return{...En,storagePath:Us.storage_path,data:void 0}}catch{return En}}));return{...Un,attachments:tr}}));try{await G.conversations.upsert(_e,{title:Gn,model:D,messages:dr.map(Un=>({role:Un.role,parts:Un.parts,attachments:Un.attachments??[]}))}),U(Un=>Un.map(tr=>tr.id===_e?{...tr,messages:dr,title:Gn,model:D}:tr))}catch{}})(),Bt))}},[J,Pe,q,H,e,Ne,Ls]),er=O.find(Y=>Y.id===H),dt=(er==null?void 0:er.chatType)==="onboarding",Cn=y.useCallback(async(Y,oe)=>{if(new Set(["skip","no linkedin","manual","manually","enter manually","no linkedin profile"]).has(Y.toLowerCase().trim().replace(/\.$/,""))&&!oe){Ue(!1),Ye(!1);const xe=crypto.randomUUID();V(ht=>[...ht,{id:xe,role:"user",parts:[{type:"text",text:Y}],createdAt:Date.now()}]),C(xe),x(!0);return}if(!H||Pe)return;const Oe=crypto.randomUUID(),_e=oe?(Array.isArray(oe)?oe:[oe]).filter(xe=>xe.kind==="image"):[];Ie([]),ue(""),Se.current&&(Se.current.value="",Se.current.style.height="auto"),(Y&&Y!=="__init__"&&Y!=="__advance__"||_e.length>0)&&V(xe=>[...xe,{id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:Y}],attachments:_e.length>0?_e:void 0,createdAt:Date.now()}]),Ue(!0),Ye(!0);const Ce={conversation_id:H,text:Y};_e.length===1?(Ce.image_data=_e[0].data,Ce.image_media_type=_e[0].mediaType):_e.length>1&&(Ce.images=_e.map(xe=>({data:xe.data,media_type:xe.mediaType})));try{const xe=await fetch("/api/onboarding/message",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify(Ce)});if(!xe.ok){const Sr=await xe.text();throw new Error(`HTTP ${xe.status}: ${Sr}`)}if(!xe.body)throw new Error("No body");const ht=xe.body.getReader(),jn=new TextDecoder;let ii="";const ai=Sr=>{V(Gn=>Gn.find(Bn=>Bn.id===Oe)?Gn.map(Bn=>Bn.id===Oe?{...Bn,parts:Sr(Bn.parts)}:Bn):[...Gn,{id:Oe,role:"assistant",parts:Sr([]),createdAt:Date.now()}])};for(;;){const{done:Sr,value:Gn}=await ht.read();if(Sr)break;
577ii+=jn.decode(Gn,{stream:!0});const Cr=ii.split(` 578`);ii=Cr.pop()??"";for(const Bn of Cr)if(Bn.startsWith("data: "))try{const Xt=JSON.parse(Bn.slice(6));Xt.event==="text"?(Ye(!1),ai(An=>{const Br=An[An.length-1];return(Br==null?void 0:Br.type)==="text"?[...An.slice(0,-1),{type:"text",text:Br.text+Xt.text}]:[...An,{type:"text",text:Xt.text}]})):Xt.event==="proposal"?ai(An=>[...An,{type:"tool",id:crypto.randomUUID(),name:"propose_edit",label:"Proposal",status:"done",proposal:Xt.proposal}]):Xt.event==="step"&&L({step:Xt.step,stories_saved:Xt.stories_saved,roles_saved:Xt.roles_saved,logo_done:Xt.logo_done})}catch{}}}catch(xe){console.error(xe)}finally{Ue(!1),Ye(!1),ue("")}},[H,Pe,e]),Qt=y.useCallback(async(Y,oe,ne,Oe)=>{if(!H)return;const Ce=await(await fetch("/api/onboarding/confirm",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({conversation_id:H,proposal:{...Y,...oe},user_message:ne})})).json();L(jn=>jn&&{...jn,step:Ce.step,stories_saved:Ce.stories_saved??jn.stories_saved,roles_saved:Ce.roles_saved??jn.roles_saved});const xe=Y.display_name??"";if(xe&&t(xe),n.invalidateQueries({queryKey:["user-profile"]}),n.invalidateQueries({queryKey:["kb"]}),Oe)return;Ue(!0);const ht=crypto.randomUUID();try{const jn=await fetch("/api/onboarding/message",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({conversation_id:H,text:"__advance__"})});if(jn.ok&&jn.body){const ii=jn.body.getReader(),ai=new TextDecoder;let Sr="",Gn="",Cr=!1;for(;;){const{done:Bn,value:Xt}=await ii.read();if(Bn)break;Sr+=ai.decode(Xt,{stream:!0});const An=Sr.split(` 579`);Sr=An.pop()??"";for(const Br of An)if(Br.startsWith("data: "))try{const ur=JSON.parse(Br.slice(6));ur.event==="text"?(Cr||(Cr=!0,Ye(!0)),Gn+=ur.text,V(In=>In.some(Bs=>Bs.id===ht)?In.map(Bs=>Bs.id===ht?{...Bs,parts:[{type:"text",text:Gn}]}:Bs):[...In,{id:ht,role:"assistant",parts:[{type:"text",text:Gn}],createdAt:Date.now()}])):ur.event==="proposal"?V(In=>{const qf=In.some(Bt=>Bt.id===ht),Bs={type:"tool",id:crypto.randomUUID(),name:"propose_edit",label:"Proposal",status:"done",proposal:ur.proposal};return qf?In.map(Bt=>Bt.id===ht?{...Bt,parts:[...Bt.parts.filter(dr=>dr.type!=="tool"),Bs]}:Bt):[...In,{id:ht,role:"assistant",parts:[Bs],createdAt:Date.now()}]}):ur.event==="step"&&L(In=>In&&{...In,step:ur.step,stories_saved:ur.stories_saved??In.stories_saved,roles_saved:ur.roles_saved??In.roles_saved})}catch{}}}}finally{Ue(!1),Ye(!1)}},[H,e,n,t]),Dl=y.useCallback(async()=>{H&&(await fetch("/api/onboarding/skip",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({conversation_id:H})}),L(Y=>Y&&{...Y,step:"complete",logo_done:!0}))},[H,e]);y.useEffect(()=>{const Y=async()=>{if(!(!dt||Pe))try{const oe=await fetch("/api/onboarding/state",{headers:{Authorization:`Bearer ${e}`}}).then(xe=>xe.json()),ne=oe.conversation_id??H;if(!ne)return;ne!==H&&A(ne);const Ce=(await G.conversations.get(ne)).messages.map((xe,ht)=>({id:xe.message_id,role:xe.role,parts:xe.parts??[],attachments:(xe.attachments??[]).length>0?xe.attachments:void 0,createdAt:new Date(xe.created_at).getTime()+ht})).map(xe=>({...xe,parts:xe.parts.filter(ht=>ht.type!=="tool"||ht.status==="confirmed")}));if(oe.active&&oe.pending_proposal){const xe=Ce.map(ht=>ht.role).lastIndexOf("assistant");xe>=0&&(Ce[xe]={...Ce[xe],parts:[...Ce[xe].parts,{type:"tool",id:crypto.randomUUID(),name:"propose_edit",label:"Proposal",status:"done",proposal:oe.pending_proposal}]})}Ce.length>0&&V(Ce)}catch{}};return window.addEventListener("focus",Y),()=>window.removeEventListener("focus",Y)},[dt,H,Pe]);const zf=new Set(["skip","no linkedin","manual","manually","enter manually","no linkedin profile"]),Hf=Y=>{const oe=typeof window<"u"&&window.matchMedia("(hover: none)").matches;if(Y.key==="Enter"&&!Y.shiftKey&&!oe){Y.preventDefault();const ne=J.trim().toLowerCase().replace(/\.$/,"");if(h&&zf.has(ne)){Ue(!1),Ye(!1);const Oe=crypto.randomUUID();V(_e=>[..._e,{id:Oe,role:"user",parts:[{type:"text",text:J.trim()}],createdAt:Date.now()}
579]),ue(""),Se.current&&(Se.current.value="",Se.current.style.height="auto"),C(Oe),x(!0);return}dt||h?Cn(J.trim(),Ne.filter(Oe=>Oe.kind==="image")):ut()}},Wu=a.key;y.useEffect(()=>{const Y=new URLSearchParams(a.search);Y.get("onboard")!=="1"||Y.get("onboarding")==="1"||d(!1)},[Wu]);const ys=y.useRef(null),Wf=y.useRef(!1),Vf=y.useRef(null),eE=y.useRef(!1);y.useEffect(()=>{!h||!e||eE.current||(eE.current=!0,Promise.all([fetch("/api/onboarding/start",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`}}).then(Y=>Y.json()),fetch("/api/onboarding/state",{headers:{Authorization:`Bearer ${e}`}}).then(Y=>Y.json())]).then(async([Y,oe])=>{if(!Y.conversation_id)return;let ne=[];try{if(ne=(await G.conversations.get(Y.conversation_id)).messages.map((xe,ht)=>({id:xe.message_id,role:xe.role,parts:xe.parts??[],attachments:(xe.attachments??[]).length>0?xe.attachments:void 0,createdAt:new Date(xe.created_at).getTime()+ht})),ne=ne.map(xe=>({...xe,parts:xe.parts.filter(ht=>ht.type!=="tool"||ht.status==="confirmed")})),oe.active&&oe.pending_proposal){const xe=ne.map(ht=>ht.role).lastIndexOf("assistant");xe>=0&&(ne[xe]={...ne[xe],parts:[...ne[xe].parts,{type:"tool",id:crypto.randomUUID(),name:"propose_edit",label:"Proposal",status:"done",proposal:oe.pending_proposal}]})}}catch{}U(Ce=>Ce.some(xe=>xe.id===Y.conversation_id)?Ce:[{id:Y.conversation_id,title:"Getting started",model:"haiku",messages:[],createdAt:Date.now(),updatedAt:Date.now(),pinned:!0,chatType:"onboarding"},...Ce]),A(Y.conversation_id),V(ne),Ie([]),Ge(!0),L({step:oe.step??Y.step??"parse_linkedin",stories_saved:oe.stories_saved??0,roles_saved:oe.roles_saved??[],logo_done:oe.logo_done??!1});const Oe=async()=>{const Ce=Y.conversation_id;
579Ue(!0),Ye(!0);const xe=crypto.randomUUID();try{const ht=await fetch("/api/onboarding/message",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({conversation_id:Ce,text:"__init__"})});if(ht.ok&&ht.body){const jn=ht.body.getReader(),ii=new TextDecoder;let ai="";const Sr=Gn=>{V(Cr=>Cr.find(Xt=>Xt.id===xe)?Cr.map(Xt=>Xt.id===xe?{...Xt,parts:Gn(Xt.parts)}:Xt):[...Cr,{id:xe,role:"assistant",parts:Gn([]),createdAt:Date.now()}])};for(;;){const{done:Gn,value:Cr}=await jn.read();if(Gn)break;ai+=ii.decode(Cr,{stream:!0});const Bn=ai.split(` 580`);ai=Bn.pop()??"";for(const Xt of Bn)if(Xt.startsWith("data: "))try{const An=JSON.parse(Xt.slice(6));An.event==="text"?(Ye(!1),Sr(Br=>{const ur=Br[Br.length-1];return(ur==null?void 0:ur.type)==="text"?[...Br.slice(0,-1),{type:"text",text:ur.text+An.text}]:[...Br,{type:"text",text:An.text}]})):An.event==="step"&&L({step:An.step,stories_saved:An.stories_saved,roles_saved:An.roles_saved,logo_done:An.logo_done})}catch{}}}}finally{Ue(!1),Ye(!1)}};ne.some(Ce=>Ce.role==="user")||(Wf.current?(Wf.current=!1,Oe()):ys.current=Oe)}).catch(console.error))},[h,e]),y.useEffect(()=>{if(!H||!Vf.current)return;const{proposal:Y,extra:oe,userMessage:ne,skipAdvance:Oe}=Vf.current;Vf.current=null,Qt(Y,oe,ne,Oe)},[H,Qt]),y.useEffect(()=>{Se.current&&Hu(Se.current)},[]);const A6=y.useCallback(()=>{localStorage.getItem("pave_onboarding_v1")!=="complete"&&(c(),i("Your first memory is saved. Keep going."))},[c,i]);function I6({onClose:Y}){const[oe,ne]=y.useState(!1),Oe=du;function _e(){navigator.clipboard.writeText(Oe),ne(!0),setTimeout(()=>ne(!1),2e3)}return Er.createPortal(o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[o.jsx("div",{className:"absolute inset-0 bg-black/75 backdrop-blur-sm",onClick:Y}),o.jsxs(se.div,{initial:{opacity:0,scale:.95,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:12},transition:{type:"spring",stiffness:400,damping:30},className:"relative z-10 w-full max-w-md bg-surface rounded-2xl border border-border shadow-2xl overflow-hidden",children:[o.jsx("div",{className:"px-6 pt-6 pb-4 border-b border-border",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("div",{className:"w-8 h-8 rounded-lg bg-accent/10 flex items-center justify-center",children:o.jsx(Si,{size:15,className:"text-accent"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-text-tertiary",children:"You're all set"}),o.jsx("p",{className:"text-sm font-semibold text-text",children:"3 stories saved"})]})]}),o.jsx("button",{onClick:Y,className:"text-text-tertiary hover:text-text transition-colors p-1",children:o.jsx(mt,{size:16})})]})}),o.jsxs("div",{className:"px-6 py-5 space-y-5",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text mb-1",children:"Keep your stories fresh â effortlessly."}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:"Connect Pave to Claude and just tell it what you shipped, what you learned, or what went sideways. It saves straight to your Pave memories â no forms, no friction."})]}),o.jsxs("div",{className:"space-y-2.5",children:[o.jsx("p",{className:"text-xs font-medium text-text-tertiary uppercase tracking-wider",children:"How to connect"}),o.jsx("ol",{className:"space-y-2 text-sm text-text-secondary",children:[o.jsxs(o.Fragment,{children:[o.jsx("a",{href:"https://claude.ai/new?modal=add-custom-connector#settings/customize-connectors",target:"_blank",rel:"noreferrer",className:"text-accent hover:underline font-medium",children:"Click here to open the connector dialog"})," â or go to ",o.jsx("span",{className:"font-medium text-text",children:"Settings â Connectors"})," in the left sidebar, then click ",o.jsx("span",{className:"font-medium text-text",children:"Add"})," in the top right"]}),o.jsxs(o.Fragment,{children:["Choose ",o.jsx("span",{className:"font-medium text-text",children:"Add custom connector"})]}),o.jsxs(o.Fragment,{children:["Name it ",o.jsx("span",{className:"font-mono text-xs bg-bg-secondary px-1.5 py-0.5 rounded text-text",children:"Pave"})," and paste this URL:"]})].map((Ce,xe)=>o.jsxs("li",{className:"flex gap-3",children:[o.jsx("span",{className:"shrink-0 w-5 h-5 rounded-full bg-accent/10 text-accent text-xs font-semibold flex items-center justify-center mt-0.5",children:xe+1}),o.jsx("span",{className:"leading-relaxed",children:Ce})]},xe))}),o.jsxs("div",{className:"flex items-center gap-2 bg-bg-secondary rounded-lg border border-border px-3 py-2 mt-1",children:[o.jsx("span",{className:"flex-1 font-mono text-xs text-text select-all truncate",children:Oe}),o.jsxs("button",{onClick:_e,className:"shrink-0 flex items-center gap-1 text-xs text-text-tertiary hover:text-accent transition-colors",children:[oe?o.jsx(yt,{size:12,className:"text-accent"}):o.jsx(Nr,{size:12}),oe?"Copied":"Copy"]})]}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Sign in with Google when prompted. Once the tool list loads, you're connected."})]})]}),o.jsxs("div",{className:"px-6 pb-6 flex gap-2",children:[o.jsxs("a",{href:"/generate",className:"flex-1 flex items-center justify-center gap-1.5 px-4 py-2.5 rounded-xl bg-accent text-bg text-sm font-medium hover:bg-accent-hover transition-colors",children:[o.jsx(po,{size:13}),"Generate resume"]}),o.jsxs("button",{onClick:()=>{Y();const Ce=crypto.randomUUID();U(xe=>[{id:Ce,title:"New chat",model:"gemini-flash",messages:[],createdAt:Date.now(),updatedAt:Date.now()},...xe]),A(Ce),V([])},className:"flex-1 flex items-center justify-center gap-1.5 px-4 py-2.5 rounded-xl border border-border text-sm text-text hover:bg-bg-hover transition-colors",children:[o.jsx(Cu,{size:13}),"New chat"]})]})]})]}),document.body)}const Gx=q.slice().reverse().find(Y=>Y.role==="assistant"),P6=(Gx==null?void 0:Gx.parts.some(Y=>Y.type==="tool"&&Y.name==="propose_edit"&&Y.status==="done"))??!1;return o.jsxs("div",{className:"flex h-[calc(100dvh-3rem)]",children:[o.jsx("div",{className:"hidden sm:flex",children:St?o.jsx("div",{className:"shrink-0 w-6 border-r border-border bg-bg-secondary flex flex-col",children:o.jsx("button",{onClick:()=>rn(!1),className:"flex-1 flex items-center justify-center text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",title:"Expand sidebar",children:o.jsx(ma,{size:13,className:"text-text-tertiary"})})}):o.jsxs("div",{style:{width:le},className:"shrink-0 flex flex-col bg-bg-secondary border-r border-border relative",children:[o.jsx(lw,{label:o.jsx("span",{className:"px-1 text-sm font-semibold text-text",children:"Chats"}),actions:o.jsx("button",{onClick:va,className:"inline-flex items-center justify-center min-h-[44px] min-w-[44px] sm:min-h-[28px] sm:min-w-[28px] rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",title:"New chat",children:o.jsx(iy,{size:13})}),onCollapse:()=>rn(!0)}),o.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:o.jsx(He,{initial:!1,children:O.map(Y=>o.jsx(se.div,{initial:{opacity:0,x:-8}
580,animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.15},className:"group relative",children:Je===Y.id?o.jsx("div",{className:"px-2 py-1",children:o.jsx("input",{autoFocus:!0,value:Et,onChange:oe=>fn(oe.target.value),onKeyDown:oe=>{oe.key==="Enter"&&(Et.trim()&&Pi(Y.id,Et.trim()),Ft(null)),oe.key==="Escape"&&Ft(null)},onBlur:()=>{Et.trim()&&Pi(Y.id,Et.trim()),Ft(null)},className:"w-full text-sm bg-bg border border-accent/50 rounded px-2 py-1 text-text focus:outline-none"})}):o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:()=>Uf(Y.id),className:`w-full text-left px-3 py-2 pr-8 text-sm transition-colors flex items-center gap-1.5 ${H===Y.id?"bg-bg-active text-text":"text-text-secondary hover:bg-bg-hover hover:text-text"}`,children:[Y.pinned&&o.jsx("span",{className:"shrink-0 w-1.5 h-1.5 rounded-full bg-accent",title:"Pinned"}),o.jsx("span",{className:"min-w-0 truncate",children:Y.title||"New conversation"})]}),o.jsx("div",{className:"absolute right-1.5 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity",children:o.jsx("button",{onClick:oe=>{oe.stopPropagation();const ne=oe.currentTarget.getBoundingClientRect();Ve({top:ne.bottom+4,right:window.innerWidth-ne.right}),de(Z===Y.id?null:Y.id)},className:"p-1 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(Su,{size:12})})})]})},Y.id))})}),o.jsx("div",{onMouseDown:Y=>{Y.preventDefault(),It.current={active:!0,startX:Y.clientX,startW:le};const oe=Oe=>{if(!It.current.active)return;const _e=Oe.clientX-It.current.startX;Fn(Math.min(400,Math.max(160,It.current.startW+_e)))},ne=()=>{It.current.active=!1,window.removeEventListener("mousemove",oe),window.removeEventListener("mouseup",ne)};window.addEventListener("mousemove",oe),window.addEventListener("mouseup",ne)},className:"absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-accent/30 transition-colors"})]})}),o.jsx(Du,{open:Kt,onClose:()=>sn(!1),side:"bottom",mobileOnly:!0,title:"Conversations",titleActions:o.jsx("button",{onClick:()=>{va(),sn(!1)},className:"inline-flex items-center justify-center min-h-[44px] min-w-[44px] sm:min-h-[28px] sm:min-w-[28px] text-text-tertiary hover:text-text rounded",title:"New chat",children:o.jsx(iy,{size:13})}),maxHeightMobile:"75dvh",children:o.jsx("div",{className:"py-1",children:O.map(Y=>o.jsxs("button",{onClick:()=>{Uf(Y.id),sn(!1)},className:`w-full text-left px-3 py-2.5 text-sm transition-colors flex items-center gap-1.5 ${H===Y.id?"bg-bg-active text-text":"text-text-secondary hover:bg-bg-hover hover:text-text"}`,children:[Y.pinned&&o.jsx("span",{className:"shrink-0 w-1.5 h-1.5 rounded-full bg-accent"}),o.jsx("span",{className:"min-w-0 truncate",children:Y.title||"New conversation"})]},Y.id))})}),Er.createPortal(o.jsx(He,{children:Z&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-toast",onClick:()=>de(null)}),o.jsx(se.div,{initial:{opacity:0,scale:.95,y:-4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-4},transition:{duration:.1},style:{position:"fixed",top:Re.top,right:Re.right},className:"z-toast w-32 bg-bg border border-border rounded-lg shadow-lg py-1 overflow-hidden",children:O.find(Y=>Y.id===Z)&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:()=>{var oe;const Y=Z;de(null),fn(((oe=O.find(ne=>ne.id===Y))==null?void 0:oe.title)||""),Ft(Y)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:text-text hover:bg-bg-secondary transition-colors",children:[o.jsx(qn,{size:11})," Rename"]}),o.jsxs("button",{onClick:()=>{const Y=Z;de(null),Pl(Y)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-error hover:bg-error/10 transition-colors",children:[o.jsx(Yn,{size:11})," Delete"]})]})})]})}),document.body),o.jsx(He,{children:z&&o.jsx(I6,{onClose:()=>R(!1)})}),f&&o.jsx(Qte,{onStart:()=>{p(!1),ys.current?(ys.current(),ys.current=null):Wf.current=!0},onManual:()=>{p(!1),x(!0),ys.current?(ys.current(),ys.current=null):Wf.current=!0}}),o.jsxs("div",{className:`flex-1 flex flex-col min-w-0 relative ${f?"hidden":""}`,children:[o.jsx("div",{ref:bt,className:"flex-1 overflow-y-auto pb-24 sm:pb-0",children:q.length===0?h&&l&&!u&&!dt?o.jsx(dne,{onDone:Y=>{d(!0),c(),setTimeout(()=>{ut(`__onboarding_projects__${Y}`,!0)},300)}}):o.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-7 px-4",children:[o.jsxs("div",{className:"flex flex-col items-center gap-3",children:[o.jsx("div",{className:"w-11 h-11 rounded-xl bg-accent/10 flex items-center justify-center",children:o.jsx(Si,{size:20,className:"text-accent"})}),o.jsxs("div",{className:"text-center space-y-1",children:[o.jsx("h2",{className:"text-base font-semibold text-text",children:"Ask me anything about your career"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Full access to your knowledge base"})]})]}),o.jsx("div",{className:"hidden sm:grid grid-cols-2 gap-2 w-fit",children:Gte.map(Y=>o.jsx("button",{onClick:()=>{ue(Y.prompt),setTimeout(()=>{var oe;
580return(oe=Se.current)==null?void 0:oe.focus()},50)},className:"rounded-full border border-border bg-bg-secondary px-4 h-10 text-xs text-text-secondary hover:border-border-focus hover:bg-bg-active hover:text-text transition-colors whitespace-nowrap",children:Y.label},Y.label))})]}):o.jsxs(o.Fragment,{children:[dt&&P&&o.jsx(nne,{step:P.step,storiesSaved:P.stories_saved}),o.jsxs("div",{className:"max-w-2xl mx-auto w-full px-4 py-8 space-y-6",children:[o.jsx(He,{initial:!1,children:(()=>{var oe;const Y=new Set;for(const ne of q)for(const Oe of ne.parts)if(Oe.type==="tool"&&Oe.status==="confirmed"){const _e=(oe=Oe.proposal)==null?void 0:oe.item_name;_e&&Y.add(_e)}return q.map((ne,Oe)=>o.jsx(ye.Fragment,{children:o.jsx(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:ne.role==="user"?o.jsx(one,{parts:ne.parts,attachments:ne.attachments}):o.jsx(une,{messageId:ne.id,parts:ne.parts.map(_e=>{var Ce;if(_e.type==="tool"&&_e.status==="done"){const xe=(Ce=_e.proposal)==null?void 0:Ce.item_name;if(xe&&Y.has(xe))return null}return _e}).filter(Boolean),isStreaming:Pe,isThinking:ot,isLast:Oe===q.length-1,onProposalResolved:_e=>dt?Cn(_e):ut(_e,!0),onFirstMemorySaved:A6,onOnboardingConfirm:dt?Qt:void 0,onOnboardingSkipLogo:dt?Dl:void 0})})},ne.id))})()}),ot&&!P6&&o.jsx(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:{type:"spring",stiffness:400,damping:30},children:o.jsx(Sv,{})}),o.jsx("div",{ref:wn,className:"h-px"})]})]})}),q.length>0&&o.jsx("div",{className:"hidden sm:block absolute top-2 right-3 text-2xs text-text-tertiary/40 select-none pointer-events-none",children:D==="haiku"?"Claude Haiku":"Gemini 2.5 Flash"}),o.jsx(He,{children:!ae&&q.length>0&&o.jsx(se.button,{initial:{scale:.8,opacity:0}
580,animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0},transition:{type:"spring",stiffness:500,damping:28},onClick:()=>{var Y;Ge(!0),(Y=bt.current)==null||Y.scrollTo({top:bt.current.scrollHeight,behavior:"smooth"})},className:"absolute bottom-24 right-6 w-8 h-8 rounded-full bg-bg-active border border-border flex items-center justify-center text-text-secondary hover:text-text hover:border-border-focus shadow-card transition-colors",children:o.jsx(tn,{size:14})})}),o.jsx("div",{ref:Le,className:"shrink-0 sm:static fixed left-0 right-0 px-4 pt-2 pb-8 bg-bg z-40",children:o.jsxs("div",{className:"max-w-2xl mx-auto w-full",children:[o.jsx("input",{ref:Ae,type:"file",multiple:!0,accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp,text/*,.md,.txt,.json,.csv,.log",className:"hidden",onChange:Y=>{Y.target.files&&Il(Y.target.files),Ae.current&&(Ae.current.value="")}}),Gt&&o.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>Lt(!1)}),o.jsxs("div",{className:"relative",children:[o.jsx(He,{children:Gt&&o.jsx(se.div,{initial:{opacity:0,y:6,scale:.94},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.94},transition:{type:"spring",stiffness:500,damping:28},className:"absolute bottom-full left-0 mb-2 z-50",children:o.jsxs("div",{className:"bg-bg-secondary border border-border rounded-xl shadow-lg overflow-hidden py-1 min-w-[164px]",children:[o.jsxs("button",{className:"w-full px-3 py-2 text-left text-xs text-text-secondary hover:bg-bg-hover hover:text-text transition-colors flex items-center gap-2.5",onMouseDown:Y=>{var oe;Y.preventDefault(),Lt(!1),(oe=Ae.current)==null||oe.click()},children:[o.jsx(Kh,{size:12,className:"shrink-0 text-text-tertiary"}),"Upload file"]}),o.jsx("div",{className:"h-px bg-border mx-2 my-0.5"}),o.jsxs("button",{className:"w-full px-3 py-2 text-left text-xs text-text-secondary hover:bg-bg-hover hover:text-text transition-colors flex items-center gap-2.5",onMouseDown:Y=>{Y.preventDefault(),Lt(!1),te(D==="gemini-flash"?"haiku":"gemini-flash")},children:[o.jsx(eH,{size:12,className:"shrink-0 text-text-tertiary"}),D==="gemini-flash"?"Use Claude instead":"Use Gemini instead"]})]})})}),Te&&o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 rounded-xl border border-warning/30 bg-warning/10 px-3 py-2",children:[o.jsx("p",{className:"text-xs text-warning",children:"You've hit your monthly chat limit. It resets at the start of your next billing period."}),o.jsx("button",{onClick:()=>lt(!1),className:"shrink-0 text-warning/60 hover:text-warning transition-colors",children:o.jsx(mt,{size:13})})]}),o.jsx(He,{children:m&&(dt||h)&&o.jsx(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},className:"mb-2",children:o.jsx(Xte,{initialSaved:w,initialName:b,initialLocation:k,onSubmit:Y=>{g(!0),_(Y.display_name),T(Y.location),V(ne=>[...ne,{id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:"That's everything."}],createdAt:Date.now()}]);const oe={type:"onboarding_parsed",display_name:Y.display_name,linkedin_url:Y.linkedin_url,roles:[],phone:Y.phone,github_url:Y.github_url,location:Y.location,website_url:Y.website_url};I(!0),H?Qt(oe,void 0,"That's everything.",!0):Vf.current={proposal:oe,userMessage:"That's everything.",skipAdvance:!0}}})})}),o.jsx(He,{children:S&&(dt||h)&&o.jsx(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},className:"mb-2",children:o.jsx(QO,{initialSaved:E,onSubmit:Y=>{j(!0),Qt({type:"onboarding_parsed",roles:Y})}})})}),o.jsxs("div",{className:"rounded-2xl border border-border bg-bg-secondary focus-within:border-border-focus focus-within:ring-1 focus-within:ring-accent/20 transition-all shadow-card overflow-hidden",children:[Ne.length>0&&(()=>{const Y=Ne.filter(ne=>ne.kind==="image"),oe=Ne.filter(ne=>ne.kind!=="image");return o.jsx("div",{className:"flex flex-wrap items-center gap-1.5 px-3 pt-2.5 pb-1",children:o.jsxs(He,{children:[Y.length>1?o.jsxs(se.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.9},className:"flex items-center gap-1.5",children:[o.jsx("div",{className:"relative flex items-center",style:{width:`${Math.min(Y.length,4)*20+12}px`,height:"32px"},children:Y.slice(0,4).map((ne,Oe)=>o.jsx("div",{className:"absolute w-8 h-8 rounded-lg border-2 border-bg-secondary overflow-hidden bg-bg-tertiary shadow-sm",style:{left:`${Oe*18}px`,zIndex:Oe},children:ne.data?o.jsx("img",{src:`data:${ne.mediaType};base64,${ne.data}`,alt:"",className:"w-full h-full object-cover"}):o.jsx("div",{className:"w-full h-full flex items-center justify-center text-text-tertiary",children:o.jsx(v4,{size:12})})},ne.id))}),o.jsxs("span",{className:"text-xs text-text-secondary",children:[Y.length," image",Y.length!==1?"s":""]}),o.jsx("button",{onClick:()=>Ie(ne=>ne.filter(Oe=>Oe.kind!=="image")),className:"text-text-tertiary hover:text-text transition-colors ml-0.5",title:"Remove all images",children:o.jsx(mt,{size:12})})]},"img-stack"):Y.length===1?o.jsx(Av,{attachment:Y[0],onRemove:()=>$f(Y[0].id)},Y[0].id):null,oe.map(ne=>o.jsx(Av,{attachment:ne,onRemove:()=>$f(ne.id)},ne.id))]})})})(),o.jsxs("div",{className:"flex items-end gap-2 px-3 py-2.5",children:[o.jsx("button",{onClick:()=>Lt(Y=>!Y),disabled:Pe,className:"shrink-0 w-7 h-7 -ml-1 rounded-lg flex items-center justify-center text-text-tertiary hover:text-text hover:bg-bg-hover disabled:opacity-30 transition-colors",title:"Upload or change model",children:o.jsx(us,{size:14})}),o.jsxs("div",{className:"relative flex-1",children:[J.length===0&&o.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0.5 h-6 flex items-center",children:o.jsx(He,{mode:"wait",initial:!1,children:o.jsx(se.span,{initial:{y:12,opacity:0,filter:"blur(4px)"},animate:{y:0,opacity:1,filter:"blur(0px)"},exit:{y:-12,opacity:0,filter:"blur(4px)"},transition:{duration:.45,ease:[.22,1,.36,1]},className:"block text-base sm:text-sm text-text-tertiary leading-6",children:(()=>{const Y=(P==null?void 0:P.step)==="collect_basics"?zte:h&&l?$te:Ute;return Y[K%Y.length]})()},K)})}),o.jsx("textarea",{ref:Se,value:J,onChange:Y=>{ue(Y.target.value),Hu(Y.target)},onKeyDown:Hf,rows:1,disabled:!1,className:"w-full bg-transparent text-base sm:text-sm text-text resize-none focus:outline-none leading-6 py-0.5 block",style:{minHeight:"24px",maxHeight:"144px",overflow:"hidden"}})]}),o.jsx(He,{mode:"wait",initial:!1,children:Pe?o.jsx(se.button,{initial:{scale:.7,opacity:0}
580,animate:{scale:1,opacity:1},exit:{scale:.7,opacity:0},transition:{type:"spring",stiffness:600,damping:22},onClick:ke,className:"shrink-0 w-7 h-7 rounded-lg bg-text-tertiary/20 flex items-center justify-center text-text-secondary hover:bg-text-tertiary/30 transition-colors",children:o.jsx(T4,{size:11,className:"fill-current"})},"stop"):o.jsx(se.button,{initial:{scale:.7,opacity:0},animate:{scale:1,opacity:!J.trim()&&Ne.length===0?.3:1},exit:{scale:.7,opacity:0},transition:{type:"spring",stiffness:500,damping:20},onClick:()=>{const Y=J.trim().toLowerCase().replace(/\.$/,"");if(h&&zf.has(Y)){Ue(!1),Ye(!1);const oe=crypto.randomUUID();V(ne=>[...ne,{id:oe,role:"user",parts:[{type:"text",text:J.trim()}],createdAt:Date.now()}]),ue(""),Se.current&&(Se.current.value="",Se.current.style.height="auto"),C(oe),x(!0);return}dt||h?Cn(J.trim(),Ne.filter(oe=>oe.kind==="image")):ut()},className:"shrink-0 w-7 h-7 rounded-lg bg-accent flex items-center justify-center text-bg hover:bg-accent-hover transition-colors cursor-pointer",children:o.jsx(x4,{size:13,strokeWidth:2.5})},"send")})]})]})]})]})}),o.jsx(He,{children:nt&&o.jsx(se.div,{initial:{opacity:0}
580,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"absolute inset-0 z-50 bg-bg/90 backdrop-blur-sm flex items-center justify-center pointer-events-none",children:o.jsxs(se.div,{initial:{scale:.95},animate:{scale:1},exit:{scale:.95},className:"rounded-2xl border-2 border-dashed border-accent/50 bg-bg-secondary px-8 py-6 flex flex-col items-center gap-2",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center",children:o.jsx(Kh,{size:18,className:"text-accent"})}),o.jsx("p",{className:"text-sm text-text",children:"Drop files to attach"}),o.jsx("p",{className:"text-2xs text-text-tertiary",children:"PDF, images, or text · max 10MB"})]})})})]})]})}function To(e){return Array.isArray?Array.isArray(e):tM(e)==="[object Array]"}function fne(e){if(typeof e=="string")return e;if(typeof e=="bigint")return e.toString();const t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Pv(e){return e==null?"":fne(e)}function Or(e){return typeof e=="string"}function cm(e){return typeof e=="number"}function pne(e){return e===!0||e===!1||mne(e)&&tM(e)=="[object Boolean]"}function eM(e){return typeof e=="object"}function mne(e){return eM(e)&&e!==null}function qr(e){return e!=null}function Pp(e){return!e.trim().length}function tM(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const gne="Incorrect 'index' type",xne=e=>`Invalid value for key ${e}`,yne=e=>`Pattern length exceeds max of ${e}.`,bne=e=>`Missing ${e} property in key`,vne=e=>`Property 'weight' in key '${e}' must be a positive integer`,OC=Object.prototype.hasOwnProperty;class _ne{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{const s=nM(r);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function nM(e){let t=null,n=null,r=null,s=1,i=null;if(Or(e)||To(e))r=e,t=MC(e),n=Dv(e);else{if(!OC.call(e,"name"))throw new Error(bne("name"));const a=e.name;if(r=a,OC.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(vne(a));t=MC(a),n=Dv(a),i=e.getFn}return{path:t,id:n,weight:s,src:r,getFn:i}}function MC(e){return To(e)?e:e.split(".")}function Dv(e){return To(e)?e.join("."):e}function wne(e,t){const n=[];let r=!1;const s=(i,a,l,c)=>{if(qr(i))if(!a[l])n.push(c!==void 0?{v:i,i:c}:i);else{const u=a[l],d=i[u];if(!qr(d))return;if(l===a.length-1&&(Or(d)||cm(d)||pne(d)||typeof d=="bigint"))n.push(c!==void 0?{v:Pv(d),i:c}:Pv(d));else if(To(d)){r=!0;for(let h=0,f=d.length;h<f;h+=1)s(d[h],a,l+1,h)}else a.length&&s(d,a,l+1,c)}};return s(e,Or(t)?t.split("."):t,0),r?n:n[0]}const Ene={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Nne={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},kne={location:0,threshold:.6,distance:100},Tne={useExtendedSearch:!1,useTokenSearch:!1,getFn:wne,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},We=Object.freeze({...Nne,...Ene,...kne,...Tne}),Sne=/[^ ]+/g;function Cne(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(s){const i=s.match(Sne).length;if(n.has(i))return n.get(i);const a=1/Math.pow(i,.5*e),l=parseFloat(Math.round(a*r)/r);return n.set(i,l),l},clear(){n.clear()}}}class Iw{constructor({getFn:t=We.getFn,fieldNormWeight:n=We.fieldNormWeight}={}){this.norm=Cne(n,3),this.getFn=t,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Or(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Or(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}removeAll(t){for(let n=t.length-1;n>=0;
580n-=1)this.records.splice(t[n],1);for(let n=0,r=this.records.length;n<r;n+=1)this.records[n].i=n}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!qr(t)||Pp(t))return;const r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){const r={i:n,$:{}};this.keys.forEach((s,i)=>{const a=s.getFn?s.getFn(t):this.getFn(t,s.path);if(qr(a)){if(To(a)){const l=[];for(let c=0,u=a.length;c<u;c+=1){const d=a[c];if(qr(d)){if(Or(d)){if(!Pp(d)){const h={v:d,i:c,n:this.norm.get(d)};l.push(h)}}else if(qr(d.v)){const h=Or(d.v)?d.v:Pv(d.v);if(!Pp(h)){const f={v:h,i:d.i,n:this.norm.get(h)};l.push(f)}}}}r.$[i]=l}else if(Or(a)&&!Pp(a)){const l={v:a,n:this.norm.get(a)};r.$[i]=l}}}),this.records.push(r)}toJSON(){return{keys:this.keys.map(({getFn:t,...n})=>n),records:this.records}}}function rM(e,t,{getFn:n=We.getFn,fieldNormWeight:r=We.fieldNormWeight}={}){const s=new Iw({getFn:n,fieldNormWeight:r});return s.setKeys(e.map(nM)),s.setSources(t),s.create(),s}function jne(e,{getFn:t=We.getFn,fieldNormWeight:n=We.fieldNormWeight}={}){const{keys:r,records:s}=e,i=new Iw({getFn:t,fieldNormWeight:n});return i.setKeys(r),i.setIndexRecords(s),i}function Ane(e=[],t=We.minMatchCharLength){const n=[];let r=-1,s=-1,i=0;for(let a=e.length;i<a;i+=1){const l=e[i];l&&r===-1?r=i:!l&&r!==-1&&(s=i-1,s-r+1>=t&&n.push([r,s]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}const Ho=32;function Ine(e,t,n,{location:r=We.location,distance:s=We.distance,threshold:i=We.threshold,findAllMatches:a=We.findAllMatches,minMatchCharLength:l=We.minMatchCharLength,includeMatches:c=We.includeMatches,ignoreLocation:u=We.ignoreLocation}={}){if(t.length>Ho)throw new Error(yne(Ho));const d=t.length,h=e.length,f=Math.max(0,Math.min(r,h));let p=i,m=f;const x=(S,I)=>{const E=S/d;if(u)return E;const j=Math.abs(f-I);return s?E+j/s:j?1:E},w=l>1||c,g=w?Array(h):[];let b;for(;(b=e.indexOf(t,m))>-1;){const S=x(0,b);if(p=Math.min(S,p),m=b+d,w){let I=0;for(;I<d;)g[b+I]=1,I+=1}}m=-1;let _=[],k=1,T=d+h;const N=1<<d-1;for(let S=0;S<d;S+=1){let I=0,E=T;for(;I<E;)x(S,f+E)<=p?I=E:T=E,E=Math.floor((T-I)/2+I);T=E;let j=Math.max(1,f-E+1);const P=a?h:Math.min(f+E,h)+d,L=Array(P+2);L[P+1]=(1<<S)-1;for(let R=P;R>=j;R-=1){const B=R-1,O=n[e[B]];if(w&&(g[B]=+!!O),L[R]=(L[R+1]<<1|1)&O,S&&(L[R]|=(_[R+1]|_[R])<<1|1|_[R+1]),L[R]&N&&(k=x(S,B),k<=p)){if(p=k,m=B,m<=f)break;j=Math.max(1,2*f-m)}}if(x(S+1,f)>p)break;_=L}const C={isMatch:m>=0,score:Math.max(.001,k)};if(w){const S=Ane(g,l);S.length?c&&(C.indices=S):C.isMatch=!1}return C}function Pne(e){const t={};for(let n=0,r=e.length;n<r;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<r-n-1}return t}function Pw(e){if(e.length<=1)return e;e.sort((n,r)=>n[0]-r[0]||n[1]-r[1]);const t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){const s=t[t.length-1],i=e[n];i[0]<=s[1]+1?s[1]=Math.max(s[1],i[1]):t.push(i)}return t}const sM={Å:"l",Å:"L",Ä:"d",Ä:"D",ø:"o",Ã:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",Ã:"ss"},Dne=new RegExp("["+Object.keys(sM).join("")+"]","g"),nf=String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D
5807F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(Dne,t=>sM[t]):e=>e;class Dw{constructor(t,{location:n=We.location,threshold:r=We.threshold,distance:s=We.distance,includeMatches:i=We.includeMatches,findAllMatches:a=We.findAllMatches,minMatchCharLength:l=We.minMatchCharLength,isCaseSensitive:c=We.isCaseSensitive,ignoreDiacritics:u=We.ignoreDiacritics,ignoreLocation:d=We.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:s,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:d},t=c?t:t.toLowerCase(),t=u?nf(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const h=(p,m)=>{this.chunks.push({pattern:p,alphabet:Pne(p),startIndex:m})},f=this.pattern.length;if(f>Ho){let p=0;const m=f%Ho,x=f-m;for(;p<x;)h(this.pattern.substr(p,Ho),p),p+=Ho;if(m){const w=f-Ho;h(this.pattern.substr(w),w)}}else h(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s}=this.options;if(t=n?t:t.toLowerCase(),t=r?nf(t):t,this.pattern===t){const x={isMatch:!0,score:0};return s&&(x.indices=[[0,t.length-1]]),x}const{location:i,distance:a,threshold:l,findAllMatches:c,minMatchCharLength:u,ignoreLocation:d}=this.options,h=[];let f=0,p=!1;this.chunks.forEach(({pattern:x,alphabet:w,startIndex:g})=>{const{isMatch:b,score:_,indices:k}=Ine(t,x,w,{location:i+g,distance:a,threshold:l,findAllMatches:c,minMatchCharLength:u,includeMatches:s,ignoreLocation:d});b&&(p=!0),f+=_,b&&k&&h.push(...k)});const m={isMatch:p,score:p?f/this.chunks.length:1};return p&&s&&(m.indices=Pw(h)),m}}class So{constructor(t){this.pattern=t}static isMultiMatch(t){return RC(t,this.multiRegex)}static isSingleMatch(t){return RC(t,this.singleRegex)}search(t){return{isMatch:!1,score:1}}}function RC(e,t){const n=e.match(t);return n?n[1]:null}class One extends So{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Mne extends So{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class Rne extends So{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Lne extends So{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Fne extends So{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Bne extends So{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class iM extends So{constructor(t,{location:n=We.location,threshold:r=We.threshold,distance:s=We.distance,includeMatches:i=We.includeMatches,findAllMatches:a=We.findAllMatches,minMatchCharLength:l=We.minMatchCharLength,isCaseSensitive:c=We.isCaseSensitive,ignoreDiacritics:u=We.ignoreDiacritics,ignoreLocation:d=We.ignoreLocation}={}){super(t),this._bitapSearch=new Dw(t,{location:n,threshold:r,distance:s,includeMatches:i,findAllMatches:a,minMatchCharLength:l,isCaseSensitive:c,ignoreDiacritics:u,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class aM extends So{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const s=[],i=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+i,s.push([r,n-1]);const a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}}const Ov=[One,aM,Rne,Lne,Bne,Fne,Mne,iM],LC=Ov.length,Une="\0",$ne="|";function zne(e){const t=[],n=e.length;let r=0;for(;r<n;){for(;r<n&&e[r]===" ";)r++;
580if(r>=n)break;let s=r;for(;s<n&&e[s]!==" "&&e[s]!=='"';)s++;if(s<n&&e[s]==='"'){for(s++;s<n;){if(e[s]==='"'){const i=s+1;if(i>=n||e[i]===" "){s++;break}if(e[i]==="$"&&(i+1>=n||e[i+1]===" ")){s+=2;break}}s++}t.push(e.substring(r,s)),r=s}else{for(;s<n&&e[s]!==" ";)s++;t.push(e.substring(r,s)),r=s}}return t}function Hne(e,t={}){return e.replace(/\\\|/g,Une).split($ne).map(r=>{const s=r.replace(/\u0000/g,"|"),i=zne(s.trim()).filter(l=>l&&!!l.trim()),a=[];for(let l=0,c=i.length;l<c;l+=1){const u=i[l];let d=!1,h=-1;for(;!d&&++h<LC;){const f=Ov[h],p=f.isMultiMatch(u);p&&(a.push(new f(p,t)),d=!0)}if(!d)for(h=-1;++h<LC;){const f=Ov[h],p=f.isSingleMatch(u);if(p){a.push(new f(p,t));break}}}return a})}const Wne=new Set([iM.type,aM.type]);class Vne{constructor(t,{isCaseSensitive:n=We.isCaseSensitive,ignoreDiacritics:r=We.ignoreDiacritics,includeMatches:s=We.includeMatches,minMatchCharLength:i=We.minMatchCharLength,ignoreLocation:a=We.ignoreLocation,findAllMatches:l=We.findAllMatches,location:c=We.location,threshold:u=We.threshold,distance:d=We.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:r,includeMatches:s,minMatchCharLength:i,findAllMatches:l,ignoreLocation:a,location:c,threshold:u,distance:d},t=n?t:t.toLowerCase(),t=r?nf(t):t,this.pattern=t,this.query=Hne(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:s,ignoreDiacritics:i}=this.options;t=s?t:t.toLowerCase(),t=i?nf(t):t;let a=0;const l=[];let c=0,u=!1;for(let d=0,h=n.length;d<h;d+=1){const f=n[d];l.length=0,a=0,u=!1;for(let p=0,m=f.length;p<m;p+=1){const x=f[p],{isMatch:w,indices:g,score:b}=x.search(t);if(w){a+=1,c+=b;const _=x.constructor.type;_.startsWith("inverse")&&(u=!0),r&&(Wne.has(_)?l.push(...g):l.push(g))}else{c=0,a=0,l.length=0,u=!1;break}}if(a){const p={isMatch:!0,score:c/a};return u&&(p.hasInverse=!0),r&&(p.indices=Pw(l)),p}}return{isMatch:!1,score:1}}}const Mv=[];function Ow(...e){Mv.push(...e)}function jg(e,t){for(let n=0,r=Mv.length;n<r;n+=1){const s=Mv[n];if(s.condition(e,t))return new s(e,t)}return new Dw(e,t)}const Ag={AND:"$and",OR:"$or"},Rv={PATH:"$path",PATTERN:"$val"},Lv=e=>!!(e[Ag.AND]||e[Ag.OR]),qne=e=>!!e[Rv.PATH],Yne=e=>!To(e)&&eM(e)&&!Lv(e),FC=e=>({[Ag.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function oM(e,t,{auto:n=!0}={}){const r=s=>{if(Or(s)){const c={keyId:null,pattern:s};return n&&(c.searcher=jg(s,t)),c}const i=Object.keys(s),a=qne(s);if(!a&&i.length>1&&!Lv(s))return r(FC(s));if(Yne(s)){const c=a?s[Rv.PATH]:i[0],u=a?s[Rv.PATTERN]:s[c];if(!Or(u))throw new Error(xne(c));const d={keyId:Dv(c),pattern:u};return n&&(d.searcher=jg(u,t)),d}const l={children:[],operator:i[0]};return i.forEach(c=>{const u=s[c];To(u)&&u.forEach(d=>
580{l.children.push(r(d))})}),l};return Lv(e)||(e=FC(e)),r(e)}function Fv(e,{ignoreFieldNorm:t=We.ignoreFieldNorm}){let n=1;return e.forEach(({key:r,norm:s,score:i})=>{const a=r?r.weight:null;n*=Math.pow(i===0&&a?Number.EPSILON:i,(a||1)*(t?1:s))}),n}function Gne(e,{ignoreFieldNorm:t=We.ignoreFieldNorm}){e.forEach(n=>{n.score=Fv(n.matches,{ignoreFieldNorm:t})})}class Kne{constructor(t){this.limit=t,this.heap=[]}get size(){return this.heap.length}shouldInsert(t){return this.size<this.limit||t<this.heap[0].score}insert(t){this.size<this.limit?(this.heap.push(t),this._bubbleUp(this.size-1)):t.score<this.heap[0].score&&(this.heap[0]=t,this._sinkDown(0))}extractSorted(t){return this.heap.sort(t)}_bubbleUp(t){const n=this.heap;for(;t>0;){const r=t-1>>1;if(n[t].score<=n[r].score)break;const s=n[t];n[t]=n[r],n[r]=s,t=r}}_sinkDown(t){const n=this.heap,r=n.length;let s=t;do{t=s;const i=2*t+1,a=2*t+2;if(i<r&&n[i].score>n[s].score&&(s=i),a<r&&n[a].score>n[s].score&&(s=a),s!==t){const l=n[t];n[t]=n[s],n[s]=l}}while(s!==t)}}function Qne(e,t){const n=e.matches;t.matches=[],qr(n)&&n.forEach(r=>{if(!qr(r.indices)||!r.indices.length)return;const{indices:s,value:i}=r,a={indices:s,value:i};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),t.matches.push(a)})}function Xne(e,t){t.score=e.score}function Jne(e,t,{includeMatches:n=We.includeMatches,includeScore:r=We.includeScore}={}){const s=[];return n&&s.push(Qne),r&&s.push(Xne),e.map(i=>{const{idx:a}=i,l={item:t[a],refIndex:a};return s.length&&s.forEach(c=>{c(i,l)}),l})}const Zne=/\b\w+\b/g;function Bv({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=nf(n)),n.match(Zne)||[]}}}function ere(e,t,n){const r=new Map,s=new Map;let i=0;function a(l,c,u,d){const h=n.tokenize(l);if(!h.length)return;i++;const f=new Map;for(const p of h)f.set(p,(f.get(p)||0)+1);for(const[p,m]of f){const x={docIdx:c,keyIdx:u,subIdx:d,tf:m};let w=r.get(p);w||(w=[],r.set(p,w)),w.push(x),s.set(p,(s.get(p)||0)+1)}}for(const l of e){const{i:c,v:u,$:d}=l;if(u!==void 0){a(u,c,-1,-1);continue}if(d)for(let h=0;h<t;h++){const f=d[h];if(f)if(Array.isArray(f))for(const p of f)a(p.v,c,h,p.i??-1);else a(f.v,c,h,-1)}}return{terms:r,fieldCount:i,df:s}}function tre(e,t,n,r){const{i:s,v:i,$:a}=t;function l(c,u,d){const h=r.tokenize(c);if(!h.length)return;e.fieldCount++;const f=new Map;for(const p of h)f.set(p,(f.get(p)||0)+1);for(const[p,m]of f){const x={docIdx:s,keyIdx:u,subIdx:d,tf:m};let w=e.terms.get(p);w||(w=[],e.terms.set(p,w)),w.push(x),e.df.set(p,(e.df.get(p)||0)+1)}}if(i!==void 0){l(i,-1,-1);return}if(a)for(let c=0;c<n;c++){const u=a[c];if(u)if(Array.isArray(u))for(const d of u)l(d.v,c,d.i??-1);else l(u.v,c,-1)}}function BC(e,t){for(const[n,r]of e.terms){const s=r.filter(a=>a.docIdx!==t),i=r.length-s.length;i>0&&(e.fieldCount-=i,e.df.set(n,(e.df.get(n)||0)-i),s.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,s))}}class ps{constructor(t,n,r){this.options={...We,...n},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new _ne(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const n=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,r=jg(t,n);return this._lastQuery=t,this._lastSearcher=r,r}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Iw))throw new Error(gne);if(this._myIndex=n||rM(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const r=Bv({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=ere(this._myIndex.records,this._myIndex.keys.length,r)}}add(t){if(qr(t)&&(this._docs.push(t),this._myIndex.add(t),this._invertedIndex)){const n=this._myIndex.records[this._myIndex.records.length-1],r=Bv({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});tre(this._invertedIndex,n,this._myIndex.keys.length,r)}}remove(t=()=>!1){const n=[],r=[];for(let s=0,i=this._docs.length;s<i;s+=1)t(this._docs[s],s)&&(n.push(this._docs[s]),r.push(s));if(r.length){if(this._invertedIndex)for(const s of r)BC(this._invertedIndex,s);for(let s=r.length-1;s>=0;s-=1)this._docs.splice(r[s],1);this._myIndex.removeAll(r)}return n}removeAt(t){this._invertedIndex&&BC(this._invertedIndex,t);const n=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),n}getIndex(){return this._myIndex}search(t,n){const{limit:r=-1}=n||{},{includeMatches:s,includeScore:i,shouldSort:a,sortFn:l,ignoreFieldNorm:c}=this.options;if(Or(t)&&!t.trim()){let h=this._docs.map((f,p)=>({item:f,refIndex:p}));return cm(r)&&r>-1&&(h=h.slice(0,r)),h}const u=cm(r)&&r>0&&Or(t);let d;if(u){const h=new Kne(r);Or(this._docs[0])?this._searchStringList(t,{heap:h,ignoreFieldNorm:c}):this._searchObjectList(t,{heap:h,ignoreFieldNorm:c}),d=h.extractSorted(l)}else d=Or(t)?Or(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),Gne(d,{ignoreFieldNorm:c}),a&&d.sort(l),cm(r)&&r>-1&&(d=d.slice(0,r));return Jne(d,this._docs,{includeMatches:s,includeScore:i})}_searchStringList(t,{heap:n,ignoreFieldNorm:r}={}){const s=this._getSearcher(t),{records:i}=this._myIndex,a=n?null:[];
580return i.forEach(({v:l,i:c,n:u})=>{if(!qr(l))return;const{isMatch:d,score:h,indices:f}=s.searchIn(l);if(d){const p={item:l,idx:c,matches:[{score:h,value:l,norm:u,indices:f}]};n?(p.score=Fv(p.matches,{ignoreFieldNorm:r}),n.shouldInsert(p.score)&&n.insert(p)):a.push(p)}}),a}_searchLogical(t){const n=oM(t,this.options),r=(l,c,u)=>{if(!("children"in l)){const{keyId:p,searcher:m}=l;let x;return p===null?(x=[],this._myIndex.keys.forEach((w,g)=>{x.push(...this._findMatches({key:w,value:c[g],searcher:m}))})):x=this._findMatches({key:this._keyStore.get(p),value:this._myIndex.getValueForItemAtKeyId(c,p),searcher:m}),x&&x.length?[{idx:u,item:c,matches:x}]:[]}const{children:d,operator:h}=l,f=[];for(let p=0,m=d.length;p<m;p+=1){const x=d[p],w=r(x,c,u);if(w.length)f.push(...w);else if(h===Ag.AND)return[]}return f},s=this._myIndex.records,i=new Map,a=[];return s.forEach(({$:l,i:c})=>{if(qr(l)){const u=r(n,l,c);u.length&&(i.has(c)||(i.set(c,{idx:c,item:l,matches:[]}),a.push(i.get(c))),u.forEach(({matches:d})=>{i.get(c).matches.push(...d)}))}}),a}_searchObjectList(t,{heap:n,ignoreFieldNorm:r}={}){const s=this._getSearcher(t),{keys:i,records:a}=this._myIndex,l=n?null:[];return a.forEach(({$:c,i:u})=>{if(!qr(c))return;const d=[];let h=!1,f=!1;if(i.forEach((p,m)=>{const x=this._findMatches({key:p,value:c[m],searcher:s});x.length?(d.push(...x),x[0].hasInverse&&(f=!0)):h=!0}),!(f&&h)&&d.length){const p={idx:u,item:c,matches:d};n?(p.score=Fv(p.matches,{ignoreFieldNorm:r}),n.shouldInsert(p.score)&&n.insert(p)):l.push(p)}}),l}_findMatches({key:t,value:n,searcher:r}){if(!qr(n))return[];const s=[];if(To(n))n.forEach(({v:i,i:a,n:l})=>{if(!qr(i))return;const{isMatch:c,score:u,indices:d,hasInverse:h}=r.searchIn(i);c&&s.push({score:u,key:t,value:i,idx:a,norm:l,indices:d,hasInverse:h})});else{const{v:i,n:a}=n,{isMatch:l,score:c,indices:u,hasInverse:d}=r.searchIn(i);l&&s.push({score:c,key:t,value:i,norm:a,indices:u,hasInverse:d})}return s}}class nre{static condition(t,n){return n.useTokenSearch}constructor(t,n){this.options=n,this.analyzer=Bv({isCaseSensitive:n.isCaseSensitive,ignoreDiacritics:n.ignoreDiacritics});const r=this.analyzer.tokenize(t),s=n._invertedIndex,{df:i,fieldCount:a}=s;this.termSearchers=[],this.idfWeights=[];for(const l of r){this.termSearchers.push(new Dw(l,{location:n.location,threshold:n.threshold,distance:n.distance,includeMatches:n.includeMatches,findAllMatches:n.findAllMatches,minMatchCharLength:n.minMatchCharLength,isCaseSensitive:n.isCaseSensitive,ignoreDiacritics:n.ignoreDiacritics,ignoreLocation:!0}));const c=i.get(l)||0,u=Math.log(1+(a-c+.5)/(c+.5));this.idfWeights.push(u)}}searchIn(t){if(!this.termSearchers.length)return{isMatch:!1,score:1};const n=[];let r=0,s=0,i=0;for(let c=0;c<this.termSearchers.length;c++){const u=this.termSearchers[c].searchIn(t),d=this.idfWeights[c];s+=d,u.isMatch&&(i++,r+=d*(1-u.score),u.indices&&n.push(...u.indices))}if(i===0)return{isMatch:!1,score:1};const a=s>0?1-r/s:0,l={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&n.length&&(l.indices=Pw(n)),l}}ps.version="7.3.0";ps.createIndex=rM;ps.parseIndex=jne;ps.config=We;ps.match=function(e,t,n){return jg(e,{...We,...n}).searchIn(t)};ps.parseQuery=oM;Ow(Vne);Ow(nre);ps.use=function(...e){e.forEach(t=>Ow(t))};const rre=144;function Mw(e){const t=e.getBoundingClientRect(),n=window.innerWidth-t.right;return{top:t.bottom+4,right:Math.min(n,window.innerWidth-rre-8)}}function Rw(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<60)return n<=1?"just now":`${n}m ago`;const r=Math.floor(n/60);if(r<24)return`${r}h ago`;const s=Math.floor(t/Ex);if(s===1)return"yesterday";if(s<30)return`${s}d ago`;const i=Math.floor(s/30);return i<12?i===1?"1mo ago":`${i}mo ago`:new Date(e).toLocaleDateString(void 0,{month:"short",year:"numeric"})}function sre(e){let t=0;for(let r=0;r<e.length;r++)t=t*31+e.charCodeAt(r)|0;return["ds","pm","cons"][Math.abs(t)%3]}function ire({app:e,onSelect:t}){var i;const n=Iu(),r=(i=e.generation_metadata)==null?void 0:i.duration_seconds,s=r!=null?`${Math.round(r)}s`:null;return o.jsxs("div",{onClick:()=>t?t(e):n(`/history/${e.job_id}`),className:"group flex items-center gap-3 px-1 py-2.5 border-b border-border last:border-0 hover:bg-bg-active/40 cursor-pointer transition-colors",children:[o.jsx("div",{className:re("w-1.5 h-1.5 rounded-full shrink-0",e.status==="done"?"bg-success":e.status==="generating"?"bg-warning animate-pulse":"bg-text-tertiary/40")}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx("span",{className:"text-xs font-medium text-text truncate",children:e.job_title||e.company_name||o.jsx("span",{className:"text-text-tertiary italic",children:"Untitled"})}),e.job_title&&e.company_name&&o.jsxs("span",{className:"text-2xs text-text-tertiary/60 truncate shrink-0",children:["@ ",e.company_name]}),e.resume_type&&e.resume_type!=="DEFAULT"&&o.jsx(eD,{color:sre(e.resume_type),children:e.resume_type})]}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsx("span",{className:"text-2xs text-text-tertiary",children:Rw(e.created_at)}),s&&o.jsxs("span",{className:"text-2xs text-text-tertiary/50",children:["· generated in ",s]})]})]})]})}function lM({app:e,onSelect:t,onDelete:n}){return o.jsxs("div",{className:"group relative",children:[o.jsx(ire,{app:e,onSelect:t}),o.jsx("button",{onClick:r=>
vendor: 4,276 bytes, line 580
580{r.stopPropagation(),n(e.job_id)},className:"absolute right-1 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 p-2 sm:p-1.5 rounded text-text-tertiary hover:text-error hover:bg-error/10 transition-all",title:"Delete",children:o.jsx(Yn,{size:13})})]})}var zt="-ms-",xh="-moz-",_t="-webkit-",cM="comm",Fx="rule",Lw="decl",are="@import",ore="@namespace",uM="@keyframes",lre="@layer",dM=Math.abs,Fw=String.fromCharCode,Uv=Object.assign;function cre(e,t){return zn(e,0)^45?(((t<<2^zn(e,0))<<2^zn(e,1))<<2^zn(e,2))<<2^zn(e,3):0}function hM(e){return e.trim()}function Ui(e,t){return(e=t.exec(e))?e[0]:e}function Ze(e,t,n){return e.replace(t,n)}function um(e,t,n){return e.indexOf(t,n)}function zn(e,t){return e.charCodeAt(t)|0}function Nl(e,t,n){return e.slice(t,n)}function Ks(e){return e.length}function fM(e){return e.length}function Bd(e,t){return t.push(e),e}function ure(e,t){return e.map(t).join("")}function UC(e,t){return e.filter(function(n){return!Ui(n,t)})}var Bx=1,mu=1,pM=0,Rs=0,Mn=0,Bu="";function Ux(e,t,n,r,s,i,a,l){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:Bx,column:mu,length:a,return:"",siblings:l}}function Pa(e,t){return Uv(Ux("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Hl(e){for(;e.root;)e=Pa(e.root,{children:[e]});Bd(e,e.siblings)}function dre(){return Mn}function hre(){return Mn=Rs>0?zn(Bu,--Rs):0,mu--,Mn===10&&(mu=1,Bx--),Mn}function ni(){return Mn=Rs<pM?zn(Bu,Rs++):0,mu++,Mn===10&&(mu=1,Bx++),Mn}function Ja(){return zn(Bu,Rs)}function dm(){return Rs}function $x(e,t){return Nl(Bu,e,t)}function rf(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function fre(e){return Bx=mu=1,pM=Ks(Bu=e),Rs=0,[]}function pre(e){return Bu="",e}function Cy(e){return hM($x(Rs-1,$v(e===91?e+2:e===40?e+1:e)))}function mre(e){for(;(Mn=Ja())&&Mn<33;)ni();return rf(e)>2||rf(Mn)>3?"":" "}function gre(e,t){for(;--t&&ni()&&!(Mn<48||Mn>102||Mn>57&&Mn<65||Mn>70&&Mn<97););return $x(e,dm()+(t<6&&Ja()==32&&ni()==32))}function $v(e){for(;ni();)switch(Mn){case e:return Rs;case 34:case 39:e!==34&&e!==39&&$v(Mn);break;case 40:e===41&&$v(e);break;case 92:ni();break}return Rs}function xre(e,t){for(;ni()&&e+Mn!==57;)if(e+Mn===84&&Ja()===47)break;return"/*"+$x(t,Rs-1)+"*"+Fw(e===47?e:ni())}function yre(e){for(;!rf(Ja());)ni();return $x(e,Rs)}function bre(e){return pre(hm("",null,null,null,[""],e=fre(e),0,[0],e))}function hm(e,t,n,r,s,i,a,l,c){for(var u=0,d=0,h=a,f=0,p=0,m=0,x=1,w=1,g=1,b=0,_="",k=s,T=i,N=r,C=_;w;)switch(m=b,b=ni()){case 40:if(m!=108&&zn(C,h-1)==58){um(C+=Ze(Cy(b),"&","&\f"),"&\f",dM(u?l[u-1]:0))!=-1&&(g=-1);break}case 34:case 39:case 91:C+=Cy(b);break;case 9:case 10:case 13:case 32:C+=mre(m);break;case 92:C+=gre(dm()-1,7);continue;case 47:switch(Ja()){case 42:case 47:Bd(vre(xre(ni(),dm()),t,n,c),c),(rf(m||1)==5||rf(Ja()||1)==5)&&Ks(C)&&Nl(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*x:l[u++]=Ks(C)*g;case 125*x:case 59:case 0:switch(b){case 0:case 125:w=0;case 59+d:g==-1&&(C=Ze(C,/\f/g,"")),p>0&&(Ks(C)-h||x===0&&m===47)&&Bd(p>32?zC(C+";",r,n,h-1,c):zC(Ze(C," ","")+";",r,n,h-2,c),c);break;case 59:C+=";";default:if(Bd(N=$C(C,t,n,u,d,s,l,_,k=[],T=[],h,i),i),b===123)if(d===0)hm(C,t,N,N,k,i,h,l,T);else{switch(f){case 99:if(zn(C,3)===110)break;case 108:if(zn(C,2)===97)break;default:d=0;case 100:case 109:case 115:}d?hm(e,N,N,r&&Bd($C(e,N,N,0,0,s,l,_,s,k=[],h,T),T),s,T,h,l,r?k:T):hm(C,N,N,N,[""],T,0,l,T)}}u=d=p=0,x=g=1,_=C="",h=a;break;case 58:h=1+Ks(C),p=m;default:if(x<1){if(b==123)--x;else if(b==125&&x++==0&&hre()==125)continue}switch(C+=Fw(b),b*x){case 38:g=d>0?1:(C+="\f",-1);break;case 44:l[u++]=(Ks(C)-1)*g,g=1;break;case 64:Ja()===45&&(C+=Cy(ni())),f=Ja(),d=h=Ks(_=C+=yre(dm())),b++;break;case 45:m===45&&Ks(C)==2&&(x=0)}}return i}function $C(e,t,n,r,s,i,a,l,c,u,d,h){for(var f=s-1,p=s===0?i:[""],m=fM(p),x=0,w=0,g=0;x<r;++x)for(var b=0,_=Nl(e,f+1,f=dM(w=a[x])),k=e;b<m;++b)(k=hM(w>0?p[b]+" "+_:Ze(_,/&\f/g,p[b])))&&(c[g++]=k);return Ux(e,t,n,s===0?Fx:l,c,u,d,h)}function vre(e,t,n,r){return Ux(e,t,n,cM,Fw(dre()),Nl(e,2,-2),0,r)}
vendor: 4,650 bytes, lines 580-581
580function zC(e,t,n,r,s){return Ux(e,t,n,Lw,Nl(e,0,r),Nl(e,r+1,-1),r,s)}function mM(e,t,n){switch(cre(e,t)){case 5103:return _t+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return _t+e+e;case 4855:return _t+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return xh+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return _t+e+xh+e+zt+e+e;case 5936:switch(zn(e,t+11)){case 114:return _t+e+zt+Ze(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return _t+e+zt+Ze(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return _t+e+zt+Ze(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return _t+e+zt+e+e;case 6165:return _t+e+zt+"flex-"+e+e;case 5187:return _t+e+Ze(e,/(\w+).+(:[^]+)/,_t+"box-$1$2"+zt+"flex-$1$2")+e;case 5443:return _t+e+zt+"flex-item-"+Ze(e,/flex-|-self/g,"")+(Ui(e,/flex-|baseline/)?"":zt+"grid-row-"+Ze(e,/flex-|-self/g,""))+e;case 4675:return _t+e+zt+"flex-line-pack"+Ze(e,/align-content|flex-|-self/g,"")+e;case 5548:return _t+e+zt+Ze(e,"shrink","negative")+e;case 5292:return _t+e+zt+Ze(e,"basis","preferred-size")+e;case 6060:return _t+"box-"+Ze(e,"-grow","")+_t+e+zt+Ze(e,"grow","positive")+e;case 4554:return _t+Ze(e,/([^-])(transform)/g,"$1"+_t+"$2")+e;case 6187:return Ze(Ze(Ze(e,/(zoom-|grab)/,_t+"$1"),/(image-set)/,_t+"$1"),e,"")+e;case 5495:case 3959:return Ze(e,/(image-set\([^]*)/,_t+"$1$`$1");case 4968:return Ze(Ze(e,/(.+:)(flex-)?(.*)/,_t+"box-pack:$3"+zt+"flex-pack:$3"),/space-between/,"justify")+_t+e+e;case 4200:if(!Ui(e,/flex-|baseline/))return zt+"grid-column-align"+Nl(e,t)+e;break;case 2592:case 3360:return zt+Ze(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,s){return t=s,Ui(r.props,/grid-\w+-end/)})?~um(e+(n=n[t].value),"span",0)?e:zt+Ze(e,"-start","")+e+zt+"grid-row-span:"+(~um(n,"span",0)?Ui(n,/\d+/):+Ui(n,/\d+/)-+Ui(e,/\d+/))+";":zt+Ze(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return Ui(r.props,/grid-\w+-start/)})?e:zt+Ze(Ze(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ze(e,/(.+)-inline(.+)/,_t+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ks(e)-1-t>6)switch(zn(e,t+1)){case 109:if(zn(e,t+4)!==45)break;case 102:return Ze(e,/(.+:)(.+)-([^]+)/,"$1"+_t+"$2-$3$1"+xh+(zn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~um(e,"stretch",0)?mM(Ze(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Ze(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,s,i,a,l,c,u){return zt+s+":"+i+u+(a?zt+s+"-span:"+(l?c:+c-+i)+u:"")+e});case 4949:if(zn(e,t+6)===121)return Ze(e,":",":"+_t)+e;break;case 6444:switch(zn(e,zn(e,14)===45?18:11)){case 120:return Ze(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+_t+(zn(e,14)===45?"inline-":"")+"box$3$1"+_t+"$2$3$1"+zt+"$2box$3")+e;case 100:return Ze(e,":",":"+zt)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ze(e,"scroll-","scroll-snap-")+e}return e}function Ig(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function _re(e,t,n,r){switch(e.type){case lre:if(e.children.length)break;case are:case ore:case Lw:return e.return=e.return||e.value;case cM:return"";case uM:return e.return=e.value+"{"+Ig(e.children,r)+"}";case Fx:if(!Ks(e.value=e.props.join(",")))return""}return Ks(n=Ig(e.children,r))?e.return=e.value+"{"+n+"}":""}function wre(e){var t=fM(e);return function(n,r,s,i){for(var a="",l=0;l<t;l++)a+=e[l](n,r,s,i)||"";return a}}function Ere(e){return function(t){t.root||(t=t.return)&&e(t)}}function Nre(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Lw:e.return=mM(e.value,e.length,n);return;case uM:return Ig([Pa(e,{value:Ze(e.value,"@","@"+_t)})],r);case Fx:if(e.length)return ure(n=e.props,function(s){switch(Ui(s,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Hl(Pa(e,{props:[Ze(s,/:(read-\w+)/,":"+xh+"$1")]})),Hl(Pa(e,{props:[s]})),Uv(e,{props:UC(n,r)});break;case"::placeholder":Hl(Pa(e,{props:[Ze(s,/:(plac\w+)/,":"+_t+"input-$1")]})),Hl(Pa(e,{props:[Ze(s,/:(plac\w+)/,":"+xh+"$1")]})),Hl(Pa(e,{props:[Ze(s,/:(plac\w+)/,zt+"input-$1")]})),Hl(Pa(e,{props:[s]})),Uv(e,{props:UC(n,r)});break}return""})}}var Pc={},jy,Ay;const gu=typeof process<"u"&&Pc!==void 0&&(Pc.REACT_APP_SC_ATTR||Pc.SC_ATTR)||"data-styled",gM="active",xM="data-styled-version",zx="6.4.2",Bw=`/*!sc*/ 581`,yh=typeof window<"u"&&typeof document<"u";
581function HC(e){if(typeof process<"u"&&Pc!==void 0){const t=Pc[e];if(t!==void 0&&t!=="")return t!=="false"}}const kre=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:(Ay=(jy=HC("REACT_APP_SC_DISABLE_SPEEDY"))!==null&&jy!==void 0?jy:HC("SC_DISABLE_SPEEDY"))!==null&&Ay!==void 0?Ay:typeof process<"u"&&Pc!==void 0&&!1),yM="sc-keyframes-";function Rf(e,...t){return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${e} for more information.${t.length>0?` Args: ${t.join(", ")}`:""}`)}let fm=new Map,Pg=new Map,pm=1;const Ud=e=>{if(fm.has(e))return fm.get(e);for(;Pg.has(pm);)pm++;const t=pm++;return fm.set(e,t),Pg.set(t,e),t},Tre=e=>Pg.get(e),Sre=(e,t)=>{pm=t+1,fm.set(e,t),Pg.set(t,e)},Uw=Object.freeze([]),xu=Object.freeze({});function Cre(e,t,n=xu){return e.theme!==n.theme&&e.theme||t||n.theme}const jre=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Are=/(^-|-$)/g;function bM(e){return e.replace(jre,"-").replace(Are,"")}const Ire=/(a)(d)/gi,WC=e=>String.fromCharCode(e+(e>25?39:97));function $w(e){let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=WC(t%52)+n;return(WC(t%52)+n).replace(Ire,"$1-$2")}const zv=5381,hl=(e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e},vM=e=>hl(zv,e);function _M(e){return $w(vM(e)>>>0)}function Pre(e){return e.displayName||e.name||"Component"}function Hv(e){return typeof e=="string"&&!0}function Dre(e){return Hv(e)?`styled.${e}`:`Styled(${Pre(e)})`}const wM=Symbol.for("react.memo"),Ore=Symbol.for("react.forward_ref"),Mre={contextType:!0,defaultProps:!0,displayName:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Rre={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},EM={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lre={[Ore]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[wM]:EM};function VC(e){return("type"in(t=e)&&t.type.$$typeof)===wM?EM:"$$typeof"in e?Lre[e.$$typeof]:Mre;var t}const Fre=Object.defineProperty,Bre=Object.getOwnPropertyNames,Ure=Object.getOwnPropertySymbols,$re=Object.getOwnPropertyDescriptor,zre=Object.getPrototypeOf,Hre=Object.prototype;function NM(e,t,n){if(typeof t!="string"){const r=zre(t);r&&r!==Hre&&NM(e,r,n);const s=Bre(t).concat(Ure(t)),i=VC(e),a=VC(t);for(let l=0;l<s.length;++l){const c=s[l];if(!(c in Rre||n&&n[c]||a&&c in a||i&&c in i)){const u=$re(t,c);try{Fre(e,c,u)}catch{}}}}return e}function Hx(e){return typeof e=="function"}const Wre=Symbol.for("react.forward_ref");function kM(e){return e!=null&&(typeof e=="object"||typeof e=="function")&&e.$$typeof===Wre&&"styledComponentId"in e}function $d(e,t){return e&&t?e+" "+t:e||t||""}function Wv(e,t){return e.join("")}function sf(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Vv(e,t,n=!1){if(!n&&!sf(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(let r=0;r<t.length;r++)e[r]=Vv(e[r],t[r]);else if(sf(t))for(const r in t)e[r]=Vv(e[r],t[r]);return e}function zw(e,t){Object.defineProperty(e,"toString",{value:t})}const Vre=class{constructor(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e,this._cGroup=0,this._cIndex=0}indexOfGroup(e){if(e===this._cGroup)return this._cIndex;let t=this._cIndex;if(e>this._cGroup)for(let n=this._cGroup;n<e;n++)t+=this.groupSizes[n];else for(let n=this._cGroup-1;n>=e;n--)t-=this.groupSizes[n];return this._cGroup=e,this._cIndex=t,t}insertRules(e,t){if(e>=this.groupSizes.length){const s=this.groupSizes,i=s.length;let a=i;for(;e>=a;)if(a<<=1,a<0)throw Rf(16,`${e}`);this.groupSizes=new Uint32Array(a),this.groupSizes.set(s),this.length=a;for(let l=i;l<a;l++)this.groupSizes[l]=0}let n=this.indexOfGroup(e+1),r=0;for(let s=0,i=t.length;s<i;s++)this.tag.insertRule(n,t[s])&&(this.groupSizes[e]++,n++,r++);r>0&&this._cGroup>e&&(this._cIndex+=r)}clearGroup(e){if(e<this.length){const t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(let s=n;s<r;s++)this.tag.deleteRule(n);t>0&&this._cGroup>e&&(this._cIndex-=t)}}getGroup(e){let t="";if(e>=this.length||this.groupSizes[e]===0)return t;const n=this.groupSizes[e],r=this.indexOfGroup(e),s=r+n;for(let i=r;i<s;i++)t+=this.tag.getRule(i)+Bw;return t}},qre=`style[${gu}][${xM}="${zx}"]`,Yre=new RegExp(`^${gu}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`),qC=e=>typeof ShadowRoot<"u"&&e instanceof ShadowRoot||"host"in e&&e.nodeType===11,qv=e=>{if(!e)return document;if(qC(e))return e;if("getRootNode"in e){const t=e.getRootNode();if(qC(t))return t}return document}
581,Gre=(e,t,n)=>{const r=n.split(",");let s;for(let i=0,a=r.length;i<a;i++)(s=r[i])&&e.registerName(t,s)},Kre=(e,t)=>{var n;const r=((n=t.textContent)!==null&&n!==void 0?n:"").split(Bw),s=[];for(let i=0,a=r.length;i<a;i++){const l=r[i].trim();if(!l)continue;const c=l.match(Yre);if(c){const u=0|parseInt(c[1],10),d=c[2];u!==0&&(Sre(d,u),Gre(e,d,c[3]),e.getTag().insertRules(u,s)),s.length=0}else s.push(l)}},Iy=e=>{const t=qv(e.options.target).querySelectorAll(qre);for(let n=0,r=t.length;n<r;n++){const s=t[n];s&&s.getAttribute(gu)!==gM&&(Kre(e,s),s.parentNode&&s.parentNode.removeChild(s))}};let xd=!1;function Qre(){if(xd!==!1)return xd;if(typeof document<"u"){const e=document.head.querySelector('meta[property="csp-nonce"]');if(e)return xd=e.nonce||e.getAttribute("content")||void 0;const t=document.head.querySelector('meta[name="sc-nonce"]');if(t)return xd=t.getAttribute("content")||void 0}return xd=typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0}const TM=(e,t)=>{const n=document.head,r=e||n,s=document.createElement("style"),i=(c=>{const u=Array.from(c.querySelectorAll(`style[${gu}]`));return u[u.length-1]})(r),a=i!==void 0?i.nextSibling:null;s.setAttribute(gu,gM),s.setAttribute(xM,zx);const l=t||Qre();return l&&s.setAttribute("nonce",l),r.insertBefore(s,a),s},Xre=class{constructor(e,t){this.element=TM(e,t),this.element.appendChild(document.createTextNode("")),this.sheet=(n=>{var r;if(n.sheet)return n.sheet;const s=(r=n.getRootNode().styleSheets)!==null&&r!==void 0?r:document.styleSheets;for(let i=0,a=s.length;i<a;i++){const l=s[i];if(l.ownerNode===n)return l}throw Rf(17)})(this.element),this.length=0}insertRule(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch{return!1}}deleteRule(e){this.sheet.deleteRule(e),this.length--}getRule(e){const t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""}},Jre=class{constructor(e,t){this.element=TM(e,t),this.nodes=this.element.childNodes,this.length=0}insertRule(e,t){if(e<=this.length&&e>=0){const n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1}deleteRule(e){this.element.removeChild(this.nodes[e]),this.length--}getRule(e){return e<this.length?this.nodes[e].textContent:""}};let YC=yh;const Zre={isServer:!yh,useCSSOMInjection:!kre};class Wx{static registerId(t){return Ud(t)}constructor(t=xu,n={},r){this.options=Object.assign(Object.assign({},Zre),t),this.gs=n,this.keyframeIds=new Set,this.names=new Map(r),this.server=!!t.isServer,!this.server&&yh&&YC&&(YC=!1,Iy(this)),zw(this,()=>(s=>{const i=s.getTag(),{length:a}=i;let l="";for(let c=0;c<a;c++){const u=Tre(c);if(u===void 0)continue;const d=s.names.get(u);if(d===void 0||!d.size)continue;const h=i.getGroup(c);if(h.length===0)continue;const f=gu+".g"+c+'[id="'+u+'"]';let p="";for(const m of d)m.length>0&&(p+=m+",");l+=h+f+'{content:"'+p+'"}'+Bw}return l})(this))}rehydrate(){!this.server&&yh&&Iy(this)}reconstructWithOptions(t,n=!0){const r=new Wx(Object.assign(Object.assign({},this.options),t),this.gs,n&&this.names||void 0);return r.keyframeIds=new Set(this.keyframeIds),!this.server&&yh&&t.target!==this.options.target&&qv(this.options.target)!==qv(t.target)&&Iy(r),r}allocateGSInstance(t){return this.gs[t]=(this.gs[t]||0)+1}getTag(){return this.tag||(this.tag=(t=(({useCSSOMInjection:n,target:r,nonce:s})=>n?new Xre(r,s):new Jre(r,s))(this.options),new Vre(t)));var t}hasNameForId(t,n){var r,s;return(s=(r=this.names.get(t))===null||r===void 0?void 0:r.has(n))!==null&&s!==void 0&&s}registerName(t,n){Ud(t),t.startsWith(yM)&&this.keyframeIds.add(t);const r=this.names.get(t);r?r.add(n):this.names.set(t,new Set([n]))}insertRules(t,n,r){this.registerName(t,n),this.getTag().insertRules(Ud(t),r)}clearNames(t){this.names.has(t)&&this.names.get(t).clear()}clearRules(t){this.getTag().clearGroup(Ud(t)),this.clearNames(t)}clearTag(){this.tag=void 0}}const SM=new WeakSet,ese={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexShrink:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function tse(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t!="number"||t===0||e in ese||e.startsWith("--")?String(t).trim():t+"px"}const Wo=47;function GC(e){if(e.charCodeAt(0)===45&&e.charCodeAt(1)===45)return e;let t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t+=r>=65&&r<=90?"-"+String.fromCharCode(r+32):e[n]}return t.startsWith("ms-")?"-"+t:t}const CM=Symbol.for("sc-keyframes");function nse(e){return typeof e=="object"&&e!==null&&CM in e}function jM(e){return Hx(e)&&!(e.prototype&&e.prototype.isReactComponent)}const AM=e=>e==null||e===!1||e==="",rse=Symbol.for("react.client.reference");function KC(e){return e.$$typeof===rse}function IM(e,t){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&!AM(r)&&(Array.isArray(r)&&SM.has(r)||Hx(r)?t.push(GC(n)+":",r,";"):sf(r)?(t.push(n+" {"),IM(r,t),t.push("}
581")):t.push(GC(n)+": "+tse(n,r)+";"))}}function fl(e,t,n,r,s=[]){if(AM(e))return s;const i=typeof e;if(i==="string")return s.push(e),s;if(i==="function"){if(KC(e))return s;if(jM(e)&&t){const a=e(t);return fl(a,t,n,r,s)}return s.push(e),s}if(Array.isArray(e)){for(let a=0;a<e.length;a++)fl(e[a],t,n,r,s);return s}return kM(e)?(s.push(`.${e.styledComponentId}`),s):nse(e)?(n?(e.inject(n,r),s.push(e.getName(r))):s.push(e),s):KC(e)?s:sf(e)?e.toString!==Object.prototype.toString?(s.push(e.toString()),s):(IM(e,s),s):(s.push(e.toString()),s)}const sse=vM(zx);class ise{constructor(t,n,r){this.rules=t,this.componentId=n,this.baseHash=hl(sse,n),this.baseStyle=r,Wx.registerId(n)}generateAndInjectStyles(t,n,r){let s=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,n,r):"";{let i="";for(let a=0;a<this.rules.length;a++){const l=this.rules[a];if(typeof l=="string")i+=l;else if(l)if(jM(l)){const c=l(t);typeof c=="string"?i+=c:c!=null&&c!==!1&&(i+=Wv(fl(c,t,n,r)))}else i+=Wv(fl(l,t,n,r))}if(i){this.dynamicNameCache||(this.dynamicNameCache=new Map);const a=r.hash?r.hash+i:i;let l=this.dynamicNameCache.get(a);if(!l){if(l=$w(hl(hl(this.baseHash,r.hash),i)>>>0),this.dynamicNameCache.size>=200){const c=this.dynamicNameCache.keys().next().value;c!==void 0&&this.dynamicNameCache.delete(c)}this.dynamicNameCache.set(a,l)}if(!n.hasNameForId(this.componentId,l)){const c=r(i,"."+l,void 0,this.componentId);n.insertRules(this.componentId,l,c)}s=$d(s,l)}}return s}}const ase=/&/g;function PM(e,t){let n=0;for(;--t>=0&&e.charCodeAt(t)===92;)n++;return!(1&~n)}function Py(e){const t=e.length;let n="",r=0,s=0,i=0,a=!1,l=!1;for(let c=0;c<t;c++){const u=e.charCodeAt(c);if(i!==0||a||u!==Wo||e.charCodeAt(c+1)!==42)if(a)u===42&&e.charCodeAt(c+1)===Wo&&(a=!1,c++);else if(u!==34&&u!==39||PM(e,c)){if(i===0)if(u===123)s++;else if(u===125){if(s--,s<0){l=!0;let d=c+1;for(;d<t;){const h=e.charCodeAt(d);if(h===59||h===10)break;d++}d<t&&e.charCodeAt(d)===59&&d++,s=0,c=d-1,r=d;continue}s===0&&(n+=e.substring(r,c+1),r=c+1)}else u===59&&s===0&&(n+=e.substring(r,c+1),r=c+1)}else i===0?i=u:i===u&&(i=0);else a=!0,c++}return l||s!==0||i!==0?(r<t&&s===0&&i===0&&(n+=e.substring(r)),n):e}function DM(e,t){const n=t+" ",r=","+n;for(let s=0;s<e.length;s++){const i=e[s];if(i.type==="rule"){i.value=(n+i.value).replaceAll(",",r);const a=i.props,l=[];for(let c=0;c<a.length;c++)l[c]=n+a[c];i.props=l}Array.isArray(i.children)&&i.type!=="@keyframes"&&DM(i.children,t)}return e}function ose({options:e=xu,plugins:t=Uw}=xu){let n,r,s;const i=(f,p,m)=>m.startsWith(r)&&m.endsWith(r)&&m.replaceAll(r,"").length>0?`.${n}`:f,a=t.slice();a.push(f=>{f.type===Fx&&f.value.includes("&")&&(s||(s=new RegExp(`\\${r}\\b`,"g")),f.props[0]=f.props[0].replace(ase,r).replace(s,i))}),e.prefix&&a.push(Nre),a.push(_re);let l=[];const c=wre(a.concat(Ere(f=>l.push(f)))),u=(f,p="",m="",x="&")=>{n=x,r=p,s=void 0;const w=function(b){const _=b.indexOf("//")!==-1,k=b.indexOf("}")!==-1;if(!_&&!k)return b;if(!_)return Py(b);const T=b.length;let N="",C=0,S=0,I=0,E=0,j=0,P=!1;for(;S<T;){const L=b.charCodeAt(S);if(L!==34&&L!==39||PM(b,S))if(I===0)if(L===Wo&&S+1<T&&b.charCodeAt(S+1)===42){for(S+=2;S+1<T&&(b.charCodeAt(S)!==42||b.charCodeAt(S+1)!==Wo);)S++;S+=2}else if(L!==40)if(L!==41)if(E>0)S++;else if(L===42&&S+1<T&&b.charCodeAt(S+1)===Wo)N+=b.substring(C,S),S+=2,C=S,P=!0;else if(L===Wo&&S+1<T&&b.charCodeAt(S+1)===Wo){for(N+=b.substring(C,S);S<T&&b.charCodeAt(S)!==10;)S++;C=S,P=!0}else L===123?j++:L===125&&j--,S++;else E>0&&E--,S++;else E++,S++;else S++;else I===0?I=L:I===L&&(I=0),S++}return P?(C<T&&(N+=b.substring(C)),j===0?N:Py(N)):j===0?b:Py(b)}(f);let g=bre(m||p?m+" "+p+" { "+w+" }":w);return e.namespace&&(g=DM(g,e.namespace)),l=[],Ig(g,c),l},d=e;let h=zv;for(let f=0;f<t.length;f++)t[f].name||Rf(15),h=hl(h,t[f].name);return d!=null&&d.namespace&&(h=hl(h,d.namespace)),d!=null&&d.prefix&&(h=hl(h,"p")),u.hash=h!==zv?h.toString():"",u}const lse=new Wx,Yv=ose(),OM=ye.createContext({shouldForwardProp:void 0,styleSheet:lse,stylis:Yv,stylisPlugins:void 0});OM.Consumer;function cse(){return ye.useContext(OM)}const MM=ye.createContext(void 0);MM.Consumer;const QC=Object.prototype.hasOwnProperty,Dy={};function use(e,t){const n=typeof e!="string"?"sc":bM(e);Dy[n]=(Dy[n]||0)+1;const r=n+"-"+_M(zx+n+Dy[n]);return t?t+"-"+r:r}function dse(e,t,n){const r=kM(e),s=e,i=!Hv(e),{attrs:a=Uw,componentId:l=use(t.displayName,t.parentComponentId),displayName:c=Dre(e)}=t,u=t.displayName&&t.componentId?bM(t.displayName)+"-"+t.componentId:t.componentId||l,d=r&&s.attrs?s.attrs.concat(a).filter(
581Boolean):a;let{shouldForwardProp:h}=t;if(r&&s.shouldForwardProp){const x=s.shouldForwardProp;if(t.shouldForwardProp){const w=t.shouldForwardProp;h=(g,b)=>x(g,b)&&w(g,b)}else h=x}const f=new ise(n,u,r?s.componentStyle:void 0);function p(x,w){return function(g,b,_){const{attrs:k,componentStyle:T,defaultProps:N,foldedComponentIds:C,styledComponentId:S,target:I}=g,E=ye.useContext(MM),j=cse(),P=g.shouldForwardProp||j.shouldForwardProp,L=Cre(b,E,N)||xu;let z,R;{const H=ye.useRef(null),A=H.current;if(A!==null&&A[1]===L&&A[2]===j.styleSheet&&A[3]===j.stylis&&A[7]===T&&function(q,V,D){const te=q,J=V;let ue=0;for(const Ne in J)if(QC.call(J,Ne)&&(ue++,te[Ne]!==J[Ne]))return!1;return ue===D}(A[0],b,A[4]))z=A[5],R=A[6];else{z=function(V,D,te){const J=Object.assign(Object.assign({},D),{className:void 0,theme:te}),ue=V.length>1;for(let Ne=0;Ne<V.length;Ne++){const Ie=V[Ne],Pe=Hx(Ie)?Ie(ue?Object.assign({},J):J):Ie;for(const Ue in Pe)Ue==="className"?J.className=$d(J.className,Pe[Ue]):Ue==="style"?J.style=Object.assign(Object.assign({},J.style),Pe[Ue]):Ue in D&&D[Ue]===void 0||(J[Ue]=Pe[Ue])}return"className"in D&&typeof D.className=="string"&&(J.className=$d(J.className,D.className)),J}(k,b,L),R=function(V,D,te,J){return V.generateAndInjectStyles(D,te,J)}(T,z,j.styleSheet,j.stylis);let q=0;for(const V in b)QC.call(b,V)&&q++;H.current=[b,L,j.styleSheet,j.stylis,q,z,R,T]}}const B=z.as||I,O=function(H,A,q,V){const D={};for(const te in H)H[te]===void 0||te[0]==="$"||te==="as"||te==="theme"&&H.theme===q||(te==="forwardedAs"?D.as=H.forwardedAs:V&&!V(te,A)||(D[te]=H[te]));return D}(z,B,L,P);let U=$d(C,S);return R&&(U+=" "+R),z.className&&(U+=" "+z.className),O[Hv(B)&&B.includes("-")?"class":"className"]=U,_&&(O.ref=_),y.createElement(B,O)}(m,x,w)}p.displayName=c;let m=ye.forwardRef(p);return m.attrs=d,m.componentStyle=f,m.displayName=c,m.shouldForwardProp=h,m.foldedComponentIds=r?$d(s.foldedComponentIds,s.styledComponentId):"",m.styledComponentId=u,m.target=r?s.target:e,Object.defineProperty(m,"defaultProps",{get(){return this._foldedDefaultProps},set(x){this._foldedDefaultProps=r?function(w,...g){for(const b of g)Vv(w,b,!0);return w}({},s.defaultProps,x):x}}),zw(m,()=>`.${m.styledComponentId}`),i&&NM(m,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),m}var hse=new Set(["a","abbr","address","area","article","aside","audio","b","bdi","bdo","blockquote","body","button","br","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","map","mark","menu","meter","nav","object","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","slot","small","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","switch","symbol","text","textPath","tspan","use"]);function XC(e,t){const n=[e[0]];for(let r=0,s=t.length;r<s;r+=1)n.push(t[r],e[r+1]);return n}const JC=e=>(SM.add(e),e);function RM(e,...t){if(Hx(e)||sf(e))return JC(fl(XC(Uw,[e,...t])));const n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?fl(n):JC(fl(XC(n,t)))}function Gv(e,t,n=xu){if(!t)throw Rf(1,t);const r=(s,...i)=>e(t,n,RM(s,...i));return r.attrs=s=>Gv(e,t,Object.assign(Object.assign({}
581,n),{attrs:Array.prototype.concat(n.attrs,s).filter(Boolean)})),r.withConfig=s=>Gv(e,t,Object.assign(Object.assign({},n),s)),r}const LM=e=>Gv(dse,e),FM=LM;hse.forEach(e=>{FM[e]=LM(e)});var BM;class fse{constructor(t,n){this[BM]=!0,this.inject=(r,s=Yv)=>{const i=this.getName(s);if(!r.hasNameForId(this.id,i)){const a=s(this.rules,i,"@keyframes");r.insertRules(this.id,i,a)}},this.name=t,this.id=yM+t,this.rules=n,Ud(this.id),zw(this,()=>{throw Rf(12,String(this.name))})}getName(t=Yv){return t.hash?this.name+$w(+t.hash>>>0):this.name}}function Hw(e,...t){const n=Wv(RM(e,...t)),r=_M(n);return new fse(r,n)}BM=CM;const Oy=["Reading your profile","Analyzing the role","Picking best projects","Writing bullet points","Crafting experience section","Building skills section","Writing summary","Generating PDF","Finishing up"],pse="Writing cover letter",mse=["Researching the company","Reading recent news","Analyzing the role","Building your orientation","Writing prep questions","Crafting thought trains","Reviewing your profile","Finalizing your deck"],gse=["Reading the transcript","Identifying key moments","Scoring your answers","Spotting missed opportunities","Writing coaching notes","Building your debrief"];function xse(e){return e?[...Oy.slice(0,7),pse,...Oy.slice(7)]:Oy}const yse=Hw` 582 0% { transform: rotate(0deg); } 583 50% { transform: rotate(180deg); } 584 100% { transform: rotate(360deg); } 585`,bse=Hw` 586 0% { 587 box-shadow: 588 0.5em 0.5em 1.8em 0.1em #FBCDA4, 589 -0.5em 0.5em 1.5em 0px #141210, 590 0.5em -0.5em 1.5em 0px #141210, 591 -0.5em -0.5em 1.0em 0px #1A3830; 592 } 593 50% { 594 box-shadow: 595 0.5em 0.5em 1.0em 0px #1A3830, 596 -0.5em 0.5em 1.5em 0px #141210, 597 0.5em -0.5em 1.5em 0px #141210, 598 -0.5em -0.5em 1.8em 0.1em #FBCDA4; 599 } 600 100% { 601 box-shadow: 602 0.5em 0.5em 1.8em 0.1em #FBCDA4, 603 -0.5em 0.5em 1.5em 0px #141210, 604 0.5em -0.5em 1.5em 0px #141210, 605 -0.5em -0.5em 1.0em 0px #1A3830; 606 } 607`,vse=Hw` 608 0% { 609 box-shadow: 610 0.5em 1em 1.2em #FBCDA4, 611 -0.5em 0.5em 1em #141210, 612 0.5em -0.5em 1em #141210, 613 -0.5em -0.5em 0.6em #1A3830; 614 } 615 50% { 616 box-shadow: 617 0.5em 1em 0.6em #1A3830, 618 -0.5em 0.5em 1em #141210, 619 0.5em -0.5em 1em #141210, 620 -0.5em -0.5em 1.2em #FBCDA4; 621 } 622 100% { 623 box-shadow: 624 0.5em 1em 1.2em #FBCDA4, 625 -0.5em 0.5em 1em #141210, 626 0.5em -0.5em 1em #141210, 627 -0.5em -0.5em 0.6em #1A3830; 628 } 629`,_se=FM.div` 630 .loader { 631 display: flex; 632 justify-content: center; 633 align-items: center; 634 position: relative; 635 } 636 637 .external-shadow { 638 width: 10em; 639 height: 10em; 640 border-radius: 50%; 641 display: flex; 642 justify-content: center; 643 align-items: center; 644 position: relative; 645 box-shadow: 646 0.5em 0.5em 1.5em 0px #FBCDA4, 647 -0.5em 0.5em 1.5em 0px #141210, 648 0.5em -0.5em 1.5em 0px #141210, 649 -0.5em -0.5em 1.2em 0px #1A3830; 650 z-index: 999; 651 animation: ${yse} 3s linear infinite, ${bse} 4s ease-in-out infinite; 652 background-color: #141210; 653 } 654 655 .central { 656 display: flex; 657 justify-content: center; 658 align-items: center; 659 position: relative; 660 width: 10em; 661 height: 10em; 662 border-radius: 50%; 663 animation: ${vse} 4s ease-in-out infinite; 664 animation-delay: 0.5s; 665 } 666 667 .intern { 668 position: absolute; 669 z-index: 9999; 670 display: flex; 671 align-items: center; 672 justify-content: center; 673 width: 7em; 674 text-align: center; 675 } 676`;function Dg({error:e,variant:t="resume",includeCoverLetter:n=!1}){const r=t==="prep"?mse:t==="debrief"?gse:xse(n),[s,i]=y.useState(0);y.useEffect(()=>{if(e)return;let l=!1;const c=()=>{const u=2500+Math.random()*2e3;setTimeout(()=>{l||(i(d=>(d+1)%r.length),c())},u)};return c(),()=>{l=!0}},[e,r.length]);const a=e?"Something went wrong":r[s];return o.jsx("div",{className:"flex items-center justify-center select-none",children:o.jsx(_se,{children:o.jsxs("div",{className:"loader",children:[o.jsx("div",{className:"intern",children:o.jsx(He,{mode:"wait",children:o.jsx(se.span,{initial:{opacity:0,filter:"blur(4px)"}
676,animate:{opacity:1,filter:"blur(0px)"},exit:{opacity:0,filter:"blur(4px)"},transition:{duration:.7,ease:"easeInOut"},style:{fontSize:"0.75em",fontWeight:300,color:e?"#F07070":"#E8D1B0",lineHeight:1.3,fontFamily:"Inter, sans-serif"},children:a},a)})}),o.jsx("div",{className:"external-shadow",children:o.jsx("div",{className:"central"})})]})})})}function My({icon:e,title:t,onClick:n}){return o.jsx("button",{onClick:n,title:t,className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:e})}function wse({onCopy:e,title:t}){const[n,r]=y.useState(!1),s=async()=>{await e(),r(!0),setTimeout(()=>r(!1),2e3)};return o.jsx("button",{onClick:s,title:t,className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:n?o.jsx(yt,{size:13,className:"text-success"}):o.jsx(Nr,{size:13})})}function Ese(e,t){const n=document.createElement("a");n.href=e,n.download=t,n.click()}function ZC({url:e,title:t,onEdit:n,onCopy:r,genId:s}){const[i,a]=y.useState(!1),l=`${e.split("#")[0]}#toolbar=0`;return o.jsxs("div",{className:"group rounded-lg border border-border overflow-hidden flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border bg-bg-secondary shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary",children:t}),s&&o.jsxs("button",{onClick:async()=>{await navigator.clipboard.writeText(s),a(!0),setTimeout(()=>a(!1),2e3)},title:`Generation ID: ${s}`,className:"opacity-0 hover:opacity-100 group-hover:opacity-100 focus:opacity-100 flex items-center gap-1 font-mono text-[10px] text-text-tertiary/30 hover:text-text-tertiary transition-opacity",children:[i?o.jsx(yt,{size:9,className:"text-success"}):null,s.slice(0,8)]})]}),o.jsxs("div",{className:"flex items-center",children:[r&&o.jsx(wse,{onCopy:r,title:"Copy text"}),n&&o.jsx(My,{icon:o.jsx(qn,{size:13}),title:"Edit",onClick:n}),o.jsx(My,{icon:o.jsx(J2,{size:13}),title:"Download",onClick:()=>Ese(e,`${t.toLowerCase().replace(/\s+/g,"_")}.pdf`)}),o.jsx(My,{icon:o.jsx(ha,{size:13}),title:"Open in new tab",onClick:()=>window.open(e,"_blank")})]})]}),o.jsx("iframe",{src:l,className:"w-full h-[480px] bg-bg",title:t})]})}function Nse({result:e}){const[t,n]=y.useState(e),[r,s]=y.useState(!1),[i,a]=y.useState(""),[l,c]=y.useState(null),u=y.useRef(null),[d,h]=y.useState(null),[f,p]=y.useState(!1),[m,x]=y.useState(!1),[w,g]=y.useState(0),[b,_]=y.useState(0),k=y.useCallback(async()=>{if(d)return d;const E=await G.applications.get(t.job_id);return h(E),E},[d,t.job_id]),T=y.useCallback(async E=>{await k(),E==="resume"?p(!0):x(!0)},[k]),N=y.useCallback(async()=>{const j=(await k()).resume_structured;if(!j)return;const P=[];j.summary&&P.push(j.summary,"");for(const L of j.work){const z=L.date_range??[L.start_date,L.end_date||"Present"].filter(Boolean).join(" â ");P.push(`${L.title} at ${L.org_name} (${z})`);for(const R of L.bullets)P.push(`⢠${R}`);P.push("")}for(const[L,z]of Object.entries(j.projects)){P.push(L);for(const R of z.bullets)P.push(`⢠${R}`);P.push("")}await navigator.clipboard.writeText(P.join(` 677`).trim())},[k]),C=y.useCallback(async()=>{s(!0),c(null),u.current=new AbortController;try{const j=(await G.applications.generateCoverLetter(t.job_id,u.current.signal)).getReader(),P=new TextDecoder;let L="";for(;;){const{done:z,value:R}=await j.read();if(z)break;L+=P.decode(R,{stream:!0});const B=L.split(` 678`);L=B.pop()??"";for(const O of B){if(!O.startsWith("data: "))continue;const U=JSON.parse(O.slice(6).trim());if(U.step==="complete"&&U.status==="done"){const H=JSON.parse(U.message);n(A=>({...A,cover_letter_url:H.cover_letter_url,cover_letter_plain_text:H.cover_letter_plain_text}))}else U.step==="error"?c(U.message):U.status==="running"&&a(U.message)}}}catch(E){(E==null?void 0:E.name)!=="AbortError"&&c(E.message??"Error")}finally{s(!1),a("")}},[t.job_id]),S=`${G.applications.resumeUrl(t.job_id)}${w?`&v=${w}`:""}`,I=t.cover_letter_url?`${G.applications.coverLetterUrl(t.job_id)}${b?`&v=${b}`:""}`:null;return o.jsxs(se.div,{initial:{opacity:0,y:12}
678,animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[r&&o.jsx("div",{className:"w-3 h-3 rounded-full border-2 border-accent/40 border-t-accent animate-spin"}),(r||i)&&o.jsx("p",{className:"text-xs text-text-tertiary",children:i||"Generating cover letterâ¦"}),l&&o.jsx("span",{className:"text-xs text-error",children:l})]}),o.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:!I&&!r&&o.jsxs("button",{onClick:C,title:"Add cover letter",className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(Rr,{size:12}),"Add cover letter"]})})]}),o.jsxs("div",{className:re("grid gap-3",I?"grid-cols-2":"grid-cols-1"),children:[o.jsx(ZC,{url:S,title:"Resume",genId:t.job_id,onCopy:N,onEdit:()=>T("resume")}),I&&o.jsx(ZC,{url:I,title:"Cover Letter",onCopy:t.cover_letter_plain_text?async()=>{await navigator.clipboard.writeText(t.cover_letter_plain_text)}:void 0,onEdit:()=>T("cover")})]}),o.jsxs(He,{children:[f&&d&&o.jsx(aw,{app:d,onClose:()=>p(!1),onRecompiled:()=>{g(Date.now()),p(!1)}}),m&&d&&o.jsx(iw,{app:d,onClose:()=>x(!1),onRecompiled:()=>{_(Date.now()),x(!1)}})]})]})}function kse(e){var t;try{const n=JSON.parse(e);if(((t=n==null?void 0:n.detail)==null?void 0:t.code)==="quota_exceeded")return n.detail.feature}catch{}return null}function Tse(e){var t;try{const n=JSON.parse(e);return((t=n==null?void 0:n.detail)==null?void 0:t.code)==="insufficient_content"}catch{return!1}}function Sse(){const[e,t]=y.useState([]),[n,r]=y.useState(null),[s,i]=y.useState(!1),[a,l]=y.useState(null),[c,u]=y.useState(null),[d,h]=y.useState(!1),f=y.useRef(null),p=y.useRef(!0),m=y.useRef({});y.useEffect(()=>(p.current=!0,()=>{p.current=!1}),[]);const x=y.useCallback(async(b,_,k=!0,T="claude-haiku-4-5-20251001",N,C)=>{var I;(I=f.current)==null||I.abort(),f.current=new AbortController,t([]),r(null),l(null),h(!1),i(!0);const S=C?m.current[C]??null:null;try{const E=uu(),j=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json",...E?{Authorization:`Bearer ${E}`}:{}},body:JSON.stringify({job_description:b,resume_type:_,include_cover_letter:k,model:T,source:"web",...S?{parent_generation_id:S}:{}}),signal:f.current.signal});if(!j.ok){const R=await j.text();if(j.status===402){const B=kse(R);if(B&&p.current){u(B),i(!1);return}}if(j.status===400&&Tse(R)&&p.current){h(!0),i(!1);return}throw new Error(R)}const P=j.body.getReader(),L=new TextDecoder;let z="";for(;;){const{done:R,value:B}=await P.read();if(R)break;z+=L.decode(B,{stream:!0});const O=z.split(` 679`);z=O.pop()??"";for(const U of O){if(!U.startsWith("data: "))continue;const H=U.slice(6).trim();if(!H)continue;const A=JSON.parse(H);if(!p.current)break;if(A.step==="complete"&&A.status==="done"){const q=JSON.parse(A.message);q.generation_id&&(m.current[q.job_id]=q.generation_id),r(q),Ot.capture("resume_generated",{job_id:q.job_id,company:q.company_name,role:q.role_name,resume_type:_,include_cover_letter:k}),N==null||N(q)}else A.step==="error"&&l(A.message);t(q=>{const V=q.findIndex(te=>te.step===A.step),D={step:A.step,message:A.message,status:A.status,ts:Date.now()};if(V>=0){const te=[...q];return te[V]=D,te}return[...q,D]})}}}catch(E){(E==null?void 0:E.name)!=="AbortError"&&p.current&&l(E.message??"Unknown error")}finally{p.current&&i(!1)}},[]),w=(b,_,k,T,N,C)=>x(b,_,k,T,N,C),g=y.useCallback(()=>{var b;(b=f.current)==null||b.abort(),i(!1)},[]);return{steps:e,result:n,streaming:s,error:a,paywallFeature:c,clearPaywall:()=>u(null),insufficientContent:d,clearInsufficientContent:()=>h(!1),start:w,cancel:g}}const UM=y.createContext(null);function Cse({children:e}){const t=Sse();return o.jsx(UM.Provider,{value:t,children:e})}function $M(){const e=y.useContext(UM);if(!e)throw new Error("useGeneration must be used inside GenerationProvider");return e}const Ry=["Why do you want to work at this company?","Tell me about a time you led a project under pressure.","What's your greatest professional achievement?","How do you prioritize when everything feels urgent?","Describe a conflict with a coworker and how you resolved
679it.","Why are you leaving your current role?","Where do you see yourself in five years?","Tell me about a time you failed and what you learned.","What makes you a strong fit for this specific role?","How do you approach learning something completely new?","Describe your ideal work environment.","Tell me about a time you had to influence without authority.","What's a technical decision you made that you'd make differently now?","How do you handle ambiguous requirements?","What does success look like to you in the first 90 days?","Tell me about a time you disagreed with your manager.","How do you explain complex ideas to non-technical stakeholders?","What's the most impactful thing you've shipped?","How do you stay current in your field?","Why should we hire you over other candidates?"];function jse(e){return e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}):"â"}function Ase({pct:e}){const t=e>=75?"bg-success":e>=50?"bg-accent":e>=25?"bg-accent/60":"bg-border";return o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o.jsx("div",{className:"flex-1 h-1 bg-bg rounded-full overflow-hidden",children:o.jsx("div",{className:`h-full rounded-full transition-all ${t}`,style:{width:`${e}%`}})}),o.jsxs("span",{className:"text-2xs text-text-tertiary tabular-nums w-7 text-right",children:[e,"%"]})]})}function Ise({type:e}){return e==="mobile"?o.jsx(wH,{size:11,className:"text-text-tertiary"}):o.jsx(mH,{size:11,className:"text-text-tertiary"})}function Pse({s:e}){return o.jsxs("div",{className:"rounded-lg border border-border bg-bg-secondary p-3 flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("span",{className:"text-xs text-text font-medium",children:jse(e.timestamp)}),o.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-text-tertiary",children:[o.jsx(Ise,{type:e.device_type}),e.browser&&o.jsx("span",{children:e.browser}),e.country&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-border",children:"·"}),o.jsx(kf,{size:10}),o.jsx("span",{children:e.city?`${e.city}, ${e.country}`:e.country})]})]})]}),o.jsx(Ase,{pct:e.max_scroll_pct}),o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[e.projects_expanded.map(t=>o.jsxs("span",{className:"text-2xs bg-accent/10 text-accent border border-accent/20 rounded-full px-2 py-0.5",children:["expanded: ",t]},t)),e.links_clicked.map(t=>o.jsxs("span",{className:"text-2xs bg-success/10 text-success border border-success/20 rounded-full px-2 py-0.5",children:["clicked: ",t]},t)),e.referrer&&e.referrer!=="Direct"&&o.jsxs("span",{className:"text-2xs bg-bg border border-border rounded-full px-2 py-0.5 text-text-tertiary",children:["via ",e.referrer]})]})]})}function zM({onClose:e}){const{data:t,isLoading:n}=wt({queryKey:["portfolio-analytics"],queryFn:()=>G.portfolio.analytics(),staleTime:6e4});return o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[o.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:e}),o.jsxs("div",{className:"relative w-full max-w-lg max-h-[85vh] flex flex-col rounded-xl border border-border bg-bg shadow-2xl overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:"Portfolio Analytics"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Last 30 days"})]}),o.jsx("button",{onClick:e,className:"p-1.5 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(mt,{size:14,className:"text-text-tertiary"})})]}),n?o.jsx("div",{className:"flex-1 flex items-center justify-center py-16",children:o.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-border border-t-accent animate-spin"})}):!t||t.total_sessions===0?o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 py-16 text-center px-6",children:[o.jsx("p",{className:"text-sm text-text",children:"No visits yet"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Share your portfolio link to start tracking engagement."})]}):o.jsxs("div",{className:"flex-1 overflow-y-auto",children:[o.jsxs("div",{className:"grid grid-cols-3 divide-x divide-border border-b border-border",children:[o.jsxs("div",{className:"px-4 py-3 flex flex-col gap-0.5",children:[o.jsx("span",{className:"text-xl font-semibold text-text tabular-nums",children:t.total_sessions}),o.jsx("span",{className:"text-2xs text-text-tertiary",children:"visits"})]}),o.jsxs("div",{className:"px-4 py-3 flex flex-col gap-0.5",children:[o.jsxs("span",{className:"text-xl font-semibold text-text tabular-nums",children:[t.avg_scroll_pct,"%"]}),o.jsx("span",{className:"text-2xs text-text-tertiary",children:"avg scroll"})]}),o.jsxs("div",{className:"px-4 py-3 flex flex-col gap-0.5",children:[o.jsx("span",{className:"text-xl font-semibold text-text tabular-nums",children:Object.values(t.link_click_counts).reduce((r,s)=>r+s,0)}),o.jsx("span",{className:"text-2xs text-text-tertiary",children:"link clicks"})]})]}),Object.keys(t.project_expand_counts).length>0&&o.jsxs("div",{className:"px-4 py-3 border-b border-border flex flex-col gap-2",children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary uppercase tracking-widest",children:"Most expanded"}),o.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(t.project_expand_counts).sort((r,s)=>s[1]-r[1]).slice(0,4).map(([r,s])=>o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsx("span",{className:"text-text-secondary truncate",children:r}),o.jsxs("span",{className:"text-text font-medium tabular-nums shrink-0 ml-2",children:[s,"Ã"]})]},r))})]}),Object.keys(t.referrer_counts).length>0&&o.jsxs("div",{className:"px-4 py-3 border-b border-border flex flex-col gap-2",children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary uppercase tracking-widest",children:"Traffic sources"}),o.jsx("div",{className:"flex flex-col gap-1.5",children:Object.entries(t.referrer_counts).sort((r,s)=>s[1]-r[1]).slice(0,4).map(([r,s])=>o.jsxs("div",{className:"flex items-center justify-between text-xs",children:[o.jsx("span",{className:"text-text-secondary",children:r}),o.jsx("span",{className:"text-text font-medium tabular-nums",children:s})]},r))})]}),o.jsxs("div",{className:"px-4 py-3 flex flex-col gap-2",children:[o.jsx("p",{className:"text-2xs font-medium text-text-tertiary uppercase tracking-widest",children:"Every visit"}),t.sessions.map((r,s)=>o.jsx(Pse,{s:r},r.session_id||s))]})]})]})]})}function Uu(){return o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-border border-t-accent animate-spin"})})}function Dse(e,t,n){const r=y.useRef(null);function s(l){r.current=l}
679function i(l,c){if(l.preventDefault(),r.current===null||r.current===c)return;const u=[...e],[d]=u.splice(r.current,1);u.splice(c,0,d),r.current=c,n(u)}function a(){r.current=null}return{onDragStart:s,onDragOver:i,onDragEnd:a,getKey:t}}const Ose="w-full bg-bg border border-border rounded px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent transition-colors";function Mse({value:e}){const[t,n]=y.useState(!1);async function r(){await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)}return o.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-bg-tertiary transition-colors",title:"Copy link",children:t?o.jsx(yt,{size:13,className:"text-success"}):o.jsx(Nr,{size:13,className:"text-text-tertiary"})})}function Rse(){const[e,t]=y.useState([]),[n,r]=y.useState(null),[s,i]=y.useState(!0),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[d,h]=y.useState(!1),[f,p]=y.useState(null),[m,x]=y.useState(!1),[w,g]=y.useState(8),[b,_]=y.useState(""),[k,T]=y.useState(!1),[N,C]=y.useState(!1),S=Sf(),[I,E]=y.useState(""),[j,P]=y.useState(!1),[L,z]=y.useState([]);y.useEffect(()=>{Promise.all([G.portfolio.get().catch(()=>null),G.projects.list(),G.userProfile.get().catch(()=>null),G.portfolio.versions.list().catch(()=>null)]).then(([J,ue,Ne,Ie])=>{if(Ie&&p(Ie),t(ue),r(Ne),Ne&&(g(Ne.max_portfolio_projects??8),_(Ne.portfolio_bio_instructions??"")),J){E(J.slug??""),P(J.is_public??!1);const Pe=J.project_ids??[],Ue=ue.map(Ye=>Ye.project_id),ot=[...Pe,...Ue.filter(Ye=>!Pe.includes(Ye))];z(ot)}else z(ue.map(Pe=>Pe.project_id));i(!1)})},[]);const R={linkedin:(n==null?void 0:n.linkedin_url)??"",github:(n==null?void 0:n.github_url)??"",email:(n==null?void 0:n.alt_email)??"",phone:(n==null?void 0:n.phone)??""};async function B(){if(I.trim()){l(!0);try{await G.portfolio.save({slug:I.trim(),links:R,project_ids:L.slice(0,w),is_public:j}),u(!0),setTimeout(()=>u(!1),2500),S.success("Portfolio saved")}catch(J){(J instanceof Error?J.message:"Save failed").includes("already taken")?S.error("That URL is taken â try a different one."):S.error("Couldn't save portfolio. Check your connection and try again.")}finally{l(!1)}}}async function O(){if(I.trim()){h(!0);try{await G.portfolio.save({slug:I.trim(),links:R,project_ids:L.slice(0,w),is_public:j}),S.success("Portfolio regenerated")}catch{S.error("Couldn't regenerate portfolio. Try again.")}finally{h(!1)}}}async function U(){const J=!j;if(P(J),!!I.trim()){l(!0);try{await G.portfolio.save({slug:I.trim(),links:R,project_ids:L.slice(0,w),is_public:J})}catch{P(!J),S.error("Couldn't update visibility. Try again.")}finally{l(!1)}}}const H=L.slice(0,w).map(J=>e.find(ue=>ue.project_id===J)).filter(Boolean),{onDragStart:A,onDragOver:q,onDragEnd:V}=Dse(H,J=>J.project_id,J=>z(J.map(ue=>ue.project_id)));async function D(){T(!0);try{await G.userProfile.update({max_portfolio_projects:w,portfolio_bio_instructions:b||void 0}),C(!0),setTimeout(()=>{C(!1)},1200)}finally{T(!1)}}const te=I?`${window.location.origin}/p/${I}`:null;return s?o.jsx(Uu,{}):o.jsxs(o.Fragment,{children:[m&&o.jsx(zM,{onClose:()=>x(!1)}),o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-8 flex flex-col gap-6",children:[o.jsxs("div",{className:"flex items-center justify-between gap-4",children:[o.jsx("div",{children:o.jsx("p",{className:"text-sm text-text-tertiary",children:"A public page you can share with employers."})}),o.jsxs("div",{className:"flex items-center gap-2",children:[te&&o.jsxs("a",{href:te,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-accent hover:underline",children:[o.jsx(ha,{size:12}),"Preview"]}),o.jsx("button",{onClick:O,disabled:d||!I.trim(),title:"Regenerate about section",className:"p-1.5 rounded hover:bg-bg-tertiary transition-colors disabled:opacity-40",children:o.jsx(ju,{size:14,className:`text-text-tertiary ${d?"animate-spin":""}`})}),o.jsx(jt,{onClick:B,disabled:a||!I.trim(),children:a?o.jsx(ow,{}):c?o.jsxs(o.Fragment,{children:[o.jsx(yt,{size:13})," Saved"]}):"Save"})]})]}),o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-sm text-text-tertiary shrink-0",children:[window.location.origin,"/p/"]}),o.jsx("input",{className:`${Ose} flex-1`,placeholder:"your-name",value:I,onChange:J=>E(J.target.value.toLowerCase().replace(/[^a-z0-9_-]/g,""))}),te&&o.jsx(Mse,{value:te})]}),o.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-border bg-bg-secondary px-4 py-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-text font-medium",children:j?"Public":"Private"}),o.jsx("p",{className:"text-xs text-text-tertiary mt-0.5",children:j?"Anyone with the link can view this.":"Only you can see this."})]}),o.jsxs("button",{onClick:U,disabled:a,className:`flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full border transition-colors ${j?"border-accent text-accent bg-accent/10":"border-border text-text-tertiary hover:border-accent hover:text-accent"}`,children:[j?o.jsx(ev,{size:13}):o.jsx(nH,{size:13}),j?"Visible":"Hidden"]})]}),o.jsxs("p",{className:"text-xs text-text-tertiary",children:["Headline, about, and contact links are pulled from your"," ",o.jsx("a",{href:"/settings",className:"text-accent hover:underline",children:"Settings"})," automatically."]})]}),f&&f.total_views>0&&o.jsxs("button",{onClick:()=>x(!0),className:"w-full rounded-lg border border-border bg-bg-secondary px-4 py-3 flex items-center justify-between hover:bg-bg-tertiary transition-colors group",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ev,{size:13,className:"text-text-tertiary"}),o.jsxs("div",{className:"flex items-baseline gap-1.5",children:[o.jsx("span",{className:"text-lg font-semibold text-text tabular-nums",children:f.total_views}),o.jsx("span",{className:"text-xs text-text-tertiary",children:f.total_views===1?"view":"views"})]})]}),o.jsx("span",{className:"text-xs text-text-tertiary group-hover:text-accent transition-colors",children:"See analytics â"})]}),o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:qt,children:["Projects (",H.length,")"]}),o.jsx("span",{className:"text-xs text-text-tertiary",children:"drag to reorder"})]}),H.length===0?o.jsx("p",{className:"text-sm text-text-tertiary text-center py-8",children:"No projects yet. Add some in Stories."}):o.jsx("div",{className:"flex flex-col gap-1.5",children:H.map((J,ue)=>o.jsxs("div",{draggable:!0,onDragStart:()=>A(ue),onDragOver:Ne=>q(Ne,ue),onDragEnd:V,className:"flex items-center gap-2 rounded-lg px-3 py-2.5 bg-bg-secondary border border-border
679cursor-grab active:cursor-grabbing",children:[o.jsx(Tf,{size:13,className:"text-text-tertiary shrink-0"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text truncate",children:J.name}),J.description&&o.jsx("p",{className:"text-xs text-text-tertiary truncate mt-0.5",children:J.description})]})]},J.project_id))})]}),o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx("label",{className:qt,children:"Generation Settings"}),o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary p-4 space-y-4",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("label",{className:"text-xs text-text-secondary",children:"Max projects in generated link"}),o.jsx("span",{className:"text-xs font-medium text-text",children:w})]}),o.jsx("input",{type:"range",min:2,max:12,step:1,value:w,onChange:J=>g(Number(J.target.value)),className:"w-full accent-accent"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs text-text-secondary",children:"Bio instructions"}),o.jsx("textarea",{rows:3,value:b,onChange:J=>_(J.target.value),placeholder:"e.g. Keep it concise. Focus on AI and product work. Skip anything telecom-related.",className:"w-full text-xs bg-bg border border-border rounded-lg px-3 py-2 text-text placeholder:text-text-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50 resize-none"})]}),o.jsx("div",{className:"flex justify-end",children:o.jsx(jt,{size:"sm",onClick:D,disabled:k,children:N?o.jsxs(o.Fragment,{children:[o.jsx(yt,{size:13})," Saved"]}):k?"Savingâ¦":"Save"})})]})]})]})]})}const Lse={resumes:{name:"résumé generations",proLimit:"200/month"},portfolios:{name:"portfolio generations",proLimit:"200/month"},prep_decks:{name:"prep decks",proLimit:"40/month"}};function Kv({feature:e,onClose:t}){const[n,r]=y.useState(!1),[s,i]=y.useState(null),a=Lse[e]??{name:e};y.useEffect(()=>{G.billing.status().then(i).catch(()=>{})},[]);async function l(){r(!0);try{const{url:c}=await G.billing.checkout(`${window.location.origin}/settings?upgraded=1`,`${window.location.origin}${window.location.pathname}`);window.location.href=c}finally{r(!1)}}return o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[o.jsx("div",{className:CV,onClick:t}),o.jsxs("div",{className:"relative z-10 w-full max-w-sm rounded-2xl border border-border bg-bg-secondary shadow-xl p-6 flex flex-col gap-4",children:[o.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-1 rounded hover:bg-bg transition-colors text-text-tertiary hover:text-text",children:o.jsx(mt,{size:15})}),(s==null?void 0:s.plan)==="pro"?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center",children:o.jsx(po,{size:18,className:"text-accent"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-text",children:"Monthly limit reached"}),o.jsxs("p",{className:"text-xs text-text-tertiary mt-0.5",children:["You've used all your ",a.name," this month"]})]})]}),o.jsxs("p",{className:"text-xs text-text-secondary",children:["Your quota resets at the start of your next billing period. Check your usage in"," ",o.jsx("a",{href:"/settings",className:"text-accent underline underline-offset-2",children:"Settings"}),"."]}),o.jsx(jt,{variant:"ghost",size:"sm",onClick:t,className:"w-full",children:"Got it"})]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-accent/10 flex items-center justify-center",children:o.jsx(po,{size:18,className:"text-accent"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-text",children:"Upgrade to Pro"}),o.jsxs("p",{className:"text-xs text-text-tertiary mt-0.5",children:["You've used your free ",a.name]})]})]}),o.jsx("div",{className:"rounded-xl border border-border bg-bg p-4 space-y-2.5",children:[{label:"Résumé generations",value:"200/month"},{label:"Portfolio generations",value:"200/month"},{label:"Prep decks",value:"40/month"}].map(({label:c,value:u})=>o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-text-secondary",children:c}),o.jsx("span",{className:"text-xs font-medium text-accent",children:u})]},c))}),o.jsxs("div",{className:"flex items-baseline gap-1",children:[o.jsx("span",{className:"text-2xl font-bold text-text",children:"$9"}),o.jsx("span",{className:"text-sm text-text-tertiary",children:"/month"})]}),o.jsx(jt,{variant:"primary",size:"md",loading:n,onClick:l,className:"w-full",children:"Upgrade to Pro"}),o.jsx("p",{className:"text-2xs text-text-tertiary text-center",children:"Cancel anytime. No hidden fees."})]})]})]})}function Qv({text:e,children:t,disabled:n=!1,delay:r=1e3,className:s}){const[i,a]=y.useState(null),l=y.useRef(),c=y.useRef(null),u=()=>{n||(l.current=setTimeout(()=>{c.current&&a(c.current.getBoundingClientRect())},r))},d=()=>{clearTimeout(l.current),a(null)};return o.jsxs("div",{ref:c,className:`relative inline-flex${s?` ${s}`:""}`,onMouseEnter:u,onMouseLeave:d,children:[t,i&&Er.createPortal(o.jsx("div",{style:{position:"fixed",top:i.top-4,left:i.left+i.width/2,transform:"translate(-50%, -100%)",zIndex:9999},className:"px-2 py-1 rounded bg-bg-tertiary border border-border text-2xs text-text-secondary whitespace-nowrap pointer-events-none",children:e}),document.body)]})}
679function ej({value:e,onChange:t,instanceId:n="main"}){const r=[{id:"resume",label:"Resume",icon:Rr},{id:"qa",label:"Q&A",icon:Cu},{id:"portfolio",label:"Portfolio",icon:kf}];return o.jsx("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg border border-border bg-bg-secondary",children:r.map(s=>{const i=e===s.id,a=s.icon;return o.jsxs("button",{onClick:()=>t(s.id),className:re("relative flex-1 flex items-center justify-center gap-1.5 h-7 rounded text-xs font-medium transition-colors",i?"text-text":"text-text-tertiary hover:text-text"),children:[i&&o.jsx(se.div,{layoutId:`mode-indicator-${n}`,className:"absolute inset-0 bg-bg rounded shadow-sm ring-1 ring-border/60",style:{zIndex:0},transition:{type:"spring",stiffness:400,damping:35}}),o.jsx(a,{size:12,className:"relative z-10"}),o.jsx("span",{className:"relative z-10",children:s.label})]},s.id)})})}const tj=8e3,Fse=7e3;function Bse({resumeType:e,resumeTypes:t,autoClassified:n,classifying:r,onSelect:s}){var h,f;const[i,a]=y.useState(!1),l=y.useRef(null);y.useEffect(()=>{if(!i)return;const p=m=>{l.current&&!l.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[i]);const c=e==="auto",u=n?((h=t.find(p=>p.type_key===n.type_key))==null?void 0:h.label)??n.type_key:null,d=c?r?"â¦":u??"Auto":((f=t.find(p=>p.type_key===e))==null?void 0:f.label)??e;return o.jsxs("div",{ref:l,className:"relative",children:[o.jsxs("button",{onClick:()=>a(p=>!p),className:re("flex items-center gap-1 text-2xs px-2 py-1 rounded-full border backdrop-blur-sm transition-colors whitespace-nowrap",c&&!n?"border-border/40 bg-bg/60 text-text-tertiary/60 hover:text-text-tertiary":"border-accent/60 bg-accent/15 text-accent-text"),children:[c&&o.jsx("span",{className:"opacity-60",children:"Auto"}),c&&u&&!r&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"opacity-40",children:"·"}),o.jsx("span",{children:u})]}),!c&&o.jsx("span",{children:d}),o.jsx(tn,{size:9,className:"opacity-50"})]}),i&&o.jsxs("div",{className:"absolute bottom-full mb-1 left-0 bg-bg border border-border rounded-lg shadow-lg overflow-hidden z-50 min-w-[110px]",children:[o.jsxs("button",{onClick:()=>{s("auto"),a(!1)},className:re("w-full text-left text-2xs px-3 py-1.5 flex items-center gap-2 hover:bg-bg-secondary transition-colors",c?"text-accent-text":"text-text-secondary"),children:[o.jsx("span",{className:"flex-1",children:"Auto"}),c&&o.jsx(yt,{size:10})]}),t.map(p=>o.jsxs("button",{onClick:()=>{s(p.type_key),a(!1)},className:re("w-full text-left text-2xs px-3 py-1.5 flex items-center gap-2 hover:bg-bg-secondary transition-colors",e===p.type_key?"text-accent-text":"text-text-secondary"),children:[o.jsx("span",{className:"flex-1",children:p.label}),e===p.type_key&&o.jsx(yt,{size:10})]},p.type_key))]})]})}function Use(){const[e,t]=y.useState(null),[n,r]=y.useState(null),[s,i]=y.useState(!1),[a,l]=y.useState(null),c=y.useRef(null),u=y.useRef(null),d=y.useCallback(async()=>{try{const p=localStorage.getItem("auth_token")||"",m=await fetch("/api/profile/signature",{headers:{Authorization:`Bearer ${p}`}});if(!m.ok){t(!1),r(null);return}const x=await m.blob();u.current&&URL.revokeObjectURL(u.current);const w=URL.createObjectURL(x);u.current=w,r(w),t(!0)}catch{t(!1),r(null)}},[]);y.useEffect(()=>(d(),()=>{u.current&&URL.revokeObjectURL(u.current)}),[d]);const h=async p=>{i(!0),l(null);try{await G.userProfile.uploadSignature(p),await d()}catch(m){l(m instanceof Error?m.message:"Upload failed")}finally{i(!1)}},f=async()=>{i(!0),l(null);try{await G.userProfile.deleteSignature(),t(!1),r(null)}catch(p){l(p instanceof Error?p.message:"Remove failed")}finally{i(!1)}};return o.jsxs("div",{children:[o.jsx("p",{className:re(qt,"mb-3"),children:"Signature"}),o.jsx("p",{className:"text-2xs text-text-tertiary mb-3",children:"Used on cover letters. Upload a photo or we'll render your name in a script font."}),a&&o.jsx("p",{className:"text-2xs text-error mb-2",children:a}),o.jsxs("div",{className:"space-y-3",children:[e&&n?o.jsxs("div",{className:"border border-border rounded-lg p-3 bg-bg-secondary flex items-center justify-between gap-3",children:[o.jsx("div",{className:"bg-white rounded px-3 py-2 inline-flex",children:o.jsx("img",{src:n,alt:"Your signature",className:"h-10 w-auto object-contain"})}),o.jsx("button",{onClick:f,disabled:s,className:"text-2xs text-error hover:text-error/80 transition-colors shrink-0",children:"Remove"})]}):o.jsx("div",{className:"border border-dashed border-border rounded-lg p-3 bg-bg-secondary text-center",children:o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"No signature â cover letters will use your name in script font"})}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>{var p;return(p=c.current)==null?void 0:p.click()},disabled:s,className:"text-2xs text-accent hover:text-accent-text transition-colors disabled:opacity-50",children:s?"Uploadingâ¦":e?"Replace":"Upload signature"}),o.jsx("input",{ref:c,type:"file",accept:"image/png,image/jpeg,image/webp,image/heic,image/heif",className:"hidden",onChange:p=>{var x;const m=(x=p.target.files)==null?void 0:x[0];m&&h(m),p.target.value=""}})]}),o.jsx("p",{className:"text-2xs text-text-tertiary/60 italic leading-relaxed",children:"Tip: for best results sign with a dark pen on plain white paper in good lighting, then snap a photo. We'll auto-convert to black & white and crop the whitespace."})]})]})}const Ly="pave_resume_settings_cache",Fy="pave_resume_types_cache",nj="pave_projects_cache",$se="pave_roles_cache";function Dp(e){try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}function yd(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function rj(e){var t,n,r,s,i,a,l,c,u,d,h,f,p;return{display_name:((t=e.profile)==null?void 0:t.display_name)??"",phone:((n=e.profile)==null?void 0:n.phone)??"",location:((r=e.profile)==null?void 0:r.location)??"",linkedin_url:((s=e.profile)==null?void 0:s.linkedin_url)??"",github_url:((i=e.profile)==null?void 0:i.github_url)??"",website_url:((a=e.profile)==null?void 0:a.website_url)??"",resume_email:((l=e.profile)==null?void 0:l.resume_email)??"primary",alt_email:((c=e.profile)==null?void 0:c.alt_email)??"",resume_org_prefs:((u=e.profile)==null?void 0:u.resume_org_prefs)??{},resume_role_prefs:((d=e.profile)==null?void 0:d.resume_role_prefs)??{},resume_type_labels:((h=e.profile)==null?void 0:h.resume_type_labels)??{},resume_bullet_counts:((f=e.profile)==null?void 0:f.resume_bullet_counts)??{},resume_org_excludes:((p=e.profile)==null?void 0:p.resume_org_excludes)??{}}}
679function zse({open:e,onClose:t,authEmail:n}){const[r,s]=y.useState(()=>Dp(Ly)),[i,a]=y.useState(()=>{const N=Dp(Ly);return N?rj(N):{}}),[l,c]=y.useState("DEFAULT"),[u,d]=y.useState(()=>Dp(Fy)??[]),[h,f]=y.useState(()=>Dp(nj)??[]),[p,m]=y.useState(!1),x=y.useRef(null),w=y.useRef(null);function g(){m(!0),w.current&&clearTimeout(w.current),w.current=setTimeout(()=>m(!1),1500)}y.useEffect(()=>{e&&(G.resumeTypes.list().then(N=>{d(N),yd(Fy,N)}),G.projects.list().then(N=>{f(N),yd(nj,N)}),Promise.all([G.resumeSettings.get(),G.roles.list()]).then(([N,C])=>{const S=z=>C.filter(R=>R.org_id===z).reduce((R,B)=>B.start_date>R?B.start_date:R,""),I=[...N.orgs.filter(z=>z.sort_order!=null)].sort((z,R)=>(z.sort_order??0)-(R.sort_order??0)),E=[...N.orgs.filter(z=>z.sort_order==null)].sort((z,R)=>S(R.org_id).localeCompare(S(z.org_id))),j=[...I,...E],P=j.filter(z=>z.sort_order==null);if(P.length>0){const z=I.reduce((B,O)=>Math.max(B,O.sort_order??0),0),R=I.length>0?Math.ceil((z+1)/1e3)*1e3:0;P.forEach((B,O)=>{G.orgs.update(B.org_id,{sort_order:R+O*1e3}).catch(()=>{})})}const L={...N,orgs:j,roles:C};s(L),a(rj(N)),yd(Ly,L),yd($se,C)}))},[e]),y.useEffect(()=>{if(!e)return;function N(C){C.key==="Escape"&&t()}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[e,t]);function b(N){const C={...i,...N};a(C),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>{G.userProfile.update(C).then(()=>g()).catch(S=>{console.warn("Settings autosave failed:",S)})},600)}function _(N,C){const S=(i.resume_org_excludes??{})[N]??[],I=S.includes(C)?S.filter(E=>E!==C):[...S,C];b({resume_org_excludes:{...i.resume_org_excludes??{},[N]:I}})}const k=(r==null?void 0:r.orgs)??[],T=(r==null?void 0:r.roles)??[];return o.jsx(He,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 z-40 bg-black/30 backdrop-blur-[2px]",onClick:t},"backdrop"),o.jsxs(se.div,{initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.97},transition:{duration:.15,ease:"easeOut"},className:"fixed z-50 inset-x-4 sm:inset-x-0 sm:w-[480px] mx-auto top-[5vh] sm:top-[10vh] max-h-[90vh] sm:max-h-[80vh] bg-bg border border-border rounded-xl shadow-2xl overflow-hidden flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-3.5 border-b border-border shrink-0",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(k4,{size:13,className:"text-text-secondary"}),o.jsx("span",{className:"text-xs font-semibold text-text",children:"Resume settings"})]}),o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("span",{className:re("text-2xs text-success transition-opacity duration-300",p?"opacity-100":"opacity-0"),children:"Saved"}),o.jsx("button",{onClick:t,className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:14})})]})]}),o.jsxs("div",{className:"overflow-y-auto flex-1 p-5 space-y-6",children:[o.jsxs("div",{children:[o.jsx("p",{className:re(qt,"mb-3"),children:"Contact"}),o.jsxs("div",{className:"space-y-0",children:[[{icon:o.jsx(Rr,{size:12}),label:"Name",field:"display_name",placeholder:"Full name"},{icon:o.jsx(bH,{size:12}),label:"Phone",field:"phone",placeholder:"+1 (555) 000-0000"},{icon:o.jsx(cH,{size:12}),label:"LinkedIn",field:"linkedin_url",placeholder:"linkedin.com/in/handle"},{icon:o.jsx(sH,{size:12}),label:"GitHub",field:"github_url",placeholder:"github.com/handle"},{icon:o.jsx(kf,{size:12}),label:"Website",field:"website_url",placeholder:"yoursite.com"}].map(({icon:N,label:C,field:S,placeholder:I})=>o.jsxs("div",{className:"flex items-center gap-3 py-2.5 border-b border-border-subtle last:border-0",children:[o.jsx("div",{className:"w-4 shrink-0 text-text-tertiary",children:N}),o.jsx("label",{className:"text-xs text-text-tertiary w-16 shrink-0",children:C}),o.jsx("input",{type:"text",value:i[S]??"",onChange:E=>b({[S]:E.target.value}),placeholder:I,className:"flex-1 text-xs bg-transparent text-text placeholder:text-text-tertiary/40 focus:outline-none"})]},S)),o.jsxs("div",{className:"flex items-start gap-3 py-2.5",children:[o.jsx("div",{className:"w-4 shrink-0 text-text-tertiary text-xs mt-0.5",children:"@"}),o.jsx("label",{className:"text-xs text-text-tertiary w-16 shrink-0 mt-0.5",children:"Email"}),o.jsxs("div",{className:"flex-1 space-y-1.5",children:[o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"gs_email",checked:(i.resume_email??"primary")==="primary",onChange:()=>b({resume_email:"primary"}),className:"accent-accent"}),o.jsx("span",{className:"text-xs text-text",children:n}),o.jsx("span",{className:"text-2xs text-text-tertiary",children:"(primary)"})]}),o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[o.jsx("input",{type:"radio",name:"gs_email",checked:i.resume_email==="alt",onChange:()=>b({resume_email:"alt"}),className:"accent-accent"}),o.jsx("input",{type:"email",value:i.alt_email??"",onChange:N=>b({alt_email:N.target.value}),placeholder:"[email protected]",className:"text-xs bg-transparent text-text placeholder:text-text-tertiary/40 focus:outline-none border-b border-border-subtle flex-1"})]})]})]})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("p",{className:qt,children:"Resume types"}),o.jsx("button",{onClick:async()=>{const N=await G.resumeTypes.create({label:"New type"});d(C=>[...C,N]),c(N.type_key)},className:"text-2xs text-accent hover:text-accent-text transition-colors",children:"+ New type"})]}),o.jsx("div",{className:"space-y-1",children:u.map(N=>{const C=l===N.type_key,S=(i.resume_org_excludes??{})[N.type_key]??[],I=(i.resume_bullet_counts??{})[N.type_key]??{},E=async j=>{const P=await G.resumeTypes.update(N.type_key,j);d(L=>{const z=L.map(R=>R.type_key===N.type_key?P:R);return yd(Fy,z),z}),g()};return o.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[o.jsxs("button",{onClick:()=>c(C?null:N.type_key),className:"w-full flex items-center justify-between px-3.5 py-2.5 hover:bg-bg-secondary transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2.5",children:[o.jsx("span",{className:"text-2xs font-mono text-text-tertiary bg-bg-active px-1.5 py-0.5 rounded",children:N.is_builtin?"DEFAULT":N.type_key}),o.jsx("span",{className:"text-xs font-medium text-text",children:N.label})]}),o.jsx(se.div,{animate:{rotate:C?180:0},transition:{duration:.15},children:o.jsx(tn,{size:13,className:"text-text-tertiary"})})]}),o.jsx(He,{initial:!1,children:C&&o.jsx(se.div,{initial:{height:0,opacity:0}
679,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15,ease:"easeInOut"},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-3.5 pt-1 space-y-3 border-t border-border",children:[o.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[o.jsx("span",{className:"text-2xs text-text-tertiary w-24 shrink-0",children:"Label"}),o.jsx("input",{type:"text",defaultValue:N.label,onBlur:j=>j.target.value!==N.label&&E({label:j.target.value}),className:"flex-1 text-xs bg-bg border border-border rounded px-2 py-1 text-text focus:outline-none focus:border-border-focus"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-2xs text-text-tertiary w-24 shrink-0",children:"Pages"}),o.jsx("div",{className:"flex gap-1",children:[1,2,3,4].map(j=>o.jsx("button",{onClick:()=>E({page_count:j}),className:re("text-2xs px-2.5 py-1 rounded border transition-colors",N.page_count===j?"border-accent/60 bg-accent/15 text-accent-text":"border-border text-text-tertiary hover:text-text"),children:j},j))})]}),o.jsx(qse,{orgs:k,roles:T,excludedOrgIds:S,excludedRoleIds:N.excluded_roles??[],titleOverrides:N.title_overrides??{},bulletCounts:I,onToggleOrg:j=>_(N.type_key,j),onToggleRole:j=>{const P=N.excluded_roles??[];E({excluded_roles:P.includes(j)?P.filter(L=>L!==j):[...P,j]})},onTitleOverride:(j,P)=>{const L={...N.title_overrides??{}};P?L[j]=P:delete L[j],E({title_overrides:L})},onBulletCount:(j,P)=>{const z={...(i.resume_bullet_counts??{})[N.type_key]??{}};P==null?delete z[j]:z[j]=P,b({resume_bullet_counts:{...i.resume_bullet_counts??{},[N.type_key]:z}})},onReorderOrgs:j=>{s(P=>{if(!P)return P;const L=Object.fromEntries(P.orgs.map(B=>[B.org_id,B])),z=j.map(B=>L[B]).filter(Boolean),R=P.orgs.filter(B=>B.org_type&&!Xv.has(B.org_type));return{...P,orgs:[...z,...R]}}),j.forEach((P,L)=>{G.orgs.update(P,{sort_order:L*1e3}).catch(z=>console.warn("sort_order save failed:",z))}),g()}}),o.jsx(Yse,{projectAvailable:h.map(j=>({id:j.project_id,label:j.name})),pinnedProjects:N.pinned_projects??[],excludedProjects:N.excluded_projects??[],onChangeProjects:j=>E({pinned_projects:j}),onChangeExcluded:j=>E({excluded_projects:j})}),o.jsx(Hse,{sections:N.sections??[],onChange:j=>E({sections:j})}),o.jsx(sj,{label:"When to use",hint:"helps auto-select the right type",hasValue:!!N.description,children:o.jsx("input",{type:"text",defaultValue:N.description??"",onBlur:j=>{const P=j.target.value;P!==(N.description??"")&&E({description:P})},placeholder:'e.g. "Forward Deployed Engineer, Solutions Engineerâ¦"',className:"w-full bg-bg border border-border rounded-lg px-3 py-2 text-xs text-text placeholder:text-text-tertiary/60 focus:outline-none focus:border-border-focus transition-colors"})}),o.jsx(sj,{label:"Custom instructions",hint:"injected at generation time",hasValue:!!N.custom_instructions,children:o.jsx("textarea",{defaultValue:N.custom_instructions??"",onBlur:j=>{const P=j.target.value;P!==(N.custom_instructions??"")&&E({custom_instructions:P})},placeholder:'e.g. "Always write in first person. Emphasize cross-functional leadership."',rows:3,className:"w-full bg-bg border border-border rounded-lg px-3 py-2 text-xs text-text placeholder:text-text-tertiary/60 resize-none focus:outline-none focus:border-border-focus transition-colors"})}),!N.is_builtin&&o.jsx("div",{className:"pt-1",children:o.jsx("button",{onClick:async()=>{confirm(`Delete resume type "${N.label}"?`)&&(await G.resumeTypes.delete(N.type_key),d(j=>j.filter(P=>P.type_key!==N.type_key)))},className:"text-2xs text-error hover:text-error/80 transition-colors",children:"Delete type"})})]})})})]},N.type_key)})})]}),o.jsx(Use,{})]})]},"panel")]})})}function sj({label:e,hint:t,hasValue:n,children:r}){const[s,i]=y.useState(!1);return o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("button",{onClick:()=>i(a=>!a),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(tn,{size:11,className:re("transition-transform",s&&"rotate-180")}),e,t&&!s&&o.jsxs("span",{className:"text-text-tertiary/50",children:["â ",t]}),!s&&n&&o.jsx("span",{className:"ml-1 w-1.5 h-1.5 rounded-full bg-accent/60 inline-block"})]}),o.jsx(He,{initial:!1,children:s&&o.jsx(se.div,{initial:{height:0,opacity:0}
679,animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:r})})]})}function Hse({sections:e,onChange:t}){const[n,r]=y.useState(!1),s=e.filter(i=>!i.enabled).length;return o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("button",{onClick:()=>r(i=>!i),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(tn,{size:11,className:re("transition-transform",n&&"rotate-180")}),"Sections",!n&&s>0&&o.jsxs("span",{className:"ml-1 px-1.5 rounded-full bg-bg-active text-2xs text-text-secondary",children:[s," off"]})]}),o.jsx(He,{initial:!1,children:n&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:o.jsx(Vse,{sections:e,onChange:t})})})]})}const Wse={summary:"Summary",education:"Education",work:"Experience",projects:"Projects",skills:"Skills",credentials:"Credentials"};function Vse({sections:e,onChange:t}){const[n,r]=y.useState(e);y.useEffect(()=>{r(e)},[e]);const s=i=>{r(i),t(i)};return o.jsx(dx,{axis:"y",values:n,onReorder:s,className:"space-y-1",children:n.map(i=>o.jsxs(hx,{value:i,className:"flex items-center gap-2 px-2 py-1.5 rounded border border-border bg-bg-secondary cursor-grab active:cursor-grabbing",children:[o.jsx(Tf,{size:11,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"text-2xs font-mono text-text-tertiary w-20 shrink-0",children:Wse[i.kind]??i.kind}),o.jsx("input",{type:"text",defaultValue:i.label,onBlur:a=>{a.target.value!==i.label&&s(n.map(l=>l.kind===i.kind?{...l,label:a.target.value}:l))},className:"flex-1 min-w-0 text-xs bg-transparent text-text focus:outline-none placeholder:text-text-tertiary/50",placeholder:"Section label"}),o.jsx("button",{onClick:()=>s(n.map(a=>a.kind===i.kind?{...a,enabled:!a.enabled}:a)),className:re("text-2xs px-2 py-0.5 rounded border transition-colors shrink-0",i.enabled?"border-accent/60 bg-accent/15 text-accent-text":"border-border text-text-tertiary hover:text-text"),children:i.enabled?"On":"Off"})]},i.kind))})}const Xv=new Set(["company","nonprofit","research","club","military","sports","creative","open_source","religious","other"]);function qse({orgs:e,roles:t,excludedOrgIds:n,excludedRoleIds:r,titleOverrides:s,bulletCounts:i,onToggleOrg:a,onToggleRole:l,onTitleOverride:c,onBulletCount:u,onReorderOrgs:d}){const[h,f]=y.useState(new Set),p=g=>f(b=>{const _=new Set(b);return _.has(g)?_.delete(g):_.add(g),_});if(e.length===0)return o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"No organizations yet."});const m=e.filter(g=>!g.org_type||Xv.has(g.org_type)),x=e.filter(g=>g.org_type&&!Xv.has(g.org_type)),w=g=>({org:g,roles:t.filter(b=>b.org_id===g.org_id),orgExcluded:n.includes(g.org_id),excludedRoleIds:r,titleOverrides:s,bulletCounts:i,expanded:h.has(g.org_id),onToggleExpand:()=>p(g.org_id),onToggleOrg:()=>a(g.org_id),onToggleRole:l,onTitleOverride:c,onBulletCount:u});return o.jsxs("div",{className:"space-y-3",children:[m.length>0&&o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-2xs text-text-tertiary pb-0.5",children:"Work history"}),o.jsx(dx,{axis:"y",values:m,onReorder:g=>d(g.map(b=>b.org_id)),className:"space-y-1",children:m.map(g=>o.jsx(ij,{draggable:!0,...w(g)},g.org_id))})]}),x.length>0&&o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:"text-2xs text-text-tertiary pb-0.5",children:"Education"}),x.map(g=>o.jsx(ij,{draggable:!1,...w(g)},g.org_id))]})]})}function ij({org:e,draggable:t,roles:n,orgExcluded:r,excludedRoleIds:s,titleOverrides:i,bulletCounts:a,expanded:l,onToggleExpand:c,onToggleOrg:u,onToggleRole:d,onTitleOverride:h,onBulletCount:f}){const p=p4(),m=n,x=m.length>0,w=m.filter(b=>s.includes(b.role_id)||i[b.role_id]||a[b.role_id]).length,g=o.jsxs("div",{className:re("rounded-lg border transition-colors",r?"border-border/40 opacity-50":"border-border"),children:[o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[t&&o.jsx(Tf,{size:11,onPointerDown:b=>p.start(b),className:"shrink-0 text-text-tertiary/30 hover:text-text-tertiary cursor-grab active:cursor-grabbing touch-none"}),o.jsx("button",{onClick:u,title:r?"Include org":"Exclude org",className:re("shrink-0 w-3.5 h-3.5 rounded border-2 transition-colors",r?"border-border bg-transparent":"border-accent bg-accent")}),o.jsx("span",{className:re("flex-1 text-xs font-medium truncate",r?"text-text-tertiary line-through":"text-text"),children:e.name}),!r&&x&&o.jsxs("button",{onClick:c,className:"shrink-0 flex items-center gap-1 text-2xs text-text-tertiary/60 hover:text-text-tertiary transition-colors",children:[w>0&&!l&&o.jsx("span",{className:"px-1 rounded-full bg-bg-active text-2xs text-text-secondary",children:w}),o.jsx(tn,{size:11,className:re("transition-transform",l&&"rotate-180")}
679)]})]}),o.jsx(He,{initial:!1,children:!r&&x&&l&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.12},className:"overflow-hidden",children:o.jsx("div",{className:"border-t border-border/60 px-2.5 py-1.5 space-y-1.5",children:m.map(b=>{const _=s.includes(b.role_id),k=a[b.role_id]??null;return o.jsxs("div",{className:re("flex items-center gap-2",_&&"opacity-40"),children:[o.jsx("button",{onClick:()=>d(b.role_id),title:_?"Include role":"Exclude role",className:re("shrink-0 w-2.5 h-2.5 rounded-sm border transition-colors",_?"border-border bg-transparent":"border-accent/60 bg-accent/40")}),o.jsx("span",{className:re("flex-1 text-2xs truncate",_?"text-text-tertiary line-through":"text-text"),children:b.title}),!_&&o.jsxs(o.Fragment,{children:[o.jsx(Qv,{text:"Bullet count",children:o.jsxs("div",{className:re("shrink-0 flex items-center gap-0.5 rounded border overflow-hidden",k==null?"border-border":"border-accent/40 bg-accent/10"),children:[o.jsx("button",{onClick:()=>k!=null&&f(b.role_id,k>1?k-1:null),disabled:k==null,className:re("px-1.5 py-0.5 text-xs leading-none transition-colors",k==null?"text-text-tertiary/20 cursor-default":"text-accent-text hover:bg-accent/20"),children:"â"}),o.jsx("span",{className:re("w-6 text-center text-2xs tabular-nums",k==null?"text-text-tertiary/50":"text-accent-text"),children:k??"auto"}),o.jsx("button",{onClick:()=>f(b.role_id,k==null?3:Math.min(8,k+1)),className:re("px-1.5 py-0.5 text-xs leading-none transition-colors",k==null?"text-text-tertiary/50 hover:text-text-tertiary":"text-accent-text hover:bg-accent/20"),children:"+"})]})}),o.jsx(Qv,{text:"Title override",children:o.jsx("input",{type:"text",defaultValue:i[b.role_id]??"",placeholder:"overrideâ¦",onBlur:T=>h(b.role_id,T.target.value.trim()),className:"w-24 shrink-0 text-2xs bg-bg border border-border rounded px-1.5 py-0.5 text-text placeholder:text-text-tertiary/30 focus:outline-none focus:border-border-focus"})})]})]},b.role_id)})})})})]});return t?o.jsx(hx,{value:e,dragListener:!1,dragControls:p,className:"list-none",children:g}):o.jsx("div",{children:g})}function Yse({projectAvailable:e,pinnedProjects:t,excludedProjects:n,onChangeProjects:r,onChangeExcluded:s}){const[i,a]=y.useState(!1),[l,c]=y.useState(""),[u,d]=y.useState(t),[h,f]=y.useState(n);y.useEffect(()=>{d(t)},[t]),y.useEffect(()=>{f(n)},[n]);const p=C=>{d(C),r(C)},m=C=>{const S=h.includes(C)?h.filter(I=>I!==C):[...h,C];f(S),s(S)},x=Object.fromEntries(e.map(C=>[C.id,C.label])),w=e.filter(C=>!u.includes(C.id)),g=new ps(w,{keys:["label"],threshold:.35,ignoreLocation:!0}),b=new ps(u.map(C=>({id:C,label:x[C]??""})),{keys:["label"],threshold:.35,ignoreLocation:!0}),_=l,k=_?g.search(_).map(C=>C.item):w,T=_?b.search(_).map(C=>C.item.id):u,N=u.length+h.length;return o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("button",{onClick:()=>a(C=>!C),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(tn,{size:11,className:re("transition-transform",i&&"rotate-180")}),"Projects",!i&&N>0&&o.jsx("span",{className:"ml-1 px-1.5 rounded-full bg-bg-active text-2xs text-text-secondary",children:N})]}),o.jsx(He,{initial:!1,children:i&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:o.jsxs("div",{className:"pt-1 space-y-2",children:[o.jsxs("div",{className:"relative",children:[o.jsx(nw,{size:11,className:"absolute left-2 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"}),o.jsx("input",{value:l,onChange:C=>c(C.target.value),placeholder:"Search projectsâ¦",className:"pl-6 pr-2 py-1 text-2xs rounded border border-border bg-bg-secondary text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus w-full transition-all"})]}),o.jsxs("div",{className:"space-y-2 max-h-48 overflow-y-auto pr-1",children:[T.length>0&&o.jsx(dx,{axis:"y",values:u,onReorder:p,className:"space-y-1",children:T.map(C=>o.jsxs(hx,{value:C,className:"flex items-center gap-2 px-2 py-1.5 rounded border border-accent/40 bg-accent/5 cursor-grab active:cursor-grabbing",children:[o.jsx(Tf,{size:11,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"flex-1 min-w-0 text-xs text-text truncate",children:x[C]??C}),o.jsx("button",{onClick:()=>p(u.filter(S=>S!==C)),className:"text-text-tertiary hover:text-error transition-colors shrink-0",children:o.jsx(mt,{size:11})})]},C))}),k.length>0&&o.jsx("div",{className:"space-y-1",children:k.map(({id:C,label:S})=>{const I=h.includes(C);return o.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded border border-border bg-bg-secondary",children:[o.jsx("span",{className:"flex-1 min-w-0 text-xs text-text-tertiary truncate",children:S}),o.jsxs("div",{className:"flex items-center shrink-0",children:[o.jsx("button",{onClick:()=>p([...u,C]),title:"Pin to top",className:"p-0.5 rounded-l border border-border text-text-tertiary hover:text-accent hover:bg-accent/10 transition-colors",children:o.jsx(us,{size:10})}),o.jsx("button",{onClick:()=>m(C),title:I?"Remove exclusion":"Exclude from this resume type",className:re("p-0.5 rounded-r border-t border-b border-r border-border transition-colors",I?"text-error bg-error/10":"text-text-tertiary hover:text-error hover:bg-error/10"),children:o.jsx(pH,{size:10})})]})]},C)})}),e.length===0&&o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"No projects yet."}),e.length>0&&_&&T.length===0&&k.length===0&&o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"No matches."})]}),o.jsx("p",{className:"text-2xs text-text-tertiary/70 italic pt-1",children:"Pinned always appear first. Excluded are hidden from the Projects section but still inform work experience bullets."})]})})})]})}function Gse({company:e,role:t,confident:n,onConfirm:r}){const[s,i]=y.useState(e),[a,l]=y.useState(t),[c,u]=y.useState(!n);return c?o.jsxs(se.div,{initial:{opacity:0,y:-4}
679,animate:{opacity:1,y:0},className:"rounded-lg border border-warning/40 bg-warning/5 px-3 py-2.5 space-y-2",children:[!n&&o.jsxs("div",{className:"flex items-center gap-1.5 text-2xs text-warning",children:[o.jsx(Gh,{size:11}),"Couldn't extract company or role â please confirm"]}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("input",{value:a,onChange:d=>l(d.target.value),placeholder:"Job title",className:"flex-1 min-w-0 rounded border border-border bg-bg px-2 py-1 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus"}),o.jsx("input",{value:s,onChange:d=>i(d.target.value),placeholder:"Company name",className:"flex-1 min-w-0 rounded border border-border bg-bg px-2 py-1 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus"}),o.jsxs("button",{onClick:()=>{r(s,a),u(!1)},className:"shrink-0 flex items-center gap-1 px-2 py-1 rounded-lg bg-accent text-bg text-xs font-medium hover:bg-accent-hover transition-colors",children:[o.jsx(yt,{size:11})," Save"]})]})]}):o.jsxs(se.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},className:"flex items-center justify-between gap-2 rounded-lg border border-border bg-bg-secondary px-3 py-2",children:[o.jsxs("div",{className:"text-xs text-text-secondary truncate",children:[o.jsx("span",{className:"font-medium text-text",children:t||"â"}),e&&o.jsxs("span",{className:"text-text-tertiary",children:[" @ ",e]})]}),o.jsx("button",{onClick:()=>u(!0),className:"shrink-0 text-text-tertiary hover:text-text",children:o.jsx(w4,{size:11})})]})}function Kse({text:e}){const[t,n]=y.useState(!1),r=async()=>{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)};return o.jsxs("button",{onClick:r,className:"flex items-center gap-1 px-2 py-1 rounded text-2xs text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:[t?o.jsx(yt,{size:11,className:"text-success"}):o.jsx(Nr,{size:11}),t?"Copied":"Copy"]})}const Qse=Rte;function Xse({item:e}){return o.jsxs(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},className:"rounded-lg border border-border bg-bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-2.5 border-b border-border-subtle bg-bg-tertiary/40",children:[o.jsx("p",{className:re(qt,"mb-0.5"),children:"Question"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed whitespace-pre-wrap",children:e.question})]}),o.jsxs("div",{className:"px-4 py-3 space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Si,{size:11,className:"text-accent"}),o.jsx("span",{className:qt,children:"Answer"})]}),o.jsx(Kse,{text:e.answer})]}),o.jsx(mo,{remarkPlugins:[Dx],components:Qse,children:e.answer})]})]})}function Jse(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[s,i]=y.useState(null),[a,l]=y.useState(null),[c,u]=y.useState(!1);y.useEffect(()=>{Promise.all([G.portfolio.get().catch(()=>null),G.portfolio.versions.list().catch(()=>null)]).then(([f,p])=>{i(f),t(p),r(!1)})},[]);const d=window.location.origin;if(n)return o.jsx(Uu,{});if(!s||!e)return o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center gap-2",children:[o.jsx("p",{className:"text-sm text-text-secondary",children:"No portfolio yet"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Set one up in Portfolio"})]});const h=`${d}/p/${s.slug}`;return o.jsxs(o.Fragment,{children:[c&&o.jsx(zM,{onClose:()=>u(!1)}),o.jsxs("div",{className:"h-[calc(100dvh-3rem)] flex flex-col",children:[o.jsxs("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-border shrink-0",children:[o.jsx(kf,{size:13,className:"text-text-tertiary"}),o.jsx("span",{className:"text-xs font-medium text-text",children:"Portfolio links"}),e.total_views>0&&o.jsxs("span",{className:"text-xs text-text-tertiary/60 ml-1",children:[e.total_views," view",e.total_views!==1?"s":""]}),o.jsxs("button",{onClick:()=>u(!0),className:"ml-auto flex items-center gap-1.5 text-xs text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(sy,{size:12}),"Analytics"]})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 flex flex-col gap-2",children:[o.jsxs("div",{className:"rounded-lg border border-border bg-bg-secondary px-4 py-3 flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text font-medium truncate",children:h}),o.jsx("p",{className:"text-xs text-text-tertiary mt-0.5",children:"Public portfolio"})]}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[e.base_views>0&&o.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(sy,{size:10}),e.base_views,"v"]}),o.jsx("button",{onClick:()=>navigator.clipboard.writeText(h),className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(Nr,{size:13,className:"text-text-tertiary"})}),o.jsx("a",{href:h,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(ha,{size:13,className:"text-text-tertiary"})})]})]}),e.versions.length>0&&o.jsx("div",{className:"rounded-lg border border-border bg-bg-secondary px-3 py-1",children:e.versions.map(f=>{const p=`${h}/${f.token}`;return o.jsxs("div",{className:"flex items-center gap-3 py-2 border-b border-border last:border-0",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text truncate",children:f.label||"Untitled ver
679sion"}),f.jd_summary&&o.jsx("p",{className:"text-xs text-text-tertiary truncate mt-0.5",children:f.jd_summary.slice(0,80)})]}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[f.views>0&&o.jsxs("button",{onClick:()=>u(!0),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(sy,{size:10}),f.views,"v"]}),o.jsx("button",{onClick:()=>navigator.clipboard.writeText(p),className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(Nr,{size:13,className:"text-text-tertiary"})}),o.jsx("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(ha,{size:13,className:"text-text-tertiary"})}),a===f.token?o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:async()=>{await G.portfolio.versions.delete(f.token),t(m=>m&&{...m,versions:m.versions.filter(x=>x.token!==f.token)}),l(null)},className:"p-1 rounded hover:bg-bg-tertiary transition-colors text-error text-2xs font-medium",children:"Confirm"}),o.jsx("button",{onClick:()=>l(null),className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(mt,{size:13,className:"text-text-tertiary"})})]}):o.jsx("button",{onClick:()=>l(f.token),className:"p-1 rounded hover:bg-bg-tertiary transition-colors",children:o.jsx(Yn,{size:13,className:"text-text-tertiary"})})]})]},f.token)})}),e.versions.length===0&&o.jsx("p",{className:"text-xs text-text-tertiary text-center py-4",children:"No tailored versions yet â create one in Portfolio"})]})]})]})}function Zse(){var Hu;const{user:e}=Cl(),{isNewUser:t}=Mf(),n=Yt(),[r,s]=y.useState("resume"),[i,a]=y.useState(""),[l,c]=y.useState("auto"),[u,d]=y.useState(null),[h,f]=y.useState(!1),p=y.useRef(null),m=y.useRef(0),[x,w]=y.useState(null),g=y.useRef(null),b=y.useRef([]),{data:_=[]}=wt({queryKey:["resumeTypes"],queryFn:()=>G.resumeTypes.list()});y.useEffect(()=>{_.length>0&&l!=="auto"&&!_.some(ke=>ke.type_key===l)&&c(_[0].type_key)},[_,l]),y.useEffect(()=>{G.applications.list().then(ke=>{b.current=ke}).catch(()=>{})},[]);const k=y.useCallback(async ke=>{if(!ke.trim()||l!=="auto")return;const ut=++m.current;f(!0);try{const er=await G.resumeTypes.classify(ke);ut===m.current&&d(er)}catch{}finally{ut===m.current&&f(!1)}},[l]),T=y.useCallback(ke=>{if(p.current&&clearTimeout(p.current),!ke.trim()){m.current++,f(!1),d(null);return}l==="auto"&&(ke.length>200?k(ke):p.current=setTimeout(()=>k(ke),800))},[l,k]),N=y.useCallback((ke,ut)=>{const er=new Set(["the","a","an","and","or","of","to","in","for","with","is","are","you","we","our","your","this","that","will","be"]),dt=new Set((ke.toLowerCase().match(/[a-z0-9]+/g)??[]).filter(Qt=>!er.has(Qt)&&Qt.length>2));let Cn=null;for(const Qt of ut){if(!Qt.job_description)continue;const Dl=new Set((Qt.job_description.toLowerCase().match(/[a-z0-9]+/g)??[]).filter(ys=>!er.has(ys)&&ys.length>2)),zf=[...dt].filter(ys=>Dl.has(ys)).length,Hf=new Set([...dt,...Dl]).size,Wu=Hf>0?zf/Hf:0;Wu>=.5&&(!Cn||Wu>Cn.sim)&&(Cn={company:Qt.company_name??"",role:Qt.job_title??"",appliedAt:Qt.applied_at??Qt.created_at,sim:Wu,appId:Qt.id})}w(Cn?{company:Cn.company,role:Cn.role,appliedAt:Cn.appliedAt,appId:Cn.appId}:null)},[]),C=y.useCallback(ke=>{if(g.current&&clearTimeout(g.current),ke.trim().length<200){w(null);return}ke.length>200?b.current.length?N(ke,b.current):G.applications.list().then(ut=>{b.current=ut,N(ke,ut)}).catch(()=>{}):g.current=setTimeout(()=>{b.current.length?N(ke,b.current):G.applications.list().then(ut=>{b.current=ut,N(ke,ut)}).catch(()=>{})},600)},[N]),[S,I]=y.useState(!1),[E,j]=y.useState(!0),[P,L]=y.useState(!1),[z,R]=y.useState(!1),[B,O]=y.useState("all"),[U,H]=y.useState(null),[A,q]=y.useState(null),[V,D]=y.useState(null),[te,J]=y.useState(!1),{steps:ue,result:Ne,streaming:Ie,error:Pe,paywallFeature:Ue,clearPaywall:ot,insufficientContent:Ye,clearInsufficientContent:ae,start:Ge,cancel:nt}=$M(),{data:De=[],isLoading:Gt}=wt({queryKey:["applications"],queryFn:()=>G.applications.list(),enabled:z}),Lt=Gt&&De.length===0,[St,rn]=y.useState(""),[Kt,sn]=y.useState(0),le=y.useRef(null);y.useEffect(()=>{if(r!=="qa"||St.length>0)return;const ke=setInterval(()=>sn(ut=>ut+1),4500);return()=>clearInterval(ke)},[r,St.length]),y.useEffect(()=>{const ke=le.current;ke&&(ke.style.height="auto",ke.style.height=`${ke.scrollHeight}px`)},[St]);const[Fn,It]=y.useState([]),[Z,de]=y.useState([]),[Re,Ve]=y.useState(!1),[Je,Ft]=y.useState(null),[Et,fn]=y.useState(!1),[K,ge]=y.useState(null),[Te,lt]=y.useState(null),[bt,wn]=y.useState(!1),[Se,Ae]=y.useState(null),Le=async()=>
679{if(!(!i.trim()||Et)){j(!1),fn(!0),ge(null),lt(null),R(!1);try{const ke=await G.portfolio.get();if(!ke){ge("No portfolio set up yet â configure one in Portfolio settings first.");return}const ut=await G.portfolio.versions.create({jd_text:i}),er=`${window.location.origin}/p/${ke.slug}/${ut.token}`;lt({token:ut.token,label:ut.label,url:er})}catch(ke){const ut=ke==null?void 0:ke.detail;(ut==null?void 0:ut.code)==="quota_exceeded"&&ut.feature?Ae(ut.feature):ge(ke instanceof Error?ke.message:"Failed to generate link")}finally{fn(!1)}}},rt=l==="auto"?(u==null?void 0:u.type_key)??((Hu=_[0])==null?void 0:Hu.type_key)??"DEFAULT":l,an=i.length,qe=an>tj,ya=i.trim().length<150,ba=!ya&&!Ie&&!qe,Ii=ya?"Paste the full job description (150+ chars) for best results":qe?"Job description is too long":null,Ls=St.trim().length>0&&!Re,Fs=ue.length>0||Ne!==null||Ie||V!==null,Uf=Fn.length>0,va=()=>{H(null),q(null),R(!1),D(null),j(!1),J(!1),Ge(i,rt,S,"claude-haiku-4-5-20251001",void 0,Ne==null?void 0:Ne.job_id)},Il=async()=>{if(!Ls)return;j(!1),Ve(!0),Ft(null);const ke=St.trim(),ut=[...Z,{role:"user",content:ke}];try{const er=await G.qa(ke,i,rt,Z);de([...ut,{role:"assistant",content:er.answer}]),It(dt=>[{id:crypto.randomUUID(),question:ke,answer:er.answer,at:Date.now()},...dt]),rn("")}catch(er){Ft(er.message)}finally{Ve(!1)}},$f=ke=>{ke.key==="Enter"&&(ke.metaKey||ke.ctrlKey)&&(ke.preventDefault(),Il())},Pl=Ne??(V?{job_id:V.job_id,resume_url:G.applications.resumeUrl(V.job_id),cover_letter_url:V.cover_letter_gcs_path?G.applications.coverLetterUrl(V.job_id):null,cover_letter_plain_text:V.cover_letter_plain_text??"",company_name:V.company_name,role_name:V.job_title,confident:!0}:null),Pi=Pl?{...Pl,company_name:U??Pl.company_name,role_name:A??Pl.role_name}:null;return o.jsxs("div",{className:"h-[calc(100dvh-3rem)] flex flex-col sm:flex-row",children:[Ue&&o.jsx(Kv,{feature:Ue,onClose:ot}),Se&&o.jsx(Kv,{feature:Se,onClose:()=>Ae(null)}),o.jsx(zse,{open:P,onClose:()=>L(!1),authEmail:(e==null?void 0:e.email)??""}),o.jsxs("div",{className:re("sm:w-[420px] shrink-0 sm:border-r sm:border-b-0 border-border sm:[border-right-color:#3d3830] flex flex-col",Fs||Ie?"border-b":""),children:[o.jsx("div",{className:"hidden sm:block p-5 border-b border-border",children:o.jsx(ej,{value:r,onChange:s,instanceId:"desktop"})}),o.jsxs("div",{className:"flex-1 flex flex-col gap-4 p-5 overflow-y-auto",children:[o.jsx("div",{className:"sm:hidden",children:o.jsx(ej,{value:r,onChange:s,instanceId:"mobile"})}),o.jsxs("div",{className:"flex flex-col space-y-1.5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Job description"}),o.jsxs("div",{className:"flex items-center gap-1",children:[i.length>0&&o.jsxs("button",{onClick:()=>j(ke=>!ke),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors mr-1",children:[E?"Collapse":"Edit",o.jsx(tn,{size:12,className:re("transition-transform duration-200",E?"":"-rotate-90")})]}),o.jsx("button",{onClick:()=>R(ke=>!ke),className:`w-7 h-7 flex items-center justify-center rounded border transition-colors ${z?"border-accent/50 bg-accent/10 text-accent":"border-border text-text-tertiary hover:text-text hover:bg-bg-secondary"}`,title:"History",children:o.jsx(mg,{size:13})}),o.jsx("button",{onClick:()=>L(!0),className:"w-7 h-7 flex items-center justify-center rounded border border-border text-text-tertiary hover:text-text hover:bg-bg-secondary transition-colors",title:"Settings",children:o.jsx(k4,{size:13})})]})]}),o.jsx(He,{initial:!1,children:!E&&i.length>0?o.jsx(se.button,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2,ease:"easeInOut"},onClick:()=>j(!0),className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2.5 text-left overflow-hidden",children:o.jsx("p",{className:"text-xs text-text-tertiary truncate",children:i.slice(0,120)})},"collapsed"):o.jsxs(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2,ease:"easeInOut"},className:"relative flex flex-col",children:[o.jsx("textarea",{value:i,onChange:ke=>{a(ke.target.value),T(ke.target.value),C(ke.target.value)},placeholder:r==="resume"?"Paste the full job description hereâ¦":"Paste the job description for more tailored answersâ¦",className:re("w-full rounded-lg border bg-bg-secondary pb-10","min-h-[200px]","text-sm text-text placeholder:text-text-tertiary","px-3 py-3 resize-none leading-relaxed","border-border focus:border-border-focus focus:outline-none","focus:ring-1 focus:ring-accent/30 transition-colors duration-150"),autoFocus:i.length===0&&typeof window<"u"&&window.innerWidth>=640}),o.jsxs("div",{className:"absolute bottom-2.5 left-2.5 right-2.5 flex items-center justify-between pointer-events-none",children:[o.jsxs("div",{className:"flex items-center gap-1.5 pointer-events-auto flex-wrap",children:[_.length>0&&o.jsx(Bse,{resumeType:l,resumeTypes:_,autoClassified:u,classifying:h,onSelect:ke=>{c(ke),ke==="auto"&&T(i)}}),o.jsxs("span",{className:re("text-2xs px-1.5 py-0.5 rounded-full",qe?"text-error":an>Fse?"text-warning":"text-text-tertiary"),children:[an.toLocaleStr
679ing(),"/",tj.toLocaleString()]})]}),o.jsx("div",{className:"flex items-center gap-1.5 pointer-events-auto",children:r==="resume"&&o.jsxs("button",{onClick:()=>I(ke=>!ke),className:re("flex items-center gap-1 text-2xs px-2 py-1 rounded-full border backdrop-blur-sm transition-colors",S?"border-accent/60 bg-accent/15 text-accent-text":"border-border/80 bg-bg/80 text-text-tertiary hover:text-text"),children:[o.jsx(Rr,{size:9}),"Cover letter"]})})]})]},"expanded")}),x&&!Ie&&!Ne&&o.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded border border-yellow-500/15",children:[o.jsx(Gh,{size:11,className:"text-yellow-500/60 shrink-0"}),o.jsxs("p",{className:"text-xs text-text-tertiary flex-1 min-w-0",children:["Already applied to"," ",o.jsxs("a",{href:`/pipeline?app=${x.appId}`,className:"text-text hover:underline",children:[x.company,x.role?` â ${x.role}`:""]})," · ",new Date(x.appliedAt).toLocaleDateString("en-US",{month:"short",day:"numeric"})]}),o.jsx("button",{onClick:()=>w(null),className:"shrink-0 text-text-tertiary/40 hover:text-text-tertiary transition-colors",children:o.jsx(mt,{size:11})})]}),E&&r==="resume"&&i.trim().length<40&&i.length>0&&o.jsx("p",{className:"text-2xs text-text-tertiary",children:"Paste more context for better results"})]})]}),o.jsxs("div",{className:"p-4 border-t border-border space-y-3",children:[r==="qa"&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Application question"}),o.jsxs("div",{className:"relative",children:[St.length===0&&o.jsx("div",{className:"pointer-events-none absolute left-3 right-3 top-2 overflow-hidden",children:o.jsx(He,{mode:"wait",initial:!1,children:o.jsx(se.span,{initial:{y:8,opacity:0,filter:"blur(4px)"},animate:{y:0,opacity:1,filter:"blur(0px)"},exit:{y:-8,opacity:0,filter:"blur(4px)"},transition:{duration:.45,ease:[.22,1,.36,1]},className:"block text-sm text-text-tertiary leading-relaxed",children:Ry[Kt%Ry.length]},Kt%Ry.length)})}),o.jsx("textarea",{ref:le,value:St,onChange:ke=>rn(ke.target.value),onKeyDown:$f,rows:1,style:{minHeight:"2.5rem",maxHeight:"8rem"},className:re("w-full rounded-lg border bg-bg-secondary text-sm text-text","px-3 py-2 resize-none leading-relaxed overflow-y-auto","border-border focus:border-border-focus focus:outline-none","focus:ring-1 focus:ring-accent/30 transition-colors duration-150")})]})]}),r==="resume"?Ie?o.jsx(jt,{variant:"danger",className:"w-full",icon:o.jsx(T4,{size:12}),onClick:()=>{J(!0),nt()},children:"Cancel"}):o.jsx(Qv,{text:Ii??"",disabled:!Ii,delay:300,className:"w-full",children:o.jsx(jt,{variant:"primary",className:"w-full",disabled:!ba,icon:o.jsx(Ka,{size:13}),onClick:va,children:"Generate resume"})}):r==="portfolio"?o.jsx(jt,{variant:"primary",className:"w-full",loading:Et,disabled:!i.trim()||Et,icon:o.jsx(Ka,{size:13}),onClick:Le,children:"Generate portfolio link"}):o.jsx(jt,{variant:"primary",className:"w-full",loading:Re,disabled:!Ls,icon:o.jsx(Ka,{size:13}),onClick:Il,children:"Get answer"})]})]}),o.jsx("div",{className:re("flex-1 overflow-y-auto min-h-0",!Fs&&!Ie&&"hidden sm:block"),children:o.jsx(He,{mode:"wait",children:r==="portfolio"?o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:z?o.jsx(Jse,{}):Et?o.jsx("div",{className:"h-[calc(100dvh-6rem)] flex items-center justify-center",children:o.jsx(Dg,{steps:[]})}):Te?o.jsxs("div",{className:"p-6 flex flex-col gap-4 max-w-2xl",children:[o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:qt,children:"Tailored portfolio link"}),Te.label&&o.jsx("p",{className:"text-lg font-medium text-text",children:Te.label})]}),o.jsxs("div",{className:"rounded-lg border border-border bg-bg-secondary px-4 py-3 flex items-center gap-3",children:[o.jsx("p",{className:"flex-1 text-sm text-text truncate font-mono",children:Te.url}),o.jsx("button",{onClick:()=>{navigator.clipboard.writeText(Te.url),wn(!0),setTimeout(()=>wn(!1),2e3)},className:"shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded border border-border text-xs text-text-tertiary hover:text-text hover:bg-bg-tertiary transition-colors",children:bt?o.jsxs(o.Fragment,{children:[o.jsx(yt,{size:12,className:"text-success"})," Copied"]}):o.jsxs(o.Fragment,{children:[o.jsx(Nr,{size:12})," Copy"]})}),o.jsx("a",{href:Te.url,target:"_blank",rel:"noopener noreferrer",className:"shrink-0 p-1.5 rounded border border-border text-text-tertiary hover:text-text hover:bg-bg-tertiary transition-colors",children:o.jsx(ha,{size:13})})]}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"This is a unique link â projects are AI-ordered for this role. Share it directly with the employer."}),o.jsx("button",{onClick:()=>lt(null),className:"text-xs text-accent hover:underline self-start",children:"â Back to portfolio settings"})]}):K?o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"rounded-lg border border-error/30 bg-error/5 px-4 py-3 text-sm text-error",children:K})}):o.jsx(Rse,{})},z?"portfolio-history-pane":Te?"portfolio-result":"portfolio-pane"):r==="resume"?o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:z?(()=>{const ke={all:De.length,done:De.filter(dt=>dt.status==="done").length,error:De.filter(dt=>dt.status==="error").length},ut=B==="all"?De:De.filter(dt=>dt.status===B),er=[{id:"all",label:"All",count:ke.all},{id:"done",label:"Success",count:ke.done},{id:"error",label:"Errors",count:ke.error}];return o.jsxs("div",{className:"h-[calc(100dvh-3rem)] flex flex-col",children:[o.jsxs("div",{className:"flex items-center gap-2 px-5 py-3 border-b border-border shrink-0",children:[o.jsx(mg,{size:13,className:"text-text-tertiary"}),o.jsx("span",{className:"text-xs font-medium text-text",children:"History"}),o.jsx("span",{className:"text-xs text-text-tertiary/60 ml-1",children:De.length}),o.jsx("div",{className:"flex items-center gap-3 ml-auto",children:er.map(dt=>{const Cn=B===dt.id,Qt=dt.id!=="all"&&dt.count===0;return o.jsxs("button",{onClick:()=>!Qt&&O(dt.id),disabled:Qt,className:re("flex items-center gap-1 text-2xs transition-colors",Cn?"text-text font-medium":"text-text-tertiary hover:text-text-secondary",Qt&&"opacity-30 cursor-not-allowed"),children:[dt.label,dt.count>0&&o.jsx("span",{className:re("tabular-nums",Cn?"text-text-tertiary":"text-text-tertiary/50"),children:dt.count})]},dt.id)})})]}),o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},transition:{duration:.15},className:"flex-1 overflow-y-auto px-4 py-3",children:Lt?o.jsx(Uu,{}):De.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center gap-2",children:[o.jsx("p",{className:"text-sm text-text-secondary",children:"No applications yet"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Generate a resume to see it here"})]}):ut.length===0?o.jsx("div",{className:"flex flex-col items-center justify-center py-16 text-center gap-2",children:o.jsx("p",{className:"text-sm text-text-secondary",children:"No matching applications"})}):ut.map(dt=>o.jsx(lM,{app:dt,onSelect:Cn=>{D(Cn),H(null),q(null),R(!1)},onDelete:async Cn=>{await G.applications.delete(Cn),n.setQueryData(["applications"],Qt=>Qt&&Qt.filter(Dl=>Dl.job_id!==Cn))}},dt.job_id))},B)]})})():Fs?o.jsxs("div",{className:"p-6 space-y-4",children:[!te&&!Pe&&(Ie||ue.length>0&&!Pi)&&o.jsx("div",{className:"flex items-center justify-center min-h-[55dvh] sm:min-h-0 sm:h-[calc(100dvh-6rem)]",children:o.jsx(Dg,{steps:ue,error:Pe,includeCoverLetter:S})}),Ye&&o.jsxs(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"rounded-lg border border-warning/30 bg-warning/5 px-4 py-3 space-y-2",children:[o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx(Gh,{size:14,className:"text-warning shrink-0 mt-0.5"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:"Add some experience first"}),o.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:"You need at least one work role with a project or story before generating a résumé."})]}),o.jsx("button",{onClick:ae,className:"ml-auto shrink-0 text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:13})})]}),o.jsxs("a",{href:"/kb",className:"flex items-center gap-1.5 text-xs text-accent hover:text-accent/80 transition-colors font-medium pl-5",children:["Go to Knowledge Base ",o.jsx(Ka,{size:11})]})]}),Pe&&o.jsx(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"rounded-lg border border-error/30 bg-error/5 px-4 py-3 text-sm text-error",children:Pe}),Pi&&o.jsxs(o.Fragment,{children:[o.jsx("p",{className:qt,children:"Result"}),o.jsx(Gse,{company:U??Pi.company_name,role:A??Pi.role_name,confident:Pi.confident,onConfirm:(ke,ut)=>{H(ke),q(ut)}}),o.jsx(Nse,{result:Pi})]})]}):o.jsx("div",{className:"hidden sm:flex min-h-[calc(100dvh-6rem)] items-center justify-center",children:t?o.jsxs("div",{className:"flex flex-col items-center gap-5 text-center px-8",children:[o.jsx("div",{className:"w-12 h-12 rounded-xl bg-accent/10 flex items-center justify-center",children:o.jsx(Si,{size:20,className:"text-accent"})}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("p",{className:"text-sm font-medium text-text",children:"Add your experience first"}),o.jsx("p",{className:"text-xs text-text-tertiary leading-relaxed max-w-xs",children:"Pave needs your career history before it can generate tailored resumes. A 5-minute conversation is all it takes."})]}),o.jsxs(Eo,{to:"/chat?onboard=1",className:"flex items-center gap-2 px-5 py-2.5 rounded-xl bg-accent text-bg text-sm font-medium hover:opacity-90 transition-opacity",children:[o.jsx(X2,{size:14}),"Build my career history"]})]}):o.jsx("p",{className:"text-xs text-text-tertiary/40 select-none tracking-wide",children:"Your resume will appear here"})})},"resume-pane"):o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:!Uf&&!Re&&!Je?o.jsx("div",{className:"h-[calc(100dvh-3rem)] flex items-center justify-center",children:o.jsxs("div",{className:"text-center space-y-2",children:[o.jsx("div",{className:"w-12 h-12 rounded-xl bg-bg-secondary border border-border flex items-center justify-center mx-auto",children:o.jsx(Cu,{size:20,className:"text-text-tertiary"})}),o.jsx("p",{className:"text-sm text-text-secondary",children:"Application answers will appear here"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Ask a question â uses your KB and the job description"})]})}):o.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6 space-y-3",children:[Je&&o.jsx(se.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"rounded-lg border border-error/30 bg-error/5 px-4 py-3 text-sm text-error",children:Je}),Re&&o.jsxs(se.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-lg border border-border bg-bg-secondary px-4 py-3 flex items-center gap-3",children:[o.jsx(Si,{size:13,className:"text-accent animate-pulse"}),o.jsx("span",{className:"text-sm text-text-secondary",children:"Drafting your answerâ¦"})]}),o.jsx(He,{initial:!1,children:Fn.map(ke=>o.jsx(Xse,{item:ke},ke.id))})]})},"qa-pane")})})]})}function Og({icon:e,label:t,sublabel:n,action:r}){return o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 text-center px-6",children:[o.jsx("div",{className:"w-12 h-12 rounded-xl border border-border bg-bg-secondary flex items-center justify-center",children:o.jsx(e,{size:18,className:"text-text-tertiary"})}),o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("p",{className:"text-sm text-text-secondary font-medium",children:t}),n&&o.jsx("p",{className:"text-xs text-text-tertiary",children:n})]}),r&&o.jsx("div",{className:"mt-1",children:r})]})}function eie(){const e=Yt(),{data:t=[],isLoading:n}=wt({queryKey:["applications"],queryFn:()=>G.applications.list()}),r=n&&t.length===0,[s,i]=y.useState("all"),a=vn({mutationFn:h=>G.applications.delete(h),onSuccess:(h,f)=>{e.setQueryData(["applications"],p=>p&&p.filter(m=>m.job_id!==f))}}),l=y.useMemo(()=>({all:t.length,done:t.filter(h=>h.status==="done").length,error:t.filter(h=>h.status==="error").length}),[t]),c=y.useMemo(()=>s==="all"?t:t.filter(h=>h.status===s),[t,s]);async function u(h){await a.mutateAsync(h)}const d=[{id:"all",label:"All",count:l.all},{id:"done",label:"Success",count:l.done,icon:Jz},{id:"error",label:"Errors",count:l.error,icon:Gh}];return o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-6 sm:py-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[o.jsx("div",{className:"w-8 h-8 rounded-lg bg-bg-secondary border border-border flex items-center justify-center",children:o.jsx(mg,{size:15,className:"text-text-secondary"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-base font-semibold text-text",children:"Application History"}),o.jsxs("p",{className:"text-xs text-text-tertiary mt-0.5",children:[t.length," applications generated"]})]})]}),!r&&t.length>0&&o.jsx("div",{className:"flex items-center gap-1 mb-4",children:d.map(h=>{const f=s===h.id,p=h.icon,m=h.id!=="all"&&h.count===0;return o.jsxs("button",{onClick:()=>!m&&i(h.id),disabled:m,className:re("flex items-center gap-1.5 px-2.5 py-1 rounded-full text-2xs border transition-colors",f?"border-accent/40 bg-accent/10 text-accent-text":"border-border bg-bg-secondary text-text-tertiary hover:text-text",m&&"opacity-40 cursor-not-allowed hover:text-text-tertiary",h.id==="error"&&h.count>0&&!f&&"text-error/80"),children:[p&&o.jsx(p,{size:10}),h.label,o.jsx("span",{className:"text-text-tertiary",children:h.count})]},h.id)})}),r?o.jsx(Uu,{}):t.length===0?o.jsx(Og,{icon:Rr,label:"No applications yet",sublabel:"Generate a resume to see it here"}):c.length===0?o.jsx(Og,{icon:nw,label:"No matching applications",sublabel:"Try a different filter"}):o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},transition:{duration:.18},className:"",children:c.map(h=>o.jsx(lM,{app:h,onDelete:u},h.job_id))})]})}function bd({className:e}){return o.jsx("div",{className:`rounded bg-bg-secondary animate-pulse ${e??""}`})}function tie(){return o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-8 sm:py-14 space-y-12 sm:space-y-16",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx(bd,{className:"h-2.5 w-16"}),o.jsx(bd,{className:"h-12 w-full"}),o.jsx(bd,{className:"h-12 w-3/4"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(bd,{className:"h-2.5 w-16"}),[0,1,2].map(e=>o.jsx(bd,{className:"h-16 w-full"},e))]})]})}function aj(){const e=y.useRef(null),t=Tu(e,{once:!0,margin:"-40px"}),n=[{to:"/stories",icon:_4,label:"Stories",desc:"Browse your experiences"},{to:"/generate",icon:Rr,label:"Generate",desc:"Create a tailored resume"},{to:"/chat",icon:X2,label:"Chat",desc:"Add new stories via conversation"}];return o.jsxs("section",{ref:e,className:"space-y-4",children:[o.jsx(se.span,{initial:{opacity:0}
679,animate:t?{opacity:1}:{},transition:{duration:.4},className:"block text-2xs uppercase tracking-widest text-text-tertiary",children:"Get started"}),o.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:n.map(({to:r,icon:s,label:i,desc:a},l)=>o.jsx(se.div,{initial:{opacity:0,y:8},animate:t?{opacity:1,y:0}:{},transition:{duration:.3,delay:l*.07},className:"h-full",children:o.jsxs(Eo,{to:r,className:"h-full flex sm:flex-col flex-row items-center sm:items-start gap-3 sm:gap-2 p-4 rounded-lg border border-border hover:border-border-focus hover:bg-bg-secondary transition-all group",children:[o.jsx(s,{size:16,className:"text-text-tertiary group-hover:text-text transition-colors"}),o.jsxs("div",{children:[o.jsx("div",{className:"text-xs font-medium text-text",children:i}),o.jsx("div",{className:"text-2xs text-text-tertiary leading-relaxed mt-0.5",children:a})]})]})},r))})]})}function nie({synthesis:e,onRegenerate:t,regenerating:n,itemCount:r}){const[s,i]=y.useState(0),a=e.phrases;y.useEffect(()=>{if(a.length<=1)return;const u=setInterval(()=>i(d=>(d+1)%a.length),7e3);return()=>clearInterval(u)},[a.length]);const c=(a[s]??"").split(" ");return o.jsxs("section",{className:"space-y-5",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-2xs uppercase tracking-widest text-text-tertiary",children:"Overview"}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"text-xs text-text-tertiary",children:[r," projects"]}),o.jsx("button",{onClick:t,disabled:n,className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text transition-colors disabled:opacity-40",children:o.jsx(ju,{size:12,className:n?"animate-spin":""})})]})]}),o.jsx("div",{className:"min-h-[100px] flex items-start",children:o.jsx(He,{mode:"wait",children:o.jsx(se.h1,{initial:"hidden",animate:"visible",exit:{opacity:0,transition:{duration:.25}},variants:{visible:{transition:{staggerChildren:.13}},hidden:{}},className:"font-serif italic text-3xl sm:text-5xl text-text leading-tight tracking-tight",children:c.map((u,d)=>o.jsx(se.span,{variants:{hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.55,ease:"easeOut"}}},className:"inline-block mr-[0.22em]",children:u},d))},s)})}),a.length>1&&o.jsx("div",{className:"flex items-center gap-1.5",children:a.map((u,d)=>o.jsx("button",{onClick:()=>i(d),className:`w-1.5 h-1.5 rounded-full transition-colors ${d===s?"bg-text-secondary":"bg-border hover:bg-text-tertiary"}`},d))})]})}function rie({theme:e,projects:t,index:n}){const[r,s]=y.useState(!1),i=y.useRef(null),a=Tu(i,{once:!0,margin:"-40px"}),l=t.filter(c=>(e.project_ids??[]).includes(c.project_id)||(e.entry_ids??[]).includes(c.project_id));return o.jsxs(se.div,{ref:i,initial:{opacity:0,y:12},animate:a?{opacity:1,y:0}:{},transition:{duration:.4,ease:"easeOut",delay:n*.06},className:"border border-border rounded-lg overflow-hidden",children:[o.jsxs("button",{onClick:()=>s(c=>!c),className:"w-full flex items-start justify-between gap-4 px-4 py-3.5 text-left hover:bg-bg-secondary transition-colors",children:[o.jsxs("div",{className:"space-y-0.5 min-w-0",children:[o.jsx("div",{className:"text-sm font-medium text-text",children:e.name}),o.jsx("div",{className:"text-xs text-text-secondary leading-relaxed",children:e.summary})]}),o.jsx(se.div,{animate:{rotate:r?180:0},transition:{duration:.2},className:"shrink-0 mt-0.5",children:o.jsx(tn,{size:14,className:"text-text-tertiary"})})]}),o.jsx(He,{initial:!1,children:r&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.18,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("div",{className:"border-t border-border divide-y divide-border",children:l.length===0?o.jsx("p",{className:"px-4 py-3 text-xs text-text-tertiary",children:"No linked projects."}):l.map(c=>o.jsxs(Eo,{to:"/stories",className:"px-4 py-2.5 flex items-center gap-2 hover:bg-bg-hover transition-colors",children:[o.jsx(Z2,{size:11,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"text-xs text-text truncate flex-1",children:c.name})]},c.project_id))})})})]})}function sie({synthesis:e,projects:t}){const n=y.useRef(null),r=Tu(n,{once:!0,margin:"-40px"});return e.themes.length?o.jsxs("section",{ref:n,className:"space-y-4",children:[o.jsx(se.span,{initial:{opacity:0}
679,animate:r?{opacity:1}:{},transition:{duration:.4},className:"block text-2xs uppercase tracking-widest text-text-tertiary",children:"Themes"}),o.jsx("div",{className:"space-y-2",children:e.themes.map((s,i)=>o.jsx(rie,{theme:s,projects:t,index:i},s.name))})]}):null}function oj({steps:e}){const t=e.every(r=>r.done),n=e.findIndex(r=>!r.done);return t?null:o.jsxs(se.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{duration:.35,ease:"easeOut"},className:"rounded-xl border border-border bg-bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"px-4 py-3 border-b border-border flex items-center justify-between",children:[o.jsx("span",{className:"text-xs font-medium text-text",children:"Get set up"}),o.jsxs("span",{className:"text-2xs text-text-tertiary",children:[e.filter(r=>r.done).length," of ",e.length," done"]})]}),o.jsx("div",{className:"divide-y divide-border",children:e.map((r,s)=>{const i=s===n;return o.jsxs(Eo,{to:r.done?"#":r.href,onClick:a=>r.done&&a.preventDefault(),className:`flex items-center gap-3 px-4 py-3 transition-colors ${r.done?"opacity-50 cursor-default":i?"hover:bg-bg-active":"hover:bg-bg-hover opacity-60"}`,children:[o.jsxs("div",{className:`shrink-0 w-5 h-5 rounded-full border-2 flex items-center justify-center transition-colors ${r.done?"border-success bg-success/10":i?"border-accent":"border-border"}`,children:[r.done&&o.jsx("svg",{width:"9",height:"7",viewBox:"0 0 9 7",fill:"none",children:o.jsx("path",{d:"M1 3.5L3.5 6L8 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-success"})}),!r.done&&i&&o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent"})]}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:`text-xs font-medium ${r.done?"text-text-secondary":"text-text"}`,children:r.label}),o.jsx("p",{className:"text-2xs text-text-tertiary truncate",children:r.desc})]}),!r.done&&i&&o.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",className:"shrink-0 text-text-tertiary",children:o.jsx("path",{d:"M4.5 9L7.5 6L4.5 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]},r.label)})})]})}function iie(){var k,T;const e=Yt(),{isNewUser:t,kbLoaded:n}=Mf(),r=localStorage.getItem("auth_token"),{data:s,isLoading:i}=wt({queryKey:["home","synthesis"],staleTime:1e3*60*60*8,queryFn:async()=>{const N=await G.identity.synthesize().catch(C=>(console.warn("Identity synthesis failed:",C),null));return!N||N.phrases.length===0?G.identity.synthesize(!0).catch(C=>(console.warn("Identity synthesis (force) failed:",C),null)):N}}),{data:a}=wt({queryKey:["kb"],queryFn:()=>Promise.all([G.orgs.list(),G.roles.list(),G.projects.list(),G.stories.list()]).then(([N,C,S,I])=>({orgs:N,roles:C,projects:S,stories:I})),staleTime:3e4}),{data:l}=wt({queryKey:["user-profile"],queryFn:()=>G.userProfile.get(),staleTime:6e4}),{data:c}=wt({queryKey:["onboarding-state"],queryFn:()=>fetch("/api/onboarding/state",{headers:{Authorization:`Bearer ${r}`}}).then(N=>N.json()),staleTime:3e4}),u=[{label:"Basic info",desc:"Your name, phone, and links",done:!!(l!=null&&l.display_name&&(l!=null&&l.phone||l!=null&&l.linkedin_url)),href:"/chat?onboarding=1"},{label:"Roles & work history",desc:"Import your LinkedIn experience",done:(((k=a==null?void 0:a.roles)==null?void 0:k.length)??0)>0,href:"/chat?onboarding=1"},{label:"Work stories",desc:"3 specific moments from your career",done:(((T=a==null?void 0:a.stories)==null?void 0:T.length)??0)>=3,href:"/chat?onboarding=1"},{label:"Generate your resume",desc:"Put everything together",done:(c==null?void 0:c.step)==="complete",href:"/generate"}],d=u.some(N=>!N.done),{data:h=[],isLoading:f}=wt({queryKey:["projects"],staleTime:1e3*60*2,queryFn:()=>G.projects.list().catch(()=>[])}),p=i||f,m=vn({mutationFn:()=>G.identity.synthesize(!0),onSuccess:N=>{e.setQueryData(["home","synthesis"],N)}}),x=p&&!s&&h.length===0,w=m.isPending,g=()=>{m.mutate()};if(x||!n)return o.jsx(tie,{});const b=(c==null?void 0:c.step)==="complete"||!!(l!=null&&l.display_name)||localStorage.getItem("pave_onboarding_v1")==="complete";return t&&!b&&!window.location.search.includes("onboarding")?(window.location.replace("/chat?onboarding=1"),null):s&&s.phrases.length>0?o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-8 sm:py-14 space-y-12 sm:space-y-16",children:[o.jsx(nie,{synthesis:s,onRegenerate:g,regenerating:w,itemCount:h.length}),d&&o.jsx(oj,{steps:u}),o.jsx(sie,{synthesis:s,projects:h}),o.jsx(aj,{})]}):o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-8 sm:py-14 space-y-6",children:[o.jsxs(se.div,{initial:{opacity:0,y:12}
679,animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"space-y-2",children:[o.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary",children:"Getting started"}),o.jsx("h2",{className:"text-xl font-semibold text-text",children:"Complete your profile to unlock your overview."})]}),d&&o.jsx(oj,{steps:u}),o.jsx(aj,{})]})}function Oo({className:e}){return o.jsx("div",{className:`rounded bg-bg-secondary animate-pulse ${e??""}`})}function aie(){return o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-10 sm:py-16 space-y-20",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsx(Oo,{className:"h-3 w-24"}),o.jsx(Oo,{className:"h-14 w-full"}),o.jsx(Oo,{className:"h-14 w-4/5"})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(Oo,{className:"h-3 w-20"}),[0,1,2].map(e=>o.jsx(Oo,{className:"h-20 w-full"},e))]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx(Oo,{className:"h-3 w-24"}),o.jsx("div",{className:"flex gap-3",children:[0,1,2].map(e=>o.jsx(Oo,{className:"h-16 w-40"},e))})]})]})}function oie({synthesis:e,onRegenerate:t,regenerating:n}){const[r,s]=y.useState(0),i=e.phrases;y.useEffect(()=>{if(i.length<=1)return;const c=setInterval(()=>{s(u=>(u+1)%i.length)},7e3);return()=>clearInterval(c)},[i.length]);const l=(i[r]??"").split(" ");return o.jsxs("section",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-2xs uppercase tracking-widest text-text-tertiary",children:"Identity"}),o.jsxs("button",{onClick:t,disabled:n,className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text transition-colors disabled:opacity-40",children:[o.jsx(ju,{size:12,className:n?"animate-spin":""}),n?"Synthesizingâ¦":"Regenerate"]})]}),o.jsx("div",{className:"min-h-[120px] flex items-start",children:o.jsx(He,{mode:"wait",children:o.jsx(se.h1,{initial:"hidden",animate:"visible",exit:{opacity:0,transition:{duration:.25}},variants:{visible:{transition:{staggerChildren:.13}},hidden:{}},className:"font-serif italic text-3xl sm:text-5xl text-text leading-tight tracking-tight",children:l.map((c,u)=>o.jsx(se.span,{variants:{hidden:{opacity:0,y:10},visible:{opacity:1,y:0,transition:{duration:.55,ease:"easeOut"}}},className:"inline-block mr-[0.22em]",children:c},u))},r)})})]})}function lie({theme:e,index:t}){const[n,r]=y.useState(!1),s=y.useRef(null),i=Tu(s,{once:!0,margin:"-60px"});return o.jsx(se.div,{ref:s,initial:{opacity:0,y:16},animate:i?{opacity:1,y:0}:{},transition:{duration:.4,ease:"easeOut",delay:t*.06},className:"border border-border rounded-lg overflow-hidden",children:o.jsxs("button",{onClick:()=>r(a=>!a),className:"w-full flex items-start justify-between gap-4 px-5 py-4 text-left hover:bg-bg-secondary transition-colors",children:[o.jsxs("div",{className:"space-y-1 min-w-0",children:[o.jsx("div",{className:"text-sm font-medium text-text",children:e.name}),o.jsx("div",{className:"text-xs text-text-secondary leading-relaxed",children:e.summary})]}),o.jsx(se.div,{animate:{rotate:n?180:0},transition:{duration:.2},className:"shrink-0 mt-0.5",children:o.jsx(tn,{size:15,className:"text-text-tertiary"})})]})})}function cie({synthesis:e}){const t=y.useRef(null),n=Tu(t,{once:!0,margin:"-60px"});return e.themes.length?o.jsxs("section",{ref:t,className:"space-y-4",children:[o.jsx(se.span,{initial:{opacity:0}
679,animate:n?{opacity:1}:{},transition:{duration:.4},className:"block text-2xs uppercase tracking-widest text-text-tertiary",children:"Themes"}),o.jsx("div",{className:"space-y-2",children:e.themes.map((r,s)=>o.jsx(lie,{theme:r,index:s},r.name))})]}):null}function uie({synthesis:e,roles:t,orgs:n}){const[r,s]=y.useState(null),i=y.useRef(null),a=Tu(i,{once:!0,margin:"-60px"});if(!t.length)return null;const l=Object.fromEntries(n.map(d=>[d.org_id,d])),c=[...t].sort((d,h)=>{const f=d.start_date||"";return(h.start_date||"").localeCompare(f)}),u=r?e.arc_summaries[r]:null;return o.jsxs("section",{ref:i,className:"space-y-4",children:[o.jsx(se.span,{initial:{opacity:0},animate:a?{opacity:1}:{},transition:{duration:.4},className:"block text-2xs uppercase tracking-widest text-text-tertiary",children:"Career Arc"}),o.jsx("div",{className:"flex gap-2 overflow-x-auto pb-1 -mx-1 px-1",children:c.map((d,h)=>{var x,w;const f=l[d.org_id],p=((x=((f==null?void 0:f.name)??d.title)[0])==null?void 0:x.toUpperCase())??"?",m=r===d.role_id;return o.jsxs(se.button,{initial:{opacity:0,y:8},animate:a?{opacity:1,y:0}:{},transition:{duration:.3,delay:h*.05},onClick:()=>s(m?null:d.role_id),className:`shrink-0 flex items-center gap-2.5 px-3.5 py-2.5 rounded-lg border text-left transition-colors ${m?"border-accent/50 bg-accent-subtle":"border-border hover:border-border-focus hover:bg-bg-secondary"}`,children:[o.jsx("div",{className:"w-7 h-7 rounded-full bg-bg-active flex items-center justify-center text-xs font-medium text-text-secondary shrink-0",children:f!=null&&f.logo_url?o.jsx("img",{src:f.logo_url,alt:f.name,className:"w-full h-full rounded-full object-cover"}):p}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text truncate max-w-[140px]",children:d.title}),o.jsxs("div",{className:"text-2xs text-text-tertiary",children:[((w=d.start_date)==null?void 0:w.slice(0,4))??"",d.end_date?`â${d.end_date.slice(0,4)}`:"ânow"]})]})]},d.role_id)})}),o.jsx(He,{children:r&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("div",{className:"border border-border rounded-lg divide-y divide-border",children:u?o.jsx("div",{className:"px-5 py-4",children:o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:u})}):o.jsx("div",{className:"px-5 py-4",children:o.jsx("p",{className:"text-xs text-text-tertiary",children:"No summary for this role yet."})})})})})]})}function die(){const e=Yt(),{isNewUser:t}=Mf(),{data:n,isLoading:r,error:s}=wt({queryKey:["identity"],queryFn:async()=>{const[f,p,m]=await Promise.all([G.identity.synthesize(),G.roles.list(),G.orgs.list()]);return{synthesis:f,roles:p,orgs:m}}}),i=vn({mutationFn:()=>G.identity.synthesize(!0),onSuccess:f=>{e.setQueryData(["identity"],p=>p&&{...p,synthesis:f})}}),a=r&&!n,l=i.isPending,c=(n==null?void 0:n.synthesis)??null,u=(n==null?void 0:n.roles)??[],d=(n==null?void 0:n.orgs)??[],h=()=>{i.mutate()};return a?o.jsx(aie,{}):s?o.jsx("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-10 sm:py-16 text-sm text-error",children:s.message}):!c||!c.phrases.length?o.jsx(Og,{icon:Si,label:"Your identity isn't ready yet",sublabel:"Add stories and projects to generate your identity.",action:t?o.jsx(Eo,{to:"/chat?onboard=1",className:"text-xs text-accent hover:opacity-80 transition-opacity",children:"Start with Chat"}):void 0}):o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-10 sm:py-16 space-y-20",children:[o.jsx(oie,{synthesis:c,onRegenerate:h,regenerating:l}),o.jsx(cie,{synthesis:c}),o.jsx(uie,{synthesis:c,roles:u,orgs:d})]})}function hie(){return o.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"currentColor",children:o.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})})}function fie(){return o.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"
679currentColor",children:o.jsx("path",{d:"M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.509 11.509 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12z"})})}function pie(){return o.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}),o.jsx("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]})}function lj({open:e}){return o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`transition-transform duration-200 ${e?"rotate-180":""}`,children:o.jsx("path",{d:"m6 9 6 6 6-6"})})}function mie(e){return Object.entries(e).filter(([,n])=>typeof n=="string"||typeof n=="number").map(([n,r])=>{const s=String(r);let i=0;return/[$%Ãx]/.test(s)&&(i+=3),/\d/.test(s)&&(i+=2),s.length<20&&(i+=2),s.length<10&&(i+=1),/timeline|period|schedule|date|duration|cost|memory|timeout/.test(n)&&(i-=3),{label:n.replace(/_/g," "),value:s,score:i}}).sort((n,r)=>r.score-n.score).slice(0,3).map(({label:n,value:r})=>({label:n,value:r}))}function gie(e){const t=e.description;if(!t)return null;const n=t.split(new RegExp("(?<=[.!?])\\s+"));if(n.length<2)return null;const r=Math.ceil(n.length/3);return{problem:n.slice(0,r).join(" "),solution:n.slice(r,r*2).join(" "),outcome:n.slice(r*2).join(" ")}}function xie({project:e,index:t,slug:n}){var w,g;const[r,s]=y.useState(t===0),[i,a]=y.useState(!1),l=y.useRef(null),c=y.useRef(!1),u=e.facts||{},d=mie(u),h=gie(e),f=((w=e.description)==null?void 0:w.split(new RegExp("(?<=[.!?])\\s+"))[0])??"",p=new Set(d.map(b=>b.label.replace(/ /g,"_"))),m=Object.entries(u).filter(([b,_])=>!p.has(b)&&(typeof _=="string"||typeof _=="number")).slice(0,8);y.useEffect(()=>{const b=l.current;if(!b)return;const _=new IntersectionObserver(([k])=>{k.isIntersecting&&!c.current&&(c.current=!0,Ot==null||Ot.capture("portfolio_project_viewed",{slug:n,project:e.name,position:t}),_.disconnect())},{threshold:.5});return _.observe(b),()=>_.disconnect()},[n,e.name,t]);const x=()=>{const b=!r;s(b),b&&(Ot==null||Ot.capture("portfolio_project_expanded",{slug:n,project:e.name,position:t}))};return o.jsxs("div",{ref:l,className:"rounded-xl border border-border bg-bg-secondary overflow-hidden animate-fade-in",style:{animationDelay:`${t*50}ms`},children:[o.jsxs("button",{onClick:x,className:"w-full text-left p-6 flex flex-col gap-3 hover:bg-bg-tertiary/30 transition-colors",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsx("h3",{className:"font-serif text-lg text-text leading-snug",children:e.name}),o.jsx("span",{className:"text-text-tertiary mt-0.5 shrink-0",children:o.jsx(lj,{open:r})})]}),f&&o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:f}),d.length>0&&o.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:d.map(b=>o.jsxs("span",{className:"inline-flex items-center gap-1.5 text-2xs bg-bg border border-border/60 rounded-full px-2.5 py-1",children:[o.jsx("span",{className:"text-text-tertiary/70",children:b.label}),o.jsx("span",{className:"text-text-secondary font-medium",children:b.value})]},b.label))})]}),r&&o.jsx("div",{className:"border-t border-border px-6 pb-6 pt-5 flex flex-col gap-5",children:h?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(By,{label:"Problem",text:h.problem}),o.jsx(By,{label:"Solution",text:h.solution}),h.outcome&&o.jsx(By,{label:"Outcome",text:h.outcome})]}),((g=e.tags)==null?void 0:g.length)>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:e.tags.map(b=>o.jsx("span",{className:"text-2xs text-text-tertiary bg-bg border border-border rounded-full px-2 py-0.5",children:b},b))}),m.length>0&&o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>a(b=>!b),className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(lj,{open:i}),"Technical details"]}
679),i&&o.jsx("div",{className:"mt-3 grid grid-cols-2 gap-x-6 gap-y-2",children:m.map(([b,_])=>o.jsxs("div",{className:"flex flex-col",children:[o.jsx("span",{className:"text-2xs text-text-tertiary",children:b.replace(/_/g," ")}),o.jsx("span",{className:"text-xs text-text font-medium",children:_})]},b))})]})]}):o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.description})})]})}function By({label:e,text:t}){return t?o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsx("span",{className:"text-2xs font-medium text-text-tertiary uppercase tracking-widest",children:e}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:t})]}):null}const yie=[25,50,75,100];function cj(){var p;const{slug:e,token:t}=F4(),[n,r]=y.useState(null),[s,i]=y.useState(!0),[a,l]=y.useState(!1),c=y.useRef(!1),u=y.useRef(new Set),d=y.useRef(Date.now());y.useEffect(()=>{if(!e)return;const m=t?`/api/pub/p/${e}/${t}`:`/api/pub/p/${e}`;fetch(m).then(x=>{if(x.status===404)return l(!0),i(!1),null;if(!x.ok)throw new Error("Failed");return x.json()}).then(x=>{var w;if(x&&(r(x),!c.current)){c.current=!0;const g=t?`/api/pub/p/${e}/${t}/visit`:`/api/pub/p/${e}/visit`,b=localStorage.getItem("auth_token");fetch(g,{method:"POST",headers:b?{Authorization:`Bearer ${b}`}:{}}).catch(()=>{}),Ot==null||Ot.capture("portfolio_viewed",{slug:e,version_token:t??null,project_count:((w=x.projects)==null?void 0:w.length)??0,referrer:document.referrer||null,utm_source:new URLSearchParams(window.location.search).get("utm_source"),utm_medium:new URLSearchParams(window.location.search).get("utm_medium"),utm_campaign:new URLSearchParams(window.location.search).get("utm_campaign")})}i(!1)}).catch(()=>{l(!0),i(!1)})},[e,t]),y.useEffect(()=>{if(!e)return;const m=()=>{const x=document.documentElement,w=x.scrollTop+x.clientHeight,g=x.scrollHeight,b=Math.floor(w/g*100);for(const _ of yie)b>=_&&!u.current.has(_)&&(u.current.add(_),Ot==null||Ot.capture("portfolio_scrolled",{slug:e,depth_pct:_,time_ms:Date.now()-d.current}))};return window.addEventListener("scroll",m,{passive:!0}),()=>window.removeEventListener("scroll",m)},[e]);const h=y.useCallback(m=>{Ot==null||Ot.capture("portfolio_link_clicked",{slug:e,link_type:m})},[e]);if(s)return o.jsx("div",{className:"min-h-[100dvh] bg-bg flex items-center justify-center",children:o.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-border border-t-accent animate-spin"})});if(a||!n)return o.jsxs("div",{className:"min-h-[100dvh] bg-bg flex flex-col items-center justify-center gap-4 text-center px-6",children:[o.jsx("p",{className:"font-serif text-3xl text-text",children:"Not found"}),o.jsx("p",{className:"text-sm text-text-tertiary",children:"This portfolio link doesn't exist or isn't public."})]});const{links:f={}}=n;return o.jsx("div",{className:"min-h-[100dvh] bg-bg text-text",children:o.jsxs("div",{className:"max-w-[680px] mx-auto px-4 sm:px-6 py-16 flex flex-col gap-12",children:[o.jsxs("header",{className:"flex flex-col gap-5",children:[n.headline&&o.jsx("h1",{className:"font-serif text-4xl text-text leading-tight",children:n.headline}),n.about&&o.jsx("div",{className:"flex flex-col gap-3",children:n.about.split(/\n\n+/).map((m,x)=>o.jsx("p",{className:"text-base text-text-secondary leading-relaxed",children:m},x))}),(f.linkedin||f.github||f.email)&&o.jsxs("div",{className:"flex items-center gap-5 pt-3",children:[f.linkedin&&o.jsxs("a",{href:f.linkedin.startsWith("http")?f.linkedin:`https://${f.linkedin}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>h("linkedin"),className:"flex items-center gap-1.5 text-sm text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(hie,{}),"LinkedIn"]}),f.github&&o.jsxs("a",{href:f.github.startsWith("http")?f.github:`https://${f.github}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>h("github"),className:"flex items-center gap-1.5 text-sm text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(fie,{}),"GitHub"]}),f.email&&o.jsxs("a",{href:`mailto:${f.email}`,onClick:()=>h("email"),className:"flex items-center gap-1.5 text-sm text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(pie,{}),f.email]})]})]}),((p=n.projects)==null?void 0:p.length)>0&&o.jsxs("section",{className:"flex flex-col gap-3",children:[o.jsx("h2",{className:"text-xs font-medium text-text-tertiary uppercase tracking-widest",children:"Selected Work"}),o.jsx("div",{className:"flex flex-col gap-3",children:n.projects.map((m,x)=>o.jsx(xie,{project:m,index:x,slug:e},m.id))})]}),o.jsx("footer",{className:"pt-4 border-t border-border-subtle",children:o.jsxs("p",{className:"text-2xs text-text-tertiary text-center",children:["Built with"," ",o.jsx("a",{href:"/",className:"text-accent hover:underline",children:"Pave"})]})})]})})}function li({used:e,limit:t,label:n}){const r=Math.min(e/t*100,100),s=r>=80;return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-2xs text-text-tertiary",children:n}),o.jsxs("span",{className:`text-2xs tabular-nums ${s?"text-warning font-medium":"text-text-tertiary"}`,children:[t-e," left"]})]}),o.jsx("div",{className:"h-0.5 rounded-full bg-border overflow-hidden",children:o.jsx("div",{className:`h-full rounded-full transition-all duration-500 ${s?"bg-warning":"bg-accent/40"}`,style:{width:`${r}%`}})})]})}function Uy({usedSeconds:e,limitSeconds:t}){const n=Math.floor(e/60),r=Math.floor(t/60);return o.jsx(li,{used:n,limit:r,label:"Recording minutes this month"})}const uj=[{label:"Résumés / mo",free:"10",pro:"200"},{label:"Portfolios / mo",free:"3",pro:"200"},{label:"Prep decks / mo",free:"3",pro:"40"},{label:"Recording minutes / mo",free:"60 min",pro:"600 min"}];function bie(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function vie(){const[e,t]=y.useState(null),[n,r]=y.useState(!0),[s,i]=y.useState(!1),[a,l]=y.useState(null),[c,u]=y.useState(!1),[d,h]=y.useState(null),[f,p]=y.useState(!1),[m,x]=y.useState(""),[w,g]=y.useState(!1),[b,_]=y.useState(null);y.useEffect(()=>{G.billing.status().then(t).finally(()=>r(!1)),new URLSearchParams(window.location.search).get("upgraded")==="1"&&(window.history.replaceState({},"",window.location.pathname),G.billing.status().then(t))},[]);async function k(){u(!0),h(null);try{const{url:j}=await G.billing.checkout(`${window.location.origin}/settings?upgraded=1`,`${window.location.origin}/settings`);window.location.href=j}catch(j){h((j==null?void 0:j.message)??"Something went wrong.")}finally{u(!1)}}async function T(){if(m.trim()){g(!0),_(null);try{const j=await G.billing.redeemPromo(m.trim());_(j),j.ok&&(G.billing.status().then(t),x(""))}catch(j){_({ok:!1,message:(j==null?void 0:j.message)??"Invalid code."})}finally{g(!1)}}}async function N(){i(!0),l(null);try{const{url:j}=await G.billing.portal(`${window.location.origin}/settings`);window.location.href=j}catch(j){l((j==null?void 0:j.message)??"Something went wrong.")}finally{i(!1)}}if(n)return o.jsxs("div",{className:`mt-6 ${yg} overflow-hidden`,children:[o.jsxs("div",{className:"px-5 py-3 border-b border-border flex items-center gap-2",children:[o.jsx(WT,{size:13,className:"text-text-secondary"}),o.jsx("span",{className:qt,children:"Plan & Usage"})]}),o.jsx("div",{className:"p-5",children:o.jsx("p",{className:"text-xs text-text-tertiary",children:"Loadingâ¦"})})]});const C=(e==null?void 0:e.plan)==="pro",S=C&&!!(e!=null&&e.stripe_subscription_id),I=C&&!(e!=null&&e.stripe_subscription_id),E=e==null?void 0:e.quotas;return o.jsxs("div",{className:`mt-6 ${yg} overflow-hidden`,children:[o.jsxs("div",{className:"px-5 py-3 border-b border-border flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(WT,{size:13,className:"text-text-secondary"}),o.jsx("span",{className:qt,children:"Plan & Usage"})]}),C&&o.jsxs("span",{className:"flex items-center gap-1 text-2xs font-medium text-accent bg-accent/10 px-2 py-0.5 rounded-full",children:[o.jsx(po,{size:10}),"Pro"]})]}),!C&&o.jsxs("div",{className:"px-5 pt-5 pb-5 space-y-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary font-medium mb-1",children:"Free plan"}),o.jsxs("p",{className:"text-base font-semibold text-text leading-snug",children:["Apply smarter.",o.jsx("br",{}),"Land more interviews."]})]}),o.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[o.jsxs("div",{className:"grid grid-cols-3 bg-bg-secondary px-3 py-1.5",children:[o.jsx("span",{className:"text-text-tertiary text-2xs"}),o.jsx("span",{className:"text-text-tertiary text-2xs text-center",children:"Free"}),o.jsx("span",{className:"text-accent text-2xs text-center font-medium",children:"Pro"})]}),uj.map((j,P)=>o.jsxs("div",{className:`grid grid-cols-3 px-3 py-2 ${P<uj.length-1?"border-b border-border":""}`,children:[o.jsx("span",{className:"text-text-secondary text-2xs",children:j.label}),o.jsx("span",{className:"text-text-tertiary text-2xs text-center",children:j.free}),o.jsx("span",{className:"text-accent text-2xs text-center font-medium",children:j.pro})]},j.label))]}),o.jsx(jt,{variant:"primary",size:"md",loading:c,onClick:k,className:"w-full",children:"Upgrade to Pro · $9/month"}),d&&o.jsx("p",{className:"text-xs text-error",children:d}),o.jsxs("div",{children:[o.jsx("button",{className:"text-2xs text-text-tertiary hover:text-text-secondary transition-colors",onClick:()=>{p(j=>!j),_(null)},children:"Have a code?"}),f&&o.jsxs("div",{className:"mt-2 flex gap-2",children:[o.jsx("input",{className:"flex-1 text-xs bg-bg-secondary border border-border rounded px-2 py-1.5 text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent",placeholder:"Enter code",value:m,onChange:j=>x(j.target.value),onKeyDown:j=>j.key==="Enter"&&T(),autoFocus:!0}),o.jsx(jt,{variant:"ghost",size:"sm",loading:w,onClick:T,children:"Apply"})]}),b&&o.jsx("p",{className:`mt-1.5 text-xs ${b.ok?"text-success":"text-error"}`,children:b.message})]}),E&&o.jsxs("div",{className:"pt-1 space-y-3",children:[o.jsx(li,{used:E.resumes.used,limit:E.resumes.limit,label:"Résumés this month"}),o.jsx(li,{used:E.portfolios.used,limit:E.portfolios.limit,label:"Portfolios this month"}),o.jsx(li,{used:E.prep_decks.used,limit:E.prep_decks.limit,label:"Prep decks this month"}),E.recording_seconds&&o.jsx(Uy,{usedSeconds:E.recording_seconds.used,limitSeconds:E.recording_seconds.limit})]})]}),S&&o.jsxs("div",{className:"px-5 py-5 space-y-4",children:[E&&o.jsxs("div",{className:"space-y-3",children:[o.jsx(li,{used:E.resumes.used,limit:E.resumes.limit,label:"Résumés this month"}),o.jsx(li,{used:E.portfolios.used,limit:E.portfolios.limit,label:"Portfolios this month"}),o.jsx(li,{used:E.prep_decks.used,limit:E.prep_decks.limit,label:"Prep decks this month"}),E.recording_seconds&&o.jsx(Uy,{usedSeconds:E.recording_seconds.used,limitSeconds:E.recording_seconds.limit})]}),o.jsx(jt,{variant:"ghost",size:"sm",loading:s,onClick:N,children:"Manage subscription"}),a&&o.jsx("p",{className:"text-xs text-error",children:a})]}),I&&o.jsxs("div",{className:"px-5 py-5 space-y-4",children:[(e==null?void 0:e.promo_expires_at)&&o.jsxs("p",{className:"text-2xs text-text-tertiary",children:["Pro access active until ",o.jsx("span",{className:"text-text-secondary font-medium",children:bie(e.promo_expires_at)})]}),E&&o.jsxs("div",{className:"space-y-3",children:[o.jsx(li,{used:E.resumes.used,limit:E.resumes.limit,label:"Résumés this month"}),o.jsx(li,{used:E.portfolios.used,limit:E.portfolios.limit,label:"Portfolios this month"}),o.jsx(li,{used:E.prep_decks.used,limit:E.prep_decks.limit,label:"Prep decks this month"}),E.recording_seconds&&o.jsx(Uy,{usedSeconds:E.recording_seconds.used,limitSeconds:E.recording_seconds.limit})]}),o.jsxs("div",{className:"pt-1 border-t border-border space-y-2",children:[o.jsx("p",{className:"text-2xs text-text-tertiary",children:"Subscribe to keep Pro after your trial ends."}),o.jsx(jt,{variant:"primary",size:"sm",loading:c,onClick:k,className:"w-full",children:"Subscribe · $9/month"}),d&&o.jsx("p",{className:"text-xs text-error",children:d})]})]})]})}function _ie(e,t=256){return new Promise((n,r)=>{const s=new Image,i=URL.createObjectURL(e);s.onload=()=>{const a=document.createElement("canvas");a.width=t,a.height=t;const l=a.getContext("2d"),c=Math.min(s.width,s.height),u=(s.width-c)/2,d=(s.height-c)/2;l.drawImage(s,u,d,c,c,0,0,t,t),URL.revokeObjectURL(i),n(a.toDataURL("image/jpeg",.85))},s.onerror=r,s.src=i})}function dj({value:e}){const[t,n]=y.useState(!1);async function r(){await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)}return o.jsx("button",{onClick:r,className:"p-1 rounded hover:bg-bg transition-colors",title:"Copy",children:t?o.jsx(yt,{size:13,className:"text-success"}):o.jsx(Nr,{size:13,className:"text-text-tertiary"})})}function wie(){var R,B;const{user:e,logout:t,updateCustomPicture:n}=Cl(),r=y.useRef(null),[s,i]=y.useState(!1),[a,l]=y.useState(!1),[c,u]=y.useState((e==null?void 0:e.name)??""),[d,h]=y.useState(!1);async function f(){if(!c.trim()||c.trim()===(e==null?void 0:e.name)){l(!1);return}h(!0);try{await G.userProfile.update({display_name:c.trim()})}finally{h(!1),l(!1)}}const[p,m]=y.useState([]),[x,w]=y.useState(!0),[g,b]=y.useState(""),[_,k]=y.useState(!1),[T,N]=y.useState(null),[C,S]=y.useState(null),[I,E]=y.useState(null),j=(e==null?void 0:e.customPicture)??(e==null?void 0:e.picture);y.useEffect(()=>{G.apiKeys.list().then(m).finally(()=>w(!1))},[]);async function P(O){var H;const U=(H=O.target.files)==null?void 0:H[0];if(U){i(!0);try{const A=await _ie(U);await G.userProfile.update({custom_picture:A}),n(A)}catch{}finally{i(!1),O.target.value=""}}}async function L(){if(g.trim()){k(!0),N(null);try{const O=await G.apiKeys.create(g.trim());S(O),m(U=>[O,...U]),b("")}catch(O){N(O instanceof Error?O.message:"Failed to create key")}finally{k(!1)}}}async function z(O){E(O);try{await G.apiKeys.revoke(O),m(U=>U.filter(H=>H.id!==O)),(C==null?void 0:C.id)===O&&S(null)}finally{E(null)}}return o.jsx("div",{className:"flex flex-col min-h-[calc(100dvh-3rem)] overflow-y-auto bg-bg",children:o.jsxs("div",{className:"max-w-2xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8",children:[o.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[o.jsx("div",{className:"w-9 h-9 rounded-xl bg-bg-secondary border border-border flex items-center justify-center",children:o.jsx(rv,{size:17,className:"text-text-secondary"})}),o.jsxs("div",{children:[o.jsx("h1",{className:"text-base font-semibold text-text",children:"Settings"}),o.jsx("p",{className:"text-xs text-text-tertiary mt-0.5",children:"Account and app preferences"})]})]}),o.jsxs("div",{className:`${yg} overflow-hidden`,children:[o.jsx("div",{className:"px-5 py-3 border-b border-border",children:o.jsx("span",{className:qt,children:"Account"})}),o.jsxs("div",{className:"p-5 flex items-center gap-4",children:[o.jsxs("button",{className:"relative w-12 h-12 rounded-full shrink-0 group focus:outline-none",onClick:()=>{var O;return(O=r.current)==null?void 0:O.click()},disabled:s,title:"Change photo",children:[j?o.jsx("img",{src:j,alt:e==null?void 0:e.name,className:"w-12 h-12 rounded-full object-cover"}):o.jsx("div",{className:"w-12 h-12 rounded-full bg-accent/20 flex items-center justify-center",children:o.jsx("span",{className:"text-sm font-semibold text-accent-text",children:(B=(R=e==null?void 0:e.name)==null?void 0:R[0])==null?void 0:B.toUpperCase()})}),o.jsx("div",{className:"absolute inset-0 rounded-full bg-black/40 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity flex items-center justify-center",children:o.jsx(Qz,{size:14,className:"text-white"})})]}),o.jsx("input",{ref:r,type:"file",accept:"image/*",className:"hidden",onChange:P}),o.jsxs("div",{className:"flex-1 min-w-0",children:[a?o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("input",{autoFocus:!0,t
679ype:"text",value:c,onChange:O=>u(O.target.value),onKeyDown:O=>{O.key==="Enter"&&f(),O.key==="Escape"&&l(!1)},className:"text-sm font-medium text-text bg-transparent border-b border-accent focus:outline-none flex-1 min-w-0"}),o.jsx("button",{onClick:f,disabled:d,className:"text-accent hover:opacity-70 transition-opacity",children:o.jsx(yt,{size:13})}),o.jsx("button",{onClick:()=>l(!1),className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:13})})]}):o.jsxs("div",{className:"flex items-center gap-1.5 group",children:[o.jsx("p",{className:"text-sm font-medium text-text truncate",children:e==null?void 0:e.name}),o.jsx("button",{onClick:()=>{u((e==null?void 0:e.name)??""),l(!0)},className:"opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity text-text-tertiary hover:text-text",children:o.jsx(w4,{size:11})})]}),o.jsx("p",{className:"text-xs text-text-tertiary truncate",children:e==null?void 0:e.email}),s&&o.jsx("p",{className:"text-2xs text-text-tertiary/60 mt-0.5",children:"Uploadingâ¦"})]}),o.jsx(jt,{variant:"ghost",size:"sm",icon:o.jsx(tv,{size:13}),onClick:t,children:"Sign out"})]})]}),o.jsx(vie,{}),o.jsxs("div",{className:`mt-6 ${yg} overflow-hidden`,children:[o.jsxs("div",{className:"px-5 py-3 border-b border-border flex items-center gap-2",children:[o.jsx(aH,{size:13,className:"text-text-secondary"}),o.jsx("span",{className:qt,children:"API Keys"})]}),o.jsxs("div",{className:"p-5 space-y-4",children:[o.jsx("p",{className:"text-xs text-text-tertiary",children:"Use an API key to connect Pave to Claude Desktop or Claude Code. The key is shown once â copy it immediately."}),C&&o.jsxs("div",{className:"rounded-lg border border-success/30 bg-success/5 p-3 space-y-1.5",children:[o.jsx("p",{className:"text-xs font-medium text-success",children:"New key created â copy it now. It won't be shown again."}),o.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs bg-bg rounded border border-border px-3 py-2",children:[o.jsx("span",{className:"flex-1 break-all text-text",children:C.key}),o.jsx(dj,{value:C.key})]})]}),x?o.jsx("p",{className:"text-xs text-text-tertiary",children:"Loadingâ¦"}):p.length===0&&!C?o.jsx("p",{className:"text-xs text-text-tertiary",children:"No API keys yet."}):o.jsx("ul",{className:"space-y-2",children:p.map(O=>o.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-border bg-bg px-3 py-2.5",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs font-medium text-text",children:O.name}),o.jsxs("p",{className:"text-2xs text-text-tertiary font-mono mt-0.5",children:[O.key_prefix,"â¢â¢â¢â¢â¢â¢â¢â¢",O.last_used_at&&o.jsxs("span",{className:"ml-2 not-italic font-sans",children:["last used ",new Date(O.last_used_at).toLocaleDateString()]})]})]}),o.jsx("button",{className:"p-1.5 rounded hover:bg-error/10 text-text-tertiary hover:text-error transition-colors",onClick:()=>z(O.id),disabled:I===O.id,title:"Revoke key",children:o.jsx(Yn,{size:13})})]},O.id))}),T&&o.jsx("p",{className:"text-xs text-error",children:T}),o.jsxs("div",{className:"flex gap-2 pt-1",children:[o.jsx("input",{type:"text",placeholder:"Key name (e.g. Claude Desktop)",value:g,onChange:O=>b(O.target.value),onKeyDown:O=>O.key==="Enter"&&L(),className:"flex-1 text-xs bg-bg border border-border rounded-lg px-3 py-2 text-text placeholder:text-text-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50"}),o.jsx(jt,{size:"sm",icon:o.jsx(us,{size:13}),onClick:L,disabled:!g.trim()||_,children:_?"Creatingâ¦":"Create"})]}),o.jsxs("div",{className:"rounded-lg bg-bg border border-border p-4 space-y-3",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-text mb-1",children:"Connect Pave to Claude"}),o.jsx("p",{className:"text-2xs text-text-secondary leading-relaxed",children:"Once connected, just tell Claude what you shipped, learned, or struggled with â it saves straight to your Pave memories. No forms, no copy-paste. Your resume and cover letters stay current without you thinking about it."})]}),o.jsxs("details",{className:"group",children:[o.jsx("summary",{className:"text-2xs text-accent cursor-pointer select-none hover:underline transition-colors list-none",children:"How to connect âº"}),o.jsxs("div",{className:"mt-2 space-y-2",children:[o.jsxs("ol",{className:"list-decimal list-inside space-y-1.5 text-2xs text-text-secondary",children:[o.jsxs("li",{children:[o.jsx("a",{href:"https://claude.ai/new?modal=add-custom-connector#settings/customize-connectors",target:"_blank",rel:"noreferrer",className:"font-medium text-accent underline",children:"Open the connector dialog"})," â or go to ",o.jsx("span",{className:"font-medium text-text",children:"Settings â Connectors"})," in the left sidebar, then click ",o.jsx("span",{className:"font-medium text-text",children:"Add"})," in the top right"]}),o.jsxs("li",{children:["Choose ",o.jsx("span",{className:"font-medium text-text",children:"Add custom connector"})]}),o.jsxs("li",{children:["Set the name to ",o.jsx("span",{className:"font-mono font-medium text-text",children:"Pave"})," and paste the URL:"]})]}),o.jsxs("div",{className:"flex items-center gap-2 font-mono bg-bg-secondary rounded border border-border px-3 py-2",children:[o.jsx("span",{className:"flex-1 text-text select-all text-2xs",children:du}),o.jsx(dj,{value:du})]}),o.jsx("p",{className:"text-2xs text-text-tertiary",children:"Sign in with Google when prompted. Once the tool list loads, you're connected."})]})]})]})]})]})]})})}const _c={company:{label:"Company",icon:mx,color:"text-blue-500"},education:{label:"School",icon:VT,color:"text-violet-500"},research:{label:"Research",icon:fH,color:"text-cyan-500"},nonprofit:{label:"Nonprofit",icon:qT,color:"text-rose-500"},military:{label:"Military",icon:_H,color:"text-slate-500"},club:{label:"Club",icon:C4,color:"text-amber-500"},sports:{label:"Sports",icon:tH,color:"text-orange-500"},creative:{label:"Creative",icon:xH,color:"text-pink-500"},open_source:{label:"Open Source",icon:rH,color:"text-gray-500"},religious:{label:"Religious",icon:NH,color:"text-yellow-500"},other:{label:"Other",icon:oH,color:"text-gray-400"},school:{label:"School",icon:VT,color:"text-violet-500"},volunteer:{label:"Volunteer",icon:qT,color:"text-rose-500"}},Eie=["company","education","research","nonprofit","military","club","sports","creative","open_source","religious","other"],Nie=["Bachelor's","Master's","PhD","Associate's","Certificate","Bootcamp","High School","Other"],kie=["Full-time","Part-time","Internship","Contract","Freelance"];function Tie({mode:e,orgId:t,roleId:n,editOrg:r,editRole:s,orgs:i,roles:a,onSaved:l,onOrgCreated:c,onClose:u}){return o.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[o.jsx(se.div,{initial:{opacity:0}
679,animate:{opacity:1},exit:{opacity:0},className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:u}),o.jsxs(se.div,{initial:{opacity:0,scale:.96,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.96,y:8},transition:{duration:.15},className:`relative w-full ${e==="role"||e==="edit_role"?"max-w-lg":"max-w-md"} bg-bg rounded-xl border border-border shadow-2xl overflow-hidden`,onClick:d=>d.stopPropagation(),children:[e==="org"&&o.jsx(fj,{onSaved:l,onOrgCreated:c,onClose:u}),e==="edit_org"&&r&&o.jsx(fj,{editOrg:r,onSaved:l,onClose:u}),e==="role"&&o.jsx(mj,{orgId:t,orgs:i,roles:a,onSaved:l,onClose:u}),e==="edit_role"&&s&&o.jsx(mj,{editRole:s,orgs:i,roles:a,onSaved:l,onClose:u}),e==="project"&&o.jsx(jie,{roleId:n,orgs:i,roles:a,onSaved:l,onClose:u})]})]})}function Ww({title:e,onClose:t}){return o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border",children:[o.jsx("span",{className:"text-sm font-semibold text-text",children:e}),o.jsx("button",{onClick:t,className:"text-text-tertiary hover:text-text p-2 sm:p-1 rounded hover:bg-bg-hover transition-colors",children:o.jsx(mt,{size:15})})]})}function Sie(e,t=128){return new Promise((n,r)=>{const s=new Image,i=URL.createObjectURL(e);s.onload=()=>{const a=document.createElement("canvas");a.width=t,a.height=t;const l=a.getContext("2d"),c=Math.min(s.width,s.height),u=(s.width-c)/2,d=(s.height-c)/2;l.drawImage(s,u,d,c,c,0,0,t,t),URL.revokeObjectURL(i),n(a.toDataURL("image/jpeg",.85))},s.onerror=r,s.src=i})}async function hj(e){if(e.length<2)return[];const t=uu();try{return(await(await fetch(`/api/orgs/suggest?q=${encodeURIComponent(e)}`,{headers:t?{Authorization:`Bearer ${t}`}:{}})).json()).map(s=>({name:s.name,domain:s.domain,logo:s.domain?`https://www.google.com/s2/favicons?domain=${s.domain}&sz=128`:""}))}catch{return[]}}function fj({editOrg:e,onSaved:t,onOrgCreated:n,onClose:r}){var H;const[s,i]=y.useState((e==null?void 0:e.name)??""),[a,l]=y.useState((e==null?void 0:e.org_type)??"company"),[c,u]=y.useState((e==null?void 0:e.logo_url)??""),[d,h]=y.useState([]),[f,p]=y.useState(!1),[m,x]=y.useState(!1),[w,g]=y.useState(null),[b,_]=y.useState(""),[k,T]=y.useState(""),[N,C]=y.useState(""),S=y.useRef(),I=y.useRef(null),E=y.useRef(null),[j,P]=y.useState(null);y.useEffect(()=>{f&&E.current&&P(E.current.getBoundingClientRect())},[f,d]);const L=a==="credential",z=async A=>{var V;const q=(V=A.target.files)==null?void 0:V[0];if(q){try{const D=await Sie(q);u(D)}catch{}A.target.value=""}},R=A=>{i(A),u(""),clearTimeout(S.current),S.current=setTimeout(async()=>{const q=await hj(A);h(q),p(q.length>0)},200)},B=A=>{i(A.name),u(A.logo),h([]),p(!1)},O=async()=>{if(s.trim()){x(!0),g(null);try{if(L)await G.credentials.create({name:s.trim(),issuer:b.trim()||void 0,date:k.trim()||void 0,url:N.trim()||void 0}),t();else if(e)await G.orgs.update(e.org_id,{name:s.trim(),org_type:a,logo_url:c||void 0}),t();else{const A=await G.orgs.create({name:s.trim(),org_type:a,logo_url:c||void 0});n&&A.org_id?n({org_id:A.org_id,name:s.trim(),org_type:a,logo_url:c||void 0,created_at:new Date().toISOString()}):t()}}catch(A){g(A.message),x(!1)}}},U=e?"Edit Organization":L?"Add Certificate":"Add Organization";return o.jsxs(o.Fragment,{children:[o.jsx(Ww,{title:U,onClose:r}),o.jsxs("div",{className:"p-5 space-y-4",children:[o.jsx("input",{ref:I,type:"file",accept:"image/*",className:"hidden",onChange:z}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("button",{type:"button",onClick:()=>{var A;return(A=I.current)==null?void 0:A.click()},className:"group relative w-12 h-12 rounded-lg bg-bg-tertiary border border-border hover:border-border-focus flex items-center justify-center shrink-0 overflow-hidden transition-colors",title:"Upload logo",children:[c?o.jsx("img",{src:c,alt:"",className:"w-full h-full object-contain rounded-lg",onError:()=>u("")}):L?o.jsx(zT,{size:18,className:"text-emerald-500"}):o.jsx("span",{className:"text-lg text-text-tertiary select-none",children:((H=_c[a])==null?void 0:H.icon)&&(()=>{const A=_c[a].icon;return o.jsx(A,{size:18,className:_c[a].color})})()}),o.jsx("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center rounded-lg",children:o.jsx("span",{className:"text-2xs text-white font-medium",children:"Upload"})})]}),o.jsxs("div",{className:"flex-1 relative",ref:E,children:[o.jsx("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-bg-secondary px-3 py-2 focus-within:border-border-focus focus-within:ring-1 focus-within:ring-accent/30 transition-colors",children:o.jsx("input",{autoFocus:!0,value:s,onChange:A=>L?i(A.target.value):R(A.target.value),onKeyDown:A=>{A.key==="Enter"&&O(),A.key==="Escape"&&(p(!1),r())},onBlur:()=>setTimeout(()=>p(!1),150),onFocus:()=>!L&&d.length>0&&p(!0),placeholder:L?"e.g. AWS Solutions Architect":"e.g. Google, MIT, The Rolling Stones",className:"flex-1 bg-transparent text-sm text-text placeholder:text-text-tertiary focus:outline-none"})}),f&&!L&&j&&Er.createPortal(o.jsx("div",{style:{position:"fixed",top:j.bottom+4,left:j.left,width:j.width,zIndex:9999},className:"rounded-lg border border-border bg-bg shadow-lg overflow-hidden",children:d.map(A=>o.jsxs("button",{onMouseDown:()=>B(A),className:"flex items-center gap-3 w-full px-3 py-2 text-left hover:bg-bg-hover transition-colors",children:[A.logo?o.jsx("img",{src:A.logo,alt:"",className:"w-6 h-6 rounded-lg object-contain shrink-0",onError:q=>{q.target.style.display="none"}}):o.jsx("div",{className:"w-6 h-6 rounded-lg bg-bg-tertiary shrink-0"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate",children:A.name}),A.domain&&o.jsx("p",{className:"text-2xs text-text-tertiary truncate",children:A.domain})]})]},A.domain||A.name))}),document.body)]})]}),!e&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Type"}),o.jsx("div",{className:"grid grid-cols-4 gap-1.5",children:[...Eie,"credential"].map(A=>{const q=A==="credential"?{label:"Certificate",icon:zT,color:"text-emerald-500"}:_c[A],{label:V,icon:D,color:te}=q,J=a===A;return o.jsxs("button",{onClick:()=>{l(A),h([]),p(!1),A!=="credential"&&s.trim().length>=2&&(clearTimeout(S.current),S.current=setTimeout(async()=>{const ue=await hj(s);h(ue),p(ue.length>0)},200))},className:re("flex flex-col items-center gap-1 p-2 rounded-lg border text-center transition-all",J?"border-accent/50 bg-accent-subtle":"border-border hover:border-border-focus hover:bg-bg-hover"),children:[o.jsx(D,{size:16,className:J?"text-accent-text":te}),o.jsx("span",{className:re("text-2xs leading-tight",J?"text-accent-text font-medium":"text-text-tertiary"),children:V})]},A)})})]}),L&&o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Issuer"}),o.jsx("input",{value:b,onChange:A=>_(A.target.value),placeholder:"e.g. AWS, Coursera",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"text-xs font-medium text-text-secondary",children:["Date ",o.jsx("span",{className:"text-text-tertiary font-normal",children:"(optional)"})]}),o.jsx("input",{value:k,onChange:A=>T(A.target.value),placeholder:"e.g. May 2024",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"text-xs font-medium text-text-secondary",children:["URL ",o.jsx("span",{className:"text-text-tertiary font-normal",children:"(optional)"})]}),o.jsx("input",{value:N,onChange:A=>C(A.target.value),placeholder:"https://â¦",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"})]})]}),w&&o.jsx("p",{className:"text-xs text-error",children:w})]}),o.jsxs("div",{className:"flex items-center gap-2 px-5 py-3.5 border-t border-border bg-bg-secondary",children:[o.jsx(jt,{variant:"primary",size:"sm",loading:m,onClick:O,disabled:!s.trim(),children:e?"Save Changes":L?"Add Certificate":"Add Organization"}),o.jsx(jt,{variant:"ghost",size:"sm",onClick:r,children:"Cancel"})]})]})}function Op({values:e,onChange:t,placeholder:n,autoDelay:r=1500}){const[s,i]=y.useState(""),a=y.useRef(null),l=y.useRef(),c=f=>f.replace(/(^|\s)\S/g,p=>p.toUpperCase()),u=f=>{clearTimeout(l.current);const p=c(f.trim());p&&!e.includes(p)&&t([...e,p]),i("")},d=f=>t(e.filter(p=>p!==f)),h=f=>{i(f.target.value),clearTimeout(l.current),f.target.value.trim()&&(l.current=setTimeout(()=>u(f.target.value),r))};return o.jsxs("div",{className:"flex flex-wrap gap-1.5 min-h-8 p-1.5 rounded-lg border border-border bg-bg-secondary cursor-text focus-within:border-border-focus focus-within:ring-1 focus-within:ring-accent/30",onClick:()=>{var f;return(f=a.current)==null?void 0:f.focus()},children:[e.map(f=>o.jsxs("span",{className:"inline-flex items-center gap-1 h-5 pl-2 pr-1 rounded bg-bg-active text-xs text-text-secondary",children:[f,o.jsx("button",{type:"button",onClick:p=>{p.stopPropagation(),d(f)},className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:10})})]},f)),o.jsx("input",{ref:a,value:s,onChange:h,onKeyDown:f=>{f.key==="Enter"&&(f.preventDefault(),u(s)),f.key==="Backspace"&&!s&&e.length&&d(e[e.length-1])},onBlur:()=>{s.trim()&&u(s)},placeholder:e.length===0?n:"",className:"flex-1 min-w-24 bg-transparent text-xs text-text placeholder:text-text-tertiary outline-none px-1"})]})}const pj={"Bachelor's":["B.S.","B.A.","B.F.A.","B.B.A.","B.S.N.","B.Mus.","B.Ed."],"Master's":["M.S.","M.A.","M.B.A.","M.F.A.","M.Ed.","M.Eng.","M.P.H."],PhD:["Ph.D.","Ed.D.","M.D.","J.D.","Psy.D."],"Associate's":["A.A.","A.S.","A.A.S."]};function Cie(e,t,n){const r=t||e;if(!r)return"";if(n.length===0)return r;const s=n.length===1?n[0]:n.slice(0,-1).join(", ")+" & "+n[n.length-1];return`${r} in ${s}`}function mj({orgId:e,editRole:t,orgs:n,onSaved:r,onClose:s}){var sn;const[i,a]=y.useState((t==null?void 0:t.org_id)??e??((sn=n[0])==null?void 0:sn.org_id)??""),[l,c]=y.useState((t==null?void 0:t.t
679itle)??""),[u,d]=y.useState(!t),h=y.useRef(null),[f,p]=y.useState((t==null?void 0:t.start_date)??""),[m,x]=y.useState((t==null?void 0:t.end_date)??""),[w,g]=y.useState((t==null?void 0:t.description)??""),[b,_]=y.useState(!1),[k,T]=y.useState(!1),[N,C]=y.useState(null),S=(t==null?void 0:t.metadata)??{},I=le=>Array.isArray(le)?le:typeof le=="string"&&le?[le]:[],[E,j]=y.useState(S.kind==="activity"?"activity":"degree"),[P,L]=y.useState(String(S.degree_type??"")),[z,R]=y.useState(String(S.degree_subtype??"")),B=y.useRef(String(S.degree_type??"")),[O,U]=y.useState(I(S.major)),[H,A]=y.useState(I(S.minors)),[q,V]=y.useState(String(S.gpa??"")),[D,te]=y.useState(String(S.gpa_scale??"4.0")),[J,ue]=y.useState(I(S.honors)),[Ne,Ie]=y.useState(Array.isArray(S.courses)?S.courses:[]),[Pe,Ue]=y.useState(Array.isArray(S.courses)&&S.courses.length>0),[ot,Ye]=y.useState(String(S.employment_type??"")),[ae,Ge]=y.useState(String(S.college??"")),nt=n.find(le=>le.org_id===i),De=nt&&["education","school"].includes(nt.org_type),Gt=nt&&["company","nonprofit","research"].includes(nt.org_type),Lt=!["High School","Bootcamp"].includes(P),St=P==="High School"?"High School Diploma":null;y.useEffect(()=>{P!==B.current&&(R(""),d(!0))},[P]),y.useEffect(()=>{if(!(!De||E!=="degree")){if(St){c(St),d(!1);return}u&&c(Cie(P,z,O))}},[P,z,O,u,De,E,St]);const rn=()=>{const le={};return De&&(le.kind=E,E==="degree"&&(P&&(le.degree_type=P),z&&(le.degree_subtype=z),O.length&&(le.major=O),H.length&&(le.minors=H),q&&(le.gpa=q,le.gpa_scale=D||"4.0"),J.length&&(le.honors=J),Ne.length&&(le.courses=Ne),ae&&(le.college=ae))),Gt&&ot&&(le.employment_type=ot),le},Kt=async()=>{if(!(!l.trim()||!i)){T(!0),C(null);try{t?await G.roles.update(t.role_id,{title:l.trim(),start_date:f||void 0,end_date:m||null,metadata:rn(),description:w.trim()||void 0}):await G.roles.create({org_id:i,title:l.trim(),start_date:f||void 0,end_date:m||null,metadata:rn(),description:w.trim()||void 0}),r()}catch(le){C(le.message),T(!1)}}};return o.jsxs(o.Fragment,{children:[o.jsx(Ww,{title:t?"Edit Role":"Add Role",onClose:s}),o.jsxs("div",{className:"p-5 space-y-4 max-h-[72vh] overflow-y-auto",children:[e&&!t&&nt&&o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-bg-secondary border border-border",children:[nt.logo_url?o.jsx("img",{src:nt.logo_url,alt:"",className:"w-5 h-5 rounded object-contain shrink-0",onError:le=>{le.target.style.display="none"}}):(()=>{var Fn;const le=(Fn=_c[nt.org_type])==null?void 0:Fn.icon;return le?o.jsx(le,{size:14,className:_c[nt.org_type].color}):null})(),o.jsx("span",{className:"text-xs text-text font-medium",children:nt.name})]}),!e&&!t&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Organization"}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{value:i,onChange:le=>a(le.target.value),className:"w-full appearance-none rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text focus:outline-none focus:border-border-focus transition-colors",children:n.map(le=>o.jsx("option",{value:le.org_id,children:le.name},le.org_id))}),o.jsx(tn,{size:13,className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"})]})]}),De&&o.jsx("div",{className:"flex gap-1 p-1 rounded-lg bg-bg-tertiary border border-border",children:["degree","activity"].map(le=>o.jsx("button",{onClick:()=>j(le),className:re("flex-1 py-1.5 rounded-md text-xs font-medium transition-all",E===le?"bg-bg text-text shadow-sm border border-border":"text-text-tertiary hover:text-text"),children:le==="degree"?"Degree Program":"Activity / Position"},le))}),De&&E==="degree"&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Degree type"}),o.jsxs("div",{className:"relative",children:[o.jsxs("select",{value:P,onChange:le=>L(le.target.value),className:"w-full appearance-none rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text focus:outline-none focus:border-border-focus transition-colors",children:[o.jsx("option",{value:"",children:"Selectâ¦"}),Nie.map(le=>o.jsx("option",{value:le,children:le},le))]}),o.jsx(tn,{size:13,className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"})]}),pj[P]&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:pj[P].map(le=>o.jsx("button",{onClick:()=>{R(z===le?"":le),d(!0)},className:re("px-2 py-0.5 rounded text-xs border transition-colors",z===le?"bg-accent-subtle border-accent/30 text-accent-text":"border-border text-text-secondary hover:border-border-focus"),children:le},le))})]}),De&&E==="degree"&&Lt&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Major(s)"}),o.jsx(Op,{values:O,onChange:U,placeholder:"Type a major, press Enterâ¦"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Minor(s)"}),o.jsx(Op,{values:H,onChange:A,placeholder:"Type a minor, press Enterâ¦"})]})]}),!St&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:De&&E==="degree"?"Degree title":"Title"}),De&&E==="degree"&&u&&l&&O.length>0?o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg border border-accent/30 bg-accent-subtle",children:[o.jsx(Si,{size:11,className:"text-accent shrink-0"}),o.jsx("span",{className:"flex-1 text-sm text-text",children:l}),o.jsx("button",{onClick:()=>d(!1),title:"Use this",className:"p-0.5 rounded text-text-tertiary hover:text-success transition-colors",children:o.jsx(yt,{size:13})}),o.jsx("button",{onClick:()=>{d(!1),setTimeout(()=>{var le;return(le=h.current)==null?void 0:le.focus()},0)},title:"Edit",className:"p-0.5 rounded text-text-tertiary hover:text-text transition-colors",children:o.jsx(qn,{size:12})}),o.jsx("button",{onClick:()=>{c(""),d(!1)},title:"Remove",className:"p-0.5 rounded text-text-tertiary hover:text-error transition-colors",children:o.jsx(mt,{size:12})})]}):o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:h,autoFocus:!De||E!=="degree",value:l,onCh
679ange:le=>c(le.target.value),onKeyDown:le=>{le.key==="Escape"&&s()},placeholder:De&&E==="degree"&&P==="Bootcamp"?"e.g. Full Stack Web Development":De&&E==="degree"?"e.g. Bachelor's in Computer Science":De?"e.g. Chess Club President, Research Assistant":"e.g. Software Engineer",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 pr-8 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"}),De&&E==="degree"&&(P||O.length>0)&&o.jsx("button",{onClick:()=>d(!0),title:"Re-generate",className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-text-tertiary hover:text-accent transition-colors",children:o.jsx(Si,{size:12})})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Start date"}),o.jsx(vg,{value:f,onChange:p})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"text-xs font-medium text-text-secondary",children:["End date ",o.jsx("span",{className:"text-text-tertiary font-normal",children:"(blank = present)"})]}),o.jsx(vg,{value:m,onChange:x})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("label",{className:"text-xs font-medium text-text-secondary",children:[De&&E==="degree"?"Notes":De?"Description":"Role description"," ",o.jsx("span",{className:"text-text-tertiary font-normal",children:"(optional)"})]}),o.jsx("textarea",{value:w,onChange:le=>g(le.target.value),rows:5,placeholder:De&&E==="degree"?"Thesis, concentration, or other notesâ¦":De?"Describe your activities or responsibilitiesâ¦":"Paste the job description or summarize your responsibilitiesâ¦",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors resize-none"})]}),(Gt||De&&E==="degree")&&o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>_(le=>!le),className:"flex items-center gap-1 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(tn,{size:12,className:re("transition-transform",b&&"rotate-180")}),"Additional details"]}),o.jsx(He,{initial:!1,children:b&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:o.jsxs("div",{className:"pt-3 space-y-4",children:[De&&E==="degree"&&o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"College / School"}),o.jsx("input",{value:ae,onChange:le=>Ge(le.target.value),placeholder:"e.g. Haas School of Business",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"GPA"}),o.jsx("input",{value:q,onChange:le=>V(le.target.value),placeholder:"e.g. 3.8",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus transition-colors"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Scale"}),o.jsx("input",{value:D,onChange:le=>te(le.target.value),placeholder:"4.0",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus transition-colors"})]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Honors"}),o.jsx(Op,{values:J,onChange:ue,placeholder:"e.g. Magna Cum Laude, Dean's Listâ¦"})]}),o.jsxs("div",{children:[o.jsxs("button",{onClick:()=>Ue(le=>!le),className:"flex items-center gap-1 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(tn,{size:12,className:re("transition-transform",Pe&&"rotate-180")}
679),Pe?"Hide relevant coursework":"Add relevant coursework",!Pe&&Ne.length>0&&o.jsx("span",{className:"ml-1 px-1.5 rounded-full bg-bg-active text-2xs text-text-secondary",children:Ne.length})]}),o.jsx(He,{initial:!1,children:Pe&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15},className:"overflow-hidden",children:o.jsx("div",{className:"pt-2",children:o.jsx(Op,{values:Ne,onChange:Ie,placeholder:"Type a course name, press Enterâ¦"})})})})]})]}),Gt&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Employment type"}),o.jsx("div",{className:"flex gap-1.5 flex-wrap",children:kie.map(le=>o.jsx("button",{onClick:()=>Ye(ot===le?"":le),className:re("px-2 py-0.5 rounded text-xs border transition-colors",ot===le?"bg-accent-subtle border-accent/30 text-accent-text":"border-border text-text-secondary hover:border-border-focus"),children:le},le))})]})]})})})]}),N&&o.jsx("p",{className:"text-xs text-error",children:N})]}),o.jsxs("div",{className:"flex items-center gap-2 px-5 py-3.5 border-t border-border bg-bg-secondary",children:[o.jsx(jt,{variant:"primary",size:"sm",loading:k,onClick:Kt,disabled:!l.trim()||!i,children:t?"Save Changes":"Add Role"}),o.jsx(jt,{variant:"ghost",size:"sm",onClick:s,children:"Cancel"})]})]})}function jie({roleId:e,orgs:t,roles:n,onSaved:r,onClose:s}){var b;const[i,a]=y.useState(e??((b=n[0])==null?void 0:b.role_id)??""),[l,c]=y.useState(""),[u,d]=y.useState(""),[h,f]=y.useState(!1),[p,m]=y.useState(null),x=n.find(_=>_.role_id===i),w=t.find(_=>_.org_id===(x==null?void 0:x.org_id)),g=async()=>{if(!(!l.trim()||!i||!u.trim())){f(!0),m(null);try{const _=n.find(T=>T.role_id===i),k=await G.projects.create({name:l.trim(),role_id:i,org_id:(_==null?void 0:_.org_id)??null});u.trim()&&k.project_id&&(await G.projects.update(k.project_id,{raw_content:u.trim()}),await G.projects.synthesize(k.project_id)),r()}catch(_){m(_.message),f(!1)}}};return o.jsxs(o.Fragment,{children:[o.jsx(Ww,{title:"Add Project",onClose:s}),o.jsxs("div",{className:"p-5 space-y-4",children:[!e&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Role"}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{value:i,onChange:_=>a(_.target.value),className:"w-full appearance-none rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text focus:outline-none focus:border-border-focus transition-colors",children:n.map(_=>{const k=t.find(T=>T.org_id===_.org_id);return o.jsxs("option",{value:_.role_id,children:[k?`${k.name} â `:"",_.title]},_.role_id)})}),o.jsx(tn,{size:13,className:"absolute right-3 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"})]}),w&&x&&o.jsxs("p",{className:"text-2xs text-text-tertiary",children:[w.name," · ",x.title]})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Project name"}),o.jsx("input",{autoFocus:!0,value:l,onChange:_=>c(_.target.value),onKeyDown:_=>{_.key==="Enter"&&g(),_.key==="Escape"&&s()},placeholder:"e.g. Search Ranking Overhaul",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus focus:ring-1 focus:ring-accent/30 transition-colors"})]}),o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("label",{className:"text-xs font-medium text-text-secondary",children:"Content"}),o.jsx("textarea",{value:u,onChange:_=>d(_.target.value),rows:4,placeholder:"Describe what you built, the impact, any metricsâ¦",className:"w-full rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus transition-colors resize-none"})]}),p&&o.jsx("p",{className:"text-xs text-error",children:p})]}),o.jsxs("div",{className:"flex items-center gap-2 px-5 py-3.5 border-t border-border bg-bg-secondary",children:[o.jsx(jt,{variant:"primary",size:"sm",loading:h,onClick:g,disabled:!l.trim()||!i||!u.trim(),children:"Add Project"}),o.jsx(jt,{variant:"ghost",size:"sm",onClick:s,children:"Cancel"})]})]})}function HM({tabs:e,active:t,onTab:n,query:r,onQuery:s,searchPlaceholder:i="Search"}){return o.jsxs("div",{className:"flex items-center gap-0 w-full h-full min-w-0",children:[o.jsx("div",{className:"flex items-center h-full overflow-x-auto no-scrollbar flex-1 min-w-0",children:e.map(a=>o.jsxs("button",{onClick:()=>n(a.key),className:re("relative px-3 h-full text-2xs whitespace-nowrap transition-colors flex-shrink-0",t===a.key?"text-text font-medium":"text-text-tertiary hover:text-text"),children:[a.label,t===a.key&&o.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-accent rounded-full"})]},a.key))}),o.jsxs("div",{className:"relative flex-shrink-0 ml-1",children:[o.jsx(nw,{size:11,className:"absolute left-2 top-1/2 -translate-y-1/2 text-text-tertiary pointer-events-none"}),o.jsx("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:i,className:"pl-6 pr-2 py-1 text-2xs rounded border border-border bg-bg-secondary text-text placeholder:text-text-tertiary focus:outline-none focus:border-border-focus w-28 focus:w-48 transition-all"})]})]})}const gj=["kb"];async function Aie(){const[e,t,n,r]=await Promise.all([G.orgs.list(),G.roles.list(),G.projects.list(),G.stories.list()]);return{orgs:e,roles:t,projects:n,stories:r}}function Iie(){const e=Yt(),{data:t,isLoading:n,error:r,refetch:s}=wt({queryKey:gj,queryFn:Aie,staleTime:5*6e4,placeholderData:g=>g});
679y.useEffect(()=>{t&&!("stories"in t)&&s()},[t,s]);const i=(t==null?void 0:t.orgs)??[],a=(t==null?void 0:t.roles)??[],l=(t==null?void 0:t.projects)??[],c=(t==null?void 0:t.stories)??[],u=y.useCallback(g=>{e.setQueryData(gj,b=>b&&g(b))},[e]),d=y.useCallback(async()=>{await s()},[s]),h=vn({mutationFn:g=>G.orgs.delete(g),onSuccess:(g,b)=>{u(_=>({..._,orgs:_.orgs.filter(k=>k.org_id!==b)}))}}),f=vn({mutationFn:g=>G.roles.delete(g),onSuccess:(g,b)=>{u(_=>({..._,roles:_.roles.filter(k=>k.role_id!==b)}))}}),p=vn({mutationFn:g=>G.projects.delete(g),onSuccess:(g,b)=>{u(_=>({..._,projects:_.projects.filter(k=>k.project_id!==b)}))}}),m=vn({mutationFn:g=>G.stories.delete(g),onSuccess:(g,b)=>{u(_=>({..._,stories:_.stories.filter(k=>k.project_id!==b)}))}}),x=y.useCallback(async(g,b)=>{u(_=>({..._,projects:_.projects.map(k=>k.project_id===g?{...k,is_pinned:b}:k)})),await G.projects.pin(g,b)},[u]),w=y.useCallback(async(g,b)=>{u(_=>({..._,stories:_.stories.map(k=>k.project_id===g?{...k,is_pinned:b}:k)})),await G.stories.pin(g,b)},[u]);return{orgs:i,roles:a,projects:l,stories:c,loading:n&&!t,error:r?r.message:null,refresh:d,deleteOrg:g=>h.mutateAsync(g),deleteRole:g=>f.mutateAsync(g),deleteProject:g=>p.mutateAsync(g),deleteStory:g=>m.mutateAsync(g),pinProject:x,pinStory:w}}function Pie(e){return{...e,item_type:e.item_type??"project",project_id:e.project_id}}function Die(e){return{...e,item_type:"story",project_id:e.project_id,org_id:null,tools:[],raw_updated_at:null}}function Oie({label:e,checked:t,onChange:n}){return o.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none group",children:[o.jsx("button",{role:"switch","aria-checked":t,onClick:()=>n(!t),className:re("relative inline-flex h-4 w-7 shrink-0 rounded-full border transition-colors focus:outline-none",t?"bg-text-tertiary border-text-tertiary":"bg-bg-active border-border"),children:o.jsx("span",{className:re("inline-block h-3 w-3 rounded-full bg-white shadow transition-transform mt-0.5",t?"translate-x-3.5":"translate-x-0.5")})}),o.jsx("span",{className:"text-2xs text-text-tertiary group-hover:text-text-secondary transition-colors",children:e})]})}function Mie(){return o.jsx("span",{className:"inline-flex items-center gap-0.5",children:[0,1,2].map(e=>o.jsx(se.span,{className:"w-1 h-1 rounded-full bg-current",animate:{opacity:[.3,1,.3]},transition:{duration:1,repeat:1/0,delay:e*.2,ease:"easeInOut"}},e))})}function Rie({project:e,active:t,onClick:n,onRename:r,onDelete:s}){const[i,a]=y.useState(!1),[l,c]=y.useState({top:0,right:0}),[u,d]=y.useState(!1),[h,f]=y.useState(e.name),p=y.useRef(null),m=y.useRef(null);y.useEffect(()=>{u&&setTimeout(()=>{var g;return(g=m.current)==null?void 0:g.focus()},0)},[u]);const x=()=>{h.trim()&&h.trim()!==e.name&&r(h.trim()),d(!1)},w=g=>{g.stopPropagation(),p.current&&c(Mw(p.current)),a(b=>!b)};return u?o.jsx("div",{className:"pl-4 pr-2 py-0.5",children:o.jsx("input",{ref:m,value:h,onChange:g=>f(g.target.value),onKeyDown:g=>{g.key==="Enter"&&x(),g.key==="Escape"&&(f(e.name),d(!1))},onBlur:x,className:"w-full text-sm bg-bg border border-accent/50 rounded px-1.5 py-0.5 text-text focus:outline-none"})}):o.jsxs("div",{className:`group relative flex items-center w-full pl-4 pr-2 py-1 rounded transition-colors cursor-pointer ${t?"bg-bg-active":"hover:bg-bg-hover"}`,children:[o.jsxs("button",{onClick:n,className:"flex-1 flex items-center gap-1.5 min-w-0 text-left",children:[o.jsx(Z2,{size:10,className:"shrink-0 opacity-60 text-text-tertiary"}),o.jsx("span",{className:`flex-1 text-sm truncate ${t?"text-text font-medium":"text-text-tertiary"}`,children:e.name})]}),o.jsx("div",{className:"shrink-0 flex items-center relative",children:o.jsx("div",{className:"absolute right-0 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 flex items-center transition-opacity",children:o.jsx("button",{ref:p,onClick:w,className:"p-0.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(Su,{size:12})})})}),Er.createPortal(o.jsx(He,{children:i&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-toast",onClick:()=>a(!1)}),o.jsxs(se.div,{initial:{opacity:0,scale:.95,y:-4}
679,animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-4},transition:{duration:.1},style:{position:"fixed",top:l.top,right:l.right},className:"z-toast w-36 bg-bg border border-border rounded-lg shadow-lg py-1 overflow-hidden",children:[o.jsxs("button",{onClick:()=>{a(!1),d(!0)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:text-text hover:bg-bg-secondary transition-colors",children:[o.jsx(qn,{size:11})," Rename"]}),o.jsxs("button",{onClick:()=>{a(!1),s()},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-error hover:bg-error/10 transition-colors",children:[o.jsx(Yn,{size:11})," Delete"]})]})]})}),document.body)]})}function WM({role:e,filter:t,onChange:n,onEditRole:r,onDeleteRole:s}){const[i,a]=y.useState(!1),[l,c]=y.useState({top:0,right:0}),u=t.type==="role"&&t.id===e.role_id,d=y.useRef(null),h=f=>{f.stopPropagation(),d.current&&c(Mw(d.current)),a(p=>!p)};return o.jsxs("div",{children:[o.jsxs("div",{className:`group flex items-center w-full pl-3 pr-1 py-1 rounded transition-colors cursor-pointer ${u?"bg-bg-active":"hover:bg-bg-hover"}`,children:[o.jsx("button",{onClick:()=>n({type:"role",id:e.role_id}),className:"flex-1 flex items-center min-w-0 text-left py-0.5 pl-0.5",children:o.jsx("span",{className:`flex-1 text-sm truncate leading-snug ${u?"text-text font-medium":"text-text-secondary"}`,children:e.title})}),o.jsx("div",{className:"shrink-0 flex items-center relative",children:o.jsx("div",{className:"absolute right-0 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 flex items-center transition-opacity",children:o.jsx("button",{ref:d,onClick:h,className:"p-1 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(Su,{size:12})})})})]}),Er.createPortal(o.jsx(He,{children:i&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-toast",onClick:()=>a(!1)}),o.jsxs(se.div,{initial:{opacity:0,scale:.95,y:-4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-4},transition:{duration:.1},style:{position:"fixed",top:l.top,right:l.right},className:"z-toast w-36 bg-bg border border-border rounded-lg shadow-lg py-1 overflow-hidden",children:[o.jsxs("button",{onClick:()=>{a(!1),r(e)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:text-text hover:bg-bg-secondary transition-colors",children:[o.jsx(qn,{size:11})," Edit"]}),o.jsxs("button",{onClick:()=>{a(!1),s(e.role_id)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-error hover:bg-error/10 transition-colors",children:[o.jsx(Yn,{size:11})," Delete"]})]})]})}),document.body)]})}function Lie({orgs:e,sortedRoles:t,filter:n,onChange:r,setModal:s,handleDeleteOrg:i,handleDeleteRole:a}){const[l,c]=y.useState(()=>[...e].sort((p,m)=>(p.sort_order??0)-(m.sort_order??0)));y.useEffect(()=>{c([...e].sort((p,m)=>(p.sort_order??0)-(m.sort_order??0)))},[e]);const u=y.useRef(null),d=p=>{u.current=p},h=(p,m)=>{p.preventDefault();const x=u.current;if(x===null||x===m)return;const w=[...l],[g]=w.splice(x,1);w.splice(m,0,g),u.current=m,c(w)},f=async()=>{u.current=null,await Promise.all(l.map((p,m)=>G.orgs.update(p.org_id,{sort_order:m})))};return o.jsx("div",{className:"px-2 space-y-0.5",children:l.map((p,m)=>o.jsx("div",{draggable:!0,onDragStart:()=>d(m),onDragOver:x=>h(x,m),onDragEnd:f,className:"cursor-grab active:cursor-grabbing",children:o.jsx(Fie,{org:p,orgRoles:t.filter(x=>x.org_id===p.org_id),filter:n,onChange:r,onAddRole:x=>s({mode:"role",orgId:x}),onEditOrg:x=>s({mode:"edit_org",org:x}),onDeleteOrg:i,onEditRole:x=>s({mode:"edit_role",role:x}),onDeleteRole:a})},p.org_id))})}function Fie({org:e,orgRoles:t,filter:n,onChange:r,onAddRole:s,onEditOrg:i,onDeleteOrg:a,onEditRole:l,onDeleteRole:c}){const[u,d]=y.useState(!0),[h,f]=y.useState(!1),[p,m]=y.useState(!1),[x,w]=y.useState({top:0,right:0}),g=y.useRef(null),b=_=>{_.stopPropagation(),g.current&&w(Mw(g.current)),m(k=>!k)};return o.jsxs("div",{children:[o.jsxs("div",{className:"group flex items-center gap-1.5 w-full px-2 py-1.5 hover:bg-bg-hover rounded transition-colors",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[o.jsx("button",{onClick:()=>d(_=>!_),className:"w-4 h-4 shrink-0 flex items-center justify-center",children:e.logo_url&&!h?o.jsx("img",{src:e.logo_url,alt:"",className:"w-4 h-4 rounded-sm object-contain",onError:_=>{_.target.style.display="none"}}):o.jsx(se.div,{animate:{rotate:u?90:0},transition:{duration:.15},children:o.jsx(ma,{size:11,className:"text-text-tertiary/50 group-hover:text-text-tertiary transition-colors"})})}),o.jsx("button",{onClick:()=>d(_=>!_),className:"flex-1 text-left min-w-0",children:o.jsx("span",{className:"text-xs font-medium truncate block text-text-tertiary",children:e.name})}),o.jsxs("div",{className:"opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 flex items-center shrink-0 transition-opacity",children:[o.jsx("button",{ref:g,onClick:b,className:"p-0.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(Su,{size:12})}),o.jsx("button",{onClick:_=>{_.stopPropagation(),s(e.org_id)},className:"p-0.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",title:"New role",children:o.jsx(us,{size:11})})]})]}),Er.createPortal(o.jsx(He,{children:p&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-toast",onClick:()=>m(!1)}),o.jsxs(se.div,{initial:{opacity:0,scale:.95,y:-4}
679,animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-4},transition:{duration:.1},style:{position:"fixed",top:x.top,right:x.right},className:"z-toast w-36 bg-bg border border-border rounded-lg shadow-lg py-1 overflow-hidden",children:[o.jsxs("button",{onClick:()=>{m(!1),i(e)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-text-secondary hover:text-text hover:bg-bg-secondary transition-colors",children:[o.jsx(qn,{size:11})," Edit"]}),o.jsxs("button",{onClick:()=>{m(!1),a(e.org_id)},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-error hover:bg-error/10 transition-colors",children:[o.jsx(Yn,{size:11})," Delete"]})]})]})}),document.body),o.jsx(He,{initial:!1,children:u&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15,ease:"easeInOut"},className:"overflow-hidden",children:o.jsxs("div",{className:"pb-1",children:[t.map(_=>o.jsx(WM,{role:_,filter:n,onChange:r,onEditRole:l,onDeleteRole:c},_.role_id)),t.length===0&&o.jsx("p",{className:"pl-7 py-1 text-xs text-text-tertiary/40 italic",children:"No roles yet"})]})})})]})}const Bie=240,Uie=160,$ie=400;function zie(){const[e,t]=y.useState(null),[n,r]=y.useState(""),[s,i]=y.useState(!1),[a,l]=y.useState(""),[c,u]=y.useState(!1),[d,h]=y.useState(!1),[f,p]=y.useState(null),m=y.useRef(null);y.useEffect(()=>{G.userProfile.get().then(k=>{t((k==null?void 0:k.about)??""),r(typeof(k==null?void 0:k.bio_context)=="string"?k.bio_context:"")}).catch(()=>t(""))},[]);function x(k){u(!1),m.current&&clearTimeout(m.current),m.current=setTimeout(async()=>{await G.userProfile.update({bio_context:k}),u(!0),setTimeout(()=>u(!1),2e3)},800)}function w(){l(n),i(!0)}function g(){i(!1),l("")}function b(){r(a),x(a),i(!1),l("")}async function _(){h(!0),p(null);try{const k=await G.userProfile.regenerateBio();t(k.about)}catch{p("Regeneration failed. Try again.")}finally{h(!1)}}return o.jsx("div",{className:"flex flex-col h-full",children:o.jsxs("div",{className:"flex-1 overflow-y-auto px-4 sm:px-6 py-8 flex flex-col gap-10 max-w-2xl mx-auto w-full",children:[o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"font-serif text-2xl text-text",children:"About me"}),o.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:"Synthesized from your projects, stories, and context below."})]}),o.jsxs("button",{onClick:_,disabled:d,className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text border border-border rounded px-2.5 py-1.5 hover:bg-bg-hover transition-colors disabled:opacity-40 shrink-0 mt-1",children:[o.jsx(ju,{size:12,className:d?"animate-spin":""}),d?"Regeneratingâ¦":"Regenerate"]})]}),f&&o.jsx("p",{className:"text-xs text-error bg-error/5 border border-error/20 rounded-lg px-3 py-2",children:f}),e===null?null:e?o.jsx("div",{className:"prose prose-sm prose-stone max-w-none text-text-secondary",children:o.jsx(mo,{children:e})}):o.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-center",children:[o.jsx("p",{className:"text-sm text-text-secondary",children:"No bio yet."}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Hit Regenerate to synthesize one from your projects and stories."})]})]}),o.jsxs("div",{className:"border-t border-border pt-8 flex flex-col gap-4",children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:qt,children:"Your context"}),o.jsx("p",{className:"text-xs text-text-tertiary/70 mt-0.5",children:"Things your projects don't capture â how you work, what you're looking for, where you're headed. Feeds every regeneration. Update via chat too."})]}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c&&!s&&o.jsx("span",{className:"text-xs text-text-tertiary/60",children:"Saved"}),!s&&o.jsxs("button",{onClick:w,className:"flex items-center gap-1 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(qn,{size:11})," Edit"]})]})]}),s?o.jsxs("div",{className:"flex flex-col gap-3",children:[o.jsx("textarea",{value:a,onChange:k=>{l(k.target.value),k.target.style.height="auto",k.target.style.height=k.target.scrollHeight+"px"},autoFocus:!0,rows:6,placeholder:`How you work, what you're looking for, where you're headed. 680 681Supports markdown.`,className:"w-full bg-bg border border-border rounded px-3 py-2.5 text-sm text-text placeholder:text-text-tertiary/40 focu
681s:outline-none focus:border-accent transition-colors resize-none overflow-hidden leading-relaxed font-mono"}),o.jsxs("div",{className:"flex gap-2 justify-end",children:[o.jsx("button",{onClick:g,className:"text-xs text-text-tertiary hover:text-text px-3 py-1.5",children:"Cancel"}),o.jsx("button",{onClick:b,className:"text-xs bg-accent text-bg px-3 py-1.5 rounded-lg hover:bg-accent-hover transition-colors",children:"Save"})]})]}):n?o.jsx("div",{className:"prose prose-sm prose-stone max-w-none text-text-secondary cursor-pointer hover:opacity-80 transition-opacity",onClick:w,children:o.jsx(mo,{children:n})}):o.jsx("button",{onClick:w,className:"text-sm text-text-tertiary/60 hover:text-text-tertiary text-left transition-colors",children:"Add contextâ¦"})]})]})})}function Hie({filter:e,onChange:t,onReset:n,roles:r,orgs:s,projects:i,onRefresh:a,collapsed:l,onToggleCollapsed:c,mobileOpen:u,onMobileClose:d}){const[h,f]=y.useState(!1),[p,m]=y.useState(null),[x,w]=y.useState(Bie),g=y.useRef(null),b=y.useRef(!1),_=y.useRef(0),k=y.useRef(0),T=y.useCallback(R=>{R.preventDefault(),b.current=!0,_.current=R.clientX,k.current=x;const B=U=>{if(!b.current)return;const H=U.clientX-_.current;w(Math.min($ie,Math.max(Uie,k.current+H)))},O=()=>{b.current=!1,window.removeEventListener("mousemove",B),window.removeEventListener("mouseup",O)};window.addEventListener("mousemove",B),window.addEventListener("mouseup",O)},[x]);y.useEffect(()=>{if(!h)return;const R=B=>{g.current&&!g.current.contains(B.target)&&f(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[h]);const N=y.useMemo(()=>[...r].sort((R,B)=>(B.start_date??"").localeCompare(R.start_date??"")),[r]),C=y.useMemo(()=>i.filter(R=>!R.role_id),[i]),S=async()=>{await a(),m(null)},I=R=>{a(),m({mode:"role",orgId:R.org_id,extraOrg:R})},E=async R=>{await G.orgs.delete(R),await a()},j=async R=>{await G.roles.delete(R),await a()},P=async R=>{await G.projects.delete(R),await a()},L=async(R,B)=>{await G.projects.update(R,{name:B}),await a()},z=R=>o.jsxs("div",{className:"flex flex-col h-full border-r border-border bg-bg-secondary shrink-0 overflow-hidden",style:R?{}:{width:x},children:[o.jsx(lw,{label:o.jsx("button",{onClick:n,className:"px-1 text-sm font-semibold text-text hover:text-accent transition-colors",children:"Experience"}),actions:o.jsxs("div",{ref:g,className:"relative",children:[o.jsx("button",{onClick:()=>f(B=>!B),className:`p-1 rounded transition-colors ${h?"bg-bg-active text-text":"text-text-tertiary hover:text-text hover:bg-bg-active"}`,children:o.jsx(us,{size:13})}),o.jsx(He,{children:h&&o.jsx(se.div,{initial:{opacity:0,scale:.95,y:-4},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:-4},transition:{duration:.12},className:"absolute right-0 top-full mt-1 w-44 bg-bg border border-border rounded-lg shadow-lg z-50 py-1 overflow-hidden",children:[{icon:mx,label:"New Organization",action:()=>m({mode:"org"})},{icon:px,label:"New Role",action:()=>m({mode:"role"})},{icon:Z2,label:"New Item",action:()=>m({mode:"project"})}].map(({icon:B,label:O,action:U})=>o.jsxs("button",{onClick:()=>{f(!1),U()},className:"w-full flex items-center gap-2.5 px-3 py-2 text-xs text-text-secondary hover:text-text hover:bg-bg-secondary transition-colors",children:[o.jsx(B,{size:12,className:"text-text-tertiary shrink-0"}),O]},O))})})]}),onCollapse:R??c,collapseIcon:R?"x":"chevron"}),o.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:o.jsxs("div",{className:"py-1.5",children:[o.jsx("div",{className:"px-2 mb-1",children:o.jsx("button",{onClick:()=>{t({type:"about"}),R==null||R()},className:`w-full flex items-center gap-2 px-2 py-1.5 rounded text-sm transition-colors text-left ${e.type==="about"?"bg-bg-active text-text font-medium":"text-text-secondary hover:text-text hover:bg-bg-hover"}`,children:o.jsx("span",{className:"flex-1",children:"About me"})})}),o.jsx(Lie,{orgs:s,sortedRoles:N,filter:e,onChange:B=>{t(B),R==null||R()},setModal:m,handleDeleteOrg:E,handleDeleteRole:j}),N.filter(B=>!s.find(O=>O.org_id===B.org_id)).map(B=>o.jsx("div",{className:"px-2 mt-0.5",children:o.jsx(WM,{role:B,filter:e,onChange:O=>{t(O),R==null||R()},onEditRole:O=>m({mode:"edit_role",role:O}),onDeleteRole:j})},B.role_id)),C.length>0&&o.jsxs("div",{className:"px-2 mt-2",children:[o.jsx("p",{className:"text-xs uppercase tracking-widest text-text-tertiary/50 px-2 py-1 font-medium",children:"Items"}),C.map(B=>o.jsx(Rie,{project:B,active:e.type==="project"&&e.id===B.project_id,onClick:()=>{t({type:"project",id:B.project_id}),R==null||R()},onRename:O=>L(B.project_id,O),onDelete:()=>P(B.project_id)},B.project_id))]})]})})]});return o.jsxs(o.Fragment,{children:[o.jsx(He,{children:p&&o.jsx(Tie,{mode:p.mode,orgId:p.mode==="role"?p.orgId:void 0,roleId:p.mode==="project"?p.roleId:void 0,editOrg:p.mode==="edit_org"?p.org:void 0,editRole:p.mode==="edit_role"?p.role:void 0,orgs:p.mode==="role"&&p.extraOrg&&!s.find(R=>R.org_id===p.extraOrg.org_id)?[p.extraOrg,...s]:s,roles:r,onSaved:S,onOrgCreated:I,onClose:()=>m(null)})}),l?o.jsx("button",{onClick:c,className:"hidden sm:flex shrink-0 w-6 items-center justify-center border-r border-border bg-bg-secondary hover:bg-bg-hover transition-colors self-stretch",title:"Expand sidebar",children:o.jsx(ma,{size:13,className:"text-text-tertiary"})}):o.jsx("div",{className:"hidden sm:block shrink-0",style:{width:x},children:z()}),!l&&o.jsx("div",{className:"hidden sm:block w-0 cursor-col-resize shrink-0 relative",onMouseDown:T,children:o.jsx("div",{className:"absolute inset-y-0 -left-1 w-3 hover:bg-accent/20 transition-colors"})}),o.jsx(Du,{open:u,onClose:d,side:"bottom",mobileOnly:!0,maxHeightMobile:"80dvh",children:z(d)})]})}function Wie({item:e,active:t,onClick:n}){return o.jsxs("div",{onClick:n,className:`group px-4 py-3 border-b border-border
681cursor-pointer transition-colors ${t?"bg-bg-active":"hover:bg-bg-hover"}`,children:[o.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[o.jsx("p",{className:"text-sm font-medium text-text leading-snug truncate flex-1",children:e.name}),o.jsx("span",{className:"shrink-0 text-2xs text-text-tertiary/50",children:Rw(e.created_at)})]}),e.description&&o.jsx("p",{className:"text-xs text-text-secondary leading-relaxed line-clamp-1",children:e.description})]})}function xj({item:e,roles:t,orgs:n,onClose:r,onDelete:s,onRefresh:i,onPin:a}){var Et,fn;const[l,c]=y.useState(e.item_type),u=l==="project",[d,h]=y.useState(e.role_id??""),f=t.find(K=>K.role_id===d),p=e.org_id??(f==null?void 0:f.org_id),m=n.find(K=>K.org_id===p),[x,w]=y.useState(!(e.exclude_from_outputs??!1)),[g,b]=y.useState(!1),[_,k]=y.useState(!1),[T,N]=y.useState(e.name),C=y.useRef(null),S=async()=>{k(!1),T.trim()&&T.trim()!==e.name?(await G.projects.update(e.project_id,{name:T.trim()}),i==null||i()):N(e.name)},I=(e.facts??{})._signals,E=e.description?I!==void 0&&!I.has_numbers&&!I.has_superlative&&!I.has_external_validation:!1,[j,P]=y.useState(e.description??""),[L,z]=y.useState(e.facts??{}),[R,B]=y.useState(!1),O=async()=>{B(!0);try{const K=await G.projects.synthesize(e.project_id);P(K.description),z(K.facts),i==null||i()}finally{B(!1)}},[U,H]=y.useState(!1),[A,q]=y.useState(null),[V,D]=y.useState(!1),[te,J]=y.useState(null),[ue,Ne]=y.useState(""),[Ie,Pe]=y.useState(!1),Ue=async K=>{Pe(!0);try{await G.projects.updateSection(e.project_id,K,ue),q(ge=>ge&&ge.map(Te=>Te.heading===K?{...Te,content:ue}:Te)),J(null),i==null||i()}finally{Pe(!1)}},[ot,Ye]=y.useState(!1),[ae,Ge]=y.useState(!1),[nt,De]=y.useState(e.raw_content??""),[Gt,Lt]=y.useState(!1),St=async()=>{Lt(!0);try{await G.stories.update(e.project_id,{raw_content:nt}),Ge(!1),i==null||i()}finally{Lt(!1)}},[rn,Kt]=y.useState(!1),[sn,le]=y.useState(null),[Fn,It]=y.useState(!1),[Z,de]=y.useState(null),Re=async()=>{if(sn===null){It(!0);try{const K=await G.projects.versions.list(e.project_id);le(K)}finally{It(!1)}}},Ve=()=>{rn||Re(),Kt(K=>!K)},Je=async K=>{de(K);try{await G.projects.versions.restore(e.project_id,K),le(null),i==null||i()}finally{de(null)}},Ft=async K=>{h(K),await G.projects.update(e.project_id,{role_id:K||null}),i==null||i()};return o.jsxs("div",{className:"h-full flex flex-col bg-bg overflow-hidden",children:[o.jsxs("div",{className:"flex items-center gap-2 px-4 h-10 border-b border-border shrink-0",children:[_?o.jsx("input",{ref:C,value:T,onChange:K=>N(K.target.value),onBlur:S,onKeyDown:K=>{K.key==="Enter"&&S(),K.key==="Escape"&&(N(e.name),k(!1))},className:"flex-1 text-sm font-medium text-text bg-transparent border-b border-accent focus:outline-none min-w-0",autoFocus:!0}):o.jsx("span",{className:"text-sm font-medium text-text flex-1 truncate cursor-text hover:text-text-secondary transition-colors",onClick:()=>{k(!0),setTimeout(()=>{var K;return(K=C.current)==null?void 0:K.select()},0)},title:"Click to rename",children:e.name}),a&&o.jsx("button",{onClick:()=>a(!e.is_pinned),className:re("p-1 rounded transition-colors",e.is_pinned?"text-accent hover:text-text-tertiary":"text-text-tertiary hover:text-accent"),title:e.is_pinned?"Unpin":"Pin as top achievement",children:o.jsx(EH,{size:13,fill:e.is_pinned?"currentColor":"none"})}),o.jsxs("div",{className:"relative",children:[o.jsx("button",{onClick:()=>b(K=>!K),className:"p-1 rounded text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(Su,{size:13})}),g&&o.jsxs("div",{className:"absolute right-0 top-7 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[200px]",onClick:K=>K.stopPropagation(),children:[o.jsxs("div",{className:"px-3 pt-2 pb-1",children:[o.jsx("p",{className:"text-2xs text-text-tertiary mb-1.5",children:"Type"}),o.jsx("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg border border-border bg-bg-secondary",children:["project","story"].map(K=>o.jsxs("button",{onClick:async()=>{K!==l&&(c(K),await G.projects.convert(e.project_id),i==null||i())},className:re("relative flex-1 h-7 rounded text-xs font-medium transition-colors capitalize",l===K?"text-text":"text-text-tertiary hover:text-text"),children:[l===K&&o.jsx(se.div,{layoutId:"item-type-indicator",className:"absolute inset-0 bg-bg-active rounded",style:{zIndex:0},transition:{type:"spring",stiffness:400,damping:35}}),o.jsx("span",{className:"relative z-10",children:K})]},K))})]}),o.jsx("div",{className:"px-3 py-2",children:o.jsx(Oie,{label:"Include in outputs",checked:x,onChange:async K=>{w(K),await G.projects.setVisibility(e.project_id,{exclude_from_outputs:!K,show_in_projects:K?l==="project":!1,exclude_from_work:!K})}})}),s&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"border-t border-border my-1"}),o.jsxs("button",{onClick:()=>{b(!1),s()},className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-error hover:bg-error/10 transition-colors",children:[o.jsx(Yn,{size:11}),"Delete"]})]})]})]}),o.jsx("button",{onClick:r,className:"p-1 rounded text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(mt,{size:14})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[o.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[m&&o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs bg-bg-secondary border border-border rounded-full px-2.5 py-0.5 text-text-secondary",children:[o.jsx(mx,{size:10,
681className:"shrink-0"}),m.name]}),o.jsxs("div",{className:"inline-flex items-center gap-1 text-xs bg-bg-secondary border border-border rounded-full px-2 py-0.5 text-text-secondary w-fit",children:[o.jsx(px,{size:10,className:"shrink-0 text-text-tertiary"}),o.jsxs("select",{value:d,onChange:K=>Ft(K.target.value),className:"bg-transparent text-xs text-text-secondary focus:outline-none cursor-pointer max-w-[160px]",children:[o.jsx("option",{value:"",children:"No role"}),t.filter(K=>K.org_id).map(K=>o.jsx("option",{value:K.role_id,children:K.title},K.role_id))]})]})]}),o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("p",{className:qt,children:["Summary ",o.jsx("span",{className:"normal-case font-normal text-text-tertiary",children:"· AI generated"})]}),E&&o.jsx("span",{className:"text-2xs bg-warning/15 text-warning border border-warning/30 rounded px-1.5 py-0.5 leading-none",children:"needs more detail"})]}),j?o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:j}):e.raw_content?o.jsx("button",{onClick:O,disabled:R,className:"text-xs text-accent hover:opacity-80 transition-opacity disabled:opacity-40",children:R?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"mr-1",children:"Generating"}),o.jsx(Mie,{})]}):"Generate summary"}):null]}),Object.entries(L).filter(([K])=>!K.startsWith("_")).length>0&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("p",{className:qt,children:"Key metrics"}),o.jsx("div",{className:"grid grid-cols-1 gap-1",children:Object.entries(L).filter(([K])=>!K.startsWith("_")).map(([K,ge])=>o.jsxs("div",{className:"flex items-baseline gap-2 text-xs",children:[o.jsx("span",{className:"text-text-tertiary shrink-0 min-w-0 truncate",children:K.replace(/_/g," ")}),o.jsx("span",{className:"border-b border-dashed border-border flex-1 min-w-2"}),o.jsx("span",{className:"text-text font-medium shrink-0",children:String(ge)})]},K))})]}),(((Et=e.tools)==null?void 0:Et.length)>0||((fn=e.tags)==null?void 0:fn.length)>0)&&o.jsxs("div",{className:"space-y-1.5",children:[o.jsx("p",{className:qt,children:"Tags"}),o.jsx("div",{className:"flex flex-wrap gap-1",children:[...e.tools??[],...e.tags??[]].map(K=>o.jsx("span",{className:"text-2xs bg-bg-secondary border border-border rounded px-1.5 py-0.5 text-text-secondary",children:K},K))})]}),u?o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("button",{onClick:async()=>{const K=!U;if(H(K),K&&A===null&&!V){D(!0);try{const ge=await G.projects.sections(e.project_id);q(ge.sections)}catch{q([])}finally{D(!1)}}},className:"flex items-center gap-1.5 text-2xs font-medium text-text-tertiary uppercase tracking-wider hover:text-text transition-colors",children:[o.jsx(Rr,{size:10}),"Content",o.jsx(tn,{size:10,className:`transition-transform ${U?"rotate-180":""}`})]}),U&&o.jsx("div",{className:"space-y-3",children:V?o.jsx("p",{className:"text-xs text-text-tertiary",children:"Loadingâ¦"}):A&&A.length>0?A.map(({heading:K,content:ge})=>o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("p",{className:"text-2xs font-medium text-text-secondary uppercase tracking-wider flex-1",children:K}),te!==K&&o.jsx("button",{onClick:()=>{Ne(ge),J(K)},className:"text-2xs text-text-tertiary hover:text-accent transition-colors",children:o.jsx(qn,{size:11})})]}),te===K?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{value:ue,onChange:Te=>Ne(Te.target.value),rows:8,className:"w-full text-xs bg-bg-secondary border border-border rounded-lg p-3 text-text font-mono resize-y focus:outline-none focus:ring-1 focus:ring-accent"}),o.jsxs("div",{className:"flex gap-2 justify-end",children:[o.jsx("button",{onClick:()=>J(null),className:"text-xs text-text-tertiary hover:text-text transition-colors px-2 py-1",children:"Cancel"}),o.jsx("button",{onClick:()=>Ue(K),disabled:Ie,className:"text-xs bg-accent text-bg rounded px-3 py-1 hover:bg-accent-hover transition-colors disabled:opacity-50",children:Ie?"Savingâ¦":"Save & synthesize"})]})]}):o.jsx("div",{className:"prose prose-sm prose-stone max-w-none text-text-secondary",children:o.jsx(mo,{children:ge})})]},K)):o.jsx("p",{className:"text-xs text-text-tertiary italic",children:"No content yet â ask the chat to add some."})})]}):o.jsxs("div",{className:"space-y-1.5 border-t border-border-subtle pt-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>Ye(K=>!K),className:"flex items-center gap-1.5 text-2xs font-medium text-text-tertiary uppercase tracking-wider hover:text-text transition-colors flex-1",children:[o.jsx(Rr,{size:10}
681),"Content",o.jsx(tn,{size:10,className:`transition-transform ${ot?"rotate-180":""}`})]}),ot&&!ae&&o.jsx("button",{onClick:()=>{De(e.raw_content??""),Ge(!0)},className:"text-2xs text-text-tertiary hover:text-accent transition-colors",children:o.jsx(qn,{size:11})})]}),ot&&o.jsx("div",{className:"space-y-2",children:ae?o.jsxs(o.Fragment,{children:[o.jsx("textarea",{value:nt,onChange:K=>De(K.target.value),rows:12,className:"w-full text-xs bg-bg-secondary border border-border rounded-lg p-3 text-text font-mono resize-y focus:outline-none focus:ring-1 focus:ring-accent"}),o.jsxs("div",{className:"flex gap-2 justify-end",children:[o.jsx("button",{onClick:()=>Ge(!1),className:"text-xs text-text-tertiary hover:text-text transition-colors px-2 py-1",children:"Cancel"}),o.jsx("button",{onClick:St,disabled:Gt,className:"text-xs bg-accent text-bg rounded px-3 py-1 hover:bg-accent-hover transition-colors disabled:opacity-50",children:Gt?"Savingâ¦":"Save & synthesize"})]})]}):e.raw_content?o.jsx("div",{className:"prose prose-sm prose-stone max-w-none text-text-secondary",children:o.jsx(mo,{children:e.raw_content})}):o.jsx("p",{className:"text-xs text-text-tertiary italic",children:"No content yet â ask the chat to add some."})})]}),u&&o.jsxs("div",{className:"space-y-1.5 border-t border-border-subtle pt-3",children:[o.jsxs("button",{onClick:Ve,className:"flex items-center gap-1.5 text-2xs font-medium text-text-tertiary uppercase tracking-wider hover:text-text transition-colors",children:[o.jsx(mg,{size:10}),"Version history",o.jsx(tn,{size:10,className:`transition-transform ${rn?"rotate-180":""}`})]}),o.jsx(He,{initial:!1,children:rn&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.15,ease:"easeInOut"},className:"overflow-hidden",children:Fn?o.jsx("p",{className:"text-xs text-text-tertiary py-2",children:"Loadingâ¦"}):!sn||sn.length===0?o.jsx("p",{className:"text-xs text-text-tertiary py-2",children:"No saved versions yet. Versions are created automatically when you edit content via Claude."}):o.jsx("div",{className:"space-y-1 pt-1",children:sn.map(K=>o.jsxs("div",{className:"flex items-center gap-2 py-1.5 px-2 rounded hover:bg-bg-secondary transition-colors group",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs text-text-secondary truncate",children:K.note||`Version ${K.version_num}`}),o.jsx("p",{className:"text-2xs text-text-tertiary",children:new Date(K.snapshotted_at).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})})]}),o.jsxs("button",{onClick:()=>Je(K.version_num),disabled:Z===K.version_num,className:"shrink-0 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 flex items-center gap-1 px-2 py-1 rounded text-2xs text-text-tertiary hover:text-accent hover:bg-accent/10 transition-all disabled:opacity-40",title:`Restore to version ${K.version_num}`,children:[o.jsx(E4,{size:10}),Z===K.version_num?"Restoringâ¦":"Restore"]})]},K.version_num))})})})]})]})]})}function Vie(){const{orgs:e,roles:t,projects:n,stories:r,loading:s,refresh:i,pinProject:a,pinStory:l,deleteProject:c,deleteStory:u}=Iie(),{isNewUser:d}=Mf(),h=y.useMemo(()=>{const B=n.map(Pie),O=new Set(n.map(H=>H.project_id)),U=r.filter(H=>!O.has(H.project_id)).map(Die);return[...B,...U].sort((H,A)=>A.created_at.localeCompare(H.created_at))},[n,r]),[f,p]=y.useState({type:"all"}),[m,x]=y.useState(null),[w,g]=y.useState(null),[b,_]=y.useState(320),[k,T]=y.useState(!1);y.useEffect(()=>{if(!m)return;const B=h.find(O=>O.project_id===m);B&&g(B)},[h,m]);const N=B=>{const O=h.find(U=>U.project_id===B)??null;x(B),g(O)},C=B=>{B.preventDefault();const O=B.clientX,U=b,H=q=>{const V=O-q.clientX;_(Math.max(240,Math.min(640,U+V)))},A=()=>{window.removeEventListener("mousemove",H),window.removeEventListener("mouseup",A)};window.addEventListener("mousemove",H),window.addEventListener("mouseup",A)},[S,I]=y.useState(!1),{setMobileControls:E}=wx();y.useEffect(()=>(E(o.jsx("button",{onClick:()=>I(!0),className:"p-1.5 rounded-lg text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(tw,{size:16})})),()=>E(null)),[E]);const[j,P]=y.useState("all"),[L,z]=y.useState(""),R=y.useMemo(()=>
681{if(f.type==="about")return[];let B=h;f.type==="role"?B=h.filter(U=>U.role_id===f.id):f.type==="project"&&(B=h.filter(U=>U.project_id===f.id)),j==="projects"?B=B.filter(U=>U.item_type==="project"):j==="stories"&&(B=B.filter(U=>U.item_type==="story"));const O=L.trim();return O?new ps(B,{keys:[{name:"name",weight:.5},{name:"description",weight:.25},{name:"tags",weight:.15},{name:"tools",weight:.1}],threshold:.35,ignoreLocation:!0}).search(O).map(U=>U.item):B},[h,f,L,j]);return o.jsxs("div",{className:"flex h-[calc(100dvh-3rem)] overflow-hidden w-full",children:[o.jsx(Hie,{filter:f,onChange:B=>{p(B)},onReset:()=>{p({type:"all"}),x(null),P("all"),z("")},roles:t,orgs:e,projects:n,onRefresh:i,collapsed:k,onToggleCollapsed:()=>T(B=>!B),mobileOpen:S,onMobileClose:()=>I(!1)}),o.jsxs("div",{className:"flex flex-col flex-1 min-w-0 overflow-hidden",children:[o.jsx("div",{className:"border-b border-border shrink-0 h-10 flex items-center px-3",children:o.jsx(HM,{tabs:[{key:"all",label:"All"},{key:"projects",label:"Projects"},{key:"stories",label:"Stories"}],active:j,onTab:B=>{f.type==="about"&&p({type:"all"}),P(B)},query:L,onQuery:z})}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:s?o.jsx(Uu,{}):f.type==="about"?o.jsx(zie,{}):R.length===0?o.jsx(Og,{icon:Nf,label:j==="stories"?"No stories yet":j==="projects"?"No projects yet":"Nothing here yet",sublabel:f.type==="role"?"No items linked to this role.":d?"Tell Chat about your career to get started.":"Add an item via chat or the + menu.",action:d&&f.type==="all"?o.jsxs(Eo,{to:"/chat?onboard=1",className:"flex items-center gap-1.5 text-xs text-accent hover:opacity-80 transition-opacity",children:["Start building your memory ",o.jsx(Ka,{size:12})]}):void 0}):o.jsx("div",{children:R.map(B=>o.jsx(Wie,{item:B,active:m===B.project_id,onClick:()=>m===B.project_id?x(null):N(B.project_id)},B.project_id))})})]}),o.jsx(He,{children:m&&w&&o.jsxs(se.div,{initial:{opacity:0,width:0},animate:{opacity:1,width:b},exit:{opacity:0,width:0},transition:{duration:.15},className:"hidden sm:flex shrink-0 border-l border-border overflow-hidden bg-bg",children:[o.jsx("div",{onMouseDown:C,className:"w-1 shrink-0 cursor-col-resize hover:bg-accent/40 transition-colors self-stretch",title:"Drag to resize"}),o.jsx("div",{className:"flex-1 overflow-hidden",children:o.jsx(xj,{item:w,roles:t,orgs:e,onClose:()=>x(null),onDelete:async()=>{w.item_type==="project"?await c(m):await u(m),x(null)},onRefresh:i,onPin:B=>{w.item_type==="project"?a(m,B):l(m,B)}},m)})]},"detail-panel")}),o.jsx(Du,{open:!!m&&!!w,onClose:()=>x(null),side:"bottom",mobileOnly:!0,maxHeightMobile:"90dvh",children:m&&w&&o.jsx(xj,{item:w,roles:t,orgs:e,onClose:()=>x(null),onDelete:async()=>{w.item_type==="project"?await c(m):await u(m),x(null)},onRefresh:i,onPin:B=>{w.item_type==="project"?a(m,B):l(m,B)}},m)})]})}function qie(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}const $y={},zd={};function Ki(e,t){try{const r=($y[e]||($y[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return r in zd?zd[r]:yj(r,r.split(":"))}catch{if(e in zd)return zd[e];const n=e==null?void 0:e.match(Yie);return n?yj(e,n.slice(1)):NaN}}const Yie=/([+-]\d\d):?(\d\d)?/;function yj(e,t){const n=+(t[0]||0),r=+(t[1]||0),s=+(t[2]||0)/60;return zd[e]=n*60+r>0?n*60+r+s:n*60-r-s}class wi extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Ki(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])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),VM(this,t)):this.setTime(Date.now())}static tz(t,...n){return n.length?new wi(...n,t):new wi(Date.now(),t)}withTimeZone(t){return new wi(+this,t)}getTimezoneOffset(){const t=-Ki(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Mg(this),+this}[Symbol.for("constructDateFrom")](t){return new wi(+new Date(t),this.timeZone)}}const bj=/^(get|set)(?!UTC)/;
681Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!bj.test(e))return;const t=e.replace(bj,"$1UTC");wi.prototype[t]&&(e.startsWith("get")?wi.prototype[e]=function(){return this.internal[t]()}:(wi.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Gie(this),+this},wi.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Mg(this),+this}))});function Mg(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-Ki(e.timeZone,e)*60))}function Gie(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()),VM(e)}function VM(e,t){const n=Array.isArray(t)?Kie(t):+e.internal,r=Ki(e.timeZone,e),s=r>0?Math.floor(r):Math.ceil(r),i=new Date(+e);i.setUTCHours(i.getUTCHours()-1);const a=-new Date(+e).getTimezoneOffset(),l=-new Date(+i).getTimezoneOffset(),c=a-l;let u=a;if(c&&a!==s){const I=Date.prototype.getHours.apply(e),E=Array.isArray(t)?t[3]||0:e.internal.getUTCHours();if(I!==E){const j=new Date(+e),P=a-s;P&&j.setUTCMinutes(j.getUTCMinutes()+P);const L=Ki(e.timeZone,j);(L>0?Math.floor(L):Math.ceil(L))===s&&(u=l)}}const d=u-s;d&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+d);const h=new Date(+e);h.setUTCSeconds(0);const f=a>0?h.getSeconds():(h.getSeconds()-60)%60,p=Math.round(-(Ki(e.timeZone,e)*60))%60;(p||f)&&Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+p+f);const m=Ki(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),g=-new Date(+e).getTimezoneOffset()-x,b=x!==s,_=g-d,k=x-s,T=n-x*60*1e3,N=k>0&&vj(e)-n===k*60*1e3&&vj(e,T)!==n;if(b&&_&&!N){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+_);const I=Ki(e.timeZone,e),E=I>0?Math.floor(I):Math.ceil(I),j=x-E;j&&_<0&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+j)}Mg(e);const S=(t?n:n+p*1e3)-+e.internal;S&&Math.abs(S)<30*60*1e3&&(Date.prototype.setTime.call(e,+e+S),Mg(e))}function Kie(e){return Date.UTC(e[0],e.length>1?e[1]:0,e.length>2?e[2]:1,...e.slice(3))}function vj(e,t){const n=new Date(t??+e);return n.setUTCSeconds(n.getUTCSeconds()-Math.round(-Ki(e.timeZone,n)*60)),+n}class br extends wi{static tz(t,...n){return n.length?new br(...n,t):new br(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),s=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+s}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,s]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${s}`}
vendor: 10,375 bytes, line 681
681toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,s]=this.tzComponents();return`${t} GMT${n}${r}${s} (${qie(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),s=String(Math.abs(t)%60).padStart(2,"0");return[n,r,s]}withTimeZone(t){return new br(+this,t)}[Symbol.for("constructDateFrom")](t){return new br(+new Date(t),this.timeZone)}}const qM=6048e5,Qie=864e5,_j=Symbol.for("constructDateFrom");function Ln(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&_j in e?e[_j](t):e instanceof Date?new e.constructor(t):new Date(t)}function At(e,t){return Ln(t||e,e)}function YM(e,t,n){const r=At(e,n==null?void 0:n.in);return isNaN(t)?Ln(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function GM(e,t,n){const r=At(e,n==null?void 0:n.in);if(isNaN(t))return Ln(e,NaN);if(!t)return r;const s=r.getDate(),i=Ln(e,r.getTime());i.setMonth(r.getMonth()+t+1,0);const a=i.getDate();return s>=a?i:(r.setFullYear(i.getFullYear(),i.getMonth(),s),r)}let Xie={};function Lf(){return Xie}function yu(e,t){var l,c,u,d;const n=Lf(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=At(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?7:0)+i-r;return s.setDate(s.getDate()-a),s.setHours(0,0,0,0),s}function af(e,t){return yu(e,{...t,weekStartsOn:1})}function KM(e,t){const n=At(e,t==null?void 0:t.in),r=n.getFullYear(),s=Ln(n,0);s.setFullYear(r+1,0,4),s.setHours(0,0,0,0);const i=af(s),a=Ln(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const l=af(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function wj(e){const t=At(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function $u(e,...t){const n=Ln.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function of(e,t){const n=At(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Vw(e,t,n){const[r,s]=$u(n==null?void 0:n.in,e,t),i=of(r),a=of(s),l=+i-wj(i),c=+a-wj(a);return Math.round((l-c)/Qie)}function Jie(e,t){const n=KM(e,t),r=Ln(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),af(r)}function Zie(e,t,n){return YM(e,t*7,n)}function eae(e,t,n){return GM(e,t*12,n)}function tae(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=Ln.bind(null,s));const i=At(s,r);(!n||n<i||isNaN(+i))&&(n=i)}),Ln(r,n||NaN)}function nae(e,t){let n,r=t==null?void 0:t.in;return e.forEach(s=>{!r&&typeof s=="object"&&(r=Ln.bind(null,s));const i=At(s,r);(!n||n>i||isNaN(+i))&&(n=i)}),Ln(r,n||NaN)}function rae(e,t,n){const[r,s]=$u(n==null?void 0:n.in,e,t);return+of(r)==+of(s)}function QM(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function sae(e){return!(!QM(e)&&typeof e!="number"||isNaN(+At(e)))}function XM(e,t,n){const[r,s]=$u(n==null?void 0:n.in,e,t),i=r.getFullYear()-s.getFullYear(),a=r.getMonth()-s.getMonth();return i*12+a}function iae(e,t){const n=At(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function JM(e,t){const[n,r]=$u(e,t.start,t.end);return{start:n,end:r}}function aae(e,t){const{start:n,end:r}=JM(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setDate(1);let l=1;const c=[];for(;+a<=i;)c.push(Ln(n,a)),a.setMonth(a.getMonth()+l);return s?c.reverse():c}function oae(e,t){const n=At(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function lae(e,t){const n=At(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function ZM(e,t){const n=At(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cae(e,t){const{start:n,end:r}=JM(t==null?void 0:t.in,e);let s=+n>+r;const i=s?+n:+r,a=s?r:n;a.setHours(0,0,0,0),a.setMonth(0,1);let l=1;const c=[];for(;+a<=i;)c.push(Ln(n,a)),a.setFullYear(a.getFullYear()+l);return s?c.reverse():c}function e6(e,t){var l,c,u,d;const n=Lf(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=At(e,t==null?void 0:t.in),i=s.getDay(),a=(i<r?-7:0)+6-(i-r);return s.setDate(s.getDate()+a),s.setHours(23,59,59,999),s}function uae(e,t){return e6(e,{...t,weekStartsOn:1})}const dae={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"}},hae=(e,t,n)=>{let r;const s=dae[e];return typeof s=="string"?r=s:t===1?r=s.one:r=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function zy(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const fae={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},pae={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},mae={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},gae={date:zy({formats:fae,defaultWidth:"full"}),time:zy({formats:pae,defaultWidth:"full"}),dateTime:zy({formats:mae,defaultWidth:"full"})},xae={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},yae=(e,t,n,r)=>xae[e];function vd(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):a;s=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;s=e.values[l]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return s[i]}}const bae={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},vae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},_ae={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"]},wae={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Eae={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"}},Nae={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"}},kae=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Tae={ordinalNumber:kae,era:vd({values:bae,defaultWidth:"wide"}),quarter:vd({values:vae,defaultWidth:"wide",argumentCallback:e=>e-1}),month:vd({values:_ae,defaultWidth:"wide"}),day:vd({values:wae,defaultWidth:"wide"}),dayPeriod:vd({values:Eae,defaultWidth:"wide",formattingValues:Nae,defaultFormattingWidth:"wide"})};function _d(e){return(t,n={})=>{const r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;const a=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?Cae(l,h=>h.test(a)):Sae(l,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function Sae(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Cae(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jae(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const s=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const l=t.slice(s.length);return{value:a,rest:l}}}const Aae=/^(\d+)(th|st|nd|rd)?/i,Iae=/\d+/i,Pae={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},Dae={any:[/^b/i,/^(a|c)/i]}
vendor: 8,523 bytes, line 681
681,Oae={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Mae={any:[/1/i,/2/i,/3/i,/4/i]},Rae={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},Lae={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]},Fae={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},Bae={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]},Uae={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},$ae={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}},zae={ordinalNumber:jae({matchPattern:Aae,parsePattern:Iae,valueCallback:e=>parseInt(e,10)}),era:_d({matchPatterns:Pae,defaultMatchWidth:"wide",parsePatterns:Dae,defaultParseWidth:"any"}),quarter:_d({matchPatterns:Oae,defaultMatchWidth:"wide",parsePatterns:Mae,defaultParseWidth:"any",valueCallback:e=>e+1}),month:_d({matchPatterns:Rae,defaultMatchWidth:"wide",parsePatterns:Lae,defaultParseWidth:"any"}),day:_d({matchPatterns:Fae,defaultMatchWidth:"wide",parsePatterns:Bae,defaultParseWidth:"any"}),dayPeriod:_d({matchPatterns:Uae,defaultMatchWidth:"any",parsePatterns:$ae,defaultParseWidth:"any"})},Zl={code:"en-US",formatDistance:hae,formatLong:gae,formatRelative:yae,localize:Tae,match:zae,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Hae(e,t){const n=At(e,t==null?void 0:t.in);return Vw(n,ZM(n))+1}function qw(e,t){const n=At(e,t==null?void 0:t.in),r=+af(n)-+Jie(n);return Math.round(r/qM)+1}function t6(e,t){var d,h,f,p;const n=At(e,t==null?void 0:t.in),r=n.getFullYear(),s=Lf(),i=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((p=(f=s.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=Ln((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const l=yu(a,t),c=Ln((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=yu(c,t);return+n>=+l?r+1:+n>=+u?r:r-1}function Wae(e,t){var l,c,u,d;const n=Lf(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=t6(e,t),i=Ln((t==null?void 0:t.in)||e,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),yu(i,t)}function Yw(e,t){const n=At(e,t==null?void 0:t.in),r=+yu(n,t)-+Wae(n,t);return Math.round(r/qM)+1}function kt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Sa={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return kt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):kt(n+1,2)},d(e,t){return kt(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return kt(e.getHours()%12||12,t.length)},H(e,t){return kt(e.getHours(),t.length)},m(e,t){return kt(e.getMinutes(),t.length)},s(e,t){return kt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return kt(s,t.length)}},Wl={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ej={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return Sa.y(e,t)},Y:function(e,t,n,r){const s=t6(e,r),i=s>0?s:1-s;if(t==="YY"){const a=i%100;return kt(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):kt(i,t.length)},R:function(e,t){const n=KM(e);return kt(n,t.length)},u:function(e,t){const n=e.getFullYear();return kt(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return kt(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return kt(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Sa.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return kt(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const s=Yw(e,r);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):kt(s,t.length)},I:function(e,t,n){const r=qw(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):kt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Sa.d(e,t)},D:function(e,t,n){const r=Hae(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):kt(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return kt(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const s=e.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return kt(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),s=r===0?7:r;switch(t){case"i":return String(s);case"ii":return kt(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let s;switch(r===12?s=Wl.noon:r===0?s=Wl.midnight:s=r/12>
vendor: 8,910 bytes, line 681
681=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let s;switch(r>=17?s=Wl.evening:r>=12?s=Wl.afternoon:r>=4?s=Wl.morning:s=Wl.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Sa.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Sa.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):kt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):kt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Sa.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Sa.s(e,t)},S:function(e,t){return Sa.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return kj(r);case"XXXX":case"XX":return $o(r);case"XXXXX":case"XXX":default:return $o(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return kj(r);case"xxxx":case"xx":return $o(r);case"xxxxx":case"xxx":default:return $o(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Nj(r,":");case"OOOO":default:return"GMT"+$o(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Nj(r,":");case"zzzz":default:return"GMT"+$o(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return kt(r,t.length)},T:function(e,t,n){return kt(+e,t.length)}};function Nj(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+t+kt(i,2)}function kj(e,t){return e%60===0?(e>0?"-":"+")+kt(Math.abs(e)/60,2):$o(e,t)}function $o(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),s=kt(Math.trunc(r/60),2),i=kt(r%60,2);return n+s+t+i}const Tj=(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"})}},n6=(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"})}},Vae=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Tj(e,t);let i;switch(r){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}}",Tj(r,t)).replace("{{time}}",n6(s,t))},qae={p:n6,P:Vae},Yae=/^D+$/,Gae=/^Y+$/,Kae=["D","DD","YY","YYYY"];function Qae(e){return Yae.test(e)}function Xae(e){return Gae.test(e)}function Jae(e,t,n){const r=Zae(e,t,n);if(console.warn(r),Kae.includes(e))throw new RangeError(r)}function Zae(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const eoe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,toe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,noe=/^'([^]*?)'?$/,roe=/''/g,soe=/[a-zA-Z]/;function Hd(e,t,n){var d,h,f,p,m,x,w,g;const r=Lf(),s=(n==null?void 0:n.locale)??r.locale??Zl,i=(n==null?void 0:n.firstWeekContainsDate)??((h=(d=n==null?void 0:n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(f=r.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((x=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:x.weekStartsOn)??r.weekStartsOn??((g=(w=r.locale)==null?void 0:w.options)==null?void 0:g.weekStartsOn)??0,l=At(e,n==null?void 0:n.in);if(!sae(l))throw new RangeError("Invalid time value");let c=t.match(toe).map(b=>{const _=b[0];if(_==="p"||_==="P"){const k=qae[_];return k(b,s.formatLong)}return b}).join("").match(eoe).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const _=b[0];if(_==="'")return{isToken:!1,value:ioe(b)};if(Ej[_])return{isToken:!0,value:b};if(_.match(soe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+_+"`");return{isToken:!1,value:b}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return c.map(b=>{if(!b.isToken)return b.value;const _=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Xae(_)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Qae(_))&&Jae(_,t,String(e));const k=Ej[_[0]];return k(l,_,s.localize,u)}).join("")}function ioe(e){const t=e.match(noe);return t?t[1].replace(roe,"'"):e}function aoe(e,t){const n=At(e,t==null?void 0:t.in),r=n.getFullYear(),s=n.getMonth(),i=Ln(n,0);return i.setFullYear(r,s+1,0),i.setHours(0,0,0,0),i.getDate()}function ooe(e,t){return At(e,t==null?void 0:t.in).getMonth()}function loe(e,t){return At(e,t==null?void 0:t.in).getFullYear()}function coe(e,t){return+At(e)>+At(t)}function uoe(e,t){return+At(e)<+At(t)}function doe(e,t,n){const[r,s]=$u(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()&&r.getMonth()===s.getMonth()}function hoe(e,t,n){const[r,s]=$u(n==null?void 0:n.in,e,t);return r.getFullYear()===s.getFullYear()}function foe(e,t,n){const r=At(e,n==null?void 0:n.in),s=r.getFullYear(),i=r.getDate(),a=Ln(e,0);a.setFullYear(s,t,15),a.setHours(0,0,0,0);const l=aoe(a);return r.setMonth(t,Math.min(i,l)),r}function poe(e,t,n){const r=At(e,n==null?void 0:n.in);return isNaN(+r)?Ln(e,NaN):(r.setFullYear(t),r)}const Sj=5,moe=4;function goe(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,s=t.addDays(e,-r+1),i=t.addDays(s,Sj*7-1);return t.getMonth(e)===t.getMonth(i)?Sj:moe}function r6(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function xoe(e,t){const n=r6(e,t),r=goe(e,t);return t.addDays(n,r*7-1)}const s6={...Zl,labels:{labelDayButton:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>Hd(a,l,{locale:Zl,...n});let i=s(e,"PPPP");return t.today&&(i=`Today, ${i}`),t.selected&&(i=`${i}, selected`),i},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>Hd(s,i,{locale:Zl,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let s;r&&typeof r.format=="function"?s=r.format.bind(r):s=(a,l)=>Hd(a,l,{locale:Zl,...n});let i=s(e,"PPPP");return t!=null&&t.today&&(i=`Today, ${i}`),i},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return n&&typeof n.format=="function"?r=n.format.bind(n):r=(s,i)=>Hd(s,i,{locale:Zl,...t}),r(e,"cccc")}}};class ms{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?br.tz(this.options.timeZone):new this.Date},this.newDate=(r,s,i)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(r,s,i):this.options.timeZone?new br(r,s,i,this.options.timeZone):new Date(r,s,i)},this.addDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addDays?this.overrides.addDays(r,s):YM(r,s)},this.addMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addMonths?this.overrides.addMonths(r,s):GM(r,s)},this.addWeeks=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addWeeks?this.overrides.addWeeks(r,s):Zie(r,s)},this.addYears=(r,s)=>{var i;return(i=this.overrides)!=null&&i.addYears?this.overrides.addYears(r,s):eae(r,s)},this.differenceInCalendarDays=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,s):Vw(r,s)},this.differenceInCalendarMonths=(r,s)=>{var i;return(i=this.overrides)!=null&&i.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,s):XM(r,s)},this.eachMonthOfInterval=r=>{var s;return(s=this.overrides)!=null&&s.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):aae(r)},this.eachYearOfInterval=r=>{var l;const s=(l=this.overrides)!=null&&l.eachYearOfInterval?this.overrides.eachYearOfInterval(r):cae(r),i=new Set(s.map(c=>this.getYear(c)));if(i.size===s.length)return s;const a=[];
vendor: 7,416 bytes, line 681
681return i.forEach(c=>{a.push(new Date(c,0,1))}),a},this.endOfBroadcastWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):xoe(r,this)},this.endOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.endOfISOWeek?this.overrides.endOfISOWeek(r):uae(r)},this.endOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.endOfMonth?this.overrides.endOfMonth(r):iae(r)},this.endOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.endOfWeek?this.overrides.endOfWeek(r,s):e6(r,this.options)},this.endOfYear=r=>{var s;return(s=this.overrides)!=null&&s.endOfYear?this.overrides.endOfYear(r):lae(r)},this.format=(r,s,i)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(r,s,this.options):Hd(r,s,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.getISOWeek?this.overrides.getISOWeek(r):qw(r)},this.getMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getMonth?this.overrides.getMonth(r,this.options):ooe(r,this.options)},this.getYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getYear?this.overrides.getYear(r,this.options):loe(r,this.options)},this.getWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.getWeek?this.overrides.getWeek(r,this.options):Yw(r,this.options)},this.isAfter=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isAfter?this.overrides.isAfter(r,s):coe(r,s)},this.isBefore=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isBefore?this.overrides.isBefore(r,s):uoe(r,s)},this.isDate=r=>{var s;return(s=this.overrides)!=null&&s.isDate?this.overrides.isDate(r):QM(r)},this.isSameDay=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameDay?this.overrides.isSameDay(r,s):rae(r,s)},this.isSameMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameMonth?this.overrides.isSameMonth(r,s):doe(r,s)},this.isSameYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.isSameYear?this.overrides.isSameYear(r,s):hoe(r,s)},this.max=r=>{var s;return(s=this.overrides)!=null&&s.max?this.overrides.max(r):tae(r)},this.min=r=>{var s;return(s=this.overrides)!=null&&s.min?this.overrides.min(r):nae(r)},this.setMonth=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setMonth?this.overrides.setMonth(r,s):foe(r,s)},this.setYear=(r,s)=>{var i;return(i=this.overrides)!=null&&i.setYear?this.overrides.setYear(r,s):poe(r,s)},this.startOfBroadcastWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):r6(r,this)},this.startOfDay=r=>{var s;return(s=this.overrides)!=null&&s.startOfDay?this.overrides.startOfDay(r):of(r)},this.startOfISOWeek=r=>{var s;return(s=this.overrides)!=null&&s.startOfISOWeek?this.overrides.startOfISOWeek(r):af(r)},this.startOfMonth=r=>{var s;return(s=this.overrides)!=null&&s.startOfMonth?this.overrides.startOfMonth(r):oae(r)},this.startOfWeek=(r,s)=>{var i;return(i=this.overrides)!=null&&i.startOfWeek?this.overrides.startOfWeek(r,this.options):yu(r,this.options)},this.startOfYear=r=>{var s;return(s=this.overrides)!=null&&s.startOfYear?this.overrides.startOfYear(r):ZM(r)},this.options={locale:s6,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let s=0;s<10;s++)r[s.toString()]=n.format(s);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}getMonthYearOrder(){var n;const t=(n=this.options.locale)==null?void 0:n.code;return t&&ms.yearFirstLocales.has(t)?"year-first":"month-first"}formatMonthYear(t){const{locale:n,timeZone:r,numerals:s}=this.options,i=n==null?void 0:n.code;if(i&&ms.yearFirstLocales.has(i))try{return new Intl.DateTimeFormat(i,{month:"long",year:"numeric",timeZone:r,numberingSystem:s}).format(t)}catch{}const a=this.getMonthYearOrder()==="year-first"?"y LLLL":"LLLL y";return this.format(t,a)}}ms.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 Ai=new ms;class i6{constructor(t,n,r=Ai){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r,this.isoDate=r.format(t,"yyyy-MM-dd"),this.displayMonthId=r.format(n,"yyyy-MM"),this.dateMonthId=r.format(t,"yyyy-MM")}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class yoe{constructor(t,n){this.date=t,this.weeks=n}}class boe{constructor(t,n){this.days=n,this.weekNumber=t}}function voe(e){return ye.createElement("button",{...e})}function _oe(e){return ye.createElement("span",{...e})}function woe(e){const{size:t=24,orientation:n="left",className:r}=e;return ye.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&ye.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&ye.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&ye.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&ye.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Eoe(e){const{day:t,modifiers:n,...r}=e;return ye.createElement("td",{...r})}function Noe(e){const{day:t,modifiers:n,...r}=e,s=ye.useRef(null);return ye.useEffect(()=>{var i;n.focused&&((i=s.current)==null||i.focus())},[n.focused]),ye.createElement("button",{ref:s,...r})}var Be;(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"})(Be||(Be={}));var on;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(on||(on={}));var Js;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Js||(Js={}));var ts;(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"})(ts||(ts={}));function koe(e){const{options:t,className:n,components:r,classNames:s,...i}=e,a=[s[Be.Dropdown],n].join(" "),l=t==null?void 0:t.find(({value:c})=>c===i.value);return ye.createElement("span",{"data-disabled":i.disabled,className:s[Be.DropdownRoot]},ye.createElement(r.Select,{className:a,...i},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>ye.createElement(r.Option,{key:c,value:c,disabled:d},u))),ye.createElement("span",{className:s[Be.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,ye.createElement(r.Chevron,{orientation:"down",size:18,className:s[Be.Chevron]}
vendor: 12,365 bytes, line 681
681)))}function Toe(e){return ye.createElement("div",{...e})}function Soe(e){return ye.createElement("div",{...e})}function Coe(e){const{calendarMonth:t,displayIndex:n,...r}=e;return ye.createElement("div",{...r},e.children)}function joe(e){const{calendarMonth:t,displayIndex:n,...r}=e;return ye.createElement("div",{...r})}function Aoe(e){return ye.createElement("table",{...e})}function Ioe(e){return ye.createElement("div",{...e})}const a6=y.createContext(void 0);function zu(){const e=y.useContext(a6);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Poe(e){const{components:t}=zu();return ye.createElement(t.Dropdown,{...e})}function Doe(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:s,...i}=e,{components:a,classNames:l,labels:{labelPrevious:c,labelNext:u}}=zu(),d=y.useCallback(f=>{s&&(n==null||n(f))},[s,n]),h=y.useCallback(f=>{r&&(t==null||t(f))},[r,t]);return ye.createElement("nav",{...i},ye.createElement(a.PreviousMonthButton,{type:"button",className:l[Be.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:h},ye.createElement(a.Chevron,{disabled:r?void 0:!0,className:l[Be.Chevron],orientation:"left"})),ye.createElement(a.NextMonthButton,{type:"button",className:l[Be.NextMonthButton],tabIndex:s?void 0:-1,"aria-disabled":s?void 0:!0,"aria-label":u(s),onClick:d},ye.createElement(a.Chevron,{disabled:s?void 0:!0,orientation:"right",className:l[Be.Chevron]})))}function Ooe(e){const{components:t}=zu();return ye.createElement(t.Button,{...e})}function Moe(e){return ye.createElement("option",{...e})}function Roe(e){const{components:t}=zu();return ye.createElement(t.Button,{...e})}function Loe(e){const{rootRef:t,...n}=e;return ye.createElement("div",{...n,ref:t})}function Foe(e){return ye.createElement("select",{...e})}function Boe(e){const{week:t,...n}=e;return ye.createElement("tr",{...n})}function Uoe(e){return ye.createElement("th",{...e})}function $oe(e){return ye.createElement("thead",{"aria-hidden":!0},ye.createElement("tr",{...e}))}function zoe(e){const{week:t,...n}=e;return ye.createElement("th",{...n})}function Hoe(e){return ye.createElement("th",{...e})}function Woe(e){return ye.createElement("tbody",{...e})}function Voe(e){const{components:t}=zu();return ye.createElement(t.Dropdown,{...e})}const qoe=Object.freeze(Object.defineProperty({__proto__:null,Button:voe,CaptionLabel:_oe,Chevron:woe,Day:Eoe,DayButton:Noe,Dropdown:koe,DropdownNav:Toe,Footer:Soe,Month:Coe,MonthCaption:joe,MonthGrid:Aoe,Months:Ioe,MonthsDropdown:Poe,Nav:Doe,NextMonthButton:Ooe,Option:Moe,PreviousMonthButton:Roe,Root:Loe,Select:Foe,Week:Boe,WeekNumber:zoe,WeekNumberHeader:Hoe,Weekday:Uoe,Weekdays:$oe,Weeks:Woe,YearsDropdown:Voe},Symbol.toStringTag,{value:"Module"}));function Zi(e,t,n=!1,r=Ai){let{from:s,to:i}=e;const{differenceInCalendarDays:a,isSameDay:l}=r;return s&&i?(a(i,s)<0&&([s,i]=[i,s]),a(t,s)>=(n?1:0)&&a(i,t)>=(n?1:0)):!n&&i?l(i,t):!n&&s?l(s,t):!1}function Gw(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Vx(e){return!!(e&&typeof e=="object"&&"from"in e)}function Kw(e){return!!(e&&typeof e=="object"&&"after"in e)}function Qw(e){return!!(e&&typeof e=="object"&&"before"in e)}function o6(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function l6(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ea(e,t,n=Ai){const r=Array.isArray(t)?t:[t],{isSameDay:s,differenceInCalendarDays:i,isAfter:a}=n;return r.some(l=>{if(typeof l=="boolean")return l;if(n.isDate(l))return s(e,l);if(l6(l,n))return l.some(c=>s(e,c));if(Vx(l))return Zi(l,e,!1,n);if(o6(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(Gw(l)){const c=i(l.before,e),u=i(l.after,e),d=c>0,h=u<0;return a(l.before,l.after)?h&&d:d||h}return Kw(l)?i(e,l.after)>0:Qw(l)?i(l.before,e)>0:typeof l=="function"?l(e):!1})}function Yoe(e,t,n,r,s){const{disabled:i,hidden:a,modifiers:l,showOutsideDays:c,broadcastCalendar:u,today:d=s.today()}=t,{isSameDay:h,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:x,isAfter:w}=s,g=n&&p(n),b=r&&x(r),_={[on.focused]:[],[on.outside]:[],[on.disabled]:[],[on.hidden]:[],[on.today]:[]},k={};for(const T of e){const{date:N,displayMonth:C}=T,S=!!(C&&!f(N,C)),I=!!(g&&m(N,g)),E=!!(b&&w(N,b)),j=!!(i&&ea(N,i,s)),P=!!(a&&ea(N,a,s))||I||E||!u&&!c&&S||u&&c===!1&&S,L=h(N,d);S&&_.outside.push(T),j&&_.disabled.push(T),P&&_.hidden.push(T),L&&_.today.push(T),l&&Object.keys(l).forEach(z=>{const R=l==null?void 0:l[z];R&&ea(N,R,s)&&(k[z]?k[z].push(T):k[z]=[T])})}return T=>{const N={[on.focused]:!1,[on.disabled]:!1,[on.hidden]:!1,[on.outside]:!1,[on.today]:!1},C={};for(const S in _){const I=_[S];N[S]=I.some(E=>E===T)}for(const S in k)C[S]=k[S].some(I=>I===T);return{...N,...C}}}function Goe(e,t,n={}){return Object.entries(e).filter(([,s])=>s===!0).reduce((s,[i])=>(n[i]?s.push(n[i]):t[on[i]]?s.push(t[on[i]]):t[Js[i]]&&s.push(t[Js[i]]),s),[t[Be.Day]])}function Koe(e){return{...qoe,...e}}function Qoe(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(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Xoe(){const e={};for(const t in Be)e[Be[t]]=`rdp-${Be[t]}`;for(const t in on)e[on[t]]=`rdp-${on[t]}`;for(const t in Js)e[Js[t]]=`rdp-${Js[t]}`;for(const t in ts)e[ts[t]]=`rdp-${ts[t]}`;return e}function c6(e,t,n){return(n??new ms(t)).formatMonthYear(e)}const Joe=c6;function Zoe(e,t,n){return(n??new ms(t)).format(e,"d")}function ele(e,t=Ai){return t.format(e,"LLLL")}function tle(e,t,n){return(n??new ms(t)).format(e,"cccccc")}function nle(e,t=Ai){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function rle(){return""}function u6(e,t=Ai){return t.format(e,"yyyy")}const sle=u6,ile=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:c6,formatDay:Zoe,formatMonthCaption:Joe,formatMonthDropdown:ele,formatWeekNumber:nle,formatWeekNumberHeader:rle,formatWeekdayName:tle,formatYearCaption:sle,formatYearDropdown:u6},Symbol.toStringTag,{value:"Module"}));function ale(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...ile,...e}}function Xw(e,t,n,r){let s=(r??new ms(n)).format(e,"PPPP");return t.today&&(s=`Today, ${s}`),t.selected&&(s=`${s}, selected`),s}const ole=Xw;function Jw(e,t,n){return(n??new ms(t)).formatMonthYear(e)}const lle=Jw;function d6(e,t,n,r){let s=(r??new ms(n)).format(e,"PPPP");return t!=null&&t.today&&(s=`Today, ${s}`),s}function h6(e){return"Choose the Month"}function f6(){return""}const cle="Go to the Next Month";function p6(e,t){return cle}function m6(e){return"Go to the Previous Month"}function g6(e,t,n){return(n??new ms(t)).format(e,"cccc")}function x6(e,t){return`Week ${e}`}function y6(e){return"Week Number"}function b6(e){return"Choose the Year"}const ule=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:lle,labelDay:ole,labelDayButton:Xw,labelGrid:Jw,labelGridcell:d6,labelMonthDropdown:h6,labelNav:f6,labelNext:p6,labelPrevious:m6,labelWeekNumber:x6,labelWeekNumberHeader:y6,labelWeekday:g6,labelYearDropdown:b6},Symbol.toStringTag,{value:"Module"})),zs=(e,t,n)=>t||(n?typeof n=="function"?n:(...r)=>n:e);function dle(e,t){var r;const n=((r=t.locale)==null?void 0:r.labels)??{};return{...ule,...e??{},labelDayButton:zs(Xw,e==null?void 0:e.labelDayButton,n.labelDayButton),labelMonthDropdown:zs(h6,e==null?void 0:e.labelMonthDropdown,n.labelMonthDropdown),labelNext:zs(p6,e==null?void 0:e.labelNext,n.labelNext),labelPrevious:zs(m6,e==null?void 0:e.labelPrevious,n.labelPrevious),labelWeekNumber:zs(x6,e==null?void 0:e.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:zs(b6,e==null?void 0:e.labelYearDropdown,n.labelYearDropdown),labelGrid:zs(Jw,e==null?void 0:e.labelGrid,n.labelGrid),labelGridcell:zs(d6,e==null?void 0:e.labelGridcell,n.labelGridcell),labelNav:zs(f6,e==null?void 0:e.labelNav,n.labelNav),labelWeekNumberHeader:zs(y6,e==null?void 0:e.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:zs(g6,e==null?void 0:e.labelWeekday,n.labelWeekday)}}function hle(e,t,n,r,s){const{startOfMonth:i,startOfYear:a,endOfYear:l,eachMonthOfInterval:c,getMonth:u}=s;return c({start:a(e),end:l(e)}).map(f=>{const p=r.formatMonthDropdown(f,s),m=u(f),x=t&&f<i(t)||n&&f>i(n)||!1;return{value:m,label:p,disabled:x}})}function fle(e,t={},n={}){let r={...t==null?void 0:t[Be.Day]};return Object.entries(e).filter(([,s])=>s===!0).forEach(([s])=>{r={...r,...n==null?void 0:n[s]}}),r}function ple(e,t,n,r){const s=r??e.today(),i=n?e.startOfBroadcastWeek(s,e):t?e.startOfISOWeek(s):e.startOfWeek(s),a=[];for(let l=0;l<7;l++){const c=e.addDays(i,l);a.push(c)}return a}function mle(e,t,n,r,s=!1){if(!e||!t)return;const{startOfYear:i,endOfYear:a,eachYearOfInterval:l,getYear:c}=r,u=i(e),d=a(t),h=l({start:u,end:d});return s&&h.reverse(),h.map(f=>{const p=n.formatYearDropdown(f,r);return{value:c(f),label:p,disabled:!1}})}function gle(e,t={}){var l;const{weekStartsOn:n,locale:r}=t,s=n??((l=r==null?void 0:r.options)==null?void 0:l.weekStartsOn)??0,i=c=>{const u=typeof c=="number"||typeof c=="string"?new Date(c):c;return new br(u.getFullYear(),u.getMonth(),u.getDate(),12,0,0,e)},a=c=>{const u=i(c);return new Date(u.getFullYear(),u.getMonth(),u.getDate(),0,0,0,0)};return{today:()=>i(br.tz(e)),newDate:(c,u,d)=>new br(c,u,d,12,0,0,e),startOfDay:c=>i(c),startOfWeek:(c,u)=>{const d=i(c),h=(u==null?void 0:u.weekStartsOn)??s,f=(d.getDay()-h+7)%7;return d.setDate(d.getDate()-f),d},startOfISOWeek:c=>{const u=i(c),d=(u.getDay()-1+7)%7;return u.setDate(u.getDate()-d),u},startOfMonth:c=>{const u=i(c);return u.setDate(1),u},startOfYear:c=>{const u=i(c);return u.setMonth(0,1),u},endOfWeek:(c,u)=>{const d=i(c),p=((((u==null?void 0:u.weekStartsOn)??s)+6)%7-d.getDay()+7)%7;return d.setDate(d.getDate()+p),d},endOfISOWeek:c=>{const u=i(c),d=(7-u.getDay())%7;return u.setDate(u.getDate()+d),u},endOfMonth:c=>{const u=i(c);return u.setMonth(u.getMonth()+1,0),u},endOfYear:c=>{const u=i(c);return u.setMonth(11,31),u},eachMonthOfInterval:c=>{const u=i(c.start),d=i(c.end),h=[],f=new br(u.getFullYear(),u.getMonth(),1,12,0,0,e),p=d.getFullYear()*12+d.getMonth();for(;f.getFullYear()*12+f.getMonth()<=p;)h.push(new br(f,e)),f.setMonth(f.getMonth()+1,1);return h},addDays:(c,u)=>{const d=i(c);return d.setDate(d.getDate()+u),d},addWeeks:(c,u)=>{const d=i(c);return d.setDate(d.getDate()+u*7),d},addMonths:(c,u)=>{const d=i(c);return d.setMonth(d.getMonth()+u),d},addYears:(c,u)=>{const d=i(c);return d.setFullYear(d.getFullYear()+u),d},eachYearOfInterval:c=>{const u=i(c.start),d=i(c.end),h=[],f=new br(u.getFullYear(),0,1,12,0,0,e);for(;f.getFullYear()<=d.getFullYear();)h.push(new br(f,e)),f.setFullYear(f.getFullYear()+1,0,1);return h},getWeek:(c,u)=>{var h;const d=a(c);return Yw(d,{weekStartsOn:(u==null?void 0:u.weekStartsOn)??s,firstWeekContainsDate:(u==null?void 0:u.firstWeekContainsDate)??((h=r==null?void 0:r.options)==null?void 0:h.firstWeekContainsDate)??1})},getISOWeek:c=>{const u=a(c);return qw(u)},differenceInCalendarDays:(c,u)=>{const d=a(c),h=a(u);return Vw(d,h)},differenceInCalendarMonths:(c,u)=>{const d=a(c),h=a(u);return XM(d,h)}}}const Ff=e=>e instanceof HTMLElement?e:null,Hy=e=>[...e.querySelectorAll("[data-animated-month]")??[]],xle=e=>Ff(e.querySelector("[data-animated-month]")),Wy=e=>Ff(e.querySelector("[data-animated-caption]")),Vy=e=>Ff(e.querySelector("[data-animated-weeks]")),yle=e=>Ff(e.querySelector("[data-animated-nav]")),ble=e=>Ff(e.querySelector("[data-animated-weekdays]"));function vle(e,t,{classNames:n,months:r,focused:s,dateLib:i}){const a=y.useRef(null),l=y.useRef(r),c=y.useRef(!1);y.useLayoutEffect(()=>{const u=l.current;if(l.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const d=i.isSameMonth(r[0].date,u[0].date),h=i.isAfter(r[0].date,u[0].date),f=h?n[ts.caption_after_enter]:n[ts.caption_before_enter],p=h?n[ts.weeks_after_enter]:n[ts.weeks_before_enter],m=a.current,x=e.current.cloneNode(!0);
vendor: 1,069 bytes, line 681
681if(x instanceof HTMLElement?(Hy(x).forEach(_=>{if(!(_ instanceof HTMLElement))return;const k=xle(_);k&&_.contains(k)&&_.removeChild(k);const T=Wy(_);T&&T.classList.remove(f);const N=Vy(_);N&&N.classList.remove(p)}),a.current=x):a.current=null,c.current||d||s)return;const w=m instanceof HTMLElement?Hy(m):[],g=Hy(e.current);if(g!=null&&g.every(b=>b instanceof HTMLElement)&&w&&w.every(b=>b instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const b=yle(e.current);b&&(b.style.zIndex="1"),g.forEach((_,k)=>{const T=w[k];if(!T)return;_.style.position="relative",_.style.overflow="hidden";const N=Wy(_);N&&N.classList.add(f);const C=Vy(_);C&&C.classList.add(p);const S=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),b&&(b.style.zIndex=""),N&&N.classList.remove(f),C&&C.classList.remove(p),_.style.position="",_.style.overflow="",_.contains(T)&&_.removeChild(T)};T.style.pointerEvents="none",T.style.position="absolute",T.style.overflow="hidden",T.setAttribute("aria-hidden","true");const I=ble(T);I&&(I.style.opacity="0");const E=Wy(T);
vendor: 4,929 bytes, line 681
681E&&(E.classList.add(h?n[ts.caption_before_exit]:n[ts.caption_after_exit]),E.addEventListener("animationend",S));const j=Vy(T);j&&j.classList.add(h?n[ts.weeks_before_exit]:n[ts.weeks_after_exit]),_.insertBefore(T,_.firstChild)})}})}function _le(e,t,n,r){const s=e[0],i=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:h,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:x,isAfter:w,startOfBroadcastWeek:g,startOfISOWeek:b,startOfWeek:_}=r,k=c?g(s,r):a?b(s):_(s),T=c?f(i):a?p(m(i)):x(m(i)),N=t&&(c?f(t):a?p(t):x(t)),C=N&&w(T,N)?N:T,S=d(C,k),I=h(i,s)+1,E=[];for(let L=0;L<=S;L++){const z=u(k,L);E.push(z)}const P=(c?35:42)*I;if(l&&E.length<P){const L=P-E.length;for(let z=0;z<L;z++){const R=u(E[E.length-1],1);E.push(R)}}return E}function wle(e){const t=[];return e.reduce((n,r)=>{const s=r.weeks.reduce((i,a)=>i.concat(a.days.slice()),t.slice());return n.concat(s.slice())},t.slice())}function Ele(e,t,n,r){const{numberOfMonths:s=1}=n,i=[];for(let a=0;a<s;a++){const l=r.addMonths(e,a);if(t&&l>t)break;i.push(l)}return i}function Cj(e,t,n,r){const{month:s,defaultMonth:i,today:a=r.today(),numberOfMonths:l=1}=e;let c=s||i||a;const{differenceInCalendarMonths:u,addMonths:d,startOfMonth:h}=r;if(n&&u(n,c)<l-1){const f=-1*(l-1);c=d(n,f)}return t&&u(c,t)<0&&(c=t),h(c)}function Nle(e,t,n,r){const{addDays:s,endOfBroadcastWeek:i,endOfISOWeek:a,endOfMonth:l,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:h,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((x,w)=>{const g=n.broadcastCalendar?h(w,r):n.ISOWeek?f(w):p(w),b=n.broadcastCalendar?i(w):n.ISOWeek?a(l(w)):c(l(w)),_=t.filter(C=>C>=g&&C<=b),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&_.length<k){const C=t.filter(S=>{const I=k-_.length;return S>b&&S<=s(b,I)});_.push(...C)}const T=_.reduce((C,S)=>{const I=n.ISOWeek?u(S):d(S),E=C.find(P=>P.weekNumber===I),j=new i6(S,w,r);return E?E.days.push(j):C.push(new boe(I,[j])),C},[]),N=new yoe(w,T);return x.push(N),x},[]);return n.reverseMonths?m.reverse():m}function kle(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:s,startOfDay:i,startOfMonth:a,endOfMonth:l,addYears:c,endOfYear:u,newDate:d,today:h}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:x}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&x&&(r=x),!r&&p&&(r=d(p,11,31));const w=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=a(n):f?n=d(f,0,1):!n&&w&&(n=s(c(e.today??h(),-100))),r?r=l(r):p?r=d(p,11,31):!r&&w&&(r=u(e.today??h())),[n&&i(n),r&&i(r)]}function Tle(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i=1}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=s?i:1,d=a(e);if(!t)return l(d,u);if(!(c(t,e)<i))return l(d,u)}function Sle(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:s,numberOfMonths:i}=n,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:c}=r,u=s?i??1:1,d=a(e);if(!t)return l(d,-u);if(!(c(d,t)<=0))return l(d,-u)}function Cle(e){const t=[];return e.reduce((n,r)=>n.concat(r.weeks.slice()),t.slice())}function qx(e,t){const[n,r]=y.useState(e);return[t===void 0?n:t,r]}function jle(e,t){var k;const[n,r]=kle(e,t),{startOfMonth:s,endOfMonth:i}=t,a=Cj(e,n,r,t),[l,c]=qx(a,e.month?a:void 0);y.useEffect(()=>{const T=Cj(e,n,r,t);c(T)},[e.timeZone]);const{months:u,weeks:d,days:h,previousMonth:f,nextMonth:p}=y.useMemo(()=>{const T=Ele(l,r,{numberOfMonths:e.numberOfMonths},t),N=_le(T,e.endMonth?i(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),C=Nle(T,N,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),S=Cle(C),I=wle(C),E=Sle(l,n,e,t),j=Tle(l,r,e,t);return{months:C,weeks:S,days:I,previousMonth:E,nextMonth:j}},[t,l.getTime(),r==null?void 0:r.getTime(),n==null?void 0:n.getTime(),e.disableNavigation,e.broadcastCalendar,(k=e.endMonth)==null?void 0:k.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:x}=e,w=T=>d.some(N=>N.days.some(C=>C.isEqualTo(T))),g=T=>{if(m)return;let N=s(T);n&&N<s(n)&&(N=s(n)),r&&N>s(r)&&(N=s(r)),c(N),x==null||x(N)};return{months:u,weeks:d,days:h,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:g,goToDay:T=>{w(T)||g(T.date)}}}var di;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(di||(di={}));function jj(e){return!e[on.disabled]&&!e[on.hidden]&&!e[on.outside]}function Ale(e,t,n,r){let s,i=-1;for(const a of e){const l=t(a);jj(l)&&(l[on.focused]&&i<di.FocusedModifier?(s=a,i=di.FocusedModifier):r!=null&&r.isEqualTo(a)&&i<di.LastFocused?(s=a,i=di.LastFocused):n(a.date)&&i<di.Selected?(s=a,i=di.Selected):l[on.today]&&i<di.Today&&(s=a,i=di.Today))}return s||(s=e.find(a=>jj(t(a)))),s}function Ile(e,t,n,r,s,i,a){const{ISOWeek:l,broadcastCalendar:c}
vendor: 4,396 bytes, line 681
681=i,{addDays:u,addMonths:d,addWeeks:h,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:x,max:w,min:g,startOfBroadcastWeek:b,startOfISOWeek:_,startOfWeek:k}=a;let N={day:u,week:h,month:d,year:f,startOfWeek:C=>c?b(C,a):l?_(C):k(C),endOfWeek:C=>c?p(C):l?m(C):x(C)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=w([r,N]):t==="after"&&s&&(N=g([s,N])),N}function v6(e,t,n,r,s,i,a,l=0){if(l>365)return;const c=Ile(e,t,n.date,r,s,i,a),u=!!(i.disabled&&ea(c,i.disabled,a)),d=!!(i.hidden&&ea(c,i.hidden,a)),h=c,f=new i6(c,h,a);return!u&&!d?f:v6(e,t,f,r,s,i,a,l+1)}function Ple(e,t,n,r,s){const{autoFocus:i}=e,[a,l]=y.useState(),c=Ale(t.days,n,r||(()=>!1),a),[u,d]=y.useState(i?c:void 0);return{isFocusTarget:x=>!!(c!=null&&c.isEqualTo(x)),setFocused:d,focused:u,blur:()=>{l(u),d(void 0)},moveFocus:(x,w)=>{if(!u)return;const g=v6(x,w,u,t.navStart,t.navEnd,e,s);g&&(e.disableNavigation&&!t.days.some(_=>_.isEqualTo(g))||(t.goToDay(g),d(g)))}}}function Dle(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=qx(n,s?n:void 0),l=s?n:i,{isSameDay:c}=t,u=p=>(l==null?void 0:l.some(m=>c(m,p)))??!1,{min:d,max:h}=e;return{selected:l,select:(p,m,x)=>{let w=[...l??[]];if(u(p)){if((l==null?void 0:l.length)===d||r&&(l==null?void 0:l.length)===1)return;w=l==null?void 0:l.filter(g=>!c(g,p))}else(l==null?void 0:l.length)===h?w=[p]:w=[...w,p];return s||a(w),s==null||s(w,p,m,x),w},isSelected:u}}function Ole(e,t,n=0,r=0,s=!1,i=Ai){const{from:a,to:l}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=i;let h;if(!a&&!l)h={from:e,to:n>0?void 0:e};else if(a&&!l)c(a,e)?n===0?h={from:a,to:e}:s?h={from:a,to:void 0}:h=void 0:d(e,a)?h={from:e,to:a}:h={from:a,to:e};else if(a&&l)if(c(a,e)&&c(l,e))s?h={from:a,to:l}:h=void 0;else if(c(a,e))h={from:a,to:n>0?void 0:e};else if(c(l,e))h={from:e,to:n>0?void 0:e};else if(d(e,a))h={from:e,to:l};else if(u(e,a))h={from:a,to:e};else if(u(e,l))h={from:a,to:e};else throw new Error("Invalid range");if(h!=null&&h.from&&(h!=null&&h.to)){const f=i.differenceInCalendarDays(h.to,h.from);r>0&&f>r?h={from:e,to:void 0}:n>1&&f<n&&(h={from:e,to:void 0})}return h}function Mle(e,t,n=Ai){const r=Array.isArray(t)?t:[t];let s=e.from;const i=n.differenceInCalendarDays(e.to,e.from),a=Math.min(i,6);for(let l=0;l<=a;l++){if(r.includes(s.getDay()))return!0;s=n.addDays(s,1)}return!1}function Aj(e,t,n=Ai){return Zi(e,t.from,!1,n)||Zi(e,t.to,!1,n)||Zi(t,e.from,!1,n)||Zi(t,e.to,!1,n)}function Rle(e,t,n=Ai){const r=Array.isArray(t)?t:[t];if(r.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:n.isDate(l)?Zi(e,l,!1,n):l6(l,n)?l.some(c=>Zi(e,c,!1,n)):Vx(l)?l.from&&l.to?Aj(e,{from:l.from,to:l.to},n):!1:o6(l)?Mle(e,l.dayOfWeek,n):Gw(l)?n.isAfter(l.before,l.after)?Aj(e,{from:n.addDays(l.after,1),to:n.addDays(l.before,-1)},n):ea(e.from,l,n)||ea(e.to,l,n):Kw(l)||Qw(l)?ea(e.from,l,n)||ea(e.to,l,n):!1))return!0;const a=r.filter(l=>typeof l=="function");if(a.length){let l=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(a.some(d=>d(l)))return!0;l=n.addDays(l,1)}}return!1}function Lle(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:s,selected:i,required:a,onSelect:l}=e,[c,u]=qx(i,l?i:void 0),d=l?i:c;return{selected:d,select:(p,m,x)=>{const{min:w,max:g}=e;let b;if(p){const _=d==null?void 0:d.from,k=d==null?void 0:d.to,T=!!_&&!!k,N=!!_&&!!k&&t.isSameDay(_,k)&&t.isSameDay(p,_);s&&(T||!(d!=null&&d.from))?!a&&N?b=void 0:b={from:p,to:void 0}:b=Ole(p,d,w,g,a,t)}return r&&n&&(b!=null&&b.from)&&b.to&&Rle({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),l||u(b),l==null||l(b,p,m,x),b},isSelected:p=>d&&Zi(d,p,!1,t)}}function Fle(e,t){const{selected:n,required:r,onSelect:s}=e,[i,a]=qx(n,s?n:void 0),l=s?n:i,{isSameDay:c}=t;return{selected:l,select:(h,f,p)=>{let m=h;return!r&&l&&l&&c(h,l)&&(m=void 0),s||a(m),s==null||s(m,h,f,p),m},isSelected:h=>l?c(l,h):!1}}function Ble(e,t){const n=Fle(e,t),r=Dle(e,t),s=Lle(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return s;default:return}}function Es(e,t){return e instanceof br&&e.timeZone===t?e:new br(e,t)}function Vl(e,t,n){return Es(e,t)}function Ij(e,t,n){return typeof e=="boolean"||typeof e=="function"?e:e instanceof Date?Vl(e,t):Array.isArray(e)?e.map(r=>r instanceof Date?Vl(r,t):r):Vx(e)?{...e,from:e.from?Es(e.from,t):e.from,to:e.to?Es(e.to,t):e.to}:Gw(e)?{before:Vl(e.before,t),after:Vl(e.after,t)}:Kw(e)?{after:Vl(e.after,t)}:Qw(e)?{before:Vl(e.before,t)}:e}
vendor: 4,119 bytes, line 681
681function qy(e,t,n){return e&&(Array.isArray(e)?e.map(r=>Ij(r,t)):Ij(e,t))}function Ule(e){var wn;let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=Es(t.today,n)),t.month&&(t.month=Es(t.month,n)),t.defaultMonth&&(t.defaultMonth=Es(t.defaultMonth,n)),t.startMonth&&(t.startMonth=Es(t.startMonth,n)),t.endMonth&&(t.endMonth=Es(t.endMonth,n)),t.mode==="single"&&t.selected?t.selected=Es(t.selected,n):t.mode==="multiple"&&t.selected?t.selected=(wn=t.selected)==null?void 0:wn.map(Se=>Es(Se,n)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?Es(t.selected.from,n):t.selected.from,to:t.selected.to?Es(t.selected.to,n):t.selected.to}),t.disabled!==void 0&&(t.disabled=qy(t.disabled,n)),t.hidden!==void 0&&(t.hidden=qy(t.hidden,n)),t.modifiers)){const Se={};Object.keys(t.modifiers).forEach(Ae=>{var Le;Se[Ae]=qy((Le=t.modifiers)==null?void 0:Le[Ae],n)}),t.modifiers=Se}const{components:r,formatters:s,labels:i,dateLib:a,locale:l,classNames:c}=y.useMemo(()=>{const Se={...s6,...t.locale},Ae=t.broadcastCalendar?1:t.weekStartsOn,Le=t.noonSafe&&t.timeZone?gle(t.timeZone,{weekStartsOn:Ae,locale:Se}):void 0,rt=t.dateLib&&Le?{...Le,...t.dateLib}:t.dateLib??Le,an=new ms({locale:Se,weekStartsOn:Ae,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},rt);return{dateLib:an,components:Koe(t.components),formatters:ale(t.formatters),labels:dle(t.labels,an.options),locale:Se,classNames:{...Xoe(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:a.today()});const{captionLayout:u,mode:d,navLayout:h,numberOfMonths:f=1,onDayBlur:p,onDayClick:m,onDayFocus:x,onDayKeyDown:w,onDayMouseEnter:g,onDayMouseLeave:b,onNextClick:_,onPrevClick:k,showWeekNumber:T,styles:N}=t,{formatCaption:C,formatDay:S,formatMonthDropdown:I,formatWeekNumber:E,formatWeekNumberHeader:j,formatWeekdayName:P,formatYearDropdown:L}=s,z=jle(t,a),{days:R,months:B,navStart:O,navEnd:U,previousMonth:H,nextMonth:A,goToMonth:q}=z,V=Yoe(R,t,O,U,a),{isSelected:D,select:te,selected:J}=Ble(t,a)??{},{blur:ue,focused:Ne,isFocusTarget:Ie,moveFocus:Pe,setFocused:Ue}=Ple(t,z,V,D??(()=>!1),a),{labelDayButton:ot,labelGridcell:Ye,labelGrid:ae,labelMonthDropdown:Ge,labelNav:nt,labelPrevious:De,labelNext:Gt,labelWeekday:Lt,labelWeekNumber:St,labelWeekNumberHeader:rn,labelYearDropdown:Kt}=i,sn=y.useMemo(()=>ple(a,t.ISOWeek,t.broadcastCalendar,t.today),[a,t.ISOWeek,t.broadcastCalendar,t.today]),le=d!==void 0||m!==void 0,Fn=y.useCallback(()=>{H&&(q(H),k==null||k(H))},[H,q,k]),It=y.useCallback(()=>{A&&(q(A),_==null||_(A))},[q,A,_]),Z=y.useCallback((Se,Ae)=>Le=>{Le.preventDefault(),Le.stopPropagation(),Ue(Se),!Ae.disabled&&(te==null||te(Se.date,Ae,Le),m==null||m(Se.date,Ae,Le))},[te,m,Ue]),de=y.useCallback((Se,Ae)=>Le=>{Ue(Se),x==null||x(Se.date,Ae,Le)},[x,Ue]),Re=y.useCallback((Se,Ae)=>Le=>{ue(),p==null||p(Se.date,Ae,Le)},[ue,p]),Ve=y.useCallback((Se,Ae)=>Le=>{const rt={ArrowLeft:[Le.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[Le.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[Le.shiftKey?"year":"week","after"],ArrowUp:[Le.shiftKey?"year":"week","before"],PageUp:[Le.shiftKey?"year":"month","before"],PageDown:[Le.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(rt[Le.key]){Le.preventDefault(),Le.stopPropagation();const[an,qe]=rt[Le.key];Pe(an,qe)}w==null||w(Se.date,Ae,Le)},[Pe,w,t.dir]),Je=y.useCallback((Se,Ae)=>Le=>{g==null||g(Se.date,Ae,Le)},[g]),Ft=y.useCallback((Se,Ae)=>Le=>{b==null||b(Se.date,Ae,Le)},[b]),Et=y.useCallback(Se=>Ae=>{const Le=Number(Ae.target.value),rt=a.setMonth(a.startOfMonth(Se),Le);q(rt)},[a,q]),fn=y.useCallback(Se=>Ae=>{const Le=Number(Ae.target.value),rt=a.setYear(a.startOfMonth(Se),Le);q(rt)},[a,q]),{className:K,style:ge}=y.useMemo(()=>
vendor: 5,125 bytes, line 681
681({className:[c[Be.Root],t.className].filter(Boolean).join(" "),style:{...N==null?void 0:N[Be.Root],...t.style}}),[c,t.className,t.style,N]),Te=Qoe(t),lt=y.useRef(null);vle(lt,!!t.animate,{classNames:c,months:B,focused:Ne,dateLib:a});const bt={dayPickerProps:t,selected:J,select:te,isSelected:D,months:B,nextMonth:A,previousMonth:H,goToMonth:q,getModifiers:V,components:r,classNames:c,styles:N,labels:i,formatters:s};return ye.createElement(a6.Provider,{value:bt},ye.createElement(r.Root,{rootRef:t.animate?lt:void 0,className:K,style:ge,dir:t.dir,id:t.id,lang:t.lang??l.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...Te},ye.createElement(r.Months,{className:c[Be.Months],style:N==null?void 0:N[Be.Months]},!t.hideNavigation&&!h&&ye.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[Be.Nav],style:N==null?void 0:N[Be.Nav],"aria-label":nt(),onPreviousClick:Fn,onNextClick:It,previousMonth:H,nextMonth:A}),B.map((Se,Ae)=>ye.createElement(r.Month,{"data-animated-month":t.animate?"true":void 0,className:c[Be.Month],style:N==null?void 0:N[Be.Month],key:Ae,displayIndex:Ae,calendarMonth:Se},h==="around"&&!t.hideNavigation&&Ae===0&&ye.createElement(r.PreviousMonthButton,{type:"button",className:c[Be.PreviousMonthButton],tabIndex:H?void 0:-1,"aria-disabled":H?void 0:!0,"aria-label":De(H),onClick:Fn,"data-animated-button":t.animate?"true":void 0},ye.createElement(r.Chevron,{disabled:H?void 0:!0,className:c[Be.Chevron],orientation:t.dir==="rtl"?"right":"left"})),ye.createElement(r.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:c[Be.MonthCaption],style:N==null?void 0:N[Be.MonthCaption],calendarMonth:Se,displayIndex:Ae},u!=null&&u.startsWith("dropdown")?ye.createElement(r.DropdownNav,{className:c[Be.Dropdowns],style:N==null?void 0:N[Be.Dropdowns]},(()=>{const Le=u==="dropdown"||u==="dropdown-months"?ye.createElement(r.MonthsDropdown,{key:"month",className:c[Be.MonthsDropdown],"aria-label":Ge(),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:Et(Se.date),options:hle(Se.date,O,U,s,a),style:N==null?void 0:N[Be.Dropdown],value:a.getMonth(Se.date)}):ye.createElement("span",{key:"month"},I(Se.date,a)),rt=u==="dropdown"||u==="dropdown-years"?ye.createElement(r.YearsDropdown,{key:"year",className:c[Be.YearsDropdown],"aria-label":Kt(a.options),classNames:c,components:r,disabled:!!t.disableNavigation,onChange:fn(Se.date),options:mle(O,U,s,a,!!t.reverseYears),style:N==null?void 0:N[Be.Dropdown],value:a.getYear(Se.date)}):ye.createElement("span",{key:"year"},L(Se.date,a));return a.getMonthYearOrder()==="year-first"?[rt,Le]:[Le,rt]})(),ye.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"}},C(Se.date,a.options,a))):ye.createElement(r.CaptionLabel,{className:c[Be.CaptionLabel],role:"status","aria-live":"polite"},C(Se.date,a.options,a))),h==="around"&&!t.hideNavigation&&Ae===f-1&&ye.createElement(r.NextMonthButton,{type:"button",className:c[Be.NextMonthButton],tabIndex:A?void 0:-1,"aria-disabled":A?void 0:!0,"aria-label":Gt(A),onClick:It,"data-animated-button":t.animate?"true":void 0},ye.createElement(r.Chevron,{disabled:A?void 0:!0,className:c[Be.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Ae===f-1&&h==="after"&&!t.hideNavigation&&ye.createElement(r.Nav,{"data-animated-nav":t.animate?"true":void 0,className:c[Be.Nav],style:N==null?void 0:N[Be.Nav],"aria-label":nt(),onPreviousClick:Fn,onNextClick:It,previousMonth:H,nextMonth:A}),ye.createElement(r.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":ae(Se.date,a.options,a)||void 0,className:c[Be.MonthGrid],style:N==null?void 0:N[Be.MonthGrid]},!t.hideWeekdays&&ye.createElement(r.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:c[Be.Weekdays],style:N==null?void 0:N[Be.Weekdays]},T&&ye.createElement(r.WeekNumberHeader,{"aria-label":rn(a.options),className:c[Be.WeekNumberHeader],style:N==null?void 0:N[Be.WeekNumberHeader],scope:"col"},j()),sn.map(Le=>ye.createElement(r.Weekday,{"aria-label":Lt(Le,a.options,a),className:c[Be.Weekday],key:String(Le),style:N==null?void 0:N[Be.Weekday],scope:"col"},P(Le,a.options,a)))),ye.createElement(r.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:c[Be.Weeks],style:N==null?void 0:N[Be.Weeks]},Se.weeks.map(Le=>ye.createElement(r.Week,{className:c[Be.Week],key:Le.weekNumber,style:N==null?void 0:N[Be.Week],week:Le},T&&ye.createElement(r.WeekNumber,{week:Le,style:N==null?void 0:N[Be.WeekNumber],"aria-label":St(Le.weekNumber,{locale:l}),className:c[Be.WeekNumber],scope:"row",role:"rowheader"},E(Le.weekNumber,a)),Le.days.map(rt=>{const{date:an}=rt,qe=V(rt);if(qe[on.focused]=!qe.hidden&&!!(Ne!=null&&Ne.isEqualTo(rt)),qe[Js.selected]=(D==null?void 0:D(an))||qe.selected,Vx(J)){const{from:Ls,to:Fs}=J;qe[Js.range_start]=!!(Ls&&Fs&&a.isSameDay(an,Ls)),qe[Js.range_end]=!!(Ls&&Fs&&a.isSameDay(an,Fs)),qe[Js.range_middle]=Zi(J,an,
681!0,a)}const ya=fle(qe,N,t.modifiersStyles),ba=Goe(qe,c,t.modifiersClassNames),Ii=!le&&!qe.hidden?Ye(an,qe,a.options,a):void 0;return ye.createElement(r.Day,{key:`${rt.isoDate}_${rt.displayMonthId}`,day:rt,modifiers:qe,className:ba.join(" "),style:ya,role:"gridcell","aria-selected":qe.selected||void 0,"aria-label":Ii,"data-day":rt.isoDate,"data-month":rt.outside?rt.dateMonthId:void 0,"data-selected":qe.selected||void 0,"data-disabled":qe.disabled||void 0,"data-hidden":qe.hidden||void 0,"data-outside":rt.outside||void 0,"data-focused":qe.focused||void 0,"data-today":qe.today||void 0},!qe.hidden&&le?ye.createElement(r.DayButton,{className:c[Be.DayButton],style:N==null?void 0:N[Be.DayButton],type:"button",day:rt,modifiers:qe,disabled:!qe.focused&&qe.disabled||void 0,"aria-disabled":qe.focused&&qe.disabled||void 0,tabIndex:Ie(rt)?0:-1,"aria-label":ot(an,qe,a.options,a),onClick:Z(rt,qe),onBlur:Re(rt,qe),onFocus:de(rt,qe),onKeyDown:Ve(rt,qe),onMouseEnter:Je(rt,qe),onMouseLeave:Ft(rt,qe)},S(an,a.options,a)):!qe.hidden&&S(rt.date,a.options,a))})))))))),t.footer&&ye.createElement(r.Footer,{className:c[Be.Footer],style:N==null?void 0:N[Be.Footer],role:"status","aria-live":"polite"},t.footer)))}const $le={sm:"w-sidebar-sm",md:"w-sidebar-md",lg:"w-sidebar-lg"};function zle({children:e,width:t="sm",side:n="left",className:r=""}){const s=n==="left"?"border-r border-border":"border-l border-border";return o.jsx("div",{className:`${$le[t]} shrink-0 ${s} flex flex-col overflow-hidden bg-bg-secondary ${r}`,children:e})}const lf={screen:"Screen",technical:"Technical",behavioral:"Behavioral",final:"Final Round",offer:"Offer",rejected:"Rejected",ghosted:"Ghosted"},Hle={screen:"bg-blue-500/15 text-blue-400 border-blue-500/30",technical:"bg-purple-500/15 text-purple-400 border-purple-500/30",behavioral:"bg-yellow-500/15 text-yellow-500 border-yellow-500/30",final:"bg-orange-500/15 text-orange-400 border-orange-500/30",offer:"bg-success/15 text-success border-success/30",rejected:"bg-error/15 text-error border-error/30",ghosted:"bg-border/40 text-text-tertiary border-border"},Wle={screen:"bg-blue-400",technical:"bg-purple-400",behavioral:"bg-yellow-500",final:"bg-orange-400",offer:"bg-success",rejected:"bg-error",ghosted:"bg-border"},_6=["screen","technical","behavioral","final","offer","rejected","ghosted"];function Vle(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function w6({selected:e,onSelect:t}){const[n,r]=y.useState(!1),[s,i]=y.useState({}),a=y.useRef(null),l=y.useRef(null);y.useEffect(()=>{if(!n)return;const u=d=>{a.current&&!a.current.contains(d.target)&&l.current&&!l.current.contains(d.target)&&r(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[n]),y.useLayoutEffect(()=>{if(!n||!a.current)return;const u=a.current.getBoundingClientRect(),d=window.innerHeight-u.bottom,h=u.top,f=d<sS&&h>d,p=u.left+Tp>window.innerWidth-aS?u.right-Tp:u.left,m=Math.min(p,window.innerWidth-Tp-aS);i({position:"fixed",left:m,top:f?u.top-sS-iS:u.bottom+iS,width:Tp,zIndex:200})},[n]);const c=e?e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"Date (optional)";return o.jsxs(o.Fragment,{children:[o.jsx("button",{ref:a,type:"button",onClick:()=>r(u=>!u),className:re("text-xs rounded border border-border bg-bg px-2 py-1.5 focus:outline-none transition-colors hover:border-border-focus/40",e?"text-text":"text-text-tertiary"),children:c}),n&&Er.createPortal(o.jsx("div",{ref:l,style:s,className:"rounded-lg border border-border bg-bg-secondary shadow-modal p-2 overflow-hidden",children:o.jsx(Ule,{mode:"single",selected:e,onSelect:u=>{t(u),r(!1)},components:{MonthCaption:({calendarMonth:u})=>{const{goToMonth:d,nextMonth:h,previousMonth:f}=zu();return o.jsxs("div",{className:"flex items-center justify-center gap-2 py-1 mb-1",children:[o.jsx("button",{onClick:()=>f&&d(f),disabled:!f,className:"p-0.5 rounded hover:bg-bg-active transition-colors text-text-tertiary hover:text-text disabled:opacity-30",children:o.jsx(b4,{size:12})}),o.jsx("span",{className:"text-xs font-medium text-text",children:u.date.toLocaleDateString("en-US",{month:"long",year:"numeric"})}),o.jsx("button",{onClick:()=>h&&d(h),disabled:!h,className:"p-0.5 rounded hover:bg-bg-active transition-colors text-text-tertiary hover:text-text disabled:opacity-30",children:o.jsx(ma,{size:12})})]})},Nav:()=>o.jsx(o.Fragment,{})},classNames:{root:"w-full",months:"w-full",month:"w-full",month_caption:"",nav:"hidden",month_grid:"w-full border-collapse table-fixed",weekdays:"flex w-full",weekday:"flex-1 h-6 flex items-center justify-center text-2xs text-text-tertiary font-normal",weeks:"mt-1",week:"flex w-full",day:"flex-1 h-7 p-0",day_button:"w-full h-full flex items-center justify-center text-xs rounded hover:bg-bg-active text-text transition-colors focus:outline-none",selected:"[&>button]:bg-accent [&>button]:text-bg [&>button]:hover:bg-accent/90",today:"[&>button]:text-accent [&>button]:font-medium",outside:"[&>button]:text-text-tertiary [&>button]:opacity-40",disabled:"[&>button]:opacity-20 [&>button]:cursor-not-allowed"}})}),document.body)]})}function qle({applicationId:e,onDone:t}){const n=Yt(),[r,s]=y.useState("screen"),[i,a]=y.useState(""),[l,c]=y.useState(void 0),u=vn({mutationFn:d=>G.pipeline.stages.create(d),onSuccess:()=>{n.invalidateQueries({queryKey:["pipeline"]}),t()}});return o.jsxs(se.div,{initial:{opacity:0,y:-6}
681,animate:{opacity:1,y:0},exit:{opacity:0,y:-4},className:"flex gap-3",children:[o.jsx("div",{className:"flex flex-col items-center shrink-0 pt-[10px]",children:o.jsx("div",{className:"w-2 h-2 rounded-full shrink-0 border-2 border-border bg-bg"})}),o.jsxs("div",{className:"flex-1 pb-1 space-y-1.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("select",{autoFocus:!0,value:r,onChange:d=>s(d.target.value),className:"text-xs rounded border border-border bg-bg text-text px-2 py-1.5 focus:outline-none appearance-none cursor-pointer",children:_6.map(d=>o.jsx("option",{value:d,children:lf[d]},d))}),o.jsx(w6,{selected:l,onSelect:c})]}),o.jsx("div",{className:"border-t border-border/40 pt-1.5",children:o.jsx("textarea",{value:i,onChange:d=>{a(d.target.value),d.target.style.height="auto",d.target.style.height=d.target.scrollHeight+"px"},placeholder:"Notes (optional)",rows:2,className:"w-full text-xs rounded border-0 bg-bg text-text px-2 py-1 focus:outline-none placeholder:text-text-tertiary resize-none overflow-hidden"})}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("button",{onClick:()=>u.mutate({application_id:e,stage_type:r,notes:i,scheduled_at:l}),disabled:u.isPending,className:"px-3 py-1.5 rounded-lg bg-accent text-bg text-xs font-medium hover:bg-accent-hover transition-colors disabled:opacity-50",children:"Add stage"}),o.jsx("button",{onClick:t,className:"px-2 py-1.5 rounded text-xs text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:"Cancel"})]})]})]})}const Yle=["offer","rejected","ghosted"];function Gle({stage:e,app:t}){const n=Yt(),[r,s]=y.useState(!1),[i,a]=y.useState(!1),[l,c]=y.useState(e.stage_type),[u,d]=y.useState(e.notes??""),[h,f]=y.useState(e.scheduled_at?new Date(e.scheduled_at):void 0),p=y.useRef(null);y.useEffect(()=>{if(r&&p.current){const w=p.current;w.style.height="auto",w.style.height=w.scrollHeight+"px"}},[r]);const m=vn({mutationFn:()=>G.pipeline.stages.delete(e.id),onMutate:()=>{n.setQueryData(["pipeline"],w=>w&&{...w,applications:w.applications.map(g=>g.id===t.id?{...g,stages:g.stages.filter(b=>b.id!==e.id)}:g)})},onSuccess:()=>{n.invalidateQueries({queryKey:["pipeline"]}),n.invalidateQueries({queryKey:["prep-active"]})},onError:()=>n.invalidateQueries({queryKey:["pipeline"]})}),x=vn({mutationFn:w=>G.pipeline.stages.update(e.id,w),onSuccess:(w,g)=>{var b;n.invalidateQueries({queryKey:["pipeline"]}),s(!1),g.stage_type&&Yle.includes(g.stage_type)&&g.stage_type!==e.stage_type&&Ot.capture("application_outcome",{outcome:g.stage_type,company:t.company_name,role:t.job_title,job_id:t.job_id,resume_type:t.resume_type,generation_duration_s:(b=t.generation_metadata)==null?void 0:b.duration_seconds})}});return o.jsxs("div",{className:"flex gap-3",children:[o.jsxs("div",{className:"flex flex-col items-center pt-1 shrink-0",children:[o.jsx("div",{className:re("w-2 h-2 rounded-full shrink-0",Wle[e.stage_type])}),o.jsx("div",{className:"w-px flex-1 bg-border/50 mt-1"})]}),o.jsx("div",{className:"flex-1 pb-4 min-w-0",children:r?o.jsxs("div",{className:"space-y-1.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("select",{value:l,onChange:w=>c(w.target.value),className:"text-xs rounded border border-border bg-bg text-text px-2 py-1.5 focus:outline-none appearance-none cursor-pointer",children:_6.map(w=>o.jsx("option",{value:w,children:lf[w]},w))}),o.jsx(w6,{selected:h,onSelect:f})]}),o.jsx("div",{className:"border-t border-border/40 pt-1.5",children:o.jsx("textarea",{ref:p,value:u,onChange:w=>{d(w.target.value),w.target.style.height="auto",w.target.style.height=w.target.scrollHeight+"px"},placeholder:"Notes (optional)",rows:2,className:"w-full text-xs rounded border-0 bg-bg text-text px-2 py-1 focus:outline-none placeholder:text-text-tertiary resize-none overflow-hidden"})}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("button",{onClick:()=>x.mutate({stage_type:l,notes:u,scheduled_at:h?h.toISOString():null}),disabled:x.isPending,className:"px-3 py-1.5 rounded-lg bg-accent text-bg text-xs font-medium hover:bg-accent-hover transition-colors disabled:opacity-50",children:"Save"}),o.jsx("button",{onClick:()=>{s(!1),c(e.stage_type),d(e.notes??""),f(e.scheduled_at?new Date(e.scheduled_at):void 0)},className:"px-2 py-1.5 rounded text-xs text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:"Cancel"})]})]}):o.jsxs("div",{className:"group/stage",children:[o.jsxs("div",{className:re("flex items-center gap-2",e.notes&&"cursor-pointer"),onClick:()=>e.notes&&!r&&a(w=>!w),children:[o.jsx("span",{className:re("text-2xs px-1.5 py-0.5 rounded border font-medium shrink-0 w-24 text-center",Hle[e.stage_type]),children:e.label||lf[e.stage_type]}),e.scheduled_at&&o.jsx("span",{className:"text-2xs text-text-tertiary shrink-0",children:Vle(e.scheduled_at)}),o.jsx("div",{className:"flex-1"}),o.jsx("button",{onClick:w=>{w.stopPropagation(),s(!0)},className:"p-1 rounded text-text-tertiary/0 group-hover/stage:text-text-tertiary/40 hover:!text-text transition-colors shrink-0",title:"Edit stage",children:o.jsx(qn,{size:10})}),o.jsx("button",{onClick:w=>{w.stopPropagation(),m.mutate()},className:"p-1 rounded text-text-tertiary/0 group-hover/stage:text-text-tertiary/40 hover:!text-error hover:bg-error/10 transition-colors shrink-0",title:"Delete stage",children:o.jsx(Yn,{size:10})})]}),e.notes&&i&&o.jsx("p",{className:"mt-1 text-2xs text-text-tertiary/60 leading-relaxed",children:e.notes})]})})]})}function Pj({icon:e,label:t,href:n,exists:r,onDownload:s,onEdit:i}){return!r||!n?o.jsxs("div",{className:"flex items-center justify-between px-2 py-2 rounded-lg group/empty",children:[o.jsxs("div",{className:"flex items-center gap-2 opacity-30",children:[e,o.jsx("span",{className:"text-xs text-text-tertiary",children:t})]}),o.jsx("span",{className:"text-2xs text-text-tertiary/30 group-hover/empty:text-text-tertiary/60 transition-colors",children:"+ Add"})]}):o.jsxs("div",{className:"group/file flex items-center justify-between px-2 py-2 rounded-lg hover:bg-bg-active transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e,o.jsx("span",{className:"text-xs text-text truncate",children:t})]}),o.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover/file:opacity-100 transition-opacity shrink-0",children:[i&&o.jsx("button",{onClick:i,className:"p-1 rounded text-text-tertiary hover:text-text transition-colors",title:"Edit",children:o.jsx(qn,{size:11})}),o.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"p-1 rounded text-text-tertiary hover:text-text transition-colors",title:"Open",children:o.jsx(ha,{size:11})}),o.jsx("a",{href:n,download:!0,className:"p-1 rounded text-text-tertiary hover:text-text transition-colors",title:"Download",onClick:s,children:o.jsx(J2,{size:11})})]})]})}function Dj({value:e,placeholder:t,onSave:n,className:r,inputClassName:s}){const[i,a]=y.useState(!1),[l,c]=y.useState(e),u=y.useRef(null),d=()=>{const h=l.trim();h!==e&&n(h),a(!1)};
681return i?o.jsx("input",{ref:u,autoFocus:!0,value:l,onChange:h=>c(h.target.value),onBlur:d,onKeyDown:h=>{h.key==="Enter"&&d(),h.key==="Escape"&&(c(e),a(!1))},className:re("bg-transparent border-b border-border-focus outline-none",s)}):o.jsxs("button",{onClick:()=>{c(e),a(!0)},className:re("group/edit flex items-center gap-1.5 text-left",r),children:[o.jsx("span",{children:e||o.jsx("span",{className:"text-text-tertiary italic",children:t})}),o.jsx(qn,{size:11,className:"opacity-0 group-hover/edit:opacity-40 transition-opacity shrink-0"})]})}function wd({icon:e,label:t,children:n}){return o.jsxs("div",{className:"flex items-start gap-2.5 py-2 border-b border-border/30 last:border-0",children:[o.jsx("div",{className:"mt-0.5 text-text-tertiary/50 shrink-0",children:e}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-2xs text-text-tertiary/60 mb-0.5",children:t}),n]})]})}function Kle({value:e,placeholder:t,onSave:n}){const[r,s]=y.useState(!1),[i,a]=y.useState(e),l=()=>{i.trim()!==e&&n(i.trim()),s(!1)};return r?o.jsx("input",{autoFocus:!0,value:i,onChange:c=>a(c.target.value),onBlur:l,onKeyDown:c=>{c.key==="Enter"&&l(),c.key==="Escape"&&(a(e),s(!1))},className:"w-full text-xs text-text bg-transparent border-b border-border-focus outline-none pb-0.5"}):o.jsxs("button",{onClick:()=>{a(e),s(!0)},className:"group/dr flex items-center gap-1 text-left w-full",children:[o.jsx("span",{className:re("text-xs",e?"text-text-secondary":"text-text-tertiary/40 italic"),children:e||t}),o.jsx(qn,{size:9,className:"opacity-0 group-hover/dr:opacity-30 transition-opacity shrink-0"})]})}function Qle({value:e,options:t,onSave:n}){return o.jsx("div",{className:"relative",children:o.jsx("select",{value:e,onChange:r=>n(r.target.value),className:re("w-full appearance-none bg-transparent text-xs focus:outline-none cursor-pointer",e?"text-text-secondary":"text-text-tertiary/40 italic"),children:t.map(r=>o.jsx("option",{value:r.value,children:r.label},r.value))})})}function Xle({min:e,max:t,onSave:n}){const[r,s]=y.useState(!1),[i,a]=y.useState((e==null?void 0:e.toString())??""),[l,c]=y.useState((t==null?void 0:t.toString())??""),u=()=>{const f=i?parseInt(i.replace(/[^0-9]/g,""),10):null,p=l?parseInt(l.replace(/[^0-9]/g,""),10):null;n(f,p),s(!1)},d=f=>f>=1e3?`$${Math.round(f/1e3)}k`:`$${f}`,h=e||t?`${e?d(e):"?"}${t&&t!==e?` â ${d(t)}`:""}`:null;return r?o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"text-xs text-text-tertiary",children:"$"}),o.jsx("input",{autoFocus:!0,value:i,onChange:f=>a(f.target.value),onKeyDown:f=>{f.key==="Enter"&&u(),f.key==="Escape"&&s(!1)},placeholder:"min",className:"w-14 text-xs bg-transparent text-text border-b border-border-focus outline-none"}),o.jsx("span",{className:"text-xs text-text-tertiary",children:"â"}),o.jsx("input",{value:l,onChange:f=>c(f.target.value),onBlur:u,onKeyDown:f=>{f.key==="Enter"&&u(),f.key==="Escape"&&s(!1)},placeholder:"max",className:"w-14 text-xs bg-transparent text-text border-b border-border-focus outline-none"})]}):o.jsxs("button",{onClick:()=>{a((e==null?void 0:e.toString())??""),c((t==null?void 0:t.toString())??""),s(!0)},className:"group/dr flex items-center gap-1 text-left",children:[o.jsx("span",{className:re("text-xs",h?"text-text-secondary":"text-text-tertiary/40 italic"),children:h??"Add salary"}),o.jsx(qn,{size:9,className:"opacity-0 group-hover/dr:opacity-30 transition-opacity shrink-0"})]})}function Jle({value:e,onSave:t}){const[n,r]=y.useState(e),[s,i]=y.useState(!1),a=y.useRef(null),l=y.useRef(null),c=y.useRef(null);y.useEffect(()=>{const d=c.current;d&&(d.style.height="auto",d.style.height=`${d.scrollHeight}px`)},[n]),y.useEffect(()=>{r(e)},[e]);const u=d=>{r(d),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{t(d.trim()),i(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>i(!1),1500)},600)};return o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"text-xs font-medium text-text-secondary",children:"Notes"}),o.jsx("span",{className:re("text-2xs transition-opacity duration-300",s?"text-success opacity-100":"opacity-0"),children:"Saved"})]}),o.jsx("textarea",{ref:c,value:n,onChange:d=>u(d.target.value),placeholder:"Add notesâ¦",rows:3,style:{minHeight:"4rem"},className:"w-full text-2xs text-text bg-transparent border-none outline-none resize-none leading-relaxed placeholder:text-text-tertiary/40 cursor-text overflow-hidden"})]})}function E6(e){if(!e)return"";const t=Math.floor(e/60),n=e%60;return t>0?`${t}m ${n}s`:`${n}s`}function Zle({rec:e,onClose:t,onLinked:n}){var Ue,ot,Ye;const r=Yt(),[s,i]=y.useState("debrief"),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[d,h]=y.useState(e.notes??""),[f,p]=y.useState(!1),m=y.useRef(null),[x,w]=y.useState(""),[g,b]=y.useState(""),[_,k]=y.useState(!1),[T,N]=y.useState(!1),[C,S]=y.useState(null),[I,E]=y.useState(""),[j,P]=y.useState(!1),L=y.useRef(null),[z,R]=y.useState(!1),{data:B}=wt({queryKey:["pipeline"],queryFn:()=>G.pipeline.summary(),staleTime:3e4}),O=(B==null?void 0:B.applications)??[],U=O.find(ae=>ae.id===x)??null,H=U?[...U.stages].sort((ae,Ge)=>new Date(ae.created_at).getTime()-new Date(Ge.created_at).getTime()):[],A=y.useMemo(()=>new ps(O,{keys:[{name:"company_name",weight:.6},{name:"job_title",weight:.4}],threshold:.35,ignoreLocation:!0}
681),[O]),q=I.trim()?A.search(I).map(ae=>ae.item):O;y.useEffect(()=>{if(!j)return;function ae(Ge){L.current&&!L.current.contains(Ge.target)&&P(!1)}return document.addEventListener("mousedown",ae),()=>document.removeEventListener("mousedown",ae)},[j]);const V=async()=>{if(!x)return;const ae=(U==null?void 0:U.company_name)??"application";k(!0);try{await G.pipeline.recordings.link(e.id,x,g||void 0),N(!0),S(ae),P(!1),r.invalidateQueries({queryKey:["recordings"]}),r.invalidateQueries({queryKey:["unlinked-recordings"]}),n==null||n()}finally{k(!1)}},D=async()=>{if(window.confirm("Delete this recording and its transcript? This can't be undone.")){R(!0);try{await G.pipeline.recordings.delete(e.id),r.invalidateQueries({queryKey:["recordings"]}),r.invalidateQueries({queryKey:["unlinked-recordings"]}),t()}finally{R(!1)}}},te=e.debrief,J=ae=>{h(ae),p(!1),m.current&&clearTimeout(m.current),m.current=setTimeout(async()=>{await G.pipeline.recordings.updateNotes(e.id,ae),p(!0),setTimeout(()=>p(!1),1500)},800)};y.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]);const ue=te&&!te.error?[`# ${te.title??"Interview Debrief"}`,"","## Summary",te.summary??"","",(Ue=te.went_well)!=null&&Ue.length?["## What Went Well",...te.went_well.map(ae=>`- ${ae}`)].join(` 682`):"","",(ot=te.improve)!=null&&ot.length?["## Areas to Improve",...te.improve.map(ae=>`- ${ae}`)].join(` 683`):"","",(Ye=te.questions)!=null&&Ye.length?["## Q&A Coaching",...te.questions.map(ae=>`**${ae.question}** 684${ae.answer_summary} 685 686> ${ae.coaching}`)].join(` 687 688`):""].filter(Boolean).join(` 689`):"",Ne=e.transcript??"",Ie=ae=>{navigator.clipboard.writeText(ae),l(!0),setTimeout(()=>l(!1),1500)},Pe=async()=>{u(!0);try{await G.pipeline.recordings.retryDebrief(e.id),r.invalidateQueries({queryKey:["recordings"]}),r.invalidateQueries({queryKey:["unlinked-recordings"]})}finally{u(!1)}};return y.useEffect(()=>{const ae=Ge=>{Ge.key==="Escape"&&t()};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[t]),Er.createPortal(o.jsxs("div",{className:"fixed inset-0 z-[300] flex items-center justify-center p-4",children:[o.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:t}),o.jsxs(se.div,{initial:{opacity:0,scale:.97,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:8},transition:{duration:.15},className:"relative w-full max-w-2xl max-h-[85vh] flex flex-col rounded-xl border border-border bg-bg shadow-modal overflow-hidden",children:[o.jsxs("div",{className:"flex items-start justify-between px-5 py-4 border-b border-border shrink-0",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-text",children:(te==null?void 0:te.title)??"Interview Recording"}),o.jsxs("p",{className:"text-2xs text-text-tertiary mt-0.5",children:[new Date(e.recorded_at).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}),e.duration_seconds?` · ${E6(e.duration_seconds)}`:""]})]}),o.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-4",children:[(e.application_id||T)&&o.jsx("button",{onClick:()=>P(ae=>!ae),title:"Reassign to different application",className:"p-1.5 rounded text-text-tertiary/40 hover:text-text-tertiary hover:bg-bg-active transition-colors",children:o.jsx(Su,{size:15})}),o.jsx("button",{onClick:D,disabled:z,title:"Delete recording",className:"p-1.5 rounded text-text-tertiary/40 hover:text-error hover:bg-error/10 transition-colors disabled:opacity-30",children:o.jsx(Yn,{size:14})}),o.jsx("button",{onClick:t,className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(gx,{size:15})})]})]}),o.jsxs("div",{className:"flex items-center justify-between px-5 pt-3 pb-0 shrink-0",children:[o.jsx("div",{className:"flex gap-1",children:["debrief","transcript"].map(ae=>o.jsx("button",{onClick:()=>i(ae),className:re("px-3 py-1.5 text-xs rounded-t border-b-2 transition-colors capitalize",s===ae?"border-accent text-text font-medium":"border-transparent text-text-tertiary hover:text-text"),children:ae},ae))}),o.jsxs("div",{className:"flex items-center gap-2 pb-1",children:[s==="debrief"&&(te==null?void 0:te.error)&&o.jsx("button",{onClick:Pe,disabled:c,
689className:"text-2xs text-accent hover:text-accent/70 disabled:opacity-40 transition-colors",children:c?"Retryingâ¦":"Retry debrief"}),s==="debrief"&&te&&!te.error&&o.jsxs("button",{onClick:()=>Ie(ue),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[a?o.jsx(yt,{size:10,className:"text-success"}):o.jsx(Nr,{size:10}),a?"Copied":"Copy debrief"]}),s==="transcript"&&e.transcript&&o.jsxs("button",{onClick:()=>Ie(Ne),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-text transition-colors",children:[a?o.jsx(yt,{size:10,className:"text-success"}):o.jsx(Nr,{size:10}),a?"Copied":"Copy transcript"]})]})]}),o.jsx("div",{className:"h-px bg-border shrink-0"}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4",children:[s==="debrief"&&o.jsxs("div",{children:[!te&&o.jsx("div",{className:"py-8",children:o.jsx(Dg,{variant:"debrief"})}),(te==null?void 0:te.error)&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-sm text-error",children:te.error}),o.jsx("p",{className:"text-xs text-text-tertiary",children:'Use "Retry debrief" above to try again.'})]}),te&&!te.error&&o.jsxs("div",{className:"space-y-5",children:[te.summary&&o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:te.summary}),te.went_well&&te.went_well.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-success mb-2 uppercase tracking-widest",children:"What went well"}),o.jsx("ul",{className:"space-y-2",children:te.went_well.map((ae,Ge)=>{const[nt,...De]=ae.split(":");return o.jsxs("li",{className:"text-sm text-text-secondary leading-relaxed flex gap-2",children:[o.jsx("span",{className:"text-success mt-1 shrink-0",children:"â"}),o.jsxs("span",{children:[o.jsx("strong",{className:"text-text font-medium",children:nt}),De.length?`:${De.join(":")}`:""]})]},Ge)})})]}),te.improve&&te.improve.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-yellow-500 mb-2 uppercase tracking-widest",children:"Areas to improve"}),o.jsx("ul",{className:"space-y-2",children:te.improve.map((ae,Ge)=>{const[nt,...De]=ae.split(":");return o.jsxs("li",{className:"text-sm text-text-secondary leading-relaxed flex gap-2",children:[o.jsx("span",{className:"text-yellow-500 mt-1 shrink-0",children:"â³"}),o.jsxs("span",{children:[o.jsx("strong",{className:"text-text font-medium",children:nt}),De.length?`:${De.join(":")}`:""]})]},Ge)})})]}),te.questions&&te.questions.length>0&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary mb-3 uppercase tracking-widest",children:"Q&A Coaching"}),o.jsx("div",{className:"space-y-3",children:te.questions.map((ae,Ge)=>o.jsxs("div",{className:"rounded-lg border border-border bg-bg-secondary overflow-hidden",children:[o.jsx("div",{className:"px-4 py-2.5 border-b border-border/50 bg-bg-tertiary/30",children:o.jsx("p",{className:"text-xs font-medium text-text",children:ae.question})}),o.jsxs("div",{className:"px-4 py-2.5 space-y-1.5",children:[o.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:ae.answer_summary}),o.jsxs("div",{className:"flex gap-2 pt-1",children:[o.jsx("span",{className:"text-accent text-xs shrink-0 mt-0.5",children:"â"}),o.jsx("p",{className:"text-xs text-accent leading-relaxed",children:ae.coaching})]})]})]},Ge))})]})]})]}),s==="transcript"&&o.jsxs("div",{children:[!e.transcript&&o.jsx("p",{className:"text-sm text-text-tertiary italic",children:"No transcript available."}),e.transcript&&o.jsx("div",{className:"space-y-2",children:e.transcript.split(` 690`).map((ae,Ge)=>{const nt=ae.match(/^Speaker (\d+): (.+)$/);if(!nt)return null;const De=parseInt(nt[1]);return o.jsxs("div",{className:re("flex gap-3 py-1",De===1&&"pl-4"),children:[o.jsx("span",{className:re("text-xs shrink-0 font-medium w-8 pt-0.5",De===0?"text-blue-400":"text-accent"),children:De===0?"Them":"You"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:nt[2]})]},Ge)})})]})]}),C?o.jsxs("div",{className:"shrink-0 border-t border-border px-5 py-2.5 flex items-center gap-2 bg-bg-secondary/40",children:[o.jsx(yt,{size:12,className:"text-success shrink-0"}),o.jsxs("p",{className:"text-xs text-text-secondary",children:["Linked to ",o.jsx("span",{className:"font-medium text-text",children:C})]})]}):!e.application_id&&!T?o.jsxs("div",{className:"shrink-0 border-t border-border px-5 py-3 bg-bg-secondary/40",children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest mb-2",children:"Link to Application"}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsxs("div",{ref:L,className:"relative flex-1",children:[o.jsx("input",{type:"text",value:U?`${U.company_name} â ${U.job_title}`:I,onChange:ae=>{E(ae.target.value),w(""),b("")},onFocus:()=>{},placeholder:"Search applicationsâ¦",className:"w-full rounded border border-border bg-bg px-2.5 py-1.5 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50"}),q.length>0&&I&&o.jsx("div",{className:"absolute bottom-full mb-1 left-0 right-0 max-h-48 overflow-y-auto rounded border border-border bg-bg shadow-lg z-50",children:q.map(ae=>o.jsxs("button",{onMouseDown:Ge=>Ge.preventDefault(),onClick:()=>{w(ae.id),E("")},className:"w-full text-left px-3 py-2 text-xs hover:bg-bg-secondary transition-colors border-b border-border/50 last:border-0",children:[o.jsx("span",{className:"font-medium text-text",children:ae.company_name}),o.jsxs("span",{className:"text-text-tertiary ml-1",children:["â ",ae.job_title]})]},ae.id))})]}),H.length>0&&o.jsxs("select",{value:g,onChange:ae=>b(ae.target.value),className:"rounded border border-border bg-bg px-2 py-1.5 text-xs text-text focus:outline-none focus:ring-1 focus:ring-accent/50",children:[o.jsx("option",{value:"",children:"Stageâ¦"}),H.map(ae=>o.jsx("option",{value:ae.id,children:lf[ae.stage_type]},ae.id))]}),o.jsx("button",{onClick:V,disabled:!x||_,className:"text-xs text-accent hover:text-accent/70 disabled:opacity-30 transition-colors whitespace-nowrap font-medium",children:_?"Linkingâ¦":"Link"})]})]}):j?o.jsxs("div",{ref:L,className:"shrink-0 border-t border-border px-5 py-3 bg-bg-secondary/40",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest",children:"Change Application"}),o.jsx("button",{onClick:()=>P(!1),className:"text-2xs text-text-tertiary/60 hover:text-text-tertiary transition-colors",children:"Cancel"})]}),o.jsxs("div",{className:"flex gap-2 items-center",children:[o.jsxs("div",{className:"relative flex-1",children:[o.jsx("input",{type:"text",value:U?`${U.company_name} â ${U.job_title}`:I,onChange:ae=>{E(ae.target.value),w(""),b("")},placeholder:"Search applicationsâ¦",autoFocus:!0,className:"w-full rounded border border-border bg-bg px-2.5 py-1.5 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50"}),q.length>0&&I&&o.jsx("div",{className:"absolute bottom-full mb-1 left-0 right-0 max-h-48 overflow-y-auto rounded border border-border bg-bg shadow-lg z-50",children:q.map(ae=>o.jsxs("button",{onMouseDown:Ge=>Ge.preventDefault(),onClick:()=>{w(ae.id),E("")},className:"w-full text-left px-3 py-2 text-xs hover:bg-bg-secondary transition-colors border-b border-border/50 last:border-0",children:[o.jsx("span",{className:"font-medium text-text",children:ae.company_name}),o.jsxs("span",{className:"text-text-tertiary ml-1",children:["â ",ae.job_title]})]},ae.id))})]}),H.length>0&&o.jsxs("select",{value:g,onChange:ae=>b(ae.target.value),className:"rounded border border-border bg-bg px-2 py-1.5 text-xs text-text focus:outline-none focus:ring-1 focus:ring-accent/50",children:[o.jsx("option",{value:"",children:"Stageâ¦"}),H.map(ae=>o.jsx("option",{value:ae.id,children:lf[ae.stage_type]},ae.id))]}),o.jsx("button",{onClick:V,disabled:!x||_,className:"text-xs text-accent hover:text-accent/70 disabled:opacity-30 transition-colors whitespace-nowrap font-medium",children:_?"Linkingâ¦":"Link"})]})]}):null,o.jsxs("div",{className:"shrink-0 border-t border-border px-5 py-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest",children:"Personal Notes"}),f&&o.jsx("span",{className:"text-2xs text-success",children:"Saved"})]}),o.jsx("textarea",{value:d,onChange:ae=>J(ae.target.value),placeholder:"Add your own notes, reflections, or follow-upsâ¦",rows:3,className:"w-full resize-none rounded-lg border border-border bg-bg-secondary px-3 py-2 text-sm text-text-secondary placeholder:text-text-tertiary/50 focus:outline-none focus:ring-1 focus:ring-accent/50 transition-colors"})]})]})]}),document.body)}function ece({continueDown:e}){const l=`M 0 0 C 0 9, ${12.6} 9, 28 9`;return o.jsxs("svg",{width:28,height:18,className:"shrink-0 overflow-visible",children:[e&&o.jsx("line",{x1:0,y1:9,x2:0,y2:18,stroke:"currentColor",strokeWidth:"1",className:"text-border/50"}),o.jsx("path",{d:l,fill:"none",stroke:"currentColor",strokeWidth:"1",className:"text-border/50"})]})}function N6({rec:e,continueDown:t}){const[n,r]=y.useState(!1),s=e.debrief;return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"flex items-center ml-1 mb-2 -mt-2",children:[o.jsx(ece,{continueDown:t}),o.jsxs("button",{onClick:()=>r(!0),className:"inline-flex items-center gap-1.5 py-px px-1 rounded hover:bg-bg-active transition-colors text-left min-w-0",children:[o.jsx(nv,{size:9,className:"text-text-tertiary/40 shrink-0"}),o.jsx("span",{className:"text-2xs text-text-tertiary truncate",children:(s==null?void 0:s.title)??new Date(e.recorded_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}),e.duration_seconds&&o.jsxs("span",{className:"text-2xs text-text-tertiary/40 shrink-0",children:["· ",E6(e.duration_seconds)]}),!s&&o.jsx("span",{className:"text-2xs text-text-tertiary/30 italic shrink-0",children:"· processing"}),(s==null?void 0:s.error)&&o.jsx("span",{className:"text-2xs text-error/60 shrink-0",children:"· failed"})]})]}),o.jsx(He,{children:n&&o.jsx(Zle,{rec:e,onClose:()=>r(!1)})})]})}function tce({stageId:e,hasNextSibling:t}){const{data:n,isLoading:r}=wt({queryKey:["recordings",e],queryFn:()=>G.pipeline.recordings.forStage(e),refetchInterval:s=>{const i=s.state.data;return i&&i.some(a=>!a.debrief)?5e3:!1}});return r||!n||n.length===0?null:o.jsx("div",{children:n.map((s,i)=>o.jsx(N6,{rec:s,continueDown:i<n.length-1||t},s.id))})}function nce({applicationId:e}){const{data:t}=wt({queryKey:["recordings","app",e],queryFn:()=>G.pipeline.recordings.forApplication(e),refetchInterval:n=>{const r=n.state.data;return r&&r.some(s=>!s.debrief)?5e3:!1}});return!t||t.length===0?null:o.jsx("div",{children:t.map((n,r)=>o.jsx(N6,{rec:n,continueDown:r<t.length-1},n.id))})}function rce({app:e,onBack:t,noBreadcrumb:n}){const r=Yt(),[s,i]=y.useState(!1),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[d,h]=y.useState(!1),[f,p]=y.useState(!1),[m,x]=y.useState(Date.now()),[w,g]=y.useState(Date.now()),b=vn({mutationFn:P=>G.pipeline.updateApplication(e.job_id,P),onSuccess:()=>
690r.invalidateQueries({queryKey:["pipeline"]})}),_=[...e.stages].sort((P,L)=>new Date(P.created_at).getTime()-new Date(L.created_at).getTime()),k=`${G.applications.resumeUrl(e.job_id)}&t=${m}`,T=e.cover_letter_gcs_path?`${G.applications.coverLetterUrl(e.job_id)}&t=${w}`:null,{data:N}=wt({queryKey:["portfolio"],queryFn:()=>G.portfolio.get()}),{data:C}=wt({queryKey:["portfolio-versions",e.job_id],queryFn:()=>G.portfolio.versions.list(),enabled:!!e.portfolio_version_token,staleTime:0}),S=e.portfolio_version_token?(C==null?void 0:C.versions.find(P=>P.token===e.portfolio_version_token))??null:null,I=N&&S?`${xV}/p/${N.slug}/${S.token}`:null,[E,j]=y.useState(!1);return o.jsxs(se.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},transition:{duration:.18},className:"flex flex-col h-full",children:[!n&&o.jsx("div",{className:"px-4 pt-3 pb-1 shrink-0",children:o.jsx("button",{onClick:t,className:"p-1 rounded text-text-tertiary/50 hover:text-text hover:bg-bg-active transition-colors",title:"Back",children:o.jsx(fx,{size:15})})}),o.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[o.jsx("div",{className:"flex-1 overflow-y-auto",children:o.jsxs("div",{className:"px-4 sm:px-8 pt-6 pb-8 space-y-6",children:[o.jsxs("div",{children:[o.jsx(Dj,{value:e.job_title||"",placeholder:"No title",onSave:P=>b.mutate({job_title:P}),className:"text-lg font-semibold text-text leading-tight",inputClassName:"text-lg font-semibold text-text leading-tight w-full"}),o.jsx(Dj,{value:e.company_name||"",placeholder:"Add company",onSave:P=>b.mutate({company_name:P}),className:"text-sm text-text-tertiary mt-1",inputClassName:"text-sm text-text-tertiary w-full mt-1"}),o.jsx("div",{className:"mt-2",children:o.jsx("p",{className:"text-2xs text-text-tertiary/50",children:Rw(e.applied_at??e.created_at)})}),o.jsx("div",{className:"border-t border-border/15 mt-3"})]}),o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("p",{className:"text-xs font-medium text-text-secondary",children:"Timeline"}),!s&&o.jsxs("button",{onClick:()=>i(!0),className:"flex items-center gap-1 text-2xs text-text-tertiary hover:text-accent transition-colors",children:[o.jsx(us,{size:11}),"Add stage"]})]}),_.length===0&&!s?o.jsx("p",{className:"text-xs text-text-tertiary",children:"No stages yet. Add one when you hear back."}):o.jsx("div",{children:_.map((P,L)=>{const z=L===_.length-1&&!s;return o.jsxs("div",{className:re(z?"[&_.w-px]:hidden":""),children:[o.jsx(Gle,{stage:P,app:e}),o.jsx(tce,{stageId:P.id,hasNextSibling:!z})]},P.id)})}),o.jsx(He,{initial:!1,children:s&&o.jsx(se.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:o.jsx(qle,{applicationId:e.id,onDone:()=>i(!1)})},"add-form")}),o.jsx(nce,{applicationId:e.id})]}),o.jsx("section",{children:o.jsx(Jle,{value:e.notes??"",onSave:P=>b.mutate({notes:P||void 0})})})]})}),o.jsx(zle,{width:"sm",side:"right",className:"hidden sm:flex",children:o.jsxs("div",{className:"overflow-y-auto flex-1 px-4 pt-6 pb-4",children:[o.jsx("p",{className:re(qt,"mb-4"),children:"Job details"}),o.jsxs("div",{children:[o.jsx(wd,{icon:o.jsx(hH,{size:11}),label:"Location",children:o.jsx(Kle,{value:e.location??"",placeholder:"Add location",onSave:P=>b.mutate({location:P||void 0})})}),o.jsx(wd,{icon:o.jsx(mx,{size:11}),label:"Arrangement",children:o.jsx(Qle,{value:e.work_arrangement??"",options:[{value:"",label:"â"},{value:"remote",label:"Remote"},{value:"hybrid",label:"Hybrid"},{value:"onsite",label:"Onsite"}],onSave:P=>b.mutate({work_arrangement:P||void 0})})}),o.jsx(wd,{icon:o.jsx(Kz,{size:11}),label:"Salary",children:o.jsx(Xle,{min:e.salary_min,max:e.salary_max,onSave:(P,L)=>b.mutate({salary_min:P??void 0,salary_max:L??void 0})})}),S&&I&&o.jsx(wd,{icon:o.jsx(kf,{size:11}),label:"Portfolio",children:o.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[o.jsx("a",{href:I,target:"_blank",rel:"noreferrer",className:"text-xs text-text-secondary hover:text-accent underline underline-offset-2 transition-colors truncate",children:"View portfolio"}),S.views>0&&o.jsxs("span",{className:"text-2xs text-text-tertiary shrink-0",children:["· ",S.views,"v"]}),o.jsx("button",{onClick:()=>{navigator.clipboard.writeText(I),j(!0),setTimeout(()=>j(!1),1500)},className:"shrink-0 p-0.5 rounded hover:bg-bg-active transition-colors",children:E?o.jsx(yt,{size:10,
690className:"text-success"}):o.jsx(Nr,{size:10,className:"text-text-tertiary"})})]})}),e.job_url&&o.jsx(wd,{icon:o.jsx(ha,{size:11}),label:"Posting",children:o.jsx("a",{href:e.job_url,target:"_blank",rel:"noreferrer",className:"text-xs text-text-secondary hover:text-accent underline underline-offset-2 transition-colors truncate block",children:"View posting"})}),e.job_description&&o.jsxs("div",{className:"group flex items-center gap-1 py-1.5",children:[o.jsx(Rr,{size:11,className:"text-text-tertiary shrink-0"}),o.jsx("button",{onClick:()=>l(!0),className:"flex-1 text-left text-2xs text-text-tertiary hover:text-text transition-colors",children:"Job description"}),o.jsx("button",{onClick:async()=>{await navigator.clipboard.writeText(e.job_description),u(!0),setTimeout(()=>u(!1),2e3)},title:"Copy job description",className:`p-0.5 rounded text-text-tertiary hover:text-text transition-colors ${c?"":"opacity-0 group-hover:opacity-100"}`,children:c?o.jsx(yt,{size:10,className:"text-success"}):o.jsx(Nr,{size:10})})]}),a&&e.job_description&&o.jsx(tD,{title:"Job Description",text:e.job_description,onClose:()=>l(!1)})]}),o.jsx("p",{className:re(qt,"mt-7 mb-4"),children:"Files"}),o.jsxs("div",{className:"-mx-2 space-y-0.5",children:[o.jsx(Pj,{icon:o.jsx(Rr,{size:13,className:"text-text-tertiary"}),label:"Resume",href:k,exists:!!e.resume_gcs_path,onEdit:e.resume_structured?()=>h(!0):void 0,onDownload:()=>Ot.capture("resume_downloaded",{job_id:e.job_id,company:e.company_name,role:e.job_title,source:"pipeline_detail",with_cover_letter:!!e.cover_letter_gcs_path})}),o.jsx(Pj,{icon:o.jsx(dH,{size:13,className:"text-text-tertiary"}),label:"Cover Letter",href:T,exists:!!e.cover_letter_gcs_path,onEdit:e.cover_letter_structured?()=>p(!0):void 0})]})]})}),o.jsxs(He,{children:[d&&o.jsx(aw,{app:e,onClose:()=>h(!1),onRecompiled:()=>{x(Date.now()),h(!1)}}),f&&o.jsx(iw,{app:e,onClose:()=>p(!1),onRecompiled:()=>{g(Date.now()),p(!1)}})]})]})]})}function sce({onConfirm:e,onCancel:t,confirmLabel:n="Save"}){return o.jsxs("div",{className:"flex gap-2 mt-1.5",children:[o.jsx("button",{onMouseDown:r=>{r.preventDefault(),e()},className:"text-xs text-accent hover:text-accent-hover font-medium transition-colors",children:n}),o.jsx("button",{onMouseDown:r=>{r.preventDefault(),t()},className:"text-xs text-text-tertiary hover:text-text transition-colors",children:"Cancel"})]})}function Jv({value:e,onChange:t,onConfirm:n,onCancel:r,placeholder:s="Add a talking pointâ¦",autoFocus:i=!1,showActions:a}){const[l,c]=y.useState(!1),u=e.trim().length>0,d=a??(l||u);return o.jsxs("div",{children:[o.jsx("textarea",{autoFocus:i,value:e,onChange:h=>t(h.target.value),placeholder:s,rows:2,onFocus:()=>c(!0),onBlur:()=>c(!1),className:"w-full text-sm bg-transparent text-text resize-none placeholder:text-text-tertiary focus:outline-none",onKeyDown:h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),n()),h.key==="Escape"&&r()}}),d&&o.jsx(sce,{onConfirm:n,onCancel:r})]})}const ice={p:({children:e})=>o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed mb-2 last:mb-0",children:e}),strong:({children:e})=>o.jsx("strong",{className:"font-semibold text-text",children:e}),ul:({children:e})=>o.jsx("ul",{className:"space-y-1.5 mt-1",children:e}),ol:({children:e})=>o.jsx("ol",{className:"space-y-1.5 mt-1 list-decimal list-outside ml-4",children:e}),li:({children:e})=>o.jsxs("li",{className:"flex items-start gap-2 text-sm text-text-secondary",children:[o.jsx("span",{className:"mt-1.5 w-1 h-1 rounded-full bg-accent shrink-0"}),o.jsx("span",{children:e})]}),h1:({children:e})=>o.jsx("p",{className:"text-xs font-semibold text-text uppercase tracking-wide mt-3 mb-1",children:e}),h2:({children:e})=>o.jsx("p",{className:"text-xs font-semibold text-text uppercase tracking-wide mt-3 mb-1",children:e}),h3:({children:e})=>o.jsx("p",{className:"text-xs font-semibold text-text mt-2 mb-0.5",children:e})},ace=3,Zv={screen:"Phone Screen",technical:"Technical",behavioral:"Behavioral",final:"Final Round",offer:"Offer",rejected:"Rejected",ghosted:"Ghosted"},k6={screen:"bg-blue-500/15 text-blue-400 border-blue-500/20",technical:"bg-purple-500/15 text-purple-400 border-purple-500/20",behavioral:"bg-warning/15 text-warning border-warning/20",final:"bg-success/15 text-success border-success/20",offer:"bg-success/15 text-success border-success/20",rejected:"bg-error/15 text-error border-error/20",ghosted:"bg-text-tertiary/15 text-text-tertiary border-text-tertiary/20"},T6={opener:"Opener",why_company:"Why this company",why_role:"Why this role",behavioral:"Behavioral",closer:"Closer"},Rg=["opener","why_company","why_role","behavioral"];function S6(e){if(!e)return{label:"No date set",urgent:!1};const t=Math.ceil((new Date(e).getTime()-Date.now())/864e5);return t<0?{label:"Past",urgent:!1}:t===0?{label:"Today",urgent:!0}:t===1?{label:"Tomorrow",urgent:!0}:t<=3?{label:`In ${t} days`,urgent:!0}:{label:`In ${t} days`,urgent:!1}}function Oj({label:e,current:t,target:n}){const r=Math.min(100,n>0?t/n*100:0);return o.jsxs("div",{className:"space-y-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"text-xs text-text-secondary",children:e}),o.jsxs("span",{className:"text-xs text-text-tertiary",children:[t," / ",n]})]}),o.jsx("div",{className:"h-1 rounded-full bg-bg-active overflow-hidden",children:o.jsx("div",{className:"h-full rounded-full bg-accent transition-all duration-500",style:{width:`${r}%`}})})]})}function oce({stage:e,onSelect:t}){const{label:n,urgent:r}=S6(e.scheduled_at),s=e.prep_status!=="none"&&e.prep_generated_for_stage_type!==null&&e.prep_generated_for_stage_type!==e.stage_type,i=e.prep_status==="ready"?{text:"Prep ready",color:"text-emerald-400"}:e.prep_status==="generating"?{text:"Generatingâ¦",color:"text-text-tertiary"}:e.prep_status==="error"?{text:"Error",color:"text-error"}:{text:"Prep needed",color:"text-rose-400"};return o.jsx(se.div,{layout:!0,initial:{opacity:0,y:8}
690,animate:{opacity:1,y:0},className:"rounded-xl border border-border bg-bg-secondary hover:bg-bg-active transition-colors cursor-pointer",onClick:()=>{t(e.application_id),Ot.capture("prep_opened",{application_id:e.application_id,company:e.company_name,stage_type:e.stage_type,prep_status:e.prep_status})},children:o.jsxs("div",{className:"px-4 py-4 flex items-center gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm font-bold text-text",children:e.company_name||"Unknown company"}),o.jsx("span",{className:"text-sm text-text-tertiary truncate",children:e.job_title})]}),o.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[o.jsxs("span",{className:re("flex items-center gap-1 text-xs",r?"text-warning":"text-text-tertiary"),children:[o.jsx(y4,{size:11}),n]}),o.jsx("span",{className:re("text-2xs px-1.5 py-0.5 rounded border font-medium",k6[e.stage_type]),children:Zv[e.stage_type]}),s&&o.jsx("span",{className:"text-2xs px-1.5 py-0.5 rounded border font-medium bg-warning/10 text-warning border-warning/20",children:"Stage updated"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o.jsx("span",{className:re("text-xs font-medium",i.color),children:i.text}),o.jsx(ma,{size:14,className:"text-text-tertiary"})]})]})})}function Ed({title:e,children:t}){return o.jsxs("div",{className:"space-y-1",children:[o.jsx("p",{className:qt,children:e}),t]})}function lce({deck:e,applicationId:t}){const n=Yt(),r=Sf(),[s,i]=y.useState(e.enrichment_notes||""),[a,l]=y.useState(!1),c=vn({mutationFn:u=>G.prep.enrich(t,u),onSuccess:()=>{n.invalidateQueries({queryKey:["prep-app",t]}),l(!1)},onError:()=>{r.toast("Couldn't save notes",{kind:"error"})}});return o.jsxs("div",{className:"space-y-6",children:[e.company_brief&&o.jsx(Ed,{title:"Company",children:o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.company_brief})}),e.company_news&&o.jsx(Ed,{title:"Recent news",children:o.jsx(mo,{remarkPlugins:[Dx],components:ice,children:e.company_news.replace(/\[\d+\]/g,"")})}),e.role_brief&&o.jsx(Ed,{title:"The role",children:o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.role_brief})}),e.orientation_brief&&o.jsx(Ed,{title:"What to expect",children:o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:e.orientation_brief})}),o.jsx(Ed,{title:"Your notes",children:a?o.jsx(Jv,{autoFocus:!0,value:s,onChange:i,onConfirm:()=>c.mutate(s),onCancel:()=>l(!1),placeholder:"Add anything you learned on the callâ¦",showActions:!0}):o.jsx("button",{onClick:()=>l(!0),className:"text-sm text-text-tertiary hover:text-text transition-colors text-left",children:e.enrichment_notes?e.enrichment_notes:o.jsx("span",{className:"italic",children:"Add notes after your callâ¦"})})})]})}function cce({train:e,applicationId:t}){const[n,r]=y.useState(!1),[s,i]=y.useState(null),[a,l]=y.useState(e.cues),[c,u]=y.useState(null),[d,h]=y.useState(""),[f,p]=y.useState(!1),[m,x]=y.useState("");y.useEffect(()=>{n||(p(!1),x(""),u(null))},[n]);const w=T=>{l(T),G.prep.trains.update(e.id,{cues:T}),Ot.capture("prep_card_edited",{application_id:t,card_type:e.card_type,train_id:e.id})},g=T=>{const N=d.trim();N&&(w(a.map((C,S)=>S===T?N:C)),u(null))},b=T=>w(a.filter((N,C)=>C!==T)),_=()=>{const T=m.trim();T&&(w([...a,T]),x(""),p(!1))},k=T=>{s!==T&&(i(T),Ot.capture("prep_card_feedback",{application_id:t,card_type:e.card_type,train_id:e.id,rating:T}))};return o.jsxs("div",{className:re("rounded-xl border transition-colors group",n?"border-border bg-bg-secondary":"border-border bg-bg-secondary hover:bg-bg-active"),children:[o.jsxs("button",{onClick:()=>r(T=>!T),className:"w-full px-4 py-3.5 text-left flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs uppercase tracking-widest text-text-tertiary mb-1",children:T6[e.card_type]}),o.jsx("p",{className:"text-sm text-text",children:e.question})]}),o.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[n&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:T=>{T.stopPropagation(),k(1)},className:re("p-2 sm:p-1 rounded transition-colors opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100",s===1?"text-success !opacity-100":"text-text-tertiary hover:text-text"),children:o.jsx(yx,{size:14,className:"sm:w-3 sm:h-3"})}),o.jsx("button",{onClick:T=>{T.stopPropagation(),k(-1)},className:re("p-2 sm:p-1 rounded transition-colors opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100",s===-1?"text-error !opacity-100":"text-text-tertiary hover:text-text"),children:o.jsx(xx,{size:14,className:"sm:w-3 sm:h-3"})})]}),o.jsx(ma,{size:14,className:re("text-text-tertiary transition-transform ml-1",n&&"rotate-90")})]})]}),n&&o.jsxs("div",{className:"px-4 pb-3 border-t border-border/50 pt-2.5 space-y-2",children:[a.map((T,N)=>o.jsx("div",{children:c===N?o.jsx("div",{className:"pl-3",children:o.jsx(Jv,{autoFocus:!0,value:d,onChange:h,onConfirm:()=>g(N),onCancel:()=>u(null),showActions:!0})}):o.jsxs("div",{className:"flex items-start gap-2 group",children:[o.jsx("span",{className:"mt-1.5 w-1 h-1 rounded-full bg-accent shrink-0"}),o.jsx("p",{className:"text-sm text-text-secondary flex-1",children:T}),o.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-opacity shrink-0",children:[o.jsx("button",{onClick:()=>{u(N),h(T)},className:"p-2 sm:p-1 rounded text-text-tertiary hover:text-text transition-colors",children:o.jsx(qn,{size:13,className:"sm:w-[11px] sm:h-[11px]"})}),o.jsx("button",{onClick:()=>b(N),className:"p-2 sm:p-1 rounded text-text-tertiary hover:text-error transition-colors",children:o.jsx(Yn,{size:13,className:"sm:w-[11px] sm:h-[11px]"})})]})]})},N)),f?o.jsx("div",{className:"pl-3",children:o.jsx(Jv,{autoFocus:!0,value:m,onChange:x,onConfirm:_,onCancel:()=>{p(!1),x("")}})}):o.jsxs("button",{onClick:()=>p(!0),className:"relative flex items-center text-xs text-text-tertiary hover:text-text transition-colors pl-3 py-1.5",children:[o.jsx("span",{className:"absolute left-0",children:"+"})," Add talking point"]})]})]})}function uce({deck:e,applicationId:t}){const n=Sf(),[r,s]=y.useState(()=>(e.questions_to_ask??"").split(` 691`).map(_=>
691_.replace(/^[-â¢]\s*/,"").trim()).filter(Boolean)),[i,a]=y.useState(!1),[l,c]=y.useState([]),[u,d]=y.useState(""),[h,f]=y.useState(!1),[p,m]=y.useState({}),x=vn({mutationFn:_=>G.prep.updateQuestions(t,_),onError:()=>{n.toast("Couldn't save questions",{kind:"error"})}}),w=(_,k)=>{p[_]!==k&&(m(T=>({...T,[_]:k})),G.prep.questionFeedback(t,r[_],k),Ot.capture("prep_question_feedback",{application_id:t,question:r[_],rating:k}))},g=()=>{c([...r]),a(!0)},b=()=>{const _=[...l.map(k=>k.trim()).filter(Boolean)];u.trim()&&_.push(u.trim()),s(_),x.mutate(_),Ot.capture("prep_questions_edited",{application_id:t,question_count:_.length}),a(!1),d(""),f(!1)};return!r.length&&!i?o.jsxs("div",{className:"space-y-3",children:[o.jsx("p",{className:"text-sm text-text-tertiary py-8 text-center",children:"No questions yet â regenerate your deck or add one."}),o.jsxs("button",{onClick:g,className:"w-full flex items-center justify-center gap-2 rounded-xl border border-dashed border-border py-2.5 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(us,{size:13})," Add question"]})]}):i?o.jsxs("div",{className:"space-y-3",children:[l.map((_,k)=>o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3 group flex items-start gap-3",children:[o.jsx("textarea",{value:_,onChange:T=>c(N=>N.map((C,S)=>S===k?T.target.value:C)),rows:3,className:"flex-1 text-sm bg-transparent text-text focus:outline-none resize-none placeholder:text-text-tertiary"}),o.jsx("button",{onClick:()=>c(T=>T.filter((N,C)=>C!==k)),className:"mt-0.5 p-2 sm:p-1 rounded text-text-tertiary hover:text-error transition-colors shrink-0",children:o.jsx(Yn,{size:13})})]},k)),h?o.jsx("div",{className:"rounded-xl border border-dashed border-border bg-bg-secondary px-4 py-3",children:o.jsx("textarea",{autoFocus:!0,value:u,onChange:_=>d(_.target.value),placeholder:"Type your questionâ¦",rows:2,className:"w-full text-sm bg-transparent text-text focus:outline-none resize-none placeholder:text-text-tertiary",onBlur:()=>{u.trim()&&(c(_=>[..._,u.trim()]),d("")),f(!1)},onKeyDown:_=>{_.key==="Enter"&&!_.shiftKey&&(_.preventDefault(),u.trim()&&(c(k=>[...k,u.trim()]),d("")),f(!1)),_.key==="Escape"&&(d(""),f(!1))}})}):o.jsx("button",{onClick:()=>f(!0),className:"w-full rounded-xl border border-dashed border-border/40 px-4 py-2.5 text-left text-sm text-text-tertiary/40 hover:border-border/70 hover:text-text-tertiary transition-colors",children:"+ Add a question"}),o.jsxs("div",{className:"flex gap-2 pt-1",children:[o.jsx("button",{onClick:b,className:"px-3 py-1.5 rounded-md border border-border text-xs text-text-secondary hover:bg-bg-active transition-colors font-medium",children:"Save"}),o.jsx("button",{onClick:()=>{a(!1),d(""),f(!1)},className:"px-3 py-1.5 rounded-md text-xs text-text-tertiary hover:text-text transition-colors",children:"Cancel"})]})]}):o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex justify-end",children:o.jsxs("button",{onClick:g,className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(qn,{size:11})," Edit"]})}),r.map((_,k)=>o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3 flex items-center gap-3 group",children:[o.jsx("p",{className:"text-sm text-text flex-1",children:_}),o.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[o.jsx("button",{onClick:()=>w(k,1),className:re("p-2 sm:p-1 rounded transition-colors",p[k]===1?"text-success":"text-text-tertiary opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 hover:text-text"),children:o.jsx(yx,{size:14,className:"sm:w-3 sm:h-3"})}),o.jsx("button",{onClick:()=>w(k,-1),className:re("p-2 sm:p-1 rounded transition-colors",p[k]===-1?"text-error":"text-text-tertiary opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 hover:text-text"),children:o.jsx(xx,{size:14,className:"sm:w-3 sm:h-3"})})]})]},k))]})}function dce({deck:e}){const[t,n]=y.useState(!1),r=((e==null?void 0:e.why_this_role)??"").split(` 692`).map(s=>
692s.replace(/^[-â¢]\s*/,"").trim()).filter(Boolean);return o.jsxs("div",{className:re("rounded-xl border transition-colors",t?"border-border bg-bg-secondary":"border-border bg-bg-secondary hover:bg-bg-active"),children:[o.jsxs("button",{onClick:()=>n(s=>!s),className:"w-full px-4 py-3 text-left flex items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs uppercase tracking-widest text-text-tertiary mb-1",children:"Closer"}),o.jsx("p",{className:"text-sm text-text",children:"Close strong"})]}),o.jsx(ma,{size:14,className:re("text-text-tertiary shrink-0 transition-transform",t&&"rotate-90")})]}),t&&o.jsx("div",{className:"px-4 pb-3 space-y-1.5 border-t border-border/50 pt-2.5",children:r.map((s,i)=>o.jsxs("div",{className:"flex items-start gap-2",children:[o.jsx("span",{className:"mt-1.5 w-1 h-1 rounded-full bg-accent shrink-0"}),o.jsx("p",{className:"text-sm text-text-secondary",children:s})]},i))})]})}function hce({trains:e,deck:t,onDrill:n,applicationId:r}){const s=[...e].sort((i,a)=>Rg.indexOf(i.card_type)-Rg.indexOf(a.card_type));return o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"space-y-2",children:[s.filter(i=>i.card_type!=="closer").map(i=>o.jsx(cce,{train:i,applicationId:r},i.id)),o.jsx(dce,{deck:t})]}),e.length>0&&o.jsxs("button",{onClick:n,className:"w-full flex items-center justify-center gap-2 rounded-xl border border-accent bg-accent text-bg py-3 text-sm font-medium hover:bg-accent-hover transition-colors",children:[o.jsx(po,{size:14}),"Start drill"]})]})}function fce({applicationId:e,onBack:t}){var S,I;const n=Yt(),r=Sf(),[s,i]=y.useState("intel"),[a,l]=y.useState(!1),[c,u]=y.useState(!1),[d,h]=y.useState(null),{data:f,isLoading:p}=wt({queryKey:["prep-app",e],queryFn:()=>G.prep.get(e),refetchInterval:c?2e3:!1});y.useEffect(()=>{var j;const E=(j=f==null?void 0:f.deck)==null?void 0:j.status;E==="ready"||E==="error"?u(!1):E==="generating"&&u(!0)},[(S=f==null?void 0:f.deck)==null?void 0:S.status]);const m=vn({mutationFn:E=>G.prep.generate(e,E),onMutate:()=>u(!0),onSuccess:(E,j)=>{Ot.capture("prep_regenerate_triggered",{application_id:e,refresh_intel:j})},onError:E=>{u(!1),n.invalidateQueries({queryKey:["prep-app",e]});const j=E==null?void 0:E.detail;(j==null?void 0:j.code)==="quota_exceeded"&&j.feature?h(j.feature):r.toast("Generation failed",{kind:"error"})}});if(a&&((I=f==null?void 0:f.trains)!=null&&I.length))return Ot.capture("prep_drill_started",{application_id:e,train_count:f.trains.length}),o.jsx(pce,{trains:f.trains,onDone:()=>l(!1)});const{stage:x,app:w,deck:g,trains:b,stage_advanced:_}=f??{stage:null,app:null,deck:null,trains:[],stage_advanced:!1},k=g==null?void 0:g.status,T=c||k==="generating",N=k==="error",C=(g==null?void 0:g.status)==="ready"||N&&!!(g!=null&&g.company_brief);return o.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[d&&o.jsx(Kv,{feature:d,onClose:()=>h(null)}),o.jsxs("div",{className:"max-w-2xl w-full mx-auto px-4 sm:px-6 pt-6 pb-4 shrink-0 space-y-4",children:[o.jsxs("button",{onClick:t,className:"flex items-center gap-1.5 text-xs text-text-tertiary hover:text-text transition-colors",children:[o.jsx(fx,{size:13})," Back"]}),o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[o.jsx("h2",{className:"text-lg font-semibold text-text",children:(w==null?void 0:w.company_name)||"Interview Prep"}),x&&o.jsx("span",{className:re("text-2xs px-1.5 py-0.5 rounded border font-medium",k6[x.stage_type]),children:Zv[x.stage_type]})]}),o.jsx("p",{className:"text-sm text-text-tertiary mt-0.5",children:w==null?void 0:w.job_title}),(x==null?void 0:x.scheduled_at)&&o.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:new Date(x.scheduled_at).toLocaleDateString("en-US",{weekday:"long",month:"short",day:"numeric"})})]}),(C||N)&&!T&&o.jsxs("button",{onClick:()=>m.mutate(!0),disabled:T,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-border text-xs text-text-secondary hover:text-text hover:bg-bg-active transition-colors disabled:opacity-50",children:[o.jsx(ju,{size:12}),"Regenerate"]})]})]}),o.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:T?o.jsx("div",{className:"h-full flex items-center justify-center pb-24",children:o.jsx(Dg,{variant:"prep"})}):o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 pb-20 space-y-6",children:[_&&o.jsxs("div",{className:"rounded-xl border border-warning/20 bg-warning/5 px-4 py-3 flex items-center justify-between gap-3",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"text-sm font-medium text-warning",children:["You've advanced to ",Zv[x==null?void 0:x.stage_type]??"a new stage"]}),o.jsx("p",{className:"text-xs text-text-secondary mt-0.5",children:"Update your prep questions for this round â your intel stays intact."})]}),o.jsxs("button",{onClick:()=>m.mutate(!1),className:"shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-lg bg-warning text-bg text-xs font-medium hover:opacity-90 transition-opacity",children:[o.jsx(po,{size:11}),"Update prep"]})]}),p&&!g&&o.jsx("div",{className:"flex items-center justify-center py-16",children:o.jsx(ew,{size:20,className:"animate-spin text-text-tertiary"})}),!p&&!g&&o.jsxs("div",{className:"rounded-xl border border-dashed border-border flex flex-col items-center py-16 gap-4",children:[o.jsx("p",{className:"text-sm text-text-secondary",children:"No prep deck yet"}),o.jsxs("button",{onClick:()=>m.mutate(!0),className:"flex items-center gap-2 px-4 py-2 rounded-lg bg-accent text-bg text-sm font-medium hover:bg-accent-hover transition-colors",children:[o.jsx(po,{size:14})," Generate prep deck"]})]}),N&&!C&&o.jsx("div",{className:"rounded-xl border border-error/20 bg-error/5 px-4 py-3",children:o.jsx("p",{className:"text-sm text-error",children:"Generation failed. Hit Regenerate to try again."})}),C&&o.jsxs(o.Fragment,{children:[N&&o.jsx("div",{className:"rounded-xl border border-warning/20 bg-warning/5 px-4 py-2",children:o.jsx("p",{className:"text-xs text-warning",children:"Last generation had an error â showing partial results. Hit Regenerate to retry."})}),o.jsx("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg border border-border bg-bg-secondary",children:["intel","prep","questions"].map(E=>o.jsx("button",{onClick:()=>{i(E),Ot.capture("prep_tab_viewed",{application_id:e,tab:E})},className:re("flex-1 h-9 sm:h-7 rounded text-xs font-medium transition-colors capitalize",s===E?"bg-bg-active text-text":"text-text-tertiary hover:text-text"),children:E.charAt(0).toUpperCase()+E.slice(1)},E))}),s==="intel"&&g&&o.jsx(lce,{deck:g,applicationId:e}),s==="prep"&&o.jsx(hce,{trains:b,deck:g,onDrill:()=>l(!0),applicationId:e}),s==="questions"&&g&&o.jsx(uce,{deck:g,applicationId:e})]})]})})]})}function pce({trains:e,onDone:t}){const n=[...e].sort((f,p)=>Rg.indexOf(f.card_type)-Rg.indexOf(p.card_type)),[r,s]=y.useState(0),[i,a]=y.useState(!1),[l,c]=y.useState(!1),u=n[r],d=n.length,h=()=>{r<d-1?(s(f=>f+1),a(!1)):c(!0)};return l?o.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-6 px-8",children:[o.jsxs("div",{className:"text-center space-y-2",children:[o.jsx("p",{className:"text-4xl",children:"ð¯"}),o.jsx("h2",{className:"text-xl font-semibold text-text",children:"Done."}),o.jsxs("p",{className:"text-sm text-text-secondary",children:[d," cards drilled."]})]}),o.jsxs("div",{className:"flex flex-col gap-2 w-full max-w-xs",children:[o.jsx("button",{onClick:()=>{s(0),a(!1),c(!1)},className:"w-full py-2.5 rounded-xl bg-accent text-bg text-sm font-medium hover:bg-accent-hover transition-colors",children:"Drill again"}),o.jsx("button",{onClick:t,className:"w-full py-2.5 rounded-xl border border-border text-sm text-text-secondary hover:bg-bg-active transition-colors",children:"Back to prep"})]})]}):o.jsxs("div",{className:"h-full flex flex-col",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 sm:px-6 pt-6 pb-2 shrink-0",children:[o.jsxs("span",{className:"text-xs text-text-tertiary",children:[r+1," of ",d]}),o.jsx("button",{onClick:t,className:"text-sm text-text-tertiary hover:text-text transition-colors px-2 py-1",children:"Exit"})]}),o.jsx("div",{className:"flex items-center justify-center gap-1.5 px-4 sm:px-6 pb-4 shrink-0",children:n.map((f,p)=>o.jsx("div",{className:re("rounded-full transition-all duration-300",p<r?"w-1.5 h-1.5 bg-accent":p===r?"w-3 h-1.5 bg-accent":"w-1.5 h-1.5 bg-border")},p))}),o.jsx("div",{className:"flex-1 flex items-center justify-center px-4 sm:px-6 min-h-0",children:o.jsxs("button",{onClick:()=>a(!0),className:"w-full max-w-lg rounded-2xl border border-border bg-bg-secondary px-6 sm:px-8 py-8 sm:py-10 text-center hover:bg-bg-active transition-colors",children:[o.jsx("p",{className:"text-xs uppercase tracking-widest text-text-tertiary mb-4",children:T6[u.card_type]}),o.jsx("p",{className:"text-lg font-medium text-text leading-snug",children:u.question}),!i&&o.jsx("p",{className:"text-sm text-text-tertiary mt-6",children:"tap to reveal cues"}),i&&o.jsx("div",{className:"mt-6 border-t border-border/40 pt-4 space-y-2.5 text-left",children:u.cues.map((f,p)=>o.jsxs("div",{className:"flex items-start gap-2.5",children:[o.jsx("span",{className:"mt-2 w-1 h-1 rounded-full bg-accent shrink-0"}),o.jsx("p",{className:"text-sm text-text leading-relaxed",children:f})]},p))})]})}),o.jsxs("div",{className:"px-4 sm:px-6 pb-10 pt-4 flex items-center gap-3 shrink-0",children:[o.jsx("button",{onClick:()=>{r>0&&(s(f=>f-1),a(!1))},disabled:r===0,className:"flex-1 py-3.5 rounded-xl border border-border text-sm text-text-secondary hover:bg-bg-active transition-colors disabled:opacity-30",children:"â Back"}),o.jsx("button",{onClick:h,className:"flex-1 py-3.5 rounded-xl bg-accent text-bg text-sm font-medium hover:bg-accent-hover transition-colors",children:r===d-1?"Done â":"Next â"})]})]})}function mce(){const[e,t]=y.useState(null),{data:n,isLoading:r}=wt({queryKey:["prep-active"],queryFn:()=>G.prep.active(),refetchInterval:a=>{var c;return(((c=a.state.data)==null?void 0:c.stages)??[]).some(u=>u.prep_status==="generating")?3e3:!1}});if(e)return o.jsx(fce,{applicationId:e,onBack:()=>t(null)});const s=(n==null?void 0:n.stages)??[],i=n==null?void 0:n.goals;return r&&!n?o.jsx("div",{className:"flex items-center justify-center h-full",children:o.jsx(ew,{size:20,className:"animate-spin text-text-tertiary"})}):o.jsx("div",{className:"h-full overflow-y-auto",children:o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 pt-6 pb-safe space-y-6",children:[s.length>0&&(()=>{const a=[...s].sort((c,u)=>c.scheduled_at?u.scheduled_at?new Date(c.scheduled_at).getTime()-new Date(u.scheduled_at).getTime():-1:1)[0],{label:l}=S6(a.scheduled_at);return o.jsxs("div",{className:"flex items-center gap-2 text-xs text-text-tertiary",children:[o.jsxs("span",{children:[o.jsx("span",{className:"text-text font-medium",children:s.length})," interview",s.length>
6921?"s":""," coming up"]}),o.jsx("span",{className:"text-border",children:"·"}),o.jsxs("span",{children:["Next: ",o.jsx("span",{className:"text-text-secondary",children:a.company_name})," ",l.toLowerCase()]})]})})(),i&&o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3.5 space-y-3",children:[o.jsx("p",{className:qt,children:"This week"}),o.jsx(Oj,{label:"Applications",current:0,target:i.weekly_apps}),o.jsx(Oj,{label:"Drill sessions",current:0,target:i.weekly_drills??ace})]}),o.jsx("div",{className:"space-y-2",children:s.length===0?o.jsxs("div",{className:"rounded-xl border border-dashed border-border flex flex-col items-center justify-center py-16 gap-3",children:[o.jsx(Nf,{size:24,className:"text-text-tertiary"}),o.jsx("p",{className:"text-sm text-text-secondary",children:"No active interviews"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Add an interview stage in Pipeline to start prepping."})]}):s.map(a=>o.jsx(oce,{stage:a,onSelect:t},a.application_id))})]})})}const gce=240,xce=160,yce=400,e_=["screen","technical","behavioral","final","offer"],Yx={screen:"Screen",technical:"Technical",behavioral:"Behavioral",final:"Final",offer:"Offer",rejected:"Rejected",ghosted:"Ghosted"},cf={screen:"bg-blue-500/15 text-blue-400 border-blue-500/30",technical:"bg-purple-500/15 text-purple-400 border-purple-500/30",behavioral:"bg-yellow-500/15 text-yellow-500 border-yellow-500/30",final:"bg-orange-500/15 text-orange-400 border-orange-500/30",offer:"bg-success/15 text-success border-success/30",rejected:"bg-error/15 text-error border-error/30",ghosted:"bg-border/40 text-text-tertiary border-border"},bce={screen:"bg-blue-500/40",technical:"bg-purple-500/40",behavioral:"bg-yellow-500/40",final:"bg-orange-500/40",offer:"bg-success/60",rejected:"bg-error/30",ghosted:"bg-border/40"},Mj=14,vce=21;function _ce(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric"})}function t_(e){return Math.floor((Date.now()-new Date(e).getTime())/Ex)}function bu(e){return e.stages.length?e.stages[e.stages.length-1].stage_type:null}function Bf(e){const t=bu(e);return!t||t!=="offer"&&t!=="rejected"&&t!=="ghosted"}function n_(e){const t=e.stages.filter(n=>e_.includes(n.stage_type));return t.length?t[t.length-1].stage_type:null}function Zw(){const e=new Date;return e.setDate(e.getDate()-e.getDay()),e.setHours(0,0,0,0),e}const Rj=[{key:"dashboard",label:"Dashboard",icon:lH,phase:1},{key:"applications",label:"Applications",icon:Zz,phase:1},{key:"prep",label:"Prep",icon:Nf,phase:1},{key:"contacts",label:"Contacts",icon:C4,phase:2},{key:"goals",label:"Goals",icon:S4,phase:2}];function wce({apps:e,goals:t,view:n,onViewChange:r,width:s,collapsed:i,onToggleCollapsed:a,mobileOpen:l,onMobileClose:c,appsThisWeek:u,activeCount:d}){const h=(t==null?void 0:t.weekly_apps)??5,f=Math.min(100,Math.round(u/h*100)),p=(x,w=!1)=>o.jsxs("div",{className:"flex flex-col h-full border-r border-border bg-bg-secondary shrink-0 overflow-hidden",style:x?{}:{width:s},children:[!w&&o.jsx(lw,{label:o.jsx("span",{className:"px-1 text-sm font-semibold text-text",children:"Pipeline"}),onCollapse:x??a}),o.jsxs("div",{className:"flex-1 overflow-y-auto py-2 space-y-4",children:[o.jsxs("div",{className:"px-4 pt-1",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[o.jsx("span",{className:qt,children:"This week"}),o.jsxs("span",{className:"text-xs sm:text-2xs text-text-tertiary",children:[u," / ",h]})]}),o.jsx("div",{className:"h-1 rounded-full bg-border overflow-hidden",children:o.jsx("div",{className:"h-full rounded-full bg-accent transition-all",style:{width:`${f}%`}})}),o.jsx("div",{className:"flex items-center justify-between mt-1.5",children:o.jsxs("span",{className:"text-xs sm:text-2xs text-text-tertiary",children:[d," active"]})})]}),o.jsx("div",{className:"space-y-0.5 px-3",children:Rj.map(g=>{const b=g.phase===1,_=n===g.key,k=g.icon;return o.jsxs("button",{onClick:()=>{b&&(r(g.key),x==null||x())},disabled:!b,className:re("w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm transition-colors",_?"bg-bg-active text-text font-medium":b?"text-text-secondary hover:text-text hover:bg-bg-active/60":"text-text-tertiary/40 cursor-default"),children:[o.jsx(k,{size:13}),o.jsx("span",{className:"flex-1 text-left",children:g.label}
692),!b&&o.jsx(uH,{size:10,className:"text-text-tertiary/30"})]},g.key)})})]}),o.jsx("div",{className:"px-3 py-1.5 border-t border-border shrink-0",children:o.jsxs("button",{onClick:()=>{r("trash"),x==null||x()},className:re("w-full flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm transition-colors",n==="trash"?"bg-bg-active text-text font-medium":"text-text-tertiary hover:text-text hover:bg-bg-active/60"),children:[o.jsx(Yn,{size:13}),o.jsx("span",{children:"Trash"})]})})]}),m=o.jsxs("div",{className:"hidden sm:flex flex-col h-full border-r border-border bg-bg-secondary shrink-0 w-10 overflow-hidden",children:[o.jsx("button",{onClick:a,className:"flex items-center justify-center h-10 border-b border-border text-text-tertiary hover:text-text hover:bg-bg-active transition-colors shrink-0",title:"Expand sidebar",children:o.jsx(yH,{size:13})}),o.jsxs("div",{className:"flex flex-col items-center gap-0.5 p-1 pt-2",children:[Rj.map(x=>{const w=x.phase===1,g=n===x.key,b=x.icon;return o.jsx("button",{onClick:()=>{w&&r(x.key)},disabled:!w,title:x.label,className:re("w-8 h-8 flex items-center justify-center rounded-lg transition-colors",g?"bg-bg-active text-text":w?"text-text-tertiary hover:text-text hover:bg-bg-active/60":"text-text-tertiary/30 cursor-default"),children:o.jsx(b,{size:13})},x.key)}),o.jsx("button",{onClick:()=>r("trash"),title:"Trash",className:re("w-8 h-8 flex items-center justify-center rounded-lg transition-colors mt-auto",n==="trash"?"bg-bg-active text-text":"text-text-tertiary hover:text-text hover:bg-bg-active/60"),children:o.jsx(Yn,{size:13})})]})]});return o.jsxs(o.Fragment,{children:[i?m:o.jsx("div",{className:"hidden sm:block shrink-0",style:{width:s},children:p()}),o.jsx(Du,{open:l,onClose:c,side:"bottom",mobileOnly:!0,title:"Pipeline",maxHeightMobile:"80dvh",children:p(c,!0)})]})}function Ece({apps:e}){const t=e.filter(Bf),n=e_.reduce((a,l)=>(a[l]=t.filter(c=>n_(c)===l).length,a),{}),r=t.filter(a=>n_(a)===null).length,s=Math.max(r,...Object.values(n),1),i={rejected:e.filter(a=>bu(a)==="rejected").length,ghosted:e.filter(a=>bu(a)==="ghosted").length};return o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"flex items-end gap-2 h-24",children:[o.jsx(Lj,{label:"Applied",count:r,max:s,color:"bg-text-tertiary/20",textColor:"text-text-tertiary"}),e_.map(a=>o.jsx(Lj,{label:Yx[a],count:n[a],max:s,color:bce[a],textColor:a==="offer"?"text-success":"text-text-secondary"},a))]}),(i.rejected>0||i.ghosted>0)&&o.jsxs("div",{className:"flex items-center gap-3 pt-1 border-t border-border/50",children:[o.jsx("span",{className:qt,children:"Closed"}),i.rejected>0&&o.jsxs("span",{className:re("text-2xs px-1.5 py-0.5 rounded border",cf.rejected),children:[i.rejected," rejected"]}),i.ghosted>0&&o.jsxs("span",{className:re("text-2xs px-1.5 py-0.5 rounded border",cf.ghosted),children:[i.ghosted," ghosted"]})]})]})}function Lj({label:e,count:t,max:n,color:r,textColor:s}){const i=n>0?t/n*100:0,a=t>0?8:0;return o.jsxs("div",{className:"flex-1 flex flex-col items-center gap-1",children:[o.jsx("span",{className:re("text-xs font-semibold",t>0?s:"text-text-tertiary/40"),children:t}),o.jsx("div",{className:"w-full bg-border/30 rounded-sm overflow-hidden flex flex-col justify-end",style:{height:"56px"},children:o.jsx(se.div,{className:re("w-full rounded-sm",r),initial:{height:0},animate:{height:`${Math.max(a,i)}%`},transition:{duration:.5,ease:[.22,1,.36,1],delay:.05}})}),o.jsx("span",{className:"text-2xs text-text-tertiary whitespace-nowrap",children:e})]})}function Nce(e){const t=Math.ceil((new Date(e).getTime()-Date.now())/Ex);return t<0?{label:"Past",urgent:!1}:t===0?{label:"Today",urgent:!0}:t===1?{label:"Tomorrow",urgent:!0}:t<=3?{label:`In ${t} days`,urgent:!0}:{label:`In ${t} days`,urgent:!1}}function kce(e){const t=[],n=Date.now(),r=n+7*Ex;for(const l of e)for(const c of l.stages)if(c.scheduled_at&&!c.completed_at){const u=new Date(c.scheduled_at).getTime();if(u>=n&&u<=r){const{label:d,urgent:h}=Nce(c.scheduled_at);t.push({id:`upcoming-${c.id}`,kind:"navigable",company:l.company_name,jobTitle:l.job_title,stageBadge:{label:Yx[c.stage_type],color:cf[c.stage_type]},dateLabel:d,dateUrgent:h,cta:{type:"navigate",applicationId:l.id}})}}const s=e.filter(l=>{if(!Bf(l)||!l.stages.length)return!1;const c=l.stages[l.stages.length-1].created_at;return t_(c)>=Mj});s.length>0&&t.push({id:"stale",kind:"advisory",icon:o.jsx(kH,{size:13,className:"text-text-tertiary"}),label:`${s.length} application${s.length>
6921?"s":""} with no movement`,sub:`${Mj}+ days idle`,cta:{type:"view-button",label:"View",toView:"applications"}});const i=Zw();return e.filter(l=>new Date(l.created_at)>=i).length===0&&e.length>0&&t.push({id:"no-activity",kind:"advisory",icon:o.jsx(Gh,{size:13,className:"text-yellow-500"}),label:"No applications this week",sub:"Keep feeding the top of the funnel",cta:{type:"view-button",label:"Apply",toView:"applications"}}),t.slice(0,4)}function Tce({apps:e,onNavigateApp:t,onSwitchView:n}){const r=kce(e);return r.length===0?e.filter(Bf).length?o.jsx("p",{className:"text-xs text-text-tertiary",children:"Nothing urgent. Keep applying."}):null:o.jsx("div",{className:"space-y-1.5",children:r.map(s=>s.kind==="navigable"?o.jsxs("div",{className:"flex items-center gap-3 px-4 py-3.5 rounded-xl border border-border bg-bg-secondary hover:bg-bg-active transition-colors cursor-pointer",onClick:()=>t(s.cta.applicationId),children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap",children:[o.jsx("span",{className:"text-sm font-bold text-text",children:s.company||"Unknown"}),s.jobTitle&&o.jsx("span",{className:"text-sm text-text-tertiary truncate",children:s.jobTitle})]}),o.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[o.jsxs("span",{className:re("flex items-center gap-1 text-2xs",s.dateUrgent?"text-warning":"text-text-tertiary"),children:[o.jsx(y4,{size:10}),s.dateLabel]}),s.stageBadge&&o.jsx("span",{className:re("text-2xs px-1.5 py-0.5 rounded border font-medium",s.stageBadge.color),children:s.stageBadge.label})]})]}),o.jsx(ma,{size:14,className:"text-text-tertiary shrink-0"})]},s.id):o.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg bg-bg-secondary border border-border",children:[o.jsx("div",{className:"shrink-0",children:s.icon}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs text-text font-medium",children:s.label}),o.jsx("p",{className:"text-2xs text-text-tertiary mt-0.5",children:s.sub})]}),s.cta.type==="view-button"&&o.jsx("button",{onClick:()=>n(s.cta.toView),className:"shrink-0 text-2xs text-accent hover:text-accent/80 font-medium transition-colors px-2 py-1 rounded hover:bg-accent/10",children:s.cta.label})]},s.id))})}function Sce({app:e,showStatus:t,onSelect:n,onDelete:r,onClose:s}){const i=bu(e),a=e.stages.filter(f=>!f.completed_at&&f.stage_type!=="rejected"&&f.stage_type!=="ghosted"),l=a.length>0?a[a.length-1]:e.stages[e.stages.length-1],c=i==="offer"?"text-success":i==="rejected"?"text-error":i==="ghosted"?"text-text-tertiary":"text-accent",u=i==="offer"?"Offer":i==="rejected"?"Rejected":i==="ghosted"?"Ghosted":"In Progress",d=t&&i&&["offer","rejected","ghosted"].includes(i),h=i!=="offer"&&i!=="rejected"&&i!=="ghosted";return o.jsxs("tr",{className:"group border-b border-border hover:bg-bg-active/40 transition-colors cursor-pointer",onClick:n,children:[o.jsxs("td",{className:"px-3 py-2 flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate leading-tight",children:e.job_title||o.jsx("span",{className:"text-text-tertiary italic",children:"No title"})}),e.company_name&&o.jsx("p",{className:"text-2xs text-text-tertiary/50 truncate leading-tight mt-0.5",children:e.company_name})]}),o.jsx("td",{className:"px-3 py-2 w-24 whitespace-nowrap align-middle hidden sm:table-cell",children:o.jsx("p",{className:"text-2xs text-text-tertiary",children:_ce(e.created_at)})}),o.jsx("td",{className:"w-px pl-3 pr-1 py-2 whitespace-nowrap align-middle",children:o.jsx("div",{className:"inline-flex items-center gap-1.5",children:l&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:re("text-2xs px-1.5 py-0.5 rounded border font-medium whitespace-nowrap",cf[l.stage_type]),children:l.label||Yx[l.stage_type]}),d&&o.jsx("span",{className:re("text-2xs font-medium",c),children:u})]})})}),o.jsx("td",{className:"py-2 pr-2 align-middle",onClick:f=>f.stopPropagation(),children:o.jsxs("div",{className:"flex items-center justify-end gap-0.5 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 transition-all",children:[h&&o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:f=>{f.stopPropagation(),s("rejected")},className:"text-2xs px-1.5 py-0.5 rounded border border-error/20 text-error/50 hover:text-error hover:bg-error/10 hover:border-error/40 transition-colors font-medium",title:"Mark rejected",children:"Rejected"}),o.jsx("button",{onClick:f=>{f.stopPropagation(),s("ghosted")},className:"text-2xs px-1.5 py-0.5 rounded border border-border text-text-tertiary/50 hover:text-text-tertiary hover:bg-bg-active transition-colors font-medium",title:"Mark ghosted",children:"Ghosted"})]}),o.jsx("button",{onClick:f=>{f.stopPropagation(),r()},className:"p-1 rounded text-text-tertiary hover:text-error hover:bg-error/10 transition-all",title:"Delete",children:o.jsx(Yn,{size:12})})]})})]})}const Cce={applied:"desc",activity:"desc",company:"asc",role:"asc"};function jce(e){const t=bu(e);return!e.company_name&&!e.job_title?"incomplete":t==="offer"?"offer":t==="rejected"?"rejected":t==="ghosted"?"ghosted":e.stages.length?"in_progress":"active"}function Fj(e){return e.stages.length?e.stages[e.stages.length-1].created_at:e.created_at}const Ace=[{key:"all",label:"All"},{key:"active",label:"Applied"},{key:"in_progress",label:"In Progress"},{key:"offer",label:"Offer"},{key:"rejected",label:"Rejected"},{key:"ghosted",label:"Ghosted"}];function Ice({app:e,onKeep:t,onDelete:n,keepPending:r}){const[s,i]=y.useState(!1),{data:a}=wt({queryKey:["stages",e.job_id],queryFn:()=>G.pipeline.stages.list(e.job_id),enabled:s,staleTime:3e4});return o.jsxs("div",{className:"divide-y divide-border/50",children:[o.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("p",{className:"text-xs text-text truncate",children:[e.company_name," â ",e.job_title]}),o.jsxs("p",{className:"text-2xs text-text-tertiary flex items-center gap-2",children:[o.jsxs("span",{children:["Added ",new Date(e.applied_at??e.created_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),e.jd_similarity>0&&o.jsxs("span",{className:"opacity-50",children:[Math.round(e.jd_similarity*100),"% JD match"]})]})]}),o.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[o.jsx("button",{onClick:()=>i(l=>!l),className:re("px-2 py-1 text-2xs rounded border transition-colors",s?"border-accent/30 text-accent bg-accent/5":"border-border text-text-tertiary hover:text-text hover:bg-bg-active"),children:s?"Hide":"Preview"}),o.jsx("button",{onClick:t,disabled:r,className:"px-2 py-1 text-2xs rounded border border-accent/30 text-accent hover:bg-accent/10 transition-colors disabled:opacity-40",children:"Keep this"}),o.jsx("button",{onClick:n,className:"px-2 py-1 text-2xs rounded border border-error/30 text-error hover:bg-error/10 transition-colors",children:"Delete"})]})]}),s&&o.jsxs("div",{className:"px-3 py-3 bg-bg-secondary/40 space-y-2",children:[o.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:[e.status&&o.jsxs("span",{className:"text-2xs text-text-tertiary",children:["Status: ",o.jsx("span",{className:"text-text",children:e.status})]}),e.resume_gcs_path&&o.jsx("span",{className:"text-2xs text-success",children:"â Resume generated"}),e.cover_letter_gcs_path&&o.jsx("span",{className:"text-2xs text-success",children:"â Cover letter"}),e.location&&o.jsx("span",{className:"text-2xs text-text-tertiary",children:e.location}),e.work_arrangement&&o.jsx("span",{className:"text-2xs text-text-tertiary capitalize",children:e.work_arrangement})]}),a===void 0&&o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"Loading stagesâ¦"}),a&&a.length===0&&o.jsx("p",{className:"text-2xs text-text-tertiary italic",children:"No interview stages"}),a&&a.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(l
692=>o.jsxs("span",{className:re("text-2xs px-2 py-0.5 rounded-full border",cf[l.stage_type]),children:[Yx[l.stage_type],l.scheduled_at?` · ${new Date(l.scheduled_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`:""]},l.id))})]})]})}const Pce={high:{label:"Likely duplicate",cls:"text-error bg-error/10 border-error/20"},medium:{label:"Possibly duplicate",cls:"text-yellow-500 bg-yellow-500/10 border-yellow-500/20"},low:{label:"Same title/company",cls:"text-text-tertiary bg-bg-secondary border-border"}};function Dce({onClose:e}){const t=Yt(),{data:n,isLoading:r}=wt({queryKey:["pipeline-duplicates"],queryFn:()=>G.pipeline.duplicates()}),s=vn({mutationFn:c=>G.applications.delete(c),onSuccess:()=>{t.invalidateQueries({queryKey:["pipeline"]}),t.invalidateQueries({queryKey:["applications"]}),t.invalidateQueries({queryKey:["pipeline-duplicates"]})}}),i=vn({mutationFn:async({deleteJobIds:c})=>{await Promise.all(c.map(u=>G.applications.delete(u)))},onSuccess:()=>{t.invalidateQueries({queryKey:["pipeline"]}),t.invalidateQueries({queryKey:["applications"]}),t.invalidateQueries({queryKey:["pipeline-duplicates"]})}});y.useEffect(()=>{const c=u=>{u.key==="Escape"&&e()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e]);const a=(n==null?void 0:n.clusters)??[],l=a.reduce((c,u)=>c+(u.apps.length-1),0);return Er.createPortal(o.jsxs("div",{className:"fixed inset-0 z-[300] flex items-center justify-center p-4",children:[o.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:e}),o.jsxs(se.div,{initial:{opacity:0,scale:.97,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:8},transition:{duration:.15},className:"relative w-full max-w-xl max-h-[80vh] flex flex-col rounded-xl border border-border bg-bg shadow-modal overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-border shrink-0",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-text",children:"Duplicate Checker"}),o.jsx("p",{className:"text-2xs text-text-tertiary mt-0.5",children:r?"Scanningâ¦":a.length===0?"No duplicates found":`${l} likely duplicate${l!==1?"s":""} across ${a.length} group${a.length!==1?"s":""}`})]}),o.jsx("button",{onClick:e,className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(gx,{size:15})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-5",children:[r&&o.jsx("p",{className:"text-sm text-text-tertiary italic",children:"Scanningâ¦"}),!r&&a.length===0&&o.jsxs("div",{className:"text-center py-8",children:[o.jsx("p",{className:"text-sm font-medium text-text",children:"No duplicates found"}),o.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:"Your pipeline looks clean."})]}),a.map((c,u)=>{const d=Pce[c.confidence];return o.jsxs("div",{className:"rounded-lg border border-border overflow-hidden",children:[o.jsxs("div",{className:"px-3 py-2 bg-bg-secondary/60 border-b border-border flex items-center justify-between gap-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-semibold text-text",children:c.company||"Unknown Company"}),o.jsxs("p",{className:"text-2xs text-text-tertiary",children:[c.role||"Unknown Role"," · ",c.apps.length," entries"]})]}),o.jsx("span",{className:`text-2xs px-2 py-0.5 rounded border font-medium shrink-0 ${d.cls}`,children:d.label})]}),o.jsx("div",{className:"divide-y divide-border/50",children:c.apps.map(h=>o.jsx(Ice,{app:h,onKeep:()=>i.mutate({keepJobId:h.job_id,deleteJobIds:c.apps.filter(f=>f.job_id!==h.job_id).map(f=>f.job_id)}),onDelete:()=>{confirm(`Delete "${h.company_name} â ${h.job_title}"?`)&&s.mutate(h.job_id)},keepPending:i.isPending},h.job_id))})]},u)})]})]})]}),document.body)}function Oce({apps:e,statusFilter:t,onStatusFilter:n,query:r,onQuery:s}){const i=e.filter(l=>!l.company_name&&!l.job_title).length,a=[...Ace,...i>0?[{key:"incomplete",label:`Incomplete (${i})`}]:[]];return o.jsx("div",{className:"w-full -mx-3 px-3 h-full flex items-center",children:o.jsx(HM,{tabs:a,active:t,onTab:n,query:r,onQuery:s})})}function C6(e){const t=Math.floor(e/60),n=e%60;return`${t}m ${n}s`}function Mce(){const e=Yt(),[t,n]=y.useState(!1),{data:r}
692=wt({queryKey:["unlinked-recordings"],queryFn:()=>G.pipeline.recordings.unlinked(),refetchInterval:l=>{const c=l.state.data;return!c||c.length===0?!1:c.some(u=>!u.debrief)?5e3:!1}}),[s,i]=y.useState(null),a=(r==null?void 0:r.find(l=>l.id===s))??null;return!r||r.length===0?null:o.jsxs("div",{className:"border-b border-border",children:[o.jsxs("button",{onClick:()=>n(l=>!l),className:"w-full flex items-center justify-between px-3 py-2 hover:bg-bg-active transition-colors",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(nv,{size:11,className:"text-text-tertiary"}),o.jsx("span",{className:"text-xs text-text-secondary font-medium",children:"Unlinked Recordings"}),o.jsx("span",{className:"text-2xs text-text-tertiary bg-bg-secondary border border-border rounded-full px-1.5 py-0.5",children:r.length})]}),o.jsx(tn,{size:12,className:re("text-text-tertiary transition-transform duration-200",t&&"rotate-180")})]}),o.jsx(He,{initial:!1,children:t&&o.jsx(se.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:o.jsx("div",{className:"px-3 pb-2 space-y-1",children:r.map(l=>{const c=l.debrief;return o.jsxs("button",{onClick:()=>i(l.id),className:"w-full rounded-lg border border-dashed border-border bg-bg-secondary/60 px-3 py-2 flex items-center justify-between hover:bg-bg-active transition-colors text-left",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[o.jsx(nv,{size:10,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"text-xs text-text truncate",children:(c==null?void 0:c.title)??new Date(l.recorded_at).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}),l.duration_seconds&&o.jsx("span",{className:"text-2xs text-text-tertiary shrink-0",children:C6(l.duration_seconds)})]}),o.jsx("span",{className:"text-2xs text-text-tertiary/60 shrink-0 ml-2",children:c!=null&&c.error?"Failed":c?"Debrief ready":"Tap to link"})]},l.id)})})})}),o.jsx(He,{children:a&&o.jsx(Rce,{rec:a,onClose:()=>i(null),onLinked:()=>
692{i(null),e.invalidateQueries({queryKey:["unlinked-recordings"]})}})})]})}function Rce({rec:e,onClose:t,onLinked:n}){const r=Yt(),{data:s}=wt({queryKey:["pipeline"],queryFn:()=>G.pipeline.summary(),staleTime:3e4}),i=(s==null?void 0:s.applications)??[],[a,l]=y.useState(""),[c,u]=y.useState(""),[d,h]=y.useState(""),[f,p]=y.useState(!1),[m,x]=y.useState(!1),[w,g]=y.useState(!1),b=y.useRef(null),_=i.find(E=>E.id===c)??null,k=_?[..._.stages].sort((E,j)=>new Date(E.created_at).getTime()-new Date(j.created_at).getTime()):[],T=y.useMemo(()=>new ps(i,{keys:[{name:"company_name",weight:.6},{name:"job_title",weight:.4}],threshold:.35,ignoreLocation:!0}),[i]),N=a.trim()?T.search(a).map(E=>E.item):i;y.useEffect(()=>{if(!f)return;const E=j=>{b.current&&!b.current.contains(j.target)&&p(!1)};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[f]),y.useEffect(()=>{const E=j=>{j.key==="Escape"&&t()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[t]);const C=async()=>{if(c){x(!0);try{await G.pipeline.recordings.link(e.id,c,d||void 0),g(!0),r.invalidateQueries({queryKey:["recordings"]}),n()}finally{x(!1)}}},S=e.debrief,I=e.transcript??"";return Er.createPortal(o.jsxs("div",{className:"fixed inset-0 z-[300] flex items-center justify-center p-4",children:[o.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:t}),o.jsxs(se.div,{initial:{opacity:0,scale:.97,y:8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:8},transition:{duration:.15},className:"relative w-full max-w-2xl max-h-[85vh] flex flex-col rounded-xl border border-border bg-bg shadow-modal overflow-hidden",children:[o.jsxs("div",{className:"flex items-start justify-between px-5 py-4 border-b border-border shrink-0",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-semibold text-text",children:(S==null?void 0:S.title)??"Interview Recording"}),o.jsxs("p",{className:"text-2xs text-text-tertiary mt-0.5",children:[new Date(e.recorded_at).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}),e.duration_seconds?` · ${C6(e.duration_seconds)}`:""]})]}),o.jsx("button",{onClick:t,className:"p-1.5 rounded text-text-tertiary hover:text-text hover:bg-bg-active transition-colors",children:o.jsx(gx,{size:15})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-4",children:[!S&&o.jsx("p",{className:"text-sm text-text-tertiary italic",children:"Generating debriefâ¦"}),(S==null?void 0:S.error)&&o.jsx("p",{className:"text-sm text-error",children:S.error}),S&&!S.error&&S.summary&&o.jsxs("div",{className:"space-y-2",children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest",children:"Summary"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:S.summary})]}),I&&o.jsxs("div",{className:"space-y-2",children:[o.jsxs("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest",children:["Transcript (",I.split(` 693`).length," exchanges)"]}),o.jsx("div",{className:"rounded-lg bg-bg-secondary border border-border px-4 py-3 space-y-1.5 max-h-48 overflow-y-auto",children:I.split(` 694`).slice(0,20).map((E,j)=>{const P=E.match(/^Speaker (\d+): (.+)$/);if(!P)return null;const L=parseInt(P[1]);return o.jsxs("div",{className:"flex gap-2",children:[o.jsx("span",{className:re("text-2xs font-medium w-8 shrink-0",L===0?"text-blue-400":"text-accent"),children:L===0?"Them":"You"}),o.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:P[2]})]},j)})})]}),!w&&o.jsxs("div",{className:"pt-2 border-t border-border space-y-2",children:[o.jsx("p",{className:"text-xs font-semibold text-text-tertiary uppercase tracking-widest",children:"Link to Application"}),o.jsxs("div",{className:"flex gap-2 items-start",children:[o.jsxs("div",{className:"flex-1 space-y-2",children:[o.jsxs("div",{ref:b,className:"relative",children:[o.jsx("input",{type:"text",value:_?`${_.company_name} â ${_.job_title}`:a,onChange:E=>{l(E.target.value),u(""),h(""),p(!0)},onFocus:()=>p(!0),placeholder:"Search applicationsâ¦",className:"w-full rounded border border-border bg-bg px-2.5 py-1.5 text-xs text-text placeholder:text-text-tertiary focus:outline-none focus:ring-1 focus:ring-accent/50"}),f&&N.length>0&&o.jsx("div",{className:"absolute left-0 right-0 top-full mt-0.5 z-10 rounded border border-border bg-bg shadow-lg max-h-40 overflow-y-auto",children:N.slice(0,20).map(E=>o.jsxs("button",{onMouseDown:j=>j.preventDefault(),onClick:()=>{u(E.id),l(""),p(!1)},className:"w-full text-left px-3 py-2 text-xs text-text hover:bg-bg-active transition-colors",children:[E.company_name," â ",E.job_title]},E.id))})]}),k.length>0&&o.jsxs("select",{value:d,onChange:E=>h(E.target.value),className:"w-full rounded border border-border bg-bg px-2.5 py-1.5 text-xs text-text focus:outline-none focus:ring-1 focus:ring-accent/50",children:[o.jsx("option",{value:"",children:"No specific stage"}),k.map(E=>o.jsx("option",{value:E.id,children:E.stage_type},E.id))]})]}),o.jsx("button",{onClick:C,disabled:!c||m,className:"px-3 py-1.5 rounded bg-accent text-white text-xs font-medium disabled:opacity-40 hover:bg-accent/90 transition-colors shrink-0",children:m?"Linkingâ¦":"Link"})]})]}),w&&o.jsx("p",{className:"text-xs text-success",children:"Linked
694successfully."})]})]})]}),document.body)}function Lce({apps:e,onSelectApp:t,statusFilter:n,query:r}){const s=Yt(),[i,a]=y.useState("applied"),[l,c]=y.useState("desc"),u=vn({mutationFn:w=>G.applications.delete(w),onSuccess:()=>{s.invalidateQueries({queryKey:["pipeline"]}),s.invalidateQueries({queryKey:["applications"]})}}),d=vn({mutationFn:({appId:w,outcome:g})=>G.pipeline.stages.create({application_id:w,stage_type:g,notes:""}),onSuccess:()=>s.invalidateQueries({queryKey:["pipeline"]})}),h=w=>{i===w?c(g=>g==="asc"?"desc":"asc"):(a(w),c(Cce[w]))},f=r.trim(),p=n==="incomplete"?e.filter(w=>!w.company_name&&!w.job_title):e.filter(w=>w.company_name||w.job_title),x=(f?new ps(p,{keys:[{name:"job_title",weight:.6},{name:"company_name",weight:.4}],threshold:.35,ignoreLocation:!0}).search(f).map(w=>w.item):p).filter(w=>n==="all"||n==="incomplete"||jce(w)===n).sort((w,g)=>{let b=0;return i==="applied"&&(b=new Date(w.created_at).getTime()-new Date(g.created_at).getTime()),i==="activity"&&(b=new Date(Fj(w)).getTime()-new Date(Fj(g)).getTime()),i==="company"&&(b=(w.company_name||"").localeCompare(g.company_name||"")),i==="role"&&(b=(w.job_title||"").localeCompare(g.job_title||"")),l==="asc"?b:-b});return e.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center py-20 gap-2 text-center",children:[o.jsx(S4,{size:24,className:"text-text-tertiary"}),o.jsx("p",{className:"text-sm text-text-secondary",children:"No applications yet"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Generate a resume to start tracking"})]}):o.jsxs("div",{className:"flex flex-col h-full",children:[o.jsx(Mce,{}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:x.length===0?o.jsx("div",{className:"flex items-center justify-center py-16",children:o.jsx("p",{className:"text-xs text-text-tertiary",children:"No applications match this filter"})}):o.jsxs("table",{className:"w-full border-collapse",children:[o.jsx("thead",{className:"sticky top-0 bg-bg z-10",children:o.jsxs("tr",{className:"border-b border-border",children:[o.jsx("th",{className:"px-3 py-1.5 text-left text-2xs uppercase tracking-widest font-normal text-text-tertiary cursor-pointer hover:text-text transition-colors select-none",onClick:()=>h("role"),children:o.jsxs("span",{className:"inline-flex items-center gap-0.5",children:["Role ",i==="role"&&(l==="asc"?o.jsx(HT,{size:10}):o.jsx(tn,{size:10}))]})}),o.jsx("th",{className:"px-3 py-1.5 text-left text-2xs uppercase tracking-widest font-normal cursor-pointer hover:text-text transition-colors select-none hidden sm:table-cell w-24 shrink-0",onClick:()=>h("applied"),children:o.jsxs("span",{className:re("inline-flex items-center gap-0.5",i==="applied"?"text-text":"text-text-tertiary"),children:["Applied ",i==="applied"&&(l==="asc"?o.jsx(HT,{size:10}):o.jsx(tn,{size:10}))]})}),o.jsx("th",{className:"w-px px-3 py-1.5 text-left text-2xs uppercase tracking-widest font-normal text-text-tertiary select-none whitespace-nowrap",children:"Stage"}),o.jsx("th",{className:"w-8 shrink-0"})]})}),o.jsx("tbody",{children:x.map(w=>o.jsx(Sce,{app:w,showStatus:n==="all",onSelect:()=>t(w.id),onDelete:()=>u.mutate(w.job_id),onClose:g=>d.mutate({appId:w.id,outcome:g})},w.job_id))})]})})]})}function Fce({daysSinceActive:e}){return o.jsxs("div",{className:"flex items-start gap-3 px-4 py-3.5 rounded-xl border border-border bg-bg-secondary",children:[o.jsx(gH,{size:14,className:"text-text-tertiary mt-0.5 shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs font-medium text-text",children:"Search is dormant"}),o.jsxs("p",{className:"text-2xs text-text-tertiary mt-0.5",children:["No new applications in ",e," days. Your pipeline is aging â open roles fill fast."]})]})]})}function Bce(){const{data:e,isLoading:t}=wt({queryKey:["portfolio-versions"],queryFn:()=>G.portfolio.versions.list(),staleTime:6e4});if(t||!e||e.total_views===0)return null;const n=e.versions.filter(r=>r.views>0);return o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary mb-3",children:"Portfolio views"}),o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3 space-y-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(ev,{size:13,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"text-sm font-semibold text-text tabular-nums",children:e.total_views}),o.jsxs("span",{className:"text-xs text-text-tertiary",children:["total view",e.total_views!==1?"s":""]}),e.base_views>0&&o.jsxs("span",{className:"ml-auto text-2xs text-text-tertiary",children:[e.base_views," on base link"]})]}),n.length>0&&o.jsx("div",{className:"space-y-2 pt-1 border-t border-border",children:n.map(r=>{var s;return o.jsxs("div",{className:"flex items-start gap-2 text-2xs",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("span",{className:"text-text-secondary truncate block",children:r.label??((s=r.jd_summary)==null?void 0:s.slice(0,60))??r.token.slice(0,8)}),r.last_visited_at&&o.jsx("span",{className:"text-text-tertiary",children:new Date(r.last_visited_at).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})})]}),o.jsxs("span",{className:"text-text tabular-nums font-medium shrink-0",children:[r.views,"v"]})]},r.token)})})]})]})}function Uce({apps:e,goals:t,onNavigateApp:n,onSwitchView:r}){const s=e.filter(Bf),i=s.filter(f=>n_(f)!==null).length,a=Zw(),l=e.filter(f=>new Date(f.created_at)>=a).length,c=e.filter(f=>bu(f)==="offer").length,u=e.length?e.reduce((f,p)=>new Date(p.created_at)>new Date(f.created_at)?p:f,e[0]):null,d=u?t_(u.created_at)>=vce:!1,h=u?t_(u.created_at):0;return e.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-3 text-center",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-bg-secondary border border-border flex items-center justify-center",children:o.jsx(us,{size:18,className:"text-text-tertiary"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:"Your search starts here"}),o.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:"Generate a resume to create your first application"})]})]}):o.jsxs("div",{className:"max-w-2xl mx-auto px-4 sm:px-6 py-4 sm:py-8 space-y-6 sm:space-y-8",children:[o.jsxs("div",{className:"flex items-center gap-3 text-xs text-text-tertiary flex-wrap",children:[o.jsxs("span",{children:[o.jsx("span",{className:"text-text font-medium",children:s.length})," active"]}),o.jsx("span",{className:"text-border",children:"·"}),o.jsxs("span",{children:[o.jsx("span",{className:"text-text font-medium",children:i})," in play"]}),o.jsx("span",{className:"text-border",children:"·"}),o.jsxs("span",{children:[o.jsx("span",{className:"text-text font-medium",children:l})," this week"]}),c>0&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-border",children:"·"}),o.jsxs("span",{children:[o.jsx("span",{className:"text-success font-medium",children:c})," offer",c>1?"s":""]})]})]}),d&&o.jsx(Fce,{daysSinceActive:h}),o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary mb-3",children:"Pipeline"}),o.jsx(Ece,{apps:e})]}),o.jsxs("section",{children:[o.jsx("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary mb-3",children:"Needs attention"}),o.jsx(Tce,{apps:e,onNavigateApp:n,onSwitchView:r})]}),o.jsx(Bce,{})]})}function $ce(){const e=Yt(),{data:t=[],isLoading:n}=wt({queryKey:["applications-trash"],queryFn:()=>G.applications.trash()}
694),r=vn({mutationFn:s=>G.applications.restore(s),onSuccess:()=>{e.invalidateQueries({queryKey:["applications-trash"]}),e.invalidateQueries({queryKey:["pipeline"]}),e.invalidateQueries({queryKey:["applications"]})}});return n?o.jsx(Uu,{}):t.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center py-24 gap-3 text-center",children:[o.jsx("div",{className:"w-10 h-10 rounded-xl bg-bg-secondary border border-border flex items-center justify-center",children:o.jsx(Yn,{size:16,className:"text-text-tertiary"})}),o.jsx("p",{className:"text-sm text-text-secondary",children:"Trash is empty"}),o.jsx("p",{className:"text-xs text-text-tertiary",children:"Deleted applications show up here"})]}):o.jsxs("div",{className:"max-w-2xl mx-auto px-4 py-6 space-y-2",children:[o.jsxs("p",{className:"text-2xs uppercase tracking-widest text-text-tertiary mb-4",children:[t.length," deleted application",t.length!==1?"s":""]}),t.map(s=>o.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-lg border border-border bg-bg-secondary",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-xs font-medium text-text truncate",children:s.job_title||o.jsx("span",{className:"italic text-text-tertiary",children:"No title"})}),s.company_name&&o.jsx("p",{className:"text-2xs text-text-tertiary truncate mt-0.5",children:s.company_name})]}),o.jsx("p",{className:"text-2xs text-text-tertiary shrink-0",children:s.deleted_at?new Date(s.deleted_at).toLocaleDateString("en-US",{month:"short",day:"numeric"}):""}),o.jsx("button",{onClick:()=>r.mutate(s.job_id),disabled:r.isPending,className:"text-2xs px-2 py-1 rounded border border-border text-text-secondary hover:bg-bg-active transition-colors shrink-0",children:"Restore"})]},s.job_id))]})}function zce(){var B;const{data:e,isLoading:t}=wt({queryKey:["pipeline"],queryFn:()=>G.pipeline.summary()}),n=ga(),[r]=IW(),[s,i]=y.useState(((B=n.state)==null?void 0:B.view)??"dashboard"),a=r.get("app"),[l,c]=y.useState(null);y.useEffect(()=>{a&&(e!=null&&e.applications.some(O=>O.id===a))&&(c(a),i("applications"))},[a,e]);const[u,d]=y.useState("all"),[h,f]=y.useState(""),[p,m]=y.useState(!1),{data:x}=wt({queryKey:["pipeline-duplicates"],queryFn:()=>G.pipeline.duplicates(),staleTime:6e4}),w=(x==null?void 0:x.clusters.reduce((O,U)=>O+(U.apps.length-1),0))??0,[g,b]=y.useState(!1),[_,k]=y.useState(!1),[T,N]=y.useState(gce),{setMobileControls:C}=wx();y.useEffect(()=>(C(o.jsx("button",{onClick:()=>k(!0),className:"p-1.5 rounded-lg text-text-tertiary hover:text-text hover:bg-bg-hover transition-colors",children:o.jsx(tw,{size:16})})),()=>C(null)),[C]);const S=y.useRef(0),I=y.useRef(0),E=y.useCallback(O=>{S.current=O.clientX,I.current=T;const U=A=>{const q=A.clientX-S.current;N(Math.min(yce,Math.max(xce,I.current+q)))},H=()=>{window.removeEventListener("mousemove",U),window.removeEventListener("mouseup",H)};window.addEventListener("mousemove",U),window.addEventListener("mouseup",H)},[T]);if(t)return o.jsx("div",{className:"flex items-center justify-center h-[calc(100dvh-3rem)]",children:o.jsx(ow,{})});const j=(e==null?void 0:e.applications)??[],P=(e==null?void 0:e.goals)??null,L=Zw(),z=j.filter(O=>new Date(O.created_at)>=L).length,R=j.filter(Bf).length;return o.jsxs("div",{className:"flex h-[calc(100dvh-3rem)]",children:[o.jsx(wce,{apps:j,goals:P,view:s,onViewChange:O=>{c(null),i(O)},width:T,collapsed:g,onToggleCollapsed:()=>b(O=>!O),mobileOpen:_,onMobileClose:()=>k(!1),appsThisWeek:z,activeCount:R}),!g&&o.jsx("div",{className:"hidden sm:block w-0 cursor-col-resize shrink-0 relative",onMouseDown:E,children:o.jsx("div",{className:"absolute inset-y-0 -left-1 w-3 hover:bg-accent/20 transition-colors"})}),o.jsx("div",{className:"flex flex-col flex-1 overflow-hidden",children:o.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[o.jsx("div",{className:re("flex items-center shrink-0 px-3 h-10 border-b border-border gap-1",!l&&s!=="applications"&&"hidden sm:flex"),children:l?o.jsx("button",{onClick:()=>{c(null),i("applications")},className:"p-1 rounded text-text-tertiary/50 hover:text-text hover:bg-bg-active transition-colors",title:"Back",children:o.jsx(fx,{size:15})}):s==="applications"?o.jsxs(o.Fragment,{children:[o.jsx(Oce,{apps:j,statusFilter:u,onStatusFilter:d,query:h,onQuery:f}),o.jsxs("button",{onClick:()=>m(!0),title:"Check for duplicates",className:"shrink-0 relative p-1.5 rounded text-text-tertiary/60 hover:text-text hover:bg-bg-active transition-colors",children:[o.jsx(vH,{size:14}),w>0&&o.jsx("span",{className:"absolute -top-0.5 -right-0.5 min-w-[14px] h-[14px] px-0.5 flex items-center justify-center rounded-full bg-error text-white text-[9px] font-bold leading-none",children:w})]})]}):o.jsx("span",{className:"text-xs font-medium text-text-secondary px-1",children:s==="prep"?"Prep":s==="trash"?"Trash":"Dashboard"})}),o.jsx("div",{className:"flex-1 overflow-hidden",children:l?o.jsx(rce,{app:j.find(O=>O.id===l),onBack:()=>{c(null),i("applications")},noBreadcrumb:!0}):o.jsxs("div",{className:"h-full overflow-y-auto overflow-x-hidden",children:[s==="dashboard"&&o.jsx(Uce,{apps:j,goals:P,onNavigateApp:O=>c(O),onSwitchView:O=>i(O)}),s==="applications"&&o.jsx(Lce,{apps:j,onSelectApp:O=>c(O),statusFilter:u,query:h}),s==="prep"&&o.jsx(mce,{}),s==="trash"&&o.jsx($ce,{})]})})]})}),p&&o.jsx(Dce,{onClose:()=>m(!1)})]})}function Hce(){return o.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-16 text-text font-sans",children:[o.jsx("h1",{className:"text-2xl font-semibold mb-2",children:"Privacy Policy"}),o.jsx("p",{className:"text-sm text-text/50 mb-10",children:"Last updated: May 27, 2026"}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"1. What Pave Does"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"Pave is a job application assistant. It helps you generate tailored resumes and cover letters based on your work history and the job postings you view. Pave is available as a web app at pave.bio and as a Chrome browser extension."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"2. Information We Collect"}),o.jsxs("ul",{className:"text-sm text-text/80 leading-relaxed list-disc list-inside space-y-1",children:[o.jsx("li",{children:"Your name and email address, provided when you sign in with Google."}),o.jsx("li",{children:"Professional information you enter, such as work history, projects, and skills."}),o.jsx("li",{children:"Job descriptions you paste or capture using the extension."}),o.jsx("li",{children:"Resumes and cover letters generated on your behalf."}),o.jsx("li",{children:"Authentication tokens used to keep you logged in."})]})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"3. How We Use Your Information"}),o.jsxs("ul",{className:"text-sm text-text/80 leading-relaxed list-disc list-inside space-y-1",children:[o.jsx("li",{children:"To generate tailored resumes and cover letters for you."}),o.jsx("li",{children:"To store your work history and projects so you can reuse them across applications."}),o.jsx("li",{children:"To authenticate you and maintain your session."}),o.jsx("li",{children:"To improve the quality and relevance of generated content."})]})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"4. Data Sharing"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"We do not sell your personal data. We do not share your data with third parties except as necessary to operate the service (e.g., cloud infrastru
694cture providers). Job description text and profile data may be sent to AI model providers (Anthropic) solely to generate your resume content. We do not use your data to train AI models."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"5. Chrome Extension"}),o.jsxs("p",{className:"text-sm text-text/80 leading-relaxed",children:["The Pave Chrome extension reads the URL of the page you are viewing to help identify job postings. It does not collect your browsing history. Your authentication token is stored locally in your browser using ",o.jsx("code",{children:"chrome.storage.local"})," and is only used to communicate with the Pave backend at pave.bio."]})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"6. Data Retention"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"Your data is retained as long as your account is active. You may request deletion of your account and associated data at any time by contacting us."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"7. Security"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"We use industry-standard security practices including HTTPS encryption for all data in transit and secure cloud storage for data at rest."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"8. Contact"}),o.jsxs("p",{className:"text-sm text-text/80 leading-relaxed",children:["If you have questions about this policy, contact us at"," ",o.jsx("a",{href:"mailto:[email protected]",className:"underline",children:"[email protected]"}),"."]})]}),o.jsxs("p",{className:"text-sm text-text/50",children:["Also see our ",o.jsx("a",{href:"/terms",className:"underline",children:"Terms of Service"}),"."]})]})}function Wce(){return o.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-16 text-text font-sans",children:[o.jsx("h1",{className:"text-2xl font-semibold mb-2",children:"Terms of Service"}),o.jsx("p",{className:"text-sm text-text/50 mb-10",children:"Last updated: June 25, 2026"}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"1. What Pave Is"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"Pave is a career acceleration tool that helps you generate tailored resumes and cover letters, track job applications, prepare for interviews, and manage your professional knowledge base. It is available at pave.bio and as a Chrome browser extension. By using Pave, you agree to these terms."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"2. Your Account"}),o.jsxs("ul",{className:"text-sm text-text/80 leading-relaxed list-disc list-inside space-y-1",children:[o.jsx("li",{children:"You must sign in with a valid Google account to use Pave."}),o.jsx("li",{children:"You are responsible for all activity that occurs under your account."}),o.jsx("li",{children:"You must be at least 16 years old to use Pave."}),o.jsx("li",{children:"We reserve the right to suspend or terminate accounts that violate these terms."})]})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"3. Paid Plans"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"Pave offers a free tier and a paid Pro plan billed monthly via Stripe. By subscribing to Pro, you authorize recurring charges to your payment method. You may cancel at any time through the billing portal â your access continues until the end of the current billing period. We do not offer refunds for partial months."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"4. AI-Generated Content"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"Pave uses AI models to generate resumes, cover letters, and other career content. This content is provided as-is. We do not guarantee that generated content is accurate, complete, or suitable for any particular purpose. You are responsible for reviewing all output before using it. Nothing Pave generates constitutes legal, career, or professional advice."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"5. Your Content"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"You retain ownership of the professional information, work history, and documents you provide to Pave. By using the service, you grant us a limited license to process and store your content solely to operate and improve the service. We do not use your content to train AI models."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"6. Acceptable Use"}),o.jsxs("ul",{className:"text-sm text-text/80 leading-relaxed list-disc list-inside space-y-1",children:[o.jsx("li",{children:"Do not use Pave to generate false, misleading, or fraudulent application materials."}),o.jsx("li",{children:"Do not attempt to abuse, overload, or reverse-engineer the service."}),o.jsx("li",{children:"Do not use automated scripts to interact with Pave beyond normal use."})]})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"7. Availability"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"We aim to keep Pave available at all times but do not guarantee uninterrupted access. We may modify, suspend, or discontinue features at any time. We are not liable for any downtime or data loss."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"8. Limitation of Liability"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:'To the fullest extent permitted by law, Pave is provided "as is" without warranties of any kind. We are not liable for any indirect, incidental, or consequential damages arising from your use of the service, including missed job opportunities or errors in generated content.'})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"9. Changes to These Terms"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"We may update these terms from time to time. If we make material changes, we will update the date at the top of this page. C
694ontinued use of Pave after changes constitutes acceptance of the new terms."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"10. Governing Law"}),o.jsx("p",{className:"text-sm text-text/80 leading-relaxed",children:"These terms are governed by the laws of the State of California, without regard to conflict of law principles."})]}),o.jsxs("section",{className:"mb-8",children:[o.jsx("h2",{className:"text-base font-semibold mb-2",children:"11. Contact"}),o.jsxs("p",{className:"text-sm text-text/80 leading-relaxed",children:["Questions about these terms? Contact us at"," ",o.jsx("a",{href:"mailto:[email protected]",className:"underline",children:"[email protected]"}),"."]})]})]})}const ql="/api";function Yl(){const e=localStorage.getItem("pave_token")||sessionStorage.getItem("pave_token")||"";return e?{Authorization:`Bearer ${e}`}:{}}const Vce={parse_linkedin:"Import",collect_basics:"Your info",collect_stories:"Add stories",confirm_logo:"Company logo",complete:"Done"};function qce({step:e,storiesSaved:t}){const r=e==="collect_basics"?["collect_basics","collect_stories","confirm_logo","complete"]:["parse_linkedin","collect_stories","confirm_logo","complete"],s=r.indexOf(e);return o.jsx("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border bg-surface",children:r.map((i,a)=>{const l=a<s||e==="complete",c=a===s&&e!=="complete",u=i==="collect_stories"&&c?`Stories ${t}/3`:Vce[i];return o.jsxs("div",{className:"flex items-center gap-2",children:[a>0&&o.jsx("div",{className:`h-px w-6 ${l?"bg-accent":"bg-border"}`}),o.jsxs("div",{className:`flex items-center gap-1.5 text-xs ${l?"text-accent":c?"text-text":"text-text-tertiary"}`,children:[o.jsx("div",{className:`w-2 h-2 rounded-full ${l?"bg-accent":c?"bg-text":"bg-border"}`}),u]})]},i)})})}const Yce=[{icon:Nf,label:"Import your work history",sub:"LinkedIn screenshot or type it in"},{icon:Cu,label:"Capture a few stories",sub:"Moments that make your resume sound like you"},{icon:Rr,label:"Generate your first resume",sub:"Tailored to any job description"}];function Gce({onStart:e}){return o.jsxs("div",{className:"flex flex-col h-full bg-background",children:[o.jsx("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-6 h-6 rounded-md bg-accent flex items-center justify-center",children:o.jsx(N4,{size:13,className:"text-white"})}),o.jsx("span",{className:"text-sm font-serif italic text-text",children:"Pave"})]})}),o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 py-10 text-center gap-8 max-w-sm mx-auto w-full",children:[o.jsxs("div",{className:"space-y-2",children:[o.jsx("div",{className:"flex items-center justify-center w-12 h-12 rounded-2xl bg-accent/10 border border-accent/20 mx-auto mb-4",children:o.jsx(Si,{size:22,className:"text-accent"})}),o.jsx("h1",{className:"text-xl font-semibold text-text",children:"Let's build your profile"}),o.jsx("p",{className:"text-sm text-text-tertiary leading-relaxed",children:"Takes about 5 minutes. You'll walk away with a resume ready to tailor to any job."})]}),o.jsx("div",{className:"w-full space-y-3",children:Yce.map(({icon:t,label:n,sub:r},s)=>o.jsxs("div",{className:"flex items-start gap-3 text-left",children:[o.jsx("div",{className:"flex-shrink-0 w-7 h-7 rounded-lg bg-bg-secondary border border-border flex items-center justify-center mt-0.5",children:o.jsx(t,{size:13,className:"text-text-secondary"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-text",children:n}),o.jsx("p",{className:"text-xs text-text-tertiary",children:r})]})]},s))}),o.jsxs("div",{className:"w-full space-y-3",children:[o.jsxs("button",{onClick:e,className:"w-full flex items-center justify-center gap-2 py-2.5 rounded-xl bg-accent text-white text-sm font-medium hover:bg-accent/90 transition-colors",children:["Get started ",o.jsx(Ka,{size:15})]}),o.jsxs("div",{className:"rounded-xl border border-border bg-bg-secondary px-4 py-3 text-left space-y-1.5",children:[o.jsxs("p",{className:"text-xs font-medium text-text flex items-center gap-1.5",children:[o.jsx("span",{className:"w-4 h-4 rounded bg-[#CC785C] flex items-center justify-center text-[9px] text-white font-bold",children:"C"}),"Connect Claude"]}),o.jsx("p",{className:"text-xs text-text-tertiary leading-relaxed",children:"Add Pave as a connector in Claude.ai to use your career knowledge base directly in conversations."}),o.jsxs("a",{href:"https://claude.ai/new?modal=add-custom-connector#settings/customize-connectors",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-accent hover:text-accent/80 transition-colors",onClick:()=>navigator.clipboard.writeText(du).catch(()=>{}),children:["Set it up ",o.jsx(ha,{size:11})]})]})]})]})]})}function Kce(){const{user:e}=Cl(),t=Iu(),[n,r]=y.useState(!0),[s,i]=y.useState(null),[a,l]=y.useState({step:"parse_linkedin",stories_saved:0,roles_saved:[],logo_done:!1}),[c,u]=y.useState([]),[d,h]=y.useState(""),[f,p]=y.useState(null),[m,x]=y.useState(!1),[,w]=y.useState(null),g=y.useRef(null),b=y.useRef(null);y.useEffect(()=>{e&&fetch(`${ql}/onboarding/start`,{method:"POST",headers:{...Yl(),"Content-Type":"application/json"}}).then(E=>E.json()).then(E=>{if(i(E.conversation_id),E.step==="complete"){t("/");return}return l(j=>({...j,step:E.step})),fetch(`${ql}/onboarding/state`,{headers:Yl()}).then(j=>j.json())}).then(E=>{!E||!E.active||l({step:E.step,stories_saved:E.stories_saved,roles_saved:E.roles_saved,logo_done:E.logo_done})}).catch(console.error)},[e]),y.useEffect(()=>{!s||c.length>0||n||fetch(`${ql}/onboarding/message`,{method:"POST",headers:{...Yl(),"Content-Type":"application/json"},body:JSON.stringify({conversation_id:s,text:"__init__"})}).then(async E=>{const j=E.body.getReader(),P=new TextDecoder;let L="",z="";const R=crypto.randomUUID();for(u([{id:R,role:"assistant",text:""}]);;){const{done:B,value:O}=await j.read();
694if(B)break;L+=P.decode(O,{stream:!0});const U=L.split(` 695`);L=U.pop()??"";for(const H of U)if(H.startsWith("data: "))try{const A=JSON.parse(H.slice(6));A.event==="text"&&(z+=A.text,u([{id:R,role:"assistant",text:z}]))}catch{}}}).catch(console.error)},[s]),y.useEffect(()=>{var E;(E=g.current)==null||E.scrollIntoView({behavior:"smooth"})},[c,m]);function _(E){u(j=>[...j,E])}async function k(E,j){if(!s)return;(E||j)&&_({id:crypto.randomUUID(),role:"user",text:E,imagePreview:j==null?void 0:j.preview}),h(""),p(null),x(!0),w(null);let P="";const L=crypto.randomUUID();try{const z={conversation_id:s,text:E};j&&(z.image_data=j.data,z.image_media_type=j.mediaType);const B=(await fetch(`${ql}/onboarding/message`,{method:"POST",headers:{...Yl(),"Content-Type":"application/json"},body:JSON.stringify(z)})).body.getReader(),O=new TextDecoder;let U="";for(_({id:L,role:"assistant",text:""});;){const{done:H,value:A}=await B.read();if(H)break;U+=O.decode(A,{stream:!0});const q=U.split(` 696`);U=q.pop()??"";for(const V of q)if(V.startsWith("data: "))try{const D=JSON.parse(V.slice(6));D.event==="text"?(P+=D.text,u(te=>te.map(J=>J.id===L?{...J,text:P}:J))):D.event==="proposal"?(w(D.proposal),u(te=>te.map(J=>J.id===L?{...J,proposal:D.proposal}:J))):D.event==="step"&&(l({step:D.step,stories_saved:D.stories_saved,roles_saved:D.roles_saved,logo_done:D.logo_done}),D.step==="complete"&&setTimeout(()=>t("/"),2e3))}catch{}}}catch(z){console.error(z)}finally{x(!1)}}async function T(E,j){if(!s)return;const L=await(await fetch(`${ql}/onboarding/confirm`,{method:"POST",headers:{...Yl(),"Content-Type":"application/json"},body:JSON.stringify({conversation_id:s,proposal:{...E,...j}})})).json();l(z=>({...z,step:L.step,stories_saved:L.stories_saved??z.stories_saved})),w(null),k("Confirmed.",null)}async function N(){s&&(await fetch(`${ql}/onboarding/skip`,{method:"POST",headers:{...Yl(),"Content-Type":"application/json"},body:JSON.stringify({conversation_id:s})}),l(E=>({...E,step:"complete",logo_done:!0})),setTimeout(()=>t("/"),1500))}
696async function C(E){if(!new Set(["image/png","image/jpeg","image/gif","image/webp"]).has(E.type))return;const P=URL.createObjectURL(E),L=await new Promise((z,R)=>{const B=new FileReader;B.onload=()=>{const O=B.result,U=O.indexOf(",");z(U>=0?O.slice(U+1):O)},B.onerror=R,B.readAsDataURL(E)});p({data:L,mediaType:E.type,preview:P})}const S=y.useCallback(E=>{E.preventDefault();const j=E.dataTransfer.files[0];j&&C(j)},[]);function I(){m||!d.trim()&&!f||k(d.trim(),f)}return n?o.jsx(Gce,{onStart:()=>r(!1)}):o.jsxs("div",{className:"flex flex-col h-full bg-background",onDrop:S,onDragOver:E=>E.preventDefault(),children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[o.jsx("h1",{className:"text-sm font-medium text-text",children:"Getting started"}),o.jsx("button",{onClick:()=>t("/"),className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:16})})]}),o.jsx(qce,{step:a.step,storiesSaved:a.stories_saved}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-4 space-y-4",children:[c.map(E=>{var j,P,L,z;return o.jsx("div",{className:`flex ${E.role==="user"?"justify-end":"justify-start"}`,children:o.jsxs("div",{className:`max-w-[80%] ${E.role==="user"?"items-end":"items-start"} flex flex-col gap-2`,children:[E.imagePreview&&o.jsx("img",{src:E.imagePreview,alt:"attachment",className:"max-w-[200px] rounded-xl border border-border"}),E.text&&o.jsx("div",{className:`rounded-2xl px-4 py-2.5 text-sm leading-relaxed whitespace-pre-wrap ${E.role==="user"?"bg-accent text-white rounded-br-sm":"bg-surface border border-border text-text rounded-bl-sm"}`,children:E.text}),((j=E.proposal)==null?void 0:j.type)==="onboarding_parsed"&&o.jsx(Qce,{proposal:E.proposal,onConfirm:()=>T(E.proposal)}),((P=E.proposal)==null?void 0:P.type)==="create_role"&&o.jsx(Xce,{proposal:E.proposal,onConfirm:()=>T(E.proposal)}),((L=E.proposal)==null?void 0:L.type)==="create_item"&&o.jsx(Jce,{proposal:E.proposal,onConfirm:()=>T(E.proposal)}),((z=E.proposal)==null?void 0:z.type)==="logo_picker"&&o.jsx(nD,{orgId:String(E.proposal.org_id??""),companyName:String(E.proposal.company_name??""),onConfirm:R=>T(E.proposal,{logo_url:R}),onSkip:N})]})},E.id)}),m&&!c.find(E=>E.role==="assistant"&&!E.text)&&o.jsx("div",{className:"flex justify-start",children:o.jsx("div",{className:"bg-surface border border-border rounded-2xl rounded-bl-sm px-4 py-2.5",children:o.jsx("span",{className:"inline-flex gap-1",children:[0,1,2].map(E=>o.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-text-tertiary animate-pulse",style:{animationDelay:`${E*150}ms`}},E))})})}),o.jsx("div",{ref:g})]}),o.jsxs("div",{className:"px-4 pb-4 pt-2 border-t border-border",children:[f&&o.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[o.jsx("img",{src:f.preview,alt:"preview",className:"h-14 w-14 rounded-lg object-cover border border-border"}),o.jsx("button",{onClick:()=>p(null),className:"text-text-tertiary hover:text-text",children:o.jsx(mt,{size:14})})]}),o.jsxs("div",{className:"flex items-end gap-2",children:[o.jsx("button",{onClick:()=>{var E;return(E=b.current)==null?void 0:E.click()},className:"p-2 rounded-xl border border-border text-text-tertiary hover:text-text transition-colors shrink-0",children:o.jsx(Kh,{size:16})}),o.jsx("input",{ref:b,type:"file",accept:"image/*",className:"hidden",onChange:E=>{var j;return((j=E.target.files)==null?void 0:j[0])&&C(E.target.files[0])}}),o.jsx("textarea",{value:d,onChange:E=>h(E.target.value),onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),I())},placeholder:a.step==="parse_linkedin"?"Upload a LinkedIn screenshot or type hereâ¦":"Type a messageâ¦",rows:1,className:"flex-1 resize-none rounded-xl border border-border bg-background px-3 py-2 text-sm text-text placeholder:text-text-tertiary focus:outline-none focus:border-accent",style:{maxHeight:120,overflowY:"auto"}}),o.jsx("button",{onClick:I,disabled:m||!d.trim()&&!f,className:"p-2 rounded-xl bg-accent text-white disabled:opacity-40 transition-opacity shrink-0",children:o.jsx(x4,{size:16})})]}),a.step==="parse_linkedin"&&o.jsx("button",{onClick:()=>k("skip",null),className:"mt-2 text-xs text-text-tertiary hover:text-text transition-colors underline underline-offset-2",children:"No LinkedIn â enter manually"})]})]})}function Qce({proposal:e,onConfirm:t}){const n=e.roles??[];return o.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3 max-w-xs text-xs",children:[o.jsx("p",{className:"font-medium text-text mb-2",children:String(e.dis
696play_name??"")}),o.jsx("ul",{className:"space-y-1 mb-3",children:n.map((r,s)=>o.jsxs("li",{className:"text-text-tertiary",children:[r.role_title," · ",r.org_name,o.jsxs("span",{className:"ml-1 text-text-tertiary/60",children:[r.start_date??"?"," â ",r.end_date??"Present"]})]},s))}),o.jsx("button",{onClick:t,className:"px-3 py-1.5 rounded-lg bg-accent text-white text-xs font-medium",children:"Looks good â save"})]})}function Xce({proposal:e,onConfirm:t}){const n=String(e.start_date??"?"),r=e.end_date?String(e.end_date):"Present";return o.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3 max-w-xs text-xs",children:[o.jsx("p",{className:"font-medium text-text",children:String(e.role_title??"Role")}),o.jsxs("p",{className:"text-text-tertiary mb-1",children:[String(e.org_name??"")," · ",n," â ",r]}),o.jsx("button",{onClick:t,className:"px-3 py-1.5 rounded-lg bg-accent text-white text-xs font-medium mt-2",children:"Save role"})]})}function Jce({proposal:e,onConfirm:t}){return o.jsxs("div",{className:"rounded-xl border border-border bg-surface p-3 max-w-xs text-xs",children:[o.jsx("p",{className:"font-medium text-text mb-1",children:String(e.item_name??"Story")}),o.jsx("p",{className:"text-text-tertiary mb-3 line-clamp-3",children:String(e.new_content??"")}),o.jsx("button",{onClick:t,className:"px-3 py-1.5 rounded-lg bg-accent text-white text-xs font-medium",children:"Save story"})]})}async function Zce(e,t=1280){return new Promise((n,r)=>{const s=new Image,i=URL.createObjectURL(e);s.onload=()=>{const a=Math.min(1,t/Math.max(s.width,s.height)),l=document.createElement("canvas");l.width=Math.round(s.width*a),l.height=Math.round(s.height*a),l.getContext("2d").drawImage(s,0,0,l.width,l.height),URL.revokeObjectURL(i),n(l.toDataURL("image/jpeg",.75).split(",")[1])},s.onerror=r,s.src=i})}function eue(){const{user:e}=Cl(),t=ga(),{result:n}=$M(),[r,s]=y.useState(!1),[i,a]=y.useState(""),[l,c]=y.useState(null),[u,d]=y.useState(!1),[h,f]=y.useState(!1),p=y.useRef(null),m=y.useRef({url:"",gen_id:null});function x(){m.current={url:window.location.href,gen_id:(n==null?void 0:n.job_id)??null},s(!0)}function w(){s(!1),setTimeout(()=>{a(""),c(null),f(!1)},300)}async function g(_){var T;const k=(T=_.target.files)==null?void 0:T[0];if(k){try{const N=await Zce(k);c({name:k.name,data:N})}catch{}_.target.value=""}}async function b(){if(!(!i.trim()||u)){d(!0);try{await G.feedback.submit({message:i.trim(),url:m.current.url,gen_id:m.current.gen_id??void 0,page:t.pathname,screenshot:l==null?void 0:l.data}),f(!0),setTimeout(w,1500)}catch{f(!0),setTimeout(w,1500)}finally{d(!1)}}}return e?o.jsxs("div",{className:"hidden sm:flex fixed bottom-5 right-5 z-50 flex-col items-end gap-2",children:[o.jsx(He,{children:r&&o.jsxs(se.div,{initial:{opacity:0,y:8,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:8,scale:.97},transition:{duration:.15,ease:"easeOut"},className:"w-72 rounded-xl border border-border bg-bg shadow-lg overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[o.jsx("span",{className:"text-xs font-medium text-text",children:"Report an issue"}),o.jsx("button",{onClick:w,className:"text-text-tertiary hover:text-text transition-colors",children:o.jsx(mt,{size:13})})]}),o.jsx("div",{className:"p-4 space-y-3",children:h?o.jsxs("div",{className:"flex items-center gap-2 py-2 text-sm text-text-secondary",children:[o.jsx(yt,{size:14,className:"text-success shrink-0"}),"Got it â thanks for the report."]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"relative",children:[o.jsx("textarea",{autoFocus:!0,value:i,onChange:_=>a(_.target.value),onKeyDown:_=>{_.key==="Enter"&&(_.metaKey||_.ctrlKey)&&b()},placeholder:"What went wrong?",rows:3,className:"w-full bg-bg-secondary border border-border rounded-lg px-3 py-2 pr-8 text-sm text-text placeholder:text-text-tertiary resize-none focus:outline-none focus:border-border-focus transition-colors"}),o.jsx("button",{type:"button",onClick:()=>{var _;return(_=p.current)==null?void 0:_.click()},title:"Attach screenshot",className:"absolute bottom-2 right-2 text-text-tertiary hover:text-text transition-colors",children:o.jsx(Kh,{size:13})}),o.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:g})]}),l&&o.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded-lg bg-bg-secondary border border-border",children:[o.jsx(Kh,{size:11,className:"text-text-tertiary shrink-0"}),o.jsx("span",{className:"text-xs text-text-secondary truncate flex-1",children:l.name}),o.jsx("button",{onClick:()=>c(null),className:"text-text-tertiary hover:text-error transition-colors shrink-0",children:o.jsx(mt,{size:11})})]}),o.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[o.jsx(Bj,{label:t.pathname}),m.current.gen_id&&o.jsx(Bj,{label:`gen:${m.current.gen_id.slice(0,8)}`})]}),o.jsx("button",{onClick:b,disabled:!i.trim()||u,className:"w-full py-2 rounded-lg bg-accent text-bg text-xs font-medium disabled:opacity-40 hover:opacity-90 transition-opacity",children:u?"Sendingâ¦":"Send report"})]})})]})}),o.jsx(se.button,{onClick:r?w:x,className:"w-8 h-8 rounded-full bg-bg border border-border shadow-sm flex items-center justify-center text-text-tertiary opacity-0 hover:opacity-100 focus:opacity-100 transition-all hover:border-border-focus hover:text-text",whileHover:{scale:1.1},whileTap:{scale:.95},title:"Report an issue",children:r?o.jsx(mt,{size:13}):o.jsx(Cu,{size:13})})]}):null}function Bj({label:e}){return o.jsx("span",{className:"font-mono text-[10px] text-text-tertiary/60 bg-bg-secondary border border-border rounded px-1.5 py-0.5",children:e})}const tue="947723656409-77a7eauhtve4f37hmt50276pqt32euig.apps.googleusercontent.com";function nue(){return o.jsxs(z4,{children:[o.jsx(yr,{path:"/",element:o.jsx(iie,{})}),o.jsx(yr,{path:"/generate",element:o.jsx(Zse,{})}),o.jsx(yr,{path:"/stories",element:o.jsx(Vie,{})}),o.jsx(yr,{path:"/identity",element:o.jsx(die,{})}),o.jsx(yr,{path:"/chat",element:o.jsx(hne,{})}),o.jsx(yr,{path:"/settings",element:o.jsx(wie,{})}),o.jsx(yr,{path:"/history",element:o.jsx(eie,{})}),o.jsx(yr,{path:"/history/:jobId",element:o.jsx(PV,{})}),o.jsx(yr,{path:"/pipeline",element:o.jsx(zce,{})}),o.jsx(yr,{path:"/onboarding",element:o.jsx(Kce,{})})]})}async function rue(e){const t=await fetch("/api/auth/session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({credential:e})});if(!t.ok)throw new Error("Session exchange failed");const{token:n}=await t.json();return n}async function sue(){const e=await fetch("/api/demo/login",{method:"POST"});if(!e.ok)throw new Error("Demo login failed");const{token:t}=await e.json();return t}class iue extends y.Component{constructor(){super(...arguments);nE(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){console.error("Uncaught render error:",n,r)}render(){return this.state.error?o.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[100dvh] gap-4 text-text-secondary",children:[o.jsx("p",{className:"text-lg font-medium text-text-primary",children:"Something went wrong"}),o.jsx("p",{className:"text-sm",children:this.state.error.message}),o.jsx("button",{className:"text-sm underline",onClick:()=>this.setState({error:null}),children:"Try again"})]}):this.props.children}}function j6(e){const t=V4(e);return{user_id:t.sub,email:t.email,name:t.name??t.email,picture:t.picture}}function aue(){const e=localStorage.getItem("auth_token");if(!e)return null;const t=V4(e);return t.exp&&t.exp*1e3<Date.now()?(localStorage.removeItem("auth_token"),null):{token:e,user:{...j6(e),customPicture:localStorage.getItem("custom_picture")??void 0}}}function oue(){const e=Yt(),t=y.useState(()=>aue())[0],[n,r]=y.useState(()=>(t==null?void 0:t.token)??null),[s,i]=y.useState(()=>(t==null?void 0:t.user)??null),a=f=>{cv(f),r(f),i({...j6(f),customPicture:localStorage.getItem("custom_picture")??void 0}),e.prefetchQuery({queryKey:["kb"],queryFn:()=>Promise.all([G.orgs.list(),G.roles.list(),G.projects.list(),G.stories.list()]).then(([p,m,x,w])=>({orgs:p,roles:m,projects:x,stories:w}))})},l=async f=>{a(await rue(f))},c=async()=>{a(await sue())},u=()=>{cv(null),localStorage.removeItem("custom_picture"),localStorage.removeItem("user_profile"),r(null),i(null)};y.useEffect(()=>{DW(u)},[]),y.useEffect(()=>{s&&fetch("/api/user-profile",{headers:n?{Authorization:`Bearer ${n}`}:{}}).then(f=>f.ok?f.json():null).then(f=>{if(!f)return;localStorage.setItem("user_profile",JSON.stringify(f));const p=f.custom_picture??void 0;p?localStorage.setItem("custom_picture",p):localStorage.removeItem("custom_picture"),i(m=>m&&{...m,customPicture:p,...f.display_name?{name:f.display_name}:{}})}).catch(f=>{console.warn("Profile sync failed:",f)})},[s==null?void 0:s.user_id]);const d=f=>{f?localStorage.setItem("custom_picture",f):localStorage.removeItem("custom_picture"),i(p=>p&&{...p,customPicture:f})},h=f=>{i(p=>p&&{...p,name:f})};return o.jsx(W4.Provider,{value:{user:s,token:n,login:l,demoLogin:c,logout:u,updateCustomPicture:d,updateName:h},children:o.jsx(TW,{children:o.jsxs(z4,{children:[o.jsx(yr,{path:"/privacy",element:o.jsx(Hce,{})}),o.jsx(yr,{path:"/terms",element:o.jsx(Wce,{})}),o.jsx(yr,{path:"/p/:slug",element:o.jsx(cj,{})}),o.jsx(yr,{path:"/p/:slug/:token",element:o.jsx(cj,{})}
696),o.jsx(yr,{path:"/*",element:s?o.jsx(gV,{children:o.jsxs(Cse,{children:[o.jsxs("div",{className:"flex flex-col min-h-[100dvh]",children:[o.jsx(vV,{}),o.jsx("main",{className:"flex-1 pb-[calc(64px+env(safe-area-inset-bottom))] sm:pb-0 relative z-[2]",children:o.jsx(iue,{children:o.jsx(nue,{})})})]}),o.jsx(eue,{})]})}):o.jsx(MW,{})})]})})})}function lue(){return o.jsx(nB,{clientId:tue,children:o.jsx(TH,{children:o.jsx(oue,{})})})}const cue=new jR({defaultOptions:{queries:{staleTime:3e4,gcTime:5*6e4,refetchOnWindowFocus:!1,retry:1}}});O5(document.getElementById("root")).render(o.jsx(y.StrictMode,{children:o.jsx(AR,{client:cue,children:o.jsx(lue,{})})}));
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.