@ainyc/canonry 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/assets/index-B2IIQpXZ.js +243 -0
- package/assets/assets/index-MP6oQcCa.css +1 -0
- package/assets/index.html +2 -2
- package/dist/{chunk-O4HLQBL7.js → chunk-65PXJTPN.js} +379 -23
- package/dist/cli.js +146 -3
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/assets/assets/index-BEsueXzg.css +0 -1
- package/assets/assets/index-Bol7Z6qk.js +0 -243
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
function hw(t,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in t)){const u=Object.getOwnPropertyDescriptor(l,o);u&&Object.defineProperty(t,o,u.get?u:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function a(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=a(o);fetch(o.href,u)}})();function mv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jd={exports:{}},kl={};var Vg;function mw(){if(Vg)return kl;Vg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,o,u){var d=null;if(u!==void 0&&(d=""+u),o.key!==void 0&&(d=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:t,type:l,key:d,ref:o!==void 0?o:null,props:u}}return kl.Fragment=n,kl.jsx=a,kl.jsxs=a,kl}var Pg;function pw(){return Pg||(Pg=1,jd.exports=mw()),jd.exports}var c=pw(),Nd={exports:{}},je={};var Qg;function gw(){if(Qg)return je;Qg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function N(z){return z===null||typeof z!="object"?null:(z=x&&z[x]||z["@@iterator"],typeof z=="function"?z:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,k={};function A(z,q,te){this.props=z,this.context=q,this.refs=k,this.updater=te||C}A.prototype.isReactComponent={},A.prototype.setState=function(z,q){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,q,"setState")},A.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=A.prototype;function O(z,q,te){this.props=z,this.context=q,this.refs=k,this.updater=te||C}var D=O.prototype=new T;D.constructor=O,j(D,A.prototype),D.isPureReactComponent=!0;var L=Array.isArray;function H(){}var V={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function Q(z,q,te){var ne=te.ref;return{$$typeof:t,type:z,key:q,ref:ne!==void 0?ne:null,props:te}}function be(z,q){return Q(z.type,q,z.props)}function X(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function ce(z){var q={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(te){return q[te]})}var Oe=/\/+/g;function Ke(z,q){return typeof z=="object"&&z!==null&&z.key!=null?ce(""+z.key):q.toString(36)}function Me(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(H,H):(z.status="pending",z.then(function(q){z.status==="pending"&&(z.status="fulfilled",z.value=q)},function(q){z.status==="pending"&&(z.status="rejected",z.reason=q)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function I(z,q,te,ne,oe){var fe=typeof z;(fe==="undefined"||fe==="boolean")&&(z=null);var we=!1;if(z===null)we=!0;else switch(fe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(z.$$typeof){case t:case n:we=!0;break;case b:return we=z._init,I(we(z._payload),q,te,ne,oe)}}if(we)return oe=oe(z),we=ne===""?"."+Ke(z,0):ne,L(oe)?(te="",we!=null&&(te=we.replace(Oe,"$&/")+"/"),I(oe,q,te,"",function(Le){return Le})):oe!=null&&(X(oe)&&(oe=be(oe,te+(oe.key==null||z&&z.key===oe.key?"":(""+oe.key).replace(Oe,"$&/")+"/")+we)),q.push(oe)),1;we=0;var Z=ne===""?".":ne+":";if(L(z))for(var se=0;se<z.length;se++)ne=z[se],fe=Z+Ke(ne,se),we+=I(ne,q,te,fe,oe);else if(se=N(z),typeof se=="function")for(z=se.call(z),se=0;!(ne=z.next()).done;)ne=ne.value,fe=Z+Ke(ne,se++),we+=I(ne,q,te,fe,oe);else if(fe==="object"){if(typeof z.then=="function")return I(Me(z),q,te,ne,oe);throw q=String(z),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return we}function K(z,q,te){if(z==null)return z;var ne=[],oe=0;return I(z,ne,"","",function(fe){return q.call(te,fe,oe++)}),ne}function ae(z){if(z._status===-1){var q=z._result;q=q(),q.then(function(te){(z._status===0||z._status===-1)&&(z._status=1,z._result=te)},function(te){(z._status===0||z._status===-1)&&(z._status=2,z._result=te)}),z._status===-1&&(z._status=0,z._result=q)}if(z._status===1)return z._result.default;throw z._result}var de=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},ee={map:K,forEach:function(z,q,te){K(z,function(){q.apply(this,arguments)},te)},count:function(z){var q=0;return K(z,function(){q++}),q},toArray:function(z){return K(z,function(q){return q})||[]},only:function(z){if(!X(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return je.Activity=v,je.Children=ee,je.Component=A,je.Fragment=a,je.Profiler=o,je.PureComponent=O,je.StrictMode=l,je.Suspense=p,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,je.__COMPILER_RUNTIME={__proto__:null,c:function(z){return V.H.useMemoCache(z)}},je.cache=function(z){return function(){return z.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(z,q,te){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ne=j({},z.props),oe=z.key;if(q!=null)for(fe in q.key!==void 0&&(oe=""+q.key),q)!R.call(q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&q.ref===void 0||(ne[fe]=q[fe]);var fe=arguments.length-2;if(fe===1)ne.children=te;else if(1<fe){for(var we=Array(fe),Z=0;Z<fe;Z++)we[Z]=arguments[Z+2];ne.children=we}return Q(z.type,oe,ne)},je.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:u,_context:z},z},je.createElement=function(z,q,te){var ne,oe={},fe=null;if(q!=null)for(ne in q.key!==void 0&&(fe=""+q.key),q)R.call(q,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(oe[ne]=q[ne]);var we=arguments.length-2;if(we===1)oe.children=te;else if(1<we){for(var Z=Array(we),se=0;se<we;se++)Z[se]=arguments[se+2];oe.children=Z}if(z&&z.defaultProps)for(ne in we=z.defaultProps,we)oe[ne]===void 0&&(oe[ne]=we[ne]);return Q(z,fe,oe)},je.createRef=function(){return{current:null}},je.forwardRef=function(z){return{$$typeof:m,render:z}},je.isValidElement=X,je.lazy=function(z){return{$$typeof:b,_payload:{_status:-1,_result:z},_init:ae}},je.memo=function(z,q){return{$$typeof:g,type:z,compare:q===void 0?null:q}},je.startTransition=function(z){var q=V.T,te={};V.T=te;try{var ne=z(),oe=V.S;oe!==null&&oe(te,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(H,de)}catch(fe){de(fe)}finally{q!==null&&te.types!==null&&(q.types=te.types),V.T=q}},je.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},je.use=function(z){return V.H.use(z)},je.useActionState=function(z,q,te){return V.H.useActionState(z,q,te)},je.useCallback=function(z,q){return V.H.useCallback(z,q)},je.useContext=function(z){return V.H.useContext(z)},je.useDebugValue=function(){},je.useDeferredValue=function(z,q){return V.H.useDeferredValue(z,q)},je.useEffect=function(z,q){return V.H.useEffect(z,q)},je.useEffectEvent=function(z){return V.H.useEffectEvent(z)},je.useId=function(){return V.H.useId()},je.useImperativeHandle=function(z,q,te){return V.H.useImperativeHandle(z,q,te)},je.useInsertionEffect=function(z,q){return V.H.useInsertionEffect(z,q)},je.useLayoutEffect=function(z,q){return V.H.useLayoutEffect(z,q)},je.useMemo=function(z,q){return V.H.useMemo(z,q)},je.useOptimistic=function(z,q){return V.H.useOptimistic(z,q)},je.useReducer=function(z,q,te){return V.H.useReducer(z,q,te)},je.useRef=function(z){return V.H.useRef(z)},je.useState=function(z){return V.H.useState(z)},je.useSyncExternalStore=function(z,q,te){return V.H.useSyncExternalStore(z,q,te)},je.useTransition=function(){return V.H.useTransition()},je.version="19.2.4",je}var Xg;function df(){return Xg||(Xg=1,Nd.exports=gw()),Nd.exports}var w=df();const yw=mv(w),ff=hw({__proto__:null,default:yw},[w]);var kd={exports:{}},_l={},_d={exports:{}},zd={};var Jg;function vw(){return Jg||(Jg=1,(function(t){function n(I,K){var ae=I.length;I.push(K);e:for(;0<ae;){var de=ae-1>>>1,ee=I[de];if(0<o(ee,K))I[de]=K,I[ae]=ee,ae=de;else break e}}function a(I){return I.length===0?null:I[0]}function l(I){if(I.length===0)return null;var K=I[0],ae=I.pop();if(ae!==K){I[0]=ae;e:for(var de=0,ee=I.length,z=ee>>>1;de<z;){var q=2*(de+1)-1,te=I[q],ne=q+1,oe=I[ne];if(0>o(te,ae))ne<ee&&0>o(oe,te)?(I[de]=oe,I[ne]=ae,de=ne):(I[de]=te,I[q]=ae,de=q);else if(ne<ee&&0>o(oe,ae))I[de]=oe,I[ne]=ae,de=ne;else break e}}return K}function o(I,K){var ae=I.sortIndex-K.sortIndex;return ae!==0?ae:I.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,m=d.now();t.unstable_now=function(){return d.now()-m}}var p=[],g=[],b=1,v=null,x=3,N=!1,C=!1,j=!1,k=!1,A=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function D(I){for(var K=a(g);K!==null;){if(K.callback===null)l(g);else if(K.startTime<=I)l(g),K.sortIndex=K.expirationTime,n(p,K);else break;K=a(g)}}function L(I){if(j=!1,D(I),!C)if(a(p)!==null)C=!0,H||(H=!0,ce());else{var K=a(g);K!==null&&Me(L,K.startTime-I)}}var H=!1,V=-1,R=5,Q=-1;function be(){return k?!0:!(t.unstable_now()-Q<R)}function X(){if(k=!1,H){var I=t.unstable_now();Q=I;var K=!0;try{e:{C=!1,j&&(j=!1,T(V),V=-1),N=!0;var ae=x;try{t:{for(D(I),v=a(p);v!==null&&!(v.expirationTime>I&&be());){var de=v.callback;if(typeof de=="function"){v.callback=null,x=v.priorityLevel;var ee=de(v.expirationTime<=I);if(I=t.unstable_now(),typeof ee=="function"){v.callback=ee,D(I),K=!0;break t}v===a(p)&&l(p),D(I)}else l(p);v=a(p)}if(v!==null)K=!0;else{var z=a(g);z!==null&&Me(L,z.startTime-I),K=!1}}break e}finally{v=null,x=ae,N=!1}K=void 0}}finally{K?ce():H=!1}}}var ce;if(typeof O=="function")ce=function(){O(X)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,Ke=Oe.port2;Oe.port1.onmessage=X,ce=function(){Ke.postMessage(null)}}else ce=function(){A(X,0)};function Me(I,K){V=A(function(){I(t.unstable_now())},K)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(I){I.callback=null},t.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<I?Math.floor(1e3/I):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(I){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var ae=x;x=K;try{return I()}finally{x=ae}},t.unstable_requestPaint=function(){k=!0},t.unstable_runWithPriority=function(I,K){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var ae=x;x=I;try{return K()}finally{x=ae}},t.unstable_scheduleCallback=function(I,K,ae){var de=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?de+ae:de):ae=de,I){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=ae+ee,I={id:b++,callback:K,priorityLevel:I,startTime:ae,expirationTime:ee,sortIndex:-1},ae>de?(I.sortIndex=ae,n(g,I),a(p)===null&&I===a(g)&&(j?(T(V),V=-1):j=!0,Me(L,ae-de))):(I.sortIndex=ee,n(p,I),C||N||(C=!0,H||(H=!0,ce()))),I},t.unstable_shouldYield=be,t.unstable_wrapCallback=function(I){var K=x;return function(){var ae=x;x=K;try{return I.apply(this,arguments)}finally{x=ae}}}})(zd)),zd}var Fg;function bw(){return Fg||(Fg=1,_d.exports=vw()),_d.exports}var Cd={exports:{}},Lt={};var Wg;function xw(){if(Wg)return Lt;Wg=1;var t=df();function n(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(p,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:g,implementation:b}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Lt.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(n(299));return u(p,g,null,b)},Lt.flushSync=function(p){var g=d.T,b=l.p;try{if(d.T=null,l.p=2,p)return p()}finally{d.T=g,l.p=b,l.d.f()}},Lt.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,l.d.C(p,g))},Lt.prefetchDNS=function(p){typeof p=="string"&&l.d.D(p)},Lt.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin),x=typeof g.integrity=="string"?g.integrity:void 0,N=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?l.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:N}):b==="script"&&l.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:N,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Lt.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);l.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&l.d.M(p)},Lt.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin);l.d.L(p,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Lt.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=m(g.as,g.crossOrigin);l.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else l.d.m(p)},Lt.requestFormReset=function(p){l.d.r(p)},Lt.unstable_batchedUpdates=function(p,g){return p(g)},Lt.useFormState=function(p,g,b){return d.H.useFormState(p,g,b)},Lt.useFormStatus=function(){return d.H.useHostTransitionStatus()},Lt.version="19.2.4",Lt}var ey;function pv(){if(ey)return Cd.exports;ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Cd.exports=xw(),Cd.exports}var ty;function Sw(){if(ty)return _l;ty=1;var t=bw(),n=df(),a=pv();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function d(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function p(e){if(u(e)!==e)throw Error(l(188))}function g(e){var i=e.alternate;if(!i){if(i=u(e),i===null)throw Error(l(188));return i!==e?null:e}for(var s=e,r=i;;){var f=s.return;if(f===null)break;var h=f.alternate;if(h===null){if(r=f.return,r!==null){s=r;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===s)return p(f),e;if(h===r)return p(f),i;h=h.sibling}throw Error(l(188))}if(s.return!==r.return)s=f,r=h;else{for(var y=!1,S=f.child;S;){if(S===s){y=!0,s=f,r=h;break}if(S===r){y=!0,r=f,s=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===s){y=!0,s=h,r=f;break}if(S===r){y=!0,r=h,s=f;break}S=S.sibling}if(!y)throw Error(l(189))}}if(s.alternate!==r)throw Error(l(190))}if(s.tag!==3)throw Error(l(188));return s.stateNode.current===s?e:i}function b(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=b(e),i!==null)return i;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),O=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),Q=Symbol.for("react.activity"),be=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var Oe=Symbol.for("react.client.reference");function Ke(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case A:return"Profiler";case k:return"StrictMode";case L:return"Suspense";case H:return"SuspenseList";case Q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case O:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case D:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return i=e.displayName||null,i!==null?i:Ke(e.type)||"Memo";case R:i=e._payload,e=e._init;try{return Ke(e(i))}catch{}}return null}var Me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},de=[],ee=-1;function z(e){return{current:e}}function q(e){0>ee||(e.current=de[ee],de[ee]=null,ee--)}function te(e,i){ee++,de[ee]=e.current,e.current=i}var ne=z(null),oe=z(null),fe=z(null),we=z(null);function Z(e,i){switch(te(fe,i),te(oe,e),te(ne,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?gg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=gg(i),e=yg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(ne),te(ne,e)}function se(){q(ne),q(oe),q(fe)}function Le(e){e.memoizedState!==null&&te(we,e);var i=ne.current,s=yg(i,e.type);i!==s&&(te(oe,e),te(ne,s))}function Qe(e){oe.current===e&&(q(ne),q(oe)),we.current===e&&(q(we),Sl._currentValue=ae)}var le,st;function ct(e){if(le===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);le=i&&i[1]||"",st=-1<s.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+le+e+st}var rn=!1;function _t(e,i){if(!e||rn)return"";rn=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(i){var W=function(){throw Error()};if(Object.defineProperty(W.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(W,[])}catch(G){var B=G}Reflect.construct(e,[],W)}else{try{W.call()}catch(G){B=G}e.call(W.prototype)}}else{try{throw Error()}catch(G){B=G}(W=e())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(G){if(G&&B&&typeof G.stack=="string")return[G.stack,B.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var _=y.split(`
|
|
4
|
+
`),$=S.split(`
|
|
5
|
+
`);for(f=r=0;r<_.length&&!_[r].includes("DetermineComponentFrameRoot");)r++;for(;f<$.length&&!$[f].includes("DetermineComponentFrameRoot");)f++;if(r===_.length||f===$.length)for(r=_.length-1,f=$.length-1;1<=r&&0<=f&&_[r]!==$[f];)f--;for(;1<=r&&0<=f;r--,f--)if(_[r]!==$[f]){if(r!==1||f!==1)do if(r--,f--,0>f||_[r]!==$[f]){var P=`
|
|
6
|
+
`+_[r].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=r&&0<=f);break}}}finally{rn=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?ct(s):""}function ja(e,i){switch(e.tag){case 26:case 27:case 5:return ct(e.type);case 16:return ct("Lazy");case 13:return e.child!==i&&i!==null?ct("Suspense Fallback"):ct("Suspense");case 19:return ct("SuspenseList");case 0:case 15:return _t(e.type,!1);case 11:return _t(e.type.render,!1);case 1:return _t(e.type,!0);case 31:return ct("Activity");default:return""}}function oi(e){try{var i="",s=null;do i+=ja(e,s),s=e,e=e.return;while(e);return i}catch(r){return`
|
|
7
|
+
Error generating stack: `+r.message+`
|
|
8
|
+
`+r.stack}}var Ie=Object.prototype.hasOwnProperty,Ut=t.unstable_scheduleCallback,ut=t.unstable_cancelCallback,yt=t.unstable_shouldYield,Ds=t.unstable_requestPaint,zt=t.unstable_now,Ki=t.unstable_getCurrentPriorityLevel,Bn=t.unstable_ImmediatePriority,Yi=t.unstable_UserBlockingPriority,qt=t.unstable_NormalPriority,Na=t.unstable_LowPriority,re=t.unstable_IdlePriority,jn=t.log,cc=t.unstable_setDisableYieldValue,Vi=null,Mt=null;function Y(e){if(typeof jn=="function"&&cc(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(Vi,e)}catch{}}var Se=Math.clz32?Math.clz32:Wb,Pi=Math.log,uc=Math.LN2;function Wb(e){return e>>>=0,e===0?32:31-(Pi(e)/uc|0)|0}var Hl=256,Gl=262144,Kl=4194304;function Qi(e){var i=e&42;if(i!==0)return i;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Yl(e,i,s){var r=e.pendingLanes;if(r===0)return 0;var f=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~h,r!==0?f=Qi(r):(y&=S,y!==0?f=Qi(y):s||(s=S&~e,s!==0&&(f=Qi(s))))):(S=r&~h,S!==0?f=Qi(S):y!==0?f=Qi(y):s||(s=r&~e,s!==0&&(f=Qi(s)))),f===0?0:i!==0&&i!==f&&(i&h)===0&&(h=f&-f,s=i&-i,h>=s||h===32&&(s&4194048)!==0)?i:f}function Rs(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function ex(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Jf(){var e=Kl;return Kl<<=1,(Kl&62914560)===0&&(Kl=4194304),e}function dc(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function Ms(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function tx(e,i,s,r,f,h){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var S=e.entanglements,_=e.expirationTimes,$=e.hiddenUpdates;for(s=y&~s;0<s;){var P=31-Se(s),W=1<<P;S[P]=0,_[P]=-1;var B=$[P];if(B!==null)for($[P]=null,P=0;P<B.length;P++){var G=B[P];G!==null&&(G.lane&=-536870913)}s&=~W}r!==0&&Ff(e,r,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~i))}function Ff(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var r=31-Se(i);e.entangledLanes|=i,e.entanglements[r]=e.entanglements[r]|1073741824|s&261930}function Wf(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var r=31-Se(s),f=1<<r;f&i|e[r]&i&&(e[r]|=i),s&=~f}}function eh(e,i){var s=i&-i;return s=(s&42)!==0?1:fc(s),(s&(e.suspendedLanes|i))!==0?0:s}function fc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function hc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function th(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Ig(e.type))}function nh(e,i){var s=K.p;try{return K.p=e,i()}finally{K.p=s}}var ci=Math.random().toString(36).slice(2),At="__reactFiber$"+ci,Ht="__reactProps$"+ci,ka="__reactContainer$"+ci,mc="__reactEvents$"+ci,nx="__reactListeners$"+ci,ix="__reactHandles$"+ci,ih="__reactResources$"+ci,Ls="__reactMarker$"+ci;function pc(e){delete e[At],delete e[Ht],delete e[mc],delete e[nx],delete e[ix]}function _a(e){var i=e[At];if(i)return i;for(var s=e.parentNode;s;){if(i=s[ka]||s[At]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=Ng(e);e!==null;){if(s=e[At])return s;e=Ng(e)}return i}e=s,s=e.parentNode}return null}function za(e){if(e=e[At]||e[ka]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Us(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function Ca(e){var i=e[ih];return i||(i=e[ih]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ct(e){e[Ls]=!0}var ah=new Set,sh={};function Xi(e,i){Ea(e,i),Ea(e+"Capture",i)}function Ea(e,i){for(sh[e]=i,e=0;e<i.length;e++)ah.add(i[e])}var ax=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),lh={},rh={};function sx(e){return Ie.call(rh,e)?!0:Ie.call(lh,e)?!1:ax.test(e)?rh[e]=!0:(lh[e]=!0,!1)}function Vl(e,i,s){if(sx(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function Pl(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function In(e,i,s,r){if(r===null)e.removeAttribute(s);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+r)}}function on(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function oh(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function lx(e,i,s){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var f=r.get,h=r.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){s=""+y,h.call(this,y)}}),Object.defineProperty(e,i,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function gc(e){if(!e._valueTracker){var i=oh(e)?"checked":"value";e._valueTracker=lx(e,i,""+e[i])}}function ch(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),r="";return e&&(r=oh(e)?e.checked?"true":"false":e.value),e=r,e!==s?(i.setValue(e),!0):!1}function Ql(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}}var rx=/[\n"\\]/g;function cn(e){return e.replace(rx,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function yc(e,i,s,r,f,h,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+on(i)):e.value!==""+on(i)&&(e.value=""+on(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?vc(e,y,on(i)):s!=null?vc(e,y,on(s)):r!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+on(S):e.removeAttribute("name")}function uh(e,i,s,r,f,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),i!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){gc(e);return}s=s!=null?""+on(s):"",i=i!=null?""+on(i):s,S||i===e.value||(e.value=i),e.defaultValue=i}r=r??f,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),gc(e)}function vc(e,i,s){i==="number"&&Ql(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Aa(e,i,s,r){if(e=e.options,i){i={};for(var f=0;f<s.length;f++)i["$"+s[f]]=!0;for(s=0;s<e.length;s++)f=i.hasOwnProperty("$"+e[s].value),e[s].selected!==f&&(e[s].selected=f),f&&r&&(e[s].defaultSelected=!0)}else{for(s=""+on(s),i=null,f=0;f<e.length;f++){if(e[f].value===s){e[f].selected=!0,r&&(e[f].defaultSelected=!0);return}i!==null||e[f].disabled||(i=e[f])}i!==null&&(i.selected=!0)}}function dh(e,i,s){if(i!=null&&(i=""+on(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+on(s):""}function fh(e,i,s,r){if(i==null){if(r!=null){if(s!=null)throw Error(l(92));if(Me(r)){if(1<r.length)throw Error(l(93));r=r[0]}s=r}s==null&&(s=""),i=s}s=on(i),e.defaultValue=s,r=e.textContent,r===s&&r!==""&&r!==null&&(e.value=r),gc(e)}function Oa(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var ox=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function hh(e,i,s){var r=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?r?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":r?e.setProperty(i,s):typeof s!="number"||s===0||ox.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function mh(e,i,s){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,s!=null){for(var r in s)!s.hasOwnProperty(r)||i!=null&&i.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var f in i)r=i[f],i.hasOwnProperty(f)&&s[f]!==r&&hh(e,f,r)}else for(var h in i)i.hasOwnProperty(h)&&hh(e,h,i[h])}function bc(e){if(e.indexOf("-")===-1)return!1;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 cx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),ux=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Xl(e){return ux.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var xc=null;function Sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ta=null,Da=null;function ph(e){var i=za(e);if(i&&(e=i.stateNode)){var s=e[Ht]||null;e:switch(e=i.stateNode,i.type){case"input":if(yc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+cn(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var r=s[i];if(r!==e&&r.form===e.form){var f=r[Ht]||null;if(!f)throw Error(l(90));yc(r,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<s.length;i++)r=s[i],r.form===e.form&&ch(r)}break e;case"textarea":dh(e,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Aa(e,!!s.multiple,i,!1)}}}var wc=!1;function gh(e,i,s){if(wc)return e(i,s);wc=!0;try{var r=e(i);return r}finally{if(wc=!1,(Ta!==null||Da!==null)&&(Ur(),Ta&&(i=Ta,e=Da,Da=Ta=null,ph(i),e)))for(i=0;i<e.length;i++)ph(e[i])}}function $s(e,i){var s=e.stateNode;if(s===null)return null;var r=s[Ht]||null;if(r===null)return null;s=r[i];e:switch(i){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(s&&typeof s!="function")throw Error(l(231,i,typeof s));return s}var qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jc=!1;if(qn)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){jc=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{jc=!1}var ui=null,Nc=null,Jl=null;function yh(){if(Jl)return Jl;var e,i=Nc,s=i.length,r,f="value"in ui?ui.value:ui.textContent,h=f.length;for(e=0;e<s&&i[e]===f[e];e++);var y=s-e;for(r=1;r<=y&&i[s-r]===f[h-r];r++);return Jl=f.slice(e,1<r?1-r:void 0)}function Fl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Wl(){return!0}function vh(){return!1}function Gt(e){function i(s,r,f,h,y){this._reactName=s,this._targetInst=f,this.type=r,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(s=e[S],this[S]=s?s(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Wl:vh,this.isPropagationStopped=vh,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),i}var Ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},er=Gt(Ji),Is=v({},Ji,{view:0,detail:0}),dx=Gt(Is),kc,_c,Zs,tr=v({},Is,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cc,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!==Zs&&(Zs&&e.type==="mousemove"?(kc=e.screenX-Zs.screenX,_c=e.screenY-Zs.screenY):_c=kc=0,Zs=e),kc)},movementY:function(e){return"movementY"in e?e.movementY:_c}}),bh=Gt(tr),fx=v({},tr,{dataTransfer:0}),hx=Gt(fx),mx=v({},Is,{relatedTarget:0}),zc=Gt(mx),px=v({},Ji,{animationName:0,elapsedTime:0,pseudoElement:0}),gx=Gt(px),yx=v({},Ji,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vx=Gt(yx),bx=v({},Ji,{data:0}),xh=Gt(bx),xx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sx={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"},wx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=wx[e])?!!i[e]:!1}function Cc(){return jx}var Nx=v({},Is,{key:function(e){if(e.key){var i=xx[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Fl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cc,charCode:function(e){return e.type==="keypress"?Fl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),kx=Gt(Nx),_x=v({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sh=Gt(_x),zx=v({},Is,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cc}),Cx=Gt(zx),Ex=v({},Ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ax=Gt(Ex),Ox=v({},tr,{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}),Tx=Gt(Ox),Dx=v({},Ji,{newState:0,oldState:0}),Rx=Gt(Dx),Mx=[9,13,27,32],Ec=qn&&"CompositionEvent"in window,qs=null;qn&&"documentMode"in document&&(qs=document.documentMode);var Lx=qn&&"TextEvent"in window&&!qs,wh=qn&&(!Ec||qs&&8<qs&&11>=qs),jh=" ",Nh=!1;function kh(e,i){switch(e){case"keyup":return Mx.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ra=!1;function Ux(e,i){switch(e){case"compositionend":return _h(i);case"keypress":return i.which!==32?null:(Nh=!0,jh);case"textInput":return e=i.data,e===jh&&Nh?null:e;default:return null}}function $x(e,i){if(Ra)return e==="compositionend"||!Ec&&kh(e,i)?(e=yh(),Jl=Nc=ui=null,Ra=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return wh&&i.locale!=="ko"?null:i.data;default:return null}}var Bx={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 zh(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Bx[e.type]:i==="textarea"}function Ch(e,i,s,r){Ta?Da?Da.push(r):Da=[r]:Ta=r,i=Gr(i,"onChange"),0<i.length&&(s=new er("onChange","change",null,s,r),e.push({event:s,listeners:i}))}var Hs=null,Gs=null;function Ix(e){ug(e,0)}function nr(e){var i=Us(e);if(ch(i))return e}function Eh(e,i){if(e==="change")return i}var Ah=!1;if(qn){var Ac;if(qn){var Oc="oninput"in document;if(!Oc){var Oh=document.createElement("div");Oh.setAttribute("oninput","return;"),Oc=typeof Oh.oninput=="function"}Ac=Oc}else Ac=!1;Ah=Ac&&(!document.documentMode||9<document.documentMode)}function Th(){Hs&&(Hs.detachEvent("onpropertychange",Dh),Gs=Hs=null)}function Dh(e){if(e.propertyName==="value"&&nr(Gs)){var i=[];Ch(i,Gs,e,Sc(e)),gh(Ix,i)}}function Zx(e,i,s){e==="focusin"?(Th(),Hs=i,Gs=s,Hs.attachEvent("onpropertychange",Dh)):e==="focusout"&&Th()}function qx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nr(Gs)}function Hx(e,i){if(e==="click")return nr(i)}function Gx(e,i){if(e==="input"||e==="change")return nr(i)}function Kx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var Jt=typeof Object.is=="function"?Object.is:Kx;function Ks(e,i){if(Jt(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),r=Object.keys(i);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var f=s[r];if(!Ie.call(i,f)||!Jt(e[f],i[f]))return!1}return!0}function Rh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mh(e,i){var s=Rh(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=i&&r>=i)return{node:s,offset:i-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Rh(s)}}function Lh(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Lh(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Uh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Ql(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=Ql(e.document)}return i}function Tc(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var Yx=qn&&"documentMode"in document&&11>=document.documentMode,Ma=null,Dc=null,Ys=null,Rc=!1;function $h(e,i,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Rc||Ma==null||Ma!==Ql(r)||(r=Ma,"selectionStart"in r&&Tc(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}),Ys&&Ks(Ys,r)||(Ys=r,r=Gr(Dc,"onSelect"),0<r.length&&(i=new er("onSelect","select",null,i,s),e.push({event:i,listeners:r}),i.target=Ma)))}function Fi(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var La={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Mc={},Bh={};qn&&(Bh=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function Wi(e){if(Mc[e])return Mc[e];if(!La[e])return e;var i=La[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Bh)return Mc[e]=i[s];return e}var Ih=Wi("animationend"),Zh=Wi("animationiteration"),qh=Wi("animationstart"),Vx=Wi("transitionrun"),Px=Wi("transitionstart"),Qx=Wi("transitioncancel"),Hh=Wi("transitionend"),Gh=new Map,Lc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Lc.push("scrollEnd");function Nn(e,i){Gh.set(e,i),Xi(i,[e])}var ir=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},un=[],Ua=0,Uc=0;function ar(){for(var e=Ua,i=Uc=Ua=0;i<e;){var s=un[i];un[i++]=null;var r=un[i];un[i++]=null;var f=un[i];un[i++]=null;var h=un[i];if(un[i++]=null,r!==null&&f!==null){var y=r.pending;y===null?f.next=f:(f.next=y.next,y.next=f),r.pending=f}h!==0&&Kh(s,f,h)}}function sr(e,i,s,r){un[Ua++]=e,un[Ua++]=i,un[Ua++]=s,un[Ua++]=r,Uc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $c(e,i,s,r){return sr(e,i,s,r),lr(e)}function ea(e,i){return sr(e,null,null,i),lr(e)}function Kh(e,i,s){e.lanes|=s;var r=e.alternate;r!==null&&(r.lanes|=s);for(var f=!1,h=e.return;h!==null;)h.childLanes|=s,r=h.alternate,r!==null&&(r.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&i!==null&&(f=31-Se(s),e=h.hiddenUpdates,r=e[f],r===null?e[f]=[i]:r.push(i),i.lane=s|536870912),h):null}function lr(e){if(50<ml)throw ml=0,Vu=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var $a={};function Xx(e,i,s,r){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,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 Ft(e,i,s,r){return new Xx(e,i,s,r)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hn(e,i){var s=e.alternate;return s===null?(s=Ft(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Yh(e,i){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function rr(e,i,s,r,f,h){var y=0;if(r=e,typeof e=="function")Bc(e)&&(y=1);else if(typeof e=="string")y=tw(e,s,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Q:return e=Ft(31,s,i,f),e.elementType=Q,e.lanes=h,e;case j:return ta(s.children,f,h,i);case k:y=8,f|=24;break;case A:return e=Ft(12,s,i,f|2),e.elementType=A,e.lanes=h,e;case L:return e=Ft(13,s,i,f),e.elementType=L,e.lanes=h,e;case H:return e=Ft(19,s,i,f),e.elementType=H,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case O:y=10;break e;case T:y=9;break e;case D:y=11;break e;case V:y=14;break e;case R:y=16,r=null;break e}y=29,s=Error(l(130,e===null?"null":typeof e,"")),r=null}return i=Ft(y,s,i,f),i.elementType=e,i.type=r,i.lanes=h,i}function ta(e,i,s,r){return e=Ft(7,e,r,i),e.lanes=s,e}function Ic(e,i,s){return e=Ft(6,e,null,i),e.lanes=s,e}function Vh(e){var i=Ft(18,null,null,0);return i.stateNode=e,i}function Zc(e,i,s){return i=Ft(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Ph=new WeakMap;function dn(e,i){if(typeof e=="object"&&e!==null){var s=Ph.get(e);return s!==void 0?s:(i={value:e,source:i,stack:oi(i)},Ph.set(e,i),i)}return{value:e,source:i,stack:oi(i)}}var Ba=[],Ia=0,or=null,Vs=0,fn=[],hn=0,di=null,Dn=1,Rn="";function Gn(e,i){Ba[Ia++]=Vs,Ba[Ia++]=or,or=e,Vs=i}function Qh(e,i,s){fn[hn++]=Dn,fn[hn++]=Rn,fn[hn++]=di,di=e;var r=Dn;e=Rn;var f=32-Se(r)-1;r&=~(1<<f),s+=1;var h=32-Se(i)+f;if(30<h){var y=f-f%5;h=(r&(1<<y)-1).toString(32),r>>=y,f-=y,Dn=1<<32-Se(i)+f|s<<f|r,Rn=h+e}else Dn=1<<h|s<<f|r,Rn=e}function qc(e){e.return!==null&&(Gn(e,1),Qh(e,1,0))}function Hc(e){for(;e===or;)or=Ba[--Ia],Ba[Ia]=null,Vs=Ba[--Ia],Ba[Ia]=null;for(;e===di;)di=fn[--hn],fn[hn]=null,Rn=fn[--hn],fn[hn]=null,Dn=fn[--hn],fn[hn]=null}function Xh(e,i){fn[hn++]=Dn,fn[hn++]=Rn,fn[hn++]=di,Dn=i.id,Rn=i.overflow,di=e}var Ot=null,Fe=null,Re=!1,fi=null,mn=!1,Gc=Error(l(519));function hi(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ps(dn(i,e)),Gc}function Jh(e){var i=e.stateNode,s=e.type,r=e.memoizedProps;switch(i[At]=e,i[Ht]=r,s){case"dialog":Ae("cancel",i),Ae("close",i);break;case"iframe":case"object":case"embed":Ae("load",i);break;case"video":case"audio":for(s=0;s<gl.length;s++)Ae(gl[s],i);break;case"source":Ae("error",i);break;case"img":case"image":case"link":Ae("error",i),Ae("load",i);break;case"details":Ae("toggle",i);break;case"input":Ae("invalid",i),uh(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ae("invalid",i);break;case"textarea":Ae("invalid",i),fh(i,r.value,r.defaultValue,r.children)}s=r.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||r.suppressHydrationWarning===!0||mg(i.textContent,s)?(r.popover!=null&&(Ae("beforetoggle",i),Ae("toggle",i)),r.onScroll!=null&&Ae("scroll",i),r.onScrollEnd!=null&&Ae("scrollend",i),r.onClick!=null&&(i.onclick=Zn),i=!0):i=!1,i||hi(e,!0)}function Fh(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:mn=!1;return;case 27:case 3:mn=!0;return;default:Ot=Ot.return}}function Za(e){if(e!==Ot)return!1;if(!Re)return Fh(e),Re=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||od(e.type,e.memoizedProps)),s=!s),s&&Fe&&hi(e),Fh(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Fe=jg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Fe=jg(e)}else i===27?(i=Fe,zi(e.type)?(e=hd,hd=null,Fe=e):Fe=i):Fe=Ot?gn(e.stateNode.nextSibling):null;return!0}function na(){Fe=Ot=null,Re=!1}function Kc(){var e=fi;return e!==null&&(Pt===null?Pt=e:Pt.push.apply(Pt,e),fi=null),e}function Ps(e){fi===null?fi=[e]:fi.push(e)}var Yc=z(null),ia=null,Kn=null;function mi(e,i,s){te(Yc,i._currentValue),i._currentValue=s}function Yn(e){e._currentValue=Yc.current,q(Yc)}function Vc(e,i,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,r!==null&&(r.childLanes|=i)):r!==null&&(r.childLanes&i)!==i&&(r.childLanes|=i),e===s)break;e=e.return}}function Pc(e,i,s,r){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var _=0;_<i.length;_++)if(S.context===i[_]){h.lanes|=s,S=h.alternate,S!==null&&(S.lanes|=s),Vc(h.return,s,e),r||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(l(341));y.lanes|=s,h=y.alternate,h!==null&&(h.lanes|=s),Vc(y,s,e),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===e){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function qa(e,i,s,r){e=null;for(var f=i,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var y=f.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var S=f.type;Jt(f.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(f===we.current){if(y=f.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Sl):e=[Sl])}f=f.return}e!==null&&Pc(i,e,s,r),i.flags|=262144}function cr(e){for(e=e.firstContext;e!==null;){if(!Jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function aa(e){ia=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return Wh(ia,e)}function ur(e,i){return ia===null&&aa(e),Wh(e,i)}function Wh(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Kn===null){if(e===null)throw Error(l(308));Kn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Kn=Kn.next=i;return s}var Jx=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,r){e.push(r)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},Fx=t.unstable_scheduleCallback,Wx=t.unstable_NormalPriority,vt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qc(){return{controller:new Jx,data:new Map,refCount:0}}function Qs(e){e.refCount--,e.refCount===0&&Fx(Wx,function(){e.controller.abort()})}var Xs=null,Xc=0,Ha=0,Ga=null;function eS(e,i){if(Xs===null){var s=Xs=[];Xc=0,Ha=Wu(),Ga={status:"pending",value:void 0,then:function(r){s.push(r)}}}return Xc++,i.then(em,em),i}function em(){if(--Xc===0&&Xs!==null){Ga!==null&&(Ga.status="fulfilled");var e=Xs;Xs=null,Ha=0,Ga=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function tS(e,i){var s=[],r={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return e.then(function(){r.status="fulfilled",r.value=i;for(var f=0;f<s.length;f++)(0,s[f])(i)},function(f){for(r.status="rejected",r.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),r}var tm=I.S;I.S=function(e,i){$p=zt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&eS(e,i),tm!==null&&tm(e,i)};var sa=z(null);function Jc(){var e=sa.current;return e!==null?e:Xe.pooledCache}function dr(e,i){i===null?te(sa,sa.current):te(sa,i.pool)}function nm(){var e=Jc();return e===null?null:{parent:vt._currentValue,pool:e}}var Ka=Error(l(460)),Fc=Error(l(474)),fr=Error(l(542)),hr={then:function(){}};function im(e){return e=e.status,e==="fulfilled"||e==="rejected"}function am(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(Zn,Zn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,lm(e),e;default:if(typeof i.status=="string")i.then(Zn,Zn);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(r){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=r}},function(r){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=r}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,lm(e),e}throw ra=i,Ka}}function la(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(ra=s,Ka):s}}var ra=null;function sm(){if(ra===null)throw Error(l(459));var e=ra;return ra=null,e}function lm(e){if(e===Ka||e===fr)throw Error(l(483))}var Ya=null,Js=0;function mr(e){var i=Js;return Js+=1,Ya===null&&(Ya=[]),am(Ya,e,i)}function Fs(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function pr(e,i){throw i.$$typeof===x?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function rm(e){function i(M,E){if(e){var U=M.deletions;U===null?(M.deletions=[E],M.flags|=16):U.push(E)}}function s(M,E){if(!e)return null;for(;E!==null;)i(M,E),E=E.sibling;return null}function r(M){for(var E=new Map;M!==null;)M.key!==null?E.set(M.key,M):E.set(M.index,M),M=M.sibling;return E}function f(M,E){return M=Hn(M,E),M.index=0,M.sibling=null,M}function h(M,E,U){return M.index=U,e?(U=M.alternate,U!==null?(U=U.index,U<E?(M.flags|=67108866,E):U):(M.flags|=67108866,E)):(M.flags|=1048576,E)}function y(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function S(M,E,U,J){return E===null||E.tag!==6?(E=Ic(U,M.mode,J),E.return=M,E):(E=f(E,U),E.return=M,E)}function _(M,E,U,J){var ve=U.type;return ve===j?P(M,E,U.props.children,J,U.key):E!==null&&(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&la(ve)===E.type)?(E=f(E,U.props),Fs(E,U),E.return=M,E):(E=rr(U.type,U.key,U.props,null,M.mode,J),Fs(E,U),E.return=M,E)}function $(M,E,U,J){return E===null||E.tag!==4||E.stateNode.containerInfo!==U.containerInfo||E.stateNode.implementation!==U.implementation?(E=Zc(U,M.mode,J),E.return=M,E):(E=f(E,U.children||[]),E.return=M,E)}function P(M,E,U,J,ve){return E===null||E.tag!==7?(E=ta(U,M.mode,J,ve),E.return=M,E):(E=f(E,U),E.return=M,E)}function W(M,E,U){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Ic(""+E,M.mode,U),E.return=M,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case N:return U=rr(E.type,E.key,E.props,null,M.mode,U),Fs(U,E),U.return=M,U;case C:return E=Zc(E,M.mode,U),E.return=M,E;case R:return E=la(E),W(M,E,U)}if(Me(E)||ce(E))return E=ta(E,M.mode,U,null),E.return=M,E;if(typeof E.then=="function")return W(M,mr(E),U);if(E.$$typeof===O)return W(M,ur(M,E),U);pr(M,E)}return null}function B(M,E,U,J){var ve=E!==null?E.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return ve!==null?null:S(M,E,""+U,J);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case N:return U.key===ve?_(M,E,U,J):null;case C:return U.key===ve?$(M,E,U,J):null;case R:return U=la(U),B(M,E,U,J)}if(Me(U)||ce(U))return ve!==null?null:P(M,E,U,J,null);if(typeof U.then=="function")return B(M,E,mr(U),J);if(U.$$typeof===O)return B(M,E,ur(M,U),J);pr(M,U)}return null}function G(M,E,U,J,ve){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return M=M.get(U)||null,S(E,M,""+J,ve);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case N:return M=M.get(J.key===null?U:J.key)||null,_(E,M,J,ve);case C:return M=M.get(J.key===null?U:J.key)||null,$(E,M,J,ve);case R:return J=la(J),G(M,E,U,J,ve)}if(Me(J)||ce(J))return M=M.get(U)||null,P(E,M,J,ve,null);if(typeof J.then=="function")return G(M,E,U,mr(J),ve);if(J.$$typeof===O)return G(M,E,U,ur(E,J),ve);pr(E,J)}return null}function he(M,E,U,J){for(var ve=null,Ue=null,ge=E,_e=E=0,De=null;ge!==null&&_e<U.length;_e++){ge.index>_e?(De=ge,ge=null):De=ge.sibling;var $e=B(M,ge,U[_e],J);if($e===null){ge===null&&(ge=De);break}e&&ge&&$e.alternate===null&&i(M,ge),E=h($e,E,_e),Ue===null?ve=$e:Ue.sibling=$e,Ue=$e,ge=De}if(_e===U.length)return s(M,ge),Re&&Gn(M,_e),ve;if(ge===null){for(;_e<U.length;_e++)ge=W(M,U[_e],J),ge!==null&&(E=h(ge,E,_e),Ue===null?ve=ge:Ue.sibling=ge,Ue=ge);return Re&&Gn(M,_e),ve}for(ge=r(ge);_e<U.length;_e++)De=G(ge,M,_e,U[_e],J),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?_e:De.key),E=h(De,E,_e),Ue===null?ve=De:Ue.sibling=De,Ue=De);return e&&ge.forEach(function(Ti){return i(M,Ti)}),Re&&Gn(M,_e),ve}function xe(M,E,U,J){if(U==null)throw Error(l(151));for(var ve=null,Ue=null,ge=E,_e=E=0,De=null,$e=U.next();ge!==null&&!$e.done;_e++,$e=U.next()){ge.index>_e?(De=ge,ge=null):De=ge.sibling;var Ti=B(M,ge,$e.value,J);if(Ti===null){ge===null&&(ge=De);break}e&&ge&&Ti.alternate===null&&i(M,ge),E=h(Ti,E,_e),Ue===null?ve=Ti:Ue.sibling=Ti,Ue=Ti,ge=De}if($e.done)return s(M,ge),Re&&Gn(M,_e),ve;if(ge===null){for(;!$e.done;_e++,$e=U.next())$e=W(M,$e.value,J),$e!==null&&(E=h($e,E,_e),Ue===null?ve=$e:Ue.sibling=$e,Ue=$e);return Re&&Gn(M,_e),ve}for(ge=r(ge);!$e.done;_e++,$e=U.next())$e=G(ge,M,_e,$e.value,J),$e!==null&&(e&&$e.alternate!==null&&ge.delete($e.key===null?_e:$e.key),E=h($e,E,_e),Ue===null?ve=$e:Ue.sibling=$e,Ue=$e);return e&&ge.forEach(function(fw){return i(M,fw)}),Re&&Gn(M,_e),ve}function Pe(M,E,U,J){if(typeof U=="object"&&U!==null&&U.type===j&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case N:e:{for(var ve=U.key;E!==null;){if(E.key===ve){if(ve=U.type,ve===j){if(E.tag===7){s(M,E.sibling),J=f(E,U.props.children),J.return=M,M=J;break e}}else if(E.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&la(ve)===E.type){s(M,E.sibling),J=f(E,U.props),Fs(J,U),J.return=M,M=J;break e}s(M,E);break}else i(M,E);E=E.sibling}U.type===j?(J=ta(U.props.children,M.mode,J,U.key),J.return=M,M=J):(J=rr(U.type,U.key,U.props,null,M.mode,J),Fs(J,U),J.return=M,M=J)}return y(M);case C:e:{for(ve=U.key;E!==null;){if(E.key===ve)if(E.tag===4&&E.stateNode.containerInfo===U.containerInfo&&E.stateNode.implementation===U.implementation){s(M,E.sibling),J=f(E,U.children||[]),J.return=M,M=J;break e}else{s(M,E);break}else i(M,E);E=E.sibling}J=Zc(U,M.mode,J),J.return=M,M=J}return y(M);case R:return U=la(U),Pe(M,E,U,J)}if(Me(U))return he(M,E,U,J);if(ce(U)){if(ve=ce(U),typeof ve!="function")throw Error(l(150));return U=ve.call(U),xe(M,E,U,J)}if(typeof U.then=="function")return Pe(M,E,mr(U),J);if(U.$$typeof===O)return Pe(M,E,ur(M,U),J);pr(M,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,E!==null&&E.tag===6?(s(M,E.sibling),J=f(E,U),J.return=M,M=J):(s(M,E),J=Ic(U,M.mode,J),J.return=M,M=J),y(M)):s(M,E)}return function(M,E,U,J){try{Js=0;var ve=Pe(M,E,U,J);return Ya=null,ve}catch(ge){if(ge===Ka||ge===fr)throw ge;var Ue=Ft(29,ge,null,M.mode);return Ue.lanes=J,Ue.return=M,Ue}}}var oa=rm(!0),om=rm(!1),pi=!1;function Wc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eu(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function gi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yi(e,i,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Be&2)!==0){var f=r.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),r.pending=i,i=lr(e),Kh(e,null,s),i}return sr(e,r,i,s),lr(e)}function Ws(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Wf(e,s)}}function tu(e,i){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var f=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,s=s.next}while(s!==null);h===null?f=h=i:h=h.next=i}else f=h=i;s={baseState:r.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var nu=!1;function el(){if(nu){var e=Ga;if(e!==null)throw e}}function tl(e,i,s,r){nu=!1;var f=e.updateQueue;pi=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var _=S,$=_.next;_.next=null,y===null?h=$:y.next=$,y=_;var P=e.alternate;P!==null&&(P=P.updateQueue,S=P.lastBaseUpdate,S!==y&&(S===null?P.firstBaseUpdate=$:S.next=$,P.lastBaseUpdate=_))}if(h!==null){var W=f.baseState;y=0,P=$=_=null,S=h;do{var B=S.lane&-536870913,G=B!==S.lane;if(G?(Te&B)===B:(r&B)===B){B!==0&&B===Ha&&(nu=!0),P!==null&&(P=P.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var he=e,xe=S;B=i;var Pe=s;switch(xe.tag){case 1:if(he=xe.payload,typeof he=="function"){W=he.call(Pe,W,B);break e}W=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=xe.payload,B=typeof he=="function"?he.call(Pe,W,B):he,B==null)break e;W=v({},W,B);break e;case 2:pi=!0}}B=S.callback,B!==null&&(e.flags|=64,G&&(e.flags|=8192),G=f.callbacks,G===null?f.callbacks=[B]:G.push(B))}else G={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},P===null?($=P=G,_=W):P=P.next=G,y|=B;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;G=S,S=G.next,G.next=null,f.lastBaseUpdate=G,f.shared.pending=null}}while(!0);P===null&&(_=W),f.baseState=_,f.firstBaseUpdate=$,f.lastBaseUpdate=P,h===null&&(f.shared.lanes=0),wi|=y,e.lanes=y,e.memoizedState=W}}function cm(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function um(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)cm(s[e],i)}var Va=z(null),gr=z(0);function dm(e,i){e=ti,te(gr,e),te(Va,i),ti=e|i.baseLanes}function iu(){te(gr,ti),te(Va,Va.current)}function au(){ti=gr.current,q(Va),q(gr)}var Wt=z(null),pn=null;function vi(e){var i=e.alternate;te(dt,dt.current&1),te(Wt,e),pn===null&&(i===null||Va.current!==null||i.memoizedState!==null)&&(pn=e)}function su(e){te(dt,dt.current),te(Wt,e),pn===null&&(pn=e)}function fm(e){e.tag===22?(te(dt,dt.current),te(Wt,e),pn===null&&(pn=e)):bi()}function bi(){te(dt,dt.current),te(Wt,Wt.current)}function en(e){q(Wt),pn===e&&(pn=null),q(dt)}var dt=z(0);function yr(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||dd(s)||fd(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Vn=0,ke=null,Ye=null,bt=null,vr=!1,Pa=!1,ca=!1,br=0,nl=0,Qa=null,nS=0;function lt(){throw Error(l(321))}function lu(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!Jt(e[s],i[s]))return!1;return!0}function ru(e,i,s,r,f,h){return Vn=h,ke=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,I.H=e===null||e.memoizedState===null?Qm:wu,ca=!1,h=s(r,f),ca=!1,Pa&&(h=mm(i,s,r,f)),hm(e),h}function hm(e){I.H=sl;var i=Ye!==null&&Ye.next!==null;if(Vn=0,bt=Ye=ke=null,vr=!1,nl=0,Qa=null,i)throw Error(l(300));e===null||xt||(e=e.dependencies,e!==null&&cr(e)&&(xt=!0))}function mm(e,i,s,r){ke=e;var f=0;do{if(Pa&&(Qa=null),nl=0,Pa=!1,25<=f)throw Error(l(301));if(f+=1,bt=Ye=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}I.H=Xm,h=i(s,r)}while(Pa);return h}function iS(){var e=I.H,i=e.useState()[0];return i=typeof i.then=="function"?il(i):i,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(ke.flags|=1024),i}function ou(){var e=br!==0;return br=0,e}function cu(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function uu(e){if(vr){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}vr=!1}Vn=0,bt=Ye=ke=null,Pa=!1,nl=br=0,Qa=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?ke.memoizedState=bt=e:bt=bt.next=e,bt}function ft(){if(Ye===null){var e=ke.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var i=bt===null?ke.memoizedState:bt.next;if(i!==null)bt=i,Ye=e;else{if(e===null)throw ke.alternate===null?Error(l(467)):Error(l(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},bt===null?ke.memoizedState=bt=e:bt=bt.next=e}return bt}function xr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function il(e){var i=nl;return nl+=1,Qa===null&&(Qa=[]),e=am(Qa,e,i),i=ke,(bt===null?i.memoizedState:bt.next)===null&&(i=i.alternate,I.H=i===null||i.memoizedState===null?Qm:wu),e}function Sr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return il(e);if(e.$$typeof===O)return Tt(e)}throw Error(l(438,String(e)))}function du(e){var i=null,s=ke.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var r=ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(i={data:r.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=xr(),ke.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),r=0;r<e;r++)s[r]=be;return i.index++,s}function Pn(e,i){return typeof i=="function"?i(e):i}function wr(e){var i=ft();return fu(i,Ye,e)}function fu(e,i,s){var r=e.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=s;var f=e.baseQueue,h=r.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,r.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{i=f.next;var S=y=null,_=null,$=i,P=!1;do{var W=$.lane&-536870913;if(W!==$.lane?(Te&W)===W:(Vn&W)===W){var B=$.revertLane;if(B===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null}),W===Ha&&(P=!0);else if((Vn&B)===B){$=$.next,B===Ha&&(P=!0);continue}else W={lane:0,revertLane:$.revertLane,gesture:null,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},_===null?(S=_=W,y=h):_=_.next=W,ke.lanes|=B,wi|=B;W=$.action,ca&&s(h,W),h=$.hasEagerState?$.eagerState:s(h,W)}else B={lane:W,revertLane:$.revertLane,gesture:$.gesture,action:$.action,hasEagerState:$.hasEagerState,eagerState:$.eagerState,next:null},_===null?(S=_=B,y=h):_=_.next=B,ke.lanes|=W,wi|=W;$=$.next}while($!==null&&$!==i);if(_===null?y=h:_.next=S,!Jt(h,e.memoizedState)&&(xt=!0,P&&(s=Ga,s!==null)))throw s;e.memoizedState=h,e.baseState=y,e.baseQueue=_,r.lastRenderedState=h}return f===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function hu(e){var i=ft(),s=i.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var r=s.dispatch,f=s.pending,h=i.memoizedState;if(f!==null){s.pending=null;var y=f=f.next;do h=e(h,y.action),y=y.next;while(y!==f);Jt(h,i.memoizedState)||(xt=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),s.lastRenderedState=h}return[h,r]}function pm(e,i,s){var r=ke,f=ft(),h=Re;if(h){if(s===void 0)throw Error(l(407));s=s()}else s=i();var y=!Jt((Ye||f).memoizedState,s);if(y&&(f.memoizedState=s,xt=!0),f=f.queue,gu(vm.bind(null,r,f,e),[e]),f.getSnapshot!==i||y||bt!==null&&bt.memoizedState.tag&1){if(r.flags|=2048,Xa(9,{destroy:void 0},ym.bind(null,r,f,s,i),null),Xe===null)throw Error(l(349));h||(Vn&127)!==0||gm(r,i,s)}return s}function gm(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=ke.updateQueue,i===null?(i=xr(),ke.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function ym(e,i,s,r){i.value=s,i.getSnapshot=r,bm(i)&&xm(e)}function vm(e,i,s){return s(function(){bm(i)&&xm(e)})}function bm(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!Jt(e,s)}catch{return!0}}function xm(e){var i=ea(e,2);i!==null&&Qt(i,e,2)}function mu(e){var i=$t();if(typeof e=="function"){var s=e;if(e=s(),ca){Y(!0);try{s()}finally{Y(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:e},i}function Sm(e,i,s,r){return e.baseState=s,fu(e,Ye,typeof r=="function"?r:Pn)}function aS(e,i,s,r,f){if(kr(e))throw Error(l(485));if(e=i.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};I.T!==null?s(!0):h.isTransition=!1,r(h),s=i.pending,s===null?(h.next=i.pending=h,wm(i,h)):(h.next=s.next,i.pending=s.next=h)}}function wm(e,i){var s=i.action,r=i.payload,f=e.state;if(i.isTransition){var h=I.T,y={};I.T=y;try{var S=s(f,r),_=I.S;_!==null&&_(y,S),jm(e,i,S)}catch($){pu(e,i,$)}finally{h!==null&&y.types!==null&&(h.types=y.types),I.T=h}}else try{h=s(f,r),jm(e,i,h)}catch($){pu(e,i,$)}}function jm(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){Nm(e,i,r)},function(r){return pu(e,i,r)}):Nm(e,i,s)}function Nm(e,i,s){i.status="fulfilled",i.value=s,km(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,wm(e,s)))}function pu(e,i,s){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=s,km(i),i=i.next;while(i!==r)}e.action=null}function km(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function _m(e,i){return i}function zm(e,i){if(Re){var s=Xe.formState;if(s!==null){e:{var r=ke;if(Re){if(Fe){t:{for(var f=Fe,h=mn;f.nodeType!==8;){if(!h){f=null;break t}if(f=gn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){Fe=gn(f.nextSibling),r=f.data==="F!";break e}}hi(r)}r=!1}r&&(i=s[0])}}return s=$t(),s.memoizedState=s.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_m,lastRenderedState:i},s.queue=r,s=Ym.bind(null,ke,r),r.dispatch=s,r=mu(!1),h=Su.bind(null,ke,!1,r.queue),r=$t(),f={state:i,dispatch:null,action:e,pending:null},r.queue=f,s=aS.bind(null,ke,f,h,s),f.dispatch=s,r.memoizedState=e,[i,s,!1]}function Cm(e){var i=ft();return Em(i,Ye,e)}function Em(e,i,s){if(i=fu(e,i,_m)[0],e=wr(Pn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=il(i)}catch(y){throw y===Ka?fr:y}else r=i;i=ft();var f=i.queue,h=f.dispatch;return s!==i.memoizedState&&(ke.flags|=2048,Xa(9,{destroy:void 0},sS.bind(null,f,s),null)),[r,h,e]}function sS(e,i){e.action=i}function Am(e){var i=ft(),s=Ye;if(s!==null)return Em(i,s,e);ft(),i=i.memoizedState,s=ft();var r=s.queue.dispatch;return s.memoizedState=e,[i,r,!1]}function Xa(e,i,s,r){return e={tag:e,create:s,deps:r,inst:i,next:null},i=ke.updateQueue,i===null&&(i=xr(),ke.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,i.lastEffect=e),e}function Om(){return ft().memoizedState}function jr(e,i,s,r){var f=$t();ke.flags|=e,f.memoizedState=Xa(1|i,{destroy:void 0},s,r===void 0?null:r)}function Nr(e,i,s,r){var f=ft();r=r===void 0?null:r;var h=f.memoizedState.inst;Ye!==null&&r!==null&&lu(r,Ye.memoizedState.deps)?f.memoizedState=Xa(i,h,s,r):(ke.flags|=e,f.memoizedState=Xa(1|i,h,s,r))}function Tm(e,i){jr(8390656,8,e,i)}function gu(e,i){Nr(2048,8,e,i)}function lS(e){ke.flags|=4;var i=ke.updateQueue;if(i===null)i=xr(),ke.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function Dm(e){var i=ft().memoizedState;return lS({ref:i,nextImpl:e}),function(){if((Be&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function Rm(e,i){return Nr(4,2,e,i)}function Mm(e,i){return Nr(4,4,e,i)}function Lm(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Um(e,i,s){s=s!=null?s.concat([e]):null,Nr(4,4,Lm.bind(null,i,e),s)}function yu(){}function $m(e,i){var s=ft();i=i===void 0?null:i;var r=s.memoizedState;return i!==null&&lu(i,r[1])?r[0]:(s.memoizedState=[e,i],e)}function Bm(e,i){var s=ft();i=i===void 0?null:i;var r=s.memoizedState;if(i!==null&&lu(i,r[1]))return r[0];if(r=e(),ca){Y(!0);try{e()}finally{Y(!1)}}return s.memoizedState=[r,i],r}function vu(e,i,s){return s===void 0||(Vn&1073741824)!==0&&(Te&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Ip(),ke.lanes|=e,wi|=e,s)}function Im(e,i,s,r){return Jt(s,i)?s:Va.current!==null?(e=vu(e,s,r),Jt(e,i)||(xt=!0),e):(Vn&42)===0||(Vn&1073741824)!==0&&(Te&261930)===0?(xt=!0,e.memoizedState=s):(e=Ip(),ke.lanes|=e,wi|=e,i)}function Zm(e,i,s,r,f){var h=K.p;K.p=h!==0&&8>h?h:8;var y=I.T,S={};I.T=S,Su(e,!1,i,s);try{var _=f(),$=I.S;if($!==null&&$(S,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var P=tS(_,r);al(e,i,P,an(e))}else al(e,i,r,an(e))}catch(W){al(e,i,{then:function(){},status:"rejected",reason:W},an())}finally{K.p=h,y!==null&&S.types!==null&&(y.types=S.types),I.T=y}}function rS(){}function bu(e,i,s,r){if(e.tag!==5)throw Error(l(476));var f=qm(e).queue;Zm(e,f,i,ae,s===null?rS:function(){return Hm(e),s(r)})}function qm(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:ae},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pn,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Hm(e){var i=qm(e);i.next===null&&(i=e.alternate.memoizedState),al(e,i.next.queue,{},an())}function xu(){return Tt(Sl)}function Gm(){return ft().memoizedState}function Km(){return ft().memoizedState}function oS(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=an();e=gi(s);var r=yi(i,e,s);r!==null&&(Qt(r,i,s),Ws(r,i,s)),i={cache:Qc()},e.payload=i;return}i=i.return}}function cS(e,i,s){var r=an();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kr(e)?Vm(i,s):(s=$c(e,i,s,r),s!==null&&(Qt(s,e,r),Pm(s,i,r)))}function Ym(e,i,s){var r=an();al(e,i,s,r)}function al(e,i,s,r){var f={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(kr(e))Vm(i,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,s);if(f.hasEagerState=!0,f.eagerState=S,Jt(S,y))return sr(e,i,f,0),Xe===null&&ar(),!1}catch{}if(s=$c(e,i,f,r),s!==null)return Qt(s,e,r),Pm(s,i,r),!0}return!1}function Su(e,i,s,r){if(r={lane:2,revertLane:Wu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},kr(e)){if(i)throw Error(l(479))}else i=$c(e,s,r,2),i!==null&&Qt(i,e,2)}function kr(e){var i=e.alternate;return e===ke||i!==null&&i===ke}function Vm(e,i){Pa=vr=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Pm(e,i,s){if((s&4194048)!==0){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Wf(e,s)}}var sl={readContext:Tt,use:Sr,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};sl.useEffectEvent=lt;var Qm={readContext:Tt,use:Sr,useCallback:function(e,i){return $t().memoizedState=[e,i===void 0?null:i],e},useContext:Tt,useEffect:Tm,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,jr(4194308,4,Lm.bind(null,i,e),s)},useLayoutEffect:function(e,i){return jr(4194308,4,e,i)},useInsertionEffect:function(e,i){jr(4,2,e,i)},useMemo:function(e,i){var s=$t();i=i===void 0?null:i;var r=e();if(ca){Y(!0);try{e()}finally{Y(!1)}}return s.memoizedState=[r,i],r},useReducer:function(e,i,s){var r=$t();if(s!==void 0){var f=s(i);if(ca){Y(!0);try{s(i)}finally{Y(!1)}}}else f=i;return r.memoizedState=r.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},r.queue=e,e=e.dispatch=cS.bind(null,ke,e),[r.memoizedState,e]},useRef:function(e){var i=$t();return e={current:e},i.memoizedState=e},useState:function(e){e=mu(e);var i=e.queue,s=Ym.bind(null,ke,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:yu,useDeferredValue:function(e,i){var s=$t();return vu(s,e,i)},useTransition:function(){var e=mu(!1);return e=Zm.bind(null,ke,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var r=ke,f=$t();if(Re){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),Xe===null)throw Error(l(349));(Te&127)!==0||gm(r,i,s)}f.memoizedState=s;var h={value:s,getSnapshot:i};return f.queue=h,Tm(vm.bind(null,r,h,e),[e]),r.flags|=2048,Xa(9,{destroy:void 0},ym.bind(null,r,h,s,i),null),s},useId:function(){var e=$t(),i=Xe.identifierPrefix;if(Re){var s=Rn,r=Dn;s=(r&~(1<<32-Se(r)-1)).toString(32)+s,i="_"+i+"R_"+s,s=br++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=nS++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:xu,useFormState:zm,useActionState:zm,useOptimistic:function(e){var i=$t();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=Su.bind(null,ke,!0,s),s.dispatch=i,[e,i]},useMemoCache:du,useCacheRefresh:function(){return $t().memoizedState=oS.bind(null,ke)},useEffectEvent:function(e){var i=$t(),s={impl:e};return i.memoizedState=s,function(){if((Be&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},wu={readContext:Tt,use:Sr,useCallback:$m,useContext:Tt,useEffect:gu,useImperativeHandle:Um,useInsertionEffect:Rm,useLayoutEffect:Mm,useMemo:Bm,useReducer:wr,useRef:Om,useState:function(){return wr(Pn)},useDebugValue:yu,useDeferredValue:function(e,i){var s=ft();return Im(s,Ye.memoizedState,e,i)},useTransition:function(){var e=wr(Pn)[0],i=ft().memoizedState;return[typeof e=="boolean"?e:il(e),i]},useSyncExternalStore:pm,useId:Gm,useHostTransitionStatus:xu,useFormState:Cm,useActionState:Cm,useOptimistic:function(e,i){var s=ft();return Sm(s,Ye,e,i)},useMemoCache:du,useCacheRefresh:Km};wu.useEffectEvent=Dm;var Xm={readContext:Tt,use:Sr,useCallback:$m,useContext:Tt,useEffect:gu,useImperativeHandle:Um,useInsertionEffect:Rm,useLayoutEffect:Mm,useMemo:Bm,useReducer:hu,useRef:Om,useState:function(){return hu(Pn)},useDebugValue:yu,useDeferredValue:function(e,i){var s=ft();return Ye===null?vu(s,e,i):Im(s,Ye.memoizedState,e,i)},useTransition:function(){var e=hu(Pn)[0],i=ft().memoizedState;return[typeof e=="boolean"?e:il(e),i]},useSyncExternalStore:pm,useId:Gm,useHostTransitionStatus:xu,useFormState:Am,useActionState:Am,useOptimistic:function(e,i){var s=ft();return Ye!==null?Sm(s,Ye,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:du,useCacheRefresh:Km};Xm.useEffectEvent=Dm;function ju(e,i,s,r){i=e.memoizedState,s=s(r,i),s=s==null?i:v({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var Nu={enqueueSetState:function(e,i,s){e=e._reactInternals;var r=an(),f=gi(r);f.payload=i,s!=null&&(f.callback=s),i=yi(e,f,r),i!==null&&(Qt(i,e,r),Ws(i,e,r))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var r=an(),f=gi(r);f.tag=1,f.payload=i,s!=null&&(f.callback=s),i=yi(e,f,r),i!==null&&(Qt(i,e,r),Ws(i,e,r))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=an(),r=gi(s);r.tag=2,i!=null&&(r.callback=i),i=yi(e,r,s),i!==null&&(Qt(i,e,s),Ws(i,e,s))}};function Jm(e,i,s,r,f,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,h,y):i.prototype&&i.prototype.isPureReactComponent?!Ks(s,r)||!Ks(f,h):!0}function Fm(e,i,s,r){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,r),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,r),i.state!==e&&Nu.enqueueReplaceState(i,i.state,null)}function ua(e,i){var s=i;if("ref"in i){s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}if(e=e.defaultProps){s===i&&(s=v({},s));for(var f in e)s[f]===void 0&&(s[f]=e[f])}return s}function Wm(e){ir(e)}function ep(e){console.error(e)}function tp(e){ir(e)}function _r(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function np(e,i,s){try{var r=e.onCaughtError;r(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function ku(e,i,s){return s=gi(s),s.tag=3,s.payload={element:null},s.callback=function(){_r(e,i)},s}function ip(e){return e=gi(e),e.tag=3,e}function ap(e,i,s,r){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=r.value;e.payload=function(){return f(h)},e.callback=function(){np(i,s,r)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){np(i,s,r),typeof f!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function uS(e,i,s,r,f){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=s.alternate,i!==null&&qa(i,s,f,!0),s=Wt.current,s!==null){switch(s.tag){case 31:case 13:return pn===null?$r():s.alternate===null&&rt===0&&(rt=3),s.flags&=-257,s.flags|=65536,s.lanes=f,r===hr?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([r]):i.add(r),Xu(e,r,f)),!1;case 22:return s.flags|=65536,r===hr?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([r])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([r]):s.add(r)),Xu(e,r,f)),!1}throw Error(l(435,s.tag))}return Xu(e,r,f),$r(),!1}if(Re)return i=Wt.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,r!==Gc&&(e=Error(l(422),{cause:r}),Ps(dn(e,s)))):(r!==Gc&&(i=Error(l(423),{cause:r}),Ps(dn(i,s))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,r=dn(r,s),f=ku(e.stateNode,r,f),tu(e,f),rt!==4&&(rt=2)),!1;var h=Error(l(520),{cause:r});if(h=dn(h,s),hl===null?hl=[h]:hl.push(h),rt!==4&&(rt=2),i===null)return!0;r=dn(r,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=f&-f,s.lanes|=e,e=ku(s.stateNode,r,e),tu(s,e),!1;case 1:if(i=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ji===null||!ji.has(h))))return s.flags|=65536,f&=-f,s.lanes|=f,f=ip(f),ap(f,e,s,r),tu(s,f),!1}s=s.return}while(s!==null);return!1}var _u=Error(l(461)),xt=!1;function Dt(e,i,s,r){i.child=e===null?om(i,null,s,r):oa(i,e.child,s,r)}function sp(e,i,s,r,f){s=s.render;var h=i.ref;if("ref"in r){var y={};for(var S in r)S!=="ref"&&(y[S]=r[S])}else y=r;return aa(i),r=ru(e,i,s,y,h,f),S=ou(),e!==null&&!xt?(cu(e,i,f),Qn(e,i,f)):(Re&&S&&qc(i),i.flags|=1,Dt(e,i,r,f),i.child)}function lp(e,i,s,r,f){if(e===null){var h=s.type;return typeof h=="function"&&!Bc(h)&&h.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=h,rp(e,i,h,r,f)):(e=rr(s.type,null,r,i,i.mode,f),e.ref=i.ref,e.return=i,i.child=e)}if(h=e.child,!Ru(e,f)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:Ks,s(y,r)&&e.ref===i.ref)return Qn(e,i,f)}return i.flags|=1,e=Hn(h,r),e.ref=i.ref,e.return=i,i.child=e}function rp(e,i,s,r,f){if(e!==null){var h=e.memoizedProps;if(Ks(h,r)&&e.ref===i.ref)if(xt=!1,i.pendingProps=r=h,Ru(e,f))(e.flags&131072)!==0&&(xt=!0);else return i.lanes=e.lanes,Qn(e,i,f)}return zu(e,i,s,r,f)}function op(e,i,s,r){var f=r.children,h=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|s:s,e!==null){for(r=i.child=e.child,f=0;r!==null;)f=f|r.lanes|r.childLanes,r=r.sibling;r=f&~h}else r=0,i.child=null;return cp(e,i,h,s,r)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&dr(i,h!==null?h.cachePool:null),h!==null?dm(i,h):iu(),fm(i);else return r=i.lanes=536870912,cp(e,i,h!==null?h.baseLanes|s:s,s,r)}else h!==null?(dr(i,h.cachePool),dm(i,h),bi(),i.memoizedState=null):(e!==null&&dr(i,null),iu(),bi());return Dt(e,i,f,s),i.child}function ll(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function cp(e,i,s,r,f){var h=Jc();return h=h===null?null:{parent:vt._currentValue,pool:h},i.memoizedState={baseLanes:s,cachePool:h},e!==null&&dr(i,null),iu(),fm(i),e!==null&&qa(e,i,r,!0),i.childLanes=f,null}function zr(e,i){return i=Er({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function up(e,i,s){return oa(i,e.child,null,s),e=zr(i,i.pendingProps),e.flags|=2,en(i),i.memoizedState=null,e}function dS(e,i,s){var r=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(Re){if(r.mode==="hidden")return e=zr(i,r),i.lanes=536870912,ll(null,e);if(su(i),(e=Fe)?(e=wg(e,mn),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:di!==null?{id:Dn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},s=Vh(e),s.return=i,i.child=s,Ot=i,Fe=null)):e=null,e===null)throw hi(i);return i.lanes=536870912,null}return zr(i,r)}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(su(i),f)if(i.flags&256)i.flags&=-257,i=up(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(xt||qa(e,i,s,!1),f=(s&e.childLanes)!==0,xt||f){if(r=Xe,r!==null&&(y=eh(r,s),y!==0&&y!==h.retryLane))throw h.retryLane=y,ea(e,y),Qt(r,e,y),_u;$r(),i=up(e,i,s)}else e=h.treeContext,Fe=gn(y.nextSibling),Ot=i,Re=!0,fi=null,mn=!1,e!==null&&Xh(i,e),i=zr(i,r),i.flags|=4096;return i}return e=Hn(e.child,{mode:r.mode,children:r.children}),e.ref=i.ref,i.child=e,e.return=i,e}function Cr(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(l(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function zu(e,i,s,r,f){return aa(i),s=ru(e,i,s,r,void 0,f),r=ou(),e!==null&&!xt?(cu(e,i,f),Qn(e,i,f)):(Re&&r&&qc(i),i.flags|=1,Dt(e,i,s,f),i.child)}function dp(e,i,s,r,f,h){return aa(i),i.updateQueue=null,s=mm(i,r,s,f),hm(e),r=ou(),e!==null&&!xt?(cu(e,i,h),Qn(e,i,h)):(Re&&r&&qc(i),i.flags|=1,Dt(e,i,s,h),i.child)}function fp(e,i,s,r,f){if(aa(i),i.stateNode===null){var h=$a,y=s.contextType;typeof y=="object"&&y!==null&&(h=Tt(y)),h=new s(r,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Nu,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=r,h.state=i.memoizedState,h.refs={},Wc(i),y=s.contextType,h.context=typeof y=="object"&&y!==null?Tt(y):$a,h.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(ju(i,s,y,r),h.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&Nu.enqueueReplaceState(h,h.state,null),tl(i,r,h,f),el(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(e===null){h=i.stateNode;var S=i.memoizedProps,_=ua(s,S);h.props=_;var $=h.context,P=s.contextType;y=$a,typeof P=="object"&&P!==null&&(y=Tt(P));var W=s.getDerivedStateFromProps;P=typeof W=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,P||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||$!==y)&&Fm(i,h,r,y),pi=!1;var B=i.memoizedState;h.state=B,tl(i,r,h,f),el(),$=i.memoizedState,S||B!==$||pi?(typeof W=="function"&&(ju(i,s,W,r),$=i.memoizedState),(_=pi||Jm(i,s,_,r,B,$,y))?(P||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=r,i.memoizedState=$),h.props=r,h.state=$,h.context=y,r=_):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!1)}else{h=i.stateNode,eu(e,i),y=i.memoizedProps,P=ua(s,y),h.props=P,W=i.pendingProps,B=h.context,$=s.contextType,_=$a,typeof $=="object"&&$!==null&&(_=Tt($)),S=s.getDerivedStateFromProps,($=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==W||B!==_)&&Fm(i,h,r,_),pi=!1,B=i.memoizedState,h.state=B,tl(i,r,h,f),el();var G=i.memoizedState;y!==W||B!==G||pi||e!==null&&e.dependencies!==null&&cr(e.dependencies)?(typeof S=="function"&&(ju(i,s,S,r),G=i.memoizedState),(P=pi||Jm(i,s,P,r,B,G,_)||e!==null&&e.dependencies!==null&&cr(e.dependencies))?($||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,G,_),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,G,_)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(i.flags|=1024),i.memoizedProps=r,i.memoizedState=G),h.props=r,h.state=G,h.context=_,r=P):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&B===e.memoizedState||(i.flags|=1024),r=!1)}return h=r,Cr(e,i),r=(i.flags&128)!==0,h||r?(h=i.stateNode,s=r&&typeof s.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,e!==null&&r?(i.child=oa(i,e.child,null,f),i.child=oa(i,null,s,f)):Dt(e,i,s,f),i.memoizedState=h.state,e=i.child):e=Qn(e,i,f),e}function hp(e,i,s,r){return na(),i.flags|=256,Dt(e,i,s,r),i.child}var Cu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Eu(e){return{baseLanes:e,cachePool:nm()}}function Au(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=nn),e}function mp(e,i,s){var r=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(dt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(Re){if(f?vi(i):bi(),(e=Fe)?(e=wg(e,mn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:di!==null?{id:Dn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},s=Vh(e),s.return=i,i.child=s,Ot=i,Fe=null)):e=null,e===null)throw hi(i);return fd(e)?i.lanes=32:i.lanes=536870912,null}var S=r.children;return r=r.fallback,f?(bi(),f=i.mode,S=Er({mode:"hidden",children:S},f),r=ta(r,f,s,null),S.return=i,r.return=i,S.sibling=r,i.child=S,r=i.child,r.memoizedState=Eu(s),r.childLanes=Au(e,y,s),i.memoizedState=Cu,ll(null,r)):(vi(i),Ou(i,S))}var _=e.memoizedState;if(_!==null&&(S=_.dehydrated,S!==null)){if(h)i.flags&256?(vi(i),i.flags&=-257,i=Tu(e,i,s)):i.memoizedState!==null?(bi(),i.child=e.child,i.flags|=128,i=null):(bi(),S=r.fallback,f=i.mode,r=Er({mode:"visible",children:r.children},f),S=ta(S,f,s,null),S.flags|=2,r.return=i,S.return=i,r.sibling=S,i.child=r,oa(i,e.child,null,s),r=i.child,r.memoizedState=Eu(s),r.childLanes=Au(e,y,s),i.memoizedState=Cu,i=ll(null,r));else if(vi(i),fd(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var $=y.dgst;y=$,r=Error(l(419)),r.stack="",r.digest=y,Ps({value:r,source:null,stack:null}),i=Tu(e,i,s)}else if(xt||qa(e,i,s,!1),y=(s&e.childLanes)!==0,xt||y){if(y=Xe,y!==null&&(r=eh(y,s),r!==0&&r!==_.retryLane))throw _.retryLane=r,ea(e,r),Qt(y,e,r),_u;dd(S)||$r(),i=Tu(e,i,s)}else dd(S)?(i.flags|=192,i.child=e.child,i=null):(e=_.treeContext,Fe=gn(S.nextSibling),Ot=i,Re=!0,fi=null,mn=!1,e!==null&&Xh(i,e),i=Ou(i,r.children),i.flags|=4096);return i}return f?(bi(),S=r.fallback,f=i.mode,_=e.child,$=_.sibling,r=Hn(_,{mode:"hidden",children:r.children}),r.subtreeFlags=_.subtreeFlags&65011712,$!==null?S=Hn($,S):(S=ta(S,f,s,null),S.flags|=2),S.return=i,r.return=i,r.sibling=S,i.child=r,ll(null,r),r=i.child,S=e.child.memoizedState,S===null?S=Eu(s):(f=S.cachePool,f!==null?(_=vt._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=nm(),S={baseLanes:S.baseLanes|s,cachePool:f}),r.memoizedState=S,r.childLanes=Au(e,y,s),i.memoizedState=Cu,ll(e.child,r)):(vi(i),s=e.child,e=s.sibling,s=Hn(s,{mode:"visible",children:r.children}),s.return=i,s.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=s,i.memoizedState=null,s)}function Ou(e,i){return i=Er({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function Er(e,i){return e=Ft(22,e,null,i),e.lanes=0,e}function Tu(e,i,s){return oa(i,e.child,null,s),e=Ou(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function pp(e,i,s){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i),Vc(e.return,i,s)}function Du(e,i,s,r,f,h){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=s,y.tailMode=f,y.treeForkCount=h)}function gp(e,i,s){var r=i.pendingProps,f=r.revealOrder,h=r.tail;r=r.children;var y=dt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,te(dt,y),Dt(e,i,r,s),r=Re?Vs:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pp(e,s,i);else if(e.tag===19)pp(e,s,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(s=i.child,f=null;s!==null;)e=s.alternate,e!==null&&yr(e)===null&&(f=s),s=s.sibling;s=f,s===null?(f=i.child,i.child=null):(f=s.sibling,s.sibling=null),Du(i,!1,f,s,h,r);break;case"backwards":case"unstable_legacy-backwards":for(s=null,f=i.child,i.child=null;f!==null;){if(e=f.alternate,e!==null&&yr(e)===null){i.child=f;break}e=f.sibling,f.sibling=s,s=f,f=e}Du(i,!0,s,null,h,r);break;case"together":Du(i,!1,null,null,void 0,r);break;default:i.memoizedState=null}return i.child}function Qn(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),wi|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(qa(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,s=Hn(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Hn(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Ru(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&cr(e)))}function fS(e,i,s){switch(i.tag){case 3:Z(i,i.stateNode.containerInfo),mi(i,vt,e.memoizedState.cache),na();break;case 27:case 5:Le(i);break;case 4:Z(i,i.stateNode.containerInfo);break;case 10:mi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,su(i),null;break;case 13:var r=i.memoizedState;if(r!==null)return r.dehydrated!==null?(vi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?mp(e,i,s):(vi(i),e=Qn(e,i,s),e!==null?e.sibling:null);vi(i);break;case 19:var f=(e.flags&128)!==0;if(r=(s&i.childLanes)!==0,r||(qa(e,i,s,!1),r=(s&i.childLanes)!==0),f){if(r)return gp(e,i,s);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),te(dt,dt.current),r)break;return null;case 22:return i.lanes=0,op(e,i,s,i.pendingProps);case 24:mi(i,vt,e.memoizedState.cache)}return Qn(e,i,s)}function yp(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)xt=!0;else{if(!Ru(e,s)&&(i.flags&128)===0)return xt=!1,fS(e,i,s);xt=(e.flags&131072)!==0}else xt=!1,Re&&(i.flags&1048576)!==0&&Qh(i,Vs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var r=i.pendingProps;if(e=la(i.elementType),i.type=e,typeof e=="function")Bc(e)?(r=ua(e,r),i.tag=1,i=fp(null,i,e,r,s)):(i.tag=0,i=zu(null,i,e,r,s));else{if(e!=null){var f=e.$$typeof;if(f===D){i.tag=11,i=sp(null,i,e,r,s);break e}else if(f===V){i.tag=14,i=lp(null,i,e,r,s);break e}}throw i=Ke(e)||e,Error(l(306,i,""))}}return i;case 0:return zu(e,i,i.type,i.pendingProps,s);case 1:return r=i.type,f=ua(r,i.pendingProps),fp(e,i,r,f,s);case 3:e:{if(Z(i,i.stateNode.containerInfo),e===null)throw Error(l(387));r=i.pendingProps;var h=i.memoizedState;f=h.element,eu(e,i),tl(i,r,null,s);var y=i.memoizedState;if(r=y.cache,mi(i,vt,r),r!==h.cache&&Pc(i,[vt],s,!0),el(),r=y.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=hp(e,i,r,s);break e}else if(r!==f){f=dn(Error(l(424)),i),Ps(f),i=hp(e,i,r,s);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Fe=gn(e.firstChild),Ot=i,Re=!0,fi=null,mn=!0,s=om(i,null,r,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(na(),r===f){i=Qn(e,i,s);break e}Dt(e,i,r,s)}i=i.child}return i;case 26:return Cr(e,i),e===null?(s=Cg(i.type,null,i.pendingProps,null))?i.memoizedState=s:Re||(s=i.type,e=i.pendingProps,r=Kr(fe.current).createElement(s),r[At]=i,r[Ht]=e,Rt(r,s,e),Ct(r),i.stateNode=r):i.memoizedState=Cg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return Le(i),e===null&&Re&&(r=i.stateNode=kg(i.type,i.pendingProps,fe.current),Ot=i,mn=!0,f=Fe,zi(i.type)?(hd=f,Fe=gn(r.firstChild)):Fe=f),Dt(e,i,i.pendingProps.children,s),Cr(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&Re&&((f=r=Fe)&&(r=qS(r,i.type,i.pendingProps,mn),r!==null?(i.stateNode=r,Ot=i,Fe=gn(r.firstChild),mn=!1,f=!0):f=!1),f||hi(i)),Le(i),f=i.type,h=i.pendingProps,y=e!==null?e.memoizedProps:null,r=h.children,od(f,h)?r=null:y!==null&&od(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=ru(e,i,iS,null,null,s),Sl._currentValue=f),Cr(e,i),Dt(e,i,r,s),i.child;case 6:return e===null&&Re&&((e=s=Fe)&&(s=HS(s,i.pendingProps,mn),s!==null?(i.stateNode=s,Ot=i,Fe=null,e=!0):e=!1),e||hi(i)),null;case 13:return mp(e,i,s);case 4:return Z(i,i.stateNode.containerInfo),r=i.pendingProps,e===null?i.child=oa(i,null,r,s):Dt(e,i,r,s),i.child;case 11:return sp(e,i,i.type,i.pendingProps,s);case 7:return Dt(e,i,i.pendingProps,s),i.child;case 8:return Dt(e,i,i.pendingProps.children,s),i.child;case 12:return Dt(e,i,i.pendingProps.children,s),i.child;case 10:return r=i.pendingProps,mi(i,i.type,r.value),Dt(e,i,r.children,s),i.child;case 9:return f=i.type._context,r=i.pendingProps.children,aa(i),f=Tt(f),r=r(f),i.flags|=1,Dt(e,i,r,s),i.child;case 14:return lp(e,i,i.type,i.pendingProps,s);case 15:return rp(e,i,i.type,i.pendingProps,s);case 19:return gp(e,i,s);case 31:return dS(e,i,s);case 22:return op(e,i,s,i.pendingProps);case 24:return aa(i),r=Tt(vt),e===null?(f=Jc(),f===null&&(f=Xe,h=Qc(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=s),f=h),i.memoizedState={parent:r,cache:f},Wc(i),mi(i,vt,f)):((e.lanes&s)!==0&&(eu(e,i),tl(i,null,null,s),el()),f=e.memoizedState,h=i.memoizedState,f.parent!==r?(f={parent:r,cache:r},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),mi(i,vt,r)):(r=h.cache,mi(i,vt,r),r!==f.cache&&Pc(i,[vt],s,!0))),Dt(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Xn(e){e.flags|=4}function Mu(e,i,s,r,f){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Gp())e.flags|=8192;else throw ra=hr,Fc}else e.flags&=-16777217}function vp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Dg(i))if(Gp())e.flags|=8192;else throw ra=hr,Fc}function Ar(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Jf():536870912,e.lanes|=i,es|=i)}function rl(e,i){if(!Re)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function We(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(i)for(var f=e.child;f!==null;)s|=f.lanes|f.childLanes,r|=f.subtreeFlags&65011712,r|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)s|=f.lanes|f.childLanes,r|=f.subtreeFlags,r|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=r,e.childLanes=s,i}function hS(e,i,s){var r=i.pendingProps;switch(Hc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(i),null;case 1:return We(i),null;case 3:return s=i.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Yn(vt),se(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Za(i)?Xn(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Kc())),We(i),null;case 26:var f=i.type,h=i.memoizedState;return e===null?(Xn(i),h!==null?(We(i),vp(i,h)):(We(i),Mu(i,f,null,r,s))):h?h!==e.memoizedState?(Xn(i),We(i),vp(i,h)):(We(i),i.flags&=-16777217):(e=e.memoizedProps,e!==r&&Xn(i),We(i),Mu(i,f,e,r,s)),null;case 27:if(Qe(i),s=fe.current,f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Xn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return We(i),null}e=ne.current,Za(i)?Jh(i):(e=kg(f,r,s),i.stateNode=e,Xn(i))}return We(i),null;case 5:if(Qe(i),f=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Xn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return We(i),null}if(h=ne.current,Za(i))Jh(i);else{var y=Kr(fe.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?y.createElement(f,{is:r.is}):y.createElement(f)}}h[At]=i,h[Ht]=r;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(Rt(h,f,r),f){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Xn(i)}}return We(i),Mu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==r&&Xn(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(l(166));if(e=fe.current,Za(i)){if(e=i.stateNode,s=i.memoizedProps,r=null,f=Ot,f!==null)switch(f.tag){case 27:case 5:r=f.memoizedProps}e[At]=i,e=!!(e.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||mg(e.nodeValue,s)),e||hi(i,!0)}else e=Kr(e).createTextNode(r),e[At]=i,i.stateNode=e}return We(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(r=Za(i),s!==null){if(e===null){if(!r)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[At]=i}else na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;We(i),e=!1}else s=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(en(i),i):(en(i),null);if((i.flags&128)!==0)throw Error(l(558))}return We(i),null;case 13:if(r=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Za(i),r!==null&&r.dehydrated!==null){if(e===null){if(!f)throw Error(l(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(l(317));f[At]=i}else na(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;We(i),f=!1}else f=Kc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(en(i),i):(en(i),null)}return en(i),(i.flags&128)!==0?(i.lanes=s,i):(s=r!==null,e=e!==null&&e.memoizedState!==null,s&&(r=i.child,f=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(f=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==f&&(r.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),Ar(i,i.updateQueue),We(i),null);case 4:return se(),e===null&&id(i.stateNode.containerInfo),We(i),null;case 10:return Yn(i.type),We(i),null;case 19:if(q(dt),r=i.memoizedState,r===null)return We(i),null;if(f=(i.flags&128)!==0,h=r.rendering,h===null)if(f)rl(r,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(h=yr(e),h!==null){for(i.flags|=128,rl(r,!1),e=h.updateQueue,i.updateQueue=e,Ar(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Yh(s,e),s=s.sibling;return te(dt,dt.current&1|2),Re&&Gn(i,r.treeForkCount),i.child}e=e.sibling}r.tail!==null&&zt()>Mr&&(i.flags|=128,f=!0,rl(r,!1),i.lanes=4194304)}else{if(!f)if(e=yr(h),e!==null){if(i.flags|=128,f=!0,e=e.updateQueue,i.updateQueue=e,Ar(i,e),rl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!Re)return We(i),null}else 2*zt()-r.renderingStartTime>Mr&&s!==536870912&&(i.flags|=128,f=!0,rl(r,!1),i.lanes=4194304);r.isBackwards?(h.sibling=i.child,i.child=h):(e=r.last,e!==null?e.sibling=h:i.child=h,r.last=h)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=zt(),e.sibling=null,s=dt.current,te(dt,f?s&1|2:s&1),Re&&Gn(i,r.treeForkCount),e):(We(i),null);case 22:case 23:return en(i),au(),r=i.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(i.flags|=8192):r&&(i.flags|=8192),r?(s&536870912)!==0&&(i.flags&128)===0&&(We(i),i.subtreeFlags&6&&(i.flags|=8192)):We(i),s=i.updateQueue,s!==null&&Ar(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(i.flags|=2048),e!==null&&q(sa),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Yn(vt),We(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function mS(e,i){switch(Hc(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Yn(vt),se(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return Qe(i),null;case 31:if(i.memoizedState!==null){if(en(i),i.alternate===null)throw Error(l(340));na()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(en(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));na()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return q(dt),null;case 4:return se(),null;case 10:return Yn(i.type),null;case 22:case 23:return en(i),au(),e!==null&&q(sa),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Yn(vt),null;case 25:return null;default:return null}}function bp(e,i){switch(Hc(i),i.tag){case 3:Yn(vt),se();break;case 26:case 27:case 5:Qe(i);break;case 4:se();break;case 31:i.memoizedState!==null&&en(i);break;case 13:en(i);break;case 19:q(dt);break;case 10:Yn(i.type);break;case 22:case 23:en(i),au(),e!==null&&q(sa);break;case 24:Yn(vt)}}function ol(e,i){try{var s=i.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var f=r.next;s=f;do{if((s.tag&e)===e){r=void 0;var h=s.create,y=s.inst;r=h(),y.destroy=r}s=s.next}while(s!==f)}}catch(S){qe(i,i.return,S)}}function xi(e,i,s){try{var r=i.updateQueue,f=r!==null?r.lastEffect:null;if(f!==null){var h=f.next;r=h;do{if((r.tag&e)===e){var y=r.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var _=s,$=S;try{$()}catch(P){qe(f,_,P)}}}r=r.next}while(r!==h)}}catch(P){qe(i,i.return,P)}}function xp(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{um(i,s)}catch(r){qe(e,e.return,r)}}}function Sp(e,i,s){s.props=ua(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(r){qe(e,i,r)}}function cl(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof s=="function"?e.refCleanup=s(r):s.current=r}}catch(f){qe(e,i,f)}}function Mn(e,i){var s=e.ref,r=e.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(f){qe(e,i,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){qe(e,i,f)}else s.current=null}function wp(e){var i=e.type,s=e.memoizedProps,r=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break e;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}catch(f){qe(e,e.return,f)}}function Lu(e,i,s){try{var r=e.stateNode;LS(r,e.type,s,i),r[Ht]=i}catch(f){qe(e,e.return,f)}}function jp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zi(e.type)||e.tag===4}function Uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jp(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.tag===27&&zi(e.type)||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 $u(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Zn));else if(r!==4&&(r===27&&zi(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for($u(e,i,s),e=e.sibling;e!==null;)$u(e,i,s),e=e.sibling}function Or(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(r!==4&&(r===27&&zi(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Or(e,i,s),e=e.sibling;e!==null;)Or(e,i,s),e=e.sibling}function Np(e){var i=e.stateNode,s=e.memoizedProps;try{for(var r=e.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);Rt(i,r,s),i[At]=e,i[Ht]=s}catch(h){qe(e,e.return,h)}}var Jn=!1,St=!1,Bu=!1,kp=typeof WeakSet=="function"?WeakSet:Set,Et=null;function pS(e,i){if(e=e.containerInfo,ld=Fr,e=Uh(e),Tc(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var f=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var y=0,S=-1,_=-1,$=0,P=0,W=e,B=null;t:for(;;){for(var G;W!==s||f!==0&&W.nodeType!==3||(S=y+f),W!==h||r!==0&&W.nodeType!==3||(_=y+r),W.nodeType===3&&(y+=W.nodeValue.length),(G=W.firstChild)!==null;)B=W,W=G;for(;;){if(W===e)break t;if(B===s&&++$===f&&(S=y),B===h&&++P===r&&(_=y),(G=W.nextSibling)!==null)break;W=B,B=W.parentNode}W=G}s=S===-1||_===-1?null:{start:S,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(rd={focusedElem:e,selectionRange:s},Fr=!1,Et=i;Et!==null;)if(i=Et,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,Et=e;else for(;Et!==null;){switch(i=Et,h=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)f=e[s],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=i,f=h.memoizedProps,h=h.memoizedState,r=s.stateNode;try{var he=ua(s.type,f);e=r.getSnapshotBeforeUpdate(he,h),r.__reactInternalSnapshotBeforeUpdate=e}catch(xe){qe(s,s.return,xe)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)ud(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ud(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,Et=e;break}Et=i.return}}function _p(e,i,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:Wn(e,s),r&4&&ol(5,s);break;case 1:if(Wn(e,s),r&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){qe(s,s.return,y)}else{var f=ua(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(f,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){qe(s,s.return,y)}}r&64&&xp(s),r&512&&cl(s,s.return);break;case 3:if(Wn(e,s),r&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{um(e,i)}catch(y){qe(s,s.return,y)}}break;case 27:i===null&&r&4&&Np(s);case 26:case 5:Wn(e,s),i===null&&r&4&&wp(s),r&512&&cl(s,s.return);break;case 12:Wn(e,s);break;case 31:Wn(e,s),r&4&&Ep(e,s);break;case 13:Wn(e,s),r&4&&Ap(e,s),r&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=NS.bind(null,s),GS(e,s))));break;case 22:if(r=s.memoizedState!==null||Jn,!r){i=i!==null&&i.memoizedState!==null||St,f=Jn;var h=St;Jn=r,(St=i)&&!h?ei(e,s,(s.subtreeFlags&8772)!==0):Wn(e,s),Jn=f,St=h}break;case 30:break;default:Wn(e,s)}}function zp(e){var i=e.alternate;i!==null&&(e.alternate=null,zp(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&pc(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var et=null,Kt=!1;function Fn(e,i,s){for(s=s.child;s!==null;)Cp(e,i,s),s=s.sibling}function Cp(e,i,s){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(Vi,s)}catch{}switch(s.tag){case 26:St||Mn(s,i),Fn(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:St||Mn(s,i);var r=et,f=Kt;zi(s.type)&&(et=s.stateNode,Kt=!1),Fn(e,i,s),vl(s.stateNode),et=r,Kt=f;break;case 5:St||Mn(s,i);case 6:if(r=et,f=Kt,et=null,Fn(e,i,s),et=r,Kt=f,et!==null)if(Kt)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(s.stateNode)}catch(h){qe(s,i,h)}else try{et.removeChild(s.stateNode)}catch(h){qe(s,i,h)}break;case 18:et!==null&&(Kt?(e=et,xg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),os(e)):xg(et,s.stateNode));break;case 4:r=et,f=Kt,et=s.stateNode.containerInfo,Kt=!0,Fn(e,i,s),et=r,Kt=f;break;case 0:case 11:case 14:case 15:xi(2,s,i),St||xi(4,s,i),Fn(e,i,s);break;case 1:St||(Mn(s,i),r=s.stateNode,typeof r.componentWillUnmount=="function"&&Sp(s,i,r)),Fn(e,i,s);break;case 21:Fn(e,i,s);break;case 22:St=(r=St)||s.memoizedState!==null,Fn(e,i,s),St=r;break;default:Fn(e,i,s)}}function Ep(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{os(e)}catch(s){qe(i,i.return,s)}}}function Ap(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{os(e)}catch(s){qe(i,i.return,s)}}function gS(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new kp),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new kp),i;default:throw Error(l(435,e.tag))}}function Tr(e,i){var s=gS(e);i.forEach(function(r){if(!s.has(r)){s.add(r);var f=kS.bind(null,e,r);r.then(f,f)}})}function Yt(e,i){var s=i.deletions;if(s!==null)for(var r=0;r<s.length;r++){var f=s[r],h=e,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(zi(S.type)){et=S.stateNode,Kt=!1;break e}break;case 5:et=S.stateNode,Kt=!1;break e;case 3:case 4:et=S.stateNode.containerInfo,Kt=!0;break e}S=S.return}if(et===null)throw Error(l(160));Cp(h,y,f),et=null,Kt=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Op(i,e),i=i.sibling}var kn=null;function Op(e,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(i,e),Vt(e),r&4&&(xi(3,e,e.return),ol(3,e),xi(5,e,e.return));break;case 1:Yt(i,e),Vt(e),r&512&&(St||s===null||Mn(s,s.return)),r&64&&Jn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:var f=kn;if(Yt(i,e),Vt(e),r&512&&(St||s===null||Mn(s,s.return)),r&4){var h=s!==null?s.memoizedState:null;if(r=e.memoizedState,s===null)if(r===null)if(e.stateNode===null){e:{r=e.type,s=e.memoizedProps,f=f.ownerDocument||f;t:switch(r){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Ls]||h[At]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(r),f.head.insertBefore(h,f.querySelector("head > title"))),Rt(h,r,s),h[At]=e,Ct(h),r=h;break e;case"link":var y=Og("link","href",f).get(r+(s.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(S,1);break t}}h=f.createElement(r),Rt(h,r,s),f.head.appendChild(h);break;case"meta":if(y=Og("meta","content",f).get(r+(s.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(S,1);break t}}h=f.createElement(r),Rt(h,r,s),f.head.appendChild(h);break;default:throw Error(l(468,r))}h[At]=e,Ct(h),r=h}e.stateNode=r}else Tg(f,e.type,e.stateNode);else e.stateNode=Ag(f,r,e.memoizedProps);else h!==r?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,r===null?Tg(f,e.type,e.stateNode):Ag(f,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Lu(e,e.memoizedProps,s.memoizedProps)}break;case 27:Yt(i,e),Vt(e),r&512&&(St||s===null||Mn(s,s.return)),s!==null&&r&4&&Lu(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Yt(i,e),Vt(e),r&512&&(St||s===null||Mn(s,s.return)),e.flags&32){f=e.stateNode;try{Oa(f,"")}catch(he){qe(e,e.return,he)}}r&4&&e.stateNode!=null&&(f=e.memoizedProps,Lu(e,f,s!==null?s.memoizedProps:f)),r&1024&&(Bu=!0);break;case 6:if(Yt(i,e),Vt(e),r&4){if(e.stateNode===null)throw Error(l(162));r=e.memoizedProps,s=e.stateNode;try{s.nodeValue=r}catch(he){qe(e,e.return,he)}}break;case 3:if(Pr=null,f=kn,kn=Yr(i.containerInfo),Yt(i,e),kn=f,Vt(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{os(i.containerInfo)}catch(he){qe(e,e.return,he)}Bu&&(Bu=!1,Tp(e));break;case 4:r=kn,kn=Yr(e.stateNode.containerInfo),Yt(i,e),Vt(e),kn=r;break;case 12:Yt(i,e),Vt(e);break;case 31:Yt(i,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tr(e,r)));break;case 13:Yt(i,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Rr=zt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tr(e,r)));break;case 22:f=e.memoizedState!==null;var _=s!==null&&s.memoizedState!==null,$=Jn,P=St;if(Jn=$||f,St=P||_,Yt(i,e),St=P,Jn=$,Vt(e),r&8192)e:for(i=e.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(s===null||_||Jn||St||da(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){_=s=i;try{if(h=_.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=_.stateNode;var W=_.memoizedProps.style,B=W!=null&&W.hasOwnProperty("display")?W.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(he){qe(_,_.return,he)}}}else if(i.tag===6){if(s===null){_=i;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(he){qe(_,_.return,he)}}}else if(i.tag===18){if(s===null){_=i;try{var G=_.stateNode;f?Sg(G,!0):Sg(_.stateNode,!1)}catch(he){qe(_,_.return,he)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}r&4&&(r=e.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,Tr(e,s))));break;case 19:Yt(i,e),Vt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Tr(e,r)));break;case 30:break;case 21:break;default:Yt(i,e),Vt(e)}}function Vt(e){var i=e.flags;if(i&2){try{for(var s,r=e.return;r!==null;){if(jp(r)){s=r;break}r=r.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var f=s.stateNode,h=Uu(e);Or(e,h,f);break;case 5:var y=s.stateNode;s.flags&32&&(Oa(y,""),s.flags&=-33);var S=Uu(e);Or(e,S,y);break;case 3:case 4:var _=s.stateNode.containerInfo,$=Uu(e);$u(e,$,_);break;default:throw Error(l(161))}}catch(P){qe(e,e.return,P)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Tp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Tp(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Wn(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)_p(e,i.alternate,i),i=i.sibling}function da(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:xi(4,i,i.return),da(i);break;case 1:Mn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&Sp(i,i.return,s),da(i);break;case 27:vl(i.stateNode);case 26:case 5:Mn(i,i.return),da(i);break;case 22:i.memoizedState===null&&da(i);break;case 30:da(i);break;default:da(i)}e=e.sibling}}function ei(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var r=i.alternate,f=e,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:ei(f,h,s),ol(4,h);break;case 1:if(ei(f,h,s),r=h,f=r.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch($){qe(r,r.return,$)}if(r=h,f=r.updateQueue,f!==null){var S=r.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)cm(_[f],S)}catch($){qe(r,r.return,$)}}s&&y&64&&xp(h),cl(h,h.return);break;case 27:Np(h);case 26:case 5:ei(f,h,s),s&&r===null&&y&4&&wp(h),cl(h,h.return);break;case 12:ei(f,h,s);break;case 31:ei(f,h,s),s&&y&4&&Ep(f,h);break;case 13:ei(f,h,s),s&&y&4&&Ap(f,h);break;case 22:h.memoizedState===null&&ei(f,h,s),cl(h,h.return);break;case 30:break;default:ei(f,h,s)}i=i.sibling}}function Iu(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Qs(s))}function Zu(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Qs(e))}function _n(e,i,s,r){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Dp(e,i,s,r),i=i.sibling}function Dp(e,i,s,r){var f=i.flags;switch(i.tag){case 0:case 11:case 15:_n(e,i,s,r),f&2048&&ol(9,i);break;case 1:_n(e,i,s,r);break;case 3:_n(e,i,s,r),f&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&Qs(e)));break;case 12:if(f&2048){_n(e,i,s,r),e=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(_){qe(i,i.return,_)}}else _n(e,i,s,r);break;case 31:_n(e,i,s,r);break;case 13:_n(e,i,s,r);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?_n(e,i,s,r):ul(e,i):h._visibility&2?_n(e,i,s,r):(h._visibility|=2,Ja(e,i,s,r,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Iu(y,i);break;case 24:_n(e,i,s,r),f&2048&&Zu(i.alternate,i);break;default:_n(e,i,s,r)}}function Ja(e,i,s,r,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=e,y=i,S=s,_=r,$=y.flags;switch(y.tag){case 0:case 11:case 15:Ja(h,y,S,_,f),ol(8,y);break;case 23:break;case 22:var P=y.stateNode;y.memoizedState!==null?P._visibility&2?Ja(h,y,S,_,f):ul(h,y):(P._visibility|=2,Ja(h,y,S,_,f)),f&&$&2048&&Iu(y.alternate,y);break;case 24:Ja(h,y,S,_,f),f&&$&2048&&Zu(y.alternate,y);break;default:Ja(h,y,S,_,f)}i=i.sibling}}function ul(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,r=i,f=r.flags;switch(r.tag){case 22:ul(s,r),f&2048&&Iu(r.alternate,r);break;case 24:ul(s,r),f&2048&&Zu(r.alternate,r);break;default:ul(s,r)}i=i.sibling}}var dl=8192;function Fa(e,i,s){if(e.subtreeFlags&dl)for(e=e.child;e!==null;)Rp(e,i,s),e=e.sibling}function Rp(e,i,s){switch(e.tag){case 26:Fa(e,i,s),e.flags&dl&&e.memoizedState!==null&&nw(s,kn,e.memoizedState,e.memoizedProps);break;case 5:Fa(e,i,s);break;case 3:case 4:var r=kn;kn=Yr(e.stateNode.containerInfo),Fa(e,i,s),kn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=dl,dl=16777216,Fa(e,i,s),dl=r):Fa(e,i,s));break;default:Fa(e,i,s)}}function Mp(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function fl(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];Et=r,Up(r,e)}Mp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lp(e),e=e.sibling}function Lp(e){switch(e.tag){case 0:case 11:case 15:fl(e),e.flags&2048&&xi(9,e,e.return);break;case 3:fl(e);break;case 12:fl(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Dr(e)):fl(e);break;default:fl(e)}}function Dr(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];Et=r,Up(r,e)}Mp(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:xi(8,i,i.return),Dr(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Dr(i));break;default:Dr(i)}e=e.sibling}}function Up(e,i){for(;Et!==null;){var s=Et;switch(s.tag){case 0:case 11:case 15:xi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var r=s.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Qs(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,Et=r;else e:for(s=e;Et!==null;){r=Et;var f=r.sibling,h=r.return;if(zp(r),r===s){Et=null;break e}if(f!==null){f.return=h,Et=f;break e}Et=h}}}var yS={getCacheForType:function(e){var i=Tt(vt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return Tt(vt).controller.signal}},vS=typeof WeakMap=="function"?WeakMap:Map,Be=0,Xe=null,Ee=null,Te=0,Ze=0,tn=null,Si=!1,Wa=!1,qu=!1,ti=0,rt=0,wi=0,fa=0,Hu=0,nn=0,es=0,hl=null,Pt=null,Gu=!1,Rr=0,$p=0,Mr=1/0,Lr=null,ji=null,Nt=0,Ni=null,ts=null,ni=0,Ku=0,Yu=null,Bp=null,ml=0,Vu=null;function an(){return(Be&2)!==0&&Te!==0?Te&-Te:I.T!==null?Wu():th()}function Ip(){if(nn===0)if((Te&536870912)===0||Re){var e=Gl;Gl<<=1,(Gl&3932160)===0&&(Gl=262144),nn=e}else nn=536870912;return e=Wt.current,e!==null&&(e.flags|=32),nn}function Qt(e,i,s){(e===Xe&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(ns(e,0),ki(e,Te,nn,!1)),Ms(e,s),((Be&2)===0||e!==Xe)&&(e===Xe&&((Be&2)===0&&(fa|=s),rt===4&&ki(e,Te,nn,!1)),Ln(e))}function Zp(e,i,s){if((Be&6)!==0)throw Error(l(327));var r=!s&&(i&127)===0&&(i&e.expiredLanes)===0||Rs(e,i),f=r?SS(e,i):Qu(e,i,!0),h=r;do{if(f===0){Wa&&!r&&ki(e,i,0,!1);break}else{if(s=e.current.alternate,h&&!bS(s)){f=Qu(e,i,!1),h=!1;continue}if(f===2){if(h=i,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=e;f=hl;var _=S.current.memoizedState.isDehydrated;if(_&&(ns(S,y).flags|=256),y=Qu(S,y,!1),y!==2){if(qu&&!_){S.errorRecoveryDisabledLanes|=h,fa|=h,f=4;break e}h=Pt,Pt=f,h!==null&&(Pt===null?Pt=h:Pt.push.apply(Pt,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){ns(e,0),ki(e,i,0,!0);break}e:{switch(r=e,h=f,h){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:ki(r,i,nn,!Si);break e;case 2:Pt=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(f=Rr+300-zt(),10<f)){if(ki(r,i,nn,!Si),Yl(r,0,!0)!==0)break e;ni=i,r.timeoutHandle=vg(qp.bind(null,r,s,Pt,Lr,Gu,i,nn,fa,es,Si,h,"Throttled",-0,0),f);break e}qp(r,s,Pt,Lr,Gu,i,nn,fa,es,Si,h,null,-0,0)}}break}while(!0);Ln(e)}function qp(e,i,s,r,f,h,y,S,_,$,P,W,B,G){if(e.timeoutHandle=-1,W=i.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Rp(i,h,W);var he=(h&62914560)===h?Rr-zt():(h&4194048)===h?$p-zt():0;if(he=iw(W,he),he!==null){ni=h,e.cancelPendingCommit=he(Xp.bind(null,e,i,h,s,r,f,y,S,_,P,W,null,B,G)),ki(e,h,y,!$);return}}Xp(e,i,h,s,r,f,y,S,_)}function bS(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var r=0;r<s.length;r++){var f=s[r],h=f.getSnapshot;f=f.value;try{if(!Jt(h(),f))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ki(e,i,s,r){i&=~Hu,i&=~fa,e.suspendedLanes|=i,e.pingedLanes&=~i,r&&(e.warmLanes|=i),r=e.expirationTimes;for(var f=i;0<f;){var h=31-Se(f),y=1<<h;r[h]=-1,f&=~y}s!==0&&Ff(e,s,i)}function Ur(){return(Be&6)===0?(pl(0),!1):!0}function Pu(){if(Ee!==null){if(Ze===0)var e=Ee.return;else e=Ee,Kn=ia=null,uu(e),Ya=null,Js=0,e=Ee;for(;e!==null;)bp(e.alternate,e),e=e.return;Ee=null}}function ns(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,BS(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),ni=0,Pu(),Xe=e,Ee=s=Hn(e.current,null),Te=i,Ze=0,tn=null,Si=!1,Wa=Rs(e,i),qu=!1,es=nn=Hu=fa=wi=rt=0,Pt=hl=null,Gu=!1,(i&8)!==0&&(i|=i&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=i;0<r;){var f=31-Se(r),h=1<<f;i|=e[f],r&=~h}return ti=i,ar(),s}function Hp(e,i){ke=null,I.H=sl,i===Ka||i===fr?(i=sm(),Ze=3):i===Fc?(i=sm(),Ze=4):Ze=i===_u?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,tn=i,Ee===null&&(rt=1,_r(e,dn(i,e.current)))}function Gp(){var e=Wt.current;return e===null?!0:(Te&4194048)===Te?pn===null:(Te&62914560)===Te||(Te&536870912)!==0?e===pn:!1}function Kp(){var e=I.H;return I.H=sl,e===null?sl:e}function Yp(){var e=I.A;return I.A=yS,e}function $r(){rt=4,Si||(Te&4194048)!==Te&&Wt.current!==null||(Wa=!0),(wi&134217727)===0&&(fa&134217727)===0||Xe===null||ki(Xe,Te,nn,!1)}function Qu(e,i,s){var r=Be;Be|=2;var f=Kp(),h=Yp();(Xe!==e||Te!==i)&&(Lr=null,ns(e,i)),i=!1;var y=rt;e:do try{if(Ze!==0&&Ee!==null){var S=Ee,_=tn;switch(Ze){case 8:Pu(),y=6;break e;case 3:case 2:case 9:case 6:Wt.current===null&&(i=!0);var $=Ze;if(Ze=0,tn=null,is(e,S,_,$),s&&Wa){y=0;break e}break;default:$=Ze,Ze=0,tn=null,is(e,S,_,$)}}xS(),y=rt;break}catch(P){Hp(e,P)}while(!0);return i&&e.shellSuspendCounter++,Kn=ia=null,Be=r,I.H=f,I.A=h,Ee===null&&(Xe=null,Te=0,ar()),y}function xS(){for(;Ee!==null;)Vp(Ee)}function SS(e,i){var s=Be;Be|=2;var r=Kp(),f=Yp();Xe!==e||Te!==i?(Lr=null,Mr=zt()+500,ns(e,i)):Wa=Rs(e,i);e:do try{if(Ze!==0&&Ee!==null){i=Ee;var h=tn;t:switch(Ze){case 1:Ze=0,tn=null,is(e,i,h,1);break;case 2:case 9:if(im(h)){Ze=0,tn=null,Pp(i);break}i=function(){Ze!==2&&Ze!==9||Xe!==e||(Ze=7),Ln(e)},h.then(i,i);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:im(h)?(Ze=0,tn=null,Pp(i)):(Ze=0,tn=null,is(e,i,h,7));break;case 5:var y=null;switch(Ee.tag){case 26:y=Ee.memoizedState;case 5:case 27:var S=Ee;if(y?Dg(y):S.stateNode.complete){Ze=0,tn=null;var _=S.sibling;if(_!==null)Ee=_;else{var $=S.return;$!==null?(Ee=$,Br($)):Ee=null}break t}}Ze=0,tn=null,is(e,i,h,5);break;case 6:Ze=0,tn=null,is(e,i,h,6);break;case 8:Pu(),rt=6;break e;default:throw Error(l(462))}}wS();break}catch(P){Hp(e,P)}while(!0);return Kn=ia=null,I.H=r,I.A=f,Be=s,Ee!==null?0:(Xe=null,Te=0,ar(),rt)}function wS(){for(;Ee!==null&&!yt();)Vp(Ee)}function Vp(e){var i=yp(e.alternate,e,ti);e.memoizedProps=e.pendingProps,i===null?Br(e):Ee=i}function Pp(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=dp(s,i,i.pendingProps,i.type,void 0,Te);break;case 11:i=dp(s,i,i.pendingProps,i.type.render,i.ref,Te);break;case 5:uu(i);default:bp(s,i),i=Ee=Yh(i,ti),i=yp(s,i,ti)}e.memoizedProps=e.pendingProps,i===null?Br(e):Ee=i}function is(e,i,s,r){Kn=ia=null,uu(i),Ya=null,Js=0;var f=i.return;try{if(uS(e,f,i,s,Te)){rt=1,_r(e,dn(s,e.current)),Ee=null;return}}catch(h){if(f!==null)throw Ee=f,h;rt=1,_r(e,dn(s,e.current)),Ee=null;return}i.flags&32768?(Re||r===1?e=!0:Wa||(Te&536870912)!==0?e=!1:(Si=e=!0,(r===2||r===9||r===3||r===6)&&(r=Wt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Qp(i,e)):Br(i)}function Br(e){var i=e;do{if((i.flags&32768)!==0){Qp(i,Si);return}e=i.return;var s=hS(i.alternate,i,ti);if(s!==null){Ee=s;return}if(i=i.sibling,i!==null){Ee=i;return}Ee=i=e}while(i!==null);rt===0&&(rt=5)}function Qp(e,i){do{var s=mS(e.alternate,e);if(s!==null){s.flags&=32767,Ee=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=s}while(e!==null);rt=6,Ee=null}function Xp(e,i,s,r,f,h,y,S,_){e.cancelPendingCommit=null;do Ir();while(Nt!==0);if((Be&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(h=i.lanes|i.childLanes,h|=Uc,tx(e,s,h,y,S,_),e===Xe&&(Ee=Xe=null,Te=0),ts=i,Ni=e,ni=s,Ku=h,Yu=f,Bp=r,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_S(qt,function(){return tg(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=I.T,I.T=null,f=K.p,K.p=2,y=Be,Be|=4;try{pS(e,i,s)}finally{Be=y,K.p=f,I.T=r}}Nt=1,Jp(),Fp(),Wp()}}function Jp(){if(Nt===1){Nt=0;var e=Ni,i=ts,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=I.T,I.T=null;var r=K.p;K.p=2;var f=Be;Be|=4;try{Op(i,e);var h=rd,y=Uh(e.containerInfo),S=h.focusedElem,_=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&Lh(S.ownerDocument.documentElement,S)){if(_!==null&&Tc(S)){var $=_.start,P=_.end;if(P===void 0&&(P=$),"selectionStart"in S)S.selectionStart=$,S.selectionEnd=Math.min(P,S.value.length);else{var W=S.ownerDocument||document,B=W&&W.defaultView||window;if(B.getSelection){var G=B.getSelection(),he=S.textContent.length,xe=Math.min(_.start,he),Pe=_.end===void 0?xe:Math.min(_.end,he);!G.extend&&xe>Pe&&(y=Pe,Pe=xe,xe=y);var M=Mh(S,xe),E=Mh(S,Pe);if(M&&E&&(G.rangeCount!==1||G.anchorNode!==M.node||G.anchorOffset!==M.offset||G.focusNode!==E.node||G.focusOffset!==E.offset)){var U=W.createRange();U.setStart(M.node,M.offset),G.removeAllRanges(),xe>Pe?(G.addRange(U),G.extend(E.node,E.offset)):(U.setEnd(E.node,E.offset),G.addRange(U))}}}}for(W=[],G=S;G=G.parentNode;)G.nodeType===1&&W.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<W.length;S++){var J=W[S];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}Fr=!!ld,rd=ld=null}finally{Be=f,K.p=r,I.T=s}}e.current=i,Nt=2}}function Fp(){if(Nt===2){Nt=0;var e=Ni,i=ts,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=I.T,I.T=null;var r=K.p;K.p=2;var f=Be;Be|=4;try{_p(e,i.alternate,i)}finally{Be=f,K.p=r,I.T=s}}Nt=3}}function Wp(){if(Nt===4||Nt===3){Nt=0,Ds();var e=Ni,i=ts,s=ni,r=Bp;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Nt=5:(Nt=0,ts=Ni=null,eg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ji=null),hc(s),i=i.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(Vi,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=I.T,f=K.p,K.p=2,I.T=null;try{for(var h=e.onRecoverableError,y=0;y<r.length;y++){var S=r[y];h(S.value,{componentStack:S.stack})}}finally{I.T=i,K.p=f}}(ni&3)!==0&&Ir(),Ln(e),f=e.pendingLanes,(s&261930)!==0&&(f&42)!==0?e===Vu?ml++:(ml=0,Vu=e):ml=0,pl(0)}}function eg(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,Qs(i)))}function Ir(){return Jp(),Fp(),Wp(),tg()}function tg(){if(Nt!==5)return!1;var e=Ni,i=Ku;Ku=0;var s=hc(ni),r=I.T,f=K.p;try{K.p=32>s?32:s,I.T=null,s=Yu,Yu=null;var h=Ni,y=ni;if(Nt=0,ts=Ni=null,ni=0,(Be&6)!==0)throw Error(l(331));var S=Be;if(Be|=4,Lp(h.current),Dp(h,h.current,y,s),Be=S,pl(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(Vi,h)}catch{}return!0}finally{K.p=f,I.T=r,eg(e,i)}}function ng(e,i,s){i=dn(s,i),i=ku(e.stateNode,i,2),e=yi(e,i,2),e!==null&&(Ms(e,2),Ln(e))}function qe(e,i,s){if(e.tag===3)ng(e,e,s);else for(;i!==null;){if(i.tag===3){ng(i,e,s);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ji===null||!ji.has(r))){e=dn(s,e),s=ip(2),r=yi(i,s,2),r!==null&&(ap(s,r,i,e),Ms(r,2),Ln(r));break}}i=i.return}}function Xu(e,i,s){var r=e.pingCache;if(r===null){r=e.pingCache=new vS;var f=new Set;r.set(i,f)}else f=r.get(i),f===void 0&&(f=new Set,r.set(i,f));f.has(s)||(qu=!0,f.add(s),e=jS.bind(null,e,i,s),i.then(e,e))}function jS(e,i,s){var r=e.pingCache;r!==null&&r.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,Xe===e&&(Te&s)===s&&(rt===4||rt===3&&(Te&62914560)===Te&&300>zt()-Rr?(Be&2)===0&&ns(e,0):Hu|=s,es===Te&&(es=0)),Ln(e)}function ig(e,i){i===0&&(i=Jf()),e=ea(e,i),e!==null&&(Ms(e,i),Ln(e))}function NS(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),ig(e,s)}function kS(e,i){var s=0;switch(e.tag){case 31:case 13:var r=e.stateNode,f=e.memoizedState;f!==null&&(s=f.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}r!==null&&r.delete(i),ig(e,s)}function _S(e,i){return Ut(e,i)}var Zr=null,as=null,Ju=!1,qr=!1,Fu=!1,_i=0;function Ln(e){e!==as&&e.next===null&&(as===null?Zr=as=e:as=as.next=e),qr=!0,Ju||(Ju=!0,CS())}function pl(e,i){if(!Fu&&qr){Fu=!0;do for(var s=!1,r=Zr;r!==null;){if(e!==0){var f=r.pendingLanes;if(f===0)var h=0;else{var y=r.suspendedLanes,S=r.pingedLanes;h=(1<<31-Se(42|e)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,rg(r,h))}else h=Te,h=Yl(r,r===Xe?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||Rs(r,h)||(s=!0,rg(r,h));r=r.next}while(s);Fu=!1}}function zS(){ag()}function ag(){qr=Ju=!1;var e=0;_i!==0&&$S()&&(e=_i);for(var i=zt(),s=null,r=Zr;r!==null;){var f=r.next,h=sg(r,i);h===0?(r.next=null,s===null?Zr=f:s.next=f,f===null&&(as=s)):(s=r,(e!==0||(h&3)!==0)&&(qr=!0)),r=f}Nt!==0&&Nt!==5||pl(e),_i!==0&&(_i=0)}function sg(e,i){for(var s=e.suspendedLanes,r=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-Se(h),S=1<<y,_=f[y];_===-1?((S&s)===0||(S&r)!==0)&&(f[y]=ex(S,i)):_<=i&&(e.expiredLanes|=S),h&=~S}if(i=Xe,s=Te,s=Yl(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,s===0||e===i&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ut(r),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||Rs(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(r!==null&&ut(r),hc(s)){case 2:case 8:s=Yi;break;case 32:s=qt;break;case 268435456:s=re;break;default:s=qt}return r=lg.bind(null,e),s=Ut(s,r),e.callbackPriority=i,e.callbackNode=s,i}return r!==null&&r!==null&&ut(r),e.callbackPriority=2,e.callbackNode=null,2}function lg(e,i){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Ir()&&e.callbackNode!==s)return null;var r=Te;return r=Yl(e,e===Xe?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Zp(e,r,i),sg(e,zt()),e.callbackNode!=null&&e.callbackNode===s?lg.bind(null,e):null)}function rg(e,i){if(Ir())return null;Zp(e,i,!0)}function CS(){IS(function(){(Be&6)!==0?Ut(Bn,zS):ag()})}function Wu(){if(_i===0){var e=Ha;e===0&&(e=Hl,Hl<<=1,(Hl&261888)===0&&(Hl=256)),_i=e}return _i}function og(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xl(""+e)}function cg(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function ES(e,i,s,r,f){if(i==="submit"&&s&&s.stateNode===f){var h=og((f[Ht]||null).action),y=r.submitter;y&&(i=(i=y[Ht]||null)?og(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new er("action","action",null,r,f);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(_i!==0){var _=y?cg(f,y):new FormData(f);bu(s,{pending:!0,data:_,method:f.method,action:h},null,_)}}else typeof h=="function"&&(S.preventDefault(),_=y?cg(f,y):new FormData(f),bu(s,{pending:!0,data:_,method:f.method,action:h},h,_))},currentTarget:f}]})}}for(var ed=0;ed<Lc.length;ed++){var td=Lc[ed],AS=td.toLowerCase(),OS=td[0].toUpperCase()+td.slice(1);Nn(AS,"on"+OS)}Nn(Ih,"onAnimationEnd"),Nn(Zh,"onAnimationIteration"),Nn(qh,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(Vx,"onTransitionRun"),Nn(Px,"onTransitionStart"),Nn(Qx,"onTransitionCancel"),Nn(Hh,"onTransitionEnd"),Ea("onMouseEnter",["mouseout","mouseover"]),Ea("onMouseLeave",["mouseout","mouseover"]),Ea("onPointerEnter",["pointerout","pointerover"]),Ea("onPointerLeave",["pointerout","pointerover"]),Xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="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(" "),TS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gl));function ug(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],f=r.event;r=r.listeners;e:{var h=void 0;if(i)for(var y=r.length-1;0<=y;y--){var S=r[y],_=S.instance,$=S.currentTarget;if(S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=$;try{h(f)}catch(P){ir(P)}f.currentTarget=null,h=_}else for(y=0;y<r.length;y++){if(S=r[y],_=S.instance,$=S.currentTarget,S=S.listener,_!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=$;try{h(f)}catch(P){ir(P)}f.currentTarget=null,h=_}}}}function Ae(e,i){var s=i[mc];s===void 0&&(s=i[mc]=new Set);var r=e+"__bubble";s.has(r)||(dg(i,e,2,!1),s.add(r))}function nd(e,i,s){var r=0;i&&(r|=4),dg(s,e,r,i)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function id(e){if(!e[Hr]){e[Hr]=!0,ah.forEach(function(s){s!=="selectionchange"&&(TS.has(s)||nd(s,!1,e),nd(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[Hr]||(i[Hr]=!0,nd("selectionchange",!1,i))}}function dg(e,i,s,r){switch(Ig(i)){case 2:var f=lw;break;case 8:f=rw;break;default:f=vd}s=f.bind(null,i,s,e),f=void 0,!jc||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),r?f!==void 0?e.addEventListener(i,s,{capture:!0,passive:f}):e.addEventListener(i,s,!0):f!==void 0?e.addEventListener(i,s,{passive:f}):e.addEventListener(i,s,!1)}function ad(e,i,s,r,f){var h=r;if((i&1)===0&&(i&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var S=r.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=r.return;y!==null;){var _=y.tag;if((_===3||_===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=_a(S),y===null)return;if(_=y.tag,_===5||_===6||_===26||_===27){r=h=y;continue e}S=S.parentNode}}r=r.return}gh(function(){var $=h,P=Sc(s),W=[];e:{var B=Gh.get(e);if(B!==void 0){var G=er,he=e;switch(e){case"keypress":if(Fl(s)===0)break e;case"keydown":case"keyup":G=kx;break;case"focusin":he="focus",G=zc;break;case"focusout":he="blur",G=zc;break;case"beforeblur":case"afterblur":G=zc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=bh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=hx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=Cx;break;case Ih:case Zh:case qh:G=gx;break;case Hh:G=Ax;break;case"scroll":case"scrollend":G=dx;break;case"wheel":G=Tx;break;case"copy":case"cut":case"paste":G=vx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=Sh;break;case"toggle":case"beforetoggle":G=Rx}var xe=(i&4)!==0,Pe=!xe&&(e==="scroll"||e==="scrollend"),M=xe?B!==null?B+"Capture":null:B;xe=[];for(var E=$,U;E!==null;){var J=E;if(U=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||U===null||M===null||(J=$s(E,M),J!=null&&xe.push(yl(E,J,U))),Pe)break;E=E.return}0<xe.length&&(B=new G(B,he,null,s,P),W.push({event:B,listeners:xe}))}}if((i&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",B&&s!==xc&&(he=s.relatedTarget||s.fromElement)&&(_a(he)||he[ka]))break e;if((G||B)&&(B=P.window===P?P:(B=P.ownerDocument)?B.defaultView||B.parentWindow:window,G?(he=s.relatedTarget||s.toElement,G=$,he=he?_a(he):null,he!==null&&(Pe=u(he),xe=he.tag,he!==Pe||xe!==5&&xe!==27&&xe!==6)&&(he=null)):(G=null,he=$),G!==he)){if(xe=bh,J="onMouseLeave",M="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(xe=Sh,J="onPointerLeave",M="onPointerEnter",E="pointer"),Pe=G==null?B:Us(G),U=he==null?B:Us(he),B=new xe(J,E+"leave",G,s,P),B.target=Pe,B.relatedTarget=U,J=null,_a(P)===$&&(xe=new xe(M,E+"enter",he,s,P),xe.target=U,xe.relatedTarget=Pe,J=xe),Pe=J,G&&he)t:{for(xe=DS,M=G,E=he,U=0,J=M;J;J=xe(J))U++;J=0;for(var ve=E;ve;ve=xe(ve))J++;for(;0<U-J;)M=xe(M),U--;for(;0<J-U;)E=xe(E),J--;for(;U--;){if(M===E||E!==null&&M===E.alternate){xe=M;break t}M=xe(M),E=xe(E)}xe=null}else xe=null;G!==null&&fg(W,B,G,xe,!1),he!==null&&Pe!==null&&fg(W,Pe,he,xe,!0)}}e:{if(B=$?Us($):window,G=B.nodeName&&B.nodeName.toLowerCase(),G==="select"||G==="input"&&B.type==="file")var Ue=Eh;else if(zh(B))if(Ah)Ue=Gx;else{Ue=qx;var ge=Zx}else G=B.nodeName,!G||G.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?$&&bc($.elementType)&&(Ue=Eh):Ue=Hx;if(Ue&&(Ue=Ue(e,$))){Ch(W,Ue,s,P);break e}ge&&ge(e,B,$),e==="focusout"&&$&&B.type==="number"&&$.memoizedProps.value!=null&&vc(B,"number",B.value)}switch(ge=$?Us($):window,e){case"focusin":(zh(ge)||ge.contentEditable==="true")&&(Ma=ge,Dc=$,Ys=null);break;case"focusout":Ys=Dc=Ma=null;break;case"mousedown":Rc=!0;break;case"contextmenu":case"mouseup":case"dragend":Rc=!1,$h(W,s,P);break;case"selectionchange":if(Yx)break;case"keydown":case"keyup":$h(W,s,P)}var _e;if(Ec)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Ra?kh(e,s)&&(De="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(De="onCompositionStart");De&&(wh&&s.locale!=="ko"&&(Ra||De!=="onCompositionStart"?De==="onCompositionEnd"&&Ra&&(_e=yh()):(ui=P,Nc="value"in ui?ui.value:ui.textContent,Ra=!0)),ge=Gr($,De),0<ge.length&&(De=new xh(De,e,null,s,P),W.push({event:De,listeners:ge}),_e?De.data=_e:(_e=_h(s),_e!==null&&(De.data=_e)))),(_e=Lx?Ux(e,s):$x(e,s))&&(De=Gr($,"onBeforeInput"),0<De.length&&(ge=new xh("onBeforeInput","beforeinput",null,s,P),W.push({event:ge,listeners:De}),ge.data=_e)),ES(W,e,$,s,P)}ug(W,i)})}function yl(e,i,s){return{instance:e,listener:i,currentTarget:s}}function Gr(e,i){for(var s=i+"Capture",r=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=$s(e,s),f!=null&&r.unshift(yl(e,f,h)),f=$s(e,i),f!=null&&r.push(yl(e,f,h))),e.tag===3)return r;e=e.return}return[]}function DS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fg(e,i,s,r,f){for(var h=i._reactName,y=[];s!==null&&s!==r;){var S=s,_=S.alternate,$=S.stateNode;if(S=S.tag,_!==null&&_===r)break;S!==5&&S!==26&&S!==27||$===null||(_=$,f?($=$s(s,h),$!=null&&y.unshift(yl(s,$,_))):f||($=$s(s,h),$!=null&&y.push(yl(s,$,_)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var RS=/\r\n?/g,MS=/\u0000|\uFFFD/g;function hg(e){return(typeof e=="string"?e:""+e).replace(RS,`
|
|
9
|
+
`).replace(MS,"")}function mg(e,i){return i=hg(i),hg(e)===i}function Ve(e,i,s,r,f,h){switch(s){case"children":typeof r=="string"?i==="body"||i==="textarea"&&r===""||Oa(e,r):(typeof r=="number"||typeof r=="bigint")&&i!=="body"&&Oa(e,""+r);break;case"className":Pl(e,"class",r);break;case"tabIndex":Pl(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Pl(e,s,r);break;case"style":mh(e,r,h);break;case"data":if(i!=="object"){Pl(e,"data",r);break}case"src":case"href":if(r===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Xl(""+r),e.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(i!=="input"&&Ve(e,i,"name",f.name,f,null),Ve(e,i,"formEncType",f.formEncType,f,null),Ve(e,i,"formMethod",f.formMethod,f,null),Ve(e,i,"formTarget",f.formTarget,f,null)):(Ve(e,i,"encType",f.encType,f,null),Ve(e,i,"method",f.method,f,null),Ve(e,i,"target",f.target,f,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Xl(""+r),e.setAttribute(s,r);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}s=Xl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""+r):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":r===!0?e.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,r):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(s,r):e.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(s):e.setAttribute(s,r);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Vl(e,"popover",r);break;case"xlinkActuate":In(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":In(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":In(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":In(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":In(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":In(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":In(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":In(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":In(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Vl(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=cx.get(s)||s,Vl(e,s,r))}}function sd(e,i,s,r,f,h){switch(s){case"style":mh(e,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(f.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"children":typeof r=="string"?Oa(e,r):(typeof r=="number"||typeof r=="bigint")&&Oa(e,""+r);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sh.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),i=s.slice(2,f?s.length-7:void 0),h=e[Ht]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(i,h,f),typeof r=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,r,f);break e}s in e?e[s]=r:r===!0?e.setAttribute(s,""):Vl(e,s,r)}}}function Rt(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var r=!1,f=!1,h;for(h in s)if(s.hasOwnProperty(h)){var y=s[h];if(y!=null)switch(h){case"src":r=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ve(e,i,h,y,s,null)}}f&&Ve(e,i,"srcSet",s.srcSet,s,null),r&&Ve(e,i,"src",s.src,s,null);return;case"input":Ae("invalid",e);var S=h=y=f=null,_=null,$=null;for(r in s)if(s.hasOwnProperty(r)){var P=s[r];if(P!=null)switch(r){case"name":f=P;break;case"type":y=P;break;case"checked":_=P;break;case"defaultChecked":$=P;break;case"value":h=P;break;case"defaultValue":S=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(137,i));break;default:Ve(e,i,r,P,s,null)}}uh(e,h,S,_,$,y,f,!1);return;case"select":Ae("invalid",e),r=y=h=null;for(f in s)if(s.hasOwnProperty(f)&&(S=s[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":r=S;default:Ve(e,i,f,S,s,null)}i=h,s=y,e.multiple=!!r,i!=null?Aa(e,!!r,i,!1):s!=null&&Aa(e,!!r,s,!0);return;case"textarea":Ae("invalid",e),h=f=r=null;for(y in s)if(s.hasOwnProperty(y)&&(S=s[y],S!=null))switch(y){case"value":r=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Ve(e,i,y,S,s,null)}fh(e,r,f,h);return;case"option":for(_ in s)s.hasOwnProperty(_)&&(r=s[_],r!=null)&&(_==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Ve(e,i,_,r,s,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(r=0;r<gl.length;r++)Ae(gl[r],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for($ in s)if(s.hasOwnProperty($)&&(r=s[$],r!=null))switch($){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ve(e,i,$,r,s,null)}return;default:if(bc(i)){for(P in s)s.hasOwnProperty(P)&&(r=s[P],r!==void 0&&sd(e,i,P,r,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(r=s[S],r!=null&&Ve(e,i,S,r,s,null))}function LS(e,i,s,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,y=null,S=null,_=null,$=null,P=null;for(G in s){var W=s[G];if(s.hasOwnProperty(G)&&W!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":_=W;default:r.hasOwnProperty(G)||Ve(e,i,G,null,r,W)}}for(var B in r){var G=r[B];if(W=s[B],r.hasOwnProperty(B)&&(G!=null||W!=null))switch(B){case"type":h=G;break;case"name":f=G;break;case"checked":$=G;break;case"defaultChecked":P=G;break;case"value":y=G;break;case"defaultValue":S=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(l(137,i));break;default:G!==W&&Ve(e,i,B,G,r,W)}}yc(e,y,S,_,$,P,h,f);return;case"select":G=y=S=B=null;for(h in s)if(_=s[h],s.hasOwnProperty(h)&&_!=null)switch(h){case"value":break;case"multiple":G=_;default:r.hasOwnProperty(h)||Ve(e,i,h,null,r,_)}for(f in r)if(h=r[f],_=s[f],r.hasOwnProperty(f)&&(h!=null||_!=null))switch(f){case"value":B=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==_&&Ve(e,i,f,h,r,_)}i=S,s=y,r=G,B!=null?Aa(e,!!s,B,!1):!!r!=!!s&&(i!=null?Aa(e,!!s,i,!0):Aa(e,!!s,s?[]:"",!1));return;case"textarea":G=B=null;for(S in s)if(f=s[S],s.hasOwnProperty(S)&&f!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ve(e,i,S,null,r,f)}for(y in r)if(f=r[y],h=s[y],r.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":B=f;break;case"defaultValue":G=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(l(91));break;default:f!==h&&Ve(e,i,y,f,r,h)}dh(e,B,G);return;case"option":for(var he in s)B=s[he],s.hasOwnProperty(he)&&B!=null&&!r.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:Ve(e,i,he,null,r,B));for(_ in r)B=r[_],G=s[_],r.hasOwnProperty(_)&&B!==G&&(B!=null||G!=null)&&(_==="selected"?e.selected=B&&typeof B!="function"&&typeof B!="symbol":Ve(e,i,_,B,r,G));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var xe in s)B=s[xe],s.hasOwnProperty(xe)&&B!=null&&!r.hasOwnProperty(xe)&&Ve(e,i,xe,null,r,B);for($ in r)if(B=r[$],G=s[$],r.hasOwnProperty($)&&B!==G&&(B!=null||G!=null))switch($){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(l(137,i));break;default:Ve(e,i,$,B,r,G)}return;default:if(bc(i)){for(var Pe in s)B=s[Pe],s.hasOwnProperty(Pe)&&B!==void 0&&!r.hasOwnProperty(Pe)&&sd(e,i,Pe,void 0,r,B);for(P in r)B=r[P],G=s[P],!r.hasOwnProperty(P)||B===G||B===void 0&&G===void 0||sd(e,i,P,B,r,G);return}}for(var M in s)B=s[M],s.hasOwnProperty(M)&&B!=null&&!r.hasOwnProperty(M)&&Ve(e,i,M,null,r,B);for(W in r)B=r[W],G=s[W],!r.hasOwnProperty(W)||B===G||B==null&&G==null||Ve(e,i,W,B,r,G)}function pg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function US(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var f=s[r],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&pg(y)){for(y=0,S=f.responseEnd,r+=1;r<s.length;r++){var _=s[r],$=_.startTime;if($>S)break;var P=_.transferSize,W=_.initiatorType;P&&pg(W)&&(_=_.responseEnd,y+=P*(_<S?1:(S-$)/(_-$)))}if(--r,i+=8*(h+y)/(f.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ld=null,rd=null;function Kr(e){return e.nodeType===9?e:e.ownerDocument}function gg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function yg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function od(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var cd=null;function $S(){var e=window.event;return e&&e.type==="popstate"?e===cd?!1:(cd=e,!0):(cd=null,!1)}var vg=typeof setTimeout=="function"?setTimeout:void 0,BS=typeof clearTimeout=="function"?clearTimeout:void 0,bg=typeof Promise=="function"?Promise:void 0,IS=typeof queueMicrotask=="function"?queueMicrotask:typeof bg<"u"?function(e){return bg.resolve(null).then(e).catch(ZS)}:vg;function ZS(e){setTimeout(function(){throw e})}function zi(e){return e==="head"}function xg(e,i){var s=i,r=0;do{var f=s.nextSibling;if(e.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"||s==="/&"){if(r===0){e.removeChild(f),os(i);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")vl(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,vl(s);for(var h=s.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Ls]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||s.removeChild(h),h=y}}else s==="body"&&vl(e.ownerDocument.body);s=f}while(s);os(i)}function Sg(e,i){var s=e;e=0;do{var r=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=r}while(s)}function ud(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ud(s),pc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function qS(e,i,s,r){for(;e.nodeType===1;){var f=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Ls])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function HS(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=gn(e.nextSibling),e===null))return null;return e}function wg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=gn(e.nextSibling),e===null))return null;return e}function dd(e){return e.data==="$?"||e.data==="$~"}function fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function GS(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var r=function(){i(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function gn(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var hd=null;function jg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return gn(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function Ng(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function kg(e,i,s){switch(i=Kr(s),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function vl(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);pc(e)}var yn=new Map,_g=new Set;function Yr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ii=K.d;K.d={f:KS,r:YS,D:VS,C:PS,L:QS,m:XS,X:FS,S:JS,M:WS};function KS(){var e=ii.f(),i=Ur();return e||i}function YS(e){var i=za(e);i!==null&&i.tag===5&&i.type==="form"?Hm(i):ii.r(e)}var ss=typeof document>"u"?null:document;function zg(e,i,s){var r=ss;if(r&&typeof i=="string"&&i){var f=cn(i);f='link[rel="'+e+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),_g.has(f)||(_g.add(f),e={rel:e,crossOrigin:s,href:i},r.querySelector(f)===null&&(i=r.createElement("link"),Rt(i,"link",e),Ct(i),r.head.appendChild(i)))}}function VS(e){ii.D(e),zg("dns-prefetch",e,null)}function PS(e,i){ii.C(e,i),zg("preconnect",e,i)}function QS(e,i,s){ii.L(e,i,s);var r=ss;if(r&&e&&i){var f='link[rel="preload"][as="'+cn(i)+'"]';i==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+cn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+cn(s.imageSizes)+'"]')):f+='[href="'+cn(e)+'"]';var h=f;switch(i){case"style":h=ls(e);break;case"script":h=rs(e)}yn.has(h)||(e=v({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),yn.set(h,e),r.querySelector(f)!==null||i==="style"&&r.querySelector(bl(h))||i==="script"&&r.querySelector(xl(h))||(i=r.createElement("link"),Rt(i,"link",e),Ct(i),r.head.appendChild(i)))}}function XS(e,i){ii.m(e,i);var s=ss;if(s&&e){var r=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+cn(r)+'"][href="'+cn(e)+'"]',h=f;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=rs(e)}if(!yn.has(h)&&(e=v({rel:"modulepreload",href:e},i),yn.set(h,e),s.querySelector(f)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(xl(h)))return}r=s.createElement("link"),Rt(r,"link",e),Ct(r),s.head.appendChild(r)}}}function JS(e,i,s){ii.S(e,i,s);var r=ss;if(r&&e){var f=Ca(r).hoistableStyles,h=ls(e);i=i||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=r.querySelector(bl(h)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":i},s),(s=yn.get(h))&&md(e,s);var _=y=r.createElement("link");Ct(_),Rt(_,"link",e),_._p=new Promise(function($,P){_.onload=$,_.onerror=P}),_.addEventListener("load",function(){S.loading|=1}),_.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Vr(y,i,r)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function FS(e,i){ii.X(e,i);var s=ss;if(s&&e){var r=Ca(s).hoistableScripts,f=rs(e),h=r.get(f);h||(h=s.querySelector(xl(f)),h||(e=v({src:e,async:!0},i),(i=yn.get(f))&&pd(e,i),h=s.createElement("script"),Ct(h),Rt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function WS(e,i){ii.M(e,i);var s=ss;if(s&&e){var r=Ca(s).hoistableScripts,f=rs(e),h=r.get(f);h||(h=s.querySelector(xl(f)),h||(e=v({src:e,async:!0,type:"module"},i),(i=yn.get(f))&&pd(e,i),h=s.createElement("script"),Ct(h),Rt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(f,h))}}function Cg(e,i,s,r){var f=(f=fe.current)?Yr(f):null;if(!f)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=ls(s.href),s=Ca(f).hoistableStyles,r=s.get(i),r||(r={type:"style",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ls(s.href);var h=Ca(f).hoistableStyles,y=h.get(e);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=f.querySelector(bl(e)))&&!h._p&&(y.instance=h,y.state.loading=5),yn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},yn.set(e,s),h||ew(f,e,s,y.state))),i&&r===null)throw Error(l(528,""));return y}if(i&&r!==null)throw Error(l(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=rs(s),s=Ca(f).hoistableScripts,r=s.get(i),r||(r={type:"script",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function ls(e){return'href="'+cn(e)+'"'}function bl(e){return'link[rel="stylesheet"]['+e+"]"}function Eg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function ew(e,i,s,r){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?r.loading=1:(i=e.createElement("link"),r.preload=i,i.addEventListener("load",function(){return r.loading|=1}),i.addEventListener("error",function(){return r.loading|=2}),Rt(i,"link",s),Ct(i),e.head.appendChild(i))}function rs(e){return'[src="'+cn(e)+'"]'}function xl(e){return"script[async]"+e}function Ag(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var r=e.querySelector('style[data-href~="'+cn(s.href)+'"]');if(r)return i.instance=r,Ct(r),r;var f=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Ct(r),Rt(r,"style",f),Vr(r,s.precedence,e),i.instance=r;case"stylesheet":f=ls(s.href);var h=e.querySelector(bl(f));if(h)return i.state.loading|=4,i.instance=h,Ct(h),h;r=Eg(s),(f=yn.get(f))&&md(r,f),h=(e.ownerDocument||e).createElement("link"),Ct(h);var y=h;return y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Rt(h,"link",r),i.state.loading|=4,Vr(h,s.precedence,e),i.instance=h;case"script":return h=rs(s.src),(f=e.querySelector(xl(h)))?(i.instance=f,Ct(f),f):(r=s,(f=yn.get(h))&&(r=v({},s),pd(r,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ct(f),Rt(f,"link",r),e.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(r=i.instance,i.state.loading|=4,Vr(r,s.precedence,e));return i.instance}function Vr(e,i,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=r.length?r[r.length-1]:null,h=f,y=0;y<r.length;y++){var S=r[y];if(S.dataset.precedence===i)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function md(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function pd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Pr=null;function Og(e,i,s){if(Pr===null){var r=new Map,f=Pr=new Map;f.set(s,r)}else f=Pr,r=f.get(s),r||(r=new Map,f.set(s,r));if(r.has(e))return r;for(r.set(e,null),s=s.getElementsByTagName(e),f=0;f<s.length;f++){var h=s[f];if(!(h[Ls]||h[At]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=e+y;var S=r.get(y);S?S.push(h):r.set(y,[h])}}return r}function Tg(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function tw(e,i,s){if(s===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Dg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function nw(e,i,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var f=ls(r.href),h=i.querySelector(bl(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Qr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=h,Ct(h);return}h=i.ownerDocument||i,r=Eg(r),(f=yn.get(f))&&md(r,f),h=h.createElement("link"),Ct(h);var y=h;y._p=new Promise(function(S,_){y.onload=S,y.onerror=_}),Rt(h,"link",r),s.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Qr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var gd=0;function iw(e,i){return e.stylesheets&&e.count===0&&Jr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var r=setTimeout(function(){if(e.stylesheets&&Jr(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+i);0<e.imgBytes&&gd===0&&(gd=62500*US());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Jr(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>gd?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(f)}}:null}function Qr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xr=null;function Jr(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xr=new Map,i.forEach(aw,e),Xr=null,Qr.call(e))}function aw(e,i){if(!(i.state.loading&4)){var s=Xr.get(e);if(s)var r=s.get(null);else{s=new Map,Xr.set(e,s);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),r=y)}r&&s.set(null,r)}f=i.instance,y=f.getAttribute("data-precedence"),h=s.get(y)||r,h===r&&s.set(null,f),s.set(y,f),this.count++,r=Qr.bind(this),f.addEventListener("load",r),f.addEventListener("error",r),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),i.state.loading|=4}}var Sl={$$typeof:O,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function sw(e,i,s,r,f,h,y,S,_){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.hiddenUpdates=dc(null),this.identifierPrefix=r,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Rg(e,i,s,r,f,h,y,S,_,$,P,W){return e=new sw(e,i,s,y,_,$,P,W,S),i=1,h===!0&&(i|=24),h=Ft(3,null,null,i),e.current=h,h.stateNode=e,i=Qc(),i.refCount++,e.pooledCache=i,i.refCount++,h.memoizedState={element:r,isDehydrated:s,cache:i},Wc(h),e}function Mg(e){return e?(e=$a,e):$a}function Lg(e,i,s,r,f,h){f=Mg(f),r.context===null?r.context=f:r.pendingContext=f,r=gi(i),r.payload={element:s},h=h===void 0?null:h,h!==null&&(r.callback=h),s=yi(e,r,i),s!==null&&(Qt(s,e,i),Ws(s,e,i))}function Ug(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function yd(e,i){Ug(e,i),(e=e.alternate)&&Ug(e,i)}function $g(e){if(e.tag===13||e.tag===31){var i=ea(e,67108864);i!==null&&Qt(i,e,67108864),yd(e,67108864)}}function Bg(e){if(e.tag===13||e.tag===31){var i=an();i=fc(i);var s=ea(e,i);s!==null&&Qt(s,e,i),yd(e,i)}}var Fr=!0;function lw(e,i,s,r){var f=I.T;I.T=null;var h=K.p;try{K.p=2,vd(e,i,s,r)}finally{K.p=h,I.T=f}}function rw(e,i,s,r){var f=I.T;I.T=null;var h=K.p;try{K.p=8,vd(e,i,s,r)}finally{K.p=h,I.T=f}}function vd(e,i,s,r){if(Fr){var f=bd(r);if(f===null)ad(e,i,r,Wr,s),Zg(e,r);else if(cw(f,e,i,s,r))r.stopPropagation();else if(Zg(e,r),i&4&&-1<ow.indexOf(e)){for(;f!==null;){var h=za(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Qi(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var _=1<<31-Se(y);S.entanglements[1]|=_,y&=~_}Ln(h),(Be&6)===0&&(Mr=zt()+500,pl(0))}}break;case 31:case 13:S=ea(h,2),S!==null&&Qt(S,h,2),Ur(),yd(h,2)}if(h=bd(r),h===null&&ad(e,i,r,Wr,s),h===f)break;f=h}f!==null&&r.stopPropagation()}else ad(e,i,r,null,s)}}function bd(e){return e=Sc(e),xd(e)}var Wr=null;function xd(e){if(Wr=null,e=_a(e),e!==null){var i=u(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=d(i),e!==null)return e;e=null}else if(s===31){if(e=m(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Wr=e,null}function Ig(e){switch(e){case"beforetoggle":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"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ki()){case Bn:return 2;case Yi:return 8;case qt:case Na:return 32;case re:return 268435456;default:return 32}default:return 32}}var Sd=!1,Ci=null,Ei=null,Ai=null,wl=new Map,jl=new Map,Oi=[],ow="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Zg(e,i){switch(e){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Ei=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":wl.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":jl.delete(i.pointerId)}}function Nl(e,i,s,r,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:i,domEventName:s,eventSystemFlags:r,nativeEvent:h,targetContainers:[f]},i!==null&&(i=za(i),i!==null&&$g(i)),e):(e.eventSystemFlags|=r,i=e.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),e)}function cw(e,i,s,r,f){switch(i){case"focusin":return Ci=Nl(Ci,e,i,s,r,f),!0;case"dragenter":return Ei=Nl(Ei,e,i,s,r,f),!0;case"mouseover":return Ai=Nl(Ai,e,i,s,r,f),!0;case"pointerover":var h=f.pointerId;return wl.set(h,Nl(wl.get(h)||null,e,i,s,r,f)),!0;case"gotpointercapture":return h=f.pointerId,jl.set(h,Nl(jl.get(h)||null,e,i,s,r,f)),!0}return!1}function qg(e){var i=_a(e.target);if(i!==null){var s=u(i);if(s!==null){if(i=s.tag,i===13){if(i=d(s),i!==null){e.blockedOn=i,nh(e.priority,function(){Bg(s)});return}}else if(i===31){if(i=m(s),i!==null){e.blockedOn=i,nh(e.priority,function(){Bg(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eo(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=bd(e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);xc=r,s.target.dispatchEvent(r),xc=null}else return i=za(s),i!==null&&$g(i),e.blockedOn=s,!1;i.shift()}return!0}function Hg(e,i,s){eo(e)&&s.delete(i)}function uw(){Sd=!1,Ci!==null&&eo(Ci)&&(Ci=null),Ei!==null&&eo(Ei)&&(Ei=null),Ai!==null&&eo(Ai)&&(Ai=null),wl.forEach(Hg),jl.forEach(Hg)}function to(e,i){e.blockedOn===i&&(e.blockedOn=null,Sd||(Sd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uw)))}var no=null;function Gg(e){no!==e&&(no=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){no===e&&(no=null);for(var i=0;i<e.length;i+=3){var s=e[i],r=e[i+1],f=e[i+2];if(typeof r!="function"){if(xd(r||s)===null)continue;break}var h=za(s);h!==null&&(e.splice(i,3),i-=3,bu(h,{pending:!0,data:f,method:s.method,action:r},r,f))}}))}function os(e){function i(_){return to(_,e)}Ci!==null&&to(Ci,e),Ei!==null&&to(Ei,e),Ai!==null&&to(Ai,e),wl.forEach(i),jl.forEach(i);for(var s=0;s<Oi.length;s++){var r=Oi[s];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Oi.length&&(s=Oi[0],s.blockedOn===null);)qg(s),s.blockedOn===null&&Oi.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var f=s[r],h=s[r+1],y=f[Ht]||null;if(typeof h=="function")y||Gg(s);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[Ht]||null)S=y.formAction;else if(xd(f)!==null)continue}else S=y.action;typeof S=="function"?s[r+1]=S:(s.splice(r,3),r-=3),Gg(s)}}}function Kg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function wd(e){this._internalRoot=e}io.prototype.render=wd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,r=an();Lg(s,r,e,i,null,null)},io.prototype.unmount=wd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Lg(e.current,2,null,e,null,null),Ur(),i[ka]=null}};function io(e){this._internalRoot=e}io.prototype.unstable_scheduleHydration=function(e){if(e){var i=th();e={blockedOn:null,target:e,priority:i};for(var s=0;s<Oi.length&&i!==0&&i<Oi[s].priority;s++);Oi.splice(s,0,e),s===0&&qg(e)}};var Yg=n.version;if(Yg!=="19.2.4")throw Error(l(527,Yg,"19.2.4"));K.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=g(i),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var dw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ao=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ao.isDisabled&&ao.supportsFiber)try{Vi=ao.inject(dw),Mt=ao}catch{}}return _l.createRoot=function(e,i){if(!o(e))throw Error(l(299));var s=!1,r="",f=Wm,h=ep,y=tp;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Rg(e,1,!1,null,null,s,r,null,f,h,y,Kg),e[ka]=i.current,id(e),new wd(i)},_l.hydrateRoot=function(e,i,s){if(!o(e))throw Error(l(299));var r=!1,f="",h=Wm,y=ep,S=tp,_=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(_=s.formState)),i=Rg(e,1,!0,i,s??null,r,f,_,h,y,S,Kg),i.context=Mg(null),s=i.current,r=an(),r=fc(r),f=gi(r),f.callback=null,yi(s,f,r),s=r,i.current.lanes=s,Ms(i,s),Ln(i),e[ka]=i.current,id(e),new io(i)},_l.version="19.2.4",_l}var ny;function ww(){if(ny)return kd.exports;ny=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),kd.exports=Sw(),kd.exports}var jw=ww();const hf=Symbol.for("yaml.alias"),Pd=Symbol.for("yaml.document"),$i=Symbol.for("yaml.map"),gv=Symbol.for("yaml.pair"),$n=Symbol.for("yaml.scalar"),Cs=Symbol.for("yaml.seq"),xn=Symbol.for("yaml.node.type"),ba=t=>!!t&&typeof t=="object"&&t[xn]===hf,qo=t=>!!t&&typeof t=="object"&&t[xn]===Pd,Bl=t=>!!t&&typeof t=="object"&&t[xn]===$i,gt=t=>!!t&&typeof t=="object"&&t[xn]===gv,Je=t=>!!t&&typeof t=="object"&&t[xn]===$n,Il=t=>!!t&&typeof t=="object"&&t[xn]===Cs;function ht(t){if(t&&typeof t=="object")switch(t[xn]){case $i:case Cs:return!0}return!1}function pt(t){if(t&&typeof t=="object")switch(t[xn]){case hf:case $i:case $n:case Cs:return!0}return!1}const yv=t=>(Je(t)||ht(t))&&!!t.anchor,ma=Symbol("break visit"),Nw=Symbol("skip children"),Ol=Symbol("remove node");function Es(t,n){const a=kw(n);qo(t)?ms(null,t.contents,a,Object.freeze([t]))===Ol&&(t.contents=null):ms(null,t,a,Object.freeze([]))}Es.BREAK=ma;Es.SKIP=Nw;Es.REMOVE=Ol;function ms(t,n,a,l){const o=_w(t,n,a,l);if(pt(o)||gt(o))return zw(t,l,o),ms(t,o,a,l);if(typeof o!="symbol"){if(ht(n)){l=Object.freeze(l.concat(n));for(let u=0;u<n.items.length;++u){const d=ms(u,n.items[u],a,l);if(typeof d=="number")u=d-1;else{if(d===ma)return ma;d===Ol&&(n.items.splice(u,1),u-=1)}}}else if(gt(n)){l=Object.freeze(l.concat(n));const u=ms("key",n.key,a,l);if(u===ma)return ma;u===Ol&&(n.key=null);const d=ms("value",n.value,a,l);if(d===ma)return ma;d===Ol&&(n.value=null)}}return o}function kw(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function _w(t,n,a,l){if(typeof a=="function")return a(t,n,l);if(Bl(n))return a.Map?.(t,n,l);if(Il(n))return a.Seq?.(t,n,l);if(gt(n))return a.Pair?.(t,n,l);if(Je(n))return a.Scalar?.(t,n,l);if(ba(n))return a.Alias?.(t,n,l)}function zw(t,n,a){const l=n[n.length-1];if(ht(l))l.items[t]=a;else if(gt(l))t==="key"?l.key=a:l.value=a;else if(qo(l))l.contents=a;else{const o=ba(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const Cw={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Ew=t=>t.replace(/[!,[\]{}]/g,n=>Cw[n]);class It{constructor(n,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},It.defaultYaml,n),this.tags=Object.assign({},It.defaultTags,a)}clone(){const n=new It(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new It(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:It.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},It.defaultTags);break}return n}add(n,a){this.atNextDocument&&(this.yaml={explicit:It.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},It.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),o=l.shift();switch(o){case"%TAG":{if(l.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[u,d]=l;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;const[u]=l;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return a(6,`Unsupported YAML version ${u}`,d),!1}}default:return a(0,`Unknown directive ${o}`,!0),!1}}tagName(n,a){if(n==="!")return"!";if(n[0]!=="!")return a(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(a(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&a("Verbatim tags must end with a >"),d)}const[,l,o]=n.match(/^(.*!)([^!]*)$/s);o||a(`The ${n} tag has no suffix`);const u=this.tags[l];if(u)try{return u+decodeURIComponent(o)}catch(d){return a(String(d)),null}return l==="!"?n:(a(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[a,l]of Object.entries(this.tags))if(n.startsWith(l))return a+Ew(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let o;if(n&&l.length>0&&pt(n.contents)){const u={};Es(n.contents,(d,m)=>{pt(m)&&m.tag&&(u[m.tag]=!0)}),o=Object.keys(u)}else o=[];for(const[u,d]of l)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||o.some(m=>m.startsWith(d)))&&a.push(`%TAG ${u} ${d}`);return a.join(`
|
|
10
|
+
`)}}It.defaultYaml={explicit:!1,version:"1.2"};It.defaultTags={"!!":"tag:yaml.org,2002:"};function vv(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const a=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(a)}return!0}function bv(t){const n=new Set;return Es(t,{Value(a,l){l.anchor&&n.add(l.anchor)}}),n}function xv(t,n){for(let a=1;;++a){const l=`${t}${a}`;if(!n.has(l))return l}}function Aw(t,n){const a=[],l=new Map;let o=null;return{onAnchor:u=>{a.push(u),o??(o=bv(t));const d=xv(n,o);return o.add(d),d},setAnchors:()=>{for(const u of a){const d=l.get(u);if(typeof d=="object"&&d.anchor&&(Je(d.node)||ht(d.node)))d.node.anchor=d.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=u,m}}},sourceObjects:l}}function ps(t,n,a,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,u=l.length;o<u;++o){const d=l[o],m=ps(t,l,String(o),d);m===void 0?delete l[o]:m!==d&&(l[o]=m)}else if(l instanceof Map)for(const o of Array.from(l.keys())){const u=l.get(o),d=ps(t,l,o,u);d===void 0?l.delete(o):d!==u&&l.set(o,d)}else if(l instanceof Set)for(const o of Array.from(l)){const u=ps(t,l,o,o);u===void 0?l.delete(o):u!==o&&(l.delete(o),l.add(u))}else for(const[o,u]of Object.entries(l)){const d=ps(t,l,o,u);d===void 0?delete l[o]:d!==u&&(l[o]=d)}return t.call(n,a,l)}function bn(t,n,a){if(Array.isArray(t))return t.map((l,o)=>bn(l,String(o),a));if(t&&typeof t.toJSON=="function"){if(!a||!yv(t))return t.toJSON(n,a);const l={aliasCount:0,count:1,res:void 0};a.anchors.set(t,l),a.onCreate=u=>{l.res=u,delete a.onCreate};const o=t.toJSON(n,a);return a.onCreate&&a.onCreate(o),o}return typeof t=="bigint"&&!a?.keep?Number(t):t}class mf{constructor(n){Object.defineProperty(this,xn,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:a,maxAliasCount:l,onAnchor:o,reviver:u}={}){if(!qo(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},m=bn(this,"",d);if(typeof o=="function")for(const{count:p,res:g}of d.anchors.values())o(g,p);return typeof u=="function"?ps(u,{"":m},"",m):m}}class pf extends mf{constructor(n){super(hf),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,a){let l;a?.aliasResolveCache?l=a.aliasResolveCache:(l=[],Es(n,{Node:(u,d)=>{(ba(d)||yv(d))&&l.push(d)}}),a&&(a.aliasResolveCache=l));let o;for(const u of l){if(u===this)break;u.anchor===this.source&&(o=u)}return o}toJSON(n,a){if(!a)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:u}=a,d=this.resolve(o,a);if(!d){const p=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(p)}let m=l.get(d);if(m||(bn(d,null,a),m=l.get(d)),m?.res===void 0){const p="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(p)}if(u>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=No(o,d,l)),m.count*m.aliasCount>u)){const p="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(p)}return m.res}toString(n,a,l){const o=`*${this.source}`;if(n){if(vv(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${o} `}return o}}function No(t,n,a){if(ba(n)){const l=n.resolve(t),o=a&&l&&a.get(l);return o?o.count*o.aliasCount:0}else if(ht(n)){let l=0;for(const o of n.items){const u=No(t,o,a);u>l&&(l=u)}return l}else if(gt(n)){const l=No(t,n.key,a),o=No(t,n.value,a);return Math.max(l,o)}return 1}const Sv=t=>!t||typeof t!="function"&&typeof t!="object";class Ne extends mf{constructor(n){super($n),this.value=n}toJSON(n,a){return a?.keep?this.value:bn(this.value,n,a)}toString(){return String(this.value)}}Ne.BLOCK_FOLDED="BLOCK_FOLDED";Ne.BLOCK_LITERAL="BLOCK_LITERAL";Ne.PLAIN="PLAIN";Ne.QUOTE_DOUBLE="QUOTE_DOUBLE";Ne.QUOTE_SINGLE="QUOTE_SINGLE";const Ow="tag:yaml.org,2002:";function Tw(t,n,a){if(n){const l=a.filter(u=>u.tag===n),o=l.find(u=>!u.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return a.find(l=>l.identify?.(t)&&!l.format)}function Dl(t,n,a){if(qo(t)&&(t=t.contents),pt(t))return t;if(gt(t)){const v=a.schema[$i].createNode?.(a.schema,null,a);return v.items.push(t),v}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:u,schema:d,sourceObjects:m}=a;let p;if(l&&t&&typeof t=="object"){if(p=m.get(t),p)return p.anchor??(p.anchor=o(t)),new pf(p.anchor);p={anchor:null,node:null},m.set(t,p)}n?.startsWith("!!")&&(n=Ow+n.slice(2));let g=Tw(t,n,d.tags);if(!g){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const v=new Ne(t);return p&&(p.node=v),v}g=t instanceof Map?d[$i]:Symbol.iterator in Object(t)?d[Cs]:d[$i]}u&&(u(g),delete a.onTagObj);const b=g?.createNode?g.createNode(a.schema,t,a):typeof g?.nodeClass?.from=="function"?g.nodeClass.from(a.schema,t,a):new Ne(t);return n?b.tag=n:g.default||(b.tag=g.tag),p&&(p.node=b),b}function Eo(t,n,a){let l=a;for(let o=n.length-1;o>=0;--o){const u=n[o];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=l,l=d}else l=new Map([[u,l]])}return Dl(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const El=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class wv extends mf{constructor(n,a){super(n),Object.defineProperty(this,"schema",{value:a,configurable:!0,enumerable:!1,writable:!0})}clone(n){const a=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(a.schema=n),a.items=a.items.map(l=>pt(l)||gt(l)?l.clone(n):l),this.range&&(a.range=this.range.slice()),a}addIn(n,a){if(El(n))this.add(a);else{const[l,...o]=n,u=this.get(l,!0);if(ht(u))u.addIn(o,a);else if(u===void 0&&this.schema)this.set(l,Eo(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}deleteIn(n){const[a,...l]=n;if(l.length===0)return this.delete(a);const o=this.get(a,!0);if(ht(o))return o.deleteIn(l);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${l}`)}getIn(n,a){const[l,...o]=n,u=this.get(l,!0);return o.length===0?!a&&Je(u)?u.value:u:ht(u)?u.getIn(o,a):void 0}hasAllNullValues(n){return this.items.every(a=>{if(!gt(a))return!1;const l=a.value;return l==null||n&&Je(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[a,...l]=n;if(l.length===0)return this.has(a);const o=this.get(a,!0);return ht(o)?o.hasIn(l):!1}setIn(n,a){const[l,...o]=n;if(o.length===0)this.set(l,a);else{const u=this.get(l,!0);if(ht(u))u.setIn(o,a);else if(u===void 0&&this.schema)this.set(l,Eo(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const Dw=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function si(t,n){return/^\n+$/.test(t)?t.substring(1):n?t.replace(/^(?! *$)/gm,n):t}const pa=(t,n,a)=>t.endsWith(`
|
|
11
|
+
`)?si(a,n):a.includes(`
|
|
12
|
+
`)?`
|
|
13
|
+
`+si(a,n):(t.endsWith(" ")?"":" ")+a,jv="flow",Qd="block",ko="quoted";function Ho(t,n,a="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:u=20,onFold:d,onOverflow:m}={}){if(!o||o<0)return t;o<u&&(u=0);const p=Math.max(1+u,1+o-n.length);if(t.length<=p)return t;const g=[],b={};let v=o-n.length;typeof l=="number"&&(l>o-Math.max(2,u)?g.push(0):v=o-l);let x,N,C=!1,j=-1,k=-1,A=-1;a===Qd&&(j=iy(t,j,n.length),j!==-1&&(v=j+p));for(let O;O=t[j+=1];){if(a===ko&&O==="\\"){switch(k=j,t[j+1]){case"x":j+=3;break;case"u":j+=5;break;case"U":j+=9;break;default:j+=1}A=j}if(O===`
|
|
14
|
+
`)a===Qd&&(j=iy(t,j,n.length)),v=j+n.length+p,x=void 0;else{if(O===" "&&N&&N!==" "&&N!==`
|
|
15
|
+
`&&N!==" "){const D=t[j+1];D&&D!==" "&&D!==`
|
|
16
|
+
`&&D!==" "&&(x=j)}if(j>=v)if(x)g.push(x),v=x+p,x=void 0;else if(a===ko){for(;N===" "||N===" ";)N=O,O=t[j+=1],C=!0;const D=j>A+1?j-2:k-1;if(b[D])return t;g.push(D),b[D]=!0,v=D+p,x=void 0}else C=!0}N=O}if(C&&m&&m(),g.length===0)return t;d&&d();let T=t.slice(0,g[0]);for(let O=0;O<g.length;++O){const D=g[O],L=g[O+1]||t.length;D===0?T=`
|
|
17
|
+
${n}${t.slice(0,L)}`:(a===ko&&b[D]&&(T+=`${t[D]}\\`),T+=`
|
|
18
|
+
${n}${t.slice(D+1,L)}`)}return T}function iy(t,n,a){let l=n,o=n+1,u=t[o];for(;u===" "||u===" ";)if(n<o+a)u=t[++n];else{do u=t[++n];while(u&&u!==`
|
|
19
|
+
`);l=n,o=n+1,u=t[o]}return l}const Go=(t,n)=>({indentAtStart:n?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Ko=t=>/^(%|---|\.\.\.)/m.test(t);function Rw(t,n,a){if(!n||n<0)return!1;const l=n-a,o=t.length;if(o<=l)return!1;for(let u=0,d=0;u<o;++u)if(t[u]===`
|
|
20
|
+
`){if(u-d>l)return!0;if(d=u+1,o-d<=l)return!1}return!0}function Tl(t,n){const a=JSON.stringify(t);if(n.options.doubleQuotedAsJSON)return a;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(Ko(t)?" ":"");let d="",m=0;for(let p=0,g=a[p];g;g=a[++p])if(g===" "&&a[p+1]==="\\"&&a[p+2]==="n"&&(d+=a.slice(m,p)+"\\ ",p+=1,m=p,g="\\"),g==="\\")switch(a[p+1]){case"u":{d+=a.slice(m,p);const b=a.substr(p+2,4);switch(b){case"0000":d+="\\0";break;case"0007":d+="\\a";break;case"000b":d+="\\v";break;case"001b":d+="\\e";break;case"0085":d+="\\N";break;case"00a0":d+="\\_";break;case"2028":d+="\\L";break;case"2029":d+="\\P";break;default:b.substr(0,2)==="00"?d+="\\x"+b.substr(2):d+=a.substr(p,6)}p+=5,m=p+1}break;case"n":if(l||a[p+2]==='"'||a.length<o)p+=1;else{for(d+=a.slice(m,p)+`
|
|
21
|
+
|
|
22
|
+
`;a[p+2]==="\\"&&a[p+3]==="n"&&a[p+4]!=='"';)d+=`
|
|
23
|
+
`,p+=2;d+=u,a[p+2]===" "&&(d+="\\"),p+=1,m=p+1}break;default:p+=1}return d=m?d+a.slice(m):a,l?d:Ho(d,u,ko,Go(n,!1))}function Xd(t,n){if(n.options.singleQuote===!1||n.implicitKey&&t.includes(`
|
|
24
|
+
`)||/[ \t]\n|\n[ \t]/.test(t))return Tl(t,n);const a=n.indent||(Ko(t)?" ":""),l="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
25
|
+
${a}`)+"'";return n.implicitKey?l:Ho(l,a,jv,Go(n,!1))}function gs(t,n){const{singleQuote:a}=n.options;let l;if(a===!1)l=Tl;else{const o=t.includes('"'),u=t.includes("'");o&&!u?l=Xd:u&&!o?l=Tl:l=a?Xd:Tl}return l(t,n)}let Jd;try{Jd=new RegExp(`(^|(?<!
|
|
26
|
+
))
|
|
27
|
+
+(?!
|
|
28
|
+
|$)`,"g")}catch{Jd=/\n+(?!\n|$)/g}function _o({comment:t,type:n,value:a},l,o,u){const{blockQuote:d,commentString:m,lineWidth:p}=l.options;if(!d||/\n[\t ]+$/.test(a))return gs(a,l);const g=l.indent||(l.forceBlockIndent||Ko(a)?" ":""),b=d==="literal"?!0:d==="folded"||n===Ne.BLOCK_FOLDED?!1:n===Ne.BLOCK_LITERAL?!0:!Rw(a,p,g.length);if(!a)return b?`|
|
|
29
|
+
`:`>
|
|
30
|
+
`;let v,x;for(x=a.length;x>0;--x){const L=a[x-1];if(L!==`
|
|
31
|
+
`&&L!==" "&&L!==" ")break}let N=a.substring(x);const C=N.indexOf(`
|
|
32
|
+
`);C===-1?v="-":a===N||C!==N.length-1?(v="+",u&&u()):v="",N&&(a=a.slice(0,-N.length),N[N.length-1]===`
|
|
33
|
+
`&&(N=N.slice(0,-1)),N=N.replace(Jd,`$&${g}`));let j=!1,k,A=-1;for(k=0;k<a.length;++k){const L=a[k];if(L===" ")j=!0;else if(L===`
|
|
34
|
+
`)A=k;else break}let T=a.substring(0,A<k?A+1:k);T&&(a=a.substring(T.length),T=T.replace(/\n+/g,`$&${g}`));let D=(j?g?"2":"1":"")+v;if(t&&(D+=" "+m(t.replace(/ ?[\r\n]+/g," ")),o&&o()),!b){const L=a.replace(/\n+/g,`
|
|
35
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let H=!1;const V=Go(l,!0);d!=="folded"&&n!==Ne.BLOCK_FOLDED&&(V.onOverflow=()=>{H=!0});const R=Ho(`${T}${L}${N}`,g,Qd,V);if(!H)return`>${D}
|
|
36
|
+
${g}${R}`}return a=a.replace(/\n+/g,`$&${g}`),`|${D}
|
|
37
|
+
${g}${T}${a}${N}`}function Mw(t,n,a,l){const{type:o,value:u}=t,{actualString:d,implicitKey:m,indent:p,indentStep:g,inFlow:b}=n;if(m&&u.includes(`
|
|
38
|
+
`)||b&&/[[\]{},]/.test(u))return gs(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return m||b||!u.includes(`
|
|
39
|
+
`)?gs(u,n):_o(t,n,a,l);if(!m&&!b&&o!==Ne.PLAIN&&u.includes(`
|
|
40
|
+
`))return _o(t,n,a,l);if(Ko(u)){if(p==="")return n.forceBlockIndent=!0,_o(t,n,a,l);if(m&&p===g)return gs(u,n)}const v=u.replace(/\n+/g,`$&
|
|
41
|
+
${p}`);if(d){const x=j=>j.default&&j.tag!=="tag:yaml.org,2002:str"&&j.test?.test(v),{compat:N,tags:C}=n.doc.schema;if(C.some(x)||N?.some(x))return gs(u,n)}return m?v:Ho(v,p,jv,Go(n,!1))}function gf(t,n,a,l){const{implicitKey:o,inFlow:u}=n,d=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:m}=t;m!==Ne.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(m=Ne.QUOTE_DOUBLE);const p=b=>{switch(b){case Ne.BLOCK_FOLDED:case Ne.BLOCK_LITERAL:return o||u?gs(d.value,n):_o(d,n,a,l);case Ne.QUOTE_DOUBLE:return Tl(d.value,n);case Ne.QUOTE_SINGLE:return Xd(d.value,n);case Ne.PLAIN:return Mw(d,n,a,l);default:return null}};let g=p(m);if(g===null){const{defaultKeyType:b,defaultStringType:v}=n.options,x=o&&b||v;if(g=p(x),g===null)throw new Error(`Unsupported default string type ${x}`)}return g}function Nv(t,n){const a=Object.assign({blockQuote:!0,commentString:Dw,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,n);let l;switch(a.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:t,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):" ",inFlow:l,options:a}}function Lw(t,n){if(n.tag){const o=t.filter(u=>u.tag===n.tag);if(o.length>0)return o.find(u=>u.format===n.format)??o[0]}let a,l;if(Je(n)){l=n.value;let o=t.filter(u=>u.identify?.(l));if(o.length>1){const u=o.filter(d=>d.test);u.length>0&&(o=u)}a=o.find(u=>u.format===n.format)??o.find(u=>!u.format)}else l=n,a=t.find(o=>o.nodeClass&&l instanceof o.nodeClass);if(!a){const o=l?.constructor?.name??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${o} value`)}return a}function Uw(t,n,{anchors:a,doc:l}){if(!l.directives)return"";const o=[],u=(Je(t)||ht(t))&&t.anchor;u&&vv(u)&&(a.add(u),o.push(`&${u}`));const d=t.tag??(n.default?null:n.tag);return d&&o.push(l.directives.tagString(d)),o.join(" ")}function Ns(t,n,a,l){if(gt(t))return t.toString(n,a,l);if(ba(t)){if(n.doc.directives)return t.toString(n);if(n.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(t):n.resolvedAliases=new Set([t]),t=t.resolve(n.doc)}let o;const u=pt(t)?t:n.doc.createNode(t,{onTagObj:p=>o=p});o??(o=Lw(n.doc.schema.tags,u));const d=Uw(u,o,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const m=typeof o.stringify=="function"?o.stringify(u,n,a,l):Je(u)?gf(u,n,a,l):u.toString(n,a,l);return d?Je(u)||m[0]==="{"||m[0]==="["?`${d} ${m}`:`${d}
|
|
42
|
+
${n.indent}${m}`:m}function $w({key:t,value:n},a,l,o){const{allNullValues:u,doc:d,indent:m,indentStep:p,options:{commentString:g,indentSeq:b,simpleKeys:v}}=a;let x=pt(t)&&t.comment||null;if(v){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(ht(t)||!pt(t)&&typeof t=="object"){const V="With simple keys, collection cannot be used as a key value";throw new Error(V)}}let N=!v&&(!t||x&&n==null&&!a.inFlow||ht(t)||(Je(t)?t.type===Ne.BLOCK_FOLDED||t.type===Ne.BLOCK_LITERAL:typeof t=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!N&&(v||!u),indent:m+p});let C=!1,j=!1,k=Ns(t,a,()=>C=!0,()=>j=!0);if(!N&&!a.inFlow&&k.length>1024){if(v)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");N=!0}if(a.inFlow){if(u||n==null)return C&&l&&l(),k===""?"?":N?`? ${k}`:k}else if(u&&!v||n==null&&N)return k=`? ${k}`,x&&!C?k+=pa(k,a.indent,g(x)):j&&o&&o(),k;C&&(x=null),N?(x&&(k+=pa(k,a.indent,g(x))),k=`? ${k}
|
|
43
|
+
${m}:`):(k=`${k}:`,x&&(k+=pa(k,a.indent,g(x))));let A,T,O;pt(n)?(A=!!n.spaceBefore,T=n.commentBefore,O=n.comment):(A=!1,T=null,O=null,n&&typeof n=="object"&&(n=d.createNode(n))),a.implicitKey=!1,!N&&!x&&Je(n)&&(a.indentAtStart=k.length+1),j=!1,!b&&p.length>=2&&!a.inFlow&&!N&&Il(n)&&!n.flow&&!n.tag&&!n.anchor&&(a.indent=a.indent.substring(2));let D=!1;const L=Ns(n,a,()=>D=!0,()=>j=!0);let H=" ";if(x||A||T){if(H=A?`
|
|
44
|
+
`:"",T){const V=g(T);H+=`
|
|
45
|
+
${si(V,a.indent)}`}L===""&&!a.inFlow?H===`
|
|
46
|
+
`&&O&&(H=`
|
|
47
|
+
|
|
48
|
+
`):H+=`
|
|
49
|
+
${a.indent}`}else if(!N&&ht(n)){const V=L[0],R=L.indexOf(`
|
|
50
|
+
`),Q=R!==-1,be=a.inFlow??n.flow??n.items.length===0;if(Q||!be){let X=!1;if(Q&&(V==="&"||V==="!")){let ce=L.indexOf(" ");V==="&"&&ce!==-1&&ce<R&&L[ce+1]==="!"&&(ce=L.indexOf(" ",ce+1)),(ce===-1||R<ce)&&(X=!0)}X||(H=`
|
|
51
|
+
${a.indent}`)}}else(L===""||L[0]===`
|
|
52
|
+
`)&&(H="");return k+=H+L,a.inFlow?D&&l&&l():O&&!D?k+=pa(k,a.indent,g(O)):j&&o&&o(),k}function Bw(t,n){(t==="debug"||t==="warn")&&console.warn(n)}const so="<<",li={identify:t=>t===so||typeof t=="symbol"&&t.description===so,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Ne(Symbol(so)),{addToJSMap:kv}),stringify:()=>so},Iw=(t,n)=>(li.identify(n)||Je(n)&&(!n.type||n.type===Ne.PLAIN)&&li.identify(n.value))&&t?.doc.schema.tags.some(a=>a.tag===li.tag&&a.default);function kv(t,n,a){if(a=t&&ba(a)?a.resolve(t.doc):a,Il(a))for(const l of a.items)Ed(t,n,l);else if(Array.isArray(a))for(const l of a)Ed(t,n,l);else Ed(t,n,a)}function Ed(t,n,a){const l=t&&ba(a)?a.resolve(t.doc):a;if(!Bl(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,t,Map);for(const[u,d]of o)n instanceof Map?n.has(u)||n.set(u,d):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0});return n}function _v(t,n,{key:a,value:l}){if(pt(a)&&a.addToJSMap)a.addToJSMap(t,n,l);else if(Iw(t,a))kv(t,n,l);else{const o=bn(a,"",t);if(n instanceof Map)n.set(o,bn(l,o,t));else if(n instanceof Set)n.add(o);else{const u=Zw(a,o,t),d=bn(l,u,t);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function Zw(t,n,a){if(n===null)return"";if(typeof n!="object")return String(n);if(pt(t)&&a?.doc){const l=Nv(a.doc,{});l.anchors=new Set;for(const u of a.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=t.toString(l);if(!a.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),Bw(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return o}return JSON.stringify(n)}function yf(t,n,a){const l=Dl(t,void 0,a),o=Dl(n,void 0,a);return new Zt(l,o)}class Zt{constructor(n,a=null){Object.defineProperty(this,xn,{value:gv}),this.key=n,this.value=a}clone(n){let{key:a,value:l}=this;return pt(a)&&(a=a.clone(n)),pt(l)&&(l=l.clone(n)),new Zt(a,l)}toJSON(n,a){const l=a?.mapAsMap?new Map:{};return _v(a,l,this)}toString(n,a,l){return n?.doc?$w(this,n,a,l):JSON.stringify(this)}}function zv(t,n,a){return(n.inFlow??t.flow?Hw:qw)(t,n,a)}function qw({comment:t,items:n},a,{blockItemPrefix:l,flowChars:o,itemIndent:u,onChompKeep:d,onComment:m}){const{indent:p,options:{commentString:g}}=a,b=Object.assign({},a,{indent:u,type:null});let v=!1;const x=[];for(let C=0;C<n.length;++C){const j=n[C];let k=null;if(pt(j))!v&&j.spaceBefore&&x.push(""),Ao(a,x,j.commentBefore,v),j.comment&&(k=j.comment);else if(gt(j)){const T=pt(j.key)?j.key:null;T&&(!v&&T.spaceBefore&&x.push(""),Ao(a,x,T.commentBefore,v))}v=!1;let A=Ns(j,b,()=>k=null,()=>v=!0);k&&(A+=pa(A,u,g(k))),v&&k&&(v=!1),x.push(l+A)}let N;if(x.length===0)N=o.start+o.end;else{N=x[0];for(let C=1;C<x.length;++C){const j=x[C];N+=j?`
|
|
53
|
+
${p}${j}`:`
|
|
54
|
+
`}}return t?(N+=`
|
|
55
|
+
`+si(g(t),p),m&&m()):v&&d&&d(),N}function Hw({items:t},n,{flowChars:a,itemIndent:l}){const{indent:o,indentStep:u,flowCollectionPadding:d,options:{commentString:m}}=n;l+=u;const p=Object.assign({},n,{indent:l,inFlow:!0,type:null});let g=!1,b=0;const v=[];for(let C=0;C<t.length;++C){const j=t[C];let k=null;if(pt(j))j.spaceBefore&&v.push(""),Ao(n,v,j.commentBefore,!1),j.comment&&(k=j.comment);else if(gt(j)){const T=pt(j.key)?j.key:null;T&&(T.spaceBefore&&v.push(""),Ao(n,v,T.commentBefore,!1),T.comment&&(g=!0));const O=pt(j.value)?j.value:null;O?(O.comment&&(k=O.comment),O.commentBefore&&(g=!0)):j.value==null&&T?.comment&&(k=T.comment)}k&&(g=!0);let A=Ns(j,p,()=>k=null);C<t.length-1&&(A+=","),k&&(A+=pa(A,l,m(k))),!g&&(v.length>b||A.includes(`
|
|
56
|
+
`))&&(g=!0),v.push(A),b=v.length}const{start:x,end:N}=a;if(v.length===0)return x+N;if(!g){const C=v.reduce((j,k)=>j+k.length+2,2);g=n.options.lineWidth>0&&C>n.options.lineWidth}if(g){let C=x;for(const j of v)C+=j?`
|
|
57
|
+
${u}${o}${j}`:`
|
|
58
|
+
`;return`${C}
|
|
59
|
+
${o}${N}`}else return`${x}${d}${v.join(" ")}${d}${N}`}function Ao({indent:t,options:{commentString:n}},a,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=si(n(l),t);a.push(u.trimStart())}}function ga(t,n){const a=Je(n)?n.value:n;for(const l of t)if(gt(l)&&(l.key===n||l.key===a||Je(l.key)&&l.key.value===a))return l}class vn extends wv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super($i,n),this.items=[]}static from(n,a,l){const{keepUndefined:o,replacer:u}=l,d=new this(n),m=(p,g)=>{if(typeof u=="function")g=u.call(a,p,g);else if(Array.isArray(u)&&!u.includes(p))return;(g!==void 0||o)&&d.items.push(yf(p,g,l))};if(a instanceof Map)for(const[p,g]of a)m(p,g);else if(a&&typeof a=="object")for(const p of Object.keys(a))m(p,a[p]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,a){let l;gt(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new Zt(n,n?.value):l=new Zt(n.key,n.value);const o=ga(this.items,l.key),u=this.schema?.sortMapEntries;if(o){if(!a)throw new Error(`Key ${l.key} already set`);Je(o.value)&&Sv(l.value)?o.value.value=l.value:o.value=l.value}else if(u){const d=this.items.findIndex(m=>u(l,m)<0);d===-1?this.items.push(l):this.items.splice(d,0,l)}else this.items.push(l)}delete(n){const a=ga(this.items,n);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(n,a){const o=ga(this.items,n)?.value;return(!a&&Je(o)?o.value:o)??void 0}has(n){return!!ga(this.items,n)}set(n,a){this.add(new Zt(n,a),!0)}toJSON(n,a,l){const o=l?new l:a?.mapAsMap?new Map:{};a?.onCreate&&a.onCreate(o);for(const u of this.items)_v(a,o,u);return o}toString(n,a,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!gt(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),zv(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:a})}}const As={collection:"map",default:!0,nodeClass:vn,tag:"tag:yaml.org,2002:map",resolve(t,n){return Bl(t)||n("Expected a mapping for this tag"),t},createNode:(t,n,a)=>vn.from(t,n,a)};class ya extends wv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Cs,n),this.items=[]}add(n){this.items.push(n)}delete(n){const a=lo(n);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(n,a){const l=lo(n);if(typeof l!="number")return;const o=this.items[l];return!a&&Je(o)?o.value:o}has(n){const a=lo(n);return typeof a=="number"&&a<this.items.length}set(n,a){const l=lo(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];Je(o)&&Sv(a)?o.value=a:this.items[l]=a}toJSON(n,a){const l=[];a?.onCreate&&a.onCreate(l);let o=0;for(const u of this.items)l.push(bn(u,String(o++),a));return l}toString(n,a,l){return n?zv(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:a}):JSON.stringify(this)}static from(n,a,l){const{replacer:o}=l,u=new this(n);if(a&&Symbol.iterator in Object(a)){let d=0;for(let m of a){if(typeof o=="function"){const p=a instanceof Set?m:String(d++);m=o.call(a,p,m)}u.items.push(Dl(m,void 0,l))}}return u}}function lo(t){let n=Je(t)?t.value:t;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Os={collection:"seq",default:!0,nodeClass:ya,tag:"tag:yaml.org,2002:seq",resolve(t,n){return Il(t)||n("Expected a sequence for this tag"),t},createNode:(t,n,a)=>ya.from(t,n,a)},Yo={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,n,a,l){return n=Object.assign({actualString:!0},n),gf(t,n,a,l)}},Vo={identify:t=>t==null,createNode:()=>new Ne(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ne(null),stringify:({source:t},n)=>typeof t=="string"&&Vo.test.test(t)?t:n.options.nullStr},vf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new Ne(t[0]==="t"||t[0]==="T"),stringify({source:t,value:n},a){if(t&&vf.test.test(t)){const l=t[0]==="t"||t[0]==="T";if(n===l)return t}return n?a.options.trueStr:a.options.falseStr}};function En({format:t,minFractionDigits:n,tag:a,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=Object.is(l,-0)?"-0":JSON.stringify(l);if(!t&&n&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let m=n-(u.length-d-1);for(;m-- >0;)u+="0"}return u}const Cv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},Ev={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():En(t)}},Av={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new Ne(parseFloat(t)),a=t.indexOf(".");return a!==-1&&t[t.length-1]==="0"&&(n.minFractionDigits=t.length-a-1),n},stringify:En},Po=t=>typeof t=="bigint"||Number.isInteger(t),bf=(t,n,a,{intAsBigInt:l})=>l?BigInt(t):parseInt(t.substring(n),a);function Ov(t,n,a){const{value:l}=t;return Po(l)&&l>=0?a+l.toString(n):En(t)}const Tv={identify:t=>Po(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,n,a)=>bf(t,2,8,a),stringify:t=>Ov(t,8,"0o")},Dv={identify:Po,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,n,a)=>bf(t,0,10,a),stringify:En},Rv={identify:t=>Po(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,n,a)=>bf(t,2,16,a),stringify:t=>Ov(t,16,"0x")},Gw=[As,Os,Yo,Vo,vf,Tv,Dv,Rv,Cv,Ev,Av];function ay(t){return typeof t=="bigint"||Number.isInteger(t)}const ro=({value:t})=>JSON.stringify(t),Kw=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:ro},{identify:t=>t==null,createNode:()=>new Ne(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:ro},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:ro},{identify:ay,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,n,{intAsBigInt:a})=>a?BigInt(t):parseInt(t,10),stringify:({value:t})=>ay(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:ro}],Yw={default:!0,tag:"",test:/^/,resolve(t,n){return n(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Vw=[As,Os].concat(Kw,Yw),xf={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if(typeof atob=="function"){const a=atob(t.replace(/[\n\r]/g,"")),l=new Uint8Array(a.length);for(let o=0;o<a.length;++o)l[o]=a.charCodeAt(o);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:n,value:a},l,o,u){if(!a)return"";const d=a;let m;if(typeof btoa=="function"){let p="";for(let g=0;g<d.length;++g)p+=String.fromCharCode(d[g]);m=btoa(p)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=Ne.BLOCK_LITERAL),n!==Ne.QUOTE_DOUBLE){const p=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),g=Math.ceil(m.length/p),b=new Array(g);for(let v=0,x=0;v<g;++v,x+=p)b[v]=m.substr(x,p);m=b.join(n===Ne.BLOCK_LITERAL?`
|
|
60
|
+
`:" ")}return gf({comment:t,type:n,value:m},l,o,u)}};function Mv(t,n){if(Il(t))for(let a=0;a<t.items.length;++a){let l=t.items[a];if(!gt(l)){if(Bl(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new Zt(new Ne(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore}
|
|
61
|
+
${o.key.commentBefore}`:l.commentBefore),l.comment){const u=o.value??o.key;u.comment=u.comment?`${l.comment}
|
|
62
|
+
${u.comment}`:l.comment}l=o}t.items[a]=gt(l)?l:new Zt(l)}}else n("Expected a sequence for this tag");return t}function Lv(t,n,a){const{replacer:l}=a,o=new ya(t);o.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof l=="function"&&(d=l.call(n,String(u++),d));let m,p;if(Array.isArray(d))if(d.length===2)m=d[0],p=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const g=Object.keys(d);if(g.length===1)m=g[0],p=d[m];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else m=d;o.items.push(yf(m,p,a))}return o}const Sf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mv,createNode:Lv};class bs extends ya{constructor(){super(),this.add=vn.prototype.add.bind(this),this.delete=vn.prototype.delete.bind(this),this.get=vn.prototype.get.bind(this),this.has=vn.prototype.has.bind(this),this.set=vn.prototype.set.bind(this),this.tag=bs.tag}toJSON(n,a){if(!a)return super.toJSON(n);const l=new Map;a?.onCreate&&a.onCreate(l);for(const o of this.items){let u,d;if(gt(o)?(u=bn(o.key,"",a),d=bn(o.value,u,a)):u=bn(o,"",a),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,d)}return l}static from(n,a,l){const o=Lv(n,a,l),u=new this;return u.items=o.items,u}}bs.tag="tag:yaml.org,2002:omap";const wf={collection:"seq",identify:t=>t instanceof Map,nodeClass:bs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const a=Mv(t,n),l=[];for(const{key:o}of a.items)Je(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new bs,a)},createNode:(t,n,a)=>bs.from(t,n,a)};function Uv({value:t,source:n},a){return n&&(t?$v:Bv).test.test(n)?n:t?a.options.trueStr:a.options.falseStr}const $v={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Ne(!0),stringify:Uv},Bv={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Ne(!1),stringify:Uv},Pw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},Qw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():En(t)}},Xw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new Ne(parseFloat(t.replace(/_/g,""))),a=t.indexOf(".");if(a!==-1){const l=t.substring(a+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:En},Zl=t=>typeof t=="bigint"||Number.isInteger(t);function Qo(t,n,a,{intAsBigInt:l}){const o=t[0];if((o==="-"||o==="+")&&(n+=1),t=t.substring(n).replace(/_/g,""),l){switch(a){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const d=BigInt(t);return o==="-"?BigInt(-1)*d:d}const u=parseInt(t,a);return o==="-"?-1*u:u}function jf(t,n,a){const{value:l}=t;if(Zl(l)){const o=l.toString(n);return l<0?"-"+a+o.substr(1):a+o}return En(t)}const Jw={identify:Zl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,n,a)=>Qo(t,2,2,a),stringify:t=>jf(t,2,"0b")},Fw={identify:Zl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,n,a)=>Qo(t,1,8,a),stringify:t=>jf(t,8,"0")},Ww={identify:Zl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,n,a)=>Qo(t,0,10,a),stringify:En},ej={identify:Zl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,n,a)=>Qo(t,2,16,a),stringify:t=>jf(t,16,"0x")};class xs extends vn{constructor(n){super(n),this.tag=xs.tag}add(n){let a;gt(n)?a=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?a=new Zt(n.key,null):a=new Zt(n,null),ga(this.items,a.key)||this.items.push(a)}get(n,a){const l=ga(this.items,n);return!a&>(l)?Je(l.key)?l.key.value:l.key:l}set(n,a){if(typeof a!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);const l=ga(this.items,n);l&&!a?this.items.splice(this.items.indexOf(l),1):!l&&a&&this.items.push(new Zt(n))}toJSON(n,a){return super.toJSON(n,a,Set)}toString(n,a,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),a,l);throw new Error("Set items must all have null values")}static from(n,a,l){const{replacer:o}=l,u=new this(n);if(a&&Symbol.iterator in Object(a))for(let d of a)typeof o=="function"&&(d=o.call(a,d,d)),u.items.push(yf(d,null,l));return u}}xs.tag="tag:yaml.org,2002:set";const Nf={collection:"map",identify:t=>t instanceof Set,nodeClass:xs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,n,a)=>xs.from(t,n,a),resolve(t,n){if(Bl(t)){if(t.hasAllNullValues(!0))return Object.assign(new xs,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};function kf(t,n){const a=t[0],l=a==="-"||a==="+"?t.substring(1):t,o=d=>n?BigInt(d):Number(d),u=l.replace(/_/g,"").split(":").reduce((d,m)=>d*o(60)+o(m),o(0));return a==="-"?o(-1)*u:u}function Iv(t){let{value:n}=t,a=d=>d;if(typeof n=="bigint")a=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return En(t);let l="";n<0&&(l="-",n*=a(-1));const o=a(60),u=[n%o];return n<60?u.unshift(0):(n=(n-u[0])/o,u.unshift(n%o),n>=60&&(n=(n-u[0])/o,u.unshift(n))),l+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Zv={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,n,{intAsBigInt:a})=>kf(t,a),stringify:Iv},qv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>kf(t,!1),stringify:Iv},Xo={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const n=t.match(Xo.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,a,l,o,u,d,m]=n.map(Number),p=n[7]?Number((n[7]+"00").substr(1,3)):0;let g=Date.UTC(a,l-1,o,u||0,d||0,m||0,p);const b=n[8];if(b&&b!=="Z"){let v=kf(b,!1);Math.abs(v)<30&&(v*=60),g-=6e4*v}return new Date(g)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},sy=[As,Os,Yo,Vo,$v,Bv,Jw,Fw,Ww,ej,Pw,Qw,Xw,xf,li,wf,Sf,Nf,Zv,qv,Xo],ly=new Map([["core",Gw],["failsafe",[As,Os,Yo]],["json",Vw],["yaml11",sy],["yaml-1.1",sy]]),ry={binary:xf,bool:vf,float:Av,floatExp:Ev,floatNaN:Cv,floatTime:qv,int:Dv,intHex:Rv,intOct:Tv,intTime:Zv,map:As,merge:li,null:Vo,omap:wf,pairs:Sf,seq:Os,set:Nf,timestamp:Xo},tj={"tag:yaml.org,2002:binary":xf,"tag:yaml.org,2002:merge":li,"tag:yaml.org,2002:omap":wf,"tag:yaml.org,2002:pairs":Sf,"tag:yaml.org,2002:set":Nf,"tag:yaml.org,2002:timestamp":Xo};function Ad(t,n,a){const l=ly.get(n);if(l&&!t)return a&&!l.includes(li)?l.concat(li):l.slice();let o=l;if(!o)if(Array.isArray(t))o=[];else{const u=Array.from(ly.keys()).filter(d=>d!=="yaml11").map(d=>JSON.stringify(d)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${u} or define customTags array`)}if(Array.isArray(t))for(const u of t)o=o.concat(u);else typeof t=="function"&&(o=t(o.slice()));return a&&(o=o.concat(li)),o.reduce((u,d)=>{const m=typeof d=="string"?ry[d]:d;if(!m){const p=JSON.stringify(d),g=Object.keys(ry).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${p}; use one of ${g}`)}return u.includes(m)||u.push(m),u},[])}const nj=(t,n)=>t.key<n.key?-1:t.key>n.key?1:0;class _f{constructor({compat:n,customTags:a,merge:l,resolveKnownTags:o,schema:u,sortMapEntries:d,toStringDefaults:m}){this.compat=Array.isArray(n)?Ad(n,"compat"):n?Ad(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=o?tj:{},this.tags=Ad(a,this.name,l),this.toStringOptions=m??null,Object.defineProperty(this,$i,{value:As}),Object.defineProperty(this,$n,{value:Yo}),Object.defineProperty(this,Cs,{value:Os}),this.sortMapEntries=typeof d=="function"?d:d===!0?nj:null}clone(){const n=Object.create(_f.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function ij(t,n){const a=[];let l=n.directives===!0;if(n.directives!==!1&&t.directives){const p=t.directives.toString(t);p?(a.push(p),l=!0):t.directives.docStart&&(l=!0)}l&&a.push("---");const o=Nv(t,n),{commentString:u}=o.options;if(t.commentBefore){a.length!==1&&a.unshift("");const p=u(t.commentBefore);a.unshift(si(p,""))}let d=!1,m=null;if(t.contents){if(pt(t.contents)){if(t.contents.spaceBefore&&l&&a.push(""),t.contents.commentBefore){const b=u(t.contents.commentBefore);a.push(si(b,""))}o.forceBlockIndent=!!t.comment,m=t.contents.comment}const p=m?void 0:()=>d=!0;let g=Ns(t.contents,o,()=>m=null,p);m&&(g+=pa(g,"",u(m))),(g[0]==="|"||g[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${g}`:a.push(g)}else a.push(Ns(t.contents,o));if(t.directives?.docEnd)if(t.comment){const p=u(t.comment);p.includes(`
|
|
63
|
+
`)?(a.push("..."),a.push(si(p,""))):a.push(`... ${p}`)}else a.push("...");else{let p=t.comment;p&&d&&(p=p.replace(/^\n+/,"")),p&&((!d||m)&&a[a.length-1]!==""&&a.push(""),a.push(si(u(p),"")))}return a.join(`
|
|
64
|
+
`)+`
|
|
65
|
+
`}class Jo{constructor(n,a,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,xn,{value:Pd});let o=null;typeof a=="function"||Array.isArray(a)?o=a:l===void 0&&a&&(l=a,a=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:d}=u;l?._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new It({version:d}),this.setSchema(d,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(Jo.prototype,{[xn]:{value:Pd}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=pt(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){cs(this.contents)&&this.contents.add(n)}addIn(n,a){cs(this.contents)&&this.contents.addIn(n,a)}createAlias(n,a){if(!n.anchor){const l=bv(this);n.anchor=!a||l.has(a)?xv(a||"a",l):a}return new pf(n.anchor)}createNode(n,a,l){let o;if(typeof a=="function")n=a.call({"":n},"",n),o=a;else if(Array.isArray(a)){const k=T=>typeof T=="number"||T instanceof String||T instanceof Number,A=a.filter(k).map(String);A.length>0&&(a=a.concat(A)),o=a}else l===void 0&&a&&(l=a,a=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:m,keepUndefined:p,onTagObj:g,tag:b}=l??{},{onAnchor:v,setAnchors:x,sourceObjects:N}=Aw(this,d||"a"),C={aliasDuplicateObjects:u??!0,keepUndefined:p??!1,onAnchor:v,onTagObj:g,replacer:o,schema:this.schema,sourceObjects:N},j=Dl(n,b,C);return m&&ht(j)&&(j.flow=!0),x(),j}createPair(n,a,l={}){const o=this.createNode(n,null,l),u=this.createNode(a,null,l);return new Zt(o,u)}delete(n){return cs(this.contents)?this.contents.delete(n):!1}deleteIn(n){return El(n)?this.contents==null?!1:(this.contents=null,!0):cs(this.contents)?this.contents.deleteIn(n):!1}get(n,a){return ht(this.contents)?this.contents.get(n,a):void 0}getIn(n,a){return El(n)?!a&&Je(this.contents)?this.contents.value:this.contents:ht(this.contents)?this.contents.getIn(n,a):void 0}has(n){return ht(this.contents)?this.contents.has(n):!1}hasIn(n){return El(n)?this.contents!==void 0:ht(this.contents)?this.contents.hasIn(n):!1}set(n,a){this.contents==null?this.contents=Eo(this.schema,[n],a):cs(this.contents)&&this.contents.set(n,a)}setIn(n,a){El(n)?this.contents=a:this.contents==null?this.contents=Eo(this.schema,Array.from(n),a):cs(this.contents)&&this.contents.setIn(n,a)}setSchema(n,a={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new It({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new It({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(a.schema instanceof Object)this.schema=a.schema;else if(l)this.schema=new _f(Object.assign(l,a));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:a,mapAsMap:l,maxAliasCount:o,onAnchor:u,reviver:d}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},p=bn(this.contents,a??"",m);if(typeof u=="function")for(const{count:g,res:b}of m.anchors.values())u(b,g);return typeof d=="function"?ps(d,{"":p},"",p):p}toJSON(n,a){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:a})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const a=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${a}`)}return ij(this,n)}}function cs(t){if(ht(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Hv extends Error{constructor(n,a,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=a}}class oo extends Hv{constructor(n,a,l){super("YAMLParseError",n,a,l)}}class aj extends Hv{constructor(n,a,l){super("YAMLWarning",n,a,l)}}const oy=(t,n)=>a=>{if(a.pos[0]===-1)return;a.linePos=a.pos.map(m=>n.linePos(m));const{line:l,col:o}=a.linePos[0];a.message+=` at line ${l}, column ${o}`;let u=o-1,d=t.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const m=Math.min(u-39,d.length-79);d="…"+d.substring(m),u-=m-1}if(d.length>80&&(d=d.substring(0,79)+"…"),l>1&&/^ *$/.test(d.substring(0,u))){let m=t.substring(n.lineStarts[l-2],n.lineStarts[l-1]);m.length>80&&(m=m.substring(0,79)+`…
|
|
66
|
+
`),d=m+d}if(/[^ ]/.test(d)){let m=1;const p=a.linePos[1];p?.line===l&&p.col>o&&(m=Math.max(1,Math.min(p.col-o,80-u)));const g=" ".repeat(u)+"^".repeat(m);a.message+=`:
|
|
67
|
+
|
|
68
|
+
${d}
|
|
69
|
+
${g}
|
|
70
|
+
`}};function ks(t,{flow:n,indicator:a,next:l,offset:o,onError:u,parentIndent:d,startOnNewline:m}){let p=!1,g=m,b=m,v="",x="",N=!1,C=!1,j=null,k=null,A=null,T=null,O=null,D=null,L=null;for(const R of t)switch(C&&(R.type!=="space"&&R.type!=="newline"&&R.type!=="comma"&&u(R.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),C=!1),j&&(g&&R.type!=="comment"&&R.type!=="newline"&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),j=null),R.type){case"space":!n&&(a!=="doc-start"||l?.type!=="flow-collection")&&R.source.includes(" ")&&(j=R),b=!0;break;case"comment":{b||u(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const Q=R.source.substring(1)||" ";v?v+=x+Q:v=Q,x="",g=!1;break}case"newline":g?v?v+=R.source:(!D||a!=="seq-item-ind")&&(p=!0):x+=R.source,g=!0,N=!0,(k||A)&&(T=R),b=!0;break;case"anchor":k&&u(R,"MULTIPLE_ANCHORS","A node can have at most one anchor"),R.source.endsWith(":")&&u(R.offset+R.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=R,L??(L=R.offset),g=!1,b=!1,C=!0;break;case"tag":{A&&u(R,"MULTIPLE_TAGS","A node can have at most one tag"),A=R,L??(L=R.offset),g=!1,b=!1,C=!0;break}case a:(k||A)&&u(R,"BAD_PROP_ORDER",`Anchors and tags must be after the ${R.source} indicator`),D&&u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.source} in ${n??"collection"}`),D=R,g=a==="seq-item-ind"||a==="explicit-key-ind",b=!1;break;case"comma":if(n){O&&u(R,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),O=R,g=!1,b=!1;break}default:u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.type} token`),g=!1,b=!1}const H=t[t.length-1],V=H?H.offset+H.source.length:o;return C&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),j&&(g&&j.indent<=d||l?.type==="block-map"||l?.type==="block-seq")&&u(j,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:O,found:D,spaceBefore:p,comment:v,hasNewline:N,anchor:k,tag:A,newlineAfterProp:T,end:V,start:L??V}}function Rl(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
|
71
|
+
`))return!0;if(t.end){for(const n of t.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of t.items){for(const a of n.start)if(a.type==="newline")return!0;if(n.sep){for(const a of n.sep)if(a.type==="newline")return!0}if(Rl(n.key)||Rl(n.value))return!0}return!1;default:return!0}}function Fd(t,n,a){if(n?.type==="flow-collection"){const l=n.end[0];l.indent===t&&(l.source==="]"||l.source==="}")&&Rl(n)&&a(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Gv(t,n,a){const{uniqueKeys:l}=t.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,d)=>u===d||Je(u)&&Je(d)&&u.value===d.value;return n.some(u=>o(u.key,a))}const cy="All mapping items must start at the same column";function sj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??vn,m=new d(a.schema);a.atRoot&&(a.atRoot=!1);let p=l.offset,g=null;for(const b of l.items){const{start:v,key:x,sep:N,value:C}=b,j=ks(v,{indicator:"explicit-key-ind",next:x??N?.[0],offset:p,onError:o,parentIndent:l.indent,startOnNewline:!0}),k=!j.found;if(k){if(x&&(x.type==="block-seq"?o(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==l.indent&&o(p,"BAD_INDENT",cy)),!j.anchor&&!j.tag&&!N){g=j.end,j.comment&&(m.comment?m.comment+=`
|
|
72
|
+
`+j.comment:m.comment=j.comment);continue}(j.newlineAfterProp||Rl(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else j.found?.indent!==l.indent&&o(p,"BAD_INDENT",cy);a.atKey=!0;const A=j.end,T=x?t(a,x,j,o):n(a,A,v,null,j,o);a.schema.compat&&Fd(l.indent,x,o),a.atKey=!1,Gv(a,m.items,T)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const O=ks(N??[],{indicator:"map-value-ind",next:C,offset:T.range[2],onError:o,parentIndent:l.indent,startOnNewline:!x||x.type==="block-scalar"});if(p=O.end,O.found){k&&(C?.type==="block-map"&&!O.hasNewline&&o(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),a.options.strict&&j.start<O.found.offset-1024&&o(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=C?t(a,C,O,o):n(a,p,N,null,O,o);a.schema.compat&&Fd(l.indent,C,o),p=D.range[2];const L=new Zt(T,D);a.options.keepSourceTokens&&(L.srcToken=b),m.items.push(L)}else{k&&o(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),O.comment&&(T.comment?T.comment+=`
|
|
73
|
+
`+O.comment:T.comment=O.comment);const D=new Zt(T);a.options.keepSourceTokens&&(D.srcToken=b),m.items.push(D)}}return g&&g<p&&o(g,"IMPOSSIBLE","Map comment with trailing content"),m.range=[l.offset,p,g??p],m}function lj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=u?.nodeClass??ya,m=new d(a.schema);a.atRoot&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let p=l.offset,g=null;for(const{start:b,value:v}of l.items){const x=ks(b,{indicator:"seq-item-ind",next:v,offset:p,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||v)v?.type==="block-seq"?o(x.end,"BAD_INDENT","All sequence items must start at the same column"):o(p,"MISSING_CHAR","Sequence item without - indicator");else{g=x.end,x.comment&&(m.comment=x.comment);continue}const N=v?t(a,v,x,o):n(a,x.end,b,null,x,o);a.schema.compat&&Fd(l.indent,v,o),p=N.range[2],m.items.push(N)}return m.range=[l.offset,p,g??p],m}function ql(t,n,a,l){let o="";if(t){let u=!1,d="";for(const m of t){const{source:p,type:g}=m;switch(g){case"space":u=!0;break;case"comment":{a&&!u&&l(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=p.substring(1)||" ";o?o+=d+b:o=b,d="";break}case"newline":o&&(d+=p),u=!0;break;default:l(m,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}n+=p.length}}return{comment:o,offset:n}}const Od="Block collections are not allowed within flow collections",Td=t=>t&&(t.type==="block-map"||t.type==="block-seq");function rj({composeNode:t,composeEmptyNode:n},a,l,o,u){const d=l.start.source==="{",m=d?"flow map":"flow sequence",p=u?.nodeClass??(d?vn:ya),g=new p(a.schema);g.flow=!0;const b=a.atRoot;b&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let v=l.offset+l.start.source.length;for(let k=0;k<l.items.length;++k){const A=l.items[k],{start:T,key:O,sep:D,value:L}=A,H=ks(T,{flow:m,indicator:"explicit-key-ind",next:O??D?.[0],offset:v,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!H.found){if(!H.anchor&&!H.tag&&!D&&!L){k===0&&H.comma?o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):k<l.items.length-1&&o(H.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),H.comment&&(g.comment?g.comment+=`
|
|
74
|
+
`+H.comment:g.comment=H.comment),v=H.end;continue}!d&&a.options.strict&&Rl(O)&&o(O,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)H.comma&&o(H.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(H.comma||o(H.start,"MISSING_CHAR",`Missing , between ${m} items`),H.comment){let V="";e:for(const R of T)switch(R.type){case"comma":case"space":break;case"comment":V=R.source.substring(1);break e;default:break e}if(V){let R=g.items[g.items.length-1];gt(R)&&(R=R.value??R.key),R.comment?R.comment+=`
|
|
75
|
+
`+V:R.comment=V,H.comment=H.comment.substring(V.length+1)}}if(!d&&!D&&!H.found){const V=L?t(a,L,H,o):n(a,H.end,D,null,H,o);g.items.push(V),v=V.range[2],Td(L)&&o(V.range,"BLOCK_IN_FLOW",Od)}else{a.atKey=!0;const V=H.end,R=O?t(a,O,H,o):n(a,V,T,null,H,o);Td(O)&&o(R.range,"BLOCK_IN_FLOW",Od),a.atKey=!1;const Q=ks(D??[],{flow:m,indicator:"map-value-ind",next:L,offset:R.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(Q.found){if(!d&&!H.found&&a.options.strict){if(D)for(const ce of D){if(ce===Q.found)break;if(ce.type==="newline"){o(ce,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}H.start<Q.found.offset-1024&&o(Q.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&L.source?.[0]===":"?o(L,"MISSING_CHAR",`Missing space after : in ${m}`):o(Q.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const be=L?t(a,L,Q,o):Q.found?n(a,Q.end,D,null,Q,o):null;be?Td(L)&&o(be.range,"BLOCK_IN_FLOW",Od):Q.comment&&(R.comment?R.comment+=`
|
|
76
|
+
`+Q.comment:R.comment=Q.comment);const X=new Zt(R,be);if(a.options.keepSourceTokens&&(X.srcToken=A),d){const ce=g;Gv(a,ce.items,R)&&o(V,"DUPLICATE_KEY","Map keys must be unique"),ce.items.push(X)}else{const ce=new vn(a.schema);ce.flow=!0,ce.items.push(X);const Oe=(be??R).range;ce.range=[R.range[0],Oe[1],Oe[2]],g.items.push(ce)}v=be?be.range[2]:Q.end}}const x=d?"}":"]",[N,...C]=l.end;let j=v;if(N?.source===x)j=N.offset+N.source.length;else{const k=m[0].toUpperCase()+m.substring(1),A=b?`${k} must end with a ${x}`:`${k} in block collection must be sufficiently indented and end with a ${x}`;o(v,b?"MISSING_CHAR":"BAD_INDENT",A),N&&N.source.length!==1&&C.unshift(N)}if(C.length>0){const k=ql(C,j,a.options.strict,o);k.comment&&(g.comment?g.comment+=`
|
|
77
|
+
`+k.comment:g.comment=k.comment),g.range=[l.offset,j,k.offset]}else g.range=[l.offset,j,j];return g}function Dd(t,n,a,l,o,u){const d=a.type==="block-map"?sj(t,n,a,l,u):a.type==="block-seq"?lj(t,n,a,l,u):rj(t,n,a,l,u),m=d.constructor;return o==="!"||o===m.tagName?(d.tag=m.tagName,d):(o&&(d.tag=o),d)}function oj(t,n,a,l,o){const u=l.tag,d=u?n.directives.tagName(u.source,x=>o(u,"TAG_RESOLVE_FAILED",x)):null;if(a.type==="block-seq"){const{anchor:x,newlineAfterProp:N}=l,C=x&&u?x.offset>u.offset?x:u:x??u;C&&(!N||N.offset<C.offset)&&o(C,"MISSING_CHAR","Missing newline after block sequence props")}const m=a.type==="block-map"?"map":a.type==="block-seq"?"seq":a.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===vn.tagName&&m==="map"||d===ya.tagName&&m==="seq")return Dd(t,n,a,o,d);let p=n.schema.tags.find(x=>x.tag===d&&x.collection===m);if(!p){const x=n.schema.knownTags[d];if(x?.collection===m)n.schema.tags.push(Object.assign({},x,{default:!1})),p=x;else return x?o(u,"BAD_COLLECTION_TYPE",`${x.tag} used for ${m} collection, but expects ${x.collection??"scalar"}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),Dd(t,n,a,o,d)}const g=Dd(t,n,a,o,d,p),b=p.resolve?.(g,x=>o(u,"TAG_RESOLVE_FAILED",x),n.options)??g,v=pt(b)?b:new Ne(b);return v.range=g.range,v.tag=d,p?.format&&(v.format=p.format),v}function cj(t,n,a){const l=n.offset,o=uj(n,t.options.strict,a);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?Ne.BLOCK_FOLDED:Ne.BLOCK_LITERAL,d=n.source?dj(n.source):[];let m=d.length;for(let j=d.length-1;j>=0;--j){const k=d[j][1];if(k===""||k==="\r")m=j;else break}if(m===0){const j=o.chomp==="+"&&d.length>0?`
|
|
78
|
+
`.repeat(Math.max(1,d.length-1)):"";let k=l+o.length;return n.source&&(k+=n.source.length),{value:j,type:u,comment:o.comment,range:[l,k,k]}}let p=n.indent+o.indent,g=n.offset+o.length,b=0;for(let j=0;j<m;++j){const[k,A]=d[j];if(A===""||A==="\r")o.indent===0&&k.length>p&&(p=k.length);else{k.length<p&&a(g+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(p=k.length),b=j,p===0&&!t.atRoot&&a(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=k.length+A.length+1}for(let j=d.length-1;j>=m;--j)d[j][0].length>p&&(m=j+1);let v="",x="",N=!1;for(let j=0;j<b;++j)v+=d[j][0].slice(p)+`
|
|
79
|
+
`;for(let j=b;j<m;++j){let[k,A]=d[j];g+=k.length+A.length+1;const T=A[A.length-1]==="\r";if(T&&(A=A.slice(0,-1)),A&&k.length<p){const D=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;a(g-A.length-(T?2:1),"BAD_INDENT",D),k=""}u===Ne.BLOCK_LITERAL?(v+=x+k.slice(p)+A,x=`
|
|
80
|
+
`):k.length>p||A[0]===" "?(x===" "?x=`
|
|
81
|
+
`:!N&&x===`
|
|
82
|
+
`&&(x=`
|
|
83
|
+
|
|
84
|
+
`),v+=x+k.slice(p)+A,x=`
|
|
85
|
+
`,N=!0):A===""?x===`
|
|
86
|
+
`?v+=`
|
|
87
|
+
`:x=`
|
|
88
|
+
`:(v+=x+A,x=" ",N=!1)}switch(o.chomp){case"-":break;case"+":for(let j=m;j<d.length;++j)v+=`
|
|
89
|
+
`+d[j][0].slice(p);v[v.length-1]!==`
|
|
90
|
+
`&&(v+=`
|
|
91
|
+
`);break;default:v+=`
|
|
92
|
+
`}const C=l+o.length+n.source.length;return{value:v,type:u,comment:o.comment,range:[l,C,C]}}function uj({offset:t,props:n},a,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=n[0],u=o[0];let d=0,m="",p=-1;for(let x=1;x<o.length;++x){const N=o[x];if(!m&&(N==="-"||N==="+"))m=N;else{const C=Number(N);!d&&C?d=C:p===-1&&(p=t+x)}}p!==-1&&l(p,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let g=!1,b="",v=o.length;for(let x=1;x<n.length;++x){const N=n[x];switch(N.type){case"space":g=!0;case"newline":v+=N.source.length;break;case"comment":a&&!g&&l(N,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),v+=N.source.length,b=N.source.substring(1);break;case"error":l(N,"UNEXPECTED_TOKEN",N.message),v+=N.source.length;break;default:{const C=`Unexpected token in block scalar header: ${N.type}`;l(N,"UNEXPECTED_TOKEN",C);const j=N.source;j&&typeof j=="string"&&(v+=j.length)}}}return{mode:u,indent:d,chomp:m,comment:b,length:v}}function dj(t){const n=t.split(/\n( *)/),a=n[0],l=a.match(/^( *)/),u=[l?.[1]?[l[1],a.slice(l[1].length)]:["",a]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function fj(t,n,a){const{offset:l,type:o,source:u,end:d}=t;let m,p;const g=(x,N,C)=>a(l+x,N,C);switch(o){case"scalar":m=Ne.PLAIN,p=hj(u,g);break;case"single-quoted-scalar":m=Ne.QUOTE_SINGLE,p=mj(u,g);break;case"double-quoted-scalar":m=Ne.QUOTE_DOUBLE,p=pj(u,g);break;default:return a(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const b=l+u.length,v=ql(d,b,n,a);return{value:p,type:m,comment:v.comment,range:[l,b,v.offset]}}function hj(t,n){let a="";switch(t[0]){case" ":a="a tab character";break;case",":a="flow indicator character ,";break;case"%":a="directive indicator character %";break;case"|":case">":{a=`block scalar indicator ${t[0]}`;break}case"@":case"`":{a=`reserved character ${t[0]}`;break}}return a&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${a}`),Kv(t)}function mj(t,n){return(t[t.length-1]!=="'"||t.length===1)&&n(t.length,"MISSING_CHAR","Missing closing 'quote"),Kv(t.slice(1,-1)).replace(/''/g,"'")}function Kv(t){let n,a;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
93
|
+
`,"sy"),a=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
94
|
+
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,a=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(t);if(!l)return t;let o=l[1],u=" ",d=n.lastIndex;for(a.lastIndex=d;l=a.exec(t);)l[1]===""?u===`
|
|
95
|
+
`?o+=u:u=`
|
|
96
|
+
`:(o+=u+l[1],u=" "),d=a.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=d,l=m.exec(t),o+u+(l?.[1]??"")}function pj(t,n){let a="";for(let l=1;l<t.length-1;++l){const o=t[l];if(!(o==="\r"&&t[l+1]===`
|
|
97
|
+
`))if(o===`
|
|
98
|
+
`){const{fold:u,offset:d}=gj(t,l);a+=u,l=d}else if(o==="\\"){let u=t[++l];const d=yj[u];if(d)a+=d;else if(u===`
|
|
99
|
+
`)for(u=t[l+1];u===" "||u===" ";)u=t[++l+1];else if(u==="\r"&&t[l+1]===`
|
|
100
|
+
`)for(u=t[++l+1];u===" "||u===" ";)u=t[++l+1];else if(u==="x"||u==="u"||u==="U"){const m={x:2,u:4,U:8}[u];a+=vj(t,l+1,m,n),l+=m}else{const m=t.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),a+=m}}else if(o===" "||o===" "){const u=l;let d=t[l+1];for(;d===" "||d===" ";)d=t[++l+1];d!==`
|
|
101
|
+
`&&!(d==="\r"&&t[l+2]===`
|
|
102
|
+
`)&&(a+=l>u?t.slice(u,l+1):o)}else a+=o}return(t[t.length-1]!=='"'||t.length===1)&&n(t.length,"MISSING_CHAR",'Missing closing "quote'),a}function gj(t,n){let a="",l=t[n+1];for(;(l===" "||l===" "||l===`
|
|
103
|
+
`||l==="\r")&&!(l==="\r"&&t[n+2]!==`
|
|
104
|
+
`);)l===`
|
|
105
|
+
`&&(a+=`
|
|
106
|
+
`),n+=1,l=t[n+1];return a||(a=" "),{fold:a,offset:n}}const yj={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
107
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function vj(t,n,a,l){const o=t.substr(n,a),d=o.length===a&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(d)){const m=t.substr(n-2,a+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(d)}function Yv(t,n,a,l){const{value:o,type:u,comment:d,range:m}=n.type==="block-scalar"?cj(t,n,l):fj(n,t.options.strict,l),p=a?t.directives.tagName(a.source,v=>l(a,"TAG_RESOLVE_FAILED",v)):null;let g;t.options.stringKeys&&t.atKey?g=t.schema[$n]:p?g=bj(t.schema,o,p,a,l):n.type==="scalar"?g=xj(t,o,n,l):g=t.schema[$n];let b;try{const v=g.resolve(o,x=>l(a??n,"TAG_RESOLVE_FAILED",x),t.options);b=Je(v)?v:new Ne(v)}catch(v){const x=v instanceof Error?v.message:String(v);l(a??n,"TAG_RESOLVE_FAILED",x),b=new Ne(o)}return b.range=m,b.source=o,u&&(b.type=u),p&&(b.tag=p),g.format&&(b.format=g.format),d&&(b.comment=d),b}function bj(t,n,a,l,o){if(a==="!")return t[$n];const u=[];for(const m of t.tags)if(!m.collection&&m.tag===a)if(m.default&&m.test)u.push(m);else return m;for(const m of u)if(m.test?.test(n))return m;const d=t.knownTags[a];return d&&!d.collection?(t.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,a!=="tag:yaml.org,2002:str"),t[$n])}function xj({atKey:t,directives:n,schema:a},l,o,u){const d=a.tags.find(m=>(m.default===!0||t&&m.default==="key")&&m.test?.test(l))||a[$n];if(a.compat){const m=a.compat.find(p=>p.default&&p.test?.test(l))??a[$n];if(d.tag!==m.tag){const p=n.tagString(d.tag),g=n.tagString(m.tag),b=`Value may be parsed as either ${p} or ${g}`;u(o,"TAG_RESOLVE_FAILED",b,!0)}}return d}function Sj(t,n,a){if(n){a??(a=n.length);for(let l=a-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=n[++l];o?.type==="space";)t+=o.source.length,o=n[++l];break}}return t}const wj={composeNode:Vv,composeEmptyNode:zf};function Vv(t,n,a,l){const o=t.atKey,{spaceBefore:u,comment:d,anchor:m,tag:p}=a;let g,b=!0;switch(n.type){case"alias":g=jj(t,n,l),(m||p)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=Yv(t,n,p,l),m&&(g.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=oj(wj,t,n,a,l),m&&(g.anchor=m.source.substring(1));break;default:{const v=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",v),g=zf(t,n.offset,void 0,null,a,l),b=!1}}return m&&g.anchor===""&&l(m,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Je(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(p??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?g.comment=d:g.commentBefore=d),t.options.keepSourceTokens&&b&&(g.srcToken=n),g}function zf(t,n,a,l,{spaceBefore:o,comment:u,anchor:d,tag:m,end:p},g){const b={type:"scalar",offset:Sj(n,a,l),indent:-1,source:""},v=Yv(t,b,m,g);return d&&(v.anchor=d.source.substring(1),v.anchor===""&&g(d,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(v.spaceBefore=!0),u&&(v.comment=u,v.range[2]=p),v}function jj({options:t},{offset:n,source:a,end:l},o){const u=new pf(a.substring(1));u.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(n+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+a.length,m=ql(l,d,t.strict,o);return u.range=[n,d,m.offset],m.comment&&(u.comment=m.comment),u}function Nj(t,n,{offset:a,start:l,value:o,end:u},d){const m=Object.assign({_directives:n},t),p=new Jo(void 0,m),g={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},b=ks(l,{indicator:"doc-start",next:o??u?.[0],offset:a,onError:d,parentIndent:0,startOnNewline:!0});b.found&&(p.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!b.hasNewline&&d(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=o?Vv(g,o,b,d):zf(g,b.end,l,null,b,d);const v=p.contents.range[2],x=ql(u,v,!1,d);return x.comment&&(p.comment=x.comment),p.range=[a,v,x.offset],p}function zl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:n,source:a}=t;return[n,n+(typeof a=="string"?a.length:1)]}function uy(t){let n="",a=!1,l=!1;for(let o=0;o<t.length;++o){const u=t[o];switch(u[0]){case"#":n+=(n===""?"":l?`
|
|
108
|
+
|
|
109
|
+
`:`
|
|
110
|
+
`)+(u.substring(1)||" "),a=!0,l=!1;break;case"%":t[o+1]?.[0]!=="#"&&(o+=1),a=!1;break;default:a||(l=!0),a=!1}}return{comment:n,afterEmptyLine:l}}class kj{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(a,l,o,u)=>{const d=zl(a);u?this.warnings.push(new aj(d,l,o)):this.errors.push(new oo(d,l,o))},this.directives=new It({version:n.version||"1.2"}),this.options=n}decorate(n,a){const{comment:l,afterEmptyLine:o}=uy(this.prelude);if(l){const u=n.contents;if(a)n.comment=n.comment?`${n.comment}
|
|
111
|
+
${l}`:l;else if(o||n.directives.docStart||!u)n.commentBefore=l;else if(ht(u)&&!u.flow&&u.items.length>0){let d=u.items[0];gt(d)&&(d=d.key);const m=d.commentBefore;d.commentBefore=m?`${l}
|
|
112
|
+
${m}`:l}else{const d=u.commentBefore;u.commentBefore=d?`${l}
|
|
113
|
+
${d}`:l}}a?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:uy(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,a=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(a,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(a,l,o)=>{const u=zl(n);u[0]+=a,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const a=Nj(this.options,this.directives,n,this.onError);this.atDirectives&&!a.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(a,!1),this.doc&&(yield this.doc),this.doc=a,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const a=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new oo(zl(n),"UNEXPECTED_TOKEN",a);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new oo(zl(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const a=ql(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),a.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
|
|
114
|
+
${a.comment}`:a.comment}this.doc.range[2]=a.offset;break}default:this.errors.push(new oo(zl(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,a=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new Jo(void 0,l);this.atDirectives&&this.onError(a,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,a,a],this.decorate(o,!1),yield o}}}const Pv="\uFEFF",Qv="",Xv="",Wd="";function _j(t){switch(t){case Pv:return"byte-order-mark";case Qv:return"doc-mode";case Xv:return"flow-error-end";case Wd:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
115
|
+
`:case`\r
|
|
116
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function zn(t){switch(t){case void 0:case" ":case`
|
|
117
|
+
`:case"\r":case" ":return!0;default:return!1}}const dy=new Set("0123456789ABCDEFabcdef"),zj=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),co=new Set(",[]{}"),Cj=new Set(` ,[]{}
|
|
118
|
+
\r `),Rd=t=>!t||Cj.has(t);class Ej{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,a=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!a;let l=this.next??"stream";for(;l&&(a||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,a=this.buffer[n];for(;a===" "||a===" ";)a=this.buffer[++n];return!a||a==="#"||a===`
|
|
119
|
+
`?!0:a==="\r"?this.buffer[n+1]===`
|
|
120
|
+
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let a=this.buffer[n];if(this.indentNext>0){let l=0;for(;a===" ";)a=this.buffer[++l+n];if(a==="\r"){const o=this.buffer[l+n+1];if(o===`
|
|
121
|
+
`||!o&&!this.atEnd)return n+l+1}return a===`
|
|
122
|
+
`||l>=this.indentNext||!a&&!this.atEnd?n+l:-1}if(a==="-"||a==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&zn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
|
|
123
|
+
`,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Pv&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let a=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){a=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[a-1];if(u===" "||u===" ")a-=1;else break}const o=(yield*this.pushCount(a))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const a=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-a),yield*this.pushNewline(),"stream"}return yield Qv,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const a=this.peek(3);if((a==="---"||a==="...")&&zn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,a==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!zn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,a]=this.peek(2);if(!a&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&zn(a)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let a=yield*this.pushIndicators();switch(n[a]){case"#":yield*this.pushCount(n.length-a);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Rd),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return a+=yield*this.parseBlockScalarHeader(),a+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-a),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,a,l=-1;do n=yield*this.pushNewline(),n>0?(a=yield*this.pushSpaces(!1),this.indentValue=l=a):a=0,a+=yield*this.pushSpaces(!0);while(n+a>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&o[0]!=="#"||l===0&&(o.startsWith("---")||o.startsWith("..."))&&zn(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Xv,yield*this.parseLineStart();let u=0;for(;o[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),o[u]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-u),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Rd),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||zn(d)||d===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let a=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;a!==-1&&this.buffer[a+1]==="'";)a=this.buffer.indexOf("'",a+2);else for(;a!==-1;){let u=0;for(;this.buffer[a-1-u]==="\\";)u+=1;if(u%2===0)break;a=this.buffer.indexOf('"',a+1)}const l=this.buffer.substring(0,a);let o=l.indexOf(`
|
|
124
|
+
`,this.pos);if(o!==-1){for(;o!==-1;){const u=this.continueScalar(o+1);if(u===-1)break;o=l.indexOf(`
|
|
125
|
+
`,u)}o!==-1&&(a=o-(l[o-1]==="\r"?2:1))}if(a===-1){if(!this.atEnd)return this.setNext("quoted-scalar");a=this.buffer.length}return yield*this.pushToIndex(a+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const a=this.buffer[++n];if(a==="+")this.blockScalarKeep=!0;else if(a>"0"&&a<="9")this.blockScalarIndent=Number(a)-1;else if(a!=="-")break}return yield*this.pushUntil(a=>zn(a)||a==="#")}*parseBlockScalar(){let n=this.pos-1,a=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":a+=1;break;case`
|
|
126
|
+
`:n=u,a=0;break;case"\r":{const d=this.buffer[u+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
|
|
127
|
+
`)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(a>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=a:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
|
|
128
|
+
`,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let o=n+1;for(l=this.buffer[o];l===" ";)l=this.buffer[++o];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
|
|
129
|
+
`;)l=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)do{let u=n-1,d=this.buffer[u];d==="\r"&&(d=this.buffer[--u]);const m=u;for(;d===" ";)d=this.buffer[--u];if(d===`
|
|
130
|
+
`&&u>=this.pos&&u+1+a>m)n=u;else break}while(!0);return yield Wd,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let a=this.pos-1,l=this.pos-1,o;for(;o=this.buffer[++l];)if(o===":"){const u=this.buffer[l+1];if(zn(u)||n&&co.has(u))break;a=l}else if(zn(o)){let u=this.buffer[l+1];if(o==="\r"&&(u===`
|
|
131
|
+
`?(l+=1,o=`
|
|
132
|
+
`,u=this.buffer[l+1]):a=l),u==="#"||n&&co.has(u))break;if(o===`
|
|
133
|
+
`){const d=this.continueScalar(l+1);if(d===-1)break;l=Math.max(l,d-2)}}else{if(n&&co.has(o))break;a=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Wd,yield*this.pushToIndex(a+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,a){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(a&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Rd))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,a=this.charAt(1);if(zn(a)||n&&co.has(a))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,a=this.buffer[n];for(;!zn(a)&&a!==">";)a=this.buffer[++n];return yield*this.pushToIndex(a===">"?n+1:n,!1)}else{let n=this.pos+1,a=this.buffer[n];for(;a;)if(zj.has(a))a=this.buffer[++n];else if(a==="%"&&dy.has(this.buffer[n+1])&&dy.has(this.buffer[n+2]))a=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
|
|
134
|
+
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
|
|
135
|
+
`?yield*this.pushCount(2):0}*pushSpaces(n){let a=this.pos-1,l;do l=this.buffer[++a];while(l===" "||n&&l===" ");const o=a-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=a),o}*pushUntil(n){let a=this.pos,l=this.buffer[a];for(;!n(l);)l=this.buffer[++a];return yield*this.pushToIndex(a,!1)}}class Aj{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let a=0,l=this.lineStarts.length;for(;a<l;){const u=a+l>>1;this.lineStarts[u]<n?a=u+1:l=u}if(this.lineStarts[a]===n)return{line:a+1,col:1};if(a===0)return{line:0,col:n};const o=this.lineStarts[a-1];return{line:a,col:n-o+1}}}}function Li(t,n){for(let a=0;a<t.length;++a)if(t[a].type===n)return!0;return!1}function fy(t){for(let n=0;n<t.length;++n)switch(t[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Jv(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function uo(t){switch(t.type){case"document":return t.start;case"block-map":{const n=t.items[t.items.length-1];return n.sep??n.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function us(t){if(t.length===0)return[];let n=t.length;e:for(;--n>=0;)switch(t[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++n]?.type==="space";);return t.splice(n,t.length)}function hy(t){if(t.start.type==="flow-seq-start")for(const n of t.items)n.sep&&!n.value&&!Li(n.start,"explicit-key-ind")&&!Li(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Jv(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class Oj{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Ej,this.onNewLine=n}*parse(n,a=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,a))yield*this.next(l);a||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const a=_j(n);if(a)if(a==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=a,yield*this.step(),a){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&n?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const a=n??this.stack.pop();if(!a)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield a;else{const l=this.peek(1);switch(a.type==="block-scalar"?a.indent="indent"in l?l.indent:0:a.type==="flow-collection"&&l.type==="document"&&(a.indent=0),a.type==="flow-collection"&&hy(a),l.type){case"document":l.value=a;break;case"block-scalar":l.props.push(a);break;case"block-map":{const o=l.items[l.items.length-1];if(o.value){l.items.push({start:[],key:a,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=a;else{Object.assign(o,{key:a,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=l.items[l.items.length-1];o.value?l.items.push({start:[],value:a}):o.value=a;break}case"flow-collection":{const o=l.items[l.items.length-1];!o||o.value?l.items.push({start:[],key:a,sep:[]}):o.sep?o.value=a:Object.assign(o,{key:a,sep:[]});return}default:yield*this.pop(),yield*this.pop(a)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(a.type==="block-map"||a.type==="block-seq")){const o=a.items[a.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&fy(o.start)===-1&&(a.indent===0||o.start.every(u=>u.type!=="comment"||u.indent<a.indent))&&(l.type==="document"?l.end=o.start:l.items.push({start:o.start}),a.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{fy(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const a=this.startBlockValue(n);a?this.stack.push(a):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const a=uo(this.peek(2)),l=us(a);let o;n.end?(o=n.end,o.push(this.sourceToken),delete n.end):o=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf(`
|
|
136
|
+
`)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
|
|
137
|
+
`,a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else if(a.sep)a.sep.push(this.sourceToken);else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const l=!this.onKeyLine&&this.indent===n.indent,o=l&&(a.sep||a.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&a.sep&&!a.value){const d=[];for(let m=0;m<a.sep.length;++m){const p=a.sep[m];switch(p.type){case"newline":d.push(m);break;case"space":break;case"comment":p.indent>n.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(u=a.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":o||a.value?(u.push(this.sourceToken),n.items.push({start:u}),this.onKeyLine=!0):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"explicit-key-ind":!a.sep&&!a.explicitKey?(a.start.push(this.sourceToken),a.explicitKey=!0):o||a.value?(u.push(this.sourceToken),n.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(a.explicitKey)if(a.sep)if(a.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Li(a.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(Jv(a.key)&&!Li(a.sep,"newline")){const d=us(a.start),m=a.key,p=a.sep;p.push(this.sourceToken),delete a.key,delete a.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:m,sep:p}]})}else u.length>0?a.sep=a.sep.concat(u,this.sourceToken):a.sep.push(this.sourceToken);else if(Li(a.start,"newline"))Object.assign(a,{key:null,sep:[this.sourceToken]});else{const d=us(a.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else a.sep?a.value||o?n.items.push({start:u,key:null,sep:[this.sourceToken]}):Li(a.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const d=this.flowScalar(this.type);o||a.value?(n.items.push({start:u,key:d,sep:[]}),this.onKeyLine=!0):a.sep?this.stack.push(d):(Object.assign(a,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(n);if(d){if(d.type==="block-seq"){if(!a.explicitKey&&a.sep&&!Li(a.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&n.items.push({start:u});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return;case"anchor":case"tag":if(a.value||this.indent<=n.indent)break;a.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;a.value||Li(a.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return}if(this.indent>n.indent){const l=this.startBlockValue(n);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const a=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while(l?.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!a||a.sep?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return;case"map-value-ind":!a||a.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!a||a.value?n.items.push({start:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!a||a.value?n.items.push({start:[],key:o,sep:[]}):a.sep?this.stack.push(o):Object.assign(a,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const o=uo(l),u=us(o);hy(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const m={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:u,key:n,sep:d}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let a=this.source.indexOf(`
|
|
138
|
+
`)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
|
|
139
|
+
`,a)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const a=uo(n),l=us(a);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const a=uo(n),l=us(a);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,a){return this.type!=="comment"||this.indent<=a?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Tj(t){const n=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||n&&new Aj||null,prettyErrors:n}}function Dj(t,n={}){const{lineCounter:a,prettyErrors:l}=Tj(n),o=new Oj(a?.addNewLine),u=new kj(n),d=Array.from(u.compose(o.parse(t)));if(l&&a)for(const m of d)m.errors.forEach(oy(t,a)),m.warnings.forEach(oy(t,a));return d.length>0?d:Object.assign([],{empty:!0},u.streamInfo())}function Bi(t,n,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t?.(o),a===!1||!o.defaultPrevented)return n?.(o)}}function my(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function Cf(...t){return n=>{let a=!1;const l=t.map(o=>{const u=my(o,n);return!a&&typeof u=="function"&&(a=!0),u});if(a)return()=>{for(let o=0;o<l.length;o++){const u=l[o];typeof u=="function"?u():my(t[o],null)}}}}function xa(...t){return w.useCallback(Cf(...t),t)}function Rj(t,n){const a=w.createContext(n),l=u=>{const{children:d,...m}=u,p=w.useMemo(()=>m,Object.values(m));return c.jsx(a.Provider,{value:p,children:d})};l.displayName=t+"Provider";function o(u){const d=w.useContext(a);if(d)return d;if(n!==void 0)return n;throw new Error(`\`${u}\` must be used within \`${t}\``)}return[l,o]}function Mj(t,n=[]){let a=[];function l(u,d){const m=w.createContext(d),p=a.length;a=[...a,d];const g=v=>{const{scope:x,children:N,...C}=v,j=x?.[t]?.[p]||m,k=w.useMemo(()=>C,Object.values(C));return c.jsx(j.Provider,{value:k,children:N})};g.displayName=u+"Provider";function b(v,x){const N=x?.[t]?.[p]||m,C=w.useContext(N);if(C)return C;if(d!==void 0)return d;throw new Error(`\`${v}\` must be used within \`${u}\``)}return[g,b]}const o=()=>{const u=a.map(d=>w.createContext(d));return function(m){const p=m?.[t]||u;return w.useMemo(()=>({[`__scope${t}`]:{...m,[t]:p}}),[m,p])}};return o.scopeName=t,[l,Lj(o,...n)]}function Lj(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const l=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(u){const d=l.reduce((m,{useScope:p,scopeName:g})=>{const v=p(u)[`__scope${g}`];return{...m,...v}},{});return w.useMemo(()=>({[`__scope${n.scopeName}`]:d}),[d])}};return a.scopeName=n.scopeName,a}var Ml=globalThis?.document?w.useLayoutEffect:()=>{},Uj=ff[" useId ".trim().toString()]||(()=>{}),$j=0;function Md(t){const[n,a]=w.useState(Uj());return Ml(()=>{a(l=>l??String($j++))},[t]),t||(n?`radix-${n}`:"")}var Bj=ff[" useInsertionEffect ".trim().toString()]||Ml;function Ij({prop:t,defaultProp:n,onChange:a=()=>{},caller:l}){const[o,u,d]=Zj({defaultProp:n,onChange:a}),m=t!==void 0,p=m?t:o;{const b=w.useRef(t!==void 0);w.useEffect(()=>{const v=b.current;v!==m&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=m},[m,l])}const g=w.useCallback(b=>{if(m){const v=qj(b)?b(t):b;v!==t&&d.current?.(v)}else u(b)},[m,t,u,d]);return[p,g]}function Zj({defaultProp:t,onChange:n}){const[a,l]=w.useState(t),o=w.useRef(a),u=w.useRef(n);return Bj(()=>{u.current=n},[n]),w.useEffect(()=>{o.current!==a&&(u.current?.(a),o.current=a)},[a,o]),[a,l,u]}function qj(t){return typeof t=="function"}var Fv=pv();const Hj=mv(Fv);function Wv(t){const n=Gj(t),a=w.forwardRef((l,o)=>{const{children:u,...d}=l,m=w.Children.toArray(u),p=m.find(Yj);if(p){const g=p.props.children,b=m.map(v=>v===p?w.Children.count(g)>1?w.Children.only(null):w.isValidElement(g)?g.props.children:null:v);return c.jsx(n,{...d,ref:o,children:w.isValidElement(g)?w.cloneElement(g,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return a.displayName=`${t}.Slot`,a}function Gj(t){const n=w.forwardRef((a,l)=>{const{children:o,...u}=a;if(w.isValidElement(o)){const d=Pj(o),m=Vj(u,o.props);return o.type!==w.Fragment&&(m.ref=l?Cf(l,d):d),w.cloneElement(o,m)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Kj=Symbol("radix.slottable");function Yj(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Kj}function Vj(t,n){const a={...n};for(const l in n){const o=t[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?a[l]=(...m)=>{const p=u(...m);return o(...m),p}:o&&(a[l]=o):l==="style"?a[l]={...o,...u}:l==="className"&&(a[l]=[o,u].filter(Boolean).join(" "))}return{...t,...a}}function Pj(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Qj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ri=Qj.reduce((t,n)=>{const a=Wv(`Primitive.${n}`),l=w.forwardRef((o,u)=>{const{asChild:d,...m}=o,p=d?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(p,{...m,ref:u})});return l.displayName=`Primitive.${n}`,{...t,[n]:l}},{});function Xj(t,n){t&&Fv.flushSync(()=>t.dispatchEvent(n))}function Ll(t){const n=w.useRef(t);return w.useEffect(()=>{n.current=t}),w.useMemo(()=>(...a)=>n.current?.(...a),[])}function Jj(t,n=globalThis?.document){const a=Ll(t);w.useEffect(()=>{const l=o=>{o.key==="Escape"&&a(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var Fj="DismissableLayer",ef="dismissableLayer.update",Wj="dismissableLayer.pointerDownOutside",eN="dismissableLayer.focusOutside",py,e0=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),t0=w.forwardRef((t,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:u,onInteractOutside:d,onDismiss:m,...p}=t,g=w.useContext(e0),[b,v]=w.useState(null),x=b?.ownerDocument??globalThis?.document,[,N]=w.useState({}),C=xa(n,V=>v(V)),j=Array.from(g.layers),[k]=[...g.layersWithOutsidePointerEventsDisabled].slice(-1),A=j.indexOf(k),T=b?j.indexOf(b):-1,O=g.layersWithOutsidePointerEventsDisabled.size>0,D=T>=A,L=iN(V=>{const R=V.target,Q=[...g.branches].some(be=>be.contains(R));!D||Q||(o?.(V),d?.(V),V.defaultPrevented||m?.())},x),H=aN(V=>{const R=V.target;[...g.branches].some(be=>be.contains(R))||(u?.(V),d?.(V),V.defaultPrevented||m?.())},x);return Jj(V=>{T===g.layers.size-1&&(l?.(V),!V.defaultPrevented&&m&&(V.preventDefault(),m()))},x),w.useEffect(()=>{if(b)return a&&(g.layersWithOutsidePointerEventsDisabled.size===0&&(py=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),g.layersWithOutsidePointerEventsDisabled.add(b)),g.layers.add(b),gy(),()=>{a&&g.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=py)}},[b,x,a,g]),w.useEffect(()=>()=>{b&&(g.layers.delete(b),g.layersWithOutsidePointerEventsDisabled.delete(b),gy())},[b,g]),w.useEffect(()=>{const V=()=>N({});return document.addEventListener(ef,V),()=>document.removeEventListener(ef,V)},[]),c.jsx(ri.div,{...p,ref:C,style:{pointerEvents:O?D?"auto":"none":void 0,...t.style},onFocusCapture:Bi(t.onFocusCapture,H.onFocusCapture),onBlurCapture:Bi(t.onBlurCapture,H.onBlurCapture),onPointerDownCapture:Bi(t.onPointerDownCapture,L.onPointerDownCapture)})});t0.displayName=Fj;var tN="DismissableLayerBranch",nN=w.forwardRef((t,n)=>{const a=w.useContext(e0),l=w.useRef(null),o=xa(n,l);return w.useEffect(()=>{const u=l.current;if(u)return a.branches.add(u),()=>{a.branches.delete(u)}},[a.branches]),c.jsx(ri.div,{...t,ref:o})});nN.displayName=tN;function iN(t,n=globalThis?.document){const a=Ll(t),l=w.useRef(!1),o=w.useRef(()=>{});return w.useEffect(()=>{const u=m=>{if(m.target&&!l.current){let p=function(){n0(Wj,a,g,{discrete:!0})};const g={originalEvent:m};m.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=p,n.addEventListener("click",o.current,{once:!0})):p()}else n.removeEventListener("click",o.current);l.current=!1},d=window.setTimeout(()=>{n.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),n.removeEventListener("pointerdown",u),n.removeEventListener("click",o.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function aN(t,n=globalThis?.document){const a=Ll(t),l=w.useRef(!1);return w.useEffect(()=>{const o=u=>{u.target&&!l.current&&n0(eN,a,{originalEvent:u},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function gy(){const t=new CustomEvent(ef);document.dispatchEvent(t)}function n0(t,n,a,{discrete:l}){const o=a.originalEvent.target,u=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});n&&o.addEventListener(t,n,{once:!0}),l?Xj(o,u):o.dispatchEvent(u)}var Ld="focusScope.autoFocusOnMount",Ud="focusScope.autoFocusOnUnmount",yy={bubbles:!1,cancelable:!0},sN="FocusScope",i0=w.forwardRef((t,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:u,...d}=t,[m,p]=w.useState(null),g=Ll(o),b=Ll(u),v=w.useRef(null),x=xa(n,j=>p(j)),N=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(l){let j=function(O){if(N.paused||!m)return;const D=O.target;m.contains(D)?v.current=D:Mi(v.current,{select:!0})},k=function(O){if(N.paused||!m)return;const D=O.relatedTarget;D!==null&&(m.contains(D)||Mi(v.current,{select:!0}))},A=function(O){if(document.activeElement===document.body)for(const L of O)L.removedNodes.length>0&&Mi(m)};document.addEventListener("focusin",j),document.addEventListener("focusout",k);const T=new MutationObserver(A);return m&&T.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",k),T.disconnect()}}},[l,m,N.paused]),w.useEffect(()=>{if(m){by.add(N);const j=document.activeElement;if(!m.contains(j)){const A=new CustomEvent(Ld,yy);m.addEventListener(Ld,g),m.dispatchEvent(A),A.defaultPrevented||(lN(dN(a0(m)),{select:!0}),document.activeElement===j&&Mi(m))}return()=>{m.removeEventListener(Ld,g),setTimeout(()=>{const A=new CustomEvent(Ud,yy);m.addEventListener(Ud,b),m.dispatchEvent(A),A.defaultPrevented||Mi(j??document.body,{select:!0}),m.removeEventListener(Ud,b),by.remove(N)},0)}}},[m,g,b,N]);const C=w.useCallback(j=>{if(!a&&!l||N.paused)return;const k=j.key==="Tab"&&!j.altKey&&!j.ctrlKey&&!j.metaKey,A=document.activeElement;if(k&&A){const T=j.currentTarget,[O,D]=rN(T);O&&D?!j.shiftKey&&A===D?(j.preventDefault(),a&&Mi(O,{select:!0})):j.shiftKey&&A===O&&(j.preventDefault(),a&&Mi(D,{select:!0})):A===T&&j.preventDefault()}},[a,l,N.paused]);return c.jsx(ri.div,{tabIndex:-1,...d,ref:x,onKeyDown:C})});i0.displayName=sN;function lN(t,{select:n=!1}={}){const a=document.activeElement;for(const l of t)if(Mi(l,{select:n}),document.activeElement!==a)return}function rN(t){const n=a0(t),a=vy(n,t),l=vy(n.reverse(),t);return[a,l]}function a0(t){const n=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function vy(t,n){for(const a of t)if(!oN(a,{upTo:n}))return a}function oN(t,{upTo:n}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(n!==void 0&&t===n)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function cN(t){return t instanceof HTMLInputElement&&"select"in t}function Mi(t,{select:n=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&cN(t)&&n&&t.select()}}var by=uN();function uN(){let t=[];return{add(n){const a=t[0];n!==a&&a?.pause(),t=xy(t,n),t.unshift(n)},remove(n){t=xy(t,n),t[0]?.resume()}}}function xy(t,n){const a=[...t],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function dN(t){return t.filter(n=>n.tagName!=="A")}var fN="Portal",s0=w.forwardRef((t,n)=>{const{container:a,...l}=t,[o,u]=w.useState(!1);Ml(()=>u(!0),[]);const d=a||o&&globalThis?.document?.body;return d?Hj.createPortal(c.jsx(ri.div,{...l,ref:n}),d):null});s0.displayName=fN;function hN(t,n){return w.useReducer((a,l)=>n[a][l]??a,t)}var Fo=t=>{const{present:n,children:a}=t,l=mN(n),o=typeof a=="function"?a({present:l.isPresent}):w.Children.only(a),u=xa(l.ref,pN(o));return typeof a=="function"||l.isPresent?w.cloneElement(o,{ref:u}):null};Fo.displayName="Presence";function mN(t){const[n,a]=w.useState(),l=w.useRef(null),o=w.useRef(t),u=w.useRef("none"),d=t?"mounted":"unmounted",[m,p]=hN(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const g=fo(l.current);u.current=m==="mounted"?g:"none"},[m]),Ml(()=>{const g=l.current,b=o.current;if(b!==t){const x=u.current,N=fo(g);t?p("MOUNT"):N==="none"||g?.display==="none"?p("UNMOUNT"):p(b&&x!==N?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,p]),Ml(()=>{if(n){let g;const b=n.ownerDocument.defaultView??window,v=N=>{const j=fo(l.current).includes(CSS.escape(N.animationName));if(N.target===n&&j&&(p("ANIMATION_END"),!o.current)){const k=n.style.animationFillMode;n.style.animationFillMode="forwards",g=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=k)})}},x=N=>{N.target===n&&(u.current=fo(l.current))};return n.addEventListener("animationstart",x),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{b.clearTimeout(g),n.removeEventListener("animationstart",x),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[n,p]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(g=>{l.current=g?getComputedStyle(g):null,a(g)},[])}}function fo(t){return t?.animationName||"none"}function pN(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var $d=0;function gN(){w.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Sy()),document.body.insertAdjacentElement("beforeend",t[1]??Sy()),$d++,()=>{$d===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),$d--}},[])}function Sy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Un=function(){return Un=Object.assign||function(n){for(var a,l=1,o=arguments.length;l<o;l++){a=arguments[l];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(n[u]=a[u])}return n},Un.apply(this,arguments)};function l0(t,n){var a={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&n.indexOf(l)<0&&(a[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(a[l[o]]=t[l[o]]);return a}function yN(t,n,a){if(a||arguments.length===2)for(var l=0,o=n.length,u;l<o;l++)(u||!(l in n))&&(u||(u=Array.prototype.slice.call(n,0,l)),u[l]=n[l]);return t.concat(u||Array.prototype.slice.call(n))}var zo="right-scroll-bar-position",Co="width-before-scroll-bar",vN="with-scroll-bars-hidden",bN="--removed-body-scroll-bar-size";function Bd(t,n){return typeof t=="function"?t(n):t&&(t.current=n),t}function xN(t,n){var a=w.useState(function(){return{value:t,callback:n,facade:{get current(){return a.value},set current(l){var o=a.value;o!==l&&(a.value=l,a.callback(l,o))}}}})[0];return a.callback=n,a.facade}var SN=typeof window<"u"?w.useLayoutEffect:w.useEffect,wy=new WeakMap;function wN(t,n){var a=xN(null,function(l){return t.forEach(function(o){return Bd(o,l)})});return SN(function(){var l=wy.get(a);if(l){var o=new Set(l),u=new Set(t),d=a.current;o.forEach(function(m){u.has(m)||Bd(m,null)}),u.forEach(function(m){o.has(m)||Bd(m,d)})}wy.set(a,t)},[t]),a}function jN(t){return t}function NN(t,n){n===void 0&&(n=jN);var a=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(u){var d=n(u,l);return a.push(d),function(){a=a.filter(function(m){return m!==d})}},assignSyncMedium:function(u){for(l=!0;a.length;){var d=a;a=[],d.forEach(u)}a={push:function(m){return u(m)},filter:function(){return a}}},assignMedium:function(u){l=!0;var d=[];if(a.length){var m=a;a=[],m.forEach(u),d=a}var p=function(){var b=d;d=[],b.forEach(u)},g=function(){return Promise.resolve().then(p)};g(),a={push:function(b){d.push(b),g()},filter:function(b){return d=d.filter(b),a}}}};return o}function kN(t){t===void 0&&(t={});var n=NN(null);return n.options=Un({async:!0,ssr:!1},t),n}var r0=function(t){var n=t.sideCar,a=l0(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return w.createElement(l,Un({},a))};r0.isSideCarExport=!0;function _N(t,n){return t.useMedium(n),r0}var o0=kN(),Id=function(){},Wo=w.forwardRef(function(t,n){var a=w.useRef(null),l=w.useState({onScrollCapture:Id,onWheelCapture:Id,onTouchMoveCapture:Id}),o=l[0],u=l[1],d=t.forwardProps,m=t.children,p=t.className,g=t.removeScrollBar,b=t.enabled,v=t.shards,x=t.sideCar,N=t.noRelative,C=t.noIsolation,j=t.inert,k=t.allowPinchZoom,A=t.as,T=A===void 0?"div":A,O=t.gapMode,D=l0(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,H=wN([a,n]),V=Un(Un({},D),o);return w.createElement(w.Fragment,null,b&&w.createElement(L,{sideCar:o0,removeScrollBar:g,shards:v,noRelative:N,noIsolation:C,inert:j,setCallbacks:u,allowPinchZoom:!!k,lockRef:a,gapMode:O}),d?w.cloneElement(w.Children.only(m),Un(Un({},V),{ref:H})):w.createElement(T,Un({},V,{className:p,ref:H}),m))});Wo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wo.classNames={fullWidth:Co,zeroRight:zo};var zN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=zN();return n&&t.setAttribute("nonce",n),t}function EN(t,n){t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}function AN(t){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(t)}var ON=function(){var t=0,n=null;return{add:function(a){t==0&&(n=CN())&&(EN(n,a),AN(n)),t++},remove:function(){t--,!t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},TN=function(){var t=ON();return function(n,a){w.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&a])}},c0=function(){var t=TN(),n=function(a){var l=a.styles,o=a.dynamic;return t(l,o),null};return n},DN={left:0,top:0,right:0,gap:0},Zd=function(t){return parseInt(t||"",10)||0},RN=function(t){var n=window.getComputedStyle(document.body),a=n[t==="padding"?"paddingLeft":"marginLeft"],l=n[t==="padding"?"paddingTop":"marginTop"],o=n[t==="padding"?"paddingRight":"marginRight"];return[Zd(a),Zd(l),Zd(o)]},MN=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return DN;var n=RN(t),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},LN=c0(),Ss="data-scroll-locked",UN=function(t,n,a,l){var o=t.left,u=t.top,d=t.right,m=t.gap;return a===void 0&&(a="margin"),`
|
|
140
|
+
.`.concat(vN,` {
|
|
141
|
+
overflow: hidden `).concat(l,`;
|
|
142
|
+
padding-right: `).concat(m,"px ").concat(l,`;
|
|
143
|
+
}
|
|
144
|
+
body[`).concat(Ss,`] {
|
|
145
|
+
overflow: hidden `).concat(l,`;
|
|
146
|
+
overscroll-behavior: contain;
|
|
147
|
+
`).concat([n&&"position: relative ".concat(l,";"),a==="margin"&&`
|
|
148
|
+
padding-left: `.concat(o,`px;
|
|
149
|
+
padding-top: `).concat(u,`px;
|
|
150
|
+
padding-right: `).concat(d,`px;
|
|
151
|
+
margin-left:0;
|
|
152
|
+
margin-top:0;
|
|
153
|
+
margin-right: `).concat(m,"px ").concat(l,`;
|
|
154
|
+
`),a==="padding"&&"padding-right: ".concat(m,"px ").concat(l,";")].filter(Boolean).join(""),`
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.`).concat(zo,` {
|
|
158
|
+
right: `).concat(m,"px ").concat(l,`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.`).concat(Co,` {
|
|
162
|
+
margin-right: `).concat(m,"px ").concat(l,`;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.`).concat(zo," .").concat(zo,` {
|
|
166
|
+
right: 0 `).concat(l,`;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.`).concat(Co," .").concat(Co,` {
|
|
170
|
+
margin-right: 0 `).concat(l,`;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
body[`).concat(Ss,`] {
|
|
174
|
+
`).concat(bN,": ").concat(m,`px;
|
|
175
|
+
}
|
|
176
|
+
`)},jy=function(){var t=parseInt(document.body.getAttribute(Ss)||"0",10);return isFinite(t)?t:0},$N=function(){w.useEffect(function(){return document.body.setAttribute(Ss,(jy()+1).toString()),function(){var t=jy()-1;t<=0?document.body.removeAttribute(Ss):document.body.setAttribute(Ss,t.toString())}},[])},BN=function(t){var n=t.noRelative,a=t.noImportant,l=t.gapMode,o=l===void 0?"margin":l;$N();var u=w.useMemo(function(){return MN(o)},[o]);return w.createElement(LN,{styles:UN(u,!n,o,a?"":"!important")})},tf=!1;if(typeof window<"u")try{var ho=Object.defineProperty({},"passive",{get:function(){return tf=!0,!0}});window.addEventListener("test",ho,ho),window.removeEventListener("test",ho,ho)}catch{tf=!1}var ds=tf?{passive:!1}:!1,IN=function(t){return t.tagName==="TEXTAREA"},u0=function(t,n){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!IN(t)&&a[n]==="visible")},ZN=function(t){return u0(t,"overflowY")},qN=function(t){return u0(t,"overflowX")},Ny=function(t,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=d0(t,l);if(o){var u=f0(t,l),d=u[1],m=u[2];if(d>m)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},HN=function(t){var n=t.scrollTop,a=t.scrollHeight,l=t.clientHeight;return[n,a,l]},GN=function(t){var n=t.scrollLeft,a=t.scrollWidth,l=t.clientWidth;return[n,a,l]},d0=function(t,n){return t==="v"?ZN(n):qN(n)},f0=function(t,n){return t==="v"?HN(n):GN(n)},KN=function(t,n){return t==="h"&&n==="rtl"?-1:1},YN=function(t,n,a,l,o){var u=KN(t,window.getComputedStyle(n).direction),d=u*l,m=a.target,p=n.contains(m),g=!1,b=d>0,v=0,x=0;do{if(!m)break;var N=f0(t,m),C=N[0],j=N[1],k=N[2],A=j-k-u*C;(C||A)&&d0(t,m)&&(v+=A,x+=C);var T=m.parentNode;m=T&&T.nodeType===Node.DOCUMENT_FRAGMENT_NODE?T.host:T}while(!p&&m!==document.body||p&&(n.contains(m)||n===m));return(b&&Math.abs(v)<1||!b&&Math.abs(x)<1)&&(g=!0),g},mo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},ky=function(t){return[t.deltaX,t.deltaY]},_y=function(t){return t&&"current"in t?t.current:t},VN=function(t,n){return t[0]===n[0]&&t[1]===n[1]},PN=function(t){return`
|
|
177
|
+
.block-interactivity-`.concat(t,` {pointer-events: none;}
|
|
178
|
+
.allow-interactivity-`).concat(t,` {pointer-events: all;}
|
|
179
|
+
`)},QN=0,fs=[];function XN(t){var n=w.useRef([]),a=w.useRef([0,0]),l=w.useRef(),o=w.useState(QN++)[0],u=w.useState(c0)[0],d=w.useRef(t);w.useEffect(function(){d.current=t},[t]),w.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var j=yN([t.lockRef.current],(t.shards||[]).map(_y),!0).filter(Boolean);return j.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),j.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var m=w.useCallback(function(j,k){if("touches"in j&&j.touches.length===2||j.type==="wheel"&&j.ctrlKey)return!d.current.allowPinchZoom;var A=mo(j),T=a.current,O="deltaX"in j?j.deltaX:T[0]-A[0],D="deltaY"in j?j.deltaY:T[1]-A[1],L,H=j.target,V=Math.abs(O)>Math.abs(D)?"h":"v";if("touches"in j&&V==="h"&&H.type==="range")return!1;var R=window.getSelection(),Q=R&&R.anchorNode,be=Q?Q===H||Q.contains(H):!1;if(be)return!1;var X=Ny(V,H);if(!X)return!0;if(X?L=V:(L=V==="v"?"h":"v",X=Ny(V,H)),!X)return!1;if(!l.current&&"changedTouches"in j&&(O||D)&&(l.current=L),!L)return!0;var ce=l.current||L;return YN(ce,k,j,ce==="h"?O:D)},[]),p=w.useCallback(function(j){var k=j;if(!(!fs.length||fs[fs.length-1]!==u)){var A="deltaY"in k?ky(k):mo(k),T=n.current.filter(function(L){return L.name===k.type&&(L.target===k.target||k.target===L.shadowParent)&&VN(L.delta,A)})[0];if(T&&T.should){k.cancelable&&k.preventDefault();return}if(!T){var O=(d.current.shards||[]).map(_y).filter(Boolean).filter(function(L){return L.contains(k.target)}),D=O.length>0?m(k,O[0]):!d.current.noIsolation;D&&k.cancelable&&k.preventDefault()}}},[]),g=w.useCallback(function(j,k,A,T){var O={name:j,delta:k,target:A,should:T,shadowParent:JN(A)};n.current.push(O),setTimeout(function(){n.current=n.current.filter(function(D){return D!==O})},1)},[]),b=w.useCallback(function(j){a.current=mo(j),l.current=void 0},[]),v=w.useCallback(function(j){g(j.type,ky(j),j.target,m(j,t.lockRef.current))},[]),x=w.useCallback(function(j){g(j.type,mo(j),j.target,m(j,t.lockRef.current))},[]);w.useEffect(function(){return fs.push(u),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",p,ds),document.addEventListener("touchmove",p,ds),document.addEventListener("touchstart",b,ds),function(){fs=fs.filter(function(j){return j!==u}),document.removeEventListener("wheel",p,ds),document.removeEventListener("touchmove",p,ds),document.removeEventListener("touchstart",b,ds)}},[]);var N=t.removeScrollBar,C=t.inert;return w.createElement(w.Fragment,null,C?w.createElement(u,{styles:PN(o)}):null,N?w.createElement(BN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function JN(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const FN=_N(o0,XN);var h0=w.forwardRef(function(t,n){return w.createElement(Wo,Un({},t,{ref:n,sideCar:FN}))});h0.classNames=Wo.classNames;var WN=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},hs=new WeakMap,po=new WeakMap,go={},qd=0,m0=function(t){return t&&(t.host||m0(t.parentNode))},e1=function(t,n){return n.map(function(a){if(t.contains(a))return a;var l=m0(a);return l&&t.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},t1=function(t,n,a,l){var o=e1(n,Array.isArray(t)?t:[t]);go[a]||(go[a]=new WeakMap);var u=go[a],d=[],m=new Set,p=new Set(o),g=function(v){!v||m.has(v)||(m.add(v),g(v.parentNode))};o.forEach(g);var b=function(v){!v||p.has(v)||Array.prototype.forEach.call(v.children,function(x){if(m.has(x))b(x);else try{var N=x.getAttribute(l),C=N!==null&&N!=="false",j=(hs.get(x)||0)+1,k=(u.get(x)||0)+1;hs.set(x,j),u.set(x,k),d.push(x),j===1&&C&&po.set(x,!0),k===1&&x.setAttribute(a,"true"),C||x.setAttribute(l,"true")}catch(A){console.error("aria-hidden: cannot operate on ",x,A)}})};return b(n),m.clear(),qd++,function(){d.forEach(function(v){var x=hs.get(v)-1,N=u.get(v)-1;hs.set(v,x),u.set(v,N),x||(po.has(v)||v.removeAttribute(l),po.delete(v)),N||v.removeAttribute(a)}),qd--,qd||(hs=new WeakMap,hs=new WeakMap,po=new WeakMap,go={})}},n1=function(t,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),o=WN(t);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),t1(l,o,a,"aria-hidden")):function(){return null}},ec="Dialog",[p0]=Mj(ec),[i1,An]=p0(ec),g0=t=>{const{__scopeDialog:n,children:a,open:l,defaultOpen:o,onOpenChange:u,modal:d=!0}=t,m=w.useRef(null),p=w.useRef(null),[g,b]=Ij({prop:l,defaultProp:o??!1,onChange:u,caller:ec});return c.jsx(i1,{scope:n,triggerRef:m,contentRef:p,contentId:Md(),titleId:Md(),descriptionId:Md(),open:g,onOpenChange:b,onOpenToggle:w.useCallback(()=>b(v=>!v),[b]),modal:d,children:a})};g0.displayName=ec;var y0="DialogTrigger",a1=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=An(y0,a),u=xa(n,o.triggerRef);return c.jsx(ri.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Of(o.open),...l,ref:u,onClick:Bi(t.onClick,o.onOpenToggle)})});a1.displayName=y0;var Ef="DialogPortal",[s1,v0]=p0(Ef,{forceMount:void 0}),b0=t=>{const{__scopeDialog:n,forceMount:a,children:l,container:o}=t,u=An(Ef,n);return c.jsx(s1,{scope:n,forceMount:a,children:w.Children.map(l,d=>c.jsx(Fo,{present:a||u.open,children:c.jsx(s0,{asChild:!0,container:o,children:d})}))})};b0.displayName=Ef;var Oo="DialogOverlay",x0=w.forwardRef((t,n)=>{const a=v0(Oo,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=An(Oo,t.__scopeDialog);return u.modal?c.jsx(Fo,{present:l||u.open,children:c.jsx(r1,{...o,ref:n})}):null});x0.displayName=Oo;var l1=Wv("DialogOverlay.RemoveScroll"),r1=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=An(Oo,a);return c.jsx(h0,{as:l1,allowPinchZoom:!0,shards:[o.contentRef],children:c.jsx(ri.div,{"data-state":Of(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),va="DialogContent",S0=w.forwardRef((t,n)=>{const a=v0(va,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,u=An(va,t.__scopeDialog);return c.jsx(Fo,{present:l||u.open,children:u.modal?c.jsx(o1,{...o,ref:n}):c.jsx(c1,{...o,ref:n})})});S0.displayName=va;var o1=w.forwardRef((t,n)=>{const a=An(va,t.__scopeDialog),l=w.useRef(null),o=xa(n,a.contentRef,l);return w.useEffect(()=>{const u=l.current;if(u)return n1(u)},[]),c.jsx(w0,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bi(t.onCloseAutoFocus,u=>{u.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:Bi(t.onPointerDownOutside,u=>{const d=u.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0;(d.button===2||m)&&u.preventDefault()}),onFocusOutside:Bi(t.onFocusOutside,u=>u.preventDefault())})}),c1=w.forwardRef((t,n)=>{const a=An(va,t.__scopeDialog),l=w.useRef(!1),o=w.useRef(!1);return c.jsx(w0,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{t.onCloseAutoFocus?.(u),u.defaultPrevented||(l.current||a.triggerRef.current?.focus(),u.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:u=>{t.onInteractOutside?.(u),u.defaultPrevented||(l.current=!0,u.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const d=u.target;a.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&o.current&&u.preventDefault()}})}),w0=w.forwardRef((t,n)=>{const{__scopeDialog:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:u,...d}=t,m=An(va,a),p=w.useRef(null),g=xa(n,p);return gN(),c.jsxs(c.Fragment,{children:[c.jsx(i0,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:u,children:c.jsx(t0,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":Of(m.open),...d,ref:g,onDismiss:()=>m.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(u1,{titleId:m.titleId}),c.jsx(f1,{contentRef:p,descriptionId:m.descriptionId})]})]})}),Af="DialogTitle",j0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=An(Af,a);return c.jsx(ri.h2,{id:o.titleId,...l,ref:n})});j0.displayName=Af;var N0="DialogDescription",k0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=An(N0,a);return c.jsx(ri.p,{id:o.descriptionId,...l,ref:n})});k0.displayName=N0;var _0="DialogClose",z0=w.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=An(_0,a);return c.jsx(ri.button,{type:"button",...l,ref:n,onClick:Bi(t.onClick,()=>o.onOpenChange(!1))})});z0.displayName=_0;function Of(t){return t?"open":"closed"}var C0="DialogTitleWarning",[KO,E0]=Rj(C0,{contentName:va,titleName:Af,docsSlug:"dialog"}),u1=({titleId:t})=>{const n=E0(C0),a=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
|
|
180
|
+
|
|
181
|
+
If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
182
|
+
|
|
183
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return w.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},d1="DialogDescriptionWarning",f1=({contentRef:t,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${E0(d1).contentName}}.`;return w.useEffect(()=>{const o=t.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,t,n]),null},A0=g0,O0=b0,Tf=x0,Df=S0,Rf=j0,T0=k0,D0=z0;const h1=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),m1=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),zy=t=>{const n=m1(t);return n.charAt(0).toUpperCase()+n.slice(1)},R0=(...t)=>t.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),p1=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var g1={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"};const y1=w.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:u,iconNode:d,...m},p)=>w.createElement("svg",{ref:p,...g1,width:n,height:n,stroke:t,strokeWidth:l?Number(a)*24/Number(n):a,className:R0("lucide",o),...!u&&!p1(m)&&{"aria-hidden":"true"},...m},[...d.map(([g,b])=>w.createElement(g,b)),...Array.isArray(u)?u:[u]]));const On=(t,n)=>{const a=w.forwardRef(({className:l,...o},u)=>w.createElement(y1,{ref:u,iconNode:n,className:R0(`lucide-${h1(zy(t))}`,`lucide-${t}`,l),...o}));return a.displayName=zy(t),a};const v1=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Mf=On("chevron-right",v1);const b1=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],x1=On("download",b1);const S1=[["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"}]],w1=On("globe",S1);const j1=[["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"}]],N1=On("layout-dashboard",j1);const k1=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],_1=On("menu",k1);const z1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],C1=On("play",z1);const E1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cy=On("plus",E1);const A1=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],O1=On("rocket",A1);const T1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],D1=On("settings",T1);const R1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],M1=On("trash-2",R1);const L1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Lf=On("x",L1);function F(t,n,a){function l(m,p){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:p,constr:d,traits:new Set},enumerable:!1}),m._zod.traits.has(t))return;m._zod.traits.add(t),n(m,p);const g=d.prototype,b=Object.keys(g);for(let v=0;v<b.length;v++){const x=b[v];x in m||(m[x]=g[x].bind(m))}}const o=a?.Parent??Object;class u extends o{}Object.defineProperty(u,"name",{value:t});function d(m){var p;const g=a?.Parent?new u:this;l(g,m),(p=g._zod).deferred??(p.deferred=[]);for(const b of g._zod.deferred)b();return g}return Object.defineProperty(d,"init",{value:l}),Object.defineProperty(d,Symbol.hasInstance,{value:m=>a?.Parent&&m instanceof a.Parent?!0:m?._zod?.traits?.has(t)}),Object.defineProperty(d,"name",{value:t}),d}class ws extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class M0 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const L0={};function Ii(t){return L0}function U0(t){const n=Object.values(t).filter(l=>typeof l=="number");return Object.entries(t).filter(([l,o])=>n.indexOf(+l)===-1).map(([l,o])=>o)}function nf(t,n){return typeof n=="bigint"?n.toString():n}function Uf(t){return{get value(){{const n=t();return Object.defineProperty(this,"value",{value:n}),n}}}}function $f(t){return t==null}function Bf(t){const n=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;return t.slice(n,a)}function U1(t,n){const a=(t.toString().split(".")[1]||"").length,l=n.toString();let o=(l.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(l)){const p=l.match(/\d?e-(\d?)/);p?.[1]&&(o=Number.parseInt(p[1]))}const u=a>o?a:o,d=Number.parseInt(t.toFixed(u).replace(".","")),m=Number.parseInt(n.toFixed(u).replace(".",""));return d%m/10**u}const Ey=Symbol("evaluating");function Ge(t,n,a){let l;Object.defineProperty(t,n,{get(){if(l!==Ey)return l===void 0&&(l=Ey,l=a()),l},set(o){Object.defineProperty(t,n,{value:o})},configurable:!0})}function Sa(t,n,a){Object.defineProperty(t,n,{value:a,writable:!0,enumerable:!0,configurable:!0})}function qi(...t){const n={};for(const a of t){const l=Object.getOwnPropertyDescriptors(a);Object.assign(n,l)}return Object.defineProperties({},n)}function Ay(t){return JSON.stringify(t)}function $1(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const $0="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function To(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const B1=Uf(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function _s(t){if(To(t)===!1)return!1;const n=t.constructor;if(n===void 0||typeof n!="function")return!0;const a=n.prototype;return!(To(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function B0(t){return _s(t)?{...t}:Array.isArray(t)?[...t]:t}const I1=new Set(["string","number","symbol"]);function zs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Hi(t,n,a){const l=new t._zod.constr(n??t._zod.def);return(!n||a?.parent)&&(l._zod.parent=t),l}function ye(t){const n=t;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Z1(t){return Object.keys(t).filter(n=>t[n]._zod.optin==="optional"&&t[n]._zod.optout==="optional")}const q1={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function H1(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=qi(t._zod.def,{get shape(){const d={};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=a.shape[m])}return Sa(this,"shape",d),d},checks:[]});return Hi(t,u)}function G1(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=qi(t._zod.def,{get shape(){const d={...t._zod.def.shape};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&delete d[m]}return Sa(this,"shape",d),d},checks:[]});return Hi(t,u)}function K1(t,n){if(!_s(n))throw new Error("Invalid input to extend: expected a plain object");const a=t._zod.def.checks;if(a&&a.length>0){const u=t._zod.def.shape;for(const d in n)if(Object.getOwnPropertyDescriptor(u,d)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=qi(t._zod.def,{get shape(){const u={...t._zod.def.shape,...n};return Sa(this,"shape",u),u}});return Hi(t,o)}function Y1(t,n){if(!_s(n))throw new Error("Invalid input to safeExtend: expected a plain object");const a=qi(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n};return Sa(this,"shape",l),l}});return Hi(t,a)}function V1(t,n){const a=qi(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n._zod.def.shape};return Sa(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return Hi(t,a)}function P1(t,n,a){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=qi(n._zod.def,{get shape(){const m=n._zod.def.shape,p={...m};if(a)for(const g in a){if(!(g in m))throw new Error(`Unrecognized key: "${g}"`);a[g]&&(p[g]=t?new t({type:"optional",innerType:m[g]}):m[g])}else for(const g in m)p[g]=t?new t({type:"optional",innerType:m[g]}):m[g];return Sa(this,"shape",p),p},checks:[]});return Hi(n,d)}function Q1(t,n,a){const l=qi(n._zod.def,{get shape(){const o=n._zod.def.shape,u={...o};if(a)for(const d in a){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);a[d]&&(u[d]=new t({type:"nonoptional",innerType:o[d]}))}else for(const d in o)u[d]=new t({type:"nonoptional",innerType:o[d]});return Sa(this,"shape",u),u}});return Hi(n,l)}function ys(t,n=0){if(t.aborted===!0)return!0;for(let a=n;a<t.issues.length;a++)if(t.issues[a]?.continue!==!0)return!0;return!1}function vs(t,n){return n.map(a=>{var l;return(l=a).path??(l.path=[]),a.path.unshift(t),a})}function yo(t){return typeof t=="string"?t:t?.message}function Zi(t,n,a){const l={...t,path:t.path??[]};if(!t.message){const o=yo(t.inst?._zod.def?.error?.(t))??yo(n?.error?.(t))??yo(a.customError?.(t))??yo(a.localeError?.(t))??"Invalid input";l.message=o}return delete l.inst,delete l.continue,n?.reportInput||delete l.input,l}function If(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Ul(...t){const[n,a,l]=t;return typeof n=="string"?{message:n,code:"custom",input:a,inst:l}:{...n}}const I0=(t,n)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:n,enumerable:!1}),t.message=JSON.stringify(n,nf,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Z0=F("$ZodError",I0),q0=F("$ZodError",I0,{Parent:Error});function X1(t,n=a=>a.message){const a={},l=[];for(const o of t.issues)o.path.length>0?(a[o.path[0]]=a[o.path[0]]||[],a[o.path[0]].push(n(o))):l.push(n(o));return{formErrors:l,fieldErrors:a}}function J1(t,n=a=>a.message){const a={_errors:[]},l=o=>{for(const u of o.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>l({issues:d}));else if(u.code==="invalid_key")l({issues:u.issues});else if(u.code==="invalid_element")l({issues:u.issues});else if(u.path.length===0)a._errors.push(n(u));else{let d=a,m=0;for(;m<u.path.length;){const p=u.path[m];m===u.path.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(n(u))):d[p]=d[p]||{_errors:[]},d=d[p],m++}}};return l(t),a}const Zf=t=>(n,a,l,o)=>{const u=l?Object.assign(l,{async:!1}):{async:!1},d=n._zod.run({value:a,issues:[]},u);if(d instanceof Promise)throw new ws;if(d.issues.length){const m=new(o?.Err??t)(d.issues.map(p=>Zi(p,u,Ii())));throw $0(m,o?.callee),m}return d.value},qf=t=>async(n,a,l,o)=>{const u=l?Object.assign(l,{async:!0}):{async:!0};let d=n._zod.run({value:a,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const m=new(o?.Err??t)(d.issues.map(p=>Zi(p,u,Ii())));throw $0(m,o?.callee),m}return d.value},tc=t=>(n,a,l)=>{const o=l?{...l,async:!1}:{async:!1},u=n._zod.run({value:a,issues:[]},o);if(u instanceof Promise)throw new ws;return u.issues.length?{success:!1,error:new(t??Z0)(u.issues.map(d=>Zi(d,o,Ii())))}:{success:!0,data:u.value}},F1=tc(q0),nc=t=>async(n,a,l)=>{const o=l?Object.assign(l,{async:!0}):{async:!0};let u=n._zod.run({value:a,issues:[]},o);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new t(u.issues.map(d=>Zi(d,o,Ii())))}:{success:!0,data:u.value}},W1=nc(q0),ek=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Zf(t)(n,a,o)},tk=t=>(n,a,l)=>Zf(t)(n,a,l),nk=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return qf(t)(n,a,o)},ik=t=>async(n,a,l)=>qf(t)(n,a,l),ak=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return tc(t)(n,a,o)},sk=t=>(n,a,l)=>tc(t)(n,a,l),lk=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return nc(t)(n,a,o)},rk=t=>async(n,a,l)=>nc(t)(n,a,l),ok=/^[cC][^\s-]{8,}$/,ck=/^[0-9a-z]+$/,uk=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,dk=/^[0-9a-vA-V]{20}$/,fk=/^[A-Za-z0-9]{27}$/,hk=/^[a-zA-Z0-9_-]{21}$/,mk=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,pk=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Oy=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gk=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,yk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vk(){return new RegExp(yk,"u")}const bk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Sk=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,wk=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,jk=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,H0=/^[A-Za-z0-9_-]*$/,Nk=/^\+[1-9]\d{6,14}$/,G0="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",kk=new RegExp(`^${G0}$`);function K0(t){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${n}`:t.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${t.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function _k(t){return new RegExp(`^${K0(t)}$`)}function zk(t){const n=K0({precision:t.precision}),a=["Z"];t.local&&a.push(""),t.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${a.join("|")})`;return new RegExp(`^${G0}T(?:${l})$`)}const Ck=t=>{const n=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},Ek=/^-?\d+$/,Y0=/^-?\d+(?:\.\d+)?$/,Ak=/^(?:true|false)$/i,Ok=/^[^A-Z]*$/,Tk=/^[^a-z]*$/,Xt=F("$ZodCheck",(t,n)=>{var a;t._zod??(t._zod={}),t._zod.def=n,(a=t._zod).onattach??(a.onattach=[])}),V0={number:"number",bigint:"bigint",object:"date"},P0=F("$ZodCheckLessThan",(t,n)=>{Xt.init(t,n);const a=V0[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:a,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),Q0=F("$ZodCheckGreaterThan",(t,n)=>{Xt.init(t,n);const a=V0[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,u=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:a,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),Dk=F("$ZodCheckMultipleOf",(t,n)=>{Xt.init(t,n),t._zod.onattach.push(a=>{var l;(l=a._zod.bag).multipleOf??(l.multipleOf=n.value)}),t._zod.check=a=>{if(typeof a.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof a.value=="bigint"?a.value%n.value===BigInt(0):U1(a.value,n.value)===0)||a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:n.value,input:a.value,inst:t,continue:!n.abort})}}),Rk=F("$ZodCheckNumberFormat",(t,n)=>{Xt.init(t,n),n.format=n.format||"float64";const a=n.format?.includes("int"),l=a?"int":"number",[o,u]=q1[n.format];t._zod.onattach.push(d=>{const m=d._zod.bag;m.format=n.format,m.minimum=o,m.maximum=u,a&&(m.pattern=Ek)}),t._zod.check=d=>{const m=d.value;if(a){if(!Number.isInteger(m)){d.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:m,inst:t});return}if(!Number.isSafeInteger(m)){m>0?d.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort}):d.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort});return}}m<o&&d.issues.push({origin:"number",input:m,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!n.abort}),m>u&&d.issues.push({origin:"number",input:m,code:"too_big",maximum:u,inclusive:!0,inst:t,continue:!n.abort})}}),Mk=F("$ZodCheckMaxLength",(t,n)=>{var a;Xt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!$f(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(l._zod.bag.maximum=n.maximum)}),t._zod.check=l=>{const o=l.value;if(o.length<=n.maximum)return;const d=If(o);l.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Lk=F("$ZodCheckMinLength",(t,n)=>{var a;Xt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!$f(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(l._zod.bag.minimum=n.minimum)}),t._zod.check=l=>{const o=l.value;if(o.length>=n.minimum)return;const d=If(o);l.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),Uk=F("$ZodCheckLengthEquals",(t,n)=>{var a;Xt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!$f(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),t._zod.check=l=>{const o=l.value,u=o.length;if(u===n.length)return;const d=If(o),m=u>n.length;l.issues.push({origin:d,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!n.abort})}}),ic=F("$ZodCheckStringFormat",(t,n)=>{var a,l;Xt.init(t,n),t._zod.onattach.push(o=>{const u=o._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(a=t._zod).check??(a.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:t,continue:!n.abort})}):(l=t._zod).check??(l.check=()=>{})}),$k=F("$ZodCheckRegex",(t,n)=>{ic.init(t,n),t._zod.check=a=>{n.pattern.lastIndex=0,!n.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:n.pattern.toString(),inst:t,continue:!n.abort})}}),Bk=F("$ZodCheckLowerCase",(t,n)=>{n.pattern??(n.pattern=Ok),ic.init(t,n)}),Ik=F("$ZodCheckUpperCase",(t,n)=>{n.pattern??(n.pattern=Tk),ic.init(t,n)}),Zk=F("$ZodCheckIncludes",(t,n)=>{Xt.init(t,n);const a=zs(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${a}`:a);n.pattern=l,t._zod.onattach.push(o=>{const u=o._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(l)}),t._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:t,continue:!n.abort})}}),qk=F("$ZodCheckStartsWith",(t,n)=>{Xt.init(t,n);const a=new RegExp(`^${zs(n.prefix)}.*`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:t,continue:!n.abort})}}),Hk=F("$ZodCheckEndsWith",(t,n)=>{Xt.init(t,n);const a=new RegExp(`.*${zs(n.suffix)}$`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:t,continue:!n.abort})}}),Gk=F("$ZodCheckOverwrite",(t,n)=>{Xt.init(t,n),t._zod.check=a=>{a.value=n.tx(a.value)}});class Kk{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
|
|
184
|
+
`).filter(d=>d),o=Math.min(...l.map(d=>d.length-d.trimStart().length)),u=l.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,a=this?.args,o=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...a,o.join(`
|
|
185
|
+
`))}}const Yk={major:4,minor:3,patch:6},nt=F("$ZodType",(t,n)=>{var a;t??(t={}),t._zod.def=n,t._zod.bag=t._zod.bag||{},t._zod.version=Yk;const l=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&l.unshift(t);for(const o of l)for(const u of o._zod.onattach)u(t);if(l.length===0)(a=t._zod).deferred??(a.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const o=(d,m,p)=>{let g=ys(d),b;for(const v of m){if(v._zod.def.when){if(!v._zod.def.when(d))continue}else if(g)continue;const x=d.issues.length,N=v._zod.check(d);if(N instanceof Promise&&p?.async===!1)throw new ws;if(b||N instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await N,d.issues.length!==x&&(g||(g=ys(d,x)))});else{if(d.issues.length===x)continue;g||(g=ys(d,x))}}return b?b.then(()=>d):d},u=(d,m,p)=>{if(ys(d))return d.aborted=!0,d;const g=o(m,l,p);if(g instanceof Promise){if(p.async===!1)throw new ws;return g.then(b=>t._zod.parse(b,p))}return t._zod.parse(g,p)};t._zod.run=(d,m)=>{if(m.skipChecks)return t._zod.parse(d,m);if(m.direction==="backward"){const g=t._zod.parse({value:d.value,issues:[]},{...m,skipChecks:!0});return g instanceof Promise?g.then(b=>u(b,d,m)):u(g,d,m)}const p=t._zod.parse(d,m);if(p instanceof Promise){if(m.async===!1)throw new ws;return p.then(g=>o(g,l,m))}return o(p,l,m)}}Ge(t,"~standard",()=>({validate:o=>{try{const u=F1(t,o);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return W1(t,o).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Hf=F("$ZodString",(t,n)=>{nt.init(t,n),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Ck(t._zod.bag),t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:t}),a}}),tt=F("$ZodStringFormat",(t,n)=>{ic.init(t,n),Hf.init(t,n)}),Vk=F("$ZodGUID",(t,n)=>{n.pattern??(n.pattern=pk),tt.init(t,n)}),Pk=F("$ZodUUID",(t,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Oy(l))}else n.pattern??(n.pattern=Oy());tt.init(t,n)}),Qk=F("$ZodEmail",(t,n)=>{n.pattern??(n.pattern=gk),tt.init(t,n)}),Xk=F("$ZodURL",(t,n)=>{tt.init(t,n),t._zod.check=a=>{try{const l=a.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:a.value,inst:t,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:a.value,inst:t,continue:!n.abort})),n.normalize?a.value=o.href:a.value=l;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:t,continue:!n.abort})}}}),Jk=F("$ZodEmoji",(t,n)=>{n.pattern??(n.pattern=vk()),tt.init(t,n)}),Fk=F("$ZodNanoID",(t,n)=>{n.pattern??(n.pattern=hk),tt.init(t,n)}),Wk=F("$ZodCUID",(t,n)=>{n.pattern??(n.pattern=ok),tt.init(t,n)}),e2=F("$ZodCUID2",(t,n)=>{n.pattern??(n.pattern=ck),tt.init(t,n)}),t2=F("$ZodULID",(t,n)=>{n.pattern??(n.pattern=uk),tt.init(t,n)}),n2=F("$ZodXID",(t,n)=>{n.pattern??(n.pattern=dk),tt.init(t,n)}),i2=F("$ZodKSUID",(t,n)=>{n.pattern??(n.pattern=fk),tt.init(t,n)}),a2=F("$ZodISODateTime",(t,n)=>{n.pattern??(n.pattern=zk(n)),tt.init(t,n)}),s2=F("$ZodISODate",(t,n)=>{n.pattern??(n.pattern=kk),tt.init(t,n)}),l2=F("$ZodISOTime",(t,n)=>{n.pattern??(n.pattern=_k(n)),tt.init(t,n)}),r2=F("$ZodISODuration",(t,n)=>{n.pattern??(n.pattern=mk),tt.init(t,n)}),o2=F("$ZodIPv4",(t,n)=>{n.pattern??(n.pattern=bk),tt.init(t,n),t._zod.bag.format="ipv4"}),c2=F("$ZodIPv6",(t,n)=>{n.pattern??(n.pattern=xk),tt.init(t,n),t._zod.bag.format="ipv6",t._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:t,continue:!n.abort})}}}),u2=F("$ZodCIDRv4",(t,n)=>{n.pattern??(n.pattern=Sk),tt.init(t,n)}),d2=F("$ZodCIDRv6",(t,n)=>{n.pattern??(n.pattern=wk),tt.init(t,n),t._zod.check=a=>{const l=a.value.split("/");try{if(l.length!==2)throw new Error;const[o,u]=l;if(!u)throw new Error;const d=Number(u);if(`${d}`!==u)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${o}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:t,continue:!n.abort})}}});function X0(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const f2=F("$ZodBase64",(t,n)=>{n.pattern??(n.pattern=jk),tt.init(t,n),t._zod.bag.contentEncoding="base64",t._zod.check=a=>{X0(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:t,continue:!n.abort})}});function h2(t){if(!H0.test(t))return!1;const n=t.replace(/[-_]/g,l=>l==="-"?"+":"/"),a=n.padEnd(Math.ceil(n.length/4)*4,"=");return X0(a)}const m2=F("$ZodBase64URL",(t,n)=>{n.pattern??(n.pattern=H0),tt.init(t,n),t._zod.bag.contentEncoding="base64url",t._zod.check=a=>{h2(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:t,continue:!n.abort})}}),p2=F("$ZodE164",(t,n)=>{n.pattern??(n.pattern=Nk),tt.init(t,n)});function g2(t,n=null){try{const a=t.split(".");if(a.length!==3)return!1;const[l]=a;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const y2=F("$ZodJWT",(t,n)=>{tt.init(t,n),t._zod.check=a=>{g2(a.value,n.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:t,continue:!n.abort})}}),J0=F("$ZodNumber",(t,n)=>{nt.init(t,n),t._zod.pattern=t._zod.bag.pattern??Y0,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=Number(a.value)}catch{}const o=a.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return a;const u=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return a.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...u?{received:u}:{}}),a}}),v2=F("$ZodNumberFormat",(t,n)=>{Rk.init(t,n),J0.init(t,n)}),b2=F("$ZodBoolean",(t,n)=>{nt.init(t,n),t._zod.pattern=Ak,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=!!a.value}catch{}const o=a.value;return typeof o=="boolean"||a.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),a}}),x2=F("$ZodUnknown",(t,n)=>{nt.init(t,n),t._zod.parse=a=>a}),S2=F("$ZodNever",(t,n)=>{nt.init(t,n),t._zod.parse=(a,l)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:t}),a)});function Ty(t,n,a){t.issues.length&&n.issues.push(...vs(a,t.issues)),n.value[a]=t.value}const w2=F("$ZodArray",(t,n)=>{nt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!Array.isArray(o))return a.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),a;a.value=Array(o.length);const u=[];for(let d=0;d<o.length;d++){const m=o[d],p=n.element._zod.run({value:m,issues:[]},l);p instanceof Promise?u.push(p.then(g=>Ty(g,a,d))):Ty(p,a,d)}return u.length?Promise.all(u).then(()=>a):a}});function Do(t,n,a,l,o){if(t.issues.length){if(o&&!(a in l))return;n.issues.push(...vs(a,t.issues))}t.value===void 0?a in l&&(n.value[a]=void 0):n.value[a]=t.value}function F0(t){const n=Object.keys(t.shape);for(const l of n)if(!t.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const a=Z1(t.shape);return{...t,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(a)}}function W0(t,n,a,l,o,u){const d=[],m=o.keySet,p=o.catchall._zod,g=p.def.type,b=p.optout==="optional";for(const v in n){if(m.has(v))continue;if(g==="never"){d.push(v);continue}const x=p.run({value:n[v],issues:[]},l);x instanceof Promise?t.push(x.then(N=>Do(N,a,v,n,b))):Do(x,a,v,n,b)}return d.length&&a.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),t.length?Promise.all(t).then(()=>a):a}const j2=F("$ZodObject",(t,n)=>{if(nt.init(t,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const m=n.shape;Object.defineProperty(n,"shape",{get:()=>{const p={...m};return Object.defineProperty(n,"shape",{value:p}),p}})}const l=Uf(()=>F0(n));Ge(t._zod,"propValues",()=>{const m=n.shape,p={};for(const g in m){const b=m[g]._zod;if(b.values){p[g]??(p[g]=new Set);for(const v of b.values)p[g].add(v)}}return p});const o=To,u=n.catchall;let d;t._zod.parse=(m,p)=>{d??(d=l.value);const g=m.value;if(!o(g))return m.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),m;m.value={};const b=[],v=d.shape;for(const x of d.keys){const N=v[x],C=N._zod.optout==="optional",j=N._zod.run({value:g[x],issues:[]},p);j instanceof Promise?b.push(j.then(k=>Do(k,m,x,g,C))):Do(j,m,x,g,C)}return u?W0(b,g,m,p,l.value,t):b.length?Promise.all(b).then(()=>m):m}}),N2=F("$ZodObjectJIT",(t,n)=>{j2.init(t,n);const a=t._zod.parse,l=Uf(()=>F0(n)),o=x=>{const N=new Kk(["shape","payload","ctx"]),C=l.value,j=O=>{const D=Ay(O);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};N.write("const input = payload.value;");const k=Object.create(null);let A=0;for(const O of C.keys)k[O]=`key_${A++}`;N.write("const newResult = {};");for(const O of C.keys){const D=k[O],L=Ay(O),V=x[O]?._zod?.optout==="optional";N.write(`const ${D} = ${j(O)};`),V?N.write(`
|
|
186
|
+
if (${D}.issues.length) {
|
|
187
|
+
if (${L} in input) {
|
|
188
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
189
|
+
...iss,
|
|
190
|
+
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
191
|
+
})));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (${D}.value === undefined) {
|
|
196
|
+
if (${L} in input) {
|
|
197
|
+
newResult[${L}] = undefined;
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
newResult[${L}] = ${D}.value;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
`):N.write(`
|
|
204
|
+
if (${D}.issues.length) {
|
|
205
|
+
payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
|
|
206
|
+
...iss,
|
|
207
|
+
path: iss.path ? [${L}, ...iss.path] : [${L}]
|
|
208
|
+
})));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
if (${D}.value === undefined) {
|
|
212
|
+
if (${L} in input) {
|
|
213
|
+
newResult[${L}] = undefined;
|
|
214
|
+
}
|
|
215
|
+
} else {
|
|
216
|
+
newResult[${L}] = ${D}.value;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
`)}N.write("payload.value = newResult;"),N.write("return payload;");const T=N.compile();return(O,D)=>T(x,O,D)};let u;const d=To,m=!L0.jitless,g=m&&B1.value,b=n.catchall;let v;t._zod.parse=(x,N)=>{v??(v=l.value);const C=x.value;return d(C)?m&&g&&N?.async===!1&&N.jitless!==!0?(u||(u=o(n.shape)),x=u(x,N),b?W0([],C,x,N,v,t):x):a(x,N):(x.issues.push({expected:"object",code:"invalid_type",input:C,inst:t}),x)}});function Dy(t,n,a,l){for(const u of t)if(u.issues.length===0)return n.value=u.value,n;const o=t.filter(u=>!ys(u));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:a,errors:t.map(u=>u.issues.map(d=>Zi(d,l,Ii())))}),n)}const k2=F("$ZodUnion",(t,n)=>{nt.init(t,n),Ge(t._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ge(t._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ge(t._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Ge(t._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${o.map(u=>Bf(u.source)).join("|")})$`)}});const a=n.options.length===1,l=n.options[0]._zod.run;t._zod.parse=(o,u)=>{if(a)return l(o,u);let d=!1;const m=[];for(const p of n.options){const g=p._zod.run({value:o.value,issues:[]},u);if(g instanceof Promise)m.push(g),d=!0;else{if(g.issues.length===0)return g;m.push(g)}}return d?Promise.all(m).then(p=>Dy(p,o,t,u)):Dy(m,o,t,u)}}),_2=F("$ZodIntersection",(t,n)=>{nt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value,u=n.left._zod.run({value:o,issues:[]},l),d=n.right._zod.run({value:o,issues:[]},l);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([p,g])=>Ry(a,p,g)):Ry(a,u,d)}});function af(t,n){if(t===n)return{valid:!0,data:t};if(t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(_s(t)&&_s(n)){const a=Object.keys(n),l=Object.keys(t).filter(u=>a.indexOf(u)!==-1),o={...t,...n};for(const u of l){const d=af(t[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};o[u]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let l=0;l<t.length;l++){const o=t[l],u=n[l],d=af(o,u);if(!d.valid)return{valid:!1,mergeErrorPath:[l,...d.mergeErrorPath]};a.push(d.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function Ry(t,n,a){const l=new Map;let o;for(const m of n.issues)if(m.code==="unrecognized_keys"){o??(o=m);for(const p of m.keys)l.has(p)||l.set(p,{}),l.get(p).l=!0}else t.issues.push(m);for(const m of a.issues)if(m.code==="unrecognized_keys")for(const p of m.keys)l.has(p)||l.set(p,{}),l.get(p).r=!0;else t.issues.push(m);const u=[...l].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(u.length&&o&&t.issues.push({...o,keys:u}),ys(t))return t;const d=af(n.value,a.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return t.value=d.data,t}const z2=F("$ZodRecord",(t,n)=>{nt.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!_s(o))return a.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),a;const u=[],d=n.keyType._zod.values;if(d){a.value={};const m=new Set;for(const g of d)if(typeof g=="string"||typeof g=="number"||typeof g=="symbol"){m.add(typeof g=="number"?g.toString():g);const b=n.valueType._zod.run({value:o[g],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&a.issues.push(...vs(g,v.issues)),a.value[g]=v.value})):(b.issues.length&&a.issues.push(...vs(g,b.issues)),a.value[g]=b.value)}let p;for(const g in o)m.has(g)||(p=p??[],p.push(g));p&&p.length>0&&a.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:p})}else{a.value={};for(const m of Reflect.ownKeys(o)){if(m==="__proto__")continue;let p=n.keyType._zod.run({value:m,issues:[]},l);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Y0.test(m)&&p.issues.length){const v=n.keyType._zod.run({value:Number(m),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(p=v)}if(p.issues.length){n.mode==="loose"?a.value[m]=o[m]:a.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(v=>Zi(v,l,Ii())),input:m,path:[m],inst:t});continue}const b=n.valueType._zod.run({value:o[m],issues:[]},l);b instanceof Promise?u.push(b.then(v=>{v.issues.length&&a.issues.push(...vs(m,v.issues)),a.value[p.value]=v.value})):(b.issues.length&&a.issues.push(...vs(m,b.issues)),a.value[p.value]=b.value)}}return u.length?Promise.all(u).then(()=>a):a}}),C2=F("$ZodEnum",(t,n)=>{nt.init(t,n);const a=U0(n.entries),l=new Set(a);t._zod.values=l,t._zod.pattern=new RegExp(`^(${a.filter(o=>I1.has(typeof o)).map(o=>typeof o=="string"?zs(o):o.toString()).join("|")})$`),t._zod.parse=(o,u)=>{const d=o.value;return l.has(d)||o.issues.push({code:"invalid_value",values:a,input:d,inst:t}),o}}),E2=F("$ZodLiteral",(t,n)=>{if(nt.init(t,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const a=new Set(n.values);t._zod.values=a,t._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?zs(l):l?zs(l.toString()):String(l)).join("|")})$`),t._zod.parse=(l,o)=>{const u=l.value;return a.has(u)||l.issues.push({code:"invalid_value",values:n.values,input:u,inst:t}),l}}),A2=F("$ZodTransform",(t,n)=>{nt.init(t,n),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new M0(t.constructor.name);const o=n.transform(a.value,a);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(a.value=d,a));if(o instanceof Promise)throw new ws;return a.value=o,a}});function My(t,n){return t.issues.length&&n===void 0?{issues:[],value:void 0}:t}const eb=F("$ZodOptional",(t,n)=>{nt.init(t,n),t._zod.optin="optional",t._zod.optout="optional",Ge(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ge(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Bf(a.source)})?$`):void 0}),t._zod.parse=(a,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>My(u,a.value)):My(o,a.value)}return a.value===void 0?a:n.innerType._zod.run(a,l)}}),O2=F("$ZodExactOptional",(t,n)=>{eb.init(t,n),Ge(t._zod,"values",()=>n.innerType._zod.values),Ge(t._zod,"pattern",()=>n.innerType._zod.pattern),t._zod.parse=(a,l)=>n.innerType._zod.run(a,l)}),T2=F("$ZodNullable",(t,n)=>{nt.init(t,n),Ge(t._zod,"optin",()=>n.innerType._zod.optin),Ge(t._zod,"optout",()=>n.innerType._zod.optout),Ge(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Bf(a.source)}|null)$`):void 0}),Ge(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),t._zod.parse=(a,l)=>a.value===null?a:n.innerType._zod.run(a,l)}),D2=F("$ZodDefault",(t,n)=>{nt.init(t,n),t._zod.optin="optional",Ge(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);if(a.value===void 0)return a.value=n.defaultValue,a;const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>Ly(u,n)):Ly(o,n)}});function Ly(t,n){return t.value===void 0&&(t.value=n.defaultValue),t}const R2=F("$ZodPrefault",(t,n)=>{nt.init(t,n),t._zod.optin="optional",Ge(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>(l.direction==="backward"||a.value===void 0&&(a.value=n.defaultValue),n.innerType._zod.run(a,l))}),M2=F("$ZodNonOptional",(t,n)=>{nt.init(t,n),Ge(t._zod,"values",()=>{const a=n.innerType._zod.values;return a?new Set([...a].filter(l=>l!==void 0)):void 0}),t._zod.parse=(a,l)=>{const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>Uy(u,t)):Uy(o,t)}});function Uy(t,n){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:n}),t}const L2=F("$ZodCatch",(t,n)=>{nt.init(t,n),Ge(t._zod,"optin",()=>n.innerType._zod.optin),Ge(t._zod,"optout",()=>n.innerType._zod.optout),Ge(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(u=>(a.value=u.value,u.issues.length&&(a.value=n.catchValue({...a,error:{issues:u.issues.map(d=>Zi(d,l,Ii()))},input:a.value}),a.issues=[]),a)):(a.value=o.value,o.issues.length&&(a.value=n.catchValue({...a,error:{issues:o.issues.map(u=>Zi(u,l,Ii()))},input:a.value}),a.issues=[]),a)}}),U2=F("$ZodPipe",(t,n)=>{nt.init(t,n),Ge(t._zod,"values",()=>n.in._zod.values),Ge(t._zod,"optin",()=>n.in._zod.optin),Ge(t._zod,"optout",()=>n.out._zod.optout),Ge(t._zod,"propValues",()=>n.in._zod.propValues),t._zod.parse=(a,l)=>{if(l.direction==="backward"){const u=n.out._zod.run(a,l);return u instanceof Promise?u.then(d=>vo(d,n.in,l)):vo(u,n.in,l)}const o=n.in._zod.run(a,l);return o instanceof Promise?o.then(u=>vo(u,n.out,l)):vo(o,n.out,l)}});function vo(t,n,a){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:t.value,issues:t.issues},a)}const $2=F("$ZodReadonly",(t,n)=>{nt.init(t,n),Ge(t._zod,"propValues",()=>n.innerType._zod.propValues),Ge(t._zod,"values",()=>n.innerType._zod.values),Ge(t._zod,"optin",()=>n.innerType?._zod?.optin),Ge(t._zod,"optout",()=>n.innerType?._zod?.optout),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then($y):$y(o)}});function $y(t){return t.value=Object.freeze(t.value),t}const B2=F("$ZodCustom",(t,n)=>{Xt.init(t,n),nt.init(t,n),t._zod.parse=(a,l)=>a,t._zod.check=a=>{const l=a.value,o=n.fn(l);if(o instanceof Promise)return o.then(u=>By(u,a,l,t));By(o,a,l,t)}});function By(t,n,a,l){if(!t){const o={code:"custom",input:a,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(Ul(o))}}var Iy;class I2{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...a){const l=a[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const a=this._map.get(n);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(n),this}get(n){const a=n._zod.parent;if(a){const l={...this.get(a)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Z2(){return new I2}(Iy=globalThis).__zod_globalRegistry??(Iy.__zod_globalRegistry=Z2());const Al=globalThis.__zod_globalRegistry;function q2(t,n){return new t({type:"string",...ye(n)})}function H2(t,n){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ye(n)})}function Zy(t,n){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ye(n)})}function G2(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ye(n)})}function K2(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ye(n)})}function Y2(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ye(n)})}function V2(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ye(n)})}function P2(t,n){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ye(n)})}function Q2(t,n){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ye(n)})}function X2(t,n){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ye(n)})}function J2(t,n){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ye(n)})}function F2(t,n){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ye(n)})}function W2(t,n){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ye(n)})}function e_(t,n){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ye(n)})}function t_(t,n){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ye(n)})}function n_(t,n){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ye(n)})}function i_(t,n){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ye(n)})}function a_(t,n){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ye(n)})}function s_(t,n){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ye(n)})}function l_(t,n){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ye(n)})}function r_(t,n){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ye(n)})}function o_(t,n){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ye(n)})}function c_(t,n){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ye(n)})}function u_(t,n){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ye(n)})}function d_(t,n){return new t({type:"string",format:"date",check:"string_format",...ye(n)})}function f_(t,n){return new t({type:"string",format:"time",check:"string_format",precision:null,...ye(n)})}function h_(t,n){return new t({type:"string",format:"duration",check:"string_format",...ye(n)})}function m_(t,n){return new t({type:"number",checks:[],...ye(n)})}function p_(t,n){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ye(n)})}function g_(t,n){return new t({type:"boolean",...ye(n)})}function y_(t){return new t({type:"unknown"})}function v_(t,n){return new t({type:"never",...ye(n)})}function qy(t,n){return new P0({check:"less_than",...ye(n),value:t,inclusive:!1})}function Hd(t,n){return new P0({check:"less_than",...ye(n),value:t,inclusive:!0})}function Hy(t,n){return new Q0({check:"greater_than",...ye(n),value:t,inclusive:!1})}function Gd(t,n){return new Q0({check:"greater_than",...ye(n),value:t,inclusive:!0})}function Gy(t,n){return new Dk({check:"multiple_of",...ye(n),value:t})}function tb(t,n){return new Mk({check:"max_length",...ye(n),maximum:t})}function Ro(t,n){return new Lk({check:"min_length",...ye(n),minimum:t})}function nb(t,n){return new Uk({check:"length_equals",...ye(n),length:t})}function b_(t,n){return new $k({check:"string_format",format:"regex",...ye(n),pattern:t})}function x_(t){return new Bk({check:"string_format",format:"lowercase",...ye(t)})}function S_(t){return new Ik({check:"string_format",format:"uppercase",...ye(t)})}function w_(t,n){return new Zk({check:"string_format",format:"includes",...ye(n),includes:t})}function j_(t,n){return new qk({check:"string_format",format:"starts_with",...ye(n),prefix:t})}function N_(t,n){return new Hk({check:"string_format",format:"ends_with",...ye(n),suffix:t})}function Ts(t){return new Gk({check:"overwrite",tx:t})}function k_(t){return Ts(n=>n.normalize(t))}function __(){return Ts(t=>t.trim())}function z_(){return Ts(t=>t.toLowerCase())}function C_(){return Ts(t=>t.toUpperCase())}function E_(){return Ts(t=>$1(t))}function A_(t,n,a){return new t({type:"array",element:n,...ye(a)})}function O_(t,n,a){return new t({type:"custom",check:"custom",fn:n,...ye(a)})}function T_(t){const n=D_(a=>(a.addIssue=l=>{if(typeof l=="string")a.issues.push(Ul(l,a.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=a.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),a.issues.push(Ul(o))}},t(a.value,a)));return n}function D_(t,n){const a=new Xt({check:"custom",...ye(n)});return a._zod.check=t,a}function ib(t){let n=t?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??Al,target:n,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function jt(t,n,a={path:[],schemaPath:[]}){var l;const o=t._zod.def,u=n.seen.get(t);if(u)return u.count++,a.schemaPath.includes(t)&&(u.cycle=a.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:a.path};n.seen.set(t,d);const m=t._zod.toJSONSchema?.();if(m)d.schema=m;else{const b={...a,schemaPath:[...a.schemaPath,t],path:a.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(n,d.schema,b);else{const x=d.schema,N=n.processors[o.type];if(!N)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);N(t,n,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),jt(v,n,b),n.seen.get(v).isParent=!0)}const p=n.metadataRegistry.get(t);return p&&Object.assign(d.schema,p),n.io==="input"&&Bt(t)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((l=d.schema).default??(l.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(t).schema}function ab(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const d of t.seen.entries()){const m=t.metadataRegistry.get(d[0])?.id;if(m){const p=l.get(m);if(p&&p!==d[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(m,d[0])}}const o=d=>{const m=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const v=t.external.registry.get(d[0])?.id,x=t.external.uri??(C=>C);if(v)return{ref:x(v)};const N=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=N,{defId:N,ref:`${x("__shared")}#/${m}/${N}`}}if(d[1]===a)return{ref:"#"};const g=`#/${m}/`,b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:g+b}},u=d=>{if(d[1].schema.$ref)return;const m=d[1],{ref:p,defId:g}=o(d);m.def={...m.schema},g&&(m.defId=g);const b=m.schema;for(const v in b)delete b[v];b.$ref=p};if(t.cycles==="throw")for(const d of t.seen.entries()){const m=d[1];if(m.cycle)throw new Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
|
|
220
|
+
|
|
221
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const m=d[1];if(n===d[0]){u(d);continue}if(t.external){const g=t.external.registry.get(d[0])?.id;if(n!==d[0]&&g){u(d);continue}}if(t.metadataRegistry.get(d[0])?.id){u(d);continue}if(m.cycle){u(d);continue}if(m.count>1&&t.reused==="ref"){u(d);continue}}}function sb(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=d=>{const m=t.seen.get(d);if(m.ref===null)return;const p=m.def??m.schema,g={...p},b=m.ref;if(m.ref=null,b){l(b);const x=t.seen.get(b),N=x.schema;if(N.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(N)):Object.assign(p,N),Object.assign(p,g),d._zod.parent===b)for(const j in p)j==="$ref"||j==="allOf"||j in g||delete p[j];if(N.$ref&&x.def)for(const j in p)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(p[j])===JSON.stringify(x.def[j])&&delete p[j]}const v=d._zod.parent;if(v&&v!==b){l(v);const x=t.seen.get(v);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const N in p)N==="$ref"||N==="allOf"||N in x.def&&JSON.stringify(p[N])===JSON.stringify(x.def[N])&&delete p[N]}t.override({zodSchema:d,jsonSchema:p,path:m.path??[]})};for(const d of[...t.seen.entries()].reverse())l(d[0]);const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const d=t.external.registry.get(n)?.id;if(!d)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(d)}Object.assign(o,a.def??a.schema);const u=t.external?.defs??{};for(const d of t.seen.entries()){const m=d[1];m.def&&m.defId&&(u[m.defId]=m.def)}t.external||Object.keys(u).length>0&&(t.target==="draft-2020-12"?o.$defs=u:o.definitions=u);try{const d=JSON.parse(JSON.stringify(o));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:Mo(n,"input",t.processors),output:Mo(n,"output",t.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Bt(t,n){const a=n??{seen:new Set};if(a.seen.has(t))return!1;a.seen.add(t);const l=t._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Bt(l.element,a);if(l.type==="set")return Bt(l.valueType,a);if(l.type==="lazy")return Bt(l.getter(),a);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Bt(l.innerType,a);if(l.type==="intersection")return Bt(l.left,a)||Bt(l.right,a);if(l.type==="record"||l.type==="map")return Bt(l.keyType,a)||Bt(l.valueType,a);if(l.type==="pipe")return Bt(l.in,a)||Bt(l.out,a);if(l.type==="object"){for(const o in l.shape)if(Bt(l.shape[o],a))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Bt(o,a))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Bt(o,a))return!0;return!!(l.rest&&Bt(l.rest,a))}return!1}const R_=(t,n={})=>a=>{const l=ib({...a,processors:n});return jt(t,l),ab(l,t),sb(l,t)},Mo=(t,n,a={})=>l=>{const{libraryOptions:o,target:u}=l??{},d=ib({...o??{},target:u,io:n,processors:a});return jt(t,d),ab(d,t),sb(d,t)},M_={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},L_=(t,n,a,l)=>{const o=a;o.type="string";const{minimum:u,maximum:d,format:m,patterns:p,contentEncoding:g}=t._zod.bag;if(typeof u=="number"&&(o.minLength=u),typeof d=="number"&&(o.maxLength=d),m&&(o.format=M_[m]??m,o.format===""&&delete o.format,m==="time"&&delete o.format),g&&(o.contentEncoding=g),p&&p.size>0){const b=[...p];b.length===1?o.pattern=b[0].source:b.length>1&&(o.allOf=[...b.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},U_=(t,n,a,l)=>{const o=a,{minimum:u,maximum:d,format:m,multipleOf:p,exclusiveMaximum:g,exclusiveMinimum:b}=t._zod.bag;typeof m=="string"&&m.includes("int")?o.type="integer":o.type="number",typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=b,o.exclusiveMinimum=!0):o.exclusiveMinimum=b),typeof u=="number"&&(o.minimum=u,typeof b=="number"&&n.target!=="draft-04"&&(b>=u?delete o.minimum:delete o.exclusiveMinimum)),typeof g=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=g,o.exclusiveMaximum=!0):o.exclusiveMaximum=g),typeof d=="number"&&(o.maximum=d,typeof g=="number"&&n.target!=="draft-04"&&(g<=d?delete o.maximum:delete o.exclusiveMaximum)),typeof p=="number"&&(o.multipleOf=p)},$_=(t,n,a,l)=>{a.type="boolean"},B_=(t,n,a,l)=>{a.not={}},I_=(t,n,a,l)=>{},Z_=(t,n,a,l)=>{const o=t._zod.def,u=U0(o.entries);u.every(d=>typeof d=="number")&&(a.type="number"),u.every(d=>typeof d=="string")&&(a.type="string"),a.enum=u},q_=(t,n,a,l)=>{const o=t._zod.def,u=[];for(const d of o.values)if(d===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof d=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");u.push(Number(d))}else u.push(d);if(u.length!==0)if(u.length===1){const d=u[0];a.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?a.enum=[d]:a.const=d}else u.every(d=>typeof d=="number")&&(a.type="number"),u.every(d=>typeof d=="string")&&(a.type="string"),u.every(d=>typeof d=="boolean")&&(a.type="boolean"),u.every(d=>d===null)&&(a.type="null"),a.enum=u},H_=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},G_=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},K_=(t,n,a,l)=>{const o=a,u=t._zod.def,{minimum:d,maximum:m}=t._zod.bag;typeof d=="number"&&(o.minItems=d),typeof m=="number"&&(o.maxItems=m),o.type="array",o.items=jt(u.element,n,{...l,path:[...l.path,"items"]})},Y_=(t,n,a,l)=>{const o=a,u=t._zod.def;o.type="object",o.properties={};const d=u.shape;for(const g in d)o.properties[g]=jt(d[g],n,{...l,path:[...l.path,"properties",g]});const m=new Set(Object.keys(d)),p=new Set([...m].filter(g=>{const b=u.shape[g]._zod;return n.io==="input"?b.optin===void 0:b.optout===void 0}));p.size>0&&(o.required=Array.from(p)),u.catchall?._zod.def.type==="never"?o.additionalProperties=!1:u.catchall?u.catchall&&(o.additionalProperties=jt(u.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},V_=(t,n,a,l)=>{const o=t._zod.def,u=o.inclusive===!1,d=o.options.map((m,p)=>jt(m,n,{...l,path:[...l.path,u?"oneOf":"anyOf",p]}));u?a.oneOf=d:a.anyOf=d},P_=(t,n,a,l)=>{const o=t._zod.def,u=jt(o.left,n,{...l,path:[...l.path,"allOf",0]}),d=jt(o.right,n,{...l,path:[...l.path,"allOf",1]}),m=g=>"allOf"in g&&Object.keys(g).length===1,p=[...m(u)?u.allOf:[u],...m(d)?d.allOf:[d]];a.allOf=p},Q_=(t,n,a,l)=>{const o=a,u=t._zod.def;o.type="object";const d=u.keyType,p=d._zod.bag?.patterns;if(u.mode==="loose"&&p&&p.size>0){const b=jt(u.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const v of p)o.patternProperties[v.source]=b}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=jt(u.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=jt(u.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const g=d._zod.values;if(g){const b=[...g].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b)}},X_=(t,n,a,l)=>{const o=t._zod.def,u=jt(o.innerType,n,l),d=n.seen.get(t);n.target==="openapi-3.0"?(d.ref=o.innerType,a.nullable=!0):a.anyOf=[u,{type:"null"}]},J_=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},F_=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.default=JSON.parse(JSON.stringify(o.defaultValue))},W_=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,n.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},ez=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=d},tz=(t,n,a,l)=>{const o=t._zod.def,u=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;jt(u,n,l);const d=n.seen.get(t);d.ref=u},nz=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType,a.readOnly=!0},lb=(t,n,a,l)=>{const o=t._zod.def;jt(o.innerType,n,l);const u=n.seen.get(t);u.ref=o.innerType},iz=F("ZodISODateTime",(t,n)=>{a2.init(t,n),at.init(t,n)});function az(t){return u_(iz,t)}const sz=F("ZodISODate",(t,n)=>{s2.init(t,n),at.init(t,n)});function lz(t){return d_(sz,t)}const rz=F("ZodISOTime",(t,n)=>{l2.init(t,n),at.init(t,n)});function oz(t){return f_(rz,t)}const cz=F("ZodISODuration",(t,n)=>{r2.init(t,n),at.init(t,n)});function uz(t){return h_(cz,t)}const dz=(t,n)=>{Z0.init(t,n),t.name="ZodError",Object.defineProperties(t,{format:{value:a=>J1(t,a)},flatten:{value:a=>X1(t,a)},addIssue:{value:a=>{t.issues.push(a),t.message=JSON.stringify(t.issues,nf,2)}},addIssues:{value:a=>{t.issues.push(...a),t.message=JSON.stringify(t.issues,nf,2)}},isEmpty:{get(){return t.issues.length===0}}})},Sn=F("ZodError",dz,{Parent:Error}),fz=Zf(Sn),hz=qf(Sn),mz=tc(Sn),pz=nc(Sn),gz=ek(Sn),yz=tk(Sn),vz=nk(Sn),bz=ik(Sn),xz=ak(Sn),Sz=sk(Sn),wz=lk(Sn),jz=rk(Sn),it=F("ZodType",(t,n)=>(nt.init(t,n),Object.assign(t["~standard"],{jsonSchema:{input:Mo(t,"input"),output:Mo(t,"output")}}),t.toJSONSchema=R_(t,{}),t.def=n,t.type=n.type,Object.defineProperty(t,"_def",{value:n}),t.check=(...a)=>t.clone(qi(n,{checks:[...n.checks??[],...a.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),t.with=t.check,t.clone=(a,l)=>Hi(t,a,l),t.brand=()=>t,t.register=((a,l)=>(a.add(t,l),t)),t.parse=(a,l)=>fz(t,a,l,{callee:t.parse}),t.safeParse=(a,l)=>mz(t,a,l),t.parseAsync=async(a,l)=>hz(t,a,l,{callee:t.parseAsync}),t.safeParseAsync=async(a,l)=>pz(t,a,l),t.spa=t.safeParseAsync,t.encode=(a,l)=>gz(t,a,l),t.decode=(a,l)=>yz(t,a,l),t.encodeAsync=async(a,l)=>vz(t,a,l),t.decodeAsync=async(a,l)=>bz(t,a,l),t.safeEncode=(a,l)=>xz(t,a,l),t.safeDecode=(a,l)=>Sz(t,a,l),t.safeEncodeAsync=async(a,l)=>wz(t,a,l),t.safeDecodeAsync=async(a,l)=>jz(t,a,l),t.refine=(a,l)=>t.check(yC(a,l)),t.superRefine=a=>t.check(vC(a)),t.overwrite=a=>t.check(Ts(a)),t.optional=()=>Vy(t),t.exactOptional=()=>aC(t),t.nullable=()=>Py(t),t.nullish=()=>Vy(Py(t)),t.nonoptional=a=>uC(t,a),t.array=()=>mt(t),t.or=a=>Xz([t,a]),t.and=a=>Fz(t,a),t.transform=a=>Qy(t,nC(a)),t.default=a=>rC(t,a),t.prefault=a=>cC(t,a),t.catch=a=>fC(t,a),t.pipe=a=>Qy(t,a),t.readonly=()=>pC(t),t.describe=a=>{const l=t.clone();return Al.add(l,{description:a}),l},Object.defineProperty(t,"description",{get(){return Al.get(t)?.description},configurable:!0}),t.meta=(...a)=>{if(a.length===0)return Al.get(t);const l=t.clone();return Al.add(l,a[0]),l},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=a=>a(t),t)),rb=F("_ZodString",(t,n)=>{Hf.init(t,n),it.init(t,n),t._zod.processJSONSchema=(l,o,u)=>L_(t,l,o);const a=t._zod.bag;t.format=a.format??null,t.minLength=a.minimum??null,t.maxLength=a.maximum??null,t.regex=(...l)=>t.check(b_(...l)),t.includes=(...l)=>t.check(w_(...l)),t.startsWith=(...l)=>t.check(j_(...l)),t.endsWith=(...l)=>t.check(N_(...l)),t.min=(...l)=>t.check(Ro(...l)),t.max=(...l)=>t.check(tb(...l)),t.length=(...l)=>t.check(nb(...l)),t.nonempty=(...l)=>t.check(Ro(1,...l)),t.lowercase=l=>t.check(x_(l)),t.uppercase=l=>t.check(S_(l)),t.trim=()=>t.check(__()),t.normalize=(...l)=>t.check(k_(...l)),t.toLowerCase=()=>t.check(z_()),t.toUpperCase=()=>t.check(C_()),t.slugify=()=>t.check(E_())}),Nz=F("ZodString",(t,n)=>{Hf.init(t,n),rb.init(t,n),t.email=a=>t.check(H2(kz,a)),t.url=a=>t.check(P2(_z,a)),t.jwt=a=>t.check(c_(Zz,a)),t.emoji=a=>t.check(Q2(zz,a)),t.guid=a=>t.check(Zy(Ky,a)),t.uuid=a=>t.check(G2(bo,a)),t.uuidv4=a=>t.check(K2(bo,a)),t.uuidv6=a=>t.check(Y2(bo,a)),t.uuidv7=a=>t.check(V2(bo,a)),t.nanoid=a=>t.check(X2(Cz,a)),t.guid=a=>t.check(Zy(Ky,a)),t.cuid=a=>t.check(J2(Ez,a)),t.cuid2=a=>t.check(F2(Az,a)),t.ulid=a=>t.check(W2(Oz,a)),t.base64=a=>t.check(l_($z,a)),t.base64url=a=>t.check(r_(Bz,a)),t.xid=a=>t.check(e_(Tz,a)),t.ksuid=a=>t.check(t_(Dz,a)),t.ipv4=a=>t.check(n_(Rz,a)),t.ipv6=a=>t.check(i_(Mz,a)),t.cidrv4=a=>t.check(a_(Lz,a)),t.cidrv6=a=>t.check(s_(Uz,a)),t.e164=a=>t.check(o_(Iz,a)),t.datetime=a=>t.check(az(a)),t.date=a=>t.check(lz(a)),t.time=a=>t.check(oz(a)),t.duration=a=>t.check(uz(a))});function ie(t){return q2(Nz,t)}const at=F("ZodStringFormat",(t,n)=>{tt.init(t,n),rb.init(t,n)}),kz=F("ZodEmail",(t,n)=>{Qk.init(t,n),at.init(t,n)}),Ky=F("ZodGUID",(t,n)=>{Vk.init(t,n),at.init(t,n)}),bo=F("ZodUUID",(t,n)=>{Pk.init(t,n),at.init(t,n)}),_z=F("ZodURL",(t,n)=>{Xk.init(t,n),at.init(t,n)}),zz=F("ZodEmoji",(t,n)=>{Jk.init(t,n),at.init(t,n)}),Cz=F("ZodNanoID",(t,n)=>{Fk.init(t,n),at.init(t,n)}),Ez=F("ZodCUID",(t,n)=>{Wk.init(t,n),at.init(t,n)}),Az=F("ZodCUID2",(t,n)=>{e2.init(t,n),at.init(t,n)}),Oz=F("ZodULID",(t,n)=>{t2.init(t,n),at.init(t,n)}),Tz=F("ZodXID",(t,n)=>{n2.init(t,n),at.init(t,n)}),Dz=F("ZodKSUID",(t,n)=>{i2.init(t,n),at.init(t,n)}),Rz=F("ZodIPv4",(t,n)=>{o2.init(t,n),at.init(t,n)}),Mz=F("ZodIPv6",(t,n)=>{c2.init(t,n),at.init(t,n)}),Lz=F("ZodCIDRv4",(t,n)=>{u2.init(t,n),at.init(t,n)}),Uz=F("ZodCIDRv6",(t,n)=>{d2.init(t,n),at.init(t,n)}),$z=F("ZodBase64",(t,n)=>{f2.init(t,n),at.init(t,n)}),Bz=F("ZodBase64URL",(t,n)=>{m2.init(t,n),at.init(t,n)}),Iz=F("ZodE164",(t,n)=>{p2.init(t,n),at.init(t,n)}),Zz=F("ZodJWT",(t,n)=>{y2.init(t,n),at.init(t,n)}),ob=F("ZodNumber",(t,n)=>{J0.init(t,n),it.init(t,n),t._zod.processJSONSchema=(l,o,u)=>U_(t,l,o),t.gt=(l,o)=>t.check(Hy(l,o)),t.gte=(l,o)=>t.check(Gd(l,o)),t.min=(l,o)=>t.check(Gd(l,o)),t.lt=(l,o)=>t.check(qy(l,o)),t.lte=(l,o)=>t.check(Hd(l,o)),t.max=(l,o)=>t.check(Hd(l,o)),t.int=l=>t.check(Yy(l)),t.safe=l=>t.check(Yy(l)),t.positive=l=>t.check(Hy(0,l)),t.nonnegative=l=>t.check(Gd(0,l)),t.negative=l=>t.check(qy(0,l)),t.nonpositive=l=>t.check(Hd(0,l)),t.multipleOf=(l,o)=>t.check(Gy(l,o)),t.step=(l,o)=>t.check(Gy(l,o)),t.finite=()=>t;const a=t._zod.bag;t.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),t.isFinite=!0,t.format=a.format??null});function ln(t){return m_(ob,t)}const qz=F("ZodNumberFormat",(t,n)=>{v2.init(t,n),ob.init(t,n)});function Yy(t){return p_(qz,t)}const Hz=F("ZodBoolean",(t,n)=>{b2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>$_(t,a,l)});function Gf(t){return g_(Hz,t)}const Gz=F("ZodUnknown",(t,n)=>{x2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>I_()});function sf(){return y_(Gz)}const Kz=F("ZodNever",(t,n)=>{S2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>B_(t,a,l)});function Yz(t){return v_(Kz,t)}const Vz=F("ZodArray",(t,n)=>{w2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>K_(t,a,l,o),t.element=n.element,t.min=(a,l)=>t.check(Ro(a,l)),t.nonempty=a=>t.check(Ro(1,a)),t.max=(a,l)=>t.check(tb(a,l)),t.length=(a,l)=>t.check(nb(a,l)),t.unwrap=()=>t.element});function mt(t,n){return A_(Vz,t,n)}const Pz=F("ZodObject",(t,n)=>{N2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Y_(t,a,l,o),Ge(t,"shape",()=>n.shape),t.keyof=()=>Tn(Object.keys(t._zod.def.shape)),t.catchall=a=>t.clone({...t._zod.def,catchall:a}),t.passthrough=()=>t.clone({...t._zod.def,catchall:sf()}),t.loose=()=>t.clone({...t._zod.def,catchall:sf()}),t.strict=()=>t.clone({...t._zod.def,catchall:Yz()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=a=>K1(t,a),t.safeExtend=a=>Y1(t,a),t.merge=a=>V1(t,a),t.pick=a=>H1(t,a),t.omit=a=>G1(t,a),t.partial=(...a)=>P1(ub,t,a[0]),t.required=(...a)=>Q1(db,t,a[0])});function ot(t,n){const a={type:"object",shape:t??{},...ye(n)};return new Pz(a)}const Qz=F("ZodUnion",(t,n)=>{k2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>V_(t,a,l,o),t.options=n.options});function Xz(t,n){return new Qz({type:"union",options:t,...ye(n)})}const Jz=F("ZodIntersection",(t,n)=>{_2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>P_(t,a,l,o)});function Fz(t,n){return new Jz({type:"intersection",left:t,right:n})}const Wz=F("ZodRecord",(t,n)=>{z2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Q_(t,a,l,o),t.keyType=n.keyType,t.valueType=n.valueType});function cb(t,n,a){return new Wz({type:"record",keyType:t,valueType:n,...ye(a)})}const lf=F("ZodEnum",(t,n)=>{C2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(l,o,u)=>Z_(t,l,o),t.enum=n.entries,t.options=Object.values(n.entries);const a=new Set(Object.keys(n.entries));t.extract=(l,o)=>{const u={};for(const d of l)if(a.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new lf({...n,checks:[],...ye(o),entries:u})},t.exclude=(l,o)=>{const u={...n.entries};for(const d of l)if(a.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new lf({...n,checks:[],...ye(o),entries:u})}});function Tn(t,n){const a=Array.isArray(t)?Object.fromEntries(t.map(l=>[l,l])):t;return new lf({type:"enum",entries:a,...ye(n)})}const eC=F("ZodLiteral",(t,n)=>{E2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>q_(t,a,l),t.values=new Set(n.values),Object.defineProperty(t,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Lo(t,n){return new eC({type:"literal",values:Array.isArray(t)?t:[t],...ye(n)})}const tC=F("ZodTransform",(t,n)=>{A2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>G_(t,a),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new M0(t.constructor.name);a.addIssue=u=>{if(typeof u=="string")a.issues.push(Ul(u,a.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=a.value),d.inst??(d.inst=t),a.issues.push(Ul(d))}};const o=n.transform(a.value,a);return o instanceof Promise?o.then(u=>(a.value=u,a)):(a.value=o,a)}});function nC(t){return new tC({type:"transform",transform:t})}const ub=F("ZodOptional",(t,n)=>{eb.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>lb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Vy(t){return new ub({type:"optional",innerType:t})}const iC=F("ZodExactOptional",(t,n)=>{O2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>lb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function aC(t){return new iC({type:"optional",innerType:t})}const sC=F("ZodNullable",(t,n)=>{T2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>X_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Py(t){return new sC({type:"nullable",innerType:t})}const lC=F("ZodDefault",(t,n)=>{D2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>F_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function rC(t,n){return new lC({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():B0(n)}})}const oC=F("ZodPrefault",(t,n)=>{R2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>W_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function cC(t,n){return new oC({type:"prefault",innerType:t,get defaultValue(){return typeof n=="function"?n():B0(n)}})}const db=F("ZodNonOptional",(t,n)=>{M2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>J_(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function uC(t,n){return new db({type:"nonoptional",innerType:t,...ye(n)})}const dC=F("ZodCatch",(t,n)=>{L2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>ez(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function fC(t,n){return new dC({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}const hC=F("ZodPipe",(t,n)=>{U2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>tz(t,a,l,o),t.in=n.in,t.out=n.out});function Qy(t,n){return new hC({type:"pipe",in:t,out:n})}const mC=F("ZodReadonly",(t,n)=>{$2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>nz(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function pC(t){return new mC({type:"readonly",innerType:t})}const gC=F("ZodCustom",(t,n)=>{B2.init(t,n),it.init(t,n),t._zod.processJSONSchema=(a,l,o)=>H_(t,a)});function yC(t,n={}){return O_(gC,t,n)}function vC(t){return T_(t)}ot({maxConcurrency:ln().int().positive(),maxRequestsPerMinute:ln().int().positive(),maxRequestsPerDay:ln().int().positive()});const bC=["gemini","openai","claude","local"],ac=Tn(bC),fb=Tn(["citation.lost","citation.gained","run.completed","run.failed"]);ot({id:ie(),projectId:ie(),channel:Lo("webhook"),url:ie().url(),events:mt(fb),enabled:Gf().default(!0),webhookSecret:ie().optional(),createdAt:ie(),updatedAt:ie()});const xC=ot({name:ie().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{message:"Name must be a lowercase slug (letters, numbers, hyphens)"}),labels:cb(ie(),ie()).optional().default({})}),SC=ot({preset:ie().optional(),cron:ie().optional(),timezone:ie().optional().default("UTC"),providers:mt(ac).optional().default([])}).refine(t=>t.preset&&!t.cron||!t.preset&&t.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),wC=ot({channel:Lo("webhook"),url:ie().url(),events:mt(fb).min(1)}),jC=ot({gsc:ot({propertyUrl:ie()}).optional(),syncSchedule:ot({preset:ie().optional(),cron:ie().optional()}).optional()}).optional(),NC=ot({displayName:ie().min(1),canonicalDomain:ie().min(1),ownedDomains:mt(ie().min(1)).optional().default([]),country:ie().length(2),language:ie().min(2),keywords:mt(ie().min(1)).optional().default([]),competitors:mt(ie().min(1)).optional().default([]),providers:mt(ac).optional().default([]),schedule:SC,notifications:mt(wC).optional().default([]),google:jC});ot({apiVersion:Lo("canonry/v1"),kind:Lo("Project"),metadata:xC,spec:NC});const kC=Tn(["gsc","ga4"]);ot({id:ie(),domain:ie(),connectionType:kC,propertyId:ie().nullable().optional(),scopes:mt(ie()).default([]),createdAt:ie(),updatedAt:ie()});ot({date:ie(),query:ie(),page:ie(),country:ie().nullable().optional(),device:ie().nullable().optional(),clicks:ln(),impressions:ln(),ctr:ln(),position:ln()});const Xy=ot({id:ie(),url:ie(),indexingState:ie().nullable().optional(),verdict:ie().nullable().optional(),coverageState:ie().nullable().optional(),pageFetchState:ie().nullable().optional(),robotsTxtState:ie().nullable().optional(),crawlTime:ie().nullable().optional(),lastCrawlResult:ie().nullable().optional(),isMobileFriendly:Gf().nullable().optional(),richResults:mt(ie()).default([]),inspectedAt:ie()});Tn(["stable","reindexed","deindexed","still-missing","new"]);const _C=ot({url:ie(),previousState:ie().nullable(),currentState:ie().nullable(),transitionDate:ie()});ot({summary:ot({total:ln(),indexed:ln(),notIndexed:ln(),deindexed:ln(),percentage:ln()}),lastInspectedAt:ie().nullable(),indexed:mt(Xy).default([]),notIndexed:mt(Xy).default([]),deindexed:mt(_C).default([])});const zC=Tn(["cli","api","config-file"]);ot({id:ie(),name:ie(),displayName:ie().optional(),canonicalDomain:ie(),ownedDomains:mt(ie()).default([]),country:ie().length(2),language:ie().min(2),tags:mt(ie()).default([]),labels:cb(ie(),ie()).default({}),configSource:zC.default("cli"),configRevision:ln().int().positive().default(1),createdAt:ie().optional(),updatedAt:ie().optional()});function rf(t){let n=t.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}function CC(t){const n=[t.canonicalDomain,...t.ownedDomains??[]],a=new Set,l=[];for(const o of n){const u=o.trim();if(!u)continue;const d=rf(u);a.has(d)||(a.add(d),l.push(u))}return l}const EC=Tn(["queued","running","completed","partial","failed"]),AC=Tn(["answer-visibility","site-audit","gsc-sync","inspect-sitemap"]),OC=Tn(["manual","scheduled","config-apply"]),TC=Tn(["cited","not-cited"]),DC=Tn(["new","cited","lost","emerging","not-cited"]);ot({id:ie(),projectId:ie(),kind:AC,status:EC,trigger:OC.default("manual"),startedAt:ie().nullable().optional(),finishedAt:ie().nullable().optional(),error:ie().nullable().optional(),createdAt:ie()});const RC=ot({uri:ie(),title:ie()});ot({id:ie(),runId:ie(),keywordId:ie(),keyword:ie().optional(),provider:ac,citationState:TC,transition:DC.optional(),answerText:ie().nullable().optional(),citedDomains:mt(ie()).default([]),competitorOverlap:mt(ie()).default([]),groundingSources:mt(RC).default([]),searchQueries:mt(ie()).default([]),model:ie().nullable().optional(),createdAt:ie()});ot({id:ie(),projectId:ie().nullable().optional(),actor:ie(),action:ie(),entityType:ie(),entityId:ie().nullable().optional(),diff:sf().optional(),createdAt:ie()});ot({id:ie(),projectId:ie(),cronExpr:ie(),preset:ie().nullable().optional(),timezone:ie().default("UTC"),enabled:Gf().default(!0),providers:mt(ac).default([]),lastRunAt:ie().nullable().optional(),nextRunAt:ie().nullable().optional(),createdAt:ie(),updatedAt:ie()});function hb(t){var n,a,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(a=hb(t[n]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a);return l}function mb(){for(var t,n,a=0,l="",o=arguments.length;a<o;a++)(t=arguments[a])&&(n=hb(t))&&(l&&(l+=" "),l+=n);return l}const Jy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Fy=mb,pb=(t,n)=>a=>{var l;if(n?.variants==null)return Fy(t,a?.class,a?.className);const{variants:o,defaultVariants:u}=n,d=Object.keys(o).map(g=>{const b=a?.[g],v=u?.[g];if(b===null)return null;const x=Jy(b)||Jy(v);return o[g][x]}),m=a&&Object.entries(a).reduce((g,b)=>{let[v,x]=b;return x===void 0||(g[v]=x),g},{}),p=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((g,b)=>{let{class:v,className:x,...N}=b;return Object.entries(N).every(C=>{let[j,k]=C;return Array.isArray(k)?k.includes({...u,...m}[j]):{...u,...m}[j]===k})?[...g,v,x]:g},[]);return Fy(t,d,p,a?.class,a?.className)},MC=(t,n)=>{const a=new Array(t.length+n.length);for(let l=0;l<t.length;l++)a[l]=t[l];for(let l=0;l<n.length;l++)a[t.length+l]=n[l];return a},LC=(t,n)=>({classGroupId:t,validator:n}),gb=(t=new Map,n=null,a)=>({nextPart:t,validators:n,classGroupId:a}),Uo="-",Wy=[],UC="arbitrary..",$C=t=>{const n=IC(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return BC(d);const m=d.split(Uo),p=m[0]===""&&m.length>1?1:0;return yb(m,p,n)},getConflictingClassGroupIds:(d,m)=>{if(m){const p=l[d],g=a[d];return p?g?MC(g,p):p:g||Wy}return a[d]||Wy}}},yb=(t,n,a)=>{if(t.length-n===0)return a.classGroupId;const o=t[n],u=a.nextPart.get(o);if(u){const g=yb(t,n+1,u);if(g)return g}const d=a.validators;if(d===null)return;const m=n===0?t.join(Uo):t.slice(n).join(Uo),p=d.length;for(let g=0;g<p;g++){const b=d[g];if(b.validator(m))return b.classGroupId}},BC=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?UC+l:void 0})(),IC=t=>{const{theme:n,classGroups:a}=t;return ZC(a,n)},ZC=(t,n)=>{const a=gb();for(const l in t){const o=t[l];Kf(o,a,l,n)}return a},Kf=(t,n,a,l)=>{const o=t.length;for(let u=0;u<o;u++){const d=t[u];qC(d,n,a,l)}},qC=(t,n,a,l)=>{if(typeof t=="string"){HC(t,n,a);return}if(typeof t=="function"){GC(t,n,a,l);return}KC(t,n,a,l)},HC=(t,n,a)=>{const l=t===""?n:vb(n,t);l.classGroupId=a},GC=(t,n,a,l)=>{if(YC(t)){Kf(t(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(LC(a,t))},KC=(t,n,a,l)=>{const o=Object.entries(t),u=o.length;for(let d=0;d<u;d++){const[m,p]=o[d];Kf(p,vb(n,m),a,l)}},vb=(t,n)=>{let a=t;const l=n.split(Uo),o=l.length;for(let u=0;u<o;u++){const d=l[u];let m=a.nextPart.get(d);m||(m=gb(),a.nextPart.set(d,m)),a=m}return a},YC=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,VC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const o=(u,d)=>{a[u]=d,n++,n>t&&(n=0,l=a,a=Object.create(null))};return{get(u){let d=a[u];if(d!==void 0)return d;if((d=l[u])!==void 0)return o(u,d),d},set(u,d){u in a?a[u]=d:o(u,d)}}},of="!",ev=":",PC=[],tv=(t,n,a,l,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:o}),QC=t=>{const{prefix:n,experimentalParseClassName:a}=t;let l=o=>{const u=[];let d=0,m=0,p=0,g;const b=o.length;for(let j=0;j<b;j++){const k=o[j];if(d===0&&m===0){if(k===ev){u.push(o.slice(p,j)),p=j+1;continue}if(k==="/"){g=j;continue}}k==="["?d++:k==="]"?d--:k==="("?m++:k===")"&&m--}const v=u.length===0?o:o.slice(p);let x=v,N=!1;v.endsWith(of)?(x=v.slice(0,-1),N=!0):v.startsWith(of)&&(x=v.slice(1),N=!0);const C=g&&g>p?g-p:void 0;return tv(u,N,x,C)};if(n){const o=n+ev,u=l;l=d=>d.startsWith(o)?u(d.slice(o.length)):tv(PC,!1,d,void 0,!0)}if(a){const o=l;l=u=>a({className:u,parseClassName:o})}return l},XC=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let o=[];for(let u=0;u<a.length;u++){const d=a[u],m=d[0]==="[",p=n.has(d);m||p?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(d)):o.push(d)}return o.length>0&&(o.sort(),l.push(...o)),l}},JC=t=>({cache:VC(t.cacheSize),parseClassName:QC(t),sortModifiers:XC(t),...$C(t)}),FC=/\s+/,WC=(t,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:u}=n,d=[],m=t.trim().split(FC);let p="";for(let g=m.length-1;g>=0;g-=1){const b=m[g],{isExternal:v,modifiers:x,hasImportantModifier:N,baseClassName:C,maybePostfixModifierPosition:j}=a(b);if(v){p=b+(p.length>0?" "+p:p);continue}let k=!!j,A=l(k?C.substring(0,j):C);if(!A){if(!k){p=b+(p.length>0?" "+p:p);continue}if(A=l(C),!A){p=b+(p.length>0?" "+p:p);continue}k=!1}const T=x.length===0?"":x.length===1?x[0]:u(x).join(":"),O=N?T+of:T,D=O+A;if(d.indexOf(D)>-1)continue;d.push(D);const L=o(A,k);for(let H=0;H<L.length;++H){const V=L[H];d.push(O+V)}p=b+(p.length>0?" "+p:p)}return p},eE=(...t)=>{let n=0,a,l,o="";for(;n<t.length;)(a=t[n++])&&(l=bb(a))&&(o&&(o+=" "),o+=l);return o},bb=t=>{if(typeof t=="string")return t;let n,a="";for(let l=0;l<t.length;l++)t[l]&&(n=bb(t[l]))&&(a&&(a+=" "),a+=n);return a},tE=(t,...n)=>{let a,l,o,u;const d=p=>{const g=n.reduce((b,v)=>v(b),t());return a=JC(g),l=a.cache.get,o=a.cache.set,u=m,m(p)},m=p=>{const g=l(p);if(g)return g;const b=WC(p,a);return o(p,b),b};return u=d,(...p)=>u(eE(...p))},nE=[],kt=t=>{const n=a=>a[t]||nE;return n.isThemeGetter=!0,n},xb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Sb=/^\((?:(\w[\w-]*):)?(.+)\)$/i,iE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,aE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,sE=/\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$/,lE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,rE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,oE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Di=t=>iE.test(t),Ce=t=>!!t&&!Number.isNaN(Number(t)),Ri=t=>!!t&&Number.isInteger(Number(t)),Kd=t=>t.endsWith("%")&&Ce(t.slice(0,-1)),ai=t=>aE.test(t),wb=()=>!0,cE=t=>sE.test(t)&&!lE.test(t),Yf=()=>!1,uE=t=>rE.test(t),dE=t=>oE.test(t),fE=t=>!me(t)&&!pe(t),hE=t=>Gi(t,kb,Yf),me=t=>xb.test(t),ha=t=>Gi(t,_b,cE),nv=t=>Gi(t,SE,Ce),mE=t=>Gi(t,Cb,wb),pE=t=>Gi(t,zb,Yf),iv=t=>Gi(t,jb,Yf),gE=t=>Gi(t,Nb,dE),xo=t=>Gi(t,Eb,uE),pe=t=>Sb.test(t),Cl=t=>wa(t,_b),yE=t=>wa(t,zb),av=t=>wa(t,jb),vE=t=>wa(t,kb),bE=t=>wa(t,Nb),So=t=>wa(t,Eb,!0),xE=t=>wa(t,Cb,!0),Gi=(t,n,a)=>{const l=xb.exec(t);return l?l[1]?n(l[1]):a(l[2]):!1},wa=(t,n,a=!1)=>{const l=Sb.exec(t);return l?l[1]?n(l[1]):a:!1},jb=t=>t==="position"||t==="percentage",Nb=t=>t==="image"||t==="url",kb=t=>t==="length"||t==="size"||t==="bg-size",_b=t=>t==="length",SE=t=>t==="number",zb=t=>t==="family-name",Cb=t=>t==="number"||t==="weight",Eb=t=>t==="shadow",wE=()=>{const t=kt("color"),n=kt("font"),a=kt("text"),l=kt("font-weight"),o=kt("tracking"),u=kt("leading"),d=kt("breakpoint"),m=kt("container"),p=kt("spacing"),g=kt("radius"),b=kt("shadow"),v=kt("inset-shadow"),x=kt("text-shadow"),N=kt("drop-shadow"),C=kt("blur"),j=kt("perspective"),k=kt("aspect"),A=kt("ease"),T=kt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...D(),pe,me],H=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],R=()=>[pe,me,p],Q=()=>[Di,"full","auto",...R()],be=()=>[Ri,"none","subgrid",pe,me],X=()=>["auto",{span:["full",Ri,pe,me]},Ri,pe,me],ce=()=>[Ri,"auto",pe,me],Oe=()=>["auto","min","max","fr",pe,me],Ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Me=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...R()],K=()=>[Di,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],ae=()=>[Di,"screen","full","dvw","lvw","svw","min","max","fit",...R()],de=()=>[Di,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],ee=()=>[t,pe,me],z=()=>[...D(),av,iv,{position:[pe,me]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",vE,hE,{size:[pe,me]}],ne=()=>[Kd,Cl,ha],oe=()=>["","none","full",g,pe,me],fe=()=>["",Ce,Cl,ha],we=()=>["solid","dashed","dotted","double"],Z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Ce,Kd,av,iv],Le=()=>["","none",C,pe,me],Qe=()=>["none",Ce,pe,me],le=()=>["none",Ce,pe,me],st=()=>[Ce,pe,me],ct=()=>[Di,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ai],breakpoint:[ai],color:[wb],container:[ai],"drop-shadow":[ai],ease:["in","out","in-out"],font:[fE],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ai],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ai],shadow:[ai],spacing:["px",Ce],text:[ai],"text-shadow":[ai],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Di,me,pe,k]}],container:["container"],columns:[{columns:[Ce,me,pe,m]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:H()}],"overflow-x":[{"overflow-x":H()}],"overflow-y":[{"overflow-y":H()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[Ri,"auto",pe,me]}],basis:[{basis:[Di,"full","auto",m,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ce,Di,"auto","initial","none",me]}],grow:[{grow:["",Ce,pe,me]}],shrink:[{shrink:["",Ce,pe,me]}],order:[{order:[Ri,"first","last","none",pe,me]}],"grid-cols":[{"grid-cols":be()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":be()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Oe()}],"auto-rows":[{"auto-rows":Oe()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...Ke(),"normal"]}],"justify-items":[{"justify-items":[...Me(),"normal"]}],"justify-self":[{"justify-self":["auto",...Me()]}],"align-content":[{content:["normal",...Ke()]}],"align-items":[{items:[...Me(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Me(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ke()}],"place-items":[{"place-items":[...Me(),"baseline"]}],"place-self":[{"place-self":["auto",...Me()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mbs:[{mbs:I()}],mbe:[{mbe:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ae()]}],"min-inline-size":[{"min-inline":["auto",...ae()]}],"max-inline-size":[{"max-inline":["none",...ae()]}],"block-size":[{block:["auto",...de()]}],"min-block-size":[{"min-block":["auto",...de()]}],"max-block-size":[{"max-block":["none",...de()]}],w:[{w:[m,"screen",...K()]}],"min-w":[{"min-w":[m,"screen","none",...K()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",a,Cl,ha]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,xE,mE]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Kd,me]}],"font-family":[{font:[yE,pE,n]}],"font-features":[{"font-features":[me]}],"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:[o,pe,me]}],"line-clamp":[{"line-clamp":[Ce,"none",pe,nv]}],leading:[{leading:[u,...R()]}],"list-image":[{"list-image":["none",pe,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",pe,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...we(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ce,"from-font","auto",pe,ha]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[Ce,"auto",pe,me]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe,me]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",pe,me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ri,pe,me],radial:["",pe,me],conic:[Ri,pe,me]},bE,gE]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:fe()}],"border-w-x":[{"border-x":fe()}],"border-w-y":[{"border-y":fe()}],"border-w-s":[{"border-s":fe()}],"border-w-e":[{"border-e":fe()}],"border-w-bs":[{"border-bs":fe()}],"border-w-be":[{"border-be":fe()}],"border-w-t":[{"border-t":fe()}],"border-w-r":[{"border-r":fe()}],"border-w-b":[{"border-b":fe()}],"border-w-l":[{"border-l":fe()}],"divide-x":[{"divide-x":fe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":fe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...we(),"hidden","none"]}],"divide-style":[{divide:[...we(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...we(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ce,pe,me]}],"outline-w":[{outline:["",Ce,Cl,ha]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",b,So,xo]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",v,So,xo]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:fe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[Ce,ha]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":fe()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",x,So,xo]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[Ce,pe,me]}],"mix-blend":[{"mix-blend":[...Z(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Z()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[pe,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[Ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",pe,me]}],filter:[{filter:["","none",pe,me]}],blur:[{blur:Le()}],brightness:[{brightness:[Ce,pe,me]}],contrast:[{contrast:[Ce,pe,me]}],"drop-shadow":[{"drop-shadow":["","none",N,So,xo]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",Ce,pe,me]}],"hue-rotate":[{"hue-rotate":[Ce,pe,me]}],invert:[{invert:["",Ce,pe,me]}],saturate:[{saturate:[Ce,pe,me]}],sepia:[{sepia:["",Ce,pe,me]}],"backdrop-filter":[{"backdrop-filter":["","none",pe,me]}],"backdrop-blur":[{"backdrop-blur":Le()}],"backdrop-brightness":[{"backdrop-brightness":[Ce,pe,me]}],"backdrop-contrast":[{"backdrop-contrast":[Ce,pe,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ce,pe,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ce,pe,me]}],"backdrop-invert":[{"backdrop-invert":["",Ce,pe,me]}],"backdrop-opacity":[{"backdrop-opacity":[Ce,pe,me]}],"backdrop-saturate":[{"backdrop-saturate":[Ce,pe,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Ce,pe,me]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",pe,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ce,"initial",pe,me]}],ease:[{ease:["linear","initial",A,pe,me]}],delay:[{delay:[Ce,pe,me]}],animate:[{animate:["none",T,pe,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[j,pe,me]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:le()}],"scale-x":[{"scale-x":le()}],"scale-y":[{"scale-y":le()}],"scale-z":[{"scale-z":le()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[pe,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ct()}],"translate-x":[{"translate-x":ct()}],"translate-y":[{"translate-y":ct()}],"translate-z":[{"translate-z":ct()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",pe,me]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",pe,me]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[Ce,Cl,ha,nv]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},jE=tE(wE);function wn(...t){return jE(mb(t))}const NE=pb("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-zinc-800 bg-zinc-950 text-zinc-300",success:"border-emerald-500/25 bg-emerald-500/10 text-emerald-300",warning:"border-amber-500/25 bg-amber-500/10 text-amber-300",destructive:"border-rose-500/25 bg-rose-500/10 text-rose-300"}},defaultVariants:{variant:"neutral"}});function Ab({className:t,variant:n,...a}){return c.jsx("div",{className:wn(NE({variant:n}),t),...a})}var kE=Symbol.for("react.lazy"),$o=ff[" use ".trim().toString()];function _E(t){return typeof t=="object"&&t!==null&&"then"in t}function Ob(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===kE&&"_payload"in t&&_E(t._payload)}function zE(t){const n=EE(t),a=w.forwardRef((l,o)=>{let{children:u,...d}=l;Ob(u)&&typeof $o=="function"&&(u=$o(u._payload));const m=w.Children.toArray(u),p=m.find(OE);if(p){const g=p.props.children,b=m.map(v=>v===p?w.Children.count(g)>1?w.Children.only(null):w.isValidElement(g)?g.props.children:null:v);return c.jsx(n,{...d,ref:o,children:w.isValidElement(g)?w.cloneElement(g,void 0,b):null})}return c.jsx(n,{...d,ref:o,children:u})});return a.displayName=`${t}.Slot`,a}var CE=zE("Slot");function EE(t){const n=w.forwardRef((a,l)=>{let{children:o,...u}=a;if(Ob(o)&&typeof $o=="function"&&(o=$o(o._payload)),w.isValidElement(o)){const d=DE(o),m=TE(u,o.props);return o.type!==w.Fragment&&(m.ref=l?Cf(l,d):d),w.cloneElement(o,m)}return w.Children.count(o)>1?w.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var AE=Symbol("radix.slottable");function OE(t){return w.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===AE}function TE(t,n){const a={...n};for(const l in n){const o=t[l],u=n[l];/^on[A-Z]/.test(l)?o&&u?a[l]=(...m)=>{const p=u(...m);return o(...m),p}:o&&(a[l]=o):l==="style"?a[l]={...o,...u}:l==="className"&&(a[l]=[o,u].filter(Boolean).join(" "))}return{...t,...a}}function DE(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}const RE=pb("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 focus-visible:ring-offset-black disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-zinc-50 text-black hover:bg-zinc-200",secondary:"border border-zinc-800 bg-zinc-950 text-zinc-100 hover:bg-zinc-900",ghost:"text-zinc-400 hover:bg-zinc-900 hover:text-zinc-50",outline:"border border-zinc-800 bg-transparent text-zinc-100 hover:bg-zinc-900",destructive:"bg-rose-600 text-white hover:bg-rose-700"},size:{default:"h-9 px-4",sm:"h-8 px-3 text-xs",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),ue=w.forwardRef(({className:t,variant:n,size:a,asChild:l=!1,...o},u)=>{const d=l?CE:"button";return c.jsx(d,{ref:u,className:wn(RE({variant:n,size:a,className:t})),...o})});ue.displayName="Button";const He=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:wn("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",t),...n}));He.displayName="Card";const ME=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:wn("flex flex-col gap-1.5 p-5",t),...n}));ME.displayName="CardHeader";const LE=w.forwardRef(({className:t,...n},a)=>c.jsx("h3",{ref:a,className:wn("font-medium tracking-tight text-zinc-50",t),...n}));LE.displayName="CardTitle";const UE=w.forwardRef(({className:t,...n},a)=>c.jsx("p",{ref:a,className:wn("text-sm text-zinc-500",t),...n}));UE.displayName="CardDescription";const $E=w.forwardRef(({className:t,...n},a)=>c.jsx("div",{ref:a,className:wn("p-5 pt-0",t),...n}));$E.displayName="CardContent";const BE=A0,IE=O0,Tb=w.forwardRef(({className:t,...n},a)=>c.jsx(Tf,{ref:a,className:wn("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",t),...n}));Tb.displayName=Tf.displayName;const ZE=400,qE=1200,HE=720,Db=w.forwardRef(({className:t,children:n,...a},l)=>{const[o,u]=w.useState(HE),d=w.useRef(!1),m=w.useRef(0),p=w.useRef(0),g=w.useCallback(x=>{d.current=!0,m.current=x.clientX,p.current=o,x.target.setPointerCapture(x.pointerId),x.preventDefault()},[o]),b=w.useCallback(x=>{if(!d.current)return;const N=m.current-x.clientX,C=Math.min(qE,Math.max(ZE,p.current+N));u(C)},[]),v=w.useCallback(()=>{d.current=!1},[]);return c.jsxs(IE,{children:[c.jsx(Tb,{}),c.jsxs(Df,{ref:l,className:wn("fixed z-50 flex flex-col bg-zinc-950 px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-zinc-800",t),style:{width:`min(${o}px, 100vw)`},...a,children:[c.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:g,onPointerMove:b,onPointerUp:v}),n,c.jsxs(D0,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-900 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",children:[c.jsx(Lf,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Db.displayName=Df.displayName;const GE=({className:t,...n})=>c.jsx("div",{className:wn("flex flex-col gap-1.5 pr-10",t),...n}),Rb=w.forwardRef(({className:t,...n},a)=>c.jsx(Rf,{ref:a,className:wn("text-lg font-medium text-zinc-50",t),...n}));Rb.displayName=Rf.displayName;const Mb=w.forwardRef(({className:t,...n},a)=>c.jsx(T0,{ref:a,className:wn("text-sm text-zinc-500",t),...n}));Mb.displayName=T0.displayName;function Cn(t){const n=new Date("2026-02-20");return t.map((a,l)=>({runId:`run_mock_${l+1}`,citationState:a,createdAt:new Date(n.getTime()+l*2*24*60*60*1e3).toISOString()}))}const js=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],country:"US",language:"en",tags:["lead gen"],labels:{},configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],country:"US",language:"en",tags:["multi-location"],labels:{},configSource:"cli",configRevision:1}];function sc(t){return{id:t.id,projectId:t.projectId,projectName:t.projectName,kind:t.kind,kindLabel:t.kindLabel,status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt,duration:t.duration,statusDetail:t.statusDetail,summary:t.summary,triggerLabel:t.triggerLabel}}const Bo=sc({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6m 12s",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),Vf=sc({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),Pf=sc({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5m 07s",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),Io=sc({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"3m 10s",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),KE=[Vf,Bo,Pf,Io],YE=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:Cn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:Cn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",keyword:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",keyword:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:Cn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",keyword:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-3-flash",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",keyword:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:Cn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],VE=[{project:js[0],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Local-intent monitoring",visibilitySummary:{label:"Answer Visibility",value:"61 / 100",delta:"-8 this week",tone:"caution",description:"Lost citation share on emergency-intent prompts while Invisalign visibility improved.",trend:[73,71,69,66,61]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:55,cited:5,total:9},{provider:"openai",model:"gpt-5.4",score:67,cited:6,total:9},{provider:"claude",model:"claude-sonnet-4-6",score:44,cited:4,total:9}],competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest visibility sweep completed; next sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",provider:"gemini",citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",provider:"openai",citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",provider:"claude",citationState:"not-cited"}]}],visibilityEvidence:YE,competitors:[{id:"competitor_citypoint_downtown",domain:"downtownsmiles.com",citationCount:4,totalKeywords:8,pressureLabel:"High",citedKeywords:["emergency dentist","same-day dental","walk-in dentist","tooth pain"],movement:"Up on emergency and availability prompts",notes:"Recently added same-day booking proof and FAQ content."},{id:"competitor_citypoint_harbor",domain:"harbordental.com",citationCount:2,totalKeywords:8,pressureLabel:"Moderate",citedKeywords:["family dentist","emergency dentist"],movement:"Holding citations on family and emergency intents",notes:"Strong appointment and insurance content keeps answers grounded."},{id:"competitor_citypoint_clearline",domain:"clearlineortho.com",citationCount:1,totalKeywords:8,pressureLabel:"Low",citedKeywords:["invisalign near me"],movement:"Softening on Invisalign prompts",notes:"Case-study content is aging, opening room for Citypoint."}],recentRuns:[Vf,Bo]},{project:js[1],dateRangeLabel:"Last 14 days",contextLabel:"US / English / Service-area legal prompts",visibilitySummary:{label:"Answer Visibility",value:"74 / 100",delta:"+2 this week",tone:"positive",description:"Branded prompts are stable and informational queries are gradually improving.",trend:[68,70,71,73,74]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:75,cited:3,total:4},{provider:"openai",model:"gpt-5.4",score:50,cited:2,total:4}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility runs completed without issues.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",provider:"gemini",citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Held for 5 runs",answerSnippet:"Harbor Legal Group remains cited for borough-specific personal injury queries due to clear practice-area and case-result content.",citedDomains:["harborlegal.com"],evidenceUrls:["https://harborlegal.com/personal-injury/brooklyn"],competitorDomains:["shorelineinjury.com"],groundingSources:[],relatedTechnicalSignals:["Practice-area schema intact","Case results link directly from service pages"],summary:"Grounding remains durable after the service-page consolidation.",runHistory:Cn(["cited","cited","cited","cited","cited"])}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[Pf]},{project:js[2],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Multi-location treatment prompts",visibilitySummary:{label:"Answer Visibility",value:"58 / 100",delta:"Run in progress",tone:"neutral",description:"The current run is measuring whether treatment-location pages improved citation breadth.",trend:[52,54,55,57,58]},providerScores:[{provider:"openai",model:"gpt-5.4",score:58,cited:4,total:7}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",provider:"openai",citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"Improving",answerSnippet:"Northstar Orthopedics is beginning to appear on location-sensitive treatment prompts when physician bios and treatment pages are tightly linked.",citedDomains:["northstarortho.com","regionaljointcare.com"],evidenceUrls:["https://northstarortho.com/locations/westchester/knee-replacement"],competitorDomains:["regionaljointcare.com"],groundingSources:[],relatedTechnicalSignals:["Physician bios now linked from treatment pages"],summary:"Template cleanup is helping, but proof depth still matters.",runHistory:Cn(["not-cited","not-cited","not-cited","cited"])}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[Io]}],PE={portfolioOverview:{projects:[{project:js[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:Bo,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:js[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:Pf,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:js[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:Io,insight:"Location pages are improving, but local treatment proof still trails competitors.",trend:[52,54,55,57,58],competitorPressureLabel:"Moderate"}],attentionItems:[{id:"attention_citypoint",tone:"negative",title:"Citypoint Dental lost emergency-intent citations",detail:"Three high-intent prompts now cite competitors first.",actionLabel:"Open project",href:"/projects/project_citypoint"},{id:"attention_worker",tone:"neutral",title:"One follow-up run is queued",detail:"Citypoint has a queued visibility sweep waiting on provider quota.",actionLabel:"Open runs",href:"/runs"},{id:"attention_northstar",tone:"caution",title:"Northstar run still in progress",detail:"Nine prompts remain before the current treatment-location sweep finishes.",actionLabel:"View timeline",href:"/runs"}],recentRuns:[Vf,Io,Bo],systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Healthy",meta:"phase-1 · database configured"},{id:"worker",label:"Worker",tone:"positive",detail:"Healthy",meta:"heartbeat moments ago"},{id:"providers",label:"Providers",tone:"positive",detail:"2 of 3 configured",meta:"Gemini · OpenAI"}],lastUpdatedAt:"Mar 9, 8:08 AM ET"},projects:VE,runs:KE,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-3-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-5.4",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],google:{state:"ready",detail:"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}},QE={apiStatus:{label:"API",state:"ok",detail:"phase-1 · database configured",version:"phase-1",databaseConfigured:!0},workerStatus:{label:"Worker",state:"ok",detail:"phase-1 · database configured · heartbeat 2026-03-09T08:07:00.000Z",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T08:07:00.000Z"}};function XE(t={}){const n=structuredClone(PE),a=structuredClone(QE);if(t.emptyPortfolio&&(n.portfolioOverview.projects=[],n.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],n.portfolioOverview.recentRuns=[],n.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),t.runScenario==="partial"&&(n.runs[0].status="partial",n.runs[0].duration="7m 24s",n.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",n.runs[0].summary="Partial visibility sweep after quota cap",n.portfolioOverview.recentRuns[0]=n.runs[0]),t.runScenario==="failed"&&(n.runs[0].status="failed",n.runs[0].duration="1m 43s",n.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",n.runs[0].summary="Provider retries exhausted before results were captured",n.portfolioOverview.recentRuns[0]=n.runs[0],n.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),t.degradedWorker&&(a.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),t.providerNeedsConfig&&(n.settings.providerStatuses=n.settings.providerStatuses.map(l=>({...l,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),t.visibilityDropProjectId){const l=n.projects.find(u=>u.project.id===t.visibilityDropProjectId),o=n.portfolioOverview.projects.find(u=>u.project.id===t.visibilityDropProjectId);l&&(l.visibilitySummary.value="49 / 100",l.visibilitySummary.delta="-12 in 48h",l.visibilitySummary.tone="negative",l.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",l.insights.unshift({id:`${l.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:l.visibilityEvidence.filter(u=>u.citationState==="lost").slice(0,5).map(u=>({keyword:u.keyword,evidenceId:u.id,provider:u.provider||void 0,citationState:u.citationState}))})),o&&(o.visibilityScore=49,o.visibilityDelta="-12 in 48h",o.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:n,health:a}}function Lb(t,n){return t.projects.find(a=>a.project.id===n)}function JE(t,n){return t.runs.find(a=>a.id===n)}function FE(t,n){for(const a of t.projects){const l=a.visibilityEvidence.find(o=>o.id===n);if(l)return{project:a,evidence:l}}}const WE="/api/v1";function eA(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function ze(t,n){const a=eA(),l=await fetch(`${WE}${t}`,{...n,headers:{"Content-Type":"application/json",...a?{Authorization:`Bearer ${a}`}:{},...n?.headers}});if(!l.ok){const o=await l.text();let u=`API ${l.status}: ${l.statusText}`;if(o)try{const d=JSON.parse(o);typeof d.error=="string"?u=d.error:d.error?.message?u=d.error.message:d.message&&(u=d.message)}catch{u=o}throw new Error(u)}if(l.status!==204)return l.json()}function tA(){return ze("/projects")}function Ub(t){return ze(`/projects/${encodeURIComponent(t)}`)}function nA(){return ze("/runs")}function $l(t){return ze(`/runs/${encodeURIComponent(t)}`)}function iA(t){return ze(`/projects/${encodeURIComponent(t)}/keywords`)}function $b(t){return ze(`/projects/${encodeURIComponent(t)}/competitors`)}function aA(t){return ze(`/projects/${encodeURIComponent(t)}/timeline`)}function lc(t,n){return ze(`/projects/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function sA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:n})})}function lA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"DELETE",body:JSON.stringify({keywords:n})})}function rA(t,n){return ze(`/projects/${encodeURIComponent(t)}/keywords`,{method:"POST",body:JSON.stringify({keywords:n})})}function Bb(t,n){return ze(`/projects/${encodeURIComponent(t)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:n})})}async function oA(t,n){const a=await Ub(t);return lc(t,{displayName:a.displayName,canonicalDomain:a.canonicalDomain,ownedDomains:n,country:a.country,language:a.language,tags:a.tags,labels:a.labels,providers:a.providers})}async function cA(t,n){const a=await Ub(t);return lc(t,{displayName:n.displayName??a.displayName,canonicalDomain:n.canonicalDomain??a.canonicalDomain,ownedDomains:n.ownedDomains??a.ownedDomains,country:n.country??a.country,language:n.language??a.language,tags:a.tags,labels:a.labels,providers:a.providers})}function Ib(t){return ze(`/projects/${encodeURIComponent(t)}/runs`,{method:"POST",body:"{}"})}async function uA(t){await ze(`/projects/${encodeURIComponent(t)}`,{method:"DELETE",body:"{}"})}function dA(t){return ze(`/projects/${encodeURIComponent(t)}/export`)}function Zb(){return ze("/settings")}function fA(t,n){return ze(`/settings/providers/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function hA(t){return ze("/settings/google",{method:"PUT",body:JSON.stringify(t)})}async function mA(t){try{return await ze(`/projects/${encodeURIComponent(t)}/schedule`)}catch(n){if(n instanceof Error&&n.message.includes("404"))return null;throw n}}function sv(t,n){return ze(`/projects/${encodeURIComponent(t)}/schedule`,{method:"PUT",body:JSON.stringify(n)})}async function pA(t){await ze(`/projects/${encodeURIComponent(t)}/schedule`,{method:"DELETE",body:"{}"})}function gA(t){return ze(`/projects/${encodeURIComponent(t)}/notifications`)}function yA(t,n){return ze(`/projects/${encodeURIComponent(t)}/notifications`,{method:"POST",body:JSON.stringify(n)})}async function vA(t,n){await ze(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function bA(t,n){return ze(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}/test`,{method:"POST",body:"{}"})}function xA(t,n,a){return ze(`/projects/${encodeURIComponent(t)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:n,count:a})})}function SA(t){return ze("/apply",{method:"POST",body:JSON.stringify(t)})}function wA(t){return ze("/runs",{method:"POST",body:JSON.stringify({})})}function jA(t){return ze(`/projects/${encodeURIComponent(t)}/google/connections`)}function NA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/connect`,{method:"POST",body:JSON.stringify({type:n})})}function kA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function _A(t){return ze(`/projects/${encodeURIComponent(t)}/google/properties`)}function zA(t,n,a){return ze(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}/property`,{method:"PUT",body:JSON.stringify({propertyId:a})})}function CA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/sync`,{method:"POST",body:JSON.stringify(n??{})})}function EA(t,n){const a=new URLSearchParams;n?.startDate&&a.set("startDate",n.startDate),n?.endDate&&a.set("endDate",n.endDate),n?.query&&a.set("query",n.query),n?.page&&a.set("page",n.page),n?.limit!==void 0&&a.set("limit",String(n.limit));const l=a.toString()?`?${a.toString()}`:"";return ze(`/projects/${encodeURIComponent(t)}/google/gsc/performance${l}`)}function AA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspect`,{method:"POST",body:JSON.stringify({url:n})})}function OA(t,n){const a=new URLSearchParams;n?.url&&a.set("url",n.url),a.set("limit",String(n.limit));const l=a.toString()?`?${a.toString()}`:"";return ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspections${l}`)}function TA(t){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/deindexed`)}function DA(t){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/coverage`)}function RA(t,n){return ze(`/projects/${encodeURIComponent(t)}/google/gsc/inspect-sitemap`,{method:"POST",body:JSON.stringify(n??{})})}function qb(t){return{id:t.id,name:t.name,displayName:t.displayName,canonicalDomain:t.canonicalDomain,ownedDomains:t.ownedDomains??[],country:t.country,language:t.language,tags:t.tags,labels:t.labels,configSource:t.configSource,configRevision:t.configRevision,createdAt:t.createdAt,updatedAt:t.updatedAt}}function lv(t){try{return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function MA(t,n){if(!t)return"Waiting";if(!n)return"Running";const a=new Date(n).getTime()-new Date(t).getTime();if(a<1e3)return"<1s";const l=Math.floor(a/1e3);if(l<60)return`${l}s`;const o=Math.floor(l/60),u=l%60;return`${o}m ${u}s`}function Hb(t){return t==="answer-visibility"?"Answer visibility sweep":t}function LA(t){return t==="manual"?"Manual":t==="scheduled"?"Scheduled":t==="config-apply"?"Config apply":t}function Qf(t,n){return{id:t.id,projectId:t.projectId,projectName:n,kind:t.kind,kindLabel:Hb(t.kind),status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt?lv(t.startedAt):lv(t.createdAt),duration:MA(t.startedAt,t.finishedAt),statusDetail:t.error?Gb(t.error):UA(t),summary:$A(t),triggerLabel:LA(t.trigger)}}function Gb(t){try{const a=JSON.parse(t);if(typeof a=="object"&&a!==null){const l=a.message??a.error?.message??a[0]?.error?.message;if(typeof l=="string"&&l.length>0)return l.length>200?l.slice(0,200)+"…":l}}catch{}const n=t.match(/\[.*?\]\s*(.+)/);if(n){const a=n[1];return a.length>200?a.slice(0,200)+"…":a}return t.length>200?t.slice(0,200)+"…":t}function UA(t){switch(t.status){case"queued":return"Waiting for execution slot.";case"running":return"Provider queries in progress.";case"completed":return"All key phrases checked.";case"partial":return"Run completed with some key phrases skipped.";case"failed":return t.error?Gb(t.error):"Run failed.";default:return""}}function $A(t){switch(t.status){case"queued":return"Queued for execution";case"running":return"In progress";case"completed":return"Visibility sweep completed";case"partial":return"Partial completion";case"failed":return"Run failed";default:return t.status}}function Kb(t){if(t.length===0)return{score:0,citedCount:0,totalCount:0};const n=new Map;for(const u of t){const d=u.keyword??u.id;n.has(d)||n.set(d,!1),u.citationState==="cited"&&n.set(d,!0)}const a=n.size,l=[...n.values()].filter(Boolean).length;return{score:a>0?Math.round(l/a*100):0,citedCount:l,totalCount:a}}function BA(t){return t>=70?"positive":t>=40?"caution":"negative"}function IA(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function Yb(t,n){if(t.length===0||n.length===0)return{label:"None",count:0};const a=new Set(n);let l=0;for(const u of t)u.competitorOverlap.some(d=>a.has(d))&&l++;const o=l/t.length;return o>=.5?{label:"High",count:l}:o>=.2?{label:"Moderate",count:l}:{label:"Low",count:l}}function ZA(t,n,a,l){const o=[];let u=0;const d=new Set;if(a){const m=new Map;for(const g of a.snapshots)if(g.keyword){const b=`${g.keyword}::${g.provider}`;m.set(b,g)}const p=[...new Set(a.snapshots.map(g=>g.provider))].sort();p.length===0&&p.push("gemini");for(const g of n){if(g.runs.length===0)continue;d.add(g.keyword);const v=g.runs.at(-1)?.transition??"not-cited",x=v==="lost"?"lost":v==="emerging"?"emerging":v==="cited"?"cited":"not-cited";for(const N of p){const C=m.get(`${g.keyword}::${N}`);if(!C&&p.length>1)continue;const j=C?.model??null,k=j?`${N}:${j}`:null,A=k?g.modelRuns?.[k]:void 0,T=g.providerRuns?.[N],O=(T?.length?T:null)??(A?.length?A:null),D=T?.length?"provider":A?.length?"model":"keyword",L=O?O.at(-1).transition:v,H=L==="lost"?"lost":L==="emerging"?"emerging":C?C.citationState==="cited"?"cited":"not-cited":x,V=cf(O||g.runs),R=qA(g,N),Q=(O??g.runs).map(Oe=>({runId:Oe.runId,citationState:Oe.citationState,createdAt:Oe.createdAt,model:R.get(Oe.runId)??null})),be=HA(Q),X=D==="provider"&&be.length<=1?"model":D,ce=GA(Q);o.push({id:`evidence_${t}_${u++}`,keyword:g.keyword,provider:C?.provider??N,model:C?.model??null,citationState:H,changeLabel:KA(L,V),answerSnippet:C?.answerText??"",citedDomains:C?.citedDomains??[],evidenceUrls:[],competitorDomains:C?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:C?.groundingSources??[],summary:YA(H,g.keyword),runHistory:Q,historyScope:X,modelsSeen:be,modelTransitions:ce})}}}for(const m of l)d.has(m.keyword)||o.push({id:`evidence_${t}_${u++}`,keyword:m.keyword,provider:"",model:null,citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"keyword",modelsSeen:[],modelTransitions:[]});return o}function qA(t,n){const a=new Map,l=`${n}:`;for(const[o,u]of Object.entries(t.modelRuns??{})){if(!o.startsWith(l))continue;const d=o.slice(l.length),m=d==="unknown"?null:d;for(const p of u)a.set(p.runId,m)}return a}function HA(t){const n=new Set;for(const a of t)a.model&&n.add(a.model);return[...n]}function GA(t){const n=[];let a=null;for(const l of t){const o=l.model??null;o!==a&&a!==null&&n.push({runId:l.runId,createdAt:l.createdAt,fromModel:a,toModel:o}),a=o}return n}function cf(t){if(t.length===0)return 0;const n=t[t.length-1].citationState;let a=0;for(let l=t.length-1;l>=0&&t[l].citationState===n;l--)a++;return a}function KA(t,n){switch(t){case"new":return"First observation";case"cited":return n<=1?"Cited in latest run":`Cited for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return n<=1?"Not cited in latest run":`Not cited across ${n} runs`;default:return t}}function YA(t,n){switch(t){case"cited":return`Your domain is cited in AI answers for "${n}".`;case"lost":return`Citation was lost for "${n}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${n}".`;case"not-cited":return`No citation detected for "${n}".`;case"pending":return`"${n}" has been added but no visibility run has been triggered yet.`}}function rv(t,n){const a=new Set(n),l=new Map;for(const o of t)if(o.keyword)for(const u of o.competitorOverlap){if(!a.has(u))continue;const d=l.get(u)??new Set;d.add(o.keyword),l.set(u,d)}return l}const Yd=3;function VA(t){const{evidence:n,timeline:a,latestSnapshots:l,previousSnapshots:o,trackedCompetitors:u}=t,d=[],m=[],p=new Set;for(const A of n)A.citationState==="lost"&&(p.has(A.keyword)||(p.add(A.keyword),m.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"lost"})));m.length>0&&d.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${m.length} keyword${m.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:m});const g=rv(l,u),b=rv(o,u);for(const A of u){const T=g.get(A)??new Set,O=b.get(A)??new Set,D=[...T].filter(L=>!O.has(L));D.length>0&&d.push({id:`insight_comp_gained_${A}`,tone:"negative",title:`${A} appeared on ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:D.map(L=>{const H=n.find(V=>V.keyword===L);return{keyword:L,evidenceId:H?.id??"",citationState:"cited"}})})}const v=new Map;for(const A of a){const T=A.runs.at(-1);T&&v.set(A.keyword,{transition:T.transition,citationState:T.citationState})}const x=[],N=[],C=new Set;for(const[A,{transition:T,citationState:O}]of v){if(!(T==="emerging"||T==="new"&&O==="cited"))continue;C.add(A);const L=n.find(H=>H.keyword===A&&(H.citationState==="emerging"||H.citationState==="cited"));x.push({keyword:A,evidenceId:L?.id??"",provider:L?.provider,citationState:"emerging"})}for(const A of n)A.citationState==="emerging"&&(C.has(A.keyword)||N.push({keyword:A.keyword,evidenceId:A.id,provider:A.provider,citationState:"emerging"}));if(N.length>0){const A=new Set(N.map(T=>T.keyword)).size;d.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${A} keyword${A>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:N})}x.length>0&&d.push({id:"insight_first_citation",tone:"positive",title:`First citation on ${C.size} keyword${C.size>1?"s":""}`,detail:"Your domain appeared in AI answers for the first time.",actionLabel:"New",affectedPhrases:x});const j=new Set(n.map(A=>A.keyword)),k=[];for(const A of a){if(!j.has(A.keyword)||A.runs.length<Yd||A.runs.at(-1)?.citationState!=="not-cited")continue;if(cf(A.runs)>=Yd){const D=n.find(L=>L.keyword===A.keyword);k.push({keyword:A.keyword,evidenceId:D?.id??"",citationState:"not-cited"})}}k.length>0&&d.push({id:"insight_persistent_gap",tone:"caution",title:`${k.length} keyword${k.length>1?"s":""} uncited for ${Yd}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:k});for(const A of u){const T=g.get(A)??new Set,D=[...b.get(A)??new Set].filter(L=>!T.has(L));D.length>0&&d.push({id:`insight_comp_lost_${A}`,tone:"neutral",title:`${A} dropped from ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:D.map(L=>{const H=n.find(V=>V.keyword===L);return{keyword:L,evidenceId:H?.id??"",citationState:"not-cited"}})})}return d.length===0&&d.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),d}function PA(t){const n=t[0];if(!n)return{label:"Run Status",value:"None",delta:"No runs yet",tone:"neutral",description:"Trigger a visibility sweep to start tracking.",tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]};const a=n.status==="completed"?"Healthy":n.status==="running"?"Running":n.status==="queued"?"Queued":n.status==="partial"?"Partial":"Failed",l=n.status==="completed"?"positive":n.status==="failed"?"negative":n.status==="partial"?"caution":"neutral";return{label:"Run Status",value:a,delta:`${t.length} total runs`,tone:l,description:`Latest: ${Hb(n.kind)} — ${n.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function QA(t){const n=qb(t.project),a=ZA(n.name,t.timeline,t.latestRunDetail,t.keywords),l=t.latestRunDetail?.snapshots??[],o=Kb(l),u=Yb(l,t.competitors.map(v=>v.domain)),d=VA({evidence:a,timeline:t.timeline,latestSnapshots:t.latestRunDetail?.snapshots??[],previousSnapshots:t.previousRunDetail?.snapshots??[],trackedCompetitors:t.competitors.map(v=>v.domain)}),m=[...t.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt)),p=m.map(v=>Qf(v,t.project.displayName||t.project.name)),g=new Map;for(const v of l){const x=v.provider||"gemini",N=v.model??null,C=`${x}::${N??"unknown"}`,j=g.get(C)??{provider:x,model:N,cited:0,total:0};j.total++,v.citationState==="cited"&&j.cited++,g.set(C,j)}const b=[...g.values()].sort((v,x)=>v.provider.localeCompare(x.provider)||(v.model??"").localeCompare(x.model??"")).map(({provider:v,model:x,cited:N,total:C})=>({provider:v,model:x,score:C>0?Math.round(N/C*100):0,cited:N,total:C}));return{project:n,dateRangeLabel:"All time",contextLabel:`${n.country} / ${n.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:l.length>0?`${o.score}`:"No data",delta:l.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:l.length>0?BA(o.score):"neutral",description:l.length>0?`${o.citedCount} of ${o.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:b,competitorPressure:{label:"Competitor Pressure",value:u.label,delta:u.count>0?`${u.count} overlapping citations`:"No overlap detected",tone:IA(u.label),description:t.competitors.length>0?`${t.competitors.length} competitor${t.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:PA(m),insights:d,visibilityEvidence:a,competitors:t.competitors.map((v,x)=>{const N=new Set;for(const T of l)(T.competitorOverlap.includes(v.domain)||T.citedDomains.includes(v.domain))&&T.keyword&&N.add(T.keyword);const C=[...N],j=new Set(l.map(T=>T.keyword).filter(Boolean)),k=j.size>0?C.length/j.size:0,A=k>=.5?"High":k>=.2?"Moderate":C.length>0?"Low":"None";return{id:v.id||`comp_${x}`,domain:v.domain,citationCount:C.length,totalKeywords:j.size,pressureLabel:A,citedKeywords:C,movement:"",notes:""}}),recentRuns:p.slice(0,5)}}function XA(t){const n=qb(t.project),a=t.latestRunDetail?.snapshots??[],l=Kb(a),o=Yb(a,t.competitors.map(p=>p.domain)),d=[...t.runs].sort((p,g)=>g.createdAt.localeCompare(p.createdAt))[0],m=d?Qf(d,t.project.displayName||t.project.name):{id:"none",projectId:t.project.id,projectName:t.project.displayName||t.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:n,visibilityScore:l.score,visibilityDelta:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases`:"No data",lastRun:m,insight:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases visible across ${new Set(a.map(p=>p.provider)).size} provider${new Set(a.map(p=>p.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:o.label}}function JA(t,n){const a=[],l=[],o=[];for(const d of t){l.push(QA(d)),o.push(XA(d));const m=[...d.runs].sort((p,g)=>g.createdAt.localeCompare(p.createdAt));for(const p of m)a.push(Qf(p,d.project.displayName||d.project.name))}a.sort((d,m)=>m.createdAt.localeCompare(d.createdAt));const u=t.length>0;return{portfolioOverview:{projects:o,attentionItems:u?FA(l):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:a.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...u?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:l,runs:a,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:u,ctaLabel:u?"Trigger run":"Create a project first",summary:u?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(d=>({name:d.name,model:d.model,state:d.configured?"ready":"needs-config",detail:d.configured?"Provider is configured.":"API key is missing.",quota:d.quota})),google:{state:n?.google?.configured?"ready":"needs-config",detail:n?.google?.configured?"Google OAuth app credentials are configured. Project-level GSC connections can be created from the dashboard.":"Google OAuth client ID and client secret are not configured yet."},selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","The local config file is the source of truth for authentication credentials.","Google OAuth app credentials and per-domain Google tokens are stored in local config, not the database.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Use the UI, CLI, or ~/.canonry/config.yaml to manage settings. Authentication credentials persist to local config."}}}function FA(t){const n=[];for(const a of t){const l=a.visibilityEvidence.filter(u=>u.citationState==="lost");l.length>0&&n.push({id:`attention_${a.project.id}_lost`,tone:"negative",title:`${a.project.displayName||a.project.name} lost citations`,detail:`${l.length} key phrase${l.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${a.project.id}`});const o=a.recentRuns.filter(u=>u.status==="running"||u.status==="queued");o.length>0&&n.push({id:`attention_${a.project.id}_active`,tone:"neutral",title:`${a.project.displayName||a.project.name} has active runs`,detail:`${o.length} run${o.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return n.length===0&&n.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),n}const ov=[{label:"Architecture",href:"https://github.com/AINYC/canonry/blob/main/docs/architecture.md"},{label:"Testing Guide",href:"https://github.com/AINYC/canonry/blob/main/docs/testing.md"}],WA=XE(),cv=t=>({label:t,state:"checking",detail:"Checking service health"}),eO={apiStatus:cv("API"),workerStatus:cv("Worker")};async function tO(t,n){try{const a=await fetch(t);if(!a.ok)return{label:n,state:"error",detail:`HTTP ${a.status}`};const l=await a.json(),o=typeof l.version=="string"?l.version:"unknown",u=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,d=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,m=[o,u===!1?"database not configured":"database configured",d?`heartbeat ${d}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:m,version:o,databaseConfigured:u,lastHeartbeatAt:d}}catch(a){return{label:n,state:"error",detail:a instanceof Error?a.message:"unreachable"}}}function Ui(t){if(!t)return"/";const n=t.split("?")[0]??"/";return n===""?"/":n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function nO(t,n){const a=Ui(t);if(a==="/")return{kind:"overview",path:"/"};if(a==="/runs")return{kind:"runs",path:"/runs"};if(a==="/settings")return{kind:"settings",path:"/settings"};if(a==="/setup")return{kind:"setup",path:"/setup"};if(a==="/projects")return{kind:"projects",path:"/projects"};if(a.startsWith("/projects/")){const l=a.split("/").filter(Boolean);if(l.length<2||l.length>3)return{kind:"not-found",path:a};const[,o,u]=l,d=u===void 0?"overview":u==="search-console"?"search-console":null;return d?Lb(n,o)?{kind:"project",path:a,projectId:o,tab:d}:{kind:"not-found",path:a}:{kind:"not-found",path:a}}return{kind:"not-found",path:a}}function iO(t){return t?Ui(t):typeof window<"u"?Ui(window.location.pathname):"/"}function Zo(t){return t.state==="ok"?"positive":t.state==="checking"?"neutral":"negative"}function Vb(t){switch(t){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function aO(t){switch(t){case"cited":return"positive";case"emerging":return"positive";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function sO(t){const n=t.match(/^(\[.*?\])\s*(.+)/);if(n){const a=n[1],l=n[2],o=l.indexOf("{");if(o>=0){const u=l.slice(0,o).trim(),d=l.slice(o);try{const m=JSON.parse(d);return`${a} ${u}
|
|
222
|
+
|
|
223
|
+
${JSON.stringify(m,null,2)}`}catch{}}return`${a}
|
|
224
|
+
${l}`}try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}}function rc(t){return t.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function lO(t,n,a){return t.map(l=>{if(l.id==="api")return{...l,tone:Zo(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(l.id==="worker")return{...l,tone:Zo(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const o=a.providerStatuses.filter(p=>p.state==="ready").length,u=a.providerStatuses.length,d=o>0,m=a.providerStatuses.filter(p=>p.state==="ready").map(p=>Jb[p.name]??p.name).join(" · ");return{...l,label:"Providers",tone:d?"positive":"caution",detail:`${o} of ${u} configured`,meta:m||"None configured"}})}function rO(t,n){if(t.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(t.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(t.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(a=>a.state==="ready"))return"Launch is blocked until at least one provider is configured."}function oO(t,n,a){const l=rO(n,a),o=structuredClone(t);return o.healthChecks=o.healthChecks.map(u=>{if(u.id==="api")return{...u,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(u.id==="worker")return{...u,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const d=a.providerStatuses.some(m=>m.state==="ready");return{...u,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),o.launchState.enabled=l===void 0,o.launchState.blockedReason=l,o.launchState.summary=l??"Queue a visibility sweep first, then follow with a site audit to explain movement.",o}function sn(t,n){return a=>{a.preventDefault(),a.stopPropagation(),t(n)}}function wo(t,n){return n==="projects"?t.kind==="projects"||t.kind==="project":n==="project"?t.kind==="project":t.kind===n}function uv({compact:t=!1,navigate:n}){return c.jsxs("a",{className:`brand-lockup ${t?"brand-lockup-compact":""}`,href:"/","aria-label":"Canonry home",onClick:sn(n,"/"),children:[c.jsx("img",{className:"brand-icon",src:"/favicon.svg",alt:"","aria-hidden":"true"}),c.jsxs("span",{className:"brand-copy",children:[c.jsx("span",{className:"brand-mark",children:"Canonry"}),t?null:c.jsx("span",{className:"brand-subtitle",children:"AEO Monitor"})]})]})}function cO({points:t,tone:n}){const a=w.useId();if(t.length===0)return null;const l=42,o=132,u=5,d=Math.min(...t),p=Math.max(...t)-d||1,g=o-u*2,b=l-u*2,v=t.map((x,N)=>{const C=u+N/Math.max(t.length-1,1)*g,j=u+(1-(x-d)/p)*b;return`${C},${j}`}).join(" ");return c.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${o} ${l}`,"aria-hidden":"true",children:[c.jsx("defs",{children:c.jsx("clipPath",{id:a,children:c.jsx("rect",{x:u,y:u,width:g,height:b,rx:"8"})})}),c.jsx("line",{className:"sparkline-guide",x1:u,x2:o-u,y1:l-u,y2:l-u}),c.jsx("polyline",{clipPath:`url(#${a})`,points:v,vectorEffect:"non-scaling-stroke"})]})}function Pb({text:t}){return c.jsxs("span",{className:"info-tooltip-wrapper",children:[c.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),c.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:t})]})}function Vd({value:t,label:n,delta:a,tone:l,description:o,tooltip:u,isNumeric:d=!0}){const g=2*Math.PI*48,b=Number.parseInt(t,10),v=d&&!Number.isNaN(b)?Math.min(b/100,1):.5,x=g*(1-v);return c.jsxs("div",{className:"score-gauge",children:[c.jsxs("div",{className:"gauge-ring-wrapper",children:[c.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[c.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),c.jsx("circle",{className:`gauge-fill gauge-fill-${l}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:g,strokeDashoffset:x,transform:"rotate(-90 60 60)"})]}),c.jsx("div",{className:"gauge-center",children:c.jsx("span",{className:d?"gauge-value":"gauge-value-text",children:t.split(" / ")[0]})})]}),c.jsxs("p",{className:"gauge-label",children:[n,u&&c.jsx(Pb,{text:u})]}),c.jsx("p",{className:"gauge-delta",children:a}),c.jsx("p",{className:"gauge-description",children:o})]})}function wt({tone:t,children:n}){const a=t==="positive"?"success":t==="caution"?"warning":t==="negative"?"destructive":"neutral";return c.jsx(Ab,{variant:a,children:n})}function oc({status:t}){return c.jsx(wt,{tone:Vb(t),children:rc(t)})}function Qb({state:t}){return c.jsx(wt,{tone:aO(t),children:rc(t)})}function Xb({run:t,onOpen:n}){return c.jsxs("article",{className:"run-row",children:[c.jsxs("div",{className:"run-row-main",children:[c.jsxs("div",{className:"run-row-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:t.summary}),c.jsxs("p",{className:"run-row-subtitle",children:[t.projectName," · ",t.kindLabel]})]}),c.jsx(oc,{status:t.status})]}),c.jsx("p",{className:"run-row-detail",children:t.statusDetail})]}),c.jsxs("dl",{className:"run-row-meta",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Started"}),c.jsx("dd",{children:t.startedAt})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Duration"}),c.jsx("dd",{children:t.duration})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Trigger"}),c.jsx("dd",{children:t.triggerLabel})]})]}),c.jsx(ue,{variant:"outline",size:"sm",type:"button",onClick:()=>n(t.id),children:"View run"})]})}function Xf({provider:t}){const n={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return c.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${n[t]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:t})}function uO({insights:t,onOpenEvidence:n}){const[a,l]=w.useState(null);return c.jsx("div",{className:"insight-list",children:t.map(o=>{const u=a===o.id,d=o.affectedPhrases.length>0;return c.jsxs("div",{children:[c.jsxs("div",{className:`insight-row insight-row-${o.tone} ${d?"cursor-pointer":""}`,onClick:d?()=>l(u?null:o.id):void 0,children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d&&c.jsx(Mf,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${u?"rotate-90":""}`}),c.jsx(wt,{tone:o.tone,children:o.actionLabel}),c.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),c.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),d&&c.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),u&&c.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>c.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx(Qb,{state:m.citationState}),c.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),c.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&c.jsx(Xf,{provider:m.provider})})]}),c.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:p=>{p.stopPropagation(),n(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},o.id)})})}function dO({history:t,maxDots:n=12}){const a=t.slice(-n);if(a.length===0)return c.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const l={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return c.jsx("div",{className:"flex items-center gap-[3px]",title:`${a.length} runs`,children:a.map((o,u)=>c.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${l[o.citationState]??"bg-zinc-700"} ${o.model&&u>0&&a[u-1]?.model&&a[u-1].model!==o.model?"ring-1 ring-amber-300/80 ring-offset-1 ring-offset-zinc-950":""}`,title:[o.citationState,new Date(o.createdAt).toLocaleDateString(),o.model?`model ${o.model}`:null,o.model&&u>0&&a[u-1]?.model&&a[u-1].model!==o.model?"model changed":null].filter(Boolean).join(" — ")},u))})}function fO(t){const n=new Map;for(const l of t)for(const o of l.runHistory){const u=n.get(o.createdAt);u?u.states.push(o.citationState):n.set(o.createdAt,{states:[o.citationState],runId:o.runId})}return[...n.entries()].sort(([l],[o])=>l.localeCompare(o)).map(([l,{states:o,runId:u}])=>({runId:u,createdAt:l,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function hO({phrase:t,items:n,onOpenEvidence:a,onDeleteKeyword:l}){const o=n.map(v=>v.citationState),u=o.includes("cited")?"cited":o.includes("emerging")?"emerging":o.includes("lost")?"lost":o.every(v=>v==="pending")?"pending":"not-cited",d=fO(n),m=n.filter(v=>v.citationState==="cited"||v.citationState==="emerging").length,p=(()=>{if(d.length<4)return"flat";const v=d.slice(-3),x=d.slice(-6,-3);if(x.length===0)return"flat";const N=v.filter(j=>j.citationState==="cited"||j.citationState==="emerging").length,C=x.filter(j=>j.citationState==="cited"||j.citationState==="emerging").length;return N>C?"up":N<C?"down":"flat"})(),g=(()=>{if(d.length===0)return"Awaiting first run";if(d.length===1)return"First observation";const v=d[d.length-1].citationState,x=d[d.length-2].citationState,N=v==="cited"||v==="emerging",C=x==="cited"||x==="emerging";if(!C&&N)return"Newly cited";if(C&&!N)return"Lost citation";let j=0;for(let k=d.length-1;k>=0;k--){const A=d[k].citationState;if((A==="cited"||A==="emerging")===N)j++;else break}return N?j<=1?"Cited in latest run":`Cited ${j} runs in a row`:j<=1?"Missed in latest run":`Missed for ${j} runs`})(),b=p==="up"?"↑":p==="down"?"↓":"→";return c.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${u}`,children:[c.jsxs("div",{className:"evidence-card-header",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"evidence-card-keyword",children:t}),c.jsxs("div",{className:"evidence-card-status-row",children:[c.jsx(Qb,{state:u}),c.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${p}`,children:[c.jsx("span",{"aria-hidden":"true",children:b}),c.jsx("span",{children:g})]})]})]}),l&&c.jsx("button",{type:"button",className:"ml-2 shrink-0 text-zinc-600 hover:text-rose-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-rose-500",onClick:l,title:`Remove "${t}"`,"aria-label":`Remove key phrase "${t}"`,children:"×"})]}),c.jsxs("div",{className:"evidence-card-timeline-row",children:[c.jsx(dO,{history:d,maxDots:14}),c.jsxs("span",{className:"evidence-card-ratio",children:[m,"/",n.length," provider",n.length!==1?"s":""]})]}),c.jsxs("div",{className:"evidence-card-providers",children:[n.filter(v=>v.citationState!=="pending").map(v=>c.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${v.citationState}`,onClick:()=>a(v.id),title:`View ${v.provider} evidence for "${t}"`,children:[c.jsx("span",{className:"capitalize",children:v.provider}),c.jsx("span",{"aria-hidden":"true",className:"font-bold",children:v.citationState==="cited"||v.citationState==="emerging"?"✓":v.citationState==="lost"?"✗":"–"}),c.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},v.id)),n.every(v=>v.citationState==="pending")&&c.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function mO({evidence:t,onOpenEvidence:n,onDeleteKeyword:a}){const l=w.useMemo(()=>{const o=new Map;for(const u of t){const d=o.get(u.keyword)??[];o.set(u.keyword,[...d,u])}return[...o.entries()].map(([u,d])=>({phrase:u,items:d}))},[t]);return l.length===0?c.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):c.jsx("div",{className:"evidence-card-grid",children:l.map(({phrase:o,items:u})=>c.jsx(hO,{phrase:o,items:u,onOpenEvidence:n,onDeleteKeyword:a?()=>a(o):void 0},o))})}function pO(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function gO({competitors:t}){return t.length===0?c.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):c.jsx("div",{className:"competitor-table-wrap",children:c.jsxs("table",{className:"competitor-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Pressure"}),c.jsx("th",{children:"Citations"}),c.jsx("th",{children:"Key Phrases"})]})}),c.jsx("tbody",{children:t.map(n=>c.jsxs("tr",{children:[c.jsx("td",{className:"font-medium text-zinc-100",children:n.domain}),c.jsx("td",{children:c.jsx(wt,{tone:pO(n.pressureLabel),children:n.pressureLabel})}),c.jsx("td",{className:"text-zinc-300 tabular-nums",children:n.totalKeywords>0?`${n.citationCount} / ${n.totalKeywords}`:"—"}),c.jsx("td",{className:"text-zinc-500 text-xs",children:n.citedKeywords.length>0?n.citedKeywords.join(", "):"Not cited"})]},n.id))})]})})}function yO({project:t,onNavigate:n}){const a=`/projects/${t.project.id}`;return c.jsxs("a",{className:"project-row cursor-pointer",href:a,onClick:sn(n,a),children:[c.jsxs("div",{className:"project-row-primary",children:[c.jsxs("div",{children:[c.jsx("p",{className:"project-name",children:t.project.name}),c.jsx("p",{className:"project-domain",children:t.project.canonicalDomain})]}),c.jsx("p",{className:"project-insight",children:t.insight})]}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),c.jsx("p",{className:"metric-inline-value",children:t.visibilityScore}),c.jsx("p",{className:"metric-inline-delta",children:t.visibilityDelta})]})}),c.jsx("div",{className:"project-row-stat",children:c.jsxs("div",{className:"metric-inline-block",children:[c.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),c.jsx("p",{className:"metric-inline-value",children:t.competitorPressureLabel}),c.jsxs("p",{className:"metric-inline-delta",children:[t.lastRun.kindLabel," · ",rc(t.lastRun.status)]})]})}),c.jsx("div",{className:"project-row-chart",children:c.jsx(cO,{points:t.trend,tone:Vb(t.lastRun.status)})}),c.jsx("span",{className:"project-row-link",children:c.jsx(Mf,{className:"h-4 w-4 text-zinc-500"})})]})}function vO({model:t,systemHealth:n,onNavigate:a,onOpenRun:l}){return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Portfolio"}),c.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),c.jsx("div",{className:"page-header-right",children:c.jsx("p",{className:"text-[11px] text-zinc-600",children:t.lastUpdatedAt})})]}),t.projects.length>0?c.jsx("div",{className:"project-list project-list-scrollable",children:t.projects.map(o=>c.jsx(yO,{project:o,onNavigate:a},o.project.id))}):c.jsxs(He,{className:"surface-card empty-card",children:[c.jsx("h3",{children:t.emptyState?.title??"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:t.emptyState?.detail}),c.jsx(ue,{size:"sm",asChild:!0,children:c.jsx("a",{href:t.emptyState?.ctaHref??"/setup",onClick:sn(a,t.emptyState?.ctaHref??"/setup"),children:t.emptyState?.ctaLabel??"Launch setup"})})]}),c.jsxs("div",{className:"overview-secondary-grid",children:[t.attentionItems.length>0&&c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),c.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),c.jsx("div",{className:"attention-list attention-list-scrollable",children:t.attentionItems.map(o=>c.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:sn(a,o.href),children:[c.jsxs("div",{children:[c.jsx("p",{className:"attention-title",children:o.title}),c.jsx("p",{className:"attention-detail",children:o.detail})]}),c.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),c.jsxs("section",{className:"overview-secondary-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),c.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),c.jsx("div",{className:"compact-stack compact-stack-scrollable",children:t.recentRuns.length>0?t.recentRuns.map(o=>c.jsxs("button",{className:"compact-run",type:"button",onClick:()=>l(o.id),children:[c.jsxs("div",{children:[c.jsx("p",{className:"compact-run-title",children:o.projectName}),c.jsx("p",{className:"compact-run-detail",children:o.summary})]}),c.jsx(oc,{status:o.status})]},o.id)):c.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),c.jsxs("section",{className:"page-section",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),c.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),c.jsx("div",{className:"health-grid",children:n.map(o=>c.jsxs(He,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),c.jsx("h3",{children:o.detail})]}),c.jsx(wt,{tone:o.tone,children:o.label})]}),c.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function bO({projects:t,onNavigate:n,onProjectCreated:a}){const[l,o]=w.useState(!1),[u,d]=w.useState(""),[m,p]=w.useState(""),[g,b]=w.useState(""),[v,x]=w.useState("US"),[N,C]=w.useState("en"),[j,k]=w.useState(!1),[A,T]=w.useState(null),O=u.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),D=async()=>{if(!(!O||!g)){k(!0),T(null);try{const L=await lc(O,{displayName:m||u,canonicalDomain:g,country:v,language:N});a(),d(""),p(""),b(""),x("US"),C("en"),o(!1),n(`/projects/${L.id}`)}catch(L){T(L instanceof Error?L.message:"Failed to create project")}finally{k(!1)}}};return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Projects"}),c.jsxs("p",{className:"page-subtitle",children:[t.length," project",t.length!==1?"s":""," tracked"]})]}),c.jsx("div",{className:"page-header-right",children:c.jsxs(ue,{type:"button",onClick:()=>o(L=>!L),children:[c.jsx(Cy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),l?c.jsxs(He,{className:"surface-card mb-6",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),c.jsxs("div",{className:"compact-stack mt-4",children:[c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),c.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:u,onChange:L=>d(L.target.value)}),O&&O!==u?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",O]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),c.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:L=>p(L.target.value)})]})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),c.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:g,onChange:L=>b(L.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),c.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:v,onChange:L=>x(L.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),c.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:N,onChange:L=>C(L.target.value.toLowerCase())})]})]})]}),A?c.jsx("p",{className:"text-rose-400 text-sm mt-3",children:A}):null,c.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[c.jsx(ue,{type:"button",disabled:!O||!g||j,onClick:D,children:j?"Creating...":"Create project"}),c.jsx(ue,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,t.length>0?c.jsx("div",{className:"data-table-wrapper",children:c.jsxs("table",{className:"data-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"Name"}),c.jsx("th",{children:"Domain"}),c.jsx("th",{children:"Visibility"}),c.jsx("th",{children:"Last run"}),c.jsx("th",{className:"text-right",children:"Country"})]})}),c.jsx("tbody",{children:t.map(L=>{const H=`/projects/${L.project.id}`,V=L.recentRuns[0];return c.jsxs("tr",{className:"cursor-pointer",onClick:()=>n(H),children:[c.jsxs("td",{children:[c.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:H,onClick:sn(n,H),children:L.project.displayName||L.project.name}),c.jsx("p",{className:"text-[11px] text-zinc-500",children:L.project.name})]}),c.jsx("td",{className:"text-zinc-400",children:L.project.canonicalDomain}),c.jsx("td",{children:c.jsx(wt,{tone:L.visibilitySummary.tone,children:L.visibilitySummary.value})}),c.jsx("td",{className:"text-zinc-500 text-sm",children:V?c.jsx(oc,{status:V.status}):c.jsx("span",{className:"text-zinc-600",children:"No runs"})}),c.jsx("td",{className:"text-right text-zinc-500",children:L.project.country})]},L.project.id)})})]})}):l?null:c.jsxs(He,{className:"surface-card empty-card",children:[c.jsx("h3",{children:"No projects yet"}),c.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),c.jsxs(ue,{type:"button",onClick:()=>o(!0),children:[c.jsx(Cy,{className:"size-4 mr-1.5"}),"Add project"]})]}),c.jsx(xO,{onApplied:a})]})}function xO({onApplied:t}){const[n,a]=w.useState(""),[l,o]=w.useState(!1),[u,d]=w.useState([]),[m,p]=w.useState([]),g=async()=>{if(!n.trim())return;o(!0),d([]),p([]);const b=Dj(n),v=[],x=[];for(let N=0;N<b.length;N++){const C=b[N];if(C.errors.length>0){v.push(`Document ${N+1}: ${C.errors[0]?.message}`);continue}const j=C.toJSON();if(!(!j||typeof j!="object"))try{const k=await SA(j);x.push(`Applied "${k.displayName||k.name}" (revision ${k.configRevision})`)}catch(k){v.push(`Document ${N+1}: ${k instanceof Error?k.message:String(k)}`)}}d(x),p(v),o(!1),x.length>0&&t()};return c.jsxs("section",{className:"mt-8",children:[c.jsx("div",{className:"page-section-divider"}),c.jsx("div",{className:"section-head mt-6",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),c.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),c.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",c.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",c.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),c.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
225
|
+
kind: Project
|
|
226
|
+
metadata:
|
|
227
|
+
name: my-project
|
|
228
|
+
spec:
|
|
229
|
+
canonicalDomain: example.com
|
|
230
|
+
country: US
|
|
231
|
+
language: en
|
|
232
|
+
keywords: []`,value:n,onChange:b=>a(b.target.value)}),u.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:u.map((b,v)=>c.jsx("li",{className:"text-emerald-400 text-sm",children:b},v))}),m.length>0&&c.jsx("ul",{className:"mt-2 space-y-1",children:m.map((b,v)=>c.jsx("li",{className:"text-rose-400 text-sm",children:b},v))}),c.jsx("div",{className:"mt-3",children:c.jsx(ue,{type:"button",disabled:!n.trim()||l,onClick:g,children:l?"Applying...":"Apply"})})]})}function SO({model:t,tab:n,onOpenEvidence:a,onOpenRun:l,onTriggerRun:o,onDeleteProject:u,onAddKeywords:d,onDeleteKeywords:m,onAddCompetitors:p,onUpdateOwnedDomains:g,onUpdateProject:b,onNavigate:v}){const[x,N]=w.useState(!1),[C,j]=w.useState(!1),[k,A]=w.useState(!1),[T,O]=w.useState(null),[D,L]=w.useState(!1),[H,V]=w.useState(""),[R,Q]=w.useState(!1),[be,X]=w.useState(null),[ce,Oe]=w.useState(!1),[Ke,Me]=w.useState(""),[I,K]=w.useState(!1),[ae,de]=w.useState(!1),[ee,z]=w.useState(""),[q,te]=w.useState(!1);async function ne(){const le=await dA(t.project.name),st=typeof le=="string"?le:JSON.stringify(le,null,2),ct=new Blob([st],{type:"text/yaml"}),rn=URL.createObjectURL(ct),_t=document.createElement("a");_t.href=rn,_t.download=`${t.project.name}.yaml`,_t.click(),URL.revokeObjectURL(rn)}async function oe(le){X(le);try{await m(t.project.name,[le])}finally{X(null)}}async function fe(){const le=H.split(`
|
|
233
|
+
`).map(st=>st.trim()).filter(Boolean);if(le.length!==0){Q(!0);try{await d(t.project.name,le),V(""),L(!1)}finally{Q(!1)}}}async function we(){const le=Ke.trim();if(le){K(!0);try{await p(t.project.name,[le]),Me(""),Oe(!1)}finally{K(!1)}}}async function Z(){const le=ee.trim();if(le){te(!0);try{const st=t.project.ownedDomains??[];await g(t.project.name,[...st,le]),z(""),de(!1)}finally{te(!1)}}}async function se(le){te(!0);try{const st=t.project.ownedDomains??[];await g(t.project.name,st.filter(ct=>ct!==le))}finally{te(!1)}}const Le=le=>!Number.isNaN(Number.parseInt(le,10)),Qe=[{key:"overview",label:"Overview",href:`/projects/${t.project.id}`},{key:"search-console",label:"Search Console",href:`/projects/${t.project.id}/search-console`}];return c.jsxs("div",{className:"page-container",children:[x?c.jsxs(He,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[c.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),c.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",c.jsx("strong",{className:"text-zinc-200",children:t.project.displayName||t.project.name})," and all its key phrases, competitors, runs, and snapshots. This cannot be undone."]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(ue,{type:"button",variant:"destructive",disabled:C,onClick:async()=>{j(!0),u(t.project.name)},children:C?"Deleting...":"Yes, delete project"}),c.jsx(ue,{type:"button",variant:"outline",disabled:C,onClick:()=>N(!1),children:"Cancel"})]})]}):null,c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:t.project.displayName||t.project.name}),c.jsxs("p",{className:"page-subtitle",children:[t.project.canonicalDomain,(t.project.ownedDomains??[]).length===0&&!ae&&c.jsx("button",{type:"button",className:"ml-2 text-[10px] uppercase tracking-wide text-zinc-600 hover:text-zinc-400 transition-colors",onClick:()=>de(!0),children:"+ add domain"})," "," · ",t.contextLabel]}),c.jsxs("div",{className:"tag-row",children:[c.jsx("span",{className:"tag",children:t.project.country}),c.jsx("span",{className:"tag",children:t.project.language.toUpperCase()}),t.project.tags.map(le=>c.jsx("span",{className:"tag",children:le},le))]}),((t.project.ownedDomains??[]).length>0||ae)&&c.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mr-1",children:"Also tracking"}),(t.project.ownedDomains??[]).map(le=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[le,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",disabled:q,onClick:()=>se(le),"aria-label":`Remove ${le}`,children:"×"})]},le)),ae?c.jsxs("span",{className:"inline-flex items-center gap-1",children:[c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-1.5 py-0.5 text-xs text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none w-40",type:"text",placeholder:"docs.example.com",value:ee,onChange:le=>z(le.target.value),onKeyDown:le=>le.key==="Enter"&&Z(),autoFocus:!0}),c.jsx(ue,{type:"button",size:"sm",disabled:!ee.trim()||q,onClick:Z,children:q?"...":"Add"}),c.jsx("button",{type:"button",className:"text-xs text-zinc-500 hover:text-zinc-300",onClick:()=>{de(!1),z("")},children:"Cancel"})]}):c.jsx("button",{type:"button",className:"rounded-full border border-dashed border-zinc-700 px-2 py-0.5 text-[10px] uppercase tracking-wide text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",onClick:()=>de(!0),children:"+ domain"})]})]}),c.jsxs("div",{className:"page-header-right",children:[c.jsx("p",{className:"text-sm text-zinc-500",children:t.dateRangeLabel}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:ne,"aria-label":"Export project as YAML",children:c.jsx(x1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",variant:"outline",size:"icon",onClick:()=>N(!0),"aria-label":"Delete project",children:c.jsx(M1,{className:"h-4 w-4 text-zinc-400"})}),c.jsx(ue,{type:"button",disabled:k,onClick:async()=>{A(!0),O(null);try{await o(t.project.name)}catch(le){O(le instanceof Error?le.message:"Failed to trigger run")}finally{A(!1)}},children:k?"Starting...":"Run now"})]})]})]}),T&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[T,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>O(null),children:"×"})]}),c.jsx("nav",{className:"project-subnav","aria-label":"Project sections",children:Qe.map(le=>c.jsx("a",{className:`project-subnav-link ${le.key===n?"project-subnav-link-active":""}`,href:le.href,"aria-current":le.key===n?"page":void 0,onClick:sn(v,le.href),children:le.label},le.key))}),n==="overview"?c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"gauge-row",children:[c.jsx(Vd,{value:t.visibilitySummary.value,label:t.visibilitySummary.label,delta:t.visibilitySummary.delta,tone:t.visibilitySummary.tone,description:t.visibilitySummary.description,tooltip:t.visibilitySummary.tooltip,isNumeric:Le(t.visibilitySummary.value)}),c.jsx(Vd,{value:t.competitorPressure.value,label:t.competitorPressure.label,delta:t.competitorPressure.delta,tone:t.competitorPressure.tone,description:t.competitorPressure.description,tooltip:t.competitorPressure.tooltip,isNumeric:Le(t.competitorPressure.value)}),c.jsx(Vd,{value:t.runStatus.value,label:t.runStatus.label,delta:t.runStatus.delta,tone:t.runStatus.tone,description:t.runStatus.description,tooltip:t.runStatus.tooltip,isNumeric:Le(t.runStatus.value)})]}),t.providerScores.length>1&&c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Model breakdown"}),c.jsxs("h2",{children:["Visibility by model ",c.jsx(Pb,{text:"Per-model citation rate. Shows how often each AI model cites your domain across all tracked key phrases. Switching models can significantly affect citation rates."})]})]})}),c.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:t.providerScores.map(le=>c.jsxs(He,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(Xf,{provider:le.provider}),c.jsxs("span",{className:`text-lg font-semibold ${le.score>=70?"text-emerald-400":le.score>=40?"text-amber-400":"text-rose-400"}`,children:[le.score,"%"]})]}),le.model&&c.jsx("p",{className:"mt-0.5 text-[11px] font-mono text-zinc-500 truncate",children:le.model}),c.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[le.cited," of ",le.total," key phrases cited"]})]},`${le.provider}::${le.model??"unknown"}`))})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),c.jsx("h2",{children:"Citation signals"})]})}),c.jsx(uO,{insights:t.insights,onOpenEvidence:a})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),c.jsx("h2",{children:"Key phrase citation tracking"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[new Set(t.visibilityEvidence.map(le=>le.keyword)).size," key phrases tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>L(!D),children:D?"Cancel":"+ Add key phrases"})]})]}),D&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.jsx("textarea",{className:"w-full resize-none rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",rows:3,placeholder:"Enter key phrases, one per line",value:H,onChange:le=>V(le.target.value)}),c.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[c.jsxs("p",{className:"text-xs text-zinc-500",children:[H.split(`
|
|
234
|
+
`).filter(le=>le.trim()).length," key phrases"]}),c.jsx(ue,{type:"button",size:"sm",disabled:!H.trim()||R,onClick:fe,children:R?"Adding...":"Add key phrases"})]})]}),c.jsx(mO,{evidence:t.visibilityEvidence,onOpenEvidence:a,onDeleteKeyword:be?void 0:oe})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),c.jsx("h2",{children:"Competitive landscape"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsxs("p",{className:"supporting-copy",children:[t.competitors.length," tracked"]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>Oe(!ce),children:ce?"Cancel":"+ Add competitor"})]})]}),ce&&c.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"competitor.com",value:Ke,onChange:le=>Me(le.target.value),onKeyDown:le=>le.key==="Enter"&&we()}),c.jsx(ue,{type:"button",size:"sm",disabled:!Ke.trim()||I,onClick:we,children:I?"Adding...":"Add"})]}),c.jsx(gO,{competitors:t.competitors})]}),c.jsxs("section",{className:"page-section-divider",children:[c.jsx("div",{className:"section-head section-head-inline",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),c.jsx("h2",{children:"Recent execution history"})]})}),c.jsx("div",{className:"run-list",children:t.recentRuns.map(le=>c.jsx(Xb,{run:le,onOpen:l},le.id))})]}),c.jsx(jO,{project:{...t.project,displayName:t.project.displayName??t.project.name},onUpdateProject:b}),c.jsx(CO,{projectName:t.project.name}),c.jsx(AO,{projectName:t.project.name})]}):c.jsx(wO,{projectName:t.project.name,onOpenSettings:()=>v("/settings")})]})}function jo(t){if(!t)return"—";try{return new Date(t).toLocaleString()}catch{return t}}function dv(t){return t===null?"Unknown":t?"Pass":"Fail"}function wO({projectName:t,onOpenSettings:n}){const[a,l]=w.useState(!1),[o,u]=w.useState([]),[d,m]=w.useState([]),[p,g]=w.useState([]),[b,v]=w.useState([]),[x,N]=w.useState([]),[C,j]=w.useState(null),[k,A]=w.useState(""),[T,O]=w.useState(""),[D,L]=w.useState("30"),[H,V]=w.useState(!1),[R,Q]=w.useState({startDate:"",endDate:"",query:"",page:"",limit:"20"}),[be,X]=w.useState(""),[ce,Oe]=w.useState(!0),[Ke,Me]=w.useState(!1),[I,K]=w.useState(!1),[ae,de]=w.useState(!1),[ee,z]=w.useState(!1),[q,te]=w.useState(!1),[ne,oe]=w.useState(!1),[fe,we]=w.useState(!1),[Z,se]=w.useState(null),[Le,Qe]=w.useState(!1),[le,st]=w.useState(!1),[ct,rn]=w.useState(""),[_t,ja]=w.useState("indexed"),[oi,Ie]=w.useState(null),[Ut,ut]=w.useState(null),yt=o.find(Y=>Y.connectionType==="gsc"),Ds=p.length>0||b.length>0||x.length>0;async function zt(Y){if(!Y){m([]),A("");return}de(!0);try{const{sites:Se}=await _A(t);m(Se),A(Y.propertyId??Se[0]?.siteUrl??"")}catch(Se){m([]),Ie(Se instanceof Error?Se.message:"Failed to load Search Console properties")}finally{de(!1)}}async function Ki(){te(!0);try{const Y=await EA(t,{startDate:R.startDate||void 0,endDate:R.endDate||void 0,query:R.query||void 0,page:R.page||void 0,limit:parseInt(R.limit,10)||20});g(Y)}catch(Y){g([]),Ie(Y instanceof Error?Y.message:"Failed to load GSC performance data")}finally{te(!1)}}async function Bn(){oe(!0);try{const[Y,Se]=await Promise.all([OA(t,{url:be.trim()||void 0,limit:20}),TA(t)]);v(Y),N(Se)}catch(Y){v([]),N([]),Ie(Y instanceof Error?Y.message:"Failed to load GSC inspection history")}finally{oe(!1)}}async function Yi(){Qe(!0);try{const Y=await DA(t);se(Y)}catch{se(null)}finally{Qe(!1)}}async function qt(){st(!0),Ie(null),ut(null);try{const Y=await RA(t,{sitemapUrl:ct.trim()||void 0});ut(`Sitemap inspection queued (run ${Y.id}). Refresh coverage after the run completes.`),rn("")}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to queue sitemap inspection")}finally{st(!1)}}async function Na(){Oe(!0),Ie(null);try{const[Y,Se]=await Promise.all([Zb().catch(()=>null),jA(t).catch(()=>[])]);l(!!Y?.google?.configured),u(Se);const Pi=Se.find(uc=>uc.connectionType==="gsc");await Promise.all([zt(Pi),Ki(),Bn(),Yi()])}finally{Oe(!1)}}w.useEffect(()=>{Na()},[t]);async function re(){if(!a){Ie("Google OAuth app credentials are not configured yet. Set them on the Settings page first.");return}Me(!0),Ie(null),ut(null);try{const{authUrl:Y}=await NA(t,"gsc"),Se=window.open(Y,"_blank","width=600,height=700");if(!Se){window.location.assign(Y);return}ut("Finish the Google consent flow in the popup, then close it to refresh this project.");const Pi=window.setInterval(()=>{Se.closed&&(window.clearInterval(Pi),ut(null),Na())},1e3)}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to start OAuth flow")}finally{Me(!1)}}async function jn(){Ie(null),ut(null);try{await kA(t,"gsc"),u(Y=>Y.filter(Se=>Se.connectionType!=="gsc")),m([]),A("")}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to disconnect")}}async function cc(){if(k){z(!0),Ie(null);try{await zA(t,"gsc",k),u(Y=>Y.map(Se=>Se.connectionType==="gsc"?{...Se,propertyId:k}:Se)),ut("GSC property updated.")}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to save GSC property")}finally{z(!1)}}}async function Vi(){K(!0),Ie(null),ut(null);try{await CA(t,{days:parseInt(D,10)||void 0,full:H||void 0}),ut("GSC sync queued. Refresh after the run completes to see imported data.")}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to trigger sync")}finally{K(!1)}}async function Mt(){if(T.trim()){we(!0),Ie(null),ut(null);try{const Y=await AA(t,T.trim());j(Y),O(""),await Bn()}catch(Y){Ie(Y instanceof Error?Y.message:"Failed to inspect URL")}finally{we(!1)}}}return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Search Console"}),c.jsx("h2",{children:"Google Search Console"})]}),c.jsx("div",{className:"flex items-center gap-2",children:yt&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:q,onClick:()=>{Ki()},children:q?"Refreshing…":"Refresh data"})})]}),oi&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[oi,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>Ie(null),children:"×"})]}),Ut&&c.jsxs("div",{className:"mb-3 rounded-lg border border-emerald-800/40 bg-emerald-950/20 px-3 py-2 text-sm text-emerald-300",children:[Ut,c.jsx("button",{type:"button",className:"ml-2 text-emerald-400 hover:text-emerald-200",onClick:()=>ut(null),children:"×"})]}),ce?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading…"}):c.jsxs("div",{className:"space-y-3",children:[c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Connection"}),c.jsx("h3",{children:"Domain authorization"})]}),c.jsx(wt,{tone:yt?"positive":a?"caution":"negative",children:yt?"Connected":a?"Ready to connect":"App credentials missing"})]}),yt?c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500"}),c.jsx("span",{className:"text-sm text-zinc-200",children:"Authorized for this project domain"}),c.jsx("span",{className:"text-xs text-zinc-500",children:yt.domain}),c.jsx("button",{type:"button",className:"ml-auto text-xs text-zinc-500 hover:text-rose-400 transition-colors",onClick:jn,children:"Disconnect"})]}),c.jsxs("p",{className:"mt-2 text-xs text-zinc-500",children:["Canonry stores OAuth tokens per canonical domain. This project currently maps to ",c.jsx("code",{children:yt.domain}),"."]})]}),c.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Selected property"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:yt.propertyId??"No property selected yet"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last auth update"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:jo(yt.updatedAt)})]})]})]}):c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-5",children:[c.jsx("p",{className:"text-sm text-zinc-300",children:a?"Generate a Google OAuth link for this project and have the client sign in with a Google account that already has access to the correct Search Console property.":"Set Google OAuth client credentials first. Once configured, you can generate a consent link for this project domain."}),c.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[a?c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:Ke,onClick:re,children:Ke?"Opening…":"Connect Google Search Console"}):c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!n,onClick:n,children:"Open Settings"}),!a&&c.jsx("p",{className:"text-xs text-zinc-500",children:"The same Google OAuth app credentials are shared across all projects."})]})]})]}),yt&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"grid gap-3 xl:grid-cols-2",children:[c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Property"}),c.jsx("h3",{children:"Pick the Search Console property"})]})}),c.jsxs("div",{className:"mt-3 space-y-2",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-property-${t}`,children:"Property URL"}),c.jsx("select",{id:`gsc-property-${t}`,className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:k,disabled:ae||d.length===0,onChange:Y=>A(Y.target.value),children:d.length===0?c.jsx("option",{value:"",children:ae?"Loading properties…":"No properties available"}):d.map(Y=>c.jsxs("option",{value:Y.siteUrl,children:[Y.siteUrl," · ",Y.permissionLevel]},Y.siteUrl))}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:ae,onClick:()=>{zt(yt)},children:ae?"Refreshing…":"Refresh properties"}),c.jsx(ue,{type:"button",size:"sm",disabled:!k||ee,onClick:cc,children:ee?"Saving…":"Save property"})]}),c.jsx("p",{className:"text-xs text-zinc-500",children:"The selected property is used for future syncs and URL inspections for this project."})]})]}),c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Sync"}),c.jsx("h3",{children:"Import GSC performance data"})]})}),c.jsxs("div",{className:"mt-3 space-y-3",children:[c.jsxs("div",{className:"grid gap-3 sm:grid-cols-[160px_1fr]",children:[c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`gsc-sync-days-${t}`,children:"Days"}),c.jsx("input",{id:`gsc-sync-days-${t}`,type:"number",min:"1",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",value:D,onChange:Y=>L(Y.target.value)})]}),c.jsxs("label",{className:"flex items-center gap-2 rounded border border-zinc-800/60 bg-zinc-900/20 px-3 py-2 text-sm text-zinc-300",children:[c.jsx("input",{type:"checkbox",checked:H,onChange:Y=>V(Y.target.checked)}),"Replace existing imported rows for the requested range"]})]}),c.jsx(ue,{type:"button",size:"sm",disabled:I||!yt.propertyId,onClick:Vi,children:I?"Queueing…":"Queue sync"}),!yt.propertyId&&c.jsx("p",{className:"text-xs text-amber-400",children:"Select a Search Console property before queueing a sync."})]})]})]}),c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Inspection"}),c.jsx("h3",{children:"Inspect a URL"})]})}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://example.com/page",value:T,onChange:Y=>O(Y.target.value),onKeyDown:Y=>Y.key==="Enter"&&void Mt()}),c.jsx(ue,{type:"button",size:"sm",disabled:fe||!yt.propertyId||!T.trim(),onClick:Mt,children:fe?"Inspecting…":"Inspect URL"})]}),C&&c.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Indexing state"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:C.indexingState??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Verdict"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:C.verdict??"Unknown"})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Mobile friendly"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:dv(C.isMobileFriendly)})]}),c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/20 p-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500",children:"Last crawl"}),c.jsx("p",{className:"mt-1 text-sm text-zinc-200",children:jo(C.crawlTime)})]})]})]}),c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Coverage"}),c.jsx("h3",{children:"Index Coverage"})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:Le,onClick:()=>{Yi()},children:Le?"Loading…":"Refresh coverage"})})]}),Z&&Z.summary.total>0?c.jsxs(c.Fragment,{children:[c.jsxs("table",{className:"data-table mt-3 w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"Total URLs"}),c.jsx("th",{className:"text-left",children:"Indexed"}),c.jsx("th",{className:"text-left",children:"Not Indexed"}),c.jsx("th",{className:"text-left",children:"Coverage"})]})}),c.jsx("tbody",{children:c.jsxs("tr",{children:[c.jsx("td",{className:"tabular-nums text-zinc-200",children:Z.summary.total}),c.jsx("td",{className:"tabular-nums text-emerald-400",children:Z.summary.indexed}),c.jsx("td",{className:"tabular-nums text-amber-400",children:Z.summary.notIndexed}),c.jsxs("td",{className:`tabular-nums ${Z.summary.percentage>=80?"text-emerald-400":Z.summary.percentage>=50?"text-amber-400":"text-rose-400"}`,children:[Z.summary.percentage,"%"]})]})})]}),c.jsx("div",{className:"mt-3 flex gap-1",children:["indexed","notIndexed","deindexed"].map(Y=>{const Se=Y==="indexed"?Z.indexed.length:Y==="notIndexed"?Z.notIndexed.length:Z.deindexed.length,Pi=Y==="indexed"?"Indexed":Y==="notIndexed"?"Not Indexed":"Deindexed";return c.jsxs("button",{type:"button",className:`rounded-full px-3 py-1 text-xs font-medium transition-colors ${_t===Y?"bg-zinc-700 text-zinc-100":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"}`,onClick:()=>ja(Y),children:[Pi," (",Se,")"]},Y)})}),c.jsxs("div",{className:"mt-3 overflow-x-auto",children:[_t==="indexed"&&Z.indexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Verdict"}),c.jsx("th",{className:"text-left",children:"Last Crawl"}),c.jsx("th",{className:"text-left",children:"Mobile"})]})}),c.jsx("tbody",{children:Z.indexed.map(Y=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:Y.url}),c.jsx("td",{className:"text-zinc-400",children:Y.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:Y.crawlTime?Y.crawlTime.split("T")[0]:"—"}),c.jsx("td",{className:"text-zinc-400",children:Y.isMobileFriendly===!0?"Yes":Y.isMobileFriendly===!1?"No":"—"})]},Y.id))})]}),_t==="notIndexed"&&Z.notIndexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Indexing State"}),c.jsx("th",{className:"text-left",children:"Coverage"})]})}),c.jsx("tbody",{children:Z.notIndexed.map(Y=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:Y.url}),c.jsx("td",{className:"text-zinc-400",children:Y.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:Y.coverageState??"Unknown"})]},Y.id))})]}),_t==="deindexed"&&Z.deindexed.length>0&&c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Previous"}),c.jsx("th",{className:"text-left",children:"Current"}),c.jsx("th",{className:"text-left",children:"Detected"})]})}),c.jsx("tbody",{children:Z.deindexed.map((Y,Se)=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:Y.url}),c.jsx("td",{className:"text-zinc-400",children:Y.previousState}),c.jsx("td",{className:"text-zinc-400",children:Y.currentState}),c.jsx("td",{className:"text-zinc-400",children:Y.transitionDate.split("T")[0]})]},`${Y.url}-${Se}`))})]}),(_t==="indexed"&&Z.indexed.length===0||_t==="notIndexed"&&Z.notIndexed.length===0||_t==="deindexed"&&Z.deindexed.length===0)&&c.jsx("p",{className:"text-sm text-zinc-500",children:"No URLs in this category."})]})]}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:Le?"Loading coverage data…":"No coverage data yet. Inspect your sitemap to populate this view."}),c.jsxs("div",{className:"mt-4 border-t border-zinc-800/60 pt-3",children:[c.jsx("p",{className:"text-xs uppercase tracking-wide text-zinc-500 mb-2",children:"Inspect from sitemap"}),c.jsxs("div",{className:"flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://example.com/sitemap.xml (leave empty for default)",value:ct,onChange:Y=>rn(Y.target.value)}),c.jsx(ue,{type:"button",size:"sm",disabled:le||!yt.propertyId,onClick:qt,children:le?"Queueing…":"Inspect Sitemap"})]}),!yt.propertyId&&c.jsx("p",{className:"mt-1 text-xs text-amber-400",children:"Select a Search Console property first."})]})]})]}),(yt||Ds)&&c.jsxs(c.Fragment,{children:[c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Performance"}),c.jsx("h3",{children:"Imported search queries"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:q,onClick:()=>{Ki()},children:q?"Loading…":"Apply filters"})]}),c.jsxs("div",{className:"mt-3 grid gap-2 lg:grid-cols-5",children:[c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"date",value:R.startDate,onChange:Y=>Q(Se=>({...Se,startDate:Y.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"date",value:R.endDate,onChange:Y=>Q(Se=>({...Se,endDate:Y.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter query",value:R.query,onChange:Y=>Q(Se=>({...Se,query:Y.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter page",value:R.page,onChange:Y=>Q(Se=>({...Se,page:Y.target.value}))}),c.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"number",min:"1",placeholder:"Limit",value:R.limit,onChange:Y=>Q(Se=>({...Se,limit:Y.target.value}))})]}),p.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"Date"}),c.jsx("th",{className:"text-left",children:"Query"}),c.jsx("th",{className:"text-left",children:"Page"}),c.jsx("th",{className:"text-right",children:"Clicks"}),c.jsx("th",{className:"text-right",children:"Impressions"}),c.jsx("th",{className:"text-right",children:"CTR"}),c.jsx("th",{className:"text-right",children:"Position"})]})}),c.jsx("tbody",{children:p.map((Y,Se)=>c.jsxs("tr",{children:[c.jsx("td",{className:"text-zinc-400",children:Y.date}),c.jsx("td",{className:"max-w-xs truncate text-zinc-200",children:Y.query}),c.jsx("td",{className:"max-w-xs truncate text-zinc-400",children:Y.page}),c.jsx("td",{className:"text-right tabular-nums text-zinc-300",children:Y.clicks.toLocaleString()}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:Y.impressions.toLocaleString()}),c.jsxs("td",{className:"text-right tabular-nums text-zinc-400",children:[(Y.ctr*100).toFixed(1),"%"]}),c.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:Y.position.toFixed(1)})]},`${Y.date}:${Y.query}:${Y.page}:${Se}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No performance rows match the current filters yet."})]}),c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"History"}),c.jsx("h3",{children:"Inspection log"})]}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:ne,onClick:()=>{Bn()},children:ne?"Loading…":"Refresh history"})]}),c.jsxs("div",{className:"mt-3 flex flex-col gap-2 lg:flex-row",children:[c.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"Filter exact URL",value:be,onChange:Y=>X(Y.target.value)}),c.jsx(ue,{type:"button",size:"sm",variant:"outline",disabled:ne,onClick:()=>{Bn()},children:"Apply filter"})]}),b.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Indexing"}),c.jsx("th",{className:"text-left",children:"Verdict"}),c.jsx("th",{className:"text-left",children:"Coverage"}),c.jsx("th",{className:"text-left",children:"Mobile"}),c.jsx("th",{className:"text-left",children:"Inspected"})]})}),c.jsx("tbody",{children:b.map(Y=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:Y.url}),c.jsx("td",{className:"text-zinc-300",children:Y.indexingState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:Y.verdict??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:Y.coverageState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:dv(Y.isMobileFriendly)}),c.jsx("td",{className:"text-zinc-400",children:jo(Y.inspectedAt)})]},Y.id))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No inspection history yet."})]}),c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Deindexed"}),c.jsx("h3",{children:"Recent indexing losses"})]})}),x.length>0?c.jsx("div",{className:"mt-3 overflow-x-auto",children:c.jsxs("table",{className:"data-table w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{className:"text-left",children:"URL"}),c.jsx("th",{className:"text-left",children:"Previous"}),c.jsx("th",{className:"text-left",children:"Current"}),c.jsx("th",{className:"text-left",children:"Changed at"})]})}),c.jsx("tbody",{children:x.map(Y=>c.jsxs("tr",{children:[c.jsx("td",{className:"max-w-sm truncate text-zinc-200",children:Y.url}),c.jsx("td",{className:"text-zinc-400",children:Y.previousState??"Unknown"}),c.jsx("td",{className:"text-zinc-300",children:Y.currentState??"Unknown"}),c.jsx("td",{className:"text-zinc-400",children:jo(Y.transitionDate)})]},`${Y.url}:${Y.transitionDate}`))})]})}):c.jsx("p",{className:"mt-3 text-sm text-zinc-500",children:"No deindexed transitions recorded."})]})]})]})]})}function jO({project:t,onUpdateProject:n}){const[a,l]=w.useState(!1),[o,u]=w.useState(!1),[d,m]=w.useState(null),[p,g]=w.useState(t.displayName),[b,v]=w.useState(t.canonicalDomain),[x,N]=w.useState(t.country),[C,j]=w.useState(t.language),[k,A]=w.useState(t.ownedDomains??[]),[T,O]=w.useState("");w.useEffect(()=>{a||(g(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]))},[t,a]);function D(){l(!1),m(null),g(t.displayName),v(t.canonicalDomain),N(t.country),j(t.language),A(t.ownedDomains??[]),O("")}function L(){const X=T.trim();X&&(k.includes(X)||A([...k,X]),O(""))}function H(X){A(k.filter(ce=>ce!==X))}async function V(){if(!(!p.trim()||!b.trim()||!x.trim()||!C.trim())){u(!0),m(null);try{await n(t.name,{displayName:p.trim(),canonicalDomain:b.trim(),ownedDomains:k,country:x.trim(),language:C.trim()}),l(!1)}catch(X){m(X instanceof Error?X.message:"Failed to save")}finally{u(!1)}}}const R=p!==t.displayName||b!==t.canonicalDomain||x!==t.country||C!==t.language||JSON.stringify(k)!==JSON.stringify(t.ownedDomains??[]),Q="w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",be="block text-xs font-medium text-zinc-400 mb-1";return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Configuration"}),c.jsx("h2",{children:"Project settings"})]}),!a&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>l(!0),children:"Edit settings"})]}),d&&c.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[d,c.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>m(null),children:"×"})]}),a?c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:be,children:"Display name"}),c.jsx("input",{className:Q,type:"text",value:p,onChange:X=>g(X.target.value),placeholder:"My Project"})]}),c.jsxs("div",{children:[c.jsx("label",{className:be,children:"Canonical domain"}),c.jsx("input",{className:Q,type:"text",value:b,onChange:X=>v(X.target.value),placeholder:"example.com"})]}),c.jsxs("div",{children:[c.jsx("label",{className:be,children:"Country"}),c.jsx("input",{className:Q,type:"text",value:x,onChange:X=>N(X.target.value),placeholder:"US",maxLength:2})]}),c.jsxs("div",{children:[c.jsx("label",{className:be,children:"Language"}),c.jsx("input",{className:Q,type:"text",value:C,onChange:X=>j(X.target.value),placeholder:"en"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:be,children:"Owned domains"}),c.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:k.map(X=>c.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[X,c.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",onClick:()=>H(X),"aria-label":`Remove ${X}`,children:"×"})]},X))}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("input",{className:`${Q} flex-1`,type:"text",placeholder:"docs.example.com",value:T,onChange:X=>O(X.target.value),onKeyDown:X=>X.key==="Enter"&&(X.preventDefault(),L())}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:!T.trim(),onClick:L,children:"Add"})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-zinc-800/60",children:[c.jsx(ue,{type:"button",disabled:o||!R||!p.trim()||!b.trim(),onClick:V,children:o?"Saving...":"Save changes"}),c.jsx(ue,{type:"button",variant:"outline",disabled:o,onClick:D,children:"Cancel"})]})]}):c.jsx("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:c.jsx("table",{className:"w-full text-sm",children:c.jsxs("tbody",{children:[c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium w-40",children:"Display name"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.displayName||"—"})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Canonical domain"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.canonicalDomain})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Owned domains"}),c.jsx("td",{className:"px-4 py-2.5",children:(t.ownedDomains??[]).length>0?c.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.ownedDomains.map(X=>c.jsx("span",{className:"rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:X},X))}):c.jsx("span",{className:"text-zinc-500",children:"—"})})]}),c.jsxs("tr",{className:"border-b border-zinc-800/40",children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Country"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.country})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Language"}),c.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.language})]})]})})})]})}const NO=[{value:"daily",label:"Every day"},{value:"weekly@mon",label:"Every Monday"},{value:"weekly@wed",label:"Every Wednesday"},{value:"weekly@fri",label:"Every Friday"},{value:"twice-daily",label:"Twice a day (6am & 6pm)"},{value:"custom",label:"Custom cron expression"}],fv=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Vancouver","Europe/London","Europe/Paris","Europe/Berlin","Asia/Tokyo","Asia/Shanghai","Asia/Singapore","Australia/Sydney"];function uf(t){return t===0?"12:00 AM":t<12?`${t}:00 AM`:t===12?"12:00 PM":`${t-12}:00 PM`}function kO(t,n){return t==="twice-daily"?"twice-daily":t.startsWith("weekly@")?`${t}@${n}`:`daily@${n}`}function _O(t,n){if(!t)return{freq:"custom",hour:6,customCron:n};if(t==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const a=t.match(/^daily(?:@(\d+))?$/);if(a)return{freq:"daily",hour:a[1]?parseInt(a[1]):6,customCron:""};const l=t.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return l?{freq:l[1],hour:l[2]?parseInt(l[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function zO(t,n,a){const l=a==="UTC"?"UTC":a.split("/").pop()?.replace(/_/g," ")??a;if(!t)return`Custom: ${n} · ${l}`;if(t==="twice-daily")return`Twice a day (6am & 6pm) · ${l}`;const o=t.match(/^daily(?:@(\d+))?$/);if(o){const d=o[1]?parseInt(o[1]):6;return`Every day at ${uf(d)} · ${l}`}const u=t.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(u){const d={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=u[2]?parseInt(u[2]):6;return`Every ${d[u[1]]} at ${uf(m)} · ${l}`}return`${t} · ${l}`}function CO({projectName:t}){const[n,a]=w.useState("loading"),[l,o]=w.useState(!1),[u,d]=w.useState("daily"),[m,p]=w.useState(6),[g,b]=w.useState(""),[v,x]=w.useState("UTC"),[N,C]=w.useState(!1),[j,k]=w.useState(""),[A,T]=w.useState(!1),[O,D]=w.useState(!1),[L,H]=w.useState(null);w.useEffect(()=>{mA(t).then(a).catch(()=>a(null))},[t]);const V=()=>{if(n&&n!=="loading"){const X=_O(n.preset??null,n.cronExpr);d(X.freq),p(X.hour),b(X.customCron);const ce=fv.includes(n.timezone);x(ce?n.timezone:"Other"),C(!ce),k(ce?"":n.timezone)}else d("daily"),p(6),b(""),x("UTC"),C(!1),k("");H(null),o(!0)},R=async()=>{T(!0),H(null);try{const ce={timezone:N?j.trim()||"UTC":v};u==="custom"?ce.cron=g.trim():ce.preset=kO(u,m);const Oe=await sv(t,ce);a(Oe),o(!1)}catch(X){H(X instanceof Error?X.message:"Failed to save schedule")}finally{T(!1)}},Q=async()=>{if(!(!n||n==="loading")){T(!0),H(null);try{const X={timezone:n.timezone,enabled:!n.enabled};n.preset?X.preset=n.preset:X.cron=n.cronExpr,a(await sv(t,X))}catch(X){H(X instanceof Error?X.message:"Failed to update schedule")}finally{T(!1)}}},be=async()=>{D(!0),H(null);try{await pA(t),a(null),o(!1)}catch(X){H(X instanceof Error?X.message:"Failed to remove schedule")}finally{D(!1)}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Scheduled runs"})]}),n!=="loading"&&!l&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:V,children:n?"Edit schedule":"+ Set schedule"})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&!l&&n===null&&c.jsx(He,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),n!=="loading"&&!l&&n!==null&&c.jsxs(He,{className:"surface-card compact-card",children:[c.jsxs("div",{className:"flex items-start justify-between gap-4",children:[c.jsxs("div",{className:"space-y-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200",children:zO(n.preset??null,n.cronExpr,n.timezone)}),c.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",c.jsx("span",{className:"font-mono",children:n.cronExpr})]}),n.nextRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(n.nextRunAt).toLocaleString()]}),n.lastRunAt&&c.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(n.lastRunAt).toLocaleString()]})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[c.jsx(wt,{tone:n.enabled?"positive":"neutral",children:n.enabled?"Active":"Paused"}),c.jsx(ue,{type:"button",variant:"outline",size:"sm",disabled:A,onClick:Q,children:n.enabled?"Pause":"Resume"}),c.jsx(ue,{type:"button",variant:"ghost",size:"sm",disabled:O,onClick:be,children:O?"Removing...":"Remove"})]})]}),L&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:L})]}),l&&c.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:u,onChange:X=>d(X.target.value),children:NO.map(X=>c.jsx("option",{value:X.value,children:X.label},X.value))})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),c.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none disabled:opacity-40",value:m,disabled:u==="twice-daily"||u==="custom",onChange:X=>p(parseInt(X.target.value)),children:Array.from({length:24},(X,ce)=>c.jsx("option",{value:ce,children:uf(ce)},ce))})]})]}),u==="custom"&&c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 font-mono focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"0 9 * * 1-5",value:g,onChange:X=>b(X.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),c.jsxs("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:N?"Other":v,onChange:X=>{X.target.value==="Other"?(C(!0),x("Other")):(C(!1),x(X.target.value))},children:[fv.map(X=>c.jsx("option",{value:X,children:X},X)),c.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),N&&c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"e.g. America/New_York",value:j,onChange:X=>k(X.target.value)})]}),L&&c.jsx("p",{className:"text-rose-400 text-sm",children:L}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),H(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:A||u==="custom"&&!g.trim(),onClick:R,children:A?"Saving...":"Save schedule"})]})]})]})}const EO=[{value:"citation.lost",label:"Citation lost"},{value:"citation.gained",label:"Citation gained"},{value:"run.completed",label:"Run completed"},{value:"run.failed",label:"Run failed"}];function AO({projectName:t}){const[n,a]=w.useState("loading"),[l,o]=w.useState(!1),[u,d]=w.useState(""),[m,p]=w.useState(["citation.lost","citation.gained"]),[g,b]=w.useState(!1),[v,x]=w.useState(null),[N,C]=w.useState({});w.useEffect(()=>{gA(t).then(a).catch(()=>a([]))},[t]);const j=O=>{p(D=>D.includes(O)?D.filter(L=>L!==O):[...D,O])},k=async()=>{if(!(!u.trim()||m.length===0)){b(!0),x(null);try{const O=await yA(t,{channel:"webhook",url:u.trim(),events:m});a(D=>D==="loading"?[O]:[...D,O]),d(""),p(["citation.lost","citation.gained"]),o(!1)}catch(O){x(O instanceof Error?O.message:"Failed to add webhook")}finally{b(!1)}}},A=async O=>{try{await vA(t,O),a(D=>D==="loading"?D:D.filter(L=>L.id!==O))}catch(D){x(D instanceof Error?D.message:"Failed to remove webhook")}},T=async O=>{C(D=>({...D,[O]:{state:"testing"}}));try{const D=await bA(t,O);C(L=>({...L,[O]:{state:D.ok?"ok":"fail",status:D.status}}))}catch{C(D=>({...D,[O]:{state:"fail"}}))}};return c.jsxs("section",{className:"page-section-divider",children:[c.jsxs("div",{className:"section-head section-head-inline",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),c.jsx("h2",{children:"Notifications"})]}),n!=="loading"&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!l),x(null)},children:l?"Cancel":"+ Add webhook"})]}),l&&c.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),c.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://hooks.example.com/canonry",value:u,onChange:O=>d(O.target.value)})]}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),c.jsx("div",{className:"flex flex-wrap gap-3",children:EO.map(O=>c.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[c.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(O.value),onChange:()=>j(O.value)}),c.jsx("span",{className:"text-sm text-zinc-300",children:O.label})]},O.value))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm",children:v}),c.jsxs("div",{className:"flex gap-2 justify-end",children:[c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),x(null)},children:"Cancel"}),c.jsx(ue,{type:"button",size:"sm",disabled:g||!u.trim()||m.length===0,onClick:k,children:g?"Adding...":"Add webhook"})]})]}),n==="loading"&&c.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&n.length===0&&!l&&c.jsx(He,{className:"surface-card compact-card",children:c.jsx("p",{className:"supporting-copy",children:"No webhooks configured. Add one to get alerted when citations change or runs complete."})}),n!=="loading"&&n.length>0&&c.jsxs("div",{className:"evidence-table-wrap",children:[c.jsxs("table",{className:"evidence-table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"URL"}),c.jsx("th",{children:"Events"}),c.jsx("th",{children:"Status"}),c.jsx("th",{})]})}),c.jsx("tbody",{children:n.map(O=>c.jsxs("tr",{children:[c.jsx("td",{className:"evidence-keyword-cell",children:c.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:O.url})}),c.jsx("td",{children:c.jsx("div",{className:"flex flex-wrap gap-1",children:O.events.map(D=>c.jsx("span",{className:"inline-flex items-center rounded-full border border-zinc-700 bg-zinc-800/60 px-2 py-0.5 text-[10px] font-medium text-zinc-400 uppercase tracking-wide",children:D.replace("."," ")},D))})}),c.jsx("td",{children:c.jsx(wt,{tone:O.enabled?"positive":"neutral",children:O.enabled?"Active":"Paused"})}),c.jsx("td",{children:c.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[N[O.id]&&(()=>{const D=N[O.id],L=D.state==="testing"?"Sending…":D.state==="ok"?`Delivered${D.status?` (${D.status})`:""}`:`Failed${D.status?` (${D.status})`:""}`;return c.jsx(wt,{tone:D.state==="ok"?"positive":D.state==="fail"?"negative":"neutral",children:L})})(),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",disabled:N[O.id]?.state==="testing",onClick:()=>T(O.id),children:"Test"}),c.jsx(ue,{variant:"ghost",size:"sm",type:"button",onClick:()=>A(O.id),children:"Remove"})]})})]},O.id))})]}),v&&c.jsx("p",{className:"text-rose-400 text-sm mt-2",children:v})]})]})}function OO({runs:t,onOpenRun:n,onTriggerAll:a}){const[l,o]=w.useState("all"),u=l==="all"?t:t.filter(d=>d.status===l);return c.jsxs("div",{className:"page-container",children:[c.jsxs("div",{className:"page-header",children:[c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Runs"}),c.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]}),a&&c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:a,children:"Run all projects"})]}),c.jsxs("section",{children:[c.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(d=>c.jsx("button",{className:`filter-chip ${l===d?"filter-chip-active":""}`,type:"button","aria-pressed":l===d,onClick:()=>o(d),children:d==="all"?"All runs":rc(d)},d))}),c.jsx("div",{className:"run-list",children:u.length>0?u.map(d=>c.jsx(Xb,{run:d,onOpen:n},d.id)):c.jsxs(He,{className:"surface-card empty-card",children:[c.jsx("h2",{children:"No runs match this filter"}),c.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const TO={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},Jb={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},DO={gemini:"e.g. gemini-3-flash",openai:"e.g. gpt-5.4",claude:"e.g. claude-sonnet-4-6",local:"e.g. llama3, mistral"};function RO({providerName:t,onSaved:n}){const a=t.toLowerCase()==="local",[l,o]=w.useState(""),[u,d]=w.useState(""),[m,p]=w.useState(""),[g,b]=w.useState(""),[v,x]=w.useState(""),[N,C]=w.useState(""),[j,k]=w.useState(!1),[A,T]=w.useState(null),[O,D]=w.useState(!1),L=a?u.trim().length>0:l.trim().length>0;async function H(){if(L){k(!0),T(null),D(!1);try{const Q={};g.trim()&&(Q.maxConcurrency=parseInt(g.trim(),10)),v.trim()&&(Q.maxRequestsPerMinute=parseInt(v.trim(),10)),N.trim()&&(Q.maxRequestsPerDay=parseInt(N.trim(),10)),await fA(t.toLowerCase(),{...l.trim()?{apiKey:l.trim()}:{},...u.trim()?{baseUrl:u.trim()}:{},...m.trim()?{model:m.trim()}:{},...Object.keys(Q).length>0?{quota:Q}:{}}),o(""),d(""),p(""),b(""),x(""),C(""),D(!0),n()}catch(Q){T(Q instanceof Error?Q.message:"Failed to update provider")}finally{k(!1)}}}const V=TO[t.toLowerCase()],R=DO[t.toLowerCase()]??"Use default model";return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[a&&c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${t}`,children:"Base URL"}),c.jsx("input",{id:`base-url-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:u,onChange:Q=>d(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${t}`,children:["API Key",a?" (optional)":""]}),V&&c.jsx("a",{href:V,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Get API key ↗"})]}),c.jsx("input",{id:`api-key-${t}`,type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:a?"Optional — most local servers don't need one":`Enter ${t} API key`,value:l,onChange:Q=>o(Q.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${t}`,children:"Model (optional)"}),c.jsx("input",{id:`model-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:R,value:m,onChange:Q=>p(Q.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",children:"Quota (optional)"}),c.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Concurrent",value:g,onChange:Q=>b(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Max concurrent"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/min",value:v,onChange:Q=>x(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per minute"})]}),c.jsxs("div",{children:[c.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/day",value:N,onChange:Q=>C(Q.target.value)}),c.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per day"})]})]})]}),A&&c.jsx("p",{className:"text-xs text-rose-400",children:A}),O&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!L||j,onClick:H,children:j?"Saving...":"Save"})]})}function MO({onSaved:t}){const[n,a]=w.useState(""),[l,o]=w.useState(""),[u,d]=w.useState(!1),[m,p]=w.useState(null),[g,b]=w.useState(!1),v=n.trim().length>0&&l.trim().length>0;async function x(){if(v){d(!0),p(null),b(!1);try{await hA({clientId:n.trim(),clientSecret:l.trim()}),a(""),o(""),b(!0),t()}catch(N){p(N instanceof Error?N.message:"Failed to update Google OAuth credentials")}finally{d(!1)}}}return c.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-id",children:"Client ID"}),c.jsx("a",{href:"https://console.cloud.google.com/apis/credentials",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Google Cloud ↗"})]}),c.jsx("input",{id:"google-client-id",type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Google OAuth client ID",value:n,onChange:N=>a(N.target.value)})]}),c.jsxs("div",{children:[c.jsx("label",{className:"text-xs text-zinc-500",htmlFor:"google-client-secret",children:"Client secret"}),c.jsx("input",{id:"google-client-secret",type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Google OAuth client secret",value:l,onChange:N=>o(N.target.value)})]}),c.jsxs("p",{className:"text-[11px] text-zinc-500",children:["These credentials are stored in ",c.jsx("code",{children:"~/.canonry/config.yaml"}),". Project-level Search Console connections are created separately per canonical domain."]}),m&&c.jsx("p",{className:"text-xs text-rose-400",children:m}),g&&c.jsx("p",{className:"text-xs text-emerald-400",children:"Google OAuth credentials updated."}),c.jsx(ue,{type:"button",size:"sm",disabled:!v||u,onClick:x,children:u?"Saving...":"Save Google OAuth app"})]})}function LO({settings:t,healthSnapshot:n,onSettingsChanged:a}){const[l,o]=w.useState(null),[u,d]=w.useState(!1);return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Settings"}),c.jsx("p",{className:"page-subtitle",children:"Provider state, Google OAuth setup, and service health."})]})}),c.jsxs("section",{className:"settings-grid",children:[t.providerStatuses.map(m=>c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),c.jsx("h2",{children:m.name})]}),c.jsx(wt,{tone:m.state==="ready"?"positive":"caution",children:m.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Model"}),c.jsx("dd",{className:"font-mono text-xs",children:m.model})]}),m.quota&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Concurrency"}),c.jsx("dd",{children:m.quota.maxConcurrency})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Rate limit"}),c.jsxs("dd",{children:[m.quota.maxRequestsPerMinute,"/min · ",m.quota.maxRequestsPerDay,"/day"]})]})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:m.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>o(l===m.name?null:m.name),children:l===m.name?"Cancel":m.state==="ready"?m.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),l===m.name&&c.jsx(RO,{providerName:m.name,onSaved:()=>{o(null),a?.()}})]},m.name)),c.jsxs(He,{className:"surface-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Google"}),c.jsx("h2",{children:"Search Console OAuth"})]}),c.jsx(wt,{tone:t.google.state==="ready"?"positive":"caution",children:t.google.state==="ready"?"Ready":"Needs config"})]}),c.jsxs("dl",{className:"definition-list mt-3",children:[c.jsxs("div",{children:[c.jsx("dt",{children:"Auth model"}),c.jsx("dd",{children:"One app credential set, then one OAuth connection per project domain"})]}),c.jsxs("div",{children:[c.jsx("dt",{children:"Storage"}),c.jsx("dd",{className:"font-mono text-xs",children:"~/.canonry/config.yaml"})]})]}),c.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:t.google.detail}),c.jsx("div",{className:"mt-2",children:c.jsx(ue,{type:"button",variant:"outline",size:"sm",onClick:()=>d(!u),children:u?"Cancel":t.google.state==="ready"?"Update OAuth app":"Configure Google OAuth"})}),u&&c.jsx(MO,{onSaved:()=>{d(!1),a?.()}})]}),c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),c.jsx("h2",{children:"API and worker"})]})}),c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"API"}),c.jsx("p",{className:"supporting-copy",children:n.apiStatus.detail})]}),c.jsx(wt,{tone:Zo(n.apiStatus),children:n.apiStatus.state==="ok"?"Healthy":"Attention"})]}),c.jsxs("div",{className:"health-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:"Worker"}),c.jsx("p",{className:"supporting-copy",children:n.workerStatus.detail})]}),c.jsx(wt,{tone:Zo(n.workerStatus),children:n.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),c.jsx("section",{className:"page-section",children:c.jsxs(He,{className:"surface-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),c.jsx("h2",{children:"Operational guidance"})]})}),c.jsx("ul",{className:"detail-list",children:t.selfHostNotes.map(m=>c.jsx("li",{children:m},m))}),c.jsx("p",{className:"supporting-copy",children:t.bootstrapNote})]})})]})}const UO=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Key phrases",description:"Add key phrases to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function $O({current:t,labels:n}){return c.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((a,l)=>{const o=l<t,u=l===t;return c.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${u?"setup-step-active":""}`,role:"listitem","aria-current":u?"step":void 0,children:[c.jsx("span",{className:"setup-step-number",children:o?"✓":l+1}),c.jsx("span",{className:"setup-step-label",children:a.label})]},a.label)})})}function BO({model:t,settings:n,onProjectCreated:a,onNavigate:l}){const[o,u]=w.useState(0),[d,m]=w.useState(""),[p,g]=w.useState(""),[b,v]=w.useState(""),[x,N]=w.useState("US"),[C,j]=w.useState("en"),[k,A]=w.useState(null),[T,O]=w.useState(null),[D,L]=w.useState(null),[H,V]=w.useState(!1),[R,Q]=w.useState(""),[be,X]=w.useState(!1),[ce,Oe]=w.useState(null),[Ke,Me]=w.useState(!1),I=n.providerStatuses.filter(re=>re.state==="ready"),[K,ae]=w.useState(I[0]?.name??""),[de,ee]=w.useState(5),[z,q]=w.useState(!1),[te,ne]=w.useState(null),[oe,fe]=w.useState(""),[we,Z]=w.useState(!1),[se,Le]=w.useState(null),[Qe,le]=w.useState(!1),[st,ct]=w.useState(!1),[rn,_t]=w.useState(null),[ja,oi]=w.useState(!1),Ie=d.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Ut=R.split(`
|
|
235
|
+
`).map(re=>re.trim()).filter(Boolean),ut=oe.split(`
|
|
236
|
+
`).map(re=>re.trim()).filter(Boolean),yt=t.healthChecks.some(re=>re.id==="api"&&re.state==="ready"),Ds=async()=>{if(!(!Ie||!b)){V(!0),L(null);try{const re=await lc(Ie,{displayName:p||d,canonicalDomain:b,country:x,language:C});A(Ie),O(re.id),a(),u(2)}catch(re){L(re instanceof Error?re.message:"Failed to create project")}finally{V(!1)}}},zt=async()=>{if(!k)return;const re=Ut;if(re.length!==0){Me(!0),Oe(null);try{await sA(k,re),X(!0),a(),u(3)}catch(jn){Oe(jn instanceof Error?jn.message:"Failed to save key phrases")}finally{Me(!1)}}},Ki=async()=>{if(!(!k||!K)){q(!0),ne(null);try{const re=await xA(k,K,de);if(re.keywords.length>0){const jn=R?R.trimEnd()+`
|
|
237
|
+
`+re.keywords.join(`
|
|
238
|
+
`):re.keywords.join(`
|
|
239
|
+
`);Q(jn)}}catch(re){ne(re instanceof Error?re.message:"Failed to generate key phrases")}finally{q(!1)}}},Bn=async()=>{if(!k)return;const re=ut;if(re.length!==0){le(!0),Le(null);try{await Bb(k,re),Z(!0),a(),u(4)}catch(jn){Le(jn instanceof Error?jn.message:"Failed to save competitors")}finally{le(!1)}}},Yi=async()=>{if(k){oi(!0),_t(null);try{await Ib(k),ct(!0),a()}catch(re){_t(re instanceof Error?re.message:"Failed to trigger run")}finally{oi(!1)}}},qt=()=>u(re=>Math.max(0,re-1)),Na=(()=>{switch(o){case 0:return c.jsxs(He,{className:"surface-card step-card",children:[c.jsx("div",{className:"section-head",children:c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),c.jsx("h2",{children:"System ready"})]})}),c.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),c.jsx("div",{className:"compact-stack",children:t.healthChecks.map(re=>c.jsxs("div",{className:"health-check-row",children:[c.jsxs("div",{children:[c.jsx("p",{className:"run-row-title",children:re.label}),c.jsx("p",{className:"supporting-copy",children:re.detail}),re.id==="provider"&&re.state!=="ready"&&c.jsx("button",{type:"button",className:"text-emerald-400 hover:text-emerald-300 text-sm mt-1 underline underline-offset-2 cursor-pointer bg-transparent border-none p-0",onClick:()=>l("/settings"),children:"Configure providers"})]}),c.jsx(wt,{tone:re.state==="ready"?"positive":"caution",children:re.state==="ready"?"Ready":"Attention"})]},re.id))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",disabled:!yt,onClick:()=>u(1),children:"Continue"})]})]});case 1:return c.jsxs(He,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),c.jsx("h2",{children:"Create project"})]}),k?c.jsx(wt,{tone:"positive",children:"Created"}):null]}),k?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"text-zinc-300",children:["Project ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k})," created successfully."]}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(2),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),c.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:d,onChange:re=>m(re.target.value)}),Ie&&Ie!==d?c.jsxs("p",{className:"supporting-copy",children:["Slug: ",Ie]}):null]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),c.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:p,onChange:re=>g(re.target.value)})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),c.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:b,onChange:re=>v(re.target.value)})]}),c.jsxs("div",{className:"setup-field-row",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),c.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:x,onChange:re=>N(re.target.value.toUpperCase())})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),c.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:C,onChange:re=>j(re.target.value.toLowerCase())})]})]}),D?c.jsx("p",{className:"text-rose-400 text-sm",children:D}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",disabled:!Ie||!b||H,onClick:Ds,children:H?"Creating...":"Create project"})]})]})]});case 2:return c.jsxs(He,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),c.jsx("h2",{children:"Add key phrases"})]}),be?c.jsxs(wt,{tone:"positive",children:[Ut.length," saved"]}):c.jsxs(wt,{tone:"neutral",children:[Ut.length," key phrase",Ut.length!==1?"s":""]})]}),c.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),be?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:Ut.map(re=>c.jsx("li",{children:re},re))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(3),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[I.length>0?c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"flex items-end gap-2",children:[c.jsxs("div",{className:"setup-field flex-1",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),c.jsx("select",{id:"gen-provider",className:"setup-input",value:K,onChange:re=>ae(re.target.value),children:I.map(re=>c.jsxs("option",{value:re.name,children:[Jb[re.name]??re.name,re.model?` (${re.model})`:""]},re.name))})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),c.jsx("select",{id:"gen-count",className:"setup-input",value:de,onChange:re=>ee(Number(re.target.value)),children:[3,5,10,15,20].map(re=>c.jsx("option",{value:re,children:re},re))})]}),c.jsx(ue,{type:"button",variant:"outline",disabled:z||!K,onClick:Ki,children:z?"Analyzing site...":"Generate"})]}),te?c.jsx("p",{className:"text-rose-400 text-sm",children:te}):null]}):null,c.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[c.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",c.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),c.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
240
|
+
best invisalign downtown brooklyn
|
|
241
|
+
pediatric dentist brooklyn heights`,value:R,onChange:re=>Q(re.target.value)})]}),ce?c.jsx("p",{className:"text-rose-400 text-sm",children:ce}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",disabled:Ut.length===0||Ke,onClick:zt,children:Ke?"Saving...":`Save ${Ut.length} key phrase${Ut.length!==1?"s":""}`})]})]})]});case 3:return c.jsxs(He,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),c.jsx("h2",{children:"Add competitors"})]}),we?c.jsx(wt,{tone:"positive",children:"Saved"}):null]}),c.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),we?c.jsxs("div",{className:"compact-stack",children:[c.jsx("ul",{className:"detail-list",children:ut.map(re=>c.jsx("li",{children:re},re))}),c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",onClick:()=>u(4),children:"Continue"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("div",{className:"setup-field",children:[c.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),c.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
242
|
+
competitor2.com`,value:oe,onChange:re=>fe(re.target.value)})]}),se?c.jsx("p",{className:"text-rose-400 text-sm",children:se}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:()=>u(4),children:"Skip"}),c.jsx(ue,{type:"button",disabled:ut.length===0||Qe,onClick:Bn,children:Qe?"Saving...":`Save ${ut.length} competitor${ut.length!==1?"s":""}`})]})]})]})]});case 4:return c.jsxs(He,{className:"surface-card step-card",children:[c.jsxs("div",{className:"section-head",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),c.jsx("h2",{children:"Launch first run"})]}),st?c.jsx(wt,{tone:"positive",children:"Queued"}):null]}),st?c.jsxs("div",{className:"compact-stack",children:[c.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),c.jsxs("div",{className:"setup-nav",children:[c.jsx("span",{}),c.jsx(ue,{type:"button",onClick:()=>l(T?`/projects/${T}`:"/"),children:"Open project"})]})]}):c.jsxs("div",{className:"compact-stack",children:[c.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",c.jsx("span",{className:"text-zinc-100 font-medium",children:k}),"."]}),rn?c.jsx("p",{className:"text-rose-400 text-sm",children:rn}):null,c.jsxs("div",{className:"setup-nav",children:[c.jsx(ue,{type:"button",variant:"outline",onClick:qt,children:"Back"}),c.jsx(ue,{type:"button",disabled:ja,onClick:Yi,children:ja?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Setup"}),c.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),c.jsx($O,{current:o,labels:UO}),c.jsx("section",{className:"setup-wizard",children:Na})]})}function IO({onNavigate:t}){return c.jsx("div",{className:"page-container",children:c.jsx("section",{className:"page-section",children:c.jsxs(He,{className:"surface-card empty-card",children:[c.jsx("h1",{children:"Route not found"}),c.jsx("p",{children:"The current path does not map to a dashboard view."}),c.jsx(ue,{asChild:!0,children:c.jsx("a",{href:"/",onClick:sn(t,"/"),children:"Return to overview"})})]})})})}function ZO({title:t,subtitle:n,children:a,open:l,onClose:o}){return c.jsx(BE,{open:l,onOpenChange:u=>u?void 0:o(),children:c.jsxs(Db,{children:[c.jsxs(GE,{className:"drawer-head",children:[c.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),c.jsx(Rb,{id:"drawer-title",children:t}),c.jsx(Mb,{className:"sr-only",children:n})]}),c.jsx("div",{className:"drawer-body",children:a})]})})}function hv(t,n){const a=n.filter(d=>d.trim().length>1),l=t.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(d=>d.startsWith("**")&&d.endsWith("**")?{type:"bold",value:d.slice(2,-2)}:{type:"text",value:d});if(a.length===0)return l.map((d,m)=>d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:d.value},`b-${m}`):d.value).filter(Boolean);const o=a.map(d=>d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),u=new RegExp(`(${o.join("|")})`,"gi");return l.flatMap((d,m)=>d.value.split(u).map((g,b)=>g?b%2===1?d.type==="bold"?c.jsx("mark",{className:"answer-highlight",children:c.jsx("strong",{className:"text-zinc-200 font-semibold",children:g})},`hl-${m}-${b}`):c.jsx("mark",{className:"answer-highlight",children:g},`hl-${m}-${b}`):d.type==="bold"?c.jsx("strong",{className:"text-zinc-200 font-semibold",children:g},`b-${m}-${b}`):g:null)).filter(Boolean)}function qO({evidence:t,project:n,onClose:a}){const[l,o]=w.useState(!1),[u,d]=w.useState(-1),[m,p]=w.useState(null),[g,b]=w.useState(!1),[v,x]=w.useState({}),N=CC(n.project),C=new Set(N.map(rf)),j=t.runHistory,k=j.length>1,A=u>=0&&m!==null,T=A?m:{citationState:t.citationState,provider:t.provider,model:t.model,answerSnippet:t.answerSnippet,citedDomains:t.citedDomains,competitorDomains:t.competitorDomains,groundingSources:t.groundingSources,evidenceUrls:t.evidenceUrls,changeLabel:t.changeLabel,summary:t.summary},O=T.citationState==="cited"||T.citationState==="emerging",L=T.citedDomains.findIndex(K=>C.has(K.toLowerCase().replace(/^www\./,"")))+1,H=T.citedDomains.length,V=n.project.displayName||n.project.name,R=[...N.map(rf),V,V.split(" ").slice(0,2).join(" ")].filter(K=>K.trim().length>2),Q=O?"cited":T.citationState==="lost"?"lost":T.citationState==="pending"?"pending":"not-cited",be=w.useRef(0),X=w.useCallback(async K=>{const ae=++be.current;if(K===-1||K===j.length-1){d(-1),p(null),o(!1);return}d(K),o(!1);const de=j[K],ee=`${de.runId}::${t.keyword}::${t.provider}`;if(v[ee]){p(v[ee]);return}b(!0);try{const z=await $l(de.runId);if(ae!==be.current)return;const q=z.snapshots.find(ne=>ne.keyword===t.keyword&&ne.provider===t.provider)??z.snapshots.find(ne=>ne.keyword===t.keyword),te=q?{citationState:q.citationState,provider:q.provider,model:q.model??null,answerSnippet:q.answerText??"",citedDomains:q.citedDomains,competitorDomains:q.competitorOverlap,groundingSources:q.groundingSources,evidenceUrls:[],changeLabel:de.citationState,summary:""}:{citationState:de.citationState,provider:t.provider,model:de.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:de.citationState,summary:"Snapshot data not available for this run."};x(ne=>({...ne,[ee]:te})),p(te)}catch{if(ae!==be.current)return;p({citationState:de.citationState,provider:t.provider,model:de.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:de.citationState,summary:"Failed to load historical run data."})}finally{ae===be.current&&b(!1)}},[j,t.keyword,t.provider,v]),Oe=(A||t.historyScope!=="provider")&&T.model?`${T.provider} (${T.model}) · ${T.changeLabel.toLowerCase()}`:`${T.provider} · ${T.changeLabel.toLowerCase()}`,Ke=!A&&t.historyScope==="provider"?[t.model?`Current model: ${t.model}`:null,t.modelsSeen&&t.modelsSeen.length>1?`History spans ${t.modelsSeen.length} models`:null].filter(Boolean).join(" · "):"",Me=O&&L>0?{label:"Citation confirmed",title:`Cited #${L} of ${H} domain${H!==1?"s":""}`,meta:Oe}:O?{label:"Citation confirmed",title:"Cited in this answer",meta:Oe}:T.citationState==="lost"?{label:"Citation lost",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:Oe}:T.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:H>0?`${H} domain${H!==1?"s":""} cited instead`:"No domains cited for this query",meta:Oe},I=()=>{if(!T.answerSnippet)return null;const K=T.answerSnippet.split(`
|
|
243
|
+
`),ae=[];let de=[],ee=0;const z=()=>{if(de.length===0)return;const q=de.join(" ").trim();q&&ae.push(c.jsx("p",{className:ae.length>0?"mt-2.5":"",children:hv(q,R)},ee++)),de=[]};for(const q of K){const te=q.trim();if(/^[-–—]{3,}$/.test(te)){z(),ae.push(c.jsx("hr",{className:"border-zinc-800/60 my-3"},ee++));continue}const ne=te.match(/^(#{1,3})\s+(.+)$/);if(ne){z();const oe=ne[1].length,fe=ne[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||ne[2],we=oe===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":oe===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";ae.push(c.jsx("p",{className:we,children:hv(fe,R)},ee++));continue}if(te===""){z();continue}de.push(te)}return z(),ae};return c.jsx(A0,{open:!0,onOpenChange:K=>{K||a()},children:c.jsxs(O0,{children:[c.jsx(Tf,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),c.jsxs(Df,{className:"evidence-modal","aria-describedby":void 0,children:[c.jsxs("div",{className:"evidence-modal-header",children:[c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," · ",T.provider||"All providers"]}),c.jsx(Rf,{className:"text-lg font-semibold text-zinc-50 truncate",children:t.keyword})]}),c.jsxs(D0,{className:"inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-800 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 shrink-0",children:[c.jsx(Lf,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Close"})]})]}),k&&c.jsxs("div",{className:"evidence-modal-timeline",children:[c.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),c.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:j.map((K,ae)=>{const de=u===-1&&ae===j.length-1||u===ae,ee=K.citationState==="cited"||K.citationState==="emerging"?"bg-emerald-400":K.citationState==="lost"?"bg-rose-400":"bg-zinc-600",q=new Date(K.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),te=!!(K.model&&ae>0&&j[ae-1]?.model&&j[ae-1].model!==K.model);return c.jsxs("button",{type:"button",className:`evidence-run-dot ${de?"evidence-run-dot--selected":""}`,onClick:()=>X(ae===j.length-1?-1:ae),"aria-label":[`Run ${q}: ${K.citationState}`,K.model?`model ${K.model}`:null,te?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":de,children:[c.jsx("span",{className:`size-2 rounded-full ${ee} ${te?"ring-1 ring-amber-300/80 ring-offset-2 ring-offset-zinc-950":""}`,"aria-hidden":"true"}),c.jsx("span",{className:"text-[10px] text-zinc-500",children:q})]},ae)})}),u>=0&&u<j.length&&c.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(j[u].createdAt).toLocaleString()," — ",c.jsx("span",{className:"capitalize",children:j[u].citationState}),c.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>X(-1),children:"← Back to latest"})]}),!A&&(t.modelTransitions?.length??0)>0&&c.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:t.modelTransitions.map(K=>c.jsx("span",{className:"inline-flex items-center rounded-full border border-amber-400/30 bg-amber-400/10 px-2 py-1 text-[10px] text-amber-100",children:`${K.fromModel??"unknown"} -> ${K.toModel??"unknown"} on ${new Date(K.createdAt).toLocaleDateString()}`},`${K.runId}:${K.toModel??"unknown"}`))})]}),c.jsxs("div",{className:"evidence-modal-body",children:[g&&c.jsx("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:"Loading historical run data…"}),!g&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"evidence-modal-main",children:[c.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${Q}`,children:[c.jsx("p",{className:`evidence-position-label evidence-position-label--${Q}`,children:Me.label}),c.jsx("p",{className:`evidence-position-title evidence-position-title--${Q}`,children:Me.title}),c.jsx("p",{className:"evidence-position-meta",children:Me.meta}),Ke&&c.jsx("p",{className:"mt-1 text-[11px] text-zinc-500",children:Ke})]}),T.answerSnippet&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),c.jsx("div",{className:`answer-snippet-block ${l?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:I()}),T.answerSnippet.length>280&&c.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!l),children:l?"↑ Collapse":"↓ Show full answer"})]}),!T.answerSnippet&&!g&&c.jsx("div",{className:"rounded-lg border border-zinc-800/40 bg-zinc-900/20 px-4 py-8 text-center text-zinc-600 text-sm",children:"No answer text recorded for this run"}),!A&&t.relatedTechnicalSignals.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:O?"Why you're cited":"What to fix"}),c.jsx("div",{className:"action-items-list",children:t.relatedTechnicalSignals.map((K,ae)=>c.jsxs("div",{className:"action-item",children:[c.jsx("svg",{className:`action-item-icon ${O?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:O?c.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):c.jsxs(c.Fragment,{children:[c.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),c.jsx("span",{className:"action-item-text",children:K})]},ae))})]}),T.summary&&c.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:T.summary})]}),c.jsxs("div",{className:"evidence-modal-sidebar",children:[T.citedDomains.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),c.jsxs("div",{className:"citation-leaderboard",children:[T.citedDomains.map((K,ae)=>{const de=K.toLowerCase().replace(/^www\./,""),ee=C.has(de),z=!ee&&T.competitorDomains.some(te=>te.toLowerCase().replace(/^www\./,"")===de),q=ee?"you":z?"competitor":"other";return c.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${q}`,children:[c.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ae+1]}),c.jsx("span",{className:"citation-leaderboard-domain",children:K}),ee&&c.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),z&&c.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},K)}),!O&&c.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[c.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),c.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:n.project.canonicalDomain}),c.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),T.groundingSources.length>0&&c.jsxs("div",{children:[c.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",T.groundingSources.length,")"]}),c.jsx("ul",{className:"grid gap-0.5",children:T.groundingSources.map((K,ae)=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K.title||K.uri})},ae))})]}),T.evidenceUrls.length>0&&c.jsxs("div",{children:[c.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),c.jsx("ul",{className:"grid gap-1",children:T.evidenceUrls.map(K=>c.jsx("li",{className:"truncate text-sm",children:c.jsx("a",{href:K,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:K})},K))})]}),T.citedDomains.length===0&&T.groundingSources.length===0&&T.evidenceUrls.length===0&&c.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",A?"for this run":"yet"]})]})]})]})]})]})})}async function HO(){try{const[t,n,a]=await Promise.all([tA(),nA(),Zb().catch(()=>null)]),l=await Promise.all(t.map(async o=>{const u=n.filter(x=>x.projectId===o.id),d=u.filter(x=>(x.status==="completed"||x.status==="partial")&&x.kind==="answer-visibility").sort((x,N)=>N.createdAt.localeCompare(x.createdAt)),[m,p,g,b,v]=await Promise.all([iA(o.name).catch(()=>[]),$b(o.name).catch(()=>[]),aA(o.name).catch(()=>[]),d[0]?$l(d[0].id).catch(()=>null):Promise.resolve(null),d[1]?$l(d[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:u,keywords:m,competitors:p,timeline:g,latestRunDetail:b,previousRunDetail:v}}));return JA(l,a)}catch{return null}}function GO({initialPathname:t,initialDashboard:n,initialHealthSnapshot:a,enableLiveStatus:l=!0}){const[o,u]=w.useState(n??null),[d,m]=w.useState(!n),[p,g]=w.useState(n?!0:null),[b,v]=w.useState(()=>iO(t)),[x,N]=w.useState(!1),[C,j]=w.useState(null),[k,A]=w.useState(null),[T,O]=w.useState(!1),[D,L]=w.useState(a??eO),H=w.useCallback(async()=>{const Z=await HO();Z?(u(Z),g(!0)):g(!1),m(!1)},[]);w.useEffect(()=>{n||H()},[n,H]);const V=o?.runs.some(Z=>Z.status==="running"||Z.status==="queued")??!1;if(w.useEffect(()=>{if(!V)return;const Z=setInterval(()=>{H()},3e3);return()=>clearInterval(Z)},[V,H]),w.useEffect(()=>{if(typeof window>"u")return;const Z=()=>{v(Ui(window.location.pathname))};return window.addEventListener("popstate",Z),()=>{window.removeEventListener("popstate",Z)}},[]),w.useEffect(()=>{N(!1),j(null)},[b]),w.useEffect(()=>{if(d||!o)return;const Z=o.projects.length>0;if(b==="/setup"&&Z)typeof window<"u"&&Ui(window.location.pathname)!=="/"&&window.history.replaceState({},"","/"),v("/");else if(b==="/"&&!Z){const se="/setup";typeof window<"u"&&Ui(window.location.pathname)!==se&&window.history.replaceState({},"",se),v(se)}},[d,o,b]),w.useEffect(()=>{if(typeof window>"u"||C===null)return;const Z=se=>{se.key==="Escape"&&j(null)};return window.addEventListener("keydown",Z),()=>{window.removeEventListener("keydown",Z)}},[C]),w.useEffect(()=>{if(!l||typeof window>"u")return;let Z=!0;const se=async()=>{const Qe=await tO("/health","API"),le=Qe.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:Qe.state,detail:"Depends on API"};Z&&L({apiStatus:Qe,workerStatus:le})};se();const Le=window.setInterval(()=>{se()},15e3);return()=>{Z=!1,window.clearInterval(Le)}},[l]),!d&&!o&&p===!1)return c.jsx("div",{className:"app-shell",children:c.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:c.jsx("main",{id:"content",className:"page-shell",children:c.jsxs("div",{className:"page-container",children:[c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),c.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",c.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),c.jsx(ue,{type:"button",onClick:()=>{m(!0),H()},children:"Retry connection"})]})})})});const R=o??WA.dashboard,Q=nO(b,R),be=Q.kind==="project"?Lb(R,Q.projectId):void 0,X=Z=>{const se=Ui(Z);if(typeof window>"u"){v(se);return}Ui(window.location.pathname)!==se&&window.history.pushState({},"",se),v(se)},ce=Z=>{if(!Z)return;j({kind:"run",runId:Z}),A(null),O(!0);const se=Z;$l(Z).then(Le=>{j(Qe=>(Qe?.kind==="run"&&Qe.runId===se&&A(Le),Qe))}).catch(()=>{j(Le=>(Le?.kind==="run"&&Le.runId===se&&A(null),Le))}).finally(()=>O(!1))},Oe=()=>{wA().catch(Z=>{console.error("Failed to trigger all runs",Z)}).finally(()=>{H()})};w.useEffect(()=>{if(C?.kind!=="run"||!k||k.status!=="running"&&k.status!=="queued")return;const Z=setInterval(()=>{$l(C.runId).then(se=>{A(se),se.status!=="running"&&se.status!=="queued"&&H()}).catch(()=>{})},3e3);return()=>clearInterval(Z)},[C,k?.status,k?.snapshots.length,H]);const Ke=Z=>{j({kind:"evidence",evidenceId:Z})},Me=async Z=>{await Ib(Z),H()},I=async Z=>{try{await uA(Z),X("/"),H()}catch(se){console.error("Failed to delete project:",se)}},K=async(Z,se)=>{await rA(Z,se),await H()},ae=async(Z,se)=>{await lA(Z,se),await H()},de=async(Z,se)=>{const Qe=(await $b(Z)).map(st=>st.domain),le=[...new Set([...Qe,...se])];await Bb(Z,le),await H()},ee=async(Z,se)=>{await oA(Z,se),await H()},z=async(Z,se)=>{await cA(Z,se),await H()},q=lO(R.portfolioOverview.systemHealth,D,R.settings),te=oO(R.setup,D,R.settings),ne=C?.kind==="run"?JE(R,C.runId):void 0,oe=C?.kind==="evidence"?FE(R,C.evidenceId):void 0,fe=[{label:"Overview",href:"/",icon:N1,active:wo(Q,"overview")},{label:"Projects",href:"/projects",icon:w1,active:wo(Q,"projects")},{label:"Runs",href:"/runs",icon:C1,active:wo(Q,"runs")},{label:"Settings",href:"/settings",icon:D1,active:wo(Q,"settings")}],we=Q.kind==="overview"?"Portfolio":Q.kind==="projects"?"Projects":Q.kind==="project"&&be?be.project.name:Q.kind==="runs"?"Runs":Q.kind==="settings"?"Settings":Q.kind==="setup"?"Setup":"Not found";return c.jsxs("div",{className:"app-shell",children:[c.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),c.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[c.jsx("div",{className:"sidebar-brand",children:c.jsx(uv,{navigate:X})}),c.jsxs("nav",{className:"sidebar-nav",children:[fe.map(Z=>c.jsxs("a",{className:`sidebar-link ${Z.active?"sidebar-link-active":""}`,href:Z.href,"aria-current":Z.active?"page":void 0,onClick:sn(X,Z.href),children:[c.jsx(Z.icon,{className:"sidebar-icon"}),c.jsx("span",{children:Z.label})]},Z.label)),R.projects.length>0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Projects"}),R.projects.map(Z=>{const se=Q.kind==="project"&&be?.project.id===Z.project.id,Le=Z.visibilitySummary.tone;return c.jsxs("a",{className:`sidebar-project ${se?"sidebar-project-active":""}`,href:`/projects/${Z.project.id}`,onClick:sn(X,`/projects/${Z.project.id}`),children:[c.jsx("span",{className:`sidebar-dot sidebar-dot-${Le}`}),c.jsx("span",{children:Z.project.name})]},Z.project.id)})]}):null,R.projects.length===0?c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"sidebar-section-title",children:"Resources"}),c.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":Q.kind==="setup"?"page":void 0,onClick:sn(X,"/setup"),children:[c.jsx(O1,{className:"sidebar-icon"}),c.jsx("span",{children:"Setup"})]})]}):null]}),c.jsx("div",{className:"sidebar-footer",children:ov.map(Z=>c.jsx("a",{className:"sidebar-footer-link",href:Z.href,target:"_blank",rel:"noreferrer",children:Z.label},Z.href))})]}),c.jsxs("div",{className:"main-area",children:[c.jsxs("header",{className:"topbar",children:[c.jsxs("div",{className:"topbar-left",children:[c.jsx("div",{className:"topbar-brand-mobile",children:c.jsx(uv,{compact:!0,navigate:X})}),c.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[c.jsx("a",{href:"/",onClick:sn(X,"/"),children:"Home"}),c.jsx(Mf,{className:"breadcrumb-sep size-3"}),c.jsx("span",{className:"breadcrumb-current",children:we})]})]}),c.jsxs("div",{className:"topbar-actions",children:[c.jsxs("div",{className:"health-pill-row",children:[c.jsxs("span",{className:`health-pill health-pill-${D.apiStatus.state}`,children:["API ",D.apiStatus.state==="ok"?"ok":D.apiStatus.state]}),c.jsxs("span",{className:`health-pill health-pill-${D.workerStatus.state}`,children:["Worker ",D.workerStatus.state==="ok"?"ok":D.workerStatus.state]})]}),c.jsxs(ue,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":x,"aria-controls":"mobile-nav",onClick:()=>N(Z=>!Z),children:[c.jsx(_1,{className:"size-4"}),c.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),c.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${x?"mobile-nav-open":""}`,children:[c.jsxs(ue,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>N(!1),children:[c.jsx(Lf,{className:"size-5"}),c.jsx("span",{className:"sr-only",children:"Close navigation"})]}),fe.map(Z=>c.jsx("a",{className:`mobile-nav-link ${Z.active?"mobile-nav-link-active":""}`,href:Z.href,"aria-current":Z.active?"page":void 0,onClick:sn(X,Z.href),children:Z.label},Z.label)),R.projects.length>0?c.jsxs("div",{className:"mobile-nav-section",children:[c.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),R.projects.map(Z=>c.jsx("a",{className:"mobile-nav-link",href:`/projects/${Z.project.id}`,onClick:sn(X,`/projects/${Z.project.id}`),children:Z.project.name},Z.project.id))]}):null]}),c.jsx("main",{id:"content",className:"page-shell",children:d?c.jsx("div",{className:"page-container",children:c.jsx("div",{className:"page-header",children:c.jsxs("div",{className:"page-header-left",children:[c.jsx("h1",{className:"page-title",children:"Loading"}),c.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):c.jsxs(c.Fragment,{children:[Q.kind==="overview"?c.jsx(vO,{model:R.portfolioOverview,systemHealth:q,onNavigate:X,onOpenRun:ce}):null,Q.kind==="projects"?c.jsx(bO,{projects:R.projects,onNavigate:X,onProjectCreated:H}):null,Q.kind==="project"&&be?c.jsx(SO,{model:be,tab:Q.tab,onOpenEvidence:Ke,onOpenRun:ce,onTriggerRun:Me,onDeleteProject:I,onAddKeywords:K,onDeleteKeywords:ae,onAddCompetitors:de,onUpdateOwnedDomains:ee,onUpdateProject:z,onNavigate:X}):null,Q.kind==="runs"?c.jsx(OO,{runs:R.runs,onOpenRun:ce,onTriggerAll:Oe}):null,Q.kind==="settings"?c.jsx(LO,{settings:R.settings,healthSnapshot:D,onSettingsChanged:H}):null,Q.kind==="setup"?c.jsx(BO,{model:te,settings:R.settings,onProjectCreated:H,onNavigate:X}):null,Q.kind==="not-found"?c.jsx(IO,{onNavigate:X}):null]})}),c.jsxs("footer",{className:"footer",children:[c.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),c.jsx("div",{className:"footer-links",children:ov.map(Z=>c.jsx("a",{href:Z.href,target:"_blank",rel:"noreferrer",children:Z.label},Z.href))})]})]}),ne?c.jsxs(ZO,{open:ne!==void 0,title:ne.summary,subtitle:`${ne.projectName} · ${ne.kindLabel}`,onClose:()=>j(null),children:[c.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[c.jsx(oc,{status:ne.status}),c.jsx("span",{className:"text-zinc-400",children:ne.startedAt}),c.jsx("span",{className:"text-zinc-500",children:ne.duration}),c.jsx("span",{className:"text-zinc-600",children:ne.triggerLabel})]}),ne.status==="failed"&&ne.statusDetail&&c.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:ne.statusDetail}),c.jsxs("div",{className:"mt-4",children:[c.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),T?c.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):k&&k.snapshots.length>0?c.jsxs("div",{className:"space-y-2",children:[k.snapshots.map(Z=>c.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[c.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[c.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:Z.keyword??"Unknown key phrase"}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(Xf,{provider:Z.provider}),c.jsx(Ab,{variant:Z.citationState==="cited"?"success":"neutral",children:Z.citationState})]})]}),Z.model&&c.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:Z.model}),Z.citedDomains.length>0&&c.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[c.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",Z.citedDomains.join(", ")]}),Z.competitorOverlap.length>0&&c.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",Z.competitorOverlap.join(", ")]}),Z.groundingSources&&Z.groundingSources.length>0&&c.jsxs("details",{className:"mt-2",children:[c.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[Z.groundingSources.length," grounding source",Z.groundingSources.length!==1?"s":""]}),c.jsx("ul",{className:"mt-1 space-y-0.5",children:Z.groundingSources.map((se,Le)=>c.jsx("li",{className:"text-xs text-zinc-500 truncate",children:c.jsx("a",{href:se.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:se.title||se.uri})},Le))})]}),Z.answerText&&c.jsxs("details",{className:"mt-1",children:[c.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),c.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:Z.answerText})]})]},Z.id)),k.status==="running"&&c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):k&&k.status==="running"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first key phrase result..."]}):k&&k.status==="queued"?c.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[c.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-zinc-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):k&&k.error?c.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[c.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),c.jsx("pre",{className:"text-xs text-rose-300/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:sO(k.error)})]}):c.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,oe?c.jsx(qO,{evidence:oe.evidence,project:oe.project,onClose:()=>j(null)}):null]})}const Fb=document.getElementById("root");if(!Fb)throw new Error("Expected #root element for web app bootstrap.");jw.createRoot(Fb).render(c.jsx(w.StrictMode,{children:c.jsx(GO,{})}));
|