@canonry/canonry 4.136.1 → 4.136.2
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/{AuditHistoryPanel-B73VrWNb.js → AuditHistoryPanel-DtUGiN21.js} +1 -1
- package/assets/assets/{BacklinksPage-CLVMg_qx.js → BacklinksPage-BGwtmwfz.js} +1 -1
- package/assets/assets/{ChartPrimitives-P81CbvWc.js → ChartPrimitives-Df2UC1g3.js} +1 -1
- package/assets/assets/{HistoryPage-IcDqWBYW.js → HistoryPage-AtaMVEUx.js} +1 -1
- package/assets/assets/{ProjectPage-DTivvVIl.js → ProjectPage-OlBjxXNx.js} +1 -1
- package/assets/assets/{RunRow-BTH3-Tml.js → RunRow-Cmf-5xVo.js} +1 -1
- package/assets/assets/{RunsPage-B0k5wjFN.js → RunsPage-BAPy9Yri.js} +1 -1
- package/assets/assets/{SettingsPage-DGnT3Vdr.js → SettingsPage-BXO7WpTo.js} +1 -1
- package/assets/assets/{TrafficPage-D79PC0bB.js → TrafficPage-IH-wiPu2.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-BYEVjfFm.js → TrafficSourceDetailPage-CTTN-P52.js} +1 -1
- package/assets/assets/{arrow-left-DCdFYJK-.js → arrow-left-BwzAIeJ_.js} +1 -1
- package/assets/assets/{extract-error-message-bM0aUBUI.js → extract-error-message-BIcIoJLN.js} +1 -1
- package/assets/assets/index-BPpSrJY0.js +210 -0
- package/assets/assets/{trash-2-CEz2iXBv.js → trash-2-C50OeBAV.js} +1 -1
- package/assets/index.html +1 -1
- package/dist/{chunk-PIMWEIJ3.js → chunk-GGIRLRAY.js} +3042 -397
- package/dist/{chunk-YMF35LN5.js → chunk-MXR3GI5L.js} +54 -122
- package/dist/{chunk-OESGFFUO.js → chunk-SMFUCXHI.js} +1 -1
- package/dist/{chunk-YQ2RXMU2.js → chunk-YVMQWVNY.js} +91 -184
- package/dist/cli.js +4 -4
- package/dist/index.js +4 -4
- package/dist/{intelligence-service-BKLR57RQ.js → intelligence-service-BD6BHTEJ.js} +2 -2
- package/dist/mcp.js +2 -2
- package/package.json +10 -10
- package/assets/assets/index-CMuA-uEN.js +0 -210
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ProjectPage-DTivvVIl.js","./vendor-tanstack-Be8JdV5M.js","./RunRow-BTH3-Tml.js","./ChartPrimitives-P81CbvWc.js","./extract-error-message-bM0aUBUI.js","./vendor-recharts-DSxTZhaH.js","./trash-2-CEz2iXBv.js","./AuditHistoryPanel-B73VrWNb.js","./vendor-radix-CQ77EO2y.js","./vendor-markdown-6dwjPOKK.js","./RunsPage-B0k5wjFN.js","./HistoryPage-IcDqWBYW.js","./SettingsPage-DGnT3Vdr.js","./BacklinksPage-CLVMg_qx.js","./TrafficPage-D79PC0bB.js","./arrow-left-DCdFYJK-.js","./TrafficSourceDetailPage-BYEVjfFm.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{c as dN,d as fN,Q as pN,M as mN,r as q,q as Ae,j as p,L as nt,a as hN,e as Ls,u as ln,f as gN,h as Bc,k as yN,l as bN,m as x0,O as ep,n as oi,o as qi,p as vN,s as At,t as _p,v as Ui,x as SN,y as xN,z as wN}from"./vendor-tanstack-Be8JdV5M.js";import{S as jN,O as Tp,P as w0,C as Ep,a as j0,T as Op,D as N0,R as A0}from"./vendor-radix-CQ77EO2y.js";import{c as k0}from"./vendor-recharts-DSxTZhaH.js";import{M as NN}from"./vendor-markdown-6dwjPOKK.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function i(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(l){if(l.ep)return;l.ep=!0;const u=i(l);fetch(l.href,u)}})();var _f={exports:{}},uo={},Tf={exports:{}},Ef={};var Lb;function AN(){return Lb||(Lb=1,(function(e){function n(I,ne){var V=I.length;I.push(ne);e:for(;0<V;){var fe=V-1>>>1,ie=I[fe];if(0<l(ie,ne))I[fe]=ne,I[V]=ie,V=fe;else break e}}function i(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var ne=I[0],V=I.pop();if(V!==ne){I[0]=V;e:for(var fe=0,ie=I.length,Pe=ie>>>1;fe<Pe;){var J=2*(fe+1)-1,ue=I[J],te=J+1,de=I[te];if(0>l(ue,V))te<ie&&0>l(de,ue)?(I[fe]=de,I[te]=V,fe=te):(I[fe]=ue,I[J]=V,fe=J);else if(te<ie&&0>l(de,V))I[fe]=de,I[te]=V,fe=te;else break e}}return ne}function l(I,ne){var V=I.sortIndex-ne.sortIndex;return V!==0?V:I.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();e.unstable_now=function(){return d.now()-h}}var y=[],b=[],x=1,w=null,A=3,C=!1,O=!1,k=!1,E=!1,M=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;function H(I){for(var ne=i(b);ne!==null;){if(ne.callback===null)r(b);else if(ne.startTime<=I)r(b),ne.sortIndex=ne.expirationTime,n(y,ne);else break;ne=i(b)}}function X(I){if(k=!1,H(I),!O)if(i(y)!==null)O=!0,oe||(oe=!0,Se());else{var ne=i(b);ne!==null&&we(X,ne.startTime-I)}}var oe=!1,z=-1,R=5,le=-1;function ye(){return E?!0:!(e.unstable_now()-le<R)}function ze(){if(E=!1,oe){var I=e.unstable_now();le=I;var ne=!0;try{e:{O=!1,k&&(k=!1,G(z),z=-1),C=!0;var V=A;try{t:{for(H(I),w=i(y);w!==null&&!(w.expirationTime>I&&ye());){var fe=w.callback;if(typeof fe=="function"){w.callback=null,A=w.priorityLevel;var ie=fe(w.expirationTime<=I);if(I=e.unstable_now(),typeof ie=="function"){w.callback=ie,H(I),ne=!0;break t}w===i(y)&&r(y),H(I)}else r(y);w=i(y)}if(w!==null)ne=!0;else{var Pe=i(b);Pe!==null&&we(X,Pe.startTime-I),ne=!1}}break e}finally{w=null,A=V,C=!1}ne=void 0}}finally{ne?Se():oe=!1}}}var Se;if(typeof F=="function")Se=function(){F(ze)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,ot=Me.port2;Me.port1.onmessage=ze,Se=function(){ot.postMessage(null)}}else Se=function(){M(ze,0)};function we(I,ne){z=M(function(){I(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.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},e.unstable_getCurrentPriorityLevel=function(){return A},e.unstable_next=function(I){switch(A){case 1:case 2:case 3:var ne=3;break;default:ne=A}var V=A;A=ne;try{return I()}finally{A=V}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(I,ne){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var V=A;A=I;try{return ne()}finally{A=V}},e.unstable_scheduleCallback=function(I,ne,V){var fe=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?fe+V:fe):V=fe,I){case 1:var ie=-1;break;case 2:ie=250;break;case 5:ie=1073741823;break;case 4:ie=1e4;break;default:ie=5e3}return ie=V+ie,I={id:x++,callback:ne,priorityLevel:I,startTime:V,expirationTime:ie,sortIndex:-1},V>fe?(I.sortIndex=V,n(b,I),i(y)===null&&I===i(b)&&(k?(G(z),z=-1):k=!0,we(X,V-fe))):(I.sortIndex=ie,n(y,I),O||C||(O=!0,oe||(oe=!0,Se()))),I},e.unstable_shouldYield=ye,e.unstable_wrapCallback=function(I){var ne=A;return function(){var V=A;A=ne;try{return I.apply(this,arguments)}finally{A=V}}}})(Ef)),Ef}var qb;function kN(){return qb||(qb=1,Tf.exports=AN()),Tf.exports}var Ub;function CN(){if(Ub)return uo;Ub=1;var e=kN(),n=dN(),i=fN();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+t+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function u(t){var a=t,s=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(s=a.return),t=a.return;while(t)}return a.tag===3?s:null}function d(t){if(t.tag===13){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function h(t){if(t.tag===31){var a=t.memoizedState;if(a===null&&(t=t.alternate,t!==null&&(a=t.memoizedState)),a!==null)return a.dehydrated}return null}function y(t){if(u(t)!==t)throw Error(r(188))}function b(t){var a=t.alternate;if(!a){if(a=u(t),a===null)throw Error(r(188));return a!==t?null:t}for(var s=t,o=a;;){var f=s.return;if(f===null)break;var m=f.alternate;if(m===null){if(o=f.return,o!==null){s=o;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===s)return y(f),t;if(m===o)return y(f),a;m=m.sibling}throw Error(r(188))}if(s.return!==o.return)s=f,o=m;else{for(var S=!1,j=f.child;j;){if(j===s){S=!0,s=f,o=m;break}if(j===o){S=!0,o=f,s=m;break}j=j.sibling}if(!S){for(j=m.child;j;){if(j===s){S=!0,s=m,o=f;break}if(j===o){S=!0,o=m,s=f;break}j=j.sibling}if(!S)throw Error(r(189))}}if(s.alternate!==o)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?t:a}function x(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=x(t),a!==null)return a;t=t.sibling}return null}var w=Object.assign,A=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),E=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),F=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),ye=Symbol.for("react.memo_cache_sentinel"),ze=Symbol.iterator;function Se(t){return t===null||typeof t!="object"?null:(t=ze&&t[ze]||t["@@iterator"],typeof t=="function"?t:null)}var Me=Symbol.for("react.client.reference");function ot(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Me?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case k:return"Fragment";case M:return"Profiler";case E:return"StrictMode";case X:return"Suspense";case oe:return"SuspenseList";case le:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case O:return"Portal";case F:return t.displayName||"Context";case G:return(t._context.displayName||"Context")+".Consumer";case H:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case z:return a=t.displayName||null,a!==null?a:ot(t.type)||"Memo";case R:a=t._payload,t=t._init;try{return ot(t(a))}catch{}}return null}var we=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},fe=[],ie=-1;function Pe(t){return{current:t}}function J(t){0>ie||(t.current=fe[ie],fe[ie]=null,ie--)}function ue(t,a){ie++,fe[ie]=t.current,t.current=a}var te=Pe(null),de=Pe(null),se=Pe(null),Ce=Pe(null);function it(t,a){switch(ue(se,a),ue(de,t),ue(te,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?rb(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=rb(a),t=ob(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}J(te),ue(te,t)}function xe(){J(te),J(de),J(se)}function Ve(t){t.memoizedState!==null&&ue(Ce,t);var a=te.current,s=ob(a,t.type);a!==s&&(ue(de,t),ue(te,s))}function Fe(t){de.current===t&&(J(te),J(de)),Ce.current===t&&(J(Ce),ro._currentValue=V)}var Bt,Hn;function Lt(t){if(Bt===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Bt=a&&a[1]||"",Hn=-1<s.stack.indexOf(`
|
|
3
|
-
at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
-
`+Bt+t+Hn}var yr=!1;function Ki(t,a){if(!t||yr)return"";yr=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(a){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(P){var U=P}Reflect.construct(t,[],W)}else{try{W.call()}catch(P){U=P}t.call(W.prototype)}}else{try{throw Error()}catch(P){U=P}(W=t())&&typeof W.catch=="function"&&W.catch(function(){})}}catch(P){if(P&&U&&typeof P.stack=="string")return[P.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=o.DetermineComponentFrameRoot(),S=m[0],j=m[1];if(S&&j){var _=S.split(`
|
|
5
|
-
`),L=j.split(`
|
|
6
|
-
`);for(f=o=0;o<_.length&&!_[o].includes("DetermineComponentFrameRoot");)o++;for(;f<L.length&&!L[f].includes("DetermineComponentFrameRoot");)f++;if(o===_.length||f===L.length)for(o=_.length-1,f=L.length-1;1<=o&&0<=f&&_[o]!==L[f];)f--;for(;1<=o&&0<=f;o--,f--)if(_[o]!==L[f]){if(o!==1||f!==1)do if(o--,f--,0>f||_[o]!==L[f]){var Q=`
|
|
7
|
-
`+_[o].replace(" at new "," at ");return t.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",t.displayName)),Q}while(1<=o&&0<=f);break}}}finally{yr=!1,Error.prepareStackTrace=s}return(s=t?t.displayName||t.name:"")?Lt(s):""}function qo(t,a){switch(t.tag){case 26:case 27:case 5:return Lt(t.type);case 16:return Lt("Lazy");case 13:return t.child!==a&&a!==null?Lt("Suspense Fallback"):Lt("Suspense");case 19:return Lt("SuspenseList");case 0:case 15:return Ki(t.type,!1);case 11:return Ki(t.type.render,!1);case 1:return Ki(t.type,!0);case 31:return Lt("Activity");default:return""}}function br(t){try{var a="",s=null;do a+=qo(t,s),s=t,t=t.return;while(t);return a}catch(o){return`
|
|
8
|
-
Error generating stack: `+o.message+`
|
|
9
|
-
`+o.stack}}var Qi=Object.prototype.hasOwnProperty,Zi=e.unstable_scheduleCallback,vr=e.unstable_cancelCallback,Uo=e.unstable_shouldYield,$o=e.unstable_requestPaint,Gt=e.unstable_now,du=e.unstable_getCurrentPriorityLevel,Io=e.unstable_ImmediatePriority,Po=e.unstable_UserBlockingPriority,_a=e.unstable_NormalPriority,Vo=e.unstable_LowPriority,Yi=e.unstable_IdlePriority,Go=e.log,Ho=e.unstable_setDisableYieldValue,Ta=null,vt=null;function qt(t){if(typeof Go=="function"&&Ho(t),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Ta,t)}catch{}}var Ot=Math.clz32?Math.clz32:mu,fu=Math.log,pu=Math.LN2;function mu(t){return t>>>=0,t===0?32:31-(fu(t)/pu|0)|0}var Fi=256,Xi=262144,Ji=4194304;function Wn(t){var a=t&42;if(a!==0)return a;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function yn(t,a,s){var o=t.pendingLanes;if(o===0)return 0;var f=0,m=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var j=o&134217727;return j!==0?(o=j&~m,o!==0?f=Wn(o):(S&=j,S!==0?f=Wn(S):s||(s=j&~t,s!==0&&(f=Wn(s))))):(j=o&~m,j!==0?f=Wn(j):S!==0?f=Wn(S):s||(s=o&~t,s!==0&&(f=Wn(s)))),f===0?0:a!==0&&a!==f&&(a&m)===0&&(m=f&-f,s=a&-a,m>=s||m===32&&(s&4194048)!==0)?a:f}function mi(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function re(t,a){switch(t){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 ut(){var t=Ji;return Ji<<=1,(Ji&62914560)===0&&(Ji=4194304),t}function ea(t){for(var a=[],s=0;31>s;s++)a.push(t);return a}function hi(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function hu(t,a,s,o,f,m){var S=t.pendingLanes;t.pendingLanes=s,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=s,t.entangledLanes&=s,t.errorRecoveryDisabledLanes&=s,t.shellSuspendCounter=0;var j=t.entanglements,_=t.expirationTimes,L=t.hiddenUpdates;for(s=S&~s;0<s;){var Q=31-Ot(s),W=1<<Q;j[Q]=0,_[Q]=-1;var U=L[Q];if(U!==null)for(L[Q]=null,Q=0;Q<U.length;Q++){var P=U[Q];P!==null&&(P.lane&=-536870913)}s&=~W}o!==0&&Sr(t,o,0),m!==0&&f===0&&t.tag!==0&&(t.suspendedLanes|=m&~(S&~a))}function Sr(t,a,s){t.pendingLanes|=a,t.suspendedLanes&=~a;var o=31-Ot(a);t.entangledLanes|=a,t.entanglements[o]=t.entanglements[o]|1073741824|s&261930}function Ko(t,a){var s=t.entangledLanes|=a;for(t=t.entanglements;s;){var o=31-Ot(s),f=1<<o;f&a|t[o]&a&&(t[o]|=a),s&=~f}}function Kn(t,a){var s=a&-a;return s=(s&42)!==0?1:gu(s),(s&(t.suspendedLanes|a))!==0?0:s}function gu(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function yu(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Hm(){var t=ne.p;return t!==0?t:(t=window.event,t===void 0?32:Eb(t.type))}function Km(t,a){var s=ne.p;try{return ne.p=t,a()}finally{ne.p=s}}var Ea=Math.random().toString(36).slice(2),Ut="__reactFiber$"+Ea,en="__reactProps$"+Ea,Wi="__reactContainer$"+Ea,bu="__reactEvents$"+Ea,ew="__reactListeners$"+Ea,tw="__reactHandles$"+Ea,Qm="__reactResources$"+Ea,xr="__reactMarker$"+Ea;function vu(t){delete t[Ut],delete t[en],delete t[bu],delete t[ew],delete t[tw]}function es(t){var a=t[Ut];if(a)return a;for(var s=t.parentNode;s;){if(a=s[Wi]||s[Ut]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(t=mb(t);t!==null;){if(s=t[Ut])return s;t=mb(t)}return a}t=s,s=t.parentNode}return null}function ts(t){if(t=t[Ut]||t[Wi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function wr(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function ns(t){var a=t[Qm];return a||(a=t[Qm]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Rt(t){t[xr]=!0}var Zm=new Set,Ym={};function gi(t,a){as(t,a),as(t+"Capture",a)}function as(t,a){for(Ym[t]=a,t=0;t<a.length;t++)Zm.add(a[t])}var nw=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]*$"),Fm={},Xm={};function aw(t){return Qi.call(Xm,t)?!0:Qi.call(Fm,t)?!1:nw.test(t)?Xm[t]=!0:(Fm[t]=!0,!1)}function Qo(t,a,s){if(aw(a))if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var o=a.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+s)}}function Zo(t,a,s){if(s===null)t.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+s)}}function ta(t,a,s,o){if(o===null)t.removeAttribute(s);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttributeNS(a,s,""+o)}}function bn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Jm(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function iw(t,a,s){var o=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,m=o.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return f.call(this)},set:function(S){s=""+S,m.call(this,S)}}),Object.defineProperty(t,a,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(S){s=""+S},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function Su(t){if(!t._valueTracker){var a=Jm(t)?"checked":"value";t._valueTracker=iw(t,a,""+t[a])}}function Wm(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var s=a.getValue(),o="";return t&&(o=Jm(t)?t.checked?"true":"false":t.value),t=o,t!==s?(a.setValue(t),!0):!1}function Yo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var sw=/[\n"\\]/g;function vn(t){return t.replace(sw,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function xu(t,a,s,o,f,m,S,j){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),a!=null?S==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+bn(a)):t.value!==""+bn(a)&&(t.value=""+bn(a)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),a!=null?wu(t,S,bn(a)):s!=null?wu(t,S,bn(s)):o!=null&&t.removeAttribute("value"),f==null&&m!=null&&(t.defaultChecked=!!m),f!=null&&(t.checked=f&&typeof f!="function"&&typeof f!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?t.name=""+bn(j):t.removeAttribute("name")}function eh(t,a,s,o,f,m,S,j){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(t.type=m),a!=null||s!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Su(t);return}s=s!=null?""+bn(s):"",a=a!=null?""+bn(a):s,j||a===t.value||(t.value=a),t.defaultValue=a}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,t.checked=j?t.checked:!!o,t.defaultChecked=!!o,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),Su(t)}function wu(t,a,s){a==="number"&&Yo(t.ownerDocument)===t||t.defaultValue===""+s||(t.defaultValue=""+s)}function is(t,a,s,o){if(t=t.options,a){a={};for(var f=0;f<s.length;f++)a["$"+s[f]]=!0;for(s=0;s<t.length;s++)f=a.hasOwnProperty("$"+t[s].value),t[s].selected!==f&&(t[s].selected=f),f&&o&&(t[s].defaultSelected=!0)}else{for(s=""+bn(s),a=null,f=0;f<t.length;f++){if(t[f].value===s){t[f].selected=!0,o&&(t[f].defaultSelected=!0);return}a!==null||t[f].disabled||(a=t[f])}a!==null&&(a.selected=!0)}}function th(t,a,s){if(a!=null&&(a=""+bn(a),a!==t.value&&(t.value=a),s==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=s!=null?""+bn(s):""}function nh(t,a,s,o){if(a==null){if(o!=null){if(s!=null)throw Error(r(92));if(we(o)){if(1<o.length)throw Error(r(93));o=o[0]}s=o}s==null&&(s=""),a=s}s=bn(a),t.defaultValue=s,o=t.textContent,o===s&&o!==""&&o!==null&&(t.value=o),Su(t)}function ss(t,a){if(a){var s=t.firstChild;if(s&&s===t.lastChild&&s.nodeType===3){s.nodeValue=a;return}}t.textContent=a}var rw=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 ah(t,a,s){var o=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?o?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":o?t.setProperty(a,s):typeof s!="number"||s===0||rw.has(a)?a==="float"?t.cssFloat=s:t[a]=(""+s).trim():t[a]=s+"px"}function ih(t,a,s){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,s!=null){for(var o in s)!s.hasOwnProperty(o)||a!=null&&a.hasOwnProperty(o)||(o.indexOf("--")===0?t.setProperty(o,""):o==="float"?t.cssFloat="":t[o]="");for(var f in a)o=a[f],a.hasOwnProperty(f)&&s[f]!==o&&ah(t,f,o)}else for(var m in a)a.hasOwnProperty(m)&&ah(t,m,a[m])}function ju(t){if(t.indexOf("-")===-1)return!1;switch(t){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 ow=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"]]),lw=/^[\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 Fo(t){return lw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function na(){}var Nu=null;function Au(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var rs=null,os=null;function sh(t){var a=ts(t);if(a&&(t=a.stateNode)){var s=t[en]||null;e:switch(t=a.stateNode,a.type){case"input":if(xu(t,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=t;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+vn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var o=s[a];if(o!==t&&o.form===t.form){var f=o[en]||null;if(!f)throw Error(r(90));xu(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(a=0;a<s.length;a++)o=s[a],o.form===t.form&&Wm(o)}break e;case"textarea":th(t,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&is(t,!!s.multiple,a,!1)}}}var ku=!1;function rh(t,a,s){if(ku)return t(a,s);ku=!0;try{var o=t(a);return o}finally{if(ku=!1,(rs!==null||os!==null)&&(Ll(),rs&&(a=rs,t=os,os=rs=null,sh(a),t)))for(a=0;a<t.length;a++)sh(t[a])}}function jr(t,a){var s=t.stateNode;if(s===null)return null;var o=s[en]||null;if(o===null)return null;s=o[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(t=t.type,o=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!o;break e;default:t=!1}if(t)return null;if(s&&typeof s!="function")throw Error(r(231,a,typeof s));return s}var aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cu=!1;if(aa)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Cu=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Cu=!1}var Oa=null,_u=null,Xo=null;function oh(){if(Xo)return Xo;var t,a=_u,s=a.length,o,f="value"in Oa?Oa.value:Oa.textContent,m=f.length;for(t=0;t<s&&a[t]===f[t];t++);var S=s-t;for(o=1;o<=S&&a[s-o]===f[m-o];o++);return Xo=f.slice(t,1<o?1-o:void 0)}function Jo(t){var a=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&a===13&&(t=13)):t=a,t===10&&(t=13),32<=t||t===13?t:0}function Wo(){return!0}function lh(){return!1}function tn(t){function a(s,o,f,m,S){this._reactName=s,this._targetInst=f,this.type=o,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var j in t)t.hasOwnProperty(j)&&(s=t[j],this[j]=s?s(m):m[j]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Wo:lh,this.isPropagationStopped=lh,this}return w(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Wo)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Wo)},persist:function(){},isPersistent:Wo}),a}var yi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},el=tn(yi),Ar=w({},yi,{view:0,detail:0}),cw=tn(Ar),Tu,Eu,kr,tl=w({},Ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Du,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==kr&&(kr&&t.type==="mousemove"?(Tu=t.screenX-kr.screenX,Eu=t.screenY-kr.screenY):Eu=Tu=0,kr=t),Tu)},movementY:function(t){return"movementY"in t?t.movementY:Eu}}),ch=tn(tl),uw=w({},tl,{dataTransfer:0}),dw=tn(uw),fw=w({},Ar,{relatedTarget:0}),Ou=tn(fw),pw=w({},yi,{animationName:0,elapsedTime:0,pseudoElement:0}),mw=tn(pw),hw=w({},yi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),gw=tn(hw),yw=w({},yi,{data:0}),uh=tn(yw),bw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vw={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"},Sw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xw(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=Sw[t])?!!a[t]:!1}function Du(){return xw}var ww=w({},Ar,{key:function(t){if(t.key){var a=bw[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=Jo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?vw[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Du,charCode:function(t){return t.type==="keypress"?Jo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Jo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),jw=tn(ww),Nw=w({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dh=tn(Nw),Aw=w({},Ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Du}),kw=tn(Aw),Cw=w({},yi,{propertyName:0,elapsedTime:0,pseudoElement:0}),_w=tn(Cw),Tw=w({},tl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Ew=tn(Tw),Ow=w({},yi,{newState:0,oldState:0}),Dw=tn(Ow),zw=[9,13,27,32],zu=aa&&"CompositionEvent"in window,Cr=null;aa&&"documentMode"in document&&(Cr=document.documentMode);var Rw=aa&&"TextEvent"in window&&!Cr,fh=aa&&(!zu||Cr&&8<Cr&&11>=Cr),ph=" ",mh=!1;function hh(t,a){switch(t){case"keyup":return zw.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gh(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ls=!1;function Mw(t,a){switch(t){case"compositionend":return gh(a);case"keypress":return a.which!==32?null:(mh=!0,ph);case"textInput":return t=a.data,t===ph&&mh?null:t;default:return null}}function Bw(t,a){if(ls)return t==="compositionend"||!zu&&hh(t,a)?(t=oh(),Xo=_u=Oa=null,ls=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return fh&&a.locale!=="ko"?null:a.data;default:return null}}var Lw={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 yh(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!Lw[t.type]:a==="textarea"}function bh(t,a,s,o){rs?os?os.push(o):os=[o]:rs=o,a=Gl(a,"onChange"),0<a.length&&(s=new el("onChange","change",null,s,o),t.push({event:s,listeners:a}))}var _r=null,Tr=null;function qw(t){eb(t,0)}function nl(t){var a=wr(t);if(Wm(a))return t}function vh(t,a){if(t==="change")return a}var Sh=!1;if(aa){var Ru;if(aa){var Mu="oninput"in document;if(!Mu){var xh=document.createElement("div");xh.setAttribute("oninput","return;"),Mu=typeof xh.oninput=="function"}Ru=Mu}else Ru=!1;Sh=Ru&&(!document.documentMode||9<document.documentMode)}function wh(){_r&&(_r.detachEvent("onpropertychange",jh),Tr=_r=null)}function jh(t){if(t.propertyName==="value"&&nl(Tr)){var a=[];bh(a,Tr,t,Au(t)),rh(qw,a)}}function Uw(t,a,s){t==="focusin"?(wh(),_r=a,Tr=s,_r.attachEvent("onpropertychange",jh)):t==="focusout"&&wh()}function $w(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return nl(Tr)}function Iw(t,a){if(t==="click")return nl(a)}function Pw(t,a){if(t==="input"||t==="change")return nl(a)}function Vw(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var un=typeof Object.is=="function"?Object.is:Vw;function Er(t,a){if(un(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var s=Object.keys(t),o=Object.keys(a);if(s.length!==o.length)return!1;for(o=0;o<s.length;o++){var f=s[o];if(!Qi.call(a,f)||!un(t[f],a[f]))return!1}return!0}function Nh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Ah(t,a){var s=Nh(t);t=0;for(var o;s;){if(s.nodeType===3){if(o=t+s.textContent.length,t<=a&&o>=a)return{node:s,offset:a-t};t=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Nh(s)}}function kh(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?kh(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Ch(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=Yo(t.document);a instanceof t.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)t=a.contentWindow;else break;a=Yo(t.document)}return a}function Bu(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a&&(a==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||a==="textarea"||t.contentEditable==="true")}var Gw=aa&&"documentMode"in document&&11>=document.documentMode,cs=null,Lu=null,Or=null,qu=!1;function _h(t,a,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;qu||cs==null||cs!==Yo(o)||(o=cs,"selectionStart"in o&&Bu(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Or&&Er(Or,o)||(Or=o,o=Gl(Lu,"onSelect"),0<o.length&&(a=new el("onSelect","select",null,a,s),t.push({event:a,listeners:o}),a.target=cs)))}function bi(t,a){var s={};return s[t.toLowerCase()]=a.toLowerCase(),s["Webkit"+t]="webkit"+a,s["Moz"+t]="moz"+a,s}var us={animationend:bi("Animation","AnimationEnd"),animationiteration:bi("Animation","AnimationIteration"),animationstart:bi("Animation","AnimationStart"),transitionrun:bi("Transition","TransitionRun"),transitionstart:bi("Transition","TransitionStart"),transitioncancel:bi("Transition","TransitionCancel"),transitionend:bi("Transition","TransitionEnd")},Uu={},Th={};aa&&(Th=document.createElement("div").style,"AnimationEvent"in window||(delete us.animationend.animation,delete us.animationiteration.animation,delete us.animationstart.animation),"TransitionEvent"in window||delete us.transitionend.transition);function vi(t){if(Uu[t])return Uu[t];if(!us[t])return t;var a=us[t],s;for(s in a)if(a.hasOwnProperty(s)&&s in Th)return Uu[t]=a[s];return t}var Eh=vi("animationend"),Oh=vi("animationiteration"),Dh=vi("animationstart"),Hw=vi("transitionrun"),Kw=vi("transitionstart"),Qw=vi("transitioncancel"),zh=vi("transitionend"),Rh=new Map,$u="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(" ");$u.push("scrollEnd");function Bn(t,a){Rh.set(t,a),gi(a,[t])}var al=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Sn=[],ds=0,Iu=0;function il(){for(var t=ds,a=Iu=ds=0;a<t;){var s=Sn[a];Sn[a++]=null;var o=Sn[a];Sn[a++]=null;var f=Sn[a];Sn[a++]=null;var m=Sn[a];if(Sn[a++]=null,o!==null&&f!==null){var S=o.pending;S===null?f.next=f:(f.next=S.next,S.next=f),o.pending=f}m!==0&&Mh(s,f,m)}}function sl(t,a,s,o){Sn[ds++]=t,Sn[ds++]=a,Sn[ds++]=s,Sn[ds++]=o,Iu|=o,t.lanes|=o,t=t.alternate,t!==null&&(t.lanes|=o)}function Pu(t,a,s,o){return sl(t,a,s,o),rl(t)}function Si(t,a){return sl(t,null,null,a),rl(t)}function Mh(t,a,s){t.lanes|=s;var o=t.alternate;o!==null&&(o.lanes|=s);for(var f=!1,m=t.return;m!==null;)m.childLanes|=s,o=m.alternate,o!==null&&(o.childLanes|=s),m.tag===22&&(t=m.stateNode,t===null||t._visibility&1||(f=!0)),t=m,m=m.return;return t.tag===3?(m=t.stateNode,f&&a!==null&&(f=31-Ot(s),t=m.hiddenUpdates,o=t[f],o===null?t[f]=[a]:o.push(a),a.lane=s|536870912),m):null}function rl(t){if(50<Wr)throw Wr=0,Xd=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var fs={};function Zw(t,a,s,o){this.tag=t,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=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(t,a,s,o){return new Zw(t,a,s,o)}function Vu(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ia(t,a){var s=t.alternate;return s===null?(s=dn(t.tag,a,t.key,t.mode),s.elementType=t.elementType,s.type=t.type,s.stateNode=t.stateNode,s.alternate=t,t.alternate=s):(s.pendingProps=a,s.type=t.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=t.flags&65011712,s.childLanes=t.childLanes,s.lanes=t.lanes,s.child=t.child,s.memoizedProps=t.memoizedProps,s.memoizedState=t.memoizedState,s.updateQueue=t.updateQueue,a=t.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=t.sibling,s.index=t.index,s.ref=t.ref,s.refCleanup=t.refCleanup,s}function Bh(t,a){t.flags&=65011714;var s=t.alternate;return s===null?(t.childLanes=0,t.lanes=a,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=s.childLanes,t.lanes=s.lanes,t.child=s.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=s.memoizedProps,t.memoizedState=s.memoizedState,t.updateQueue=s.updateQueue,t.type=s.type,a=s.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function ol(t,a,s,o,f,m){var S=0;if(o=t,typeof t=="function")Vu(t)&&(S=1);else if(typeof t=="string")S=Wj(t,s,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case le:return t=dn(31,s,a,f),t.elementType=le,t.lanes=m,t;case k:return xi(s.children,f,m,a);case E:S=8,f|=24;break;case M:return t=dn(12,s,a,f|2),t.elementType=M,t.lanes=m,t;case X:return t=dn(13,s,a,f),t.elementType=X,t.lanes=m,t;case oe:return t=dn(19,s,a,f),t.elementType=oe,t.lanes=m,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case F:S=10;break e;case G:S=9;break e;case H:S=11;break e;case z:S=14;break e;case R:S=16,o=null;break e}S=29,s=Error(r(130,t===null?"null":typeof t,"")),o=null}return a=dn(S,s,a,f),a.elementType=t,a.type=o,a.lanes=m,a}function xi(t,a,s,o){return t=dn(7,t,o,a),t.lanes=s,t}function Gu(t,a,s){return t=dn(6,t,null,a),t.lanes=s,t}function Lh(t){var a=dn(18,null,null,0);return a.stateNode=t,a}function Hu(t,a,s){return a=dn(4,t.children!==null?t.children:[],t.key,a),a.lanes=s,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var qh=new WeakMap;function xn(t,a){if(typeof t=="object"&&t!==null){var s=qh.get(t);return s!==void 0?s:(a={value:t,source:a,stack:br(a)},qh.set(t,a),a)}return{value:t,source:a,stack:br(a)}}var ps=[],ms=0,ll=null,Dr=0,wn=[],jn=0,Da=null,Qn=1,Zn="";function sa(t,a){ps[ms++]=Dr,ps[ms++]=ll,ll=t,Dr=a}function Uh(t,a,s){wn[jn++]=Qn,wn[jn++]=Zn,wn[jn++]=Da,Da=t;var o=Qn;t=Zn;var f=32-Ot(o)-1;o&=~(1<<f),s+=1;var m=32-Ot(a)+f;if(30<m){var S=f-f%5;m=(o&(1<<S)-1).toString(32),o>>=S,f-=S,Qn=1<<32-Ot(a)+f|s<<f|o,Zn=m+t}else Qn=1<<m|s<<f|o,Zn=t}function Ku(t){t.return!==null&&(sa(t,1),Uh(t,1,0))}function Qu(t){for(;t===ll;)ll=ps[--ms],ps[ms]=null,Dr=ps[--ms],ps[ms]=null;for(;t===Da;)Da=wn[--jn],wn[jn]=null,Zn=wn[--jn],wn[jn]=null,Qn=wn[--jn],wn[jn]=null}function $h(t,a){wn[jn++]=Qn,wn[jn++]=Zn,wn[jn++]=Da,Qn=a.id,Zn=a.overflow,Da=t}var $t=null,lt=null,Ie=!1,za=null,Nn=!1,Zu=Error(r(519));function Ra(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zr(xn(a,t)),Zu}function Ih(t){var a=t.stateNode,s=t.type,o=t.memoizedProps;switch(a[Ut]=t,a[en]=o,s){case"dialog":Le("cancel",a),Le("close",a);break;case"iframe":case"object":case"embed":Le("load",a);break;case"video":case"audio":for(s=0;s<to.length;s++)Le(to[s],a);break;case"source":Le("error",a);break;case"img":case"image":case"link":Le("error",a),Le("load",a);break;case"details":Le("toggle",a);break;case"input":Le("invalid",a),eh(a,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Le("invalid",a);break;case"textarea":Le("invalid",a),nh(a,o.value,o.defaultValue,o.children)}s=o.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||o.suppressHydrationWarning===!0||ib(a.textContent,s)?(o.popover!=null&&(Le("beforetoggle",a),Le("toggle",a)),o.onScroll!=null&&Le("scroll",a),o.onScrollEnd!=null&&Le("scrollend",a),o.onClick!=null&&(a.onclick=na),a=!0):a=!1,a||Ra(t,!0)}function Ph(t){for($t=t.return;$t;)switch($t.tag){case 5:case 31:case 13:Nn=!1;return;case 27:case 3:Nn=!0;return;default:$t=$t.return}}function hs(t){if(t!==$t)return!1;if(!Ie)return Ph(t),Ie=!0,!1;var a=t.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=t.type,s=!(s!=="form"&&s!=="button")||pf(t.type,t.memoizedProps)),s=!s),s&<&&Ra(t),Ph(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));lt=pb(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));lt=pb(t)}else a===27?(a=lt,Za(t.type)?(t=bf,bf=null,lt=t):lt=a):lt=$t?kn(t.stateNode.nextSibling):null;return!0}function wi(){lt=$t=null,Ie=!1}function Yu(){var t=za;return t!==null&&(rn===null?rn=t:rn.push.apply(rn,t),za=null),t}function zr(t){za===null?za=[t]:za.push(t)}var Fu=Pe(null),ji=null,ra=null;function Ma(t,a,s){ue(Fu,a._currentValue),a._currentValue=s}function oa(t){t._currentValue=Fu.current,J(Fu)}function Xu(t,a,s){for(;t!==null;){var o=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,o!==null&&(o.childLanes|=a)):o!==null&&(o.childLanes&a)!==a&&(o.childLanes|=a),t===s)break;t=t.return}}function Ju(t,a,s,o){var f=t.child;for(f!==null&&(f.return=t);f!==null;){var m=f.dependencies;if(m!==null){var S=f.child;m=m.firstContext;e:for(;m!==null;){var j=m;m=f;for(var _=0;_<a.length;_++)if(j.context===a[_]){m.lanes|=s,j=m.alternate,j!==null&&(j.lanes|=s),Xu(m.return,s,t),o||(S=null);break e}m=j.next}}else if(f.tag===18){if(S=f.return,S===null)throw Error(r(341));S.lanes|=s,m=S.alternate,m!==null&&(m.lanes|=s),Xu(S,s,t),S=null}else S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===t){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}}function gs(t,a,s,o){t=null;for(var f=a,m=!1;f!==null;){if(!m){if((f.flags&524288)!==0)m=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var S=f.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var j=f.type;un(f.pendingProps.value,S.value)||(t!==null?t.push(j):t=[j])}}else if(f===Ce.current){if(S=f.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(t!==null?t.push(ro):t=[ro])}f=f.return}t!==null&&Ju(a,t,s,o),a.flags|=262144}function cl(t){for(t=t.firstContext;t!==null;){if(!un(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ni(t){ji=t,ra=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function It(t){return Vh(ji,t)}function ul(t,a){return ji===null&&Ni(t),Vh(t,a)}function Vh(t,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},ra===null){if(t===null)throw Error(r(308));ra=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else ra=ra.next=a;return s}var Yw=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(s,o){t.push(o)}};this.abort=function(){a.aborted=!0,t.forEach(function(s){return s()})}},Fw=e.unstable_scheduleCallback,Xw=e.unstable_NormalPriority,kt={$$typeof:F,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wu(){return{controller:new Yw,data:new Map,refCount:0}}function Rr(t){t.refCount--,t.refCount===0&&Fw(Xw,function(){t.controller.abort()})}var Mr=null,ed=0,ys=0,bs=null;function Jw(t,a){if(Mr===null){var s=Mr=[];ed=0,ys=af(),bs={status:"pending",value:void 0,then:function(o){s.push(o)}}}return ed++,a.then(Gh,Gh),a}function Gh(){if(--ed===0&&Mr!==null){bs!==null&&(bs.status="fulfilled");var t=Mr;Mr=null,ys=0,bs=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function Ww(t,a){var s=[],o={status:"pending",value:null,reason:null,then:function(f){s.push(f)}};return t.then(function(){o.status="fulfilled",o.value=a;for(var f=0;f<s.length;f++)(0,s[f])(a)},function(f){for(o.status="rejected",o.reason=f,f=0;f<s.length;f++)(0,s[f])(void 0)}),o}var Hh=I.S;I.S=function(t,a){_y=Gt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Jw(t,a),Hh!==null&&Hh(t,a)};var Ai=Pe(null);function td(){var t=Ai.current;return t!==null?t:at.pooledCache}function dl(t,a){a===null?ue(Ai,Ai.current):ue(Ai,a.pool)}function Kh(){var t=td();return t===null?null:{parent:kt._currentValue,pool:t}}var vs=Error(r(460)),nd=Error(r(474)),fl=Error(r(542)),pl={then:function(){}};function Qh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Zh(t,a,s){switch(s=t[s],s===void 0?t.push(a):s!==a&&(a.then(na,na),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Fh(t),t;default:if(typeof a.status=="string")a.then(na,na);else{if(t=at,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=a,t.status="pending",t.then(function(o){if(a.status==="pending"){var f=a;f.status="fulfilled",f.value=o}},function(o){if(a.status==="pending"){var f=a;f.status="rejected",f.reason=o}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,Fh(t),t}throw Ci=a,vs}}function ki(t){try{var a=t._init;return a(t._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ci=s,vs):s}}var Ci=null;function Yh(){if(Ci===null)throw Error(r(459));var t=Ci;return Ci=null,t}function Fh(t){if(t===vs||t===fl)throw Error(r(483))}var Ss=null,Br=0;function ml(t){var a=Br;return Br+=1,Ss===null&&(Ss=[]),Zh(Ss,t,a)}function Lr(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function hl(t,a){throw a.$$typeof===A?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function Xh(t){function a(D,T){if(t){var B=D.deletions;B===null?(D.deletions=[T],D.flags|=16):B.push(T)}}function s(D,T){if(!t)return null;for(;T!==null;)a(D,T),T=T.sibling;return null}function o(D){for(var T=new Map;D!==null;)D.key!==null?T.set(D.key,D):T.set(D.index,D),D=D.sibling;return T}function f(D,T){return D=ia(D,T),D.index=0,D.sibling=null,D}function m(D,T,B){return D.index=B,t?(B=D.alternate,B!==null?(B=B.index,B<T?(D.flags|=67108866,T):B):(D.flags|=67108866,T)):(D.flags|=1048576,T)}function S(D){return t&&D.alternate===null&&(D.flags|=67108866),D}function j(D,T,B,Y){return T===null||T.tag!==6?(T=Gu(B,D.mode,Y),T.return=D,T):(T=f(T,B),T.return=D,T)}function _(D,T,B,Y){var ve=B.type;return ve===k?Q(D,T,B.props.children,Y,B.key):T!==null&&(T.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&ki(ve)===T.type)?(T=f(T,B.props),Lr(T,B),T.return=D,T):(T=ol(B.type,B.key,B.props,null,D.mode,Y),Lr(T,B),T.return=D,T)}function L(D,T,B,Y){return T===null||T.tag!==4||T.stateNode.containerInfo!==B.containerInfo||T.stateNode.implementation!==B.implementation?(T=Hu(B,D.mode,Y),T.return=D,T):(T=f(T,B.children||[]),T.return=D,T)}function Q(D,T,B,Y,ve){return T===null||T.tag!==7?(T=xi(B,D.mode,Y,ve),T.return=D,T):(T=f(T,B),T.return=D,T)}function W(D,T,B){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Gu(""+T,D.mode,B),T.return=D,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case C:return B=ol(T.type,T.key,T.props,null,D.mode,B),Lr(B,T),B.return=D,B;case O:return T=Hu(T,D.mode,B),T.return=D,T;case R:return T=ki(T),W(D,T,B)}if(we(T)||Se(T))return T=xi(T,D.mode,B,null),T.return=D,T;if(typeof T.then=="function")return W(D,ml(T),B);if(T.$$typeof===F)return W(D,ul(D,T),B);hl(D,T)}return null}function U(D,T,B,Y){var ve=T!==null?T.key:null;if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return ve!==null?null:j(D,T,""+B,Y);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case C:return B.key===ve?_(D,T,B,Y):null;case O:return B.key===ve?L(D,T,B,Y):null;case R:return B=ki(B),U(D,T,B,Y)}if(we(B)||Se(B))return ve!==null?null:Q(D,T,B,Y,null);if(typeof B.then=="function")return U(D,T,ml(B),Y);if(B.$$typeof===F)return U(D,T,ul(D,B),Y);hl(D,B)}return null}function P(D,T,B,Y,ve){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return D=D.get(B)||null,j(T,D,""+Y,ve);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case C:return D=D.get(Y.key===null?B:Y.key)||null,_(T,D,Y,ve);case O:return D=D.get(Y.key===null?B:Y.key)||null,L(T,D,Y,ve);case R:return Y=ki(Y),P(D,T,B,Y,ve)}if(we(Y)||Se(Y))return D=D.get(B)||null,Q(T,D,Y,ve,null);if(typeof Y.then=="function")return P(D,T,B,ml(Y),ve);if(Y.$$typeof===F)return P(D,T,B,ul(T,Y),ve);hl(T,Y)}return null}function pe(D,T,B,Y){for(var ve=null,Ge=null,ge=T,De=T=0,Ue=null;ge!==null&&De<B.length;De++){ge.index>De?(Ue=ge,ge=null):Ue=ge.sibling;var He=U(D,ge,B[De],Y);if(He===null){ge===null&&(ge=Ue);break}t&&ge&&He.alternate===null&&a(D,ge),T=m(He,T,De),Ge===null?ve=He:Ge.sibling=He,Ge=He,ge=Ue}if(De===B.length)return s(D,ge),Ie&&sa(D,De),ve;if(ge===null){for(;De<B.length;De++)ge=W(D,B[De],Y),ge!==null&&(T=m(ge,T,De),Ge===null?ve=ge:Ge.sibling=ge,Ge=ge);return Ie&&sa(D,De),ve}for(ge=o(ge);De<B.length;De++)Ue=P(ge,D,De,B[De],Y),Ue!==null&&(t&&Ue.alternate!==null&&ge.delete(Ue.key===null?De:Ue.key),T=m(Ue,T,De),Ge===null?ve=Ue:Ge.sibling=Ue,Ge=Ue);return t&&ge.forEach(function(Wa){return a(D,Wa)}),Ie&&sa(D,De),ve}function je(D,T,B,Y){if(B==null)throw Error(r(151));for(var ve=null,Ge=null,ge=T,De=T=0,Ue=null,He=B.next();ge!==null&&!He.done;De++,He=B.next()){ge.index>De?(Ue=ge,ge=null):Ue=ge.sibling;var Wa=U(D,ge,He.value,Y);if(Wa===null){ge===null&&(ge=Ue);break}t&&ge&&Wa.alternate===null&&a(D,ge),T=m(Wa,T,De),Ge===null?ve=Wa:Ge.sibling=Wa,Ge=Wa,ge=Ue}if(He.done)return s(D,ge),Ie&&sa(D,De),ve;if(ge===null){for(;!He.done;De++,He=B.next())He=W(D,He.value,Y),He!==null&&(T=m(He,T,De),Ge===null?ve=He:Ge.sibling=He,Ge=He);return Ie&&sa(D,De),ve}for(ge=o(ge);!He.done;De++,He=B.next())He=P(ge,D,De,He.value,Y),He!==null&&(t&&He.alternate!==null&&ge.delete(He.key===null?De:He.key),T=m(He,T,De),Ge===null?ve=He:Ge.sibling=He,Ge=He);return t&&ge.forEach(function(uN){return a(D,uN)}),Ie&&sa(D,De),ve}function tt(D,T,B,Y){if(typeof B=="object"&&B!==null&&B.type===k&&B.key===null&&(B=B.props.children),typeof B=="object"&&B!==null){switch(B.$$typeof){case C:e:{for(var ve=B.key;T!==null;){if(T.key===ve){if(ve=B.type,ve===k){if(T.tag===7){s(D,T.sibling),Y=f(T,B.props.children),Y.return=D,D=Y;break e}}else if(T.elementType===ve||typeof ve=="object"&&ve!==null&&ve.$$typeof===R&&ki(ve)===T.type){s(D,T.sibling),Y=f(T,B.props),Lr(Y,B),Y.return=D,D=Y;break e}s(D,T);break}else a(D,T);T=T.sibling}B.type===k?(Y=xi(B.props.children,D.mode,Y,B.key),Y.return=D,D=Y):(Y=ol(B.type,B.key,B.props,null,D.mode,Y),Lr(Y,B),Y.return=D,D=Y)}return S(D);case O:e:{for(ve=B.key;T!==null;){if(T.key===ve)if(T.tag===4&&T.stateNode.containerInfo===B.containerInfo&&T.stateNode.implementation===B.implementation){s(D,T.sibling),Y=f(T,B.children||[]),Y.return=D,D=Y;break e}else{s(D,T);break}else a(D,T);T=T.sibling}Y=Hu(B,D.mode,Y),Y.return=D,D=Y}return S(D);case R:return B=ki(B),tt(D,T,B,Y)}if(we(B))return pe(D,T,B,Y);if(Se(B)){if(ve=Se(B),typeof ve!="function")throw Error(r(150));return B=ve.call(B),je(D,T,B,Y)}if(typeof B.then=="function")return tt(D,T,ml(B),Y);if(B.$$typeof===F)return tt(D,T,ul(D,B),Y);hl(D,B)}return typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint"?(B=""+B,T!==null&&T.tag===6?(s(D,T.sibling),Y=f(T,B),Y.return=D,D=Y):(s(D,T),Y=Gu(B,D.mode,Y),Y.return=D,D=Y),S(D)):s(D,T)}return function(D,T,B,Y){try{Br=0;var ve=tt(D,T,B,Y);return Ss=null,ve}catch(ge){if(ge===vs||ge===fl)throw ge;var Ge=dn(29,ge,null,D.mode);return Ge.lanes=Y,Ge.return=D,Ge}}}var _i=Xh(!0),Jh=Xh(!1),Ba=!1;function ad(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function id(t,a){t=t.updateQueue,a.updateQueue===t&&(a.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function La(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function qa(t,a,s){var o=t.updateQueue;if(o===null)return null;if(o=o.shared,(Qe&2)!==0){var f=o.pending;return f===null?a.next=a:(a.next=f.next,f.next=a),o.pending=a,a=rl(t),Mh(t,null,s),a}return sl(t,o,a,s),rl(t)}function qr(t,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,Ko(t,s)}}function sd(t,a){var s=t.updateQueue,o=t.alternate;if(o!==null&&(o=o.updateQueue,s===o)){var f=null,m=null;if(s=s.firstBaseUpdate,s!==null){do{var S={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};m===null?f=m=S:m=m.next=S,s=s.next}while(s!==null);m===null?f=m=a:m=m.next=a}else f=m=a;s={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:o.shared,callbacks:o.callbacks},t.updateQueue=s;return}t=s.lastBaseUpdate,t===null?s.firstBaseUpdate=a:t.next=a,s.lastBaseUpdate=a}var rd=!1;function Ur(){if(rd){var t=bs;if(t!==null)throw t}}function $r(t,a,s,o){rd=!1;var f=t.updateQueue;Ba=!1;var m=f.firstBaseUpdate,S=f.lastBaseUpdate,j=f.shared.pending;if(j!==null){f.shared.pending=null;var _=j,L=_.next;_.next=null,S===null?m=L:S.next=L,S=_;var Q=t.alternate;Q!==null&&(Q=Q.updateQueue,j=Q.lastBaseUpdate,j!==S&&(j===null?Q.firstBaseUpdate=L:j.next=L,Q.lastBaseUpdate=_))}if(m!==null){var W=f.baseState;S=0,Q=L=_=null,j=m;do{var U=j.lane&-536870913,P=U!==j.lane;if(P?(qe&U)===U:(o&U)===U){U!==0&&U===ys&&(rd=!0),Q!==null&&(Q=Q.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var pe=t,je=j;U=a;var tt=s;switch(je.tag){case 1:if(pe=je.payload,typeof pe=="function"){W=pe.call(tt,W,U);break e}W=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=je.payload,U=typeof pe=="function"?pe.call(tt,W,U):pe,U==null)break e;W=w({},W,U);break e;case 2:Ba=!0}}U=j.callback,U!==null&&(t.flags|=64,P&&(t.flags|=8192),P=f.callbacks,P===null?f.callbacks=[U]:P.push(U))}else P={lane:U,tag:j.tag,payload:j.payload,callback:j.callback,next:null},Q===null?(L=Q=P,_=W):Q=Q.next=P,S|=U;if(j=j.next,j===null){if(j=f.shared.pending,j===null)break;P=j,j=P.next,P.next=null,f.lastBaseUpdate=P,f.shared.pending=null}}while(!0);Q===null&&(_=W),f.baseState=_,f.firstBaseUpdate=L,f.lastBaseUpdate=Q,m===null&&(f.shared.lanes=0),Va|=S,t.lanes=S,t.memoizedState=W}}function Wh(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function eg(t,a){var s=t.callbacks;if(s!==null)for(t.callbacks=null,t=0;t<s.length;t++)Wh(s[t],a)}var xs=Pe(null),gl=Pe(0);function tg(t,a){t=ga,ue(gl,t),ue(xs,a),ga=t|a.baseLanes}function od(){ue(gl,ga),ue(xs,xs.current)}function ld(){ga=gl.current,J(xs),J(gl)}var fn=Pe(null),An=null;function Ua(t){var a=t.alternate;ue(St,St.current&1),ue(fn,t),An===null&&(a===null||xs.current!==null||a.memoizedState!==null)&&(An=t)}function cd(t){ue(St,St.current),ue(fn,t),An===null&&(An=t)}function ng(t){t.tag===22?(ue(St,St.current),ue(fn,t),An===null&&(An=t)):$a()}function $a(){ue(St,St.current),ue(fn,fn.current)}function pn(t){J(fn),An===t&&(An=null),J(St)}var St=Pe(0);function yl(t){for(var a=t;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||gf(s)||yf(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var la=0,Oe=null,We=null,Ct=null,bl=!1,ws=!1,Ti=!1,vl=0,Ir=0,js=null,ej=0;function yt(){throw Error(r(321))}function ud(t,a){if(a===null)return!1;for(var s=0;s<a.length&&s<t.length;s++)if(!un(t[s],a[s]))return!1;return!0}function dd(t,a,s,o,f,m){return la=m,Oe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,I.H=t===null||t.memoizedState===null?Ug:kd,Ti=!1,m=s(o,f),Ti=!1,ws&&(m=ig(a,s,o,f)),ag(t),m}function ag(t){I.H=Gr;var a=We!==null&&We.next!==null;if(la=0,Ct=We=Oe=null,bl=!1,Ir=0,js=null,a)throw Error(r(300));t===null||_t||(t=t.dependencies,t!==null&&cl(t)&&(_t=!0))}function ig(t,a,s,o){Oe=t;var f=0;do{if(ws&&(js=null),Ir=0,ws=!1,25<=f)throw Error(r(301));if(f+=1,Ct=We=null,t.updateQueue!=null){var m=t.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}I.H=$g,m=a(s,o)}while(ws);return m}function tj(){var t=I.H,a=t.useState()[0];return a=typeof a.then=="function"?Pr(a):a,t=t.useState()[0],(We!==null?We.memoizedState:null)!==t&&(Oe.flags|=1024),a}function fd(){var t=vl!==0;return vl=0,t}function pd(t,a,s){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~s}function md(t){if(bl){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}bl=!1}la=0,Ct=We=Oe=null,ws=!1,Ir=vl=0,js=null}function Qt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Oe.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function xt(){if(We===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=We.next;var a=Ct===null?Oe.memoizedState:Ct.next;if(a!==null)Ct=a,We=t;else{if(t===null)throw Oe.alternate===null?Error(r(467)):Error(r(310));We=t,t={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Ct===null?Oe.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function Sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pr(t){var a=Ir;return Ir+=1,js===null&&(js=[]),t=Zh(js,t,a),a=Oe,(Ct===null?a.memoizedState:Ct.next)===null&&(a=a.alternate,I.H=a===null||a.memoizedState===null?Ug:kd),t}function xl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Pr(t);if(t.$$typeof===F)return It(t)}throw Error(r(438,String(t)))}function hd(t){var a=null,s=Oe.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var o=Oe.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(a={data:o.data.map(function(f){return f.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=Sl(),Oe.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(t),o=0;o<t;o++)s[o]=ye;return a.index++,s}function ca(t,a){return typeof a=="function"?a(t):a}function wl(t){var a=xt();return gd(a,We,t)}function gd(t,a,s){var o=t.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=s;var f=t.baseQueue,m=o.pending;if(m!==null){if(f!==null){var S=f.next;f.next=m.next,m.next=S}a.baseQueue=f=m,o.pending=null}if(m=t.baseState,f===null)t.memoizedState=m;else{a=f.next;var j=S=null,_=null,L=a,Q=!1;do{var W=L.lane&-536870913;if(W!==L.lane?(qe&W)===W:(la&W)===W){var U=L.revertLane;if(U===0)_!==null&&(_=_.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),W===ys&&(Q=!0);else if((la&U)===U){L=L.next,U===ys&&(Q=!0);continue}else W={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},_===null?(j=_=W,S=m):_=_.next=W,Oe.lanes|=U,Va|=U;W=L.action,Ti&&s(m,W),m=L.hasEagerState?L.eagerState:s(m,W)}else U={lane:W,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},_===null?(j=_=U,S=m):_=_.next=U,Oe.lanes|=W,Va|=W;L=L.next}while(L!==null&&L!==a);if(_===null?S=m:_.next=j,!un(m,t.memoizedState)&&(_t=!0,Q&&(s=bs,s!==null)))throw s;t.memoizedState=m,t.baseState=S,t.baseQueue=_,o.lastRenderedState=m}return f===null&&(o.lanes=0),[t.memoizedState,o.dispatch]}function yd(t){var a=xt(),s=a.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=t;var o=s.dispatch,f=s.pending,m=a.memoizedState;if(f!==null){s.pending=null;var S=f=f.next;do m=t(m,S.action),S=S.next;while(S!==f);un(m,a.memoizedState)||(_t=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),s.lastRenderedState=m}return[m,o]}function sg(t,a,s){var o=Oe,f=xt(),m=Ie;if(m){if(s===void 0)throw Error(r(407));s=s()}else s=a();var S=!un((We||f).memoizedState,s);if(S&&(f.memoizedState=s,_t=!0),f=f.queue,Sd(lg.bind(null,o,f,t),[t]),f.getSnapshot!==a||S||Ct!==null&&Ct.memoizedState.tag&1){if(o.flags|=2048,Ns(9,{destroy:void 0},og.bind(null,o,f,s,a),null),at===null)throw Error(r(349));m||(la&127)!==0||rg(o,a,s)}return s}function rg(t,a,s){t.flags|=16384,t={getSnapshot:a,value:s},a=Oe.updateQueue,a===null?(a=Sl(),Oe.updateQueue=a,a.stores=[t]):(s=a.stores,s===null?a.stores=[t]:s.push(t))}function og(t,a,s,o){a.value=s,a.getSnapshot=o,cg(a)&&ug(t)}function lg(t,a,s){return s(function(){cg(a)&&ug(t)})}function cg(t){var a=t.getSnapshot;t=t.value;try{var s=a();return!un(t,s)}catch{return!0}}function ug(t){var a=Si(t,2);a!==null&&on(a,t,2)}function bd(t){var a=Qt();if(typeof t=="function"){var s=t;if(t=s(),Ti){qt(!0);try{s()}finally{qt(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:t},a}function dg(t,a,s,o){return t.baseState=s,gd(t,We,typeof o=="function"?o:ca)}function nj(t,a,s,o,f){if(Al(t))throw Error(r(485));if(t=a.action,t!==null){var m={payload:f,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};I.T!==null?s(!0):m.isTransition=!1,o(m),s=a.pending,s===null?(m.next=a.pending=m,fg(a,m)):(m.next=s.next,a.pending=s.next=m)}}function fg(t,a){var s=a.action,o=a.payload,f=t.state;if(a.isTransition){var m=I.T,S={};I.T=S;try{var j=s(f,o),_=I.S;_!==null&&_(S,j),pg(t,a,j)}catch(L){vd(t,a,L)}finally{m!==null&&S.types!==null&&(m.types=S.types),I.T=m}}else try{m=s(f,o),pg(t,a,m)}catch(L){vd(t,a,L)}}function pg(t,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(o){mg(t,a,o)},function(o){return vd(t,a,o)}):mg(t,a,s)}function mg(t,a,s){a.status="fulfilled",a.value=s,hg(a),t.state=s,a=t.pending,a!==null&&(s=a.next,s===a?t.pending=null:(s=s.next,a.next=s,fg(t,s)))}function vd(t,a,s){var o=t.pending;if(t.pending=null,o!==null){o=o.next;do a.status="rejected",a.reason=s,hg(a),a=a.next;while(a!==o)}t.action=null}function hg(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function gg(t,a){return a}function yg(t,a){if(Ie){var s=at.formState;if(s!==null){e:{var o=Oe;if(Ie){if(lt){t:{for(var f=lt,m=Nn;f.nodeType!==8;){if(!m){f=null;break t}if(f=kn(f.nextSibling),f===null){f=null;break t}}m=f.data,f=m==="F!"||m==="F"?f:null}if(f){lt=kn(f.nextSibling),o=f.data==="F!";break e}}Ra(o)}o=!1}o&&(a=s[0])}}return s=Qt(),s.memoizedState=s.baseState=a,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gg,lastRenderedState:a},s.queue=o,s=Bg.bind(null,Oe,o),o.dispatch=s,o=bd(!1),m=Ad.bind(null,Oe,!1,o.queue),o=Qt(),f={state:a,dispatch:null,action:t,pending:null},o.queue=f,s=nj.bind(null,Oe,f,m,s),f.dispatch=s,o.memoizedState=t,[a,s,!1]}function bg(t){var a=xt();return vg(a,We,t)}function vg(t,a,s){if(a=gd(t,a,gg)[0],t=wl(ca)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var o=Pr(a)}catch(S){throw S===vs?fl:S}else o=a;a=xt();var f=a.queue,m=f.dispatch;return s!==a.memoizedState&&(Oe.flags|=2048,Ns(9,{destroy:void 0},aj.bind(null,f,s),null)),[o,m,t]}function aj(t,a){t.action=a}function Sg(t){var a=xt(),s=We;if(s!==null)return vg(a,s,t);xt(),a=a.memoizedState,s=xt();var o=s.queue.dispatch;return s.memoizedState=t,[a,o,!1]}function Ns(t,a,s,o){return t={tag:t,create:s,deps:o,inst:a,next:null},a=Oe.updateQueue,a===null&&(a=Sl(),Oe.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=t.next=t:(o=s.next,s.next=t,t.next=o,a.lastEffect=t),t}function xg(){return xt().memoizedState}function jl(t,a,s,o){var f=Qt();Oe.flags|=t,f.memoizedState=Ns(1|a,{destroy:void 0},s,o===void 0?null:o)}function Nl(t,a,s,o){var f=xt();o=o===void 0?null:o;var m=f.memoizedState.inst;We!==null&&o!==null&&ud(o,We.memoizedState.deps)?f.memoizedState=Ns(a,m,s,o):(Oe.flags|=t,f.memoizedState=Ns(1|a,m,s,o))}function wg(t,a){jl(8390656,8,t,a)}function Sd(t,a){Nl(2048,8,t,a)}function ij(t){Oe.flags|=4;var a=Oe.updateQueue;if(a===null)a=Sl(),Oe.updateQueue=a,a.events=[t];else{var s=a.events;s===null?a.events=[t]:s.push(t)}}function jg(t){var a=xt().memoizedState;return ij({ref:a,nextImpl:t}),function(){if((Qe&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Ng(t,a){return Nl(4,2,t,a)}function Ag(t,a){return Nl(4,4,t,a)}function kg(t,a){if(typeof a=="function"){t=t();var s=a(t);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Cg(t,a,s){s=s!=null?s.concat([t]):null,Nl(4,4,kg.bind(null,a,t),s)}function xd(){}function _g(t,a){var s=xt();a=a===void 0?null:a;var o=s.memoizedState;return a!==null&&ud(a,o[1])?o[0]:(s.memoizedState=[t,a],t)}function Tg(t,a){var s=xt();a=a===void 0?null:a;var o=s.memoizedState;if(a!==null&&ud(a,o[1]))return o[0];if(o=t(),Ti){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[o,a],o}function wd(t,a,s){return s===void 0||(la&1073741824)!==0&&(qe&261930)===0?t.memoizedState=a:(t.memoizedState=s,t=Ey(),Oe.lanes|=t,Va|=t,s)}function Eg(t,a,s,o){return un(s,a)?s:xs.current!==null?(t=wd(t,s,o),un(t,a)||(_t=!0),t):(la&42)===0||(la&1073741824)!==0&&(qe&261930)===0?(_t=!0,t.memoizedState=s):(t=Ey(),Oe.lanes|=t,Va|=t,a)}function Og(t,a,s,o,f){var m=ne.p;ne.p=m!==0&&8>m?m:8;var S=I.T,j={};I.T=j,Ad(t,!1,a,s);try{var _=f(),L=I.S;if(L!==null&&L(j,_),_!==null&&typeof _=="object"&&typeof _.then=="function"){var Q=Ww(_,o);Vr(t,a,Q,gn(t))}else Vr(t,a,o,gn(t))}catch(W){Vr(t,a,{then:function(){},status:"rejected",reason:W},gn())}finally{ne.p=m,S!==null&&j.types!==null&&(S.types=j.types),I.T=S}}function sj(){}function jd(t,a,s,o){if(t.tag!==5)throw Error(r(476));var f=Dg(t).queue;Og(t,f,a,V,s===null?sj:function(){return zg(t),s(o)})}function Dg(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:V},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:s},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function zg(t){var a=Dg(t);a.next===null&&(a=t.alternate.memoizedState),Vr(t,a.next.queue,{},gn())}function Nd(){return It(ro)}function Rg(){return xt().memoizedState}function Mg(){return xt().memoizedState}function rj(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var s=gn();t=La(s);var o=qa(a,t,s);o!==null&&(on(o,a,s),qr(o,a,s)),a={cache:Wu()},t.payload=a;return}a=a.return}}function oj(t,a,s){var o=gn();s={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Al(t)?Lg(a,s):(s=Pu(t,a,s,o),s!==null&&(on(s,t,o),qg(s,a,o)))}function Bg(t,a,s){var o=gn();Vr(t,a,s,o)}function Vr(t,a,s,o){var f={lane:o,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Al(t))Lg(a,f);else{var m=t.alternate;if(t.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var S=a.lastRenderedState,j=m(S,s);if(f.hasEagerState=!0,f.eagerState=j,un(j,S))return sl(t,a,f,0),at===null&&il(),!1}catch{}if(s=Pu(t,a,f,o),s!==null)return on(s,t,o),qg(s,a,o),!0}return!1}function Ad(t,a,s,o){if(o={lane:2,revertLane:af(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Al(t)){if(a)throw Error(r(479))}else a=Pu(t,s,o,2),a!==null&&on(a,t,2)}function Al(t){var a=t.alternate;return t===Oe||a!==null&&a===Oe}function Lg(t,a){ws=bl=!0;var s=t.pending;s===null?a.next=a:(a.next=s.next,s.next=a),t.pending=a}function qg(t,a,s){if((s&4194048)!==0){var o=a.lanes;o&=t.pendingLanes,s|=o,a.lanes=s,Ko(t,s)}}var Gr={readContext:It,use:xl,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};Gr.useEffectEvent=yt;var Ug={readContext:It,use:xl,useCallback:function(t,a){return Qt().memoizedState=[t,a===void 0?null:a],t},useContext:It,useEffect:wg,useImperativeHandle:function(t,a,s){s=s!=null?s.concat([t]):null,jl(4194308,4,kg.bind(null,a,t),s)},useLayoutEffect:function(t,a){return jl(4194308,4,t,a)},useInsertionEffect:function(t,a){jl(4,2,t,a)},useMemo:function(t,a){var s=Qt();a=a===void 0?null:a;var o=t();if(Ti){qt(!0);try{t()}finally{qt(!1)}}return s.memoizedState=[o,a],o},useReducer:function(t,a,s){var o=Qt();if(s!==void 0){var f=s(a);if(Ti){qt(!0);try{s(a)}finally{qt(!1)}}}else f=a;return o.memoizedState=o.baseState=f,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:f},o.queue=t,t=t.dispatch=oj.bind(null,Oe,t),[o.memoizedState,t]},useRef:function(t){var a=Qt();return t={current:t},a.memoizedState=t},useState:function(t){t=bd(t);var a=t.queue,s=Bg.bind(null,Oe,a);return a.dispatch=s,[t.memoizedState,s]},useDebugValue:xd,useDeferredValue:function(t,a){var s=Qt();return wd(s,t,a)},useTransition:function(){var t=bd(!1);return t=Og.bind(null,Oe,t.queue,!0,!1),Qt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,s){var o=Oe,f=Qt();if(Ie){if(s===void 0)throw Error(r(407));s=s()}else{if(s=a(),at===null)throw Error(r(349));(qe&127)!==0||rg(o,a,s)}f.memoizedState=s;var m={value:s,getSnapshot:a};return f.queue=m,wg(lg.bind(null,o,m,t),[t]),o.flags|=2048,Ns(9,{destroy:void 0},og.bind(null,o,m,s,a),null),s},useId:function(){var t=Qt(),a=at.identifierPrefix;if(Ie){var s=Zn,o=Qn;s=(o&~(1<<32-Ot(o)-1)).toString(32)+s,a="_"+a+"R_"+s,s=vl++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=ej++,a="_"+a+"r_"+s.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Nd,useFormState:yg,useActionState:yg,useOptimistic:function(t){var a=Qt();a.memoizedState=a.baseState=t;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=Ad.bind(null,Oe,!0,s),s.dispatch=a,[t,a]},useMemoCache:hd,useCacheRefresh:function(){return Qt().memoizedState=rj.bind(null,Oe)},useEffectEvent:function(t){var a=Qt(),s={impl:t};return a.memoizedState=s,function(){if((Qe&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}},kd={readContext:It,use:xl,useCallback:_g,useContext:It,useEffect:Sd,useImperativeHandle:Cg,useInsertionEffect:Ng,useLayoutEffect:Ag,useMemo:Tg,useReducer:wl,useRef:xg,useState:function(){return wl(ca)},useDebugValue:xd,useDeferredValue:function(t,a){var s=xt();return Eg(s,We.memoizedState,t,a)},useTransition:function(){var t=wl(ca)[0],a=xt().memoizedState;return[typeof t=="boolean"?t:Pr(t),a]},useSyncExternalStore:sg,useId:Rg,useHostTransitionStatus:Nd,useFormState:bg,useActionState:bg,useOptimistic:function(t,a){var s=xt();return dg(s,We,t,a)},useMemoCache:hd,useCacheRefresh:Mg};kd.useEffectEvent=jg;var $g={readContext:It,use:xl,useCallback:_g,useContext:It,useEffect:Sd,useImperativeHandle:Cg,useInsertionEffect:Ng,useLayoutEffect:Ag,useMemo:Tg,useReducer:yd,useRef:xg,useState:function(){return yd(ca)},useDebugValue:xd,useDeferredValue:function(t,a){var s=xt();return We===null?wd(s,t,a):Eg(s,We.memoizedState,t,a)},useTransition:function(){var t=yd(ca)[0],a=xt().memoizedState;return[typeof t=="boolean"?t:Pr(t),a]},useSyncExternalStore:sg,useId:Rg,useHostTransitionStatus:Nd,useFormState:Sg,useActionState:Sg,useOptimistic:function(t,a){var s=xt();return We!==null?dg(s,We,t,a):(s.baseState=t,[t,s.queue.dispatch])},useMemoCache:hd,useCacheRefresh:Mg};$g.useEffectEvent=jg;function Cd(t,a,s,o){a=t.memoizedState,s=s(o,a),s=s==null?a:w({},a,s),t.memoizedState=s,t.lanes===0&&(t.updateQueue.baseState=s)}var _d={enqueueSetState:function(t,a,s){t=t._reactInternals;var o=gn(),f=La(o);f.payload=a,s!=null&&(f.callback=s),a=qa(t,f,o),a!==null&&(on(a,t,o),qr(a,t,o))},enqueueReplaceState:function(t,a,s){t=t._reactInternals;var o=gn(),f=La(o);f.tag=1,f.payload=a,s!=null&&(f.callback=s),a=qa(t,f,o),a!==null&&(on(a,t,o),qr(a,t,o))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var s=gn(),o=La(s);o.tag=2,a!=null&&(o.callback=a),a=qa(t,o,s),a!==null&&(on(a,t,s),qr(a,t,s))}};function Ig(t,a,s,o,f,m,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(o,m,S):a.prototype&&a.prototype.isPureReactComponent?!Er(s,o)||!Er(f,m):!0}function Pg(t,a,s,o){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,o),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,o),a.state!==t&&_d.enqueueReplaceState(a,a.state,null)}function Ei(t,a){var s=a;if("ref"in a){s={};for(var o in a)o!=="ref"&&(s[o]=a[o])}if(t=t.defaultProps){s===a&&(s=w({},s));for(var f in t)s[f]===void 0&&(s[f]=t[f])}return s}function Vg(t){al(t)}function Gg(t){console.error(t)}function Hg(t){al(t)}function kl(t,a){try{var s=t.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(o){setTimeout(function(){throw o})}}function Kg(t,a,s){try{var o=t.onCaughtError;o(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Td(t,a,s){return s=La(s),s.tag=3,s.payload={element:null},s.callback=function(){kl(t,a)},s}function Qg(t){return t=La(t),t.tag=3,t}function Zg(t,a,s,o){var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var m=o.value;t.payload=function(){return f(m)},t.callback=function(){Kg(a,s,o)}}var S=s.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){Kg(a,s,o),typeof f!="function"&&(Ga===null?Ga=new Set([this]):Ga.add(this));var j=o.stack;this.componentDidCatch(o.value,{componentStack:j!==null?j:""})})}function lj(t,a,s,o,f){if(s.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(a=s.alternate,a!==null&&gs(a,s,f,!0),s=fn.current,s!==null){switch(s.tag){case 31:case 13:return An===null?ql():s.alternate===null&&bt===0&&(bt=3),s.flags&=-257,s.flags|=65536,s.lanes=f,o===pl?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([o]):a.add(o),ef(t,o,f)),!1;case 22:return s.flags|=65536,o===pl?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([o])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([o]):s.add(o)),ef(t,o,f)),!1}throw Error(r(435,s.tag))}return ef(t,o,f),ql(),!1}if(Ie)return a=fn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=f,o!==Zu&&(t=Error(r(422),{cause:o}),zr(xn(t,s)))):(o!==Zu&&(a=Error(r(423),{cause:o}),zr(xn(a,s))),t=t.current.alternate,t.flags|=65536,f&=-f,t.lanes|=f,o=xn(o,s),f=Td(t.stateNode,o,f),sd(t,f),bt!==4&&(bt=2)),!1;var m=Error(r(520),{cause:o});if(m=xn(m,s),Jr===null?Jr=[m]:Jr.push(m),bt!==4&&(bt=2),a===null)return!0;o=xn(o,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,t=f&-f,s.lanes|=t,t=Td(s.stateNode,o,t),sd(s,t),!1;case 1:if(a=s.type,m=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Ga===null||!Ga.has(m))))return s.flags|=65536,f&=-f,s.lanes|=f,f=Qg(f),Zg(f,t,s,o),sd(s,f),!1}s=s.return}while(s!==null);return!1}var Ed=Error(r(461)),_t=!1;function Pt(t,a,s,o){a.child=t===null?Jh(a,null,s,o):_i(a,t.child,s,o)}function Yg(t,a,s,o,f){s=s.render;var m=a.ref;if("ref"in o){var S={};for(var j in o)j!=="ref"&&(S[j]=o[j])}else S=o;return Ni(a),o=dd(t,a,s,S,m,f),j=fd(),t!==null&&!_t?(pd(t,a,f),ua(t,a,f)):(Ie&&j&&Ku(a),a.flags|=1,Pt(t,a,o,f),a.child)}function Fg(t,a,s,o,f){if(t===null){var m=s.type;return typeof m=="function"&&!Vu(m)&&m.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=m,Xg(t,a,m,o,f)):(t=ol(s.type,null,o,a,a.mode,f),t.ref=a.ref,t.return=a,a.child=t)}if(m=t.child,!qd(t,f)){var S=m.memoizedProps;if(s=s.compare,s=s!==null?s:Er,s(S,o)&&t.ref===a.ref)return ua(t,a,f)}return a.flags|=1,t=ia(m,o),t.ref=a.ref,t.return=a,a.child=t}function Xg(t,a,s,o,f){if(t!==null){var m=t.memoizedProps;if(Er(m,o)&&t.ref===a.ref)if(_t=!1,a.pendingProps=o=m,qd(t,f))(t.flags&131072)!==0&&(_t=!0);else return a.lanes=t.lanes,ua(t,a,f)}return Od(t,a,s,o,f)}function Jg(t,a,s,o){var f=o.children,m=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|s:s,t!==null){for(o=a.child=t.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~m}else o=0,a.child=null;return Wg(t,a,m,s,o)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&dl(a,m!==null?m.cachePool:null),m!==null?tg(a,m):od(),ng(a);else return o=a.lanes=536870912,Wg(t,a,m!==null?m.baseLanes|s:s,s,o)}else m!==null?(dl(a,m.cachePool),tg(a,m),$a(),a.memoizedState=null):(t!==null&&dl(a,null),od(),$a());return Pt(t,a,f,s),a.child}function Hr(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Wg(t,a,s,o,f){var m=td();return m=m===null?null:{parent:kt._currentValue,pool:m},a.memoizedState={baseLanes:s,cachePool:m},t!==null&&dl(a,null),od(),ng(a),t!==null&&gs(t,a,o,!0),a.childLanes=f,null}function Cl(t,a){return a=Tl({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function ey(t,a,s){return _i(a,t.child,null,s),t=Cl(a,a.pendingProps),t.flags|=2,pn(a),a.memoizedState=null,t}function cj(t,a,s){var o=a.pendingProps,f=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(Ie){if(o.mode==="hidden")return t=Cl(a,o),a.lanes=536870912,Hr(null,t);if(cd(a),(t=lt)?(t=fb(t,Nn),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Da!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},s=Lh(t),s.return=a,a.child=s,$t=a,lt=null)):t=null,t===null)throw Ra(a);return a.lanes=536870912,null}return Cl(a,o)}var m=t.memoizedState;if(m!==null){var S=m.dehydrated;if(cd(a),f)if(a.flags&256)a.flags&=-257,a=ey(t,a,s);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(_t||gs(t,a,s,!1),f=(s&t.childLanes)!==0,_t||f){if(o=at,o!==null&&(S=Kn(o,s),S!==0&&S!==m.retryLane))throw m.retryLane=S,Si(t,S),on(o,t,S),Ed;ql(),a=ey(t,a,s)}else t=m.treeContext,lt=kn(S.nextSibling),$t=a,Ie=!0,za=null,Nn=!1,t!==null&&$h(a,t),a=Cl(a,o),a.flags|=4096;return a}return t=ia(t.child,{mode:o.mode,children:o.children}),t.ref=a.ref,a.child=t,t.return=a,t}function _l(t,a){var s=a.ref;if(s===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(r(284));(t===null||t.ref!==s)&&(a.flags|=4194816)}}function Od(t,a,s,o,f){return Ni(a),s=dd(t,a,s,o,void 0,f),o=fd(),t!==null&&!_t?(pd(t,a,f),ua(t,a,f)):(Ie&&o&&Ku(a),a.flags|=1,Pt(t,a,s,f),a.child)}function ty(t,a,s,o,f,m){return Ni(a),a.updateQueue=null,s=ig(a,o,s,f),ag(t),o=fd(),t!==null&&!_t?(pd(t,a,m),ua(t,a,m)):(Ie&&o&&Ku(a),a.flags|=1,Pt(t,a,s,m),a.child)}function ny(t,a,s,o,f){if(Ni(a),a.stateNode===null){var m=fs,S=s.contextType;typeof S=="object"&&S!==null&&(m=It(S)),m=new s(o,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=_d,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=o,m.state=a.memoizedState,m.refs={},ad(a),S=s.contextType,m.context=typeof S=="object"&&S!==null?It(S):fs,m.state=a.memoizedState,S=s.getDerivedStateFromProps,typeof S=="function"&&(Cd(a,s,S,o),m.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&_d.enqueueReplaceState(m,m.state,null),$r(a,o,m,f),Ur(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!0}else if(t===null){m=a.stateNode;var j=a.memoizedProps,_=Ei(s,j);m.props=_;var L=m.context,Q=s.contextType;S=fs,typeof Q=="object"&&Q!==null&&(S=It(Q));var W=s.getDerivedStateFromProps;Q=typeof W=="function"||typeof m.getSnapshotBeforeUpdate=="function",j=a.pendingProps!==j,Q||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(j||L!==S)&&Pg(a,m,o,S),Ba=!1;var U=a.memoizedState;m.state=U,$r(a,o,m,f),Ur(),L=a.memoizedState,j||U!==L||Ba?(typeof W=="function"&&(Cd(a,s,W,o),L=a.memoizedState),(_=Ba||Ig(a,s,_,o,U,L,S))?(Q||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=o,a.memoizedState=L),m.props=o,m.state=L,m.context=S,o=_):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),o=!1)}else{m=a.stateNode,id(t,a),S=a.memoizedProps,Q=Ei(s,S),m.props=Q,W=a.pendingProps,U=m.context,L=s.contextType,_=fs,typeof L=="object"&&L!==null&&(_=It(L)),j=s.getDerivedStateFromProps,(L=typeof j=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==W||U!==_)&&Pg(a,m,o,_),Ba=!1,U=a.memoizedState,m.state=U,$r(a,o,m,f),Ur();var P=a.memoizedState;S!==W||U!==P||Ba||t!==null&&t.dependencies!==null&&cl(t.dependencies)?(typeof j=="function"&&(Cd(a,s,j,o),P=a.memoizedState),(Q=Ba||Ig(a,s,Q,o,U,P,_)||t!==null&&t.dependencies!==null&&cl(t.dependencies))?(L||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(o,P,_),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(o,P,_)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),a.memoizedProps=o,a.memoizedState=P),m.props=o,m.state=P,m.context=_,o=Q):(typeof m.componentDidUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&U===t.memoizedState||(a.flags|=1024),o=!1)}return m=o,_l(t,a),o=(a.flags&128)!==0,m||o?(m=a.stateNode,s=o&&typeof s.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,t!==null&&o?(a.child=_i(a,t.child,null,f),a.child=_i(a,null,s,f)):Pt(t,a,s,f),a.memoizedState=m.state,t=a.child):t=ua(t,a,f),t}function ay(t,a,s,o){return wi(),a.flags|=256,Pt(t,a,s,o),a.child}var Dd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zd(t){return{baseLanes:t,cachePool:Kh()}}function Rd(t,a,s){return t=t!==null?t.childLanes&~s:0,a&&(t|=hn),t}function iy(t,a,s){var o=a.pendingProps,f=!1,m=(a.flags&128)!==0,S;if((S=m)||(S=t!==null&&t.memoizedState===null?!1:(St.current&2)!==0),S&&(f=!0,a.flags&=-129),S=(a.flags&32)!==0,a.flags&=-33,t===null){if(Ie){if(f?Ua(a):$a(),(t=lt)?(t=fb(t,Nn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:Da!==null?{id:Qn,overflow:Zn}:null,retryLane:536870912,hydrationErrors:null},s=Lh(t),s.return=a,a.child=s,$t=a,lt=null)):t=null,t===null)throw Ra(a);return yf(t)?a.lanes=32:a.lanes=536870912,null}var j=o.children;return o=o.fallback,f?($a(),f=a.mode,j=Tl({mode:"hidden",children:j},f),o=xi(o,f,s,null),j.return=a,o.return=a,j.sibling=o,a.child=j,o=a.child,o.memoizedState=zd(s),o.childLanes=Rd(t,S,s),a.memoizedState=Dd,Hr(null,o)):(Ua(a),Md(a,j))}var _=t.memoizedState;if(_!==null&&(j=_.dehydrated,j!==null)){if(m)a.flags&256?(Ua(a),a.flags&=-257,a=Bd(t,a,s)):a.memoizedState!==null?($a(),a.child=t.child,a.flags|=128,a=null):($a(),j=o.fallback,f=a.mode,o=Tl({mode:"visible",children:o.children},f),j=xi(j,f,s,null),j.flags|=2,o.return=a,j.return=a,o.sibling=j,a.child=o,_i(a,t.child,null,s),o=a.child,o.memoizedState=zd(s),o.childLanes=Rd(t,S,s),a.memoizedState=Dd,a=Hr(null,o));else if(Ua(a),yf(j)){if(S=j.nextSibling&&j.nextSibling.dataset,S)var L=S.dgst;S=L,o=Error(r(419)),o.stack="",o.digest=S,zr({value:o,source:null,stack:null}),a=Bd(t,a,s)}else if(_t||gs(t,a,s,!1),S=(s&t.childLanes)!==0,_t||S){if(S=at,S!==null&&(o=Kn(S,s),o!==0&&o!==_.retryLane))throw _.retryLane=o,Si(t,o),on(S,t,o),Ed;gf(j)||ql(),a=Bd(t,a,s)}else gf(j)?(a.flags|=192,a.child=t.child,a=null):(t=_.treeContext,lt=kn(j.nextSibling),$t=a,Ie=!0,za=null,Nn=!1,t!==null&&$h(a,t),a=Md(a,o.children),a.flags|=4096);return a}return f?($a(),j=o.fallback,f=a.mode,_=t.child,L=_.sibling,o=ia(_,{mode:"hidden",children:o.children}),o.subtreeFlags=_.subtreeFlags&65011712,L!==null?j=ia(L,j):(j=xi(j,f,s,null),j.flags|=2),j.return=a,o.return=a,o.sibling=j,a.child=o,Hr(null,o),o=a.child,j=t.child.memoizedState,j===null?j=zd(s):(f=j.cachePool,f!==null?(_=kt._currentValue,f=f.parent!==_?{parent:_,pool:_}:f):f=Kh(),j={baseLanes:j.baseLanes|s,cachePool:f}),o.memoizedState=j,o.childLanes=Rd(t,S,s),a.memoizedState=Dd,Hr(t.child,o)):(Ua(a),s=t.child,t=s.sibling,s=ia(s,{mode:"visible",children:o.children}),s.return=a,s.sibling=null,t!==null&&(S=a.deletions,S===null?(a.deletions=[t],a.flags|=16):S.push(t)),a.child=s,a.memoizedState=null,s)}function Md(t,a){return a=Tl({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Tl(t,a){return t=dn(22,t,null,a),t.lanes=0,t}function Bd(t,a,s){return _i(a,t.child,null,s),t=Md(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function sy(t,a,s){t.lanes|=a;var o=t.alternate;o!==null&&(o.lanes|=a),Xu(t.return,a,s)}function Ld(t,a,s,o,f,m){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:o,tail:s,tailMode:f,treeForkCount:m}:(S.isBackwards=a,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=s,S.tailMode=f,S.treeForkCount=m)}function ry(t,a,s){var o=a.pendingProps,f=o.revealOrder,m=o.tail;o=o.children;var S=St.current,j=(S&2)!==0;if(j?(S=S&1|2,a.flags|=128):S&=1,ue(St,S),Pt(t,a,o,s),o=Ie?Dr:0,!j&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&sy(t,s,a);else if(t.tag===19)sy(t,s,a);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===a)break e;for(;t.sibling===null;){if(t.return===null||t.return===a)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(f){case"forwards":for(s=a.child,f=null;s!==null;)t=s.alternate,t!==null&&yl(t)===null&&(f=s),s=s.sibling;s=f,s===null?(f=a.child,a.child=null):(f=s.sibling,s.sibling=null),Ld(a,!1,f,s,m,o);break;case"backwards":case"unstable_legacy-backwards":for(s=null,f=a.child,a.child=null;f!==null;){if(t=f.alternate,t!==null&&yl(t)===null){a.child=f;break}t=f.sibling,f.sibling=s,s=f,f=t}Ld(a,!0,s,null,m,o);break;case"together":Ld(a,!1,null,null,void 0,o);break;default:a.memoizedState=null}return a.child}function ua(t,a,s){if(t!==null&&(a.dependencies=t.dependencies),Va|=a.lanes,(s&a.childLanes)===0)if(t!==null){if(gs(t,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(t!==null&&a.child!==t.child)throw Error(r(153));if(a.child!==null){for(t=a.child,s=ia(t,t.pendingProps),a.child=s,s.return=a;t.sibling!==null;)t=t.sibling,s=s.sibling=ia(t,t.pendingProps),s.return=a;s.sibling=null}return a.child}function qd(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&cl(t)))}function uj(t,a,s){switch(a.tag){case 3:it(a,a.stateNode.containerInfo),Ma(a,kt,t.memoizedState.cache),wi();break;case 27:case 5:Ve(a);break;case 4:it(a,a.stateNode.containerInfo);break;case 10:Ma(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,cd(a),null;break;case 13:var o=a.memoizedState;if(o!==null)return o.dehydrated!==null?(Ua(a),a.flags|=128,null):(s&a.child.childLanes)!==0?iy(t,a,s):(Ua(a),t=ua(t,a,s),t!==null?t.sibling:null);Ua(a);break;case 19:var f=(t.flags&128)!==0;if(o=(s&a.childLanes)!==0,o||(gs(t,a,s,!1),o=(s&a.childLanes)!==0),f){if(o)return ry(t,a,s);a.flags|=128}if(f=a.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),ue(St,St.current),o)break;return null;case 22:return a.lanes=0,Jg(t,a,s,a.pendingProps);case 24:Ma(a,kt,t.memoizedState.cache)}return ua(t,a,s)}function oy(t,a,s){if(t!==null)if(t.memoizedProps!==a.pendingProps)_t=!0;else{if(!qd(t,s)&&(a.flags&128)===0)return _t=!1,uj(t,a,s);_t=(t.flags&131072)!==0}else _t=!1,Ie&&(a.flags&1048576)!==0&&Uh(a,Dr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var o=a.pendingProps;if(t=ki(a.elementType),a.type=t,typeof t=="function")Vu(t)?(o=Ei(t,o),a.tag=1,a=ny(null,a,t,o,s)):(a.tag=0,a=Od(null,a,t,o,s));else{if(t!=null){var f=t.$$typeof;if(f===H){a.tag=11,a=Yg(null,a,t,o,s);break e}else if(f===z){a.tag=14,a=Fg(null,a,t,o,s);break e}}throw a=ot(t)||t,Error(r(306,a,""))}}return a;case 0:return Od(t,a,a.type,a.pendingProps,s);case 1:return o=a.type,f=Ei(o,a.pendingProps),ny(t,a,o,f,s);case 3:e:{if(it(a,a.stateNode.containerInfo),t===null)throw Error(r(387));o=a.pendingProps;var m=a.memoizedState;f=m.element,id(t,a),$r(a,o,null,s);var S=a.memoizedState;if(o=S.cache,Ma(a,kt,o),o!==m.cache&&Ju(a,[kt],s,!0),Ur(),o=S.element,m.isDehydrated)if(m={element:o,isDehydrated:!1,cache:S.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=ay(t,a,o,s);break e}else if(o!==f){f=xn(Error(r(424)),a),zr(f),a=ay(t,a,o,s);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,lt=kn(t.firstChild),$t=a,Ie=!0,za=null,Nn=!0,s=Jh(a,null,o,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(wi(),o===f){a=ua(t,a,s);break e}Pt(t,a,o,s)}a=a.child}return a;case 26:return _l(t,a),t===null?(s=bb(a.type,null,a.pendingProps,null))?a.memoizedState=s:Ie||(s=a.type,t=a.pendingProps,o=Hl(se.current).createElement(s),o[Ut]=a,o[en]=t,Vt(o,s,t),Rt(o),a.stateNode=o):a.memoizedState=bb(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ve(a),t===null&&Ie&&(o=a.stateNode=hb(a.type,a.pendingProps,se.current),$t=a,Nn=!0,f=lt,Za(a.type)?(bf=f,lt=kn(o.firstChild)):lt=f),Pt(t,a,a.pendingProps.children,s),_l(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&Ie&&((f=o=lt)&&(o=$j(o,a.type,a.pendingProps,Nn),o!==null?(a.stateNode=o,$t=a,lt=kn(o.firstChild),Nn=!1,f=!0):f=!1),f||Ra(a)),Ve(a),f=a.type,m=a.pendingProps,S=t!==null?t.memoizedProps:null,o=m.children,pf(f,m)?o=null:S!==null&&pf(f,S)&&(a.flags|=32),a.memoizedState!==null&&(f=dd(t,a,tj,null,null,s),ro._currentValue=f),_l(t,a),Pt(t,a,o,s),a.child;case 6:return t===null&&Ie&&((t=s=lt)&&(s=Ij(s,a.pendingProps,Nn),s!==null?(a.stateNode=s,$t=a,lt=null,t=!0):t=!1),t||Ra(a)),null;case 13:return iy(t,a,s);case 4:return it(a,a.stateNode.containerInfo),o=a.pendingProps,t===null?a.child=_i(a,null,o,s):Pt(t,a,o,s),a.child;case 11:return Yg(t,a,a.type,a.pendingProps,s);case 7:return Pt(t,a,a.pendingProps,s),a.child;case 8:return Pt(t,a,a.pendingProps.children,s),a.child;case 12:return Pt(t,a,a.pendingProps.children,s),a.child;case 10:return o=a.pendingProps,Ma(a,a.type,o.value),Pt(t,a,o.children,s),a.child;case 9:return f=a.type._context,o=a.pendingProps.children,Ni(a),f=It(f),o=o(f),a.flags|=1,Pt(t,a,o,s),a.child;case 14:return Fg(t,a,a.type,a.pendingProps,s);case 15:return Xg(t,a,a.type,a.pendingProps,s);case 19:return ry(t,a,s);case 31:return cj(t,a,s);case 22:return Jg(t,a,s,a.pendingProps);case 24:return Ni(a),o=It(kt),t===null?(f=td(),f===null&&(f=at,m=Wu(),f.pooledCache=m,m.refCount++,m!==null&&(f.pooledCacheLanes|=s),f=m),a.memoizedState={parent:o,cache:f},ad(a),Ma(a,kt,f)):((t.lanes&s)!==0&&(id(t,a),$r(a,null,null,s),Ur()),f=t.memoizedState,m=a.memoizedState,f.parent!==o?(f={parent:o,cache:o},a.memoizedState=f,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=f),Ma(a,kt,o)):(o=m.cache,Ma(a,kt,o),o!==f.cache&&Ju(a,[kt],s,!0))),Pt(t,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function da(t){t.flags|=4}function Ud(t,a,s,o,f){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(f&335544128)===f)if(t.stateNode.complete)t.flags|=8192;else if(Ry())t.flags|=8192;else throw Ci=pl,nd}else t.flags&=-16777217}function ly(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!jb(a))if(Ry())t.flags|=8192;else throw Ci=pl,nd}function El(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?ut():536870912,t.lanes|=a,_s|=a)}function Kr(t,a){if(!Ie)switch(t.tailMode){case"hidden":a=t.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t.tail=null:s.sibling=null;break;case"collapsed":s=t.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:o.sibling=null}}function ct(t){var a=t.alternate!==null&&t.alternate.child===t.child,s=0,o=0;if(a)for(var f=t.child;f!==null;)s|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=t,f=f.sibling;else for(f=t.child;f!==null;)s|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=t,f=f.sibling;return t.subtreeFlags|=o,t.childLanes=s,a}function dj(t,a,s){var o=a.pendingProps;switch(Qu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(a),null;case 1:return ct(a),null;case 3:return s=a.stateNode,o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),oa(kt),xe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(t===null||t.child===null)&&(hs(a)?da(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Yu())),ct(a),null;case 26:var f=a.type,m=a.memoizedState;return t===null?(da(a),m!==null?(ct(a),ly(a,m)):(ct(a),Ud(a,f,null,o,s))):m?m!==t.memoizedState?(da(a),ct(a),ly(a,m)):(ct(a),a.flags&=-16777217):(t=t.memoizedProps,t!==o&&da(a),ct(a),Ud(a,f,t,o,s)),null;case 27:if(Fe(a),s=se.current,f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&da(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return ct(a),null}t=te.current,hs(a)?Ih(a):(t=hb(f,o,s),a.stateNode=t,da(a))}return ct(a),null;case 5:if(Fe(a),f=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==o&&da(a);else{if(!o){if(a.stateNode===null)throw Error(r(166));return ct(a),null}if(m=te.current,hs(a))Ih(a);else{var S=Hl(se.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?m.multiple=!0:o.size&&(m.size=o.size);break;default:m=typeof o.is=="string"?S.createElement(f,{is:o.is}):S.createElement(f)}}m[Ut]=a,m[en]=o;e:for(S=a.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===a)break e;for(;S.sibling===null;){if(S.return===null||S.return===a)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}a.stateNode=m;e:switch(Vt(m,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&da(a)}}return ct(a),Ud(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,s),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==o&&da(a);else{if(typeof o!="string"&&a.stateNode===null)throw Error(r(166));if(t=se.current,hs(a)){if(t=a.stateNode,s=a.memoizedProps,o=null,f=$t,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}t[Ut]=a,t=!!(t.nodeValue===s||o!==null&&o.suppressHydrationWarning===!0||ib(t.nodeValue,s)),t||Ra(a,!0)}else t=Hl(t).createTextNode(o),t[Ut]=a,a.stateNode=t}return ct(a),null;case 31:if(s=a.memoizedState,t===null||t.memoizedState!==null){if(o=hs(a),s!==null){if(t===null){if(!o)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[Ut]=a}else wi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),t=!1}else s=Yu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=s),t=!0;if(!t)return a.flags&256?(pn(a),a):(pn(a),null);if((a.flags&128)!==0)throw Error(r(558))}return ct(a),null;case 13:if(o=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(f=hs(a),o!==null&&o.dehydrated!==null){if(t===null){if(!f)throw Error(r(318));if(f=a.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ut]=a}else wi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ct(a),f=!1}else f=Yu(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=f),f=!0;if(!f)return a.flags&256?(pn(a),a):(pn(a),null)}return pn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=o!==null,t=t!==null&&t.memoizedState!==null,s&&(o=a.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),m=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(m=o.memoizedState.cachePool.pool),m!==f&&(o.flags|=2048)),s!==t&&s&&(a.child.flags|=8192),El(a,a.updateQueue),ct(a),null);case 4:return xe(),t===null&&lf(a.stateNode.containerInfo),ct(a),null;case 10:return oa(a.type),ct(a),null;case 19:if(J(St),o=a.memoizedState,o===null)return ct(a),null;if(f=(a.flags&128)!==0,m=o.rendering,m===null)if(f)Kr(o,!1);else{if(bt!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(m=yl(t),m!==null){for(a.flags|=128,Kr(o,!1),t=m.updateQueue,a.updateQueue=t,El(a,t),a.subtreeFlags=0,t=s,s=a.child;s!==null;)Bh(s,t),s=s.sibling;return ue(St,St.current&1|2),Ie&&sa(a,o.treeForkCount),a.child}t=t.sibling}o.tail!==null&&Gt()>Ml&&(a.flags|=128,f=!0,Kr(o,!1),a.lanes=4194304)}else{if(!f)if(t=yl(m),t!==null){if(a.flags|=128,f=!0,t=t.updateQueue,a.updateQueue=t,El(a,t),Kr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!m.alternate&&!Ie)return ct(a),null}else 2*Gt()-o.renderingStartTime>Ml&&s!==536870912&&(a.flags|=128,f=!0,Kr(o,!1),a.lanes=4194304);o.isBackwards?(m.sibling=a.child,a.child=m):(t=o.last,t!==null?t.sibling=m:a.child=m,o.last=m)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Gt(),t.sibling=null,s=St.current,ue(St,f?s&1|2:s&1),Ie&&sa(a,o.treeForkCount),t):(ct(a),null);case 22:case 23:return pn(a),ld(),o=a.memoizedState!==null,t!==null?t.memoizedState!==null!==o&&(a.flags|=8192):o&&(a.flags|=8192),o?(s&536870912)!==0&&(a.flags&128)===0&&(ct(a),a.subtreeFlags&6&&(a.flags|=8192)):ct(a),s=a.updateQueue,s!==null&&El(a,s.retryQueue),s=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==s&&(a.flags|=2048),t!==null&&J(Ai),null;case 24:return s=null,t!==null&&(s=t.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),oa(kt),ct(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function fj(t,a){switch(Qu(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return oa(kt),xe(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return Fe(a),null;case 31:if(a.memoizedState!==null){if(pn(a),a.alternate===null)throw Error(r(340));wi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(pn(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));wi()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return J(St),null;case 4:return xe(),null;case 10:return oa(a.type),null;case 22:case 23:return pn(a),ld(),t!==null&&J(Ai),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return oa(kt),null;case 25:return null;default:return null}}function cy(t,a){switch(Qu(a),a.tag){case 3:oa(kt),xe();break;case 26:case 27:case 5:Fe(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&pn(a);break;case 13:pn(a);break;case 19:J(St);break;case 10:oa(a.type);break;case 22:case 23:pn(a),ld(),t!==null&&J(Ai);break;case 24:oa(kt)}}function Qr(t,a){try{var s=a.updateQueue,o=s!==null?s.lastEffect:null;if(o!==null){var f=o.next;s=f;do{if((s.tag&t)===t){o=void 0;var m=s.create,S=s.inst;o=m(),S.destroy=o}s=s.next}while(s!==f)}}catch(j){Je(a,a.return,j)}}function Ia(t,a,s){try{var o=a.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var m=f.next;o=m;do{if((o.tag&t)===t){var S=o.inst,j=S.destroy;if(j!==void 0){S.destroy=void 0,f=a;var _=s,L=j;try{L()}catch(Q){Je(f,_,Q)}}}o=o.next}while(o!==m)}}catch(Q){Je(a,a.return,Q)}}function uy(t){var a=t.updateQueue;if(a!==null){var s=t.stateNode;try{eg(a,s)}catch(o){Je(t,t.return,o)}}}function dy(t,a,s){s.props=Ei(t.type,t.memoizedProps),s.state=t.memoizedState;try{s.componentWillUnmount()}catch(o){Je(t,a,o)}}function Zr(t,a){try{var s=t.ref;if(s!==null){switch(t.tag){case 26:case 27:case 5:var o=t.stateNode;break;case 30:o=t.stateNode;break;default:o=t.stateNode}typeof s=="function"?t.refCleanup=s(o):s.current=o}}catch(f){Je(t,a,f)}}function Yn(t,a){var s=t.ref,o=t.refCleanup;if(s!==null)if(typeof o=="function")try{o()}catch(f){Je(t,a,f)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(f){Je(t,a,f)}else s.current=null}function fy(t){var a=t.type,s=t.memoizedProps,o=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&o.focus();break e;case"img":s.src?o.src=s.src:s.srcSet&&(o.srcset=s.srcSet)}}catch(f){Je(t,t.return,f)}}function $d(t,a,s){try{var o=t.stateNode;Rj(o,t.type,s,a),o[en]=a}catch(f){Je(t,t.return,f)}}function py(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Za(t.type)||t.tag===4}function Id(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||py(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Za(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Pd(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(t,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(t),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=na));else if(o!==4&&(o===27&&Za(t.type)&&(s=t.stateNode,a=null),t=t.child,t!==null))for(Pd(t,a,s),t=t.sibling;t!==null;)Pd(t,a,s),t=t.sibling}function Ol(t,a,s){var o=t.tag;if(o===5||o===6)t=t.stateNode,a?s.insertBefore(t,a):s.appendChild(t);else if(o!==4&&(o===27&&Za(t.type)&&(s=t.stateNode),t=t.child,t!==null))for(Ol(t,a,s),t=t.sibling;t!==null;)Ol(t,a,s),t=t.sibling}function my(t){var a=t.stateNode,s=t.memoizedProps;try{for(var o=t.type,f=a.attributes;f.length;)a.removeAttributeNode(f[0]);Vt(a,o,s),a[Ut]=t,a[en]=s}catch(m){Je(t,t.return,m)}}var fa=!1,Tt=!1,Vd=!1,hy=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function pj(t,a){if(t=t.containerInfo,df=Jl,t=Ch(t),Bu(t)){if("selectionStart"in t)var s={start:t.selectionStart,end:t.selectionEnd};else e:{s=(s=t.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var f=o.anchorOffset,m=o.focusNode;o=o.focusOffset;try{s.nodeType,m.nodeType}catch{s=null;break e}var S=0,j=-1,_=-1,L=0,Q=0,W=t,U=null;t:for(;;){for(var P;W!==s||f!==0&&W.nodeType!==3||(j=S+f),W!==m||o!==0&&W.nodeType!==3||(_=S+o),W.nodeType===3&&(S+=W.nodeValue.length),(P=W.firstChild)!==null;)U=W,W=P;for(;;){if(W===t)break t;if(U===s&&++L===f&&(j=S),U===m&&++Q===o&&(_=S),(P=W.nextSibling)!==null)break;W=U,U=W.parentNode}W=P}s=j===-1||_===-1?null:{start:j,end:_}}else s=null}s=s||{start:0,end:0}}else s=null;for(ff={focusedElem:t,selectionRange:s},Jl=!1,Mt=a;Mt!==null;)if(a=Mt,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,Mt=t;else for(;Mt!==null;){switch(a=Mt,m=a.alternate,t=a.flags,a.tag){case 0:if((t&4)!==0&&(t=a.updateQueue,t=t!==null?t.events:null,t!==null))for(s=0;s<t.length;s++)f=t[s],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&m!==null){t=void 0,s=a,f=m.memoizedProps,m=m.memoizedState,o=s.stateNode;try{var pe=Ei(s.type,f);t=o.getSnapshotBeforeUpdate(pe,m),o.__reactInternalSnapshotBeforeUpdate=t}catch(je){Je(s,s.return,je)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,s=t.nodeType,s===9)hf(t);else if(s===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":hf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=a.sibling,t!==null){t.return=a.return,Mt=t;break}Mt=a.return}}function gy(t,a,s){var o=s.flags;switch(s.tag){case 0:case 11:case 15:ma(t,s),o&4&&Qr(5,s);break;case 1:if(ma(t,s),o&4)if(t=s.stateNode,a===null)try{t.componentDidMount()}catch(S){Je(s,s.return,S)}else{var f=Ei(s.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(f,a,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Je(s,s.return,S)}}o&64&&uy(s),o&512&&Zr(s,s.return);break;case 3:if(ma(t,s),o&64&&(t=s.updateQueue,t!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{eg(t,a)}catch(S){Je(s,s.return,S)}}break;case 27:a===null&&o&4&&my(s);case 26:case 5:ma(t,s),a===null&&o&4&&fy(s),o&512&&Zr(s,s.return);break;case 12:ma(t,s);break;case 31:ma(t,s),o&4&&vy(t,s);break;case 13:ma(t,s),o&4&&Sy(t,s),o&64&&(t=s.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(s=wj.bind(null,s),Pj(t,s))));break;case 22:if(o=s.memoizedState!==null||fa,!o){a=a!==null&&a.memoizedState!==null||Tt,f=fa;var m=Tt;fa=o,(Tt=a)&&!m?ha(t,s,(s.subtreeFlags&8772)!==0):ma(t,s),fa=f,Tt=m}break;case 30:break;default:ma(t,s)}}function yy(t){var a=t.alternate;a!==null&&(t.alternate=null,yy(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&vu(a)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var dt=null,nn=!1;function pa(t,a,s){for(s=s.child;s!==null;)by(t,a,s),s=s.sibling}function by(t,a,s){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Ta,s)}catch{}switch(s.tag){case 26:Tt||Yn(s,a),pa(t,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Tt||Yn(s,a);var o=dt,f=nn;Za(s.type)&&(dt=s.stateNode,nn=!1),pa(t,a,s),ao(s.stateNode),dt=o,nn=f;break;case 5:Tt||Yn(s,a);case 6:if(o=dt,f=nn,dt=null,pa(t,a,s),dt=o,nn=f,dt!==null)if(nn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(s.stateNode)}catch(m){Je(s,a,m)}else try{dt.removeChild(s.stateNode)}catch(m){Je(s,a,m)}break;case 18:dt!==null&&(nn?(t=dt,ub(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,s.stateNode),Bs(t)):ub(dt,s.stateNode));break;case 4:o=dt,f=nn,dt=s.stateNode.containerInfo,nn=!0,pa(t,a,s),dt=o,nn=f;break;case 0:case 11:case 14:case 15:Ia(2,s,a),Tt||Ia(4,s,a),pa(t,a,s);break;case 1:Tt||(Yn(s,a),o=s.stateNode,typeof o.componentWillUnmount=="function"&&dy(s,a,o)),pa(t,a,s);break;case 21:pa(t,a,s);break;case 22:Tt=(o=Tt)||s.memoizedState!==null,pa(t,a,s),Tt=o;break;default:pa(t,a,s)}}function vy(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Bs(t)}catch(s){Je(a,a.return,s)}}}function Sy(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Bs(t)}catch(s){Je(a,a.return,s)}}function mj(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new hy),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new hy),a;default:throw Error(r(435,t.tag))}}function Dl(t,a){var s=mj(t);a.forEach(function(o){if(!s.has(o)){s.add(o);var f=jj.bind(null,t,o);o.then(f,f)}})}function an(t,a){var s=a.deletions;if(s!==null)for(var o=0;o<s.length;o++){var f=s[o],m=t,S=a,j=S;e:for(;j!==null;){switch(j.tag){case 27:if(Za(j.type)){dt=j.stateNode,nn=!1;break e}break;case 5:dt=j.stateNode,nn=!1;break e;case 3:case 4:dt=j.stateNode.containerInfo,nn=!0;break e}j=j.return}if(dt===null)throw Error(r(160));by(m,S,f),dt=null,nn=!1,m=f.alternate,m!==null&&(m.return=null),f.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)xy(a,t),a=a.sibling}var Ln=null;function xy(t,a){var s=t.alternate,o=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:an(a,t),sn(t),o&4&&(Ia(3,t,t.return),Qr(3,t),Ia(5,t,t.return));break;case 1:an(a,t),sn(t),o&512&&(Tt||s===null||Yn(s,s.return)),o&64&&fa&&(t=t.updateQueue,t!==null&&(o=t.callbacks,o!==null&&(s=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=s===null?o:s.concat(o))));break;case 26:var f=Ln;if(an(a,t),sn(t),o&512&&(Tt||s===null||Yn(s,s.return)),o&4){var m=s!==null?s.memoizedState:null;if(o=t.memoizedState,s===null)if(o===null)if(t.stateNode===null){e:{o=t.type,s=t.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":m=f.getElementsByTagName("title")[0],(!m||m[xr]||m[Ut]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=f.createElement(o),f.head.insertBefore(m,f.querySelector("head > title"))),Vt(m,o,s),m[Ut]=t,Rt(m),o=m;break e;case"link":var S=xb("link","href",f).get(o+(s.href||""));if(S){for(var j=0;j<S.length;j++)if(m=S[j],m.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&m.getAttribute("rel")===(s.rel==null?null:s.rel)&&m.getAttribute("title")===(s.title==null?null:s.title)&&m.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){S.splice(j,1);break t}}m=f.createElement(o),Vt(m,o,s),f.head.appendChild(m);break;case"meta":if(S=xb("meta","content",f).get(o+(s.content||""))){for(j=0;j<S.length;j++)if(m=S[j],m.getAttribute("content")===(s.content==null?null:""+s.content)&&m.getAttribute("name")===(s.name==null?null:s.name)&&m.getAttribute("property")===(s.property==null?null:s.property)&&m.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&m.getAttribute("charset")===(s.charSet==null?null:s.charSet)){S.splice(j,1);break t}}m=f.createElement(o),Vt(m,o,s),f.head.appendChild(m);break;default:throw Error(r(468,o))}m[Ut]=t,Rt(m),o=m}t.stateNode=o}else wb(f,t.type,t.stateNode);else t.stateNode=Sb(f,o,t.memoizedProps);else m!==o?(m===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):m.count--,o===null?wb(f,t.type,t.stateNode):Sb(f,o,t.memoizedProps)):o===null&&t.stateNode!==null&&$d(t,t.memoizedProps,s.memoizedProps)}break;case 27:an(a,t),sn(t),o&512&&(Tt||s===null||Yn(s,s.return)),s!==null&&o&4&&$d(t,t.memoizedProps,s.memoizedProps);break;case 5:if(an(a,t),sn(t),o&512&&(Tt||s===null||Yn(s,s.return)),t.flags&32){f=t.stateNode;try{ss(f,"")}catch(pe){Je(t,t.return,pe)}}o&4&&t.stateNode!=null&&(f=t.memoizedProps,$d(t,f,s!==null?s.memoizedProps:f)),o&1024&&(Vd=!0);break;case 6:if(an(a,t),sn(t),o&4){if(t.stateNode===null)throw Error(r(162));o=t.memoizedProps,s=t.stateNode;try{s.nodeValue=o}catch(pe){Je(t,t.return,pe)}}break;case 3:if(Zl=null,f=Ln,Ln=Kl(a.containerInfo),an(a,t),Ln=f,sn(t),o&4&&s!==null&&s.memoizedState.isDehydrated)try{Bs(a.containerInfo)}catch(pe){Je(t,t.return,pe)}Vd&&(Vd=!1,wy(t));break;case 4:o=Ln,Ln=Kl(t.stateNode.containerInfo),an(a,t),sn(t),Ln=o;break;case 12:an(a,t),sn(t);break;case 31:an(a,t),sn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Dl(t,o)));break;case 13:an(a,t),sn(t),t.child.flags&8192&&t.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Rl=Gt()),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Dl(t,o)));break;case 22:f=t.memoizedState!==null;var _=s!==null&&s.memoizedState!==null,L=fa,Q=Tt;if(fa=L||f,Tt=Q||_,an(a,t),Tt=Q,fa=L,sn(t),o&8192)e:for(a=t.stateNode,a._visibility=f?a._visibility&-2:a._visibility|1,f&&(s===null||_||fa||Tt||Oi(t)),s=null,a=t;;){if(a.tag===5||a.tag===26){if(s===null){_=s=a;try{if(m=_.stateNode,f)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{j=_.stateNode;var W=_.memoizedProps.style,U=W!=null&&W.hasOwnProperty("display")?W.display:null;j.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(pe){Je(_,_.return,pe)}}}else if(a.tag===6){if(s===null){_=a;try{_.stateNode.nodeValue=f?"":_.memoizedProps}catch(pe){Je(_,_.return,pe)}}}else if(a.tag===18){if(s===null){_=a;try{var P=_.stateNode;f?db(P,!0):db(_.stateNode,!1)}catch(pe){Je(_,_.return,pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===t)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}o&4&&(o=t.updateQueue,o!==null&&(s=o.retryQueue,s!==null&&(o.retryQueue=null,Dl(t,s))));break;case 19:an(a,t),sn(t),o&4&&(o=t.updateQueue,o!==null&&(t.updateQueue=null,Dl(t,o)));break;case 30:break;case 21:break;default:an(a,t),sn(t)}}function sn(t){var a=t.flags;if(a&2){try{for(var s,o=t.return;o!==null;){if(py(o)){s=o;break}o=o.return}if(s==null)throw Error(r(160));switch(s.tag){case 27:var f=s.stateNode,m=Id(t);Ol(t,m,f);break;case 5:var S=s.stateNode;s.flags&32&&(ss(S,""),s.flags&=-33);var j=Id(t);Ol(t,j,S);break;case 3:case 4:var _=s.stateNode.containerInfo,L=Id(t);Pd(t,L,_);break;default:throw Error(r(161))}}catch(Q){Je(t,t.return,Q)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function wy(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;wy(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function ma(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)gy(t,a.alternate,a),a=a.sibling}function Oi(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:Ia(4,a,a.return),Oi(a);break;case 1:Yn(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&dy(a,a.return,s),Oi(a);break;case 27:ao(a.stateNode);case 26:case 5:Yn(a,a.return),Oi(a);break;case 22:a.memoizedState===null&&Oi(a);break;case 30:Oi(a);break;default:Oi(a)}t=t.sibling}}function ha(t,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var o=a.alternate,f=t,m=a,S=m.flags;switch(m.tag){case 0:case 11:case 15:ha(f,m,s),Qr(4,m);break;case 1:if(ha(f,m,s),o=m,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(L){Je(o,o.return,L)}if(o=m,f=o.updateQueue,f!==null){var j=o.stateNode;try{var _=f.shared.hiddenCallbacks;if(_!==null)for(f.shared.hiddenCallbacks=null,f=0;f<_.length;f++)Wh(_[f],j)}catch(L){Je(o,o.return,L)}}s&&S&64&&uy(m),Zr(m,m.return);break;case 27:my(m);case 26:case 5:ha(f,m,s),s&&o===null&&S&4&&fy(m),Zr(m,m.return);break;case 12:ha(f,m,s);break;case 31:ha(f,m,s),s&&S&4&&vy(f,m);break;case 13:ha(f,m,s),s&&S&4&&Sy(f,m);break;case 22:m.memoizedState===null&&ha(f,m,s),Zr(m,m.return);break;case 30:break;default:ha(f,m,s)}a=a.sibling}}function Gd(t,a){var s=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==s&&(t!=null&&t.refCount++,s!=null&&Rr(s))}function Hd(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Rr(t))}function qn(t,a,s,o){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)jy(t,a,s,o),a=a.sibling}function jy(t,a,s,o){var f=a.flags;switch(a.tag){case 0:case 11:case 15:qn(t,a,s,o),f&2048&&Qr(9,a);break;case 1:qn(t,a,s,o);break;case 3:qn(t,a,s,o),f&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Rr(t)));break;case 12:if(f&2048){qn(t,a,s,o),t=a.stateNode;try{var m=a.memoizedProps,S=m.id,j=m.onPostCommit;typeof j=="function"&&j(S,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(_){Je(a,a.return,_)}}else qn(t,a,s,o);break;case 31:qn(t,a,s,o);break;case 13:qn(t,a,s,o);break;case 23:break;case 22:m=a.stateNode,S=a.alternate,a.memoizedState!==null?m._visibility&2?qn(t,a,s,o):Yr(t,a):m._visibility&2?qn(t,a,s,o):(m._visibility|=2,As(t,a,s,o,(a.subtreeFlags&10256)!==0||!1)),f&2048&&Gd(S,a);break;case 24:qn(t,a,s,o),f&2048&&Hd(a.alternate,a);break;default:qn(t,a,s,o)}}function As(t,a,s,o,f){for(f=f&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=t,S=a,j=s,_=o,L=S.flags;switch(S.tag){case 0:case 11:case 15:As(m,S,j,_,f),Qr(8,S);break;case 23:break;case 22:var Q=S.stateNode;S.memoizedState!==null?Q._visibility&2?As(m,S,j,_,f):Yr(m,S):(Q._visibility|=2,As(m,S,j,_,f)),f&&L&2048&&Gd(S.alternate,S);break;case 24:As(m,S,j,_,f),f&&L&2048&&Hd(S.alternate,S);break;default:As(m,S,j,_,f)}a=a.sibling}}function Yr(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=t,o=a,f=o.flags;switch(o.tag){case 22:Yr(s,o),f&2048&&Gd(o.alternate,o);break;case 24:Yr(s,o),f&2048&&Hd(o.alternate,o);break;default:Yr(s,o)}a=a.sibling}}var Fr=8192;function ks(t,a,s){if(t.subtreeFlags&Fr)for(t=t.child;t!==null;)Ny(t,a,s),t=t.sibling}function Ny(t,a,s){switch(t.tag){case 26:ks(t,a,s),t.flags&Fr&&t.memoizedState!==null&&eN(s,Ln,t.memoizedState,t.memoizedProps);break;case 5:ks(t,a,s);break;case 3:case 4:var o=Ln;Ln=Kl(t.stateNode.containerInfo),ks(t,a,s),Ln=o;break;case 22:t.memoizedState===null&&(o=t.alternate,o!==null&&o.memoizedState!==null?(o=Fr,Fr=16777216,ks(t,a,s),Fr=o):ks(t,a,s));break;default:ks(t,a,s)}}function Ay(t){var a=t.alternate;if(a!==null&&(t=a.child,t!==null)){a.child=null;do a=t.sibling,t.sibling=null,t=a;while(t!==null)}}function Xr(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];Mt=o,Cy(o,t)}Ay(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ky(t),t=t.sibling}function ky(t){switch(t.tag){case 0:case 11:case 15:Xr(t),t.flags&2048&&Ia(9,t,t.return);break;case 3:Xr(t);break;case 12:Xr(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,zl(t)):Xr(t);break;default:Xr(t)}}function zl(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var o=a[s];Mt=o,Cy(o,t)}Ay(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:Ia(8,a,a.return),zl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,zl(a));break;default:zl(a)}t=t.sibling}}function Cy(t,a){for(;Mt!==null;){var s=Mt;switch(s.tag){case 0:case 11:case 15:Ia(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var o=s.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Rr(s.memoizedState.cache)}if(o=s.child,o!==null)o.return=s,Mt=o;else e:for(s=t;Mt!==null;){o=Mt;var f=o.sibling,m=o.return;if(yy(o),o===s){Mt=null;break e}if(f!==null){f.return=m,Mt=f;break e}Mt=m}}}var hj={getCacheForType:function(t){var a=It(kt),s=a.data.get(t);return s===void 0&&(s=t(),a.data.set(t,s)),s},cacheSignal:function(){return It(kt).controller.signal}},gj=typeof WeakMap=="function"?WeakMap:Map,Qe=0,at=null,Be=null,qe=0,Xe=0,mn=null,Pa=!1,Cs=!1,Kd=!1,ga=0,bt=0,Va=0,Di=0,Qd=0,hn=0,_s=0,Jr=null,rn=null,Zd=!1,Rl=0,_y=0,Ml=1/0,Bl=null,Ga=null,Dt=0,Ha=null,Ts=null,ya=0,Yd=0,Fd=null,Ty=null,Wr=0,Xd=null;function gn(){return(Qe&2)!==0&&qe!==0?qe&-qe:I.T!==null?af():Hm()}function Ey(){if(hn===0)if((qe&536870912)===0||Ie){var t=Xi;Xi<<=1,(Xi&3932160)===0&&(Xi=262144),hn=t}else hn=536870912;return t=fn.current,t!==null&&(t.flags|=32),hn}function on(t,a,s){(t===at&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)&&(Es(t,0),Ka(t,qe,hn,!1)),hi(t,s),((Qe&2)===0||t!==at)&&(t===at&&((Qe&2)===0&&(Di|=s),bt===4&&Ka(t,qe,hn,!1)),Fn(t))}function Oy(t,a,s){if((Qe&6)!==0)throw Error(r(327));var o=!s&&(a&127)===0&&(a&t.expiredLanes)===0||mi(t,a),f=o?vj(t,a):Wd(t,a,!0),m=o;do{if(f===0){Cs&&!o&&Ka(t,a,0,!1);break}else{if(s=t.current.alternate,m&&!yj(s)){f=Wd(t,a,!1),m=!1;continue}if(f===2){if(m=a,t.errorRecoveryDisabledLanes&m)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){a=S;e:{var j=t;f=Jr;var _=j.current.memoizedState.isDehydrated;if(_&&(Es(j,S).flags|=256),S=Wd(j,S,!1),S!==2){if(Kd&&!_){j.errorRecoveryDisabledLanes|=m,Di|=m,f=4;break e}m=rn,rn=f,m!==null&&(rn===null?rn=m:rn.push.apply(rn,m))}f=S}if(m=!1,f!==2)continue}}if(f===1){Es(t,0),Ka(t,a,0,!0);break}e:{switch(o=t,m=f,m){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Ka(o,a,hn,!Pa);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(f=Rl+300-Gt(),10<f)){if(Ka(o,a,hn,!Pa),yn(o,0,!0)!==0)break e;ya=a,o.timeoutHandle=lb(Dy.bind(null,o,s,rn,Bl,Zd,a,hn,Di,_s,Pa,m,"Throttled",-0,0),f);break e}Dy(o,s,rn,Bl,Zd,a,hn,Di,_s,Pa,m,null,-0,0)}}break}while(!0);Fn(t)}function Dy(t,a,s,o,f,m,S,j,_,L,Q,W,U,P){if(t.timeoutHandle=-1,W=a.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:na},Ny(a,m,W);var pe=(m&62914560)===m?Rl-Gt():(m&4194048)===m?_y-Gt():0;if(pe=tN(W,pe),pe!==null){ya=m,t.cancelPendingCommit=pe($y.bind(null,t,a,m,s,o,f,S,j,_,Q,W,null,U,P)),Ka(t,m,S,!L);return}}$y(t,a,m,s,o,f,S,j,_)}function yj(t){for(var a=t;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var o=0;o<s.length;o++){var f=s[o],m=f.getSnapshot;f=f.value;try{if(!un(m(),f))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ka(t,a,s,o){a&=~Qd,a&=~Di,t.suspendedLanes|=a,t.pingedLanes&=~a,o&&(t.warmLanes|=a),o=t.expirationTimes;for(var f=a;0<f;){var m=31-Ot(f),S=1<<m;o[m]=-1,f&=~S}s!==0&&Sr(t,s,a)}function Ll(){return(Qe&6)===0?(eo(0),!1):!0}function Jd(){if(Be!==null){if(Xe===0)var t=Be.return;else t=Be,ra=ji=null,md(t),Ss=null,Br=0,t=Be;for(;t!==null;)cy(t.alternate,t),t=t.return;Be=null}}function Es(t,a){var s=t.timeoutHandle;s!==-1&&(t.timeoutHandle=-1,Lj(s)),s=t.cancelPendingCommit,s!==null&&(t.cancelPendingCommit=null,s()),ya=0,Jd(),at=t,Be=s=ia(t.current,null),qe=a,Xe=0,mn=null,Pa=!1,Cs=mi(t,a),Kd=!1,_s=hn=Qd=Di=Va=bt=0,rn=Jr=null,Zd=!1,(a&8)!==0&&(a|=a&32);var o=t.entangledLanes;if(o!==0)for(t=t.entanglements,o&=a;0<o;){var f=31-Ot(o),m=1<<f;a|=t[f],o&=~m}return ga=a,il(),s}function zy(t,a){Oe=null,I.H=Gr,a===vs||a===fl?(a=Yh(),Xe=3):a===nd?(a=Yh(),Xe=4):Xe=a===Ed?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,mn=a,Be===null&&(bt=1,kl(t,xn(a,t.current)))}function Ry(){var t=fn.current;return t===null?!0:(qe&4194048)===qe?An===null:(qe&62914560)===qe||(qe&536870912)!==0?t===An:!1}function My(){var t=I.H;return I.H=Gr,t===null?Gr:t}function By(){var t=I.A;return I.A=hj,t}function ql(){bt=4,Pa||(qe&4194048)!==qe&&fn.current!==null||(Cs=!0),(Va&134217727)===0&&(Di&134217727)===0||at===null||Ka(at,qe,hn,!1)}function Wd(t,a,s){var o=Qe;Qe|=2;var f=My(),m=By();(at!==t||qe!==a)&&(Bl=null,Es(t,a)),a=!1;var S=bt;e:do try{if(Xe!==0&&Be!==null){var j=Be,_=mn;switch(Xe){case 8:Jd(),S=6;break e;case 3:case 2:case 9:case 6:fn.current===null&&(a=!0);var L=Xe;if(Xe=0,mn=null,Os(t,j,_,L),s&&Cs){S=0;break e}break;default:L=Xe,Xe=0,mn=null,Os(t,j,_,L)}}bj(),S=bt;break}catch(Q){zy(t,Q)}while(!0);return a&&t.shellSuspendCounter++,ra=ji=null,Qe=o,I.H=f,I.A=m,Be===null&&(at=null,qe=0,il()),S}function bj(){for(;Be!==null;)Ly(Be)}function vj(t,a){var s=Qe;Qe|=2;var o=My(),f=By();at!==t||qe!==a?(Bl=null,Ml=Gt()+500,Es(t,a)):Cs=mi(t,a);e:do try{if(Xe!==0&&Be!==null){a=Be;var m=mn;t:switch(Xe){case 1:Xe=0,mn=null,Os(t,a,m,1);break;case 2:case 9:if(Qh(m)){Xe=0,mn=null,qy(a);break}a=function(){Xe!==2&&Xe!==9||at!==t||(Xe=7),Fn(t)},m.then(a,a);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Qh(m)?(Xe=0,mn=null,qy(a)):(Xe=0,mn=null,Os(t,a,m,7));break;case 5:var S=null;switch(Be.tag){case 26:S=Be.memoizedState;case 5:case 27:var j=Be;if(S?jb(S):j.stateNode.complete){Xe=0,mn=null;var _=j.sibling;if(_!==null)Be=_;else{var L=j.return;L!==null?(Be=L,Ul(L)):Be=null}break t}}Xe=0,mn=null,Os(t,a,m,5);break;case 6:Xe=0,mn=null,Os(t,a,m,6);break;case 8:Jd(),bt=6;break e;default:throw Error(r(462))}}Sj();break}catch(Q){zy(t,Q)}while(!0);return ra=ji=null,I.H=o,I.A=f,Qe=s,Be!==null?0:(at=null,qe=0,il(),bt)}function Sj(){for(;Be!==null&&!Uo();)Ly(Be)}function Ly(t){var a=oy(t.alternate,t,ga);t.memoizedProps=t.pendingProps,a===null?Ul(t):Be=a}function qy(t){var a=t,s=a.alternate;switch(a.tag){case 15:case 0:a=ty(s,a,a.pendingProps,a.type,void 0,qe);break;case 11:a=ty(s,a,a.pendingProps,a.type.render,a.ref,qe);break;case 5:md(a);default:cy(s,a),a=Be=Bh(a,ga),a=oy(s,a,ga)}t.memoizedProps=t.pendingProps,a===null?Ul(t):Be=a}function Os(t,a,s,o){ra=ji=null,md(a),Ss=null,Br=0;var f=a.return;try{if(lj(t,f,a,s,qe)){bt=1,kl(t,xn(s,t.current)),Be=null;return}}catch(m){if(f!==null)throw Be=f,m;bt=1,kl(t,xn(s,t.current)),Be=null;return}a.flags&32768?(Ie||o===1?t=!0:Cs||(qe&536870912)!==0?t=!1:(Pa=t=!0,(o===2||o===9||o===3||o===6)&&(o=fn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Uy(a,t)):Ul(a)}function Ul(t){var a=t;do{if((a.flags&32768)!==0){Uy(a,Pa);return}t=a.return;var s=dj(a.alternate,a,ga);if(s!==null){Be=s;return}if(a=a.sibling,a!==null){Be=a;return}Be=a=t}while(a!==null);bt===0&&(bt=5)}function Uy(t,a){do{var s=fj(t.alternate,t);if(s!==null){s.flags&=32767,Be=s;return}if(s=t.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(t=t.sibling,t!==null)){Be=t;return}Be=t=s}while(t!==null);bt=6,Be=null}function $y(t,a,s,o,f,m,S,j,_){t.cancelPendingCommit=null;do $l();while(Dt!==0);if((Qe&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(m=a.lanes|a.childLanes,m|=Iu,hu(t,s,m,S,j,_),t===at&&(Be=at=null,qe=0),Ts=a,Ha=t,ya=s,Yd=m,Fd=f,Ty=o,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,Nj(_a,function(){return Hy(),null})):(t.callbackNode=null,t.callbackPriority=0),o=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||o){o=I.T,I.T=null,f=ne.p,ne.p=2,S=Qe,Qe|=4;try{pj(t,a,s)}finally{Qe=S,ne.p=f,I.T=o}}Dt=1,Iy(),Py(),Vy()}}function Iy(){if(Dt===1){Dt=0;var t=Ha,a=Ts,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=I.T,I.T=null;var o=ne.p;ne.p=2;var f=Qe;Qe|=4;try{xy(a,t);var m=ff,S=Ch(t.containerInfo),j=m.focusedElem,_=m.selectionRange;if(S!==j&&j&&j.ownerDocument&&kh(j.ownerDocument.documentElement,j)){if(_!==null&&Bu(j)){var L=_.start,Q=_.end;if(Q===void 0&&(Q=L),"selectionStart"in j)j.selectionStart=L,j.selectionEnd=Math.min(Q,j.value.length);else{var W=j.ownerDocument||document,U=W&&W.defaultView||window;if(U.getSelection){var P=U.getSelection(),pe=j.textContent.length,je=Math.min(_.start,pe),tt=_.end===void 0?je:Math.min(_.end,pe);!P.extend&&je>tt&&(S=tt,tt=je,je=S);var D=Ah(j,je),T=Ah(j,tt);if(D&&T&&(P.rangeCount!==1||P.anchorNode!==D.node||P.anchorOffset!==D.offset||P.focusNode!==T.node||P.focusOffset!==T.offset)){var B=W.createRange();B.setStart(D.node,D.offset),P.removeAllRanges(),je>tt?(P.addRange(B),P.extend(T.node,T.offset)):(B.setEnd(T.node,T.offset),P.addRange(B))}}}}for(W=[],P=j;P=P.parentNode;)P.nodeType===1&&W.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<W.length;j++){var Y=W[j];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Jl=!!df,ff=df=null}finally{Qe=f,ne.p=o,I.T=s}}t.current=a,Dt=2}}function Py(){if(Dt===2){Dt=0;var t=Ha,a=Ts,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=I.T,I.T=null;var o=ne.p;ne.p=2;var f=Qe;Qe|=4;try{gy(t,a.alternate,a)}finally{Qe=f,ne.p=o,I.T=s}}Dt=3}}function Vy(){if(Dt===4||Dt===3){Dt=0,$o();var t=Ha,a=Ts,s=ya,o=Ty;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Dt=5:(Dt=0,Ts=Ha=null,Gy(t,t.pendingLanes));var f=t.pendingLanes;if(f===0&&(Ga=null),yu(s),a=a.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Ta,a,void 0,(a.current.flags&128)===128)}catch{}if(o!==null){a=I.T,f=ne.p,ne.p=2,I.T=null;try{for(var m=t.onRecoverableError,S=0;S<o.length;S++){var j=o[S];m(j.value,{componentStack:j.stack})}}finally{I.T=a,ne.p=f}}(ya&3)!==0&&$l(),Fn(t),f=t.pendingLanes,(s&261930)!==0&&(f&42)!==0?t===Xd?Wr++:(Wr=0,Xd=t):Wr=0,eo(0)}}function Gy(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Rr(a)))}function $l(){return Iy(),Py(),Vy(),Hy()}function Hy(){if(Dt!==5)return!1;var t=Ha,a=Yd;Yd=0;var s=yu(ya),o=I.T,f=ne.p;try{ne.p=32>s?32:s,I.T=null,s=Fd,Fd=null;var m=Ha,S=ya;if(Dt=0,Ts=Ha=null,ya=0,(Qe&6)!==0)throw Error(r(331));var j=Qe;if(Qe|=4,ky(m.current),jy(m,m.current,S,s),Qe=j,eo(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Ta,m)}catch{}return!0}finally{ne.p=f,I.T=o,Gy(t,a)}}function Ky(t,a,s){a=xn(s,a),a=Td(t.stateNode,a,2),t=qa(t,a,2),t!==null&&(hi(t,2),Fn(t))}function Je(t,a,s){if(t.tag===3)Ky(t,t,s);else for(;a!==null;){if(a.tag===3){Ky(a,t,s);break}else if(a.tag===1){var o=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ga===null||!Ga.has(o))){t=xn(s,t),s=Qg(2),o=qa(a,s,2),o!==null&&(Zg(s,o,a,t),hi(o,2),Fn(o));break}}a=a.return}}function ef(t,a,s){var o=t.pingCache;if(o===null){o=t.pingCache=new gj;var f=new Set;o.set(a,f)}else f=o.get(a),f===void 0&&(f=new Set,o.set(a,f));f.has(s)||(Kd=!0,f.add(s),t=xj.bind(null,t,a,s),a.then(t,t))}function xj(t,a,s){var o=t.pingCache;o!==null&&o.delete(a),t.pingedLanes|=t.suspendedLanes&s,t.warmLanes&=~s,at===t&&(qe&s)===s&&(bt===4||bt===3&&(qe&62914560)===qe&&300>Gt()-Rl?(Qe&2)===0&&Es(t,0):Qd|=s,_s===qe&&(_s=0)),Fn(t)}function Qy(t,a){a===0&&(a=ut()),t=Si(t,a),t!==null&&(hi(t,a),Fn(t))}function wj(t){var a=t.memoizedState,s=0;a!==null&&(s=a.retryLane),Qy(t,s)}function jj(t,a){var s=0;switch(t.tag){case 31:case 13:var o=t.stateNode,f=t.memoizedState;f!==null&&(s=f.retryLane);break;case 19:o=t.stateNode;break;case 22:o=t.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(a),Qy(t,s)}function Nj(t,a){return Zi(t,a)}var Il=null,Ds=null,tf=!1,Pl=!1,nf=!1,Qa=0;function Fn(t){t!==Ds&&t.next===null&&(Ds===null?Il=Ds=t:Ds=Ds.next=t),Pl=!0,tf||(tf=!0,kj())}function eo(t,a){if(!nf&&Pl){nf=!0;do for(var s=!1,o=Il;o!==null;){if(t!==0){var f=o.pendingLanes;if(f===0)var m=0;else{var S=o.suspendedLanes,j=o.pingedLanes;m=(1<<31-Ot(42|t)+1)-1,m&=f&~(S&~j),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(s=!0,Xy(o,m))}else m=qe,m=yn(o,o===at?m:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(m&3)===0||mi(o,m)||(s=!0,Xy(o,m));o=o.next}while(s);nf=!1}}function Aj(){Zy()}function Zy(){Pl=tf=!1;var t=0;Qa!==0&&Bj()&&(t=Qa);for(var a=Gt(),s=null,o=Il;o!==null;){var f=o.next,m=Yy(o,a);m===0?(o.next=null,s===null?Il=f:s.next=f,f===null&&(Ds=s)):(s=o,(t!==0||(m&3)!==0)&&(Pl=!0)),o=f}Dt!==0&&Dt!==5||eo(t),Qa!==0&&(Qa=0)}function Yy(t,a){for(var s=t.suspendedLanes,o=t.pingedLanes,f=t.expirationTimes,m=t.pendingLanes&-62914561;0<m;){var S=31-Ot(m),j=1<<S,_=f[S];_===-1?((j&s)===0||(j&o)!==0)&&(f[S]=re(j,a)):_<=a&&(t.expiredLanes|=j),m&=~j}if(a=at,s=qe,s=yn(t,t===a?s:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o=t.callbackNode,s===0||t===a&&(Xe===2||Xe===9)||t.cancelPendingCommit!==null)return o!==null&&o!==null&&vr(o),t.callbackNode=null,t.callbackPriority=0;if((s&3)===0||mi(t,s)){if(a=s&-s,a===t.callbackPriority)return a;switch(o!==null&&vr(o),yu(s)){case 2:case 8:s=Po;break;case 32:s=_a;break;case 268435456:s=Yi;break;default:s=_a}return o=Fy.bind(null,t),s=Zi(s,o),t.callbackPriority=a,t.callbackNode=s,a}return o!==null&&o!==null&&vr(o),t.callbackPriority=2,t.callbackNode=null,2}function Fy(t,a){if(Dt!==0&&Dt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var s=t.callbackNode;if($l()&&t.callbackNode!==s)return null;var o=qe;return o=yn(t,t===at?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),o===0?null:(Oy(t,o,a),Yy(t,Gt()),t.callbackNode!=null&&t.callbackNode===s?Fy.bind(null,t):null)}function Xy(t,a){if($l())return null;Oy(t,a,!0)}function kj(){qj(function(){(Qe&6)!==0?Zi(Io,Aj):Zy()})}function af(){if(Qa===0){var t=ys;t===0&&(t=Fi,Fi<<=1,(Fi&261888)===0&&(Fi=256)),Qa=t}return Qa}function Jy(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Fo(""+t)}function Wy(t,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,t.id&&s.setAttribute("form",t.id),a.parentNode.insertBefore(s,a),t=new FormData(t),s.parentNode.removeChild(s),t}function Cj(t,a,s,o,f){if(a==="submit"&&s&&s.stateNode===f){var m=Jy((f[en]||null).action),S=o.submitter;S&&(a=(a=S[en]||null)?Jy(a.formAction):S.getAttribute("formAction"),a!==null&&(m=a,S=null));var j=new el("action","action",null,o,f);t.push({event:j,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Qa!==0){var _=S?Wy(f,S):new FormData(f);jd(s,{pending:!0,data:_,method:f.method,action:m},null,_)}}else typeof m=="function"&&(j.preventDefault(),_=S?Wy(f,S):new FormData(f),jd(s,{pending:!0,data:_,method:f.method,action:m},m,_))},currentTarget:f}]})}}for(var sf=0;sf<$u.length;sf++){var rf=$u[sf],_j=rf.toLowerCase(),Tj=rf[0].toUpperCase()+rf.slice(1);Bn(_j,"on"+Tj)}Bn(Eh,"onAnimationEnd"),Bn(Oh,"onAnimationIteration"),Bn(Dh,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(Hw,"onTransitionRun"),Bn(Kw,"onTransitionStart"),Bn(Qw,"onTransitionCancel"),Bn(zh,"onTransitionEnd"),as("onMouseEnter",["mouseout","mouseover"]),as("onMouseLeave",["mouseout","mouseover"]),as("onPointerEnter",["pointerout","pointerover"]),as("onPointerLeave",["pointerout","pointerover"]),gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var to="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(" "),Ej=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(to));function eb(t,a){a=(a&4)!==0;for(var s=0;s<t.length;s++){var o=t[s],f=o.event;o=o.listeners;e:{var m=void 0;if(a)for(var S=o.length-1;0<=S;S--){var j=o[S],_=j.instance,L=j.currentTarget;if(j=j.listener,_!==m&&f.isPropagationStopped())break e;m=j,f.currentTarget=L;try{m(f)}catch(Q){al(Q)}f.currentTarget=null,m=_}else for(S=0;S<o.length;S++){if(j=o[S],_=j.instance,L=j.currentTarget,j=j.listener,_!==m&&f.isPropagationStopped())break e;m=j,f.currentTarget=L;try{m(f)}catch(Q){al(Q)}f.currentTarget=null,m=_}}}}function Le(t,a){var s=a[bu];s===void 0&&(s=a[bu]=new Set);var o=t+"__bubble";s.has(o)||(tb(a,t,2,!1),s.add(o))}function of(t,a,s){var o=0;a&&(o|=4),tb(s,t,o,a)}var Vl="_reactListening"+Math.random().toString(36).slice(2);function lf(t){if(!t[Vl]){t[Vl]=!0,Zm.forEach(function(s){s!=="selectionchange"&&(Ej.has(s)||of(s,!1,t),of(s,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[Vl]||(a[Vl]=!0,of("selectionchange",!1,a))}}function tb(t,a,s,o){switch(Eb(a)){case 2:var f=iN;break;case 8:f=sN;break;default:f=jf}s=f.bind(null,a,s,t),f=void 0,!Cu||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(f=!0),o?f!==void 0?t.addEventListener(a,s,{capture:!0,passive:f}):t.addEventListener(a,s,!0):f!==void 0?t.addEventListener(a,s,{passive:f}):t.addEventListener(a,s,!1)}function cf(t,a,s,o,f){var m=o;if((a&1)===0&&(a&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var j=o.stateNode.containerInfo;if(j===f)break;if(S===4)for(S=o.return;S!==null;){var _=S.tag;if((_===3||_===4)&&S.stateNode.containerInfo===f)return;S=S.return}for(;j!==null;){if(S=es(j),S===null)return;if(_=S.tag,_===5||_===6||_===26||_===27){o=m=S;continue e}j=j.parentNode}}o=o.return}rh(function(){var L=m,Q=Au(s),W=[];e:{var U=Rh.get(t);if(U!==void 0){var P=el,pe=t;switch(t){case"keypress":if(Jo(s)===0)break e;case"keydown":case"keyup":P=jw;break;case"focusin":pe="focus",P=Ou;break;case"focusout":pe="blur",P=Ou;break;case"beforeblur":case"afterblur":P=Ou;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":P=ch;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=dw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=kw;break;case Eh:case Oh:case Dh:P=mw;break;case zh:P=_w;break;case"scroll":case"scrollend":P=cw;break;case"wheel":P=Ew;break;case"copy":case"cut":case"paste":P=gw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=dh;break;case"toggle":case"beforetoggle":P=Dw}var je=(a&4)!==0,tt=!je&&(t==="scroll"||t==="scrollend"),D=je?U!==null?U+"Capture":null:U;je=[];for(var T=L,B;T!==null;){var Y=T;if(B=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||B===null||D===null||(Y=jr(T,D),Y!=null&&je.push(no(T,Y,B))),tt)break;T=T.return}0<je.length&&(U=new P(U,pe,null,s,Q),W.push({event:U,listeners:je}))}}if((a&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",P=t==="mouseout"||t==="pointerout",U&&s!==Nu&&(pe=s.relatedTarget||s.fromElement)&&(es(pe)||pe[Wi]))break e;if((P||U)&&(U=Q.window===Q?Q:(U=Q.ownerDocument)?U.defaultView||U.parentWindow:window,P?(pe=s.relatedTarget||s.toElement,P=L,pe=pe?es(pe):null,pe!==null&&(tt=u(pe),je=pe.tag,pe!==tt||je!==5&&je!==27&&je!==6)&&(pe=null)):(P=null,pe=L),P!==pe)){if(je=ch,Y="onMouseLeave",D="onMouseEnter",T="mouse",(t==="pointerout"||t==="pointerover")&&(je=dh,Y="onPointerLeave",D="onPointerEnter",T="pointer"),tt=P==null?U:wr(P),B=pe==null?U:wr(pe),U=new je(Y,T+"leave",P,s,Q),U.target=tt,U.relatedTarget=B,Y=null,es(Q)===L&&(je=new je(D,T+"enter",pe,s,Q),je.target=B,je.relatedTarget=tt,Y=je),tt=Y,P&&pe)t:{for(je=Oj,D=P,T=pe,B=0,Y=D;Y;Y=je(Y))B++;Y=0;for(var ve=T;ve;ve=je(ve))Y++;for(;0<B-Y;)D=je(D),B--;for(;0<Y-B;)T=je(T),Y--;for(;B--;){if(D===T||T!==null&&D===T.alternate){je=D;break t}D=je(D),T=je(T)}je=null}else je=null;P!==null&&nb(W,U,P,je,!1),pe!==null&&tt!==null&&nb(W,tt,pe,je,!0)}}e:{if(U=L?wr(L):window,P=U.nodeName&&U.nodeName.toLowerCase(),P==="select"||P==="input"&&U.type==="file")var Ge=vh;else if(yh(U))if(Sh)Ge=Pw;else{Ge=$w;var ge=Uw}else P=U.nodeName,!P||P.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?L&&ju(L.elementType)&&(Ge=vh):Ge=Iw;if(Ge&&(Ge=Ge(t,L))){bh(W,Ge,s,Q);break e}ge&&ge(t,U,L),t==="focusout"&&L&&U.type==="number"&&L.memoizedProps.value!=null&&wu(U,"number",U.value)}switch(ge=L?wr(L):window,t){case"focusin":(yh(ge)||ge.contentEditable==="true")&&(cs=ge,Lu=L,Or=null);break;case"focusout":Or=Lu=cs=null;break;case"mousedown":qu=!0;break;case"contextmenu":case"mouseup":case"dragend":qu=!1,_h(W,s,Q);break;case"selectionchange":if(Gw)break;case"keydown":case"keyup":_h(W,s,Q)}var De;if(zu)e:{switch(t){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else ls?hh(t,s)&&(Ue="onCompositionEnd"):t==="keydown"&&s.keyCode===229&&(Ue="onCompositionStart");Ue&&(fh&&s.locale!=="ko"&&(ls||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&ls&&(De=oh()):(Oa=Q,_u="value"in Oa?Oa.value:Oa.textContent,ls=!0)),ge=Gl(L,Ue),0<ge.length&&(Ue=new uh(Ue,t,null,s,Q),W.push({event:Ue,listeners:ge}),De?Ue.data=De:(De=gh(s),De!==null&&(Ue.data=De)))),(De=Rw?Mw(t,s):Bw(t,s))&&(Ue=Gl(L,"onBeforeInput"),0<Ue.length&&(ge=new uh("onBeforeInput","beforeinput",null,s,Q),W.push({event:ge,listeners:Ue}),ge.data=De)),Cj(W,t,L,s,Q)}eb(W,a)})}function no(t,a,s){return{instance:t,listener:a,currentTarget:s}}function Gl(t,a){for(var s=a+"Capture",o=[];t!==null;){var f=t,m=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||m===null||(f=jr(t,s),f!=null&&o.unshift(no(t,f,m)),f=jr(t,a),f!=null&&o.push(no(t,f,m))),t.tag===3)return o;t=t.return}return[]}function Oj(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function nb(t,a,s,o,f){for(var m=a._reactName,S=[];s!==null&&s!==o;){var j=s,_=j.alternate,L=j.stateNode;if(j=j.tag,_!==null&&_===o)break;j!==5&&j!==26&&j!==27||L===null||(_=L,f?(L=jr(s,m),L!=null&&S.unshift(no(s,L,_))):f||(L=jr(s,m),L!=null&&S.push(no(s,L,_)))),s=s.return}S.length!==0&&t.push({event:a,listeners:S})}var Dj=/\r\n?/g,zj=/\u0000|\uFFFD/g;function ab(t){return(typeof t=="string"?t:""+t).replace(Dj,`
|
|
10
|
-
`).replace(zj,"")}function ib(t,a){return a=ab(a),ab(t)===a}function et(t,a,s,o,f,m){switch(s){case"children":typeof o=="string"?a==="body"||a==="textarea"&&o===""||ss(t,o):(typeof o=="number"||typeof o=="bigint")&&a!=="body"&&ss(t,""+o);break;case"className":Zo(t,"class",o);break;case"tabIndex":Zo(t,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Zo(t,s,o);break;case"style":ih(t,o,m);break;case"data":if(a!=="object"){Zo(t,"data",o);break}case"src":case"href":if(o===""&&(a!=="a"||s!=="href")){t.removeAttribute(s);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Fo(""+o),t.setAttribute(s,o);break;case"action":case"formAction":if(typeof o=="function"){t.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 m=="function"&&(s==="formAction"?(a!=="input"&&et(t,a,"name",f.name,f,null),et(t,a,"formEncType",f.formEncType,f,null),et(t,a,"formMethod",f.formMethod,f,null),et(t,a,"formTarget",f.formTarget,f,null)):(et(t,a,"encType",f.encType,f,null),et(t,a,"method",f.method,f,null),et(t,a,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){t.removeAttribute(s);break}o=Fo(""+o),t.setAttribute(s,o);break;case"onClick":o!=null&&(t.onclick=na);break;case"onScroll":o!=null&&Le("scroll",t);break;case"onScrollEnd":o!=null&&Le("scrollend",t);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(f.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"multiple":t.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":t.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){t.removeAttribute("xlink:href");break}s=Fo(""+o),t.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":o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""+o):t.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":o&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,""):t.removeAttribute(s);break;case"capture":case"download":o===!0?t.setAttribute(s,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?t.setAttribute(s,o):t.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?t.setAttribute(s,o):t.removeAttribute(s);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?t.removeAttribute(s):t.setAttribute(s,o);break;case"popover":Le("beforetoggle",t),Le("toggle",t),Qo(t,"popover",o);break;case"xlinkActuate":ta(t,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":ta(t,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":ta(t,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":ta(t,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":ta(t,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":ta(t,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":ta(t,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":ta(t,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":ta(t,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Qo(t,"is",o);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ow.get(s)||s,Qo(t,s,o))}}function uf(t,a,s,o,f,m){switch(s){case"style":ih(t,o,m);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(s=o.__html,s!=null){if(f.children!=null)throw Error(r(60));t.innerHTML=s}}break;case"children":typeof o=="string"?ss(t,o):(typeof o=="number"||typeof o=="bigint")&&ss(t,""+o);break;case"onScroll":o!=null&&Le("scroll",t);break;case"onScrollEnd":o!=null&&Le("scrollend",t);break;case"onClick":o!=null&&(t.onclick=na);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ym.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(f=s.endsWith("Capture"),a=s.slice(2,f?s.length-7:void 0),m=t[en]||null,m=m!=null?m[s]:null,typeof m=="function"&&t.removeEventListener(a,m,f),typeof o=="function")){typeof m!="function"&&m!==null&&(s in t?t[s]=null:t.hasAttribute(s)&&t.removeAttribute(s)),t.addEventListener(a,o,f);break e}s in t?t[s]=o:o===!0?t.setAttribute(s,""):Qo(t,s,o)}}}function Vt(t,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",t),Le("load",t);var o=!1,f=!1,m;for(m in s)if(s.hasOwnProperty(m)){var S=s[m];if(S!=null)switch(m){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:et(t,a,m,S,s,null)}}f&&et(t,a,"srcSet",s.srcSet,s,null),o&&et(t,a,"src",s.src,s,null);return;case"input":Le("invalid",t);var j=m=S=f=null,_=null,L=null;for(o in s)if(s.hasOwnProperty(o)){var Q=s[o];if(Q!=null)switch(o){case"name":f=Q;break;case"type":S=Q;break;case"checked":_=Q;break;case"defaultChecked":L=Q;break;case"value":m=Q;break;case"defaultValue":j=Q;break;case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,a));break;default:et(t,a,o,Q,s,null)}}eh(t,m,j,_,L,S,f,!1);return;case"select":Le("invalid",t),o=S=m=null;for(f in s)if(s.hasOwnProperty(f)&&(j=s[f],j!=null))switch(f){case"value":m=j;break;case"defaultValue":S=j;break;case"multiple":o=j;default:et(t,a,f,j,s,null)}a=m,s=S,t.multiple=!!o,a!=null?is(t,!!o,a,!1):s!=null&&is(t,!!o,s,!0);return;case"textarea":Le("invalid",t),m=f=o=null;for(S in s)if(s.hasOwnProperty(S)&&(j=s[S],j!=null))switch(S){case"value":o=j;break;case"defaultValue":f=j;break;case"children":m=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:et(t,a,S,j,s,null)}nh(t,o,f,m);return;case"option":for(_ in s)s.hasOwnProperty(_)&&(o=s[_],o!=null)&&(_==="selected"?t.selected=o&&typeof o!="function"&&typeof o!="symbol":et(t,a,_,o,s,null));return;case"dialog":Le("beforetoggle",t),Le("toggle",t),Le("cancel",t),Le("close",t);break;case"iframe":case"object":Le("load",t);break;case"video":case"audio":for(o=0;o<to.length;o++)Le(to[o],t);break;case"image":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"embed":case"source":case"link":Le("error",t),Le("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(L in s)if(s.hasOwnProperty(L)&&(o=s[L],o!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:et(t,a,L,o,s,null)}return;default:if(ju(a)){for(Q in s)s.hasOwnProperty(Q)&&(o=s[Q],o!==void 0&&uf(t,a,Q,o,s,void 0));return}}for(j in s)s.hasOwnProperty(j)&&(o=s[j],o!=null&&et(t,a,j,o,s,null))}function Rj(t,a,s,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,m=null,S=null,j=null,_=null,L=null,Q=null;for(P in s){var W=s[P];if(s.hasOwnProperty(P)&&W!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":_=W;default:o.hasOwnProperty(P)||et(t,a,P,null,o,W)}}for(var U in o){var P=o[U];if(W=s[U],o.hasOwnProperty(U)&&(P!=null||W!=null))switch(U){case"type":m=P;break;case"name":f=P;break;case"checked":L=P;break;case"defaultChecked":Q=P;break;case"value":S=P;break;case"defaultValue":j=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(r(137,a));break;default:P!==W&&et(t,a,U,P,o,W)}}xu(t,S,j,_,L,Q,m,f);return;case"select":P=S=j=U=null;for(m in s)if(_=s[m],s.hasOwnProperty(m)&&_!=null)switch(m){case"value":break;case"multiple":P=_;default:o.hasOwnProperty(m)||et(t,a,m,null,o,_)}for(f in o)if(m=o[f],_=s[f],o.hasOwnProperty(f)&&(m!=null||_!=null))switch(f){case"value":U=m;break;case"defaultValue":j=m;break;case"multiple":S=m;default:m!==_&&et(t,a,f,m,o,_)}a=j,s=S,o=P,U!=null?is(t,!!s,U,!1):!!o!=!!s&&(a!=null?is(t,!!s,a,!0):is(t,!!s,s?[]:"",!1));return;case"textarea":P=U=null;for(j in s)if(f=s[j],s.hasOwnProperty(j)&&f!=null&&!o.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:et(t,a,j,null,o,f)}for(S in o)if(f=o[S],m=s[S],o.hasOwnProperty(S)&&(f!=null||m!=null))switch(S){case"value":U=f;break;case"defaultValue":P=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==m&&et(t,a,S,f,o,m)}th(t,U,P);return;case"option":for(var pe in s)U=s[pe],s.hasOwnProperty(pe)&&U!=null&&!o.hasOwnProperty(pe)&&(pe==="selected"?t.selected=!1:et(t,a,pe,null,o,U));for(_ in o)U=o[_],P=s[_],o.hasOwnProperty(_)&&U!==P&&(U!=null||P!=null)&&(_==="selected"?t.selected=U&&typeof U!="function"&&typeof U!="symbol":et(t,a,_,U,o,P));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 je in s)U=s[je],s.hasOwnProperty(je)&&U!=null&&!o.hasOwnProperty(je)&&et(t,a,je,null,o,U);for(L in o)if(U=o[L],P=s[L],o.hasOwnProperty(L)&&U!==P&&(U!=null||P!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,a));break;default:et(t,a,L,U,o,P)}return;default:if(ju(a)){for(var tt in s)U=s[tt],s.hasOwnProperty(tt)&&U!==void 0&&!o.hasOwnProperty(tt)&&uf(t,a,tt,void 0,o,U);for(Q in o)U=o[Q],P=s[Q],!o.hasOwnProperty(Q)||U===P||U===void 0&&P===void 0||uf(t,a,Q,U,o,P);return}}for(var D in s)U=s[D],s.hasOwnProperty(D)&&U!=null&&!o.hasOwnProperty(D)&&et(t,a,D,null,o,U);for(W in o)U=o[W],P=s[W],!o.hasOwnProperty(W)||U===P||U==null&&P==null||et(t,a,W,U,o,P)}function sb(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Mj(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,s=performance.getEntriesByType("resource"),o=0;o<s.length;o++){var f=s[o],m=f.transferSize,S=f.initiatorType,j=f.duration;if(m&&j&&sb(S)){for(S=0,j=f.responseEnd,o+=1;o<s.length;o++){var _=s[o],L=_.startTime;if(L>j)break;var Q=_.transferSize,W=_.initiatorType;Q&&sb(W)&&(_=_.responseEnd,S+=Q*(_<j?1:(j-L)/(_-L)))}if(--o,a+=8*(m+S)/(f.duration/1e3),t++,10<t)break}}if(0<t)return a/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var df=null,ff=null;function Hl(t){return t.nodeType===9?t:t.ownerDocument}function rb(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ob(t,a){if(t===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&a==="foreignObject"?0:t}function pf(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var mf=null;function Bj(){var t=window.event;return t&&t.type==="popstate"?t===mf?!1:(mf=t,!0):(mf=null,!1)}var lb=typeof setTimeout=="function"?setTimeout:void 0,Lj=typeof clearTimeout=="function"?clearTimeout:void 0,cb=typeof Promise=="function"?Promise:void 0,qj=typeof queueMicrotask=="function"?queueMicrotask:typeof cb<"u"?function(t){return cb.resolve(null).then(t).catch(Uj)}:lb;function Uj(t){setTimeout(function(){throw t})}function Za(t){return t==="head"}function ub(t,a){var s=a,o=0;do{var f=s.nextSibling;if(t.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"||s==="/&"){if(o===0){t.removeChild(f),Bs(a);return}o--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")o++;else if(s==="html")ao(t.ownerDocument.documentElement);else if(s==="head"){s=t.ownerDocument.head,ao(s);for(var m=s.firstChild;m;){var S=m.nextSibling,j=m.nodeName;m[xr]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&m.rel.toLowerCase()==="stylesheet"||s.removeChild(m),m=S}}else s==="body"&&ao(t.ownerDocument.body);s=f}while(s);Bs(a)}function db(t,a){var s=t;t=0;do{var o=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),o&&o.nodeType===8)if(s=o.data,s==="/$"){if(t===0)break;t--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||t++;s=o}while(s)}function hf(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":hf(s),vu(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}t.removeChild(s)}}function $j(t,a,s,o){for(;t.nodeType===1;){var f=s;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!o&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(o){if(!t[xr])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(m=t.getAttribute("rel"),m==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(m!==f.rel||t.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||t.getAttribute("title")!==(f.title==null?null:f.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(m=t.getAttribute("src"),(m!==(f.src==null?null:f.src)||t.getAttribute("type")!==(f.type==null?null:f.type)||t.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&m&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var m=f.name==null?null:""+f.name;if(f.type==="hidden"&&t.getAttribute("name")===m)return t}else return t;if(t=kn(t.nextSibling),t===null)break}return null}function Ij(t,a,s){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=kn(t.nextSibling),t===null))return null;return t}function fb(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=kn(t.nextSibling),t===null))return null;return t}function gf(t){return t.data==="$?"||t.data==="$~"}function yf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Pj(t,a){var s=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||s.readyState!=="loading")a();else{var o=function(){a(),s.removeEventListener("DOMContentLoaded",o)};s.addEventListener("DOMContentLoaded",o),t._reactRetry=o}}function kn(t){for(;t!=null;t=t.nextSibling){var a=t.nodeType;if(a===1||a===3)break;if(a===8){if(a=t.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return t}var bf=null;function pb(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="/$"||s==="/&"){if(a===0)return kn(t.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}t=t.nextSibling}return null}function mb(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var s=t.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return t;a--}else s!=="/$"&&s!=="/&"||a++}t=t.previousSibling}return null}function hb(t,a,s){switch(a=Hl(s),t){case"html":if(t=a.documentElement,!t)throw Error(r(452));return t;case"head":if(t=a.head,!t)throw Error(r(453));return t;case"body":if(t=a.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function ao(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);vu(t)}var Cn=new Map,gb=new Set;function Kl(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var ba=ne.d;ne.d={f:Vj,r:Gj,D:Hj,C:Kj,L:Qj,m:Zj,X:Fj,S:Yj,M:Xj};function Vj(){var t=ba.f(),a=Ll();return t||a}function Gj(t){var a=ts(t);a!==null&&a.tag===5&&a.type==="form"?zg(a):ba.r(t)}var zs=typeof document>"u"?null:document;function yb(t,a,s){var o=zs;if(o&&typeof a=="string"&&a){var f=vn(a);f='link[rel="'+t+'"][href="'+f+'"]',typeof s=="string"&&(f+='[crossorigin="'+s+'"]'),gb.has(f)||(gb.add(f),t={rel:t,crossOrigin:s,href:a},o.querySelector(f)===null&&(a=o.createElement("link"),Vt(a,"link",t),Rt(a),o.head.appendChild(a)))}}function Hj(t){ba.D(t),yb("dns-prefetch",t,null)}function Kj(t,a){ba.C(t,a),yb("preconnect",t,a)}function Qj(t,a,s){ba.L(t,a,s);var o=zs;if(o&&t&&a){var f='link[rel="preload"][as="'+vn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(f+='[imagesrcset="'+vn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(f+='[imagesizes="'+vn(s.imageSizes)+'"]')):f+='[href="'+vn(t)+'"]';var m=f;switch(a){case"style":m=Rs(t);break;case"script":m=Ms(t)}Cn.has(m)||(t=w({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:t,as:a},s),Cn.set(m,t),o.querySelector(f)!==null||a==="style"&&o.querySelector(io(m))||a==="script"&&o.querySelector(so(m))||(a=o.createElement("link"),Vt(a,"link",t),Rt(a),o.head.appendChild(a)))}}function Zj(t,a){ba.m(t,a);var s=zs;if(s&&t){var o=a&&typeof a.as=="string"?a.as:"script",f='link[rel="modulepreload"][as="'+vn(o)+'"][href="'+vn(t)+'"]',m=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=Ms(t)}if(!Cn.has(m)&&(t=w({rel:"modulepreload",href:t},a),Cn.set(m,t),s.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(so(m)))return}o=s.createElement("link"),Vt(o,"link",t),Rt(o),s.head.appendChild(o)}}}function Yj(t,a,s){ba.S(t,a,s);var o=zs;if(o&&t){var f=ns(o).hoistableStyles,m=Rs(t);a=a||"default";var S=f.get(m);if(!S){var j={loading:0,preload:null};if(S=o.querySelector(io(m)))j.loading=5;else{t=w({rel:"stylesheet",href:t,"data-precedence":a},s),(s=Cn.get(m))&&vf(t,s);var _=S=o.createElement("link");Rt(_),Vt(_,"link",t),_._p=new Promise(function(L,Q){_.onload=L,_.onerror=Q}),_.addEventListener("load",function(){j.loading|=1}),_.addEventListener("error",function(){j.loading|=2}),j.loading|=4,Ql(S,a,o)}S={type:"stylesheet",instance:S,count:1,state:j},f.set(m,S)}}}function Fj(t,a){ba.X(t,a);var s=zs;if(s&&t){var o=ns(s).hoistableScripts,f=Ms(t),m=o.get(f);m||(m=s.querySelector(so(f)),m||(t=w({src:t,async:!0},a),(a=Cn.get(f))&&Sf(t,a),m=s.createElement("script"),Rt(m),Vt(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function Xj(t,a){ba.M(t,a);var s=zs;if(s&&t){var o=ns(s).hoistableScripts,f=Ms(t),m=o.get(f);m||(m=s.querySelector(so(f)),m||(t=w({src:t,async:!0,type:"module"},a),(a=Cn.get(f))&&Sf(t,a),m=s.createElement("script"),Rt(m),Vt(m,"link",t),s.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},o.set(f,m))}}function bb(t,a,s,o){var f=(f=se.current)?Kl(f):null;if(!f)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=Rs(s.href),s=ns(f).hoistableStyles,o=s.get(a),o||(o={type:"style",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){t=Rs(s.href);var m=ns(f).hoistableStyles,S=m.get(t);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(t,S),(m=f.querySelector(io(t)))&&!m._p&&(S.instance=m,S.state.loading=5),Cn.has(t)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Cn.set(t,s),m||Jj(f,t,s,S.state))),a&&o===null)throw Error(r(528,""));return S}if(a&&o!==null)throw Error(r(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ms(s),s=ns(f).hoistableScripts,o=s.get(a),o||(o={type:"script",instance:null,count:0,state:null},s.set(a,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Rs(t){return'href="'+vn(t)+'"'}function io(t){return'link[rel="stylesheet"]['+t+"]"}function vb(t){return w({},t,{"data-precedence":t.precedence,precedence:null})}function Jj(t,a,s,o){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?o.loading=1:(a=t.createElement("link"),o.preload=a,a.addEventListener("load",function(){return o.loading|=1}),a.addEventListener("error",function(){return o.loading|=2}),Vt(a,"link",s),Rt(a),t.head.appendChild(a))}function Ms(t){return'[src="'+vn(t)+'"]'}function so(t){return"script[async]"+t}function Sb(t,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var o=t.querySelector('style[data-href~="'+vn(s.href)+'"]');if(o)return a.instance=o,Rt(o),o;var f=w({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return o=(t.ownerDocument||t).createElement("style"),Rt(o),Vt(o,"style",f),Ql(o,s.precedence,t),a.instance=o;case"stylesheet":f=Rs(s.href);var m=t.querySelector(io(f));if(m)return a.state.loading|=4,a.instance=m,Rt(m),m;o=vb(s),(f=Cn.get(f))&&vf(o,f),m=(t.ownerDocument||t).createElement("link"),Rt(m);var S=m;return S._p=new Promise(function(j,_){S.onload=j,S.onerror=_}),Vt(m,"link",o),a.state.loading|=4,Ql(m,s.precedence,t),a.instance=m;case"script":return m=Ms(s.src),(f=t.querySelector(so(m)))?(a.instance=f,Rt(f),f):(o=s,(f=Cn.get(m))&&(o=w({},s),Sf(o,f)),t=t.ownerDocument||t,f=t.createElement("script"),Rt(f),Vt(f,"link",o),t.head.appendChild(f),a.instance=f);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(o=a.instance,a.state.loading|=4,Ql(o,s.precedence,t));return a.instance}function Ql(t,a,s){for(var o=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,m=f,S=0;S<o.length;S++){var j=o[S];if(j.dataset.precedence===a)m=j;else if(m!==f)break}m?m.parentNode.insertBefore(t,m.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(t,a.firstChild))}function vf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function Sf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var Zl=null;function xb(t,a,s){if(Zl===null){var o=new Map,f=Zl=new Map;f.set(s,o)}else f=Zl,o=f.get(s),o||(o=new Map,f.set(s,o));if(o.has(t))return o;for(o.set(t,null),s=s.getElementsByTagName(t),f=0;f<s.length;f++){var m=s[f];if(!(m[xr]||m[Ut]||t==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(a)||"";S=t+S;var j=o.get(S);j?j.push(m):o.set(S,[m])}}return o}function wb(t,a,s){t=t.ownerDocument||t,t.head.insertBefore(s,a==="title"?t.querySelector("head > title"):null)}function Wj(t,a,s){if(s===1||a.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(t=a.disabled,typeof a.precedence=="string"&&t==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function jb(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function eN(t,a,s,o){if(s.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var f=Rs(o.href),m=a.querySelector(io(f));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=Yl.bind(t),a.then(t,t)),s.state.loading|=4,s.instance=m,Rt(m);return}m=a.ownerDocument||a,o=vb(o),(f=Cn.get(f))&&vf(o,f),m=m.createElement("link"),Rt(m);var S=m;S._p=new Promise(function(j,_){S.onload=j,S.onerror=_}),Vt(m,"link",o),s.instance=m}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(t.count++,s=Yl.bind(t),a.addEventListener("load",s),a.addEventListener("error",s))}}var xf=0;function tN(t,a){return t.stylesheets&&t.count===0&&Xl(t,t.stylesheets),0<t.count||0<t.imgCount?function(s){var o=setTimeout(function(){if(t.stylesheets&&Xl(t,t.stylesheets),t.unsuspend){var m=t.unsuspend;t.unsuspend=null,m()}},6e4+a);0<t.imgBytes&&xf===0&&(xf=62500*Mj());var f=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Xl(t,t.stylesheets),t.unsuspend)){var m=t.unsuspend;t.unsuspend=null,m()}},(t.imgBytes>xf?50:800)+a);return t.unsuspend=s,function(){t.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function Yl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xl(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Fl=null;function Xl(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Fl=new Map,a.forEach(nN,t),Fl=null,Yl.call(t))}function nN(t,a){if(!(a.state.loading&4)){var s=Fl.get(t);if(s)var o=s.get(null);else{s=new Map,Fl.set(t,s);for(var f=t.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<f.length;m++){var S=f[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(s.set(S.dataset.precedence,S),o=S)}o&&s.set(null,o)}f=a.instance,S=f.getAttribute("data-precedence"),m=s.get(S)||o,m===o&&s.set(null,f),s.set(S,f),this.count++,o=Yl.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),m?m.parentNode.insertBefore(f,m.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(f,t.firstChild)),a.state.loading|=4}}var ro={$$typeof:F,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function aN(t,a,s,o,f,m,S,j,_){this.tag=1,this.containerInfo=t,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=ea(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ea(0),this.hiddenUpdates=ea(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=_,this.incompleteTransitions=new Map}function Nb(t,a,s,o,f,m,S,j,_,L,Q,W){return t=new aN(t,a,s,S,_,L,Q,W,j),a=1,m===!0&&(a|=24),m=dn(3,null,null,a),t.current=m,m.stateNode=t,a=Wu(),a.refCount++,t.pooledCache=a,a.refCount++,m.memoizedState={element:o,isDehydrated:s,cache:a},ad(m),t}function Ab(t){return t?(t=fs,t):fs}function kb(t,a,s,o,f,m){f=Ab(f),o.context===null?o.context=f:o.pendingContext=f,o=La(a),o.payload={element:s},m=m===void 0?null:m,m!==null&&(o.callback=m),s=qa(t,o,a),s!==null&&(on(s,t,a),qr(s,t,a))}function Cb(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var s=t.retryLane;t.retryLane=s!==0&&s<a?s:a}}function wf(t,a){Cb(t,a),(t=t.alternate)&&Cb(t,a)}function _b(t){if(t.tag===13||t.tag===31){var a=Si(t,67108864);a!==null&&on(a,t,67108864),wf(t,67108864)}}function Tb(t){if(t.tag===13||t.tag===31){var a=gn();a=gu(a);var s=Si(t,a);s!==null&&on(s,t,a),wf(t,a)}}var Jl=!0;function iN(t,a,s,o){var f=I.T;I.T=null;var m=ne.p;try{ne.p=2,jf(t,a,s,o)}finally{ne.p=m,I.T=f}}function sN(t,a,s,o){var f=I.T;I.T=null;var m=ne.p;try{ne.p=8,jf(t,a,s,o)}finally{ne.p=m,I.T=f}}function jf(t,a,s,o){if(Jl){var f=Nf(o);if(f===null)cf(t,a,o,Wl,s),Ob(t,o);else if(oN(f,t,a,s,o))o.stopPropagation();else if(Ob(t,o),a&4&&-1<rN.indexOf(t)){for(;f!==null;){var m=ts(f);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=Wn(m.pendingLanes);if(S!==0){var j=m;for(j.pendingLanes|=2,j.entangledLanes|=2;S;){var _=1<<31-Ot(S);j.entanglements[1]|=_,S&=~_}Fn(m),(Qe&6)===0&&(Ml=Gt()+500,eo(0))}}break;case 31:case 13:j=Si(m,2),j!==null&&on(j,m,2),Ll(),wf(m,2)}if(m=Nf(o),m===null&&cf(t,a,o,Wl,s),m===f)break;f=m}f!==null&&o.stopPropagation()}else cf(t,a,o,null,s)}}function Nf(t){return t=Au(t),Af(t)}var Wl=null;function Af(t){if(Wl=null,t=es(t),t!==null){var a=u(t);if(a===null)t=null;else{var s=a.tag;if(s===13){if(t=d(a),t!==null)return t;t=null}else if(s===31){if(t=h(a),t!==null)return t;t=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return Wl=t,null}function Eb(t){switch(t){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(du()){case Io:return 2;case Po:return 8;case _a:case Vo:return 32;case Yi:return 268435456;default:return 32}default:return 32}}var kf=!1,Ya=null,Fa=null,Xa=null,oo=new Map,lo=new Map,Ja=[],rN="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 Ob(t,a){switch(t){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Fa=null;break;case"mouseover":case"mouseout":Xa=null;break;case"pointerover":case"pointerout":oo.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":lo.delete(a.pointerId)}}function co(t,a,s,o,f,m){return t===null||t.nativeEvent!==m?(t={blockedOn:a,domEventName:s,eventSystemFlags:o,nativeEvent:m,targetContainers:[f]},a!==null&&(a=ts(a),a!==null&&_b(a)),t):(t.eventSystemFlags|=o,a=t.targetContainers,f!==null&&a.indexOf(f)===-1&&a.push(f),t)}function oN(t,a,s,o,f){switch(a){case"focusin":return Ya=co(Ya,t,a,s,o,f),!0;case"dragenter":return Fa=co(Fa,t,a,s,o,f),!0;case"mouseover":return Xa=co(Xa,t,a,s,o,f),!0;case"pointerover":var m=f.pointerId;return oo.set(m,co(oo.get(m)||null,t,a,s,o,f)),!0;case"gotpointercapture":return m=f.pointerId,lo.set(m,co(lo.get(m)||null,t,a,s,o,f)),!0}return!1}function Db(t){var a=es(t.target);if(a!==null){var s=u(a);if(s!==null){if(a=s.tag,a===13){if(a=d(s),a!==null){t.blockedOn=a,Km(t.priority,function(){Tb(s)});return}}else if(a===31){if(a=h(s),a!==null){t.blockedOn=a,Km(t.priority,function(){Tb(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){t.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ec(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var s=Nf(t.nativeEvent);if(s===null){s=t.nativeEvent;var o=new s.constructor(s.type,s);Nu=o,s.target.dispatchEvent(o),Nu=null}else return a=ts(s),a!==null&&_b(a),t.blockedOn=s,!1;a.shift()}return!0}function zb(t,a,s){ec(t)&&s.delete(a)}function lN(){kf=!1,Ya!==null&&ec(Ya)&&(Ya=null),Fa!==null&&ec(Fa)&&(Fa=null),Xa!==null&&ec(Xa)&&(Xa=null),oo.forEach(zb),lo.forEach(zb)}function tc(t,a){t.blockedOn===a&&(t.blockedOn=null,kf||(kf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,lN)))}var nc=null;function Rb(t){nc!==t&&(nc=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){nc===t&&(nc=null);for(var a=0;a<t.length;a+=3){var s=t[a],o=t[a+1],f=t[a+2];if(typeof o!="function"){if(Af(o||s)===null)continue;break}var m=ts(s);m!==null&&(t.splice(a,3),a-=3,jd(m,{pending:!0,data:f,method:s.method,action:o},o,f))}}))}function Bs(t){function a(_){return tc(_,t)}Ya!==null&&tc(Ya,t),Fa!==null&&tc(Fa,t),Xa!==null&&tc(Xa,t),oo.forEach(a),lo.forEach(a);for(var s=0;s<Ja.length;s++){var o=Ja[s];o.blockedOn===t&&(o.blockedOn=null)}for(;0<Ja.length&&(s=Ja[0],s.blockedOn===null);)Db(s),s.blockedOn===null&&Ja.shift();if(s=(t.ownerDocument||t).$$reactFormReplay,s!=null)for(o=0;o<s.length;o+=3){var f=s[o],m=s[o+1],S=f[en]||null;if(typeof m=="function")S||Rb(s);else if(S){var j=null;if(m&&m.hasAttribute("formAction")){if(f=m,S=m[en]||null)j=S.formAction;else if(Af(f)!==null)continue}else j=S.action;typeof j=="function"?s[o+1]=j:(s.splice(o,3),o-=3),Rb(s)}}}function Mb(){function t(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return f=S})},focusReset:"manual",scroll:"manual"})}function a(){f!==null&&(f(),f=null),o||setTimeout(s,20)}function s(){if(!o&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){o=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),f!==null&&(f(),f=null)}}}function Cf(t){this._internalRoot=t}ac.prototype.render=Cf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var s=a.current,o=gn();kb(s,o,t,a,null,null)},ac.prototype.unmount=Cf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;kb(t.current,2,null,t,null,null),Ll(),a[Wi]=null}};function ac(t){this._internalRoot=t}ac.prototype.unstable_scheduleHydration=function(t){if(t){var a=Hm();t={blockedOn:null,target:t,priority:a};for(var s=0;s<Ja.length&&a!==0&&a<Ja[s].priority;s++);Ja.splice(s,0,t),s===0&&Db(t)}};var Bb=n.version;if(Bb!=="19.2.4")throw Error(r(527,Bb,"19.2.4"));ne.findDOMNode=function(t){var a=t._reactInternals;if(a===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=b(a),t=t!==null?x(t):null,t=t===null?null:t.stateNode,t};var cN={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{Ta=ic.inject(cN),vt=ic}catch{}}return uo.createRoot=function(t,a){if(!l(t))throw Error(r(299));var s=!1,o="",f=Vg,m=Gg,S=Hg;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError)),a=Nb(t,1,!1,null,null,s,o,null,f,m,S,Mb),t[Wi]=a.current,lf(t),new Cf(a)},uo.hydrateRoot=function(t,a,s){if(!l(t))throw Error(r(299));var o=!1,f="",m=Vg,S=Gg,j=Hg,_=null;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onUncaughtError!==void 0&&(m=s.onUncaughtError),s.onCaughtError!==void 0&&(S=s.onCaughtError),s.onRecoverableError!==void 0&&(j=s.onRecoverableError),s.formState!==void 0&&(_=s.formState)),a=Nb(t,1,!0,a,s??null,o,f,_,m,S,j,Mb),a.context=Ab(null),s=a.current,o=gn(),o=gu(o),f=La(o),f.callback=null,qa(s,f,o),s=o,a.current.lanes=s,hi(a,s),Fn(a),t[Wi]=a.current,lf(t),new ac(a)},uo.version="19.2.4",uo}var $b;function _N(){if($b)return _f.exports;$b=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),_f.exports=CN(),_f.exports}var TN=_N();const EN={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},ON=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:l,sseDefaultRetryDelay:u,sseMaxRetryAttempts:d,sseMaxRetryDelay:h,sseSleepFn:y,url:b,...x})=>{let w;const A=y??(k=>new Promise(E=>setTimeout(E,k)));return{stream:async function*(){let k=u??3e3,E=0;const M=x.signal??new AbortController().signal;for(;!M.aborted;){E++;const G=x.headers instanceof Headers?x.headers:new Headers(x.headers);w!==void 0&&G.set("Last-Event-ID",w);try{const F={redirect:"follow",...x,body:x.serializedBody,headers:G,signal:M};let H=new Request(b,F);e&&(H=await e(b,F));const oe=await(x.fetch??globalThis.fetch)(H);if(!oe.ok)throw new Error(`SSE failed: ${oe.status} ${oe.statusText}`);if(!oe.body)throw new Error("No body in SSE response");const z=oe.body.pipeThrough(new TextDecoderStream).getReader();let R="";const le=()=>{try{z.cancel()}catch{}};M.addEventListener("abort",le);try{for(;;){const{done:ye,value:ze}=await z.read();if(ye)break;R+=ze;const Se=R.split(`
|
|
11
|
-
|
|
12
|
-
`);R=Se.pop()??"";for(const Me of Se){const ot=Me.split(`
|
|
13
|
-
`),we=[];let I;for(const fe of ot)if(fe.startsWith("data:"))we.push(fe.replace(/^data:\s*/,""));else if(fe.startsWith("event:"))I=fe.replace(/^event:\s*/,"");else if(fe.startsWith("id:"))w=fe.replace(/^id:\s*/,"");else if(fe.startsWith("retry:")){const ie=Number.parseInt(fe.replace(/^retry:\s*/,""),10);Number.isNaN(ie)||(k=ie)}let ne,V=!1;if(we.length){const fe=we.join(`
|
|
14
|
-
`);try{ne=JSON.parse(fe),V=!0}catch{ne=fe}}V&&(l&&await l(ne),r&&(ne=await r(ne))),i?.({data:ne,event:I,id:w,retry:k}),we.length&&(yield ne)}}}finally{M.removeEventListener("abort",le),z.releaseLock()}break}catch(F){if(n?.(F),d!==void 0&&E>=d)break;const H=Math.min(k*2**(E-1),h??3e4);await A(H)}}}()}},DN=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},zN=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},RN=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},C0=({allowReserved:e,explode:n,name:i,style:r,value:l})=>{if(!n){const h=(e?l:l.map(y=>encodeURIComponent(y))).join(zN(r));switch(r){case"label":return`.${h}`;case"matrix":return`;${i}=${h}`;case"simple":return h;default:return`${i}=${h}`}}const u=DN(r),d=l.map(h=>r==="label"||r==="simple"?e?h:encodeURIComponent(h):Lc({allowReserved:e,name:i,value:h})).join(u);return r==="label"||r==="matrix"?u+d:d},Lc=({allowReserved:e,name:n,value:i})=>{if(i==null)return"";if(typeof i=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${e?i:encodeURIComponent(i)}`},_0=({allowReserved:e,explode:n,name:i,style:r,value:l,valueOnly:u})=>{if(l instanceof Date)return u?l.toISOString():`${i}=${l.toISOString()}`;if(r!=="deepObject"&&!n){let y=[];Object.entries(l).forEach(([x,w])=>{y=[...y,x,e?w:encodeURIComponent(w)]});const b=y.join(",");switch(r){case"form":return`${i}=${b}`;case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;default:return b}}const d=RN(r),h=Object.entries(l).map(([y,b])=>Lc({allowReserved:e,name:r==="deepObject"?`${i}[${y}]`:y,value:b})).join(d);return r==="label"||r==="matrix"?d+h:h},MN=/\{[^{}]+\}/g,BN=({path:e,url:n})=>{let i=n;const r=n.match(MN);if(r)for(const l of r){let u=!1,d=l.substring(1,l.length-1),h="simple";d.endsWith("*")&&(u=!0,d=d.substring(0,d.length-1)),d.startsWith(".")?(d=d.substring(1),h="label"):d.startsWith(";")&&(d=d.substring(1),h="matrix");const y=e[d];if(y==null)continue;if(Array.isArray(y)){i=i.replace(l,C0({explode:u,name:d,style:h,value:y}));continue}if(typeof y=="object"){i=i.replace(l,_0({explode:u,name:d,style:h,value:y,valueOnly:!0}));continue}if(h==="matrix"){i=i.replace(l,`;${Lc({name:d,value:y})}`);continue}const b=encodeURIComponent(h==="label"?`.${y}`:y);i=i.replace(l,b)}return i},LN=({baseUrl:e,path:n,query:i,querySerializer:r,url:l})=>{const u=l.startsWith("/")?l:`/${l}`;let d=(e??"")+u;n&&(d=BN({path:n,url:d}));let h=i?r(i):"";return h.startsWith("?")&&(h=h.substring(1)),h&&(d+=`?${h}`),d};function qN(e){const n=e.body!==void 0;if(n&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(n)return e.body}const UN=async(e,n)=>{const i=typeof n=="function"?await n(e):n;if(i)return e.scheme==="bearer"?`Bearer ${i}`:e.scheme==="basic"?`Basic ${btoa(i)}`:i},T0=({allowReserved:e,array:n,object:i}={})=>l=>{const u=[];if(l&&typeof l=="object")for(const d in l){const h=l[d];if(h!=null)if(Array.isArray(h)){const y=C0({allowReserved:e,explode:!0,name:d,style:"form",value:h,...n});y&&u.push(y)}else if(typeof h=="object"){const y=_0({allowReserved:e,explode:!0,name:d,style:"deepObject",value:h,...i});y&&u.push(y)}else{const y=Lc({allowReserved:e,name:d,value:h});y&&u.push(y)}}return u.join("&")},$N=e=>{if(!e)return"stream";const n=e.split(";")[0]?.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(i=>n.startsWith(i)))return"blob";if(n.startsWith("text/"))return"text"}},IN=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,PN=async({security:e,...n})=>{for(const i of e){if(IN(n,i.name))continue;const r=await UN(i,n.auth);if(!r)continue;const l=i.name??"Authorization";switch(i.in){case"query":n.query||(n.query={}),n.query[l]=r;break;case"cookie":n.headers.append("Cookie",`${l}=${r}`);break;default:n.headers.set(l,r);break}}},Ib=e=>LN({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:T0(e.querySerializer),url:e.url}),Pb=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=E0(e.headers,n.headers),i},VN=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},E0=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?VN(i):Object.entries(i);for(const[l,u]of r)if(u===null)n.delete(l);else if(Array.isArray(u))for(const d of u)n.append(l,d);else u!==void 0&&n.set(l,typeof u=="object"?JSON.stringify(u):u)}return n};class Of{fns=[];clear(){this.fns=[]}eject(n){const i=this.getInterceptorIndex(n);this.fns[i]&&(this.fns[i]=null)}exists(n){const i=this.getInterceptorIndex(n);return!!this.fns[i]}getInterceptorIndex(n){return typeof n=="number"?this.fns[n]?n:-1:this.fns.indexOf(n)}update(n,i){const r=this.getInterceptorIndex(n);return this.fns[r]?(this.fns[r]=i,n):!1}use(n){return this.fns.push(n),this.fns.length-1}}const GN=()=>({error:new Of,request:new Of,response:new Of}),HN=T0({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),KN={"Content-Type":"application/json"},O0=(e={})=>({...EN,headers:KN,parseAs:"auto",querySerializer:HN,...e}),D0=(e={})=>{let n=Pb(O0(),e);const i=()=>({...n}),r=b=>(n=Pb(n,b),i()),l=GN(),u=async b=>{const x={...n,...b,fetch:b.fetch??n.fetch??globalThis.fetch,headers:E0(n.headers,b.headers),serializedBody:void 0};x.security&&await PN({...x,security:x.security}),x.requestValidator&&await x.requestValidator(x),x.body!==void 0&&x.bodySerializer&&(x.serializedBody=x.bodySerializer(x.body)),(x.body===void 0||x.serializedBody==="")&&x.headers.delete("Content-Type");const w=Ib(x);return{opts:x,url:w}},d=async b=>{const{opts:x,url:w}=await u(b),A={redirect:"follow",...x,body:qN(x)};let C=new Request(w,A);for(const X of l.request.fns)X&&(C=await X(C,x));const O=x.fetch;let k=await O(C);for(const X of l.response.fns)X&&(k=await X(k,C,x));const E={request:C,response:k};if(k.ok){const X=(x.parseAs==="auto"?$N(k.headers.get("Content-Type")):x.parseAs)??"json";if(k.status===204||k.headers.get("Content-Length")==="0"){let z;switch(X){case"arrayBuffer":case"blob":case"text":z=await k[X]();break;case"formData":z=new FormData;break;case"stream":z=k.body;break;default:z={};break}return x.responseStyle==="data"?z:{data:z,...E}}let oe;switch(X){case"arrayBuffer":case"blob":case"formData":case"json":case"text":oe=await k[X]();break;case"stream":return x.responseStyle==="data"?k.body:{data:k.body,...E}}return X==="json"&&(x.responseValidator&&await x.responseValidator(oe),x.responseTransformer&&(oe=await x.responseTransformer(oe))),x.responseStyle==="data"?oe:{data:oe,...E}}const M=await k.text();let G;try{G=JSON.parse(M)}catch{}const F=G??M;let H=F;for(const X of l.error.fns)X&&(H=await X(F,k,C,x));if(H=H||{},x.throwOnError)throw H;return x.responseStyle==="data"?void 0:{error:H,...E}},h=b=>x=>d({...x,method:b}),y=b=>async x=>{const{opts:w,url:A}=await u(x);return ON({...w,body:w.body,headers:w.headers,method:b,onRequest:async(C,O)=>{let k=new Request(C,O);for(const E of l.request.fns)E&&(k=await E(k,w));return k},url:A})};return{buildUrl:Ib,connect:h("CONNECT"),delete:h("DELETE"),get:h("GET"),getConfig:i,head:h("HEAD"),interceptors:l,options:h("OPTIONS"),patch:h("PATCH"),post:h("POST"),put:h("PUT"),request:d,setConfig:r,sse:{connect:y("CONNECT"),delete:y("DELETE"),get:y("GET"),head:y("HEAD"),options:y("OPTIONS"),patch:y("PATCH"),post:y("POST"),put:y("PUT"),trace:y("TRACE")},trace:h("TRACE")}},K=D0(O0()),QN=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps/submit",...e,headers:{"Content-Type":"application/json",...e.headers}}),ZN=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),z0=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),YN=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),FN=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),XN=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e}),JN=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),WN=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs/{runId}",...e}),eA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),tA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),nA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),aA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),iA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),sA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),rA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),oA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),lA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e}),cA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),uA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),dA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors/{id}",...e}),R0=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),fA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),pA=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),mA=e=>(e?.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),M0=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),hA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),gA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/history",...e}),yA=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/history",...e}),bA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),vA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),SA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/snapshots/diff",...e}),B0=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),xA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),wA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),jA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),NA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),AA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),kA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),CA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),_A=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),TA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),EA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),OA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),DA=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),zA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),RA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),MA=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),BA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),LA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),qA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),UA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),$A=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),IA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),PA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),VA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),GA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),L0=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),HA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),KA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),QA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),ZA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),YA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),FA=e=>(e.client??K).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),XA=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),JA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),WA=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),ek=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),tk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),nk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),ak=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),ik=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),sk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),rk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),ok=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),q0=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),lk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),ck=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),uk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),dk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),fk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),pk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),mk=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),hk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),gk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),yk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),bk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-daily",...e}),vk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),Sk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),xk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),wk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/report",...e}),jk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/health/history",...e}),Nk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),Ak=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/content/dismissals",...e,headers:{"Content-Type":"application/json",...e.headers}}),kk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),Ck=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),_k=e=>(e?.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),Tk=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),Ek=e=>(e?.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Ok=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),Dk=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),zk=e=>(e?.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),Rk=e=>(e.client??K).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),Mk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),Bk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),Lk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),qk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),Uk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/sources",...e}),$k=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/bing-sync",...e}),Ik=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),Vk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),Gk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Hk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),Qk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),Zk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),Yk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),Fk=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),Xk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),Jk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),Wk=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e}),eC=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}/promote",...e,headers:{"Content-Type":"application/json",...e.headers}}),tC=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),nC=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),aC=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),iC=e=>(e.client??K).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),sC=e=>(e.client??K).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function rC(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return D0(n)}class In extends Error{code;statusCode;details;constructor(n,i,r,l){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i,this.details=l}}function oC(){if(typeof window>"u")return;const e=window.__CANONRY_CONFIG__?.embed?.renderToken;return typeof e=="string"&&e.length>0?e:void 0}function Dp(e){const n=oC();if(!n)return e;let i;const r=typeof window<"u"&&window.location?window.location.href:"http://localhost/";try{i=new URL(e,r)}catch{return e}const l=new URL(r).origin;if(i.origin!==l)return e;const d=`${Rp().replace(/\/$/,"")}/api/v1`;return i.pathname!==d&&!i.pathname.startsWith(`${d}/`)?e:(i.searchParams.set("token",n),/^[a-z][a-z\d+.-]*:/i.test(e)?i.toString():`${i.pathname}${i.search}${i.hash}`)}function lC(e,n){const i={method:e.method,headers:e.headers,cache:e.cache,credentials:e.credentials,integrity:e.integrity,keepalive:e.keepalive,mode:e.mode,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,signal:e.signal};return e.body&&(i.body=e.body,i.duplex="half"),new Request(n,i)}function U0(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function cC(){return U0()!==null}function uC(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const zp=uC();function dC(){const e=typeof window<"u"&&window.location?window.location.origin:"";return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?e+window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):e}function Rp(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function fC(e){const n=e.trim().toLowerCase().replace(/^\[|\]$/g,"");return n==="localhost"||n==="::1"?!0:/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)}function pC(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:"||!fC(e.hostname))return;const i=e.port?`:${e.port}`:"",r=n?n.replace(/\/$/,""):"";return`${e.protocol}//localhost${i}${r}`}function SU(e){return`${e.replace(/\/$/,"")}/api/v1/google/callback`}function mC(){if(!(typeof window>"u"))return pC(window.location,Rp())}function hC(e){return`${Rp()}${e}`}function gC(e,n){if(n===404)return"Health endpoint returned 404. Check basePath or reverse-proxy configuration and make sure the dashboard reaches /health instead of an API-prefixed route."}function yC(){return""}function Df(){return!!yC()}let $0=null;function Vb(e){$0=e}function Mp(){$0?.()}const ae=rC({baseUrl:dC()});ae.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&Mp(),e));ae.interceptors.request.use(e=>{const n=Dp(e.url);return n===e.url?e:lC(e,n)});async function ce(e){const n=await e();if(n.error!==void 0&&n.error!==null){const i=n.response.status;let r=`API ${i}: ${n.response.statusText}`,l,u;if(typeof n.error=="object"&&n.error!==null){const d=n.error.error;if(typeof d=="string")r=d;else if(d&&typeof d=="object"){const h=d;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(u=h.details)}else{const h=n.error;h.message&&(r=h.message),h.code&&(l=h.code),h.details&&(u=h.details)}}else typeof n.error=="string"&&(r=n.error);throw new In(r,i,l,u)}if(n.response.status!==204)return n.data}async function Bp(e,n){const i=n?.body!=null,r=await fetch(Dp(`${zp}${e}`),{...n,credentials:n?.credentials??"same-origin",headers:{...i?{"Content-Type":"application/json"}:{},...n?.headers}});if(!r.ok){const l=await r.text();let u=`API ${r.status}: ${r.statusText}`,d,h;if(l)try{const y=JSON.parse(l);typeof y.error=="string"?u=y.error:y.error?.message?(u=y.error.message,d=y.error.code,h=y.error.details):y.message&&(u=y.message)}catch{u=l}throw r.status===401&&!e.startsWith("/session")&&Mp(),new In(u,r.status,d,h)}if(r.status!==204)return r.json()}function Lp(e){return ce(()=>z0({client:ae,path:{name:e}}))}function xU(e){return ce(()=>R0({client:ae,path:{name:e}}))}function wc(e){return ce(()=>M0({client:ae,path:{id:e}}))}function bC(e){return ce(()=>iA({client:ae,path:{name:e}}))}function vC(e){return ce(()=>lA({client:ae,path:{name:e}}))}function SC(e,n,i){return ce(()=>bA({client:ae,path:{name:e},query:{location:n,limit:i}}))}function I0(e,n){return ce(()=>kk({client:ae,path:{name:e},query:{location:n?.location,since:n?.since}}))}function _o(e,n){return ce(()=>YN({client:ae,path:{name:e},body:n}))}function xC(e,n){return ce(()=>rA({client:ae,path:{name:e},body:{queries:n}}))}function wC(e,n){return ce(()=>sA({client:ae,path:{name:e},body:{queries:n}}))}function wU(e,n){return ce(()=>aA({client:ae,path:{name:e},body:{queries:n}}))}function jC(e,n){return ce(()=>Ak({client:ae,path:{name:e},body:n}))}function NC(e,n){return ce(()=>uA({client:ae,path:{name:e},body:{competitors:n}}))}function jU(e,n){return ce(()=>cA({client:ae,path:{name:e},body:{competitors:n}}))}function NU(e,n){return ce(()=>dA({client:ae,path:{name:e,id:n}}))}async function AU(e,n){const i=await Lp(e);return _o(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:n,aliases:i.aliases,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,providerModels:i.providerModels??{},locations:i.locations,defaultLocation:i.defaultLocation,autoExtractBacklinks:i.autoExtractBacklinks})}async function kU(e,n){const i=await Lp(e);return _o(e,{displayName:i.displayName??i.name,canonicalDomain:i.canonicalDomain,ownedDomains:i.ownedDomains,aliases:n,country:i.country,language:i.language,tags:i.tags,labels:i.labels,providers:i.providers,providerModels:i.providerModels??{},locations:i.locations,defaultLocation:i.defaultLocation,autoExtractBacklinks:i.autoExtractBacklinks})}async function CU(e,n){const i=await Lp(e);return _o(e,{displayName:n.displayName??i.displayName??i.name,canonicalDomain:n.canonicalDomain??i.canonicalDomain,ownedDomains:n.ownedDomains??i.ownedDomains,aliases:n.aliases??i.aliases,country:n.country??i.country,language:n.language??i.language,tags:i.tags,labels:i.labels,providers:n.providers??i.providers,providerModels:n.providerModels??i.providerModels??{},locations:n.locations??i.locations,defaultLocation:n.defaultLocation!==void 0?n.defaultLocation:i.defaultLocation,autoExtractBacklinks:i.autoExtractBacklinks})}function AC(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ce(()=>fA({client:ae,path:{name:e},body:i}))}function _U(e,n){return ce(()=>eA({client:ae,path:{name:e},body:n}))}async function TU(e,n){await ce(()=>tA({client:ae,path:{name:e,label:n}}))}function EU(e,n){return ce(()=>nA({client:ae,path:{name:e},body:{label:n}}))}async function OU(e){await ce(()=>ZN({client:ae,path:{name:e}}))}function DU(){return ce(()=>B0({client:ae}))}function Gb(){return Bp("/session")}function kC(e){return Bp("/session/setup",{method:"POST",body:JSON.stringify({password:e})})}function CC(e){return Bp("/session",{method:"POST",body:JSON.stringify({password:e})})}function _C(e,n){return ce(()=>xA({client:ae,path:{name:e},body:n}))}function zU(e){return ce(()=>wA({client:ae,body:e}))}async function RU(e){try{return await ce(()=>kA({client:ae,path:{name:e}}))}catch(n){if(n instanceof In&&n.statusCode===404)return null;throw n}}function MU(e,n){return ce(()=>CA({client:ae,path:{name:e},body:n}))}async function BU(e){await ce(()=>AA({client:ae,path:{name:e}}))}function LU(e){return ce(()=>_A({client:ae,path:{name:e}}))}function qU(e,n){return ce(()=>TA({client:ae,path:{name:e},body:n}))}async function UU(e,n){await ce(()=>EA({client:ae,path:{name:e,id:n}}))}function $U(e,n){return ce(()=>OA({client:ae,path:{name:e,id:n}}))}function TC(e,n,i){return ce(()=>oA({client:ae,path:{name:e},body:{provider:n,count:i}}))}function EC(e){return ce(()=>hA({client:ae,body:e}))}function OC(e){return ce(()=>mA({client:ae,body:e??{}}))}function IU(e,n){const i=mC();return ce(()=>RA({client:ae,path:{name:e},body:{type:n,...i?{publicUrl:i}:{}}}))}function PU(e,n){return ce(()=>MA({client:ae,path:{name:e,type:n}}))}function VU(e,n,i){return ce(()=>LA({client:ae,path:{name:e,type:n},body:{propertyId:i}}))}function GU(e,n,i){return ce(()=>qA({client:ae,path:{name:e,type:n},body:{sitemapUrl:i}}))}function DC(e,n){return ce(()=>UA({client:ae,path:{name:e},body:n??{}}))}function HU(e,n){const i={};return n&&n!=="all"&&(i.window=n),ce(()=>vA({client:ae,path:{name:e},query:i}))}function KU(e,n){return ce(()=>PA({client:ae,path:{name:e},body:{url:n}}))}function zC(e){return ce(()=>L0({client:ae,path:{name:e}}))}function RC(e,n){return ce(()=>QA({client:ae,path:{name:e},body:n??{}}))}function QU(e,n){return ce(()=>KA({client:ae,path:{name:e},query:n?{sitemapIndex:n}:void 0}))}function ZU(e,n){return ce(()=>QN({client:ae,path:{name:e},body:{sitemapUrls:n}}))}function MC(e,n){return ce(()=>iC({client:ae,path:{name:e},body:n??{}}))}function YU(e,n){return ce(()=>Fk({client:ae,path:{name:e},body:n??{}}))}function FU(e,n,i){return ce(()=>eC({client:ae,path:{name:e,id:n},body:i??{}}))}function XU(){return ce(()=>DA({client:ae}))}function JU(e,n){return ce(()=>NA({client:ae,body:{host:e,port:n}}))}function WU(e,n){return ce(()=>ZA({client:ae,path:{name:e},body:n}))}function e$(e,n){return ce(()=>ak({client:ae,path:{name:e},body:{apiKey:n}}))}function t$(e){return ce(()=>ik({client:ae,path:{name:e}}))}function n$(e,n){return ce(()=>ok({client:ae,path:{name:e},body:{siteUrl:n}}))}function BC(e){return ce(()=>q0({client:ae,path:{name:e}}))}function a$(e,n){return ce(()=>ck({client:ae,path:{name:e},body:{url:n}}))}function i$(e,n){return ce(()=>uk({client:ae,path:{name:e},body:{}}))}function s$(e,n){return ce(()=>dk({client:ae,path:{name:e},body:n}))}function r$(e){return ce(()=>jA({client:ae,body:{apiKey:e}}))}function P0(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function o$(e,n="agency",i){const r=new URLSearchParams({audience:n});i!==void 0&&r.set("period",String(i));const l=await fetch(Dp(`${zp}/projects/${encodeURIComponent(e)}/report.html?${r.toString()}`),{credentials:"same-origin",headers:{}});if(!l.ok)throw new In(`Failed to download report: ${l.status}`,l.status);const u=await l.blob(),d=URL.createObjectURL(u),h=P0(l.headers.get("Content-Disposition"))??`canonry-report-${e}.html`,y=document.createElement("a");y.href=d,y.download=h,document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(d)}async function l$(e,n){const i=await fetch(`${zp}/projects/${encodeURIComponent(e)}/results/export?format=${n}`,{credentials:"same-origin",headers:{}});if(!i.ok)throw new In(`Failed to download results: ${i.status}`,i.status);const r=await i.blob(),l=URL.createObjectURL(r),u=P0(i.headers.get("Content-Disposition"))??`canonry-results-${e}.${n}`,d=document.createElement("a");d.href=l,d.download=u,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(l)}function c$(e,n){return ce(()=>gk({client:ae,path:{name:e},body:{}}))}function u$(e,n){return ce(()=>pk({client:ae,path:{name:e},body:n}))}function d$(e){return ce(()=>mk({client:ae,path:{name:e}}))}function f$(e,n){return ce(()=>Ik({client:ae,path:{name:e},body:n}))}function p$(e,n){return ce(()=>Pk({client:ae,path:{name:e},body:n}))}function m$(e,n){return ce(()=>Vk({client:ae,path:{name:e},body:n}))}function h$(e,n,i){return ce(()=>Gk({client:ae,path:{name:e,id:n},body:i??{}}))}function g$(e,n,i){return ce(()=>Hk({client:ae,path:{name:e,id:n},body:{}}))}function LC(e,n){return ce(()=>xk({client:ae,path:{name:e},query:{runId:n}}))}function qC(e){if(!e||typeof e!="object")return;const n=e;if(!(typeof n.current!="string"||typeof n.latest!="string"||typeof n.url!="string"||typeof n.upgradeCommand!="string"))return{current:n.current,latest:n.latest,url:n.url,upgradeCommand:n.upgradeCommand}}async function UC(e,n){const i=hC(e);try{const r=await fetch(i,{credentials:"same-origin"});if(!r.ok)return{label:n,state:"error",detail:`${n} ${r.status}: ${r.statusText}`,statusCode:r.status,hint:gC(e,r.status)};const l=await r.json(),u=typeof l.version=="string"?l.version:"unknown",d=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,h=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,y=qC(l.updateAvailable),b=[u,d===!1?"database not configured":"database configured",h?`heartbeat ${h}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:b,version:u,databaseConfigured:d,lastHeartbeatAt:h,...y?{updateAvailable:y}:{}}}catch(r){return{label:n,state:"error",detail:r instanceof Error?r.message:"unreachable",hint:e==="/health"?`Request failed while checking ${i}. If this instance is served behind a sub-path, verify the dashboard basePath and reverse-proxy rewrites.`:void 0}}}function y$(){return ce(()=>Ck({client:ae}))}function b$(){return ce(()=>_k({client:ae}))}function v$(){return ce(()=>Ok({client:ae}))}function S$(){return ce(()=>Tk({client:ae}))}function x$(e){return ce(()=>Ek({client:ae,body:e?{release:e}:{}}))}function w$(){return ce(()=>Dk({client:ae}))}function j$(){return ce(()=>zk({client:ae}))}function N$(e){return ce(()=>Rk({client:ae,path:{release:e}}))}function A$(e,n={}){return ce(()=>Bk({client:ae,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function k$(e,n={}){return ce(()=>Lk({client:ae,path:{name:e},query:{limit:n.limit!==void 0?String(n.limit):void 0,offset:n.offset!==void 0?String(n.offset):void 0,release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function C$(e,n={}){return ce(()=>qk({client:ae,path:{name:e},query:{source:n.source}}))}function _$(e,n={}){return ce(()=>Uk({client:ae,path:{name:e},query:{excludeCrawlers:n.excludeCrawlers?"1":void 0}}))}function T$(e,n){return ce(()=>Mk({client:ae,path:{name:e},body:{release:void 0}}))}function E$(e){return ce(()=>$k({client:ae,path:{name:e}}))}function Tn(e){return(...n)=>{e(...n)}}const $C=6e3,IC=5,PC=180;let Ht=[],VC=0;const tp=new Set,np=new Map,ap=new Map;function jc(){const e=[...Ht];for(const n of tp)n(e)}function qp(e){const n=np.get(e);n&&(clearTimeout(n),np.delete(e));const i=ap.get(e);i&&(clearTimeout(i),ap.delete(e))}function V0(e){qp(e);const n=Ht.length;Ht=Ht.filter(i=>i.id!==e),Ht.length!==n&&jc()}function Hb(e){qp(e.id),np.set(e.id,setTimeout(()=>{ip(e.id)},e.durationMs))}function GC(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function Xt(e,n="negative",i=$C){const r=GC(e,n,i),l={id:String(++VC),title:r.title,detail:r.detail,tone:r.tone??n,durationMs:r.durationMs??i,dedupeKey:r.dedupeKey,cta:r.cta,state:"open"};if(r.dedupeKey){const u=Ht.find(d=>d.dedupeKey===r.dedupeKey);if(u){if((r.dedupeMode??"drop")==="drop")return u.id;const d={...u,title:l.title,detail:l.detail,tone:l.tone,durationMs:l.durationMs,cta:l.cta,state:"open"};return Ht=Ht.map(h=>h.id===u.id?d:h),jc(),Hb(d),u.id}}return Ht.length>=IC&&V0(Ht[0].id),Ht=[...Ht,l],jc(),Hb(l),l.id}function ip(e){const n=Ht.find(i=>i.id===e);!n||n.state==="closing"||(qp(e),Ht=Ht.map(i=>i.id===e?{...i,state:"closing"}:i),jc(),ap.set(e,setTimeout(()=>{V0(e)},PC)))}function HC(e){return tp.add(e),()=>{tp.delete(e)}}function Kb(){return Ht}const KC=5*6e4,sp=30*6e4,O$=3e4,D$=6e4,Js=3e4,QC=2e3;function ZC(){return new pN({defaultOptions:{queries:{staleTime:KC,retry:1,refetchOnWindowFocus:!1}},mutationCache:new mN({onError:(e,n,i,r)=>{r.meta?.skipGlobalErrorToast||Xt({title:e instanceof Error?e.message:"An unexpected error occurred",tone:"negative"})}})})}const YC="modulepreload",FC=function(e,n){return new URL(e,n).href},Qb={},$i=function(n,i,r){let l=Promise.resolve();if(i&&i.length>0){let b=function(x){return Promise.all(x.map(w=>Promise.resolve(w).then(A=>({status:"fulfilled",value:A}),A=>({status:"rejected",reason:A}))))};const d=document.getElementsByTagName("link"),h=document.querySelector("meta[property=csp-nonce]"),y=h?.nonce||h?.getAttribute("nonce");l=b(i.map(x=>{if(x=FC(x,r),x in Qb)return;Qb[x]=!0;const w=x.endsWith(".css"),A=w?'[rel="stylesheet"]':"";if(r)for(let O=d.length-1;O>=0;O--){const k=d[O];if(k.href===x&&(!w||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${x}"]${A}`))return;const C=document.createElement("link");if(C.rel=w?"stylesheet":YC,w||(C.as="script"),C.crossOrigin="",C.href=x,y&&C.setAttribute("nonce",y),document.head.appendChild(C),w)return new Promise((O,k)=>{C.addEventListener("load",O),C.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${x}`)))})}))}function u(d){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=d,window.dispatchEvent(h),!h.defaultPrevented)throw d}return l.then(d=>{for(const h of d||[])h.status==="rejected"&&u(h.reason);return n().catch(u)})};const XC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,i,r)=>r?r.toUpperCase():i.toLowerCase()),Zb=e=>{const n=JC(e);return n.charAt(0).toUpperCase()+n.slice(1)},G0=(...e)=>e.filter((n,i,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===i).join(" ").trim(),WC=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var e_={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 t_=q.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:l="",children:u,iconNode:d,...h},y)=>q.createElement("svg",{ref:y,...e_,width:n,height:n,stroke:e,strokeWidth:r?Number(i)*24/Number(n):i,className:G0("lucide",l),...!u&&!WC(h)&&{"aria-hidden":"true"},...h},[...d.map(([b,x])=>q.createElement(b,x)),...Array.isArray(u)?u:[u]]));const Ye=(e,n)=>{const i=q.forwardRef(({className:r,...l},u)=>q.createElement(t_,{ref:u,iconNode:n,className:G0(`lucide-${XC(Zb(e))}`,`lucide-${e}`,r),...l}));return i.displayName=Zb(e),i};const n_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],a_=Ye("arrow-right",n_);const i_=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],s_=Ye("arrow-up",i_);const r_=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],o_=Ye("book-open",r_);const l_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],H0=Ye("check",l_);const c_=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],K0=Ye("chevron-down",c_);const u_=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Up=Ye("chevron-right",u_);const d_=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],f_=Ye("copy",d_);const p_=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],m_=Ye("file-text",p_);const h_=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],g_=Ye("github",h_);const y_=[["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"}]],b_=Ye("globe",y_);const v_=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],S_=Ye("history",v_);const x_=[["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"}]],w_=Ye("layout-dashboard",x_);const j_=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],N_=Ye("link-2",j_);const A_=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Q0=Ye("loader-circle",A_);const k_=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],C_=Ye("maximize-2",k_);const __=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],T_=Ye("menu",__);const E_=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],O_=Ye("minimize-2",E_);const D_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],z_=Ye("panel-left-close",D_);const R_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],M_=Ye("panel-left-open",R_);const B_=[["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"}]],L_=Ye("play",B_);const q_=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Yb=Ye("plus",q_);const U_=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],$_=Ye("radar",U_);const I_=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Fb=Ye("radio",I_);const P_=[["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"}]],V_=Ye("rocket",P_);const G_=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Z0=Ye("rotate-ccw",G_);const H_=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],K_=Ye("search",H_);const Q_=[["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"}]],Z_=Ye("settings",Q_);const Y_=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Y0=Ye("triangle-alert",Y_);const F_=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],X_=Ye("wrench",F_);const J_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],or=Ye("x",J_);function Z(e,n,i){function r(h,y){if(h._zod||Object.defineProperty(h,"_zod",{value:{def:y,constr:d,traits:new Set},enumerable:!1}),h._zod.traits.has(e))return;h._zod.traits.add(e),n(h,y);const b=d.prototype,x=Object.keys(b);for(let w=0;w<x.length;w++){const A=x[w];A in h||(h[A]=b[A].bind(h))}}const l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(h){var y;const b=i?.Parent?new u:this;r(b,h),(y=b._zod).deferred??(y.deferred=[]);for(const x of b._zod.deferred)x();return b}return Object.defineProperty(d,"init",{value:r}),Object.defineProperty(d,Symbol.hasInstance,{value:h=>i?.Parent&&h instanceof i.Parent?!0:h?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}class Qs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class F0 extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const X0={};function si(e){return X0}function J0(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,l])=>n.indexOf(+r)===-1).map(([r,l])=>l)}function rp(e,n){return typeof n=="bigint"?n.toString():n}function qc(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function $p(e){return e==null}function Ip(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function W_(e,n){const i=(e.toString().split(".")[1]||"").length,r=n.toString();let l=(r.split(".")[1]||"").length;if(l===0&&/\d?e-\d?/.test(r)){const y=r.match(/\d?e-(\d?)/);y?.[1]&&(l=Number.parseInt(y[1]))}const u=i>l?i:l,d=Number.parseInt(e.toFixed(u).replace(".","")),h=Number.parseInt(n.toFixed(u).replace(".",""));return d%h/10**u}const Xb=Symbol("evaluating");function Ze(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==Xb)return r===void 0&&(r=Xb,r=i()),r},set(l){Object.defineProperty(e,n,{value:l})},configurable:!0})}function Ii(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function li(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function Jb(e){return JSON.stringify(e)}function e2(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const W0="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function jo(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const t2=qc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ws(e){if(jo(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(jo(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function eS(e){return Ws(e)?{...e}:Array.isArray(e)?[...e]:e}const n2=new Set(["string","number","symbol"]);function er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ci(e,n,i){const r=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(r._zod.parent=e),r}function be(e){const n=e;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 a2(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const i2={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 s2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const u=li(e._zod.def,{get shape(){const d={};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&(d[h]=i.shape[h])}return Ii(this,"shape",d),d},checks:[]});return ci(e,u)}function r2(e,n){const i=e._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const u=li(e._zod.def,{get shape(){const d={...e._zod.def.shape};for(const h in n){if(!(h in i.shape))throw new Error(`Unrecognized key: "${h}"`);n[h]&&delete d[h]}return Ii(this,"shape",d),d},checks:[]});return ci(e,u)}function o2(e,n){if(!Ws(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const u=e._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 l=li(e._zod.def,{get shape(){const u={...e._zod.def.shape,...n};return Ii(this,"shape",u),u}});return ci(e,l)}function l2(e,n){if(!Ws(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=li(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return Ii(this,"shape",r),r}});return ci(e,i)}function c2(e,n){const i=li(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return Ii(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return ci(e,i)}function u2(e,n,i){const l=n._zod.def.checks;if(l&&l.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const d=li(n._zod.def,{get shape(){const h=n._zod.def.shape,y={...h};if(i)for(const b in i){if(!(b in h))throw new Error(`Unrecognized key: "${b}"`);i[b]&&(y[b]=e?new e({type:"optional",innerType:h[b]}):h[b])}else for(const b in h)y[b]=e?new e({type:"optional",innerType:h[b]}):h[b];return Ii(this,"shape",y),y},checks:[]});return ci(n,d)}function d2(e,n,i){const r=li(n._zod.def,{get shape(){const l=n._zod.def.shape,u={...l};if(i)for(const d in i){if(!(d in u))throw new Error(`Unrecognized key: "${d}"`);i[d]&&(u[d]=new e({type:"nonoptional",innerType:l[d]}))}else for(const d in l)u[d]=new e({type:"nonoptional",innerType:l[d]});return Ii(this,"shape",u),u}});return ci(n,r)}function Ps(e,n=0){if(e.aborted===!0)return!0;for(let i=n;i<e.issues.length;i++)if(e.issues[i]?.continue!==!0)return!0;return!1}function Vs(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function sc(e){return typeof e=="string"?e:e?.message}function ri(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const l=sc(e.inst?._zod.def?.error?.(e))??sc(n?.error?.(e))??sc(i.customError?.(e))??sc(i.localeError?.(e))??"Invalid input";r.message=l}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function Pp(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function No(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const tS=(e,n)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:n,enumerable:!1}),e.message=JSON.stringify(n,rp,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},nS=Z("$ZodError",tS),aS=Z("$ZodError",tS,{Parent:Error});function f2(e,n=i=>i.message){const i={},r=[];for(const l of e.issues)l.path.length>0?(i[l.path[0]]=i[l.path[0]]||[],i[l.path[0]].push(n(l))):r.push(n(l));return{formErrors:r,fieldErrors:i}}function p2(e,n=i=>i.message){const i={_errors:[]},r=l=>{for(const u of l.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(d=>r({issues:d}));else if(u.code==="invalid_key")r({issues:u.issues});else if(u.code==="invalid_element")r({issues:u.issues});else if(u.path.length===0)i._errors.push(n(u));else{let d=i,h=0;for(;h<u.path.length;){const y=u.path[h];h===u.path.length-1?(d[y]=d[y]||{_errors:[]},d[y]._errors.push(n(u))):d[y]=d[y]||{_errors:[]},d=d[y],h++}}};return r(e),i}const Vp=e=>(n,i,r,l)=>{const u=r?Object.assign(r,{async:!1}):{async:!1},d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise)throw new Qs;if(d.issues.length){const h=new(l?.Err??e)(d.issues.map(y=>ri(y,u,si())));throw W0(h,l?.callee),h}return d.value},Gp=e=>async(n,i,r,l)=>{const u=r?Object.assign(r,{async:!0}):{async:!0};let d=n._zod.run({value:i,issues:[]},u);if(d instanceof Promise&&(d=await d),d.issues.length){const h=new(l?.Err??e)(d.issues.map(y=>ri(y,u,si())));throw W0(h,l?.callee),h}return d.value},Uc=e=>(n,i,r)=>{const l=r?{...r,async:!1}:{async:!1},u=n._zod.run({value:i,issues:[]},l);if(u instanceof Promise)throw new Qs;return u.issues.length?{success:!1,error:new(e??nS)(u.issues.map(d=>ri(d,l,si())))}:{success:!0,data:u.value}},m2=Uc(aS),$c=e=>async(n,i,r)=>{const l=r?Object.assign(r,{async:!0}):{async:!0};let u=n._zod.run({value:i,issues:[]},l);return u instanceof Promise&&(u=await u),u.issues.length?{success:!1,error:new e(u.issues.map(d=>ri(d,l,si())))}:{success:!0,data:u.value}},h2=$c(aS),g2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vp(e)(n,i,l)},y2=e=>(n,i,r)=>Vp(e)(n,i,r),b2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Gp(e)(n,i,l)},v2=e=>async(n,i,r)=>Gp(e)(n,i,r),S2=e=>(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Uc(e)(n,i,l)},x2=e=>(n,i,r)=>Uc(e)(n,i,r),w2=e=>async(n,i,r)=>{const l=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $c(e)(n,i,l)},j2=e=>async(n,i,r)=>$c(e)(n,i,r),N2=/^[cC][^\s-]{8,}$/,A2=/^[0-9a-z]+$/,k2=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,C2=/^[0-9a-vA-V]{20}$/,_2=/^[A-Za-z0-9]{27}$/,T2=/^[a-zA-Z0-9_-]{21}$/,E2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O2=/^([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})$/,Wb=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/,D2=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,z2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function R2(){return new RegExp(z2,"u")}const M2=/^(?:(?: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])$/,B2=/^(([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}|:))$/,L2=/^((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])$/,q2=/^(([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])$/,U2=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iS=/^[A-Za-z0-9_-]*$/,$2=/^\+[1-9]\d{6,14}$/,sS="(?:(?:\\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])))",I2=new RegExp(`^${sS}$`);function rS(e){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${n}`:e.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${e.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function P2(e){return new RegExp(`^${rS(e)}$`)}function V2(e){const n=rS({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${n}(?:${i.join("|")})`;return new RegExp(`^${sS}T(?:${r})$`)}const G2=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},H2=/^-?\d+$/,oS=/^-?\d+(?:\.\d+)?$/,K2=/^(?:true|false)$/i,Q2=/^null$/i,Z2=/^[^A-Z]*$/,Y2=/^[^a-z]*$/,cn=Z("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),lS={number:"number",bigint:"bigint",object:"date"},cS=Z("$ZodCheckLessThan",(e,n)=>{cn.init(e,n);const i=lS[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,u=(n.inclusive?l.maximum:l.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<u&&(n.inclusive?l.maximum=n.value:l.exclusiveMaximum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value<=n.value:r.value<n.value)||r.issues.push({origin:i,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),uS=Z("$ZodCheckGreaterThan",(e,n)=>{cn.init(e,n);const i=lS[typeof n.value];e._zod.onattach.push(r=>{const l=r._zod.bag,u=(n.inclusive?l.minimum:l.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>u&&(n.inclusive?l.minimum=n.value:l.exclusiveMinimum=n.value)}),e._zod.check=r=>{(n.inclusive?r.value>=n.value:r.value>n.value)||r.issues.push({origin:i,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:r.value,inclusive:n.inclusive,inst:e,continue:!n.abort})}}),F2=Z("$ZodCheckMultipleOf",(e,n)=>{cn.init(e,n),e._zod.onattach.push(i=>{var r;(r=i._zod.bag).multipleOf??(r.multipleOf=n.value)}),e._zod.check=i=>{if(typeof i.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%n.value===BigInt(0):W_(i.value,n.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:n.value,input:i.value,inst:e,continue:!n.abort})}}),X2=Z("$ZodCheckNumberFormat",(e,n)=>{cn.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[l,u]=i2[n.format];e._zod.onattach.push(d=>{const h=d._zod.bag;h.format=n.format,h.minimum=l,h.maximum=u,i&&(h.pattern=H2)}),e._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:h,inst:e});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!n.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!n.abort});return}}h<l&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:l,inclusive:!0,inst:e,continue:!n.abort}),h>u&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:u,inclusive:!0,inst:e,continue:!n.abort})}}),J2=Z("$ZodCheckMaxLength",(e,n)=>{var i;cn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!$p(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<l&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const l=r.value;if(l.length<=n.maximum)return;const d=Pp(l);r.issues.push({origin:d,code:"too_big",maximum:n.maximum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),W2=Z("$ZodCheckMinLength",(e,n)=>{var i;cn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!$p(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>l&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const l=r.value;if(l.length>=n.minimum)return;const d=Pp(l);r.issues.push({origin:d,code:"too_small",minimum:n.minimum,inclusive:!0,input:l,inst:e,continue:!n.abort})}}),eT=Z("$ZodCheckLengthEquals",(e,n)=>{var i;cn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const l=r.value;return!$p(l)&&l.length!==void 0}),e._zod.onattach.push(r=>{const l=r._zod.bag;l.minimum=n.length,l.maximum=n.length,l.length=n.length}),e._zod.check=r=>{const l=r.value,u=l.length;if(u===n.length)return;const d=Pp(l),h=u>n.length;r.issues.push({origin:d,...h?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),Ic=Z("$ZodCheckStringFormat",(e,n)=>{var i,r;cn.init(e,n),e._zod.onattach.push(l=>{const u=l._zod.bag;u.format=n.format,n.pattern&&(u.patterns??(u.patterns=new Set),u.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=l=>{n.pattern.lastIndex=0,!n.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:n.format,input:l.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),tT=Z("$ZodCheckRegex",(e,n)=>{Ic.init(e,n),e._zod.check=i=>{n.pattern.lastIndex=0,!n.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:n.pattern.toString(),inst:e,continue:!n.abort})}}),nT=Z("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=Z2),Ic.init(e,n)}),aT=Z("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=Y2),Ic.init(e,n)}),iT=Z("$ZodCheckIncludes",(e,n)=>{cn.init(e,n);const i=er(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=r,e._zod.onattach.push(l=>{const u=l._zod.bag;u.patterns??(u.patterns=new Set),u.patterns.add(r)}),e._zod.check=l=>{l.value.includes(n.includes,n.position)||l.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:l.value,inst:e,continue:!n.abort})}}),sT=Z("$ZodCheckStartsWith",(e,n)=>{cn.init(e,n);const i=new RegExp(`^${er(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.startsWith(n.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:r.value,inst:e,continue:!n.abort})}}),rT=Z("$ZodCheckEndsWith",(e,n)=>{cn.init(e,n);const i=new RegExp(`.*${er(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const l=r._zod.bag;l.patterns??(l.patterns=new Set),l.patterns.add(i)}),e._zod.check=r=>{r.value.endsWith(n.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:r.value,inst:e,continue:!n.abort})}}),oT=Z("$ZodCheckOverwrite",(e,n)=>{cn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class lT{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 r=n.split(`
|
|
15
|
-
`).filter(d=>d),l=Math.min(...r.map(d=>d.length-d.trimStart().length)),u=r.map(d=>d.slice(l)).map(d=>" ".repeat(this.indent*2)+d);for(const d of u)this.content.push(d)}compile(){const n=Function,i=this?.args,l=[...(this?.content??[""]).map(u=>` ${u}`)];return new n(...i,l.join(`
|
|
16
|
-
`))}}const cT={major:4,minor:3,patch:6},pt=Z("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=cT;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const l of r)for(const u of l._zod.onattach)u(e);if(r.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const l=(d,h,y)=>{let b=Ps(d),x;for(const w of h){if(w._zod.def.when){if(!w._zod.def.when(d))continue}else if(b)continue;const A=d.issues.length,C=w._zod.check(d);if(C instanceof Promise&&y?.async===!1)throw new Qs;if(x||C instanceof Promise)x=(x??Promise.resolve()).then(async()=>{await C,d.issues.length!==A&&(b||(b=Ps(d,A)))});else{if(d.issues.length===A)continue;b||(b=Ps(d,A))}}return x?x.then(()=>d):d},u=(d,h,y)=>{if(Ps(d))return d.aborted=!0,d;const b=l(h,r,y);if(b instanceof Promise){if(y.async===!1)throw new Qs;return b.then(x=>e._zod.parse(x,y))}return e._zod.parse(b,y)};e._zod.run=(d,h)=>{if(h.skipChecks)return e._zod.parse(d,h);if(h.direction==="backward"){const b=e._zod.parse({value:d.value,issues:[]},{...h,skipChecks:!0});return b instanceof Promise?b.then(x=>u(x,d,h)):u(b,d,h)}const y=e._zod.parse(d,h);if(y instanceof Promise){if(h.async===!1)throw new Qs;return y.then(b=>l(b,r,h))}return l(y,r,h)}}Ze(e,"~standard",()=>({validate:l=>{try{const u=m2(e,l);return u.success?{value:u.data}:{issues:u.error?.issues}}catch{return h2(e,l).then(d=>d.success?{value:d.data}:{issues:d.error?.issues})}},vendor:"zod",version:1}))}),Hp=Z("$ZodString",(e,n)=>{pt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??G2(e._zod.bag),e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),mt=Z("$ZodStringFormat",(e,n)=>{Ic.init(e,n),Hp.init(e,n)}),uT=Z("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=O2),mt.init(e,n)}),dT=Z("$ZodUUID",(e,n)=>{if(n.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(r===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=Wb(r))}else n.pattern??(n.pattern=Wb());mt.init(e,n)}),fT=Z("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=D2),mt.init(e,n)}),pT=Z("$ZodURL",(e,n)=>{mt.init(e,n),e._zod.check=i=>{try{const r=i.value.trim(),l=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(l.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:i.value,inst:e,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(l.protocol.endsWith(":")?l.protocol.slice(0,-1):l.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:i.value,inst:e,continue:!n.abort})),n.normalize?i.value=l.href:i.value=r;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),mT=Z("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=R2()),mt.init(e,n)}),hT=Z("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=T2),mt.init(e,n)}),gT=Z("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=N2),mt.init(e,n)}),yT=Z("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=A2),mt.init(e,n)}),bT=Z("$ZodULID",(e,n)=>{n.pattern??(n.pattern=k2),mt.init(e,n)}),vT=Z("$ZodXID",(e,n)=>{n.pattern??(n.pattern=C2),mt.init(e,n)}),ST=Z("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=_2),mt.init(e,n)}),xT=Z("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=V2(n)),mt.init(e,n)}),wT=Z("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=I2),mt.init(e,n)}),jT=Z("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=P2(n)),mt.init(e,n)}),NT=Z("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=E2),mt.init(e,n)}),AT=Z("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=M2),mt.init(e,n),e._zod.bag.format="ipv4"}),kT=Z("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=B2),mt.init(e,n),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!n.abort})}}}),CT=Z("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=L2),mt.init(e,n)}),_T=Z("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=q2),mt.init(e,n),e._zod.check=i=>{const r=i.value.split("/");try{if(r.length!==2)throw new Error;const[l,u]=r;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://[${l}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function dS(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const TT=Z("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=U2),mt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{dS(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function ET(e){if(!iS.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return dS(i)}const OT=Z("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=iS),mt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{ET(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),DT=Z("$ZodE164",(e,n)=>{n.pattern??(n.pattern=$2),mt.init(e,n)});function zT(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const l=JSON.parse(atob(r));return!("typ"in l&&l?.typ!=="JWT"||!l.alg||n&&(!("alg"in l)||l.alg!==n))}catch{return!1}}const RT=Z("$ZodJWT",(e,n)=>{mt.init(e,n),e._zod.check=i=>{zT(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),fS=Z("$ZodNumber",(e,n)=>{pt.init(e,n),e._zod.pattern=e._zod.bag.pattern??oS,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const l=i.value;if(typeof l=="number"&&!Number.isNaN(l)&&Number.isFinite(l))return i;const u=typeof l=="number"?Number.isNaN(l)?"NaN":Number.isFinite(l)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:l,inst:e,...u?{received:u}:{}}),i}}),MT=Z("$ZodNumberFormat",(e,n)=>{X2.init(e,n),fS.init(e,n)}),BT=Z("$ZodBoolean",(e,n)=>{pt.init(e,n),e._zod.pattern=K2,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=!!i.value}catch{}const l=i.value;return typeof l=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:l,inst:e}),i}}),LT=Z("$ZodNull",(e,n)=>{pt.init(e,n),e._zod.pattern=Q2,e._zod.values=new Set([null]),e._zod.parse=(i,r)=>{const l=i.value;return l===null||i.issues.push({expected:"null",code:"invalid_type",input:l,inst:e}),i}}),qT=Z("$ZodUnknown",(e,n)=>{pt.init(e,n),e._zod.parse=i=>i}),UT=Z("$ZodNever",(e,n)=>{pt.init(e,n),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function ev(e,n,i){e.issues.length&&n.issues.push(...Vs(i,e.issues)),n.value[i]=e.value}const $T=Z("$ZodArray",(e,n)=>{pt.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Array.isArray(l))return i.issues.push({expected:"array",code:"invalid_type",input:l,inst:e}),i;i.value=Array(l.length);const u=[];for(let d=0;d<l.length;d++){const h=l[d],y=n.element._zod.run({value:h,issues:[]},r);y instanceof Promise?u.push(y.then(b=>ev(b,i,d))):ev(y,i,d)}return u.length?Promise.all(u).then(()=>i):i}});function Nc(e,n,i,r,l){if(e.issues.length){if(l&&!(i in r))return;n.issues.push(...Vs(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function pS(e){const n=Object.keys(e.shape);for(const r of n)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const i=a2(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function mS(e,n,i,r,l,u){const d=[],h=l.keySet,y=l.catchall._zod,b=y.def.type,x=y.optout==="optional";for(const w in n){if(h.has(w))continue;if(b==="never"){d.push(w);continue}const A=y.run({value:n[w],issues:[]},r);A instanceof Promise?e.push(A.then(C=>Nc(C,i,w,n,x))):Nc(A,i,w,n,x)}return d.length&&i.issues.push({code:"unrecognized_keys",keys:d,input:n,inst:u}),e.length?Promise.all(e).then(()=>i):i}const IT=Z("$ZodObject",(e,n)=>{if(pt.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const h=n.shape;Object.defineProperty(n,"shape",{get:()=>{const y={...h};return Object.defineProperty(n,"shape",{value:y}),y}})}const r=qc(()=>pS(n));Ze(e._zod,"propValues",()=>{const h=n.shape,y={};for(const b in h){const x=h[b]._zod;if(x.values){y[b]??(y[b]=new Set);for(const w of x.values)y[b].add(w)}}return y});const l=jo,u=n.catchall;let d;e._zod.parse=(h,y)=>{d??(d=r.value);const b=h.value;if(!l(b))return h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h;h.value={};const x=[],w=d.shape;for(const A of d.keys){const C=w[A],O=C._zod.optout==="optional",k=C._zod.run({value:b[A],issues:[]},y);k instanceof Promise?x.push(k.then(E=>Nc(E,h,A,b,O))):Nc(k,h,A,b,O)}return u?mS(x,b,h,y,r.value,e):x.length?Promise.all(x).then(()=>h):h}}),PT=Z("$ZodObjectJIT",(e,n)=>{IT.init(e,n);const i=e._zod.parse,r=qc(()=>pS(n)),l=A=>{const C=new lT(["shape","payload","ctx"]),O=r.value,k=F=>{const H=Jb(F);return`shape[${H}]._zod.run({ value: input[${H}], issues: [] }, ctx)`};C.write("const input = payload.value;");const E=Object.create(null);let M=0;for(const F of O.keys)E[F]=`key_${M++}`;C.write("const newResult = {};");for(const F of O.keys){const H=E[F],X=Jb(F),z=A[F]?._zod?.optout==="optional";C.write(`const ${H} = ${k(F)};`),z?C.write(`
|
|
17
|
-
if (${H}.issues.length) {
|
|
18
|
-
if (${X} in input) {
|
|
19
|
-
payload.issues = payload.issues.concat(${H}.issues.map(iss => ({
|
|
20
|
-
...iss,
|
|
21
|
-
path: iss.path ? [${X}, ...iss.path] : [${X}]
|
|
22
|
-
})));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
if (${H}.value === undefined) {
|
|
27
|
-
if (${X} in input) {
|
|
28
|
-
newResult[${X}] = undefined;
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
newResult[${X}] = ${H}.value;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
`):C.write(`
|
|
35
|
-
if (${H}.issues.length) {
|
|
36
|
-
payload.issues = payload.issues.concat(${H}.issues.map(iss => ({
|
|
37
|
-
...iss,
|
|
38
|
-
path: iss.path ? [${X}, ...iss.path] : [${X}]
|
|
39
|
-
})));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (${H}.value === undefined) {
|
|
43
|
-
if (${X} in input) {
|
|
44
|
-
newResult[${X}] = undefined;
|
|
45
|
-
}
|
|
46
|
-
} else {
|
|
47
|
-
newResult[${X}] = ${H}.value;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
`)}C.write("payload.value = newResult;"),C.write("return payload;");const G=C.compile();return(F,H)=>G(A,F,H)};let u;const d=jo,h=!X0.jitless,b=h&&t2.value,x=n.catchall;let w;e._zod.parse=(A,C)=>{w??(w=r.value);const O=A.value;return d(O)?h&&b&&C?.async===!1&&C.jitless!==!0?(u||(u=l(n.shape)),A=u(A,C),x?mS([],O,A,C,w,e):A):i(A,C):(A.issues.push({expected:"object",code:"invalid_type",input:O,inst:e}),A)}});function tv(e,n,i,r){for(const u of e)if(u.issues.length===0)return n.value=u.value,n;const l=e.filter(u=>!Ps(u));return l.length===1?(n.value=l[0].value,l[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(u=>u.issues.map(d=>ri(d,r,si())))}),n)}const hS=Z("$ZodUnion",(e,n)=>{pt.init(e,n),Ze(e._zod,"optin",()=>n.options.some(l=>l._zod.optin==="optional")?"optional":void 0),Ze(e._zod,"optout",()=>n.options.some(l=>l._zod.optout==="optional")?"optional":void 0),Ze(e._zod,"values",()=>{if(n.options.every(l=>l._zod.values))return new Set(n.options.flatMap(l=>Array.from(l._zod.values)))}),Ze(e._zod,"pattern",()=>{if(n.options.every(l=>l._zod.pattern)){const l=n.options.map(u=>u._zod.pattern);return new RegExp(`^(${l.map(u=>Ip(u.source)).join("|")})$`)}});const i=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(l,u)=>{if(i)return r(l,u);let d=!1;const h=[];for(const y of n.options){const b=y._zod.run({value:l.value,issues:[]},u);if(b instanceof Promise)h.push(b),d=!0;else{if(b.issues.length===0)return b;h.push(b)}}return d?Promise.all(h).then(y=>tv(y,l,e,u)):tv(h,l,e,u)}}),VT=Z("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,hS.init(e,n);const i=e._zod.parse;Ze(e._zod,"propValues",()=>{const l={};for(const u of n.options){const d=u._zod.propValues;if(!d||Object.keys(d).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(u)}"`);for(const[h,y]of Object.entries(d)){l[h]||(l[h]=new Set);for(const b of y)l[h].add(b)}}return l});const r=qc(()=>{const l=n.options,u=new Map;for(const d of l){const h=d._zod.propValues?.[n.discriminator];if(!h||h.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(d)}"`);for(const y of h){if(u.has(y))throw new Error(`Duplicate discriminator value "${String(y)}"`);u.set(y,d)}}return u});e._zod.parse=(l,u)=>{const d=l.value;if(!jo(d))return l.issues.push({code:"invalid_type",expected:"object",input:d,inst:e}),l;const h=r.value.get(d?.[n.discriminator]);return h?h._zod.run(l,u):n.unionFallback?i(l,u):(l.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:d,path:[n.discriminator],inst:e}),l)}}),GT=Z("$ZodIntersection",(e,n)=>{pt.init(e,n),e._zod.parse=(i,r)=>{const l=i.value,u=n.left._zod.run({value:l,issues:[]},r),d=n.right._zod.run({value:l,issues:[]},r);return u instanceof Promise||d instanceof Promise?Promise.all([u,d]).then(([y,b])=>nv(i,y,b)):nv(i,u,d)}});function op(e,n){if(e===n)return{valid:!0,data:e};if(e instanceof Date&&n instanceof Date&&+e==+n)return{valid:!0,data:e};if(Ws(e)&&Ws(n)){const i=Object.keys(n),r=Object.keys(e).filter(u=>i.indexOf(u)!==-1),l={...e,...n};for(const u of r){const d=op(e[u],n[u]);if(!d.valid)return{valid:!1,mergeErrorPath:[u,...d.mergeErrorPath]};l[u]=d.data}return{valid:!0,data:l}}if(Array.isArray(e)&&Array.isArray(n)){if(e.length!==n.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<e.length;r++){const l=e[r],u=n[r],d=op(l,u);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function nv(e,n,i){const r=new Map;let l;for(const h of n.issues)if(h.code==="unrecognized_keys"){l??(l=h);for(const y of h.keys)r.has(y)||r.set(y,{}),r.get(y).l=!0}else e.issues.push(h);for(const h of i.issues)if(h.code==="unrecognized_keys")for(const y of h.keys)r.has(y)||r.set(y,{}),r.get(y).r=!0;else e.issues.push(h);const u=[...r].filter(([,h])=>h.l&&h.r).map(([h])=>h);if(u.length&&l&&e.issues.push({...l,keys:u}),Ps(e))return e;const d=op(n.value,i.value);if(!d.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(d.mergeErrorPath)}`);return e.value=d.data,e}const HT=Z("$ZodRecord",(e,n)=>{pt.init(e,n),e._zod.parse=(i,r)=>{const l=i.value;if(!Ws(l))return i.issues.push({expected:"record",code:"invalid_type",input:l,inst:e}),i;const u=[],d=n.keyType._zod.values;if(d){i.value={};const h=new Set;for(const b of d)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){h.add(typeof b=="number"?b.toString():b);const x=n.valueType._zod.run({value:l[b],issues:[]},r);x instanceof Promise?u.push(x.then(w=>{w.issues.length&&i.issues.push(...Vs(b,w.issues)),i.value[b]=w.value})):(x.issues.length&&i.issues.push(...Vs(b,x.issues)),i.value[b]=x.value)}let y;for(const b in l)h.has(b)||(y=y??[],y.push(b));y&&y.length>0&&i.issues.push({code:"unrecognized_keys",input:l,inst:e,keys:y})}else{i.value={};for(const h of Reflect.ownKeys(l)){if(h==="__proto__")continue;let y=n.keyType._zod.run({value:h,issues:[]},r);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof h=="string"&&oS.test(h)&&y.issues.length){const w=n.keyType._zod.run({value:Number(h),issues:[]},r);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(y=w)}if(y.issues.length){n.mode==="loose"?i.value[h]=l[h]:i.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(w=>ri(w,r,si())),input:h,path:[h],inst:e});continue}const x=n.valueType._zod.run({value:l[h],issues:[]},r);x instanceof Promise?u.push(x.then(w=>{w.issues.length&&i.issues.push(...Vs(h,w.issues)),i.value[y.value]=w.value})):(x.issues.length&&i.issues.push(...Vs(h,x.issues)),i.value[y.value]=x.value)}}return u.length?Promise.all(u).then(()=>i):i}}),KT=Z("$ZodEnum",(e,n)=>{pt.init(e,n);const i=J0(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(l=>n2.has(typeof l)).map(l=>typeof l=="string"?er(l):l.toString()).join("|")})$`),e._zod.parse=(l,u)=>{const d=l.value;return r.has(d)||l.issues.push({code:"invalid_value",values:i,input:d,inst:e}),l}}),QT=Z("$ZodLiteral",(e,n)=>{if(pt.init(e,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const i=new Set(n.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.values.map(r=>typeof r=="string"?er(r):r?er(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,l)=>{const u=r.value;return i.has(u)||r.issues.push({code:"invalid_value",values:n.values,input:u,inst:e}),r}}),ZT=Z("$ZodTransform",(e,n)=>{pt.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new F0(e.constructor.name);const l=n.transform(i.value,i);if(r.async)return(l instanceof Promise?l:Promise.resolve(l)).then(d=>(i.value=d,i));if(l instanceof Promise)throw new Qs;return i.value=l,i}});function av(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const gS=Z("$ZodOptional",(e,n)=>{pt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",Ze(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ze(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Ip(i.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(n.innerType._zod.optin==="optional"){const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(u=>av(u,i.value)):av(l,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),YT=Z("$ZodExactOptional",(e,n)=>{gS.init(e,n),Ze(e._zod,"values",()=>n.innerType._zod.values),Ze(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,r)=>n.innerType._zod.run(i,r)}),FT=Z("$ZodNullable",(e,n)=>{pt.init(e,n),Ze(e._zod,"optin",()=>n.innerType._zod.optin),Ze(e._zod,"optout",()=>n.innerType._zod.optout),Ze(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${Ip(i.source)}|null)$`):void 0}),Ze(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),e._zod.parse=(i,r)=>i.value===null?i:n.innerType._zod.run(i,r)}),XT=Z("$ZodDefault",(e,n)=>{pt.init(e,n),e._zod.optin="optional",Ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);if(i.value===void 0)return i.value=n.defaultValue,i;const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(u=>iv(u,n)):iv(l,n)}});function iv(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const JT=Z("$ZodPrefault",(e,n)=>{pt.init(e,n),e._zod.optin="optional",Ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=n.defaultValue),n.innerType._zod.run(i,r))}),WT=Z("$ZodNonOptional",(e,n)=>{pt.init(e,n),Ze(e._zod,"values",()=>{const i=n.innerType._zod.values;return i?new Set([...i].filter(r=>r!==void 0)):void 0}),e._zod.parse=(i,r)=>{const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(u=>sv(u,e)):sv(l,e)}});function sv(e,n){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:n}),e}const eE=Z("$ZodCatch",(e,n)=>{pt.init(e,n),Ze(e._zod,"optin",()=>n.innerType._zod.optin),Ze(e._zod,"optout",()=>n.innerType._zod.optout),Ze(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(u=>(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(d=>ri(d,r,si()))},input:i.value}),i.issues=[]),i)):(i.value=l.value,l.issues.length&&(i.value=n.catchValue({...i,error:{issues:l.issues.map(u=>ri(u,r,si()))},input:i.value}),i.issues=[]),i)}}),tE=Z("$ZodPipe",(e,n)=>{pt.init(e,n),Ze(e._zod,"values",()=>n.in._zod.values),Ze(e._zod,"optin",()=>n.in._zod.optin),Ze(e._zod,"optout",()=>n.out._zod.optout),Ze(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const u=n.out._zod.run(i,r);return u instanceof Promise?u.then(d=>rc(d,n.in,r)):rc(u,n.in,r)}const l=n.in._zod.run(i,r);return l instanceof Promise?l.then(u=>rc(u,n.out,r)):rc(l,n.out,r)}});function rc(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const nE=Z("$ZodReadonly",(e,n)=>{pt.init(e,n),Ze(e._zod,"propValues",()=>n.innerType._zod.propValues),Ze(e._zod,"values",()=>n.innerType._zod.values),Ze(e._zod,"optin",()=>n.innerType?._zod?.optin),Ze(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const l=n.innerType._zod.run(i,r);return l instanceof Promise?l.then(rv):rv(l)}});function rv(e){return e.value=Object.freeze(e.value),e}const aE=Z("$ZodCustom",(e,n)=>{cn.init(e,n),pt.init(e,n),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,l=n.fn(r);if(l instanceof Promise)return l.then(u=>ov(u,i,r,e));ov(l,i,r,e)}});function ov(e,n,i,r){if(!e){const l={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(l.params=r._zod.def.params),n.issues.push(No(l))}}var lv;class iE{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...i){const r=i[0];return this._map.set(n,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const i=this._map.get(n);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(n),this}get(n){const i=n._zod.parent;if(i){const r={...this.get(i)??{}};delete r.id;const l={...r,...this._map.get(n)};return Object.keys(l).length?l:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function sE(){return new iE}(lv=globalThis).__zod_globalRegistry??(lv.__zod_globalRegistry=sE());const bo=globalThis.__zod_globalRegistry;function rE(e,n){return new e({type:"string",...be(n)})}function oE(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...be(n)})}function cv(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...be(n)})}function lE(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...be(n)})}function cE(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...be(n)})}function uE(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...be(n)})}function dE(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...be(n)})}function fE(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...be(n)})}function pE(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...be(n)})}function mE(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...be(n)})}function hE(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...be(n)})}function gE(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...be(n)})}function yE(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...be(n)})}function bE(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...be(n)})}function vE(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...be(n)})}function SE(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...be(n)})}function xE(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...be(n)})}function wE(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...be(n)})}function jE(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...be(n)})}function NE(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...be(n)})}function AE(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...be(n)})}function kE(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...be(n)})}function CE(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...be(n)})}function _E(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...be(n)})}function TE(e,n){return new e({type:"string",format:"date",check:"string_format",...be(n)})}function EE(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...be(n)})}function OE(e,n){return new e({type:"string",format:"duration",check:"string_format",...be(n)})}function DE(e,n){return new e({type:"number",checks:[],...be(n)})}function zE(e,n){return new e({type:"number",coerce:!0,checks:[],...be(n)})}function RE(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...be(n)})}function ME(e,n){return new e({type:"boolean",...be(n)})}function BE(e,n){return new e({type:"null",...be(n)})}function LE(e){return new e({type:"unknown"})}function qE(e,n){return new e({type:"never",...be(n)})}function uv(e,n){return new cS({check:"less_than",...be(n),value:e,inclusive:!1})}function zf(e,n){return new cS({check:"less_than",...be(n),value:e,inclusive:!0})}function dv(e,n){return new uS({check:"greater_than",...be(n),value:e,inclusive:!1})}function Rf(e,n){return new uS({check:"greater_than",...be(n),value:e,inclusive:!0})}function fv(e,n){return new F2({check:"multiple_of",...be(n),value:e})}function yS(e,n){return new J2({check:"max_length",...be(n),maximum:e})}function Ac(e,n){return new W2({check:"min_length",...be(n),minimum:e})}function bS(e,n){return new eT({check:"length_equals",...be(n),length:e})}function UE(e,n){return new tT({check:"string_format",format:"regex",...be(n),pattern:e})}function $E(e){return new nT({check:"string_format",format:"lowercase",...be(e)})}function IE(e){return new aT({check:"string_format",format:"uppercase",...be(e)})}function PE(e,n){return new iT({check:"string_format",format:"includes",...be(n),includes:e})}function VE(e,n){return new sT({check:"string_format",format:"starts_with",...be(n),prefix:e})}function GE(e,n){return new rT({check:"string_format",format:"ends_with",...be(n),suffix:e})}function lr(e){return new oT({check:"overwrite",tx:e})}function HE(e){return lr(n=>n.normalize(e))}function KE(){return lr(e=>e.trim())}function QE(){return lr(e=>e.toLowerCase())}function ZE(){return lr(e=>e.toUpperCase())}function YE(){return lr(e=>e2(e))}function FE(e,n,i){return new e({type:"array",element:n,...be(i)})}function XE(e,n,i){return new e({type:"custom",check:"custom",fn:n,...be(i)})}function JE(e){const n=WE(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(No(r,i.value,n._zod.def));else{const l=r;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=i.value),l.inst??(l.inst=n),l.continue??(l.continue=!n._zod.def.abort),i.issues.push(No(l))}},e(i.value,i)));return n}function WE(e,n){const i=new cn({check:"custom",...be(n)});return i._zod.check=e,i}function vS(e){let n=e?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??bo,target:n,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Et(e,n,i={path:[],schemaPath:[]}){var r;const l=e._zod.def,u=n.seen.get(e);if(u)return u.count++,i.schemaPath.includes(e)&&(u.cycle=i.path),u.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,d);const h=e._zod.toJSONSchema?.();if(h)d.schema=h;else{const x={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,d.schema,x);else{const A=d.schema,C=n.processors[l.type];if(!C)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${l.type}`);C(e,n,A,x)}const w=e._zod.parent;w&&(d.ref||(d.ref=w),Et(w,n,x),n.seen.get(w).isParent=!0)}const y=n.metadataRegistry.get(e);return y&&Object.assign(d.schema,y),n.io==="input"&&Zt(e)&&(delete d.schema.examples,delete d.schema.default),n.io==="input"&&d.schema._prefault&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,n.seen.get(e).schema}function SS(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const d of e.seen.entries()){const h=e.metadataRegistry.get(d[0])?.id;if(h){const y=r.get(h);if(y&&y!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const l=d=>{const h=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const w=e.external.registry.get(d[0])?.id,A=e.external.uri??(O=>O);if(w)return{ref:A(w)};const C=d[1].defId??d[1].schema.id??`schema${e.counter++}`;return d[1].defId=C,{defId:C,ref:`${A("__shared")}#/${h}/${C}`}}if(d[1]===i)return{ref:"#"};const b=`#/${h}/`,x=d[1].schema.id??`__schema${e.counter++}`;return{defId:x,ref:b+x}},u=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:y,defId:b}=l(d);h.def={...h.schema},b&&(h.defId=b);const x=h.schema;for(const w in x)delete x[w];x.$ref=y};if(e.cycles==="throw")for(const d of e.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
51
|
-
|
|
52
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of e.seen.entries()){const h=d[1];if(n===d[0]){u(d);continue}if(e.external){const b=e.external.registry.get(d[0])?.id;if(n!==d[0]&&b){u(d);continue}}if(e.metadataRegistry.get(d[0])?.id){u(d);continue}if(h.cycle){u(d);continue}if(h.count>1&&e.reused==="ref"){u(d);continue}}}function xS(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=d=>{const h=e.seen.get(d);if(h.ref===null)return;const y=h.def??h.schema,b={...y},x=h.ref;if(h.ref=null,x){r(x);const A=e.seen.get(x),C=A.schema;if(C.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(y.allOf=y.allOf??[],y.allOf.push(C)):Object.assign(y,C),Object.assign(y,b),d._zod.parent===x)for(const k in y)k==="$ref"||k==="allOf"||k in b||delete y[k];if(C.$ref&&A.def)for(const k in y)k==="$ref"||k==="allOf"||k in A.def&&JSON.stringify(y[k])===JSON.stringify(A.def[k])&&delete y[k]}const w=d._zod.parent;if(w&&w!==x){r(w);const A=e.seen.get(w);if(A?.schema.$ref&&(y.$ref=A.schema.$ref,A.def))for(const C in y)C==="$ref"||C==="allOf"||C in A.def&&JSON.stringify(y[C])===JSON.stringify(A.def[C])&&delete y[C]}e.override({zodSchema:d,jsonSchema:y,path:h.path??[]})};for(const d of[...e.seen.entries()].reverse())r(d[0]);const l={};if(e.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?l.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?l.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const d=e.external.registry.get(n)?.id;if(!d)throw new Error("Schema is missing an `id` property");l.$id=e.external.uri(d)}Object.assign(l,i.def??i.schema);const u=e.external?.defs??{};for(const d of e.seen.entries()){const h=d[1];h.def&&h.defId&&(u[h.defId]=h.def)}e.external||Object.keys(u).length>0&&(e.target==="draft-2020-12"?l.$defs=u:l.definitions=u);try{const d=JSON.parse(JSON.stringify(l));return Object.defineProperty(d,"~standard",{value:{...n["~standard"],jsonSchema:{input:kc(n,"input",e.processors),output:kc(n,"output",e.processors)}},enumerable:!1,writable:!1}),d}catch{throw new Error("Error converting schema to JSON.")}}function Zt(e,n){const i=n??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Zt(r.element,i);if(r.type==="set")return Zt(r.valueType,i);if(r.type==="lazy")return Zt(r.getter(),i);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Zt(r.innerType,i);if(r.type==="intersection")return Zt(r.left,i)||Zt(r.right,i);if(r.type==="record"||r.type==="map")return Zt(r.keyType,i)||Zt(r.valueType,i);if(r.type==="pipe")return Zt(r.in,i)||Zt(r.out,i);if(r.type==="object"){for(const l in r.shape)if(Zt(r.shape[l],i))return!0;return!1}if(r.type==="union"){for(const l of r.options)if(Zt(l,i))return!0;return!1}if(r.type==="tuple"){for(const l of r.items)if(Zt(l,i))return!0;return!!(r.rest&&Zt(r.rest,i))}return!1}const eO=(e,n={})=>i=>{const r=vS({...i,processors:n});return Et(e,r),SS(r,e),xS(r,e)},kc=(e,n,i={})=>r=>{const{libraryOptions:l,target:u}=r??{},d=vS({...l??{},target:u,io:n,processors:i});return Et(e,d),SS(d,e),xS(d,e)},tO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nO=(e,n,i,r)=>{const l=i;l.type="string";const{minimum:u,maximum:d,format:h,patterns:y,contentEncoding:b}=e._zod.bag;if(typeof u=="number"&&(l.minLength=u),typeof d=="number"&&(l.maxLength=d),h&&(l.format=tO[h]??h,l.format===""&&delete l.format,h==="time"&&delete l.format),b&&(l.contentEncoding=b),y&&y.size>0){const x=[...y];x.length===1?l.pattern=x[0].source:x.length>1&&(l.allOf=[...x.map(w=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:w.source}))])}},aO=(e,n,i,r)=>{const l=i,{minimum:u,maximum:d,format:h,multipleOf:y,exclusiveMaximum:b,exclusiveMinimum:x}=e._zod.bag;typeof h=="string"&&h.includes("int")?l.type="integer":l.type="number",typeof x=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.minimum=x,l.exclusiveMinimum=!0):l.exclusiveMinimum=x),typeof u=="number"&&(l.minimum=u,typeof x=="number"&&n.target!=="draft-04"&&(x>=u?delete l.minimum:delete l.exclusiveMinimum)),typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(l.maximum=b,l.exclusiveMaximum=!0):l.exclusiveMaximum=b),typeof d=="number"&&(l.maximum=d,typeof b=="number"&&n.target!=="draft-04"&&(b<=d?delete l.maximum:delete l.exclusiveMaximum)),typeof y=="number"&&(l.multipleOf=y)},iO=(e,n,i,r)=>{i.type="boolean"},sO=(e,n,i,r)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},rO=(e,n,i,r)=>{i.not={}},oO=(e,n,i,r)=>{},lO=(e,n,i,r)=>{const l=e._zod.def,u=J0(l.entries);u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),i.enum=u},cO=(e,n,i,r)=>{const l=e._zod.def,u=[];for(const d of l.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];i.type=d===null?"null":typeof d,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[d]:i.const=d}else u.every(d=>typeof d=="number")&&(i.type="number"),u.every(d=>typeof d=="string")&&(i.type="string"),u.every(d=>typeof d=="boolean")&&(i.type="boolean"),u.every(d=>d===null)&&(i.type="null"),i.enum=u},uO=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},dO=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},fO=(e,n,i,r)=>{const l=i,u=e._zod.def,{minimum:d,maximum:h}=e._zod.bag;typeof d=="number"&&(l.minItems=d),typeof h=="number"&&(l.maxItems=h),l.type="array",l.items=Et(u.element,n,{...r,path:[...r.path,"items"]})},pO=(e,n,i,r)=>{const l=i,u=e._zod.def;l.type="object",l.properties={};const d=u.shape;for(const b in d)l.properties[b]=Et(d[b],n,{...r,path:[...r.path,"properties",b]});const h=new Set(Object.keys(d)),y=new Set([...h].filter(b=>{const x=u.shape[b]._zod;return n.io==="input"?x.optin===void 0:x.optout===void 0}));y.size>0&&(l.required=Array.from(y)),u.catchall?._zod.def.type==="never"?l.additionalProperties=!1:u.catchall?u.catchall&&(l.additionalProperties=Et(u.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(l.additionalProperties=!1)},mO=(e,n,i,r)=>{const l=e._zod.def,u=l.inclusive===!1,d=l.options.map((h,y)=>Et(h,n,{...r,path:[...r.path,u?"oneOf":"anyOf",y]}));u?i.oneOf=d:i.anyOf=d},hO=(e,n,i,r)=>{const l=e._zod.def,u=Et(l.left,n,{...r,path:[...r.path,"allOf",0]}),d=Et(l.right,n,{...r,path:[...r.path,"allOf",1]}),h=b=>"allOf"in b&&Object.keys(b).length===1,y=[...h(u)?u.allOf:[u],...h(d)?d.allOf:[d]];i.allOf=y},gO=(e,n,i,r)=>{const l=i,u=e._zod.def;l.type="object";const d=u.keyType,y=d._zod.bag?.patterns;if(u.mode==="loose"&&y&&y.size>0){const x=Et(u.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});l.patternProperties={};for(const w of y)l.patternProperties[w.source]=x}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(l.propertyNames=Et(u.keyType,n,{...r,path:[...r.path,"propertyNames"]})),l.additionalProperties=Et(u.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const b=d._zod.values;if(b){const x=[...b].filter(w=>typeof w=="string"||typeof w=="number");x.length>0&&(l.required=x)}},yO=(e,n,i,r)=>{const l=e._zod.def,u=Et(l.innerType,n,r),d=n.seen.get(e);n.target==="openapi-3.0"?(d.ref=l.innerType,i.nullable=!0):i.anyOf=[u,{type:"null"}]},bO=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType},vO=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType,i.default=JSON.parse(JSON.stringify(l.defaultValue))},SO=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(l.defaultValue)))},xO=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType;let d;try{d=l.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=d},wO=(e,n,i,r)=>{const l=e._zod.def,u=n.io==="input"?l.in._zod.def.type==="transform"?l.out:l.in:l.out;Et(u,n,r);const d=n.seen.get(e);d.ref=u},jO=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType,i.readOnly=!0},wS=(e,n,i,r)=>{const l=e._zod.def;Et(l.innerType,n,r);const u=n.seen.get(e);u.ref=l.innerType},NO=Z("ZodISODateTime",(e,n)=>{xT.init(e,n),gt.init(e,n)});function jS(e){return _E(NO,e)}const AO=Z("ZodISODate",(e,n)=>{wT.init(e,n),gt.init(e,n)});function NS(e){return TE(AO,e)}const kO=Z("ZodISOTime",(e,n)=>{jT.init(e,n),gt.init(e,n)});function CO(e){return EE(kO,e)}const _O=Z("ZodISODuration",(e,n)=>{NT.init(e,n),gt.init(e,n)});function TO(e){return OE(_O,e)}const EO=(e,n)=>{nS.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>p2(e,i)},flatten:{value:i=>f2(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,rp,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,rp,2)}},isEmpty:{get(){return e.issues.length===0}}})},Rn=Z("ZodError",EO,{Parent:Error}),OO=Vp(Rn),DO=Gp(Rn),zO=Uc(Rn),RO=$c(Rn),MO=g2(Rn),BO=y2(Rn),LO=b2(Rn),qO=v2(Rn),UO=S2(Rn),$O=x2(Rn),IO=w2(Rn),PO=j2(Rn),ht=Z("ZodType",(e,n)=>(pt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:kc(e,"input"),output:kc(e,"output")}}),e.toJSONSchema=eO(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(li(n,{checks:[...n.checks??[],...i.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(i,r)=>ci(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>OO(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>zO(e,i,r),e.parseAsync=async(i,r)=>DO(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>RO(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>MO(e,i,r),e.decode=(i,r)=>BO(e,i,r),e.encodeAsync=async(i,r)=>LO(e,i,r),e.decodeAsync=async(i,r)=>qO(e,i,r),e.safeEncode=(i,r)=>UO(e,i,r),e.safeDecode=(i,r)=>$O(e,i,r),e.safeEncodeAsync=async(i,r)=>IO(e,i,r),e.safeDecodeAsync=async(i,r)=>PO(e,i,r),e.refine=(i,r)=>e.check(MD(i,r)),e.superRefine=i=>e.check(BD(i)),e.overwrite=i=>e.check(lr(i)),e.optional=()=>hv(e),e.exactOptional=()=>wD(e),e.nullable=()=>gv(e),e.nullish=()=>hv(gv(e)),e.nonoptional=i=>_D(e,i),e.array=()=>N(e),e.or=i=>Kt([e,i]),e.and=i=>yD(e,i),e.transform=i=>cp(e,CS(i)),e.default=i=>AD(e,i),e.prefault=i=>CD(e,i),e.catch=i=>ED(e,i),e.pipe=i=>cp(e,i),e.readonly=()=>zD(e),e.describe=i=>{const r=e.clone();return bo.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return bo.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return bo.get(e);const r=e.clone();return bo.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),AS=Z("_ZodString",(e,n)=>{Hp.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(r,l,u)=>nO(e,r,l);const i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,e.regex=(...r)=>e.check(UE(...r)),e.includes=(...r)=>e.check(PE(...r)),e.startsWith=(...r)=>e.check(VE(...r)),e.endsWith=(...r)=>e.check(GE(...r)),e.min=(...r)=>e.check(Ac(...r)),e.max=(...r)=>e.check(yS(...r)),e.length=(...r)=>e.check(bS(...r)),e.nonempty=(...r)=>e.check(Ac(1,...r)),e.lowercase=r=>e.check($E(r)),e.uppercase=r=>e.check(IE(r)),e.trim=()=>e.check(KE()),e.normalize=(...r)=>e.check(HE(...r)),e.toLowerCase=()=>e.check(QE()),e.toUpperCase=()=>e.check(ZE()),e.slugify=()=>e.check(YE())}),VO=Z("ZodString",(e,n)=>{Hp.init(e,n),AS.init(e,n),e.email=i=>e.check(oE(GO,i)),e.url=i=>e.check(fE(HO,i)),e.jwt=i=>e.check(CE(rD,i)),e.emoji=i=>e.check(pE(KO,i)),e.guid=i=>e.check(cv(pv,i)),e.uuid=i=>e.check(lE(oc,i)),e.uuidv4=i=>e.check(cE(oc,i)),e.uuidv6=i=>e.check(uE(oc,i)),e.uuidv7=i=>e.check(dE(oc,i)),e.nanoid=i=>e.check(mE(QO,i)),e.guid=i=>e.check(cv(pv,i)),e.cuid=i=>e.check(hE(ZO,i)),e.cuid2=i=>e.check(gE(YO,i)),e.ulid=i=>e.check(yE(FO,i)),e.base64=i=>e.check(NE(aD,i)),e.base64url=i=>e.check(AE(iD,i)),e.xid=i=>e.check(bE(XO,i)),e.ksuid=i=>e.check(vE(JO,i)),e.ipv4=i=>e.check(SE(WO,i)),e.ipv6=i=>e.check(xE(eD,i)),e.cidrv4=i=>e.check(wE(tD,i)),e.cidrv6=i=>e.check(jE(nD,i)),e.e164=i=>e.check(kE(sD,i)),e.datetime=i=>e.check(jS(i)),e.date=i=>e.check(NS(i)),e.time=i=>e.check(CO(i)),e.duration=i=>e.check(TO(i))});function c(e){return rE(VO,e)}const gt=Z("ZodStringFormat",(e,n)=>{mt.init(e,n),AS.init(e,n)}),GO=Z("ZodEmail",(e,n)=>{fT.init(e,n),gt.init(e,n)}),pv=Z("ZodGUID",(e,n)=>{uT.init(e,n),gt.init(e,n)}),oc=Z("ZodUUID",(e,n)=>{dT.init(e,n),gt.init(e,n)}),HO=Z("ZodURL",(e,n)=>{pT.init(e,n),gt.init(e,n)}),KO=Z("ZodEmoji",(e,n)=>{mT.init(e,n),gt.init(e,n)}),QO=Z("ZodNanoID",(e,n)=>{hT.init(e,n),gt.init(e,n)}),ZO=Z("ZodCUID",(e,n)=>{gT.init(e,n),gt.init(e,n)}),YO=Z("ZodCUID2",(e,n)=>{yT.init(e,n),gt.init(e,n)}),FO=Z("ZodULID",(e,n)=>{bT.init(e,n),gt.init(e,n)}),XO=Z("ZodXID",(e,n)=>{vT.init(e,n),gt.init(e,n)}),JO=Z("ZodKSUID",(e,n)=>{ST.init(e,n),gt.init(e,n)}),WO=Z("ZodIPv4",(e,n)=>{AT.init(e,n),gt.init(e,n)}),eD=Z("ZodIPv6",(e,n)=>{kT.init(e,n),gt.init(e,n)}),tD=Z("ZodCIDRv4",(e,n)=>{CT.init(e,n),gt.init(e,n)}),nD=Z("ZodCIDRv6",(e,n)=>{_T.init(e,n),gt.init(e,n)}),aD=Z("ZodBase64",(e,n)=>{TT.init(e,n),gt.init(e,n)}),iD=Z("ZodBase64URL",(e,n)=>{OT.init(e,n),gt.init(e,n)}),sD=Z("ZodE164",(e,n)=>{DT.init(e,n),gt.init(e,n)}),rD=Z("ZodJWT",(e,n)=>{RT.init(e,n),gt.init(e,n)}),Kp=Z("ZodNumber",(e,n)=>{fS.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(r,l,u)=>aO(e,r,l),e.gt=(r,l)=>e.check(dv(r,l)),e.gte=(r,l)=>e.check(Rf(r,l)),e.min=(r,l)=>e.check(Rf(r,l)),e.lt=(r,l)=>e.check(uv(r,l)),e.lte=(r,l)=>e.check(zf(r,l)),e.max=(r,l)=>e.check(zf(r,l)),e.int=r=>e.check(mv(r)),e.safe=r=>e.check(mv(r)),e.positive=r=>e.check(dv(0,r)),e.nonnegative=r=>e.check(Rf(0,r)),e.negative=r=>e.check(uv(0,r)),e.nonpositive=r=>e.check(zf(0,r)),e.multipleOf=(r,l)=>e.check(fv(r,l)),e.step=(r,l)=>e.check(fv(r,l)),e.finite=()=>e;const i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function g(e){return DE(Kp,e)}const oD=Z("ZodNumberFormat",(e,n)=>{MT.init(e,n),Kp.init(e,n)});function mv(e){return RE(oD,e)}const lD=Z("ZodBoolean",(e,n)=>{BT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>iO(e,i,r)});function ee(e){return ME(lD,e)}const cD=Z("ZodNull",(e,n)=>{LT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>sO(e,i,r)});function Ee(e){return BE(cD,e)}const uD=Z("ZodUnknown",(e,n)=>{qT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>oO()});function Pn(){return LE(uD)}const dD=Z("ZodNever",(e,n)=>{UT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>rO(e,i,r)});function fD(e){return qE(dD,e)}const pD=Z("ZodArray",(e,n)=>{$T.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>fO(e,i,r,l),e.element=n.element,e.min=(i,r)=>e.check(Ac(i,r)),e.nonempty=i=>e.check(Ac(1,i)),e.max=(i,r)=>e.check(yS(i,r)),e.length=(i,r)=>e.check(bS(i,r)),e.unwrap=()=>e.element});function N(e,n){return FE(pD,e,n)}const mD=Z("ZodObject",(e,n)=>{PT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>pO(e,i,r,l),Ze(e,"shape",()=>n.shape),e.keyof=()=>$(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Pn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Pn()}),e.strict=()=>e.clone({...e._zod.def,catchall:fD()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>o2(e,i),e.safeExtend=i=>l2(e,i),e.merge=i=>c2(e,i),e.pick=i=>s2(e,i),e.omit=i=>r2(e,i),e.partial=(...i)=>u2(_S,e,i[0]),e.required=(...i)=>d2(TS,e,i[0])});function v(e,n){const i={type:"object",shape:e??{},...be(n)};return new mD(i)}const kS=Z("ZodUnion",(e,n)=>{hS.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>mO(e,i,r,l),e.options=n.options});function Kt(e,n){return new kS({type:"union",options:e,...be(n)})}const hD=Z("ZodDiscriminatedUnion",(e,n)=>{kS.init(e,n),VT.init(e,n)});function To(e,n,i){return new hD({type:"union",options:n,discriminator:e,...be(i)})}const gD=Z("ZodIntersection",(e,n)=>{GT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>hO(e,i,r,l)});function yD(e,n){return new gD({type:"intersection",left:e,right:n})}const bD=Z("ZodRecord",(e,n)=>{HT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>gO(e,i,r,l),e.keyType=n.keyType,e.valueType=n.valueType});function Ke(e,n,i){return new bD({type:"record",keyType:e,valueType:n,...be(i)})}const lp=Z("ZodEnum",(e,n)=>{KT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(r,l,u)=>lO(e,r,l),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(r,l)=>{const u={};for(const d of r)if(i.has(d))u[d]=n.entries[d];else throw new Error(`Key ${d} not found in enum`);return new lp({...n,checks:[],...be(l),entries:u})},e.exclude=(r,l)=>{const u={...n.entries};for(const d of r)if(i.has(d))delete u[d];else throw new Error(`Key ${d} not found in enum`);return new lp({...n,checks:[],...be(l),entries:u})}});function $(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new lp({type:"enum",entries:i,...be(n)})}const vD=Z("ZodLiteral",(e,n)=>{QT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>cO(e,i,r),e.values=new Set(n.values),Object.defineProperty(e,"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 ke(e,n){return new vD({type:"literal",values:Array.isArray(e)?e:[e],...be(n)})}const SD=Z("ZodTransform",(e,n)=>{ZT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>dO(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new F0(e.constructor.name);i.addIssue=u=>{if(typeof u=="string")i.issues.push(No(u,i.value,n));else{const d=u;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=i.value),d.inst??(d.inst=e),i.issues.push(No(d))}};const l=n.transform(i.value,i);return l instanceof Promise?l.then(u=>(i.value=u,i)):(i.value=l,i)}});function CS(e){return new SD({type:"transform",transform:e})}const _S=Z("ZodOptional",(e,n)=>{gS.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>wS(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function hv(e){return new _S({type:"optional",innerType:e})}const xD=Z("ZodExactOptional",(e,n)=>{YT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>wS(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function wD(e){return new xD({type:"optional",innerType:e})}const jD=Z("ZodNullable",(e,n)=>{FT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>yO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function gv(e){return new jD({type:"nullable",innerType:e})}const ND=Z("ZodDefault",(e,n)=>{XT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>vO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function AD(e,n){return new ND({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():eS(n)}})}const kD=Z("ZodPrefault",(e,n)=>{JT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>SO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function CD(e,n){return new kD({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():eS(n)}})}const TS=Z("ZodNonOptional",(e,n)=>{WT.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>bO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function _D(e,n){return new TS({type:"nonoptional",innerType:e,...be(n)})}const TD=Z("ZodCatch",(e,n)=>{eE.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>xO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ED(e,n){return new TD({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const OD=Z("ZodPipe",(e,n)=>{tE.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>wO(e,i,r,l),e.in=n.in,e.out=n.out});function cp(e,n){return new OD({type:"pipe",in:e,out:n})}const DD=Z("ZodReadonly",(e,n)=>{nE.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>jO(e,i,r,l),e.unwrap=()=>e._zod.def.innerType});function zD(e){return new DD({type:"readonly",innerType:e})}const RD=Z("ZodCustom",(e,n)=>{aE.init(e,n),ht.init(e,n),e._zod.processJSONSchema=(i,r,l)=>uO(e,i)});function MD(e,n={}){return XE(RD,e,n)}function BD(e){return JE(e)}function LD(e,n){return cp(CS(e),n)}const qD={custom:"custom"};function ES(e){return zE(Kp,e)}const OS=v({id:c(),name:c(),keyPrefix:c(),scopes:N(c()),projectId:c().nullable(),readOnly:ee(),createdAt:c(),lastUsedAt:c().nullable(),revokedAt:c().nullable()});v({keys:N(OS)});v({name:c().min(1).max(100),scopes:N(c()).min(1).optional(),projectId:c().optional()});OS.extend({key:c()});const UD=v({maxConcurrency:g().int().positive(),maxRequestsPerMinute:g().int().positive(),maxRequestsPerDay:g().int().positive()}),ka=c().min(1),Qp=Ke(c(),c().trim().min(1));c().min(1);const cr=v({label:c().min(1),city:c().min(1),region:c().min(1),country:c().length(2),timezone:c().optional()}),Zp=$(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high"]);v({id:c(),projectId:c(),channel:ke("webhook"),url:c().url(),urlDisplay:c(),urlHost:c(),events:N(Zp),enabled:ee().default(!0),source:c().optional(),webhookSecret:c().optional(),createdAt:c(),updatedAt:c()});v({channel:ke("webhook"),url:c().url(),events:N(Zp).min(1),source:c().optional()});function Mf(e,n=!1){const i=new Set,r=[];for(const l of e){const u=n?l.toLowerCase():l;i.has(u)||(i.add(u),r.push(l))}return r}function yv(e){try{const n=e.includes("://"),i=new URL(n?e:`https://${e}`);if(!n&&(i.pathname!=="/"||i.search||i.hash)||i.username||i.password||i.port)return null;const r=i.hostname.trim().toLowerCase().replace(/^www\./,"");return!r||r.includes("/")||r.includes("?")||r.includes("#")?null:r}catch{return null}}const $D=c().trim().min(1).refine(e=>yv(e)!==null,{message:"Marketing hosts must be valid hostnames without credentials or ports"}).overwrite(e=>yv(e)??e),ID=c().trim().min(1),PD=c().trim().regex(/^[a-z]\w{0,39}$/i,{message:"GA4 event names must start with a letter and contain only letters, numbers, or underscores"}),Yp=v({marketingHosts:N($D).overwrite(e=>Mf(e,!0)),brandTerms:N(ID).overwrite(e=>Mf(e,!0)),leadEventNames:N(PD).overwrite(e=>Mf(e))});function VD(){return{marketingHosts:[],brandTerms:[],leadEventNames:["generate_lead"]}}const Bf=Object.freeze({marketingHosts:Object.freeze([]),brandTerms:Object.freeze([]),leadEventNames:Object.freeze(["generate_lead"])}),DS=()=>VD(),bv=$(["never-synced","ready","error"]),GD=$(["landing-page","channel"]),HD=$(["30d","60d","90d"]),KD=$(["marketing","all"]),up=NS(),Pc=v({label:$(["earliest","middle","previous","latest"]),startDate:up,endDate:up}),Lf=Pc.extend({sessions:g().int().nonnegative()}),vv=Pc.extend({eventCount:g().int().nonnegative()}),Sv=Pc.extend({clicks:g().int().nonnegative(),impressions:g().int().nonnegative()}),QD=Pc.extend({propertyClicks:g().int().nonnegative(),propertyImpressions:g().int().nonnegative(),reportedQueryClicks:g().int().nonnegative(),reportedQueryImpressions:g().int().nonnegative(),brandedClicks:g().int().nonnegative(),brandedImpressions:g().int().nonnegative(),nonBrandedClicks:g().int().nonnegative(),nonBrandedImpressions:g().int().nonnegative(),unreportedClicks:g().int().nonnegative(),unreportedImpressions:g().int().nonnegative()}),ZD=v({window:HD,bucketDays:ke(30),filters:v({hostScope:KD,marketingHosts:N(c()),pathPrefix:c().nullable(),brandTerms:N(c()),queryMixScope:ke("property")}),acquisition:v({status:bv,error:c().nullable(),syncedAt:c().datetime().nullable(),periods:N(Lf),channels:N(v({channelGroup:c(),periods:N(Lf)})),pages:N(v({hostName:c(),landingPage:c(),periods:N(Lf)}))}),leads:v({status:bv,error:c().nullable(),syncedAt:c().datetime().nullable(),attributionScope:GD.nullable(),hostAndPathFiltersApplied:ee(),periods:N(vv),channels:N(v({channelGroup:c(),periods:N(vv)}))}),searchDemand:v({status:$(["ready","unavailable"]),periods:N(QD),queries:N(v({query:c(),classification:$(["branded","non-branded"]),periods:N(Sv)})),pages:N(v({hostName:c(),landingPage:c(),periods:N(Sv)})),latestDate:up.nullable()})}),zS=$(["cli","api","config-file"]);function YD(e){const n=new Set,i=new Set;for(const r of e){if(n.has(r.label)){i.add(r.label);continue}n.add(r.label)}return[...i]}function FD(e,n){return n?e.some(i=>i.label===n):!0}v({displayName:c().min(1),canonicalDomain:c().min(1),ownedDomains:N(c().min(1)).optional(),aliases:N(c()).optional(),country:c().length(2),language:c().min(2),tags:N(c()).optional(),labels:Ke(c(),c()).optional(),providers:N(ka).optional(),providerModels:Qp.optional(),locations:N(cr).optional(),defaultLocation:c().nullable().optional(),measurement:Yp.optional(),autoExtractBacklinks:ee().optional(),configSource:zS.optional()});const XD=v({id:c(),name:c(),displayName:c().optional(),canonicalDomain:c(),ownedDomains:N(c()).default([]),aliases:N(c()).default([]),country:c().length(2),language:c().min(2),tags:N(c()).default([]),labels:Ke(c(),c()).default({}),providers:N(c()).default([]),providerModels:Qp.default({}),locations:N(cr).default([]),defaultLocation:c().nullable().optional(),measurement:Yp.default(DS),autoExtractBacklinks:ee().default(!1),configSource:zS.default("cli"),configRevision:g().int().positive().default(1),createdAt:c().optional(),updatedAt:c().optional()});v({id:c(),query:c(),createdAt:c()});v({id:c(),keyword:c(),createdAt:c()});v({queries:N(c().trim().min(1)).min(1)});v({keywords:N(c().trim().min(1)).min(1)});v({provider:ka,count:g().int().min(1).max(20).optional()});v({id:c(),domain:c(),createdAt:c()});v({competitors:N(c().trim().min(1)).min(1)});function Cc(e){let n=e.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}const JD=new Set(["ac.uk","co.id","co.il","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.au","com.br","com.cn","com.mx","com.ph","com.sg","com.tr","edu.au","edu.sg","gov.au","gov.uk","me.uk","ne.jp","net.au","net.br","net.cn","net.in","net.tr","or.jp","or.kr","org.au","org.br","org.in","org.nz","org.tr","org.uk","org.za"]);function WD(e){const n=Cc(e);if(!n)return"";const i=n.split("/")[0]?.split(":")[0]??"";if(!i)return"";const r=i.split(".").filter(Boolean);if(r.length<2)return"";if(r.length===2)return r.join(".");const l=r.slice(-2).join(".");return JD.has(l)?r.length>=3?r.slice(-3).join("."):"":r.slice(-2).join(".")}function ez(e){const n=WD(e);return n?n.split(".")[0]??"":""}function tz(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,r=[];for(const l of n){const u=l.trim();if(!u)continue;const d=Cc(u);i.has(d)||(i.add(d),r.push(u))}return r}const nz=v({name:c().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:Ke(c(),c()).optional().default({})}),az=v({preset:c().optional(),cron:c().optional(),timezone:c().optional().default("UTC"),providers:N(ka).optional().default([])}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),iz=v({channel:ke("webhook"),url:c().url(),events:N(Zp).min(1)}),sz=v({gsc:v({propertyUrl:c()}).optional(),syncSchedule:v({preset:c().optional(),cron:c().optional()}).optional()}).optional(),xv=N(c().min(1)),rz=v({displayName:c().min(1),canonicalDomain:c().min(1),ownedDomains:N(c().min(1)).optional().default([]),aliases:N(c().min(1)).optional().default([]),country:c().length(2),language:c().min(2),queries:xv.optional(),keywords:xv.optional(),competitors:N(c().min(1)).optional().default([]),providers:N(ka).optional().default([]),providerModels:Qp.optional().default({}),locations:N(cr).optional().default([]),defaultLocation:c().optional(),measurement:Yp.optional().default(DS),schedule:az,notifications:N(iz).optional().default([]),google:sz,autoExtractBacklinks:ee().optional().default(!1)}).superRefine((e,n)=>{e.queries!==void 0&&e.keywords!==void 0&&n.addIssue({code:"custom",message:"Use spec.queries; spec.keywords is accepted only as a legacy alias when spec.queries is omitted",path:["keywords"]});const i=YD(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),FD(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})});v({apiVersion:ke("canonry/v1"),kind:ke("Project"),metadata:nz,spec:rz});const RS=$(["introduced","repointed","retired"]),oz=RS.enum;v({modelId:c().trim().min(1),date:c().regex(/^\d{4}-\d{2}-\d{2}$/,"date must be YYYY-MM-DD"),kind:RS,confirmed:ee(),sourceUrl:c().url(),note:c().min(1)});const lz=[{modelId:"chatgpt-4o-latest",date:"2024-08-15",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released dynamic model for chatgpt-4o-latest—this model will point to the latest GPT-4o model used by ChatGPT." First moving id in the lineage.'},{modelId:"chatgpt-4o-latest",date:"2026-02-17",kind:"retired",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/deprecations.md",note:'Shutdown 2026-02-17, replacement gpt-5.1-chat-latest. Announced under the heading "2025-11-18: chatgpt-4o-latest snapshot".'},{modelId:"gpt-5.1-chat-latest",date:"2025-11-13",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:"Introduced inside the GPT-5.1 launch entry, not as a standalone entry."},{modelId:"gpt-5.2-chat-latest",date:"2025-12-11",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:"Introduced inside the GPT-5.2 launch entry."},{modelId:"gpt-5.2-chat-latest",date:"2026-02-10",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Updated the gpt-5.2-chat-latest slug to point to the latest model currently used in ChatGPT." Target model NOT named.'},{modelId:"gpt-5.3-chat-latest",date:"2026-03-03",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released gpt-5.3-chat-latest to the Chat Completions and Responses API. This model points to the GPT-5.3 Instant snapshot currently used in ChatGPT."'},{modelId:"gpt-5.3-chat-latest",date:"2026-03-16",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Updated the gpt-5.3-chat-latest slug to point to the latest model currently used in ChatGPT." Target model NOT named.'},{modelId:"chat-latest",date:"2026-05-05",kind:"introduced",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim: "Released chat-latest snapshot which points to the latest Instant model currently used in ChatGPT... The underlying model snapshot will be regularly updated."'},{modelId:"chat-latest",date:"2026-05-28",kind:"repointed",confirmed:!1,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'UNCONFIRMED. The entry reads "Released chat-latest snapshot..." — the verb is "Released", the same boilerplate as the 2026-05-05 entry, not "Updated" as used on 2026-06-24. Only "the latest improvements" vs "our latest improvements" differs. Either a real change logged with copy-pasted text, or a duplicated entry; the record does not disambiguate.'},{modelId:"chat-latest",date:"2026-06-24",kind:"repointed",confirmed:!0,sourceUrl:"https://developers.openai.com/api/docs/changelog",note:'Verbatim (re-read at source 2026-07-20): "Updated the chat-latest snapshot, which points to the latest Instant model currently used in ChatGPT." The verb is "Updated", unlike the "Released" boilerplate of 2026-05-05 and 2026-05-28, which is the wording the changelog reserves for a real change. Target model NOT named. The only unambiguous chat-latest change on record.'}];oz.repointed;new Set(lz.map(e=>e.modelId.toLowerCase()));const cz=$(["not-exposed","no-known-change","known-change"]);cz.enum;const uz=v({modelId:c().trim().min(1),date:c().regex(/^\d{4}-\d{2}-\d{2}$/),confirmed:ee(),sourceUrl:c().url()}),dz=v({status:$(["no-known-change","known-change"]),modelIds:N(c().trim().min(1)).min(1),changes:N(uz),changeCount:g().int().nonnegative(),unverifiedChangeCount:g().int().nonnegative(),firstChangeDate:c().optional(),lastChangeDate:c().optional(),knownGoodAsOf:c(),checkedThroughPeriodEnd:ee()}),fz={openai:"ChatGPT",chatgpt:"ChatGPT",anthropic:"Claude",claude:"Claude",google:"Gemini",gemini:"Gemini",perplexity:"Perplexity"};function pz(e){const n=e.trim().toLowerCase();return fz[n]??e.charAt(0).toUpperCase()+e.slice(1)}function qf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):0}function fo(e){return typeof e=="string"&&e.trim().length>=10?e.trim().slice(0,10):null}function Uf(e){return[...new Set(e.filter(n=>n!==null))].sort()}function mz(e,n){const i=pz(e),r=Array.isArray(n.changes)?n.changes:[],l=qf(n.changeCount)||r.length,u=Math.min(l,qf(n.unverifiedChangeCount)||qf(n.unconfirmedChangeCount)||r.filter(x=>x.confirmed===!1).length),d=fo(n.knownGoodAsOf),h=n.checkedThroughPeriodEnd!==!1,y={engine:i,confirmedCount:l-u,unconfirmedCount:u,knownGoodAsOf:d,checkedThroughPeriodEnd:h};if(r.length>0)return{...y,confirmedDates:Uf(r.filter(x=>x.confirmed!==!1).map(x=>fo(x.date))),unconfirmedDates:Uf(r.filter(x=>x.confirmed===!1).map(x=>fo(x.date)))};const b=Uf([fo(n.firstChangeDate),fo(n.lastChangeDate)]);return l===0?{...y,confirmedDates:[],unconfirmedDates:[]}:u===0?{...y,confirmedDates:b,unconfirmedDates:[]}:y.confirmedCount===0?{...y,confirmedDates:[],unconfirmedDates:b}:{...y,confirmedDates:[],unconfirmedDates:[]}}function hz(e){return e.length===1?e[0]:e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[e.length-1]}`}function wv(e,n){return e.length===0?null:e.length===1&&n<=1?`on ${e[0]}`:`more than once between ${e[0]} and ${e[e.length-1]}`}function gz(e){const n=wv(e.confirmedDates,e.confirmedCount),i=wv(e.unconfirmedDates,e.unconfirmedCount),r=`The model behind ${e.engine}`;if(e.confirmedCount>0&&e.unconfirmedCount===0)return n?`${r} was updated ${n}, inside this period.`:`${r} was updated inside this period.`;if(e.confirmedCount===0)return i?`${r} may have been updated ${i}, inside this period, though that is not confirmed.`:`${r} may have been updated inside this period, though that is not confirmed.`;if(n&&i)return`${r} was updated ${n}, inside this period, and may also have been updated ${i}.`;const l=e.unconfirmedCount>1?"more times":"once more";return`${r} was updated inside this period, and may have been updated ${l}, though that is not confirmed.`}function jv(e){const n=e.filter(r=>!r.checkedThroughPeriodEnd&&r.knownGoodAsOf!==null);return n.length===0?null:`We last checked for model updates on ${n.map(r=>r.knownGoodAsOf).sort()[0]}, and this period runs past that date, so there may be later updates we do not know about.`}function z$(e){const n=Object.entries(e??{}).map(([y,b])=>mz(y,b??{})).sort((y,b)=>y.engine.localeCompare(b.engine));if(n.length===0)return null;const i=n.filter(y=>y.confirmedCount+y.unconfirmedCount>0);if(i.length===0){const y=[...new Set(n.map(C=>C.engine))],b=y.length>1,x=jv(n),w=[...new Set(n.map(C=>C.knownGoodAsOf).filter(C=>C!==null))].sort(),A=x??(w.length>0?`We last checked for model updates on ${w[0]}.`:null);return{kind:"no-known-change",text:`No model updates are on record for ${hz(y)} in this period.`,detail:`${b?"These engines":"This engine"} can be moved onto a different underlying model without the data ever showing a different model name, so we check each period against a record of known updates. Nothing is listed inside this one.${A?` ${A}`:""}`}}const r=i.reduce((y,b)=>y+b.confirmedCount+b.unconfirmedCount,0),l=i.some(y=>y.confirmedCount>0),u=r===1?"this update":"these updates",d=l?`Some of the movement in these numbers may come from ${u} rather than from a real change in how AI answers about you, so compare periods carefully.`:`If so, some of the movement in these numbers may come from ${u} rather than from a real change in how AI answers about you, so compare periods carefully.`,h=jv(n);return{kind:"change",text:`${i.map(gz).join(" ")} ${d}${h?` ${h}`:""}`}}const yz=$(["gsc","ga4","gbp"]);v({id:c(),domain:c(),connectionType:yz,propertyId:c().nullable().optional(),sitemapUrl:c().nullable().optional(),scopes:N(c()).default([]),createdAt:c(),updatedAt:c()});v({date:c(),query:c(),page:c(),country:c().nullable().optional(),device:c().nullable().optional(),clicks:g(),impressions:g(),ctr:g(),position:g()});const bz=v({date:c(),clicks:g(),impressions:g(),ctr:g()});v({totals:v({clicks:g(),impressions:g(),ctr:g(),days:g()}),daily:N(bz)});const dp=v({id:c(),url:c(),indexingState:c().nullable().optional(),verdict:c().nullable().optional(),coverageState:c().nullable().optional(),pageFetchState:c().nullable().optional(),robotsTxtState:c().nullable().optional(),crawlTime:c().nullable().optional(),lastCrawlResult:c().nullable().optional(),isMobileFriendly:ee().nullable().optional(),richResults:N(c()).default([]),referringUrls:N(c()).default([]),inspectedAt:c()});$(["stable","reindexed","deindexed","still-missing","new"]);const vz=v({url:c(),previousState:c().nullable(),currentState:c().nullable(),transitionDate:c()}),Sz=v({reason:c(),count:g(),urls:N(dp).default([])});v({summary:v({total:g(),indexed:g(),notIndexed:g(),deindexed:g(),percentage:g()}),lastInspectedAt:c().nullable(),lastSyncedAt:c().nullable(),indexed:N(dp).default([]),notIndexed:N(dp).default([]),deindexed:N(vz).default([]),reasonGroups:N(Sz).default([])});v({url:c(),type:$(["URL_UPDATED","URL_DELETED"]),notifiedAt:c()});const xz=v({url:c(),type:$(["URL_UPDATED","URL_DELETED"]),notifiedAt:c(),status:$(["success","error"]),error:c().optional()});v({summary:v({total:g().int().nonnegative(),succeeded:g().int().nonnegative(),failed:g().int().nonnegative()}),results:N(xz).default([])});v({date:c(),indexed:g(),notIndexed:g(),reasonBreakdown:Ke(c(),g()).default({})});const wz=v({siteUrl:c(),permissionLevel:c()});v({sites:N(wz).default([])});const jz=v({type:c(),submitted:c(),indexed:c().optional().describe("Deprecated compatibility field.")}),MS=v({path:c(),parentSitemapUrl:c().optional(),lastSubmitted:c().optional(),isPending:ee().optional(),isSitemapsIndex:ee().optional(),type:c().optional(),lastDownloaded:c().optional(),warnings:c().optional(),errors:c().optional(),contents:N(jz).optional()});v({sitemaps:N(MS).default([]),summary:v({total:g().int().nonnegative(),indexes:g().int().nonnegative(),files:g().int().nonnegative()}),preferredSubmissionUrls:N(c()).default([])});v({sitemapUrls:N(c().url().refine(e=>{const n=new URL(e).protocol;return n==="http:"||n==="https:"},{message:"Sitemap URL must use http or https."})).min(1).max(50)});const Nz=v({sitemapUrl:c(),status:$(["accepted","error"]),submittedAt:c().optional(),error:c().optional()});v({summary:v({total:g().int().nonnegative(),accepted:g().int().nonnegative(),failed:g().int().nonnegative()}),results:N(Nz)});v({sitemaps:N(MS),primarySitemapUrl:c(),run:v({id:c(),projectId:c(),kind:c(),status:c(),trigger:c(),createdAt:c()}).nullable()});const Az=v({name:c(),accountName:c().nullable(),type:c().nullable(),role:c().nullable()});v({accounts:N(Az),total:g().int().nonnegative()});const kz=v({id:c(),projectId:c(),accountName:c(),locationName:c(),displayName:c(),primaryCategoryDisplayName:c().nullable(),storefrontAddress:c().nullable(),websiteUri:c().nullable(),placeId:c().nullable(),mapsUri:c().nullable(),additionalCategories:N(c()),description:c().nullable(),serviceArea:Ke(c(),Pn()).nullable(),regularHours:Ke(c(),Pn()).nullable(),primaryPhone:c().nullable(),openStatus:c().nullable(),openingDate:c().nullable(),selected:ee(),syncedAt:c().nullable(),createdAt:c(),updatedAt:c()});v({locations:N(kz),totalDiscovered:g().int().nonnegative(),totalSelected:g().int().nonnegative()});v({selectAllNew:ee().default(!0),accountName:c().optional(),switchAccount:ee().default(!1)});v({selected:ee()});v({locationNames:N(c()).optional(),daysOfMetrics:g().int().positive().max(540).optional(),monthsOfKeywords:g().int().positive().max(18).optional()});v({runId:c(),status:c()});const Cz=v({locationName:c(),date:c(),metric:c(),value:g().int()});v({metrics:N(Cz),total:g().int().nonnegative()});const _z=v({locationName:c(),periodStart:c(),periodEnd:c(),keyword:c(),valueCount:g().int().nullable(),valueThreshold:g().int().nullable()});v({keywords:N(_z),total:g().int().nonnegative(),thresholdedPct:g().int().min(0).max(100)});const Tz=v({locationName:c(),placeActionLinkName:c(),placeActionType:c(),uri:c().nullable(),isPreferred:ee(),providerType:c().nullable()});v({placeActions:N(Tz),total:g().int().nonnegative()});const Ez=v({locationName:c(),populatedGroupCount:g().int().nonnegative(),syncedAt:c(),attributes:Ke(c(),Pn())});v({lodging:N(Ez),total:g().int().nonnegative()});const Oz=v({name:c(),valueType:c(),values:N(Kt([ee(),c()])),unsetValues:N(c()),uris:N(c())}),Dz=v({locationName:c(),attributeCount:g().int().nonnegative(),syncedAt:c(),attributes:N(Oz)});v({attributes:N(Dz),total:g().int().nonnegative()});const zz=v({locationName:c(),placeId:c(),tier:c(),amenities:N(c()),syncedAt:c(),place:Ke(c(),Pn())});v({places:N(zz),total:g().int().nonnegative()});v({scope:v({locationName:c().nullable(),locationCount:g().int().nonnegative()}),performance:v({totals:Ke(c(),g()),recent7d:Ke(c(),g()),prior7d:Ke(c(),g()),deltaPct:Ke(c(),g().nullable())}),freshness:v({dataThroughDate:c().nullable(),latestStoredDate:c().nullable(),pendingDays:g().int().nonnegative()}),timeseries:N(v({date:c(),pending:ee(),metrics:Ke(c(),g())})),keywords:v({total:g().int().nonnegative(),thresholdedCount:g().int().nonnegative(),thresholdedPct:g().int().min(0).max(100)}),placeActions:v({total:g().int().nonnegative(),hasReservationCta:ee(),hasBookingCta:ee(),hasDirectMerchantCta:ee()}),lodging:v({lodgingLocationCount:g().int().nonnegative(),populatedLodgingCount:g().int().nonnegative(),emptyLodgingCount:g().int().nonnegative()}),profileCompleteness:v({locationCount:g().int().nonnegative(),withSecondaryCategories:g().int().nonnegative(),secondaryCategoryTotal:g().int().nonnegative(),withDescription:g().int().nonnegative(),withServiceArea:g().int().nonnegative(),withHours:g().int().nonnegative(),withPrimaryPhone:g().int().nonnegative(),permanentlyClosed:g().int().nonnegative(),temporarilyClosed:g().int().nonnegative()})});const Rz={BUSINESS_DIRECTION_REQUESTS:"Direction requests",WEBSITE_CLICKS:"Website clicks",CALL_CLICKS:"Call clicks",BUSINESS_BOOKINGS:"Bookings",BUSINESS_CONVERSATIONS:"Conversations",BUSINESS_FOOD_ORDERS:"Food orders",BUSINESS_FOOD_MENU_CLICKS:"Food menu clicks",BUSINESS_IMPRESSIONS_DESKTOP_SEARCH:"Search impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_SEARCH:"Search impressions (mobile)",BUSINESS_IMPRESSIONS_DESKTOP_MAPS:"Maps impressions (desktop)",BUSINESS_IMPRESSIONS_MOBILE_MAPS:"Maps impressions (mobile)"};function Mz(e){const n=e.replace(/^BUSINESS_/,"").split("_").filter(Boolean).map(r=>r.toLowerCase());if(n.length===0)return e;const i=n.join(" ");return i.charAt(0).toUpperCase()+i.slice(1)}function R$(e){return Rz[e]??Mz(e)}const Bz=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],Lz=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function M$(e){return Bz.includes(e)?"conversion":Lz.includes(e)?"reach":"other"}v({id:c(),domain:c(),siteUrl:c().nullable().optional(),createdAt:c(),updatedAt:c()});const $f=v({id:c(),url:c(),httpCode:g().nullable().optional(),inIndex:ee().nullable().optional(),lastCrawledDate:c().nullable().optional(),inIndexDate:c().nullable().optional(),inspectedAt:c(),documentSize:g().nullable().optional(),anchorCount:g().nullable().optional(),discoveryDate:c().nullable().optional()});v({summary:v({total:g(),indexed:g(),notIndexed:g(),unknown:g().optional(),percentage:g()}),lastInspectedAt:c().nullable(),indexed:N($f).default([]),notIndexed:N($f).default([]),unknown:N($f).default([]).optional()});v({query:c(),impressions:g(),clicks:g(),ctr:g(),averagePosition:g()});v({date:c(),indexed:g(),notIndexed:g(),unknown:g()});const qz=v({url:c(),status:$(["success","error"]),submittedAt:c(),error:c().optional()});v({summary:v({total:g().int().nonnegative(),succeeded:g().int().nonnegative(),failed:g().int().nonnegative()}),results:N(qz).default([])});const BS=v({url:c(),verified:ee()});v({sites:N(BS).default([])});v({connected:ee(),domain:c(),siteUrl:c().nullable(),createdAt:c().nullable(),updatedAt:c().nullable()});v({connected:ee(),domain:c(),siteUrl:c().nullable(),availableSites:N(BS).default([])});v({siteUrl:c()});const Uz=v({name:c(),alive:ee(),lastUsed:c().nullable()});v({connected:ee(),endpoint:c(),version:c().optional(),browserVersion:c().optional(),targets:N(Uz).default([])});const ur=$(["live","staging"]);v({projectName:c(),url:c(),stagingUrl:c().optional(),username:c(),defaultEnv:ur,createdAt:c(),updatedAt:c()});const Nv=v({url:c(),reachable:ee(),pageCount:g().nullable().optional(),version:c().nullable().optional(),error:c().nullable().optional(),plugins:N(c()).optional(),authenticatedUser:v({id:g(),slug:c()}).nullable().optional()});v({connected:ee(),projectName:c(),defaultEnv:ur,live:Nv.nullable(),staging:Nv.nullable(),adminUrl:c().nullable().optional()});const $z=v({id:g(),slug:c(),title:c(),status:c(),modifiedAt:c().nullable().optional(),link:c().nullable().optional()}),LS=v({title:c().nullable(),description:c().nullable(),noindex:ee().nullable(),writable:ee().default(!1),writeTargets:N(c()).default([])}),Iz=v({type:c(),json:Ke(c(),Pn())}),Pz=$z.extend({env:ur,content:c(),seo:LS,schemaBlocks:N(Iz).default([])}),Av=Pz.extend({contentHash:c(),contentSnippet:c()}),qS=v({manualRequired:ke(!0),targetUrl:c(),adminUrl:c().nullable().optional(),content:c(),nextSteps:N(c()).default([])}),Vz=v({slug:c(),severity:$(["high","medium","low"]),code:$(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:c()});v({slug:c(),title:c(),status:c(),wordCount:g(),seo:LS,schemaPresent:ee(),issues:N(Vz).default([])});const Gz=v({slug:c(),status:$(["applied","skipped","manual"]),error:c().optional(),manualAssist:qS.optional()});v({env:ur,strategy:$(["plugin","manual"]),results:N(Gz)});const Hz=v({slug:c(),status:$(["deployed","stripped","skipped","failed"]),schemasInjected:N(c()).optional(),manualAssist:qS.optional(),error:c().optional()});v({env:ur,results:N(Hz)});const Kz=v({slug:c(),title:c(),canonrySchemas:N(c()),thirdPartySchemas:N(c()),hasCanonrySchema:ee()});v({env:ur,pages:N(Kz)});const Qz=v({name:c(),status:$(["completed","skipped","failed"]),summary:c().optional(),error:c().optional()});v({projectName:c(),steps:N(Qz)});v({slug:c(),live:Av,staging:Av,hasDifferences:ee(),differences:v({title:ee(),slug:ee(),content:ee(),seoTitle:ee(),seoDescription:ee(),noindex:ee(),schema:ee()})});const Zz=v({name:c(),displayName:c().optional(),keyUrl:c().optional(),modelHint:c().optional(),model:c().optional(),defaultModel:c().optional(),configured:ee(),quota:UD.optional(),vertexConfigured:ee().optional()}),Yz=v({name:c(),displayName:c(),mode:$(["api","browser"]),modelConfigurable:ee(),defaultModel:c(),knownModels:N(v({id:c(),displayName:c(),tier:$(["flagship","standard","fast","economy"])})).default([]),modelValidationPattern:v({source:c(),flags:c()}),modelValidationHint:c()}),kv=v({configured:ee()});v({providers:N(Zz).default([]),providerCatalog:N(Yz).default([]),google:kv,bing:kv});const ui=$(["queued","running","completed","partial","failed","cancelled"]),Ft=ui.enum,US=$(["answer-visibility","site-audit","gsc-sync","inspect-sitemap","ga-sync","bing-inspect","bing-inspect-sitemap","backlink-extract","traffic-sync","aeo-discover-seed","aeo-discover-probe","gbp-sync","ads-sync"]),_e=US.enum,Fp=$(["manual","scheduled","config-apply","backfill","probe"]),Zs=Fp.enum,Na=$(["cited","not-cited"]),_c=Na.enum,Tc=$(["visible","not-visible"]);Tc.enum;const Ao=$(["mentioned","not-mentioned"]);Ao.enum;const $S=$(["new","cited","lost","emerging","not-cited"]);$S.enum;const Fz=$(["new","mentioned","lost","emerging","not-mentioned"]);Fz.enum;const Xz=$([Zs.manual,Zs.probe]);v({kind:ke(_e["answer-visibility"]).optional(),trigger:Xz.optional(),providers:N(ka).optional(),queries:N(c().min(1)).min(1).optional(),location:c().min(1).optional(),allLocations:ee().optional(),noLocation:ee().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const Jz=v({message:c(),raw:Pn().optional()}),Wz=v({message:c().optional(),providers:Ke(c(),Jz).optional()}),eR=v({id:c(),projectId:c(),kind:US,status:ui,trigger:Fp.default("manual"),location:c().nullable().optional(),queries:N(c()).nullable().optional(),startedAt:c().nullable().optional(),finishedAt:c().nullable().optional(),error:Wz.nullable().optional(),createdAt:c()});function Xp(e){if(e.providers){const n=Object.entries(e.providers);if(n.length===1){const[i,r]=n[0];return`${i}: ${r.message}`}if(n.length>1)return n.map(([i,r])=>`${i}: ${r.message}`).join(" • ")}return e.message??"Run failed."}const Vc=v({uri:c(),title:c()}),IS=v({id:c(),runId:c(),queryId:c(),query:c().optional(),provider:ka,citationState:Na,answerMentioned:ee().optional(),visibilityState:Tc.optional(),mentionState:Ao.optional(),transition:$S.optional(),answerText:c().nullable().optional(),citedDomains:N(c()).default([]),competitorOverlap:N(c()).default([]),recommendedCompetitors:N(c()).default([]),matchedTerms:N(c()).default([]),groundingSources:N(Vc).default([]),searchQueries:N(c()).default([]),model:c().nullable().optional(),servedModel:c().nullable().optional(),location:c().nullable().optional(),createdAt:c()});v({snapshots:N(IS),total:g().int().nonnegative()});const tR=v({queryId:c().nullable(),query:c().nullable(),run1State:Na.nullable(),run2State:Na.nullable(),run1AnswerMentioned:ee().nullable(),run2AnswerMentioned:ee().nullable(),run1VisibilityState:Tc.nullable(),run2VisibilityState:Tc.nullable(),run1MentionState:Ao.nullable().optional(),run2MentionState:Ao.nullable().optional(),changed:ee(),visibilityChanged:ee()});v({run1:c(),run2:c(),diff:N(tR)});const nR=eR.extend({snapshots:N(IS).optional()}),aR=v({totalRuns:g().int().nonnegative(),run:nR.nullable()});v({id:c(),projectId:c().nullable().optional(),actor:c(),action:c(),entityType:c(),entityId:c().nullable().optional(),diff:Pn().optional(),userAgent:c().nullable().optional(),actorSession:c().nullable().optional(),createdAt:c()});const iR=$(["yes","no","unknown","not-mentioned"]),Cv=N(c().min(1));v({companyName:c().min(1),domain:c().min(1),queries:Cv.optional(),phrases:Cv.optional(),competitors:N(c().min(1)).optional().default([])}).superRefine((e,n)=>{e.queries!==void 0&&e.phrases!==void 0&&n.addIssue({code:"custom",message:"Use queries; phrases is accepted only as a legacy alias when queries is omitted",path:["phrases"]})});const sR=v({name:c(),count:g().int().nonnegative()}),rR=v({id:c(),name:c(),weight:g(),score:g(),findings:N(v({type:c(),message:c()})).default([]),recommendations:N(c()).default([])}),oR=v({url:c(),finalUrl:c(),auditedAt:c(),overallScore:g(),summary:c(),factors:N(rR).default([])}),lR=v({industry:c(),summary:c(),services:N(c()).default([]),categoryTerms:N(c()).default([])}),cR=v({provider:c(),displayName:c(),model:c().nullable().optional(),mentioned:ee(),cited:ee(),describedAccurately:iR,accuracyNotes:c().nullable().optional(),incorrectClaims:N(c()).default([]),recommendedCompetitors:N(c()).default([]),citedDomains:N(c()).default([]),groundingSources:N(Vc).default([]),searchQueries:N(c()).default([]),answerText:c(),error:c().nullable().optional()}),uR=v({query:c(),providerResults:N(cR).default([])}),dR=v({totalQueries:g().int().nonnegative(),totalProviders:g().int().nonnegative(),totalComparisons:g().int().nonnegative(),mentionCount:g().int().nonnegative(),citationCount:g().int().nonnegative(),topCompetitors:N(sR).default([]),visibilityGap:c(),whatThisMeans:N(c()).default([]),recommendedActions:N(c()).default([])});v({companyName:c(),domain:c(),homepageUrl:c(),generatedAt:c(),queries:N(c()).default([]),competitors:N(c()).default([]),profile:lR,audit:oR,queryResults:N(uR).default([]),summary:dR});const PS=$(["pass","partial","fail"]);PS.enum;const VS=$(["up","down","flat"]);VS.enum;const fR=v({id:c(),name:c(),weight:g(),avgScore:g(),status:PS,pagesPassing:g().int().nonnegative(),pagesPartial:g().int().nonnegative(),pagesFailing:g().int().nonnegative()}),pR=v({factorId:c(),factorName:c(),avgScore:g(),affectedPages:g().int().nonnegative(),totalPages:g().int().nonnegative(),affectedPct:g().int().nonnegative(),topRecommendations:N(c()).default([])});v({project:c(),hasData:ee(),runId:c().nullable(),runStatus:ui.nullable(),sitemapUrl:c().nullable(),auditedAt:c().nullable(),aggregateScore:g(),pagesDiscovered:g().int().nonnegative(),pagesAudited:g().int().nonnegative(),pagesSkipped:g().int().nonnegative(),pagesErrored:g().int().nonnegative(),deltaScore:g().nullable(),trend:VS.nullable(),previousScore:g().nullable(),previousAuditedAt:c().nullable(),factors:N(fR).default([]),crossCuttingIssues:N(pR).default([]),prioritizedFixes:N(c()).default([])});const mR=v({id:c(),name:c(),weight:g(),score:g()}),hR=v({url:c(),overallScore:g(),status:$(["success","error"]),error:c().nullable().optional(),factors:N(mR).default([])});v({project:c(),runId:c().nullable(),auditedAt:c().nullable(),total:g().int().nonnegative(),pages:N(hR).default([])});const gR=v({runId:c(),auditedAt:c(),aggregateScore:g(),pagesAudited:g().int().nonnegative()});v({project:c(),points:N(gR).default([])});v({sitemapUrl:c().url().optional(),limit:g().int().positive().max(2e3).optional()});v({runId:c(),status:ui});const Jp=$(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync"]);Jp.enum;v({id:c(),projectId:c(),kind:Jp,cronExpr:c(),preset:c().nullable().optional(),timezone:c().default("UTC"),enabled:ee().default(!0),providers:N(ka).default([]),sourceId:c().nullable().optional(),lastRunAt:c().nullable().optional(),nextRunAt:c().nullable().optional(),createdAt:c(),updatedAt:c()});v({kind:Jp.optional(),preset:c().optional(),cron:c().optional(),timezone:c().optional().default("UTC"),enabled:ee().optional().default(!0),providers:N(ka).optional().default([]),sourceId:c().optional()}).refine(e=>e.preset&&!e.cron||!e.preset&&e.cron,{message:'Exactly one of "preset" or "cron" must be provided'});const Wp=$(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);Wp.enum;const em=$(["cited","aspirational","wasted-surface"]),_v=em.enum;_v.cited,_v.aspirational;const Gc=$(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),yR=Gc.enum;yR["direct-competitor"];const Hc=$(["queued","seeding","probing","completed","failed"]);Hc.enum;const GS=v({domain:c().min(1),hits:g().int().positive(),competitorType:Gc.default("unknown")}),bR=v({id:c(),sessionId:c(),projectId:c(),query:c(),bucket:em.nullable().default(null),citationState:Na,citedDomains:N(c()).default([]),answerMentioned:ee().nullable().default(null),createdAt:c()}),vR=v({id:c(),projectId:c(),status:Hc,icpDescription:c().nullable().optional(),seedProvider:c().nullable().optional(),seedCountRaw:g().int().nullable().optional(),seedCount:g().int().nullable().optional(),seedFromAnswerCount:g().int().nullable().optional(),seedFromGroundingCount:g().int().nullable().optional(),seedBrandFilteredCount:g().int().nullable().optional(),buyerDescription:c().nullable().optional(),locations:N(cr).nullable().optional(),seedRawCandidates:N(c()).nullable().optional(),dedupClusterMinSims:N(g()).nullable().optional(),dedupBandPairFraction:g().nullable().optional(),dedupPairsTotal:g().int().nullable().optional(),seedProviders:N(c()).nullable().optional(),seedProviderCounts:Ke(c(),g().int()).nullable().optional(),canonicalCount:g().int().nullable().optional(),dedupThreshold:g().nullable().optional(),probeCount:g().int().nullable().optional(),citedCount:g().int().nullable().default(null),aspirationalCount:g().int().nullable().default(null),wastedCount:g().int().nullable().default(null),competitorMap:N(GS).default([]),warning:c().nullable().optional(),error:c().nullable().optional(),startedAt:c().nullable().optional(),finishedAt:c().nullable().optional(),createdAt:c()});vR.extend({probes:N(bR).default([])});const SR=500,xR=8,wR=["gemini","openai"],jR=$(wR);v({icpDescription:c().min(1).optional(),buyerDescription:c().min(1).optional(),seedProviders:N(jR).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:g().min(0).max(1).optional(),maxProbes:g().int().positive().max(SR).optional(),probeConcurrency:g().int().min(1).max(xR).optional(),locations:N(c().min(1)).optional()});v({buckets:N(em).min(1).optional(),includeCompetitors:ee().optional(),competitorTypes:N(Gc).min(1).optional()});v({sessionId:c(),projectId:c(),status:Hc,queriesByBucket:v({cited:N(c()),aspirational:N(c()),"wasted-surface":N(c())}),suggestedCompetitors:N(GS)});v({sessionId:c(),projectId:c(),promoted:v({queries:N(c()),competitors:N(c())}),skipped:v({queries:N(c()),competitors:N(c())})});Kt([ke("cli"),c().regex(/^discovery:.+$/)]);const NR=v({query:c().min(1),probeHits:g().int().positive()}),AR=v({rawCandidates:g().int().nonnegative(),admitted:g().int().nonnegative(),rejected:v({belowFloor:g().int().nonnegative(),length:g().int().nonnegative(),navigational:g().int().nonnegative(),duplicate:g().int().nonnegative(),offAnchor:g().int().nonnegative(),semanticDuplicate:g().int().nonnegative()})});v({sessionId:c(),projectId:c(),provider:c(),status:Hc,minProbeHits:g().int().positive(),anchorApplied:ee(),semanticNoveltyApplied:ee(),candidates:N(NR),stats:AR});const tm=$(["own","direct-competitor","ota-aggregator","editorial-media","other"]);tm.enum;const HS=$(["7d","30d","90d","all"]),Tv=$(["improving","declining","stable"]),kR=$(["mentioned","cited"]);kR.enum;const fp=v({citationRate:g(),cited:g().int(),total:g().int(),mentionRate:g(),mentionedCount:g().int()}),nm=c().trim().min(1),CR=N(nm).min(1).superRefine((e,n)=>{for(let i=1;i<e.length;i+=1)e[i-1]>=e[i]&&n.addIssue({code:"custom",message:"mixed model IDs must be sorted and unique",path:[i]})}),tr=To("status",[v({status:ke("known"),model:nm}),v({status:ke("unknown")}),v({status:ke("mixed"),models:CR,includesUnknown:ee()})]),_R=v({observedAt:c(),bucketStartDate:c(),from:tr,to:tr,fromPreWindowAnchor:ee().optional(),anchorObservedAt:c().optional()}),KS=v({latestObservation:v({observedAt:c(),state:tr}),events:N(_R),eventTotal:g().int().nonnegative().optional(),anchorUnavailable:ee().optional()}),TR=Ke(c(),KS),ER=KS.extend({latestServedModelIds:N(nm).default([])}),OR=Ke(c(),ER),DR=v({observedAt:c(),configured:tr,served:tr}),zR=v({rate:g().nullable(),projectMentionSnapshots:g().int().nonnegative(),competitorMentionSnapshots:g().int().nonnegative()}),RR=v({startDate:c(),endDate:c(),dataStartDate:c(),dataEndDate:c(),sweepCount:g().int().nonnegative(),citationRate:g(),cited:g().int(),total:g().int(),queryCount:g().int(),mentionRate:g(),mentionedCount:g().int(),mentionShare:zR,byProvider:Ke(c(),fp),modelEvidenceByProvider:Ke(c(),tr).default({})}),MR=v({date:c(),delta:g().int(),label:c()});v({window:HS,buckets:N(RR),overall:fp,byProvider:Ke(c(),fp),trend:Tv,mentionTrend:Tv,queryChanges:N(MR),modelAttribution:TR.default({}),servedModelAttribution:OR.default({}),modelServiceMismatch:Ke(c(),DR).default({}),modelPointerChanges:Ke(c(),dz).default({})});const Ev=v({category:Wp,label:c(),count:g().int(),percentage:g(),topDomains:N(v({domain:c(),count:g().int()}))}),BR=v({domain:c(),count:g().int(),percentage:g(),category:Wp,label:c(),surfaceClass:tm}),LR=v({surfaceClass:tm,label:c(),count:g().int(),percentage:g(),domainCount:g().int()}),Ov=v({totalCitedSlots:g().int(),domainTotal:g().int(),entries:N(BR),truncatedDomainCount:g().int(),truncatedCitedSlots:g().int(),bySurfaceClass:N(LR)});v({overall:N(Ev),byQuery:Ke(c(),N(Ev)),ranked:Ov,byProvider:Ke(c(),Ov),runId:c(),window:HS,limit:g().int().nullable()});const am=v({total:g().int(),checked:g().int(),mentioned:g().int(),cited:g().int(),mentionRate:g().nullable(),citedRate:g().nullable()}),QS=am.extend({provider:c(),firstObserved:c(),lastObserved:c()}),qR=am.extend({queryId:c().nullable(),query:c(),firstObserved:c(),lastObserved:c(),providers:N(QS).optional()}),UR=v({since:c().nullable(),until:c().nullable(),lastRuns:g().int().nullable(),runCount:g().int()}),$R=$(["provider"]),pp=v({domain:c(),mentions:g().int()}),IR=v({percent:g().nullable(),projectMentions:g().int(),competitorMentions:g().int(),snapshotsWithAnswerText:g().int(),perCompetitor:N(pp)});v({project:c(),groupBy:$R.optional(),window:UR,totals:am,byProvider:N(QS).optional(),queries:N(qR),shareOfVoice:IR.optional()});const PR=$(["within-noise","moved","insufficient-data","model-discontinuous","model-unknown"]),VR=$(["up","down","flat"]),Dv=v({point:g().nullable(),ciLow:g().nullable(),ciHigh:g().nullable(),numerator:g().int(),denominator:g().int()}),GR=$(["mention-share-of-voice","cited-share-of-voice","mention-rate","cited-rate"]),HR=v({key:GR,label:c(),driftRobust:ee(),from:Dv,to:Dv,rateRatio:g().nullable(),direction:Kt([VR,Ee()]),verdict:PR}),zv=v({month:c(),since:c(),until:c(),runCount:g().int(),lowRunCount:ee()}),KR=v({queryCount:g().int(),excludedFromOnly:g().int(),excludedToOnly:g().int(),providers:N(c()),excludedProviders:N(c())}),QR=v({provider:c(),fromModels:N(c()),toModels:N(c())}),ZR=$(["included","model-discontinuous","model-unknown"]),YR=v({provider:c(),status:ZR,fromModels:N(c()),toModels:N(c())}),FR=$(["comparable","model-discontinuous","model-unknown","insufficient-data"]),XR=v({status:FR,comparedProviders:N(c()),providers:N(YR)}),JR=v({provider:c(),from:v({checked:g().int(),mentioned:g().int(),cited:g().int()}),to:v({checked:g().int(),mentioned:g().int(),cited:g().int()})}),WR=v({from:v({count:g().int(),of:g().int()}),to:v({count:g().int(),of:g().int()})});v({project:c(),from:zv,to:zv,basket:KR,metrics:N(HR),queriesMentioned:WR,byProvider:N(JR),modelChanges:N(QR),continuity:XR,competitors:v({from:N(pp),to:N(pp)})});$(["json","csv"]);const e3=v({runId:c(),runKind:ke("answer-visibility"),runStatus:ui,runTrigger:Fp,runCreatedAt:c(),runStartedAt:c().nullable(),runFinishedAt:c().nullable(),snapshotId:c(),snapshotCreatedAt:c(),queryId:c().nullable(),query:c().nullable(),provider:c(),model:c().nullable(),location:c().nullable(),citationState:Na,cited:ee(),answerMentioned:ee().nullable(),mentionState:Kt([Ao,Ee()]),citedDomains:N(c()),competitorOverlap:N(c()),recommendedCompetitors:N(c()),answerText:c().nullable(),groundingSources:N(Vc),searchQueries:N(c())}),t3=v({since:c().nullable(),until:c().nullable(),includeProbes:ee()});v({schemaVersion:ke("canonry.results-export/v1"),generatedAt:c(),project:v({id:c(),name:c(),displayName:c(),canonicalDomain:c(),country:c(),language:c()}),filters:t3,recordCount:g().int().nonnegative(),records:N(e3)});const Kc=$(["organic","paid"]);Kc.enum;v({id:c(),projectId:c(),propertyId:c(),clientEmail:c(),connected:ee(),createdAt:c(),updatedAt:c()});v({date:c(),landingPage:c(),sessions:g(),organicSessions:g(),users:g()});const im=$(["session","first_user","manual_utm"]),n3=v({source:c(),medium:c(),trafficClass:Kc,sessions:g(),users:g().optional(),sourceDimension:im}),a3=v({source:c(),medium:c(),trafficClass:Kc,sourceDimension:im,landingPage:c(),sessions:g(),users:g().optional()}),i3=v({source:c(),medium:c(),sessions:g(),users:g(),channelGroup:c()}),po=v({sessions:g(),sharePct:g(),sharePctDisplay:c()}),s3=v({organic:po,social:po,direct:po,ai:po,other:po});v({totalSessions:g(),totalOrganicSessions:g(),totalDirectSessions:g(),totalUsers:g(),topPages:N(v({landingPage:c(),sessions:g(),organicSessions:g(),directSessions:g(),users:g()})),aiReferrals:N(n3),aiReferralLandingPages:N(a3),aiSessionsDeduped:g(),aiUsersDeduped:g().optional(),paidAiSessionsDeduped:g(),paidAiUsersDeduped:g().optional(),organicAiSessionsDeduped:g(),organicAiUsersDeduped:g().optional(),aiSessionsBySession:g(),aiUsersBySession:g().optional(),paidAiSessionsBySession:g(),paidAiUsersBySession:g().optional(),organicAiSessionsBySession:g(),organicAiUsersBySession:g().optional(),socialReferrals:N(i3),socialSessions:g(),socialUsers:g(),channelBreakdown:s3,organicSharePct:g(),aiSharePct:g(),aiSharePctBySession:g(),paidAiSharePct:g(),paidAiSharePctBySession:g(),organicAiSharePct:g(),organicAiSharePctBySession:g(),directSharePct:g(),socialSharePct:g(),organicSharePctDisplay:c(),aiSharePctDisplay:c(),aiSharePctBySessionDisplay:c(),paidAiSharePctDisplay:c(),paidAiSharePctBySessionDisplay:c(),organicAiSharePctDisplay:c(),organicAiSharePctBySessionDisplay:c(),directSharePctDisplay:c(),socialSharePctDisplay:c(),otherSessions:g(),otherSharePct:g(),otherSharePctDisplay:c(),lastSyncedAt:c().nullable()});v({connected:ee(),propertyId:c().nullable(),clientEmail:c().nullable(),authMethod:$(["service-account","oauth"]).nullable(),lastSyncedAt:c().nullable(),createdAt:c().nullable().optional(),updatedAt:c().nullable().optional()});v({synced:ee(),rowCount:g().int().nonnegative(),aiReferralCount:g().int().nonnegative(),socialReferralCount:g().int().nonnegative(),days:g().int().nonnegative(),syncedAt:c(),measurement:v({acquisition:v({days:g().int().nonnegative(),status:$(["ready","error"]),rowCount:g().int().nonnegative(),error:c().optional()}),leads:v({days:g().int().nonnegative(),status:$(["ready","error","not-configured"]),rowCount:g().int().nonnegative(),attributionScope:$(["landing-page","channel"]).optional(),error:c().optional()})}),syncedComponents:N(c()).optional()});v({date:c(),source:c(),medium:c(),trafficClass:Kc,landingPage:c(),sessions:g(),users:g(),sourceDimension:im});const r3=v({source:c(),sessions:g(),paidSessions:g(),organicSessions:g()}),o3=v({date:c(),sessions:g(),paidSessions:g(),organicSessions:g(),bySource:N(r3)});v({days:N(o3),sources:N(c()),totalSessions:g(),totalPaidSessions:g(),totalOrganicSessions:g()});v({date:c(),source:c(),medium:c(),sessions:g(),users:g(),channelGroup:c()});v({date:c(),sessions:g(),organicSessions:g(),users:g(),usersSource:$(["deduplicated","landing-page-sum"])});function Ec(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}v({id:c(),projectId:c(),runId:c().nullable(),overallCitedRate:g(),overallMentionRate:g(),totalPairs:g().int().nonnegative(),citedPairs:g().int().nonnegative(),mentionedPairs:g().int().nonnegative(),providerBreakdown:Ke(c(),v({citedRate:g(),mentionRate:g(),cited:g().int().nonnegative(),mentioned:g().int().nonnegative(),total:g().int().nonnegative()})),createdAt:c(),status:$(["ready","no-data"]),reason:ke("no-runs-yet").optional()});const ZS=$(["claude","openai","gemini","zai","deepinfra"]),l3=v({id:ZS,label:c(),defaultModel:c(),configured:ee(),keySource:$(["config","env"]).nullable()});v({providers:N(l3).default([]),defaultProvider:ZS.nullable()});const c3=$(["aero","user","compaction"]);c3.enum;const YS=128;v({key:c().min(1).max(YS),value:c().min(1)});v({key:c().min(1).max(YS)});const dr=$(["commoncrawl","bing-webmaster"]);dr.enum;const sm=$(["queued","downloading","querying","ready","failed"]);sm.enum;v({id:c(),release:c(),status:sm,phaseDetail:c().nullable().optional(),vertexPath:c().nullable().optional(),edgesPath:c().nullable().optional(),vertexSha256:c().nullable().optional(),edgesSha256:c().nullable().optional(),vertexBytes:g().int().nullable().optional(),edgesBytes:g().int().nullable().optional(),projectsProcessed:g().int().nullable().optional(),domainsDiscovered:g().int().nullable().optional(),downloadStartedAt:c().nullable().optional(),downloadFinishedAt:c().nullable().optional(),queryStartedAt:c().nullable().optional(),queryFinishedAt:c().nullable().optional(),error:c().nullable().optional(),createdAt:c(),updatedAt:c()});const u3=v({linkingDomain:c(),numHosts:g().int(),source:dr}),d3=v({projectId:c(),release:c(),targetDomain:c(),totalLinkingDomains:g().int(),totalHosts:g().int(),top10HostsShare:c(),queriedAt:c(),source:dr,excludedLinkingDomains:g().int().optional(),excludedHosts:g().int().optional()});v({source:dr,summary:d3.nullable(),total:g().int(),rows:N(u3)});v({release:c(),totalLinkingDomains:g().int(),totalHosts:g().int(),top10HostsShare:c(),queriedAt:c(),source:dr});const f3=v({source:dr,connected:ee(),hasData:ee(),latestRelease:c().nullable(),totalLinkingDomains:g().int(),lastSyncedAt:c().nullable()});v({projectId:c(),targetDomain:c(),sources:N(f3),anyConnected:ee(),anyData:ee()});v({duckdbInstalled:ee(),duckdbVersion:c().nullable().optional(),duckdbSpec:c(),pluginDir:c()});v({installed:ee(),version:c(),path:c(),alreadyPresent:ee()});v({release:c(),vertexUrl:c(),edgesUrl:c(),vertexBytes:g().int().nullable(),edgesBytes:g().int().nullable(),lastModified:c().nullable()});v({release:c(),syncStatus:sm.nullable(),bytes:g().int(),lastUsedAt:c().nullable()});const rm=$(["positive","caution","negative","neutral"]),ni=v({label:c(),value:c(),delta:c(),tone:rm,description:c(),tooltip:c().optional(),trend:N(g()),progress:g().optional(),providerCoverage:c().optional()}),p3=ni.extend({breakdown:v({projectMentionSnapshots:g().int().nonnegative(),competitorMentionSnapshots:g().int().nonnegative(),perCompetitor:N(v({domain:c(),mentionSnapshots:g().int().nonnegative(),shareOfCompetitiveTotal:g()})),snapshotsWithAnswerText:g().int().nonnegative(),snapshotsTotal:g().int().nonnegative()})}),If=v({gained:g().int().nonnegative(),lost:g().int().nonnegative(),tone:rm,hasPreviousRun:ee(),gainedQueries:N(c()).optional(),lostQueries:N(c()).optional()}),m3=v({hasPreviousRun:ee(),comparable:ee(),querySetChanged:ee(),previousRunAt:c().nullable(),currentQueryCount:g().int().nonnegative(),previousQueryCount:g().int().nonnegative(),comparableQueryCount:g().int().nonnegative(),addedQueryCount:g().int().nonnegative(),removedQueryCount:g().int().nonnegative(),addedQueries:N(c()),removedQueries:N(c())}),h3=v({id:c(),projectId:c(),runId:c().nullable(),type:$(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:$(["critical","high","medium","low"]),title:c(),query:c(),provider:c(),recommendation:v({action:c(),target:c().optional(),reason:c()}).optional(),cause:v({cause:c(),competitorDomain:c().optional(),details:c().optional()}).optional(),dismissed:ee(),createdAt:c()}),g3=v({id:c(),projectId:c(),runId:c().nullable(),overallCitedRate:g(),overallMentionRate:g(),totalPairs:g().int().nonnegative(),citedPairs:g().int().nonnegative(),mentionedPairs:g().int().nonnegative(),providerBreakdown:Ke(c(),v({citedRate:g(),mentionRate:g(),cited:g().int().nonnegative(),mentioned:g().int().nonnegative(),total:g().int().nonnegative()})),createdAt:c(),status:$(["ready","no-data"]),reason:ke("no-runs-yet").optional()});v({project:XD,latestRun:aR,health:g3.nullable(),topInsights:N(h3),queryCounts:v({totalQueries:g().int().nonnegative(),citedQueries:g().int().nonnegative(),notCitedQueries:g().int().nonnegative(),citedRate:g(),mentionedQueries:g().int().nonnegative(),notMentionedQueries:g().int().nonnegative(),mentionRate:g()}),providers:N(v({provider:c(),citedRate:g(),cited:g().int().nonnegative(),total:g().int().nonnegative()})),transitions:v({since:c().nullable(),gained:g().int().nonnegative(),lost:g().int().nonnegative(),emerging:g().int().nonnegative()}),scores:v({mention:ni,visibility:ni,mentionShare:p3,gapQueries:ni,mentionGaps:ni,indexCoverage:ni,competitorPressure:ni,runStatus:ni}),movementSummary:If,citationMovement:If,mentionMovement:If,movementComparison:m3,competitors:N(v({id:c(),domain:c(),citationCount:g().int().nonnegative(),totalQueries:g().int().nonnegative(),pressureLabel:$(["None","Low","Moderate","High"]),citedQueries:N(c())})),providerScores:N(v({provider:c(),model:c().nullable(),score:g(),cited:g().int().nonnegative(),total:g().int().nonnegative(),trend:N(g()).optional()})),attentionItems:N(v({id:c(),tone:rm,title:c(),detail:c(),actionLabel:c(),href:c()})),runHistory:N(v({runId:c(),createdAt:c(),citedCount:g().int().nonnegative(),totalCount:g().int().nonnegative(),citationRate:g(),mentionedCount:g().int().nonnegative(),mentionRate:g(),status:c()})),suggestedQueries:v({rows:N(v({query:c(),impressions:g(),clicks:g(),avgPosition:g(),reason:c()})),totalCandidates:g().int().nonnegative(),skippedAlreadyTracked:g().int().nonnegative()}),dateRangeLabel:c(),contextLabel:c()});$(["snapshot","insight"]);const y3=v({kind:ke("snapshot"),id:c(),runId:c(),query:c(),provider:c(),model:c().nullable(),citationState:Na,matchedField:$(["answerText","citedDomains","searchQueries","query"]),snippet:c(),createdAt:c()}),b3=v({kind:ke("insight"),id:c(),runId:c().nullable(),type:$(["regression","gain","opportunity","first-citation","provider-pickup","persistent-gap","competitor-gained","competitor-lost","gbp-lodging-gap","gbp-listing-discrepancy","gbp-cta-gap","gbp-description-missing","gbp-metric-drop","gbp-keyword-drop"]),severity:$(["critical","high","medium","low"]),title:c(),query:c(),provider:c(),matchedField:$(["title","query","recommendation","cause"]),snippet:c(),dismissed:ee(),createdAt:c()}),v3=To("kind",[y3,b3]);v({query:c(),totalHits:g().int().nonnegative(),truncated:ee(),hits:N(v3)});const FS=$(["create","expand","refresh","add-schema"]);FS.enum;function B$(e){switch(e){case"create":return"Create";case"expand":return"Expand";case"refresh":return"Refresh";case"add-schema":return"Add schema"}}const XS=$(["gsc","competitor-evidence","both"]);XS.enum;const JS=$(["high","medium","low"]);JS.enum;const S3=$(["blog-post","comparison","listicle","how-to","guide","glossary"]);S3.enum;const WS=$(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);WS.enum;const om=$(["ownable","ceded"]);om.enum;const x3=v({url:c(),gscImpressions:g().nonnegative(),gscClicks:g().nonnegative(),gscAvgPosition:g().nonnegative().nullable(),organicSessions:g().nonnegative()}),w3=v({domain:c(),url:c(),title:c(),citationCount:g().int().nonnegative()}),j3=v({demand:g(),competitor:g(),absence:g(),gapSeverity:g()}),N3=v({actionId:c(),state:WS,lastUpdated:c()}),e1=v({targetRef:c(),query:c(),action:FS,ourBestPage:x3.nullable(),winningCompetitor:w3.nullable(),score:g(),scoreBreakdown:j3,drivers:N(c()),demandSource:XS,actionConfidence:JS,existingAction:N3.nullable(),winnabilityClass:om,winnability:g().min(0).max(1).nullable()});v({targets:N(e1),contextMetrics:v({totalAiReferralSessions:g().int().nonnegative(),latestRunId:c(),runTimestamp:c()})});const A3=v({targetRef:c(),addressedUrl:c().nullable(),note:c().nullable(),dismissedAt:c()});v({dismissals:N(A3)});v({targetRef:c().min(1),addressedUrl:c().url().optional(),note:c().max(500).optional()});v({targetRef:c(),promptVersion:c(),provider:c(),model:c(),responseText:c(),costMillicents:g().int().nonnegative(),generatedAt:c()});v({provider:c().optional(),model:c().optional(),forceRefresh:ee().optional()});const k3=v({targetQuery:c().trim().min(1),winnabilityClass:om,angle:c().trim().min(1),whyWinnable:c().trim().min(1),schemaHookup:c().trim().min(1),controllableSurfaceRationale:c().trim().min(1)});v({targetRef:c(),promptVersion:c(),provider:c(),model:c(),brief:k3,costMillicents:g().int().nonnegative(),generatedAt:c()});const C3=v({domain:c(),competitorType:Gc,hits:g().int().nonnegative(),updatedAt:c()});v({classifications:N(C3)});const _3=v({uri:c(),title:c(),domain:c(),isOurDomain:ee(),isCompetitor:ee(),citationCount:g().int().nonnegative(),providers:N(ka)}),t1=v({query:c(),groundingSources:N(_3)});v({sources:N(t1),latestRunId:c()});const n1=v({query:c(),competitorDomains:N(c()),competitorCount:g().int().nonnegative(),missRate:g().min(0).max(1),lastSeenInRunId:c()});v({gaps:N(n1),latestRunId:c()});const a1=$(["ok","warn","fail","skipped"]);a1.enum;const lm=$(["global","project"]);lm.enum;const i1=$(["auth","config","providers","integrations","database","schedules","agent"]);i1.enum;const T3=v({id:c(),category:i1,scope:lm,title:c(),status:a1,code:c().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:c(),remediation:c().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:Ke(c(),Pn()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:g().int().nonnegative().describe("How long the check took to execute.")});v({scope:lm,project:c().nullable().describe('Project name when scope is "project", null otherwise.'),generatedAt:c().describe("ISO-8601 timestamp when this doctor run started."),durationMs:g().int().nonnegative(),summary:v({total:g().int().nonnegative(),ok:g().int().nonnegative(),warn:g().int().nonnegative(),fail:g().int().nonnegative(),skipped:g().int().nonnegative()}),checks:N(T3)});const E3=v({provider:c(),citationState:Na,cited:ee(),mentioned:ee(),runId:c(),runCreatedAt:c()}),O3=v({queryId:c(),query:c(),providers:N(E3),citedCount:g().int().nonnegative(),mentionedCount:g().int().nonnegative(),totalProviders:g().int().nonnegative()}),D3=v({queryId:c(),query:c(),provider:c(),citingCompetitors:N(c()),runId:c(),runCreatedAt:c()}),z3=v({providersConfigured:g().int().nonnegative(),providersCiting:g().int().nonnegative(),providersMentioning:g().int().nonnegative(),totalQueries:g().int().nonnegative(),queriesCitedAndMentioned:g().int().nonnegative(),queriesCitedOnly:g().int().nonnegative(),queriesMentionedOnly:g().int().nonnegative(),queriesInvisible:g().int().nonnegative(),latestRunId:c().nullable(),latestRunAt:c().nullable()});v({summary:z3,byQuery:N(O3),competitorGaps:N(D3),status:$(["ready","no-data"]),reason:$(["no-runs-yet","no-queries"]).optional()});const L$=[7,14,30,90],q$=30;Kt([ke(7),ke(14),ke(30),ke(90)]).describe("Report window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const R3=$(["prompt","request-param","browser-geo","ignored"]),M3=v({label:c(),city:c(),region:c(),country:c(),otherConfiguredLabels:N(c())}),B3=v({provider:c(),treatment:R3,description:c()}),L3=v({generatedAt:c(),project:v({id:c(),name:c(),displayName:c(),canonicalDomain:c(),country:c(),language:c()}),location:M3.nullable(),providerLocationHandling:N(B3),periodStart:c().nullable(),periodEnd:c().nullable(),periodDays:g().int().positive()}),q3=v({citationRate:g(),citedQueryCount:g(),totalQueryCount:g(),mentionRate:g(),mentionedQueryCount:g(),trend:$(["up","down","flat","unknown"]),queryCount:g(),competitorCount:g(),providerCount:g(),gsc:v({clicks:g(),impressions:g(),ctr:g(),avgPosition:g(),periodStart:c(),periodEnd:c()}).nullable(),ga:v({sessions:g(),users:g(),periodStart:c(),periodEnd:c()}).nullable(),findings:N(v({title:c(),detail:c(),tone:$(["positive","caution","negative","neutral"])}))}),U3=v({citationState:$(["cited","not-cited","pending"]),answerMentioned:ee().nullable(),model:c().nullable()}),$3=v({queries:N(c()),providers:N(c()),matrix:N(N(U3.nullable())),providerRates:N(v({provider:c(),citedCount:g(),mentionedCount:g(),totalCount:g(),citationRate:g(),mentionRate:g()}))}),I3=v({domain:c(),citationCount:g(),totalCount:g(),pressureLabel:$(["High","Moderate","Low","None"]),citedQueries:N(c()),sharePct:g(),theirCitedPages:N(v({url:c(),citedFor:N(c())}))}),P3=v({projectCitationCount:g(),competitors:N(I3)}),V3=v({domain:c(),mentionCount:g(),totalCount:g(),pressureLabel:$(["High","Moderate","Low","None"]),mentionedQueries:N(c()),sharePct:g()}),G3=v({projectMentionCount:g(),totalAnswerSnapshots:g(),competitors:N(V3)}),H3=v({category:c(),label:c(),count:g(),sharePct:g()}),K3=v({categories:N(H3),topDomains:N(v({domain:c(),count:g(),isCompetitor:ee()}))}),Q3=v({query:c(),clicks:g(),impressions:g(),ctr:g(),avgPosition:g(),category:$(["brand","lead-gen","industry","other"])}),Z3=v({periodStart:c(),periodEnd:c(),totalClicks:g(),totalImpressions:g(),ctr:g(),avgPosition:g(),topQueries:N(Q3),categoryBreakdown:N(v({category:$(["brand","lead-gen","industry","other"]),clicks:g(),impressions:g(),sharePct:g()})),trend:N(v({date:c(),clicks:g(),impressions:g()})),trackedButNoGsc:N(c()),gscButNotTracked:N(c())}),Y3=v({totalSessions:g(),totalUsers:g(),totalOrganicSessions:g(),periodStart:c(),periodEnd:c(),topLandingPages:N(v({page:c(),sessions:g(),users:g(),organicSessions:g()})),channelBreakdown:N(v({channel:c(),sessions:g(),sharePct:g()}))}),F3=v({totalSessions:g(),organicSessions:g(),paidSessions:g(),channels:N(v({channelGroup:c(),sessions:g(),sharePct:g()})),topCampaigns:N(v({source:c(),medium:c(),sessions:g()}))}),X3=v({totalSessions:g(),paidSessions:g(),organicSessions:g(),totalUsers:g().optional(),paidUsers:g().optional(),organicUsers:g().optional(),bySource:N(v({source:c(),sessions:g(),users:g().optional(),paidSessions:g(),organicSessions:g(),sharePct:g()})),trend:N(v({date:c(),sessions:g()})),topLandingPages:N(v({page:c(),sessions:g(),users:g().optional()}))}),J3=v({windowStart:c(),windowEnd:c(),hasData:ee(),verifiedCrawlerHits:v({current:g(),prior:g(),deltaPct:g().nullable()}),unverifiedCrawlerHits:v({current:g(),prior:g(),deltaPct:g().nullable()}),aiUserFetchHits:v({current:g(),prior:g(),deltaPct:g().nullable()}),referralArrivals:v({current:g(),prior:g(),deltaPct:g().nullable()}),referralArrivalsByClass:v({paid:v({current:g(),prior:g(),deltaPct:g().nullable()}),organic:v({current:g(),prior:g(),deltaPct:g().nullable()}),unclassified:v({current:g(),prior:g(),deltaPct:g().nullable()})}),referralArrivalsClassSummary:c(),byOperator:N(v({operator:c(),verifiedHits:g(),unverifiedHits:g(),userFetchHits:g(),referralArrivals:g(),deltaPct:g().nullable()})),topCrawledPaths:N(v({path:c(),verifiedHits:g(),distinctOperators:g()})),referralProducts:N(v({product:c(),arrivals:g(),distinctLandingPaths:g()})),dailyTrend:N(v({date:c(),verifiedCrawlerHits:g(),userFetchHits:g(),referralArrivals:g()})),topReferralLandingPaths:N(v({path:c(),arrivals:g(),distinctProducts:g()}))}),W3=v({provider:$(["google","bing"]).nullable(),total:g(),indexed:g(),notIndexed:g(),deindexed:g(),unknown:g(),indexedPct:g()}),e4=v({runId:c(),date:c(),citationRate:g(),citedQueryCount:g(),totalQueryCount:g(),mentionRate:g(),mentionedQueryCount:g(),providerRates:N(v({provider:c(),citationRate:g(),mentionRate:g()}))}),mp=v({id:c(),type:$(["regression","gain","opportunity"]),severity:$(["critical","high","medium","low"]),title:c(),query:c(),provider:c(),recommendation:c().nullable(),createdAt:c(),instanceCount:g()}),t4=v({horizon:$(["immediate","short-term","medium-term"]),title:c(),rationale:c()}),qs=v({current:g(),prior:g(),deltaAbs:g(),deltaPct:g().nullable(),direction:$(["up","down","flat"]),window:g().optional()}),n4=v({provider:c(),current:g(),prior:g(),deltaAbs:g(),direction:$(["up","down","flat"])}),a4=v({enoughHistory:ee(),headline:c(),citationRate:qs.nullable(),mentionRate:qs.nullable(),citedQueryCount:qs.nullable(),mentionedQueryCount:qs.nullable(),gscClicksDelta:qs.nullable(),aiReferralsDelta:qs.nullable(),comparisonWindowDays:g().int().positive(),providerMovements:N(n4),wins:N(mp),regressions:N(mp)});$(["agency","client"]);const i4=$(["agency","client","both"]),s4=$(["immediate","short-term","medium-term"]),r4=$(["high","medium","low"]);$(["positive","caution","negative","neutral"]);const o4=$(["content","competitors","provider","search-demand","indexing","location","monitoring"]),cm=v({audience:i4,priority:g(),horizon:s4,category:o4,title:c(),action:c(),why:N(c()),evidence:N(c()),successMetric:c(),confidence:r4,targetRef:c().optional()}),l4=v({headline:c(),overview:c(),actionItems:N(cm),confidenceNotes:N(c())}),c4=v({title:c(),detail:c(),severity:$(["positive","caution","negative","neutral"]),evidence:N(c())}),u4=v({priorities:N(cm),diagnostics:N(c4)});function U$(e){return e.horizon==="immediate"?"negative":e.confidence==="high"?"caution":e.confidence==="low"?"neutral":"caution"}function $$(e){switch(e){case"critical":return"Critical";case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}function I$(e){switch(e){case"immediate":return"Immediate";case"short-term":return"Short term";case"medium-term":return"Medium term"}}function P$(e){switch(e){case"content":return"Content";case"competitors":return"Competitors";case"provider":return"Provider";case"search-demand":return"Search demand";case"indexing":return"Indexing";case"location":return"Location";case"monitoring":return"Monitoring"}}function V$(e){switch(e){case"high":return"High";case"medium":return"Medium";case"low":return"Low"}}v({meta:L3,executiveSummary:q3,citationScorecard:$3,competitorLandscape:P3,mentionLandscape:G3,aiSourceOrigin:K3,gsc:Z3.nullable(),ga:Y3.nullable(),socialReferrals:F3.nullable(),aiReferrals:X3.nullable(),serverActivity:J3.nullable(),indexingHealth:W3.nullable(),citationsTrend:N(e4),whatsChanged:a4,insights:N(mp),recommendedNextSteps:N(t4),actionPlan:N(cm),clientSummary:l4,agencyDiagnostics:u4,contentOpportunities:N(e1),contentGaps:N(n1),groundingSources:N(t1)});const d4=Kt([ke(60),ke(90)]),f4=$(["earliest","middle","prior","latest"]),Is=v({clicks:g().int().nonnegative(),impressions:g().int().nonnegative()}),s1=v({name:f4,startDate:c(),endDate:c()}),p4=s1.extend({totals:Is}),m4=s1.extend({organicSessions:g().int().nonnegative()}),Pf=v({startDate:c(),endDate:c(),observedDays:g().int().nonnegative()}),lc=v({verified:g().int().nonnegative(),claimedUnverified:g().int().nonnegative(),unknownAiLike:g().int().nonnegative()}),Rv=v({total:g().int().nonnegative(),paid:g().int().nonnegative(),organic:g().int().nonnegative(),unknown:g().int().nonnegative()});v({contractVersion:ke("organic-evidence/v1"),periodDays:d4,asOfDate:c().nullable(),coverage:v({gsc:ee(),ga4:ee(),server:ee(),visibility:ee()}),sourceCoverage:v({gsc:Pf.nullable(),ga4:Pf.nullable(),server:Pf.nullable(),visibility:v({completedAt:c(),ageDays:g().nonnegative()}).nullable()}),gsc:v({propertyTotals:Is,namedBrand:Is,namedNonBrand:Is,suppressedOrUnreportedResidual:Is,cohorts:N(p4)}).nullable(),ga4:v({organicSessions:g().int().nonnegative(),cohorts:N(m4)}).nullable(),gaAiReferrals:v({paidSessions:g().int().nonnegative(),organicSessions:g().int().nonnegative()}).nullable(),server:v({crawlerHits:lc,userFetchHits:lc,referralSessions:Rv}).nullable(),visibility:v({runId:c(),completedAt:c(),ageDays:g().nonnegative(),answerPairs:g().int().nonnegative(),mentionedPairs:g().int().nonnegative(),citedPairs:g().int().nonnegative()}).nullable(),measurement:ZD,pages:N(v({path:c(),gsc:Is,ga4OrganicSessions:g().int().nonnegative(),server:v({crawlerHits:lc,userFetchHits:lc,referralSessions:Rv})})),findings:N(v({tone:$(["positive","caution","neutral"]),title:c(),detail:c()})),limitations:N(v({code:c(),detail:c()}))});const h4=$(["claude","codex"]);h4.enum;const g4=$(["claude","codex","all"]);g4.enum;const r1=v({content:g().int().nonnegative(),sitemap:g().int().nonnegative(),robots:g().int().nonnegative(),asset:g().int().nonnegative(),other:g().int().nonnegative()}),y4=$(["content","sitemap","robots","asset","other"]),um=$(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);um.enum;const b4=$(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);b4.enum;const v4=$(["raw-request","aggregate-bucket"]),S4=v4.enum,x4=$(["observed","provider-aggregated","inferred"]),w4=x4.enum,j4=v({type:c().nullable(),labels:Ke(c(),c())}),N4=v({sourceType:um,evidenceKind:ke(S4["raw-request"]),confidence:ke(w4.observed),eventId:c().min(1),observedAt:c().min(1),method:c().nullable(),requestUrl:c().nullable(),host:c().nullable(),path:c().min(1),queryString:c().nullable(),status:g().int().nullable(),userAgent:c().nullable(),remoteIp:c().nullable(),referer:c().nullable(),latencyMs:g().nullable(),requestSizeBytes:g().int().nullable(),responseSizeBytes:g().int().nullable(),providerResource:j4,providerLabels:Ke(c(),c())});v({events:N(N4),rawEntryCount:g().int().nonnegative(),skippedEntryCount:g().int().nonnegative(),nextPageToken:c().optional(),filter:c()});const o1=$(["connected","paused","error","archived"]),G$=o1.enum,l1=$(["oauth","service-account"]);l1.enum;const A4=$(["verified","claimed_unverified","unknown_ai_like"]),H$=A4.enum;v({gcpProjectId:c().min(1),serviceName:c().nullable().optional(),location:c().nullable().optional(),authMode:l1});v({baseUrl:c().url(),username:c().min(1)});const dm=$(["production","preview"]);dm.enum;v({projectId:c().min(1),teamId:c().min(1),environment:dm});const c1=v({id:c(),projectId:c(),sourceType:um,displayName:c(),status:o1,lastSyncedAt:c().nullable(),lastCursor:c().nullable(),lastError:c().nullable(),archivedAt:c().nullable(),config:Ke(c(),Pn()),createdAt:c(),updatedAt:c()});v({gcpProjectId:c().min(1),serviceName:c().min(1).optional(),location:c().min(1).optional(),displayName:c().min(1).optional(),keyJson:c().optional()});v({baseUrl:c().url(),username:c().min(1),applicationPassword:c().min(1),displayName:c().min(1).optional()});v({projectId:c().min(1),teamId:c().min(1),token:c().min(1),environment:dm.optional(),displayName:c().min(1).optional()});v({sourceId:c(),runId:c(),syncedAt:c(),pulledEvents:g().int().nonnegative(),selfTrafficExcluded:g().int().nonnegative(),crawlerHits:g().int().nonnegative(),aiUserFetchHits:g().int().nonnegative(),aiReferralHits:g().int().nonnegative(),unknownHits:g().int().nonnegative(),crawlerBucketRows:g().int().nonnegative(),aiUserFetchBucketRows:g().int().nonnegative(),aiReferralBucketRows:g().int().nonnegative(),sampleRows:g().int().nonnegative(),windowStart:c(),windowEnd:c()});v({days:g().int().positive().optional()});v({advanceToNow:ke(!0)});v({sourceId:c(),runId:c(),status:ui,windowStart:c(),windowEnd:c(),daysRequested:g().int().positive(),daysApplied:g().int().positive()});const k4=v({crawlerHits:g().int().nonnegative(),crawlerContentHits:g().int().nonnegative(),crawlerInfraHits:g().int().nonnegative(),crawlerSegments:r1,aiUserFetchHits:g().int().nonnegative(),aiReferralHits:g().int().nonnegative(),sampleCount:g().int().nonnegative()});v({sources:N(c1)});const C4=c1.extend({totals24h:k4,latestRun:v({runId:c(),status:ui,startedAt:c().nullable(),finishedAt:c().nullable(),error:c().nullable()}).nullable()});v({sources:N(C4)});const _4=$(["crawler","ai-user-fetch","ai-referral"]),fm=_4.enum,u1=$(["hour","day"]);u1.enum;const T4=v({bucket:c(),crawlerHits:g().int().nonnegative(),aiUserFetchHits:g().int().nonnegative(),aiReferralHits:g().int().nonnegative()}),E4=v({kind:ke(fm.crawler),sourceId:c(),tsHour:c(),botId:c(),operator:c(),verificationStatus:c(),pathNormalized:c(),pathClass:y4,status:g().int(),hits:g().int().nonnegative()}),O4=v({kind:ke(fm["ai-user-fetch"]),sourceId:c(),tsHour:c(),botId:c(),operator:c(),verificationStatus:c(),pathNormalized:c(),status:g().int(),hits:g().int().nonnegative()}),D4=v({kind:ke(fm["ai-referral"]),sourceId:c(),tsHour:c(),product:c(),operator:c(),sourceDomain:c(),evidenceType:c(),landingPathNormalized:c(),status:g().int(),hits:g().int().nonnegative(),paidHits:g().int().nonnegative(),organicHits:g().int().nonnegative(),unknownHits:g().int().nonnegative()}),z4=To("kind",[E4,O4,D4]);v({windowStart:c(),windowEnd:c(),series:v({granularity:u1,points:N(T4)}),totals:v({crawlerHits:g().int().nonnegative(),crawlerContentHits:g().int().nonnegative(),crawlerInfraHits:g().int().nonnegative(),crawlerSegments:r1,aiUserFetchHits:g().int().nonnegative(),aiReferralHits:g().int().nonnegative(),aiReferralPaidHits:g().int().nonnegative(),aiReferralOrganicHits:g().int().nonnegative(),aiReferralUnknownHits:g().int().nonnegative()}),eventRows:v({total:g().int().nonnegative(),returned:g().int().nonnegative(),truncated:ee()}),events:N(z4)});const d1=$(["queued","running","completed","partial","failed"]),K$=d1.enum,f1=$(["queued","running","completed","failed"]),Q$=f1.enum;v({queries:N(c().trim().min(1).max(4e3)).min(1).max(50),provider:c().trim().min(1).optional(),model:c().trim().min(1).max(200).optional(),location:cr.nullable().optional(),idempotencyKey:c().trim().min(1).max(128).optional()}).superRefine((e,n)=>{e.model&&!e.provider&&n.addIssue({code:qD.custom,path:["provider"],message:"provider is required when model is supplied"})});const p1=v({id:c(),projectId:c(),status:d1,provider:c(),requestedModel:c().nullable(),resolvedModel:c(),location:cr.nullable(),totalQueries:g().int(),completedQueries:g().int(),failedQueries:g().int(),error:c().nullable(),startedAt:c().nullable(),finishedAt:c().nullable(),createdAt:c()}),R4=v({id:c(),position:g().int(),query:c(),status:f1,requestedModel:c().nullable(),resolvedModel:c(),servedModel:c().nullable(),answerText:c().nullable(),groundingSources:N(Vc),citedDomains:N(c()),searchQueries:N(c()),namedCompetitors:N(c()).default([]),citedCompetitorDomains:N(c()).default([]),answerMentioned:ee().nullable(),citationState:Na.nullable(),error:c().nullable(),startedAt:c().nullable(),finishedAt:c().nullable(),createdAt:c()});p1.extend({queries:N(R4)});v({runs:N(p1)});v({apiKey:c().min(1)});v({id:c(),name:c(),status:c(),currencyCode:c().nullable(),timezone:c().nullable(),url:c().nullable(),reviewStatus:c().nullable(),integrityReviewStatus:c().nullable(),integrityDecision:c().nullable()});v({q:c().trim().min(1).max(200),limit:g().int().min(1).max(100).default(20)});const M4=v({id:c(),type:c(),canonicalName:c(),countryCode:c(),name:c(),regionCode:c().nullable()});v({count:g().int().nonnegative(),query:c(),results:N(M4)});const B4=v({id:c(),clientType:c().optional(),name:c().optional(),pixelId:c().optional()});v({pixels:N(B4)});const L4=v({id:c(),name:c().optional()}),q4=v({id:c(),name:c().optional(),eventType:c().optional(),customEventName:c().nullable().optional(),attributionWindowDays:g().int().positive().optional(),adAccountId:c().optional(),sourceIds:N(c()).optional(),sources:N(L4).optional(),archived:ee().optional(),version:g().int().nonnegative().optional()});v({eventSettings:N(q4)});v({connected:ee(),adAccountId:c().nullable().optional(),displayName:c().nullable().optional(),currencyCode:c().nullable().optional(),timezone:c().nullable().optional(),status:c().nullable().optional(),reviewStatus:c().nullable().optional(),integrityReviewStatus:c().nullable().optional(),integrityDecision:c().nullable().optional(),lastSyncedAt:c().nullable().optional(),conversionTrackingConfigured:ee().optional()});v({disconnected:ee()});v({runId:c(),status:c()});const U4=v({type:c().nullable().optional(),title:c().nullable().optional(),body:c().nullable().optional(),targetUrl:c().nullable().optional(),fileId:c().nullable().optional()}),Eo=$(["impressions","clicks"]),$4=Eo.enum,Oo=$(["impression","click"]);Oo.enum;const I4=v({id:c(),adGroupId:c(),name:c(),status:c(),reviewStatus:c().nullable().optional(),creative:U4.nullable().optional(),upstreamUpdatedAt:g().int().nullable().optional(),syncedAt:c().optional()}),P4=v({id:c(),campaignId:c(),name:c(),description:c().nullable().optional(),status:c(),billingEventType:Kt([Oo,Ee()]).optional(),maxBidMicros:g().int().nullable().optional(),contextHints:N(c()).default([]),ads:N(I4).default([]),upstreamUpdatedAt:g().int().nullable().optional(),syncedAt:c().optional()}),V4=v({id:c(),name:c(),description:c().nullable().optional(),status:c(),startTime:g().int().nullable().optional(),endTime:g().int().nullable().optional(),biddingType:Kt([Eo,Ee()]).optional(),dailySpendLimitMicros:g().int().nullable().optional(),lifetimeSpendLimitMicros:g().int().nullable().optional(),conversionEventSettingIds:N(c()).default([]),locationIds:N(c()).optional(),adGroups:N(P4).default([]),upstreamUpdatedAt:g().int().nullable().optional(),syncedAt:c().optional()});v({campaigns:N(V4)});const m1=$(["campaign","ad_group"]);m1.enum;const G4=v({level:m1,entityId:c(),date:c(),impressions:g().int(),clicks:g().int(),spendMicros:g().int(),conversions:g().int(),ctr:g().nullable(),cpcMicros:g().int().nullable(),inProgress:ee()});v({rows:N(G4),currencyCode:c().nullable().optional()});const h1=v({from:c().nullable(),to:c().nullable(),inProgressDate:c().nullable()}),g1=v({impressions:g().int(),clicks:g().int(),spendMicros:g().int(),conversions:g().int(),ctr:g().nullable(),cpcMicros:g().int().nullable()});v({connected:ee(),displayName:c().nullable().optional(),currencyCode:c().nullable().optional(),lastSyncedAt:c().nullable().optional(),campaignCount:g().int(),adGroupCount:g().int(),adCount:g().int(),window:h1,totals:g1});const y1=$(["unavailable","partial","complete"]);y1.enum;const b1=$(["no_ads_connection","connection_not_synced","no_ads_sync","entity_rows_missing_sync_run_id","entity_rows_span_multiple_sync_runs","source_sync_missing","source_sync_not_ads_sync","source_sync_not_completed"]);b1.enum;const v1=$(["unavailable","reported"]);v1.enum;const H4={storedSnapshot:"stored_ads_snapshot"},S1=$(["unavailable","partial_snapshot","metrics_unavailable","observed_activity","no_observed_activity"]);S1.enum;const K4=v({id:c(),name:c(),status:c(),reviewStatus:c().nullable()}),Q4=v({id:c(),name:c(),status:c(),billingEventType:Kt([Oo,Ee()]),maxBidMicros:g().int().nullable(),contextHints:N(c()),ads:N(K4)}),Z4=v({id:c(),name:c(),status:c(),biddingType:Kt([Eo,Ee()]),dailySpendLimitMicros:g().int().nullable(),lifetimeSpendLimitMicros:g().int().nullable(),conversionEventSettingIds:N(c()),adGroups:N(Q4)});v({snapshot:v({status:y1,issue:Kt([b1,Ee()]),lastSyncedAt:c().nullable(),campaignCount:g().int().nonnegative(),adGroupCount:g().int().nonnegative(),adCount:g().int().nonnegative(),sourceSync:v({runId:c(),status:ui}).nullable()}),historicalCampaignRollups:v({status:v1,window:h1,totals:g1.nullable()}),storedConfiguration:v({basis:ke(H4.storedSnapshot),connection:v({status:c().nullable(),reviewStatus:c().nullable(),integrityReviewStatus:c().nullable(),integrityDecision:c().nullable(),conversionTrackingConfigured:ee()}).nullable(),campaigns:N(Z4)}),assessment:v({state:S1})});const Ca=c().min(8).max(128).regex(/^[\w.:-]+$/,"operationKey may contain letters, numbers, dot, underscore, colon, and hyphen"),ft=c().min(1).max(200),Pi=c().min(3).max(1e3).refine(e=>e.trim().length>0),nr=g().int().min(946684800).max(4102444800),ar=g().int().positive().max(Number.MAX_SAFE_INTEGER),pm=c().regex(/^[a-f0-9]{64}$/),x1=N(ft).max(100).refine(e=>new Set(e).size===e.length,"conversionEventSettingIds must be unique"),w1=c().url().refine(e=>new URL(e).protocol==="https:",{message:"URL must use https"}),j1=$(["image_upload","campaign_create","campaign_update","campaign_pause","campaign_tree_activate","ad_group_create","ad_group_update","ad_group_pause","ad_create","ad_update","ad_pause"]);j1.enum;const N1=$(["pending","reconciling","succeeded","failed","unknown"]),Ys=N1.enum,A1=$(["known_entity","create_fingerprint","manual_only"]);A1.enum;const k1=$([Ys.pending,Ys.unknown,Ys.reconciling]);k1.enum;const C1=$(["active","paused","archived"]);C1.enum;const _1=$(["file","campaign","ad_group","ad"]);_1.enum;const T1=$(["campaign","ad_group","ad"]);T1.enum;const mm=v({id:ft,expectedUpdatedAt:g().int().nonnegative()}).strict(),Y4=mm,Oc=100,F4=mm.extend({ads:N(Y4).min(1).max(Oc-1)}).strict(),X4=mm.extend({adGroups:N(F4).min(1).max(Oc-1)}).strict();function J4(e,n){return e<n?-1:e>n?1:0}function Mv(e,n,i){for(let r=1;r<e.length;r+=1)if(J4(e[r-1].id,e[r].id)>=0){i.addIssue({code:"custom",path:n,message:"Activation manifest entities must be uniquely sorted by id"});return}}const E1=v({campaign:X4}).strict().superRefine((e,n)=>{1+e.campaign.adGroups.reduce((l,u)=>l+1+u.ads.length,0)>Oc&&n.addIssue({code:"custom",path:["campaign"],message:`Activation manifests may contain at most ${Oc} entities`}),Mv(e.campaign.adGroups,["campaign","adGroups"],n);const r=new Set;for(let l=0;l<e.campaign.adGroups.length;l+=1){const u=e.campaign.adGroups[l];Mv(u.ads,["campaign","adGroups",l,"ads"],n);for(let d=0;d<u.ads.length;d+=1){const h=u.ads[d];r.has(h.id)&&n.addIssue({code:"custom",path:["campaign","adGroups",l,"ads",d,"id"],message:"An ad may appear only once in an activation manifest"}),r.add(h.id)}}}),O1=pm,W4=$(["approved","executing","consumed","revoked","expired","unknown"]),wa=W4.enum,eM=$(["pending","executing","active","failed","rollback_executing","rolled_back","rollback_failed","unknown"]),di=eM.enum,tM=v({name:Pi.optional(),description:c().max(4e3).nullable().optional(),status:C1.optional(),startTime:nr.nullable().optional(),endTime:nr.nullable().optional(),lifetimeSpendLimitMicros:ar.min(1e6).optional(),locationIds:N(ft).max(100).optional(),biddingType:Eo.optional(),conversionEventSettingIds:x1.optional(),campaignId:ft.optional(),contextHints:N(c().min(1).max(1e3)).max(100).optional(),maxBidMicros:ar.max(1e8).optional(),billingEventType:Oo.optional(),adGroupId:ft.optional(),creativeFingerprint:pm.optional()}).strict();v({operationKey:Ca,imageUrl:w1});v({operationKey:Ca,name:Pi,description:c().max(4e3).optional(),startTime:nr.optional(),endTime:nr.optional(),lifetimeSpendLimitMicros:ar.min(1e6),locationIds:N(ft).min(1).max(100),biddingType:Eo.optional(),conversionEventSettingIds:x1.optional()}).superRefine((e,n)=>{e.startTime!==void 0&&e.endTime!==void 0&&e.endTime<=e.startTime&&n.addIssue({code:"custom",path:["endTime"],message:"endTime must be after startTime"}),e.biddingType===$4.clicks&&(e.conversionEventSettingIds===void 0||e.conversionEventSettingIds.length===0)&&n.addIssue({code:"custom",path:["conversionEventSettingIds"],message:"conversionEventSettingIds must be non-empty when biddingType is clicks"})});v({operationKey:Ca,campaignId:ft,name:Pi,description:c().max(4e3).optional(),contextHints:N(c().min(1).max(1e3)).min(1).max(100),maxBidMicros:ar.max(1e8),billingEventType:Oo.optional()});const D1=v({title:c().min(3).max(50),body:c().min(1).max(100),targetUrl:w1,fileId:ft});v({operationKey:Ca,adGroupId:ft,name:Pi,creative:D1});function hm(e){return Object.keys(e).some(n=>n!=="operationKey"&&n!=="expectedUpdatedAt")}v({operationKey:Ca,expectedUpdatedAt:g().int().nonnegative(),name:Pi.optional(),description:c().max(4e3).nullable().optional(),startTime:nr.nullable().optional(),endTime:nr.nullable().optional(),lifetimeSpendLimitMicros:ar.min(1e6).optional(),locationIds:N(ft).min(1).max(100).optional()}).refine(hm,{message:"At least one campaign field must be updated"});v({operationKey:Ca,expectedUpdatedAt:g().int().nonnegative(),name:Pi.optional(),description:c().max(4e3).nullable().optional(),contextHints:N(c().min(1).max(1e3)).min(1).max(100).optional(),maxBidMicros:ar.max(1e8).optional()}).refine(hm,{message:"At least one ad group field must be updated"});v({operationKey:Ca,expectedUpdatedAt:g().int().nonnegative(),name:Pi.optional(),creative:D1.optional()}).refine(hm,{message:"At least one ad field must be updated"});v({operationKey:Ca});const Qc=v({id:c(),adAccountId:c().nullable(),operationKey:c(),kind:j1,state:N1,entityType:Kt([_1,Ee()]),entityId:c().nullable(),upstreamUpdatedAt:g().int().nullable(),errorCode:c().nullable(),errorMessage:c().nullable(),reconcileStrategy:Kt([A1,Ee()]),reconcileParentId:ft.nullable(),reconcileFingerprint:pm.nullable(),reconcileFields:tM.nullable(),reconcileAttempts:g().int().nonnegative(),lastReconciledAt:c().nullable(),createdAt:c(),updatedAt:c()});v({operation:Qc,replayed:ee()});const st=jS({offset:!0}),fr={id:ft,projectId:ft,adAccountId:ft,manifestHash:O1,manifest:E1,executorApiKeyId:ft,approverApiKeyId:ft,expiresAt:st,approvedAt:st,createdAt:st,updatedAt:st,revocationRequestedAt:st.nullable()},nM=v({...fr,state:ke(wa.approved),operationId:Ee(),executionStartedAt:Ee(),consumedAt:Ee(),revokedAt:Ee(),expiredAt:Ee()}).strict(),aM=v({...fr,state:ke(wa.executing),operationId:ft,executionStartedAt:st,consumedAt:Ee(),revokedAt:Ee(),expiredAt:Ee()}).strict(),iM=v({...fr,state:ke(wa.consumed),operationId:ft,executionStartedAt:st,consumedAt:st,revokedAt:Ee(),expiredAt:Ee()}).strict(),sM=v({...fr,state:ke(wa.revoked),operationId:Ee(),executionStartedAt:Ee(),consumedAt:Ee(),revokedAt:st,expiredAt:Ee()}).strict(),rM=v({...fr,state:ke(wa.expired),operationId:Ee(),executionStartedAt:Ee(),consumedAt:Ee(),revokedAt:Ee(),expiredAt:st}).strict(),oM=v({...fr,state:ke(wa.unknown),operationId:ft,executionStartedAt:st,consumedAt:Ee(),revokedAt:Ee(),expiredAt:Ee()}).strict(),z1=To("state",[nM,aM,iM,sM,rM,oM]).superRefine((e,n)=>{e.executorApiKeyId===e.approverApiKeyId&&n.addIssue({code:"custom",path:["executorApiKeyId"],message:"The activation executor must use a different API key from the approver"}),e.revocationRequestedAt!==null&&e.state!==wa.executing&&e.state!==wa.unknown&&e.state!==wa.consumed&&n.addIssue({code:"custom",path:["revocationRequestedAt"],message:"Only an executing, cancelled, or unresolved activation can carry a cancellation request"})}),fi={id:ft,operationId:ft,ordinal:g().int().nonnegative(),entityType:T1,entityId:ft,expectedUpdatedAt:g().int().nonnegative(),createdAt:st,updatedAt:st},Do={errorCode:Ee(),errorMessage:Ee()},gm={errorCode:c().min(1).max(100),errorMessage:c().min(1).max(500),remediation:c().min(1).max(500)},lM=v({...fi,...Do,state:ke(di.pending),providerUpdatedAt:Ee(),remediation:Ee(),startedAt:Ee(),finishedAt:Ee()}).strict(),cM=v({...fi,...Do,state:ke(di.executing),providerUpdatedAt:Ee(),remediation:Ee(),startedAt:st,finishedAt:Ee()}).strict(),uM=v({...fi,...Do,state:ke(di.active),providerUpdatedAt:g().int().nonnegative(),remediation:Ee(),startedAt:st,finishedAt:st}).strict(),dM=v({...fi,...gm,state:ke(di.failed),providerUpdatedAt:Kt([g().int().nonnegative(),Ee()]),startedAt:st,finishedAt:st}).strict(),fM=v({...fi,...Do,state:ke(di.rollback_executing),providerUpdatedAt:g().int().nonnegative(),remediation:c().min(1).max(500),startedAt:st,finishedAt:Ee()}).strict(),pM=v({...fi,...Do,state:ke(di.rolled_back),providerUpdatedAt:g().int().nonnegative(),remediation:c().min(1).max(500),startedAt:st,finishedAt:st}).strict(),mM=v({...fi,...gm,state:ke(di.rollback_failed),providerUpdatedAt:g().int().nonnegative(),startedAt:st,finishedAt:st}).strict(),hM=v({...fi,...gm,state:ke(di.unknown),providerUpdatedAt:Kt([g().int().nonnegative(),Ee()]),startedAt:st,finishedAt:st}).strict(),gM=To("state",[lM,cM,uM,dM,fM,pM,mM,hM]),hp={exact:"exact",refreshSemanticallyUnchanged:"refresh_semantically_unchanged"},yM=$([hp.exact,hp.refreshSemanticallyUnchanged]);v({manifest:E1,executorApiKeyId:ft,expiresAt:st,versionPolicy:yM.default(hp.exact)}).strict();v({grant:z1}).strict();v({}).strict();v({operationKey:Ca,grantId:ft,manifestHash:O1}).strict();v({grant:z1,operation:Qc,steps:N(gM)}).strict();const bM=[Ys.pending,Ys.unknown,Ys.reconciling];function vM(e){if(e===void 0||e==="")return bM;if(Array.isArray(e)){const n=[];for(const i of e)typeof i=="string"?n.push(...i.split(",")):n.push(i);return n}return typeof e=="string"?e.split(",").filter(Boolean):e}v({state:LD(vM,N(k1).min(1).max(3).refine(e=>new Set(e).size===e.length,"state values must be unique")),limit:ES().int().min(1).max(200).default(100),cursor:c().min(1).max(1e3).optional()});v({operations:N(Qc),count:g().int().nonnegative(),nextCursor:c().nullable()});v({}).strict();v({operation:Qc,resolved:ee()});v({campaignId:c().min(1).max(200).optional(),lookbackDays:ES().int().min(1).max(30).default(7)});const R1=$(["campaign","ad_group","ad"]);R1.enum;const M1=$(["both","live-only","stored-only"]);M1.enum;const SM=ke("live-provider-read"),xM=v({date:c().nullable(),startTime:g().nullable(),endTime:g().nullable(),impressions:g().nullable(),clicks:g().nullable(),spend:g().nullable(),conversions:g().nullable(),ctr:g().nullable(),cpc:g().nullable(),cpm:g().nullable()}),Bv=v({impressions:g().int(),clicks:g().int(),spendMicros:g().int(),conversions:g().int()}),wM=v({date:c(),live:Bv.nullable(),stored:Bv.nullable(),drifted:ee()}),jM=v({field:c(),live:c().nullable(),stored:c().nullable()}),NM=v({name:c().nullable(),status:c(),reviewStatus:c().nullable(),mode:c().nullable(),updatedAt:g().nullable()}),AM=v({name:c(),status:c(),reviewStatus:c().nullable(),upstreamUpdatedAt:g().nullable(),syncedAt:c()}),kM=v({entityType:R1,id:c(),parentId:c().nullable(),presence:M1,live:NM.nullable(),stored:AM.nullable(),fieldDeltas:N(jM),liveMetrics:N(xM).nullable(),metricDeltas:N(wM).nullable(),drifted:ee()}),CM=v({surface:c(),entityId:c().nullable(),upstreamStatus:g().int().nullable()});v({basis:SM,fetchedAt:c(),adAccountId:c(),storedSnapshotSyncedAt:c().nullable(),metricsWindow:v({lookbackDays:g().int().positive()}),bounds:v({maxCampaigns:g().int().positive(),maxAdGroupsPerCampaign:g().int().positive(),maxAdsPerAdGroup:g().int().positive(),maxReaderCalls:g().int().positive(),readerCalls:g().int().nonnegative(),maxPagesPerReaderCall:g().int().positive(),maxUpstreamHttpRequests:g().int().positive(),truncated:ee()}),entities:N(kM),drift:v({entitiesCompared:g().int().nonnegative(),driftedEntities:g().int().nonnegative(),statusDrifted:g().int().nonnegative(),metricsDrifted:g().int().nonnegative()}),errors:N(CM)});var _M=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(_M||{});const Z$={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},Y$={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},F$=Xp;function TM(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[i,r]of Object.entries(e.providers)){const l=`[${i}] ${r.message}`;r.raw!==void 0?n.push(`${l}
|
|
53
|
-
|
|
54
|
-
${JSON.stringify(r.raw,null,2)}`):n.push(l)}return n.length>0?n.join(`
|
|
55
|
-
|
|
56
|
-
`):"Run failed."}function EM(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function X$(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function J$(e){return e===null?"Unknown":e?"Pass":"Fail"}function Lv(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function W$(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function e8(e,n){if(!e)return{freq:"custom",hour:6,customCron:n};if(e==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const i=e.match(/^daily(?:@(\d+))?$/);if(i)return{freq:"daily",hour:i[1]?parseInt(i[1]):6,customCron:""};const r=e.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return r?{freq:r[1],hour:r[2]?parseInt(r[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function t8(e,n,i){const r=i==="UTC"?"UTC":i.split("/").pop()?.replace(/_/g," ")??i;if(!e)return`Custom: ${n} · ${r}`;if(e==="twice-daily")return`Twice a day (6am & 6pm) · ${r}`;const l=e.match(/^daily(?:@(\d+))?$/);if(l){const d=l[1]?parseInt(l[1]):6;return`Every day at ${Lv(d)} · ${r}`}const u=e.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"},h=u[2]?parseInt(u[2]):6;return`Every ${d[u[1]]} at ${Lv(h)} · ${r}`}return`${e} · ${r}`}function OM(e,n){return n&&n!==e?`${e} · ${n}`:e}function n8(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return OM(e,n)}function DM(e){const n=e.replace(/\/+$/,"")||"/";return n==="/"?"overview":n==="/projects"?"projects":n.startsWith("/projects/")?"project":n==="/runs"?"runs":n==="/traffic"||n.startsWith("/traffic/")?"traffic":n==="/backlinks"?"backlinks":n==="/settings"?"settings":n==="/setup"?"setup":"other"}function zM(e,n){return!n||n.includes(e)}function a8(e,n){return zM(e,n)||!n||n.length===0?e:n.includes("overview")?"overview":n[0]}const qv={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},RM=/^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\([0-9.,%\s/]+\)|hsla?\([0-9.,%\s/a-z]+\))$/i,MM=/^[a-z0-9][a-z0-9 -]{0,48}$/i;function B1(e){const n=e?.font?.trim();return n&&MM.test(n)?n:void 0}function BM(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function LM(e){if(!e)return{};const n={};for(const[r,l]of Object.entries(e)){const u=Object.hasOwn(qv,r)?qv[r]:void 0;if(!u||typeof l!="string")continue;const d=l.trim();RM.test(d)&&(n[u]=d)}const i=B1(e);return i&&(n["--font-sans"]=`"${i}", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`),n}function qM(e){const n=B1(e);if(n)return`https://fonts.googleapis.com/css2?family=${n.replace(/ /g,"+")}:wght@400;500;600;700&display=swap`}const Ne=(e,n,i,r)=>{const l={_id:e,baseUrl:n?.baseUrl||(n?.client??K).getConfig().baseUrl};return n?.body&&(l.body=n.body),n?.headers&&(l.headers=n.headers),n?.path&&(l.path=n.path),n?.query&&(l.query=n.query),[l]},UM=e=>Ne("getApiV1ProjectsByName",e),$M=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await z0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UM(e)}),Vi=e=>Ne("getApiV1Projects",e),Zc=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await FN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Vi(e)}),IM=e=>Ne("getApiV1ProjectsByNameResearchRuns",e),i8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await XN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:IM(e)}),s8=e=>({mutationFn:async i=>{const{data:r}=await JN({...e,...i,throwOnError:!0});return r}}),PM=e=>Ne("getApiV1ProjectsByNameResearchRunsByRunId",e),r8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await WN({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:PM(e)}),VM=e=>Ne("getApiV1ProjectsByNameRuns",e),GM=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await R0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:VM(e)}),ym=e=>Ne("getApiV1Runs",e),bm=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:ym(e)}),HM=e=>Ne("getApiV1RunsById",e),L1=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await M0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:HM(e)}),KM=e=>Ne("getApiV1ProjectsByNameHistory",e),o8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await gA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:KM(e)}),QM=e=>Ne("getApiV1History",e),l8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:QM(e)}),ZM=e=>Ne("getApiV1ProjectsByNameSnapshotsDiff",e),c8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await SA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:ZM(e)}),YM=e=>Ne("getApiV1Settings",e),FM=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await B0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:YM(e)}),XM=e=>Ne("getApiV1ProjectsByNameGoogleConnections",e),u8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await zA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:XM(e)}),JM=e=>Ne("getApiV1ProjectsByNameGoogleProperties",e),d8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await BA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:JM(e)}),WM=e=>Ne("getApiV1ProjectsByNameGoogleGscPerformance",e),f8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await $A({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:WM(e)}),eB=e=>Ne("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),p8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await IA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:eB(e)}),tB=e=>Ne("getApiV1ProjectsByNameGoogleGscInspections",e),m8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await VA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:tB(e)}),nB=e=>Ne("getApiV1ProjectsByNameGoogleGscDeindexed",e),h8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await GA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:nB(e)}),aB=e=>Ne("getApiV1ProjectsByNameGoogleGscCoverage",e),g8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await L0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:aB(e)}),iB=e=>Ne("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),y8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await HA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:iB(e)}),b8=e=>Ne("getApiV1ProjectsByNameGoogleGscSitemaps",e),sB=e=>Ne("getApiV1ProjectsByNameGbpLocations",e),v8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await YA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:sB(e)}),S8=e=>({mutationFn:async i=>{const{data:r}=await FA({...e,...i,throwOnError:!0});return r}}),x8=e=>({mutationFn:async i=>{const{data:r}=await XA({...e,...i,throwOnError:!0});return r}}),rB=e=>Ne("getApiV1ProjectsByNameGbpKeywords",e),w8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await JA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:rB(e)}),oB=e=>Ne("getApiV1ProjectsByNameGbpPlaceActions",e),j8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await WA({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:oB(e)}),lB=e=>Ne("getApiV1ProjectsByNameGbpLodging",e),N8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ek({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lB(e)}),cB=e=>Ne("getApiV1ProjectsByNameGbpPlaces",e),A8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:cB(e)}),uB=e=>Ne("getApiV1ProjectsByNameGbpSummary",e),k8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:uB(e)}),dB=e=>Ne("getApiV1ProjectsByNameBingStatus",e),C8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:dB(e)}),fB=e=>Ne("getApiV1ProjectsByNameBingSites",e),_8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:fB(e)}),pB=e=>Ne("getApiV1ProjectsByNameBingCoverage",e),T8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await q0({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:pB(e)}),mB=e=>Ne("getApiV1ProjectsByNameBingInspections",e),E8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:mB(e)}),hB=e=>Ne("getApiV1ProjectsByNameBingPerformance",e),O8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:hB(e)}),gB=e=>Ne("getApiV1ProjectsByNameGaStatus",e),D8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await hk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gB(e)}),yB=e=>Ne("getApiV1ProjectsByNameGaTraffic",e),z8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yB(e)}),bB=e=>Ne("getApiV1ProjectsByNameGaAiReferralDaily",e),R8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:bB(e)}),vB=e=>Ne("getApiV1ProjectsByNameGaSocialReferralHistory",e),M8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vB(e)}),SB=e=>Ne("getApiV1ProjectsByNameGaSessionHistory",e),B8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Sk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SB(e)}),xB=e=>Ne("getApiV1ProjectsByNameReport",e),L8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xB(e)}),wB=e=>Ne("getApiV1ProjectsByNameHealthHistory",e),q8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wB(e)}),jB=e=>Ne("getApiV1ProjectsByNameCitationsVisibility",e),U8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Nk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jB(e)}),NB=e=>Ne("getApiV1ProjectsByNameTrafficSources",e),$8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Kk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NB(e)}),AB=e=>Ne("getApiV1ProjectsByNameTrafficStatus",e),I8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Qk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AB(e)}),kB=e=>Ne("getApiV1ProjectsByNameTrafficSourcesById",e),P8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Zk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kB(e)}),CB=e=>Ne("getApiV1ProjectsByNameTrafficEvents",e),V8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Yk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:CB(e)}),_B=e=>Ne("getApiV1ProjectsByNameDiscoverSessions",e),G8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Xk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_B(e)}),TB=e=>Ne("getApiV1ProjectsByNameDiscoverSessionsById",e),H8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Jk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:TB(e)}),EB=e=>Ne("getApiV1ProjectsByNameDiscoverSessionsByIdPromote",e),K8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Wk({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EB(e)}),OB=e=>Ne("getApiV1ProjectsByNameTechnicalAeo",e),Q8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tC({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OB(e)}),DB=e=>Ne("getApiV1ProjectsByNameTechnicalAeoPages",e),Z8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nC({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DB(e)}),zB=e=>Ne("getApiV1ProjectsByNameTechnicalAeoTrend",e),Y8=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await aC({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zB(e)}),RB=e=>Ne("getApiV1ProjectsByNameAgentProviders",e),MB=e=>Ae({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sC({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RB(e)});function Uv(e){return e.state==="ok"?"positive":e.state==="checking"?"neutral":"negative"}function q1(e){switch(e){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"cancelled":return"caution";case"queued":case"running":return"neutral";default:return"neutral"}}function F8(e){switch(e){case"cited":return"positive";case"emerging":return"caution";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral";default:return"neutral"}}function X8(e){return e==="High"?"negative":e==="Moderate"?"caution":"neutral"}const J8={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function BB(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function ir(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
|
|
57
|
-
`):void 0}function LB(e,n,i){return e.map(r=>{if(r.id==="api")return{...r,tone:Uv(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(r.id==="worker")return{...r,tone:Uv(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const l=i.providerStatuses.filter(y=>y.state==="ready").length,u=i.providerStatuses.length,d=l>0,h=i.providerStatuses.filter(y=>y.state==="ready").map(y=>BB(y)).join(" · ");return{...r,label:"Providers",tone:d?"positive":"caution",detail:`${l} of ${u} configured`,meta:h||"None configured"}})}function qB(e,n){if(e.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(e.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(e.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(i=>i.state==="ready"))return"Launch is blocked until at least one provider is configured."}function UB(e,n,i){const r=qB(n,i),l=structuredClone(e);return l.healthChecks=l.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=i.providerStatuses.some(h=>h.state==="ready");return{...u,detail:d?"At least one provider configured.":"No providers configured.",state:d?"ready":"attention"}}),l.launchState.enabled=r===void 0,l.launchState.blockedReason=r,l.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",l}const U1="canonry.run-tracker",gp=new Set;let $v=!1,$B=0,Yc={runs:{},batches:{}};function IB(){const e=Aa();for(const n of gp)n(e)}function PB(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function VB(){typeof window>"u"||window.sessionStorage.setItem(U1,JSON.stringify(Yc))}function $1(){$v||($v=!0,!(typeof window>"u")&&(Yc=PB(window.sessionStorage.getItem(U1))))}function Fc(e){Yc=e,VB(),IB()}function Aa(){return $1(),Yc}function I1(e){return $1(),gp.add(e),()=>{gp.delete(e)}}function vm(e){const n=Aa();Fc({...n,runs:{...n.runs,[e.id]:{runId:e.id,projectId:e.projectId,projectLabel:e.projectLabel,kind:e.kind,sourceAction:e.sourceAction,lastAnnouncedStatus:e.lastAnnouncedStatus??"queued",trackedAt:e.trackedAt??Date.now()}}})}function Vf(e){const n=Aa();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;Fc({...n,runs:r})}function GB(e){const n=Aa(),i=`batch_${Date.now()}_${++$B}`;return Fc({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function HB(e){const n=Aa();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;Fc({...n,batches:r})}function KB(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const QB=10*6e4;function ZB(e,n,i,r){return e.filter(l=>!n.has(l.runId)&&i-(l.trackedAt??0)>=r)}function YB(e,n){let i=0,r=0,l=0,u=0,d=0;for(const h of e){const y=n[h]?.status;y==="completed"?i+=1:y==="partial"?r+=1:y==="failed"?l+=1:y==="cancelled"?u+=1:d+=1}return{completed:i,partial:r,failed:l,cancelled:u,pending:d,finished:d===0}}const Iv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Pv=k0,P1=(e,n)=>i=>{var r;if(n?.variants==null)return Pv(e,i?.class,i?.className);const{variants:l,defaultVariants:u}=n,d=Object.keys(l).map(b=>{const x=i?.[b],w=u?.[b];if(x===null)return null;const A=Iv(x)||Iv(w);return l[b][A]}),h=i&&Object.entries(i).reduce((b,x)=>{let[w,A]=x;return A===void 0||(b[w]=A),b},{}),y=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((b,x)=>{let{class:w,className:A,...C}=x;return Object.entries(C).every(O=>{let[k,E]=O;return Array.isArray(E)?E.includes({...u,...h}[k]):{...u,...h}[k]===E})?[...b,w,A]:b},[]);return Pv(e,d,y,i?.class,i?.className)},FB=(e,n)=>{const i=new Array(e.length+n.length);for(let r=0;r<e.length;r++)i[r]=e[r];for(let r=0;r<n.length;r++)i[e.length+r]=n[r];return i},XB=(e,n)=>({classGroupId:e,validator:n}),V1=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),Dc="-",Vv=[],JB="arbitrary..",WB=e=>{const n=tL(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return eL(d);const h=d.split(Dc),y=h[0]===""&&h.length>1?1:0;return G1(h,y,n)},getConflictingClassGroupIds:(d,h)=>{if(h){const y=r[d],b=i[d];return y?b?FB(b,y):y:b||Vv}return i[d]||Vv}}},G1=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const l=e[n],u=i.nextPart.get(l);if(u){const b=G1(e,n+1,u);if(b)return b}const d=i.validators;if(d===null)return;const h=n===0?e.join(Dc):e.slice(n).join(Dc),y=d.length;for(let b=0;b<y;b++){const x=d[b];if(x.validator(h))return x.classGroupId}},eL=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),i=n.indexOf(":"),r=n.slice(0,i);return r?JB+r:void 0})(),tL=e=>{const{theme:n,classGroups:i}=e;return nL(i,n)},nL=(e,n)=>{const i=V1();for(const r in e){const l=e[r];Sm(l,i,r,n)}return i},Sm=(e,n,i,r)=>{const l=e.length;for(let u=0;u<l;u++){const d=e[u];aL(d,n,i,r)}},aL=(e,n,i,r)=>{if(typeof e=="string"){iL(e,n,i);return}if(typeof e=="function"){sL(e,n,i,r);return}rL(e,n,i,r)},iL=(e,n,i)=>{const r=e===""?n:H1(n,e);r.classGroupId=i},sL=(e,n,i,r)=>{if(oL(e)){Sm(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(XB(i,e))},rL=(e,n,i,r)=>{const l=Object.entries(e),u=l.length;for(let d=0;d<u;d++){const[h,y]=l[d];Sm(y,H1(n,h),i,r)}},H1=(e,n)=>{let i=e;const r=n.split(Dc),l=r.length;for(let u=0;u<l;u++){const d=r[u];let h=i.nextPart.get(d);h||(h=V1(),i.nextPart.set(d,h)),i=h}return i},oL=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,lL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),r=Object.create(null);const l=(u,d)=>{i[u]=d,n++,n>e&&(n=0,r=i,i=Object.create(null))};return{get(u){let d=i[u];if(d!==void 0)return d;if((d=r[u])!==void 0)return l(u,d),d},set(u,d){u in i?i[u]=d:l(u,d)}}},yp="!",Gv=":",cL=[],Hv=(e,n,i,r,l)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:l}),uL=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=l=>{const u=[];let d=0,h=0,y=0,b;const x=l.length;for(let k=0;k<x;k++){const E=l[k];if(d===0&&h===0){if(E===Gv){u.push(l.slice(y,k)),y=k+1;continue}if(E==="/"){b=k;continue}}E==="["?d++:E==="]"?d--:E==="("?h++:E===")"&&h--}const w=u.length===0?l:l.slice(y);let A=w,C=!1;w.endsWith(yp)?(A=w.slice(0,-1),C=!0):w.startsWith(yp)&&(A=w.slice(1),C=!0);const O=b&&b>y?b-y:void 0;return Hv(u,C,A,O)};if(n){const l=n+Gv,u=r;r=d=>d.startsWith(l)?u(d.slice(l.length)):Hv(cL,!1,d,void 0,!0)}if(i){const l=r;r=u=>i({className:u,parseClassName:l})}return r},dL=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,r)=>{n.set(i,1e6+r)}),i=>{const r=[];let l=[];for(let u=0;u<i.length;u++){const d=i[u],h=d[0]==="[",y=n.has(d);h||y?(l.length>0&&(l.sort(),r.push(...l),l=[]),r.push(d)):l.push(d)}return l.length>0&&(l.sort(),r.push(...l)),r}},fL=e=>({cache:lL(e.cacheSize),parseClassName:uL(e),sortModifiers:dL(e),...WB(e)}),pL=/\s+/,mL=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:u}=n,d=[],h=e.trim().split(pL);let y="";for(let b=h.length-1;b>=0;b-=1){const x=h[b],{isExternal:w,modifiers:A,hasImportantModifier:C,baseClassName:O,maybePostfixModifierPosition:k}=i(x);if(w){y=x+(y.length>0?" "+y:y);continue}let E=!!k,M=r(E?O.substring(0,k):O);if(!M){if(!E){y=x+(y.length>0?" "+y:y);continue}if(M=r(O),!M){y=x+(y.length>0?" "+y:y);continue}E=!1}const G=A.length===0?"":A.length===1?A[0]:u(A).join(":"),F=C?G+yp:G,H=F+M;if(d.indexOf(H)>-1)continue;d.push(H);const X=l(M,E);for(let oe=0;oe<X.length;++oe){const z=X[oe];d.push(F+z)}y=x+(y.length>0?" "+y:y)}return y},hL=(...e)=>{let n=0,i,r,l="";for(;n<e.length;)(i=e[n++])&&(r=K1(i))&&(l&&(l+=" "),l+=r);return l},K1=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=K1(e[r]))&&(i&&(i+=" "),i+=n);return i},gL=(e,...n)=>{let i,r,l,u;const d=y=>{const b=n.reduce((x,w)=>w(x),e());return i=fL(b),r=i.cache.get,l=i.cache.set,u=h,h(y)},h=y=>{const b=r(y);if(b)return b;const x=mL(y,i);return l(y,x),x};return u=d,(...y)=>u(hL(...y))},yL=[],zt=e=>{const n=i=>i[e]||yL;return n.isThemeGetter=!0,n},Q1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Z1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,vL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SL=/\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$/,xL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ei=e=>bL.test(e),Re=e=>!!e&&!Number.isNaN(Number(e)),ti=e=>!!e&&Number.isInteger(Number(e)),Gf=e=>e.endsWith("%")&&Re(e.slice(0,-1)),va=e=>vL.test(e),Y1=()=>!0,NL=e=>SL.test(e)&&!xL.test(e),xm=()=>!1,AL=e=>wL.test(e),kL=e=>jL.test(e),CL=e=>!me(e)&&!he(e),_L=e=>pi(e,J1,xm),me=e=>Q1.test(e),zi=e=>pi(e,W1,NL),Kv=e=>pi(e,BL,Re),TL=e=>pi(e,tx,Y1),EL=e=>pi(e,ex,xm),Qv=e=>pi(e,F1,xm),OL=e=>pi(e,X1,kL),cc=e=>pi(e,nx,AL),he=e=>Z1.test(e),mo=e=>Gi(e,W1),DL=e=>Gi(e,ex),Zv=e=>Gi(e,F1),zL=e=>Gi(e,J1),RL=e=>Gi(e,X1),uc=e=>Gi(e,nx,!0),ML=e=>Gi(e,tx,!0),pi=(e,n,i)=>{const r=Q1.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},Gi=(e,n,i=!1)=>{const r=Z1.exec(e);return r?r[1]?n(r[1]):i:!1},F1=e=>e==="position"||e==="percentage",X1=e=>e==="image"||e==="url",J1=e=>e==="length"||e==="size"||e==="bg-size",W1=e=>e==="length",BL=e=>e==="number",ex=e=>e==="family-name",tx=e=>e==="number"||e==="weight",nx=e=>e==="shadow",LL=()=>{const e=zt("color"),n=zt("font"),i=zt("text"),r=zt("font-weight"),l=zt("tracking"),u=zt("leading"),d=zt("breakpoint"),h=zt("container"),y=zt("spacing"),b=zt("radius"),x=zt("shadow"),w=zt("inset-shadow"),A=zt("text-shadow"),C=zt("drop-shadow"),O=zt("blur"),k=zt("perspective"),E=zt("aspect"),M=zt("ease"),G=zt("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],X=()=>[...H(),he,me],oe=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],R=()=>[he,me,y],le=()=>[ei,"full","auto",...R()],ye=()=>[ti,"none","subgrid",he,me],ze=()=>["auto",{span:["full",ti,he,me]},ti,he,me],Se=()=>[ti,"auto",he,me],Me=()=>["auto","min","max","fr",he,me],ot=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],we=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...R()],ne=()=>[ei,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],V=()=>[ei,"screen","full","dvw","lvw","svw","min","max","fit",...R()],fe=()=>[ei,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],ie=()=>[e,he,me],Pe=()=>[...H(),Zv,Qv,{position:[he,me]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",zL,_L,{size:[he,me]}],te=()=>[Gf,mo,zi],de=()=>["","none","full",b,he,me],se=()=>["",Re,mo,zi],Ce=()=>["solid","dashed","dotted","double"],it=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Re,Gf,Zv,Qv],Ve=()=>["","none",O,he,me],Fe=()=>["none",Re,he,me],Bt=()=>["none",Re,he,me],Hn=()=>[Re,he,me],Lt=()=>[ei,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[va],breakpoint:[va],color:[Y1],container:[va],"drop-shadow":[va],ease:["in","out","in-out"],font:[CL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[va],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[va],shadow:[va],spacing:["px",Re],text:[va],"text-shadow":[va],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ei,me,he,E]}],container:["container"],columns:[{columns:[Re,me,he,h]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:X()}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:le()}],"inset-x":[{"inset-x":le()}],"inset-y":[{"inset-y":le()}],start:[{"inset-s":le(),start:le()}],end:[{"inset-e":le(),end:le()}],"inset-bs":[{"inset-bs":le()}],"inset-be":[{"inset-be":le()}],top:[{top:le()}],right:[{right:le()}],bottom:[{bottom:le()}],left:[{left:le()}],visibility:["visible","invisible","collapse"],z:[{z:[ti,"auto",he,me]}],basis:[{basis:[ei,"full","auto",h,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Re,ei,"auto","initial","none",me]}],grow:[{grow:["",Re,he,me]}],shrink:[{shrink:["",Re,he,me]}],order:[{order:[ti,"first","last","none",he,me]}],"grid-cols":[{"grid-cols":ye()}],"col-start-end":[{col:ze()}],"col-start":[{"col-start":Se()}],"col-end":[{"col-end":Se()}],"grid-rows":[{"grid-rows":ye()}],"row-start-end":[{row:ze()}],"row-start":[{"row-start":Se()}],"row-end":[{"row-end":Se()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Me()}],"auto-rows":[{"auto-rows":Me()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...ot(),"normal"]}],"justify-items":[{"justify-items":[...we(),"normal"]}],"justify-self":[{"justify-self":["auto",...we()]}],"align-content":[{content:["normal",...ot()]}],"align-items":[{items:[...we(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...we(),{baseline:["","last"]}]}],"place-content":[{"place-content":ot()}],"place-items":[{"place-items":[...we(),"baseline"]}],"place-self":[{"place-self":["auto",...we()]}],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:ne()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[h,"screen",...ne()]}],"min-w":[{"min-w":[h,"screen","none",...ne()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",i,mo,zi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ML,TL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gf,me]}],"font-family":[{font:[DL,EL,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:[l,he,me]}],"line-clamp":[{"line-clamp":[Re,"none",he,Kv]}],leading:[{leading:[u,...R()]}],"list-image":[{"list-image":["none",he,me]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",he,me]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ie()}],"text-color":[{text:ie()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Re,"from-font","auto",he,zi]}],"text-decoration-color":[{decoration:ie()}],"underline-offset":[{"underline-offset":[Re,"auto",he,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",he,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",he,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:Pe()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ti,he,me],radial:["",he,me],conic:[ti,he,me]},RL,OL]}],"bg-color":[{bg:ie()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:ie()}],"gradient-via":[{via:ie()}],"gradient-to":[{to:ie()}],rounded:[{rounded:de()}],"rounded-s":[{"rounded-s":de()}],"rounded-e":[{"rounded-e":de()}],"rounded-t":[{"rounded-t":de()}],"rounded-r":[{"rounded-r":de()}],"rounded-b":[{"rounded-b":de()}],"rounded-l":[{"rounded-l":de()}],"rounded-ss":[{"rounded-ss":de()}],"rounded-se":[{"rounded-se":de()}],"rounded-ee":[{"rounded-ee":de()}],"rounded-es":[{"rounded-es":de()}],"rounded-tl":[{"rounded-tl":de()}],"rounded-tr":[{"rounded-tr":de()}],"rounded-br":[{"rounded-br":de()}],"rounded-bl":[{"rounded-bl":de()}],"border-w":[{border:se()}],"border-w-x":[{"border-x":se()}],"border-w-y":[{"border-y":se()}],"border-w-s":[{"border-s":se()}],"border-w-e":[{"border-e":se()}],"border-w-bs":[{"border-bs":se()}],"border-w-be":[{"border-be":se()}],"border-w-t":[{"border-t":se()}],"border-w-r":[{"border-r":se()}],"border-w-b":[{"border-b":se()}],"border-w-l":[{"border-l":se()}],"divide-x":[{"divide-x":se()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":se()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:ie()}],"border-color-x":[{"border-x":ie()}],"border-color-y":[{"border-y":ie()}],"border-color-s":[{"border-s":ie()}],"border-color-e":[{"border-e":ie()}],"border-color-bs":[{"border-bs":ie()}],"border-color-be":[{"border-be":ie()}],"border-color-t":[{"border-t":ie()}],"border-color-r":[{"border-r":ie()}],"border-color-b":[{"border-b":ie()}],"border-color-l":[{"border-l":ie()}],"divide-color":[{divide:ie()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Re,he,me]}],"outline-w":[{outline:["",Re,mo,zi]}],"outline-color":[{outline:ie()}],shadow:[{shadow:["","none",x,uc,cc]}],"shadow-color":[{shadow:ie()}],"inset-shadow":[{"inset-shadow":["none",w,uc,cc]}],"inset-shadow-color":[{"inset-shadow":ie()}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ie()}],"ring-offset-w":[{"ring-offset":[Re,zi]}],"ring-offset-color":[{"ring-offset":ie()}],"inset-ring-w":[{"inset-ring":se()}],"inset-ring-color":[{"inset-ring":ie()}],"text-shadow":[{"text-shadow":["none",A,uc,cc]}],"text-shadow-color":[{"text-shadow":ie()}],opacity:[{opacity:[Re,he,me]}],"mix-blend":[{"mix-blend":[...it(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":it()}],"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":[Re]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":ie()}],"mask-image-linear-to-color":[{"mask-linear-to":ie()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":ie()}],"mask-image-t-to-color":[{"mask-t-to":ie()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":ie()}],"mask-image-r-to-color":[{"mask-r-to":ie()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":ie()}],"mask-image-b-to-color":[{"mask-b-to":ie()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":ie()}],"mask-image-l-to-color":[{"mask-l-to":ie()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":ie()}],"mask-image-x-to-color":[{"mask-x-to":ie()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":ie()}],"mask-image-y-to-color":[{"mask-y-to":ie()}],"mask-image-radial":[{"mask-radial":[he,me]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":ie()}],"mask-image-radial-to-color":[{"mask-radial-to":ie()}],"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":H()}],"mask-image-conic-pos":[{"mask-conic":[Re]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":ie()}],"mask-image-conic-to-color":[{"mask-conic-to":ie()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Pe()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",he,me]}],filter:[{filter:["","none",he,me]}],blur:[{blur:Ve()}],brightness:[{brightness:[Re,he,me]}],contrast:[{contrast:[Re,he,me]}],"drop-shadow":[{"drop-shadow":["","none",C,uc,cc]}],"drop-shadow-color":[{"drop-shadow":ie()}],grayscale:[{grayscale:["",Re,he,me]}],"hue-rotate":[{"hue-rotate":[Re,he,me]}],invert:[{invert:["",Re,he,me]}],saturate:[{saturate:[Re,he,me]}],sepia:[{sepia:["",Re,he,me]}],"backdrop-filter":[{"backdrop-filter":["","none",he,me]}],"backdrop-blur":[{"backdrop-blur":Ve()}],"backdrop-brightness":[{"backdrop-brightness":[Re,he,me]}],"backdrop-contrast":[{"backdrop-contrast":[Re,he,me]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Re,he,me]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Re,he,me]}],"backdrop-invert":[{"backdrop-invert":["",Re,he,me]}],"backdrop-opacity":[{"backdrop-opacity":[Re,he,me]}],"backdrop-saturate":[{"backdrop-saturate":[Re,he,me]}],"backdrop-sepia":[{"backdrop-sepia":["",Re,he,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",he,me]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Re,"initial",he,me]}],ease:[{ease:["linear","initial",M,he,me]}],delay:[{delay:[Re,he,me]}],animate:[{animate:["none",G,he,me]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,he,me]}],"perspective-origin":[{"perspective-origin":X()}],rotate:[{rotate:Fe()}],"rotate-x":[{"rotate-x":Fe()}],"rotate-y":[{"rotate-y":Fe()}],"rotate-z":[{"rotate-z":Fe()}],scale:[{scale:Bt()}],"scale-x":[{"scale-x":Bt()}],"scale-y":[{"scale-y":Bt()}],"scale-z":[{"scale-z":Bt()}],"scale-3d":["scale-3d"],skew:[{skew:Hn()}],"skew-x":[{"skew-x":Hn()}],"skew-y":[{"skew-y":Hn()}],transform:[{transform:[he,me,"","none","gpu","cpu"]}],"transform-origin":[{origin:X()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Lt()}],"translate-x":[{"translate-x":Lt()}],"translate-y":[{"translate-y":Lt()}],"translate-z":[{"translate-z":Lt()}],"translate-none":["translate-none"],accent:[{accent:ie()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ie()}],"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",he,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",he,me]}],fill:[{fill:["none",...ie()]}],"stroke-w":[{stroke:[Re,mo,zi,Kv]}],stroke:[{stroke:["none",...ie()]}],"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"]}},qL=gL(LL);function Mn(...e){return qL(k0(e))}const UL=P1("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-mono-400 focus-visible:ring-offset-2 focus-visible:ring-offset-overlay-scrim disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-accent text-on-inverse hover:bg-mono-200",secondary:"border border-base bg-bg text-heading hover:bg-bg-elevated",ghost:"text-secondary hover:bg-bg-elevated hover:text-primary",outline:"border border-base bg-transparent text-heading hover:bg-bg-elevated",destructive:"bg-negative-600 text-on-emphasis hover:bg-negative-700"},size:{default:"h-10 px-4 md:h-9",sm:"h-9 px-3 text-xs md:h-8",icon:"size-10 md:size-9"}},defaultVariants:{variant:"default",size:"default"}}),$e=q.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...l},u)=>{const d=r?jN:"button";return p.jsx(d,{ref:u,className:Mn(UL({variant:n,size:i,className:e})),...l})});$e.displayName="Button";const $L=P1("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-base bg-bg text-neutral",success:"border-positive bg-positive-soft text-positive",warning:"border-caution-500/25 bg-caution-soft text-caution",destructive:"border-negative bg-negative-soft text-negative"}},defaultVariants:{variant:"neutral"}});function ax({className:e,variant:n,...i}){return p.jsx("div",{className:Mn($L({variant:n}),e),...i})}const IL=220;function Yv({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const l=!e&&n&&n!=="unknown",[u,d]=q.useState(!1),h=!e&&i&&r,y=()=>{d(!0),window.setTimeout(()=>{r?.(),d(!1)},IL)};return e?p.jsxs(nt,{to:"/",className:"brand-lockup brand-lockup-compact","aria-label":"Canonry home",children:[p.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"}),p.jsx("span",{className:"brand-copy",children:p.jsx("span",{className:"brand-mark",children:"Canonry"})})]}):p.jsxs("div",{className:"brand-lockup brand-lockup-wrapper",children:[p.jsx(nt,{to:"/",className:"brand-icon-link","aria-label":"Canonry home",tabIndex:-1,children:p.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"})}),p.jsxs("div",{className:"brand-copy",children:[p.jsx(nt,{to:"/",className:"brand-mark",children:"Canonry"}),h?p.jsxs("span",{className:`brand-update-bubble ${u?"brand-update-bubble-closing":""}`,role:"status","aria-live":"polite",children:[p.jsxs("a",{className:"brand-update-bubble-link",href:i.url,target:"_blank",rel:"noopener noreferrer",title:`Open release: ${i.upgradeCommand}`,"aria-label":`New version v${i.latest} available — open release page`,children:[p.jsxs("span",{className:"brand-update-bubble-from",children:["v",i.current]}),p.jsx(a_,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),p.jsxs("span",{className:"brand-update-bubble-to",children:["v",i.latest]})]}),p.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:y,"aria-label":`Dismiss update notification for v${i.latest}`,children:p.jsx(or,{className:"size-3","aria-hidden":"true"})})]}):l?p.jsxs("span",{className:"brand-version",children:["v",n]}):null]})]})}function PL({provider:e}){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",perplexity:"border-teal-800/50 bg-teal-950/40 text-teal-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"},r=Object.hasOwn(n,e)?`provider-badge--${e} ${n[e]}`:"border-zinc-700 bg-zinc-800 text-zinc-300";return p.jsx("span",{className:`provider-badge inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${r}`,children:e})}function _n({tone:e,children:n,...i}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return p.jsx(ax,{variant:r,...i,children:n})}function wm({status:e}){return p.jsx(_n,{tone:q1(e),children:EM(e)})}const VL=A0,GL=w0,ix=q.forwardRef(({className:e,...n},i)=>p.jsx(Tp,{ref:i,className:Mn("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));ix.displayName=Tp.displayName;const HL=400,KL=1200,QL=720,sx=q.forwardRef(({className:e,children:n,...i},r)=>{const[l,u]=q.useState(QL),d=q.useRef(!1),h=q.useRef(0),y=q.useRef(0),b=q.useCallback(A=>{d.current=!0,h.current=A.clientX,y.current=l,A.target.setPointerCapture(A.pointerId),A.preventDefault()},[l]),x=q.useCallback(A=>{if(!d.current)return;const C=h.current-A.clientX,O=Math.min(KL,Math.max(HL,y.current+C));u(O)},[]),w=q.useCallback(()=>{d.current=!1},[]);return p.jsxs(GL,{children:[p.jsx(ix,{}),p.jsxs(Ep,{ref:r,className:Mn("fixed z-50 flex flex-col bg-bg 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-base",e),style:{width:`min(${l}px, 100vw)`},...i,children:[p.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-mono-700/50 active:bg-mono-600/50 transition-colors max-md:hidden",onPointerDown:b,onPointerMove:x,onPointerUp:w}),n,p.jsxs(j0,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-bg-elevated hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[p.jsx(or,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});sx.displayName=Ep.displayName;const ZL=({className:e,...n})=>p.jsx("div",{className:Mn("flex flex-col gap-1.5 pr-10",e),...n}),rx=q.forwardRef(({className:e,...n},i)=>p.jsx(Op,{ref:i,className:Mn("text-lg font-medium text-primary",e),...n}));rx.displayName=Op.displayName;const ox=q.forwardRef(({className:e,...n},i)=>p.jsx(N0,{ref:i,className:Mn("text-sm text-muted",e),...n}));ox.displayName=N0.displayName;function Hf({title:e,subtitle:n,children:i,open:r,onClose:l}){return p.jsx(VL,{open:r,onOpenChange:u=>u?void 0:l(),children:p.jsxs(sx,{children:[p.jsxs(ZL,{className:"drawer-head",children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),p.jsx(rx,{id:"drawer-title",children:e}),p.jsx(ox,{className:"sr-only",children:n})]}),p.jsx("div",{className:"drawer-body",children:i})]})})}function ho({text:e}){const[n,i]=q.useState(null),r=q.useRef(null),l=q.useCallback(()=>{if(!r.current)return;const h=r.current.getBoundingClientRect();i({top:h.top,left:h.left+h.width/2})},[]),u=q.useCallback(()=>i(null),[]),d=q.useCallback(()=>{n===null?l():u()},[n,l,u]);return p.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:l,onMouseLeave:u,children:[p.jsx("button",{ref:r,type:"button",className:"info-tooltip-trigger","aria-label":e,"aria-expanded":n!==null,onFocus:l,onBlur:u,onClick:d,onKeyDown:h=>{h.key==="Escape"&&u()},children:p.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[p.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),n!==null&&hN.createPortal(p.jsx("span",{"aria-hidden":"true",style:{position:"fixed",top:n.top,left:n.left,transform:"translateX(-50%) translateY(calc(-100% - 8px))",zIndex:9999,pointerEvents:"none",width:"14rem",padding:"0.5rem 0.75rem",fontSize:"11px",fontWeight:400,textTransform:"none",letterSpacing:"normal",lineHeight:"1rem",color:"var(--color-neutral-text)",backgroundColor:"var(--color-bg-elevated)",border:"1px solid color-mix(in oklab, var(--color-border-strong) 60%, transparent)",borderRadius:"0.5rem",boxShadow:"0 10px 15px -3px var(--color-shadow-tooltip), 0 4px 6px -4px var(--color-shadow-tooltip)"},children:e}),document.body)]})}const YL=/[\s\-_]+/;function FL(e){const n=e.split(YL).filter(Boolean);return n.length===0?null:n.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("[\\s\\-_]*")}function Fv(e,n){const i=XL(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(b=>b.startsWith("**")&&b.endsWith("**")?{type:"bold",value:b.slice(2,-2)}:{type:"text",value:b}),l=i.flatMap(b=>b.terms).filter(b=>b.trim().length>1);if(l.length===0)return r.map((b,x)=>b.type==="bold"?Ls.createElement("strong",{key:`b-${x}`,className:"text-strong font-semibold"},b.value):b.value).filter(Boolean);const d=[...l].sort((b,x)=>x.length-b.length).map(FL).filter(b=>!!b);if(d.length===0)return r.map((b,x)=>b.type==="bold"?Ls.createElement("strong",{key:`b-${x}`,className:"text-strong font-semibold"},b.value):b.value).filter(Boolean);const h=new RegExp(`(${d.join("|")})`,"gi"),y=new Map;for(const b of i)for(const x of b.terms){const w=Ec(x);w&&!y.has(w)&&y.set(w,b.className)}return r.flatMap((b,x)=>b.value.split(h).map((A,C)=>{if(!A)return null;if(C%2===1){const k=y.get(Ec(A))??"answer-highlight";return b.type==="bold"?Ls.createElement("mark",{key:`hl-${x}-${C}`,className:k},Ls.createElement("strong",{className:"text-strong font-semibold"},A)):Ls.createElement("mark",{key:`hl-${x}-${C}`,className:k},A)}return b.type==="bold"?Ls.createElement("strong",{key:`b-${x}-${C}`,className:"text-strong font-semibold"},A):A})).filter(Boolean)}function XL(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function bp(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function Kf(e,n){switch(e){case"new":return"First observation";case"emerging":return"First mention";case"lost":return"Lost since last run";default:return n==="mentioned"||n==="visible"?"Mentioned in latest run":n==="pending"?"Awaiting first run":"Not mentioned in latest run"}}function JL({evidence:e,project:n,onClose:i}){const[r,l]=q.useState(!1),[u,d]=q.useState("mentions"),[h,y]=q.useState(-1),[b,x]=q.useState(null),[w,A]=q.useState(!1),[C,O]=q.useState({}),k=tz(n.project),E=new Set(k.map(Cc)),M=e.runHistory,G=M.length>1,[F,H]=q.useState(null),X=q.useRef(!1);q.useEffect(()=>{if(X.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const te=M.at(-1);te&&(X.current=!0,wc(te.runId).then(de=>{const se=de.snapshots?.find(Ce=>Ce.query===e.query&&Ce.provider===e.provider);se&&H({citationState:se.citationState,answerMentioned:se.answerMentioned,visibilityState:se.visibilityState,visibilityTransition:te.visibilityTransition,provider:se.provider,model:se.model??e.model,answerSnippet:se.answerText??e.answerSnippet,citedDomains:se.citedDomains??e.citedDomains,competitorDomains:se.competitorOverlap??e.competitorDomains,recommendedCompetitors:se.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:se.matchedTerms??e.matchedTerms??[],groundingSources:se.groundingSources??e.groundingSources,searchQueries:se.searchQueries,evidenceUrls:[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,M]);const oe=h>=0&&b!==null,z=oe?b:F||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:M.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,competitorDomains:e.competitorDomains,recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},R=z.visibilityState==="pending"||z.citationState==="pending",le=R?!1:z.visibilityState!=null?z.visibilityState==="visible":z.answerMentioned!=null?z.answerMentioned:z.citationState===_c.cited||z.citationState==="emerging",ye=z.answerMentioned!=null||z.visibilityState!=null||z.recommendedCompetitors.length>0,ze=z.citedDomains.length>0||z.groundingSources.length>0||z.evidenceUrls.length>0,Se=n.project.displayName||n.project.name,Me=[...k.map(Cc),Se,Se.split(" ").slice(0,2).join(" "),...z.matchedTerms].filter(te=>te.trim().length>2),ot=[...z.competitorDomains.flatMap(te=>{const de=ez(te);return de.length>=4?[de]:[]}),...z.recommendedCompetitors].filter(te=>te.trim().length>2),we=[{terms:Me,className:"answer-highlight-brand"},...ot.length>0?[{terms:ot,className:"answer-highlight-competitor"}]:[]],I=R?"pending":z.visibilityTransition==="lost"?"lost":le?"mentioned":"not-mentioned",ne=q.useRef(0),V=q.useCallback(async te=>{const de=++ne.current;if(te===-1||te===M.length-1){y(-1),x(null),l(!1);return}y(te),l(!1);const se=M[te],Ce=`${se.runId}::${e.query}::${e.provider}`;if(C[Ce]){x(C[Ce]);return}A(!0);try{const it=await wc(se.runId);if(de!==ne.current)return;const xe=it.snapshots?.find(Fe=>Fe.query===e.query&&Fe.provider===e.provider)??it.snapshots?.find(Fe=>Fe.query===e.query),Ve=xe?{citationState:xe.citationState,answerMentioned:xe.answerMentioned,visibilityState:xe.visibilityState,visibilityTransition:se.visibilityTransition,provider:xe.provider,model:xe.model??null,answerSnippet:xe.answerText??"",citedDomains:xe.citedDomains,competitorDomains:xe.competitorOverlap,recommendedCompetitors:xe.recommendedCompetitors??[],matchedTerms:xe.matchedTerms??[],groundingSources:xe.groundingSources,searchQueries:xe.searchQueries,evidenceUrls:[],changeLabel:Kf(se.mentionTransition??se.visibilityTransition,se.mentionState??se.visibilityState),summary:""}:{citationState:se.citationState,answerMentioned:se.answerMentioned,visibilityState:se.visibilityState,visibilityTransition:se.visibilityTransition,provider:e.provider,model:se.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Kf(se.mentionTransition??se.visibilityTransition,se.mentionState??se.visibilityState),summary:"Snapshot data not available for this run."};O(Fe=>({...Fe,[Ce]:Ve})),x(Ve)}catch{if(de!==ne.current)return;x({citationState:se.citationState,answerMentioned:se.answerMentioned,visibilityState:se.visibilityState,visibilityTransition:se.visibilityTransition,provider:e.provider,model:se.model??null,answerSnippet:"",citedDomains:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:Kf(se.mentionTransition??se.visibilityTransition,se.mentionState??se.visibilityState),summary:"Failed to load historical run data."})}finally{de===ne.current&&A(!1)}},[M,e.query,e.provider,C]),ie=(oe||e.historyScope!=="provider")&&z.model?`${z.provider} (${z.model}) · ${z.changeLabel.toLowerCase()}`:`${z.provider} · ${z.changeLabel.toLowerCase()}`,Pe=!oe&&e.historyScope==="provider"?[e.model?`Current model: ${e.model}`:null,e.modelsSeen&&e.modelsSeen.length>1?`History spans ${e.modelsSeen.length} models`:null].filter(Boolean).join(" · "):"",J=le?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:ie}:z.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:ie}:R?{label:"Pending",title:"Awaiting first run",meta:"No provider data yet"}:{label:"Not mentioned in answer",title:"Your brand or domain was not mentioned in this answer",meta:ie},ue=()=>{if(!z.answerSnippet)return null;const te=z.answerSnippet.split(`
|
|
58
|
-
`),de=[];let se=[],Ce=0;const it=()=>{if(se.length===0)return;const xe=se.join(" ").trim();xe&&de.push(p.jsx("p",{className:de.length>0?"mt-2.5":"",children:Fv(xe,we)},Ce++)),se=[]};for(const xe of te){const Ve=xe.trim();if(/^[-\u2013\u2014]{3,}$/.test(Ve)){it(),de.push(p.jsx("hr",{className:"border-default my-3"},Ce++));continue}const Fe=Ve.match(/^(#{1,3})\s+(\S.*)$/);if(Fe){it();const Bt=Fe[1].length,Hn=Fe[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||Fe[2],Lt=Bt===1?"text-[13px] font-semibold text-heading mt-4 mb-1":Bt===2?"text-xs font-semibold text-strong mt-3 mb-0.5":"text-xs font-medium text-neutral mt-2";de.push(p.jsx("p",{className:Lt,children:Fv(Hn,we)},Ce++));continue}if(Ve===""){it();continue}se.push(Ve)}return it(),de};return p.jsx(A0,{open:!0,onOpenChange:te=>{te||i()},children:p.jsxs(w0,{children:[p.jsx(Tp,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),p.jsxs(Ep,{className:"evidence-modal","aria-describedby":void 0,children:[p.jsxs("div",{className:"evidence-modal-header",children:[p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," ","·"," ",z.provider||"All providers"]}),p.jsx(Op,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),p.jsxs(j0,{className:"inline-flex size-8 items-center justify-center rounded-md text-muted transition hover:bg-mono-800 hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400 shrink-0",children:[p.jsx(or,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]}),G&&p.jsxs("div",{className:"evidence-modal-timeline",children:[p.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),p.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:M.map((te,de)=>{const se=h===-1&&de===M.length-1||h===de,Ce=te.visibilityState??(te.answerMentioned?"visible":"not-visible"),it=te.visibilityTransition??Ce,xe=Ce==="visible"?"bg-positive-400":it==="emerging"?"bg-caution-400":it==="lost"?"bg-negative-400":"bg-mono-600",Fe=new Date(te.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Bt=!!(te.model&&de>0&&M[de-1]?.model&&M[de-1].model!==te.model);return p.jsxs("button",{type:"button",className:`evidence-run-dot ${se?"evidence-run-dot--selected":""}`,onClick:()=>{V(de===M.length-1?-1:de)},"aria-label":[`Run ${Fe}: ${Ce}`,te.model?`model ${te.model}`:null,Bt?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":se,children:[p.jsx("span",{className:`size-2 rounded-full ${xe} ${Bt?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),p.jsx("span",{className:"text-[10px] text-muted",children:Fe})]},de)})}),h>=0&&h<M.length&&p.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(M[h].createdAt).toLocaleString()," ","—"," ",p.jsx("span",{className:"capitalize",children:M[h].visibilityState??(M[h].answerMentioned?"visible":"not-visible")}),p.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{V(-1)},children:["←"," Back to latest"]})]}),!oe&&(e.modelTransitions?.length??0)>0&&p.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(te=>p.jsx("span",{className:"inline-flex items-center rounded-full border border-caution-400/30 bg-caution-400/10 px-2 py-1 text-[10px] text-caution-100",children:`${te.fromModel??"unknown"} -> ${te.toModel??"unknown"} on ${new Date(te.createdAt).toLocaleDateString()}`},`${te.runId}:${te.toModel??"unknown"}`))})]}),p.jsxs("div",{className:"evidence-modal-body",children:[w&&p.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!w&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"evidence-modal-main",children:[p.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${I}`,children:[p.jsx("p",{className:`evidence-position-label evidence-position-label--${I}`,children:J.label}),p.jsx("p",{className:`evidence-position-title evidence-position-title--${I}`,children:J.title}),p.jsx("p",{className:"evidence-position-meta",children:J.meta}),Pe&&p.jsx("p",{className:"mt-1 text-[11px] text-muted",children:Pe})]}),z.answerSnippet&&p.jsxs("div",{children:[p.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),p.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:ue()}),z.answerSnippet.length>280&&p.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>l(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!z.answerSnippet&&!w&&p.jsx("div",{className:"rounded-lg border border-subtle bg-surface-subtle px-4 py-8 text-center text-faint text-sm",children:"No answer text recorded for this run"}),z.searchQueries.length>0&&p.jsxs("div",{children:[p.jsxs("div",{className:"drawer-section-label flex items-center",children:[p.jsx("span",{children:"Web searches the model ran"}),p.jsx(ho,{text:"The search queries this AI model issued while researching your prompt. They reveal how the model reformulated the question — the phrasings worth optimizing your content for. Distinct from grounding sources (what it found) and citations (what it linked)."})]}),p.jsx("ul",{className:"grid gap-1",children:z.searchQueries.map((te,de)=>p.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[p.jsx(K_,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),p.jsx("span",{className:"break-words",children:te})]},`${de}-${te}`))})]}),!oe&&e.relatedTechnicalSignals.length>0&&p.jsxs("div",{children:[p.jsx("p",{className:"drawer-section-label",children:le?"Why you're visible":"What to fix"}),p.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((te,de)=>p.jsxs("div",{className:"action-item",children:[p.jsx("svg",{className:`action-item-icon ${le?"text-positive-400":"text-caution-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:le?p.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):p.jsxs(p.Fragment,{children:[p.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),p.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),p.jsx("span",{className:"action-item-text",children:te})]},de))})]}),z.summary&&p.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:z.summary})]}),p.jsxs("div",{className:"evidence-modal-sidebar",children:[(ye||ze)&&p.jsxs("div",{className:"sidebar-tabs",children:[p.jsx("button",{className:`sidebar-tab ${u==="mentions"?"sidebar-tab--active":""}`,onClick:()=>d("mentions"),type:"button",title:"Canonry's answer-level visibility assessment and any company names extracted from the answer text.",children:"Mentions"}),p.jsx("button",{className:`sidebar-tab ${u==="sources"?"sidebar-tab--active":""}`,onClick:()=>d("sources"),type:"button",title:"Grounding links the model used to build the answer. These are supporting sources, not the primary visibility signal.",children:"Sources"})]}),u==="mentions"&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{children:[p.jsxs("div",{className:"drawer-section-label flex items-center",children:[p.jsx("span",{children:"Mention in answer"}),p.jsx(ho,{text:"Canonry scans the AI answer for your owned domains and project name. This is independent from grounding or citation sources."})]}),p.jsxs("div",{className:`mention-status mention-status--${le?"mentioned":"not-mentioned"}`,children:[p.jsx("span",{className:"mention-status-icon",children:R?"…":le?"✓":"—"}),p.jsx("span",{className:"mention-status-label",children:R?"Pending":le?"Mentioned":"Not mentioned"})]}),z.matchedTerms.length>0&&p.jsxs("div",{className:"mt-2",children:[p.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Matched in answer"}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:z.matchedTerms.map(te=>p.jsx("span",{className:"mention-chip mention-chip--brand",children:te},te))})]}),!R&&!le&&z.matchedTerms.length===0&&p.jsxs("div",{className:"mt-2",children:[p.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Searched for"}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:Me.map(te=>p.jsx("span",{className:"mention-chip mention-chip--muted",children:te},te))}),p.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(z.recommendedCompetitors.length>0||z.competitorDomains.length>0)&&p.jsxs("div",{children:[p.jsxs("div",{className:"drawer-section-label flex items-center",children:[p.jsx("span",{children:"Competitors in answer"}),p.jsx(ho,{text:"Competitors detected in the answer text or cited source links. Includes both tracked competitors and names extracted by Canonry."})]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:(()=>{const te=z.competitorDomains.map(Ce=>Ce.replace(/^www\./,"")),de=new Set(te.map(Ce=>Ec(Ce.replace(/\.[^.]+$/,""))));return[...z.recommendedCompetitors.filter(Ce=>!de.has(Ec(Ce))),...te].map(Ce=>p.jsx("span",{className:"mention-chip mention-chip--competitor",children:Ce},Ce))})()})]})]}),u==="sources"&&p.jsxs(p.Fragment,{children:[z.citedDomains.length>0&&p.jsxs("div",{children:[p.jsxs("div",{className:"drawer-section-label flex items-center",children:[p.jsx("span",{children:"Domains from source links"}),p.jsx(ho,{text:"These domains were extracted from grounding or citation URLs. They are supporting-source metadata, not proof that the answer text mentioned them."})]}),p.jsx("div",{className:"citation-leaderboard",children:z.citedDomains.map((te,de)=>{const se=te.toLowerCase().replace(/^www\./,""),Ce=E.has(se),it=!Ce&&z.competitorDomains.some(Ve=>Ve.toLowerCase().replace(/^www\./,"")===se),xe=Ce?"you":it?"competitor":"other";return p.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${xe}`,children:[p.jsxs("span",{className:"citation-leaderboard-rank",children:["#",de+1]}),p.jsx("span",{className:"citation-leaderboard-domain",children:te}),Ce&&p.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),it&&p.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},te)})})]}),z.groundingSources.length>0&&p.jsxs("div",{children:[p.jsxs("div",{className:"drawer-section-label flex items-center",children:[p.jsxs("span",{children:["Grounding source links (",z.groundingSources.length,")"]}),p.jsx(ho,{text:"Links the model used as grounding or supporting context while producing the answer. These are not the same thing as answer visibility."})]}),p.jsx("ul",{className:"grid gap-0.5",children:z.groundingSources.map((te,de)=>{const se=bp(te.uri),Ce=te.title||te.uri;return p.jsx("li",{className:"truncate text-sm",children:se?p.jsx("a",{href:se,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:Ce}):p.jsx("span",{className:"text-secondary",children:Ce})},de)})})]}),z.evidenceUrls.length>0&&p.jsxs("div",{children:[p.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),p.jsx("ul",{className:"grid gap-1",children:z.evidenceUrls.map(te=>{const de=bp(te);return p.jsx("li",{className:"truncate text-sm",children:de?p.jsx("a",{href:de,target:"_blank",rel:"noopener noreferrer",className:"text-secondary hover:text-strong transition-colors",children:te}):p.jsx("span",{className:"text-secondary",children:te})},te)})})]}),z.citedDomains.length===0&&z.groundingSources.length===0&&z.evidenceUrls.length===0&&p.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",oe?"for this run":"yet"]})]}),!ye&&!ze&&p.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",oe?"for this run":"yet"]})]})]})]})]})]})})}function WL(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function e5(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function t5(e,n){return e5(WL(e),n)}function $n(e){const n=new Date("2026-02-20");return e.map((i,r)=>({runId:`run_mock_${r+1}`,citationState:i,createdAt:new Date(n.getTime()+r*2*24*60*60*1e3).toISOString()}))}const Qf=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},providers:[],providerModels:{},measurement:Bf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["lead gen"],labels:{},providers:[],providerModels:{},measurement:Bf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],aliases:[],country:"US",language:"en",tags:["multi-location"],labels:{},providers:[],providerModels:{},measurement:Bf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,configSource:"cli",configRevision:1}];function Xc(e){return{id:e.id,projectId:e.projectId,projectName:e.projectName,kind:e.kind,kindLabel:e.kindLabel,status:e.status,trigger:e.trigger??"manual",createdAt:e.createdAt,startedAt:e.startedAt,duration:e.duration,statusDetail:e.statusDetail,summary:e.summary,triggerLabel:e.triggerLabel}}const n5=Xc({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"}),a5=Xc({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"}),i5=Xc({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"}),s5=Xc({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"}),r5=[{id:"evidence_citypoint_emergency_gemini",query:"emergency dentist brooklyn",provider:"gemini",model:"gemini-2.5-flash",location:null,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:$n(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",query:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",location:null,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:$n(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",query:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,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:$n(["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",query:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",location:null,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:$n(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",query:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-2.5-flash",location:null,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:$n(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",query:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",location:null,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:$n(["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",query:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",location:null,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:$n(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",query:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-2.5-flash",location:null,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:$n(["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",query:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",location:null,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:$n(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];Qf[0],Math.round(1/9*100),Math.round(2/9*100),Qf[1],$n(["cited","cited","cited","cited","cited"]),Qf[2],Math.round(2/7*100),Math.round(3/7*100),$n(["not-cited","not-cited","not-cited","cited"]);function o5(e,n){return e.runs.find(i=>i.id===n)}function l5(e,n){for(const i of e.projects){const r=i.visibilityEvidence.find(l=>l.id===n);if(r)return{project:i,evidence:r}}}function c5(e,n,i){if(e){const r=e.visibilityEvidence.find(l=>l.id===i);if(r)return{project:e,evidence:r}}if(n)return l5(n,i)}const u5={regression:"negative",gain:"positive",opportunity:"caution","first-citation":"positive","provider-pickup":"positive","persistent-gap":"caution","competitor-gained":"negative","competitor-lost":"neutral","gbp-lodging-gap":"negative","gbp-listing-discrepancy":"negative","gbp-cta-gap":"caution","gbp-description-missing":"caution","gbp-metric-drop":"negative","gbp-keyword-drop":"negative"},d5={opportunity:"write","persistent-gap":"write","competitor-gained":"write","competitor-lost":"write",regression:"investigate",gain:"monitor","first-citation":"monitor","provider-pickup":"monitor","gbp-lodging-gap":"write","gbp-listing-discrepancy":"write","gbp-cta-gap":"write","gbp-description-missing":"write","gbp-metric-drop":"investigate","gbp-keyword-drop":"investigate"},f5={regression:"lost",gain:"emerging",opportunity:"not-cited","first-citation":"emerging","provider-pickup":"emerging","persistent-gap":"not-cited","competitor-gained":"cited","competitor-lost":"not-cited","gbp-lodging-gap":"not-cited","gbp-listing-discrepancy":"not-cited","gbp-cta-gap":"not-cited","gbp-description-missing":"not-cited","gbp-metric-drop":"lost","gbp-keyword-drop":"lost"},p5={regression:"Regression",gain:"Gain",opportunity:"Opportunity","first-citation":"First citation","provider-pickup":"Pickup","persistent-gap":"Gap","competitor-gained":"Competitor","competitor-lost":"Competitor","gbp-lodging-gap":"Lodging gap","gbp-listing-discrepancy":"Listing gap","gbp-cta-gap":"Booking CTA","gbp-description-missing":"Description gap","gbp-metric-drop":"Metric drop","gbp-keyword-drop":"Keyword drop"};function m5(e){return{id:e.id,tone:u5[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??p5[e.type],actionGroup:d5[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:f5[e.type]}]}}function h5(e){return e.filter(n=>!n.dismissed).map(m5)}function lx(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],aliases:e.aliases??[],country:e.country,language:e.language,tags:e.tags,labels:e.labels,providers:e.providers??[],providerModels:e.providerModels??{},measurement:e.measurement,locations:e.locations??[],defaultLocation:e.defaultLocation??null,autoExtractBacklinks:e.autoExtractBacklinks??!1,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function Xv(e){try{return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}function g5(e,n){if(!e)return"Waiting";if(!n)return"Running";const i=new Date(n).getTime()-new Date(e).getTime();if(i<1e3)return"<1s";const r=Math.floor(i/1e3);if(r<60)return`${r}s`;const l=Math.floor(r/60),u=r%60;return`${l}m ${u}s`}function cx(e){switch(e){case _e["answer-visibility"]:return"Answer visibility sweep";case _e["gsc-sync"]:return"GSC sync";case _e["inspect-sitemap"]:return"Sitemap inspection";case _e["ga-sync"]:return"GA sync";case _e["traffic-sync"]:return"Traffic sync";case _e["bing-inspect"]:return"Bing URL inspection";case _e["bing-inspect-sitemap"]:return"Bing sitemap inspection";case _e["site-audit"]:return"Site audit";case _e["backlink-extract"]:return"Backlink extract";case _e["aeo-discover-seed"]:return"Discovery (seed phase)";case _e["aeo-discover-probe"]:return"Discovery (probe phase)";case _e["gbp-sync"]:return"Business Profile sync";case _e["ads-sync"]:return"ChatGPT ads sync"}}function y5(e){return e===Zs.manual?"Manual":e===Zs.scheduled?"Scheduled":e===Zs["config-apply"]?"Config apply":e}function Jc(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:cx(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:e.startedAt?Xv(e.startedAt):Xv(e.createdAt),duration:g5(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?ux(e.error):b5(e),summary:v5(e),triggerLabel:y5(e.trigger)}}function ux(e){const n=Xp(e);return n.length>200?n.slice(0,200)+"…":n}function b5(e){switch(e.status){case Ft.queued:return"Waiting for execution slot.";case Ft.running:return"Provider queries in progress.";case Ft.completed:return"All queries checked.";case Ft.partial:return"Run completed with some queries skipped.";case Ft.failed:return e.error?ux(e.error):"Run failed.";case Ft.cancelled:return"Run was cancelled.";default:return""}}function v5(e){const n=cx(e.kind);switch(e.status){case Ft.queued:return`${n} queued`;case Ft.running:return`${n} in progress`;case Ft.completed:return`${n} completed`;case Ft.partial:return`${n} partially completed`;case Ft.failed:return`${n} failed`;case Ft.cancelled:return`${n} cancelled`;default:return e.status}}function S5(e,n,i,r){const l=[];let u=0;const d=new Set;if(i.length>0){const h=i.flatMap(O=>O.snapshots??[]),y=new Map;for(const O of h)if(O.query){const k=`${O.query}::${O.provider}::${O.location??""}`;y.set(k,O)}const b=new Set(h.map(O=>O.location??null));b.size===0&&b.add(null);const x=new Set(h.map(O=>O.provider)),w=new Set(n.flatMap(O=>Object.keys(O.providerRuns??{}))),A=[...new Set([...x,...w])].sort(),C=A.length>0?A:["gemini"];for(const O of n){if(O.runs.length===0)continue;d.add(O.query);const k=O.runs.at(-1),E=k?.transition??"not-cited";for(const M of C){const G=[...b].filter(X=>y.has(`${O.query}::${M}::${X??""}`)),F=(O.providerRuns?.[M]?.length??0)>0,H=G.length>0?G:F?[null]:[];for(const X of H){const oe=X??"",z=y.get(`${O.query}::${M}::${oe}`),R=z?.model??null,le=R?`${M}:${R}`:null,ye=O.providerRuns?.[M],ze=le?O.modelRuns?.[le]:void 0,Se=Ve=>Ve?.filter(Fe=>(Fe.location??null)===X),Me=G.length>0?Se(ye):ye,ot=G.length>0?Se(ze):ze,we=(Me?.length?Me:null)??(ot?.length?ot:null),I=Me?.length?"provider":ot?.length?"model":"query",ne=we?we.at(-1).transition:E,V=we?we.at(-1).visibilityTransition??(we.at(-1).visibilityState==="visible"?"visible":"not-visible"):k?.visibilityTransition??(k?.visibilityState==="visible"?"visible":"not-visible"),fe=we?.at(-1)?.citationState,ie=we?.at(-1)?.visibilityState,Pe=z?ne==="lost"?"lost":ne==="emerging"?"emerging":z.citationState===_c.cited?"cited":"not-cited":fe===_c.cited?"cited":"not-cited",J=z?.visibilityState??(ie==="visible"?"visible":ie==="pending"?"pending":"not-visible"),ue=Jv(we||O.runs),te=Wv(we||O.runs),de=x5(O,M),se=(we??O.runs).map(Ve=>({runId:Ve.runId,citationState:Ve.citationState,createdAt:Ve.createdAt,model:de.get(Ve.runId)??null,answerMentioned:Ve.answerMentioned,visibilityState:Ve.visibilityState,visibilityTransition:Ve.visibilityTransition,mentionState:Ve.mentionState,mentionTransition:Ve.mentionTransition})),Ce=w5(se),it=I==="provider"&&Ce.length<=1?"model":I,xe=j5(se);l.push({id:`evidence_${e}_${u++}`,query:O.query,provider:z?.provider??M,model:z?.model??null,location:z?.location??X,citationState:Pe,answerMentioned:z?.answerMentioned,visibilityState:J,visibilityChangeLabel:e0(V,te,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:e0(ne,ue),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],recommendedCompetitors:z?.recommendedCompetitors??[],matchedTerms:z?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],searchQueries:z?.searchQueries??[],summary:N5(J,V,O.query),runHistory:se,historyScope:it,modelsSeen:Ce,modelTransitions:xe})}}}}for(const h of r)d.has(h.query)||l.push({id:`evidence_${e}_${u++}`,query:h.query,provider:"",model:null,location:null,citationState:"pending",visibilityState:"pending",visibilityChangeLabel:"Awaiting first run",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],relatedTechnicalSignals:[],groundingSources:[],searchQueries:[],summary:`"${h.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return l}function x5(e,n){const i=new Map,r=`${n}:`;for(const[l,u]of Object.entries(e.modelRuns??{})){if(!l.startsWith(r))continue;const d=l.slice(r.length),h=d==="unknown"?null:d;for(const y of u)i.set(y.runId,h)}return i}function w5(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function j5(e){const n=[];let i=null;for(const r of e){const l=r.model??null;l!==i&&i!==null&&n.push({runId:r.runId,createdAt:r.createdAt,fromModel:i,toModel:l}),i=l}return n}function Jv(e){if(e.length===0)return 0;const n=e[e.length-1].citationState;let i=0;for(let r=e.length-1;r>=0&&e[r].citationState===n;r--)i++;return i}function Wv(e){if(e.length===0)return 0;const n=e[e.length-1].visibilityState??"not-visible";let i=0;for(let r=e.length-1;r>=0&&(e[r].visibilityState??"not-visible")===n;r--)i++;return i}function e0(e,n,i){const r={positive:i?.positive??"cited",negative:i?.negative??"not cited",first:i?.first??"first citation"};switch(e){case"new":return"First observation";case"cited":case"visible":return n<=1?`${go(r.positive)} in latest run`:`${go(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return go(r.first);case"not-cited":case"not-visible":return n<=1?`${go(r.negative)} in latest run`:`${go(r.negative)} across ${n} runs`;default:return e}}function go(e){return e.charAt(0).toUpperCase()+e.slice(1)}function N5(e,n,i){switch(n){case"lost":return`Mention was lost for "${i}". Your brand no longer appeared in the latest answer.`;case"emerging":return`Your brand started appearing in AI answers for "${i}".`}switch(e){case"visible":return`Your brand or domain is mentioned in AI answers for "${i}".`;case"pending":return`"${i}" has been added but no run has been triggered yet.`;default:return`Your brand or domain was not mentioned in AI answers for "${i}".`}}function dx(e){const n=lx(e.project),i=S5(n.name,e.timeline,e.latestRunDetails,e.queries),l=[...e.runs].sort((u,d)=>d.createdAt.localeCompare(u.createdAt)).map(u=>Jc(u,e.project.displayName||e.project.name));return e.overview?A5(n,e.overview,i,l):k5(n,i,l)}function A5(e,n,i,r){const l=h5(n.topInsights);for(const u of n.attentionItems)u.id.startsWith("insight_")||l.push({id:u.id,tone:u.tone,title:u.title,detail:u.detail,actionLabel:u.actionLabel,actionGroup:"investigate",affectedPhrases:[]});return{project:e,dateRangeLabel:n.dateRangeLabel,contextLabel:n.contextLabel,mentionSummary:n.scores.mention,visibilitySummary:n.scores.visibility,mentionShareSummary:n.scores.mentionShare,queryCounts:{cited:n.queryCounts.citedQueries,total:n.queryCounts.totalQueries},gapQueries:n.scores.gapQueries,mentionGaps:n.scores.mentionGaps,indexCoverage:n.scores.indexCoverage,providerScores:n.providerScores,competitorPressure:n.scores.competitorPressure,runStatus:n.scores.runStatus,citationMovement:n.citationMovement,mentionMovement:n.mentionMovement,movementComparison:n.movementComparison,insights:l,visibilityEvidence:i,competitors:n.competitors.map(u=>({id:u.id,domain:u.domain,citationCount:u.citationCount,totalQueries:u.totalQueries,pressureLabel:u.pressureLabel,citedQueries:u.citedQueries,movement:"",notes:""})),recentRuns:r.slice(0,5),suggestedQueries:n.suggestedQueries}}function k5(e,n,i){const r={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,dateRangeLabel:"All time",contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...r,label:"Mention Coverage"},visibilitySummary:{...r,label:"Citation Coverage"},mentionShareSummary:{...r,label:"Mention Share",breakdown:{projectMentionSnapshots:0,competitorMentionSnapshots:0,perCompetitor:[],snapshotsWithAnswerText:0,snapshotsTotal:0}},queryCounts:{cited:0,total:0},gapQueries:{...r,label:"Citation Gaps"},mentionGaps:{...r,label:"Mention Gaps"},indexCoverage:{...r,label:"Index Coverage"},providerScores:[],competitorPressure:{...r,label:"Competitor Pressure"},runStatus:{...r,label:"Run Status"},citationMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},mentionMovement:{gained:0,lost:0,tone:"neutral",hasPreviousRun:!1},movementComparison:{hasPreviousRun:!1,comparable:!1,querySetChanged:!1,previousRunAt:null,currentQueryCount:0,previousQueryCount:0,comparableQueryCount:0,addedQueryCount:0,removedQueryCount:0,addedQueries:[],removedQueries:[]},insights:[],visibilityEvidence:n,competitors:[],recentRuns:i.slice(0,5),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function C5(e){const n=lx(e.project),i=[...e.runs].sort((A,C)=>C.createdAt.localeCompare(A.createdAt)),r=i.find(A=>A.kind===_e["answer-visibility"])??i[0]??e.overview?.latestRun?.run??void 0,l=e.project.displayName||e.project.name,u=r?Jc(r,l):_5(e.project.id,l),d=e.overview;if(!d)return{project:n,mentionScore:0,mentionDelta:"No data",mentionTone:"neutral",lastRun:u,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const h=d.scores.mention,y=h.progress??0,b=d.queryCounts.mentionedQueries,x=d.queryCounts.totalQueries,w=d.providers.length;return{project:n,mentionScore:y,mentionDelta:x>0?`${b} of ${x} queries`:"No data",mentionTone:h.tone,providerCoverage:h.providerCoverage,lastRun:u,insight:x>0?`${b} of ${x} queries mentioned across ${w} provider${w===1?"":"s"}.`:"No runs completed yet.",trend:h.trend??[],competitorPressureLabel:d.scores.competitorPressure.value}}function _5(e,n){return{id:"none",projectId:e,projectName:n,kind:_e["answer-visibility"],kindLabel:"No runs yet",status:Ft.queued,trigger:Zs.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function T5(e,n){const i=[],r=[],l=[];for(const d of e){r.push(dx(d)),l.push(C5(d));const h=[...d.runs].sort((y,b)=>b.createdAt.localeCompare(y.createdAt));for(const y of h)i.push(Jc(y,d.project.displayName||d.project.name))}i.sort((d,h)=>h.createdAt.localeCompare(d.createdAt));const u=e.length>0;return{portfolioOverview:{projects:l,attentionItems:u?E5(r):[{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:i.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 query set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:r,runs:i,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"},queryImportState:{mode:"paste",queryCount: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,displayName:d.displayName,keyUrl:d.keyUrl,modelHint:d.modelHint,model:d.model,defaultModel:d.defaultModel,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."},bing:{state:n?.bing?.configured?"ready":"needs-config",detail:n?.bing?.configured?"Bing Webmaster Tools API key is configured. Project-level Bing connections can be created from the dashboard.":"Bing Webmaster Tools API key is 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 E5(e){const n=[];for(const i of e){const r=i.visibilityEvidence.filter(u=>u.citationState==="lost");r.length>0&&n.push({id:`attention_${i.project.id}_lost`,tone:"negative",title:`${i.project.displayName||i.project.name} lost citations`,detail:`${r.length} quer${r.length>1?"ies":"y"} lost citation.`,actionLabel:"Open project",href:`/projects/${encodeURIComponent(i.project.name)}`});const l=i.recentRuns.filter(u=>u.status===Ft.running||u.status===Ft.queued);l.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${l.length} run${l.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."}),n}const fx=q.createContext(null);fx.Provider;function zo(){return q.useContext(fx)}function Wc(e,n={}){const r=zo()?.dashboard??null,l=n.includeSettings??!0,u=ln({...Zc({client:ae}),enabled:!r,refetchInterval:QC}),d=ln({...bm({client:ae,query:{kind:"answer-visibility"}}),enabled:!r,staleTime:Js,refetchInterval:E=>E.state.data?.some(F=>F.status==="running"||F.status==="queued")?3e3:Js}),h=ln({...FM({client:ae}),enabled:!r&&l}),y=u.data??[],b=d.data??[],x=gN({queries:y.map(E=>{const M=b.filter(H=>H.projectId===E.id),G=M.filter(H=>(H.status==="completed"||H.status==="partial")&&H.kind==="answer-visibility"&&H.trigger!=="probe").sort((H,X)=>X.createdAt.localeCompare(H.createdAt)),F=G.length>0?G[0].id:"no-run";return{queryKey:["project-overview-slim",E.id,F],queryFn:async()=>{const H=await I0(E.name).catch(()=>null);return{project:E,runs:M,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:H}},enabled:!r&&u.isSuccess&&d.isSuccess,staleTime:sp}})}),w=x.every(E=>E.isSuccess),A=q.useMemo(()=>{if(r)return r;if(!u.data||!d.data||y.length>0&&!w)return null;const E=x.map(M=>M.data?{...M.data,runs:b.filter(G=>G.projectId===M.data.project.id)}:null).filter(M=>M!=null);return T5(E,h.data??null)},[r,u.data,d.data,h.data,w,x,y.length,b]),C=!r&&(u.isError||d.isError),O=!r&&!A&&!C,k=q.useCallback(async()=>{const E=[u.refetch(),d.refetch()];l&&E.push(h.refetch()),await Promise.all(E)},[l,u.refetch,d.refetch,h.refetch]);return{dashboard:A,isLoading:O,isError:C,refetch:k}}const O5=20;function D5(e){const n=zo(),i=q.useMemo(()=>!n||!e?null:n.dashboard.projects.find(k=>k.project.name===e)??null,[n,e]),r=ln({...$M({client:ae,path:{name:e??""}}),enabled:!!e&&!i,staleTime:sp,refetchOnWindowFocus:"always"}),l=ln({...GM({client:ae,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:Js,refetchOnWindowFocus:"always",refetchInterval:k=>k.state.data?.some(G=>G.projectId===r.data?.id&&(G.status==="running"||G.status==="queued"))?3e3:Js}),u=r.data??null,d=q.useMemo(()=>u?(l.data??[]).filter(k=>k.projectId===u.id):[],[u,l.data]),{latestRunIds:h,previousRunIds:y,latestRunIdsKey:b,latestVisibilityRevision:x}=q.useMemo(()=>{const k=d.filter(H=>(H.status==="completed"||H.status==="partial")&&H.kind==="answer-visibility"&&H.trigger!=="probe").sort((H,X)=>X.createdAt.localeCompare(H.createdAt)),E=k[0]?.createdAt??null,M=E?k.filter(H=>H.createdAt===E).map(H=>H.id):[],G=k.find(H=>H.createdAt!==E)?.createdAt??null,F=G?k.filter(H=>H.createdAt===G).map(H=>H.id):[];return{latestRunIds:M,previousRunIds:F,latestRunIdsKey:[...M].sort().join(","),latestVisibilityRevision:E?`${E}:${[...M].sort().join(",")}`:"none"}},[d]),w=ln({queryKey:["project-dashboard-full",u?.id??null,b||"none"],queryFn:async()=>{if(!u||!e)return null;const[k,E,M,G,F,H,X,oe,z]=await Promise.all([bC(e).catch(()=>[]),vC(e).catch(()=>[]),SC(e,void 0,O5).catch(()=>[]),h.length?Promise.all(h.map(R=>wc(R).catch(()=>null))).then(R=>R.filter(le=>le!=null)):Promise.resolve([]),y.length?Promise.all(y.map(R=>wc(R).catch(()=>null))).then(R=>R.filter(le=>le!=null)):Promise.resolve([]),zC(e).catch(()=>null),BC(e).catch(()=>null),LC(e).catch(()=>null),I0(e).catch(()=>null)]);return{project:u,runs:d,queries:k,competitors:E,timeline:M,latestRunDetails:G,previousRunDetails:F,gscCoverage:H,bingCoverage:X,dbInsights:oe,overview:z}},enabled:!!u&&!!e&&l.isSuccess,staleTime:sp,refetchOnWindowFocus:"always"}),A=q.useMemo(()=>w.data?dx({...w.data,runs:d}):i||null,[w.data,d,i]),C=q.useCallback(async()=>{await Promise.all([r.refetch(),l.refetch(),w.refetch()])},[r.refetch,l.refetch,w.refetch]),O=!A&&(r.isLoading||l.isLoading||w.isLoading);return{commandCenter:A,project:u,isLoading:O,isError:r.isError||l.isError||w.isError,latestVisibilityRevision:x,refetch:C}}const z5=["health"];async function R5(){const e=await UC("/health","API"),n=e.state==="ok"?{label:"Worker",state:"ok",detail:"In-process job runner"}:{label:"Worker",state:e.state,detail:`Depends on API health check · ${e.detail}`,statusCode:e.statusCode,hint:e.hint?`Worker status is inferred from API health in this deployment mode. ${e.hint}`:"Worker status is inferred from API health in this deployment mode."};return{apiStatus:e,workerStatus:n}}function jm(e,n){return ln({queryKey:z5,queryFn:R5,enabled:e,refetchInterval:15e3,initialData:n})}function M5(e){return ln({...L1({client:ae,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function Nm(){const e=Bc(),n=yN({strict:!1}),i=bN({select:y=>y.location.pathname}),r=n.runId??null,l=n.evidenceId??null;return{runId:r,evidenceId:l,openRun:y=>{e({to:i,from:Wt.to,search:b=>({...b,runId:y,evidenceId:void 0})})},openEvidence:y=>{e({to:i,from:Wt.to,search:b=>({...b,evidenceId:y,runId:void 0})})},closeDrawer:()=>{e({to:i,from:Wt.to,search:y=>({...y,runId:void 0,evidenceId:void 0})})}}}const B5={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function L5(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function q5(){const e=q.useSyncExternalStore(HC,Kb,Kb),n=Bc(),{openRun:i}=Nm(),r=q.useCallback(u=>{ip(u)},[]),l=q.useCallback(u=>{u.cta&&(u.cta.intent==="open-run-drawer"?i(u.cta.runId):n({to:"/runs"}),ip(u.id))},[n,i]);return e.length===0?null:p.jsx("div",{className:"toast-viewport","aria-label":"Notifications",children:e.map(u=>p.jsxs("section",{role:u.tone==="negative"?"alert":"status","aria-live":u.tone==="negative"?"assertive":"polite","data-state":u.state,className:`toast-card ${B5[u.tone]}`,children:[p.jsxs("div",{className:"toast-copy",children:[p.jsx("p",{className:"toast-title",children:u.title}),u.detail?p.jsx("p",{className:"toast-detail",children:u.detail}):null,u.cta?p.jsx("button",{type:"button",className:"toast-action",onClick:()=>l(u),"aria-label":L5(u),children:u.cta.label}):null]}),p.jsx("button",{type:"button",onClick:()=>r(u.id),className:"toast-dismiss","aria-label":"Dismiss",children:p.jsx(or,{className:"size-3.5"})})]},u.id))})}function So(e){switch(e){case _e["answer-visibility"]:return"Visibility sweep";case _e["gsc-sync"]:return"GSC sync";case _e["inspect-sitemap"]:return"Sitemap inspection";case _e["ga-sync"]:return"GA sync";case _e["traffic-sync"]:return"Traffic sync";case _e["bing-inspect"]:return"Bing URL inspection";case _e["bing-inspect-sitemap"]:return"Bing sitemap inspection";case _e["site-audit"]:return"Technical audit";case _e["backlink-extract"]:return"Backlink extract";case _e["aeo-discover-seed"]:return"Discovery (seed phase)";case _e["aeo-discover-probe"]:return"Discovery (probe phase)";case _e["gbp-sync"]:return"Business Profile sync";case _e["ads-sync"]:return"ChatGPT ads sync"}}function t0(e){return e==="running"?"Running":e==="queued"?"Queued":e==="partial"?"Partial":e==="completed"?"Completed":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Starting"}function U5(){const e=q.useSyncExternalStore(I1,Aa,Aa),n=q.useMemo(()=>Object.values(e.runs),[e.runs]),i=n.length>0,r=ln({...bm({client:ae}),enabled:i,staleTime:Js}),l=q.useMemo(()=>new Map((r.data??[]).map(h=>[h.id,h.status])),[r.data]);if(!i)return null;const u=n.map(h=>({...h,status:l.get(h.runId)??h.lastAnnouncedStatus})),d=u.length===1?So(u[0].kind):`${u.length} active tasks`;return p.jsxs("div",{className:"task-center",children:[p.jsxs("p",{className:"sr-only",role:"status","aria-live":"polite",children:[u.length," active ",u.length===1?"task":"tasks","."," ",u.map(h=>`${So(h.kind)} ${t0(h.status)}`).join(". "),"."]}),p.jsxs("details",{className:"task-center-details",children:[p.jsxs("summary",{className:"task-center-trigger",children:[p.jsx(Q0,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}),p.jsx("span",{className:"task-center-summary",children:d}),p.jsx("span",{className:"task-center-count","aria-hidden":"true",children:u.length}),p.jsx(K0,{className:"task-center-chevron size-3.5 shrink-0","aria-hidden":"true"})]}),p.jsxs("div",{className:"task-center-panel",children:[p.jsxs("div",{className:"task-center-heading",children:[p.jsx("span",{children:"Active tasks"}),p.jsx("span",{className:"tabular-nums text-faint",children:u.length})]}),p.jsx("ul",{className:"task-center-list",children:u.map(h=>p.jsxs("li",{className:"task-center-item",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("p",{className:"truncate text-[13px] font-medium text-strong",children:So(h.kind)}),p.jsx("p",{className:"mt-0.5 truncate text-xs text-muted",children:h.projectLabel??h.projectId})]}),p.jsx(_n,{tone:h.status==="failed"?"negative":h.status==="partial"?"caution":"neutral",children:t0(h.status)})]},h.runId))}),p.jsx(nt,{to:"/runs",className:"task-center-footer-link",children:"View all runs"})]})]})]})}function $5(e,n={}){const{threshold:i=80}=n,r=q.useRef(null),l=q.useRef({scrollHeight:0,wasAtEnd:!0});function u(y){return y.scrollHeight-y.scrollTop-y.clientHeight}function d(){const y=r.current;return y?u(y)<=i:!0}function h(){const y=r.current;y&&(y.scrollTop=y.scrollHeight,l.current.wasAtEnd=!0,l.current.scrollHeight=y.scrollHeight)}return q.useEffect(()=>{const y=r.current;if(!y)return;const b=()=>{l.current.wasAtEnd=u(y)<=i};return y.addEventListener("scroll",b,{passive:!0}),()=>y.removeEventListener("scroll",b)},[i]),q.useLayoutEffect(()=>{const y=r.current;if(!y)return;const b=y.scrollHeight;b>l.current.scrollHeight&&l.current.wasAtEnd&&(y.scrollTop=b),l.current.scrollHeight=b},e),q.useEffect(()=>{const y=r.current;if(!y||typeof ResizeObserver>"u")return;const b=new ResizeObserver(()=>{const x=y.scrollHeight;x>l.current.scrollHeight&&l.current.wasAtEnd&&(y.scrollTop=x),l.current.scrollHeight=x});return b.observe(y),y.firstElementChild&&b.observe(y.firstElementChild),()=>b.disconnect()},[]),{ref:r,scrollToEnd:h,isAtEnd:d}}async function Am(e){try{return await e.json()}catch{return{}}}function I5(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const km=I5();function Cm(e){e===401&&Mp()}async function n0(e){const n=await fetch(`${km}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){Cm(n.status);const i=await Am(n);throw new In(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function P5(e){const n=await fetch(`${km}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){Cm(n.status);const i=await Am(n);throw new In(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function V5({project:e,prompt:n,provider:i,modelId:r,scope:l,profile:u,signal:d,onEvent:h}){const y={prompt:n};i&&(y.provider=i),r&&(y.modelId=r),l&&(y.scope=l),u&&(y.profile=u);const b=await fetch(`${km}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(y),signal:d});if(!b.ok||!b.body){Cm(b.status);const O=await Am(b);throw new In(O.error?.message??`prompt failed: ${b.status}`,b.status,O.error?.code)}const x=b.body.getReader(),w=new TextDecoder;let A="";const C=()=>{x.cancel().catch(()=>{})};d?.addEventListener("abort",C,{once:!0});try{for(;;){const{value:O,done:k}=await x.read();if(k)break;A+=w.decode(O,{stream:!0});let E=A.indexOf(`
|
|
59
|
-
|
|
60
|
-
`);for(;E!==-1;){const M=A.slice(0,E);A=A.slice(E+2);for(const G of M.split(`
|
|
61
|
-
`)){if(!G.startsWith("data:"))continue;const F=G.slice(5).trim();if(F)try{h(JSON.parse(F))}catch{}}E=A.indexOf(`
|
|
62
|
-
|
|
63
|
-
`)}}}finally{d?.removeEventListener("abort",C);try{x.releaseLock()}catch{}}}function px(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const G5=[{label:"Status",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{label:"Last failed run",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{label:"Schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"}],H5=[{command:"/status",label:"Status",hint:"Latest runs, health, anything unusual",prompt:"Quick status overview for this project — latest runs, current health, anything unusual."},{command:"/insights",label:"Top insights",hint:"Walk through the most severe active insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{command:"/last-run",label:"Last run",hint:"Summarize the latest sweep",prompt:"Summarize the latest run for this project — provider mix, visibility changes, and anything that moved."},{command:"/last-failed",label:"Last failed run",hint:"Diagnose the most recent failure",prompt:"If the latest run failed, dig into it and tell me what went wrong plus how to fix it."},{command:"/run-sweep",label:"Run sweep now",hint:"Trigger a new visibility sweep",prompt:"Run a new answer-visibility sweep for this project now and tell me when it lands."},{command:"/schedule",label:"Schedule",hint:"Review the sweep schedule",prompt:"What is the current sweep schedule, and is it appropriate given recent volatility?"},{command:"/queries",label:"Queries",hint:"List tracked queries",prompt:"List the tracked queries for this project and flag any that are obvious duplicates or underperformers."},{command:"/competitors",label:"Competitors",hint:"List tracked competitors",prompt:"List this project's tracked competitors and call out which ones are showing up in answer citations."},{command:"/clear",label:"Clear conversation",hint:"Wipe transcript and start fresh",action:"clear"}],dc=e=>`canonry:aero:provider:${e}`,a0=e=>`canonry:aero:scope:${e}`;function K5({projectName:e}){const[n,i]=q.useState(!1),[r,l]=q.useState(!1),[u,d]=q.useState([]),[h,y]=q.useState(""),[b,x]=q.useState(!1),[w,A]=q.useState([]),[C,O]=q.useState(""),[k,E]=q.useState(null),[M,G]=q.useState(()=>typeof window>"u"?null:window.localStorage.getItem(dc(e))??null),[F,H]=q.useState(()=>typeof window>"u"?"read-only":window.localStorage.getItem(a0(e))==="all"?"all":"read-only"),X=q.useRef(null),{ref:oe}=$5([u,C,w]),z=q.useRef(null),[R,le]=q.useState(0),ye=q.useMemo(()=>{const J=h.trimStart();if(!J.startsWith("/"))return[];if(/\s/.test(J))return[];const ue=J.toLowerCase();return H5.filter(te=>te.command.startsWith(ue)||te.label.toLowerCase().includes(ue.slice(1)))},[h]);q.useEffect(()=>{le(J=>ye.length===0?0:Math.min(J,ye.length-1))},[ye.length]);const ze=ln({...MB({client:ae,path:{name:e}}),enabled:n,staleTime:6e4}),Se=q.useMemo(()=>{const J=ze.data?.providers??[];if(M){const te=J.find(de=>de.id===M&&de.configured);if(te)return te}const ue=ze.data?.defaultProvider;return ue?J.find(te=>te.id===ue)??null:null},[M,ze.data]);q.useEffect(()=>{if(!ze.data||!M)return;ze.data.providers.find(ue=>ue.id===M&&ue.configured)||(G(null),window.localStorage.removeItem(dc(e)))},[ze.data,M,e]);const Me=q.useCallback(J=>{G(J),!(typeof window>"u")&&(J?window.localStorage.setItem(dc(e),J):window.localStorage.removeItem(dc(e)))},[e]),ot=q.useCallback(()=>{H(J=>{const ue=J==="all"?"read-only":"all";return typeof window<"u"&&window.localStorage.setItem(a0(e),ue),ue})},[e]);q.useEffect(()=>{if(!n)return;const J=ue=>{ue.key==="Escape"&&(r?l(!1):i(!1))};return window.addEventListener("keydown",J),()=>window.removeEventListener("keydown",J)},[n,r]),q.useEffect(()=>{if(!n)return;let J=!1;E(null);const ue=()=>{J||b||n0(e).then(se=>{J||d(se.messages)}).catch(se=>{J||E(se instanceof Error?se.message:"Failed to load transcript")})};ue();const de=window.setInterval(ue,15e3);return()=>{J=!0,window.clearInterval(de)}},[n,e,b]),q.useEffect(()=>()=>{X.current?.abort()},[e]);async function we(J){const ue=J.trim();if(!ue||b)return;E(null),y(""),x(!0),O(""),A([]);const te={role:"user",content:ue,timestamp:Date.now()};d(se=>[...se,te]);const de=new AbortController;X.current=de;try{await V5({project:e,prompt:ue,provider:M??void 0,scope:F,signal:de.signal,onEvent:I});const se=await n0(e);d(se.messages)}catch(se){se.name!=="AbortError"&&E(se instanceof Error?se.message:"Prompt failed")}finally{x(!1),O(""),X.current=null}}function I(J){switch(J.type){case"message_update":O(px(J.message));break;case"message_end":J.message.role==="assistant"&&O("");break;case"tool_execution_start":A(ue=>[...ue,{id:J.toolCallId,name:J.toolName,args:J.args,startedAt:Date.now()}]);break;case"tool_execution_end":A(ue=>ue.map(te=>te.id===J.toolCallId?{...te,endedAt:Date.now(),isError:J.isError,result:J.result}:te));break;case"error":E(J.message);break}}async function ne(){X.current?.abort();try{await P5(e),d([]),E(null)}catch(J){E(J instanceof Error?J.message:"Reset failed")}}const V=u.length===0,fe=n&&r?"pointer-events-auto fixed inset-0 z-40 flex items-stretch justify-center bg-bg/70 p-4 sm:p-8 backdrop-blur-sm":"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",ie=r?"pointer-events-auto flex h-full w-full max-w-5xl flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-2xl":"pointer-events-auto w-full max-w-3xl",Pe=r?"flex-1 overflow-y-auto px-6 py-5 text-sm text-strong":"max-h-[40vh] min-h-[120px] overflow-y-auto px-4 py-3 text-sm text-strong";return p.jsx("div",{className:fe,onClick:J=>{r&&J.target===J.currentTarget&&l(!1)},children:p.jsx("div",{className:ie,children:n?p.jsxs("div",{className:r?"flex h-full flex-col":"flex flex-col overflow-hidden rounded-2xl border border-mono-800/80 bg-bg/95 shadow-xl backdrop-blur",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-mono-800/70 px-4 py-2.5",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Fb,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),p.jsx("span",{className:"text-sm font-medium text-heading",children:"Aero"}),p.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted",children:b?"working…":e})]}),p.jsxs("div",{className:"flex items-center gap-1",children:[p.jsx(Q5,{providers:ze.data?.providers??[],active:Se,override:M,onPick:Me,disabled:b}),p.jsx("button",{type:"button",onClick:Tn(ne),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Reset conversation",title:"Reset conversation",children:p.jsx(Z0,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),p.jsx("button",{type:"button",onClick:()=>l(J=>!J),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":r?"Collapse":"Expand",title:r?"Collapse":"Expand",children:r?p.jsx(O_,{className:"h-3.5 w-3.5","aria-hidden":"true"}):p.jsx(C_,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),p.jsx("button",{type:"button",onClick:()=>{l(!1),i(!1)},className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Close Aero",children:p.jsx(or,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),p.jsxs("div",{ref:oe,className:Pe,children:[k&&p.jsx("div",{className:"mb-2 rounded-md border border-negative-700/40 bg-negative-950/40 px-3 py-2 text-xs text-negative-200",children:k}),V&&!b&&p.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[p.jsxs("p",{className:"text-xs text-muted",children:["Ask anything about ",p.jsx("span",{className:"text-neutral",children:e}),", or start with:"]}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:G5.map(J=>p.jsx("button",{type:"button",onClick:()=>{we(J.prompt)},className:"rounded-full border border-base bg-bg-elevated/70 px-3 py-1 text-xs text-neutral transition hover:border-strong hover:bg-mono-800/70 hover:text-heading",children:J.label},J.label))})]}),J5(u,e,M,F),w.length>0&&p.jsx("div",{className:"mt-3 space-y-1.5",children:w.map(J=>p.jsx(mx,{trail:J},J.id))}),b&&C&&p.jsxs("div",{className:"mt-3",children:[p.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),p.jsx(hx,{content:C})]}),b&&!C&&w.every(J=>J.endedAt!==void 0)&&p.jsx(n6,{})]}),p.jsx(Z5,{projectName:e,activeProvider:Se,scope:F,onToggleScope:ot,disabled:b}),p.jsxs("div",{className:"relative",children:[ye.length>0&&p.jsx(Y5,{matches:ye,selectedIndex:R,onHover:le,onPick:J=>{y(""),z.current?.focus(),J.action==="clear"?ne():we(J.prompt)}}),p.jsxs("form",{className:"flex items-end gap-2 border-t border-mono-800/70 bg-bg/80 px-3 py-2.5",onSubmit:J=>{if(J.preventDefault(),ye.length>0){const ue=ye[R];y(""),ue.action==="clear"?ne():we(ue.prompt);return}we(h)},children:[p.jsx("textarea",{ref:z,value:h,onChange:J=>y(J.target.value),onKeyDown:J=>{if(ye.length>0){if(J.key==="ArrowDown"){J.preventDefault(),le(ue=>(ue+1)%ye.length);return}if(J.key==="ArrowUp"){J.preventDefault(),le(ue=>(ue-1+ye.length)%ye.length);return}if(J.key==="Tab"){J.preventDefault();const ue=ye[R];y(`${ue.command} `);return}if(J.key==="Escape"){J.preventDefault(),y("");return}}if(J.key==="Enter"&&!J.shiftKey)if(J.preventDefault(),ye.length>0){const ue=ye[R];y(""),ue.action==="clear"?ne():we(ue.prompt)}else we(h)},placeholder:"Ask Aero, or / for commands…",disabled:b,rows:r?3:1,className:"flex-1 resize-none bg-transparent text-sm text-heading placeholder:text-mono-600 focus:outline-none disabled:opacity-60"}),p.jsx("button",{type:"submit",disabled:b||!h.trim(),className:"inline-flex h-7 w-7 items-center justify-center rounded-md bg-positive-500 text-accent-fg transition hover:bg-positive-400 disabled:opacity-40","aria-label":"Send",children:p.jsx(s_,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]})]}):p.jsxs("button",{type:"button",onClick:()=>i(!0),className:"flex w-full items-center justify-between rounded-full border border-mono-800/80 bg-bg/95 px-4 py-2 text-left text-sm text-secondary shadow-lg backdrop-blur transition hover:border-strong hover:bg-bg-elevated/90 hover:text-strong",children:[p.jsxs("span",{className:"flex items-center gap-2",children:[p.jsx(Fb,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]}),p.jsx("span",{className:"text-[10px] uppercase tracking-wider text-faint",children:"Enter"})]})})})}function Q5({providers:e,active:n,override:i,onPick:r,disabled:l}){const[u,d]=q.useState(!1),h=q.useRef(null);if(q.useEffect(()=>{if(!u)return;const x=A=>{h.current?.contains(A.target)||d(!1)},w=A=>{A.key==="Escape"&&d(!1)};return window.addEventListener("mousedown",x),window.addEventListener("keydown",w),()=>{window.removeEventListener("mousedown",x),window.removeEventListener("keydown",w)}},[u]),e.length===0)return null;const y=n?.label.replace(/\s+\(.+\)$/,"")??"No provider",b=n?.defaultModel;return p.jsxs("div",{ref:h,className:"relative",children:[p.jsxs("button",{type:"button",onClick:()=>d(x=>!x),disabled:l,className:"flex items-center gap-1 rounded-md px-1.5 py-1 text-[11px] text-secondary transition hover:bg-surface-inset hover:text-strong disabled:opacity-50","aria-label":"Switch agent model","aria-haspopup":"listbox","aria-expanded":u,title:n?`${n.label} · ${n.defaultModel}`:"Pick a provider",children:[p.jsx("span",{className:"font-medium text-strong",children:y}),b&&p.jsx("span",{className:"hidden font-mono text-[10px] text-muted sm:inline",children:b}),p.jsx(K0,{className:"h-3 w-3","aria-hidden":"true"})]}),u&&p.jsxs("div",{role:"listbox",className:"absolute right-0 top-full z-50 mt-1 w-64 overflow-hidden rounded-lg border border-base bg-bg shadow-xl",children:[p.jsx("div",{className:"border-b border-default px-3 py-2 text-[10px] uppercase tracking-wider text-muted",children:"Aero provider"}),p.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(x=>{const w=n?.id===x.id,A=i===x.id;return p.jsx("li",{children:p.jsxs("button",{type:"button",role:"option","aria-selected":w,disabled:!x.configured,onClick:()=>{x.configured&&(r(A?null:x.id),d(!1))},className:"flex w-full items-start gap-2 px-3 py-2 text-left text-xs transition enabled:hover:bg-bg-elevated disabled:cursor-not-allowed disabled:opacity-50",children:[p.jsx("span",{className:"mt-0.5 flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:w?p.jsx(H0,{className:"h-3 w-3 text-positive-400","aria-hidden":"true"}):null}),p.jsxs("span",{className:"flex-1",children:[p.jsxs("span",{className:"flex items-center gap-1.5",children:[p.jsx("span",{className:"font-medium text-heading",children:x.label}),A&&p.jsx("span",{className:"rounded-full border border-positive-800/60 bg-positive-950/60 px-1.5 text-[9px] uppercase tracking-wider text-positive",children:"Pinned"}),!x.configured&&p.jsx("span",{className:"rounded-full border border-base px-1.5 text-[9px] uppercase tracking-wider text-muted",children:"Key missing"})]}),p.jsx("span",{className:"mt-0.5 block font-mono text-[10px] text-muted",children:x.defaultModel}),x.keySource==="env"&&p.jsx("span",{className:"mt-0.5 block text-[10px] text-faint",children:"via env var"}),!x.configured&&p.jsxs("span",{className:"mt-0.5 block text-[10px] text-faint",children:["Add key in config.yaml or export"," ",p.jsx("code",{className:"font-mono text-secondary",children:F5(x.id)})]})]})]})},x.id)})}),i&&p.jsx("button",{type:"button",onClick:()=>{r(null),d(!1)},className:"w-full border-t border-default px-3 py-2 text-left text-[11px] text-secondary transition hover:bg-bg-elevated hover:text-heading",children:"Reset to auto-detected default"})]})]})}function Z5({projectName:e,activeProvider:n,scope:i,onToggleScope:r,disabled:l}){const u=n?.label.replace(/\s+\(.+\)$/,"")??null,d=i==="all";return p.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 border-t border-mono-800/70 bg-bg/80 px-3 pt-2",children:[p.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[p.jsx("span",{className:"text-faint",children:"project"}),p.jsx("span",{className:"font-medium text-strong",children:e})]}),u&&p.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-base bg-bg-elevated/70 px-2 py-0.5 text-[10px] text-secondary",children:[p.jsx("span",{className:"text-faint",children:"model"}),p.jsx("span",{className:"font-medium text-strong",children:u})]}),p.jsxs("button",{type:"button",onClick:r,disabled:l,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] transition disabled:opacity-50 ${d?"border-caution-800/60 bg-caution-950/40 text-caution hover:border-caution-700 hover:text-caution-200":"border-base bg-bg-elevated/70 text-secondary hover:border-strong hover:text-strong"}`,title:d?"Aero can invoke write tools (run sweep, dismiss insight, etc). Click to restrict.":"Aero is restricted to read-only tools. Click to allow writes.",children:[p.jsx("span",{className:d?"text-caution-500":"text-faint",children:"scope"}),p.jsx("span",{className:"font-medium",children:d?"all tools":"read-only"})]})]})}function Y5({matches:e,selectedIndex:n,onHover:i,onPick:r}){return p.jsxs("div",{className:"absolute inset-x-3 bottom-full mb-2 overflow-hidden rounded-lg border border-base bg-bg/98 shadow-2xl",children:[p.jsx("div",{className:"border-b border-default px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted",children:"Commands"}),p.jsx("ul",{role:"listbox",className:"max-h-72 overflow-y-auto py-1",children:e.map((l,u)=>{const d=u===n;return p.jsx("li",{children:p.jsxs("button",{type:"button",role:"option","aria-selected":d,onMouseEnter:()=>i(u),onClick:()=>r(l),className:`flex w-full items-center gap-3 px-3 py-1.5 text-left text-xs transition ${d?"bg-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[p.jsx("span",{className:"font-mono text-[11px] text-positive-400",children:l.command}),p.jsx("span",{className:"font-medium",children:l.label}),p.jsx("span",{className:"ml-auto text-[10px] text-muted",children:l.hint})]})},l.command)})}),p.jsxs("div",{className:"border-t border-default px-3 py-1.5 text-[10px] text-faint",children:[p.jsx("span",{className:"mr-3",children:"↑↓ to select"}),p.jsx("span",{className:"mr-3",children:"Enter to run"}),p.jsx("span",{children:"Tab to autocomplete"})]})]})}function F5(e){switch(e){case"claude":return"ANTHROPIC_API_KEY";case"openai":return"OPENAI_API_KEY";case"gemini":return"GOOGLE_API_KEY";case"zai":return"ZAI_API_KEY";case"deepinfra":return"DEEPINFRA_TOKEN"}}function X5(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function J5(e,n,i,r){const l=[];for(let u=0;u<e.length;u++){const d=e[u],h=X5(d,u);if(d.role==="user"){const y=typeof d.content=="string"?d.content:JSON.stringify(d.content);if(y.startsWith("[system]"))continue;l.push(p.jsx(W5,{text:y,projectName:n,providerOverride:i,scope:r},h));continue}if(d.role==="assistant"){const y=new Map;let b=u+1;for(;b<e.length&&e[b].role==="toolResult";){const A=e[b];y.set(A.toolCallId,A),b++}const x=t6(d,y,d.timestamp??0),w=px(d);l.push(p.jsxs(q.Fragment,{children:[x.length>0&&p.jsx("div",{className:"mt-3 space-y-1.5",children:x.map(A=>p.jsx(mx,{trail:A},A.id))}),w.trim()&&p.jsxs("div",{className:"mt-3",children:[p.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),p.jsx(hx,{content:w})]})]},h)),u=b-1;continue}}return l}function W5({text:e,projectName:n,providerOverride:i,scope:r}){const[l,u]=q.useState(!1),d=q.useMemo(()=>e6(n,e,i,r),[n,e,i,r]);async function h(){try{await navigator.clipboard.writeText(d),u(!0),window.setTimeout(()=>u(!1),1500)}catch{}}return p.jsxs("div",{className:"group relative mt-3 rounded-md bg-bg-elevated/60 px-3 py-2 text-strong",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted",children:"You"}),p.jsx("button",{type:"button",onClick:Tn(h),className:"inline-flex items-center gap-1 rounded border border-mono-800/70 bg-bg/60 px-1.5 py-0.5 text-[10px] text-secondary opacity-0 transition hover:border-strong hover:text-heading group-hover:opacity-100 focus:opacity-100","aria-label":"Copy as CLI command",title:d,children:l?p.jsxs(p.Fragment,{children:[p.jsx(H0,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):p.jsxs(p.Fragment,{children:[p.jsx(f_,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),p.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function e6(e,n,i,r){const l=["canonry","agent","ask",i0(e),i0(n)];return i&&l.push("--provider",i),r==="read-only"&&l.push("--scope","read-only"),l.join(" ")}function i0(e){return`'${e.replace(/'/g,"'\\''")}'`}function t6(e,n,i){const r=[];for(const l of e.content){if(l.type!=="toolCall")continue;const u=l,d=n.get(u.id);r.push({id:u.id,name:u.name,args:u.arguments,startedAt:i,endedAt:d?.timestamp,isError:d?.isError,result:d?.content})}return r}function mx({trail:e}){const[n,i]=q.useState(!1),r=e.endedAt===void 0,l=!r&&e.isError===!0,u=e.endedAt!=null?e.endedAt-e.startedAt:null,d=u==null||u<0?null:u<1e3?`${u}ms`:`${(u/1e3).toFixed(1)}s`,h=l?"border-negative-800/50":r?"border-positive-800/50":"border-mono-800/70",y=l?"bg-negative-950/20":r?"bg-positive-950/20":"bg-surface-hover";return p.jsxs("div",{className:`rounded-md border ${h} ${y} font-mono`,children:[p.jsxs("button",{type:"button",onClick:()=>i(b=>!b),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":n,children:[p.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:r?p.jsx(Q0,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):l?p.jsx(Y0,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):p.jsx(X_,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),p.jsx("span",{className:"text-[11px] font-semibold text-heading",children:e.name}),p.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[r?p.jsx("span",{className:"text-positive-400",children:"running…"}):p.jsxs(p.Fragment,{children:[p.jsx("span",{children:l?"failed":"ok"}),d&&p.jsx("span",{children:d})]}),p.jsx(Up,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&p.jsxs("div",{className:"border-t border-default px-2.5 py-2 text-[11px] text-secondary",children:[p.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:"Args"}),p.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:s0(e.args)}),!r&&e.result!==void 0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:l?"Error":"Result"}),p.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-[10px] text-neutral",children:s0(e.result)})]})]})]})}function s0(e){try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);return n.length>2e3?`${n.slice(0,2e3)}
|
|
64
|
-
… (${n.length-2e3} more chars)`:n}catch{return String(e)}}function hx({content:e}){return p.jsx("div",{className:"aero-markdown text-heading",children:p.jsx(NN,{components:{h1:n=>p.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-primary"}),h2:n=>p.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-primary"}),h3:n=>p.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-heading"}),h4:n=>p.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-neutral"}),p:n=>p.jsx("p",{...n,className:"mb-2 leading-relaxed"}),ul:n=>p.jsx("ul",{...n,className:"mb-2 ml-4 list-disc space-y-1"}),ol:n=>p.jsx("ol",{...n,className:"mb-2 ml-4 list-decimal space-y-1"}),li:n=>p.jsx("li",{...n,className:"marker:text-mono-600"}),strong:n=>p.jsx("strong",{...n,className:"font-semibold text-primary"}),em:n=>p.jsx("em",{...n,className:"text-strong"}),code:({children:n,...i})=>p.jsx("code",{...i,className:"rounded bg-mono-800/70 px-1 py-0.5 font-mono text-[12px] text-positive-200",children:n}),pre:n=>p.jsx("pre",{...n,className:"mb-2 overflow-x-auto rounded-md border border-base bg-bg-elevated/70 p-3 font-mono text-xs text-strong"}),a:n=>p.jsx("a",{...n,className:"text-positive-400 underline decoration-positive-700 hover:decoration-positive-400",target:"_blank",rel:"noopener noreferrer"}),table:n=>p.jsx("div",{className:"mb-2 overflow-x-auto",children:p.jsx("table",{...n,className:"w-full border-collapse text-xs"})}),thead:n=>p.jsx("thead",{...n,className:"border-b border-base"}),th:n=>p.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-neutral"}),tr:n=>p.jsx("tr",{...n,className:"border-b border-mono-900"}),td:n=>p.jsx("td",{...n,className:"px-2 py-1 text-strong"}),blockquote:n=>p.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-strong pl-3 italic text-secondary"}),hr:()=>p.jsx("hr",{className:"my-3 border-base"})},children:e})})}function n6(){return p.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),p.jsxs("div",{className:"flex items-center gap-1","aria-label":"Aero is thinking",children:[p.jsx("span",{className:"aero-dot h-1.5 w-1.5 rounded-full bg-positive-400/80"}),p.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-positive-400/60"}),p.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-positive-400/40"})]})]})}function a6(){const e=x0(),n=/^\/projects\/([^/]+)/.exec(e.pathname),i=n?decodeURIComponent(n[1]):null,r=ln({...Zc({client:ae}),enabled:i!==null,staleTime:6e4});if(!i)return null;const l=r.data??[],u=l.find(d=>d.id===i)??l.find(d=>d.name===i);return u?p.jsx(K5,{projectName:u.name},u.name):null}function Sa(e,n){e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return typeof r?._id=="string"&&r._id.startsWith(n)}})}function zc(e,n,i){switch(e.invalidateQueries({queryKey:ym({client:ae})}),e.invalidateQueries({queryKey:Vi({client:ae})}),Sa(e,"getApiV1ProjectsByNameRuns"),n){case _e["answer-visibility"]:return;case _e["backlink-extract"]:return;case _e["site-audit"]:Sa(e,"getApiV1ProjectsByNameTechnicalAeo");return;case _e["gsc-sync"]:case _e["inspect-sitemap"]:Sa(e,"getApiV1ProjectsByNameGoogleGsc");return;case _e["ga-sync"]:Sa(e,"getApiV1ProjectsByNameGa");return;case _e["traffic-sync"]:Sa(e,"getApiV1ProjectsByNameGa"),Sa(e,"getApiV1ProjectsByNameTraffic");return;case _e["bing-inspect"]:case _e["bing-inspect-sitemap"]:Sa(e,"getApiV1ProjectsByNameBing");return;case _e["aeo-discover-seed"]:case _e["aeo-discover-probe"]:return;case _e["gbp-sync"]:Sa(e,"getApiV1ProjectsByNameGbp");return;case _e["ads-sync"]:Sa(e,"getApiV1ProjectsByNameAds");return;default:return n}}const r0=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:g_},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:o_},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:m_}],o0=e=>({label:e,state:"checking",detail:"Checking service health"}),i6={apiStatus:o0("API"),workerStatus:o0("Worker")};function s6(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function r6(e){const n=So(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function o6(e,n){return e.error?`${n}: ${Xp(e.error)}`:e.location?`${n} · ${e.location}`:n}function l0(e,n,i){if(n)return n;const r=i.find(l=>l.id===e);return r?.displayName||r?.name||e}function l6(e,n){return[e.completed>0?`${e.completed} completed`:null,e.partial>0?`${e.partial} partial`:null,e.failed>0?`${e.failed} failed`:null,e.cancelled>0?`${e.cancelled} cancelled`:null,n>0?`${n} skipped at queue time`:null].filter(Boolean).join(", ")}function c6(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function u6(){const e=oi(),n=q.useSyncExternalStore(I1,Aa,Aa),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=ln({...bm({client:ae}),enabled:i,staleTime:Js,refetchInterval:3e3}),l=ln({...Zc({client:ae}),enabled:i}),u=q.useRef({}),d=q.useCallback(()=>{r.refetch()},[r.refetch]);return q.useEffect(()=>{i&&d()},[i,d]),q.useEffect(()=>{if(!i||typeof window>"u")return;const h=()=>{document.visibilityState==="visible"&&d()};return window.addEventListener("focus",d),document.addEventListener("visibilitychange",h),()=>{window.removeEventListener("focus",d),document.removeEventListener("visibilitychange",h)}},[i,d]),q.useEffect(()=>{const h=r.data??[],y=l.data??[],b=Object.fromEntries(h.map(w=>[w.id,w])),x=Object.fromEntries(h.map(w=>[w.id,w.status]));for(const w of Object.values(n.runs)){const A=b[w.runId];if(!A||!KB(A.status)||(u.current[A.id]??w.lastAnnouncedStatus)===A.status)continue;const O=y.find(E=>E.id===A.projectId);if(O&&zc(e,A.kind,O.name),w.sourceAction==="run-all"){Vf(A.id);continue}const k=l0(A.projectId,w.projectLabel,y);Xt({title:r6(A),detail:o6(A,k),tone:s6(A.status),dedupeKey:`run:${A.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:A.id}}),Vf(A.id)}if(r.data!==void 0){const w=new Set(h.map(C=>C.id)),A=ZB(Object.values(n.runs),w,Date.now(),QB);for(const C of A){const O=y.find(k=>k.id===C.projectId);O&&zc(e,C.kind,O.name),C.sourceAction!=="run-all"&&Xt({title:`${So(C.kind)} status unavailable`,detail:l0(C.projectId,C.projectLabel,y),tone:"neutral",dedupeKey:`run-stale:${C.runId}`,dedupeMode:"replace"}),Vf(C.runId)}}for(const w of Object.values(n.batches)){const A=YB(w.runIds,b);A.finished&&(Xt({title:"Run-all batch finished",detail:l6(A,w.skippedCount),tone:c6(A),dedupeKey:`batch:${w.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),HB(w.batchId))}u.current=x},[l.data,r.data,n,e]),null}function d6(){const e=zo(),n=q.useMemo(()=>U0(),[]),{dashboard:i,isLoading:r,refetch:l}=Wc(void 0,{includeSettings:!n}),h=jm(!e,e?.health).data??e?.health??i6,y=x0(),{runId:b,evidenceId:x,closeDrawer:w}=Nm(),[A,C]=q.useState(!1),[O,k]=q.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("canonry:sidebarHidden")==="true"}catch{return!1}}),[E,M]=q.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[G]=q.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),F=G?{current:h.apiStatus.version??"0.0.0",latest:G,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:h.apiStatus.updateAvailable,H=F&&F.latest!==E,X=()=>{if(F){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",F.latest)}catch{}M(F.latest)}},oe=()=>{const V=!O;try{V?window.localStorage.setItem("canonry:sidebarHidden","true"):window.localStorage.removeItem("canonry:sidebarHidden")}catch{}k(V)},z=M5(b),R=z.data??null,le=z.isLoading;q.useEffect(()=>{R&&R.status!=="running"&&R.status!=="queued"&&l()},[R?.status,l]),q.useEffect(()=>{C(!1)},[y.pathname]),q.useEffect(()=>{if(typeof window>"u"||!b&&!x)return;const V=fe=>{fe.key==="Escape"&&w()};return window.addEventListener("keydown",V),()=>{window.removeEventListener("keydown",V)}},[b,x,w]);const ye=i??e?.dashboard??null,ze=y.pathname==="/setup"&&ye!==null&&ye.portfolioOverview.projects.length===0,Se=ze?"app-shell-focus":O?"app-shell-sidebar-hidden":"",Me=b?(ye?o5(ye,b):void 0)??(R?Jc(R,ye?.projects.find(V=>V.project.id===R.projectId)?.project.displayName??ye?.projects.find(V=>V.project.id===R.projectId)?.project.name??"Unknown project"):void 0):void 0,ot=q.useMemo(()=>t5(y.pathname,ye),[y.pathname,ye]),{commandCenter:we}=D5(ot),I=q.useMemo(()=>{if(x)return c5(we,ye,x)},[x,we,ye]),ne=(()=>{const V=y.pathname;if(V==="/")return"Portfolio";if(V==="/projects")return"Projects";if(V==="/runs")return"Runs";if(V==="/history")return"History";if(V==="/settings")return"Settings";if(V==="/setup")return"Setup";if(V==="/backlinks")return"Backlinks";if(V==="/traffic"||V.startsWith("/traffic/"))return"Server traffic";if(V.startsWith("/projects/")){const ie=V.split("/").filter(Boolean)[1];if(ie&&ye){const Pe=ye.projects.find(J=>J.project.id===ie);if(Pe)return Pe.project.name}return"Project"}return"Not found"})();if(q.useEffect(()=>{const V=qM(n?.theme);if(!V)return;const fe=document.createElement("link");return fe.rel="stylesheet",fe.href=V,document.head.appendChild(fe),()=>{document.head.removeChild(fe)}},[n]),n){const V=!n.views||n.views.includes(DM(y.pathname));return p.jsxs("div",{className:"app-shell app-shell-embed","data-theme":BM(n.theme),style:LM(n.theme),children:[p.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),p.jsx("main",{id:"content",className:"page-shell",children:V?p.jsx(ep,{}):p.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This view is not available in embed mode."})})]})}return p.jsxs("div",{className:`app-shell ${Se}`,children:[p.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),!ze&&!O&&p.jsxs("aside",{id:"desktop-sidebar",className:"sidebar","aria-label":"Primary navigation",children:[p.jsx("div",{className:"sidebar-brand",children:p.jsx(Yv,{version:h.apiStatus.version,updateAvailable:H?F:null,onDismissUpdate:X})}),p.jsxs("nav",{className:"sidebar-nav",children:[p.jsxs(nt,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(w_,{className:"sidebar-icon"}),p.jsx("span",{children:"Overview"})]}),p.jsxs(nt,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[p.jsx(b_,{className:"sidebar-icon"}),p.jsx("span",{children:"Projects"})]}),p.jsxs(nt,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(L_,{className:"sidebar-icon"}),p.jsx("span",{children:"Runs"})]}),p.jsxs(nt,{to:"/history",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(S_,{className:"sidebar-icon"}),p.jsx("span",{children:"History"})]}),p.jsxs(nt,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[p.jsx($_,{className:"sidebar-icon"}),p.jsx("span",{children:"Server traffic"})]}),p.jsxs(nt,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(N_,{className:"sidebar-icon"}),p.jsx("span",{children:"Backlinks"})]}),p.jsxs(nt,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(Z_,{className:"sidebar-icon"}),p.jsx("span",{children:"Settings"})]}),r?p.jsxs(p.Fragment,{children:[p.jsx("p",{className:"sidebar-section-title",children:"Projects"}),[1,2,3].map(V=>p.jsxs("div",{className:"sidebar-skeleton-item",children:[p.jsx("span",{className:"skeleton-circle size-2"}),p.jsx("span",{className:"skeleton-text flex-1",style:{width:`${50+V*15}%`}})]},V))]}):ye&&ye.projects.length>0?p.jsxs(p.Fragment,{children:[p.jsx("p",{className:"sidebar-section-title",children:"Projects"}),ye.projects.map(V=>{const fe=V.visibilitySummary.tone;return p.jsxs(nt,{to:"/projects/$projectName",params:{projectName:V.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[p.jsx("span",{className:`sidebar-dot sidebar-dot-${fe}`}),p.jsx("span",{children:V.project.displayName||V.project.name})]},V.project.id)})]}):r?null:p.jsxs(p.Fragment,{children:[p.jsx("p",{className:"sidebar-section-title",children:"Resources"}),p.jsxs(nt,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[p.jsx(V_,{className:"sidebar-icon"}),p.jsx("span",{children:"Setup"})]})]})]}),p.jsx("div",{className:"sidebar-footer",children:r0.map(({label:V,href:fe,Icon:ie})=>p.jsx("a",{className:"sidebar-footer-icon",href:fe,target:"_blank",rel:"noopener noreferrer",title:V,"aria-label":V,children:p.jsx(ie,{className:"size-4"})},fe))})]}),p.jsxs("div",{className:"main-area",children:[p.jsxs("header",{className:"topbar",children:[p.jsxs("div",{className:"topbar-left",children:[!ze&&p.jsx($e,{className:"sidebar-privacy-toggle",variant:"ghost",size:"icon",type:"button","aria-label":O?"Show sidebar":"Hide sidebar","aria-controls":O?void 0:"desktop-sidebar","aria-expanded":!O,title:O?"Show sidebar":"Hide sidebar",onClick:oe,children:O?p.jsx(M_,{className:"size-4"}):p.jsx(z_,{className:"size-4"})}),p.jsx("div",{className:"topbar-brand-mobile",children:p.jsx(Yv,{compact:!0})}),p.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[p.jsx(nt,{to:"/",children:"Home"}),p.jsx(Up,{className:"breadcrumb-sep size-3"}),p.jsx("span",{className:"breadcrumb-current",children:ne})]})]}),p.jsxs("div",{className:"topbar-actions",children:[p.jsx(U5,{}),p.jsxs("div",{className:"health-pill-row",children:[p.jsxs("span",{className:`health-pill health-pill-${h.apiStatus.state}`,title:ir(h.apiStatus),children:["API ",h.apiStatus.state==="ok"?"ok":h.apiStatus.state]}),p.jsxs("span",{className:`health-pill health-pill-${h.workerStatus.state}`,title:ir(h.workerStatus),children:["Worker ",h.workerStatus.state==="ok"?"ok":h.workerStatus.state]})]}),p.jsxs($e,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":A,"aria-controls":"mobile-nav",onClick:()=>C(V=>!V),children:[p.jsx(T_,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),p.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${A?"mobile-nav-open":""}`,children:[p.jsxs($e,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>C(!1),children:[p.jsx(or,{className:"size-5"}),p.jsx("span",{className:"sr-only",children:"Close navigation"})]}),p.jsx(nt,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Overview"}),p.jsx(nt,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),p.jsx(nt,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),p.jsx(nt,{to:"/history",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"History"}),p.jsx(nt,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Server traffic"}),p.jsx(nt,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),ye&&ye.projects.length>0?p.jsxs("div",{className:"mobile-nav-section",children:[p.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),ye.projects.map(V=>p.jsx(nt,{to:"/projects/$projectName",params:{projectName:V.project.name},className:"mobile-nav-link",children:V.project.name},V.project.id))]}):null]}),p.jsx("main",{id:"content",className:"page-shell",children:r&&!e?p.jsxs("div",{className:"page-skeleton",children:[p.jsxs("div",{className:"page-skeleton-header",children:[p.jsx("div",{className:"skeleton-text h-6 w-40"}),p.jsx("div",{className:"skeleton-text-sm w-72"})]}),p.jsx("div",{className:"page-skeleton-grid",children:[1,2,3].map(V=>p.jsxs("div",{className:"page-skeleton-card",children:[p.jsx("div",{className:"skeleton-text w-24"}),p.jsx("div",{className:"skeleton-text w-full"}),p.jsx("div",{className:"skeleton-text-sm w-3/4"})]},V))}),p.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(V=>p.jsxs("div",{className:"page-skeleton-card",children:[p.jsx("div",{className:"skeleton-text w-20"}),p.jsx("div",{className:"space-y-2",children:[1,2,3].map(fe=>p.jsx("div",{className:"skeleton-text-sm w-full"},fe))})]},V))})]}):p.jsx(ep,{})}),p.jsxs("footer",{className:"footer",children:[p.jsxs("span",{className:"footer-brand",children:[p.jsx("span",{children:p.jsx("a",{href:"https://canonry.ai",children:"Canonry"})}),h.apiStatus.version&&h.apiStatus.version!=="unknown"?p.jsxs("span",{className:"footer-version",children:["v",h.apiStatus.version]}):null]}),p.jsx("div",{className:"footer-links",children:r0.map(({label:V,href:fe,Icon:ie})=>p.jsx("a",{href:fe,target:"_blank",rel:"noopener noreferrer",title:V,"aria-label":V,className:"footer-icon",children:p.jsx(ie,{className:"size-3.5"})},fe))})]})]}),b&&!Me&&le?p.jsx(Hf,{open:!0,title:"Loading run details",subtitle:"Fetching the durable run record",onClose:w,children:p.jsx("p",{className:"text-sm text-muted",role:"status",children:"Loading run details…"})}):null,b&&!Me&&z.isError?p.jsx(Hf,{open:!0,title:"Run unavailable",subtitle:"The run could not be loaded",onClose:w,children:p.jsx("p",{className:"text-sm text-negative",children:z.error instanceof Error?z.error.message:"Run details are unavailable."})}):null,Me?p.jsxs(Hf,{open:!0,title:Me.summary,subtitle:`${Me.projectName} · ${Me.kindLabel}`,onClose:w,children:[p.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[p.jsx(wm,{status:Me.status}),p.jsx("span",{className:"text-secondary",children:Me.startedAt}),p.jsx("span",{className:"text-muted",children:Me.duration}),p.jsx("span",{className:"text-faint",children:Me.triggerLabel})]}),Me.status==="failed"&&Me.statusDetail&&p.jsx("p",{className:"text-sm text-negative/80 mt-2",children:Me.statusDetail}),p.jsxs("div",{className:"mt-4",children:[p.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted mb-2",children:"Activity Log"}),le?p.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):R?.snapshots&&R.snapshots.length>0?p.jsxs("div",{className:"space-y-2",children:[R.snapshots.map(V=>p.jsxs("div",{className:"rounded-lg border border-default bg-surface p-3",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[p.jsx("p",{className:"text-sm font-medium text-strong truncate",children:V.query??"Unknown query"}),p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(PL,{provider:V.provider}),p.jsx(ax,{variant:V.citationState===_c.cited?"success":"neutral",children:V.citationState})]})]}),V.model&&p.jsx("p",{className:"text-[11px] text-muted font-mono",children:V.model}),V.citedDomains.length>0&&p.jsxs("p",{className:"text-xs text-muted mt-1",children:[p.jsx("span",{className:"text-secondary",children:"Sources:"})," ",V.citedDomains.join(", ")]}),V.competitorOverlap.length>0&&p.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",V.competitorOverlap.join(", ")]}),V.groundingSources&&V.groundingSources.length>0&&p.jsxs("details",{className:"mt-2",children:[p.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[V.groundingSources.length," grounding source",V.groundingSources.length!==1?"s":""]}),p.jsx("ul",{className:"mt-1 space-y-0.5",children:V.groundingSources.map((fe,ie)=>{const Pe=bp(fe.uri),J=fe.title||fe.uri;return p.jsx("li",{className:"text-xs text-muted truncate",children:Pe?p.jsx("a",{href:Pe,target:"_blank",rel:"noopener noreferrer",className:"hover:text-neutral",children:J}):p.jsx("span",{children:J})},ie)})})]}),V.answerText&&p.jsxs("details",{className:"mt-1",children:[p.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:"Answer preview"}),p.jsx("p",{className:"mt-1 text-xs text-secondary leading-relaxed whitespace-pre-wrap",children:V.answerText})]})]},V.id)),R.status==="running"&&p.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[p.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Running remaining queries..."]})]}):R&&R.status==="running"?p.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[p.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Waiting for first query result..."]}):R&&R.status==="queued"?p.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[p.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-mono-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):R&&R.error?p.jsxs("div",{className:"rounded-lg border border-negative-800/40 bg-negative-950/20 p-3",children:[p.jsx("p",{className:"text-sm font-medium text-negative mb-2",children:"Run failed"}),p.jsx("pre",{className:"text-xs text-negative/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:TM(R.error)})]}):p.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,I?p.jsx(JL,{evidence:I.evidence,project:I.project,onClose:w}):null,p.jsx(u6,{}),p.jsx(q5,{}),p.jsx(a6,{})]})}class f6 extends q.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack)}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?p.jsx("div",{className:"page-container",children:p.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[p.jsx("div",{className:"rounded-full bg-negative-950/40 p-3",children:p.jsx(Y0,{className:"size-6 text-negative-400"})}),p.jsx("h2",{className:"text-lg font-semibold text-heading",children:"Something went wrong"}),p.jsx("p",{className:"text-sm text-secondary max-w-md",children:this.state.error.message||"An unexpected error occurred while rendering this page."}),p.jsxs("div",{className:"flex gap-3 mt-2",children:[p.jsxs($e,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[p.jsx(Z0,{className:"size-3.5 mr-1.5"}),"Try again"]}),p.jsx($e,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const En=q.forwardRef(({className:e,...n},i)=>p.jsx("div",{ref:i,className:Mn("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));En.displayName="Card";const vp=q.forwardRef(({className:e,...n},i)=>p.jsx("div",{ref:i,className:Mn("flex flex-col gap-1.5 p-5",e),...n}));vp.displayName="CardHeader";const Sp=q.forwardRef(({className:e,...n},i)=>p.jsx("h3",{ref:i,className:Mn("font-medium tracking-tight text-primary",e),...n}));Sp.displayName="CardTitle";const xp=q.forwardRef(({className:e,...n},i)=>p.jsx("p",{ref:i,className:Mn("text-sm text-muted",e),...n}));xp.displayName="CardDescription";const bc=q.forwardRef(({className:e,...n},i)=>p.jsx("div",{ref:i,className:Mn("p-5 pt-0",e),...n}));bc.displayName="CardContent";function p6({points:e,tone:n}){const i=q.useId();if(e.length===0)return null;const r=42,l=132,u=5,d=Math.min(...e),y=Math.max(...e)-d||1,b=l-u*2,x=r-u*2,w=e.map((A,C)=>{const O=u+C/Math.max(e.length-1,1)*b,k=u+(1-(A-d)/y)*x;return`${O},${k}`}).join(" ");return p.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${l} ${r}`,"aria-hidden":"true",children:[p.jsx("defs",{children:p.jsx("clipPath",{id:i,children:p.jsx("rect",{x:u,y:u,width:b,height:x,rx:"8"})})}),p.jsx("line",{className:"sparkline-guide",x1:u,x2:l-u,y1:r-u,y2:r-u}),p.jsx("polyline",{clipPath:`url(#${i})`,points:w,vectorEffect:"non-scaling-stroke"})]})}function m6({project:e}){return p.jsxs(nt,{to:"/projects/$projectName",params:{projectName:e.project.name},className:"project-row cursor-pointer",children:[p.jsx("div",{className:"project-row-chart",children:p.jsx(p6,{points:e.trend,tone:q1(e.lastRun.status)})}),p.jsxs("div",{className:"project-row-primary",children:[p.jsxs("div",{children:[p.jsx("p",{className:"project-name",children:e.project.name}),p.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),p.jsx("p",{className:"project-insight",children:e.insight})]}),p.jsx("div",{className:"project-row-stat",children:p.jsxs("div",{className:"metric-inline-block",children:[p.jsx("p",{className:"metric-inline-label",children:"Mentioned"}),p.jsx("p",{className:`metric-inline-value ${e.mentionTone==="caution"?"text-caution-400":""}`,children:e.mentionScore}),p.jsx("p",{className:"metric-inline-delta",children:e.mentionDelta}),e.providerCoverage&&p.jsx("p",{className:"text-[10px] font-medium text-caution-400/80",children:e.providerCoverage})]})}),p.jsx("div",{className:"project-row-stat",children:p.jsxs("div",{className:"metric-inline-block",children:[p.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),p.jsx("p",{className:"metric-inline-value",children:e.competitorPressureLabel})]})}),p.jsx("span",{className:"project-row-link",children:p.jsx(Up,{className:"h-4 w-4 text-muted"})})]})}function h6(){const e=zo(),{dashboard:n,isLoading:i}=Wc(),r=n??e?.dashboard;if(!r||i)return p.jsxs("div",{className:"page-skeleton",children:[p.jsxs("div",{className:"page-skeleton-header",children:[p.jsx("div",{className:"skeleton-text h-6 w-32"}),p.jsx("div",{className:"skeleton-text-sm w-64"})]}),p.jsx("div",{className:"space-y-3",children:[1,2,3].map(x=>p.jsxs("div",{className:"rounded-xl border border-default bg-surface p-4 flex items-center gap-4",children:[p.jsxs("div",{className:"flex-1 space-y-2",children:[p.jsx("div",{className:"skeleton-text w-36"}),p.jsx("div",{className:"skeleton-text-sm w-48"})]}),p.jsx("div",{className:"skeleton-text w-16"}),p.jsx("div",{className:"skeleton-text w-16"}),p.jsx("div",{className:"skeleton h-8 w-20 rounded"})]},x))})]});const l=r.portfolioOverview,h=jm(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},y=LB(l.systemHealth,h,r.settings),{openRun:b}=Nm();return p.jsxs("div",{className:"page-container",children:[p.jsxs("div",{className:"page-header",children:[p.jsxs("div",{className:"page-header-left",children:[p.jsx("h1",{className:"page-title",children:"Portfolio"}),p.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),p.jsx("div",{className:"page-header-right",children:p.jsx("p",{className:"text-[11px] text-faint",children:l.lastUpdatedAt})})]}),l.projects.length>0?p.jsx("div",{className:"project-list project-list-scrollable",children:l.projects.map(x=>p.jsx(m6,{project:x},x.project.id))}):p.jsxs(En,{className:"surface-card empty-card",children:[p.jsx("h3",{children:l.emptyState?.title??"No projects yet"}),p.jsx("p",{className:"supporting-copy",children:l.emptyState?.detail}),p.jsx($e,{size:"sm",asChild:!0,children:p.jsx(nt,{to:l.emptyState?.ctaHref==="/setup"||!l.emptyState?.ctaHref?"/setup":"/",children:l.emptyState?.ctaLabel??"Launch setup"})})]}),p.jsxs("div",{className:"overview-secondary-grid",children:[l.attentionItems.length>0&&p.jsxs("section",{className:"overview-secondary-section",children:[p.jsx("div",{className:"section-head section-head-inline",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),p.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),p.jsx("div",{className:"attention-list attention-list-scrollable",children:l.attentionItems.map(x=>x.href?p.jsxs(nt,{to:x.href,className:`attention-item attention-item-${x.tone}`,children:[p.jsxs("div",{children:[p.jsx("p",{className:"attention-title",children:x.title}),p.jsx("p",{className:"attention-detail",children:x.detail})]}),x.actionLabel&&p.jsx("span",{className:"attention-action",children:x.actionLabel})]},x.id):p.jsxs("div",{className:`attention-item attention-item-static attention-item-${x.tone}`,children:[p.jsxs("div",{children:[p.jsx("p",{className:"attention-title",children:x.title}),p.jsx("p",{className:"attention-detail",children:x.detail})]}),x.actionLabel&&p.jsx("span",{className:"attention-action",children:x.actionLabel})]},x.id))})]}),p.jsxs("section",{className:"overview-secondary-section",children:[p.jsx("div",{className:"section-head section-head-inline",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),p.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),p.jsx("div",{className:"compact-stack compact-stack-scrollable",children:l.recentRuns.length>0?l.recentRuns.map(x=>p.jsxs("button",{className:"compact-run",type:"button",onClick:()=>b(x.id),children:[p.jsxs("div",{children:[p.jsx("p",{className:"compact-run-title",children:x.projectName}),p.jsx("p",{className:"compact-run-detail",children:x.summary})]}),p.jsx(wm,{status:x.status})]},x.id)):p.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),p.jsxs("section",{className:"page-section",children:[p.jsx("div",{className:"section-head section-head-inline",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),p.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),p.jsx("div",{className:"health-grid",children:y.map(x=>p.jsxs(En,{className:"surface-card compact-card",children:[p.jsxs("div",{className:"section-head",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:x.label}),p.jsx("h3",{children:x.detail})]}),p.jsx(_n,{tone:x.tone,title:x.id==="api"?ir(h.apiStatus):x.id==="worker"?ir(h.workerStatus):void 0,children:x.label})]}),p.jsx("p",{className:"supporting-copy",children:x.meta})]},x.id))})]})]})}const _m=Symbol.for("yaml.alias"),wp=Symbol.for("yaml.document"),ii=Symbol.for("yaml.map"),gx=Symbol.for("yaml.pair"),Xn=Symbol.for("yaml.scalar"),pr=Symbol.for("yaml.seq"),zn=Symbol.for("yaml.node.type"),Hi=e=>!!e&&typeof e=="object"&&e[zn]===_m,eu=e=>!!e&&typeof e=="object"&&e[zn]===wp,Ro=e=>!!e&&typeof e=="object"&&e[zn]===ii,Nt=e=>!!e&&typeof e=="object"&&e[zn]===gx,rt=e=>!!e&&typeof e=="object"&&e[zn]===Xn,Mo=e=>!!e&&typeof e=="object"&&e[zn]===pr;function wt(e){if(e&&typeof e=="object")switch(e[zn]){case ii:case pr:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[zn]){case _m:case ii:case Xn:case pr:return!0}return!1}const yx=e=>(rt(e)||wt(e))&&!!e.anchor,Ri=Symbol("break visit"),g6=Symbol("skip children"),xo=Symbol("remove node");function mr(e,n){const i=y6(n);eu(e)?Gs(null,e.contents,i,Object.freeze([e]))===xo&&(e.contents=null):Gs(null,e,i,Object.freeze([]))}mr.BREAK=Ri;mr.SKIP=g6;mr.REMOVE=xo;function Gs(e,n,i,r){const l=b6(e,n,i,r);if(jt(l)||Nt(l))return v6(e,r,l),Gs(e,l,i,r);if(typeof l!="symbol"){if(wt(n)){r=Object.freeze(r.concat(n));for(let u=0;u<n.items.length;++u){const d=Gs(u,n.items[u],i,r);if(typeof d=="number")u=d-1;else{if(d===Ri)return Ri;d===xo&&(n.items.splice(u,1),u-=1)}}}else if(Nt(n)){r=Object.freeze(r.concat(n));const u=Gs("key",n.key,i,r);if(u===Ri)return Ri;u===xo&&(n.key=null);const d=Gs("value",n.value,i,r);if(d===Ri)return Ri;d===xo&&(n.value=null)}}return l}function y6(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function b6(e,n,i,r){if(typeof i=="function")return i(e,n,r);if(Ro(n))return i.Map?.(e,n,r);if(Mo(n))return i.Seq?.(e,n,r);if(Nt(n))return i.Pair?.(e,n,r);if(rt(n))return i.Scalar?.(e,n,r);if(Hi(n))return i.Alias?.(e,n,r)}function v6(e,n,i){const r=n[n.length-1];if(wt(r))r.items[e]=i;else if(Nt(r))e==="key"?r.key=i:r.value=i;else if(eu(r))r.contents=i;else{const l=Hi(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${l} parent`)}}const S6={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},x6=e=>e.replace(/[!,[\]{}]/g,n=>S6[n]);class Yt{constructor(n,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Yt.defaultYaml,n),this.tags=Object.assign({},Yt.defaultTags,i)}clone(){const n=new Yt(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Yt(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Yt.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Yt.defaultTags);break}return n}add(n,i){this.atNextDocument&&(this.yaml={explicit:Yt.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Yt.defaultTags),this.atNextDocument=!1);const r=n.trim().split(/[ \t]+/),l=r.shift();switch(l){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[u,d]=r;return this.tags[u]=d,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[u]=r;if(u==="1.1"||u==="1.2")return this.yaml.version=u,!0;{const d=/^\d+\.\d+$/.test(u);return i(6,`Unsupported YAML version ${u}`,d),!1}}default:return i(0,`Unknown directive ${l}`,!0),!1}}tagName(n,i){if(n==="!")return"!";if(n[0]!=="!")return i(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const d=n.slice(2,-1);return d==="!"||d==="!!"?(i(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&i("Verbatim tags must end with a >"),d)}const[,r,l]=n.match(/^(.*!)([^!]*)$/s);l||i(`The ${n} tag has no suffix`);const u=this.tags[r];if(u)try{return u+decodeURIComponent(l)}catch(d){return i(String(d)),null}return r==="!"?n:(i(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[i,r]of Object.entries(this.tags))if(n.startsWith(r))return i+x6(n.substring(r.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let l;if(n&&r.length>0&&jt(n.contents)){const u={};mr(n.contents,(d,h)=>{jt(h)&&h.tag&&(u[h.tag]=!0)}),l=Object.keys(u)}else l=[];for(const[u,d]of r)u==="!!"&&d==="tag:yaml.org,2002:"||(!n||l.some(h=>h.startsWith(d)))&&i.push(`%TAG ${u} ${d}`);return i.join(`
|
|
65
|
-
`)}}Yt.defaultYaml={explicit:!1,version:"1.2"};Yt.defaultTags={"!!":"tag:yaml.org,2002:"};function bx(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(i)}return!0}function vx(e){const n=new Set;return mr(e,{Value(i,r){r.anchor&&n.add(r.anchor)}}),n}function Sx(e,n){for(let i=1;;++i){const r=`${e}${i}`;if(!n.has(r))return r}}function w6(e,n){const i=[],r=new Map;let l=null;return{onAnchor:u=>{i.push(u),l??(l=vx(e));const d=Sx(n,l);return l.add(d),d},setAnchors:()=>{for(const u of i){const d=r.get(u);if(typeof d=="object"&&d.anchor&&(rt(d.node)||wt(d.node)))d.node.anchor=d.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:r}}function Hs(e,n,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let l=0,u=r.length;l<u;++l){const d=r[l],h=Hs(e,r,String(l),d);h===void 0?delete r[l]:h!==d&&(r[l]=h)}else if(r instanceof Map)for(const l of Array.from(r.keys())){const u=r.get(l),d=Hs(e,r,l,u);d===void 0?r.delete(l):d!==u&&r.set(l,d)}else if(r instanceof Set)for(const l of Array.from(r)){const u=Hs(e,r,l,l);u===void 0?r.delete(l):u!==l&&(r.delete(l),r.add(u))}else for(const[l,u]of Object.entries(r)){const d=Hs(e,r,l,u);d===void 0?delete r[l]:d!==u&&(r[l]=d)}return e.call(n,i,r)}function Dn(e,n,i){if(Array.isArray(e))return e.map((r,l)=>Dn(r,String(l),i));if(e&&typeof e.toJSON=="function"){if(!i||!yx(e))return e.toJSON(n,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(e,r),i.onCreate=u=>{r.res=u,delete i.onCreate};const l=e.toJSON(n,i);return i.onCreate&&i.onCreate(l),l}return typeof e=="bigint"&&!i?.keep?Number(e):e}class Tm{constructor(n){Object.defineProperty(this,zn,{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:i,maxAliasCount:r,onAnchor:l,reviver:u}={}){if(!eu(n))throw new TypeError("A document argument is required");const d={anchors:new Map,doc:n,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},h=Dn(this,"",d);if(typeof l=="function")for(const{count:y,res:b}of d.anchors.values())l(b,y);return typeof u=="function"?Hs(u,{"":h},"",h):h}}class Em extends Tm{constructor(n){super(_m),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,i){let r;i?.aliasResolveCache?r=i.aliasResolveCache:(r=[],mr(n,{Node:(u,d)=>{(Hi(d)||yx(d))&&r.push(d)}}),i&&(i.aliasResolveCache=r));let l;for(const u of r){if(u===this)break;u.anchor===this.source&&(l=u)}return l}toJSON(n,i){if(!i)return{source:this.source};const{anchors:r,doc:l,maxAliasCount:u}=i,d=this.resolve(l,i);if(!d){const y=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(y)}let h=r.get(d);if(h||(Dn(d,null,i),h=r.get(d)),h?.res===void 0){const y="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(y)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=vc(l,d,r)),h.count*h.aliasCount>u)){const y="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(y)}return h.res}toString(n,i,r){const l=`*${this.source}`;if(n){if(bx(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`${l} `}return l}}function vc(e,n,i){if(Hi(n)){const r=n.resolve(e),l=i&&r&&i.get(r);return l?l.count*l.aliasCount:0}else if(wt(n)){let r=0;for(const l of n.items){const u=vc(e,l,i);u>r&&(r=u)}return r}else if(Nt(n)){const r=vc(e,n.key,i),l=vc(e,n.value,i);return Math.max(r,l)}return 1}const xx=e=>!e||typeof e!="function"&&typeof e!="object";class Te extends Tm{constructor(n){super(Xn),this.value=n}toJSON(n,i){return i?.keep?this.value:Dn(this.value,n,i)}toString(){return String(this.value)}}Te.BLOCK_FOLDED="BLOCK_FOLDED";Te.BLOCK_LITERAL="BLOCK_LITERAL";Te.PLAIN="PLAIN";Te.QUOTE_DOUBLE="QUOTE_DOUBLE";Te.QUOTE_SINGLE="QUOTE_SINGLE";const j6="tag:yaml.org,2002:";function N6(e,n,i){if(n){const r=i.filter(u=>u.tag===n),l=r.find(u=>!u.format)??r[0];if(!l)throw new Error(`Tag ${n} not found`);return l}return i.find(r=>r.identify?.(e)&&!r.format)}function ko(e,n,i){if(eu(e)&&(e=e.contents),jt(e))return e;if(Nt(e)){const w=i.schema[ii].createNode?.(i.schema,null,i);return w.items.push(e),w}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:l,onTagObj:u,schema:d,sourceObjects:h}=i;let y;if(r&&e&&typeof e=="object"){if(y=h.get(e),y)return y.anchor??(y.anchor=l(e)),new Em(y.anchor);y={anchor:null,node:null},h.set(e,y)}n?.startsWith("!!")&&(n=j6+n.slice(2));let b=N6(e,n,d.tags);if(!b){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const w=new Te(e);return y&&(y.node=w),w}b=e instanceof Map?d[ii]:Symbol.iterator in Object(e)?d[pr]:d[ii]}u&&(u(b),delete i.onTagObj);const x=b?.createNode?b.createNode(i.schema,e,i):typeof b?.nodeClass?.from=="function"?b.nodeClass.from(i.schema,e,i):new Te(e);return n?x.tag=n:b.default||(x.tag=b.tag),y&&(y.node=x),x}function Rc(e,n,i){let r=i;for(let l=n.length-1;l>=0;--l){const u=n[l];if(typeof u=="number"&&Number.isInteger(u)&&u>=0){const d=[];d[u]=r,r=d}else r=new Map([[u,r]])}return ko(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const vo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class wx extends Tm{constructor(n,i){super(n),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(n){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(i.schema=n),i.items=i.items.map(r=>jt(r)||Nt(r)?r.clone(n):r),this.range&&(i.range=this.range.slice()),i}addIn(n,i){if(vo(n))this.add(i);else{const[r,...l]=n,u=this.get(r,!0);if(wt(u))u.addIn(l,i);else if(u===void 0&&this.schema)this.set(r,Rc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}deleteIn(n){const[i,...r]=n;if(r.length===0)return this.delete(i);const l=this.get(i,!0);if(wt(l))return l.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(n,i){const[r,...l]=n,u=this.get(r,!0);return l.length===0?!i&&rt(u)?u.value:u:wt(u)?u.getIn(l,i):void 0}hasAllNullValues(n){return this.items.every(i=>{if(!Nt(i))return!1;const r=i.value;return r==null||n&&rt(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(n){const[i,...r]=n;if(r.length===0)return this.has(i);const l=this.get(i,!0);return wt(l)?l.hasIn(r):!1}setIn(n,i){const[r,...l]=n;if(l.length===0)this.set(r,i);else{const u=this.get(r,!0);if(wt(u))u.setIn(l,i);else if(u===void 0&&this.schema)this.set(r,Rc(this.schema,l,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${l}`)}}}const A6=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function xa(e,n){return/^\n+$/.test(e)?e.substring(1):n?e.replace(/^(?! *$)/gm,n):e}const Mi=(e,n,i)=>e.endsWith(`
|
|
66
|
-
`)?xa(i,n):i.includes(`
|
|
67
|
-
`)?`
|
|
68
|
-
`+xa(i,n):(e.endsWith(" ")?"":" ")+i,jx="flow",jp="block",Sc="quoted";function tu(e,n,i="flow",{indentAtStart:r,lineWidth:l=80,minContentWidth:u=20,onFold:d,onOverflow:h}={}){if(!l||l<0)return e;l<u&&(u=0);const y=Math.max(1+u,1+l-n.length);if(e.length<=y)return e;const b=[],x={};let w=l-n.length;typeof r=="number"&&(r>l-Math.max(2,u)?b.push(0):w=l-r);let A,C,O=!1,k=-1,E=-1,M=-1;i===jp&&(k=c0(e,k,n.length),k!==-1&&(w=k+y));for(let F;F=e[k+=1];){if(i===Sc&&F==="\\"){switch(E=k,e[k+1]){case"x":k+=3;break;case"u":k+=5;break;case"U":k+=9;break;default:k+=1}M=k}if(F===`
|
|
69
|
-
`)i===jp&&(k=c0(e,k,n.length)),w=k+n.length+y,A=void 0;else{if(F===" "&&C&&C!==" "&&C!==`
|
|
70
|
-
`&&C!==" "){const H=e[k+1];H&&H!==" "&&H!==`
|
|
71
|
-
`&&H!==" "&&(A=k)}if(k>=w)if(A)b.push(A),w=A+y,A=void 0;else if(i===Sc){for(;C===" "||C===" ";)C=F,F=e[k+=1],O=!0;const H=k>M+1?k-2:E-1;if(x[H])return e;b.push(H),x[H]=!0,w=H+y,A=void 0}else O=!0}C=F}if(O&&h&&h(),b.length===0)return e;d&&d();let G=e.slice(0,b[0]);for(let F=0;F<b.length;++F){const H=b[F],X=b[F+1]||e.length;H===0?G=`
|
|
72
|
-
${n}${e.slice(0,X)}`:(i===Sc&&x[H]&&(G+=`${e[H]}\\`),G+=`
|
|
73
|
-
${n}${e.slice(H+1,X)}`)}return G}function c0(e,n,i){let r=n,l=n+1,u=e[l];for(;u===" "||u===" ";)if(n<l+i)u=e[++n];else{do u=e[++n];while(u&&u!==`
|
|
74
|
-
`);r=n,l=n+1,u=e[l]}return r}const nu=(e,n)=>({indentAtStart:n?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),au=e=>/^(%|---|\.\.\.)/m.test(e);function k6(e,n,i){if(!n||n<0)return!1;const r=n-i,l=e.length;if(l<=r)return!1;for(let u=0,d=0;u<l;++u)if(e[u]===`
|
|
75
|
-
`){if(u-d>r)return!0;if(d=u+1,l-d<=r)return!1}return!0}function wo(e,n){const i=JSON.stringify(e);if(n.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=n,l=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(au(e)?" ":"");let d="",h=0;for(let y=0,b=i[y];b;b=i[++y])if(b===" "&&i[y+1]==="\\"&&i[y+2]==="n"&&(d+=i.slice(h,y)+"\\ ",y+=1,h=y,b="\\"),b==="\\")switch(i[y+1]){case"u":{d+=i.slice(h,y);const x=i.substr(y+2,4);switch(x){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:x.substr(0,2)==="00"?d+="\\x"+x.substr(2):d+=i.substr(y,6)}y+=5,h=y+1}break;case"n":if(r||i[y+2]==='"'||i.length<l)y+=1;else{for(d+=i.slice(h,y)+`
|
|
76
|
-
|
|
77
|
-
`;i[y+2]==="\\"&&i[y+3]==="n"&&i[y+4]!=='"';)d+=`
|
|
78
|
-
`,y+=2;d+=u,i[y+2]===" "&&(d+="\\"),y+=1,h=y+1}break;default:y+=1}return d=h?d+i.slice(h):i,r?d:tu(d,u,Sc,nu(n,!1))}function Np(e,n){if(n.options.singleQuote===!1||n.implicitKey&&e.includes(`
|
|
79
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return wo(e,n);const i=n.indent||(au(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
80
|
-
${i}`)+"'";return n.implicitKey?r:tu(r,i,jx,nu(n,!1))}function Ks(e,n){const{singleQuote:i}=n.options;let r;if(i===!1)r=wo;else{const l=e.includes('"'),u=e.includes("'");l&&!u?r=Np:u&&!l?r=wo:r=i?Np:wo}return r(e,n)}let Ap;try{Ap=new RegExp(`(^|(?<!
|
|
81
|
-
))
|
|
82
|
-
+(?!
|
|
83
|
-
|$)`,"g")}catch{Ap=/\n+(?!\n|$)/g}function xc({comment:e,type:n,value:i},r,l,u){const{blockQuote:d,commentString:h,lineWidth:y}=r.options;if(!d||/\n[\t ]+$/.test(i))return Ks(i,r);const b=r.indent||(r.forceBlockIndent||au(i)?" ":""),x=d==="literal"?!0:d==="folded"||n===Te.BLOCK_FOLDED?!1:n===Te.BLOCK_LITERAL?!0:!k6(i,y,b.length);if(!i)return x?`|
|
|
84
|
-
`:`>
|
|
85
|
-
`;let w,A;for(A=i.length;A>0;--A){const X=i[A-1];if(X!==`
|
|
86
|
-
`&&X!==" "&&X!==" ")break}let C=i.substring(A);const O=C.indexOf(`
|
|
87
|
-
`);O===-1?w="-":i===C||O!==C.length-1?(w="+",u&&u()):w="",C&&(i=i.slice(0,-C.length),C[C.length-1]===`
|
|
88
|
-
`&&(C=C.slice(0,-1)),C=C.replace(Ap,`$&${b}`));let k=!1,E,M=-1;for(E=0;E<i.length;++E){const X=i[E];if(X===" ")k=!0;else if(X===`
|
|
89
|
-
`)M=E;else break}let G=i.substring(0,M<E?M+1:E);G&&(i=i.substring(G.length),G=G.replace(/\n+/g,`$&${b}`));let H=(k?b?"2":"1":"")+w;if(e&&(H+=" "+h(e.replace(/ ?[\r\n]+/g," ")),l&&l()),!x){const X=i.replace(/\n+/g,`
|
|
90
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${b}`);let oe=!1;const z=nu(r,!0);d!=="folded"&&n!==Te.BLOCK_FOLDED&&(z.onOverflow=()=>{oe=!0});const R=tu(`${G}${X}${C}`,b,jp,z);if(!oe)return`>${H}
|
|
91
|
-
${b}${R}`}return i=i.replace(/\n+/g,`$&${b}`),`|${H}
|
|
92
|
-
${b}${G}${i}${C}`}function C6(e,n,i,r){const{type:l,value:u}=e,{actualString:d,implicitKey:h,indent:y,indentStep:b,inFlow:x}=n;if(h&&u.includes(`
|
|
93
|
-
`)||x&&/[[\]{},]/.test(u))return Ks(u,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||x||!u.includes(`
|
|
94
|
-
`)?Ks(u,n):xc(e,n,i,r);if(!h&&!x&&l!==Te.PLAIN&&u.includes(`
|
|
95
|
-
`))return xc(e,n,i,r);if(au(u)){if(y==="")return n.forceBlockIndent=!0,xc(e,n,i,r);if(h&&y===b)return Ks(u,n)}const w=u.replace(/\n+/g,`$&
|
|
96
|
-
${y}`);if(d){const A=k=>k.default&&k.tag!=="tag:yaml.org,2002:str"&&k.test?.test(w),{compat:C,tags:O}=n.doc.schema;if(O.some(A)||C?.some(A))return Ks(u,n)}return h?w:tu(w,y,jx,nu(n,!1))}function Om(e,n,i,r){const{implicitKey:l,inFlow:u}=n,d=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:h}=e;h!==Te.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(d.value)&&(h=Te.QUOTE_DOUBLE);const y=x=>{switch(x){case Te.BLOCK_FOLDED:case Te.BLOCK_LITERAL:return l||u?Ks(d.value,n):xc(d,n,i,r);case Te.QUOTE_DOUBLE:return wo(d.value,n);case Te.QUOTE_SINGLE:return Np(d.value,n);case Te.PLAIN:return C6(d,n,i,r);default:return null}};let b=y(h);if(b===null){const{defaultKeyType:x,defaultStringType:w}=n.options,A=l&&x||w;if(b=y(A),b===null)throw new Error(`Unsupported default string type ${A}`)}return b}function Nx(e,n){const i=Object.assign({blockQuote:!0,commentString:A6,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},e.schema.toStringOptions,n);let r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):" ",inFlow:r,options:i}}function _6(e,n){if(n.tag){const l=e.filter(u=>u.tag===n.tag);if(l.length>0)return l.find(u=>u.format===n.format)??l[0]}let i,r;if(rt(n)){r=n.value;let l=e.filter(u=>u.identify?.(r));if(l.length>1){const u=l.filter(d=>d.test);u.length>0&&(l=u)}i=l.find(u=>u.format===n.format)??l.find(u=>!u.format)}else r=n,i=e.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!i){const l=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${l} value`)}return i}function T6(e,n,{anchors:i,doc:r}){if(!r.directives)return"";const l=[],u=(rt(e)||wt(e))&&e.anchor;u&&bx(u)&&(i.add(u),l.push(`&${u}`));const d=e.tag??(n.default?null:n.tag);return d&&l.push(r.directives.tagString(d)),l.join(" ")}function sr(e,n,i,r){if(Nt(e))return e.toString(n,i,r);if(Hi(e)){if(n.doc.directives)return e.toString(n);if(n.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(e):n.resolvedAliases=new Set([e]),e=e.resolve(n.doc)}let l;const u=jt(e)?e:n.doc.createNode(e,{onTagObj:y=>l=y});l??(l=_6(n.doc.schema.tags,u));const d=T6(u,l,n);d.length>0&&(n.indentAtStart=(n.indentAtStart??0)+d.length+1);const h=typeof l.stringify=="function"?l.stringify(u,n,i,r):rt(u)?Om(u,n,i,r):u.toString(n,i,r);return d?rt(u)||h[0]==="{"||h[0]==="["?`${d} ${h}`:`${d}
|
|
97
|
-
${n.indent}${h}`:h}function E6({key:e,value:n},i,r,l){const{allNullValues:u,doc:d,indent:h,indentStep:y,options:{commentString:b,indentSeq:x,simpleKeys:w}}=i;let A=jt(e)&&e.comment||null;if(w){if(A)throw new Error("With simple keys, key nodes cannot have comments");if(wt(e)||!jt(e)&&typeof e=="object"){const z="With simple keys, collection cannot be used as a key value";throw new Error(z)}}let C=!w&&(!e||A&&n==null&&!i.inFlow||wt(e)||(rt(e)?e.type===Te.BLOCK_FOLDED||e.type===Te.BLOCK_LITERAL:typeof e=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!C&&(w||!u),indent:h+y});let O=!1,k=!1,E=sr(e,i,()=>O=!0,()=>k=!0);if(!C&&!i.inFlow&&E.length>1024){if(w)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");C=!0}if(i.inFlow){if(u||n==null)return O&&r&&r(),E===""?"?":C?`? ${E}`:E}else if(u&&!w||n==null&&C)return E=`? ${E}`,A&&!O?E+=Mi(E,i.indent,b(A)):k&&l&&l(),E;O&&(A=null),C?(A&&(E+=Mi(E,i.indent,b(A))),E=`? ${E}
|
|
98
|
-
${h}:`):(E=`${E}:`,A&&(E+=Mi(E,i.indent,b(A))));let M,G,F;jt(n)?(M=!!n.spaceBefore,G=n.commentBefore,F=n.comment):(M=!1,G=null,F=null,n&&typeof n=="object"&&(n=d.createNode(n))),i.implicitKey=!1,!C&&!A&&rt(n)&&(i.indentAtStart=E.length+1),k=!1,!x&&y.length>=2&&!i.inFlow&&!C&&Mo(n)&&!n.flow&&!n.tag&&!n.anchor&&(i.indent=i.indent.substring(2));let H=!1;const X=sr(n,i,()=>H=!0,()=>k=!0);let oe=" ";if(A||M||G){if(oe=M?`
|
|
99
|
-
`:"",G){const z=b(G);oe+=`
|
|
100
|
-
${xa(z,i.indent)}`}X===""&&!i.inFlow?oe===`
|
|
101
|
-
`&&F&&(oe=`
|
|
102
|
-
|
|
103
|
-
`):oe+=`
|
|
104
|
-
${i.indent}`}else if(!C&&wt(n)){const z=X[0],R=X.indexOf(`
|
|
105
|
-
`),le=R!==-1,ye=i.inFlow??n.flow??n.items.length===0;if(le||!ye){let ze=!1;if(le&&(z==="&"||z==="!")){let Se=X.indexOf(" ");z==="&"&&Se!==-1&&Se<R&&X[Se+1]==="!"&&(Se=X.indexOf(" ",Se+1)),(Se===-1||R<Se)&&(ze=!0)}ze||(oe=`
|
|
106
|
-
${i.indent}`)}}else(X===""||X[0]===`
|
|
107
|
-
`)&&(oe="");return E+=oe+X,i.inFlow?H&&r&&r():F&&!H?E+=Mi(E,i.indent,b(F)):k&&l&&l(),E}function O6(e,n){(e==="debug"||e==="warn")&&console.warn(n)}const fc="<<",ja={identify:e=>e===fc||typeof e=="symbol"&&e.description===fc,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Te(Symbol(fc)),{addToJSMap:Ax}),stringify:()=>fc},D6=(e,n)=>(ja.identify(n)||rt(n)&&(!n.type||n.type===Te.PLAIN)&&ja.identify(n.value))&&e?.doc.schema.tags.some(i=>i.tag===ja.tag&&i.default);function Ax(e,n,i){if(i=e&&Hi(i)?i.resolve(e.doc):i,Mo(i))for(const r of i.items)Zf(e,n,r);else if(Array.isArray(i))for(const r of i)Zf(e,n,r);else Zf(e,n,i)}function Zf(e,n,i){const r=e&&Hi(i)?i.resolve(e.doc):i;if(!Ro(r))throw new Error("Merge sources must be maps or map aliases");const l=r.toJSON(null,e,Map);for(const[u,d]of l)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 kx(e,n,{key:i,value:r}){if(jt(i)&&i.addToJSMap)i.addToJSMap(e,n,r);else if(D6(e,i))Ax(e,n,r);else{const l=Dn(i,"",e);if(n instanceof Map)n.set(l,Dn(r,l,e));else if(n instanceof Set)n.add(l);else{const u=z6(i,l,e),d=Dn(r,u,e);u in n?Object.defineProperty(n,u,{value:d,writable:!0,enumerable:!0,configurable:!0}):n[u]=d}}return n}function z6(e,n,i){if(n===null)return"";if(typeof n!="object")return String(n);if(jt(e)&&i?.doc){const r=Nx(i.doc,{});r.anchors=new Set;for(const u of i.anchors.keys())r.anchors.add(u.anchor);r.inFlow=!0,r.inStringifyKey=!0;const l=e.toString(r);if(!i.mapKeyWarned){let u=JSON.stringify(l);u.length>40&&(u=u.substring(0,36)+'..."'),O6(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return l}return JSON.stringify(n)}function Dm(e,n,i){const r=ko(e,void 0,i),l=ko(n,void 0,i);return new Jt(r,l)}class Jt{constructor(n,i=null){Object.defineProperty(this,zn,{value:gx}),this.key=n,this.value=i}clone(n){let{key:i,value:r}=this;return jt(i)&&(i=i.clone(n)),jt(r)&&(r=r.clone(n)),new Jt(i,r)}toJSON(n,i){const r=i?.mapAsMap?new Map:{};return kx(i,r,this)}toString(n,i,r){return n?.doc?E6(this,n,i,r):JSON.stringify(this)}}function Cx(e,n,i){return(n.inFlow??e.flow?M6:R6)(e,n,i)}function R6({comment:e,items:n},i,{blockItemPrefix:r,flowChars:l,itemIndent:u,onChompKeep:d,onComment:h}){const{indent:y,options:{commentString:b}}=i,x=Object.assign({},i,{indent:u,type:null});let w=!1;const A=[];for(let O=0;O<n.length;++O){const k=n[O];let E=null;if(jt(k))!w&&k.spaceBefore&&A.push(""),Mc(i,A,k.commentBefore,w),k.comment&&(E=k.comment);else if(Nt(k)){const G=jt(k.key)?k.key:null;G&&(!w&&G.spaceBefore&&A.push(""),Mc(i,A,G.commentBefore,w))}w=!1;let M=sr(k,x,()=>E=null,()=>w=!0);E&&(M+=Mi(M,u,b(E))),w&&E&&(w=!1),A.push(r+M)}let C;if(A.length===0)C=l.start+l.end;else{C=A[0];for(let O=1;O<A.length;++O){const k=A[O];C+=k?`
|
|
108
|
-
${y}${k}`:`
|
|
109
|
-
`}}return e?(C+=`
|
|
110
|
-
`+xa(b(e),y),h&&h()):w&&d&&d(),C}function M6({items:e},n,{flowChars:i,itemIndent:r}){const{indent:l,indentStep:u,flowCollectionPadding:d,options:{commentString:h}}=n;r+=u;const y=Object.assign({},n,{indent:r,inFlow:!0,type:null});let b=!1,x=0;const w=[];for(let O=0;O<e.length;++O){const k=e[O];let E=null;if(jt(k))k.spaceBefore&&w.push(""),Mc(n,w,k.commentBefore,!1),k.comment&&(E=k.comment);else if(Nt(k)){const G=jt(k.key)?k.key:null;G&&(G.spaceBefore&&w.push(""),Mc(n,w,G.commentBefore,!1),G.comment&&(b=!0));const F=jt(k.value)?k.value:null;F?(F.comment&&(E=F.comment),F.commentBefore&&(b=!0)):k.value==null&&G?.comment&&(E=G.comment)}E&&(b=!0);let M=sr(k,y,()=>E=null);O<e.length-1&&(M+=","),E&&(M+=Mi(M,r,h(E))),!b&&(w.length>x||M.includes(`
|
|
111
|
-
`))&&(b=!0),w.push(M),x=w.length}const{start:A,end:C}=i;if(w.length===0)return A+C;if(!b){const O=w.reduce((k,E)=>k+E.length+2,2);b=n.options.lineWidth>0&&O>n.options.lineWidth}if(b){let O=A;for(const k of w)O+=k?`
|
|
112
|
-
${u}${l}${k}`:`
|
|
113
|
-
`;return`${O}
|
|
114
|
-
${l}${C}`}else return`${A}${d}${w.join(" ")}${d}${C}`}function Mc({indent:e,options:{commentString:n}},i,r,l){if(r&&l&&(r=r.replace(/^\n+/,"")),r){const u=xa(n(r),e);i.push(u.trimStart())}}function Bi(e,n){const i=rt(n)?n.value:n;for(const r of e)if(Nt(r)&&(r.key===n||r.key===i||rt(r.key)&&r.key.value===i))return r}class On extends wx{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(ii,n),this.items=[]}static from(n,i,r){const{keepUndefined:l,replacer:u}=r,d=new this(n),h=(y,b)=>{if(typeof u=="function")b=u.call(i,y,b);else if(Array.isArray(u)&&!u.includes(y))return;(b!==void 0||l)&&d.items.push(Dm(y,b,r))};if(i instanceof Map)for(const[y,b]of i)h(y,b);else if(i&&typeof i=="object")for(const y of Object.keys(i))h(y,i[y]);return typeof n.sortMapEntries=="function"&&d.items.sort(n.sortMapEntries),d}add(n,i){let r;Nt(n)?r=n:!n||typeof n!="object"||!("key"in n)?r=new Jt(n,n?.value):r=new Jt(n.key,n.value);const l=Bi(this.items,r.key),u=this.schema?.sortMapEntries;if(l){if(!i)throw new Error(`Key ${r.key} already set`);rt(l.value)&&xx(r.value)?l.value.value=r.value:l.value=r.value}else if(u){const d=this.items.findIndex(h=>u(r,h)<0);d===-1?this.items.push(r):this.items.splice(d,0,r)}else this.items.push(r)}delete(n){const i=Bi(this.items,n);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(n,i){const l=Bi(this.items,n)?.value;return(!i&&rt(l)?l.value:l)??void 0}has(n){return!!Bi(this.items,n)}set(n,i){this.add(new Jt(n,i),!0)}toJSON(n,i,r){const l=r?new r:i?.mapAsMap?new Map:{};i?.onCreate&&i.onCreate(l);for(const u of this.items)kx(i,l,u);return l}toString(n,i,r){if(!n)return JSON.stringify(this);for(const l of this.items)if(!Nt(l))throw new Error(`Map items must all be pairs; found ${JSON.stringify(l)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),Cx(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:r,onComment:i})}}const hr={collection:"map",default:!0,nodeClass:On,tag:"tag:yaml.org,2002:map",resolve(e,n){return Ro(e)||n("Expected a mapping for this tag"),e},createNode:(e,n,i)=>On.from(e,n,i)};class Li extends wx{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(pr,n),this.items=[]}add(n){this.items.push(n)}delete(n){const i=pc(n);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(n,i){const r=pc(n);if(typeof r!="number")return;const l=this.items[r];return!i&&rt(l)?l.value:l}has(n){const i=pc(n);return typeof i=="number"&&i<this.items.length}set(n,i){const r=pc(n);if(typeof r!="number")throw new Error(`Expected a valid index, not ${n}.`);const l=this.items[r];rt(l)&&xx(i)?l.value=i:this.items[r]=i}toJSON(n,i){const r=[];i?.onCreate&&i.onCreate(r);let l=0;for(const u of this.items)r.push(Dn(u,String(l++),i));return r}toString(n,i,r){return n?Cx(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(n,i,r){const{replacer:l}=r,u=new this(n);if(i&&Symbol.iterator in Object(i)){let d=0;for(let h of i){if(typeof l=="function"){const y=i instanceof Set?h:String(d++);h=l.call(i,y,h)}u.items.push(ko(h,void 0,r))}}return u}}function pc(e){let n=rt(e)?e.value:e;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const gr={collection:"seq",default:!0,nodeClass:Li,tag:"tag:yaml.org,2002:seq",resolve(e,n){return Mo(e)||n("Expected a sequence for this tag"),e},createNode:(e,n,i)=>Li.from(e,n,i)},iu={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,n,i,r){return n=Object.assign({actualString:!0},n),Om(e,n,i,r)}},su={identify:e=>e==null,createNode:()=>new Te(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Te(null),stringify:({source:e},n)=>typeof e=="string"&&su.test.test(e)?e:n.options.nullStr},zm={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Te(e[0]==="t"||e[0]==="T"),stringify({source:e,value:n},i){if(e&&zm.test.test(e)){const r=e[0]==="t"||e[0]==="T";if(n===r)return e}return n?i.options.trueStr:i.options.falseStr}};function Vn({format:e,minFractionDigits:n,tag:i,value:r}){if(typeof r=="bigint")return String(r);const l=typeof r=="number"?r:Number(r);if(!isFinite(l))return isNaN(l)?".nan":l<0?"-.inf":".inf";let u=Object.is(r,-0)?"-0":JSON.stringify(r);if(!e&&n&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let d=u.indexOf(".");d<0&&(d=u.length,u+=".");let h=n-(u.length-d-1);for(;h-- >0;)u+="0"}return u}const _x={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vn},Tx={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():Vn(e)}},Ex={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const n=new Te(parseFloat(e)),i=e.indexOf(".");return i!==-1&&e[e.length-1]==="0"&&(n.minFractionDigits=e.length-i-1),n},stringify:Vn},ru=e=>typeof e=="bigint"||Number.isInteger(e),Rm=(e,n,i,{intAsBigInt:r})=>r?BigInt(e):parseInt(e.substring(n),i);function Ox(e,n,i){const{value:r}=e;return ru(r)&&r>=0?i+r.toString(n):Vn(e)}const Dx={identify:e=>ru(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,n,i)=>Rm(e,2,8,i),stringify:e=>Ox(e,8,"0o")},zx={identify:ru,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,n,i)=>Rm(e,0,10,i),stringify:Vn},Rx={identify:e=>ru(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,n,i)=>Rm(e,2,16,i),stringify:e=>Ox(e,16,"0x")},B6=[hr,gr,iu,su,zm,Dx,zx,Rx,_x,Tx,Ex];function u0(e){return typeof e=="bigint"||Number.isInteger(e)}const mc=({value:e})=>JSON.stringify(e),L6=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:mc},{identify:e=>e==null,createNode:()=>new Te(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:mc},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:mc},{identify:u0,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,n,{intAsBigInt:i})=>i?BigInt(e):parseInt(e,10),stringify:({value:e})=>u0(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:mc}],q6={default:!0,tag:"",test:/^/,resolve(e,n){return n(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},U6=[hr,gr].concat(L6,q6),Mm={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,n){if(typeof atob=="function"){const i=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let l=0;l<i.length;++l)r[l]=i.charCodeAt(l);return r}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:n,value:i},r,l,u){if(!i)return"";const d=i;let h;if(typeof btoa=="function"){let y="";for(let b=0;b<d.length;++b)y+=String.fromCharCode(d[b]);h=btoa(y)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=Te.BLOCK_LITERAL),n!==Te.QUOTE_DOUBLE){const y=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),b=Math.ceil(h.length/y),x=new Array(b);for(let w=0,A=0;w<b;++w,A+=y)x[w]=h.substr(A,y);h=x.join(n===Te.BLOCK_LITERAL?`
|
|
115
|
-
`:" ")}return Om({comment:e,type:n,value:h},r,l,u)}};function Mx(e,n){if(Mo(e))for(let i=0;i<e.items.length;++i){let r=e.items[i];if(!Nt(r)){if(Ro(r)){r.items.length>1&&n("Each pair must have its own sequence indicator");const l=r.items[0]||new Jt(new Te(null));if(r.commentBefore&&(l.key.commentBefore=l.key.commentBefore?`${r.commentBefore}
|
|
116
|
-
${l.key.commentBefore}`:r.commentBefore),r.comment){const u=l.value??l.key;u.comment=u.comment?`${r.comment}
|
|
117
|
-
${u.comment}`:r.comment}r=l}e.items[i]=Nt(r)?r:new Jt(r)}}else n("Expected a sequence for this tag");return e}function Bx(e,n,i){const{replacer:r}=i,l=new Li(e);l.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let d of n){typeof r=="function"&&(d=r.call(n,String(u++),d));let h,y;if(Array.isArray(d))if(d.length===2)h=d[0],y=d[1];else throw new TypeError(`Expected [key, value] tuple: ${d}`);else if(d&&d instanceof Object){const b=Object.keys(d);if(b.length===1)h=b[0],y=d[h];else throw new TypeError(`Expected tuple with one key, not ${b.length} keys`)}else h=d;l.items.push(Dm(h,y,i))}return l}const Bm={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Mx,createNode:Bx};class Fs extends Li{constructor(){super(),this.add=On.prototype.add.bind(this),this.delete=On.prototype.delete.bind(this),this.get=On.prototype.get.bind(this),this.has=On.prototype.has.bind(this),this.set=On.prototype.set.bind(this),this.tag=Fs.tag}toJSON(n,i){if(!i)return super.toJSON(n);const r=new Map;i?.onCreate&&i.onCreate(r);for(const l of this.items){let u,d;if(Nt(l)?(u=Dn(l.key,"",i),d=Dn(l.value,u,i)):u=Dn(l,"",i),r.has(u))throw new Error("Ordered maps must not include duplicate keys");r.set(u,d)}return r}static from(n,i,r){const l=Bx(n,i,r),u=new this;return u.items=l.items,u}}Fs.tag="tag:yaml.org,2002:omap";const Lm={collection:"seq",identify:e=>e instanceof Map,nodeClass:Fs,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,n){const i=Mx(e,n),r=[];for(const{key:l}of i.items)rt(l)&&(r.includes(l.value)?n(`Ordered maps must not include duplicate keys: ${l.value}`):r.push(l.value));return Object.assign(new Fs,i)},createNode:(e,n,i)=>Fs.from(e,n,i)};function Lx({value:e,source:n},i){return n&&(e?qx:Ux).test.test(n)?n:e?i.options.trueStr:i.options.falseStr}const qx={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Te(!0),stringify:Lx},Ux={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Te(!1),stringify:Lx},$6={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Vn},I6={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const n=Number(e.value);return isFinite(n)?n.toExponential():Vn(e)}},P6={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const n=new Te(parseFloat(e.replace(/_/g,""))),i=e.indexOf(".");if(i!==-1){const r=e.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(n.minFractionDigits=r.length)}return n},stringify:Vn},Bo=e=>typeof e=="bigint"||Number.isInteger(e);function ou(e,n,i,{intAsBigInt:r}){const l=e[0];if((l==="-"||l==="+")&&(n+=1),e=e.substring(n).replace(/_/g,""),r){switch(i){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const d=BigInt(e);return l==="-"?BigInt(-1)*d:d}const u=parseInt(e,i);return l==="-"?-1*u:u}function qm(e,n,i){const{value:r}=e;if(Bo(r)){const l=r.toString(n);return r<0?"-"+i+l.substr(1):i+l}return Vn(e)}const V6={identify:Bo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,n,i)=>ou(e,2,2,i),stringify:e=>qm(e,2,"0b")},G6={identify:Bo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,n,i)=>ou(e,1,8,i),stringify:e=>qm(e,8,"0")},H6={identify:Bo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,n,i)=>ou(e,0,10,i),stringify:Vn},K6={identify:Bo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,n,i)=>ou(e,2,16,i),stringify:e=>qm(e,16,"0x")};class Xs extends On{constructor(n){super(n),this.tag=Xs.tag}add(n){let i;Nt(n)?i=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?i=new Jt(n.key,null):i=new Jt(n,null),Bi(this.items,i.key)||this.items.push(i)}get(n,i){const r=Bi(this.items,n);return!i&&Nt(r)?rt(r.key)?r.key.value:r.key:r}set(n,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const r=Bi(this.items,n);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Jt(n))}toJSON(n,i){return super.toJSON(n,i,Set)}toString(n,i,r){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(n,i,r){const{replacer:l}=r,u=new this(n);if(i&&Symbol.iterator in Object(i))for(let d of i)typeof l=="function"&&(d=l.call(i,d,d)),u.items.push(Dm(d,null,r));return u}}Xs.tag="tag:yaml.org,2002:set";const Um={collection:"map",identify:e=>e instanceof Set,nodeClass:Xs,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,n,i)=>Xs.from(e,n,i),resolve(e,n){if(Ro(e)){if(e.hasAllNullValues(!0))return Object.assign(new Xs,e);n("Set items must all have null values")}else n("Expected a mapping for this tag");return e}};function $m(e,n){const i=e[0],r=i==="-"||i==="+"?e.substring(1):e,l=d=>n?BigInt(d):Number(d),u=r.replace(/_/g,"").split(":").reduce((d,h)=>d*l(60)+l(h),l(0));return i==="-"?l(-1)*u:u}function $x(e){let{value:n}=e,i=d=>d;if(typeof n=="bigint")i=d=>BigInt(d);else if(isNaN(n)||!isFinite(n))return Vn(e);let r="";n<0&&(r="-",n*=i(-1));const l=i(60),u=[n%l];return n<60?u.unshift(0):(n=(n-u[0])/l,u.unshift(n%l),n>=60&&(n=(n-u[0])/l,u.unshift(n))),r+u.map(d=>String(d).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Ix={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,n,{intAsBigInt:i})=>$m(e,i),stringify:$x},Px={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>$m(e,!1),stringify:$x},lu={identify:e=>e 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(e){const n=e.match(lu.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,l,u,d,h]=n.map(Number),y=n[7]?Number((n[7]+"00").substr(1,3)):0;let b=Date.UTC(i,r-1,l,u||0,d||0,h||0,y);const x=n[8];if(x&&x!=="Z"){let w=$m(x,!1);Math.abs(w)<30&&(w*=60),b-=6e4*w}return new Date(b)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},d0=[hr,gr,iu,su,qx,Ux,V6,G6,H6,K6,$6,I6,P6,Mm,ja,Lm,Bm,Um,Ix,Px,lu],f0=new Map([["core",B6],["failsafe",[hr,gr,iu]],["json",U6],["yaml11",d0],["yaml-1.1",d0]]),p0={binary:Mm,bool:zm,float:Ex,floatExp:Tx,floatNaN:_x,floatTime:Px,int:zx,intHex:Rx,intOct:Dx,intTime:Ix,map:hr,merge:ja,null:su,omap:Lm,pairs:Bm,seq:gr,set:Um,timestamp:lu},Q6={"tag:yaml.org,2002:binary":Mm,"tag:yaml.org,2002:merge":ja,"tag:yaml.org,2002:omap":Lm,"tag:yaml.org,2002:pairs":Bm,"tag:yaml.org,2002:set":Um,"tag:yaml.org,2002:timestamp":lu};function Yf(e,n,i){const r=f0.get(n);if(r&&!e)return i&&!r.includes(ja)?r.concat(ja):r.slice();let l=r;if(!l)if(Array.isArray(e))l=[];else{const u=Array.from(f0.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(e))for(const u of e)l=l.concat(u);else typeof e=="function"&&(l=e(l.slice()));return i&&(l=l.concat(ja)),l.reduce((u,d)=>{const h=typeof d=="string"?p0[d]:d;if(!h){const y=JSON.stringify(d),b=Object.keys(p0).map(x=>JSON.stringify(x)).join(", ");throw new Error(`Unknown custom tag ${y}; use one of ${b}`)}return u.includes(h)||u.push(h),u},[])}const Z6=(e,n)=>e.key<n.key?-1:e.key>n.key?1:0;class Im{constructor({compat:n,customTags:i,merge:r,resolveKnownTags:l,schema:u,sortMapEntries:d,toStringDefaults:h}){this.compat=Array.isArray(n)?Yf(n,"compat"):n?Yf(null,n):null,this.name=typeof u=="string"&&u||"core",this.knownTags=l?Q6:{},this.tags=Yf(i,this.name,r),this.toStringOptions=h??null,Object.defineProperty(this,ii,{value:hr}),Object.defineProperty(this,Xn,{value:iu}),Object.defineProperty(this,pr,{value:gr}),this.sortMapEntries=typeof d=="function"?d:d===!0?Z6:null}clone(){const n=Object.create(Im.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function Y6(e,n){const i=[];let r=n.directives===!0;if(n.directives!==!1&&e.directives){const y=e.directives.toString(e);y?(i.push(y),r=!0):e.directives.docStart&&(r=!0)}r&&i.push("---");const l=Nx(e,n),{commentString:u}=l.options;if(e.commentBefore){i.length!==1&&i.unshift("");const y=u(e.commentBefore);i.unshift(xa(y,""))}let d=!1,h=null;if(e.contents){if(jt(e.contents)){if(e.contents.spaceBefore&&r&&i.push(""),e.contents.commentBefore){const x=u(e.contents.commentBefore);i.push(xa(x,""))}l.forceBlockIndent=!!e.comment,h=e.contents.comment}const y=h?void 0:()=>d=!0;let b=sr(e.contents,l,()=>h=null,y);h&&(b+=Mi(b,"",u(h))),(b[0]==="|"||b[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${b}`:i.push(b)}else i.push(sr(e.contents,l));if(e.directives?.docEnd)if(e.comment){const y=u(e.comment);y.includes(`
|
|
118
|
-
`)?(i.push("..."),i.push(xa(y,""))):i.push(`... ${y}`)}else i.push("...");else{let y=e.comment;y&&d&&(y=y.replace(/^\n+/,"")),y&&((!d||h)&&i[i.length-1]!==""&&i.push(""),i.push(xa(u(y),"")))}return i.join(`
|
|
119
|
-
`)+`
|
|
120
|
-
`}class cu{constructor(n,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,zn,{value:wp});let l=null;typeof i=="function"||Array.isArray(i)?l=i:r===void 0&&i&&(r=i,i=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=u;let{version:d}=u;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(d=this.directives.yaml.version)):this.directives=new Yt({version:d}),this.setSchema(d,r),this.contents=n===void 0?null:this.createNode(n,l,r)}clone(){const n=Object.create(cu.prototype,{[zn]:{value:wp}});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=jt(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){Us(this.contents)&&this.contents.add(n)}addIn(n,i){Us(this.contents)&&this.contents.addIn(n,i)}createAlias(n,i){if(!n.anchor){const r=vx(this);n.anchor=!i||r.has(i)?Sx(i||"a",r):i}return new Em(n.anchor)}createNode(n,i,r){let l;if(typeof i=="function")n=i.call({"":n},"",n),l=i;else if(Array.isArray(i)){const E=G=>typeof G=="number"||G instanceof String||G instanceof Number,M=i.filter(E).map(String);M.length>0&&(i=i.concat(M)),l=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:u,anchorPrefix:d,flow:h,keepUndefined:y,onTagObj:b,tag:x}=r??{},{onAnchor:w,setAnchors:A,sourceObjects:C}=w6(this,d||"a"),O={aliasDuplicateObjects:u??!0,keepUndefined:y??!1,onAnchor:w,onTagObj:b,replacer:l,schema:this.schema,sourceObjects:C},k=ko(n,x,O);return h&&wt(k)&&(k.flow=!0),A(),k}createPair(n,i,r={}){const l=this.createNode(n,null,r),u=this.createNode(i,null,r);return new Jt(l,u)}delete(n){return Us(this.contents)?this.contents.delete(n):!1}deleteIn(n){return vo(n)?this.contents==null?!1:(this.contents=null,!0):Us(this.contents)?this.contents.deleteIn(n):!1}get(n,i){return wt(this.contents)?this.contents.get(n,i):void 0}getIn(n,i){return vo(n)?!i&&rt(this.contents)?this.contents.value:this.contents:wt(this.contents)?this.contents.getIn(n,i):void 0}has(n){return wt(this.contents)?this.contents.has(n):!1}hasIn(n){return vo(n)?this.contents!==void 0:wt(this.contents)?this.contents.hasIn(n):!1}set(n,i){this.contents==null?this.contents=Rc(this.schema,[n],i):Us(this.contents)&&this.contents.set(n,i)}setIn(n,i){vo(n)?this.contents=i:this.contents==null?this.contents=Rc(this.schema,Array.from(n),i):Us(this.contents)&&this.contents.setIn(n,i)}setSchema(n,i={}){typeof n=="number"&&(n=String(n));let r;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Yt({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Yt({version:n}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const l=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${l}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new Im(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:i,mapAsMap:r,maxAliasCount:l,onAnchor:u,reviver:d}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},y=Dn(this.contents,i??"",h);if(typeof u=="function")for(const{count:b,res:x}of h.anchors.values())u(x,b);return typeof d=="function"?Hs(d,{"":y},"",y):y}toJSON(n,i){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:i})}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 i=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return Y6(this,n)}}function Us(e){if(wt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Vx extends Error{constructor(n,i,r,l){super(),this.name=n,this.code=r,this.message=l,this.pos=i}}class hc extends Vx{constructor(n,i,r){super("YAMLParseError",n,i,r)}}class F6 extends Vx{constructor(n,i,r){super("YAMLWarning",n,i,r)}}const m0=(e,n)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(h=>n.linePos(h));const{line:r,col:l}=i.linePos[0];i.message+=` at line ${r}, column ${l}`;let u=l-1,d=e.substring(n.lineStarts[r-1],n.lineStarts[r]).replace(/[\n\r]+$/,"");if(u>=60&&d.length>80){const h=Math.min(u-39,d.length-79);d="…"+d.substring(h),u-=h-1}if(d.length>80&&(d=d.substring(0,79)+"…"),r>1&&/^ *$/.test(d.substring(0,u))){let h=e.substring(n.lineStarts[r-2],n.lineStarts[r-1]);h.length>80&&(h=h.substring(0,79)+`…
|
|
121
|
-
`),d=h+d}if(/[^ ]/.test(d)){let h=1;const y=i.linePos[1];y?.line===r&&y.col>l&&(h=Math.max(1,Math.min(y.col-l,80-u)));const b=" ".repeat(u)+"^".repeat(h);i.message+=`:
|
|
122
|
-
|
|
123
|
-
${d}
|
|
124
|
-
${b}
|
|
125
|
-
`}};function rr(e,{flow:n,indicator:i,next:r,offset:l,onError:u,parentIndent:d,startOnNewline:h}){let y=!1,b=h,x=h,w="",A="",C=!1,O=!1,k=null,E=null,M=null,G=null,F=null,H=null,X=null;for(const R of e)switch(O&&(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"),O=!1),k&&(b&&R.type!=="comment"&&R.type!=="newline"&&u(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),k=null),R.type){case"space":!n&&(i!=="doc-start"||r?.type!=="flow-collection")&&R.source.includes(" ")&&(k=R),x=!0;break;case"comment":{x||u(R,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const le=R.source.substring(1)||" ";w?w+=A+le:w=le,A="",b=!1;break}case"newline":b?w?w+=R.source:(!H||i!=="seq-item-ind")&&(y=!0):A+=R.source,b=!0,C=!0,(E||M)&&(G=R),x=!0;break;case"anchor":E&&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),E=R,X??(X=R.offset),b=!1,x=!1,O=!0;break;case"tag":{M&&u(R,"MULTIPLE_TAGS","A node can have at most one tag"),M=R,X??(X=R.offset),b=!1,x=!1,O=!0;break}case i:(E||M)&&u(R,"BAD_PROP_ORDER",`Anchors and tags must be after the ${R.source} indicator`),H&&u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.source} in ${n??"collection"}`),H=R,b=i==="seq-item-ind"||i==="explicit-key-ind",x=!1;break;case"comma":if(n){F&&u(R,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),F=R,b=!1,x=!1;break}default:u(R,"UNEXPECTED_TOKEN",`Unexpected ${R.type} token`),b=!1,x=!1}const oe=e[e.length-1],z=oe?oe.offset+oe.source.length:l;return O&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&u(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k&&(b&&k.indent<=d||r?.type==="block-map"||r?.type==="block-seq")&&u(k,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:F,found:H,spaceBefore:y,comment:w,hasNewline:C,anchor:E,tag:M,newlineAfterProp:G,end:z,start:X??z}}function Co(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
126
|
-
`))return!0;if(e.end){for(const n of e.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of e.items){for(const i of n.start)if(i.type==="newline")return!0;if(n.sep){for(const i of n.sep)if(i.type==="newline")return!0}if(Co(n.key)||Co(n.value))return!0}return!1;default:return!0}}function kp(e,n,i){if(n?.type==="flow-collection"){const r=n.end[0];r.indent===e&&(r.source==="]"||r.source==="}")&&Co(n)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Gx(e,n,i){const{uniqueKeys:r}=e.options;if(r===!1)return!1;const l=typeof r=="function"?r:(u,d)=>u===d||rt(u)&&rt(d)&&u.value===d.value;return n.some(u=>l(u.key,i))}const h0="All mapping items must start at the same column";function X6({composeNode:e,composeEmptyNode:n},i,r,l,u){const d=u?.nodeClass??On,h=new d(i.schema);i.atRoot&&(i.atRoot=!1);let y=r.offset,b=null;for(const x of r.items){const{start:w,key:A,sep:C,value:O}=x,k=rr(w,{indicator:"explicit-key-ind",next:A??C?.[0],offset:y,onError:l,parentIndent:r.indent,startOnNewline:!0}),E=!k.found;if(E){if(A&&(A.type==="block-seq"?l(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in A&&A.indent!==r.indent&&l(y,"BAD_INDENT",h0)),!k.anchor&&!k.tag&&!C){b=k.end,k.comment&&(h.comment?h.comment+=`
|
|
127
|
-
`+k.comment:h.comment=k.comment);continue}(k.newlineAfterProp||Co(A))&&l(A??w[w.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else k.found?.indent!==r.indent&&l(y,"BAD_INDENT",h0);i.atKey=!0;const M=k.end,G=A?e(i,A,k,l):n(i,M,w,null,k,l);i.schema.compat&&kp(r.indent,A,l),i.atKey=!1,Gx(i,h.items,G)&&l(M,"DUPLICATE_KEY","Map keys must be unique");const F=rr(C??[],{indicator:"map-value-ind",next:O,offset:G.range[2],onError:l,parentIndent:r.indent,startOnNewline:!A||A.type==="block-scalar"});if(y=F.end,F.found){E&&(O?.type==="block-map"&&!F.hasNewline&&l(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&k.start<F.found.offset-1024&&l(G.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const H=O?e(i,O,F,l):n(i,y,C,null,F,l);i.schema.compat&&kp(r.indent,O,l),y=H.range[2];const X=new Jt(G,H);i.options.keepSourceTokens&&(X.srcToken=x),h.items.push(X)}else{E&&l(G.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),F.comment&&(G.comment?G.comment+=`
|
|
128
|
-
`+F.comment:G.comment=F.comment);const H=new Jt(G);i.options.keepSourceTokens&&(H.srcToken=x),h.items.push(H)}}return b&&b<y&&l(b,"IMPOSSIBLE","Map comment with trailing content"),h.range=[r.offset,y,b??y],h}function J6({composeNode:e,composeEmptyNode:n},i,r,l,u){const d=u?.nodeClass??Li,h=new d(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=r.offset,b=null;for(const{start:x,value:w}of r.items){const A=rr(x,{indicator:"seq-item-ind",next:w,offset:y,onError:l,parentIndent:r.indent,startOnNewline:!0});if(!A.found)if(A.anchor||A.tag||w)w?.type==="block-seq"?l(A.end,"BAD_INDENT","All sequence items must start at the same column"):l(y,"MISSING_CHAR","Sequence item without - indicator");else{b=A.end,A.comment&&(h.comment=A.comment);continue}const C=w?e(i,w,A,l):n(i,A.end,x,null,A,l);i.schema.compat&&kp(r.indent,w,l),y=C.range[2],h.items.push(C)}return h.range=[r.offset,y,b??y],h}function Lo(e,n,i,r){let l="";if(e){let u=!1,d="";for(const h of e){const{source:y,type:b}=h;switch(b){case"space":u=!0;break;case"comment":{i&&!u&&r(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const x=y.substring(1)||" ";l?l+=d+x:l=x,d="";break}case"newline":l&&(d+=y),u=!0;break;default:r(h,"UNEXPECTED_TOKEN",`Unexpected ${b} at node end`)}n+=y.length}}return{comment:l,offset:n}}const Ff="Block collections are not allowed within flow collections",Xf=e=>e&&(e.type==="block-map"||e.type==="block-seq");function W6({composeNode:e,composeEmptyNode:n},i,r,l,u){const d=r.start.source==="{",h=d?"flow map":"flow sequence",y=u?.nodeClass??(d?On:Li),b=new y(i.schema);b.flow=!0;const x=i.atRoot;x&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let w=r.offset+r.start.source.length;for(let E=0;E<r.items.length;++E){const M=r.items[E],{start:G,key:F,sep:H,value:X}=M,oe=rr(G,{flow:h,indicator:"explicit-key-ind",next:F??H?.[0],offset:w,onError:l,parentIndent:r.indent,startOnNewline:!1});if(!oe.found){if(!oe.anchor&&!oe.tag&&!H&&!X){E===0&&oe.comma?l(oe.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):E<r.items.length-1&&l(oe.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),oe.comment&&(b.comment?b.comment+=`
|
|
129
|
-
`+oe.comment:b.comment=oe.comment),w=oe.end;continue}!d&&i.options.strict&&Co(F)&&l(F,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(E===0)oe.comma&&l(oe.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(oe.comma||l(oe.start,"MISSING_CHAR",`Missing , between ${h} items`),oe.comment){let z="";e:for(const R of G)switch(R.type){case"comma":case"space":break;case"comment":z=R.source.substring(1);break e;default:break e}if(z){let R=b.items[b.items.length-1];Nt(R)&&(R=R.value??R.key),R.comment?R.comment+=`
|
|
130
|
-
`+z:R.comment=z,oe.comment=oe.comment.substring(z.length+1)}}if(!d&&!H&&!oe.found){const z=X?e(i,X,oe,l):n(i,oe.end,H,null,oe,l);b.items.push(z),w=z.range[2],Xf(X)&&l(z.range,"BLOCK_IN_FLOW",Ff)}else{i.atKey=!0;const z=oe.end,R=F?e(i,F,oe,l):n(i,z,G,null,oe,l);Xf(F)&&l(R.range,"BLOCK_IN_FLOW",Ff),i.atKey=!1;const le=rr(H??[],{flow:h,indicator:"map-value-ind",next:X,offset:R.range[2],onError:l,parentIndent:r.indent,startOnNewline:!1});if(le.found){if(!d&&!oe.found&&i.options.strict){if(H)for(const Se of H){if(Se===le.found)break;if(Se.type==="newline"){l(Se,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}oe.start<le.found.offset-1024&&l(le.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else X&&("source"in X&&X.source?.[0]===":"?l(X,"MISSING_CHAR",`Missing space after : in ${h}`):l(le.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const ye=X?e(i,X,le,l):le.found?n(i,le.end,H,null,le,l):null;ye?Xf(X)&&l(ye.range,"BLOCK_IN_FLOW",Ff):le.comment&&(R.comment?R.comment+=`
|
|
131
|
-
`+le.comment:R.comment=le.comment);const ze=new Jt(R,ye);if(i.options.keepSourceTokens&&(ze.srcToken=M),d){const Se=b;Gx(i,Se.items,R)&&l(z,"DUPLICATE_KEY","Map keys must be unique"),Se.items.push(ze)}else{const Se=new On(i.schema);Se.flow=!0,Se.items.push(ze);const Me=(ye??R).range;Se.range=[R.range[0],Me[1],Me[2]],b.items.push(Se)}w=ye?ye.range[2]:le.end}}const A=d?"}":"]",[C,...O]=r.end;let k=w;if(C?.source===A)k=C.offset+C.source.length;else{const E=h[0].toUpperCase()+h.substring(1),M=x?`${E} must end with a ${A}`:`${E} in block collection must be sufficiently indented and end with a ${A}`;l(w,x?"MISSING_CHAR":"BAD_INDENT",M),C&&C.source.length!==1&&O.unshift(C)}if(O.length>0){const E=Lo(O,k,i.options.strict,l);E.comment&&(b.comment?b.comment+=`
|
|
132
|
-
`+E.comment:b.comment=E.comment),b.range=[r.offset,k,E.offset]}else b.range=[r.offset,k,k];return b}function Jf(e,n,i,r,l,u){const d=i.type==="block-map"?X6(e,n,i,r,u):i.type==="block-seq"?J6(e,n,i,r,u):W6(e,n,i,r,u),h=d.constructor;return l==="!"||l===h.tagName?(d.tag=h.tagName,d):(l&&(d.tag=l),d)}function eq(e,n,i,r,l){const u=r.tag,d=u?n.directives.tagName(u.source,A=>l(u,"TAG_RESOLVE_FAILED",A)):null;if(i.type==="block-seq"){const{anchor:A,newlineAfterProp:C}=r,O=A&&u?A.offset>u.offset?A:u:A??u;O&&(!C||C.offset<O.offset)&&l(O,"MISSING_CHAR","Missing newline after block sequence props")}const h=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!u||!d||d==="!"||d===On.tagName&&h==="map"||d===Li.tagName&&h==="seq")return Jf(e,n,i,l,d);let y=n.schema.tags.find(A=>A.tag===d&&A.collection===h);if(!y){const A=n.schema.knownTags[d];if(A?.collection===h)n.schema.tags.push(Object.assign({},A,{default:!1})),y=A;else return A?l(u,"BAD_COLLECTION_TYPE",`${A.tag} used for ${h} collection, but expects ${A.collection??"scalar"}`,!0):l(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${d}`,!0),Jf(e,n,i,l,d)}const b=Jf(e,n,i,l,d,y),x=y.resolve?.(b,A=>l(u,"TAG_RESOLVE_FAILED",A),n.options)??b,w=jt(x)?x:new Te(x);return w.range=b.range,w.tag=d,y?.format&&(w.format=y.format),w}function tq(e,n,i){const r=n.offset,l=nq(n,e.options.strict,i);if(!l)return{value:"",type:null,comment:"",range:[r,r,r]};const u=l.mode===">"?Te.BLOCK_FOLDED:Te.BLOCK_LITERAL,d=n.source?aq(n.source):[];let h=d.length;for(let k=d.length-1;k>=0;--k){const E=d[k][1];if(E===""||E==="\r")h=k;else break}if(h===0){const k=l.chomp==="+"&&d.length>0?`
|
|
133
|
-
`.repeat(Math.max(1,d.length-1)):"";let E=r+l.length;return n.source&&(E+=n.source.length),{value:k,type:u,comment:l.comment,range:[r,E,E]}}let y=n.indent+l.indent,b=n.offset+l.length,x=0;for(let k=0;k<h;++k){const[E,M]=d[k];if(M===""||M==="\r")l.indent===0&&E.length>y&&(y=E.length);else{E.length<y&&i(b+E.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),l.indent===0&&(y=E.length),x=k,y===0&&!e.atRoot&&i(b,"BAD_INDENT","Block scalar values in collections must be indented");break}b+=E.length+M.length+1}for(let k=d.length-1;k>=h;--k)d[k][0].length>y&&(h=k+1);let w="",A="",C=!1;for(let k=0;k<x;++k)w+=d[k][0].slice(y)+`
|
|
134
|
-
`;for(let k=x;k<h;++k){let[E,M]=d[k];b+=E.length+M.length+1;const G=M[M.length-1]==="\r";if(G&&(M=M.slice(0,-1)),M&&E.length<y){const H=`Block scalar lines must not be less indented than their ${l.indent?"explicit indentation indicator":"first line"}`;i(b-M.length-(G?2:1),"BAD_INDENT",H),E=""}u===Te.BLOCK_LITERAL?(w+=A+E.slice(y)+M,A=`
|
|
135
|
-
`):E.length>y||M[0]===" "?(A===" "?A=`
|
|
136
|
-
`:!C&&A===`
|
|
137
|
-
`&&(A=`
|
|
138
|
-
|
|
139
|
-
`),w+=A+E.slice(y)+M,A=`
|
|
140
|
-
`,C=!0):M===""?A===`
|
|
141
|
-
`?w+=`
|
|
142
|
-
`:A=`
|
|
143
|
-
`:(w+=A+M,A=" ",C=!1)}switch(l.chomp){case"-":break;case"+":for(let k=h;k<d.length;++k)w+=`
|
|
144
|
-
`+d[k][0].slice(y);w[w.length-1]!==`
|
|
145
|
-
`&&(w+=`
|
|
146
|
-
`);break;default:w+=`
|
|
147
|
-
`}const O=r+l.length+n.source.length;return{value:w,type:u,comment:l.comment,range:[r,O,O]}}function nq({offset:e,props:n},i,r){if(n[0].type!=="block-scalar-header")return r(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:l}=n[0],u=l[0];let d=0,h="",y=-1;for(let A=1;A<l.length;++A){const C=l[A];if(!h&&(C==="-"||C==="+"))h=C;else{const O=Number(C);!d&&O?d=O:y===-1&&(y=e+A)}}y!==-1&&r(y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${l}`);let b=!1,x="",w=l.length;for(let A=1;A<n.length;++A){const C=n[A];switch(C.type){case"space":b=!0;case"newline":w+=C.source.length;break;case"comment":i&&!b&&r(C,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),w+=C.source.length,x=C.source.substring(1);break;case"error":r(C,"UNEXPECTED_TOKEN",C.message),w+=C.source.length;break;default:{const O=`Unexpected token in block scalar header: ${C.type}`;r(C,"UNEXPECTED_TOKEN",O);const k=C.source;k&&typeof k=="string"&&(w+=k.length)}}}return{mode:u,indent:d,chomp:h,comment:x,length:w}}function aq(e){const n=e.split(/\n( *)/),i=n[0],r=i.match(/^( *)/),u=[r?.[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let d=1;d<n.length;d+=2)u.push([n[d],n[d+1]]);return u}function iq(e,n,i){const{offset:r,type:l,source:u,end:d}=e;let h,y;const b=(A,C,O)=>i(r+A,C,O);switch(l){case"scalar":h=Te.PLAIN,y=sq(u,b);break;case"single-quoted-scalar":h=Te.QUOTE_SINGLE,y=rq(u,b);break;case"double-quoted-scalar":h=Te.QUOTE_DOUBLE,y=oq(u,b);break;default:return i(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${l}`),{value:"",type:null,comment:"",range:[r,r+u.length,r+u.length]}}const x=r+u.length,w=Lo(d,x,n,i);return{value:y,type:h,comment:w.comment,range:[r,x,w.offset]}}function sq(e,n){let i="";switch(e[0]){case" ":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${e[0]}`;break}case"@":case"`":{i=`reserved character ${e[0]}`;break}}return i&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),Hx(e)}function rq(e,n){return(e[e.length-1]!=="'"||e.length===1)&&n(e.length,"MISSING_CHAR","Missing closing 'quote"),Hx(e.slice(1,-1)).replace(/''/g,"'")}function Hx(e){let n,i;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
148
|
-
`,"sy"),i=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
149
|
-
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=n.exec(e);if(!r)return e;let l=r[1],u=" ",d=n.lastIndex;for(i.lastIndex=d;r=i.exec(e);)r[1]===""?u===`
|
|
150
|
-
`?l+=u:u=`
|
|
151
|
-
`:(l+=u+r[1],u=" "),d=i.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=d,r=h.exec(e),l+u+(r?.[1]??"")}function oq(e,n){let i="";for(let r=1;r<e.length-1;++r){const l=e[r];if(!(l==="\r"&&e[r+1]===`
|
|
152
|
-
`))if(l===`
|
|
153
|
-
`){const{fold:u,offset:d}=lq(e,r);i+=u,r=d}else if(l==="\\"){let u=e[++r];const d=cq[u];if(d)i+=d;else if(u===`
|
|
154
|
-
`)for(u=e[r+1];u===" "||u===" ";)u=e[++r+1];else if(u==="\r"&&e[r+1]===`
|
|
155
|
-
`)for(u=e[++r+1];u===" "||u===" ";)u=e[++r+1];else if(u==="x"||u==="u"||u==="U"){const h={x:2,u:4,U:8}[u];i+=uq(e,r+1,h,n),r+=h}else{const h=e.substr(r-1,2);n(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),i+=h}}else if(l===" "||l===" "){const u=r;let d=e[r+1];for(;d===" "||d===" ";)d=e[++r+1];d!==`
|
|
156
|
-
`&&!(d==="\r"&&e[r+2]===`
|
|
157
|
-
`)&&(i+=r>u?e.slice(u,r+1):l)}else i+=l}return(e[e.length-1]!=='"'||e.length===1)&&n(e.length,"MISSING_CHAR",'Missing closing "quote'),i}function lq(e,n){let i="",r=e[n+1];for(;(r===" "||r===" "||r===`
|
|
158
|
-
`||r==="\r")&&!(r==="\r"&&e[n+2]!==`
|
|
159
|
-
`);)r===`
|
|
160
|
-
`&&(i+=`
|
|
161
|
-
`),n+=1,r=e[n+1];return i||(i=" "),{fold:i,offset:n}}const cq={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
162
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function uq(e,n,i,r){const l=e.substr(n,i),d=l.length===i&&/^[0-9a-fA-F]+$/.test(l)?parseInt(l,16):NaN;if(isNaN(d)){const h=e.substr(n-2,i+2);return r(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(d)}function Kx(e,n,i,r){const{value:l,type:u,comment:d,range:h}=n.type==="block-scalar"?tq(e,n,r):iq(n,e.options.strict,r),y=i?e.directives.tagName(i.source,w=>r(i,"TAG_RESOLVE_FAILED",w)):null;let b;e.options.stringKeys&&e.atKey?b=e.schema[Xn]:y?b=dq(e.schema,l,y,i,r):n.type==="scalar"?b=fq(e,l,n,r):b=e.schema[Xn];let x;try{const w=b.resolve(l,A=>r(i??n,"TAG_RESOLVE_FAILED",A),e.options);x=rt(w)?w:new Te(w)}catch(w){const A=w instanceof Error?w.message:String(w);r(i??n,"TAG_RESOLVE_FAILED",A),x=new Te(l)}return x.range=h,x.source=l,u&&(x.type=u),y&&(x.tag=y),b.format&&(x.format=b.format),d&&(x.comment=d),x}function dq(e,n,i,r,l){if(i==="!")return e[Xn];const u=[];for(const h of e.tags)if(!h.collection&&h.tag===i)if(h.default&&h.test)u.push(h);else return h;for(const h of u)if(h.test?.test(n))return h;const d=e.knownTags[i];return d&&!d.collection?(e.tags.push(Object.assign({},d,{default:!1,test:void 0})),d):(l(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),e[Xn])}function fq({atKey:e,directives:n,schema:i},r,l,u){const d=i.tags.find(h=>(h.default===!0||e&&h.default==="key")&&h.test?.test(r))||i[Xn];if(i.compat){const h=i.compat.find(y=>y.default&&y.test?.test(r))??i[Xn];if(d.tag!==h.tag){const y=n.tagString(d.tag),b=n.tagString(h.tag),x=`Value may be parsed as either ${y} or ${b}`;u(l,"TAG_RESOLVE_FAILED",x,!0)}}return d}function pq(e,n,i){if(n){i??(i=n.length);for(let r=i-1;r>=0;--r){let l=n[r];switch(l.type){case"space":case"comment":case"newline":e-=l.source.length;continue}for(l=n[++r];l?.type==="space";)e+=l.source.length,l=n[++r];break}}return e}const mq={composeNode:Qx,composeEmptyNode:Pm};function Qx(e,n,i,r){const l=e.atKey,{spaceBefore:u,comment:d,anchor:h,tag:y}=i;let b,x=!0;switch(n.type){case"alias":b=hq(e,n,r),(h||y)&&r(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":b=Kx(e,n,y,r),h&&(b.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":b=eq(mq,e,n,i,r),h&&(b.anchor=h.source.substring(1));break;default:{const w=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;r(n,"UNEXPECTED_TOKEN",w),b=Pm(e,n.offset,void 0,null,i,r),x=!1}}return h&&b.anchor===""&&r(h,"BAD_ALIAS","Anchor cannot be an empty string"),l&&e.options.stringKeys&&(!rt(b)||typeof b.value!="string"||b.tag&&b.tag!=="tag:yaml.org,2002:str")&&r(y??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(b.spaceBefore=!0),d&&(n.type==="scalar"&&n.source===""?b.comment=d:b.commentBefore=d),e.options.keepSourceTokens&&x&&(b.srcToken=n),b}function Pm(e,n,i,r,{spaceBefore:l,comment:u,anchor:d,tag:h,end:y},b){const x={type:"scalar",offset:pq(n,i,r),indent:-1,source:""},w=Kx(e,x,h,b);return d&&(w.anchor=d.source.substring(1),w.anchor===""&&b(d,"BAD_ALIAS","Anchor cannot be an empty string")),l&&(w.spaceBefore=!0),u&&(w.comment=u,w.range[2]=y),w}function hq({options:e},{offset:n,source:i,end:r},l){const u=new Em(i.substring(1));u.source===""&&l(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&l(n+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const d=n+i.length,h=Lo(r,d,e.strict,l);return u.range=[n,d,h.offset],h.comment&&(u.comment=h.comment),u}function gq(e,n,{offset:i,start:r,value:l,end:u},d){const h=Object.assign({_directives:n},e),y=new cu(void 0,h),b={atKey:!1,atRoot:!0,directives:y.directives,options:y.options,schema:y.schema},x=rr(r,{indicator:"doc-start",next:l??u?.[0],offset:i,onError:d,parentIndent:0,startOnNewline:!0});x.found&&(y.directives.docStart=!0,l&&(l.type==="block-map"||l.type==="block-seq")&&!x.hasNewline&&d(x.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),y.contents=l?Qx(b,l,x,d):Pm(b,x.end,r,null,x,d);const w=y.contents.range[2],A=Lo(u,w,!1,d);return A.comment&&(y.comment=A.comment),y.range=[i,w,A.offset],y}function yo(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:n,source:i}=e;return[n,n+(typeof i=="string"?i.length:1)]}function g0(e){let n="",i=!1,r=!1;for(let l=0;l<e.length;++l){const u=e[l];switch(u[0]){case"#":n+=(n===""?"":r?`
|
|
163
|
-
|
|
164
|
-
`:`
|
|
165
|
-
`)+(u.substring(1)||" "),i=!0,r=!1;break;case"%":e[l+1]?.[0]!=="#"&&(l+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:n,afterEmptyLine:r}}class yq{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,l,u)=>{const d=yo(i);u?this.warnings.push(new F6(d,r,l)):this.errors.push(new hc(d,r,l))},this.directives=new Yt({version:n.version||"1.2"}),this.options=n}decorate(n,i){const{comment:r,afterEmptyLine:l}=g0(this.prelude);if(r){const u=n.contents;if(i)n.comment=n.comment?`${n.comment}
|
|
166
|
-
${r}`:r;else if(l||n.directives.docStart||!u)n.commentBefore=r;else if(wt(u)&&!u.flow&&u.items.length>0){let d=u.items[0];Nt(d)&&(d=d.key);const h=d.commentBefore;d.commentBefore=h?`${r}
|
|
167
|
-
${h}`:r}else{const d=u.commentBefore;u.commentBefore=d?`${r}
|
|
168
|
-
${d}`:r}}i?(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:g0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,i=!1,r=-1){for(const l of n)yield*this.next(l);yield*this.end(i,r)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(i,r,l)=>{const u=yo(n);u[0]+=i,this.onError(u,"BAD_DIRECTIVE",r,l)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const i=gq(this.options,this.directives,n,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const i=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,r=new hc(yo(n),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new hc(yo(n),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=Lo(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
|
169
|
-
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new hc(yo(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const r=Object.assign({_directives:this.directives},this.options),l=new cu(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),l.range=[0,i,i],this.decorate(l,!1),yield l}}}const Zx="\uFEFF",Yx="",Fx="",Cp="";function bq(e){switch(e){case Zx:return"byte-order-mark";case Yx:return"doc-mode";case Fx:return"flow-error-end";case Cp:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
170
|
-
`:case`\r
|
|
171
|
-
`: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(e[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 Un(e){switch(e){case void 0:case" ":case`
|
|
172
|
-
`:case"\r":case" ":return!0;default:return!1}}const y0=new Set("0123456789ABCDEFabcdef"),vq=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),gc=new Set(",[]{}"),Sq=new Set(` ,[]{}
|
|
173
|
-
\r `),Wf=e=>!e||Sq.has(e);class xq{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,i=!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=!i;let r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let n=this.pos,i=this.buffer[n];for(;i===" "||i===" ";)i=this.buffer[++n];return!i||i==="#"||i===`
|
|
174
|
-
`?!0:i==="\r"?this.buffer[n+1]===`
|
|
175
|
-
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let i=this.buffer[n];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+n];if(i==="\r"){const l=this.buffer[r+n+1];if(l===`
|
|
176
|
-
`||!l&&!this.atEnd)return n+r+1}return i===`
|
|
177
|
-
`||r>=this.indentNext||!i&&!this.atEnd?n+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(n,3);if((r==="---"||r==="...")&&Un(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(`
|
|
178
|
-
`,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]===Zx&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let i=n.length,r=n.indexOf("#");for(;r!==-1;){const u=n[r-1];if(u===" "||u===" "){i=r-1;break}else r=n.indexOf("#",r+1)}for(;;){const u=n[i-1];if(u===" "||u===" ")i-=1;else break}const l=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-l),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-i),yield*this.pushNewline(),"stream"}return yield Yx,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 i=this.peek(3);if((i==="---"||i==="...")&&Un(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Un(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Un(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(n[i]){case"#":yield*this.pushCount(n.length-i);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(Wf),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,i,r=-1;do n=yield*this.pushNewline(),n>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(n+i>0);const l=this.getLine();if(l===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&l[0]!=="#"||r===0&&(l.startsWith("---")||l.startsWith("..."))&&Un(l[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(l[0]==="]"||l[0]==="}")))return this.flowLevel=0,yield Fx,yield*this.parseLineStart();let u=0;for(;l[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),l[u]){case void 0:return"flow";case"#":return yield*this.pushCount(l.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(Wf),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const d=this.charAt(1);if(this.flowKey||Un(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 i=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let u=0;for(;this.buffer[i-1-u]==="\\";)u+=1;if(u%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let l=r.indexOf(`
|
|
179
|
-
`,this.pos);if(l!==-1){for(;l!==-1;){const u=this.continueScalar(l+1);if(u===-1)break;l=r.indexOf(`
|
|
180
|
-
`,u)}l!==-1&&(i=l-(r[l-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const i=this.buffer[++n];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>Un(i)||i==="#")}*parseBlockScalar(){let n=this.pos-1,i=0,r;e:for(let u=this.pos;r=this.buffer[u];++u)switch(r){case" ":i+=1;break;case`
|
|
181
|
-
`:n=u,i=0;break;case"\r":{const d=this.buffer[u+1];if(!d&&!this.atEnd)return this.setNext("block-scalar");if(d===`
|
|
182
|
-
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i: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(`
|
|
183
|
-
`,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let l=n+1;for(r=this.buffer[l];r===" ";)r=this.buffer[++l];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
|
184
|
-
`;)r=this.buffer[++l];n=l-1}else if(!this.blockScalarKeep)do{let u=n-1,d=this.buffer[u];d==="\r"&&(d=this.buffer[--u]);const h=u;for(;d===" ";)d=this.buffer[--u];if(d===`
|
|
185
|
-
`&&u>=this.pos&&u+1+i>h)n=u;else break}while(!0);return yield Cp,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,l;for(;l=this.buffer[++r];)if(l===":"){const u=this.buffer[r+1];if(Un(u)||n&&gc.has(u))break;i=r}else if(Un(l)){let u=this.buffer[r+1];if(l==="\r"&&(u===`
|
|
186
|
-
`?(r+=1,l=`
|
|
187
|
-
`,u=this.buffer[r+1]):i=r),u==="#"||n&&gc.has(u))break;if(l===`
|
|
188
|
-
`){const d=this.continueScalar(r+1);if(d===-1)break;r=Math.max(r,d-2)}}else{if(n&&gc.has(l))break;i=r}return!l&&!this.atEnd?this.setNext("plain-scalar"):(yield Cp,yield*this.pushToIndex(i+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,i){const r=this.buffer.slice(this.pos,n);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Wf))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,i=this.charAt(1);if(Un(i)||n&&gc.has(i))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,i=this.buffer[n];for(;!Un(i)&&i!==">";)i=this.buffer[++n];return yield*this.pushToIndex(i===">"?n+1:n,!1)}else{let n=this.pos+1,i=this.buffer[n];for(;i;)if(vq.has(i))i=this.buffer[++n];else if(i==="%"&&y0.has(this.buffer[n+1])&&y0.has(this.buffer[n+2]))i=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
|
|
189
|
-
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
|
|
190
|
-
`?yield*this.pushCount(2):0}*pushSpaces(n){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||n&&r===" ");const l=i-this.pos;return l>0&&(yield this.buffer.substr(this.pos,l),this.pos=i),l}*pushUntil(n){let i=this.pos,r=this.buffer[i];for(;!n(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class wq{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let i=0,r=this.lineStarts.length;for(;i<r;){const u=i+r>>1;this.lineStarts[u]<n?i=u+1:r=u}if(this.lineStarts[i]===n)return{line:i+1,col:1};if(i===0)return{line:0,col:n};const l=this.lineStarts[i-1];return{line:i,col:n-l+1}}}}function ai(e,n){for(let i=0;i<e.length;++i)if(e[i].type===n)return!0;return!1}function b0(e){for(let n=0;n<e.length;++n)switch(e[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Xx(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function yc(e){switch(e.type){case"document":return e.start;case"block-map":{const n=e.items[e.items.length-1];return n.sep??n.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function $s(e){if(e.length===0)return[];let n=e.length;e:for(;--n>=0;)switch(e[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;e[++n]?.type==="space";);return e.splice(n,e.length)}function v0(e){if(e.start.type==="flow-seq-start")for(const n of e.items)n.sep&&!n.value&&!ai(n.start,"explicit-key-ind")&&!ai(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Xx(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 jq{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 xq,this.onNewLine=n}*parse(n,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(n,i))yield*this.next(r);i||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const i=bq(n);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){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 r=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:r,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 i=n??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&v0(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const l=r.items[r.items.length-1];if(l.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(l.sep)l.value=i;else{Object.assign(l,{key:i,sep:[]}),this.onKeyLine=!l.explicitKey;return}break}case"block-seq":{const l=r.items[r.items.length-1];l.value?r.items.push({start:[],value:i}):l.value=i;break}case"flow-collection":{const l=r.items[r.items.length-1];!l||l.value?r.items.push({start:[],key:i,sep:[]}):l.sep?l.value=i:Object.assign(l,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const l=i.items[i.items.length-1];l&&!l.sep&&!l.value&&l.start.length>0&&b0(l.start)===-1&&(i.indent===0||l.start.every(u=>u.type!=="comment"||u.indent<i.indent))&&(r.type==="document"?r.end=l.start:r.items.push({start:l.start}),i.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":{b0(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 i=this.startBlockValue(n);i?this.stack.push(i):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 i=yc(this.peek(2)),r=$s(i);let l;n.end?(l=n.end,l.push(this.sourceToken),delete n.end):l=[this.sourceToken];const u={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:r,key:n,sep:l}]};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 i=this.source.indexOf(`
|
|
191
|
-
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
192
|
-
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){const i=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const r="end"in i.value?i.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)n.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,n.indent)){const l=n.items[n.items.length-2]?.value?.end;if(Array.isArray(l)){Array.prototype.push.apply(l,i.start),l.push(this.sourceToken),n.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const r=!this.onKeyLine&&this.indent===n.indent,l=r&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(l&&i.sep&&!i.value){const d=[];for(let h=0;h<i.sep.length;++h){const y=i.sep[h];switch(y.type){case"newline":d.push(h);break;case"space":break;case"comment":y.indent>n.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(u=i.sep.splice(d[1]))}switch(this.type){case"anchor":case"tag":l||i.value?(u.push(this.sourceToken),n.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):l||i.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(i.explicitKey)if(i.sep)if(i.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ai(i.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(Xx(i.key)&&!ai(i.sep,"newline")){const d=$s(i.start),h=i.key,y=i.sep;y.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:h,sep:y}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(ai(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const d=$s(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||l?n.items.push({start:u,key:null,sep:[this.sourceToken]}):ai(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{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);l||i.value?(n.items.push({start:u,key:d,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(d):(Object.assign(i,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(n);if(d){if(d.type==="block-seq"){if(!i.explicitKey&&i.sep&&!ai(i.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 r&&n.items.push({start:u});this.stack.push(d);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){const i=n.items[n.items.length-1];switch(this.type){case"newline":if(i.value){const r="end"in i.value?i.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,n.indent)){const l=n.items[n.items.length-2]?.value?.end;if(Array.isArray(l)){Array.prototype.push.apply(l,i.start),l.push(this.sourceToken),n.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=n.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;i.value||ai(i.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>n.indent){const r=this.startBlockValue(n);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const i=n.items[n.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?n.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?n.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);!i||i.value?n.items.push({start:[],key:l,sep:[]}):i.sep?this.stack.push(l):Object.assign(i,{key:l,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const r=this.startBlockValue(n);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===n.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const l=yc(r),u=$s(l);v0(n);const d=n.end.splice(1,n.end.length);d.push(this.sourceToken);const h={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]=h}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let i=this.source.indexOf(`
|
|
193
|
-
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
|
|
194
|
-
`,i)+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 i=yc(n),r=$s(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=yc(n),r=$s(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,i){return this.type!=="comment"||this.indent<=i?!1:n.every(r=>r.type==="newline"||r.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 Nq(e){const n=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||n&&new wq||null,prettyErrors:n}}function Aq(e,n={}){const{lineCounter:i,prettyErrors:r}=Nq(n),l=new jq(i?.addNewLine),u=new yq(n),d=Array.from(u.compose(l.parse(e)));if(r&&i)for(const h of d)h.errors.forEach(m0(e,i)),h.warnings.forEach(m0(e,i));return d.length>0?d:Object.assign([],{empty:!0},u.streamInfo())}function kq({onApplied:e}){const[n,i]=q.useState(""),[r,l]=q.useState(!1),[u,d]=q.useState([]),[h,y]=q.useState([]);if(cC())return null;const b=async()=>{if(!n.trim())return;l(!0),d([]),y([]);const x=Aq(n),w=[],A=[];for(let C=0;C<x.length;C++){const O=x[C];if(O.errors.length>0){w.push(`Document ${C+1}: ${O.errors[0]?.message}`);continue}const k=O.toJSON();if(!(!k||typeof k!="object"))try{const E=await EC(k);A.push(`Applied "${E.displayName||E.name}" (revision ${E.configRevision})`)}catch(E){w.push(`Document ${C+1}: ${E instanceof Error?E.message:String(E)}`)}}d(A),y(w),l(!1),A.length>0&&(Xt({title:"YAML applied",detail:`Applied ${A.length} document${A.length===1?"":"s"} successfully.`,tone:w.length>0?"caution":"positive",dedupeKey:"yaml:apply",dedupeMode:"replace"}),e())};return p.jsxs("section",{className:"mt-8",children:[p.jsx("div",{className:"page-section-divider"}),p.jsx("div",{className:"section-head mt-6",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),p.jsx("h2",{className:"text-sm font-medium text-strong",children:"Apply YAML"})]})}),p.jsxs("p",{className:"text-muted text-sm mb-3",children:["Paste a ",p.jsx("code",{className:"text-secondary",children:"canonry.yaml"})," config (multi-document YAML with ",p.jsx("code",{className:"text-secondary",children:"---"})," separators supported)."]}),p.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
|
|
195
|
-
kind: Project
|
|
196
|
-
metadata:
|
|
197
|
-
name: my-project
|
|
198
|
-
spec:
|
|
199
|
-
canonicalDomain: example.com
|
|
200
|
-
country: US
|
|
201
|
-
language: en
|
|
202
|
-
queries: []`,value:n,onChange:x=>i(x.target.value)}),u.length>0&&p.jsx("ul",{className:"mt-2 space-y-1",children:u.map((x,w)=>p.jsx("li",{className:"text-positive-400 text-sm",children:x},w))}),h.length>0&&p.jsx("ul",{className:"mt-2 space-y-1",children:h.map((x,w)=>p.jsx("li",{className:"text-negative-400 text-sm",children:x},w))}),p.jsx("div",{className:"mt-3",children:p.jsx($e,{type:"button",disabled:!n.trim()||r,onClick:Tn(b),children:r?"Applying...":"Apply"})})]})}function Cq(){const{dashboard:e,isLoading:n,refetch:i}=Wc();if(!e||n)return p.jsxs("div",{className:"page-skeleton",children:[p.jsxs("div",{className:"page-skeleton-header",children:[p.jsx("div",{className:"skeleton-text h-6 w-28"}),p.jsx("div",{className:"skeleton-text-sm w-40"})]}),p.jsxs("div",{className:"rounded-xl border border-default bg-surface overflow-hidden",children:[p.jsx("div",{className:"p-3 border-b border-default flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(z=>p.jsx("div",{className:"skeleton-text-sm w-16"},z))}),[1,2,3].map(z=>p.jsxs("div",{className:"p-3 border-b border-subtle flex gap-8 items-center",children:[p.jsxs("div",{className:"flex-1 space-y-1",children:[p.jsx("div",{className:"skeleton-text w-28"}),p.jsx("div",{className:"skeleton-text-sm w-16"})]}),p.jsx("div",{className:"skeleton-text w-24"}),p.jsx("div",{className:"skeleton h-5 w-14 rounded-full"}),p.jsx("div",{className:"skeleton h-5 w-16 rounded-full"}),p.jsx("div",{className:"skeleton-text-sm w-8"})]},z))]})]});const r=e.projects,l=Bc(),[u,d]=q.useState(!1),[h,y]=q.useState(""),[b,x]=q.useState(""),[w,A]=q.useState(""),[C,O]=q.useState("US"),[k,E]=q.useState("en"),[M,G]=q.useState(!1),[F,H]=q.useState(null),X=h.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),oe=async()=>{if(!(!X||!w)){G(!0),H(null);try{const z=await _o(X,{displayName:b||h,canonicalDomain:w,country:C,language:k});Xt({title:"Project created",detail:`${z.displayName||z.name} is ready to configure.`,tone:"positive",dedupeKey:`project:create:${z.name}`,dedupeMode:"drop"}),i(),y(""),x(""),A(""),O("US"),E("en"),d(!1),l({to:"/projects/$projectName",params:{projectName:z.name}})}catch(z){H(z instanceof Error?z.message:"Failed to create project")}finally{G(!1)}}};return p.jsxs("div",{className:"page-container",children:[p.jsxs("div",{className:"page-header",children:[p.jsxs("div",{className:"page-header-left",children:[p.jsx("h1",{className:"page-title",children:"Projects"}),p.jsxs("p",{className:"page-subtitle",children:[r.length," project",r.length!==1?"s":""," tracked"]})]}),p.jsx("div",{className:"page-header-right",children:p.jsxs($e,{type:"button",onClick:()=>d(z=>!z),children:[p.jsx(Yb,{className:"size-4 mr-1.5"}),"Add project"]})})]}),u?p.jsxs(En,{className:"surface-card mb-6",children:[p.jsx("div",{className:"section-head",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),p.jsx("h2",{className:"text-sm font-medium text-strong",children:"Create a new monitoring project"})]})}),p.jsxs("div",{className:"compact-stack mt-4",children:[p.jsxs("div",{className:"setup-field-row",children:[p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),p.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:h,onChange:z=>y(z.target.value)}),X&&X!==h?p.jsxs("p",{className:"supporting-copy",children:["Slug: ",X]}):null]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),p.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:b,onChange:z=>x(z.target.value)})]})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),p.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:w,onChange:z=>A(z.target.value)})]}),p.jsxs("div",{className:"setup-field-row",children:[p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),p.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:C,onChange:z=>O(z.target.value.toUpperCase())})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),p.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:k,onChange:z=>E(z.target.value.toLowerCase())})]})]})]}),F?p.jsx("p",{className:"text-negative-400 text-sm mt-3",children:F}):null,p.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[p.jsx($e,{type:"button",disabled:!X||!w||M,onClick:Tn(oe),children:M?"Creating...":"Create project"}),p.jsx($e,{type:"button",variant:"ghost",onClick:()=>d(!1),children:"Cancel"})]})]}):null,r.length>0?p.jsx("div",{className:"data-table-wrapper",children:p.jsxs("table",{className:"data-table",children:[p.jsx("thead",{children:p.jsxs("tr",{children:[p.jsx("th",{children:"Name"}),p.jsx("th",{children:"Domain"}),p.jsx("th",{children:"Mentions"}),p.jsx("th",{children:"Last run"}),p.jsx("th",{className:"text-right",children:"Country"})]})}),p.jsx("tbody",{children:r.map(z=>{const R=z.recentRuns[0];return p.jsxs("tr",{className:"cursor-pointer",onClick:()=>{l({to:"/projects/$projectName",params:{projectName:z.project.name}})},children:[p.jsxs("td",{children:[p.jsx(nt,{to:"/projects/$projectName",params:{projectName:z.project.name},className:"text-heading font-medium hover:underline",onClick:le=>le.stopPropagation(),children:z.project.displayName||z.project.name}),p.jsx("p",{className:"text-[11px] text-muted",children:z.project.name})]}),p.jsx("td",{className:"text-secondary",children:z.project.canonicalDomain}),p.jsx("td",{children:p.jsx(_n,{tone:z.mentionSummary.tone,children:z.mentionSummary.value})}),p.jsx("td",{className:"text-muted text-sm",children:R?p.jsx(wm,{status:R.status}):p.jsx("span",{className:"text-faint",children:"No runs"})}),p.jsx("td",{className:"text-right text-muted",children:z.project.country})]},z.project.id)})})]})}):u?null:p.jsxs(En,{className:"surface-card empty-card",children:[p.jsx("h3",{children:"No projects yet"}),p.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),p.jsxs($e,{type:"button",onClick:()=>d(!0),children:[p.jsx(Yb,{className:"size-4 mr-1.5"}),"Add project"]})]}),p.jsx(kq,{onApplied:()=>{i()}})]})}function Vm(e){e.invalidateQueries({queryKey:ym({client:ae})}),e.invalidateQueries({queryKey:Vi({client:ae})})}function _q(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function Tq(e,n){const i=e??"Project";return n==="gsc-sync"?`${i} will refresh after the sync completes.`:n==="inspect-sitemap"?`${i} will notify you when sitemap inspection finishes.`:`${i} will notify you when the run finishes.`}function Gm(e,n){vm({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),Xt({title:_q(e.kind),detail:Tq(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function Eq(e){const n=e.filter(l=>l.status!=="conflict"),i=e.filter(l=>l.status==="conflict");if(n.length===0){Xt({title:"No runs queued",detail:i.length>0?`${i.length} project${i.length===1?"":"s"} already had a run in progress.`:"No projects were available to queue.",tone:"caution",durationMs:8e3,dedupeKey:"run-all:conflict",dedupeMode:"replace"});return}for(const l of n)vm({id:l.id,projectId:l.projectId,kind:l.kind,projectLabel:l.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const r=GB({runIds:n.map(l=>l.id),queuedCount:n.length,skippedCount:i.length});Xt({title:"Run-all batch queued",detail:i.length>0?`${n.length} project${n.length===1?"":"s"} queued, ${i.length} skipped because a run is already active.`:`${n.length} project${n.length===1?"":"s"} queued.`,tone:i.length>0?"caution":"neutral",dedupeKey:`batch:${r}`,dedupeMode:"replace"})}function uu(e,n){if(e instanceof In&&e.code==="RUN_IN_PROGRESS"){Xt({title:"Run already in progress",detail:n?.projectLabel?`${n.projectLabel} already has an active run. Wait for it to finish, then retry.`:"This project already has an active run. Wait for it to finish, then retry.",tone:"caution",durationMs:8e3,dedupeKey:`run-in-progress:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}Xt({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function Oq(){const e=oi();return qi({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>AC(n,i),onSuccess:(n,i)=>{Vm(e),Gm(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{uu(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function W8(){const e=oi();return qi({meta:{skipGlobalErrorToast:!0},mutationFn:n=>OC(n),onSuccess:n=>{Vm(e),Eq(n)},onError:n=>{Xt({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function eI(){const e=oi();return qi({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,body:i})=>MC(n,i),onSuccess:(n,i)=>{Vm(e),vm({id:n.runId,projectId:i.projectId,kind:_e["site-audit"],projectLabel:i.projectLabel??i.projectName,sourceAction:"site-audit",lastAnnouncedStatus:n.status}),Xt({title:n.status==="running"?"Technical audit already running":"Technical audit queued",detail:`${i.projectLabel??i.projectName} will refresh automatically when the audit finishes.`,tone:"neutral",dedupeKey:`run:${n.runId}`,dedupeMode:"replace"})},onError:(n,i)=>{uu(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"site-audit"})}})}function tI(){const e=oi();return qi({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>DC(n,i),onSuccess:(n,i)=>{zc(e,_e["gsc-sync"],i.projectName),Gm(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{uu(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function nI(){const e=oi();return qi({meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>RC(n,i),onSuccess:(n,i)=>{zc(e,_e["inspect-sitemap"],i.projectName),Gm(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{uu(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function Jx(e){if(!Array.isArray(e.queryKey)||e.queryKey.length<=1)return!1;const n=e.queryKey[0];return n==="projects"||n==="project-dashboard-full"}function aI(){const e=oi();return qi({mutationFn:({projectName:n,queries:i})=>wC(n,i),onSuccess:()=>{e.invalidateQueries({queryKey:Vi({client:ae})}),e.invalidateQueries({predicate:Jx})}})}function iI(){const e=oi();return qi({mutationFn:({projectName:n,body:i})=>jC(n,i),onSuccess:()=>{e.invalidateQueries({predicate:n=>Array.isArray(n.queryKey)&&typeof n.queryKey[0]=="object"&&n.queryKey[0]!==null&&"_id"in n.queryKey[0]&&typeof n.queryKey[0]._id=="string"&&n.queryKey[0]._id.startsWith("getApiV1ProjectsByName")}),e.invalidateQueries({predicate:Jx})}})}const Dq=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Queries",description:"Add queries to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function zq({current:e,labels:n}){return p.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,r)=>{const l=r<e,u=r===e;return p.jsxs("div",{className:`setup-step ${l?"setup-step-done":""} ${u?"setup-step-active":""}`,role:"listitem","aria-current":u?"step":void 0,children:[p.jsx("span",{className:"setup-step-number",children:l?"✓":r+1}),p.jsx("span",{className:"setup-step-label",children:i.label})]},i.label)})})}function Rq(){const e=zo(),{dashboard:n,isLoading:i,refetch:r}=Wc(),l=n??e?.dashboard;if(!l||i)return p.jsxs("div",{className:"page-skeleton",children:[p.jsxs("div",{className:"page-skeleton-header",children:[p.jsx("div",{className:"skeleton-text h-6 w-24"}),p.jsx("div",{className:"skeleton-text-sm w-80"})]}),p.jsxs("div",{className:"page-skeleton-card",children:[p.jsx("div",{className:"skeleton-text w-32"}),p.jsx("div",{className:"space-y-3 mt-3",children:[1,2,3].map(re=>p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"space-y-1 flex-1",children:[p.jsx("div",{className:"skeleton-text w-24"}),p.jsx("div",{className:"skeleton-text-sm w-48"})]}),p.jsx("div",{className:"skeleton h-6 w-16 rounded-full"})]},re))})]})]});const u=l.settings,y=jm(!e,e?.health).data??e?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},b=UB(l.setup,y,u),x=Bc(),[w,A]=q.useState(0),[C,O]=q.useState(""),[k,E]=q.useState(""),[M,G]=q.useState(""),[F,H]=q.useState("US"),[X,oe]=q.useState("en"),[z,R]=q.useState(!1),[le,ye]=q.useState(null),[ze,Se]=q.useState(null),[Me,ot]=q.useState(!1),[we,I]=q.useState(""),[ne,V]=q.useState(!1),[fe,ie]=q.useState(null),[Pe,J]=q.useState(!1),ue=u.providerStatuses.filter(re=>re.state==="ready"),[te,de]=q.useState(ue[0]?.name??""),[se,Ce]=q.useState(5),[it,xe]=q.useState(!1),[Ve,Fe]=q.useState(null),[Bt,Hn]=q.useState(""),[Lt,yr]=q.useState(!1),[Ki,qo]=q.useState(null),[br,Qi]=q.useState(!1),[Zi,vr]=q.useState(!1),[Uo,$o]=q.useState(!1),[Gt,du]=q.useState(null),Io=Oq(),Po=ln({...L1({client:ae,path:{id:Gt??""}}),enabled:!!Gt,refetchInterval:({state:re})=>{const ut=re.data?.status;return ut==="completed"||ut==="partial"||ut==="failed"||ut==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[_a,Vo]=q.useState(""),[Yi,Go]=q.useState(!1),[Ho,Ta]=q.useState(null),vt=C.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),qt=we.split(`
|
|
203
|
-
`).map(re=>re.trim()).filter(Boolean),Ot=Bt.split(`
|
|
204
|
-
`).map(re=>re.trim()).filter(Boolean),fu=b.healthChecks.some(re=>re.id==="api"&&re.state==="ready"),pu=async()=>{if(!(!vt||!M)){ot(!0),Se(null);try{const re=await _o(vt,{displayName:k||C,canonicalDomain:M,country:F,language:X,autoExtractBacklinks:z});ye(vt),Xt({title:"Project created",detail:`${re.displayName||re.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${re.name}`,dedupeMode:"drop"}),await r(),A(2)}catch(re){Se(re instanceof Error?re.message:"Failed to create project")}finally{ot(!1)}}},mu=async()=>{if(!le)return;const re=qt;if(re.length!==0){J(!0),ie(null);try{await xC(le,re),V(!0),await r(),A(3)}catch(ut){ie(ut instanceof Error?ut.message:"Failed to save queries")}finally{J(!1)}}},Fi=async()=>{if(!(!le||!te)){xe(!0),Fe(null);try{const re=await TC(le,te,se);if(re.queries.length>0){const ut=we?we.trimEnd()+`
|
|
205
|
-
`+re.queries.join(`
|
|
206
|
-
`):re.queries.join(`
|
|
207
|
-
`);I(ut)}}catch(re){Fe(re instanceof Error?re.message:"Failed to generate queries")}finally{xe(!1)}}},Xi=async()=>{if(!le)return;const re=Ot;if(re.length!==0){Qi(!0),qo(null);try{await NC(le,re),yr(!0),await r(),A(4)}catch(ut){qo(ut instanceof Error?ut.message:"Failed to save competitors")}finally{Qi(!1)}}},Ji=async()=>{const re=_a.trim();if(re){Go(!0),Ta(null);try{await _C("gemini",{apiKey:re}),Xt({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),Vo(""),await r()}catch(ut){Ta(ut instanceof Error?ut.message:"Failed to save Gemini key")}finally{Go(!1)}}},Wn=async()=>{if(le){$o(!0);try{const re=await Io.mutateAsync({projectName:le,projectLabel:k||C||le,sourceAction:"setup-launch"});du(re.id),vr(!0),await r()}catch{}finally{$o(!1)}}},yn=()=>A(re=>Math.max(0,re-1)),mi=(()=>{switch(w){case 0:return p.jsxs(En,{className:"surface-card step-card",children:[p.jsx("div",{className:"section-head",children:p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),p.jsx("h2",{children:"System ready"})]})}),p.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),p.jsx("div",{className:"compact-stack",children:b.healthChecks.map(re=>p.jsxs("div",{className:"health-check-row",children:[p.jsxs("div",{children:[p.jsx("p",{className:"run-row-title",children:re.label}),p.jsx("p",{className:"supporting-copy",children:re.detail}),re.id==="provider"&&re.state!=="ready"&&p.jsxs("div",{className:"mt-3 rounded-md border border-default bg-bg-elevated/40 p-3 space-y-2",children:[p.jsxs("p",{className:"text-xs text-secondary",children:["Paste a Gemini key to enable visibility checks (free at"," ",p.jsx("a",{href:"https://aistudio.google.com/apikey",target:"_blank",rel:"noreferrer",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"aistudio.google.com"}),")."]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("input",{type:"password",value:_a,onChange:ut=>Vo(ut.target.value),placeholder:"AI... (paste here)",className:"flex-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-sm text-heading placeholder:text-faint focus:border-mono-600 focus:outline-none font-mono",disabled:Yi}),p.jsx($e,{type:"button",size:"sm",disabled:Yi||!_a.trim(),onClick:Tn(Ji),children:Yi?"Saving...":"Save"})]}),Ho&&p.jsx("p",{className:"text-xs text-negative-400",children:Ho}),p.jsxs("p",{className:"text-[11px] text-faint",children:["Other providers (OpenAI, Claude, Perplexity) configurable later via"," ",p.jsx(nt,{to:"/settings",className:"text-muted hover:text-neutral underline underline-offset-2",children:"/settings"}),"."]})]})]}),p.jsx(_n,{tone:re.state==="ready"?"positive":"caution",title:re.id==="api"?ir(y.apiStatus):re.id==="worker"?ir(y.workerStatus):re.detail,children:re.state==="ready"?"Ready":"Attention"})]},re.id))}),p.jsxs("div",{className:"setup-nav",children:[p.jsx("span",{}),p.jsx($e,{type:"button",disabled:!fu,onClick:()=>A(1),children:"Continue"})]})]});case 1:return p.jsxs(En,{className:"surface-card step-card",children:[p.jsxs("div",{className:"section-head",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),p.jsx("h2",{children:"Create project"})]}),le?p.jsx(_n,{tone:"positive",children:"Created"}):null]}),le?p.jsxs("div",{className:"compact-stack",children:[p.jsxs("p",{className:"text-neutral",children:["Project ",p.jsx("span",{className:"text-heading font-medium",children:le})," created successfully."]}),p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",onClick:()=>A(2),children:"Continue"})]})]}):p.jsxs("div",{className:"compact-stack",children:[p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),p.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:C,onChange:re=>O(re.target.value)}),vt&&vt!==C?p.jsxs("p",{className:"supporting-copy",children:["Slug: ",vt]}):null]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),p.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:k,onChange:re=>E(re.target.value)})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),p.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:M,onChange:re=>G(re.target.value)})]}),p.jsxs("div",{className:"setup-field-row",children:[p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),p.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:F,onChange:re=>H(re.target.value.toUpperCase())})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),p.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:X,onChange:re=>oe(re.target.value.toLowerCase())})]})]}),p.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong",children:[p.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-strong bg-bg",checked:z,onChange:re=>R(re.target.checked)}),p.jsxs("span",{className:"flex-1",children:[p.jsx("span",{className:"block text-sm text-heading",children:"Auto-extract backlinks"}),p.jsxs("span",{className:"block text-xs text-muted mt-0.5",children:["When a new Common Crawl release syncs, automatically extract backlinks for this project."," ",p.jsx(nt,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),ze?p.jsx("p",{className:"text-negative-400 text-sm",children:ze}):null,p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",disabled:!vt||!M||Me,onClick:Tn(pu),children:Me?"Creating...":"Create project"})]})]})]});case 2:return p.jsxs(En,{className:"surface-card step-card",children:[p.jsxs("div",{className:"section-head",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),p.jsx("h2",{children:"Add queries"})]}),ne?p.jsxs(_n,{tone:"positive",children:[qt.length," saved"]}):p.jsxs(_n,{tone:"neutral",children:[qt.length," quer",qt.length!==1?"ies":"y"]})]}),p.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),ne?p.jsxs("div",{className:"compact-stack",children:[p.jsx("ul",{className:"detail-list",children:qt.map(re=>p.jsx("li",{children:re},re))}),p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",onClick:()=>A(3),children:"Continue"})]})]}):p.jsxs("div",{className:"compact-stack",children:[ue.length>0?p.jsxs("div",{className:"compact-stack",children:[p.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[p.jsx("span",{className:"flex-1 border-t border-base"}),"auto-generate",p.jsx("span",{className:"flex-1 border-t border-base"})]}),p.jsxs("div",{className:"flex items-end gap-2",children:[p.jsxs("div",{className:"setup-field flex-1",children:[p.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),p.jsx("select",{id:"gen-provider",className:"setup-input",value:te,onChange:re=>de(re.target.value),children:ue.map(re=>p.jsxs("option",{value:re.name,children:[re.displayName??re.name,re.model?` (${re.model})`:""]},re.name))})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),p.jsx("select",{id:"gen-count",className:"setup-input",value:se,onChange:re=>Ce(Number(re.target.value)),children:[3,5,10,15,20].map(re=>p.jsx("option",{value:re,children:re},re))})]}),p.jsx($e,{type:"button",variant:"outline",disabled:it||!te,onClick:Tn(Fi),children:it?"Analyzing site...":"Generate"})]}),Ve?p.jsx("p",{className:"text-negative-400 text-sm",children:Ve}):null]}):null,p.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[p.jsx("span",{className:"flex-1 border-t border-base"}),"or type manually",p.jsx("span",{className:"flex-1 border-t border-base"})]}),p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),p.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
|
|
208
|
-
best invisalign downtown brooklyn
|
|
209
|
-
pediatric dentist brooklyn heights`,value:we,onChange:re=>I(re.target.value)})]}),fe?p.jsx("p",{className:"text-negative-400 text-sm",children:fe}):null,p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",disabled:qt.length===0||Pe,onClick:Tn(mu),children:Pe?"Saving...":`Save ${qt.length} quer${qt.length!==1?"ies":"y"}`})]})]})]});case 3:return p.jsxs(En,{className:"surface-card step-card",children:[p.jsxs("div",{className:"section-head",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),p.jsx("h2",{children:"Add competitors"})]}),Lt?p.jsx(_n,{tone:"positive",children:"Saved"}):null]}),p.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same queries. One per line."}),Lt?p.jsxs("div",{className:"compact-stack",children:[p.jsx("ul",{className:"detail-list",children:Ot.map(re=>p.jsx("li",{children:re},re))}),p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",onClick:()=>A(4),children:"Continue"})]})]}):p.jsxs("div",{className:"compact-stack",children:[p.jsxs("div",{className:"setup-field",children:[p.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),p.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
|
|
210
|
-
competitor2.com`,value:Bt,onChange:re=>Hn(re.target.value)})]}),Ki?p.jsx("p",{className:"text-negative-400 text-sm",children:Ki}):null,p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsxs("div",{className:"flex gap-2",children:[p.jsx($e,{type:"button",variant:"outline",onClick:()=>A(4),children:"Skip"}),p.jsx($e,{type:"button",disabled:Ot.length===0||br,onClick:Tn(Xi),children:br?"Saving...":`Save ${Ot.length} competitor${Ot.length!==1?"s":""}`})]})]})]})]});case 4:{const re=Po.data,ut=re?.status==="completed"||re?.status==="partial"||re?.status==="failed"||re?.status==="cancelled",ea=re?.snapshots??[],hi=ea.filter(Kn=>Kn.citationState==="cited").length,hu=ea.filter(Kn=>Kn.answerMentioned===!0).length,Sr=new Set(ea.map(Kn=>Kn.query).filter(Kn=>!!Kn)).size,Ko=Zi?ut&&(re?.status==="completed"||re?.status==="partial")?p.jsx(_n,{tone:"positive",children:"Complete"}):ut?p.jsx(_n,{tone:"negative",children:"Failed"}):p.jsx(_n,{tone:"caution",children:"Running"}):null;return p.jsxs(En,{className:"surface-card step-card",children:[p.jsxs("div",{className:"section-head",children:[p.jsxs("div",{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),p.jsx("h2",{children:"Launch first run"})]}),Ko]}),Zi?ut?re?.status==="failed"?p.jsxs("div",{className:"compact-stack",children:[p.jsx("p",{className:"text-negative-400",children:"Sweep failed. Inspect the run on the project page for the provider error and retry from there."}),p.jsxs("div",{className:"setup-nav",children:[p.jsx("span",{}),p.jsx($e,{type:"button",onClick:()=>{x({to:le?`/projects/${encodeURIComponent(le)}`:"/"})},children:"Open project"})]})]}):p.jsxs("div",{className:"compact-stack",children:[p.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",p.jsx("span",{className:"text-heading font-medium",children:le}),":"]}),p.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[p.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[p.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Mentioned"}),p.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[hu,p.jsxs("span",{className:"text-faint text-lg",children:[" / ",Sr]})]}),p.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with brand in answer"})]}),p.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[p.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Cited"}),p.jsxs("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:[hi,p.jsxs("span",{className:"text-faint text-lg",children:[" / ",Sr]})]}),p.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"queries with domain in sources"})]}),p.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[p.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted",children:"Snapshots"}),p.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:ea.length}),p.jsx("p",{className:"text-[11px] text-muted mt-0.5",children:"total (query × provider)"})]})]}),p.jsx("p",{className:"text-[11px] text-muted mt-1",children:"Full evidence, per-provider breakdown, and suggested next queries on the project dashboard."}),p.jsxs("div",{className:"setup-nav",children:[p.jsx("span",{}),p.jsx($e,{type:"button",onClick:()=>{x({to:le?`/projects/${encodeURIComponent(le)}`:"/"})},children:"Open project dashboard →"})]})]}):p.jsxs("div",{className:"compact-stack",children:[p.jsx("p",{className:"text-neutral",children:"Sweep running — typically 30-60s. Polling every 2s…"}),p.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:p.jsxs("p",{children:["Status: ",p.jsx("span",{className:"text-neutral",children:re?.status??"queued"})]})}),p.jsxs("div",{className:"setup-nav",children:[p.jsx("span",{}),p.jsx($e,{type:"button",variant:"outline",onClick:()=>{x({to:le?`/projects/${encodeURIComponent(le)}`:"/"})},children:"Watch on project page"})]})]}):p.jsxs("div",{className:"compact-stack",children:[p.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",p.jsx("span",{className:"text-heading font-medium",children:le}),"."]}),p.jsxs("div",{className:"setup-nav",children:[p.jsx($e,{type:"button",variant:"outline",onClick:yn,children:"Back"}),p.jsx($e,{type:"button",disabled:Uo,onClick:Tn(Wn),children:Uo?"Launching...":"Launch visibility sweep"})]})]})]})}default:return null}})();return p.jsxs("div",{className:"page-container",children:[p.jsx("div",{className:"page-header",children:p.jsxs("div",{className:"page-header-left",children:[p.jsx("h1",{className:"page-title",children:"Setup"}),p.jsx("p",{className:"page-subtitle",children:"Create a project, add queries, add competitors, and launch the first run."})]})}),p.jsx(zq,{current:w,labels:Dq}),p.jsx("section",{className:"setup-wizard",children:mi})]})}function Mq(){return p.jsx("div",{className:"page-container",children:p.jsx("section",{className:"page-section",children:p.jsxs(En,{className:"surface-card empty-card",children:[p.jsx("h1",{children:"Route not found"}),p.jsx("p",{children:"The current path does not map to a dashboard view."}),p.jsx($e,{asChild:!0,children:p.jsx(nt,{to:"/",children:"Return to overview"})})]})})})}const Jn=Ui(()=>$i(()=>import("./ProjectPage-DTivvVIl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),"ProjectPage"),Bq=Ui(()=>$i(()=>import("./RunsPage-B0k5wjFN.js"),__vite__mapDeps([10,1,2,8,5,9]),import.meta.url),"RunsPage"),Lq=Ui(()=>$i(()=>import("./HistoryPage-IcDqWBYW.js"),__vite__mapDeps([11,1,7,8,5,9]),import.meta.url),"HistoryPage"),qq=Ui(()=>$i(()=>import("./SettingsPage-DGnT3Vdr.js"),__vite__mapDeps([12,1,8,5,9]),import.meta.url),"SettingsPage"),Uq=Ui(()=>$i(()=>import("./BacklinksPage-CLVMg_qx.js"),__vite__mapDeps([13,1,6,8,5,9]),import.meta.url),"BacklinksPage"),$q=Ui(()=>$i(()=>import("./TrafficPage-D79PC0bB.js"),__vite__mapDeps([14,1,4,15,8,5,9]),import.meta.url),"TrafficPage"),Iq=Ui(()=>$i(()=>import("./TrafficSourceDetailPage-BYEVjfFm.js"),__vite__mapDeps([16,1,4,3,5,15,8,9]),import.meta.url),"TrafficSourceDetailPage");function Pq(){return p.jsx(f6,{children:p.jsx(d6,{})})}const Wt=vN()({component:Pq,validateSearch:e=>({runId:typeof e.runId=="string"?e.runId:void 0,evidenceId:typeof e.evidenceId=="string"?e.evidenceId:void 0,runStatus:typeof e.runStatus=="string"?e.runStatus:void 0,runKind:typeof e.runKind=="string"?e.runKind:void 0,runProject:typeof e.runProject=="string"?e.runProject:void 0,runWindow:typeof e.runWindow=="string"?e.runWindow:void 0,runQuery:typeof e.runQuery=="string"?e.runQuery:void 0})}),Vq=At({getParentRoute:()=>Wt,path:"/",component:h6,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Vi({client:ae}));if(n&&n.length===0)throw _p({to:"/setup"})}}),Gq=At({getParentRoute:()=>Wt,path:"/projects",component:Cq}),Hq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Gn=At({getParentRoute:()=>Wt,path:"/projects/$projectName",component:()=>p.jsx(ep,{}),beforeLoad:async({context:e,params:n,location:i})=>{const r=n.projectName;if(!Hq.test(r))return;let l=e.queryClient.getQueryData(Vi({client:ae}));if(!l)try{l=await e.queryClient.ensureQueryData(Zc({client:ae}))}catch{return}const u=l.find(d=>d.id===r);if(u)throw _p({to:i.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(u.name)}`),replace:!0})}}),Kq=At({getParentRoute:()=>Gn,path:"/",component:()=>p.jsx(Jn,{tab:"overview"})}),Qq=At({getParentRoute:()=>Gn,path:"/search-console",component:()=>p.jsx(Jn,{tab:"search-console"})}),Zq=At({getParentRoute:()=>Gn,path:"/local",component:()=>p.jsx(Jn,{tab:"local"})}),Yq=At({getParentRoute:()=>Gn,path:"/discovery",component:()=>p.jsx(Jn,{tab:"discovery"})}),Fq=At({getParentRoute:()=>Gn,path:"/report",component:()=>p.jsx(Jn,{tab:"report"})}),Xq=At({getParentRoute:()=>Gn,path:"/activity",component:()=>p.jsx(Jn,{tab:"activity"})}),Jq=At({getParentRoute:()=>Gn,path:"/backlinks",component:()=>p.jsx(Jn,{tab:"backlinks"})}),Wq=At({getParentRoute:()=>Gn,path:"/technical-aeo",component:()=>p.jsx(Jn,{tab:"technical-aeo"})}),eU=At({getParentRoute:()=>Gn,path:"/history",component:()=>p.jsx(Jn,{tab:"history"})}),tU=At({getParentRoute:()=>Gn,path:"/settings",component:()=>p.jsx(Jn,{tab:"settings"})}),nU=At({getParentRoute:()=>Wt,path:"/runs",component:Bq}),aU=At({getParentRoute:()=>Wt,path:"/history",component:Lq}),iU=At({getParentRoute:()=>Wt,path:"/settings",component:qq,beforeLoad:({context:e})=>{}}),sU=At({getParentRoute:()=>Wt,path:"/setup",component:Rq,beforeLoad:({context:e})=>{const n=e.queryClient.getQueryData(Vi({client:ae}));if(n&&n.length>0)throw _p({to:"/"})}}),rU=At({getParentRoute:()=>Wt,path:"/backlinks",component:Uq}),oU=At({getParentRoute:()=>Wt,path:"/traffic",component:$q}),lU=At({getParentRoute:()=>Wt,path:"/traffic/$projectName/$sourceId",component:Iq}),cU=At({getParentRoute:()=>Wt,path:"*",component:Mq}),uU=Wt.addChildren([Vq,Gq,Gn.addChildren([Kq,Qq,Zq,Yq,Fq,Xq,Jq,Wq,eU,tU]),nU,aU,iU,sU,rU,oU,lU,cU]);function dU(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const S0=dU(),fU=S0==="/"?"":S0.replace(/\/$/,"");function pU(e,n){return SN({routeTree:uU,basepath:fU||"/",context:{queryClient:e},...n?.initialEntries})}const mU=6e4;function hU(){const[e,n]=q.useState(Df()?"ready":"checking"),[i,r]=q.useState(""),[l,u]=q.useState(""),[d,h]=q.useState(null),[y,b]=q.useState(!1),[x,w]=q.useState(!1),A=q.useRef(null),C=q.useRef(null),O=()=>{if(!A.current){const M=ZC();C.current=M,A.current=pU(M)}return{queryClient:C.current,router:A.current}};q.useEffect(()=>{if(Df())return;let M=!1;return Gb().then(G=>{M||(G.authenticated?n("ready"):n(G.setupRequired?"setup":"login"))}).catch(G=>{M||(h(G instanceof Error?G.message:"Failed to reach the Canonry API"),n("login"))}),()=>{M=!0}},[]),q.useEffect(()=>{if(e!=="ready"||Df())return;const M=setInterval(()=>{Gb().then(G=>{G.authenticated||(w(!0),n(G.setupRequired?"setup":"login"))}).catch(()=>{})},mU);return Vb(()=>{w(!0),n("login")}),()=>{clearInterval(M),Vb(null)}},[e]);const k=async M=>{if(M.preventDefault(),!i.trim()||i.trim().length<8){h("Password must be at least 8 characters");return}if(i!==l){h("Passwords do not match");return}b(!0),h(null);try{if(!(await kC(i.trim())).authenticated){h("Setup failed");return}r(""),u(""),w(!1),n("ready")}catch(G){h(G instanceof In||G instanceof Error?G.message:"Setup failed")}finally{b(!1)}},E=async M=>{if(M.preventDefault(),!!i.trim()){b(!0),h(null);try{if(!(await CC(i.trim())).authenticated){h("Incorrect password");return}r(""),w(!1),n("ready")}catch(G){h(G instanceof In||G instanceof Error?G.message:"Authentication failed")}finally{b(!1)}}};if(e==="ready"){const{queryClient:M,router:G}=O();return p.jsx(xN,{client:M,children:p.jsx(wN,{router:G})})}return p.jsx("div",{className:"min-h-screen bg-bg px-4 py-8",children:p.jsx("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md items-center justify-center",children:p.jsx(En,{className:"surface-card w-full",children:e==="checking"?p.jsx(bc,{className:"py-8",children:p.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):e==="setup"?p.jsxs(p.Fragment,{children:[p.jsxs(vp,{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),p.jsx(Sp,{children:"Create a dashboard password"}),p.jsx(xp,{children:"Choose a password to protect the Canonry dashboard. You will use this to sign in on future visits."})]}),p.jsx(bc,{children:p.jsxs("form",{className:"space-y-4",onSubmit:Tn(k),children:[p.jsxs("label",{className:"block space-y-1.5",children:[p.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),p.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:i,onChange:M=>r(M.target.value),placeholder:"At least 8 characters"})]}),p.jsxs("label",{className:"block space-y-1.5",children:[p.jsx("span",{className:"text-xs font-medium text-secondary",children:"Confirm password"}),p.jsx("input",{className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:l,onChange:M=>u(M.target.value),placeholder:"Re-enter password"})]}),d?p.jsx("p",{className:"text-sm text-negative-400",children:d}):null,p.jsx($e,{type:"submit",disabled:y||!i.trim()||!l.trim(),children:y?"Setting up…":"Create password & open dashboard"})]})})]}):p.jsxs(p.Fragment,{children:[p.jsxs(vp,{children:[p.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),p.jsx(Sp,{children:"Sign in to Canonry"}),p.jsx(xp,{children:"Enter your dashboard password to continue."})]}),p.jsxs(bc,{children:[x?p.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"Your session expired — please sign in again."}):null,p.jsxs("form",{className:"space-y-4",onSubmit:Tn(E),children:[p.jsxs("label",{className:"block space-y-1.5",children:[p.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),p.jsx("input",{autoFocus:!0,className:"w-full rounded-md border border-base bg-bg px-3 py-2 text-sm text-heading outline-none transition focus:border-mono-600",type:"password",value:i,onChange:M=>r(M.target.value),placeholder:"Dashboard password"})]}),d?p.jsx("p",{className:"text-sm text-negative-400",children:d}):null,p.jsx($e,{type:"submit",disabled:y||!i.trim(),children:y?"Signing in…":"Open dashboard"})]})]})]})})})})}const Wx=document.getElementById("root");if(!Wx)throw new Error("Expected #root element for web app bootstrap.");TN.createRoot(Wx).render(p.jsx(q.StrictMode,{children:p.jsx(hU,{})}));export{d8 as $,Z$ as A,$e as B,Up as C,J$ as D,DU as E,u8 as F,D$ as G,f8 as H,ho as I,p8 as J,PU as K,IU as L,WU as M,Xt as N,g8 as O,PL as P,y8 as Q,QU as R,K_ as S,_n as T,b8 as U,ZU as V,GU as W,or as X,KU as Y,m8 as Z,h8 as _,F8 as a,o$ as a$,VU as a0,v8 as a1,k8 as a2,w8 as a3,N8 as a4,j8 as a5,A8 as a6,LC as a7,vm as a8,_e as a9,z$ as aA,$M as aB,FM as aC,i8 as aD,r8 as aE,s8 as aF,K$ as aG,Q$ as aH,G8 as aI,H8 as aJ,K8 as aK,YU as aL,Vi as aM,FU as aN,ym as aO,Q8 as aP,Y8 as aQ,Z8 as aR,GM as aS,eI as aT,K0 as aU,Y0 as aV,q8 as aW,c8 as aX,q$ as aY,L8 as aZ,L$ as a_,x8 as aa,I1 as ab,Aa as ac,S8 as ad,Bz as ae,Lz as af,M$ as ag,R$ as ah,_$ as ai,v$ as aj,A$ as ak,k$ as al,In as am,C$ as an,xU as ao,Q0 as ap,F$ as aq,N_ as ar,L_ as as,KB as at,wc as au,E$ as av,T$ as aw,sp as ax,U8 as ay,HU as az,_c as b,pC as b$,iI as b0,I$ as b1,U$ as b2,P$ as b3,V$ as b4,B$ as b5,$$ as b6,EU as b7,TU as b8,_U as b9,NU as bA,wU as bB,wC as bC,CU as bD,UM as bE,aI as bF,C8 as bG,T8 as bH,DC as bI,E8 as bJ,i$ as bK,a$ as bL,O8 as bM,_8 as bN,Y$ as bO,e$ as bP,t$ as bQ,n$ as bR,s$ as bS,Js as bT,bm as bU,W8 as bV,Jc as bW,wm as bX,o8 as bY,l8 as bZ,_C as b_,l$ as ba,RU as bb,t8 as bc,Lv as bd,e8 as be,MU as bf,BU as bg,W$ as bh,LU as bi,qU as bj,$U as bk,UU as bl,zo as bm,Zc as bn,D5 as bo,U0 as bp,a8 as bq,Oq as br,Ft as bs,SC as bt,zM as bu,OU as bv,AU as bw,kU as bx,J8 as by,jU as bz,Ye as c,SU as c0,zU as c1,XU as c2,JU as c3,Wc as c4,jm as c5,r$ as c6,ir as c7,Uv as c8,y$ as c9,S$ as ca,w$ as cb,j$ as cc,b$ as cd,x$ as ce,N$ as cf,VL as cg,sx as ch,ZL as ci,rx as cj,ox as ck,b_ as cl,g$ as cm,Yb as cn,P8 as co,G$ as cp,H$ as cq,fm as cr,n8 as cs,$8 as ct,V8 as cu,h$ as cv,p$ as cw,m$ as cx,f$ as cy,I8 as cz,ez as d,X8 as e,X$ as f,En as g,Fv as h,cC as i,Tn as j,O$ as k,D8 as l,ae as m,z8 as n,R8 as o,B8 as p,M8 as q,c$ as r,d$ as s,EM as t,Nm as u,u$ as v,_M as w,tI as x,nI as y,bp as z};
|