@canonry/canonry 7.32.0 → 7.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/assets/agent-workspace/skills/aero/references/agent-operations.md +9 -0
  2. package/assets/agent-workspace/skills/aero/references/site-health.md +12 -0
  3. package/assets/agent-workspace/skills/canonry/SKILL.md +9 -0
  4. package/assets/agent-workspace/skills/canonry/references/aeo-analysis.md +24 -0
  5. package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +207 -4
  6. package/assets/agent-workspace/skills/canonry/references/server-side-traffic.md +14 -2
  7. package/assets/assets/{AuditHistoryPanel-cQyVA85P.js → AuditHistoryPanel-CvANw3ds.js} +1 -1
  8. package/assets/assets/{BacklinksPage-UGZ_9N7F.js → BacklinksPage-C6x9ELjk.js} +1 -1
  9. package/assets/assets/{HistoryPage-UJVFZ5LK.js → HistoryPage-r36HX1cC.js} +1 -1
  10. package/assets/assets/{MeasurementPropertyPage-ChpOxQfx.js → MeasurementPropertyPage-ComoCzR4.js} +3 -3
  11. package/assets/assets/ProjectPage-CIeU-buk.js +8 -0
  12. package/assets/assets/RunsPage-DI6eJATZ.js +1 -0
  13. package/assets/assets/{SettingsPage-DeKxjuTr.js → SettingsPage-Bw7GdXxs.js} +1 -1
  14. package/assets/assets/{SiteHealthSection-COeVsgop.js → SiteHealthSection-C-JaNKpS.js} +3 -3
  15. package/assets/assets/{TrafficPage-DmMmeJKK.js → TrafficPage-Cnsp276v.js} +1 -1
  16. package/assets/assets/{TrafficSourceDetailPage-CUehseZe.js → TrafficSourceDetailPage-CBIaJk7e.js} +1 -1
  17. package/assets/assets/{extract-error-message-BsxdS7Po.js → extract-error-message-C_Owa0n9.js} +1 -1
  18. package/assets/assets/index-ZS9sSTMS.js +86 -0
  19. package/assets/assets/{react-sigma_core.esm.min--MbbBWzJ.js → react-sigma_core.esm.min-ugyh-ooq.js} +1 -1
  20. package/assets/assets/{v2-overview-adapter-D-IScpdp.js → v2-overview-adapter-BLSrVQ7K.js} +1 -1
  21. package/assets/index.html +1 -1
  22. package/dist/chunk-3JVF3ULD.js +550 -0
  23. package/dist/chunk-45Z5RJZW.js +562 -0
  24. package/dist/{chunk-QFXD7GR5.js → chunk-5LY7EG4U.js} +238 -20
  25. package/dist/chunk-EJRV7RBZ.js +23066 -0
  26. package/dist/{chunk-WRHA54BN.js → chunk-G47XJVAS.js} +5885 -3900
  27. package/dist/{chunk-42XUY243.js → chunk-GZ2KIONF.js} +11507 -10391
  28. package/dist/chunk-HGMYEDAQ.js +79 -0
  29. package/dist/{chunk-2C6NWFN4.js → chunk-JVBI6VBT.js} +2 -2
  30. package/dist/{chunk-ZIETXJYU.js → chunk-MPWBFKGK.js} +201 -104
  31. package/dist/{chunk-K5EGSSXC.js → chunk-QQYQDTFZ.js} +142 -47
  32. package/dist/{chunk-FW4GX2LO.js → chunk-SW54HXSZ.js} +3 -3
  33. package/dist/cli-catalog-PNJEQV5H.js +15 -0
  34. package/dist/cli-commands-4UT2CRXX.js +15 -0
  35. package/dist/cli.js +136 -22525
  36. package/dist/{demo-server-G5OK7SWE.js → demo-server-WRHR25HF.js} +5 -4
  37. package/dist/index.js +7 -6
  38. package/dist/{intelligence-service-3ZUVTIO7.js → intelligence-service-QXXRUB2G.js} +2 -2
  39. package/dist/mcp.js +30 -15
  40. package/package.json +10 -10
  41. package/assets/assets/ProjectPage-CvxuPSiC.js +0 -8
  42. package/assets/assets/RunsPage-C6U_YcDY.js +0 -1
  43. package/assets/assets/index-ahEr6Oc-.js +0 -86
@@ -0,0 +1,86 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-C-JaNKpS.js","./vendor-tanstack-ZXXkndVj.js","./vendor-lucide-Y6jANGfG.js","./ChartPrimitives-CZ4wVBJL.js","./vendor-recharts-D-cUuLZo.js","./ProjectPage-CIeU-buk.js","./v2-overview-adapter-BLSrVQ7K.js","./vendor-markdown-B4giJcws.js","./extract-error-message-C_Owa0n9.js","./Hint-DICI5Jq9.js","./AuditHistoryPanel-CvANw3ds.js","./vendor-radix-twS1M3FF.js","./vendor-yaml-GWJz5H2G.js","./RunsPage-DI6eJATZ.js","./HistoryPage-r36HX1cC.js","./SettingsPage-Bw7GdXxs.js","./BacklinksPage-C6x9ELjk.js","./TrafficPage-Cnsp276v.js","./TrafficSourceDetailPage-CBIaJk7e.js","./MeasurementPropertyPage-ComoCzR4.js"])))=>i.map(i=>d[i]);
2
+ import{c as J_,d as W_,r as _,j as l,Q as e6,M as t6,q as be,e as Zc,L as at,a as n6,t as Ir,u as yt,f as a6,h as Os,k as Ps,l as Qk,m as i6,n as Zk,O as pg,o as ci,p as s6,s as Bt,v as d0,x as qs,y as o6,z as r6,A as l6}from"./vendor-tanstack-ZXXkndVj.js";import{S as c6,O as m0,P as Yk,C as p0,a as Xk,T as h0,D as Jk,R as Wk}from"./vendor-radix-twS1M3FF.js";import{c as ej}from"./vendor-recharts-D-cUuLZo.js";import{A as qc,X as Wr,S as f0,a as tj,G as nj,C as Yc,L as Rs,R as Nd,M as u6,b as d6,P as hg,H as aj,c as ij,d as m6,e as Xc,f as g0,T as Rm,g as Jc,W as sj,h as p6,i as h6,j as f6,k as g6,l as y6,m as b6,n as v6,B as x6,F as w6,o as S6,p as k6,q as j6,r as A6,s as oj,t as rj,u as fg,v as lj,w as N6,x as cj,E as C6}from"./vendor-lucide-Y6jANGfG.js";import{M as _6,r as T6}from"./vendor-markdown-B4giJcws.js";import{p as E6}from"./vendor-yaml-GWJz5H2G.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(u){if(u.ep)return;u.ep=!0;const h=i(u);fetch(u.href,h)}})();var jf={exports:{}},yc={},Af={exports:{}},Nf={};var Zx;function R6(){return Zx||(Zx=1,(function(e){function n(B,W){var ve=B.length;B.push(W);e:for(;0<ve;){var Ae=ve-1>>>1,se=B[Ae];if(0<u(se,W))B[Ae]=W,B[ve]=se,ve=Ae;else break e}}function i(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],ve=B.pop();if(ve!==W){B[0]=ve;e:for(var Ae=0,se=B.length,Se=se>>>1;Ae<Se;){var Me=2*(Ae+1)-1,xe=B[Me],pe=Me+1,ce=B[pe];if(0>u(xe,ve))pe<se&&0>u(ce,xe)?(B[Ae]=ce,B[pe]=ve,Ae=pe):(B[Ae]=xe,B[Me]=ve,Ae=Me);else if(pe<se&&0>u(ce,ve))B[Ae]=ce,B[pe]=ve,Ae=pe;else break e}}return W}function u(B,W){var ve=B.sortIndex-W.sortIndex;return ve!==0?ve:B.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var f=Date,b=f.now();e.unstable_now=function(){return f.now()-b}}var v=[],x=[],S=1,j=null,C=3,T=!1,z=!1,q=!1,R=!1,P=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function $(B){for(var W=i(x);W!==null;){if(W.callback===null)r(x);else if(W.startTime<=B)r(x),W.sortIndex=W.expirationTime,n(v,W);else break;W=i(x)}}function Q(B){if(q=!1,$(B),!z)if(i(v)!==null)z=!0,ae||(ae=!0,Ge());else{var W=i(x);W!==null&&Le(Q,W.startTime-B)}}var ae=!1,V=-1,Z=5,X=-1;function Ce(){return R?!0:!(e.unstable_now()-X<Z)}function tt(){if(R=!1,ae){var B=e.unstable_now();X=B;var W=!0;try{e:{z=!1,q&&(q=!1,M(V),V=-1),T=!0;var ve=C;try{t:{for($(B),j=i(v);j!==null&&!(j.expirationTime>B&&Ce());){var Ae=j.callback;if(typeof Ae=="function"){j.callback=null,C=j.priorityLevel;var se=Ae(j.expirationTime<=B);if(B=e.unstable_now(),typeof se=="function"){j.callback=se,$(B),W=!0;break t}j===i(v)&&r(v),$(B)}else r(v);j=i(v)}if(j!==null)W=!0;else{var Se=i(x);Se!==null&&Le(Q,Se.startTime-B),W=!1}}break e}finally{j=null,C=ve,T=!1}W=void 0}}finally{W?Ge():ae=!1}}}var Ge;if(typeof L=="function")Ge=function(){L(tt)};else if(typeof MessageChannel<"u"){var Ve=new MessageChannel,ke=Ve.port2;Ve.port1.onmessage=tt,Ge=function(){ke.postMessage(null)}}else Ge=function(){P(tt,0)};function Le(B,W){V=P(function(){B(e.unstable_now())},W)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return C},e.unstable_next=function(B){switch(C){case 1:case 2:case 3:var W=3;break;default:W=C}var ve=C;C=W;try{return B()}finally{C=ve}},e.unstable_requestPaint=function(){R=!0},e.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ve=C;C=B;try{return W()}finally{C=ve}},e.unstable_scheduleCallback=function(B,W,ve){var Ae=e.unstable_now();switch(typeof ve=="object"&&ve!==null?(ve=ve.delay,ve=typeof ve=="number"&&0<ve?Ae+ve:Ae):ve=Ae,B){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=ve+se,B={id:S++,callback:W,priorityLevel:B,startTime:ve,expirationTime:se,sortIndex:-1},ve>Ae?(B.sortIndex=ve,n(x,B),i(v)===null&&B===i(x)&&(q?(M(V),V=-1):q=!0,Le(Q,ve-Ae))):(B.sortIndex=se,n(v,B),z||T||(z=!0,ae||(ae=!0,Ge()))),B},e.unstable_shouldYield=Ce,e.unstable_wrapCallback=function(B){var W=C;return function(){var ve=C;C=W;try{return B.apply(this,arguments)}finally{C=ve}}}})(Nf)),Nf}var Yx;function D6(){return Yx||(Yx=1,Af.exports=R6()),Af.exports}var Xx;function z6(){if(Xx)return yc;Xx=1;var e=D6(),n=J_(),i=W_();function r(t){var a="https://react.dev/errors/"+t;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}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 u(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function h(t){var a=t,o=t;if(t.alternate)for(;a.return;)a=a.return;else{t=a;do a=t,(a.flags&4098)!==0&&(o=a.return),t=a.return;while(t)}return a.tag===3?o:null}function f(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 b(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 v(t){if(h(t)!==t)throw Error(r(188))}function x(t){var a=t.alternate;if(!a){if(a=h(t),a===null)throw Error(r(188));return a!==t?null:t}for(var o=t,c=a;;){var p=o.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===o)return v(p),t;if(g===c)return v(p),a;g=g.sibling}throw Error(r(188))}if(o.return!==c.return)o=p,c=g;else{for(var w=!1,A=p.child;A;){if(A===o){w=!0,o=p,c=g;break}if(A===c){w=!0,c=p,o=g;break}A=A.sibling}if(!w){for(A=g.child;A;){if(A===o){w=!0,o=g,c=p;break}if(A===c){w=!0,c=g,o=p;break}A=A.sibling}if(!w)throw Error(r(189))}}if(o.alternate!==c)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?t:a}function S(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t;for(t=t.child;t!==null;){if(a=S(t),a!==null)return a;t=t.sibling}return null}var j=Object.assign,C=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),L=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),Ce=Symbol.for("react.memo_cache_sentinel"),tt=Symbol.iterator;function Ge(t){return t===null||typeof t!="object"?null:(t=tt&&t[tt]||t["@@iterator"],typeof t=="function"?t:null)}var Ve=Symbol.for("react.client.reference");function ke(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Ve?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case q:return"Fragment";case P:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case ae:return"SuspenseList";case X:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case z:return"Portal";case L:return t.displayName||"Context";case M:return(t._context.displayName||"Context")+".Consumer";case $:var a=t.render;return t=t.displayName,t||(t=a.displayName||a.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case V:return a=t.displayName||null,a!==null?a:ke(t.type)||"Memo";case Z:a=t._payload,t=t._init;try{return ke(t(a))}catch{}}return null}var Le=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ve={pending:!1,data:null,method:null,action:null},Ae=[],se=-1;function Se(t){return{current:t}}function Me(t){0>se||(t.current=Ae[se],Ae[se]=null,se--)}function xe(t,a){se++,Ae[se]=t.current,t.current=a}var pe=Se(null),ce=Se(null),ue=Se(null),_e=Se(null);function Ze(t,a){switch(xe(ue,a),xe(ce,t),xe(pe,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?bx(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=bx(a),t=vx(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Me(pe),xe(pe,t)}function Ee(){Me(pe),Me(ce),Me(ue)}function Ct(t){t.memoizedState!==null&&xe(_e,t);var a=pe.current,o=vx(a,t.type);a!==o&&(xe(ce,t),xe(pe,o))}function me(t){ce.current===t&&(Me(pe),Me(ce)),_e.current===t&&(Me(_e),pc._currentValue=ve)}var Be,Ne;function re(t){if(Be===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);Be=a&&a[1]||"",Ne=-1<o.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+Be+t+Ne}var Ye=!1;function vt(t,a){if(!t||Ye)return"";Ye=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Y){var F=Y}Reflect.construct(t,[],ie)}else{try{ie.call()}catch(Y){F=Y}t.call(ie.prototype)}}else{try{throw Error()}catch(Y){F=Y}(ie=t())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Y){if(Y&&F&&typeof Y.stack=="string")return[Y.stack,F.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),w=g[0],A=g[1];if(w&&A){var D=w.split(`
5
+ `),G=A.split(`
6
+ `);for(p=c=0;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;for(;p<G.length&&!G[p].includes("DetermineComponentFrameRoot");)p++;if(c===D.length||p===G.length)for(c=D.length-1,p=G.length-1;1<=c&&0<=p&&D[c]!==G[p];)p--;for(;1<=c&&0<=p;c--,p--)if(D[c]!==G[p]){if(c!==1||p!==1)do if(c--,p--,0>p||D[c]!==G[p]){var ee=`
7
+ `+D[c].replace(" at new "," at ");return t.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",t.displayName)),ee}while(1<=c&&0<=p);break}}}finally{Ye=!1,Error.prepareStackTrace=o}return(o=t?t.displayName||t.name:"")?re(o):""}function Mn(t,a){switch(t.tag){case 26:case 27:case 5:return re(t.type);case 16:return re("Lazy");case 13:return t.child!==a&&a!==null?re("Suspense Fallback"):re("Suspense");case 19:return re("SuspenseList");case 0:case 15:return vt(t.type,!1);case 11:return vt(t.type.render,!1);case 1:return vt(t.type,!0);case 31:return re("Activity");default:return""}}function Ht(t){try{var a="",o=null;do a+=Mn(t,o),o=t,t=t.return;while(t);return a}catch(c){return`
8
+ Error generating stack: `+c.message+`
9
+ `+c.stack}}var $e=Object.prototype.hasOwnProperty,ct=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,Rn=e.unstable_requestPaint,Vt=e.unstable_now,hi=e.unstable_getCurrentPriorityLevel,Hs=e.unstable_ImmediatePriority,fi=e.unstable_UserBlockingPriority,Dn=e.unstable_NormalPriority,Zo=e.unstable_LowPriority,Fs=e.unstable_IdlePriority,Qs=e.log,gi=e.unstable_setDisableYieldValue,xn=null,Et=null;function Kn(t){if(typeof Qs=="function"&&gi(t),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(xn,t)}catch{}}var Zt=Math.clz32?Math.clz32:na,Zs=Math.log,qa=Math.LN2;function na(t){return t>>>=0,t===0?32:31-(Zs(t)/qa|0)|0}var oe=256,ze=262144,Je=4194304;function Ot(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 et(t,a,o){var c=t.pendingLanes;if(c===0)return 0;var p=0,g=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var A=c&134217727;return A!==0?(c=A&~g,c!==0?p=Ot(c):(w&=A,w!==0?p=Ot(w):o||(o=A&~t,o!==0&&(p=Ot(o))))):(A=c&~g,A!==0?p=Ot(A):w!==0?p=Ot(w):o||(o=c&~t,o!==0&&(p=Ot(o)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,o=a&-a,g>=o||g===32&&(o&4194048)!==0)?a:p}function kt(t,a){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&a)===0}function rn(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 yi(){var t=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),t}function Yo(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function Ys(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function bu(t,a,o,c,p,g){var w=t.pendingLanes;t.pendingLanes=o,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=o,t.entangledLanes&=o,t.errorRecoveryDisabledLanes&=o,t.shellSuspendCounter=0;var A=t.entanglements,D=t.expirationTimes,G=t.hiddenUpdates;for(o=w&~o;0<o;){var ee=31-Zt(o),ie=1<<ee;A[ee]=0,D[ee]=-1;var F=G[ee];if(F!==null)for(G[ee]=null,ee=0;ee<F.length;ee++){var Y=F[ee];Y!==null&&(Y.lane&=-536870913)}o&=~ie}c!==0&&hl(t,c,0),g!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=g&~(w&~a))}function hl(t,a,o){t.pendingLanes|=a,t.suspendedLanes&=~a;var c=31-Zt(a);t.entangledLanes|=a,t.entanglements[c]=t.entanglements[c]|1073741824|o&261930}function fl(t,a){var o=t.entangledLanes|=a;for(t=t.entanglements;o;){var c=31-Zt(o),p=1<<c;p&a|t[c]&a&&(t[c]|=a),o&=~p}}function gl(t,a){var o=a&-a;return o=(o&42)!==0?1:yl(o),(o&(t.suspendedLanes|a))!==0?0:o}function yl(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 bl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Xo(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:Vx(t.type))}function vu(t,a){var o=W.p;try{return W.p=t,a()}finally{W.p=o}}var ya=Math.random().toString(36).slice(2),ln="__reactFiber$"+ya,zn="__reactProps$"+ya,Yi="__reactContainer$"+ya,Jo="__reactEvents$"+ya,xu="__reactListeners$"+ya,Wo="__reactHandles$"+ya,aa="__reactResources$"+ya,Xi="__reactMarker$"+ya;function vl(t){delete t[ln],delete t[zn],delete t[Jo],delete t[xu],delete t[Wo]}function bi(t){var a=t[ln];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Yi]||o[ln]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=Nx(t);t!==null;){if(o=t[ln])return o;t=Nx(t)}return a}t=o,o=t.parentNode}return null}function Ji(t){if(t=t[ln]||t[Yi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function Wi(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function es(t){var a=t[aa];return a||(a=t[aa]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function tn(t){t[Xi]=!0}var xl=new Set,wl={};function Xa(t,a){Xs(t,a),Xs(t+"Capture",a)}function Xs(t,a){for(wl[t]=a,t=0;t<a.length;t++)xl.add(a[t])}var Sl=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]*$"),kl={},Ja={};function wp(t){return $e.call(Ja,t)?!0:$e.call(kl,t)?!1:Sl.test(t)?Ja[t]=!0:(kl[t]=!0,!1)}function vi(t,a,o){if(wp(a))if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":t.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(a);return}}t.setAttribute(a,""+o)}}function Js(t,a,o){if(o===null)t.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttribute(a,""+o)}}function An(t,a,o,c){if(c===null)t.removeAttribute(o);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(o);return}t.setAttributeNS(a,o,""+c)}}function In(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ts(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Sp(t,a,o){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,a);if(!t.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,g=c.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(w){o=""+w,g.call(this,w)}}),Object.defineProperty(t,a,{enumerable:c.enumerable}),{getValue:function(){return o},setValue:function(w){o=""+w},stopTracking:function(){t._valueTracker=null,delete t[a]}}}}function jl(t){if(!t._valueTracker){var a=ts(t)?"checked":"value";t._valueTracker=Sp(t,a,""+t[a])}}function Wa(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return t&&(c=ts(t)?t.checked?"true":"false":t.value),t=c,t!==o?(a.setValue(t),!0):!1}function ns(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 wu=/[\n"\\]/g;function On(t){return t.replace(wu,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function er(t,a,o,c,p,g,w,A){t.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?t.type=w:t.removeAttribute("type"),a!=null?w==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+In(a)):t.value!==""+In(a)&&(t.value=""+In(a)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),a!=null?tr(t,w,In(a)):o!=null?tr(t,w,In(o)):c!=null&&t.removeAttribute("value"),p==null&&g!=null&&(t.defaultChecked=!!g),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+In(A):t.removeAttribute("name")}function Al(t,a,o,c,p,g,w,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(t.type=g),a!=null||o!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){jl(t);return}o=o!=null?""+In(o):"",a=a!=null?""+In(a):o,A||a===t.value||(t.value=a),t.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=A?t.checked:!!c,t.defaultChecked=!!c,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(t.name=w),jl(t)}function tr(t,a,o){a==="number"&&ns(t.ownerDocument)===t||t.defaultValue===""+o||(t.defaultValue=""+o)}function Gn(t,a,o,c){if(t=t.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<t.length;o++)p=a.hasOwnProperty("$"+t[o].value),t[o].selected!==p&&(t[o].selected=p),p&&c&&(t[o].defaultSelected=!0)}else{for(o=""+In(o),a=null,p=0;p<t.length;p++){if(t[p].value===o){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}a!==null||t[p].disabled||(a=t[p])}a!==null&&(a.selected=!0)}}function ia(t,a,o){if(a!=null&&(a=""+In(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+In(o):""}function xi(t,a,o,c){if(a==null){if(c!=null){if(o!=null)throw Error(r(92));if(Le(c)){if(1<c.length)throw Error(r(93));c=c[0]}o=c}o==null&&(o=""),a=o}o=In(a),t.defaultValue=o,c=t.textContent,c===o&&c!==""&&c!==null&&(t.value=c),jl(t)}function ba(t,a){if(a){var o=t.firstChild;if(o&&o===t.lastChild&&o.nodeType===3){o.nodeValue=a;return}}t.textContent=a}var va=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 kp(t,a,o){var c=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?c?t.setProperty(a,""):a==="float"?t.cssFloat="":t[a]="":c?t.setProperty(a,o):typeof o!="number"||o===0||va.has(a)?a==="float"?t.cssFloat=o:t[a]=(""+o).trim():t[a]=o+"px"}function ei(t,a,o){if(a!=null&&typeof a!="object")throw Error(r(62));if(t=t.style,o!=null){for(var c in o)!o.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&o[p]!==c&&kp(t,p,c)}else for(var g in a)a.hasOwnProperty(g)&&kp(t,g,a[g])}function Ma(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 nr=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"]]),jp=/^[\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 ar(t){return jp.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ba(){}var Nl=null;function Cl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var wi=null,Bn=null;function ir(t){var a=Ji(t);if(a&&(t=a.stateNode)){var o=t[zn]||null;e:switch(t=a.stateNode,a.type){case"input":if(er(t,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=t;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+On(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var c=o[a];if(c!==t&&c.form===t.form){var p=c[zn]||null;if(!p)throw Error(r(90));er(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)c=o[a],c.form===t.form&&Wa(c)}break e;case"textarea":ia(t,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&Gn(t,!!o.multiple,a,!1)}}}var _l=!1;function Tl(t,a,o){if(_l)return t(a,o);_l=!0;try{var c=t(a);return c}finally{if(_l=!1,(wi!==null||Bn!==null)&&(id(),wi&&(a=wi,t=Bn,Bn=wi=null,ir(a),t)))for(a=0;a<t.length;a++)ir(t[a])}}function Ws(t,a){var o=t.stateNode;if(o===null)return null;var c=o[zn]||null;if(c===null)return null;o=c[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":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(o&&typeof o!="function")throw Error(r(231,a,typeof o));return o}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),El=!1;if(xa)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){El=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{El=!1}var ti=null,H=null,Xe=null;function Si(){if(Xe)return Xe;var t,a=H,o=a.length,c,p="value"in ti?ti.value:ti.textContent,g=p.length;for(t=0;t<o&&a[t]===p[t];t++);var w=o-t;for(c=1;c<=w&&a[o-c]===p[g-c];c++);return Xe=p.slice(t,1<c?1-c:void 0)}function as(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 La(){return!0}function Rl(){return!1}function Nn(t){function a(o,c,p,g,w){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(o=t[A],this[A]=o?o(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?La:Rl,this.isPropagationStopped=Rl,this}return j(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=La)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=La)},persist:function(){},isPersistent:La}),a}var ki={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ni=Nn(ki),Dl=j({},ki,{view:0,detail:0}),Y4=Nn(Dl),Ap,Np,zl,Su=j({},Dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_p,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!==zl&&(zl&&t.type==="mousemove"?(Ap=t.screenX-zl.screenX,Np=t.screenY-zl.screenY):Np=Ap=0,zl=t),Ap)},movementY:function(t){return"movementY"in t?t.movementY:Np}}),wy=Nn(Su),X4=j({},Su,{dataTransfer:0}),J4=Nn(X4),W4=j({},Dl,{relatedTarget:0}),Cp=Nn(W4),e5=j({},ki,{animationName:0,elapsedTime:0,pseudoElement:0}),t5=Nn(e5),n5=j({},ki,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),a5=Nn(n5),i5=j({},ki,{data:0}),Sy=Nn(i5),s5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o5={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"},r5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l5(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=r5[t])?!!a[t]:!1}function _p(){return l5}var c5=j({},Dl,{key:function(t){if(t.key){var a=s5[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=as(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?o5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_p,charCode:function(t){return t.type==="keypress"?as(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?as(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),u5=Nn(c5),d5=j({},Su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ky=Nn(d5),m5=j({},Dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_p}),p5=Nn(m5),h5=j({},ki,{propertyName:0,elapsedTime:0,pseudoElement:0}),f5=Nn(h5),g5=j({},Su,{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}),y5=Nn(g5),b5=j({},ki,{newState:0,oldState:0}),v5=Nn(b5),x5=[9,13,27,32],Tp=xa&&"CompositionEvent"in window,Il=null;xa&&"documentMode"in document&&(Il=document.documentMode);var w5=xa&&"TextEvent"in window&&!Il,jy=xa&&(!Tp||Il&&8<Il&&11>=Il),Ay=" ",Ny=!1;function Cy(t,a){switch(t){case"keyup":return x5.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _y(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var sr=!1;function S5(t,a){switch(t){case"compositionend":return _y(a);case"keypress":return a.which!==32?null:(Ny=!0,Ay);case"textInput":return t=a.data,t===Ay&&Ny?null:t;default:return null}}function k5(t,a){if(sr)return t==="compositionend"||!Tp&&Cy(t,a)?(t=Si(),Xe=H=ti=null,sr=!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 jy&&a.locale!=="ko"?null:a.data;default:return null}}var j5={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 Ty(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!j5[t.type]:a==="textarea"}function Ey(t,a,o,c){wi?Bn?Bn.push(c):Bn=[c]:wi=c,a=dd(a,"onChange"),0<a.length&&(o=new ni("onChange","change",null,o,c),t.push({event:o,listeners:a}))}var Ol=null,Pl=null;function A5(t){mx(t,0)}function ku(t){var a=Wi(t);if(Wa(a))return t}function Ry(t,a){if(t==="change")return a}var Dy=!1;if(xa){var Ep;if(xa){var Rp="oninput"in document;if(!Rp){var zy=document.createElement("div");zy.setAttribute("oninput","return;"),Rp=typeof zy.oninput=="function"}Ep=Rp}else Ep=!1;Dy=Ep&&(!document.documentMode||9<document.documentMode)}function Iy(){Ol&&(Ol.detachEvent("onpropertychange",Oy),Pl=Ol=null)}function Oy(t){if(t.propertyName==="value"&&ku(Pl)){var a=[];Ey(a,Pl,t,Cl(t)),Tl(A5,a)}}function N5(t,a,o){t==="focusin"?(Iy(),Ol=a,Pl=o,Ol.attachEvent("onpropertychange",Oy)):t==="focusout"&&Iy()}function C5(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ku(Pl)}function _5(t,a){if(t==="click")return ku(a)}function T5(t,a){if(t==="input"||t==="change")return ku(a)}function E5(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var sa=typeof Object.is=="function"?Object.is:E5;function ql(t,a){if(sa(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;var o=Object.keys(t),c=Object.keys(a);if(o.length!==c.length)return!1;for(c=0;c<o.length;c++){var p=o[c];if(!$e.call(a,p)||!sa(t[p],a[p]))return!1}return!0}function Py(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function qy(t,a){var o=Py(t);t=0;for(var c;o;){if(o.nodeType===3){if(c=t+o.textContent.length,t<=a&&c>=a)return{node:o,offset:a-t};t=c}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Py(o)}}function My(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?My(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function By(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=ns(t.document);a instanceof t.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)t=a.contentWindow;else break;a=ns(t.document)}return a}function Dp(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 R5=xa&&"documentMode"in document&&11>=document.documentMode,or=null,zp=null,Ml=null,Ip=!1;function Ly(t,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Ip||or==null||or!==ns(c)||(c=or,"selectionStart"in c&&Dp(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ml&&ql(Ml,c)||(Ml=c,c=dd(zp,"onSelect"),0<c.length&&(a=new ni("onSelect","select",null,a,o),t.push({event:a,listeners:c}),a.target=or)))}function to(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var rr={animationend:to("Animation","AnimationEnd"),animationiteration:to("Animation","AnimationIteration"),animationstart:to("Animation","AnimationStart"),transitionrun:to("Transition","TransitionRun"),transitionstart:to("Transition","TransitionStart"),transitioncancel:to("Transition","TransitionCancel"),transitionend:to("Transition","TransitionEnd")},Op={},Uy={};xa&&(Uy=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function no(t){if(Op[t])return Op[t];if(!rr[t])return t;var a=rr[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in Uy)return Op[t]=a[o];return t}var Vy=no("animationend"),$y=no("animationiteration"),Ky=no("animationstart"),D5=no("transitionrun"),z5=no("transitionstart"),I5=no("transitioncancel"),Gy=no("transitionend"),Hy=new Map,Pp="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(" ");Pp.push("scrollEnd");function Ua(t,a){Hy.set(t,a),Xa(a,[t])}var ju=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)},wa=[],lr=0,qp=0;function Au(){for(var t=lr,a=qp=lr=0;a<t;){var o=wa[a];wa[a++]=null;var c=wa[a];wa[a++]=null;var p=wa[a];wa[a++]=null;var g=wa[a];if(wa[a++]=null,c!==null&&p!==null){var w=c.pending;w===null?p.next=p:(p.next=w.next,w.next=p),c.pending=p}g!==0&&Fy(o,p,g)}}function Nu(t,a,o,c){wa[lr++]=t,wa[lr++]=a,wa[lr++]=o,wa[lr++]=c,qp|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Mp(t,a,o,c){return Nu(t,a,o,c),Cu(t)}function ao(t,a){return Nu(t,null,null,a),Cu(t)}function Fy(t,a,o){t.lanes|=o;var c=t.alternate;c!==null&&(c.lanes|=o);for(var p=!1,g=t.return;g!==null;)g.childLanes|=o,c=g.alternate,c!==null&&(c.childLanes|=o),g.tag===22&&(t=g.stateNode,t===null||t._visibility&1||(p=!0)),t=g,g=g.return;return t.tag===3?(g=t.stateNode,p&&a!==null&&(p=31-Zt(o),t=g.hiddenUpdates,c=t[p],c===null?t[p]=[a]:c.push(a),a.lane=o|536870912),g):null}function Cu(t){if(50<oc)throw oc=0,Fh=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var cr={};function O5(t,a,o,c){this.tag=t,this.key=o,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=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function oa(t,a,o,c){return new O5(t,a,o,c)}function Bp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ji(t,a){var o=t.alternate;return o===null?(o=oa(t.tag,a,t.key,t.mode),o.elementType=t.elementType,o.type=t.type,o.stateNode=t.stateNode,o.alternate=t,t.alternate=o):(o.pendingProps=a,o.type=t.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=t.flags&65011712,o.childLanes=t.childLanes,o.lanes=t.lanes,o.child=t.child,o.memoizedProps=t.memoizedProps,o.memoizedState=t.memoizedState,o.updateQueue=t.updateQueue,a=t.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=t.sibling,o.index=t.index,o.ref=t.ref,o.refCleanup=t.refCleanup,o}function Qy(t,a){t.flags&=65011714;var o=t.alternate;return o===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=o.childLanes,t.lanes=o.lanes,t.child=o.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=o.memoizedProps,t.memoizedState=o.memoizedState,t.updateQueue=o.updateQueue,t.type=o.type,a=o.dependencies,t.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),t}function _u(t,a,o,c,p,g){var w=0;if(c=t,typeof t=="function")Bp(t)&&(w=1);else if(typeof t=="string")w=L_(t,o,pe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case X:return t=oa(31,o,a,p),t.elementType=X,t.lanes=g,t;case q:return io(o.children,p,g,a);case R:w=8,p|=24;break;case P:return t=oa(12,o,a,p|2),t.elementType=P,t.lanes=g,t;case Q:return t=oa(13,o,a,p),t.elementType=Q,t.lanes=g,t;case ae:return t=oa(19,o,a,p),t.elementType=ae,t.lanes=g,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:w=10;break e;case M:w=9;break e;case $:w=11;break e;case V:w=14;break e;case Z:w=16,c=null;break e}w=29,o=Error(r(130,t===null?"null":typeof t,"")),c=null}return a=oa(w,o,a,p),a.elementType=t,a.type=c,a.lanes=g,a}function io(t,a,o,c){return t=oa(7,t,c,a),t.lanes=o,t}function Lp(t,a,o){return t=oa(6,t,null,a),t.lanes=o,t}function Zy(t){var a=oa(18,null,null,0);return a.stateNode=t,a}function Up(t,a,o){return a=oa(4,t.children!==null?t.children:[],t.key,a),a.lanes=o,a.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},a}var Yy=new WeakMap;function Sa(t,a){if(typeof t=="object"&&t!==null){var o=Yy.get(t);return o!==void 0?o:(a={value:t,source:a,stack:Ht(a)},Yy.set(t,a),a)}return{value:t,source:a,stack:Ht(a)}}var ur=[],dr=0,Tu=null,Bl=0,ka=[],ja=0,is=null,ai=1,ii="";function Ai(t,a){ur[dr++]=Bl,ur[dr++]=Tu,Tu=t,Bl=a}function Xy(t,a,o){ka[ja++]=ai,ka[ja++]=ii,ka[ja++]=is,is=t;var c=ai;t=ii;var p=32-Zt(c)-1;c&=~(1<<p),o+=1;var g=32-Zt(a)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,ai=1<<32-Zt(a)+p|o<<p|c,ii=g+t}else ai=1<<g|o<<p|c,ii=t}function Vp(t){t.return!==null&&(Ai(t,1),Xy(t,1,0))}function $p(t){for(;t===Tu;)Tu=ur[--dr],ur[dr]=null,Bl=ur[--dr],ur[dr]=null;for(;t===is;)is=ka[--ja],ka[ja]=null,ii=ka[--ja],ka[ja]=null,ai=ka[--ja],ka[ja]=null}function Jy(t,a){ka[ja++]=ai,ka[ja++]=ii,ka[ja++]=is,ai=a.id,ii=a.overflow,is=t}var Cn=null,qt=null,ht=!1,ss=null,Aa=!1,Kp=Error(r(519));function os(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ll(Sa(a,t)),Kp}function Wy(t){var a=t.stateNode,o=t.type,c=t.memoizedProps;switch(a[ln]=t,a[zn]=c,o){case"dialog":lt("cancel",a),lt("close",a);break;case"iframe":case"object":case"embed":lt("load",a);break;case"video":case"audio":for(o=0;o<lc.length;o++)lt(lc[o],a);break;case"source":lt("error",a);break;case"img":case"image":case"link":lt("error",a),lt("load",a);break;case"details":lt("toggle",a);break;case"input":lt("invalid",a),Al(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":lt("invalid",a);break;case"textarea":lt("invalid",a),xi(a,c.value,c.defaultValue,c.children)}o=c.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||c.suppressHydrationWarning===!0||gx(a.textContent,o)?(c.popover!=null&&(lt("beforetoggle",a),lt("toggle",a)),c.onScroll!=null&&lt("scroll",a),c.onScrollEnd!=null&&lt("scrollend",a),c.onClick!=null&&(a.onclick=Ba),a=!0):a=!1,a||os(t,!0)}function eb(t){for(Cn=t.return;Cn;)switch(Cn.tag){case 5:case 31:case 13:Aa=!1;return;case 27:case 3:Aa=!0;return;default:Cn=Cn.return}}function mr(t){if(t!==Cn)return!1;if(!ht)return eb(t),ht=!0,!1;var a=t.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=t.type,o=!(o!=="form"&&o!=="button")||cf(t.type,t.memoizedProps)),o=!o),o&&qt&&os(t),eb(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=Ax(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));qt=Ax(t)}else a===27?(a=qt,xs(t.type)?(t=hf,hf=null,qt=t):qt=a):qt=Cn?Ca(t.stateNode.nextSibling):null;return!0}function so(){qt=Cn=null,ht=!1}function Gp(){var t=ss;return t!==null&&(Zn===null?Zn=t:Zn.push.apply(Zn,t),ss=null),t}function Ll(t){ss===null?ss=[t]:ss.push(t)}var Hp=Se(null),oo=null,Ni=null;function rs(t,a,o){xe(Hp,a._currentValue),a._currentValue=o}function Ci(t){t._currentValue=Hp.current,Me(Hp)}function Fp(t,a,o){for(;t!==null;){var c=t.alternate;if((t.childLanes&a)!==a?(t.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),t===o)break;t=t.return}}function Qp(t,a,o,c){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var g=p.dependencies;if(g!==null){var w=p.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=p;for(var D=0;D<a.length;D++)if(A.context===a[D]){g.lanes|=o,A=g.alternate,A!==null&&(A.lanes|=o),Fp(g.return,o,t),c||(w=null);break e}g=A.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(r(341));w.lanes|=o,g=w.alternate,g!==null&&(g.lanes|=o),Fp(w,o,t),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===t){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}function pr(t,a,o,c){t=null;for(var p=a,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(r(387));if(w=w.memoizedProps,w!==null){var A=p.type;sa(p.pendingProps.value,w.value)||(t!==null?t.push(A):t=[A])}}else if(p===_e.current){if(w=p.alternate,w===null)throw Error(r(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(t!==null?t.push(pc):t=[pc])}p=p.return}t!==null&&Qp(a,t,o,c),a.flags|=262144}function Eu(t){for(t=t.firstContext;t!==null;){if(!sa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function ro(t){oo=t,Ni=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function _n(t){return tb(oo,t)}function Ru(t,a){return oo===null&&ro(t),tb(t,a)}function tb(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Ni===null){if(t===null)throw Error(r(308));Ni=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Ni=Ni.next=a;return o}var P5=typeof AbortController<"u"?AbortController:function(){var t=[],a=this.signal={aborted:!1,addEventListener:function(o,c){t.push(c)}};this.abort=function(){a.aborted=!0,t.forEach(function(o){return o()})}},q5=e.unstable_scheduleCallback,M5=e.unstable_NormalPriority,cn={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zp(){return{controller:new P5,data:new Map,refCount:0}}function Ul(t){t.refCount--,t.refCount===0&&q5(M5,function(){t.controller.abort()})}var Vl=null,Yp=0,hr=0,fr=null;function B5(t,a){if(Vl===null){var o=Vl=[];Yp=0,hr=Wh(),fr={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Yp++,a.then(nb,nb),a}function nb(){if(--Yp===0&&Vl!==null){fr!==null&&(fr.status="fulfilled");var t=Vl;Vl=null,hr=0,fr=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function L5(t,a){var o=[],c={status:"pending",value:null,reason:null,then:function(p){o.push(p)}};return t.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),c}var ab=B.S;B.S=function(t,a){Lv=Vt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&B5(t,a),ab!==null&&ab(t,a)};var lo=Se(null);function Xp(){var t=lo.current;return t!==null?t:It.pooledCache}function Du(t,a){a===null?xe(lo,lo.current):xe(lo,a.pool)}function ib(){var t=Xp();return t===null?null:{parent:cn._currentValue,pool:t}}var gr=Error(r(460)),Jp=Error(r(474)),zu=Error(r(542)),Iu={then:function(){}};function sb(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ob(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(Ba,Ba),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,lb(t),t;default:if(typeof a.status=="string")a.then(Ba,Ba);else{if(t=It,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=a,t.status="pending",t.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,lb(t),t}throw uo=a,gr}}function co(t){try{var a=t._init;return a(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(uo=o,gr):o}}var uo=null;function rb(){if(uo===null)throw Error(r(459));var t=uo;return uo=null,t}function lb(t){if(t===gr||t===zu)throw Error(r(483))}var yr=null,$l=0;function Ou(t){var a=$l;return $l+=1,yr===null&&(yr=[]),ob(yr,t,a)}function Kl(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Pu(t,a){throw a.$$typeof===C?Error(r(525)):(t=Object.prototype.toString.call(a),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":t)))}function cb(t){function a(U,O){if(t){var K=U.deletions;K===null?(U.deletions=[O],U.flags|=16):K.push(O)}}function o(U,O){if(!t)return null;for(;O!==null;)a(U,O),O=O.sibling;return null}function c(U){for(var O=new Map;U!==null;)U.key!==null?O.set(U.key,U):O.set(U.index,U),U=U.sibling;return O}function p(U,O){return U=ji(U,O),U.index=0,U.sibling=null,U}function g(U,O,K){return U.index=K,t?(K=U.alternate,K!==null?(K=K.index,K<O?(U.flags|=67108866,O):K):(U.flags|=67108866,O)):(U.flags|=1048576,O)}function w(U){return t&&U.alternate===null&&(U.flags|=67108866),U}function A(U,O,K,ne){return O===null||O.tag!==6?(O=Lp(K,U.mode,ne),O.return=U,O):(O=p(O,K),O.return=U,O)}function D(U,O,K,ne){var He=K.type;return He===q?ee(U,O,K.props.children,ne,K.key):O!==null&&(O.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===Z&&co(He)===O.type)?(O=p(O,K.props),Kl(O,K),O.return=U,O):(O=_u(K.type,K.key,K.props,null,U.mode,ne),Kl(O,K),O.return=U,O)}function G(U,O,K,ne){return O===null||O.tag!==4||O.stateNode.containerInfo!==K.containerInfo||O.stateNode.implementation!==K.implementation?(O=Up(K,U.mode,ne),O.return=U,O):(O=p(O,K.children||[]),O.return=U,O)}function ee(U,O,K,ne,He){return O===null||O.tag!==7?(O=io(K,U.mode,ne,He),O.return=U,O):(O=p(O,K),O.return=U,O)}function ie(U,O,K){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Lp(""+O,U.mode,K),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return K=_u(O.type,O.key,O.props,null,U.mode,K),Kl(K,O),K.return=U,K;case z:return O=Up(O,U.mode,K),O.return=U,O;case Z:return O=co(O),ie(U,O,K)}if(Le(O)||Ge(O))return O=io(O,U.mode,K,null),O.return=U,O;if(typeof O.then=="function")return ie(U,Ou(O),K);if(O.$$typeof===L)return ie(U,Ru(U,O),K);Pu(U,O)}return null}function F(U,O,K,ne){var He=O!==null?O.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return He!==null?null:A(U,O,""+K,ne);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return K.key===He?D(U,O,K,ne):null;case z:return K.key===He?G(U,O,K,ne):null;case Z:return K=co(K),F(U,O,K,ne)}if(Le(K)||Ge(K))return He!==null?null:ee(U,O,K,ne,null);if(typeof K.then=="function")return F(U,O,Ou(K),ne);if(K.$$typeof===L)return F(U,O,Ru(U,K),ne);Pu(U,K)}return null}function Y(U,O,K,ne,He){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return U=U.get(K)||null,A(O,U,""+ne,He);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case T:return U=U.get(ne.key===null?K:ne.key)||null,D(O,U,ne,He);case z:return U=U.get(ne.key===null?K:ne.key)||null,G(O,U,ne,He);case Z:return ne=co(ne),Y(U,O,K,ne,He)}if(Le(ne)||Ge(ne))return U=U.get(K)||null,ee(O,U,ne,He,null);if(typeof ne.then=="function")return Y(U,O,K,Ou(ne),He);if(ne.$$typeof===L)return Y(U,O,K,Ru(O,ne),He);Pu(O,ne)}return null}function Te(U,O,K,ne){for(var He=null,xt=null,Ie=O,it=O=0,dt=null;Ie!==null&&it<K.length;it++){Ie.index>it?(dt=Ie,Ie=null):dt=Ie.sibling;var wt=F(U,Ie,K[it],ne);if(wt===null){Ie===null&&(Ie=dt);break}t&&Ie&&wt.alternate===null&&a(U,Ie),O=g(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt,Ie=dt}if(it===K.length)return o(U,Ie),ht&&Ai(U,it),He;if(Ie===null){for(;it<K.length;it++)Ie=ie(U,K[it],ne),Ie!==null&&(O=g(Ie,O,it),xt===null?He=Ie:xt.sibling=Ie,xt=Ie);return ht&&Ai(U,it),He}for(Ie=c(Ie);it<K.length;it++)dt=Y(Ie,U,it,K[it],ne),dt!==null&&(t&&dt.alternate!==null&&Ie.delete(dt.key===null?it:dt.key),O=g(dt,O,it),xt===null?He=dt:xt.sibling=dt,xt=dt);return t&&Ie.forEach(function(As){return a(U,As)}),ht&&Ai(U,it),He}function Qe(U,O,K,ne){if(K==null)throw Error(r(151));for(var He=null,xt=null,Ie=O,it=O=0,dt=null,wt=K.next();Ie!==null&&!wt.done;it++,wt=K.next()){Ie.index>it?(dt=Ie,Ie=null):dt=Ie.sibling;var As=F(U,Ie,wt.value,ne);if(As===null){Ie===null&&(Ie=dt);break}t&&Ie&&As.alternate===null&&a(U,Ie),O=g(As,O,it),xt===null?He=As:xt.sibling=As,xt=As,Ie=dt}if(wt.done)return o(U,Ie),ht&&Ai(U,it),He;if(Ie===null){for(;!wt.done;it++,wt=K.next())wt=ie(U,wt.value,ne),wt!==null&&(O=g(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt);return ht&&Ai(U,it),He}for(Ie=c(Ie);!wt.done;it++,wt=K.next())wt=Y(Ie,U,it,wt.value,ne),wt!==null&&(t&&wt.alternate!==null&&Ie.delete(wt.key===null?it:wt.key),O=g(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt);return t&&Ie.forEach(function(X_){return a(U,X_)}),ht&&Ai(U,it),He}function zt(U,O,K,ne){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case T:e:{for(var He=K.key;O!==null;){if(O.key===He){if(He=K.type,He===q){if(O.tag===7){o(U,O.sibling),ne=p(O,K.props.children),ne.return=U,U=ne;break e}}else if(O.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===Z&&co(He)===O.type){o(U,O.sibling),ne=p(O,K.props),Kl(ne,K),ne.return=U,U=ne;break e}o(U,O);break}else a(U,O);O=O.sibling}K.type===q?(ne=io(K.props.children,U.mode,ne,K.key),ne.return=U,U=ne):(ne=_u(K.type,K.key,K.props,null,U.mode,ne),Kl(ne,K),ne.return=U,U=ne)}return w(U);case z:e:{for(He=K.key;O!==null;){if(O.key===He)if(O.tag===4&&O.stateNode.containerInfo===K.containerInfo&&O.stateNode.implementation===K.implementation){o(U,O.sibling),ne=p(O,K.children||[]),ne.return=U,U=ne;break e}else{o(U,O);break}else a(U,O);O=O.sibling}ne=Up(K,U.mode,ne),ne.return=U,U=ne}return w(U);case Z:return K=co(K),zt(U,O,K,ne)}if(Le(K))return Te(U,O,K,ne);if(Ge(K)){if(He=Ge(K),typeof He!="function")throw Error(r(150));return K=He.call(K),Qe(U,O,K,ne)}if(typeof K.then=="function")return zt(U,O,Ou(K),ne);if(K.$$typeof===L)return zt(U,O,Ru(U,K),ne);Pu(U,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,O!==null&&O.tag===6?(o(U,O.sibling),ne=p(O,K),ne.return=U,U=ne):(o(U,O),ne=Lp(K,U.mode,ne),ne.return=U,U=ne),w(U)):o(U,O)}return function(U,O,K,ne){try{$l=0;var He=zt(U,O,K,ne);return yr=null,He}catch(Ie){if(Ie===gr||Ie===zu)throw Ie;var xt=oa(29,Ie,null,U.mode);return xt.lanes=ne,xt.return=U,xt}}}var mo=cb(!0),ub=cb(!1),ls=!1;function Wp(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function eh(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 cs(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function us(t,a,o){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(jt&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=Cu(t),Fy(t,null,o),a}return Nu(t,c,a,o),Cu(t)}function Gl(t,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var c=a.lanes;c&=t.pendingLanes,o|=c,a.lanes=o,fl(t,o)}}function th(t,a){var o=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,g=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};g===null?p=g=w:g=g.next=w,o=o.next}while(o!==null);g===null?p=g=a:g=g.next=a}else p=g=a;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,callbacks:c.callbacks},t.updateQueue=o;return}t=o.lastBaseUpdate,t===null?o.firstBaseUpdate=a:t.next=a,o.lastBaseUpdate=a}var nh=!1;function Hl(){if(nh){var t=fr;if(t!==null)throw t}}function Fl(t,a,o,c){nh=!1;var p=t.updateQueue;ls=!1;var g=p.firstBaseUpdate,w=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var D=A,G=D.next;D.next=null,w===null?g=G:w.next=G,w=D;var ee=t.alternate;ee!==null&&(ee=ee.updateQueue,A=ee.lastBaseUpdate,A!==w&&(A===null?ee.firstBaseUpdate=G:A.next=G,ee.lastBaseUpdate=D))}if(g!==null){var ie=p.baseState;w=0,ee=G=D=null,A=g;do{var F=A.lane&-536870913,Y=F!==A.lane;if(Y?(ut&F)===F:(c&F)===F){F!==0&&F===hr&&(nh=!0),ee!==null&&(ee=ee.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Te=t,Qe=A;F=a;var zt=o;switch(Qe.tag){case 1:if(Te=Qe.payload,typeof Te=="function"){ie=Te.call(zt,ie,F);break e}ie=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=Qe.payload,F=typeof Te=="function"?Te.call(zt,ie,F):Te,F==null)break e;ie=j({},ie,F);break e;case 2:ls=!0}}F=A.callback,F!==null&&(t.flags|=64,Y&&(t.flags|=8192),Y=p.callbacks,Y===null?p.callbacks=[F]:Y.push(F))}else Y={lane:F,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ee===null?(G=ee=Y,D=ie):ee=ee.next=Y,w|=F;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;Y=A,A=Y.next,Y.next=null,p.lastBaseUpdate=Y,p.shared.pending=null}}while(!0);ee===null&&(D=ie),p.baseState=D,p.firstBaseUpdate=G,p.lastBaseUpdate=ee,g===null&&(p.shared.lanes=0),fs|=w,t.lanes=w,t.memoizedState=ie}}function db(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function mb(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)db(o[t],a)}var br=Se(null),qu=Se(0);function pb(t,a){t=Pi,xe(qu,t),xe(br,a),Pi=t|a.baseLanes}function ah(){xe(qu,Pi),xe(br,br.current)}function ih(){Pi=qu.current,Me(br),Me(qu)}var ra=Se(null),Na=null;function ds(t){var a=t.alternate;xe(nn,nn.current&1),xe(ra,t),Na===null&&(a===null||br.current!==null||a.memoizedState!==null)&&(Na=t)}function sh(t){xe(nn,nn.current),xe(ra,t),Na===null&&(Na=t)}function hb(t){t.tag===22?(xe(nn,nn.current),xe(ra,t),Na===null&&(Na=t)):ms()}function ms(){xe(nn,nn.current),xe(ra,ra.current)}function la(t){Me(ra),Na===t&&(Na=null),Me(nn)}var nn=Se(0);function Mu(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||mf(o)||pf(o)))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 _i=0,nt=null,Rt=null,un=null,Bu=!1,vr=!1,po=!1,Lu=0,Ql=0,xr=null,U5=0;function Wt(){throw Error(r(321))}function oh(t,a){if(a===null)return!1;for(var o=0;o<a.length&&o<t.length;o++)if(!sa(t[o],a[o]))return!1;return!0}function rh(t,a,o,c,p,g){return _i=g,nt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,B.H=t===null||t.memoizedState===null?Xb:Sh,po=!1,g=o(c,p),po=!1,vr&&(g=gb(a,o,c,p)),fb(t),g}function fb(t){B.H=Xl;var a=Rt!==null&&Rt.next!==null;if(_i=0,un=Rt=nt=null,Bu=!1,Ql=0,xr=null,a)throw Error(r(300));t===null||dn||(t=t.dependencies,t!==null&&Eu(t)&&(dn=!0))}function gb(t,a,o,c){nt=t;var p=0;do{if(vr&&(xr=null),Ql=0,vr=!1,25<=p)throw Error(r(301));if(p+=1,un=Rt=null,t.updateQueue!=null){var g=t.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}B.H=Jb,g=a(o,c)}while(vr);return g}function V5(){var t=B.H,a=t.useState()[0];return a=typeof a.then=="function"?Zl(a):a,t=t.useState()[0],(Rt!==null?Rt.memoizedState:null)!==t&&(nt.flags|=1024),a}function lh(){var t=Lu!==0;return Lu=0,t}function ch(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function uh(t){if(Bu){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Bu=!1}_i=0,un=Rt=nt=null,vr=!1,Ql=Lu=0,xr=null}function Ln(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return un===null?nt.memoizedState=un=t:un=un.next=t,un}function an(){if(Rt===null){var t=nt.alternate;t=t!==null?t.memoizedState:null}else t=Rt.next;var a=un===null?nt.memoizedState:un.next;if(a!==null)un=a,Rt=t;else{if(t===null)throw nt.alternate===null?Error(r(467)):Error(r(310));Rt=t,t={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},un===null?nt.memoizedState=un=t:un=un.next=t}return un}function Uu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zl(t){var a=Ql;return Ql+=1,xr===null&&(xr=[]),t=ob(xr,t,a),a=nt,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,B.H=a===null||a.memoizedState===null?Xb:Sh),t}function Vu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Zl(t);if(t.$$typeof===L)return _n(t)}throw Error(r(438,String(t)))}function dh(t){var a=null,o=nt.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var c=nt.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),o===null&&(o=Uu(),nt.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(t),c=0;c<t;c++)o[c]=Ce;return a.index++,o}function Ti(t,a){return typeof a=="function"?a(t):a}function $u(t){var a=an();return mh(a,Rt,t)}function mh(t,a,o){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var p=t.baseQueue,g=c.pending;if(g!==null){if(p!==null){var w=p.next;p.next=g.next,g.next=w}a.baseQueue=p=g,c.pending=null}if(g=t.baseState,p===null)t.memoizedState=g;else{a=p.next;var A=w=null,D=null,G=a,ee=!1;do{var ie=G.lane&-536870913;if(ie!==G.lane?(ut&ie)===ie:(_i&ie)===ie){var F=G.revertLane;if(F===0)D!==null&&(D=D.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),ie===hr&&(ee=!0);else if((_i&F)===F){G=G.next,F===hr&&(ee=!0);continue}else ie={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(A=D=ie,w=g):D=D.next=ie,nt.lanes|=F,fs|=F;ie=G.action,po&&o(g,ie),g=G.hasEagerState?G.eagerState:o(g,ie)}else F={lane:ie,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},D===null?(A=D=F,w=g):D=D.next=F,nt.lanes|=ie,fs|=ie;G=G.next}while(G!==null&&G!==a);if(D===null?w=g:D.next=A,!sa(g,t.memoizedState)&&(dn=!0,ee&&(o=fr,o!==null)))throw o;t.memoizedState=g,t.baseState=w,t.baseQueue=D,c.lastRenderedState=g}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function ph(t){var a=an(),o=a.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=t;var c=o.dispatch,p=o.pending,g=a.memoizedState;if(p!==null){o.pending=null;var w=p=p.next;do g=t(g,w.action),w=w.next;while(w!==p);sa(g,a.memoizedState)||(dn=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),o.lastRenderedState=g}return[g,c]}function yb(t,a,o){var c=nt,p=an(),g=ht;if(g){if(o===void 0)throw Error(r(407));o=o()}else o=a();var w=!sa((Rt||p).memoizedState,o);if(w&&(p.memoizedState=o,dn=!0),p=p.queue,gh(xb.bind(null,c,p,t),[t]),p.getSnapshot!==a||w||un!==null&&un.memoizedState.tag&1){if(c.flags|=2048,wr(9,{destroy:void 0},vb.bind(null,c,p,o,a),null),It===null)throw Error(r(349));g||(_i&127)!==0||bb(c,a,o)}return o}function bb(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=nt.updateQueue,a===null?(a=Uu(),nt.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function vb(t,a,o,c){a.value=o,a.getSnapshot=c,wb(a)&&Sb(t)}function xb(t,a,o){return o(function(){wb(a)&&Sb(t)})}function wb(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!sa(t,o)}catch{return!0}}function Sb(t){var a=ao(t,2);a!==null&&Yn(a,t,2)}function hh(t){var a=Ln();if(typeof t=="function"){var o=t;if(t=o(),po){Kn(!0);try{o()}finally{Kn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:t},a}function kb(t,a,o,c){return t.baseState=o,mh(t,Rt,typeof c=="function"?c:Ti)}function $5(t,a,o,c,p){if(Hu(t))throw Error(r(485));if(t=a.action,t!==null){var g={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){g.listeners.push(w)}};B.T!==null?o(!0):g.isTransition=!1,c(g),o=a.pending,o===null?(g.next=a.pending=g,jb(a,g)):(g.next=o.next,a.pending=o.next=g)}}function jb(t,a){var o=a.action,c=a.payload,p=t.state;if(a.isTransition){var g=B.T,w={};B.T=w;try{var A=o(p,c),D=B.S;D!==null&&D(w,A),Ab(t,a,A)}catch(G){fh(t,a,G)}finally{g!==null&&w.types!==null&&(g.types=w.types),B.T=g}}else try{g=o(p,c),Ab(t,a,g)}catch(G){fh(t,a,G)}}function Ab(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){Nb(t,a,c)},function(c){return fh(t,a,c)}):Nb(t,a,o)}function Nb(t,a,o){a.status="fulfilled",a.value=o,Cb(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,jb(t,o)))}function fh(t,a,o){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,Cb(a),a=a.next;while(a!==c)}t.action=null}function Cb(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function _b(t,a){return a}function Tb(t,a){if(ht){var o=It.formState;if(o!==null){e:{var c=nt;if(ht){if(qt){t:{for(var p=qt,g=Aa;p.nodeType!==8;){if(!g){p=null;break t}if(p=Ca(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){qt=Ca(p.nextSibling),c=p.data==="F!";break e}}os(c)}c=!1}c&&(a=o[0])}}return o=Ln(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_b,lastRenderedState:a},o.queue=c,o=Qb.bind(null,nt,c),c.dispatch=o,c=hh(!1),g=wh.bind(null,nt,!1,c.queue),c=Ln(),p={state:a,dispatch:null,action:t,pending:null},c.queue=p,o=$5.bind(null,nt,p,g,o),p.dispatch=o,c.memoizedState=t,[a,o,!1]}function Eb(t){var a=an();return Rb(a,Rt,t)}function Rb(t,a,o){if(a=mh(t,a,_b)[0],t=$u(Ti)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Zl(a)}catch(w){throw w===gr?zu:w}else c=a;a=an();var p=a.queue,g=p.dispatch;return o!==a.memoizedState&&(nt.flags|=2048,wr(9,{destroy:void 0},K5.bind(null,p,o),null)),[c,g,t]}function K5(t,a){t.action=a}function Db(t){var a=an(),o=Rt;if(o!==null)return Rb(a,o,t);an(),a=a.memoizedState,o=an();var c=o.queue.dispatch;return o.memoizedState=t,[a,c,!1]}function wr(t,a,o,c){return t={tag:t,create:o,deps:c,inst:a,next:null},a=nt.updateQueue,a===null&&(a=Uu(),nt.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=t.next=t:(c=o.next,o.next=t,t.next=c,a.lastEffect=t),t}function zb(){return an().memoizedState}function Ku(t,a,o,c){var p=Ln();nt.flags|=t,p.memoizedState=wr(1|a,{destroy:void 0},o,c===void 0?null:c)}function Gu(t,a,o,c){var p=an();c=c===void 0?null:c;var g=p.memoizedState.inst;Rt!==null&&c!==null&&oh(c,Rt.memoizedState.deps)?p.memoizedState=wr(a,g,o,c):(nt.flags|=t,p.memoizedState=wr(1|a,g,o,c))}function Ib(t,a){Ku(8390656,8,t,a)}function gh(t,a){Gu(2048,8,t,a)}function G5(t){nt.flags|=4;var a=nt.updateQueue;if(a===null)a=Uu(),nt.updateQueue=a,a.events=[t];else{var o=a.events;o===null?a.events=[t]:o.push(t)}}function Ob(t){var a=an().memoizedState;return G5({ref:a,nextImpl:t}),function(){if((jt&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function Pb(t,a){return Gu(4,2,t,a)}function qb(t,a){return Gu(4,4,t,a)}function Mb(t,a){if(typeof a=="function"){t=t();var o=a(t);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return t=t(),a.current=t,function(){a.current=null}}function Bb(t,a,o){o=o!=null?o.concat([t]):null,Gu(4,4,Mb.bind(null,a,t),o)}function yh(){}function Lb(t,a){var o=an();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&oh(a,c[1])?c[0]:(o.memoizedState=[t,a],t)}function Ub(t,a){var o=an();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&oh(a,c[1]))return c[0];if(c=t(),po){Kn(!0);try{t()}finally{Kn(!1)}}return o.memoizedState=[c,a],c}function bh(t,a,o){return o===void 0||(_i&1073741824)!==0&&(ut&261930)===0?t.memoizedState=a:(t.memoizedState=o,t=Vv(),nt.lanes|=t,fs|=t,o)}function Vb(t,a,o,c){return sa(o,a)?o:br.current!==null?(t=bh(t,o,c),sa(t,a)||(dn=!0),t):(_i&42)===0||(_i&1073741824)!==0&&(ut&261930)===0?(dn=!0,t.memoizedState=o):(t=Vv(),nt.lanes|=t,fs|=t,a)}function $b(t,a,o,c,p){var g=W.p;W.p=g!==0&&8>g?g:8;var w=B.T,A={};B.T=A,wh(t,!1,a,o);try{var D=p(),G=B.S;if(G!==null&&G(A,D),D!==null&&typeof D=="object"&&typeof D.then=="function"){var ee=L5(D,c);Yl(t,a,ee,da(t))}else Yl(t,a,c,da(t))}catch(ie){Yl(t,a,{then:function(){},status:"rejected",reason:ie},da())}finally{W.p=g,w!==null&&A.types!==null&&(w.types=A.types),B.T=w}}function H5(){}function vh(t,a,o,c){if(t.tag!==5)throw Error(r(476));var p=Kb(t).queue;$b(t,p,a,ve,o===null?H5:function(){return Gb(t),o(c)})}function Kb(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:ve,baseState:ve,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:ve},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ti,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Gb(t){var a=Kb(t);a.next===null&&(a=t.alternate.memoizedState),Yl(t,a.next.queue,{},da())}function xh(){return _n(pc)}function Hb(){return an().memoizedState}function Fb(){return an().memoizedState}function F5(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=da();t=cs(o);var c=us(a,t,o);c!==null&&(Yn(c,a,o),Gl(c,a,o)),a={cache:Zp()},t.payload=a;return}a=a.return}}function Q5(t,a,o){var c=da();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Hu(t)?Zb(a,o):(o=Mp(t,a,o,c),o!==null&&(Yn(o,t,c),Yb(o,a,c)))}function Qb(t,a,o){var c=da();Yl(t,a,o,c)}function Yl(t,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Hu(t))Zb(a,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var w=a.lastRenderedState,A=g(w,o);if(p.hasEagerState=!0,p.eagerState=A,sa(A,w))return Nu(t,a,p,0),It===null&&Au(),!1}catch{}if(o=Mp(t,a,p,c),o!==null)return Yn(o,t,c),Yb(o,a,c),!0}return!1}function wh(t,a,o,c){if(c={lane:2,revertLane:Wh(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Hu(t)){if(a)throw Error(r(479))}else a=Mp(t,o,c,2),a!==null&&Yn(a,t,2)}function Hu(t){var a=t.alternate;return t===nt||a!==null&&a===nt}function Zb(t,a){vr=Bu=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function Yb(t,a,o){if((o&4194048)!==0){var c=a.lanes;c&=t.pendingLanes,o|=c,a.lanes=o,fl(t,o)}}var Xl={readContext:_n,use:Vu,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt,useHostTransitionStatus:Wt,useFormState:Wt,useActionState:Wt,useOptimistic:Wt,useMemoCache:Wt,useCacheRefresh:Wt};Xl.useEffectEvent=Wt;var Xb={readContext:_n,use:Vu,useCallback:function(t,a){return Ln().memoizedState=[t,a===void 0?null:a],t},useContext:_n,useEffect:Ib,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,Ku(4194308,4,Mb.bind(null,a,t),o)},useLayoutEffect:function(t,a){return Ku(4194308,4,t,a)},useInsertionEffect:function(t,a){Ku(4,2,t,a)},useMemo:function(t,a){var o=Ln();a=a===void 0?null:a;var c=t();if(po){Kn(!0);try{t()}finally{Kn(!1)}}return o.memoizedState=[c,a],c},useReducer:function(t,a,o){var c=Ln();if(o!==void 0){var p=o(a);if(po){Kn(!0);try{o(a)}finally{Kn(!1)}}}else p=a;return c.memoizedState=c.baseState=p,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:p},c.queue=t,t=t.dispatch=Q5.bind(null,nt,t),[c.memoizedState,t]},useRef:function(t){var a=Ln();return t={current:t},a.memoizedState=t},useState:function(t){t=hh(t);var a=t.queue,o=Qb.bind(null,nt,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:yh,useDeferredValue:function(t,a){var o=Ln();return bh(o,t,a)},useTransition:function(){var t=hh(!1);return t=$b.bind(null,nt,t.queue,!0,!1),Ln().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,a,o){var c=nt,p=Ln();if(ht){if(o===void 0)throw Error(r(407));o=o()}else{if(o=a(),It===null)throw Error(r(349));(ut&127)!==0||bb(c,a,o)}p.memoizedState=o;var g={value:o,getSnapshot:a};return p.queue=g,Ib(xb.bind(null,c,g,t),[t]),c.flags|=2048,wr(9,{destroy:void 0},vb.bind(null,c,g,o,a),null),o},useId:function(){var t=Ln(),a=It.identifierPrefix;if(ht){var o=ii,c=ai;o=(c&~(1<<32-Zt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Lu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=U5++,a="_"+a+"r_"+o.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:xh,useFormState:Tb,useActionState:Tb,useOptimistic:function(t){var a=Ln();a.memoizedState=a.baseState=t;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=wh.bind(null,nt,!0,o),o.dispatch=a,[t,a]},useMemoCache:dh,useCacheRefresh:function(){return Ln().memoizedState=F5.bind(null,nt)},useEffectEvent:function(t){var a=Ln(),o={impl:t};return a.memoizedState=o,function(){if((jt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},Sh={readContext:_n,use:Vu,useCallback:Lb,useContext:_n,useEffect:gh,useImperativeHandle:Bb,useInsertionEffect:Pb,useLayoutEffect:qb,useMemo:Ub,useReducer:$u,useRef:zb,useState:function(){return $u(Ti)},useDebugValue:yh,useDeferredValue:function(t,a){var o=an();return Vb(o,Rt.memoizedState,t,a)},useTransition:function(){var t=$u(Ti)[0],a=an().memoizedState;return[typeof t=="boolean"?t:Zl(t),a]},useSyncExternalStore:yb,useId:Hb,useHostTransitionStatus:xh,useFormState:Eb,useActionState:Eb,useOptimistic:function(t,a){var o=an();return kb(o,Rt,t,a)},useMemoCache:dh,useCacheRefresh:Fb};Sh.useEffectEvent=Ob;var Jb={readContext:_n,use:Vu,useCallback:Lb,useContext:_n,useEffect:gh,useImperativeHandle:Bb,useInsertionEffect:Pb,useLayoutEffect:qb,useMemo:Ub,useReducer:ph,useRef:zb,useState:function(){return ph(Ti)},useDebugValue:yh,useDeferredValue:function(t,a){var o=an();return Rt===null?bh(o,t,a):Vb(o,Rt.memoizedState,t,a)},useTransition:function(){var t=ph(Ti)[0],a=an().memoizedState;return[typeof t=="boolean"?t:Zl(t),a]},useSyncExternalStore:yb,useId:Hb,useHostTransitionStatus:xh,useFormState:Db,useActionState:Db,useOptimistic:function(t,a){var o=an();return Rt!==null?kb(o,Rt,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:dh,useCacheRefresh:Fb};Jb.useEffectEvent=Ob;function kh(t,a,o,c){a=t.memoizedState,o=o(c,a),o=o==null?a:j({},a,o),t.memoizedState=o,t.lanes===0&&(t.updateQueue.baseState=o)}var jh={enqueueSetState:function(t,a,o){t=t._reactInternals;var c=da(),p=cs(c);p.payload=a,o!=null&&(p.callback=o),a=us(t,p,c),a!==null&&(Yn(a,t,c),Gl(a,t,c))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var c=da(),p=cs(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=us(t,p,c),a!==null&&(Yn(a,t,c),Gl(a,t,c))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=da(),c=cs(o);c.tag=2,a!=null&&(c.callback=a),a=us(t,c,o),a!==null&&(Yn(a,t,o),Gl(a,t,o))}};function Wb(t,a,o,c,p,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):a.prototype&&a.prototype.isPureReactComponent?!ql(o,c)||!ql(p,g):!0}function ev(t,a,o,c){t=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,c),a.state!==t&&jh.enqueueReplaceState(a,a.state,null)}function ho(t,a){var o=a;if("ref"in a){o={};for(var c in a)c!=="ref"&&(o[c]=a[c])}if(t=t.defaultProps){o===a&&(o=j({},o));for(var p in t)o[p]===void 0&&(o[p]=t[p])}return o}function tv(t){ju(t)}function nv(t){console.error(t)}function av(t){ju(t)}function Fu(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function iv(t,a,o){try{var c=t.onCaughtError;c(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function Ah(t,a,o){return o=cs(o),o.tag=3,o.payload={element:null},o.callback=function(){Fu(t,a)},o}function sv(t){return t=cs(t),t.tag=3,t}function ov(t,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var g=c.value;t.payload=function(){return p(g)},t.callback=function(){iv(a,o,c)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){iv(a,o,c),typeof p!="function"&&(gs===null?gs=new Set([this]):gs.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function Z5(t,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&pr(a,o,p,!0),o=ra.current,o!==null){switch(o.tag){case 31:case 13:return Na===null?sd():o.alternate===null&&en===0&&(en=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===Iu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),Yh(t,c,p)),!1;case 22:return o.flags|=65536,c===Iu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([c]):o.add(c)),Yh(t,c,p)),!1}throw Error(r(435,o.tag))}return Yh(t,c,p),sd(),!1}if(ht)return a=ra.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Kp&&(t=Error(r(422),{cause:c}),Ll(Sa(t,o)))):(c!==Kp&&(a=Error(r(423),{cause:c}),Ll(Sa(a,o))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=Sa(c,o),p=Ah(t.stateNode,c,p),th(t,p),en!==4&&(en=2)),!1;var g=Error(r(520),{cause:c});if(g=Sa(g,o),sc===null?sc=[g]:sc.push(g),en!==4&&(en=2),a===null)return!0;c=Sa(c,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,t=p&-p,o.lanes|=t,t=Ah(o.stateNode,c,t),th(o,t),!1;case 1:if(a=o.type,g=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(gs===null||!gs.has(g))))return o.flags|=65536,p&=-p,o.lanes|=p,p=sv(p),ov(p,t,o,c),th(o,p),!1}o=o.return}while(o!==null);return!1}var Nh=Error(r(461)),dn=!1;function Tn(t,a,o,c){a.child=t===null?ub(a,null,o,c):mo(a,t.child,o,c)}function rv(t,a,o,c,p){o=o.render;var g=a.ref;if("ref"in c){var w={};for(var A in c)A!=="ref"&&(w[A]=c[A])}else w=c;return ro(a),c=rh(t,a,o,w,g,p),A=lh(),t!==null&&!dn?(ch(t,a,p),Ei(t,a,p)):(ht&&A&&Vp(a),a.flags|=1,Tn(t,a,c,p),a.child)}function lv(t,a,o,c,p){if(t===null){var g=o.type;return typeof g=="function"&&!Bp(g)&&g.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=g,cv(t,a,g,c,p)):(t=_u(o.type,null,c,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(g=t.child,!Ih(t,p)){var w=g.memoizedProps;if(o=o.compare,o=o!==null?o:ql,o(w,c)&&t.ref===a.ref)return Ei(t,a,p)}return a.flags|=1,t=ji(g,c),t.ref=a.ref,t.return=a,a.child=t}function cv(t,a,o,c,p){if(t!==null){var g=t.memoizedProps;if(ql(g,c)&&t.ref===a.ref)if(dn=!1,a.pendingProps=c=g,Ih(t,p))(t.flags&131072)!==0&&(dn=!0);else return a.lanes=t.lanes,Ei(t,a,p)}return Ch(t,a,o,c,p)}function uv(t,a,o,c){var p=c.children,g=t!==null?t.memoizedState:null;if(t===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|o:o,t!==null){for(c=a.child=t.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~g}else c=0,a.child=null;return dv(t,a,g,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Du(a,g!==null?g.cachePool:null),g!==null?pb(a,g):ah(),hb(a);else return c=a.lanes=536870912,dv(t,a,g!==null?g.baseLanes|o:o,o,c)}else g!==null?(Du(a,g.cachePool),pb(a,g),ms(),a.memoizedState=null):(t!==null&&Du(a,null),ah(),ms());return Tn(t,a,p,o),a.child}function Jl(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function dv(t,a,o,c,p){var g=Xp();return g=g===null?null:{parent:cn._currentValue,pool:g},a.memoizedState={baseLanes:o,cachePool:g},t!==null&&Du(a,null),ah(),hb(a),t!==null&&pr(t,a,c,!0),a.childLanes=p,null}function Qu(t,a){return a=Yu({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function mv(t,a,o){return mo(a,t.child,null,o),t=Qu(a,a.pendingProps),t.flags|=2,la(a),a.memoizedState=null,t}function Y5(t,a,o){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,t===null){if(ht){if(c.mode==="hidden")return t=Qu(a,c),a.lanes=536870912,Jl(null,t);if(sh(a),(t=qt)?(t=jx(t,Aa),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:is!==null?{id:ai,overflow:ii}:null,retryLane:536870912,hydrationErrors:null},o=Zy(t),o.return=a,a.child=o,Cn=a,qt=null)):t=null,t===null)throw os(a);return a.lanes=536870912,null}return Qu(a,c)}var g=t.memoizedState;if(g!==null){var w=g.dehydrated;if(sh(a),p)if(a.flags&256)a.flags&=-257,a=mv(t,a,o);else if(a.memoizedState!==null)a.child=t.child,a.flags|=128,a=null;else throw Error(r(558));else if(dn||pr(t,a,o,!1),p=(o&t.childLanes)!==0,dn||p){if(c=It,c!==null&&(w=gl(c,o),w!==0&&w!==g.retryLane))throw g.retryLane=w,ao(t,w),Yn(c,t,w),Nh;sd(),a=mv(t,a,o)}else t=g.treeContext,qt=Ca(w.nextSibling),Cn=a,ht=!0,ss=null,Aa=!1,t!==null&&Jy(a,t),a=Qu(a,c),a.flags|=4096;return a}return t=ji(t.child,{mode:c.mode,children:c.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Zu(t,a){var o=a.ref;if(o===null)t!==null&&t.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(t===null||t.ref!==o)&&(a.flags|=4194816)}}function Ch(t,a,o,c,p){return ro(a),o=rh(t,a,o,c,void 0,p),c=lh(),t!==null&&!dn?(ch(t,a,p),Ei(t,a,p)):(ht&&c&&Vp(a),a.flags|=1,Tn(t,a,o,p),a.child)}function pv(t,a,o,c,p,g){return ro(a),a.updateQueue=null,o=gb(a,c,o,p),fb(t),c=lh(),t!==null&&!dn?(ch(t,a,g),Ei(t,a,g)):(ht&&c&&Vp(a),a.flags|=1,Tn(t,a,o,g),a.child)}function hv(t,a,o,c,p){if(ro(a),a.stateNode===null){var g=cr,w=o.contextType;typeof w=="object"&&w!==null&&(g=_n(w)),g=new o(c,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=jh,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=c,g.state=a.memoizedState,g.refs={},Wp(a),w=o.contextType,g.context=typeof w=="object"&&w!==null?_n(w):cr,g.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(kh(a,o,w,c),g.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(w=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),w!==g.state&&jh.enqueueReplaceState(g,g.state,null),Fl(a,c,g,p),Hl(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(t===null){g=a.stateNode;var A=a.memoizedProps,D=ho(o,A);g.props=D;var G=g.context,ee=o.contextType;w=cr,typeof ee=="object"&&ee!==null&&(w=_n(ee));var ie=o.getDerivedStateFromProps;ee=typeof ie=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ee||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||G!==w)&&ev(a,g,c,w),ls=!1;var F=a.memoizedState;g.state=F,Fl(a,c,g,p),Hl(),G=a.memoizedState,A||F!==G||ls?(typeof ie=="function"&&(kh(a,o,ie,c),G=a.memoizedState),(D=ls||Wb(a,o,D,c,F,G,w))?(ee||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=G),g.props=c,g.state=G,g.context=w,c=D):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{g=a.stateNode,eh(t,a),w=a.memoizedProps,ee=ho(o,w),g.props=ee,ie=a.pendingProps,F=g.context,G=o.contextType,D=cr,typeof G=="object"&&G!==null&&(D=_n(G)),A=o.getDerivedStateFromProps,(G=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(w!==ie||F!==D)&&ev(a,g,c,D),ls=!1,F=a.memoizedState,g.state=F,Fl(a,c,g,p),Hl();var Y=a.memoizedState;w!==ie||F!==Y||ls||t!==null&&t.dependencies!==null&&Eu(t.dependencies)?(typeof A=="function"&&(kh(a,o,A,c),Y=a.memoizedState),(ee=ls||Wb(a,o,ee,c,F,Y,D)||t!==null&&t.dependencies!==null&&Eu(t.dependencies))?(G||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(c,Y,D),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(c,Y,D)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Y),g.props=c,g.state=Y,g.context=D,c=ee):(typeof g.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),c=!1)}return g=c,Zu(t,a),c=(a.flags&128)!==0,g||c?(g=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,t!==null&&c?(a.child=mo(a,t.child,null,p),a.child=mo(a,null,o,p)):Tn(t,a,o,p),a.memoizedState=g.state,t=a.child):t=Ei(t,a,p),t}function fv(t,a,o,c){return so(),a.flags|=256,Tn(t,a,o,c),a.child}var _h={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Th(t){return{baseLanes:t,cachePool:ib()}}function Eh(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=ua),t}function gv(t,a,o){var c=a.pendingProps,p=!1,g=(a.flags&128)!==0,w;if((w=g)||(w=t!==null&&t.memoizedState===null?!1:(nn.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,t===null){if(ht){if(p?ds(a):ms(),(t=qt)?(t=jx(t,Aa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:is!==null?{id:ai,overflow:ii}:null,retryLane:536870912,hydrationErrors:null},o=Zy(t),o.return=a,a.child=o,Cn=a,qt=null)):t=null,t===null)throw os(a);return pf(t)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(ms(),p=a.mode,A=Yu({mode:"hidden",children:A},p),c=io(c,p,o,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=Th(o),c.childLanes=Eh(t,w,o),a.memoizedState=_h,Jl(null,c)):(ds(a),Rh(a,A))}var D=t.memoizedState;if(D!==null&&(A=D.dehydrated,A!==null)){if(g)a.flags&256?(ds(a),a.flags&=-257,a=Dh(t,a,o)):a.memoizedState!==null?(ms(),a.child=t.child,a.flags|=128,a=null):(ms(),A=c.fallback,p=a.mode,c=Yu({mode:"visible",children:c.children},p),A=io(A,p,o,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,mo(a,t.child,null,o),c=a.child,c.memoizedState=Th(o),c.childLanes=Eh(t,w,o),a.memoizedState=_h,a=Jl(null,c));else if(ds(a),pf(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var G=w.dgst;w=G,c=Error(r(419)),c.stack="",c.digest=w,Ll({value:c,source:null,stack:null}),a=Dh(t,a,o)}else if(dn||pr(t,a,o,!1),w=(o&t.childLanes)!==0,dn||w){if(w=It,w!==null&&(c=gl(w,o),c!==0&&c!==D.retryLane))throw D.retryLane=c,ao(t,c),Yn(w,t,c),Nh;mf(A)||sd(),a=Dh(t,a,o)}else mf(A)?(a.flags|=192,a.child=t.child,a=null):(t=D.treeContext,qt=Ca(A.nextSibling),Cn=a,ht=!0,ss=null,Aa=!1,t!==null&&Jy(a,t),a=Rh(a,c.children),a.flags|=4096);return a}return p?(ms(),A=c.fallback,p=a.mode,D=t.child,G=D.sibling,c=ji(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,G!==null?A=ji(G,A):(A=io(A,p,o,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,Jl(null,c),c=a.child,A=t.child.memoizedState,A===null?A=Th(o):(p=A.cachePool,p!==null?(D=cn._currentValue,p=p.parent!==D?{parent:D,pool:D}:p):p=ib(),A={baseLanes:A.baseLanes|o,cachePool:p}),c.memoizedState=A,c.childLanes=Eh(t,w,o),a.memoizedState=_h,Jl(t.child,c)):(ds(a),o=t.child,t=o.sibling,o=ji(o,{mode:"visible",children:c.children}),o.return=a,o.sibling=null,t!==null&&(w=a.deletions,w===null?(a.deletions=[t],a.flags|=16):w.push(t)),a.child=o,a.memoizedState=null,o)}function Rh(t,a){return a=Yu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Yu(t,a){return t=oa(22,t,null,a),t.lanes=0,t}function Dh(t,a,o){return mo(a,t.child,null,o),t=Rh(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function yv(t,a,o){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a),Fp(t.return,a,o)}function zh(t,a,o,c,p,g){var w=t.memoizedState;w===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:g}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=o,w.tailMode=p,w.treeForkCount=g)}function bv(t,a,o){var c=a.pendingProps,p=c.revealOrder,g=c.tail;c=c.children;var w=nn.current,A=(w&2)!==0;if(A?(w=w&1|2,a.flags|=128):w&=1,xe(nn,w),Tn(t,a,c,o),c=ht?Bl:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&yv(t,o,a);else if(t.tag===19)yv(t,o,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(p){case"forwards":for(o=a.child,p=null;o!==null;)t=o.alternate,t!==null&&Mu(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),zh(a,!1,p,o,g,c);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(t=p.alternate,t!==null&&Mu(t)===null){a.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}zh(a,!0,o,null,g,c);break;case"together":zh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Ei(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),fs|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(pr(t,a,o,!1),(o&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,o=ji(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=ji(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Ih(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Eu(t)))}function X5(t,a,o){switch(a.tag){case 3:Ze(a,a.stateNode.containerInfo),rs(a,cn,t.memoizedState.cache),so();break;case 27:case 5:Ct(a);break;case 4:Ze(a,a.stateNode.containerInfo);break;case 10:rs(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,sh(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ds(a),a.flags|=128,null):(o&a.child.childLanes)!==0?gv(t,a,o):(ds(a),t=Ei(t,a,o),t!==null?t.sibling:null);ds(a);break;case 19:var p=(t.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(pr(t,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return bv(t,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),xe(nn,nn.current),c)break;return null;case 22:return a.lanes=0,uv(t,a,o,a.pendingProps);case 24:rs(a,cn,t.memoizedState.cache)}return Ei(t,a,o)}function vv(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)dn=!0;else{if(!Ih(t,o)&&(a.flags&128)===0)return dn=!1,X5(t,a,o);dn=(t.flags&131072)!==0}else dn=!1,ht&&(a.flags&1048576)!==0&&Xy(a,Bl,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(t=co(a.elementType),a.type=t,typeof t=="function")Bp(t)?(c=ho(t,c),a.tag=1,a=hv(null,a,t,c,o)):(a.tag=0,a=Ch(null,a,t,c,o));else{if(t!=null){var p=t.$$typeof;if(p===$){a.tag=11,a=rv(null,a,t,c,o);break e}else if(p===V){a.tag=14,a=lv(null,a,t,c,o);break e}}throw a=ke(t)||t,Error(r(306,a,""))}}return a;case 0:return Ch(t,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=ho(c,a.pendingProps),hv(t,a,c,p,o);case 3:e:{if(Ze(a,a.stateNode.containerInfo),t===null)throw Error(r(387));c=a.pendingProps;var g=a.memoizedState;p=g.element,eh(t,a),Fl(a,c,null,o);var w=a.memoizedState;if(c=w.cache,rs(a,cn,c),c!==g.cache&&Qp(a,[cn],o,!0),Hl(),c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=fv(t,a,c,o);break e}else if(c!==p){p=Sa(Error(r(424)),a),Ll(p),a=fv(t,a,c,o);break e}else for(t=a.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,qt=Ca(t.firstChild),Cn=a,ht=!0,ss=null,Aa=!0,o=ub(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(so(),c===p){a=Ei(t,a,o);break e}Tn(t,a,c,o)}a=a.child}return a;case 26:return Zu(t,a),t===null?(o=Ex(a.type,null,a.pendingProps,null))?a.memoizedState=o:ht||(o=a.type,t=a.pendingProps,c=md(ue.current).createElement(o),c[ln]=a,c[zn]=t,En(c,o,t),tn(c),a.stateNode=c):a.memoizedState=Ex(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ct(a),t===null&&ht&&(c=a.stateNode=Cx(a.type,a.pendingProps,ue.current),Cn=a,Aa=!0,p=qt,xs(a.type)?(hf=p,qt=Ca(c.firstChild)):qt=p),Tn(t,a,a.pendingProps.children,o),Zu(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&ht&&((p=c=qt)&&(c=C_(c,a.type,a.pendingProps,Aa),c!==null?(a.stateNode=c,Cn=a,qt=Ca(c.firstChild),Aa=!1,p=!0):p=!1),p||os(a)),Ct(a),p=a.type,g=a.pendingProps,w=t!==null?t.memoizedProps:null,c=g.children,cf(p,g)?c=null:w!==null&&cf(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=rh(t,a,V5,null,null,o),pc._currentValue=p),Zu(t,a),Tn(t,a,c,o),a.child;case 6:return t===null&&ht&&((t=o=qt)&&(o=__(o,a.pendingProps,Aa),o!==null?(a.stateNode=o,Cn=a,qt=null,t=!0):t=!1),t||os(a)),null;case 13:return gv(t,a,o);case 4:return Ze(a,a.stateNode.containerInfo),c=a.pendingProps,t===null?a.child=mo(a,null,c,o):Tn(t,a,c,o),a.child;case 11:return rv(t,a,a.type,a.pendingProps,o);case 7:return Tn(t,a,a.pendingProps,o),a.child;case 8:return Tn(t,a,a.pendingProps.children,o),a.child;case 12:return Tn(t,a,a.pendingProps.children,o),a.child;case 10:return c=a.pendingProps,rs(a,a.type,c.value),Tn(t,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,ro(a),p=_n(p),c=c(p),a.flags|=1,Tn(t,a,c,o),a.child;case 14:return lv(t,a,a.type,a.pendingProps,o);case 15:return cv(t,a,a.type,a.pendingProps,o);case 19:return bv(t,a,o);case 31:return Y5(t,a,o);case 22:return uv(t,a,o,a.pendingProps);case 24:return ro(a),c=_n(cn),t===null?(p=Xp(),p===null&&(p=It,g=Zp(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=o),p=g),a.memoizedState={parent:c,cache:p},Wp(a),rs(a,cn,p)):((t.lanes&o)!==0&&(eh(t,a),Fl(a,null,null,o),Hl()),p=t.memoizedState,g=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),rs(a,cn,c)):(c=g.cache,rs(a,cn,c),c!==p.cache&&Qp(a,[cn],o,!0))),Tn(t,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Ri(t){t.flags|=4}function Oh(t,a,o,c,p){if((a=(t.mode&32)!==0)&&(a=!1),a){if(t.flags|=16777216,(p&335544128)===p)if(t.stateNode.complete)t.flags|=8192;else if(Hv())t.flags|=8192;else throw uo=Iu,Jp}else t.flags&=-16777217}function xv(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ox(a))if(Hv())t.flags|=8192;else throw uo=Iu,Jp}function Xu(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?yi():536870912,t.lanes|=a,Ar|=a)}function Wl(t,a){if(!ht)switch(t.tailMode){case"hidden":a=t.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?t.tail=null:o.sibling=null;break;case"collapsed":o=t.tail;for(var c=null;o!==null;)o.alternate!==null&&(c=o),o=o.sibling;c===null?a||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Mt(t){var a=t.alternate!==null&&t.alternate.child===t.child,o=0,c=0;if(a)for(var p=t.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)o|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=o,a}function J5(t,a,o){var c=a.pendingProps;switch($p(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(a),null;case 1:return Mt(a),null;case 3:return o=a.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Ci(cn),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(mr(a)?Ri(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Gp())),Mt(a),null;case 26:var p=a.type,g=a.memoizedState;return t===null?(Ri(a),g!==null?(Mt(a),xv(a,g)):(Mt(a),Oh(a,p,null,c,o))):g?g!==t.memoizedState?(Ri(a),Mt(a),xv(a,g)):(Mt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==c&&Ri(a),Mt(a),Oh(a,p,t,c,o)),null;case 27:if(me(a),o=ue.current,p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&Ri(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Mt(a),null}t=pe.current,mr(a)?Wy(a):(t=Cx(p,c,o),a.stateNode=t,Ri(a))}return Mt(a),null;case 5:if(me(a),p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&Ri(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return Mt(a),null}if(g=pe.current,mr(a))Wy(a);else{var w=md(ue.current);switch(g){case 1:g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=w.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?g.multiple=!0:c.size&&(g.size=c.size);break;default:g=typeof c.is=="string"?w.createElement(p,{is:c.is}):w.createElement(p)}}g[ln]=a,g[zn]=c;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)g.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break e;for(;w.sibling===null;){if(w.return===null||w.return===a)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=g;e:switch(En(g,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ri(a)}}return Mt(a),Oh(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,o),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==c&&Ri(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(r(166));if(t=ue.current,mr(a)){if(t=a.stateNode,o=a.memoizedProps,c=null,p=Cn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}t[ln]=a,t=!!(t.nodeValue===o||c!==null&&c.suppressHydrationWarning===!0||gx(t.nodeValue,o)),t||os(a,!0)}else t=md(t).createTextNode(c),t[ln]=a,a.stateNode=t}return Mt(a),null;case 31:if(o=a.memoizedState,t===null||t.memoizedState!==null){if(c=mr(a),o!==null){if(t===null){if(!c)throw Error(r(318));if(t=a.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ln]=a}else so(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),t=!1}else o=Gp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=o),t=!0;if(!t)return a.flags&256?(la(a),a):(la(a),null);if((a.flags&128)!==0)throw Error(r(558))}return Mt(a),null;case 13:if(c=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=mr(a),c!==null&&c.dehydrated!==null){if(t===null){if(!p)throw Error(r(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[ln]=a}else so(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mt(a),p=!1}else p=Gp(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(la(a),a):(la(a),null)}return la(a),(a.flags&128)!==0?(a.lanes=o,a):(o=c!==null,t=t!==null&&t.memoizedState!==null,o&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),g=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(g=c.memoizedState.cachePool.pool),g!==p&&(c.flags|=2048)),o!==t&&o&&(a.child.flags|=8192),Xu(a,a.updateQueue),Mt(a),null);case 4:return Ee(),t===null&&af(a.stateNode.containerInfo),Mt(a),null;case 10:return Ci(a.type),Mt(a),null;case 19:if(Me(nn),c=a.memoizedState,c===null)return Mt(a),null;if(p=(a.flags&128)!==0,g=c.rendering,g===null)if(p)Wl(c,!1);else{if(en!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(g=Mu(t),g!==null){for(a.flags|=128,Wl(c,!1),t=g.updateQueue,a.updateQueue=t,Xu(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)Qy(o,t),o=o.sibling;return xe(nn,nn.current&1|2),ht&&Ai(a,c.treeForkCount),a.child}t=t.sibling}c.tail!==null&&Vt()>nd&&(a.flags|=128,p=!0,Wl(c,!1),a.lanes=4194304)}else{if(!p)if(t=Mu(g),t!==null){if(a.flags|=128,p=!0,t=t.updateQueue,a.updateQueue=t,Xu(a,t),Wl(c,!0),c.tail===null&&c.tailMode==="hidden"&&!g.alternate&&!ht)return Mt(a),null}else 2*Vt()-c.renderingStartTime>nd&&o!==536870912&&(a.flags|=128,p=!0,Wl(c,!1),a.lanes=4194304);c.isBackwards?(g.sibling=a.child,a.child=g):(t=c.last,t!==null?t.sibling=g:a.child=g,c.last=g)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Vt(),t.sibling=null,o=nn.current,xe(nn,p?o&1|2:o&1),ht&&Ai(a,c.treeForkCount),t):(Mt(a),null);case 22:case 23:return la(a),ih(),c=a.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(o&536870912)!==0&&(a.flags&128)===0&&(Mt(a),a.subtreeFlags&6&&(a.flags|=8192)):Mt(a),o=a.updateQueue,o!==null&&Xu(a,o.retryQueue),o=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==o&&(a.flags|=2048),t!==null&&Me(lo),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),Ci(cn),Mt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function W5(t,a){switch($p(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return Ci(cn),Ee(),t=a.flags,(t&65536)!==0&&(t&128)===0?(a.flags=t&-65537|128,a):null;case 26:case 27:case 5:return me(a),null;case 31:if(a.memoizedState!==null){if(la(a),a.alternate===null)throw Error(r(340));so()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 13:if(la(a),t=a.memoizedState,t!==null&&t.dehydrated!==null){if(a.alternate===null)throw Error(r(340));so()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return Me(nn),null;case 4:return Ee(),null;case 10:return Ci(a.type),null;case 22:case 23:return la(a),ih(),t!==null&&Me(lo),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return Ci(cn),null;case 25:return null;default:return null}}function wv(t,a){switch($p(a),a.tag){case 3:Ci(cn),Ee();break;case 26:case 27:case 5:me(a);break;case 4:Ee();break;case 31:a.memoizedState!==null&&la(a);break;case 13:la(a);break;case 19:Me(nn);break;case 10:Ci(a.type);break;case 22:case 23:la(a),ih(),t!==null&&Me(lo);break;case 24:Ci(cn)}}function ec(t,a){try{var o=a.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var p=c.next;o=p;do{if((o.tag&t)===t){c=void 0;var g=o.create,w=o.inst;c=g(),w.destroy=c}o=o.next}while(o!==p)}}catch(A){Tt(a,a.return,A)}}function ps(t,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var g=p.next;c=g;do{if((c.tag&t)===t){var w=c.inst,A=w.destroy;if(A!==void 0){w.destroy=void 0,p=a;var D=o,G=A;try{G()}catch(ee){Tt(p,D,ee)}}}c=c.next}while(c!==g)}}catch(ee){Tt(a,a.return,ee)}}function Sv(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{mb(a,o)}catch(c){Tt(t,t.return,c)}}}function kv(t,a,o){o.props=ho(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(c){Tt(t,a,c)}}function tc(t,a){try{var o=t.ref;if(o!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof o=="function"?t.refCleanup=o(c):o.current=c}}catch(p){Tt(t,a,p)}}function si(t,a){var o=t.ref,c=t.refCleanup;if(o!==null)if(typeof c=="function")try{c()}catch(p){Tt(t,a,p)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){Tt(t,a,p)}else o.current=null}function jv(t){var a=t.type,o=t.memoizedProps,c=t.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&c.focus();break e;case"img":o.src?c.src=o.src:o.srcSet&&(c.srcset=o.srcSet)}}catch(p){Tt(t,t.return,p)}}function Ph(t,a,o){try{var c=t.stateNode;w_(c,t.type,o,a),c[zn]=a}catch(p){Tt(t,t.return,p)}}function Av(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xs(t.type)||t.tag===4}function qh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Av(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&&xs(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 Mh(t,a,o){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(t,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(t),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Ba));else if(c!==4&&(c===27&&xs(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Mh(t,a,o),t=t.sibling;t!==null;)Mh(t,a,o),t=t.sibling}function Ju(t,a,o){var c=t.tag;if(c===5||c===6)t=t.stateNode,a?o.insertBefore(t,a):o.appendChild(t);else if(c!==4&&(c===27&&xs(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Ju(t,a,o),t=t.sibling;t!==null;)Ju(t,a,o),t=t.sibling}function Nv(t){var a=t.stateNode,o=t.memoizedProps;try{for(var c=t.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);En(a,c,o),a[ln]=t,a[zn]=o}catch(g){Tt(t,t.return,g)}}var Di=!1,mn=!1,Bh=!1,Cv=typeof WeakSet=="function"?WeakSet:Set,wn=null;function e_(t,a){if(t=t.containerInfo,rf=vd,t=By(t),Dp(t)){if("selectionStart"in t)var o={start:t.selectionStart,end:t.selectionEnd};else e:{o=(o=t.ownerDocument)&&o.defaultView||window;var c=o.getSelection&&o.getSelection();if(c&&c.rangeCount!==0){o=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{o.nodeType,g.nodeType}catch{o=null;break e}var w=0,A=-1,D=-1,G=0,ee=0,ie=t,F=null;t:for(;;){for(var Y;ie!==o||p!==0&&ie.nodeType!==3||(A=w+p),ie!==g||c!==0&&ie.nodeType!==3||(D=w+c),ie.nodeType===3&&(w+=ie.nodeValue.length),(Y=ie.firstChild)!==null;)F=ie,ie=Y;for(;;){if(ie===t)break t;if(F===o&&++G===p&&(A=w),F===g&&++ee===c&&(D=w),(Y=ie.nextSibling)!==null)break;ie=F,F=ie.parentNode}ie=Y}o=A===-1||D===-1?null:{start:A,end:D}}else o=null}o=o||{start:0,end:0}}else o=null;for(lf={focusedElem:t,selectionRange:o},vd=!1,wn=a;wn!==null;)if(a=wn,t=a.child,(a.subtreeFlags&1028)!==0&&t!==null)t.return=a,wn=t;else for(;wn!==null;){switch(a=wn,g=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(o=0;o<t.length;o++)p=t[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&g!==null){t=void 0,o=a,p=g.memoizedProps,g=g.memoizedState,c=o.stateNode;try{var Te=ho(o.type,p);t=c.getSnapshotBeforeUpdate(Te,g),c.__reactInternalSnapshotBeforeUpdate=t}catch(Qe){Tt(o,o.return,Qe)}}break;case 3:if((t&1024)!==0){if(t=a.stateNode.containerInfo,o=t.nodeType,o===9)df(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":df(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,wn=t;break}wn=a.return}}function _v(t,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Ii(t,o),c&4&&ec(5,o);break;case 1:if(Ii(t,o),c&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(w){Tt(o,o.return,w)}else{var p=ho(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Tt(o,o.return,w)}}c&64&&Sv(o),c&512&&tc(o,o.return);break;case 3:if(Ii(t,o),c&64&&(t=o.updateQueue,t!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{mb(t,a)}catch(w){Tt(o,o.return,w)}}break;case 27:a===null&&c&4&&Nv(o);case 26:case 5:Ii(t,o),a===null&&c&4&&jv(o),c&512&&tc(o,o.return);break;case 12:Ii(t,o);break;case 31:Ii(t,o),c&4&&Rv(t,o);break;case 13:Ii(t,o),c&4&&Dv(t,o),c&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=c_.bind(null,o),T_(t,o))));break;case 22:if(c=o.memoizedState!==null||Di,!c){a=a!==null&&a.memoizedState!==null||mn,p=Di;var g=mn;Di=c,(mn=a)&&!g?Oi(t,o,(o.subtreeFlags&8772)!==0):Ii(t,o),Di=p,mn=g}break;case 30:break;default:Ii(t,o)}}function Tv(t){var a=t.alternate;a!==null&&(t.alternate=null,Tv(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&vl(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 $t=null,Hn=!1;function zi(t,a,o){for(o=o.child;o!==null;)Ev(t,a,o),o=o.sibling}function Ev(t,a,o){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(xn,o)}catch{}switch(o.tag){case 26:mn||si(o,a),zi(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:mn||si(o,a);var c=$t,p=Hn;xs(o.type)&&($t=o.stateNode,Hn=!1),zi(t,a,o),uc(o.stateNode),$t=c,Hn=p;break;case 5:mn||si(o,a);case 6:if(c=$t,p=Hn,$t=null,zi(t,a,o),$t=c,Hn=p,$t!==null)if(Hn)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(o.stateNode)}catch(g){Tt(o,a,g)}else try{$t.removeChild(o.stateNode)}catch(g){Tt(o,a,g)}break;case 18:$t!==null&&(Hn?(t=$t,Sx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),zr(t)):Sx($t,o.stateNode));break;case 4:c=$t,p=Hn,$t=o.stateNode.containerInfo,Hn=!0,zi(t,a,o),$t=c,Hn=p;break;case 0:case 11:case 14:case 15:ps(2,o,a),mn||ps(4,o,a),zi(t,a,o);break;case 1:mn||(si(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&kv(o,a,c)),zi(t,a,o);break;case 21:zi(t,a,o);break;case 22:mn=(c=mn)||o.memoizedState!==null,zi(t,a,o),mn=c;break;default:zi(t,a,o)}}function Rv(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{zr(t)}catch(o){Tt(a,a.return,o)}}}function Dv(t,a){if(a.memoizedState===null&&(t=a.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{zr(t)}catch(o){Tt(a,a.return,o)}}function t_(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Cv),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Cv),a;default:throw Error(r(435,t.tag))}}function Wu(t,a){var o=t_(t);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=u_.bind(null,t,c);c.then(p,p)}})}function Fn(t,a){var o=a.deletions;if(o!==null)for(var c=0;c<o.length;c++){var p=o[c],g=t,w=a,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(xs(A.type)){$t=A.stateNode,Hn=!1;break e}break;case 5:$t=A.stateNode,Hn=!1;break e;case 3:case 4:$t=A.stateNode.containerInfo,Hn=!0;break e}A=A.return}if($t===null)throw Error(r(160));Ev(g,w,p),$t=null,Hn=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)zv(a,t),a=a.sibling}var Va=null;function zv(t,a){var o=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Fn(a,t),Qn(t),c&4&&(ps(3,t,t.return),ec(3,t),ps(5,t,t.return));break;case 1:Fn(a,t),Qn(t),c&512&&(mn||o===null||si(o,o.return)),c&64&&Di&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(o=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=o===null?c:o.concat(c))));break;case 26:var p=Va;if(Fn(a,t),Qn(t),c&512&&(mn||o===null||si(o,o.return)),c&4){var g=o!==null?o.memoizedState:null;if(c=t.memoizedState,o===null)if(c===null)if(t.stateNode===null){e:{c=t.type,o=t.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":g=p.getElementsByTagName("title")[0],(!g||g[Xi]||g[ln]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(c),p.head.insertBefore(g,p.querySelector("head > title"))),En(g,c,o),g[ln]=t,tn(g),c=g;break e;case"link":var w=zx("link","href",p).get(c+(o.href||""));if(w){for(var A=0;A<w.length;A++)if(g=w[A],g.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&g.getAttribute("rel")===(o.rel==null?null:o.rel)&&g.getAttribute("title")===(o.title==null?null:o.title)&&g.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(A,1);break t}}g=p.createElement(c),En(g,c,o),p.head.appendChild(g);break;case"meta":if(w=zx("meta","content",p).get(c+(o.content||""))){for(A=0;A<w.length;A++)if(g=w[A],g.getAttribute("content")===(o.content==null?null:""+o.content)&&g.getAttribute("name")===(o.name==null?null:o.name)&&g.getAttribute("property")===(o.property==null?null:o.property)&&g.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&g.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(A,1);break t}}g=p.createElement(c),En(g,c,o),p.head.appendChild(g);break;default:throw Error(r(468,c))}g[ln]=t,tn(g),c=g}t.stateNode=c}else Ix(p,t.type,t.stateNode);else t.stateNode=Dx(p,c,t.memoizedProps);else g!==c?(g===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):g.count--,c===null?Ix(p,t.type,t.stateNode):Dx(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&Ph(t,t.memoizedProps,o.memoizedProps)}break;case 27:Fn(a,t),Qn(t),c&512&&(mn||o===null||si(o,o.return)),o!==null&&c&4&&Ph(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Fn(a,t),Qn(t),c&512&&(mn||o===null||si(o,o.return)),t.flags&32){p=t.stateNode;try{ba(p,"")}catch(Te){Tt(t,t.return,Te)}}c&4&&t.stateNode!=null&&(p=t.memoizedProps,Ph(t,p,o!==null?o.memoizedProps:p)),c&1024&&(Bh=!0);break;case 6:if(Fn(a,t),Qn(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,o=t.stateNode;try{o.nodeValue=c}catch(Te){Tt(t,t.return,Te)}}break;case 3:if(fd=null,p=Va,Va=pd(a.containerInfo),Fn(a,t),Va=p,Qn(t),c&4&&o!==null&&o.memoizedState.isDehydrated)try{zr(a.containerInfo)}catch(Te){Tt(t,t.return,Te)}Bh&&(Bh=!1,Iv(t));break;case 4:c=Va,Va=pd(t.stateNode.containerInfo),Fn(a,t),Qn(t),Va=c;break;case 12:Fn(a,t),Qn(t);break;case 31:Fn(a,t),Qn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Wu(t,c)));break;case 13:Fn(a,t),Qn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(td=Vt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Wu(t,c)));break;case 22:p=t.memoizedState!==null;var D=o!==null&&o.memoizedState!==null,G=Di,ee=mn;if(Di=G||p,mn=ee||D,Fn(a,t),mn=ee,Di=G,Qn(t),c&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||D||Di||mn||fo(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){D=o=a;try{if(g=D.stateNode,p)w=g.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{A=D.stateNode;var ie=D.memoizedProps.style,F=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;A.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(Te){Tt(D,D.return,Te)}}}else if(a.tag===6){if(o===null){D=a;try{D.stateNode.nodeValue=p?"":D.memoizedProps}catch(Te){Tt(D,D.return,Te)}}}else if(a.tag===18){if(o===null){D=a;try{var Y=D.stateNode;p?kx(Y,!0):kx(D.stateNode,!1)}catch(Te){Tt(D,D.return,Te)}}}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;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=t.updateQueue,c!==null&&(o=c.retryQueue,o!==null&&(c.retryQueue=null,Wu(t,o))));break;case 19:Fn(a,t),Qn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,Wu(t,c)));break;case 30:break;case 21:break;default:Fn(a,t),Qn(t)}}function Qn(t){var a=t.flags;if(a&2){try{for(var o,c=t.return;c!==null;){if(Av(c)){o=c;break}c=c.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var p=o.stateNode,g=qh(t);Ju(t,g,p);break;case 5:var w=o.stateNode;o.flags&32&&(ba(w,""),o.flags&=-33);var A=qh(t);Ju(t,A,w);break;case 3:case 4:var D=o.stateNode.containerInfo,G=qh(t);Mh(t,G,D);break;default:throw Error(r(161))}}catch(ee){Tt(t,t.return,ee)}t.flags&=-3}a&4096&&(t.flags&=-4097)}function Iv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Iv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function Ii(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)_v(t,a.alternate,a),a=a.sibling}function fo(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:ps(4,a,a.return),fo(a);break;case 1:si(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&kv(a,a.return,o),fo(a);break;case 27:uc(a.stateNode);case 26:case 5:si(a,a.return),fo(a);break;case 22:a.memoizedState===null&&fo(a);break;case 30:fo(a);break;default:fo(a)}t=t.sibling}}function Oi(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=t,g=a,w=g.flags;switch(g.tag){case 0:case 11:case 15:Oi(p,g,o),ec(4,g);break;case 1:if(Oi(p,g,o),c=g,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Tt(c,c.return,G)}if(c=g,p=c.updateQueue,p!==null){var A=c.stateNode;try{var D=p.shared.hiddenCallbacks;if(D!==null)for(p.shared.hiddenCallbacks=null,p=0;p<D.length;p++)db(D[p],A)}catch(G){Tt(c,c.return,G)}}o&&w&64&&Sv(g),tc(g,g.return);break;case 27:Nv(g);case 26:case 5:Oi(p,g,o),o&&c===null&&w&4&&jv(g),tc(g,g.return);break;case 12:Oi(p,g,o);break;case 31:Oi(p,g,o),o&&w&4&&Rv(p,g);break;case 13:Oi(p,g,o),o&&w&4&&Dv(p,g);break;case 22:g.memoizedState===null&&Oi(p,g,o),tc(g,g.return);break;case 30:break;default:Oi(p,g,o)}a=a.sibling}}function Lh(t,a){var o=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),t=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(t=a.memoizedState.cachePool.pool),t!==o&&(t!=null&&t.refCount++,o!=null&&Ul(o))}function Uh(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Ul(t))}function $a(t,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ov(t,a,o,c),a=a.sibling}function Ov(t,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:$a(t,a,o,c),p&2048&&ec(9,a);break;case 1:$a(t,a,o,c);break;case 3:$a(t,a,o,c),p&2048&&(t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Ul(t)));break;case 12:if(p&2048){$a(t,a,o,c),t=a.stateNode;try{var g=a.memoizedProps,w=g.id,A=g.onPostCommit;typeof A=="function"&&A(w,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(D){Tt(a,a.return,D)}}else $a(t,a,o,c);break;case 31:$a(t,a,o,c);break;case 13:$a(t,a,o,c);break;case 23:break;case 22:g=a.stateNode,w=a.alternate,a.memoizedState!==null?g._visibility&2?$a(t,a,o,c):nc(t,a):g._visibility&2?$a(t,a,o,c):(g._visibility|=2,Sr(t,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Lh(w,a);break;case 24:$a(t,a,o,c),p&2048&&Uh(a.alternate,a);break;default:$a(t,a,o,c)}}function Sr(t,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=t,w=a,A=o,D=c,G=w.flags;switch(w.tag){case 0:case 11:case 15:Sr(g,w,A,D,p),ec(8,w);break;case 23:break;case 22:var ee=w.stateNode;w.memoizedState!==null?ee._visibility&2?Sr(g,w,A,D,p):nc(g,w):(ee._visibility|=2,Sr(g,w,A,D,p)),p&&G&2048&&Lh(w.alternate,w);break;case 24:Sr(g,w,A,D,p),p&&G&2048&&Uh(w.alternate,w);break;default:Sr(g,w,A,D,p)}a=a.sibling}}function nc(t,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=t,c=a,p=c.flags;switch(c.tag){case 22:nc(o,c),p&2048&&Lh(c.alternate,c);break;case 24:nc(o,c),p&2048&&Uh(c.alternate,c);break;default:nc(o,c)}a=a.sibling}}var ac=8192;function kr(t,a,o){if(t.subtreeFlags&ac)for(t=t.child;t!==null;)Pv(t,a,o),t=t.sibling}function Pv(t,a,o){switch(t.tag){case 26:kr(t,a,o),t.flags&ac&&t.memoizedState!==null&&U_(o,Va,t.memoizedState,t.memoizedProps);break;case 5:kr(t,a,o);break;case 3:case 4:var c=Va;Va=pd(t.stateNode.containerInfo),kr(t,a,o),Va=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ac,ac=16777216,kr(t,a,o),ac=c):kr(t,a,o));break;default:kr(t,a,o)}}function qv(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 ic(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];wn=c,Bv(c,t)}qv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Mv(t),t=t.sibling}function Mv(t){switch(t.tag){case 0:case 11:case 15:ic(t),t.flags&2048&&ps(9,t,t.return);break;case 3:ic(t);break;case 12:ic(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,ed(t)):ic(t);break;default:ic(t)}}function ed(t){var a=t.deletions;if((t.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var c=a[o];wn=c,Bv(c,t)}qv(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:ps(8,a,a.return),ed(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,ed(a));break;default:ed(a)}t=t.sibling}}function Bv(t,a){for(;wn!==null;){var o=wn;switch(o.tag){case 0:case 11:case 15:ps(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var c=o.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Ul(o.memoizedState.cache)}if(c=o.child,c!==null)c.return=o,wn=c;else e:for(o=t;wn!==null;){c=wn;var p=c.sibling,g=c.return;if(Tv(c),c===o){wn=null;break e}if(p!==null){p.return=g,wn=p;break e}wn=g}}}var n_={getCacheForType:function(t){var a=_n(cn),o=a.data.get(t);return o===void 0&&(o=t(),a.data.set(t,o)),o},cacheSignal:function(){return _n(cn).controller.signal}},a_=typeof WeakMap=="function"?WeakMap:Map,jt=0,It=null,rt=null,ut=0,_t=0,ca=null,hs=!1,jr=!1,Vh=!1,Pi=0,en=0,fs=0,go=0,$h=0,ua=0,Ar=0,sc=null,Zn=null,Kh=!1,td=0,Lv=0,nd=1/0,ad=null,gs=null,hn=0,ys=null,Nr=null,qi=0,Gh=0,Hh=null,Uv=null,oc=0,Fh=null;function da(){return(jt&2)!==0&&ut!==0?ut&-ut:B.T!==null?Wh():Xo()}function Vv(){if(ua===0)if((ut&536870912)===0||ht){var t=ze;ze<<=1,(ze&3932160)===0&&(ze=262144),ua=t}else ua=536870912;return t=ra.current,t!==null&&(t.flags|=32),ua}function Yn(t,a,o){(t===It&&(_t===2||_t===9)||t.cancelPendingCommit!==null)&&(Cr(t,0),bs(t,ut,ua,!1)),Ys(t,o),((jt&2)===0||t!==It)&&(t===It&&((jt&2)===0&&(go|=o),en===4&&bs(t,ut,ua,!1)),oi(t))}function $v(t,a,o){if((jt&6)!==0)throw Error(r(327));var c=!o&&(a&127)===0&&(a&t.expiredLanes)===0||kt(t,a),p=c?o_(t,a):Zh(t,a,!0),g=c;do{if(p===0){jr&&!c&&bs(t,a,0,!1);break}else{if(o=t.current.alternate,g&&!i_(o)){p=Zh(t,a,!1),g=!1;continue}if(p===2){if(g=a,t.errorRecoveryDisabledLanes&g)var w=0;else w=t.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){a=w;e:{var A=t;p=sc;var D=A.current.memoizedState.isDehydrated;if(D&&(Cr(A,w).flags|=256),w=Zh(A,w,!1),w!==2){if(Vh&&!D){A.errorRecoveryDisabledLanes|=g,go|=g,p=4;break e}g=Zn,Zn=p,g!==null&&(Zn===null?Zn=g:Zn.push.apply(Zn,g))}p=w}if(g=!1,p!==2)continue}}if(p===1){Cr(t,0),bs(t,a,0,!0);break}e:{switch(c=t,g=p,g){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:bs(c,a,ua,!hs);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=td+300-Vt(),10<p)){if(bs(c,a,ua,!hs),et(c,0,!0)!==0)break e;qi=a,c.timeoutHandle=xx(Kv.bind(null,c,o,Zn,ad,Kh,a,ua,go,Ar,hs,g,"Throttled",-0,0),p);break e}Kv(c,o,Zn,ad,Kh,a,ua,go,Ar,hs,g,null,-0,0)}}break}while(!0);oi(t)}function Kv(t,a,o,c,p,g,w,A,D,G,ee,ie,F,Y){if(t.timeoutHandle=-1,ie=a.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ba},Pv(a,g,ie);var Te=(g&62914560)===g?td-Vt():(g&4194048)===g?Lv-Vt():0;if(Te=V_(ie,Te),Te!==null){qi=g,t.cancelPendingCommit=Te(Jv.bind(null,t,a,g,o,c,p,w,A,D,ee,ie,null,F,Y)),bs(t,g,w,!G);return}}Jv(t,a,g,o,c,p,w,A,D)}function i_(t){for(var a=t;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var c=0;c<o.length;c++){var p=o[c],g=p.getSnapshot;p=p.value;try{if(!sa(g(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;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 bs(t,a,o,c){a&=~$h,a&=~go,t.suspendedLanes|=a,t.pingedLanes&=~a,c&&(t.warmLanes|=a),c=t.expirationTimes;for(var p=a;0<p;){var g=31-Zt(p),w=1<<g;c[g]=-1,p&=~w}o!==0&&hl(t,o,a)}function id(){return(jt&6)===0?(rc(0),!1):!0}function Qh(){if(rt!==null){if(_t===0)var t=rt.return;else t=rt,Ni=oo=null,uh(t),yr=null,$l=0,t=rt;for(;t!==null;)wv(t.alternate,t),t=t.return;rt=null}}function Cr(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,j_(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),qi=0,Qh(),It=t,rt=o=ji(t.current,null),ut=a,_t=0,ca=null,hs=!1,jr=kt(t,a),Vh=!1,Ar=ua=$h=go=fs=en=0,Zn=sc=null,Kh=!1,(a&8)!==0&&(a|=a&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=a;0<c;){var p=31-Zt(c),g=1<<p;a|=t[p],c&=~g}return Pi=a,Au(),o}function Gv(t,a){nt=null,B.H=Xl,a===gr||a===zu?(a=rb(),_t=3):a===Jp?(a=rb(),_t=4):_t=a===Nh?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ca=a,rt===null&&(en=1,Fu(t,Sa(a,t.current)))}function Hv(){var t=ra.current;return t===null?!0:(ut&4194048)===ut?Na===null:(ut&62914560)===ut||(ut&536870912)!==0?t===Na:!1}function Fv(){var t=B.H;return B.H=Xl,t===null?Xl:t}function Qv(){var t=B.A;return B.A=n_,t}function sd(){en=4,hs||(ut&4194048)!==ut&&ra.current!==null||(jr=!0),(fs&134217727)===0&&(go&134217727)===0||It===null||bs(It,ut,ua,!1)}function Zh(t,a,o){var c=jt;jt|=2;var p=Fv(),g=Qv();(It!==t||ut!==a)&&(ad=null,Cr(t,a)),a=!1;var w=en;e:do try{if(_t!==0&&rt!==null){var A=rt,D=ca;switch(_t){case 8:Qh(),w=6;break e;case 3:case 2:case 9:case 6:ra.current===null&&(a=!0);var G=_t;if(_t=0,ca=null,_r(t,A,D,G),o&&jr){w=0;break e}break;default:G=_t,_t=0,ca=null,_r(t,A,D,G)}}s_(),w=en;break}catch(ee){Gv(t,ee)}while(!0);return a&&t.shellSuspendCounter++,Ni=oo=null,jt=c,B.H=p,B.A=g,rt===null&&(It=null,ut=0,Au()),w}function s_(){for(;rt!==null;)Zv(rt)}function o_(t,a){var o=jt;jt|=2;var c=Fv(),p=Qv();It!==t||ut!==a?(ad=null,nd=Vt()+500,Cr(t,a)):jr=kt(t,a);e:do try{if(_t!==0&&rt!==null){a=rt;var g=ca;t:switch(_t){case 1:_t=0,ca=null,_r(t,a,g,1);break;case 2:case 9:if(sb(g)){_t=0,ca=null,Yv(a);break}a=function(){_t!==2&&_t!==9||It!==t||(_t=7),oi(t)},g.then(a,a);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:sb(g)?(_t=0,ca=null,Yv(a)):(_t=0,ca=null,_r(t,a,g,7));break;case 5:var w=null;switch(rt.tag){case 26:w=rt.memoizedState;case 5:case 27:var A=rt;if(w?Ox(w):A.stateNode.complete){_t=0,ca=null;var D=A.sibling;if(D!==null)rt=D;else{var G=A.return;G!==null?(rt=G,od(G)):rt=null}break t}}_t=0,ca=null,_r(t,a,g,5);break;case 6:_t=0,ca=null,_r(t,a,g,6);break;case 8:Qh(),en=6;break e;default:throw Error(r(462))}}r_();break}catch(ee){Gv(t,ee)}while(!0);return Ni=oo=null,B.H=c,B.A=p,jt=o,rt!==null?0:(It=null,ut=0,Au(),en)}function r_(){for(;rt!==null&&!Qt();)Zv(rt)}function Zv(t){var a=vv(t.alternate,t,Pi);t.memoizedProps=t.pendingProps,a===null?od(t):rt=a}function Yv(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=pv(o,a,a.pendingProps,a.type,void 0,ut);break;case 11:a=pv(o,a,a.pendingProps,a.type.render,a.ref,ut);break;case 5:uh(a);default:wv(o,a),a=rt=Qy(a,Pi),a=vv(o,a,Pi)}t.memoizedProps=t.pendingProps,a===null?od(t):rt=a}function _r(t,a,o,c){Ni=oo=null,uh(a),yr=null,$l=0;var p=a.return;try{if(Z5(t,p,a,o,ut)){en=1,Fu(t,Sa(o,t.current)),rt=null;return}}catch(g){if(p!==null)throw rt=p,g;en=1,Fu(t,Sa(o,t.current)),rt=null;return}a.flags&32768?(ht||c===1?t=!0:jr||(ut&536870912)!==0?t=!1:(hs=t=!0,(c===2||c===9||c===3||c===6)&&(c=ra.current,c!==null&&c.tag===13&&(c.flags|=16384))),Xv(a,t)):od(a)}function od(t){var a=t;do{if((a.flags&32768)!==0){Xv(a,hs);return}t=a.return;var o=J5(a.alternate,a,Pi);if(o!==null){rt=o;return}if(a=a.sibling,a!==null){rt=a;return}rt=a=t}while(a!==null);en===0&&(en=5)}function Xv(t,a){do{var o=W5(t.alternate,t);if(o!==null){o.flags&=32767,rt=o;return}if(o=t.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(t=t.sibling,t!==null)){rt=t;return}rt=t=o}while(t!==null);en=6,rt=null}function Jv(t,a,o,c,p,g,w,A,D){t.cancelPendingCommit=null;do rd();while(hn!==0);if((jt&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(g=a.lanes|a.childLanes,g|=qp,bu(t,o,g,w,A,D),t===It&&(rt=It=null,ut=0),Nr=a,ys=t,qi=o,Gh=g,Hh=p,Uv=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,d_(Dn,function(){return ax(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,p=W.p,W.p=2,w=jt,jt|=4;try{e_(t,a,o)}finally{jt=w,W.p=p,B.T=c}}hn=1,Wv(),ex(),tx()}}function Wv(){if(hn===1){hn=0;var t=ys,a=Nr,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=B.T,B.T=null;var c=W.p;W.p=2;var p=jt;jt|=4;try{zv(a,t);var g=lf,w=By(t.containerInfo),A=g.focusedElem,D=g.selectionRange;if(w!==A&&A&&A.ownerDocument&&My(A.ownerDocument.documentElement,A)){if(D!==null&&Dp(A)){var G=D.start,ee=D.end;if(ee===void 0&&(ee=G),"selectionStart"in A)A.selectionStart=G,A.selectionEnd=Math.min(ee,A.value.length);else{var ie=A.ownerDocument||document,F=ie&&ie.defaultView||window;if(F.getSelection){var Y=F.getSelection(),Te=A.textContent.length,Qe=Math.min(D.start,Te),zt=D.end===void 0?Qe:Math.min(D.end,Te);!Y.extend&&Qe>zt&&(w=zt,zt=Qe,Qe=w);var U=qy(A,Qe),O=qy(A,zt);if(U&&O&&(Y.rangeCount!==1||Y.anchorNode!==U.node||Y.anchorOffset!==U.offset||Y.focusNode!==O.node||Y.focusOffset!==O.offset)){var K=ie.createRange();K.setStart(U.node,U.offset),Y.removeAllRanges(),Qe>zt?(Y.addRange(K),Y.extend(O.node,O.offset)):(K.setEnd(O.node,O.offset),Y.addRange(K))}}}}for(ie=[],Y=A;Y=Y.parentNode;)Y.nodeType===1&&ie.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ie.length;A++){var ne=ie[A];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}vd=!!rf,lf=rf=null}finally{jt=p,W.p=c,B.T=o}}t.current=a,hn=2}}function ex(){if(hn===2){hn=0;var t=ys,a=Nr,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=B.T,B.T=null;var c=W.p;W.p=2;var p=jt;jt|=4;try{_v(t,a.alternate,a)}finally{jt=p,W.p=c,B.T=o}}hn=3}}function tx(){if(hn===4||hn===3){hn=0,Rn();var t=ys,a=Nr,o=qi,c=Uv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?hn=5:(hn=0,Nr=ys=null,nx(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(gs=null),bl(o),a=a.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(xn,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=B.T,p=W.p,W.p=2,B.T=null;try{for(var g=t.onRecoverableError,w=0;w<c.length;w++){var A=c[w];g(A.value,{componentStack:A.stack})}}finally{B.T=a,W.p=p}}(qi&3)!==0&&rd(),oi(t),p=t.pendingLanes,(o&261930)!==0&&(p&42)!==0?t===Fh?oc++:(oc=0,Fh=t):oc=0,rc(0)}}function nx(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Ul(a)))}function rd(){return Wv(),ex(),tx(),ax()}function ax(){if(hn!==5)return!1;var t=ys,a=Gh;Gh=0;var o=bl(qi),c=B.T,p=W.p;try{W.p=32>o?32:o,B.T=null,o=Hh,Hh=null;var g=ys,w=qi;if(hn=0,Nr=ys=null,qi=0,(jt&6)!==0)throw Error(r(331));var A=jt;if(jt|=4,Mv(g.current),Ov(g,g.current,w,o),jt=A,rc(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(xn,g)}catch{}return!0}finally{W.p=p,B.T=c,nx(t,a)}}function ix(t,a,o){a=Sa(o,a),a=Ah(t.stateNode,a,2),t=us(t,a,2),t!==null&&(Ys(t,2),oi(t))}function Tt(t,a,o){if(t.tag===3)ix(t,t,o);else for(;a!==null;){if(a.tag===3){ix(a,t,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(gs===null||!gs.has(c))){t=Sa(o,t),o=sv(2),c=us(a,o,2),c!==null&&(ov(o,c,a,t),Ys(c,2),oi(c));break}}a=a.return}}function Yh(t,a,o){var c=t.pingCache;if(c===null){c=t.pingCache=new a_;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(o)||(Vh=!0,p.add(o),t=l_.bind(null,t,a,o),a.then(t,t))}function l_(t,a,o){var c=t.pingCache;c!==null&&c.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,It===t&&(ut&o)===o&&(en===4||en===3&&(ut&62914560)===ut&&300>Vt()-td?(jt&2)===0&&Cr(t,0):$h|=o,Ar===ut&&(Ar=0)),oi(t)}function sx(t,a){a===0&&(a=yi()),t=ao(t,a),t!==null&&(Ys(t,a),oi(t))}function c_(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),sx(t,o)}function u_(t,a){var o=0;switch(t.tag){case 31:case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(o=p.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(a),sx(t,o)}function d_(t,a){return ct(t,a)}var ld=null,Tr=null,Xh=!1,cd=!1,Jh=!1,vs=0;function oi(t){t!==Tr&&t.next===null&&(Tr===null?ld=Tr=t:Tr=Tr.next=t),cd=!0,Xh||(Xh=!0,p_())}function rc(t,a){if(!Jh&&cd){Jh=!0;do for(var o=!1,c=ld;c!==null;){if(t!==0){var p=c.pendingLanes;if(p===0)var g=0;else{var w=c.suspendedLanes,A=c.pingedLanes;g=(1<<31-Zt(42|t)+1)-1,g&=p&~(w&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(o=!0,cx(c,g))}else g=ut,g=et(c,c===It?g:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(g&3)===0||kt(c,g)||(o=!0,cx(c,g));c=c.next}while(o);Jh=!1}}function m_(){ox()}function ox(){cd=Xh=!1;var t=0;vs!==0&&k_()&&(t=vs);for(var a=Vt(),o=null,c=ld;c!==null;){var p=c.next,g=rx(c,a);g===0?(c.next=null,o===null?ld=p:o.next=p,p===null&&(Tr=o)):(o=c,(t!==0||(g&3)!==0)&&(cd=!0)),c=p}hn!==0&&hn!==5||rc(t),vs!==0&&(vs=0)}function rx(t,a){for(var o=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes&-62914561;0<g;){var w=31-Zt(g),A=1<<w,D=p[w];D===-1?((A&o)===0||(A&c)!==0)&&(p[w]=rn(A,a)):D<=a&&(t.expiredLanes|=A),g&=~A}if(a=It,o=ut,o=et(t,t===a?o:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,o===0||t===a&&(_t===2||_t===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ft(c),t.callbackNode=null,t.callbackPriority=0;if((o&3)===0||kt(t,o)){if(a=o&-o,a===t.callbackPriority)return a;switch(c!==null&&Ft(c),bl(o)){case 2:case 8:o=fi;break;case 32:o=Dn;break;case 268435456:o=Fs;break;default:o=Dn}return c=lx.bind(null,t),o=ct(o,c),t.callbackPriority=a,t.callbackNode=o,a}return c!==null&&c!==null&&Ft(c),t.callbackPriority=2,t.callbackNode=null,2}function lx(t,a){if(hn!==0&&hn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(rd()&&t.callbackNode!==o)return null;var c=ut;return c=et(t,t===It?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:($v(t,c,a),rx(t,Vt()),t.callbackNode!=null&&t.callbackNode===o?lx.bind(null,t):null)}function cx(t,a){if(rd())return null;$v(t,a,!0)}function p_(){A_(function(){(jt&6)!==0?ct(Hs,m_):ox()})}function Wh(){if(vs===0){var t=hr;t===0&&(t=oe,oe<<=1,(oe&261888)===0&&(oe=256)),vs=t}return vs}function ux(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ar(""+t)}function dx(t,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,t.id&&o.setAttribute("form",t.id),a.parentNode.insertBefore(o,a),t=new FormData(t),o.parentNode.removeChild(o),t}function h_(t,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var g=ux((p[zn]||null).action),w=c.submitter;w&&(a=(a=w[zn]||null)?ux(a.formAction):w.getAttribute("formAction"),a!==null&&(g=a,w=null));var A=new ni("action","action",null,c,p);t.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(vs!==0){var D=w?dx(p,w):new FormData(p);vh(o,{pending:!0,data:D,method:p.method,action:g},null,D)}}else typeof g=="function"&&(A.preventDefault(),D=w?dx(p,w):new FormData(p),vh(o,{pending:!0,data:D,method:p.method,action:g},g,D))},currentTarget:p}]})}}for(var ef=0;ef<Pp.length;ef++){var tf=Pp[ef],f_=tf.toLowerCase(),g_=tf[0].toUpperCase()+tf.slice(1);Ua(f_,"on"+g_)}Ua(Vy,"onAnimationEnd"),Ua($y,"onAnimationIteration"),Ua(Ky,"onAnimationStart"),Ua("dblclick","onDoubleClick"),Ua("focusin","onFocus"),Ua("focusout","onBlur"),Ua(D5,"onTransitionRun"),Ua(z5,"onTransitionStart"),Ua(I5,"onTransitionCancel"),Ua(Gy,"onTransitionEnd"),Xs("onMouseEnter",["mouseout","mouseover"]),Xs("onMouseLeave",["mouseout","mouseover"]),Xs("onPointerEnter",["pointerout","pointerover"]),Xs("onPointerLeave",["pointerout","pointerover"]),Xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Xa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lc="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(" "),y_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lc));function mx(t,a){a=(a&4)!==0;for(var o=0;o<t.length;o++){var c=t[o],p=c.event;c=c.listeners;e:{var g=void 0;if(a)for(var w=c.length-1;0<=w;w--){var A=c[w],D=A.instance,G=A.currentTarget;if(A=A.listener,D!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=G;try{g(p)}catch(ee){ju(ee)}p.currentTarget=null,g=D}else for(w=0;w<c.length;w++){if(A=c[w],D=A.instance,G=A.currentTarget,A=A.listener,D!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=G;try{g(p)}catch(ee){ju(ee)}p.currentTarget=null,g=D}}}}function lt(t,a){var o=a[Jo];o===void 0&&(o=a[Jo]=new Set);var c=t+"__bubble";o.has(c)||(px(a,t,2,!1),o.add(c))}function nf(t,a,o){var c=0;a&&(c|=4),px(o,t,c,a)}var ud="_reactListening"+Math.random().toString(36).slice(2);function af(t){if(!t[ud]){t[ud]=!0,xl.forEach(function(o){o!=="selectionchange"&&(y_.has(o)||nf(o,!1,t),nf(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[ud]||(a[ud]=!0,nf("selectionchange",!1,a))}}function px(t,a,o,c){switch(Vx(a)){case 2:var p=G_;break;case 8:p=H_;break;default:p=vf}o=p.bind(null,a,o,t),p=void 0,!El||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(a,o,{capture:!0,passive:p}):t.addEventListener(a,o,!0):p!==void 0?t.addEventListener(a,o,{passive:p}):t.addEventListener(a,o,!1)}function sf(t,a,o,c,p){var g=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var A=c.stateNode.containerInfo;if(A===p)break;if(w===4)for(w=c.return;w!==null;){var D=w.tag;if((D===3||D===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;A!==null;){if(w=bi(A),w===null)return;if(D=w.tag,D===5||D===6||D===26||D===27){c=g=w;continue e}A=A.parentNode}}c=c.return}Tl(function(){var G=g,ee=Cl(o),ie=[];e:{var F=Hy.get(t);if(F!==void 0){var Y=ni,Te=t;switch(t){case"keypress":if(as(o)===0)break e;case"keydown":case"keyup":Y=u5;break;case"focusin":Te="focus",Y=Cp;break;case"focusout":Te="blur",Y=Cp;break;case"beforeblur":case"afterblur":Y=Cp;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=wy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=J4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=p5;break;case Vy:case $y:case Ky:Y=t5;break;case Gy:Y=f5;break;case"scroll":case"scrollend":Y=Y4;break;case"wheel":Y=y5;break;case"copy":case"cut":case"paste":Y=a5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=ky;break;case"toggle":case"beforetoggle":Y=v5}var Qe=(a&4)!==0,zt=!Qe&&(t==="scroll"||t==="scrollend"),U=Qe?F!==null?F+"Capture":null:F;Qe=[];for(var O=G,K;O!==null;){var ne=O;if(K=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||K===null||U===null||(ne=Ws(O,U),ne!=null&&Qe.push(cc(O,ne,K))),zt)break;O=O.return}0<Qe.length&&(F=new Y(F,Te,null,o,ee),ie.push({event:F,listeners:Qe}))}}if((a&7)===0){e:{if(F=t==="mouseover"||t==="pointerover",Y=t==="mouseout"||t==="pointerout",F&&o!==Nl&&(Te=o.relatedTarget||o.fromElement)&&(bi(Te)||Te[Yi]))break e;if((Y||F)&&(F=ee.window===ee?ee:(F=ee.ownerDocument)?F.defaultView||F.parentWindow:window,Y?(Te=o.relatedTarget||o.toElement,Y=G,Te=Te?bi(Te):null,Te!==null&&(zt=h(Te),Qe=Te.tag,Te!==zt||Qe!==5&&Qe!==27&&Qe!==6)&&(Te=null)):(Y=null,Te=G),Y!==Te)){if(Qe=wy,ne="onMouseLeave",U="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(Qe=ky,ne="onPointerLeave",U="onPointerEnter",O="pointer"),zt=Y==null?F:Wi(Y),K=Te==null?F:Wi(Te),F=new Qe(ne,O+"leave",Y,o,ee),F.target=zt,F.relatedTarget=K,ne=null,bi(ee)===G&&(Qe=new Qe(U,O+"enter",Te,o,ee),Qe.target=K,Qe.relatedTarget=zt,ne=Qe),zt=ne,Y&&Te)t:{for(Qe=b_,U=Y,O=Te,K=0,ne=U;ne;ne=Qe(ne))K++;ne=0;for(var He=O;He;He=Qe(He))ne++;for(;0<K-ne;)U=Qe(U),K--;for(;0<ne-K;)O=Qe(O),ne--;for(;K--;){if(U===O||O!==null&&U===O.alternate){Qe=U;break t}U=Qe(U),O=Qe(O)}Qe=null}else Qe=null;Y!==null&&hx(ie,F,Y,Qe,!1),Te!==null&&zt!==null&&hx(ie,zt,Te,Qe,!0)}}e:{if(F=G?Wi(G):window,Y=F.nodeName&&F.nodeName.toLowerCase(),Y==="select"||Y==="input"&&F.type==="file")var xt=Ry;else if(Ty(F))if(Dy)xt=T5;else{xt=C5;var Ie=N5}else Y=F.nodeName,!Y||Y.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?G&&Ma(G.elementType)&&(xt=Ry):xt=_5;if(xt&&(xt=xt(t,G))){Ey(ie,xt,o,ee);break e}Ie&&Ie(t,F,G),t==="focusout"&&G&&F.type==="number"&&G.memoizedProps.value!=null&&tr(F,"number",F.value)}switch(Ie=G?Wi(G):window,t){case"focusin":(Ty(Ie)||Ie.contentEditable==="true")&&(or=Ie,zp=G,Ml=null);break;case"focusout":Ml=zp=or=null;break;case"mousedown":Ip=!0;break;case"contextmenu":case"mouseup":case"dragend":Ip=!1,Ly(ie,o,ee);break;case"selectionchange":if(R5)break;case"keydown":case"keyup":Ly(ie,o,ee)}var it;if(Tp)e:{switch(t){case"compositionstart":var dt="onCompositionStart";break e;case"compositionend":dt="onCompositionEnd";break e;case"compositionupdate":dt="onCompositionUpdate";break e}dt=void 0}else sr?Cy(t,o)&&(dt="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(dt="onCompositionStart");dt&&(jy&&o.locale!=="ko"&&(sr||dt!=="onCompositionStart"?dt==="onCompositionEnd"&&sr&&(it=Si()):(ti=ee,H="value"in ti?ti.value:ti.textContent,sr=!0)),Ie=dd(G,dt),0<Ie.length&&(dt=new Sy(dt,t,null,o,ee),ie.push({event:dt,listeners:Ie}),it?dt.data=it:(it=_y(o),it!==null&&(dt.data=it)))),(it=w5?S5(t,o):k5(t,o))&&(dt=dd(G,"onBeforeInput"),0<dt.length&&(Ie=new Sy("onBeforeInput","beforeinput",null,o,ee),ie.push({event:Ie,listeners:dt}),Ie.data=it)),h_(ie,t,G,o,ee)}mx(ie,a)})}function cc(t,a,o){return{instance:t,listener:a,currentTarget:o}}function dd(t,a){for(var o=a+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=Ws(t,o),p!=null&&c.unshift(cc(t,p,g)),p=Ws(t,a),p!=null&&c.push(cc(t,p,g))),t.tag===3)return c;t=t.return}return[]}function b_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function hx(t,a,o,c,p){for(var g=a._reactName,w=[];o!==null&&o!==c;){var A=o,D=A.alternate,G=A.stateNode;if(A=A.tag,D!==null&&D===c)break;A!==5&&A!==26&&A!==27||G===null||(D=G,p?(G=Ws(o,g),G!=null&&w.unshift(cc(o,G,D))):p||(G=Ws(o,g),G!=null&&w.push(cc(o,G,D)))),o=o.return}w.length!==0&&t.push({event:a,listeners:w})}var v_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function fx(t){return(typeof t=="string"?t:""+t).replace(v_,`
10
+ `).replace(x_,"")}function gx(t,a){return a=fx(a),fx(t)===a}function Dt(t,a,o,c,p,g){switch(o){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ba(t,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ba(t,""+c);break;case"className":Js(t,"class",c);break;case"tabIndex":Js(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Js(t,o,c);break;case"style":ei(t,c,g);break;case"data":if(a!=="object"){Js(t,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||o!=="href")){t.removeAttribute(o);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(o);break}c=ar(""+c),t.setAttribute(o,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(o,"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 g=="function"&&(o==="formAction"?(a!=="input"&&Dt(t,a,"name",p.name,p,null),Dt(t,a,"formEncType",p.formEncType,p,null),Dt(t,a,"formMethod",p.formMethod,p,null),Dt(t,a,"formTarget",p.formTarget,p,null)):(Dt(t,a,"encType",p.encType,p,null),Dt(t,a,"method",p.method,p,null),Dt(t,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(o);break}c=ar(""+c),t.setAttribute(o,c);break;case"onClick":c!=null&&(t.onclick=Ba);break;case"onScroll":c!=null&&lt("scroll",t);break;case"onScrollEnd":c!=null&&lt("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}o=ar(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(o,""+c):t.removeAttribute(o);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":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(o,""):t.removeAttribute(o);break;case"capture":case"download":c===!0?t.setAttribute(o,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(o,c):t.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(o,c):t.removeAttribute(o);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(o):t.setAttribute(o,c);break;case"popover":lt("beforetoggle",t),lt("toggle",t),vi(t,"popover",c);break;case"xlinkActuate":An(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":An(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":An(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":An(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":An(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":An(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":An(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":An(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":An(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":vi(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=nr.get(o)||o,vi(t,o,c))}}function of(t,a,o,c,p,g){switch(o){case"style":ei(t,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(o=c.__html,o!=null){if(p.children!=null)throw Error(r(60));t.innerHTML=o}}break;case"children":typeof c=="string"?ba(t,c):(typeof c=="number"||typeof c=="bigint")&&ba(t,""+c);break;case"onScroll":c!=null&&lt("scroll",t);break;case"onScrollEnd":c!=null&&lt("scrollend",t);break;case"onClick":c!=null&&(t.onclick=Ba);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),g=t[zn]||null,g=g!=null?g[o]:null,typeof g=="function"&&t.removeEventListener(a,g,p),typeof c=="function")){typeof g!="function"&&g!==null&&(o in t?t[o]=null:t.hasAttribute(o)&&t.removeAttribute(o)),t.addEventListener(a,c,p);break e}o in t?t[o]=c:c===!0?t.setAttribute(o,""):vi(t,o,c)}}}function En(t,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":lt("error",t),lt("load",t);var c=!1,p=!1,g;for(g in o)if(o.hasOwnProperty(g)){var w=o[g];if(w!=null)switch(g){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(t,a,g,w,o,null)}}p&&Dt(t,a,"srcSet",o.srcSet,o,null),c&&Dt(t,a,"src",o.src,o,null);return;case"input":lt("invalid",t);var A=g=w=p=null,D=null,G=null;for(c in o)if(o.hasOwnProperty(c)){var ee=o[c];if(ee!=null)switch(c){case"name":p=ee;break;case"type":w=ee;break;case"checked":D=ee;break;case"defaultChecked":G=ee;break;case"value":g=ee;break;case"defaultValue":A=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,a));break;default:Dt(t,a,c,ee,o,null)}}Al(t,g,A,D,G,w,p,!1);return;case"select":lt("invalid",t),c=w=g=null;for(p in o)if(o.hasOwnProperty(p)&&(A=o[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":w=A;break;case"multiple":c=A;default:Dt(t,a,p,A,o,null)}a=g,o=w,t.multiple=!!c,a!=null?Gn(t,!!c,a,!1):o!=null&&Gn(t,!!c,o,!0);return;case"textarea":lt("invalid",t),g=p=c=null;for(w in o)if(o.hasOwnProperty(w)&&(A=o[w],A!=null))switch(w){case"value":c=A;break;case"defaultValue":p=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(91));break;default:Dt(t,a,w,A,o,null)}xi(t,c,p,g);return;case"option":for(D in o)o.hasOwnProperty(D)&&(c=o[D],c!=null)&&(D==="selected"?t.selected=c&&typeof c!="function"&&typeof c!="symbol":Dt(t,a,D,c,o,null));return;case"dialog":lt("beforetoggle",t),lt("toggle",t),lt("cancel",t),lt("close",t);break;case"iframe":case"object":lt("load",t);break;case"video":case"audio":for(c=0;c<lc.length;c++)lt(lc[c],t);break;case"image":lt("error",t),lt("load",t);break;case"details":lt("toggle",t);break;case"embed":case"source":case"link":lt("error",t),lt("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(G in o)if(o.hasOwnProperty(G)&&(c=o[G],c!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(t,a,G,c,o,null)}return;default:if(Ma(a)){for(ee in o)o.hasOwnProperty(ee)&&(c=o[ee],c!==void 0&&of(t,a,ee,c,o,void 0));return}}for(A in o)o.hasOwnProperty(A)&&(c=o[A],c!=null&&Dt(t,a,A,c,o,null))}function w_(t,a,o,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,w=null,A=null,D=null,G=null,ee=null;for(Y in o){var ie=o[Y];if(o.hasOwnProperty(Y)&&ie!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":D=ie;default:c.hasOwnProperty(Y)||Dt(t,a,Y,null,c,ie)}}for(var F in c){var Y=c[F];if(ie=o[F],c.hasOwnProperty(F)&&(Y!=null||ie!=null))switch(F){case"type":g=Y;break;case"name":p=Y;break;case"checked":G=Y;break;case"defaultChecked":ee=Y;break;case"value":w=Y;break;case"defaultValue":A=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,a));break;default:Y!==ie&&Dt(t,a,F,Y,c,ie)}}er(t,w,A,D,G,ee,g,p);return;case"select":Y=w=A=F=null;for(g in o)if(D=o[g],o.hasOwnProperty(g)&&D!=null)switch(g){case"value":break;case"multiple":Y=D;default:c.hasOwnProperty(g)||Dt(t,a,g,null,c,D)}for(p in c)if(g=c[p],D=o[p],c.hasOwnProperty(p)&&(g!=null||D!=null))switch(p){case"value":F=g;break;case"defaultValue":A=g;break;case"multiple":w=g;default:g!==D&&Dt(t,a,p,g,c,D)}a=A,o=w,c=Y,F!=null?Gn(t,!!o,F,!1):!!c!=!!o&&(a!=null?Gn(t,!!o,a,!0):Gn(t,!!o,o?[]:"",!1));return;case"textarea":Y=F=null;for(A in o)if(p=o[A],o.hasOwnProperty(A)&&p!=null&&!c.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Dt(t,a,A,null,c,p)}for(w in c)if(p=c[w],g=o[w],c.hasOwnProperty(w)&&(p!=null||g!=null))switch(w){case"value":F=p;break;case"defaultValue":Y=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==g&&Dt(t,a,w,p,c,g)}ia(t,F,Y);return;case"option":for(var Te in o)F=o[Te],o.hasOwnProperty(Te)&&F!=null&&!c.hasOwnProperty(Te)&&(Te==="selected"?t.selected=!1:Dt(t,a,Te,null,c,F));for(D in c)F=c[D],Y=o[D],c.hasOwnProperty(D)&&F!==Y&&(F!=null||Y!=null)&&(D==="selected"?t.selected=F&&typeof F!="function"&&typeof F!="symbol":Dt(t,a,D,F,c,Y));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 Qe in o)F=o[Qe],o.hasOwnProperty(Qe)&&F!=null&&!c.hasOwnProperty(Qe)&&Dt(t,a,Qe,null,c,F);for(G in c)if(F=c[G],Y=o[G],c.hasOwnProperty(G)&&F!==Y&&(F!=null||Y!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,a));break;default:Dt(t,a,G,F,c,Y)}return;default:if(Ma(a)){for(var zt in o)F=o[zt],o.hasOwnProperty(zt)&&F!==void 0&&!c.hasOwnProperty(zt)&&of(t,a,zt,void 0,c,F);for(ee in c)F=c[ee],Y=o[ee],!c.hasOwnProperty(ee)||F===Y||F===void 0&&Y===void 0||of(t,a,ee,F,c,Y);return}}for(var U in o)F=o[U],o.hasOwnProperty(U)&&F!=null&&!c.hasOwnProperty(U)&&Dt(t,a,U,null,c,F);for(ie in c)F=c[ie],Y=o[ie],!c.hasOwnProperty(ie)||F===Y||F==null&&Y==null||Dt(t,a,ie,F,c,Y)}function yx(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S_(){if(typeof performance.getEntriesByType=="function"){for(var t=0,a=0,o=performance.getEntriesByType("resource"),c=0;c<o.length;c++){var p=o[c],g=p.transferSize,w=p.initiatorType,A=p.duration;if(g&&A&&yx(w)){for(w=0,A=p.responseEnd,c+=1;c<o.length;c++){var D=o[c],G=D.startTime;if(G>A)break;var ee=D.transferSize,ie=D.initiatorType;ee&&yx(ie)&&(D=D.responseEnd,w+=ee*(D<A?1:(A-G)/(D-G)))}if(--c,a+=8*(g+w)/(p.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 rf=null,lf=null;function md(t){return t.nodeType===9?t:t.ownerDocument}function bx(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 vx(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 cf(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 uf=null;function k_(){var t=window.event;return t&&t.type==="popstate"?t===uf?!1:(uf=t,!0):(uf=null,!1)}var xx=typeof setTimeout=="function"?setTimeout:void 0,j_=typeof clearTimeout=="function"?clearTimeout:void 0,wx=typeof Promise=="function"?Promise:void 0,A_=typeof queueMicrotask=="function"?queueMicrotask:typeof wx<"u"?function(t){return wx.resolve(null).then(t).catch(N_)}:xx;function N_(t){setTimeout(function(){throw t})}function xs(t){return t==="head"}function Sx(t,a){var o=a,c=0;do{var p=o.nextSibling;if(t.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(c===0){t.removeChild(p),zr(a);return}c--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")c++;else if(o==="html")uc(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,uc(o);for(var g=o.firstChild;g;){var w=g.nextSibling,A=g.nodeName;g[Xi]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||o.removeChild(g),g=w}}else o==="body"&&uc(t.ownerDocument.body);o=p}while(o);zr(a)}function kx(t,a){var o=t;t=0;do{var c=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(t===0)break;t--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||t++;o=c}while(o)}function df(t){var a=t.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":df(o),vl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function C_(t,a,o,c){for(;t.nodeType===1;){var p=o;if(t.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Xi])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(g=t.getAttribute("rel"),g==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(g!==p.rel||t.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||t.getAttribute("title")!==(p.title==null?null:p.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(g=t.getAttribute("src"),(g!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===g)return t}else return t;if(t=Ca(t.nextSibling),t===null)break}return null}function __(t,a,o){if(a==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!o||(t=Ca(t.nextSibling),t===null))return null;return t}function jx(t,a){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Ca(t.nextSibling),t===null))return null;return t}function mf(t){return t.data==="$?"||t.data==="$~"}function pf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function T_(t,a){var o=t.ownerDocument;if(t.data==="$~")t._reactRetry=a;else if(t.data!=="$?"||o.readyState!=="loading")a();else{var c=function(){a(),o.removeEventListener("DOMContentLoaded",c)};o.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function Ca(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 hf=null;function Ax(t){t=t.nextSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="/$"||o==="/&"){if(a===0)return Ca(t.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}t=t.nextSibling}return null}function Nx(t){t=t.previousSibling;for(var a=0;t;){if(t.nodeType===8){var o=t.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return t;a--}else o!=="/$"&&o!=="/&"||a++}t=t.previousSibling}return null}function Cx(t,a,o){switch(a=md(o),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 uc(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);vl(t)}var _a=new Map,_x=new Set;function pd(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Mi=W.d;W.d={f:E_,r:R_,D:D_,C:z_,L:I_,m:O_,X:q_,S:P_,M:M_};function E_(){var t=Mi.f(),a=id();return t||a}function R_(t){var a=Ji(t);a!==null&&a.tag===5&&a.type==="form"?Gb(a):Mi.r(t)}var Er=typeof document>"u"?null:document;function Tx(t,a,o){var c=Er;if(c&&typeof a=="string"&&a){var p=On(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),_x.has(p)||(_x.add(p),t={rel:t,crossOrigin:o,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),En(a,"link",t),tn(a),c.head.appendChild(a)))}}function D_(t){Mi.D(t),Tx("dns-prefetch",t,null)}function z_(t,a){Mi.C(t,a),Tx("preconnect",t,a)}function I_(t,a,o){Mi.L(t,a,o);var c=Er;if(c&&t&&a){var p='link[rel="preload"][as="'+On(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+On(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+On(o.imageSizes)+'"]')):p+='[href="'+On(t)+'"]';var g=p;switch(a){case"style":g=Rr(t);break;case"script":g=Dr(t)}_a.has(g)||(t=j({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),_a.set(g,t),c.querySelector(p)!==null||a==="style"&&c.querySelector(dc(g))||a==="script"&&c.querySelector(mc(g))||(a=c.createElement("link"),En(a,"link",t),tn(a),c.head.appendChild(a)))}}function O_(t,a){Mi.m(t,a);var o=Er;if(o&&t){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+On(c)+'"][href="'+On(t)+'"]',g=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Dr(t)}if(!_a.has(g)&&(t=j({rel:"modulepreload",href:t},a),_a.set(g,t),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(mc(g)))return}c=o.createElement("link"),En(c,"link",t),tn(c),o.head.appendChild(c)}}}function P_(t,a,o){Mi.S(t,a,o);var c=Er;if(c&&t){var p=es(c).hoistableStyles,g=Rr(t);a=a||"default";var w=p.get(g);if(!w){var A={loading:0,preload:null};if(w=c.querySelector(dc(g)))A.loading=5;else{t=j({rel:"stylesheet",href:t,"data-precedence":a},o),(o=_a.get(g))&&ff(t,o);var D=w=c.createElement("link");tn(D),En(D,"link",t),D._p=new Promise(function(G,ee){D.onload=G,D.onerror=ee}),D.addEventListener("load",function(){A.loading|=1}),D.addEventListener("error",function(){A.loading|=2}),A.loading|=4,hd(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:A},p.set(g,w)}}}function q_(t,a){Mi.X(t,a);var o=Er;if(o&&t){var c=es(o).hoistableScripts,p=Dr(t),g=c.get(p);g||(g=o.querySelector(mc(p)),g||(t=j({src:t,async:!0},a),(a=_a.get(p))&&gf(t,a),g=o.createElement("script"),tn(g),En(g,"link",t),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function M_(t,a){Mi.M(t,a);var o=Er;if(o&&t){var c=es(o).hoistableScripts,p=Dr(t),g=c.get(p);g||(g=o.querySelector(mc(p)),g||(t=j({src:t,async:!0,type:"module"},a),(a=_a.get(p))&&gf(t,a),g=o.createElement("script"),tn(g),En(g,"link",t),o.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},c.set(p,g))}}function Ex(t,a,o,c){var p=(p=ue.current)?pd(p):null;if(!p)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Rr(o.href),o=es(p).hoistableStyles,c=o.get(a),c||(c={type:"style",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){t=Rr(o.href);var g=es(p).hoistableStyles,w=g.get(t);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(t,w),(g=p.querySelector(dc(t)))&&!g._p&&(w.instance=g,w.state.loading=5),_a.has(t)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},_a.set(t,o),g||B_(p,t,o,w.state))),a&&c===null)throw Error(r(528,""));return w}if(a&&c!==null)throw Error(r(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Dr(o),o=es(p).hoistableScripts,c=o.get(a),c||(c={type:"script",instance:null,count:0,state:null},o.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Rr(t){return'href="'+On(t)+'"'}function dc(t){return'link[rel="stylesheet"]['+t+"]"}function Rx(t){return j({},t,{"data-precedence":t.precedence,precedence:null})}function B_(t,a,o,c){t.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=t.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),En(a,"link",o),tn(a),t.head.appendChild(a))}function Dr(t){return'[src="'+On(t)+'"]'}function mc(t){return"script[async]"+t}function Dx(t,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var c=t.querySelector('style[data-href~="'+On(o.href)+'"]');if(c)return a.instance=c,tn(c),c;var p=j({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),tn(c),En(c,"style",p),hd(c,o.precedence,t),a.instance=c;case"stylesheet":p=Rr(o.href);var g=t.querySelector(dc(p));if(g)return a.state.loading|=4,a.instance=g,tn(g),g;c=Rx(o),(p=_a.get(p))&&ff(c,p),g=(t.ownerDocument||t).createElement("link"),tn(g);var w=g;return w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),En(g,"link",c),a.state.loading|=4,hd(g,o.precedence,t),a.instance=g;case"script":return g=Dr(o.src),(p=t.querySelector(mc(g)))?(a.instance=p,tn(p),p):(c=o,(p=_a.get(g))&&(c=j({},o),gf(c,p)),t=t.ownerDocument||t,p=t.createElement("script"),tn(p),En(p,"link",c),t.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,hd(c,o.precedence,t));return a.instance}function hd(t,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,g=p,w=0;w<c.length;w++){var A=c[w];if(A.dataset.precedence===a)g=A;else if(g!==p)break}g?g.parentNode.insertBefore(t,g.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function ff(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function gf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var fd=null;function zx(t,a,o){if(fd===null){var c=new Map,p=fd=new Map;p.set(o,c)}else p=fd,c=p.get(o),c||(c=new Map,p.set(o,c));if(c.has(t))return c;for(c.set(t,null),o=o.getElementsByTagName(t),p=0;p<o.length;p++){var g=o[p];if(!(g[Xi]||g[ln]||t==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var w=g.getAttribute(a)||"";w=t+w;var A=c.get(w);A?A.push(g):c.set(w,[g])}}return c}function Ix(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function L_(t,a,o){if(o===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 Ox(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function U_(t,a,o,c){if(o.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Rr(c.href),g=a.querySelector(dc(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=gd.bind(t),a.then(t,t)),o.state.loading|=4,o.instance=g,tn(g);return}g=a.ownerDocument||a,c=Rx(c),(p=_a.get(p))&&ff(c,p),g=g.createElement("link"),tn(g);var w=g;w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),En(g,"link",c),o.instance=g}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=gd.bind(t),a.addEventListener("load",o),a.addEventListener("error",o))}}var yf=0;function V_(t,a){return t.stylesheets&&t.count===0&&bd(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var c=setTimeout(function(){if(t.stylesheets&&bd(t,t.stylesheets),t.unsuspend){var g=t.unsuspend;t.unsuspend=null,g()}},6e4+a);0<t.imgBytes&&yf===0&&(yf=62500*S_());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&bd(t,t.stylesheets),t.unsuspend)){var g=t.unsuspend;t.unsuspend=null,g()}},(t.imgBytes>yf?50:800)+a);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function gd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)bd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var yd=null;function bd(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,yd=new Map,a.forEach($_,t),yd=null,gd.call(t))}function $_(t,a){if(!(a.state.loading&4)){var o=yd.get(t);if(o)var c=o.get(null);else{o=new Map,yd.set(t,o);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var w=p[g];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),c=w)}c&&o.set(null,c)}p=a.instance,w=p.getAttribute("data-precedence"),g=o.get(w)||c,g===c&&o.set(null,p),o.set(w,p),this.count++,c=gd.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),g?g.parentNode.insertBefore(p,g.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var pc={$$typeof:L,Provider:null,Consumer:null,_currentValue:ve,_currentValue2:ve,_threadCount:0};function K_(t,a,o,c,p,g,w,A,D){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=Yo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yo(0),this.hiddenUpdates=Yo(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function Px(t,a,o,c,p,g,w,A,D,G,ee,ie){return t=new K_(t,a,o,w,D,G,ee,ie,A),a=1,g===!0&&(a|=24),g=oa(3,null,null,a),t.current=g,g.stateNode=t,a=Zp(),a.refCount++,t.pooledCache=a,a.refCount++,g.memoizedState={element:c,isDehydrated:o,cache:a},Wp(g),t}function qx(t){return t?(t=cr,t):cr}function Mx(t,a,o,c,p,g){p=qx(p),c.context===null?c.context=p:c.pendingContext=p,c=cs(a),c.payload={element:o},g=g===void 0?null:g,g!==null&&(c.callback=g),o=us(t,c,a),o!==null&&(Yn(o,t,a),Gl(o,t,a))}function Bx(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function bf(t,a){Bx(t,a),(t=t.alternate)&&Bx(t,a)}function Lx(t){if(t.tag===13||t.tag===31){var a=ao(t,67108864);a!==null&&Yn(a,t,67108864),bf(t,67108864)}}function Ux(t){if(t.tag===13||t.tag===31){var a=da();a=yl(a);var o=ao(t,a);o!==null&&Yn(o,t,a),bf(t,a)}}var vd=!0;function G_(t,a,o,c){var p=B.T;B.T=null;var g=W.p;try{W.p=2,vf(t,a,o,c)}finally{W.p=g,B.T=p}}function H_(t,a,o,c){var p=B.T;B.T=null;var g=W.p;try{W.p=8,vf(t,a,o,c)}finally{W.p=g,B.T=p}}function vf(t,a,o,c){if(vd){var p=xf(c);if(p===null)sf(t,a,c,xd,o),$x(t,c);else if(Q_(p,t,a,o,c))c.stopPropagation();else if($x(t,c),a&4&&-1<F_.indexOf(t)){for(;p!==null;){var g=Ji(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var w=Ot(g.pendingLanes);if(w!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var D=1<<31-Zt(w);A.entanglements[1]|=D,w&=~D}oi(g),(jt&6)===0&&(nd=Vt()+500,rc(0))}}break;case 31:case 13:A=ao(g,2),A!==null&&Yn(A,g,2),id(),bf(g,2)}if(g=xf(c),g===null&&sf(t,a,c,xd,o),g===p)break;p=g}p!==null&&c.stopPropagation()}else sf(t,a,c,null,o)}}function xf(t){return t=Cl(t),wf(t)}var xd=null;function wf(t){if(xd=null,t=bi(t),t!==null){var a=h(t);if(a===null)t=null;else{var o=a.tag;if(o===13){if(t=f(a),t!==null)return t;t=null}else if(o===31){if(t=b(a),t!==null)return t;t=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;t=null}else a!==t&&(t=null)}}return xd=t,null}function Vx(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(hi()){case Hs:return 2;case fi:return 8;case Dn:case Zo:return 32;case Fs:return 268435456;default:return 32}default:return 32}}var Sf=!1,ws=null,Ss=null,ks=null,hc=new Map,fc=new Map,js=[],F_="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 $x(t,a){switch(t){case"focusin":case"focusout":ws=null;break;case"dragenter":case"dragleave":Ss=null;break;case"mouseover":case"mouseout":ks=null;break;case"pointerover":case"pointerout":hc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":fc.delete(a.pointerId)}}function gc(t,a,o,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},a!==null&&(a=Ji(a),a!==null&&Lx(a)),t):(t.eventSystemFlags|=c,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function Q_(t,a,o,c,p){switch(a){case"focusin":return ws=gc(ws,t,a,o,c,p),!0;case"dragenter":return Ss=gc(Ss,t,a,o,c,p),!0;case"mouseover":return ks=gc(ks,t,a,o,c,p),!0;case"pointerover":var g=p.pointerId;return hc.set(g,gc(hc.get(g)||null,t,a,o,c,p)),!0;case"gotpointercapture":return g=p.pointerId,fc.set(g,gc(fc.get(g)||null,t,a,o,c,p)),!0}return!1}function Kx(t){var a=bi(t.target);if(a!==null){var o=h(a);if(o!==null){if(a=o.tag,a===13){if(a=f(o),a!==null){t.blockedOn=a,vu(t.priority,function(){Ux(o)});return}}else if(a===31){if(a=b(o),a!==null){t.blockedOn=a,vu(t.priority,function(){Ux(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){t.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}t.blockedOn=null}function wd(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=xf(t.nativeEvent);if(o===null){o=t.nativeEvent;var c=new o.constructor(o.type,o);Nl=c,o.target.dispatchEvent(c),Nl=null}else return a=Ji(o),a!==null&&Lx(a),t.blockedOn=o,!1;a.shift()}return!0}function Gx(t,a,o){wd(t)&&o.delete(a)}function Z_(){Sf=!1,ws!==null&&wd(ws)&&(ws=null),Ss!==null&&wd(Ss)&&(Ss=null),ks!==null&&wd(ks)&&(ks=null),hc.forEach(Gx),fc.forEach(Gx)}function Sd(t,a){t.blockedOn===a&&(t.blockedOn=null,Sf||(Sf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Z_)))}var kd=null;function Hx(t){kd!==t&&(kd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){kd===t&&(kd=null);for(var a=0;a<t.length;a+=3){var o=t[a],c=t[a+1],p=t[a+2];if(typeof c!="function"){if(wf(c||o)===null)continue;break}var g=Ji(o);g!==null&&(t.splice(a,3),a-=3,vh(g,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function zr(t){function a(D){return Sd(D,t)}ws!==null&&Sd(ws,t),Ss!==null&&Sd(Ss,t),ks!==null&&Sd(ks,t),hc.forEach(a),fc.forEach(a);for(var o=0;o<js.length;o++){var c=js[o];c.blockedOn===t&&(c.blockedOn=null)}for(;0<js.length&&(o=js[0],o.blockedOn===null);)Kx(o),o.blockedOn===null&&js.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],g=o[c+1],w=p[zn]||null;if(typeof g=="function")w||Hx(o);else if(w){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,w=g[zn]||null)A=w.formAction;else if(wf(p)!==null)continue}else A=w.action;typeof A=="function"?o[c+1]=A:(o.splice(c,3),c-=3),Hx(o)}}}function Fx(){function t(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(w){return p=w})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(o,20)}function o(){if(!c&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function kf(t){this._internalRoot=t}jd.prototype.render=kf.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var o=a.current,c=da();Mx(o,c,t,a,null,null)},jd.prototype.unmount=kf.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Mx(t.current,2,null,t,null,null),id(),a[Yi]=null}};function jd(t){this._internalRoot=t}jd.prototype.unstable_scheduleHydration=function(t){if(t){var a=Xo();t={blockedOn:null,target:t,priority:a};for(var o=0;o<js.length&&a!==0&&a<js[o].priority;o++);js.splice(o,0,t),o===0&&Kx(t)}};var Qx=n.version;if(Qx!=="19.2.4")throw Error(r(527,Qx,"19.2.4"));W.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=x(a),t=t!==null?S(t):null,t=t===null?null:t.stateNode,t};var Y_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ad=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ad.isDisabled&&Ad.supportsFiber)try{xn=Ad.inject(Y_),Et=Ad}catch{}}return yc.createRoot=function(t,a){if(!u(t))throw Error(r(299));var o=!1,c="",p=tv,g=nv,w=av;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=Px(t,1,!1,null,null,o,c,null,p,g,w,Fx),t[Yi]=a.current,af(t),new kf(a)},yc.hydrateRoot=function(t,a,o){if(!u(t))throw Error(r(299));var c=!1,p="",g=tv,w=nv,A=av,D=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(g=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(A=o.onRecoverableError),o.formState!==void 0&&(D=o.formState)),a=Px(t,1,!0,a,o??null,c,p,D,g,w,A,Fx),a.context=qx(null),o=a.current,c=da(),c=yl(c),p=cs(c),p.callback=null,us(o,p,c),o=c,a.current.lanes=o,Ys(a,o),oi(a),t[Yi]=a.current,af(t),new jd(a)},yc.version="19.2.4",yc}var Jx;function I6(){if(Jx)return jf.exports;Jx=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(),jf.exports=z6(),jf.exports}var O6=I6();const P6={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},q6=({onRequest:e,onSseError:n,onSseEvent:i,responseTransformer:r,responseValidator:u,sseDefaultRetryDelay:h,sseMaxRetryAttempts:f,sseMaxRetryDelay:b,sseSleepFn:v,url:x,...S})=>{let j;const C=v??(q=>new Promise(R=>setTimeout(R,q)));return{stream:async function*(){let q=h??3e3,R=0;const P=S.signal??new AbortController().signal;for(;!P.aborted;){R++;const M=S.headers instanceof Headers?S.headers:new Headers(S.headers);j!==void 0&&M.set("Last-Event-ID",j);try{const L={redirect:"follow",...S,body:S.serializedBody,headers:M,signal:P};let $=new Request(x,L);e&&($=await e(x,L));const ae=await(S.fetch??globalThis.fetch)($);if(!ae.ok)throw new Error(`SSE failed: ${ae.status} ${ae.statusText}`);if(!ae.body)throw new Error("No body in SSE response");const V=ae.body.pipeThrough(new TextDecoderStream).getReader();let Z="";const X=()=>{try{V.cancel()}catch{}};P.addEventListener("abort",X);try{for(;;){const{done:Ce,value:tt}=await V.read();if(Ce)break;Z+=tt;const Ge=Z.split(`
11
+
12
+ `);Z=Ge.pop()??"";for(const Ve of Ge){const ke=Ve.split(`
13
+ `),Le=[];let B;for(const Ae of ke)if(Ae.startsWith("data:"))Le.push(Ae.replace(/^data:\s*/,""));else if(Ae.startsWith("event:"))B=Ae.replace(/^event:\s*/,"");else if(Ae.startsWith("id:"))j=Ae.replace(/^id:\s*/,"");else if(Ae.startsWith("retry:")){const se=Number.parseInt(Ae.replace(/^retry:\s*/,""),10);Number.isNaN(se)||(q=se)}let W,ve=!1;if(Le.length){const Ae=Le.join(`
14
+ `);try{W=JSON.parse(Ae),ve=!0}catch{W=Ae}}ve&&(u&&await u(W),r&&(W=await r(W))),i?.({data:W,event:B,id:j,retry:q}),Le.length&&(yield W)}}}finally{P.removeEventListener("abort",X),V.releaseLock()}break}catch(L){if(n?.(L),f!==void 0&&R>=f)break;const $=Math.min(q*2**(R-1),b??3e4);await C($)}}}()}},M6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},B6=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},L6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},uj=({allowReserved:e,explode:n,name:i,style:r,value:u})=>{if(!n){const b=(e?u:u.map(v=>encodeURIComponent(v))).join(B6(r));switch(r){case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;case"simple":return b;default:return`${i}=${b}`}}const h=M6(r),f=u.map(b=>r==="label"||r==="simple"?e?b:encodeURIComponent(b):Dm({allowReserved:e,name:i,value:b})).join(h);return r==="label"||r==="matrix"?h+f:f},Dm=({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)}`},dj=({allowReserved:e,explode:n,name:i,style:r,value:u,valueOnly:h})=>{if(u instanceof Date)return h?u.toISOString():`${i}=${u.toISOString()}`;if(r!=="deepObject"&&!n){let v=[];Object.entries(u).forEach(([S,j])=>{v=[...v,S,e?j:encodeURIComponent(j)]});const x=v.join(",");switch(r){case"form":return`${i}=${x}`;case"label":return`.${x}`;case"matrix":return`;${i}=${x}`;default:return x}}const f=L6(r),b=Object.entries(u).map(([v,x])=>Dm({allowReserved:e,name:r==="deepObject"?`${i}[${v}]`:v,value:x})).join(f);return r==="label"||r==="matrix"?f+b:b},U6=/\{[^{}]+\}/g,V6=({path:e,url:n})=>{let i=n;const r=n.match(U6);if(r)for(const u of r){let h=!1,f=u.substring(1,u.length-1),b="simple";f.endsWith("*")&&(h=!0,f=f.substring(0,f.length-1)),f.startsWith(".")?(f=f.substring(1),b="label"):f.startsWith(";")&&(f=f.substring(1),b="matrix");const v=e[f];if(v==null)continue;if(Array.isArray(v)){i=i.replace(u,uj({explode:h,name:f,style:b,value:v}));continue}if(typeof v=="object"){i=i.replace(u,dj({explode:h,name:f,style:b,value:v,valueOnly:!0}));continue}if(b==="matrix"){i=i.replace(u,`;${Dm({name:f,value:v})}`);continue}const x=encodeURIComponent(b==="label"?`.${v}`:v);i=i.replace(u,x)}return i},$6=({baseUrl:e,path:n,query:i,querySerializer:r,url:u})=>{const h=u.startsWith("/")?u:`/${u}`;let f=(e??"")+h;n&&(f=V6({path:n,url:f}));let b=i?r(i):"";return b.startsWith("?")&&(b=b.substring(1)),b&&(f+=`?${b}`),f};function K6(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 G6=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},mj=({allowReserved:e,array:n,object:i}={})=>u=>{const h=[];if(u&&typeof u=="object")for(const f in u){const b=u[f];if(b!=null)if(Array.isArray(b)){const v=uj({allowReserved:e,explode:!0,name:f,style:"form",value:b,...n});v&&h.push(v)}else if(typeof b=="object"){const v=dj({allowReserved:e,explode:!0,name:f,style:"deepObject",value:b,...i});v&&h.push(v)}else{const v=Dm({allowReserved:e,name:f,value:b});v&&h.push(v)}}return h.join("&")},H6=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"}},F6=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,Q6=async({security:e,...n})=>{for(const i of e){if(F6(n,i.name))continue;const r=await G6(i,n.auth);if(!r)continue;const u=i.name??"Authorization";switch(i.in){case"query":n.query||(n.query={}),n.query[u]=r;break;case"cookie":n.headers.append("Cookie",`${u}=${r}`);break;default:n.headers.set(u,r);break}}},Wx=e=>$6({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:mj(e.querySerializer),url:e.url}),ew=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=pj(e.headers,n.headers),i},Z6=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},pj=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?Z6(i):Object.entries(i);for(const[u,h]of r)if(h===null)n.delete(u);else if(Array.isArray(h))for(const f of h)n.append(u,f);else h!==void 0&&n.set(u,typeof h=="object"?JSON.stringify(h):h)}return n};class Cf{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 Y6=()=>({error:new Cf,request:new Cf,response:new Cf}),X6=mj({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),J6={"Content-Type":"application/json"},hj=(e={})=>({...P6,headers:J6,parseAs:"auto",querySerializer:X6,...e}),fj=(e={})=>{let n=ew(hj(),e);const i=()=>({...n}),r=x=>(n=ew(n,x),i()),u=Y6(),h=async x=>{const S={...n,...x,fetch:x.fetch??n.fetch??globalThis.fetch,headers:pj(n.headers,x.headers),serializedBody:void 0};S.security&&await Q6({...S,security:S.security}),S.requestValidator&&await S.requestValidator(S),S.body!==void 0&&S.bodySerializer&&(S.serializedBody=S.bodySerializer(S.body)),(S.body===void 0||S.serializedBody==="")&&S.headers.delete("Content-Type");const j=Wx(S);return{opts:S,url:j}},f=async x=>{const{opts:S,url:j}=await h(x),C={redirect:"follow",...S,body:K6(S)};let T=new Request(j,C);for(const Q of u.request.fns)Q&&(T=await Q(T,S));const z=S.fetch;let q=await z(T);for(const Q of u.response.fns)Q&&(q=await Q(q,T,S));const R={request:T,response:q};if(q.ok){const Q=(S.parseAs==="auto"?H6(q.headers.get("Content-Type")):S.parseAs)??"json";if(q.status===204||q.headers.get("Content-Length")==="0"){let V;switch(Q){case"arrayBuffer":case"blob":case"text":V=await q[Q]();break;case"formData":V=new FormData;break;case"stream":V=q.body;break;default:V={};break}return S.responseStyle==="data"?V:{data:V,...R}}let ae;switch(Q){case"arrayBuffer":case"blob":case"formData":case"json":case"text":ae=await q[Q]();break;case"stream":return S.responseStyle==="data"?q.body:{data:q.body,...R}}return Q==="json"&&(S.responseValidator&&await S.responseValidator(ae),S.responseTransformer&&(ae=await S.responseTransformer(ae))),S.responseStyle==="data"?ae:{data:ae,...R}}const P=await q.text();let M;try{M=JSON.parse(P)}catch{}const L=M??P;let $=L;for(const Q of u.error.fns)Q&&($=await Q(L,q,T,S));if($=$||{},S.throwOnError)throw $;return S.responseStyle==="data"?void 0:{error:$,...R}},b=x=>S=>f({...S,method:x}),v=x=>async S=>{const{opts:j,url:C}=await h(S);return q6({...j,body:j.body,headers:j.headers,method:x,onRequest:async(T,z)=>{let q=new Request(T,z);for(const R of u.request.fns)R&&(q=await R(q,j));return q},url:C})};return{buildUrl:Wx,connect:b("CONNECT"),delete:b("DELETE"),get:b("GET"),getConfig:i,head:b("HEAD"),interceptors:u,options:b("OPTIONS"),patch:b("PATCH"),post:b("POST"),put:b("PUT"),request:f,setConfig:r,sse:{connect:v("CONNECT"),delete:v("DELETE"),get:v("GET"),head:v("HEAD"),options:v("OPTIONS"),patch:v("PATCH"),post:v("POST"),put:v("PUT"),trace:v("TRACE")},trace:b("TRACE")}},I=fj(hj()),W6=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps/submit",...e,headers:{"Content-Type":"application/json",...e.headers}}),eT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),tT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e,headers:{"Content-Type":"application/json",...e.headers}}),nT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),gj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),aT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),iT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan",...e}),sT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-report",...e}),oT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-setup",...e}),rT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft",...e}),nae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/create",...e,headers:{"Content-Type":"application/json",...e.headers}}),aae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/import-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),iae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-sitemap-selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),sae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-target",...e,headers:{"Content-Type":"application/json",...e.headers}}),oae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/exclude-target",...e,headers:{"Content-Type":"application/json",...e.headers}}),rae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),lae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/preview-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),cae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/replace-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),uae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-paired-assignments",...e,headers:{"Content-Type":"application/json",...e.headers}}),dae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-assignment",...e,headers:{"Content-Type":"application/json",...e.headers}}),mae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-group",...e,headers:{"Content-Type":"application/json",...e.headers}}),pae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-group",...e,headers:{"Content-Type":"application/json",...e.headers}}),hae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/preview-group-membership",...e,headers:{"Content-Type":"application/json",...e.headers}}),fae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/apply-group-membership",...e,headers:{"Content-Type":"application/json",...e.headers}}),gae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),lT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/pin-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),yae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/remove-competitor",...e,headers:{"Content-Type":"application/json",...e.headers}}),bae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",...e}),vae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview",...e}),xae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/publish",...e,headers:{"Content-Type":"application/json",...e.headers}}),wae=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/discard",...e}),yj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-overview",...e}),cT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e}),uT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),dT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment",...e}),mT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/evidence",...e}),pT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfill-preview",...e}),hT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfills",...e,headers:{"Content-Type":"application/json",...e.headers}}),fT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs",...e}),gT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs/{jobId}",...e}),yT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/visibility-report",...e}),bT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-evidence",...e}),vT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-question-result",...e}),xT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-competitors",...e}),wT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates",...e}),ST=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates/{templateId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),kT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e}),jT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/batches",...e,headers:{"Content-Type":"application/json",...e.headers}}),AT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking",...e}),NT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),CT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/commit",...e,headers:{"Content-Type":"application/json",...e.headers}}),_T=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs/{runId}",...e}),TT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),ET=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),RT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),DT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),bj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),zT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),IT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),OT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),PT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),qT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),MT=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors/{id}",...e}),BT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/competitors",...e}),vj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),LT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),UT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/run-admission",...e}),VT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),$T=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),xj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),KT=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),GT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/history",...e}),HT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/history",...e}),FT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),QT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),ZT=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/snapshots/diff",...e}),wj=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),YT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),XT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),JT=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/keys/self",...e}),WT=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),eE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),tE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),nE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),aE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),iE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedules",...e}),sE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),oE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),rE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),lE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),cE=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e}),uE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e,headers:{"Content-Type":"application/json",...e.headers}}),dE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/onboarding",...e,headers:{"Content-Type":"application/json",...e.headers}}),mE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/ui",...e,headers:{"Content-Type":"application/json",...e.headers}}),Sj=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),pE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/status",...e}),hE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),fE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/customers",...e}),gE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),yE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/sync",...e}),bE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/performance",...e}),vE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/snapshots",...e}),xE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/connection",...e}),wE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/status",...e}),SE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),kE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts",...e}),jE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers",...e}),AE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers/{containerId}/workspaces",...e}),NE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),CE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/sync",...e}),_E=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/snapshots",...e}),TE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/connection",...e}),EE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/options",...e}),RE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e}),DE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e,headers:{"Content-Type":"application/json",...e.headers}}),zE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts/{contractId}/integrity",...e}),IE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),OE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),PE=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),qE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),ME=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),BE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),LE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),UE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),VE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),$E=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),KE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),GE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),HE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),FE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),QE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),ZE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),YE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),XE=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),JE=e=>(e.client??I).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),WE=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),e8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),t8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),n8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),a8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),i8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),s8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),o8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),r8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),l8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),c8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),u8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),d8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),m8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),p8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),h8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),f8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),g8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),y8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),b8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),v8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/search-landing-pages",...e}),x8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),w8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),S8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-daily",...e}),k8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/social-referral-history",...e}),j8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),A8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),N8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/health/history",...e}),C8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),_8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),T8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),E8=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),R8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),D8=e=>(e?.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),z8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),I8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),O8=e=>(e?.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),P8=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),q8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),M8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),B8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),L8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),U8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),V8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),$8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),K8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),G8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),H8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),F8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),Q8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),Z8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),Y8=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),X8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),J8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),W8=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),eR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),tR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),nR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl",...e}),aR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/graph",...e}),iR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages/audit",...e}),kj=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages",...e}),sR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/structure",...e}),oR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/internal-links/neighbors",...e}),rR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/dead-links",...e}),lR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e}),cR=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),uR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/progress",...e}),dR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/page-health-preview",...e}),mR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e}),pR=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e,headers:{"Content-Type":"application/json",...e.headers}}),hR=e=>(e.client??I).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}",...e}),fR=e=>(e.client??I).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}/resume",...e}),gR=e=>(e.client??I).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function yR(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return fj(n)}function te(e,n,i){function r(b,v){if(b._zod||Object.defineProperty(b,"_zod",{value:{def:v,constr:f,traits:new Set},enumerable:!1}),b._zod.traits.has(e))return;b._zod.traits.add(e),n(b,v);const x=f.prototype,S=Object.keys(x);for(let j=0;j<S.length;j++){const C=S[j];C in b||(b[C]=x[C].bind(b))}}const u=i?.Parent??Object;class h extends u{}Object.defineProperty(h,"name",{value:e});function f(b){var v;const x=i?.Parent?new h:this;r(x,b),(v=x._zod).deferred??(v.deferred=[]);for(const S of x._zod.deferred)S();return x}return Object.defineProperty(f,"init",{value:r}),Object.defineProperty(f,Symbol.hasInstance,{value:b=>i?.Parent&&b instanceof i.Parent?!0:b?._zod?.traits?.has(e)}),Object.defineProperty(f,"name",{value:e}),f}class Ur extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class jj extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Aj={};function Ds(e){return Aj}function Nj(e){const n=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,u])=>n.indexOf(+r)===-1).map(([r,u])=>u)}function gg(e,n){return typeof n=="bigint"?n.toString():n}function zm(e){return{get value(){{const n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function y0(e){return e==null}function b0(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function bR(e,n){const i=(e.toString().split(".")[1]||"").length,r=n.toString();let u=(r.split(".")[1]||"").length;if(u===0&&/\d?e-\d?/.test(r)){const v=r.match(/\d?e-(\d?)/);v?.[1]&&(u=Number.parseInt(v[1]))}const h=i>u?i:u,f=Number.parseInt(e.toFixed(h).replace(".","")),b=Number.parseInt(n.toFixed(h).replace(".",""));return f%b/10**h}const tw=Symbol("evaluating");function gt(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==tw)return r===void 0&&(r=tw,r=i()),r},set(u){Object.defineProperty(e,n,{value:u})},configurable:!0})}function qo(e,n,i){Object.defineProperty(e,n,{value:i,writable:!0,enumerable:!0,configurable:!0})}function Ms(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function nw(e){return JSON.stringify(e)}function vR(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Cj="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Mc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const xR=zm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Kr(e){if(Mc(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(Mc(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function _j(e){return Kr(e)?{...e}:Array.isArray(e)?[...e]:e}const wR=new Set(["string","number","symbol"]);function Gr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bs(e,n,i){const r=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(r._zod.parent=e),r}function qe(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 SR(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const kR={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 jR(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 h=Ms(e._zod.def,{get shape(){const f={};for(const b in n){if(!(b in i.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&(f[b]=i.shape[b])}return qo(this,"shape",f),f},checks:[]});return Bs(e,h)}function AR(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 h=Ms(e._zod.def,{get shape(){const f={...e._zod.def.shape};for(const b in n){if(!(b in i.shape))throw new Error(`Unrecognized key: "${b}"`);n[b]&&delete f[b]}return qo(this,"shape",f),f},checks:[]});return Bs(e,h)}function NR(e,n){if(!Kr(n))throw new Error("Invalid input to extend: expected a plain object");const i=e._zod.def.checks;if(i&&i.length>0){const h=e._zod.def.shape;for(const f in n)if(Object.getOwnPropertyDescriptor(h,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const u=Ms(e._zod.def,{get shape(){const h={...e._zod.def.shape,...n};return qo(this,"shape",h),h}});return Bs(e,u)}function CR(e,n){if(!Kr(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Ms(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return qo(this,"shape",r),r}});return Bs(e,i)}function _R(e,n){const i=Ms(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n._zod.def.shape};return qo(this,"shape",r),r},get catchall(){return n._zod.def.catchall},checks:[]});return Bs(e,i)}function TR(e,n,i){const u=n._zod.def.checks;if(u&&u.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const f=Ms(n._zod.def,{get shape(){const b=n._zod.def.shape,v={...b};if(i)for(const x in i){if(!(x in b))throw new Error(`Unrecognized key: "${x}"`);i[x]&&(v[x]=e?new e({type:"optional",innerType:b[x]}):b[x])}else for(const x in b)v[x]=e?new e({type:"optional",innerType:b[x]}):b[x];return qo(this,"shape",v),v},checks:[]});return Bs(n,f)}function ER(e,n,i){const r=Ms(n._zod.def,{get shape(){const u=n._zod.def.shape,h={...u};if(i)for(const f in i){if(!(f in h))throw new Error(`Unrecognized key: "${f}"`);i[f]&&(h[f]=new e({type:"nonoptional",innerType:u[f]}))}else for(const f in u)h[f]=new e({type:"nonoptional",innerType:u[f]});return qo(this,"shape",h),h}});return Bs(n,r)}function Mr(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 Br(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function Cd(e){return typeof e=="string"?e:e?.message}function zs(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const u=Cd(e.inst?._zod.def?.error?.(e))??Cd(n?.error?.(e))??Cd(i.customError?.(e))??Cd(i.localeError?.(e))??"Invalid input";r.message=u}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function v0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Bc(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const Tj=(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,gg,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ej=te("$ZodError",Tj),Rj=te("$ZodError",Tj,{Parent:Error});function RR(e,n=i=>i.message){const i={},r=[];for(const u of e.issues)u.path.length>0?(i[u.path[0]]=i[u.path[0]]||[],i[u.path[0]].push(n(u))):r.push(n(u));return{formErrors:r,fieldErrors:i}}function DR(e,n=i=>i.message){const i={_errors:[]},r=u=>{for(const h of u.issues)if(h.code==="invalid_union"&&h.errors.length)h.errors.map(f=>r({issues:f}));else if(h.code==="invalid_key")r({issues:h.issues});else if(h.code==="invalid_element")r({issues:h.issues});else if(h.path.length===0)i._errors.push(n(h));else{let f=i,b=0;for(;b<h.path.length;){const v=h.path[b];b===h.path.length-1?(f[v]=f[v]||{_errors:[]},f[v]._errors.push(n(h))):f[v]=f[v]||{_errors:[]},f=f[v],b++}}};return r(e),i}const x0=e=>(n,i,r,u)=>{const h=r?Object.assign(r,{async:!1}):{async:!1},f=n._zod.run({value:i,issues:[]},h);if(f instanceof Promise)throw new Ur;if(f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>zs(v,h,Ds())));throw Cj(b,u?.callee),b}return f.value},w0=e=>async(n,i,r,u)=>{const h=r?Object.assign(r,{async:!0}):{async:!0};let f=n._zod.run({value:i,issues:[]},h);if(f instanceof Promise&&(f=await f),f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>zs(v,h,Ds())));throw Cj(b,u?.callee),b}return f.value},Im=e=>(n,i,r)=>{const u=r?{...r,async:!1}:{async:!1},h=n._zod.run({value:i,issues:[]},u);if(h instanceof Promise)throw new Ur;return h.issues.length?{success:!1,error:new(e??Ej)(h.issues.map(f=>zs(f,u,Ds())))}:{success:!0,data:h.value}},zR=Im(Rj),Om=e=>async(n,i,r)=>{const u=r?Object.assign(r,{async:!0}):{async:!0};let h=n._zod.run({value:i,issues:[]},u);return h instanceof Promise&&(h=await h),h.issues.length?{success:!1,error:new e(h.issues.map(f=>zs(f,u,Ds())))}:{success:!0,data:h.value}},IR=Om(Rj),OR=e=>(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return x0(e)(n,i,u)},PR=e=>(n,i,r)=>x0(e)(n,i,r),qR=e=>async(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return w0(e)(n,i,u)},MR=e=>async(n,i,r)=>w0(e)(n,i,r),BR=e=>(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Im(e)(n,i,u)},LR=e=>(n,i,r)=>Im(e)(n,i,r),UR=e=>async(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Om(e)(n,i,u)},VR=e=>async(n,i,r)=>Om(e)(n,i,r),$R=/^[cC][^\s-]{8,}$/,KR=/^[0-9a-z]+$/,GR=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,HR=/^[0-9a-vA-V]{20}$/,FR=/^[A-Za-z0-9]{27}$/,QR=/^[a-zA-Z0-9_-]{21}$/,ZR=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,YR=/^([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})$/,aw=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)$/,XR=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,JR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function WR(){return new RegExp(JR,"u")}const e7=/^(?:(?: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])$/,t7=/^(([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}|:))$/,n7=/^((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])$/,a7=/^(([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])$/,i7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dj=/^[A-Za-z0-9_-]*$/,s7=/^\+[1-9]\d{6,14}$/,zj="(?:(?:\\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])))",o7=new RegExp(`^${zj}$`);function Ij(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 r7(e){return new RegExp(`^${Ij(e)}$`)}function l7(e){const n=Ij({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(`^${zj}T(?:${r})$`)}const c7=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},u7=/^-?\d+$/,Oj=/^-?\d+(?:\.\d+)?$/,d7=/^(?:true|false)$/i,m7=/^null$/i,p7=/^[^A-Z]*$/,h7=/^[^a-z]*$/,Wn=te("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Pj={number:"number",bigint:"bigint",object:"date"},qj=te("$ZodCheckLessThan",(e,n)=>{Wn.init(e,n);const i=Pj[typeof n.value];e._zod.onattach.push(r=>{const u=r._zod.bag,h=(n.inclusive?u.maximum:u.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<h&&(n.inclusive?u.maximum=n.value:u.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})}}),Mj=te("$ZodCheckGreaterThan",(e,n)=>{Wn.init(e,n);const i=Pj[typeof n.value];e._zod.onattach.push(r=>{const u=r._zod.bag,h=(n.inclusive?u.minimum:u.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>h&&(n.inclusive?u.minimum=n.value:u.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})}}),f7=te("$ZodCheckMultipleOf",(e,n)=>{Wn.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):bR(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})}}),g7=te("$ZodCheckNumberFormat",(e,n)=>{Wn.init(e,n),n.format=n.format||"float64";const i=n.format?.includes("int"),r=i?"int":"number",[u,h]=kR[n.format];e._zod.onattach.push(f=>{const b=f._zod.bag;b.format=n.format,b.minimum=u,b.maximum=h,i&&(b.pattern=u7)}),e._zod.check=f=>{const b=f.value;if(i){if(!Number.isInteger(b)){f.issues.push({expected:r,format:n.format,code:"invalid_type",continue:!1,input:b,inst:e});return}if(!Number.isSafeInteger(b)){b>0?f.issues.push({input:b,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}):f.issues.push({input:b,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}}b<u&&f.issues.push({origin:"number",input:b,code:"too_small",minimum:u,inclusive:!0,inst:e,continue:!n.abort}),b>h&&f.issues.push({origin:"number",input:b,code:"too_big",maximum:h,inclusive:!0,inst:e,continue:!n.abort})}}),y7=te("$ZodCheckMaxLength",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!y0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<u&&(r._zod.bag.maximum=n.maximum)}),e._zod.check=r=>{const u=r.value;if(u.length<=n.maximum)return;const f=v0(u);r.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),b7=te("$ZodCheckMinLength",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!y0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>u&&(r._zod.bag.minimum=n.minimum)}),e._zod.check=r=>{const u=r.value;if(u.length>=n.minimum)return;const f=v0(u);r.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),v7=te("$ZodCheckLengthEquals",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!y0(u)&&u.length!==void 0}),e._zod.onattach.push(r=>{const u=r._zod.bag;u.minimum=n.length,u.maximum=n.length,u.length=n.length}),e._zod.check=r=>{const u=r.value,h=u.length;if(h===n.length)return;const f=v0(u),b=h>n.length;r.issues.push({origin:f,...b?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!n.abort})}}),Pm=te("$ZodCheckStringFormat",(e,n)=>{var i,r;Wn.init(e,n),e._zod.onattach.push(u=>{const h=u._zod.bag;h.format=n.format,n.pattern&&(h.patterns??(h.patterns=new Set),h.patterns.add(n.pattern))}),n.pattern?(i=e._zod).check??(i.check=u=>{n.pattern.lastIndex=0,!n.pattern.test(u.value)&&u.issues.push({origin:"string",code:"invalid_format",format:n.format,input:u.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:e,continue:!n.abort})}):(r=e._zod).check??(r.check=()=>{})}),x7=te("$ZodCheckRegex",(e,n)=>{Pm.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})}}),w7=te("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=p7),Pm.init(e,n)}),S7=te("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=h7),Pm.init(e,n)}),k7=te("$ZodCheckIncludes",(e,n)=>{Wn.init(e,n);const i=Gr(n.includes),r=new RegExp(typeof n.position=="number"?`^.{${n.position}}${i}`:i);n.pattern=r,e._zod.onattach.push(u=>{const h=u._zod.bag;h.patterns??(h.patterns=new Set),h.patterns.add(r)}),e._zod.check=u=>{u.value.includes(n.includes,n.position)||u.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:u.value,inst:e,continue:!n.abort})}}),j7=te("$ZodCheckStartsWith",(e,n)=>{Wn.init(e,n);const i=new RegExp(`^${Gr(n.prefix)}.*`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const u=r._zod.bag;u.patterns??(u.patterns=new Set),u.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})}}),A7=te("$ZodCheckEndsWith",(e,n)=>{Wn.init(e,n);const i=new RegExp(`.*${Gr(n.suffix)}$`);n.pattern??(n.pattern=i),e._zod.onattach.push(r=>{const u=r._zod.bag;u.patterns??(u.patterns=new Set),u.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})}}),N7=te("$ZodCheckOverwrite",(e,n)=>{Wn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class C7{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(f=>f),u=Math.min(...r.map(f=>f.length-f.trimStart().length)),h=r.map(f=>f.slice(u)).map(f=>" ".repeat(this.indent*2)+f);for(const f of h)this.content.push(f)}compile(){const n=Function,i=this?.args,u=[...(this?.content??[""]).map(h=>` ${h}`)];return new n(...i,u.join(`
16
+ `))}}const _7={major:4,minor:3,patch:6},Lt=te("$ZodType",(e,n)=>{var i;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=_7;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const u of r)for(const h of u._zod.onattach)h(e);if(r.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const u=(f,b,v)=>{let x=Mr(f),S;for(const j of b){if(j._zod.def.when){if(!j._zod.def.when(f))continue}else if(x)continue;const C=f.issues.length,T=j._zod.check(f);if(T instanceof Promise&&v?.async===!1)throw new Ur;if(S||T instanceof Promise)S=(S??Promise.resolve()).then(async()=>{await T,f.issues.length!==C&&(x||(x=Mr(f,C)))});else{if(f.issues.length===C)continue;x||(x=Mr(f,C))}}return S?S.then(()=>f):f},h=(f,b,v)=>{if(Mr(f))return f.aborted=!0,f;const x=u(b,r,v);if(x instanceof Promise){if(v.async===!1)throw new Ur;return x.then(S=>e._zod.parse(S,v))}return e._zod.parse(x,v)};e._zod.run=(f,b)=>{if(b.skipChecks)return e._zod.parse(f,b);if(b.direction==="backward"){const x=e._zod.parse({value:f.value,issues:[]},{...b,skipChecks:!0});return x instanceof Promise?x.then(S=>h(S,f,b)):h(x,f,b)}const v=e._zod.parse(f,b);if(v instanceof Promise){if(b.async===!1)throw new Ur;return v.then(x=>u(x,r,b))}return u(v,r,b)}}gt(e,"~standard",()=>({validate:u=>{try{const h=zR(e,u);return h.success?{value:h.data}:{issues:h.error?.issues}}catch{return IR(e,u).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),S0=te("$ZodString",(e,n)=>{Lt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??c7(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}}),Gt=te("$ZodStringFormat",(e,n)=>{Pm.init(e,n),S0.init(e,n)}),T7=te("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=YR),Gt.init(e,n)}),E7=te("$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=aw(r))}else n.pattern??(n.pattern=aw());Gt.init(e,n)}),R7=te("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=XR),Gt.init(e,n)}),D7=te("$ZodURL",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{try{const r=i.value.trim(),u=new URL(r);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(u.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(u.protocol.endsWith(":")?u.protocol.slice(0,-1):u.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=u.href:i.value=r;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!n.abort})}}}),z7=te("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=WR()),Gt.init(e,n)}),I7=te("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=QR),Gt.init(e,n)}),O7=te("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=$R),Gt.init(e,n)}),P7=te("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=KR),Gt.init(e,n)}),q7=te("$ZodULID",(e,n)=>{n.pattern??(n.pattern=GR),Gt.init(e,n)}),M7=te("$ZodXID",(e,n)=>{n.pattern??(n.pattern=HR),Gt.init(e,n)}),B7=te("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=FR),Gt.init(e,n)}),L7=te("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=l7(n)),Gt.init(e,n)}),U7=te("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=o7),Gt.init(e,n)}),V7=te("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=r7(n)),Gt.init(e,n)}),$7=te("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=ZR),Gt.init(e,n)}),K7=te("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=e7),Gt.init(e,n),e._zod.bag.format="ipv4"}),G7=te("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=t7),Gt.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})}}}),H7=te("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=n7),Gt.init(e,n)}),F7=te("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=a7),Gt.init(e,n),e._zod.check=i=>{const r=i.value.split("/");try{if(r.length!==2)throw new Error;const[u,h]=r;if(!h)throw new Error;const f=Number(h);if(`${f}`!==h)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${u}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!n.abort})}}});function Bj(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Q7=te("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=i7),Gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Bj(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function Z7(e){if(!Dj.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Bj(i)}const Y7=te("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Dj),Gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{Z7(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),X7=te("$ZodE164",(e,n)=>{n.pattern??(n.pattern=s7),Gt.init(e,n)});function J7(e,n=null){try{const i=e.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const u=JSON.parse(atob(r));return!("typ"in u&&u?.typ!=="JWT"||!u.alg||n&&(!("alg"in u)||u.alg!==n))}catch{return!1}}const W7=te("$ZodJWT",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{J7(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Lj=te("$ZodNumber",(e,n)=>{Lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??Oj,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=Number(i.value)}catch{}const u=i.value;if(typeof u=="number"&&!Number.isNaN(u)&&Number.isFinite(u))return i;const h=typeof u=="number"?Number.isNaN(u)?"NaN":Number.isFinite(u)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:u,inst:e,...h?{received:h}:{}}),i}}),eD=te("$ZodNumberFormat",(e,n)=>{g7.init(e,n),Lj.init(e,n)}),tD=te("$ZodBoolean",(e,n)=>{Lt.init(e,n),e._zod.pattern=d7,e._zod.parse=(i,r)=>{if(n.coerce)try{i.value=!!i.value}catch{}const u=i.value;return typeof u=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:u,inst:e}),i}}),nD=te("$ZodNull",(e,n)=>{Lt.init(e,n),e._zod.pattern=m7,e._zod.values=new Set([null]),e._zod.parse=(i,r)=>{const u=i.value;return u===null||i.issues.push({expected:"null",code:"invalid_type",input:u,inst:e}),i}}),aD=te("$ZodUnknown",(e,n)=>{Lt.init(e,n),e._zod.parse=i=>i}),iD=te("$ZodNever",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)});function iw(e,n,i){e.issues.length&&n.issues.push(...Br(i,e.issues)),n.value[i]=e.value}const sD=te("$ZodArray",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{const u=i.value;if(!Array.isArray(u))return i.issues.push({expected:"array",code:"invalid_type",input:u,inst:e}),i;i.value=Array(u.length);const h=[];for(let f=0;f<u.length;f++){const b=u[f],v=n.element._zod.run({value:b,issues:[]},r);v instanceof Promise?h.push(v.then(x=>iw(x,i,f))):iw(v,i,f)}return h.length?Promise.all(h).then(()=>i):i}});function nm(e,n,i,r,u){if(e.issues.length){if(u&&!(i in r))return;n.issues.push(...Br(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function Uj(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=SR(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function Vj(e,n,i,r,u,h){const f=[],b=u.keySet,v=u.catchall._zod,x=v.def.type,S=v.optout==="optional";for(const j in n){if(b.has(j))continue;if(x==="never"){f.push(j);continue}const C=v.run({value:n[j],issues:[]},r);C instanceof Promise?e.push(C.then(T=>nm(T,i,j,n,S))):nm(C,i,j,n,S)}return f.length&&i.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:h}),e.length?Promise.all(e).then(()=>i):i}const oD=te("$ZodObject",(e,n)=>{if(Lt.init(e,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const b=n.shape;Object.defineProperty(n,"shape",{get:()=>{const v={...b};return Object.defineProperty(n,"shape",{value:v}),v}})}const r=zm(()=>Uj(n));gt(e._zod,"propValues",()=>{const b=n.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){v[x]??(v[x]=new Set);for(const j of S.values)v[x].add(j)}}return v});const u=Mc,h=n.catchall;let f;e._zod.parse=(b,v)=>{f??(f=r.value);const x=b.value;if(!u(x))return b.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),b;b.value={};const S=[],j=f.shape;for(const C of f.keys){const T=j[C],z=T._zod.optout==="optional",q=T._zod.run({value:x[C],issues:[]},v);q instanceof Promise?S.push(q.then(R=>nm(R,b,C,x,z))):nm(q,b,C,x,z)}return h?Vj(S,x,b,v,r.value,e):S.length?Promise.all(S).then(()=>b):b}}),rD=te("$ZodObjectJIT",(e,n)=>{oD.init(e,n);const i=e._zod.parse,r=zm(()=>Uj(n)),u=C=>{const T=new C7(["shape","payload","ctx"]),z=r.value,q=L=>{const $=nw(L);return`shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`};T.write("const input = payload.value;");const R=Object.create(null);let P=0;for(const L of z.keys)R[L]=`key_${P++}`;T.write("const newResult = {};");for(const L of z.keys){const $=R[L],Q=nw(L),V=C[L]?._zod?.optout==="optional";T.write(`const ${$} = ${q(L)};`),V?T.write(`
17
+ if (${$}.issues.length) {
18
+ if (${Q} in input) {
19
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
20
+ ...iss,
21
+ path: iss.path ? [${Q}, ...iss.path] : [${Q}]
22
+ })));
23
+ }
24
+ }
25
+
26
+ if (${$}.value === undefined) {
27
+ if (${Q} in input) {
28
+ newResult[${Q}] = undefined;
29
+ }
30
+ } else {
31
+ newResult[${Q}] = ${$}.value;
32
+ }
33
+
34
+ `):T.write(`
35
+ if (${$}.issues.length) {
36
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
37
+ ...iss,
38
+ path: iss.path ? [${Q}, ...iss.path] : [${Q}]
39
+ })));
40
+ }
41
+
42
+ if (${$}.value === undefined) {
43
+ if (${Q} in input) {
44
+ newResult[${Q}] = undefined;
45
+ }
46
+ } else {
47
+ newResult[${Q}] = ${$}.value;
48
+ }
49
+
50
+ `)}T.write("payload.value = newResult;"),T.write("return payload;");const M=T.compile();return(L,$)=>M(C,L,$)};let h;const f=Mc,b=!Aj.jitless,x=b&&xR.value,S=n.catchall;let j;e._zod.parse=(C,T)=>{j??(j=r.value);const z=C.value;return f(z)?b&&x&&T?.async===!1&&T.jitless!==!0?(h||(h=u(n.shape)),C=h(C,T),S?Vj([],z,C,T,j,e):C):i(C,T):(C.issues.push({expected:"object",code:"invalid_type",input:z,inst:e}),C)}});function sw(e,n,i,r){for(const h of e)if(h.issues.length===0)return n.value=h.value,n;const u=e.filter(h=>!Mr(h));return u.length===1?(n.value=u[0].value,u[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:i,errors:e.map(h=>h.issues.map(f=>zs(f,r,Ds())))}),n)}const $j=te("$ZodUnion",(e,n)=>{Lt.init(e,n),gt(e._zod,"optin",()=>n.options.some(u=>u._zod.optin==="optional")?"optional":void 0),gt(e._zod,"optout",()=>n.options.some(u=>u._zod.optout==="optional")?"optional":void 0),gt(e._zod,"values",()=>{if(n.options.every(u=>u._zod.values))return new Set(n.options.flatMap(u=>Array.from(u._zod.values)))}),gt(e._zod,"pattern",()=>{if(n.options.every(u=>u._zod.pattern)){const u=n.options.map(h=>h._zod.pattern);return new RegExp(`^(${u.map(h=>b0(h.source)).join("|")})$`)}});const i=n.options.length===1,r=n.options[0]._zod.run;e._zod.parse=(u,h)=>{if(i)return r(u,h);let f=!1;const b=[];for(const v of n.options){const x=v._zod.run({value:u.value,issues:[]},h);if(x instanceof Promise)b.push(x),f=!0;else{if(x.issues.length===0)return x;b.push(x)}}return f?Promise.all(b).then(v=>sw(v,u,e,h)):sw(b,u,e,h)}}),lD=te("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,$j.init(e,n);const i=e._zod.parse;gt(e._zod,"propValues",()=>{const u={};for(const h of n.options){const f=h._zod.propValues;if(!f||Object.keys(f).length===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(h)}"`);for(const[b,v]of Object.entries(f)){u[b]||(u[b]=new Set);for(const x of v)u[b].add(x)}}return u});const r=zm(()=>{const u=n.options,h=new Map;for(const f of u){const b=f._zod.propValues?.[n.discriminator];if(!b||b.size===0)throw new Error(`Invalid discriminated union option at index "${n.options.indexOf(f)}"`);for(const v of b){if(h.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);h.set(v,f)}}return h});e._zod.parse=(u,h)=>{const f=u.value;if(!Mc(f))return u.issues.push({code:"invalid_type",expected:"object",input:f,inst:e}),u;const b=r.value.get(f?.[n.discriminator]);return b?b._zod.run(u,h):n.unionFallback?i(u,h):(u.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:n.discriminator,input:f,path:[n.discriminator],inst:e}),u)}}),cD=te("$ZodIntersection",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{const u=i.value,h=n.left._zod.run({value:u,issues:[]},r),f=n.right._zod.run({value:u,issues:[]},r);return h instanceof Promise||f instanceof Promise?Promise.all([h,f]).then(([v,x])=>ow(i,v,x)):ow(i,h,f)}});function yg(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(Kr(e)&&Kr(n)){const i=Object.keys(n),r=Object.keys(e).filter(h=>i.indexOf(h)!==-1),u={...e,...n};for(const h of r){const f=yg(e[h],n[h]);if(!f.valid)return{valid:!1,mergeErrorPath:[h,...f.mergeErrorPath]};u[h]=f.data}return{valid:!0,data:u}}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 u=e[r],h=n[r],f=yg(u,h);if(!f.valid)return{valid:!1,mergeErrorPath:[r,...f.mergeErrorPath]};i.push(f.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function ow(e,n,i){const r=new Map;let u;for(const b of n.issues)if(b.code==="unrecognized_keys"){u??(u=b);for(const v of b.keys)r.has(v)||r.set(v,{}),r.get(v).l=!0}else e.issues.push(b);for(const b of i.issues)if(b.code==="unrecognized_keys")for(const v of b.keys)r.has(v)||r.set(v,{}),r.get(v).r=!0;else e.issues.push(b);const h=[...r].filter(([,b])=>b.l&&b.r).map(([b])=>b);if(h.length&&u&&e.issues.push({...u,keys:h}),Mr(e))return e;const f=yg(n.value,i.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return e.value=f.data,e}const uD=te("$ZodRecord",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{const u=i.value;if(!Kr(u))return i.issues.push({expected:"record",code:"invalid_type",input:u,inst:e}),i;const h=[],f=n.keyType._zod.values;if(f){i.value={};const b=new Set;for(const x of f)if(typeof x=="string"||typeof x=="number"||typeof x=="symbol"){b.add(typeof x=="number"?x.toString():x);const S=n.valueType._zod.run({value:u[x],issues:[]},r);S instanceof Promise?h.push(S.then(j=>{j.issues.length&&i.issues.push(...Br(x,j.issues)),i.value[x]=j.value})):(S.issues.length&&i.issues.push(...Br(x,S.issues)),i.value[x]=S.value)}let v;for(const x in u)b.has(x)||(v=v??[],v.push(x));v&&v.length>0&&i.issues.push({code:"unrecognized_keys",input:u,inst:e,keys:v})}else{i.value={};for(const b of Reflect.ownKeys(u)){if(b==="__proto__")continue;let v=n.keyType._zod.run({value:b,issues:[]},r);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof b=="string"&&Oj.test(b)&&v.issues.length){const j=n.keyType._zod.run({value:Number(b),issues:[]},r);if(j instanceof Promise)throw new Error("Async schemas not supported in object keys currently");j.issues.length===0&&(v=j)}if(v.issues.length){n.mode==="loose"?i.value[b]=u[b]:i.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(j=>zs(j,r,Ds())),input:b,path:[b],inst:e});continue}const S=n.valueType._zod.run({value:u[b],issues:[]},r);S instanceof Promise?h.push(S.then(j=>{j.issues.length&&i.issues.push(...Br(b,j.issues)),i.value[v.value]=j.value})):(S.issues.length&&i.issues.push(...Br(b,S.issues)),i.value[v.value]=S.value)}}return h.length?Promise.all(h).then(()=>i):i}}),dD=te("$ZodEnum",(e,n)=>{Lt.init(e,n);const i=Nj(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(u=>wR.has(typeof u)).map(u=>typeof u=="string"?Gr(u):u.toString()).join("|")})$`),e._zod.parse=(u,h)=>{const f=u.value;return r.has(f)||u.issues.push({code:"invalid_value",values:i,input:f,inst:e}),u}}),mD=te("$ZodLiteral",(e,n)=>{if(Lt.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"?Gr(r):r?Gr(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,u)=>{const h=r.value;return i.has(h)||r.issues.push({code:"invalid_value",values:n.values,input:h,inst:e}),r}}),pD=te("$ZodTransform",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new jj(e.constructor.name);const u=n.transform(i.value,i);if(r.async)return(u instanceof Promise?u:Promise.resolve(u)).then(f=>(i.value=f,i));if(u instanceof Promise)throw new Ur;return i.value=u,i}});function rw(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Kj=te("$ZodOptional",(e,n)=>{Lt.init(e,n),e._zod.optin="optional",e._zod.optout="optional",gt(e._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),gt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${b0(i.source)})?$`):void 0}),e._zod.parse=(i,r)=>{if(n.innerType._zod.optin==="optional"){const u=n.innerType._zod.run(i,r);return u instanceof Promise?u.then(h=>rw(h,i.value)):rw(u,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),hD=te("$ZodExactOptional",(e,n)=>{Kj.init(e,n),gt(e._zod,"values",()=>n.innerType._zod.values),gt(e._zod,"pattern",()=>n.innerType._zod.pattern),e._zod.parse=(i,r)=>n.innerType._zod.run(i,r)}),fD=te("$ZodNullable",(e,n)=>{Lt.init(e,n),gt(e._zod,"optin",()=>n.innerType._zod.optin),gt(e._zod,"optout",()=>n.innerType._zod.optout),gt(e._zod,"pattern",()=>{const i=n.innerType._zod.pattern;return i?new RegExp(`^(${b0(i.source)}|null)$`):void 0}),gt(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)}),gD=te("$ZodDefault",(e,n)=>{Lt.init(e,n),e._zod.optin="optional",gt(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 u=n.innerType._zod.run(i,r);return u instanceof Promise?u.then(h=>lw(h,n)):lw(u,n)}});function lw(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const yD=te("$ZodPrefault",(e,n)=>{Lt.init(e,n),e._zod.optin="optional",gt(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))}),bD=te("$ZodNonOptional",(e,n)=>{Lt.init(e,n),gt(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 u=n.innerType._zod.run(i,r);return u instanceof Promise?u.then(h=>cw(h,e)):cw(u,e)}});function cw(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 vD=te("$ZodCatch",(e,n)=>{Lt.init(e,n),gt(e._zod,"optin",()=>n.innerType._zod.optin),gt(e._zod,"optout",()=>n.innerType._zod.optout),gt(e._zod,"values",()=>n.innerType._zod.values),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const u=n.innerType._zod.run(i,r);return u instanceof Promise?u.then(h=>(i.value=h.value,h.issues.length&&(i.value=n.catchValue({...i,error:{issues:h.issues.map(f=>zs(f,r,Ds()))},input:i.value}),i.issues=[]),i)):(i.value=u.value,u.issues.length&&(i.value=n.catchValue({...i,error:{issues:u.issues.map(h=>zs(h,r,Ds()))},input:i.value}),i.issues=[]),i)}}),xD=te("$ZodPipe",(e,n)=>{Lt.init(e,n),gt(e._zod,"values",()=>n.in._zod.values),gt(e._zod,"optin",()=>n.in._zod.optin),gt(e._zod,"optout",()=>n.out._zod.optout),gt(e._zod,"propValues",()=>n.in._zod.propValues),e._zod.parse=(i,r)=>{if(r.direction==="backward"){const h=n.out._zod.run(i,r);return h instanceof Promise?h.then(f=>_d(f,n.in,r)):_d(h,n.in,r)}const u=n.in._zod.run(i,r);return u instanceof Promise?u.then(h=>_d(h,n.out,r)):_d(u,n.out,r)}});function _d(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const wD=te("$ZodReadonly",(e,n)=>{Lt.init(e,n),gt(e._zod,"propValues",()=>n.innerType._zod.propValues),gt(e._zod,"values",()=>n.innerType._zod.values),gt(e._zod,"optin",()=>n.innerType?._zod?.optin),gt(e._zod,"optout",()=>n.innerType?._zod?.optout),e._zod.parse=(i,r)=>{if(r.direction==="backward")return n.innerType._zod.run(i,r);const u=n.innerType._zod.run(i,r);return u instanceof Promise?u.then(uw):uw(u)}});function uw(e){return e.value=Object.freeze(e.value),e}const SD=te("$ZodLazy",(e,n)=>{Lt.init(e,n),gt(e._zod,"innerType",()=>n.getter()),gt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),gt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),gt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),gt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(i,r)=>e._zod.innerType._zod.run(i,r)}),kD=te("$ZodCustom",(e,n)=>{Wn.init(e,n),Lt.init(e,n),e._zod.parse=(i,r)=>i,e._zod.check=i=>{const r=i.value,u=n.fn(r);if(u instanceof Promise)return u.then(h=>dw(h,i,r,e));dw(u,i,r,e)}});function dw(e,n,i,r){if(!e){const u={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(u.params=r._zod.def.params),n.issues.push(Bc(u))}}var mw;class jD{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 u={...r,...this._map.get(n)};return Object.keys(u).length?u:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function AD(){return new jD}(mw=globalThis).__zod_globalRegistry??(mw.__zod_globalRegistry=AD());const Nc=globalThis.__zod_globalRegistry;function ND(e,n){return new e({type:"string",...qe(n)})}function CD(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(n)})}function pw(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(n)})}function Gj(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(n)})}function _D(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(n)})}function TD(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(n)})}function ED(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(n)})}function RD(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(n)})}function DD(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(n)})}function zD(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(n)})}function ID(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(n)})}function OD(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(n)})}function PD(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(n)})}function qD(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(n)})}function MD(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(n)})}function BD(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(n)})}function LD(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(n)})}function UD(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(n)})}function VD(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(n)})}function $D(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(n)})}function KD(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(n)})}function GD(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(n)})}function HD(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(n)})}function FD(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(n)})}function QD(e,n){return new e({type:"string",format:"date",check:"string_format",...qe(n)})}function ZD(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(n)})}function YD(e,n){return new e({type:"string",format:"duration",check:"string_format",...qe(n)})}function XD(e,n){return new e({type:"number",checks:[],...qe(n)})}function JD(e,n){return new e({type:"number",coerce:!0,checks:[],...qe(n)})}function WD(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...qe(n)})}function ez(e,n){return new e({type:"boolean",...qe(n)})}function tz(e,n){return new e({type:"null",...qe(n)})}function nz(e){return new e({type:"unknown"})}function az(e,n){return new e({type:"never",...qe(n)})}function hw(e,n){return new qj({check:"less_than",...qe(n),value:e,inclusive:!1})}function _f(e,n){return new qj({check:"less_than",...qe(n),value:e,inclusive:!0})}function fw(e,n){return new Mj({check:"greater_than",...qe(n),value:e,inclusive:!1})}function Tf(e,n){return new Mj({check:"greater_than",...qe(n),value:e,inclusive:!0})}function gw(e,n){return new f7({check:"multiple_of",...qe(n),value:e})}function Hj(e,n){return new y7({check:"max_length",...qe(n),maximum:e})}function am(e,n){return new b7({check:"min_length",...qe(n),minimum:e})}function Fj(e,n){return new v7({check:"length_equals",...qe(n),length:e})}function iz(e,n){return new x7({check:"string_format",format:"regex",...qe(n),pattern:e})}function sz(e){return new w7({check:"string_format",format:"lowercase",...qe(e)})}function oz(e){return new S7({check:"string_format",format:"uppercase",...qe(e)})}function rz(e,n){return new k7({check:"string_format",format:"includes",...qe(n),includes:e})}function lz(e,n){return new j7({check:"string_format",format:"starts_with",...qe(n),prefix:e})}function cz(e,n){return new A7({check:"string_format",format:"ends_with",...qe(n),suffix:e})}function el(e){return new N7({check:"overwrite",tx:e})}function uz(e){return el(n=>n.normalize(e))}function dz(){return el(e=>e.trim())}function mz(){return el(e=>e.toLowerCase())}function pz(){return el(e=>e.toUpperCase())}function hz(){return el(e=>vR(e))}function fz(e,n,i){return new e({type:"array",element:n,...qe(i)})}function gz(e,n,i){return new e({type:"custom",check:"custom",fn:n,...qe(i)})}function yz(e){const n=bz(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Bc(r,i.value,n._zod.def));else{const u=r;u.fatal&&(u.continue=!1),u.code??(u.code="custom"),u.input??(u.input=i.value),u.inst??(u.inst=n),u.continue??(u.continue=!n._zod.def.abort),i.issues.push(Bc(u))}},e(i.value,i)));return n}function bz(e,n){const i=new Wn({check:"custom",...qe(n)});return i._zod.check=e,i}function Qj(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??Nc,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 on(e,n,i={path:[],schemaPath:[]}){var r;const u=e._zod.def,h=n.seen.get(e);if(h)return h.count++,i.schemaPath.includes(e)&&(h.cycle=i.path),h.schema;const f={schema:{},count:1,cycle:void 0,path:i.path};n.seen.set(e,f);const b=e._zod.toJSONSchema?.();if(b)f.schema=b;else{const S={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(n,f.schema,S);else{const C=f.schema,T=n.processors[u.type];if(!T)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${u.type}`);T(e,n,C,S)}const j=e._zod.parent;j&&(f.ref||(f.ref=j),on(j,n,S),n.seen.get(j).isParent=!0)}const v=n.metadataRegistry.get(e);return v&&Object.assign(f.schema,v),n.io==="input"&&Un(e)&&(delete f.schema.examples,delete f.schema.default),n.io==="input"&&f.schema._prefault&&((r=f.schema).default??(r.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(e).schema}function Zj(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 f of e.seen.entries()){const b=e.metadataRegistry.get(f[0])?.id;if(b){const v=r.get(b);if(v&&v!==f[0])throw new Error(`Duplicate schema id "${b}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(b,f[0])}}const u=f=>{const b=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const j=e.external.registry.get(f[0])?.id,C=e.external.uri??(z=>z);if(j)return{ref:C(j)};const T=f[1].defId??f[1].schema.id??`schema${e.counter++}`;return f[1].defId=T,{defId:T,ref:`${C("__shared")}#/${b}/${T}`}}if(f[1]===i)return{ref:"#"};const x=`#/${b}/`,S=f[1].schema.id??`__schema${e.counter++}`;return{defId:S,ref:x+S}},h=f=>{if(f[1].schema.$ref)return;const b=f[1],{ref:v,defId:x}=u(f);b.def={...b.schema},x&&(b.defId=x);const S=b.schema;for(const j in S)delete S[j];S.$ref=v};if(e.cycles==="throw")for(const f of e.seen.entries()){const b=f[1];if(b.cycle)throw new Error(`Cycle detected: #/${b.cycle?.join("/")}/<root>
51
+
52
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of e.seen.entries()){const b=f[1];if(n===f[0]){h(f);continue}if(e.external){const x=e.external.registry.get(f[0])?.id;if(n!==f[0]&&x){h(f);continue}}if(e.metadataRegistry.get(f[0])?.id){h(f);continue}if(b.cycle){h(f);continue}if(b.count>1&&e.reused==="ref"){h(f);continue}}}function Yj(e,n){const i=e.seen.get(n);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=f=>{const b=e.seen.get(f);if(b.ref===null)return;const v=b.def??b.schema,x={...v},S=b.ref;if(b.ref=null,S){r(S);const C=e.seen.get(S),T=C.schema;if(T.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(v.allOf=v.allOf??[],v.allOf.push(T)):Object.assign(v,T),Object.assign(v,x),f._zod.parent===S)for(const q in v)q==="$ref"||q==="allOf"||q in x||delete v[q];if(T.$ref&&C.def)for(const q in v)q==="$ref"||q==="allOf"||q in C.def&&JSON.stringify(v[q])===JSON.stringify(C.def[q])&&delete v[q]}const j=f._zod.parent;if(j&&j!==S){r(j);const C=e.seen.get(j);if(C?.schema.$ref&&(v.$ref=C.schema.$ref,C.def))for(const T in v)T==="$ref"||T==="allOf"||T in C.def&&JSON.stringify(v[T])===JSON.stringify(C.def[T])&&delete v[T]}e.override({zodSchema:f,jsonSchema:v,path:b.path??[]})};for(const f of[...e.seen.entries()].reverse())r(f[0]);const u={};if(e.target==="draft-2020-12"?u.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?u.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?u.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const f=e.external.registry.get(n)?.id;if(!f)throw new Error("Schema is missing an `id` property");u.$id=e.external.uri(f)}Object.assign(u,i.def??i.schema);const h=e.external?.defs??{};for(const f of e.seen.entries()){const b=f[1];b.def&&b.defId&&(h[b.defId]=b.def)}e.external||Object.keys(h).length>0&&(e.target==="draft-2020-12"?u.$defs=h:u.definitions=h);try{const f=JSON.parse(JSON.stringify(u));return Object.defineProperty(f,"~standard",{value:{...n["~standard"],jsonSchema:{input:im(n,"input",e.processors),output:im(n,"output",e.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Un(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 Un(r.element,i);if(r.type==="set")return Un(r.valueType,i);if(r.type==="lazy")return Un(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 Un(r.innerType,i);if(r.type==="intersection")return Un(r.left,i)||Un(r.right,i);if(r.type==="record"||r.type==="map")return Un(r.keyType,i)||Un(r.valueType,i);if(r.type==="pipe")return Un(r.in,i)||Un(r.out,i);if(r.type==="object"){for(const u in r.shape)if(Un(r.shape[u],i))return!0;return!1}if(r.type==="union"){for(const u of r.options)if(Un(u,i))return!0;return!1}if(r.type==="tuple"){for(const u of r.items)if(Un(u,i))return!0;return!!(r.rest&&Un(r.rest,i))}return!1}const vz=(e,n={})=>i=>{const r=Qj({...i,processors:n});return on(e,r),Zj(r,e),Yj(r,e)},im=(e,n,i={})=>r=>{const{libraryOptions:u,target:h}=r??{},f=Qj({...u??{},target:h,io:n,processors:i});return on(e,f),Zj(f,e),Yj(f,e)},xz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},wz=(e,n,i,r)=>{const u=i;u.type="string";const{minimum:h,maximum:f,format:b,patterns:v,contentEncoding:x}=e._zod.bag;if(typeof h=="number"&&(u.minLength=h),typeof f=="number"&&(u.maxLength=f),b&&(u.format=xz[b]??b,u.format===""&&delete u.format,b==="time"&&delete u.format),x&&(u.contentEncoding=x),v&&v.size>0){const S=[...v];S.length===1?u.pattern=S[0].source:S.length>1&&(u.allOf=[...S.map(j=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:j.source}))])}},Sz=(e,n,i,r)=>{const u=i,{minimum:h,maximum:f,format:b,multipleOf:v,exclusiveMaximum:x,exclusiveMinimum:S}=e._zod.bag;typeof b=="string"&&b.includes("int")?u.type="integer":u.type="number",typeof S=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(u.minimum=S,u.exclusiveMinimum=!0):u.exclusiveMinimum=S),typeof h=="number"&&(u.minimum=h,typeof S=="number"&&n.target!=="draft-04"&&(S>=h?delete u.minimum:delete u.exclusiveMinimum)),typeof x=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(u.maximum=x,u.exclusiveMaximum=!0):u.exclusiveMaximum=x),typeof f=="number"&&(u.maximum=f,typeof x=="number"&&n.target!=="draft-04"&&(x<=f?delete u.maximum:delete u.exclusiveMaximum)),typeof v=="number"&&(u.multipleOf=v)},kz=(e,n,i,r)=>{i.type="boolean"},jz=(e,n,i,r)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},Az=(e,n,i,r)=>{i.not={}},Nz=(e,n,i,r)=>{},Cz=(e,n,i,r)=>{const u=e._zod.def,h=Nj(u.entries);h.every(f=>typeof f=="number")&&(i.type="number"),h.every(f=>typeof f=="string")&&(i.type="string"),i.enum=h},_z=(e,n,i,r)=>{const u=e._zod.def,h=[];for(const f of u.values)if(f===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof f=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");h.push(Number(f))}else h.push(f);if(h.length!==0)if(h.length===1){const f=h[0];i.type=f===null?"null":typeof f,n.target==="draft-04"||n.target==="openapi-3.0"?i.enum=[f]:i.const=f}else h.every(f=>typeof f=="number")&&(i.type="number"),h.every(f=>typeof f=="string")&&(i.type="string"),h.every(f=>typeof f=="boolean")&&(i.type="boolean"),h.every(f=>f===null)&&(i.type="null"),i.enum=h},Tz=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Ez=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Rz=(e,n,i,r)=>{const u=i,h=e._zod.def,{minimum:f,maximum:b}=e._zod.bag;typeof f=="number"&&(u.minItems=f),typeof b=="number"&&(u.maxItems=b),u.type="array",u.items=on(h.element,n,{...r,path:[...r.path,"items"]})},Dz=(e,n,i,r)=>{const u=i,h=e._zod.def;u.type="object",u.properties={};const f=h.shape;for(const x in f)u.properties[x]=on(f[x],n,{...r,path:[...r.path,"properties",x]});const b=new Set(Object.keys(f)),v=new Set([...b].filter(x=>{const S=h.shape[x]._zod;return n.io==="input"?S.optin===void 0:S.optout===void 0}));v.size>0&&(u.required=Array.from(v)),h.catchall?._zod.def.type==="never"?u.additionalProperties=!1:h.catchall?h.catchall&&(u.additionalProperties=on(h.catchall,n,{...r,path:[...r.path,"additionalProperties"]})):n.io==="output"&&(u.additionalProperties=!1)},zz=(e,n,i,r)=>{const u=e._zod.def,h=u.inclusive===!1,f=u.options.map((b,v)=>on(b,n,{...r,path:[...r.path,h?"oneOf":"anyOf",v]}));h?i.oneOf=f:i.anyOf=f},Iz=(e,n,i,r)=>{const u=e._zod.def,h=on(u.left,n,{...r,path:[...r.path,"allOf",0]}),f=on(u.right,n,{...r,path:[...r.path,"allOf",1]}),b=x=>"allOf"in x&&Object.keys(x).length===1,v=[...b(h)?h.allOf:[h],...b(f)?f.allOf:[f]];i.allOf=v},Oz=(e,n,i,r)=>{const u=i,h=e._zod.def;u.type="object";const f=h.keyType,v=f._zod.bag?.patterns;if(h.mode==="loose"&&v&&v.size>0){const S=on(h.valueType,n,{...r,path:[...r.path,"patternProperties","*"]});u.patternProperties={};for(const j of v)u.patternProperties[j.source]=S}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(u.propertyNames=on(h.keyType,n,{...r,path:[...r.path,"propertyNames"]})),u.additionalProperties=on(h.valueType,n,{...r,path:[...r.path,"additionalProperties"]});const x=f._zod.values;if(x){const S=[...x].filter(j=>typeof j=="string"||typeof j=="number");S.length>0&&(u.required=S)}},Pz=(e,n,i,r)=>{const u=e._zod.def,h=on(u.innerType,n,r),f=n.seen.get(e);n.target==="openapi-3.0"?(f.ref=u.innerType,i.nullable=!0):i.anyOf=[h,{type:"null"}]},qz=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType},Mz=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,i.default=JSON.parse(JSON.stringify(u.defaultValue))},Bz=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,n.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(u.defaultValue)))},Lz=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType;let f;try{f=u.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=f},Uz=(e,n,i,r)=>{const u=e._zod.def,h=n.io==="input"?u.in._zod.def.type==="transform"?u.out:u.in:u.out;on(h,n,r);const f=n.seen.get(e);f.ref=h},Vz=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType,i.readOnly=!0},Xj=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType},$z=(e,n,i,r)=>{const u=e._zod.innerType;on(u,n,r);const h=n.seen.get(e);h.ref=u},Kz=te("ZodISODateTime",(e,n)=>{L7.init(e,n),Xt.init(e,n)});function sm(e){return FD(Kz,e)}const Gz=te("ZodISODate",(e,n)=>{U7.init(e,n),Xt.init(e,n)});function Is(e){return QD(Gz,e)}const Hz=te("ZodISOTime",(e,n)=>{V7.init(e,n),Xt.init(e,n)});function Fz(e){return ZD(Hz,e)}const Qz=te("ZodISODuration",(e,n)=>{$7.init(e,n),Xt.init(e,n)});function Zz(e){return YD(Qz,e)}const Yz=(e,n)=>{Ej.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>DR(e,i)},flatten:{value:i=>RR(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,gg,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,gg,2)}},isEmpty:{get(){return e.issues.length===0}}})},Ia=te("ZodError",Yz,{Parent:Error}),Xz=x0(Ia),Jz=w0(Ia),Wz=Im(Ia),eI=Om(Ia),tI=OR(Ia),nI=PR(Ia),aI=qR(Ia),iI=MR(Ia),sI=BR(Ia),oI=LR(Ia),rI=UR(Ia),lI=VR(Ia),Ut=te("ZodType",(e,n)=>(Lt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:im(e,"input"),output:im(e,"output")}}),e.toJSONSchema=vz(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Ms(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)=>Bs(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>Xz(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>Wz(e,i,r),e.parseAsync=async(i,r)=>Jz(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>eI(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>tI(e,i,r),e.decode=(i,r)=>nI(e,i,r),e.encodeAsync=async(i,r)=>aI(e,i,r),e.decodeAsync=async(i,r)=>iI(e,i,r),e.safeEncode=(i,r)=>sI(e,i,r),e.safeDecode=(i,r)=>oI(e,i,r),e.safeEncodeAsync=async(i,r)=>rI(e,i,r),e.safeDecodeAsync=async(i,r)=>lI(e,i,r),e.refine=(i,r)=>e.check(iO(i,r)),e.superRefine=i=>e.check(sO(i)),e.overwrite=i=>e.check(el(i)),e.optional=()=>vw(e),e.exactOptional=()=>$I(e),e.nullable=()=>xw(e),e.nullish=()=>vw(xw(e)),e.nonoptional=i=>ZI(e,i),e.array=()=>y(e),e.or=i=>Fe([e,i]),e.and=i=>MI(e,i),e.transform=i=>vg(e,t2(i)),e.default=i=>HI(e,i),e.prefault=i=>QI(e,i),e.catch=i=>XI(e,i),e.pipe=i=>vg(e,i),e.readonly=()=>eO(e),e.describe=i=>{const r=e.clone();return Nc.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return Nc.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Nc.get(e);const r=e.clone();return Nc.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Jj=te("_ZodString",(e,n)=>{S0.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>wz(e,r,u);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(iz(...r)),e.includes=(...r)=>e.check(rz(...r)),e.startsWith=(...r)=>e.check(lz(...r)),e.endsWith=(...r)=>e.check(cz(...r)),e.min=(...r)=>e.check(am(...r)),e.max=(...r)=>e.check(Hj(...r)),e.length=(...r)=>e.check(Fj(...r)),e.nonempty=(...r)=>e.check(am(1,...r)),e.lowercase=r=>e.check(sz(r)),e.uppercase=r=>e.check(oz(r)),e.trim=()=>e.check(dz()),e.normalize=(...r)=>e.check(uz(...r)),e.toLowerCase=()=>e.check(mz()),e.toUpperCase=()=>e.check(pz()),e.slugify=()=>e.check(hz())}),cI=te("ZodString",(e,n)=>{S0.init(e,n),Jj.init(e,n),e.email=i=>e.check(CD(uI,i)),e.url=i=>e.check(RD(mI,i)),e.jwt=i=>e.check(HD(CI,i)),e.emoji=i=>e.check(DD(pI,i)),e.guid=i=>e.check(pw(yw,i)),e.uuid=i=>e.check(Gj(Cc,i)),e.uuidv4=i=>e.check(_D(Cc,i)),e.uuidv6=i=>e.check(TD(Cc,i)),e.uuidv7=i=>e.check(ED(Cc,i)),e.nanoid=i=>e.check(zD(hI,i)),e.guid=i=>e.check(pw(yw,i)),e.cuid=i=>e.check(ID(fI,i)),e.cuid2=i=>e.check(OD(gI,i)),e.ulid=i=>e.check(PD(yI,i)),e.base64=i=>e.check($D(jI,i)),e.base64url=i=>e.check(KD(AI,i)),e.xid=i=>e.check(qD(bI,i)),e.ksuid=i=>e.check(MD(vI,i)),e.ipv4=i=>e.check(BD(xI,i)),e.ipv6=i=>e.check(LD(wI,i)),e.cidrv4=i=>e.check(UD(SI,i)),e.cidrv6=i=>e.check(VD(kI,i)),e.e164=i=>e.check(GD(NI,i)),e.datetime=i=>e.check(sm(i)),e.date=i=>e.check(Is(i)),e.time=i=>e.check(Fz(i)),e.duration=i=>e.check(Zz(i))});function s(e){return ND(cI,e)}const Xt=te("ZodStringFormat",(e,n)=>{Gt.init(e,n),Jj.init(e,n)}),uI=te("ZodEmail",(e,n)=>{R7.init(e,n),Xt.init(e,n)}),yw=te("ZodGUID",(e,n)=>{T7.init(e,n),Xt.init(e,n)}),Cc=te("ZodUUID",(e,n)=>{E7.init(e,n),Xt.init(e,n)});function dI(e){return Gj(Cc,e)}const mI=te("ZodURL",(e,n)=>{D7.init(e,n),Xt.init(e,n)}),pI=te("ZodEmoji",(e,n)=>{z7.init(e,n),Xt.init(e,n)}),hI=te("ZodNanoID",(e,n)=>{I7.init(e,n),Xt.init(e,n)}),fI=te("ZodCUID",(e,n)=>{O7.init(e,n),Xt.init(e,n)}),gI=te("ZodCUID2",(e,n)=>{P7.init(e,n),Xt.init(e,n)}),yI=te("ZodULID",(e,n)=>{q7.init(e,n),Xt.init(e,n)}),bI=te("ZodXID",(e,n)=>{M7.init(e,n),Xt.init(e,n)}),vI=te("ZodKSUID",(e,n)=>{B7.init(e,n),Xt.init(e,n)}),xI=te("ZodIPv4",(e,n)=>{K7.init(e,n),Xt.init(e,n)}),wI=te("ZodIPv6",(e,n)=>{G7.init(e,n),Xt.init(e,n)}),SI=te("ZodCIDRv4",(e,n)=>{H7.init(e,n),Xt.init(e,n)}),kI=te("ZodCIDRv6",(e,n)=>{F7.init(e,n),Xt.init(e,n)}),jI=te("ZodBase64",(e,n)=>{Q7.init(e,n),Xt.init(e,n)}),AI=te("ZodBase64URL",(e,n)=>{Y7.init(e,n),Xt.init(e,n)}),NI=te("ZodE164",(e,n)=>{X7.init(e,n),Xt.init(e,n)}),CI=te("ZodJWT",(e,n)=>{W7.init(e,n),Xt.init(e,n)}),k0=te("ZodNumber",(e,n)=>{Lj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>Sz(e,r,u),e.gt=(r,u)=>e.check(fw(r,u)),e.gte=(r,u)=>e.check(Tf(r,u)),e.min=(r,u)=>e.check(Tf(r,u)),e.lt=(r,u)=>e.check(hw(r,u)),e.lte=(r,u)=>e.check(_f(r,u)),e.max=(r,u)=>e.check(_f(r,u)),e.int=r=>e.check(bw(r)),e.safe=r=>e.check(bw(r)),e.positive=r=>e.check(fw(0,r)),e.nonnegative=r=>e.check(Tf(0,r)),e.negative=r=>e.check(hw(0,r)),e.nonpositive=r=>e.check(_f(0,r)),e.multipleOf=(r,u)=>e.check(gw(r,u)),e.step=(r,u)=>e.check(gw(r,u)),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 m(e){return XD(k0,e)}const _I=te("ZodNumberFormat",(e,n)=>{eD.init(e,n),k0.init(e,n)});function bw(e){return WD(_I,e)}const TI=te("ZodBoolean",(e,n)=>{tD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>kz(e,i,r)});function N(e){return ez(TI,e)}const EI=te("ZodNull",(e,n)=>{nD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>jz(e,i,r)});function de(e){return tz(EI,e)}const RI=te("ZodUnknown",(e,n)=>{aD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Nz()});function kn(){return nz(RI)}const DI=te("ZodNever",(e,n)=>{iD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Az(e,i,r)});function zI(e){return az(DI,e)}const II=te("ZodArray",(e,n)=>{sD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Rz(e,i,r,u),e.element=n.element,e.min=(i,r)=>e.check(am(i,r)),e.nonempty=i=>e.check(am(1,i)),e.max=(i,r)=>e.check(Hj(i,r)),e.length=(i,r)=>e.check(Fj(i,r)),e.unwrap=()=>e.element});function y(e,n){return fz(II,e,n)}const Wj=te("ZodObject",(e,n)=>{rD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Dz(e,i,r,u),gt(e,"shape",()=>n.shape),e.keyof=()=>k(Object.keys(e._zod.def.shape)),e.catchall=i=>e.clone({...e._zod.def,catchall:i}),e.passthrough=()=>e.clone({...e._zod.def,catchall:kn()}),e.loose=()=>e.clone({...e._zod.def,catchall:kn()}),e.strict=()=>e.clone({...e._zod.def,catchall:zI()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>NR(e,i),e.safeExtend=i=>CR(e,i),e.merge=i=>_R(e,i),e.pick=i=>jR(e,i),e.omit=i=>AR(e,i),e.partial=(...i)=>TR(n2,e,i[0]),e.required=(...i)=>ER(a2,e,i[0])});function d(e,n){const i={type:"object",shape:e??{},...qe(n)};return new Wj(i)}function OI(e,n){return new Wj({type:"object",shape:e,catchall:kn(),...qe(n)})}const e2=te("ZodUnion",(e,n)=>{$j.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>zz(e,i,r,u),e.options=n.options});function Fe(e,n){return new e2({type:"union",options:e,...qe(n)})}const PI=te("ZodDiscriminatedUnion",(e,n)=>{e2.init(e,n),lD.init(e,n)});function Ue(e,n,i){return new PI({type:"union",options:n,discriminator:e,...qe(i)})}const qI=te("ZodIntersection",(e,n)=>{cD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Iz(e,i,r,u)});function MI(e,n){return new qI({type:"intersection",left:e,right:n})}const BI=te("ZodRecord",(e,n)=>{uD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Oz(e,i,r,u),e.keyType=n.keyType,e.valueType=n.valueType});function Ke(e,n,i){return new BI({type:"record",keyType:e,valueType:n,...qe(i)})}const bg=te("ZodEnum",(e,n)=>{dD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>Cz(e,r,u),e.enum=n.entries,e.options=Object.values(n.entries);const i=new Set(Object.keys(n.entries));e.extract=(r,u)=>{const h={};for(const f of r)if(i.has(f))h[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new bg({...n,checks:[],...qe(u),entries:h})},e.exclude=(r,u)=>{const h={...n.entries};for(const f of r)if(i.has(f))delete h[f];else throw new Error(`Key ${f} not found in enum`);return new bg({...n,checks:[],...qe(u),entries:h})}});function k(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new bg({type:"enum",entries:i,...qe(n)})}const LI=te("ZodLiteral",(e,n)=>{mD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>_z(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 E(e,n){return new LI({type:"literal",values:Array.isArray(e)?e:[e],...qe(n)})}const UI=te("ZodTransform",(e,n)=>{pD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Ez(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new jj(e.constructor.name);i.addIssue=h=>{if(typeof h=="string")i.issues.push(Bc(h,i.value,n));else{const f=h;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=i.value),f.inst??(f.inst=e),i.issues.push(Bc(f))}};const u=n.transform(i.value,i);return u instanceof Promise?u.then(h=>(i.value=h,i)):(i.value=u,i)}});function t2(e){return new UI({type:"transform",transform:e})}const n2=te("ZodOptional",(e,n)=>{Kj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Xj(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function vw(e){return new n2({type:"optional",innerType:e})}const VI=te("ZodExactOptional",(e,n)=>{hD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Xj(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function $I(e){return new VI({type:"optional",innerType:e})}const KI=te("ZodNullable",(e,n)=>{fD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Pz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function xw(e){return new KI({type:"nullable",innerType:e})}const GI=te("ZodDefault",(e,n)=>{gD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Mz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function HI(e,n){return new GI({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():_j(n)}})}const FI=te("ZodPrefault",(e,n)=>{yD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Bz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function QI(e,n){return new FI({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():_j(n)}})}const a2=te("ZodNonOptional",(e,n)=>{bD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>qz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function ZI(e,n){return new a2({type:"nonoptional",innerType:e,...qe(n)})}const YI=te("ZodCatch",(e,n)=>{vD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Lz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function XI(e,n){return new YI({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const JI=te("ZodPipe",(e,n)=>{xD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Uz(e,i,r,u),e.in=n.in,e.out=n.out});function vg(e,n){return new JI({type:"pipe",in:e,out:n})}const WI=te("ZodReadonly",(e,n)=>{wD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Vz(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function eO(e){return new WI({type:"readonly",innerType:e})}const tO=te("ZodLazy",(e,n)=>{SD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>$z(e,i,r,u),e.unwrap=()=>e._zod.def.getter()});function nO(e){return new tO({type:"lazy",getter:e})}const aO=te("ZodCustom",(e,n)=>{kD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Tz(e,i)});function iO(e,n={}){return gz(aO,e,n)}function sO(e){return yz(e)}function Ya(e,n){return vg(t2(e),n)}const fe={custom:"custom"};function Ha(e){return JD(k0,e)}const i2=d({id:s(),name:s(),keyPrefix:s(),scopes:y(s()),projectId:s().nullable(),projectName:s().nullable(),readOnly:N(),operator:N().optional(),createdAt:s(),lastUsedAt:s().nullable(),revokedAt:s().nullable()});d({keys:y(i2)});d({name:s().min(1).max(100),scopes:y(s()).min(1).optional(),projectId:s().optional()});i2.extend({key:s()});const j0=k(["used","not-used","unknown","not-applicable"]);j0.enum;const A0=k(["native-auto-v1","search-required-v1"]);A0.enum;const oO=d({maxConcurrency:m().int().positive(),maxRequestsPerMinute:m().int().positive(),maxRequestsPerDay:m().int().positive()}),xg=["gemini","openai","claude","perplexity","muse","local","cdp:chatgpt"],bt=s().min(1),Mo=Ke(s(),s().trim().min(1));s().min(1);const Jt=d({label:s().min(1),city:s().min(1),region:s().min(1),country:s().length(2),timezone:s().optional()}),N0=k(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync","doctor"]);N0.enum;const qm=d({everyDays:m().int().min(1).max(3650),startDate:s().date(),time:s().regex(/^([01]\d|2[0-3]):[0-5]\d$/,"Time must be HH:mm")}).strict();d({id:s(),projectId:s(),kind:N0,cronExpr:s(),recurrence:qm.nullable().optional(),preset:s().nullable().optional(),timezone:s().default("UTC"),enabled:N().default(!0),providers:y(bt).default([]),sourceId:s().nullable().optional(),lastRunAt:s().nullable().optional(),nextRunAt:s().nullable().optional(),createdAt:s(),updatedAt:s()});const rO=s().datetime();d({kind:N0.optional(),preset:s().min(1).optional(),cron:s().min(1).optional(),recurrence:qm.optional(),timezone:s().optional().default("UTC"),enabled:N().optional().default(!0),providers:y(bt).optional().default([]),sourceId:s().optional(),expectedUpdatedAt:rO.nullable().optional()}).refine(e=>[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1,{message:'Exactly one of "preset", "cron", or "recurrence" must be provided'});const Mm=k(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high","health.degraded","health.recovered","review.negative","review.rating-dropped"]);d({id:s(),projectId:s(),channel:E("webhook"),url:s().url(),urlDisplay:s(),urlHost:s(),events:y(Mm),enabled:N().default(!0),source:s().optional(),webhookSecret:s().optional(),createdAt:s(),updatedAt:s()});d({channel:E("webhook"),url:s().url(),events:y(Mm).min(1),source:s().optional()});class lO extends Error{code;statusCode;details;constructor(n,i,r,u){super(i),this.name="AppError",this.code=n,this.statusCode=r,this.details=u}toJSON(){return{error:{code:this.code,message:this.message,...this.details?{details:this.details}:{}}}}}function wg(e,n){return new lO("VALIDATION_ERROR",e,400,n)}function Li(e){if(e instanceof Error)return e.message;if(typeof e=="string")return e;if(e==null)return"unknown error";try{const n=JSON.stringify(e);if(n!==void 0)return n}catch{}try{return String(e)}catch{return"unknown error"}}const tl={metrics:["7d","30d","90d","all"],gaMeasurementAnalysis:["30d","60d","90d"],gaSearchLanding:["7d","28d","90d"],googleAdsMetrics:["7d","14d","30d"],trafficAnalytics:["7d","14d","30d","90d"],organicEvidence:["60d","90d"]};function cO(e){if(e==="all")return"all";const n=String(e);if(!/^[1-9]\d*d?$/.test(n))return null;const i=Number(n.replace(/d$/,""));return Number.isSafeInteger(i)?{days:i}:null}function uO(e){const n=cO(e);if(n===null)throw wg(`Invalid window "${e}".`);return n==="all"?null:n.days}function s2(e){return e.map(n=>uO(n))}const Xn={openai:"openai.com",chatgpt:"chatgpt.com",chatgptLegacy:"chat.openai.com",claude:"claude.ai",perplexity:"perplexity.ai",gemini:"gemini.google.com",bard:"bard.google.com",copilotMicrosoft:"copilot.microsoft.com",copilot:"copilot.com",deepseek:"deepseek.com",metaAi:"meta.ai",grok:"grok.com",you:"you.com",phind:"phind.com"},dO="anthropic.com",mO=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,pO=/[\0-\x1F\x7F-\x9F]/,hO=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,fO=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var gO=class{src_Any=mO.source;src_Cc=pO.source;src_Z=fO.source;src_P=hO.source;src_ZPCc=[this.src_Z,this.src_P,this.src_Cc].join("|");src_ZCc=[this.src_Z,this.src_Cc].join("|");cache={};opts={maxLength:1e4,urlAuth:!1,schema_names:[]};constructor(e={}){this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,n,i=4){const r=this.escapeRE(e),u=this.escapeRE(n),h=`(?:(?!${this.src_ZCc}|${r}|${u}).)`;let f=`${r}${h}{0,1000}${u}`;for(let b=2;b<=i;b++)f=`${r}(?:${h}|${f}){0,1000}${u}`;return f}get_text_separators(){return this.cache.text_separators??=/[><\uff5c]/}get_pseudo_letter(){return this.cache.src_pseudo_letter??=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`)}get_ipv4_addr(){return this.cache.src_ip4??=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])")}get_ipv6_addr(){const e="[0-9A-Fa-f]{1,4}",n=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return this.cache.src_ip6_addr??=new RegExp(`(?:(?:${e}:){6}${n}|::(?:${e}:){5}${n}|(?:${e})?::(?:${e}:){4}${n}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${n}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${n}|(?:(?:${e}:){0,3}${e})?::${e}:${n}|(?:(?:${e}:){0,4}${e})?::${n}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`)}get_ipv6_url_host(){return this.cache.src_ip6_host??=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`)}get_ipv6_mail_host(){return this.cache.src_ipv6_mail_host??=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`)}get_auth(){return this.cache.src_auth??=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`)}get_port(){return this.cache.src_port??=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?")}get_host_terminator(){return this.cache.src_host_terminator??=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`)}get_path_terminator(){return this.cache.src_path_terminator??=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`)}get_path(){return this.cache.src_path??=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`)}get_mail_name(){return this.cache.src_mail_name??=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}")}get_xn(){return this.cache.src_xn??=new RegExp("xn--[a-z0-9\\-]{1,59}")}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){return this.cache.src_domain_root??=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`)}get_domain(){return this.cache.src_domain??=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`)}get_url_host_port(){return this.cache.url_host_port??=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source)}get_fuzzy_url_host_port(){return this.cache.fuzzy_url_host_port??=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source)}get_mail_host(){return this.cache.src_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source)}get_fuzzy_mail_host(){return this.cache.src_fuzzy_mail_host??=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source)}get_path_extra(){return this.cache.src_path_extra??=new RegExp("")}get_fuzzy_mail_host_search(){return this.cache.mail_fuzzy_host_search??=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig")}get_fuzzy_link_search(){return this.cache.link_fuzzy_search??=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig")}get_http_validator(){return this.cache.http_validator??=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy")}get_relative_proto_validator(){return this.cache.relative_proto_validator??=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy")}get_mail_name_validator(){return this.cache.mail_name_validator??=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`)}get_mailto_validator(){return this.cache.mailto_validator??=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy")}get_schema_names(){return this.cache.schema_names??=new RegExp((this.opts.schema_names||[]).map(e=>this.escapeRE(e)).join("|"))}get_schema_search(){return this.cache.schema_search??=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig")}get_schema_at_start(){return this.cache.schema_at_start??=new RegExp(`^${this.get_schema_search().source}`,"i")}},Ef={validate:(e,n,i)=>{const r=i.re.get_http_validator();r.lastIndex=n;const u=r.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)},yO={"http:":Ef,"https:":Ef,"ftp:":Ef,"//":{validate:function(e,n,i){const r=i.re.get_relative_proto_validator();r.lastIndex=n;const u=r.exec(e);return u?n>=3&&e[n-3]===":"||n>=3&&e[n-3]==="/"?0:u[0].length:0},normalize:(e,n)=>n.normalize(e)},"mailto:":{validate:function(e,n,i){const r=i.re.get_mailto_validator();r.lastIndex=n;const u=r.exec(e);return u?u[0].length:0},normalize:(e,n)=>n.normalize(e)}},bO="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",vO="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function xO(){const e=vO.split("|");return bO.split("|").forEach(n=>{const i=n.indexOf(":"),r=n.slice(0,i);for(const u of n.slice(i+1))e.push(r+u)}),e}var wO={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:xO(),urlAuth:!1,maxLength:1e4},ww=class{schema;index;lastIndex;raw;text;url;constructor(e,n,i,r){const u=e.slice(i,r);this.schema=n.toLowerCase(),this.index=i,this.lastIndex=r,this.raw=u,this.text=u,this.url=u}},SO=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:n,...i}=e;this.__opts__={...wO,...i},this.__schemas__={...yO},this.re=n||new gO,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,n=null){if(!n)delete this.__schemas__[e];else{const i={normalize:(r,u)=>u.normalize(r),...n};this.__schemas__[e]=i}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let n,i;for(i=this.re.get_schema_search(),i.lastIndex=0;(n=i.exec(e))!==null;)if(this.testSchemaAt(e,n[2],i.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0,i.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const r=this.re.get_fuzzy_mail_host_search(),u=this.re.get_mail_name_validator();for(r.lastIndex=0;(n=r.exec(e))!==null;){const h=e.slice(Math.max(0,n.index-65),n.index);if(u.test(h))return!0}}return!1}testSchemaAt(e,n,i){return this.__schemas__[n.toLowerCase()]?this.__schemas__[n.toLowerCase()].validate(e.slice(0,i+this.__opts__.maxLength),i,this):0}match(e){const n=[],i=this.re.get_schema_search();let r,u,h,f,b,v,x=!1,S=!1,j=!1,C=0;if(!e.length)return null;for(i.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(r=this.re.get_fuzzy_link_search(),r.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(u=this.re.get_fuzzy_mail_host_search(),u.lastIndex=0,h=this.re.get_mail_name_validator());;){const T=Math.max(C-1,0);if(u&&h&&!j&&(!b||b.index<C))for(u.lastIndex<T&&(u.lastIndex=T);;){const M=u.exec(e);if(!M){j=!0,b=void 0;break}const L=h.exec(e.slice(Math.max(0,M.index-65),M.index));if(L){if(b={schema:"mailto:",index:M.index-L[1].length,lastIndex:M.index+M[0].length},b.index>=C)break;u.lastIndex<T&&(u.lastIndex=T)}}if(r&&!S&&(!f||f.index<C))for(r.lastIndex<T&&(r.lastIndex=T);;){const M=r.exec(e);if(!M){S=!0,f=void 0;break}if(f={schema:"",index:M.index+M[1].length,lastIndex:M.index+M[0].length},f.index>=C)break;r.lastIndex<T&&(r.lastIndex=T)}let z=b;(!z||f&&(f.index<z.index||f.index===z.index&&f.lastIndex>z.lastIndex))&&(z=f);let q;if(!x)for(;;){if(!v){i.lastIndex<T&&(i.lastIndex=T);const $=i.exec(e);if(!$){x=!0;break}v={schema:$[2],index:$.index+$[1].length,lastIndex:$.index+$[0].length}}if(v.index<C){v=void 0;continue}if(z&&v.index>z.index)break;const M=v;v=void 0;const L=this.testSchemaAt(e,M.schema,M.lastIndex);if(L){q={schema:M.schema,index:M.index,lastIndex:M.lastIndex+L};break}}let R=q;if((!R||b&&(b.index<R.index||b.index===R.index&&b.lastIndex>R.lastIndex))&&(R=b),(!R||f&&(f.index<R.index||f.index===R.index&&f.lastIndex>R.lastIndex))&&(R=f),!R)break;R===b?b=void 0:R===f&&(f=void 0);const P=new ww(e,R.schema,R.index,R.lastIndex);P.schema?this.__schemas__[P.schema].normalize(P,this):this.normalize(P),n.push(P),C=R.lastIndex}return n.length?n:null}matchAtStart(e){if(!e.length)return null;const n=this.re.get_schema_at_start().exec(e);if(!n)return null;const i=this.testSchemaAt(e,n[2],n[0].length);if(!i)return null;const r=new ww(e,n[2],n.index+n[1].length,n.index+n[0].length+i);return this.__schemas__[r.schema].normalize(r,this),r}tlds(e,n=!1){return e=Array.isArray(e)?e:[e],n?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const o2=JSON.parse('["aaa","aarp","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mv","mw","mx","my","mz","na","nab","nagoya","name","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shell","shia","shiksha","shoes","shop","shopping","shouji","show","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","vermögensberater","vermögensberatung","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volvo","vote","voting","voto","voyage","vu","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xihuan","xin","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw","ελ","ευ","бг","бел","дети","ею","католик","ком","мкд","мон","москва","онлайн","орг","рус","рф","сайт","срб","укр","қаз","հայ","ישראל","קום","ابوظبي","ارامكو","الاردن","البحرين","الجزائر","السعودية","العليان","المغرب","امارات","ایران","بارت","بازار","بيتك","بھارت","تونس","سودان","سورية","شبكة","عراق","عرب","عمان","فلسطين","قطر","كاثوليك","كوم","مصر","مليسيا","موريتانيا","موقع","همراه","پاکستان","ڀارت","कॉम","नेट","भारत","भारतम्","भारोत","संगठन","বাংলা","ভারত","ভাৰত","ਭਾਰਤ","ભારત","ଭାରତ","இந்தியா","இலங்கை","சிங்கப்பூர்","భారత్","ಭಾರತ","ഭാരതം","ලංකා","คอม","ไทย","ລາວ","გე","みんな","アマゾン","クラウド","グーグル","コム","ストア","セール","ファッション","ポイント","世界","中信","中国","中國","中文网","亚马逊","企业","佛山","信息","健康","八卦","公司","公益","台湾","台灣","商城","商店","商标","嘉里","嘉里大酒店","在线","大拿","天主教","娱乐","家電","广东","微博","慈善","我爱你","手机","招聘","政务","政府","新加坡","新闻","时尚","書籍","机构","淡马锡","游戏","澳門","点看","移动","组织机构","网址","网店","网站","网络","联通","谷歌","购物","通販","集团","電訊盈科","飞利浦","食品","餐厅","香格里拉","香港","닷넷","닷컴","삼성","한국"]');function kO(e,n){return e.endsWith(n)?e.length===n.length||e[e.length-n.length-1]===".":!1}function jO(e,n){const i=e.length-n.length-2,r=e.lastIndexOf(".",i);return r===-1?e:e.slice(r+1)}function AO(e,n,i){if(i.validHosts!==null){const u=i.validHosts;for(const h of u)if(kO(n,h))return h}let r=0;if(n.startsWith("."))for(;r<n.length&&n[r]===".";)r+=1;return e.length===n.length-r?null:jO(n,e)}function NO(e,n){return e.slice(0,-n.length-1)}const Rf=/[\t\n\r]/g;let Sg=!1;function Sw(e){return e>=97&&e<=122||e>=48&&e<=57||e>127||e>=65&&e<=90||e===45||e===95}function kw(e,n,i){const r=i-n,u=e.charCodeAt(n)|32;if(r===2)return u===119&&(e.charCodeAt(n+1)|32)===115?1:0;if(r===3){const h=e.charCodeAt(n+1)|32,f=e.charCodeAt(n+2)|32;return u===119&&h===115&&f===115||u===102&&h===116&&f===112?1:0}else if(r===4){const h=e.charCodeAt(n+1)|32,f=e.charCodeAt(n+2)|32,b=e.charCodeAt(n+3)|32;return u===104&&h===116&&f===116&&b===112?1:u===102&&h===105&&f===108&&b===101?2:0}else if(r===5)return u===104&&(e.charCodeAt(n+1)|32)===116&&(e.charCodeAt(n+2)|32)===116&&(e.charCodeAt(n+3)|32)===112&&(e.charCodeAt(n+4)|32)===115?1:0;return 0}function _c(e,n,i=!1){let r=0,u=e.length,h=!1,f=!1;if(Sg=!1,!n){if(e.startsWith("data:"))return null;for(;r<e.length&&e.charCodeAt(r)<=32;)r+=1;for(;u>r+1&&e.charCodeAt(u-1)<=32;)u-=1;if(e.charCodeAt(r)===47&&e.charCodeAt(r+1)===47)r+=2;else{const R=e.indexOf(":/",r);if(R!==-1){const P=kw(e,r,R);if(P===1)for(f=!0,r=R+2;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1;else if(P===2){f=!0,r=R+1;let M=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&M<2;)r+=1,M+=1;if(M<2)return null}else{for(let M=r;M<R;M+=1){const L=e.charCodeAt(M)|32;if(!(L>=97&&L<=122||L>=48&&L<=57||L===46||L===45||L===43)){const $=e.charCodeAt(M);return $===9||$===10||$===13?_c(e.replace(Rf,""),n,i):null}}if(e.charCodeAt(R+2)===47)r=R+3;else return null}}else if(e.charCodeAt(r)!==91){let P=-1;for(let M=r;M<u;M+=1){const L=e.charCodeAt(M);if(L===9||L===10||L===13)return _c(e.replace(Rf,""),n,i);if(L===58){P=M;break}if(L===47||L===92||L===63||L===35)break}if(P!==-1){let M=!1;for(let L=P+1;L<u;L+=1){const $=e.charCodeAt(L);if($===47||$===92||$===63||$===35)break;if($===64){M=!0;break}}if(!M){let L=!0,$=P+1;for(;$<u;$+=1){const Q=e.charCodeAt($);if(Q===47||Q===92||Q===63||Q===35)break;if(Q<48||Q>57){L=!1;break}}if($===P+1&&(L=!1),!L){const Q=kw(e,r,P);if(Q===0){let ae=!1;for(let V=P+1;V<u;V+=1){const Z=e.charCodeAt(V);if(Z===47||Z===92||Z===63||Z===35)break;if(Z===58){ae=!0;break}}if(!ae)return null}else if(f=!0,r=P+1,Q===2){let ae=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&ae<2;)r+=1,ae+=1;if(ae<2)return null}else for(;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1}}}}}let v=-1,x=-1,S=-1,j=-1,C=!1,T=i,z=r-1,q=-1;if(i&&r<u){const R=e.charCodeAt(r);(!(Sw(R)||R===46||R===95)||R===45)&&(T=!1)}for(let R=r;R<u;R+=1){const P=e.charCodeAt(R);if(P<64)if(P===47||P===35||P===63){u=R;break}else P===58?(j===-1&&(j=R),S=R):P===9||P===10||P===13?C=!0:i&&(P===46?((R-z>64||q===46||q===45)&&(T=!1),z=R):(P<48||P>57)&&(P!==45||q===46)&&(T=!1));else if(f&&P===92){u=R;break}else P===64?(v=R,j=-1):P===93?x=R:P>=65&&P<=90?h=!0:i&&!Sw(P)&&(T=!1);i&&(q=P)}if(C)return _c(e.replace(Rf,""),n,i);if(v!==-1&&v>=r&&v<u&&(r=v+1),e.charCodeAt(r)===91)return x!==-1?e.slice(r+1,x).toLowerCase():null;if(S!==-1&&S>r&&S<u&&j===S&&(u=S),r>=u)return null;i&&T&&v===-1&&S===-1&&x===-1&&e.charCodeAt(u-1)!==46&&u-r<=255&&u-z-1<=63&&q!==45&&(Sg=!0)}for(;u>r+1&&e.charCodeAt(u-1)===46;)u-=1;const b=r!==0||u!==e.length?e.slice(r,u):e;return h?b.toLowerCase():b}function CO(e){if(e.length<7||e.length>15)return!1;let n=0;for(let i=0;i<e.length;i+=1){const r=e.charCodeAt(i);if(r===46)n+=1;else if(r<48||r>57)return!1}return n===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function _O(e){if(e.length<3)return!1;let n=e.startsWith("[")?1:0,i=e.length;if(e[i-1]==="]"&&(i-=1),i-n>39)return!1;let r=!1;for(;n<i;n+=1){const u=e.charCodeAt(n);if(u===58)r=!0;else if(!(u>=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70))return!1}return r}function TO(e){return _O(e)||CO(e)}const EO=["test","localhost","invalid","example","example.com","example.net","example.org","local","onion","alt","home.arpa","ipv4only.arpa","resolver.arpa","service.arpa","6tisch.arpa","eap.arpa"];function RO(e){for(const n of EO)if(e.endsWith(n)&&(e.length===n.length||e.charCodeAt(e.length-n.length-1)===46))return!0;return!1}function jw(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function Aw(e){if(e.length>255||e.length===0||!jw(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let n=-1,i=-1;const r=e.length;for(let u=0;u<r;u+=1){const h=e.charCodeAt(u);if(h===46){if(u-n>64||i===46||i===45)return!1;n=u}else if(!(jw(h)||h===45||h===95)||h===45&&i===46)return!1;i=h}return r-n-1<=63&&i!==45}function r2({allowIcannDomains:e=!0,allowPrivateDomains:n=!1,detectIp:i=!0,detectSpecialUse:r=!1,extractHostname:u=!0,mixedInputs:h=!0,validHosts:f=null,validateHostname:b=!0}){return{allowIcannDomains:e,allowPrivateDomains:n,detectIp:i,detectSpecialUse:r,extractHostname:u,mixedInputs:h,validHosts:f,validateHostname:b}}const DO=r2({});function zO(e){return e===void 0?DO:r2(e)}function IO(e,n){return n.length===e.length?"":e.slice(0,-n.length-1)}function OO(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function C0(e){e.domain=null,e.domainWithoutSuffix=null,e.hostname=null,e.isIcann=null,e.isIp=null,e.isPrivate=null,e.isSpecialUse=null,e.publicSuffix=null,e.subdomain=null}function _0(e,n,i,r,u){const h=zO(r);if(typeof e!="string")return u;let f=!1;return h.extractHostname?h.mixedInputs?(f=Aw(e),u.hostname=_c(e,f,h.validateHostname)):u.hostname=_c(e,!1,h.validateHostname):u.hostname=e,h.detectIp&&u.hostname!==null&&(u.isIp=TO(u.hostname),u.isIp)?u:h.validateHostname&&h.extractHostname&&u.hostname!==null&&!(f&&u.hostname===e)&&!Sg&&!Aw(u.hostname)?(u.hostname=null,u):(n===0||u.hostname===null||(n===5&&h.detectSpecialUse&&(u.isSpecialUse=RO(u.hostname)),i(u.hostname,h,u),n===2||u.publicSuffix===null)||(u.domain=AO(u.publicSuffix,u.hostname,h),n===3||u.domain===null)||(u.subdomain=IO(u.hostname,u.domain),n===4)||(u.domainWithoutSuffix=NO(u.domain,u.publicSuffix)),u)}function PO(e,n,i){if(!n.allowPrivateDomains&&e.length>3){const r=e.length-1,u=e.charCodeAt(r),h=e.charCodeAt(r-1),f=e.charCodeAt(r-2),b=e.charCodeAt(r-3);if(u===109&&h===111&&f===99&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="com",!0;if(u===103&&h===114&&f===111&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="org",!0;if(u===117&&h===100&&f===101&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="edu",!0;if(u===118&&h===111&&f===103&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="gov",!0;if(u===116&&h===101&&f===110&&b===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="net",!0;if(u===101&&h===100&&f===46)return i.isIcann=!0,i.isPrivate=!1,i.publicSuffix="de",!0}return!1}const Ao=new Uint8Array([1,2,1,1,1,1,1,1,1,1,1,1,0,2,2,2,0,2,2,0,2,0,0,1,0,0,2,1,1,1,1,1,1,0,0,0,1,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,1,1,0,2,0,0,0,0,0,0,0,2,0,2,2,0,0,2,2,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,2,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,2,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,2,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,2,2,0,0,0,2,0,1,1,0,2,0,2,2,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,2,2,0,2,2,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,2,0,2,2,2,2,0,0,0,0,2,0,0,0,0,0,0,2,2,0,0,0,2,2,1,1,1,1,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,2,1,2,1,1,1,2,1,1,1,1,1,0,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0]),om=new Uint16Array([0,0,0,10,11,18,106,111,117,124,130,136,145,146,147,148,149,150,151,153,154,155,157,159,226,239,241,242,243,258,265,266,269,270,271,274,276,295,296,298,307,312,313,331,332,335,337,338,340,374,375,377,380,381,385,387,391,394,426,429,442,443,451,452,454,464,478,479,480,489,490,527,532,548,568,574,615,616,643,670,671,819,825,828,829,830,835,840,849,871,872,873,874,875,876,877,895,897,898,901,903,904,906,908,923,938,943,944,946,947,948,949,950,952,955,960,961,962,964,965,968,971,972,973,986,988,1e3,1011,1019,1021,1061,1064,1068,1069,1071,1074,1085,1087,1097,1099,1105,1107,1108,1110,1113,1114,1115,1167,1169,1171,1191,1192,1193,1194,1196,1207,1238,1249,1261,1270,1277,1282,1295,1306,1319,1320,1331,1365,1366,1367,1382,1397,1469,1470,1472,1473,1507,1508,1509,1512,1516,1518,1547,1548,1556,1557,1558,1560,1562,1563,1565,1566,1567,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1594,1595,1596,1598,2053,2056,2057,2059,2066,2073,2083,2087,2098,2099,2100,2112,2113,2115,2117,2118,2125,2126,2128,2129,2131,2132,2133,2134,2135,2209,2211,2232,2233,2234,2236,2262,2263,2314,2315,2317,2324,2330,2340,2350,2403,2404,2405,2415,2429,2430,2433,2440,2441,2449,2450,2451,2452,2453,2464,2465,2466,2468,2469,2470,2471,2473,2483,2495,2501,2533,2537,2539,2540,2542,2543,2554,2555,2557,2565,2572,2578,2583,2584,2590,2593,2599,2606,2607,2614,2622,2623,2624,2662,2668,2683,2684,2689,2707,2738,2756,2758,2761,2769,2771,2778,2830,2854,2855,2856,2857,2858,2859,2860,2861,2868,2869,2870,2871,2872,2873,2875,2876,2880,2964,2977,2978,3414,3418,3432,3484,3512,3534,3592,3614,3629,3692,3743,3781,3817,3842,3984,4030,4081,4100,4134,4149,4169,4199,4230,4253,4284,4314,4346,4373,4448,4470,4508,4518,4552,4571,4597,4639,4689,4715,4784,4785,4787,4810,4833,4869,4900,4917,4974,4987,5011,5040,5042,5076,5092,5120,5425,5434,5443,5450,5467,5471,5477,5516,5518,5525,5532,5541,5548,5549,5560,5563,5578,5579,5588,5589,5598,5607,5613,5615,5616,5617,5653,5654,5656,5664,5671,5684,5688,5690,5691,5697,5704,5718,5728,5733,5741,5749,5755,5756,5760,5762,5763,5775,5776,5777,5778,5780,5781,5784,5786,5789,5793,5794,5800,5801,5802,5804,5806,5808,5809,5810,5813,5815,5818,5819,5821,6019,6026,6027,6037,6042,6059,6073,6082,6083,6084,6088,6089,6091,6093,6099,6100,6103,6104,6106,6107,6108,7008,7009,7013,7031,7040,7043,7050,7051,7053,7054,7055,7057,7109,7110,7113,7114,7231,7232,7243,7254,7261,7264,7273,7274,7275,7290,7345,7536,7538,7539,7541,7546,7559,7574,7581,7590,7593,7596,7603,7611,7615,7616,7617,7631,7635,7644,7645,7646,7650,7685,7686,7703,7710,7718,7719,7724,7732,7776,7777,7783,7786,7797,7802,7803,7806,7839,7840,7846,7853,7854,7863,7872,7887,7891,7943,7944,7949,7951,7954,7956,7957,7958,7967,7981,7989,8003,8015,8016,8018,8020,8042,8053,8059,8060,8072,8084,8171,8183,8185,8194,8197,8203,8228,8231,8232,8233,8235,8238,8241,8252,8254,8256,8284,8358,8365,8369,8370,8379,8401,8402,8407,8408,8487,8489,8491,8500,8504,8510,8516,8522,8532,8537,8538,8556,8567,8572,8577,8587,8593,8597,8603,8609,10217,10218,10219,10226,10228]),rm=new Uint8Array([3,3,3,3,3,3,3,3,5,8,8,2,2,3,3,3,3,3,8,5,5,5,5,5,3,3,5,5,9,12,19,8,19,8,11,9,9,8,7,7,6,8,9,16,10,7,7,11,8,6,6,9,7,11,7,14,4,4,4,4,4,4,10,7,6,6,6,6,10,10,6,10,10,22,11,9,10,10,10,9,10,8,7,7,7,8,21,13,11,11,9,10,9,13,10,8,8,9,12,9,7,10,7,7,13,7,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,8,6,3,3,3,3,3,3,2,5,3,3,3,7,2,2,2,2,2,2,3,3,3,1,1,7,8,5,2,2,7,2,2,1,4,1,11,9,9,5,5,8,5,5,5,5,5,5,5,3,3,3,3,3,5,11,9,9,13,7,14,7,6,6,6,7,6,6,6,6,6,10,7,11,9,4,4,4,4,4,4,6,6,6,6,6,8,7,10,9,9,9,8,9,8,10,6,9,9,8,10,10,7,8,1,9,10,12,12,12,10,9,9,10,10,9,9,1,1,5,3,3,3,3,3,3,3,3,3,3,3,3,6,6,6,4,3,3,3,7,4,4,4,3,3,6,7,3,4,1,2,2,2,6,1,2,2,2,2,2,12,5,3,8,9,13,4,4,13,9,9,11,7,3,12,9,2,2,2,3,3,3,3,3,8,2,2,3,3,3,3,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,4,4,3,7,10,15,7,15,15,20,15,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,7,8,6,8,8,6,8,13,8,8,6,13,8,11,13,8,6,13,8,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,9,9,9,10,14,14,11,13,13,9,9,9,9,9,9,2,6,9,2,2,3,3,3,3,3,3,3,3,3,4,4,4,2,3,3,3,3,3,3,7,7,2,3,2,2,5,3,3,3,3,3,3,4,2,2,2,2,2,2,3,3,3,3,3,3,3,4,5,7,2,2,12,8,10,8,10,7,18,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,2,2,3,3,3,5,5,3,8,8,6,8,6,6,4,6,7,7,7,10,11,2,5,5,3,3,3,3,3,3,5,5,6,11,10,7,7,7,4,4,4,2,3,3,3,3,3,2,7,5,5,3,3,3,3,3,3,3,3,7,7,7,11,7,6,9,6,6,8,10,8,6,8,13,4,4,4,4,4,10,8,11,8,8,8,10,10,7,10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,10,13,7,8,7,11,8,8,6,9,8,8,6,6,6,8,8,6,6,6,6,6,9,7,6,4,4,4,4,4,4,4,6,6,6,9,7,8,10,8,8,2,3,3,3,3,3,2,8,9,9,2,2,2,3,3,3,2,3,3,3,9,2,2,3,3,3,3,3,3,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,12,5,5,3,5,4,2,3,2,4,3,9,2,2,2,2,2,5,5,3,8,8,13,6,10,9,4,7,9,11,2,3,7,3,3,4,1,3,4,2,9,3,3,12,5,3,7,10,10,7,4,4,6,14,7,9,7,13,2,2,2,2,2,2,3,3,3,3,3,8,15,4,4,2,3,3,3,7,4,9,9,2,3,3,3,5,3,2,2,7,2,7,6,6,7,2,4,2,2,2,2,2,2,8,8,8,9,5,2,3,3,3,3,3,3,10,7,4,4,4,4,3,4,2,3,3,3,3,3,10,7,4,4,4,4,2,3,3,3,3,10,7,4,4,4,4,3,9,6,6,6,9,13,9,2,2,2,8,7,9,5,3,3,3,5,5,12,9,10,7,8,7,6,8,6,11,12,7,9,10,4,4,7,8,11,6,7,9,8,7,10,8,9,15,7,8,5,4,7,2,3,3,3,2,14,10,2,14,10,2,14,3,9,13,13,10,14,16,17,11,2,14,2,14,3,9,13,10,14,16,17,11,14,10,14,2,7,3,10,7,14,10,2,14,10,9,9,17,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,10,10,10,12,9,4,10,11,8,8,8,7,9,5,3,3,3,3,3,3,3,3,5,8,4,4,4,4,4,4,6,16,3,3,14,3,14,2,14,9,13,10,10,14,16,17,11,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,9,9,9,9,9,9,2,14,9,13,10,10,14,16,17,11,6,2,14,9,17,13,10,10,14,16,17,11,6,2,14,9,13,10,14,16,17,11,2,14,9,13,10,16,11,2,14,10,19,7,2,14,9,13,10,19,10,7,14,16,17,11,6,2,14,9,13,10,19,7,14,16,17,11,2,14,9,13,17,13,10,10,14,16,17,11,6,3,2,14,9,13,10,10,14,16,17,11,6,9,10,12,14,14,14,12,12,12,12,12,14,14,14,10,10,10,14,9,9,9,9,14,14,14,13,13,14,9,9,9,9,9,9,4,11,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,14,9,13,17,13,10,19,10,7,14,16,17,11,6,2,9,10,10,7,17,3,3,12,12,16,15,15,12,14,14,14,20,20,13,12,12,12,12,12,12,20,25,14,14,12,12,10,10,10,10,9,9,9,25,4,9,17,10,7,14,16,21,13,13,14,20,14,13,17,24,9,12,13,25,13,21,20,17,9,9,9,9,9,9,12,17,4,4,9,9,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,9,1,8,7,11,11,1,3,3,3,4,8,9,10,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,9,9,9,9,9,7,4,4,4,4,4,4,4,4,4,4,9,12,6,14,4,12,7,2,2,1,2,7,6,4,4,4,6,8,8,7,4,5,6,3,3,3,3,4,16,8,3,5,4,3,3,3,5,2,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,12,7,7,13,9,10,12,8,9,7,8,5,12,10,13,14,5,5,5,13,5,5,5,3,3,3,5,16,5,5,5,5,5,7,12,14,8,12,8,10,12,9,11,7,9,7,10,7,13,9,7,12,8,17,7,7,16,10,13,13,8,10,10,14,17,7,16,16,15,8,10,10,12,17,7,17,14,7,10,17,8,7,7,7,8,15,15,7,14,10,10,10,11,11,7,7,13,8,10,7,16,7,8,7,14,17,12,10,11,21,8,9,7,13,9,8,13,6,12,7,6,13,10,10,10,8,18,9,17,13,10,12,6,13,6,11,8,13,10,13,18,13,11,13,8,16,7,10,8,16,12,10,8,8,6,14,11,8,15,8,8,7,7,12,7,8,9,14,15,8,9,10,9,15,7,8,8,12,13,9,10,15,15,13,7,10,10,20,7,6,9,6,6,14,11,14,11,12,9,10,16,16,12,7,11,28,8,11,10,7,21,8,7,9,4,4,4,17,7,8,6,9,6,6,13,6,6,6,6,18,20,14,8,11,12,9,10,13,15,19,8,9,12,7,10,16,12,9,9,9,14,12,11,9,12,11,18,9,9,9,10,7,7,16,8,9,7,13,12,10,18,7,8,11,7,7,8,8,13,7,7,7,11,15,13,11,7,8,15,11,7,8,18,14,13,18,15,10,12,12,9,7,11,11,8,7,10,8,14,12,10,18,7,10,9,7,8,13,10,14,9,10,8,8,23,7,7,11,12,12,17,7,7,11,11,17,16,16,7,8,11,14,14,8,10,7,7,16,16,13,9,11,9,15,15,11,11,7,7,14,7,9,7,7,16,10,13,10,11,14,7,11,10,11,7,11,10,11,15,11,15,10,12,17,10,14,13,11,11,12,13,10,7,13,10,16,12,21,9,10,10,7,11,14,17,7,7,8,11,12,8,15,14,14,8,17,12,10,10,7,9,11,7,10,7,11,18,7,11,7,12,11,8,8,14,12,7,8,15,3,7,7,5,2,9,2,2,2,2,2,2,2,3,3,3,3,3,3,3,2,5,3,3,3,3,3,3,4,4,3,3,3,3,3,3,5,11,6,4,7,10,7,7,11,1,10,2,2,3,3,3,3,3,3,3,3,5,7,3,5,6,3,3,5,2,2,5,3,4,13,11,3,3,6,3,5,14,2,2,3,8,2,2,12,5,18,5,3,3,3,16,5,5,5,10,7,13,12,13,9,12,14,19,9,9,21,9,9,10,6,9,6,15,10,6,12,8,6,10,15,4,4,6,6,9,9,12,16,14,23,7,7,7,14,9,7,7,11,14,10,7,10,10,10,12,6,11,10,13,11,15,11,7,12,10,3,7,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4,3,7,2,5,5,3,3,5,5,5,5,7,6,6,6,4,4,4,4,4,4,6,6,6,6,6,7,10,2,2,2,5,5,5,5,3,3,3,3,3,5,5,10,9,11,8,7,12,8,9,7,6,13,11,6,13,7,9,9,4,4,4,4,4,4,6,10,7,8,13,8,8,9,14,8,10,7,7,7,9,6,9,7,2,12,5,3,3,13,4,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,4,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,4,4,4,4,4,4,4,4,4,9,3,3,3,3,3,3,3,3,3,3,4,2,2,2,5,3,3,3,3,3,3,3,3,4,4,1,7,6,4,12,3,3,3,3,3,8,7,3,3,3,3,3,3,4,4,11,14,2,8,3,5,5,8,10,8,6,4,7,17,7,4,5,2,6,3,5,2,4,4,2,12,5,5,3,15,13,10,8,11,2,2,3,3,3,3,3,3,3,3,4,4,5,3,3,3,3,4,18,2,12,5,3,3,3,3,3,5,16,8,8,9,6,6,4,4,4,4,31,6,6,10,11,21,10,9,7,10,7,7,2,4,4,4,4,6,5,3,3,4,3,3,3,3,3,3,3,3,3,6,6,6,2,2,2,5,3,3,3,7,7,4,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,8,2,3,3,3,3,3,5,9,11,3,3,3,3,4,4,3,3,3,3,3,5,10,9,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,11,10,10,10,10,10,11,10,11,10,11,10,9,9,11,3,3,3,3,3,3,5,3,7,8,8,7,6,6,11,4,4,4,7,8,9,9,2,3,7,4,4,2,5,5,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,2,2,5,5,5,5,5,3,3,5,5,5,7,7,6,6,6,4,4,4,4,4,4,4,4,4,4,6,6,8,8,1,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,6,9,12,3,7,10,7,2,2,3,3,3,3,3,4,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,6,6,8,6,7,4,4,4,4,4,4,6,7,5,5,20,19,8,10,9,7,10,6,8,11,6,6,6,6,13,12,8,6,7,14,11,9,2,5,3,3,6,2,3,2,2,2,2,2,2,2,5,4,3,7,6,4,7,4,3,6,4,7,2,7,7,7,5,5,5,5,3,3,3,3,3,3,3,3,3,3,5,9,10,10,8,11,7,8,20,7,8,9,8,12,6,6,6,8,9,8,12,6,6,8,13,10,12,6,6,7,7,8,9,6,4,4,4,4,4,4,4,10,6,6,6,7,14,11,10,7,8,10,8,11,14,11,11,9,7,9,8,11,9,17,10,9,2,2,2,9,3,3,3,3,15,14,9,5,5,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,15,12,22,19,17,18,18,19,21,7,16,16,5,5,5,5,5,5,5,5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5,9,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,7,16,11,11,7,7,7,7,17,7,8,12,15,9,19,7,19,8,16,21,11,12,19,14,22,7,7,7,7,7,7,7,7,7,7,7,16,16,19,24,12,7,14,7,12,7,8,10,10,13,7,12,12,7,7,10,18,15,12,16,7,14,12,17,10,16,17,12,17,25,7,7,7,13,6,9,6,9,18,6,6,11,20,10,6,6,6,6,6,6,6,17,6,6,6,15,6,6,6,6,6,8,14,11,12,15,13,19,17,21,7,18,8,13,13,8,12,8,6,6,13,6,15,15,16,6,6,16,6,6,6,14,6,18,6,6,6,17,18,9,13,15,8,19,8,15,15,18,14,16,4,4,4,4,4,4,4,4,4,4,4,4,6,11,10,11,6,21,23,12,17,12,11,14,13,22,15,15,11,12,14,12,7,12,8,14,12,18,10,8,16,19,17,12,14,15,8,9,19,17,12,13,13,15,18,13,23,24,23,21,17,24,8,21,8,14,14,16,14,8,8,15,20,8,19,21,9,8,13,12,13,15,11,8,11,9,9,8,11,8,21,14,21,15,15,13,7,19,7,7,7,7,7,7,16,12,17,18,7,7,11,11,7,9,9,2,2,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,4,5,5,5,5,5,5,5,5,3,3,10,10,7,9,7,7,7,6,8,6,6,6,6,6,6,6,7,6,8,6,6,9,7,7,7,4,4,4,4,4,4,4,4,8,9,8,7,8,7,8,10,7,5,5,5,5,5,5,3,9,7,7,8,6,6,6,6,6,6,6,6,9,6,6,9,11,13,7,8,9,9,5,5,5,7,8,6,6,6,6,6,6,6,7,8,9,7,10,9,10,7,8,5,5,5,5,5,5,7,7,9,8,7,7,6,6,6,6,6,6,10,6,6,6,6,6,6,6,6,6,6,6,9,10,4,4,4,4,8,7,7,10,10,9,8,8,15,9,8,8,8,8,8,9,10,9,10,7,8,13,5,5,5,5,5,3,3,7,7,8,6,6,6,4,4,11,9,7,8,9,10,7,5,5,5,5,5,3,3,7,6,6,13,7,9,8,7,5,5,5,5,5,5,5,5,3,3,3,3,7,8,7,8,13,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,6,6,6,6,7,6,7,6,6,9,7,4,4,4,4,4,4,4,7,8,7,8,9,8,8,8,7,10,7,8,5,5,5,5,5,5,5,5,3,7,7,7,7,9,7,10,9,6,6,6,6,6,8,8,6,6,6,7,6,6,6,9,9,4,4,13,7,10,9,9,12,7,8,8,10,8,8,8,8,8,8,5,5,5,5,3,7,7,11,7,9,8,8,6,6,10,6,8,8,8,6,7,6,6,12,4,4,4,4,4,4,4,4,4,9,8,8,16,8,9,8,7,5,5,5,5,5,3,3,7,7,7,10,15,8,9,8,9,9,6,6,6,6,6,6,7,4,8,7,8,8,7,8,11,8,5,5,5,5,5,3,7,7,6,11,16,7,6,4,4,4,4,9,9,8,8,8,13,12,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,7,8,8,9,13,7,7,7,9,8,8,9,12,7,12,7,12,8,7,10,12,9,9,6,6,8,8,6,6,6,6,6,6,6,9,8,9,11,8,6,6,6,6,6,12,7,6,6,6,9,7,7,6,6,6,6,6,11,9,6,6,6,6,6,7,9,4,4,4,4,4,4,4,4,9,9,9,9,7,7,7,7,7,11,7,7,8,8,8,8,8,8,9,8,9,9,7,7,11,11,7,12,8,8,8,8,8,7,8,8,8,8,8,13,12,8,8,8,8,7,7,7,9,5,5,5,5,5,5,5,3,3,7,7,11,7,8,8,8,6,6,6,6,6,6,6,6,6,6,6,10,11,6,7,9,4,4,4,4,4,4,9,9,8,9,8,8,8,7,7,5,5,5,5,5,5,5,5,5,5,3,3,11,7,7,7,9,6,6,11,8,10,6,6,6,12,8,8,7,6,6,8,7,4,4,4,4,4,4,4,4,9,10,9,9,8,10,9,11,8,5,5,5,7,6,6,8,7,4,4,4,4,8,7,7,8,7,8,8,5,5,5,5,7,7,8,8,8,6,6,6,6,6,10,8,9,13,6,7,6,6,8,7,8,4,4,4,4,11,8,8,8,10,5,5,8,7,8,13,8,7,6,8,6,9,7,8,7,5,5,5,5,5,5,3,3,7,8,9,6,4,8,10,10,8,12,9,13,2,7,5,5,5,5,5,7,7,10,6,6,6,6,6,6,6,8,4,4,9,8,8,8,14,8,8,8,9,8,5,5,5,5,5,3,3,9,6,6,6,6,10,12,6,6,6,6,6,6,6,4,4,4,4,11,8,7,8,8,8,5,5,3,3,3,3,7,7,6,8,6,8,11,7,6,6,6,7,4,8,11,9,10,5,5,5,3,3,3,7,7,8,9,8,15,9,6,6,6,6,6,6,11,11,4,4,4,4,4,7,9,9,10,8,7,5,5,5,5,5,5,3,3,8,6,6,6,6,6,6,6,6,6,9,7,4,4,4,4,4,9,9,8,8,10,13,5,5,5,3,17,7,7,7,7,7,8,6,8,13,6,6,6,6,6,6,6,6,4,4,4,9,10,8,8,8,5,5,5,5,3,7,7,7,8,8,6,6,6,8,8,8,9,10,8,4,8,10,9,8,8,8,9,13,10,5,5,5,5,5,5,5,5,5,5,3,3,7,8,9,9,7,7,7,10,9,9,8,9,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,8,12,6,6,6,6,6,6,6,6,6,12,4,4,4,4,4,4,4,4,4,4,4,11,8,8,9,9,10,8,9,7,7,5,5,5,5,5,5,3,7,8,7,6,6,8,6,6,10,4,7,8,9,12,8,7,7,5,5,5,5,5,5,3,3,7,14,7,9,8,8,6,6,8,12,12,6,6,7,7,10,4,4,4,4,4,9,9,14,9,13,8,7,5,5,5,6,6,6,7,4,8,7,5,5,5,5,5,5,5,5,3,3,7,7,7,8,6,6,6,6,6,6,12,6,6,6,6,4,4,9,9,8,8,11,7,7,7,5,5,5,3,9,8,6,6,7,4,4,4,4,4,4,8,8,11,5,5,5,7,7,7,9,6,6,6,6,6,6,9,8,4,4,4,4,7,12,9,8,8,8,7,10,10,5,5,5,5,5,5,5,3,11,14,8,7,8,8,6,6,6,6,6,8,7,6,6,6,7,6,8,9,4,4,4,7,8,9,7,9,7,7,9,8,5,5,5,5,5,5,5,5,5,11,3,9,7,7,12,14,8,6,6,12,11,8,6,6,6,6,6,6,6,6,6,15,7,4,4,4,16,9,9,9,8,9,9,9,9,9,8,8,8,13,11,8,5,5,5,5,3,7,6,6,8,8,8,6,6,7,10,7,4,4,4,4,9,7,8,7,7,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,7,7,7,9,6,6,6,6,6,8,8,7,7,9,6,6,6,7,6,6,6,6,6,15,4,4,4,4,4,8,8,7,8,12,9,8,8,8,8,8,9,8,8,10,8,8,8,8,16,9,10,2,5,5,5,5,5,5,5,9,7,6,8,9,4,4,4,4,4,7,8,8,8,9,8,11,10,5,5,5,5,3,7,8,6,6,6,6,6,8,6,6,6,6,4,12,10,12,7,7,7,7,7,7,7,5,5,5,5,3,3,7,7,10,8,9,7,6,10,7,6,6,4,4,8,9,7,9,9,9,9,8,8,8,8,10,5,5,5,5,5,5,8,7,6,6,6,10,6,7,10,7,4,4,4,4,4,4,4,12,9,10,7,7,10,8,10,5,12,9,6,6,6,6,6,7,6,4,4,4,10,9,9,8,7,7,5,5,5,5,5,5,3,3,13,7,7,9,7,7,7,8,9,9,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,15,15,4,4,4,4,4,10,10,9,8,9,8,8,9,7,8,7,8,5,5,7,6,6,6,4,4,4,7,8,11,8,5,5,5,5,5,5,5,7,6,6,6,6,6,6,9,11,10,7,4,4,4,9,8,8,5,5,5,5,5,9,9,6,6,6,6,6,6,6,9,9,4,4,4,4,8,8,8,9,9,8,8,8,13,2,4,2,7,5,5,5,5,5,5,9,9,6,6,6,6,10,8,8,8,6,6,6,4,4,9,8,10,8,9,8,8,8,9,8,8,5,3,3,3,11,6,6,6,7,6,6,6,4,4,9,8,5,5,5,5,5,3,11,8,6,6,6,6,6,9,7,4,4,14,10,9,8,12,8,8,8,11,15,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,11,11,10,10,7,7,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,3,3,3,7,11,7,7,11,11,7,8,9,10,7,7,9,9,9,9,7,7,10,8,13,8,8,8,8,11,10,6,6,8,10,11,14,14,6,6,6,6,6,6,9,11,7,7,6,8,12,11,11,6,6,10,6,6,6,6,6,10,7,7,6,6,11,6,6,6,11,8,9,7,6,10,11,9,10,11,7,11,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,6,6,8,9,10,9,6,6,6,10,6,6,6,6,11,10,11,10,9,8,7,7,7,7,11,14,8,10,9,9,8,8,7,11,8,8,8,11,11,10,10,9,10,8,11,10,8,11,9,12,8,10,8,11,8,9,9,11,11,10,11,13,8,7,8,8,9,7,8,8,8,8,7,8,2,2,2,2,2,2,2,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,8,6,4,4,4,11,7,11,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,3,3,3,3,8,7,7,8,8,4,8,7,7,7,9,7,8,9,8,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,4,5,5,3,8,8,6,9,4,4,10,7,3,3,3,2,5,3,3,3,3,3,3,3,3,3,3,3,3,4,3,2,2,2,3,3,3,3,3,4,10,2,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,2,2,3,3,3,5,2,4,2,6,2,2,9,5,5,3,3,3,3,3,3,3,5,5,5,9,8,7,6,6,11,4,4,4,4,4,4,4,4,6,6,7,7,11,8,8,6,5,11,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,6,4,4,4,4,3,3,3,3,5,7,2,3,3,3,3,3,8,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,6,4,4,4,4,2,2,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,2,3,3,3,3,3,6,3,3,8,10,3,4,4,1,1,1,1,1,1,1,8,9,10,7,7,1,1,3,8,7,7,8,8,8,1,6,1,1,6,3,3,4,7,3,5,5,4,4,4,4,4,2,7,7,8,12,3,4,5,1,3,4,4,10,4,3,3,3,8,7,7,2,2,2,2,2,2,2,2,2,12,9,20,7,5,5,5,9,13,5,5,5,5,5,3,3,3,16,5,5,5,13,7,8,8,11,8,7,9,7,11,12,9,9,8,8,11,10,14,7,12,10,11,13,7,9,11,17,17,14,13,7,8,7,10,10,7,16,13,7,8,17,12,9,8,6,7,10,6,6,12,6,8,10,8,8,8,6,8,6,14,6,6,6,13,6,10,6,6,7,14,8,6,6,10,11,10,9,9,7,7,6,6,6,9,9,7,9,10,9,13,12,4,4,4,4,4,4,4,4,4,6,6,6,8,8,6,8,9,10,9,7,10,10,8,7,8,7,10,12,9,8,15,8,7,8,8,7,7,15,13,7,10,9,14,18,16,7,24,7,8,10,11,16,8,14,7,9,9,9,11,13,19,14,15,14,11,7,13,9,10,7,13,9,10,11,12,8,9,2,3,5,8,7,4,4,10,5,3,3,3,3,3,5,4,4,4,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,4,2,12,5,3,8,10,15,6,7,2,3,2,5,5,12,2,5,5,5,5,2,2,5,5,12,9,5,2,2,9,5,5,12,12,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,12,5,8,8,9,5,5,5,8,19,7,16,15,14,9,9,9,9,7,11,11,11,7,14,10,10,5,5,5,5,5,5,5,5,5,15,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,15,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,12,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,12,9,9,12,12,12,15,7,11,7,14,11,18,13,8,18,15,18,12,14,12,8,8,8,8,9,9,9,12,7,10,10,8,8,12,12,12,7,12,12,9,7,7,7,7,7,8,15,12,9,10,10,7,10,10,13,11,10,9,22,11,9,8,8,8,8,8,13,18,13,9,15,19,9,7,7,10,7,7,7,11,8,13,17,7,7,10,10,10,7,20,16,7,7,7,7,7,7,11,21,12,12,13,11,14,16,8,8,13,11,7,7,13,7,7,14,15,15,6,6,6,6,6,6,6,6,6,6,13,10,18,6,6,6,6,6,6,6,6,6,11,8,8,12,12,11,11,8,12,9,9,9,13,13,9,9,9,9,9,9,6,10,12,6,6,6,6,17,11,7,7,7,7,14,14,12,6,7,7,6,6,15,10,13,10,6,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,9,15,13,6,12,12,6,19,11,10,7,7,16,8,19,17,9,9,9,9,9,6,6,6,10,8,16,8,6,6,9,6,6,6,6,6,6,6,6,8,8,8,6,7,6,6,6,6,6,6,6,6,6,6,6,14,6,6,6,6,20,6,9,6,14,9,9,9,6,9,8,8,12,9,8,8,8,8,7,8,12,7,8,8,8,6,8,6,6,6,6,6,6,6,9,8,8,6,6,13,9,12,13,12,14,13,12,11,11,6,8,8,8,6,13,12,11,11,12,6,11,12,11,13,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,6,6,6,6,6,6,6,13,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,8,6,18,6,12,13,13,13,9,10,15,9,12,6,6,6,6,6,6,6,6,9,15,10,9,10,13,9,19,8,18,17,10,10,8,8,6,6,6,6,6,6,10,14,8,16,16,9,8,15,8,8,10,12,14,7,7,8,8,7,7,7,7,8,13,13,11,9,9,9,12,10,17,8,11,9,7,7,14,8,14,14,7,7,7,7,7,7,14,7,7,7,7,7,10,10,8,14,7,7,7,7,8,8,8,8,8,17,9,7,15,7,8,12,7,9,14,7,7,7,9,13,8,14,7,16,18,13,15,14,12,13,10,15,9,7,7,7,10,13,15,15,9,9,9,9,19,11,7,11,11,13,8,8,8,8,7,12,19,17,9,9,13,7,7,7,9,7,7,7,12,13,15,10,8,8,14,15,12,13,13,8,12,14,7,11,7,14,15,13,12,8,8,8,8,11,13,15,15,8,13,12,8,8,8,13,10,16,14,11,8,8,12,12,9,15,15,12,12,13,8,8,9,12,13,9,8,8,8,8,8,8,8,8,8,8,8,11,12,11,7,14,7,13,13,13,12,18,16,7,12,11,10,10,15,9,9,9,21,7,7,7,11,16,8,8,11,11,7,7,7,7,7,19,7,7,7,7,7,7,7,7,7,12,8,9,12,14,11,9,9,9,22,12,3,8,8,15,4,2,2,5,5,3,3,3,3,3,3,6,6,4,4,4,12,7,10,2,3,3,3,3,3,3,3,6,7,3,7,5,14,4,4,7,8,10,4,1,3,3,6,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,4,2,2,5,3,4,2,2,2,2,2,2,11,5,5,5,11,5,5,3,5,5,5,5,11,14,13,9,11,9,12,8,11,11,8,11,16,9,9,7,10,9,12,8,15,6,7,6,6,13,10,8,11,8,6,6,6,12,16,6,11,7,8,9,18,6,6,9,4,4,6,13,6,6,6,6,8,8,9,16,7,7,14,7,8,8,8,7,7,7,7,7,7,15,13,7,10,7,7,10,12,16,15,7,9,9,14,11,11,10,9,10,8,12,7,8,7,7,10,12,7,12,8,7,2,3,3,3,3,3,3,3,3,3,3,5,3,3,5,5,5,10,4,8,7,10,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,7,4,5,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,8,2,2,2,8,12,7,7,5,5,5,5,5,5,5,5,5,5,5,5,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,7,11,9,8,8,8,7,8,9,7,7,9,7,7,7,10,7,7,10,9,10,6,6,6,6,6,6,15,7,8,9,9,8,6,6,10,9,6,8,13,9,7,6,6,6,6,6,6,12,6,6,7,6,7,6,6,6,10,10,7,6,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,14,6,6,7,7,9,6,6,6,6,9,9,8,9,10,9,8,9,12,7,7,7,8,7,10,12,11,9,10,7,7,7,9,10,10,8,12,9,7,7,9,8,8,8,10,7,7,8,9,9,7,7,7,8,2,4,6,3,4,2,3,3,3,3,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,3,3,3,3,3,3,3,3,5,8,6,4,7,3,3,3,3,3,3,3,12,3,3,3,3,3,3,4,4,2,3,5,3,4,7,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,3,3,6,4,3,4,2,2,2,5,3,3,3,3,3,5,4,4,4,4,7,6,8,9,2,2,2,2,3,3,3,5,7,2,3,3,8,7,7,2,2,8,5,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,7,7,6,10,6,9,7,11,4,6,8,8,7,8,4,5,5,5,3,3,11,8,9,6,6,8,7,4,4,7,8,7,2,2,3,3,3,3,4,3,3,3,3,3,3,3,3,7,2,2,5,3,3,2,3,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,12,5,5,3,3,3,5,10,12,6,15,4,6,6,7,14,9,3,3,3,3,3,8,2,2,3,5,3,3,3,3,3,3,8,8,8,7,5,8,4,6,11,2,2,6,7,2,9,8,5,5,3,3,5,5,7,7,6,6,10,6,6,8,9,7,4,4,4,4,7,6,6,7,7,10,9,8,11,8,3,3,3,3,3,4,4,2,3,3,3,3,3,7,6,2,5,6,7,6,4,8,9,11,2,2,3,3,3,3,3,3,3,2,2,5,3,3,3,3,3,9,9,6,4,8,7,7,5,9,8,6,8,7,8,5,5,5,5,5,3,3,3,16,8,7,7,7,8,7,7,7,7,9,6,9,6,10,7,7,7,6,10,8,9,11,11,8,4,4,10,8,8,6,9,6,11,8,8,8,15,7,8,9,5,3,3,3,3,3,5,11,2,2,3,8,9,10,3,2,2,2,2,2,2,3,6,4,2,2,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,11,5,3,3,3,3,3,3,3,3,6,7,4,4,2,3,3,3,3,3,3,3,3,12,7,4,12,4,6,5,4,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,3,4,4,11,10,6,4,6,10,8,3,3,3,3,3,3,3,3,5,4,4,4,2,2,2,2,2,2,2,2,5,3,4,4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,5,5,5,5,5,5,3,3,3,3,3,3,3,3,7,8,8,7,13,12,10,10,8,8,7,7,9,12,11,6,6,8,8,9,7,7,7,10,15,10,4,4,4,4,4,11,8,8,9,7,9,14,14,12,2,2,2,2,2,2,2,3,3,3,3,3,2,2,12,5,5,5,8,11,10,7,9,3,8,7,3,15,13,11,4,4,2,2,2,19,7,5,5,3,3,3,3,3,3,3,5,22,18,6,14,17,4,4,19,16,18,2,3,3,2,3,2,3,3,6,4,2,3,3,2,5,3,3,3,3,3,3,3,9,9,2,3,2,2,2,3,3,3,5,7,14,7,7,12,9,13,6,11,6,10,9,7,7,8,12,12,8,8,8,10,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,5,8,10,7,8,11,8,12,9,4,7,7,9,13,2,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,3,3,3,3,5,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,3,2,3,3,3,3,5,2,2,2,2,5,5,5,5,3,3,3,3,3,3,3,3,3,7,7,7,7,7,8,8,8,8,8,12,9,8,8,9,8,6,17,6,6,6,8,8,6,6,6,6,6,6,6,6,6,6,6,7,4,4,8,8,9,9,9,7,7,7,7,7,7,7,9,9,9,7,8,8,8,10,7,13,10,8,9,3,3,5,13,3,3,3,3,3,7,7,6,6,10,13,11,11,8,8,9,8,9,9,10,10,10,11,10,10,13,13,16,15,11,12,9,9,10,9,11,10,9,9,14,7,8,3,10,7,7,3,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,6,7,2,2,3,3,3,3,3,3,3,3,4,11,6,7,4,6,2,2,3,3,3,1,3,3,3,3,3,3,6,4,4,2,2,2,3,3,3,3,4,4,6,6,6,6,5,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,11,6,10,9,12,7,7,11,14,9,7,12,3,3,7,12,11,12,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,5,5,5,5,5,5,5,5,11,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5,3,10,3,3,3,11,3,5,9,11,8,12,14,9,7,8,7,7,11,11,7,7,10,9,8,10,9,7,7,7,7,7,7,8,8,7,11,8,8,8,7,7,10,8,7,13,12,7,17,10,8,8,11,7,11,11,14,7,11,7,8,6,9,20,8,7,9,16,7,10,6,11,10,8,9,7,16,11,11,9,8,9,8,8,8,11,8,15,8,8,9,7,8,8,11,10,7,5,7,10,10,15,7,7,7,8,7,8,8,10,11,10,10,10,11,11,7,8,6,8,8,8,10,6,8,6,6,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,16,6,15,6,7,11,11,7,9,10,11,13,10,6,16,8,10,12,11,6,6,6,6,6,6,6,10,6,10,7,7,7,7,11,7,11,6,6,6,6,6,6,17,7,7,6,6,12,22,6,6,6,6,6,8,6,6,6,6,7,6,6,5,6,6,8,11,6,9,14,11,9,11,7,7,8,6,6,6,8,10,9,6,6,6,6,9,7,6,6,6,6,6,15,6,4,4,4,6,4,17,8,11,6,6,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,6,6,6,10,6,10,6,6,6,6,12,8,6,6,6,6,6,6,6,6,6,9,6,6,6,6,18,6,6,6,8,9,10,7,8,9,10,11,7,13,6,8,8,6,6,14,7,7,7,7,10,7,14,9,6,6,9,15,9,7,14,6,11,14,13,7,12,8,7,7,7,7,7,12,7,10,9,16,6,8,6,5,17,6,8,10,4,6,4,10,15,17,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,4,4,11,7,4,4,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,19,17,6,10,11,6,6,6,6,18,6,6,11,4,4,4,5,6,6,6,9,5,6,4,6,6,4,6,6,6,6,10,6,6,4,6,6,10,6,10,6,6,6,6,11,6,6,10,6,6,8,6,6,6,8,6,11,4,11,9,10,9,11,4,8,4,11,12,7,9,8,6,7,7,8,12,12,11,13,10,11,7,7,7,9,7,11,10,7,7,7,16,11,10,11,17,9,9,8,8,7,7,7,9,7,7,7,14,7,13,9,11,10,14,10,10,12,11,10,7,10,5,14,8,8,8,9,7,8,7,7,9,8,7,8,7,7,7,7,7,7,7,11,8,10,8,7,8,14,11,8,9,9,9,8,24,10,10,12,7,7,15,11,8,8,12,11,8,9,9,7,8,9,10,11,10,11,7,12,7,7,11,9,8,14,13,12,8,11,10,8,8,7,7,14,9,10,8,9,11,7,14,8,8,13,8,8,12,7,10,14,14,11,9,10,9,9,7,7,11,11,13,9,13,5,5,5,7,9,5,11,12,14,8,7,7,11,10,9,7,8,8,7,10,11,11,5,5,7,5,5,5,7,7,15,7,7,8,7,15,12,12,10,7,8,7,11,7,7,7,23,11,8,8,11,10,7,8,11,7,19,7,7,6,9,9,9,11,3,4,7,8,6,6,4,10,8,2,2]),Nw=new Uint16Array([0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,17,1,1,1,12,1,12,1,12,13,1,1,1,1,12,1,12,1,1,1,1,1,14,21,1,1,1,1,1,1,1,19,12,1,1,1,1,1,1,1,20,1,1,1,16,1,18,1,1,15,1,1,1,1,12,1,1,1,1,1,1,22,1,1,1,12,1,1,1,1,1,1,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,1,24,25,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,12,12,12,12,1,32,0,0,0,1,1,1,1,35,34,1,1,1,1,1,33,1,1,1,1,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,38,0,0,0,0,39,40,0,0,0,41,0,12,1,1,12,1,1,1,1,44,45,45,45,44,45,44,44,46,45,44,45,44,44,44,44,44,44,46,44,44,44,44,44,44,45,47,47,45,44,44,44,44,44,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,50,52,50,50,50,52,50,51,50,53,50,51,51,50,50,50,51,53,51,53,50,51,51,12,55,55,54,56,51,53,50,50,48,49,57,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,60,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,67,1,12,1,1,66,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,76,79,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,12,1,1,1,1,89,1,91,1,1,1,1,1,1,1,1,94,1,1,1,1,1,1,1,1,1,1,1,1,0,1,97,97,1,1,12,1,100,1,1,1,1,1,1,1,98,1,99,1,101,1,1,1,1,1,102,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,110,111,1,1,1,1,1,1,113,113,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,121,122,1,1,1,1,1,1,1,1,1,1,1,1,1,122,1,1,1,1,1,1,1,1,1,1,122,1,1,1,1,1,1,1,1,1,126,123,125,120,1,124,1,1,114,1,1,1,1,117,1,127,1,1,1,1,1,119,1,108,1,109,1,12,128,106,1,112,1,1,1,1,1,107,115,1,12,12,12,118,116,1,1,1,1,1,1,0,0,0,0,1,12,12,1,1,1,1,1,12,134,1,1,1,1,1,1,1,1,1,1,1,12,136,1,1,1,1,1,1,1,1,137,138,12,12,135,133,45,45,140,50,50,139,142,141,1,1,0,0,0,0,0,0,0,0,0,0,0,0,145,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0,0,0,1,0,144,132,1,0,1,12,12,1,1,1,1,1,0,0,0,0,0,0,0,1,148,147,20,1,1,12,12,1,20,12,12,1,1,1,1,1,134,1,1,152,1,1,1,1,153,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,1,136,1,1,152,1,1,1,1,153,1,1,134,1,1,1,152,1,1,1,1,153,1,1,134,1,1,1,1,1,1,1,1,134,1,1,1,1,1,1,1,1,1,1,1,160,1,1,1,152,1,1,1,1,1,153,1,1,160,1,1,1,1,1,1,1,1,1,1,134,1,1,1,1,152,1,1,1,1,153,1,1,1,134,1,1,152,1,1,1,1,164,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,167,1,1,160,1,1,1,1,1,152,1,1,1,1,1,153,1,1,160,1,1,1,1,1,152,1,1,1,1,1,153,1,154,158,158,12,1,12,166,1,1,1,1,1,158,158,158,154,1,1,1,157,158,161,165,1,1,1,1,157,157,1,1,156,154,154,157,170,156,170,1,1,168,1,156,155,157,1,1,1,1,157,1,159,1,1,1,12,1,162,1,162,1,1,1,162,161,163,169,156,154,1,1,1,1,1,1,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,172,173,172,173,172,172,172,172,174,174,172,173,172,173,172,172,12,12,12,12,12,1,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,193,1,1,1,1,12,199,200,201,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,151,1,1,1,1,1,1,1,1,1,1,1,196,1,1,1,184,1,210,1,1,1,208,1,1,205,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,12,1,1,1,1,1,1,1,1,190,1,1,1,186,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,182,1,1,1,1,1,1,1,191,1,1,1,1,195,1,1,1,1,171,1,1,189,1,1,1,192,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,180,1,12,1,1,12,1,1,1,1,183,1,1,1,188,1,203,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,209,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,194,1,1,1,1,1,12,1,1,1,1,1,1,1,1,176,12,1,1,1,178,12,1,1,1,1,1,1,1,198,1,1,1,1,1,1,1,1,1,1,177,1,1,1,1,1,1,204,1,1,1,181,1,1,1,187,1,12,1,1,12,1,1,1,1,1,1,1,1,1,1,191,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,175,1,1,1,1,1,1,1,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,206,1,1,1,1,1,1,1,1,1,1,1,1,1,207,1,1,12,1,1,1,1,179,1,1,1,185,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,197,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,12,1,1,1,1,1,1,1,1,1,202,1,1,12,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,220,0,0,0,0,0,221,0,0,0,0,0,0,1,12,1,1,1,225,1,1,1,0,226,223,224,1,1,1,1,1,1,231,1,233,1,1,1,1,1,1,1,1,1,1,1,229,1,1,1,1,1,235,1,1,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,234,1,1,1,12,1,1,1,1,230,1,1,1,228,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,232,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,241,13,1,1,1,12,12,238,239,1,1,1,1,240,1,1,12,1,1,1,1,1,1,1,242,1,1,12,16,1,1,1,1,1,1,1,243,1,1,1,12,12,1,1,1,1,1,243,12,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,252,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,256,256,1,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,172,261,262,1,12,1,1,1,1,12,264,1,1,263,1,1,266,1,1,1,1,1,1,1,1,1,0,1,1,1,271,272,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,12,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,12,0,283,0,0,284,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,12,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,60,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,308,0,0,0,0,0,0,0,0,0,310,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,327,327,328,327,0,185,1,1,13,323,1,321,0,0,0,0,1,0,0,0,324,1,1,329,1,205,1,1,1,1,1,322,1,319,1,325,1,317,1,326,1,318,1,1,1,1,1,1,1,12,1,1,1,12,1,12,320,320,1,1,1,316,184,1,1,12,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,12,1,1,1,1,315,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,332,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,266,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,372,372,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,364,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,340,351,1,1,339,374,1,345,1,1,337,369,1,1,355,336,341,1,1,1,348,379,357,1,1,1,1,1,1,358,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,367,371,0,0,79,1,1,0,365,342,378,343,346,353,1,368,0,1,0,79,362,360,1,0,0,1,1,1,0,0,0,0,381,1,1,352,1,79,1,0,1,1,1,384,1,0,0,79,359,0,1,338,1,1,1,0,1,1,361,1,0,1,1,1,0,1,386,349,1,1,0,1,0,0,377,0,1,1,1,79,370,1,1,366,363,1,1,1,1,1,1,1,1,1,1,1,344,1,1,1,1,1,1,1,1,1,1,1,376,0,79,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,380,1,1,1,0,0,383,0,0,0,1,356,1,0,79,382,1,0,0,0,0,385,1,1,0,0,1,0,1,0,354,0,350,0,1,1,1,0,1,1,0,373,347,375,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1,1,1,400,400,1,1,12,12,1,400,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,412,1,1,0,1,1,1,1,205,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,430,430,1,1,0,0,317,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,442,1,441,1,1,1,1,1,1,1,1,445,1,12,12,1,1,1,1,1,12,1,1,1,1,453,1,1,1,455,1,1,1,1,1,1,1,1,1,1,452,1,447,1,1,1,1,435,1,1,1,1,1,1,1,1,448,12,1,1,1,1,454,1,1,1,449,444,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,317,1,433,1,1,12,451,1,1,317,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,437,1,1,1,1,1,1,1,1,1,1,1,454,1,1,1,1,317,1,450,1,1,1,439,1,1,1,1,1,440,1,456,443,1,1,1,1,1,438,1,1,1,1,1,1,1,1,1,434,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,446,1,1,1,1,1,1,1,12,1,1,1,1,1,436,1,1,1,1,1,1,1,220,457,1,1,1,1,1,12,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,0,0,462,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,466,466,466,466,466,466,466,0,466,466,466,466,466,1,466,466,466,0,466,466,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,471,470,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,475,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,468,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,469,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,477,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,474,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,467,0,0,478,473,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,472,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,467,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,466,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,476,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,1,1,1,1,1,1,1,488,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,198,198,1,492,1,1,1,491,1,1,1,1,487,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,489,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,493,1,1,490,1,1,1,1,1,1,1,1,372,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,494,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,505,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,12,1,507,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,12,12,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,0,1,60,1,1,12,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,526,1,1,1,1,1,1,1,527,1,1,1,1,1,1,1,525,1,1,12,1,529,239,1,1,12,12,1,1,12,1,12,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,533,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,539,1,1,1,1,1,1,1,1,1,1,1,1,1,1,132,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,107,1,1,12,1,1,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,548,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,144,1,1,1,228,1,1,12,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,572,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,577,1,220,1,328,1,1,1,1,1,1,1,1,1,0,0,578,1,1,1,1,0,580,0,79,0,579,0,1,1,1,0,1,1,1,1,1,1,12,0,0,0,0,1,0,0,0,0,0,0,586,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,582,582,0,585,583,582,582,582,582,582,587,582,582,591,582,582,582,582,582,582,582,582,582,582,588,585,582,582,585,582,582,582,582,582,582,582,582,582,582,582,582,582,583,582,582,582,582,582,589,582,582,582,582,582,582,0,0,0,1,590,1,1,1,1,584,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,12,595,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,12,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,65,280,306,411,535,0,4,68,236,254,282,307,334,388,413,0,499,519,536,597,9,0,61,88,398,409,429,575,0,497,518,532,612,0,30,6,0,461,500,602,560,70,0,7,285,255,389,463,416,538,79,598,0,576,309,418,465,9,105,288,506,6,30,0,311,79,391,79,483,10,6,131,248,275,0,613,509,0,563,0,64,6,6,251,95,2,432,399,410,596,0,6,0,6,286,103,6,561,501,540,0,464,390,273,287,8,71,104,599,543,392,312,300,419,146,74,290,546,510,601,564,335,330,479,6,75,149,11,0,249,522,547,565,514,551,570,611,36,6,260,295,333,304,218,30,528,553,218,42,216,265,296,305,406,423,481,274,0,73,562,0,403,417,299,79,247,79,0,581,545,504,292,421,79,393,387,0,0,0,9,555,571,217,0,424,407,531,516,573,615,85,218,43,297,396,425,569,0,511,293,276,79,215,80,28,390,30,6,394,331,303,604,592,524,550,513,0,258,81,30,405,422,0,30,426,0,219,593,517,9,408,427,218,248,86,222,594,574,557,482,428,397,250,227,87,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,620,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,0,0,0,0,82,0,129,0,0,84,549,0,0,0,0,0,0,0,27,0,552,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,503,0,257,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,294,0,0,0,0,0,0,0,617,0,0,0,0,0,616,0,0,0,0,0,0,0,0,0,0,0,0,0,0,395,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,0,0,0,0,0,0,495,0,0,0,0,0,0,404,0,0,0,0,0,0,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,0,0,0,515,0,0,0,0,0,0,0,0,0,0,0,0,496,0,0,0,0,0,0,0,0,0,0,0,0,0,0,269,281,0,0,0,0,0,530,277,0,0,0,0,0,0,0,0,0,0,0,0,0,512,0,0,0,0,0,0,0,0,0,0,0,458,0,0,0,314,0,0,0,0,0,0,253,0,0,0,0,0,0,23,0,0,0,0,568,0,0,0,0,600,521,0,0,0,0,244,0,0,0,0,0,0,0,0,0,480,0,0,0,0,0,62,0,0,0,267,58,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,279,610,0,72,0,0,0,0,0,0,0,0,0,619,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,278,0,0,0,0,0,0,567,0,0,0,0,0,0,523,0,0,0,0,0,0,0,0,0,566,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,213,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,0,502,0,0,0,0,0,554,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,83,0,0,0,0,0,0,0,0,0,0,0,0,486,0,485,0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,459,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,289,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,537,0,0,0,0,0,0,0,0,298,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,69,237,0,0,0,0,0,0,0,0,0,0,84,0,606,0,0,0,0,0,0,0,0,0,0,0,0,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,609,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,520,0,0,0,84,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,498,0,614,0,0,431,0,0,0,0,0,0,0,0,0,0,0,0,402,0,0,0,544,0,93,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,29,92,0,0,0,0,0,0,0,0,0,0,0,0,291,0,0,0,214,0,0,0,0,0,0,558,0,270,0,0,130,0,0,0,0,0,559,0,0,0,0,0,0,0,414,420,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,313,0,0,0,0,0,5,0,0,0,0,0,0,0,301,0,0,0,0,0,0,0,0,0,0,0,0,0,534,0,0,0,415,0,0,401,0,0,0,0,0,0,603,0,0,0,541,0,0,90,0,542,0,0,0,0,0,0,0,0,0,0,508,460,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,268,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,414,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,608,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,607,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,618,0,0,0,0,0,556,0,0,0,0,0,0,0,0,0,0,302,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,605,0,0,212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,623,623,623,623,623,623,623,622,624]),kg="orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowspawnbaseshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultdetaexponyatnoopencrpplxzeaburwasmerframerzeropsconvexmedusajsspritesonherculeseasypanelstreamlitsnowflakemesserliloginlinehackclubnorthflankbase44corespeedadaptableleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasvpsidwasantozqldorgcomvicasnactnetedugovnswtasconfhrsncomairflowlambda-urltransfer-webappairflowtransfer-webapptransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxyacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugovtvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalsimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetperspectajenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algmyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websites3-object-lambdaexecute-apis3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9s3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1rservicesbuilderstg-builderdev-builder*ociocpocsdemoinstanceeu-west-3eu-south-2ap-southeast-3ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appspaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalo365cloudstaticxendevapp001testcode-builder-stgplatformapimediasiteprojedrydpagesjsu2u2-localx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogservesarcasmapplinzisakuratanwixsiteappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyxnbayfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officehomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urldyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3stdlibqualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebanddev-myqnapcloudlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musiciansecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocalreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedonfabricawafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailalpha-myqnapcloudservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyaliases121is-not-certifiedhercules-devis-a-financialadvisorservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrub2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjectsidsiskospockkimodorikerbonesteamsparisjanewaypicardglobaltarpitreedpikekiraworfsulukirkarchertuckerhackercanarywesleystagingprereleaset3r2lpbravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultdetais-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackleapcellngrok-freeis-coolstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idpeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmstorjfidemopaasdymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformdatacenterhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1uk0cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomhzcnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingprotonetfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebiton-acornwixstudioon-k3sicp0icp12038jeleqotobigvlairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudtrentinosudtirolxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenaaquilabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardyfriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencevaldaostaxn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolfriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovipfscanvamypepw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintonohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmaplon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabcdenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscalecryptonomicoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvonoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradynmerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleurspdnscodebergheyflowstatichostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshopprivlapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcanvaliaravalwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentbotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitappgitpagecofigma-govcaffeinefigmacanvasoltstputerbarsysupportchatgptsquareomniweopensocialcpanelnotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyuxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenknightpointaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611oyaorgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovvmdhmyspreadshopadimono-ipbarsybytemarkbarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipcloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsidacaiiosonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildershelsinkixn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworkjunipertheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp",qO=621,MO=625,l2=Ao.length,c2=rm.length,u2=new Uint32Array(c2),Fd=new Uint32Array(c2),jg=new Int32Array(l2).fill(-1);for(let e=0,n=0;e<l2;e+=1)for(let i=om[e];i<om[e+1];i+=1){u2[i]=n;const r=n+rm[i];let u=5381;for(let h=r-1;h>=n;h-=1)u=u*33^kg.charCodeAt(h);Fd[i]=u>>>0,rm[i]===1&&kg.charCodeAt(n)===42&&(jg[e]=i),n=r}let Ui=-1,Ag=0,Ng=0;function Cw(e,n,i,r){if(rm[e]!==r)return!1;const u=u2[e];for(let h=0;h<r;h+=1)if(kg.charCodeAt(u+h)!==n.charCodeAt(i+h))return!1;return!0}function _w(e,n,i,r,u){let h=om[e],f=om[e+1];for(;h<f;){const b=h+f>>>1,v=Fd[b];if(v<n)h=b+1;else if(v>n)f=b;else{for(let x=b;x>=h&&Fd[x]===n;x-=1)if(Cw(x,i,r,u))return x;for(let x=b+1;x<f&&Fd[x]===n;x+=1)if(Cw(x,i,r,u))return x;return-1}}return-1}function Tw(e,n,i){let r=n,u=e.length,h=5381;Ui=-1;for(let b=e.length-1;b>=0;b-=1){const v=e.charCodeAt(b);if(v===46){const x=b+1;let S=_w(r,h>>>0,e,x,u-x);if(S===-1&&(S=jg[r]),S===-1)return Ui!==-1;r=Nw[S],(Ao[r]&i)!==0&&(Ui=r,Ag=x,Ng=u),u=b,h=5381}else h=h*33^v}let f=_w(r,h>>>0,e,0,u);return f===-1&&(f=jg[r]),f!==-1&&(r=Nw[f],(Ao[r]&i)!==0&&(Ui=r,Ag=0,Ng=u)),Ui!==-1}function T0(e,n,i){if(PO(e,n,i))return;const r=(n.allowPrivateDomains?2:0)|(n.allowIcannDomains?1:0);if(Tw(e,MO,r)){i.isIcann=(Ao[Ui]&1)!==0,i.isPrivate=(Ao[Ui]&2)!==0,i.publicSuffix=e.slice(Ng+1);return}if(Tw(e,qO,r)){i.isIcann=(Ao[Ui]&1)!==0,i.isPrivate=(Ao[Ui]&2)!==0,i.publicSuffix=e.slice(Ag);return}i.isIcann=!1,i.isPrivate=!1;const u=e.lastIndexOf(".");i.publicSuffix=u===-1?e:e.slice(u+1)}const Hr=OO();function BO(e,n){return C0(Hr),_0(e,0,T0,n,Hr).hostname}function LO(e,n){return C0(Hr),_0(e,3,T0,n,Hr).domain}function UO(e,n){return C0(Hr),_0(e,5,T0,n,Hr).domainWithoutSuffix}function d2(e,n){return e<n?-1:e>n?1:0}const m2={allowPrivateDomains:!0};new SO({fuzzyLink:!0,fuzzyEmail:!1}).tlds(o2);function Wc(e){if(e==null)return null;const n=e.trim();if(!n)return null;const i=BO(n);return i?i.replace(/^www\./i,"").toLowerCase():null}function VO(e){return e==null||e.trim()===""?"":LO(e,m2)?.toLowerCase()??""}function Lc(e){return Wc(e)??e.trim().toLowerCase().replace(/^www\./,"")}function E0(e){return e==null||e.trim()===""?"":UO(e,m2)?.toLowerCase()??""}function Sae(e){return E0(e)||e}const p2=k(["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta-ai","phind","you-com"]),ri=p2.enum,R0=[{engine:ri.chatgpt,label:"ChatGPT",domains:[Xn.chatgpt,Xn.chatgptLegacy,Xn.openai],tokens:["chatgpt","openai"],labels:["chatgpt","openai"]},{engine:ri.perplexity,label:"Perplexity",domains:[Xn.perplexity],tokens:["perplexity"],labels:["perplexity"]},{engine:ri.gemini,label:"Gemini",domains:[Xn.gemini,Xn.bard],tokens:["gemini","bard"],labels:[]},{engine:ri.claude,label:"Claude",domains:[Xn.claude,dO],tokens:["claude","anthropic"],labels:["claude","anthropic"]},{engine:ri.copilot,label:"Copilot",domains:[Xn.copilotMicrosoft,Xn.copilot],tokens:["copilot"],labels:[]},{engine:ri.grok,label:"Grok",domains:[Xn.grok],tokens:["grok"],labels:[]},{engine:ri.deepseek,label:"DeepSeek",domains:[Xn.deepseek],tokens:["deepseek"],labels:["deepseek"]},{engine:ri["meta-ai"],label:"Meta AI",domains:[Xn.metaAi],tokens:[],labels:[]},{engine:ri.phind,label:"Phind",domains:[Xn.phind],tokens:["phind"],labels:["phind"]},{engine:ri["you-com"],label:"You.com",domains:[Xn.you],tokens:[],labels:[]}];new Map(R0.flatMap(e=>e.tokens.map(n=>[n,e.engine])));new Map(R0.flatMap(e=>e.labels.map(n=>[n,e.engine])));new Map(R0.map(e=>[e.engine,e.label]));const $O=k(["fraction","percent"]),Fa=$O.enum,KO="x-unit";function h2(e,n){return e.meta({[KO]:n})}function we(e=m()){return h2(e,Fa.fraction)}function ot(e=m()){return h2(e,Fa.percent)}Fa.fraction+"",Fa.percent+"";function Df(e,n=!1){const i=new Set,r=[];for(const u of e){const h=n?u.toLowerCase():u;i.has(h)||(i.add(h),r.push(u))}return r}function Ew(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 GO=s().trim().min(1).refine(e=>Ew(e)!==null,{message:"Marketing hosts must be valid hostnames without credentials or ports"}).overwrite(e=>Ew(e)??e),HO=s().trim().min(1),FO=s().trim().regex(/^[a-z]\w{0,39}$/i,{message:"GA4 event names must start with a letter and contain only letters, numbers, or underscores"}),ui=d({marketingHosts:y(GO).overwrite(e=>Df(e,!0)),brandTerms:y(HO).overwrite(e=>Df(e,!0)),leadEventNames:y(FO).overwrite(e=>Df(e))});function QO(){return{marketingHosts:[],brandTerms:[],leadEventNames:["generate_lead"]}}const zf=Object.freeze({marketingHosts:Object.freeze([]),brandTerms:Object.freeze([]),leadEventNames:Object.freeze(["generate_lead"])}),f2=()=>QO(),Cg=k(["never-synced","ready","error"]),ZO=k(["landing-page","channel"]),YO=k(tl.gaMeasurementAnalysis),XO=k(["marketing","all"]),Tc=Is(),nl=d({label:k(["earliest","middle","previous","latest"]),startDate:Tc,endDate:Tc}),If=nl.extend({sessions:m().int().nonnegative()}),Rw=nl.extend({eventCount:m().int().nonnegative()}),Dw=nl.extend({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),JO=nl.extend({propertyClicks:m().int().nonnegative(),propertyImpressions:m().int().nonnegative(),reportedQueryClicks:m().int().nonnegative(),reportedQueryImpressions:m().int().nonnegative(),brandedClicks:m().int().nonnegative(),brandedImpressions:m().int().nonnegative(),nonBrandedClicks:m().int().nonnegative(),nonBrandedImpressions:m().int().nonnegative(),unreportedClicks:m().int().nonnegative(),unreportedImpressions:m().int().nonnegative()}),Of=nl.extend({eventCount:m().int().nonnegative(),sessions:m().int().nonnegative(),leadRate:we(m().nonnegative()).nullable()}),g2=k(["no-data","sync-not-ready","channel-leads-unfiltered","paid-split-needs-landing-page","sessions-behind-leads","sessions-missing-on-lead-days"]);g2.enum;const zw=d({periods:y(Of),engines:y(d({engine:p2,label:s(),sources:y(s()),periods:y(Of)})),unattributed:d({sources:y(s()),periods:y(Of)})}),WO=d({leadRateAvailable:N(),leadRateUnavailableReason:g2.nullable(),organic:zw,paid:zw}),e9=nl.extend({sessions:m().int().nonnegative(),engagementRate:we(m().min(0).max(1)).nullable(),dailyTotalUsers:m().int().nonnegative().nullable(),dailyNewUsers:m().int().nonnegative().nullable(),metricsAvailable:N(),daysInPeriod:m().int().nonnegative(),daysWithEngagementRate:m().int().nonnegative(),daysWithUserSplit:m().int().nonnegative()}),t9=d({window:YO,bucketDays:E(30),filters:d({hostScope:XO,marketingHosts:y(s()),pathPrefix:s().nullable(),brandTerms:y(s()),queryMixScope:E("property")}),acquisition:d({status:Cg,error:s().nullable(),syncedAt:s().datetime().nullable(),periods:y(If),channels:y(d({channelGroup:s(),periods:y(If)})),pages:y(d({hostName:s(),landingPage:s(),periods:y(If)}))}),leads:d({status:Cg,error:s().nullable(),syncedAt:s().datetime().nullable(),attributionScope:ZO.nullable(),hostAndPathFiltersApplied:N(),periods:y(Rw),channels:y(d({channelGroup:s(),periods:y(Rw)})),aiEngines:WO}),engagement:d({status:k(["ready","unavailable"]),availableFromDate:Tc.nullable(),latestDate:Tc.nullable(),periods:y(e9)}),searchDemand:d({status:k(["ready","unavailable"]),periods:y(JO),queries:y(d({query:s(),classification:k(["branded","non-branded"]),periods:y(Dw)})),pages:y(d({hostName:s(),landingPage:s(),periods:y(Dw)})),latestDate:Tc.nullable()})}),eu=k(["sync","batch"]);eu.enum;const al=Ke(s(),eu),y2=k(["submitting","submitted","ended","ingested","cancelled","failed","unknown"]),Iw=y2.enum;Iw.submitted,Iw.ended;const D0=k(["standard","batch"]),Ow=D0.enum,n9=d({inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative()}),a9=n9.extend({pricingTier:D0,estimatedCostMicros:m().int().nonnegative().nullable(),priceSource:Fe([k(["default","override"]),de()])}),b2=d({inputPerMTok:m().nonnegative(),cachedInputPerMTok:m().nonnegative().optional(),cacheWritePerMTok:m().nonnegative().optional(),outputPerMTok:m().nonnegative(),searchPer1k:m().nonnegative().optional(),searchUnit:k(["query","prompt"]).optional(),batchTokenDiscount:m().min(0).max(1).optional()}).strict();d({models:Ke(s().min(1),b2).default({})}).strict();d({enabled:N().default(!1),maxRequestsPerBatch:m().int().positive().optional(),deadlineHours:m().positive().optional()}).strict();const i9=new Intl.Segmenter("en",{granularity:"word"}),s9=/[^\p{L}\p{N}]+/gu,o9=/[\p{L}\p{N}]+/gu,r9=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,l9=new RegExp("\\P{ASCII}","u");function c9(e){if(!l9.test(e))return e;let n="";for(const i of e){if(i.charCodeAt(0)<128){n+=i;continue}const r=i.normalize("NFD"),u=r[0];n+=r.length>1&&r9.test(u)?u:i}return n}function v2(e){return c9(e.normalize("NFKC")).toLocaleLowerCase("en")}function x2(e){const n=[];for(const i of i9.segment(e))if(i.isWordLike)for(const r of i.segment.match(o9)??[])n.push(r);return n}function u9(e){return x2(v2(e))}function za(e){return u9(e).join("")}const Pw=new WeakMap;function d9(e){if(!e)return null;const n=v2(e);return{normalized:n,stripped:n.replace(s9,"")}}function m9(e){const n=Pw.get(e);if(n)return n;const i=x2(e.normalized);return Pw.set(e,i),i}function p9(e){const n=new Set;let i=0;for(const r of e){if(!r)continue;const u=za(r);u&&(n.add(u),u.length>i&&(i=u.length))}return{keys:n,longest:i}}function h9(e,n){if(!n||e.keys.size===0)return!1;const i=typeof n=="string"?d9(n):n;if(!i)return!1;let r=!1;for(const h of e.keys)if(i.stripped.includes(h)){r=!0;break}if(!r)return!1;const u=m9(i);for(let h=0;h<u.length;h++){let f="";for(let b=h;b<u.length;b++){if(f+=u[b],e.keys.has(f))return!0;if(f.length>=e.longest)break}}return!1}const f9=d({name:s(),accountName:s().nullable(),type:s().nullable(),role:s().nullable()});d({accounts:y(f9),total:m().int().nonnegative()});const g9=d({id:s(),projectId:s(),accountName:s(),locationName:s(),displayName:s(),primaryCategoryDisplayName:s().nullable(),storefrontAddress:s().nullable(),websiteUri:s().nullable(),placeId:s().nullable(),mapsUri:s().nullable(),additionalCategories:y(s()),description:s().nullable(),serviceArea:Ke(s(),kn()).nullable(),regularHours:Ke(s(),kn()).nullable(),primaryPhone:s().nullable(),openStatus:s().nullable(),openingDate:s().nullable(),selected:N(),syncedAt:s().nullable(),createdAt:s(),updatedAt:s()});d({locations:y(g9),totalDiscovered:m().int().nonnegative(),totalSelected:m().int().nonnegative()});d({selectAllNew:N().default(!0),accountName:s().optional(),switchAccount:N().default(!1)});d({selected:N()});d({locationNames:y(s()).optional(),daysOfMetrics:m().int().positive().max(540).optional(),monthsOfKeywords:m().int().positive().max(18).optional()});d({runId:s(),status:s()});const y9=d({locationName:s(),date:s(),metric:s(),value:m().int()});d({metrics:y(y9),total:m().int().nonnegative()});const b9=d({locationName:s(),periodStart:s(),periodEnd:s(),keyword:s(),valueCount:m().int().nullable(),valueThreshold:m().int().nullable()});d({keywords:y(b9),total:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))});const v9=d({locationName:s(),placeActionLinkName:s(),placeActionType:s(),uri:s().nullable(),isPreferred:N(),providerType:s().nullable()});d({placeActions:y(v9),total:m().int().nonnegative()});const x9=d({locationName:s(),populatedGroupCount:m().int().nonnegative(),syncedAt:s(),attributes:Ke(s(),kn())});d({lodging:y(x9),total:m().int().nonnegative()});const w9=d({name:s(),valueType:s(),values:y(Fe([N(),s()])),unsetValues:y(s()),uris:y(s())}),S9=d({locationName:s(),attributeCount:m().int().nonnegative(),syncedAt:s(),attributes:y(w9)});d({attributes:y(S9),total:m().int().nonnegative()});const k9=d({locationName:s(),placeId:s(),tier:s(),amenities:y(s()),syncedAt:s(),place:Ke(s(),kn())});d({places:y(k9),total:m().int().nonnegative()});const w2=k(["gbp","places"]),Bm=m().int().min(1).max(4),j9=k(["ok","unavailable","error"]),S2=k(["none","baseline","stale","pending","sent","skipped","suppressed"]);S2.enum;const A9=d({locationName:s(),origin:w2,reviewName:s(),starRating:m().int().min(1).max(5).nullable(),negative:N(),comment:s().nullable(),reviewerName:s().nullable(),createTime:s().nullable(),updateTime:s(),replied:N().nullable(),replyComment:s().nullable(),replyUpdateTime:s().nullable(),reviewUri:s().nullable(),firstSeenAt:s(),lastSeenAt:s(),alertState:S2,alertStateAt:s().nullable()}),N9=d({locationName:s(),displayName:s(),reviewsAccess:j9.nullable(),reviewsAccessReason:s().nullable(),reviewsCheckedAt:s().nullable(),rating:m().nullable(),reviewCount:m().int().nonnegative().nullable(),ratingOrigin:w2.nullable(),ratingObservedAt:s().nullable()});d({negativeMaxStars:m().int().min(1).max(4),locations:y(N9),reviews:y(A9),total:m().int().nonnegative()});d({scope:d({locationName:s().nullable(),locationCount:m().int().nonnegative()}),performance:d({totals:Ke(s(),m()),recent7d:Ke(s(),m()),prior7d:Ke(s(),m()),deltaPct:Ke(s(),ot().nullable())}),freshness:d({dataThroughDate:s().nullable(),latestStoredDate:s().nullable(),pendingDays:m().int().nonnegative()}),timeseries:y(d({date:s(),pending:N(),metrics:Ke(s(),m())})),keywords:d({total:m().int().nonnegative(),thresholdedCount:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))}),placeActions:d({total:m().int().nonnegative(),hasReservationCta:N(),hasBookingCta:N(),hasDirectMerchantCta:N()}),lodging:d({lodgingLocationCount:m().int().nonnegative(),populatedLodgingCount:m().int().nonnegative(),emptyLodgingCount:m().int().nonnegative()}),profileCompleteness:d({locationCount:m().int().nonnegative(),withSecondaryCategories:m().int().nonnegative(),secondaryCategoryTotal:m().int().nonnegative(),withDescription:m().int().nonnegative(),withServiceArea:m().int().nonnegative(),withHours:m().int().nonnegative(),withPrimaryPhone:m().int().nonnegative(),permanentlyClosed:m().int().nonnegative(),temporarilyClosed:m().int().nonnegative()})});const C9={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 _9(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 kae(e){return C9[e]??_9(e)}const T9=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],E9=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function jae(e){return T9.includes(e)?"conversion":E9.includes(e)?"reach":"other"}const pt=s().trim().min(1),qw=s().regex(/^[a-f0-9]{64}$/i);function R9(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const n=new Date(`${e}T00:00:00.000Z`);return!Number.isNaN(n.getTime())&&n.toISOString().slice(0,10)===e}const jn=s().refine(R9,{message:"Expected a calendar date as YYYY-MM-DD."});function D9(e,n){const i=Date.parse(`${e}T00:00:00.000Z`),r=Date.parse(`${n}T00:00:00.000Z`);return Math.floor((r-i)/864e5)+1}const z9=k(["not-connected","selection-required","connected","stale"]),Td=z9.enum,k2=k(["enabled","suspended","closed","canceled","unspecified","unknown"]);k2.enum;const z0=k(["enabled","paused","removed","unknown"]);z0.enum;const j2=k(["enabled","hidden","removed","unknown"]);j2.enum;const I0=k(["customer","campaign"]);I0.enum;const A2=k(["customer-goal","campaign-goal","custom-goal"]);A2.enum;const N2=d({loginCustomerId:pt.nullable(),customerId:pt.nullable(),selectedAt:s().nullable()}).strict(),Pf=d({id:pt,projectId:pt,scopes:y(s()).default([]),selection:N2,lastValidatedAt:s().nullable(),lastInventorySnapshotAt:s().nullable(),lastMetricsSnapshotAt:s().nullable(),createdAt:s(),updatedAt:s()}).strict(),_g=d({resourceName:pt,customerId:pt,parentCustomerId:pt.nullable(),descriptiveName:s().nullable(),currencyCode:s().nullable(),timeZone:s().nullable(),manager:N(),hidden:N(),testAccount:N(),level:m().int().nonnegative(),status:k2}).strict(),I9=d({customers:y(_g),totalAccessible:m().int().nonnegative(),truncated:N(),selection:N2,fetchedAt:s()}).strict();Ue("status",[d({connected:E(!1),status:E(Td["not-connected"]),connection:de(),selectedCustomer:de()}).strict(),d({connected:E(!0),status:E(Td["selection-required"]),connection:Pf,selectedCustomer:de()}).strict(),d({connected:E(!0),status:E(Td.connected),connection:Pf,selectedCustomer:_g}).strict(),d({connected:E(!0),status:E(Td.stale),connection:Pf,selectedCustomer:_g}).strict()]);const O9=d({id:pt,resourceName:pt,name:s(),status:z0,advertisingChannelType:s().nullable(),biddingStrategyType:s().nullable()}).strict(),P9=d({id:pt,resourceName:pt,name:s(),status:j2,category:s(),origin:s(),primaryForGoal:N(),includeInConversionsMetric:N()}).strict(),q9=d({category:s(),origin:s(),biddable:N()}).strict(),M9=d({campaignId:pt,category:s(),origin:s(),biddable:N()}).strict(),B9=d({id:pt,name:s(),conversionActionIds:y(pt)}).strict(),L9=d({campaignId:pt,goalConfigLevel:I0,customGoalId:pt.nullable()}).strict(),U9=d({customerId:pt,fetchedAt:s(),campaigns:y(O9),conversionActions:y(P9),customerConversionGoals:y(q9),campaignConversionGoals:y(M9),campaignConversionGoalsComplete:N().optional(),customConversionGoals:y(B9),campaignGoalConfigurations:y(L9)}).strict(),V9=d({source:A2,category:s().nullable(),origin:s().nullable(),customGoalId:pt.nullable(),biddable:N().nullable(),conversionActionIds:y(pt),primaryConversionActionIds:y(pt),secondaryConversionActionIds:y(pt),missingConversionActionIds:y(pt)}).strict(),$9=d({campaignId:pt,goalConfigLevel:I0,customGoalId:pt.nullable(),missingCustomGoalId:pt.nullable(),goals:y(V9)}).strict();d({customerId:pt,derivedAt:s(),campaigns:y($9)}).strict();const C2=50,Tg=31,K9=C2*Tg,G9=d({campaignIds:y(pt).min(1).max(C2),startDate:jn,endDate:jn}).strict().superRefine((e,n)=>{if(new Set(e.campaignIds).size!==e.campaignIds.length&&n.addIssue({code:fe.custom,path:["campaignIds"],message:"Campaign IDs must be unique."}),e.endDate<e.startDate){n.addIssue({code:fe.custom,path:["endDate"],message:"endDate must not precede startDate."});return}D9(e.startDate,e.endDate)>Tg&&n.addIssue({code:fe.custom,path:["endDate"],message:`Campaign metrics may cover at most ${Tg} calendar days.`})}),H9=d({campaignId:pt,date:jn,impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),conversionValueMicros:m().int().nonnegative().nullable()}).strict(),F9=d({query:G9,rows:y(H9).max(K9),truncated:N(),fetchedAt:s()}).strict(),_2=k(["accessible-customers","inventory","campaign-metrics"]),qf=_2.enum,O0=d({id:pt,projectId:pt,connectionId:pt,runId:pt,kind:_2,customerId:pt.nullable(),payloadChecksum:qw,rawPayloadSha256:qw.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:s(),createdAt:s()}).strict(),Q9=Ue("kind",[d({kind:E(qf["accessible-customers"]),data:I9}).strict(),d({kind:E(qf.inventory),data:U9}).strict(),d({kind:E(qf["campaign-metrics"]),data:F9}).strict()]),Z9=d({metadata:O0,payload:Q9}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:fe.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),Y9=k(tl.googleAdsMetrics),P0=d({impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),conversionValueMicros:m().int().nonnegative().nullable(),ctr:we().nullable(),cpcMicros:m().int().nonnegative().nullable(),conversionRate:we().nullable(),costPerConversionMicros:m().int().nonnegative().nullable()}),X9=d({date:jn,origin:k(["provider","filled"]),impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),ctr:we().nullable()}),J9=d({campaignId:pt,name:s().nullable(),status:z0,totals:P0}),W9=d({snapshotId:pt,capturedAt:s(),customerId:pt,currencyCode:s().nullable(),timeZone:s().nullable(),asOfDate:jn,openDate:jn.nullable(),truncated:N(),campaignsQueried:m().int().nonnegative(),campaignsInInventory:m().int().nonnegative()}),eP=d({startDate:jn,endDate:jn,days:m().int().positive(),totals:P0}),tP=d({days:m().int().positive(),prior:eP,change:d({impressions:we().nullable(),clicks:we().nullable(),costMicros:we().nullable(),conversions:we().nullable(),ctr:we().nullable(),conversionRate:we().nullable()})});d({window:Y9,startDate:jn,endDate:jn,days:m().int().positive(),totals:P0,daily:y(X9),campaigns:y(J9),comparison:tP.nullable(),comparisonUnavailableReason:k(["insufficient-history","no-snapshot"]).nullable(),source:W9.nullable()});const Lm=k(["complete","partial","failed","unsupported"]);Lm.enum;const nP=["branded","non-brand"],Bo=k(nP),q0=k(["all","branded","non-brand"]);function aP(e){const n=e.filter(r=>za(r).length>0);if(n.length===0)return null;const i=p9(n);return i.keys.size===0?null:{matcher:i,classify(r){return h9(i,r)?"branded":"non-brand"}}}const iP=2,sP=s().regex(/^[a-f0-9]{64}$/),Um=s().trim().min(1).max(256),Mw=k(["sensitive","insensitive"]),ge=s().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),oP=s().trim().min(1).refine(e=>Wc(e)!==null,"A competitor domain must be a valid hostname"),rP=Ue("kind",[d({kind:E("exact"),url:s().min(1),pathCase:Mw}).strict(),d({kind:E("prefix"),host:s().min(1),pathPrefix:s().min(1),pathCase:Mw}).strict(),d({kind:E("host"),host:s().min(1)}).strict()]),lP=d({canonicalHost:s().min(1),ownedHosts:y(s().min(1)),names:y(s().min(1))}).strict(),cP=d({projectBrand:lP}).strict(),uP=d({stableKey:ge,label:s().trim().min(1),aliases:y(s().min(1)),identityAliases:y(s().trim().min(1)).optional(),urlMatchers:y(rP),mentionNotApplicable:N(),discoveryIdentity:s().min(1).nullable()}).strict(),T2=d({stableKey:ge,label:s().trim().min(1),domain:oP,aliases:y(s().min(1))}).strict(),dP=d({stableKey:ge,label:s().trim().min(1),parentGroupKey:ge.optional(),targetKeys:y(ge),competitors:y(T2)}).strict(),mP=k(["manual","query-set","template","discovery","research"]),pP=d({templateId:s().trim().min(1).max(256),templateVersion:s().trim().min(1).max(256),template:s().trim().min(1).max(4e3),bindings:Ke(s().trim().min(1).max(128),s().trim().min(1).max(128)),output:s().trim().min(1).max(4e3)}).strict(),E2=d({source:mP,sourceId:s().min(1).nullable(),capturedAt:s().datetime(),template:pP.optional()}).strict(),hP=d({queryId:Um,queryText:s().min(1),provenance:E2}).strict(),Vm=d({providers:y(bt).min(1),models:Ke(bt,s().min(1)),location:Jt.nullable()}).strict(),fP=d({stableKey:s().min(1),queryId:Um,queryText:s().min(1),context:Vm,expectedSnapshots:m().int().nonnegative()}).strict(),M0=Bo,gP=d({targetKey:ge,queryId:Um,queryClass:M0,classificationSource:k(["server","operator"]).optional(),executionNodeKey:s().min(1)}).strict(),B0=d({executionNodeKey:s().min(1),targetKey:ge,queryId:Um}).strict(),R2=d({stableKey:ge,label:s().trim().min(1),kind:E("market"),groupKey:ge.optional(),usageEdges:y(B0)}).strict();function Bw(e){return[e.executionNodeKey,e.targetKey,e.queryId].join("\0")}const $m=d({schemaVersion:E(iP),identities:cP,targets:y(uP),groups:y(dP),querySnapshots:y(hP),assignments:y(gP),executionNodes:y(fP),usageEdges:y(B0),reportingScopes:y(R2).optional(),compiledChecksum:sP}).strict().superRefine((e,n)=>{const i=new Set;for(const b of e.executionNodes)i.has(b.stableKey)&&n.addIssue({code:fe.custom,path:["executionNodes"],message:`Duplicate execution node key "${b.stableKey}"`}),i.add(b.stableKey);const r=new Set(e.targets.map(b=>b.stableKey));e.usageEdges.forEach((b,v)=>{i.has(b.executionNodeKey)||n.addIssue({code:fe.custom,path:["usageEdges",v,"executionNodeKey"],message:`Usage edge references unknown execution node "${b.executionNodeKey}"`}),r.has(b.targetKey)||n.addIssue({code:fe.custom,path:["usageEdges",v,"targetKey"],message:`Usage edge references unknown Target "${b.targetKey}"`})});const u=new Set(e.usageEdges.map(Bw)),h=new Set;e.reportingScopes?.forEach((b,v)=>{if(h.has(b.stableKey)&&n.addIssue({code:fe.custom,path:["reportingScopes",v,"stableKey"],message:`Duplicate reporting scope key "${b.stableKey}"`}),h.add(b.stableKey),b.groupKey!==void 0){const S=e.groups.find(j=>j.stableKey===b.groupKey);(!S||b.usageEdges.some(j=>!S.targetKeys.includes(j.targetKey)))&&n.addIssue({code:fe.custom,path:["reportingScopes",v,"groupKey"],message:"A market must link to an existing group containing all its assigned properties."})}const x=new Set;b.usageEdges.forEach((S,j)=>{const C=Bw(S);u.has(C)||n.addIssue({code:fe.custom,path:["reportingScopes",v,"usageEdges",j],message:`Reporting scope "${b.stableKey}" references a usage edge that this revision does not contain.`}),x.has(C)&&n.addIssue({code:fe.custom,path:["reportingScopes",v,"usageEdges",j],message:`Reporting scope "${b.stableKey}" repeats a usage edge.`}),x.add(C)})}),e.assignments.forEach((b,v)=>{r.has(b.targetKey)||n.addIssue({code:fe.custom,path:["assignments",v,"targetKey"],message:`Assignment references unknown Target "${b.targetKey}"`})});const f=new Map;e.groups.forEach((b,v)=>{f.has(b.stableKey)&&n.addIssue({code:fe.custom,path:["groups",v,"stableKey"],message:"Duplicate group stable key "+b.stableKey}),f.set(b.stableKey,b)}),e.groups.forEach((b,v)=>{const x=b.parentGroupKey;if(x===void 0)return;if(x===b.stableKey){n.addIssue({code:fe.custom,path:["groups",v,"parentGroupKey"],message:"A group cannot be its own parent."});return}const S=f.get(x);if(!S){n.addIssue({code:fe.custom,path:["groups",v,"parentGroupKey"],message:"Group parent does not exist: "+x});return}const j=new Set(S.targetKeys);b.targetKeys.forEach((z,q)=>{j.has(z)||n.addIssue({code:fe.custom,path:["groups",v,"targetKeys",q],message:"Group target membership must be a subset of its parent."})});const C=new Set([b.stableKey]);let T=S;for(;T.parentGroupKey!==void 0;){if(C.has(T.stableKey)){n.addIssue({code:fe.custom,path:["groups",v,"parentGroupKey"],message:"Group parent relationships cannot contain a cycle."});break}C.add(T.stableKey);const z=f.get(T.parentGroupKey);if(!z)break;T=z}});for(const b of e.groups)for(const v of b.targetKeys)r.has(v)||n.addIssue({code:fe.custom,path:["groups"],message:`Group "${b.stableKey}" references unknown Target "${v}"`})}),L0=100;function _o(e){return d({items:y(e),nextCursor:s().min(1).nullable(),totalEstimate:m().int().nonnegative().optional()}).strict()}const tu=k(["no_completed_run","plan_v1","no_population","evidence_incomplete","identity_ambiguous","not_applicable"]),pn=Ue("state",[d({state:E("available"),value:we(),numerator:m().int().nonnegative().optional(),denominator:m().int().positive().optional(),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:"custom",path:["unchecked"],message:"A metric reads one signal: unattributed (mention) and unchecked (citation) cannot share it"})}),d({state:E("unavailable"),reason:tu}).strict()]),Eo=Ue("state",[d({state:E("available"),value:m().int().nonnegative(),numerator:m().int().nonnegative().optional(),denominator:m().int().positive().optional()}).strict(),d({state:E("unavailable"),reason:tu}).strict()]),D2=k(["all","group","market","property"]),ea=q0,yP="non-brand",bP=k(["label-asc","label-desc","citationCoverage-asc","citationCoverage-desc","mentionCoverage-asc","mentionCoverage-desc"]),U0=k(["not_measured","queued","running","complete","partial","failed"]),vP=k(["run_measurement","review_flags","complete_setup","republish_setup","none"]);d({scope:D2,groupKey:ge.optional(),marketKey:ge.optional(),targetKey:ge.optional(),queryClass:ea.optional(),provider:bt.optional(),location:s().trim().min(1).optional(),from:s().trim().min(1).optional(),to:s().trim().min(1).optional(),runId:s().trim().min(1).optional(),search:s().optional(),sort:bP.optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(L0).optional(),compact:N().optional()}).strict();const xP=d({provider:bt,mentionCoverage:pn,citationCoverage:pn}).strict(),wP=d({bothSignals:m().int().nonnegative(),mentionedOnly:m().int().nonnegative(),citedOnly:m().int().nonnegative(),neither:m().int().nonnegative(),notMeasured:m().int().nonnegative(),total:m().int().nonnegative()}).strict(),Eg=d({groupKey:ge,label:s().trim().min(1)}).strict(),SP=d({targetKey:ge,label:s().min(1),metro:Eg.nullable().optional(),otherMetros:y(Eg).min(1).optional(),mentionCoverage:pn,citationCoverage:pn,providers:y(xP),flags:m().int().nonnegative()}).strict(),kP=d({kind:k(["project","competitor"]),stableKey:s().min(1),label:s().min(1),domain:s().min(1),credits:m().int().nonnegative(),share:we(m().min(0).max(1))}).strict(),jP=d({groupKey:ge,queryClass:E("non-brand"),denominator:m().int().positive(),entries:y(kP)}).strict();d({mode:k(["active-v1","active-v2"]),scope:d({kind:D2,key:s().min(1).optional(),label:s().min(1)}).strict(),queryClass:ea,measurement:d({state:U0,currentRunId:s().min(1).optional(),displayedRunId:s().min(1).optional(),completed:m().int().nonnegative(),expected:m().int().nonnegative(),completedAt:s().datetime().optional(),includesHistoricalData:N().optional()}).strict(),nextAction:d({kind:vP,count:m().int().nonnegative().optional()}).strict(),metrics:d({propertiesMentioned:Eo,mentionCoverage:pn,citationCoverage:pn,brandPresence:pn,sov:pn.describe("Deprecated alias of brandPresence carrying the identical value. Remove once the browser migrates.")}).strict(),properties:_o(SP),outcomes:wP,flags:d({total:m().int().nonnegative()}).strict(),namedShareOfVoice:jP.optional(),detailsOmitted:y(s()).optional()}).strict();const z2=k(["sources","answers","other-queries"]),AP=z2.enum;AP.sources;d({targetKey:ge,queryClass:ea.optional(),provider:bt.optional(),location:s().trim().min(1).optional(),runId:s().trim().min(1).optional(),shape:z2.optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(L0).optional()}).strict();const I2=1,nu=m().int().positive(),bn=s().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),au=s().trim().min(1).max(256),Lw=k(["sensitive","insensitive"]);function lm(e){const n=Wc(e);if(!n)throw new Error(`Invalid measurement host: ${e}`);return n}function NP(e){const n=[];let i=!1;for(let r=0;r<e.length;r++){const u=e[r];u==="/"?(i||n.push(u),i=!0):(n.push(u),i=!1)}for(;n.length>1&&n.at(-1)==="/";)n.pop();return n.length?n.join(""):"/"}function Uw(e){try{return decodeURI(e).normalize("NFC").toLowerCase()}catch{return e.normalize("NFC").toLowerCase()}}function O2(e){const n=new URL(`https://measurement.invalid${e}`).pathname;return NP(n.replace(/%[0-9a-f]{2}/gi,i=>i.toUpperCase()))}function Rg(e){const n=e.trim();if(!n||n.includes("?")||n.includes("#")||n.includes("://")||n.includes("\\"))throw new Error(`Invalid measurement path prefix: ${e}`);const i=n.startsWith("/")?n:`/${n}`;for(const r of i.split("/")){let u;try{u=decodeURIComponent(r)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}if(u==="."||u==="..")throw new Error(`Invalid measurement path prefix: ${e}`)}try{return O2(i)}catch{throw new Error(`Invalid measurement path prefix: ${e}`)}}function CP(e){const n=/^[a-z][a-z0-9+.-]*:\/\/[^/?#]*/i.exec(e);if(!n)throw new Error(`Invalid exact measurement URL: ${e}`);return e.slice(n[0].length).split(/[?#]/,1)[0]||"/"}function Vw(e){const n=e.trim();if(!n||n.includes("\\"))throw new Error(`Invalid exact measurement URL: ${e}`);let i;try{i=new URL(n)}catch{throw new Error(`Invalid exact measurement URL: ${e}`)}if(i.protocol!=="http:"&&i.protocol!=="https:"||i.username||i.password||i.port||i.search||i.hash)throw new Error(`Invalid exact measurement URL: ${e}`);const r=lm(i.hostname),u=Rg(CP(n));return`https://${r}${u}`}const Uc=s().trim().min(1).refine(e=>{try{return lm(e),!0}catch{return!1}},"A target URL matcher host must be a valid hostname").overwrite(e=>lm(e)),_P=s().trim().min(1).refine(e=>{try{return Rg(e),!0}catch{return!1}},"A target URL matcher pathPrefix must be an absolute path without query or fragment").overwrite(e=>Rg(e)),TP=s().trim().min(1).refine(e=>{try{return Vw(e),!0}catch{return!1}},"A target exact matcher must be an HTTP(S) URL without credentials, port, query, or fragment").overwrite(e=>Vw(e)),EP=Ue("kind",[d({kind:E("exact"),url:TP,pathCase:Lw}).strict(),d({kind:E("prefix"),host:Uc,pathPrefix:_P,pathCase:Lw}).strict(),d({kind:E("host"),host:Uc}).strict()]),P2=s().trim().min(1).max(256).refine(e=>za(e).length>0,"A target alias must contain mention text"),RP=Ke(s().trim().min(1),s()),DP=Uc,q2=d({stableKey:bn,label:s().trim().min(1),urls:y(EP).min(1),aliases:y(P2),metadata:RP.optional()}).strict(),V0=d({stableKey:bn,label:s().trim().min(1),targetKeys:y(bn).min(1),competitors:y(DP).optional()}).strict(),M2=d({targetKey:bn,queryIds:y(au).min(1),context:Jt.nullable().optional()}).strict();function zP(e,n=i=>i){const i=new Set,r=new Set;for(const u of e){const h=n(u);i.has(h)&&r.add(h),i.add(h)}return r}function Mf(e,n,i,r,u){for(const h of zP(n,u))e.addIssue({code:"custom",path:[...i],message:`Duplicate ${r}: ${h}`})}function $w(e){if(e.kind==="host")return{host:e.host,pathname:null};if(e.kind==="prefix")return{host:e.host,pathname:e.pathPrefix};const n=new URL(e.url);return{host:lm(n.hostname),pathname:O2(n.pathname||"/")}}function IP(e,n,i,r){return e===i||(n==="insensitive"||r==="insensitive")&&Uw(e)===Uw(i)}function OP(e,n){if(e.kind!==n.kind)return!1;const i=$w(e),r=$w(n);return i.host!==r.host?!1:e.kind==="host"||n.kind==="host"?!0:IP(i.pathname,e.pathCase,r.pathname,n.pathCase)}function PP(e){const n=new Set;return[...e].sort(d2).filter(i=>{const r=za(i);return n.has(r)?!1:(n.add(r),!0)})}const B2=d({schemaVersion:E(I2),targets:y(q2).min(1),groups:y(V0).optional(),targetQuerySelections:y(M2).optional()}).strict().superRefine((e,n)=>{const i=e.groups??[],r=e.targetQuerySelections??[];Mf(n,e.targets.map(v=>v.stableKey),["targets"],"target stable key"),Mf(n,i.map(v=>v.stableKey),["groups"],"group stable key");const u=new Set(e.targets.map(v=>v.stableKey)),h=new Set(i.map(v=>v.stableKey));for(const v of u)h.has(v)&&n.addIssue({code:"custom",path:["groups"],message:`Target and group stable keys must be globally unique: ${v}`});const f=new Map,b=[];e.targets.forEach((v,x)=>{for(const S of PP(v.aliases)){const j=za(S),C=f.get(j);C&&C!==v.stableKey&&n.addIssue({code:"custom",path:["targets",x,"aliases"],message:`Target alias is already assigned to target ${C}: ${S}`}),f.set(j,v.stableKey)}v.urls.forEach((S,j)=>{b.find(T=>T.targetKey!==v.stableKey&&OP(T.matcher,S))&&n.addIssue({code:"custom",path:["targets",x,"urls",j],message:"Target URL matcher has an equal-specificity cross-target tie"}),b.push({targetKey:v.stableKey,matcher:S})})}),i.forEach((v,x)=>{Mf(n,v.targetKeys,["groups",x,"targetKeys"],"group target key");for(let S=0;S<v.targetKeys.length;S++){const j=v.targetKeys[S];u.has(j)||n.addIssue({code:"custom",path:["groups",x,"targetKeys",S],message:`Unknown target: ${j}`})}}),r.forEach((v,x)=>{u.has(v.targetKey)||n.addIssue({code:"custom",path:["targetQuerySelections",x,"targetKey"],message:`Unknown target: ${v.targetKey}`})})});B2.transform(e=>({...e,groups:e.groups??[],targetQuerySelections:e.targetQuerySelections??[]}));d({expectedActiveRevision:nu.nullable(),plan:B2}).strict();const qP=d({queryId:au,queryText:s().min(1)}).strict(),$0=d({stableKey:s().min(1),queryText:s().min(1),context:Jt.nullable(),expectedSnapshots:m().int().nonnegative()}).strict(),MP=d({kind:E("baseline"),executionNodeKey:s().min(1),queryId:au}).strict(),BP=d({kind:E("target"),executionNodeKey:s().min(1),queryId:au,targetKey:bn}).strict(),Dg=Ue("kind",[MP,BP]),L2=d({code:E("target-alias-prefix-overlap"),message:s().min(1),targetKeys:y(bn).min(1),aliases:y(s().min(1)).min(1)}).strict(),U2=q2.extend({mentionNotApplicable:N()}),V2=d({schemaVersion:E(I2),defaultContext:Jt.nullable(),effectiveOwnedHosts:y(Uc),projectCanonicalHost:Uc,projectBrandNames:y(P2),targets:y(U2),groups:y(V0),targetQuerySelections:y(M2),querySnapshots:y(qP),executionNodes:y($0),usageEdges:y(Dg),warnings:y(L2)}).strict(),LP=V2,$2=Ue("schemaVersion",[V2,$m]),K0=s().regex(/^[a-f0-9]{64}$/),G0=s().datetime(),K2=d({schemaVersion:E(1),language:s().min(1).optional(),providers:y(s().min(1)).min(1),models:Ke(s().min(1),s().min(1)),checksum:s().regex(/^[a-f0-9]{64}$/)}).strict(),UP=d({groups:y(bn).optional(),targets:y(bn).optional()}).strict(),VP=d({groups:y(bn),targets:y(bn),queries:y(s().min(1)),resolvedTargets:y(bn)}).strict().superRefine((e,n)=>{e.resolvedTargets.length===0&&e.queries.length===0&&n.addIssue({code:"custom",path:["resolvedTargets"],message:"A recorded scope must name something it measured"})});d({stableKey:bn,retiredAt:s().datetime()});d({active:d({revision:nu,checksum:K0,createdAt:G0,plan:$2}).nullable()});d({versions:y(d({revision:nu,checksum:K0,createdAt:G0,active:N()}))});d({version:d({revision:nu,checksum:K0,createdAt:G0,active:N(),plan:$2})});const Qd=d({targets:m().int(),groups:m().int(),queries:m().int(),executionNodes:m().int(),usageEdges:m().int(),baselineEdges:m().int(),targetEdges:m().int(),dedupSavings:m().int()}).strict(),$P=k(["invalid-authoring","duplicate-identity","unknown-target","unknown-query","invalid-project-context","unowned-target-url","owned-competitor","target-query-context-conflict","target-url-ownership-tie","target-alias-cross-target-collision","target-alias-project-brand-collision","target-alias-prefix-overlap"]),G2=d({id:$P,severity:k(["fail","warn"]),message:s().min(1),path:y(Fe([s(),m().int()]))}).strict(),KP=d({baseline:m().int().nonnegative(),target:m().int().nonnegative()}).strict(),H2=d({ok:E(!0),checks:y(G2),executionNodes:y($0),dedupSaved:m().int().nonnegative(),usageEdges:KP,estCostUsd:de(),plan:LP,warnings:y(L2),counts:Qd}).strict(),F2=d({ok:E(!1),checks:y(G2).min(1),executionNodes:y($0).length(0),dedupSaved:E(0),usageEdges:d({baseline:E(0),target:E(0)}).strict(),estCostUsd:de()}).strict();Ue("ok",[H2,F2]);const Ed=d({targetKey:bn,context:Jt.nullable(),queryIds:y(au)}).strict();function Kw(e){return d({added:y(e),removed:y(e),changed:y(d({stableKey:bn,before:e,after:e}).strict()),unchanged:y(bn)}).strict()}const GP=H2.extend({diff:d({activeRevision:nu.nullable(),targets:Kw(U2),groups:Kw(V0),querySelections:d({added:y(Ed),removed:y(Ed),changed:y(d({targetKey:bn,before:Ed,after:Ed}).strict()),unchanged:y(d({targetKey:bn,context:Jt.nullable()}).strict())}).strict(),execution:d({addedNodeKeys:y(s().min(1)),removedNodeKeys:y(s().min(1)),addedUsageEdges:y(Dg),removedUsageEdges:y(Dg),counts:d({before:Qd.nullable(),after:Qd,delta:Qd.nullable()}).strict()}).strict()}).strict()}).strict(),HP=F2.extend({diff:de()}).strict();Ue("ok",[GP,HP]);const H0=k(["PROVIDER_AUTH","PROVIDER_BILLING","RATE_LIMITED","PROVIDER_UNAVAILABLE","NETWORK","TIMEOUT","PARSE_ERROR","UNKNOWN"]),Aae=H0.enum,ta=k(["queued","running","completed","partial","failed","cancelled"]),Nt=ta.enum,No=k(["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","google-ads-sync","gtm-sync"]),Oe=No.enum;d({kind:No.optional(),excludeKind:No.optional(),excludeKinds:Ya(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(i=>typeof i=="string"?i.split(",").map(r=>r.trim()):[i]))]:e},y(No).max(No.options.length)).optional(),status:ta.optional()});const Km=k(["manual","scheduled","config-apply","backfill","probe"]),Ga=Km.enum,Ki=k(["cited","not-cited"]),Ec=Ki.enum,cm=k(["visible","not-visible"]);cm.enum;const Vc=k(["mentioned","not-mentioned"]);Vc.enum;const Q2=k(["new","cited","lost","emerging","not-cited"]);Q2.enum;const FP=k(["new","mentioned","lost","emerging","not-mentioned"]);FP.enum;const QP=k([Ga.manual,Ga.probe]);d({kind:E(Oe["answer-visibility"]).optional(),trigger:QP.optional(),providers:y(bt).optional(),queries:y(s().min(1)).min(1).optional(),measurementScope:UP.optional(),location:s().min(1).optional(),allLocations:N().optional(),noLocation:N().optional(),dispatchMode:eu.optional(),force:N().optional()}).refine(e=>+!!e.location+ +!!e.allLocations+ +!!e.noLocation<=1,{message:'Only one of "location", "allLocations", or "noLocation" may be provided'});const Z2=d({code:H0,consecutiveRuns:m().int().positive(),since:s(),latestRunId:s(),retryAfter:s()}),ZP=d({message:s(),raw:kn().optional(),code:H0.optional(),skipped:N().optional()}),YP=d({message:s().optional(),providers:Ke(s(),ZP).optional()}),XP=Ke(s(),E(eu.enum.batch)),JP=d({id:s(),provider:s(),model:s(),status:y2,requestCount:m().int().nonnegative(),ingestedCount:m().int().nonnegative(),recordedCount:m().int().nonnegative(),submittedAt:s().nullable(),endedAt:s().nullable(),deadlineAt:s(),error:s().nullable()}),WP=d({provider:s(),pricingTier:D0,answers:m().int().nonnegative(),inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative(),estimatedCostMicros:m().int().nonnegative().nullable(),unpricedAnswers:m().int().nonnegative()}),eq=d({sourceId:s().nullable().optional(),id:s(),projectId:s(),kind:No,status:ta,trigger:Km.default("manual"),measurementPlanVersionId:s().nullable().optional(),measurementManifest:Ke(s(),kn()).nullable().optional(),measurementScope:VP.nullable().optional(),measurementExecutionIdentity:K2.nullable().optional(),location:s().nullable().optional(),queries:y(s()).nullable().optional(),startedAt:s().nullable().optional(),finishedAt:s().nullable().optional(),error:YP.nullable().optional(),queryBasketRevision:m().int().nullable().optional(),dispatchModes:XP.optional(),skippedProviders:Ke(s(),Z2).optional(),createdAt:s()}),Gw=d({refused:N(),retryAfter:s().nullable(),providers:Ke(s(),Z2)});function F0(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 Gm=d({uri:s(),title:s()}),tq=d({status:k(["applied","ignored","browser-implicit","unknown"]),resolved:Jt.nullable().optional()}),Y2=d({id:s(),runId:s(),queryId:s(),query:s().optional(),provider:bt,citationState:Ki,answerMentioned:N().optional(),visibilityState:cm.optional(),mentionState:Vc.optional(),transition:Q2.optional(),answerText:s().nullable().optional(),citedDomains:y(s()).default([]),citedUrls:y(s()).nullable().default(null),captureStatus:Fe([Lm,de()]).default(null),sourceCount:m().int().nonnegative().nullable().default(null),resolvedCount:m().int().nonnegative().nullable().default(null),captureVersion:m().int().positive().nullable().default(null),retrievalStatus:Fe([j0,de()]).default(null),retrievalContract:Fe([A0,de()]).default(null),competitorOverlap:y(s()).default([]),citedCompetitorDomains:y(s()).default([]),mentionedCompetitorDomains:y(s()).default([]),mentionedCompetitorTerms:y(s()).default([]),recommendedCompetitors:y(s()).default([]),matchedTerms:y(s()).default([]),groundingSources:y(Gm).default([]),searchQueries:y(s()).default([]),model:s().nullable().optional(),servedModel:s().nullable().optional(),location:s().nullable().optional(),requestedContext:Jt.nullable().optional(),supportedContext:tq.nullable().optional(),dispatchMode:Fe([eu,de()]).optional(),stopReason:s().nullable().optional(),usage:a9.nullable().optional(),createdAt:s()});d({snapshots:y(Y2),total:m().int().nonnegative()});const nq=d({queryId:s().nullable(),query:s().nullable(),run1State:Ki.nullable(),run2State:Ki.nullable(),run1AnswerMentioned:N().nullable(),run2AnswerMentioned:N().nullable(),run1VisibilityState:cm.nullable(),run2VisibilityState:cm.nullable(),run1MentionState:Vc.nullable().optional(),run2MentionState:Vc.nullable().optional(),changed:N(),visibilityChanged:N()});d({run1:s(),run2:s(),diff:y(nq)});const aq=d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),mentionedQueries:m().int().nonnegative()}),iq=eq.extend({snapshots:y(Y2).optional(),queryCounts:aq.nullable().optional(),providerBatches:y(JP).optional(),usage:y(WP).optional()}),sq=d({totalRuns:m().int().nonnegative(),run:iq.nullable(),admission:Gw.optional(),manualAdmission:Gw.optional()}),Hw=s().refine(e=>!Number.isNaN(Date.parse(e)),"Must be a valid ISO 8601 timestamp");d({limit:Fe([s(),m()]).optional(),offset:Fe([s(),m()]).optional(),since:Hw.optional().describe("Inclusive ISO 8601 lower bound."),until:Hw.optional().describe("Inclusive ISO 8601 upper bound."),action:s().trim().min(1).optional().describe("Exact audit action filter."),actionPrefix:s().trim().min(1).optional().describe("Literal audit action prefix; percent and underscore are not wildcards."),actor:s().trim().min(1).optional().describe("Exact actor, or api for legacy API, API-key, and user actors."),entityType:s().trim().min(1).optional().describe("Exact entity type filter."),entityId:s().trim().min(1).optional().describe("Exact entity identity filter."),excludeEntityTypes:Ya(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(i=>typeof i=="string"?i.split(",").map(r=>r.trim()):[i]))]:e},y(s().min(1))).optional()});d({id:s(),project:s().nullable().optional(),projectId:s().nullable().optional(),actor:s(),action:s(),entityType:s(),entityId:s().nullable().optional(),diff:kn().optional(),userAgent:s().nullable().optional(),actorSession:s().nullable().optional(),requestId:s().nullable().optional(),credentialId:s().nullable().optional(),createdAt:s()});const Q0=Fe([ta,de()]),Z0=k(["pass","partial","fail"]),Nae=Z0.enum,X2=k(["up","down","flat"]);X2.enum;const oq=d({id:s(),name:s(),weight:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null),avgScore:m(),status:Z0,pagesPassing:m().int().nonnegative(),pagesPartial:m().int().nonnegative(),pagesFailing:m().int().nonnegative()}),rq=d({factorId:s(),factorName:s(),avgScore:m(),affectedPages:m().int().nonnegative(),totalPages:m().int().nonnegative(),affectedPct:ot(m().nonnegative()),topRecommendations:y(s()).default([])}),Ea=d({reason:k(["explicit-run","latest-date-complete","latest-date-most-pages","latest-scored-scan","requested-date-complete","requested-date-most-pages"]),date:s(),sameDateRunCount:m().int().nonnegative(),ambiguousDate:N(),candidates:y(d({runId:s(),createdAt:s(),complete:N(),pages:m().int().nonnegative()})).max(10),candidatesTruncated:N()});d({project:s(),hasData:N(),runId:s().nullable(),runStatus:Q0,sitemapUrl:s().nullable(),auditedAt:s().nullable(),aggregateScore:m(),pagesDiscovered:m().int().nonnegative(),pagesAudited:m().int().nonnegative(),pagesSkipped:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),deltaScore:m().nullable(),trend:Fe([X2,de()]),previousScore:m().nullable(),previousAuditedAt:s().nullable(),runSelection:Ea.optional(),factors:y(oq).default([]),affectedPageRanking:d({basis:E("pages-below-pass"),scope:E("audited-pages"),pagesAudited:m().int().nonnegative(),items:y(d({factorId:s(),pagesBelowPass:m().int().nonnegative(),pagesFailing:m().int().nonnegative(),pagesPartial:m().int().nonnegative()})),unavailableFactorIds:y(s())}).optional(),crossCuttingIssues:y(rq).default([]),prioritizedFixes:y(s()).default([])});const J2=d({id:s(),name:s(),weight:m(),score:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null)}),lq=d({url:s(),overallScore:m(),status:k(["success","error"]),error:s().nullable().optional(),factors:y(J2).default([])});d({project:s(),runId:s().nullable(),auditedAt:s().nullable(),runSelection:Ea.optional(),total:m().int().nonnegative(),pages:y(lq).default([])});const cq=d({runId:s(),auditedAt:s(),aggregateScore:m(),pagesAudited:m().int().nonnegative()});d({project:s(),points:y(cq).default([])});const uq=k(["disabled","complete","partial","unavailable"]);uq.enum;const il=k(["indexable","redirect-terminal","canonical-to-other","robots-disallow","noindex","non-html","fetch-error","not-fetched","unknown"]);il.enum;const W2=d({healthReason:il,pages:m().int().nonnegative(),exampleUrl:s()}),e3=d({scope:E("selected-snapshot"),total:m().int().nonnegative(),eligible:m().int().nonnegative(),excluded:m().int().nonnegative(),excludedReasons:y(W2).max(il.options.length)}),t3=d({recentDates:y(jn).max(10),totalDates:m().int().nonnegative(),matchingMonthDayDates:y(jn).max(10),matchingMonthDayTotal:m().int().nonnegative()}),dq=d({pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),edges:m().int().nonnegative(),findings:m().int().nonnegative()}),mq=Ue("state",[d({state:E("unavailable")}),d({state:E("disabled")}),d({state:E("complete"),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative()}),d({state:E("partial"),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative()})]);d({project:s(),hasCrawlData:N(),legacyAuditAvailable:N(),runId:s().nullable(),runSelection:Ea.optional(),requestedDate:jn.optional(),availableScanDates:t3.optional(),inventorySummary:e3.nullable().optional(),runStatus:Q0,requestedRootUrl:s().nullable(),rootUrl:s().nullable(),crawlSchemaVersion:s().nullable().optional(),engineVersion:s().nullable().optional(),normalizationVersion:s().nullable().optional(),indexabilityVersion:s().nullable().optional(),linkScoreVersion:s().nullable().optional(),effectiveOptions:Ke(s(),kn()).default({}),complete:N(),termination:s().nullable(),detailsAvailable:N(),counts:dq,deadLinks:mq});k(["complete","unknown","max-pages","max-edges","max-fetches","max-duration","max-bytes","max-page-bytes","max-depth","max-links-per-page","max-query-variants","max-sitemap-fanout","max-sitemap-urls","root-host-redirect"]);const Hm=k(["eligible","hidden","resource","redirect","failed","unchecked"]),Cae=Hm.enum,_ae=Hm.options,Or={discovered:"discovered",robotsBlocked:"robots-blocked",html:"html",redirect:"redirect",nonHtml:"non-html",fetchError:"fetch-error"},Rd={indexable:"indexable",noindex:"noindex",blocked:"blocked",unknown:"unknown"},pq={robotsDisallow:"robots-disallow",redirectTerminal:"redirect-terminal",metaRobotsNoindex:"meta-robots-noindex",xRobotsNoindex:"x-robots-noindex",canonicalToOther:"canonical-to-other",notHtmlOrUnavailable:"not-html-or-unavailable"};function hq(e){return e.indexabilityReasons?.some(n=>n===pq.canonicalToOther)===!0||e.nodeKey!==void 0&&e.canonicalNodeKey!==null&&e.canonicalNodeKey!==void 0&&e.canonicalNodeKey!==e.nodeKey}function Tae(e){switch(e.fetchState){case Or.fetchError:return"failed";case Or.discovered:return"unchecked";case Or.nonHtml:return"resource";case Or.redirect:return"redirect";case Or.robotsBlocked:return"hidden";case Or.html:break;default:return"unchecked"}if(hq(e))return"hidden";switch(e.indexabilityState){case Rd.indexable:return"eligible";case Rd.noindex:case Rd.blocked:return"hidden";case Rd.unknown:default:return"unchecked"}}const Eae=15,fq=k(["navigation","content","unknown"]);fq.enum;const gq=d({navigation:m().int().nonnegative(),content:m().int().nonnegative(),unknown:m().int().nonnegative()}),n3=k(["placement","ubiquity","unmeasured"]);n3.enum;const Fm=k(["applied","applied-placement","applied-placement-with-ubiquity","applied-placement-partial","unavailable-too-few-pages","unavailable-legacy-scan"]);Fm.enum;function Rae(e){switch(e){case"applied":case"applied-placement":case"applied-placement-with-ubiquity":case"applied-placement-partial":return!0;case"unavailable-too-few-pages":case"unavailable-legacy-scan":return!1}}const Qm=k(["all","content","template"]);Qm.enum;const yq=k(["anchor","redirect","canonical","link"]);yq.enum;const $c=d({nodeKey:s(),url:s(),finalUrl:s().nullable(),path:s(),parentPath:s(),discoverySource:s(),fetchState:s(),httpStatus:m().int().nullable(),canonicalUrl:s().nullable(),indexabilityState:s(),indexabilityReasons:y(s()).default([]),auditState:s(),auditScore:m().nullable(),inventoryEligible:N(),depth:m().int().nullable(),inboundUniqueEdges:m().int().nonnegative(),outboundUniqueEdges:m().int().nonnegative(),inboundOccurrences:m().int().nonnegative(),outboundOccurrences:m().int().nonnegative(),linkScoreRaw:m().nullable(),linkScoreNormalized:ot().nullable(),healthState:Hm,healthReason:il.optional()}),a3=d({type:k(["found","missing","info","timeout","unreachable"]),code:s().min(1),message:s().min(1)}),Fw=J2.extend({status:Z0,applicable:N().nullable(),findings:y(a3).default([]),recommendations:y(s()).default([]),advisoryRecommendations:y(s()).optional()}),Qw=d({id:s().min(1),severity:k(["critical","warning"]),detail:s().min(1),recommendation:s().min(1)}),Dd=d({project:s(),runId:s(),complete:N(),termination:s().nullable(),runSelection:Ea.optional()}),Zw=d({nodeKey:s(),url:s(),auditState:s()});Ue("state",[d({state:E("no-crawl"),project:s(),runId:de()}),Dd.extend({state:E("details-unavailable")}),Dd.extend({state:E("not-found")}),Dd.merge(Zw).extend({state:E("not-audited"),auditScore:de(),factors:y(Fw).length(0).default([]),criticalDefects:y(Qw).length(0).default([])}),Dd.merge(Zw).extend({state:E("ready"),auditScore:m(),evidenceState:k(["complete","scores-only"]),factors:y(Fw).default([]),criticalDefects:y(Qw).default([])})]);const bq=k(["applied","unavailable-legacy-scan"]),iu={complete:N(),termination:s().nullable(),runSelection:Ea.optional()};d({project:s(),hasCrawlData:N(),runId:s().nullable(),...iu,requestedDate:jn.optional(),availableScanDates:t3.optional(),inventorySummary:e3.nullable().optional(),healthReasonCounts:y(W2).max(il.options.length).nullable().optional(),total:m().int().nonnegative(),nextCursor:s().nullable(),healthStateFilter:Fe([bq,de()]).default(null),pages:y($c).default([])});const vq=d({path:s(),url:s().nullable(),hasPage:N(),pageCount:m().int().positive(),inventoryEligibleCount:m().int().nonnegative(),fetchedCount:m().int().nonnegative()});d({project:s(),hasCrawlData:N(),runId:s().nullable(),...iu,parentPath:s(),nextCursor:s().nullable(),children:y(vq).default([])});const Ro=d({edgeKey:s(),sourceNodeKey:s(),sourceUrl:s(),targetNodeKey:s().nullable(),targetUrl:s(),relation:s(),internal:N(),followable:N(),occurrences:m().int().positive(),followableOccurrences:m().int().nonnegative(),nofollowOccurrences:m().int().nonnegative(),anchors:y(s()).default([]),isTemplate:Fe([N(),de()]),templateRatio:Fe([we(),de()]),templateSource:n3,placementOccurrences:Fe([gq,de()])}),xq=d({nodeKey:s(),url:s(),path:s(),depth:m().int().nonnegative().nullable(),indexabilityState:s(),fetchState:s(),auditState:s(),auditScore:m().nullable(),inventoryEligible:N(),inboundUniqueEdges:m().int().nonnegative(),outboundUniqueEdges:m().int().nonnegative(),linkScoreNormalized:ot().nullable(),healthState:Hm,healthReason:il.optional(),x:m(),y:m()}),wq=d({edgeKey:s(),sourceNodeKey:s(),targetNodeKey:s(),followable:N(),occurrences:m().int().positive(),isTemplate:N()}),Sq=k(["no-crawl","legacy-snapshot","details-unavailable","layout-failed","empty-crawl"]),kq=Ue("state",[d({state:E("ready"),version:s().min(1),computedAt:s().min(1),templateLinksExcluded:N()}),d({state:E("unavailable"),version:de(),reason:Sq})]);d({project:s(),hasCrawlData:N(),runId:s().nullable(),rootNodeKey:s().nullable(),...iu,layout:kq,templateDetection:Fm,linkKind:Qm,totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),totalTemplateEdges:m().int().nonnegative(),totalContentEdges:m().int().nonnegative(),nodes:y(xq).default([]),edges:y(wq).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),sampled:N()});const Dae=2e4,zae=5e4,jq=k(["focus","inbound","outbound","both","transitive"]),Aq=$c.extend({distance:m().int().nonnegative(),relationToFocus:jq});d({project:s(),hasCrawlData:N(),runId:s().nullable(),complete:N(),termination:s().nullable(),runSelection:Ea.optional(),state:k(["no-crawl","details-unavailable","ready"]),focusNodeKey:s().nullable(),focusUrl:s().nullable(),hops:m().int().min(0).max(3),totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),nodes:y(Aq).default([]),edges:y(Ro).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),countAccuracy:k(["exact","lower-bound"]),truncated:N()});const Yw=d({nodeKey:s(),url:s(),path:s()});d({project:s(),runId:s().nullable(),complete:N(),termination:s().nullable(),runSelection:Ea.optional(),state:k(["no-crawl","details-unavailable","found","unreachable","truncated"]),from:Yw.nullable(),to:Yw.nullable(),maxDepth:m().int().positive(),visitedNodes:m().int().nonnegative(),nodes:y($c).default([]),edges:y(Ro).default([])});const i3=k(["added","removed","changed"]),Nq=d({entity:E("page"),change:i3,key:s(),changedFields:y(s()).default([]),before:$c.nullable(),after:$c.nullable()}),Cq=d({entity:E("link"),change:i3,key:s(),changedFields:y(s()).default([]),before:Ro.nullable(),after:Ro.nullable()}),_q=Ue("entity",[Nq,Cq]),Xw=d({added:m().int().nonnegative(),removed:m().int().nonnegative(),changed:m().int().nonnegative()}),Tq=d({scope:k(["all","pages","links"]),change:k(["all","added","removed","changed"])});Ue("state",[d({project:s(),state:E("unavailable"),reason:k(["no-crawl","insufficient-history","details-unavailable","partial-not-comparable"]),fromRunId:s().nullable(),toRunId:s().nullable()}),d({project:s(),state:E("incompatible"),reason:E("incompatible-versions"),fromRunId:s(),toRunId:s(),mismatchedVersions:y(s()).min(1)}),d({project:s(),state:E("ready"),fromRunId:s(),toRunId:s(),versions:d({crawlSchema:s(),normalization:s(),indexability:s(),linkScore:s()}),filters:Tq,summaryState:k(["exact","omitted-on-continuation"]),summary:d({pages:Xw,links:Xw}).nullable(),total:m().int().nonnegative().nullable(),nextCursor:s().nullable(),changes:y(_q).default([])})]);d({project:s(),hasCrawlData:N(),runId:s().nullable(),...iu,total:m().int().nonnegative(),nextCursor:s().nullable(),templateDetection:Fm,linkKind:Qm,edges:y(Ro).default([])});d({project:s(),hasCrawlData:N(),runId:s().nullable(),...iu,nodeKey:s().nullable(),url:s().nullable(),templateDetection:Fm,linkKind:Qm,inbound:y(Ro).default([]),outbound:y(Ro).default([]),inboundTruncated:N(),outboundTruncated:N()});const Jw=d({findingKey:s(),severity:s(),sourceNodeKey:s().nullable(),sourceUrl:s().nullable(),targetNodeKey:s().nullable(),targetUrl:s().nullable(),evidence:Ke(s(),kn()).default({})});Ue("state",[d({project:s(),runId:s().nullable(),state:E("unavailable"),legacyAuditAvailable:N(),runSelection:Ea.optional()}),d({project:s(),runId:s(),state:E("disabled"),checkDeadLinks:E(!1),runSelection:Ea.optional()}),d({project:s(),runId:s(),state:E("complete"),checkDeadLinks:E(!0),runSelection:Ea.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:s().nullable(),deadLinks:y(Jw).default([])}),d({project:s(),runId:s(),state:E("partial"),checkDeadLinks:E(!0),runSelection:Ea.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:s().nullable(),deadLinks:y(Jw).default([])})]);const s3=5e4,su=m().int().min(1).max(s3);function Ww(e){return`${e.toLocaleString("en-US")} ${e===1?"page":"pages"}`}function Iae(e){return e===null?`full site (up to ${Ww(s3)})`:Ww(e)}const Oae=10,o3=100;d({sitemapUrl:s().url().optional(),limit:m().int().positive().max(2e3).optional(),maxPages:su.optional(),maxEdges:m().int().positive().max(1e6).optional(),maxDepth:m().int().min(0).max(100).optional(),checkDeadLinks:N().default(!1)});d({runId:s(),status:ta});const Eq=d({runId:s(),status:ta,createdAt:s(),startedAt:s().nullable(),finishedAt:s().nullable(),hasCrawlData:N()});d({project:s(),preferredRunId:s().nullable().optional(),scans:y(Eq).default([])});const Rq=k(["queued","discovering","checking","arranging-map","completed","partial","failed","cancelled"]),Dq=d({state:k(["pending","ready","unavailable"]),layoutVersion:s().nullable(),failureCode:s().nullable(),updatedAt:s().nullable()}),zq=d({id:s(),state:s(),pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),pagesErrored:m().int().nonnegative(),edgesDiscovered:m().int().nonnegative(),lastUpdatedAt:s(),startedAt:s().nullable(),finishedAt:s().nullable(),error:s().nullable()});d({project:s(),runId:s(),status:ta,phase:Rq,attempt:zq.nullable(),layout:Dq,error:s().nullable()});const Iq=k(["waiting","collecting","terminal"]),Oq=d({nodeKey:s(),url:s(),auditScore:m(),checksNeedingAttention:m().int().nonnegative()});d({project:s(),runId:s(),status:ta,state:Iq,attemptId:s().nullable(),pagesAudited:m().int().nonnegative(),updatedAt:s().nullable(),examples:y(Oq).max(12).default([])});d({schemaVersion:E("1.0"),groupIdentityVersion:E("duplicate-metadata-v1"),siteIssues:y(d({key:s().min(1).nullable(),code:s().min(1),message:s(),affectedUrls:y(s().min(1))}))});const Y0=100;d({runId:s().min(1).max(128).optional(),cursor:s().min(1).max(2048).optional(),limit:m().int().min(1).max(Y0).optional()}).strict();const Pq=k(["actionable","advisory","unverified","informational"]),r3=d({nodeKey:s().nullable(),url:s(),message:s().max(400),messageTruncated:N(),recommendations:y(s().max(400)).max(3),recommendationsScope:k(["factor","issue","none"]),recommendationsTruncated:N()}),qq=d({id:s(),stableIdentity:N(),code:s(),source:k(["page-finding","cross-page","critical-defect"]),severity:k(["critical","warning"]).nullable(),factorId:s().nullable(),findingType:a3.shape.type,disposition:Pq,message:s().max(400),messageTruncated:N(),affectedPages:m().int().nonnegative(),examples:y(r3).max(3),examplesTruncated:N()}),Mq=d({pageFindings:k(["available","partial","unavailable"]),crossPage:k(["available","unavailable"]),auditedPages:m().int().nonnegative(),pagesWithFindingEvidence:m().int().nonnegative(),pagesWithoutFindingEvidence:m().int().nonnegative(),omittedFindings:m().int().nonnegative()}),l3=d({project:s(),runId:s().nullable(),attemptId:s().nullable(),auditedAt:s().nullable(),runStatus:Q0,complete:N(),termination:s().nullable(),runSelection:Ea.optional(),state:k(["no-crawl","unavailable","partial","available"]),coverage:Mq,total:m().int().nonnegative().nullable(),nextCursor:s().nullable()});l3.extend({issues:y(qq).max(Y0)});l3.extend({issueId:s(),pages:y(r3).max(Y0)});new Set(o2.map(e=>e.toLowerCase()));const Bq=4,c3=3;function Pae(e){return e.filter(n=>za(n).length>=c3)}const Lq=10,qae=24,Uq="bulk-add-unacknowledged";k([Uq]);const Vq=80,u3=k(["too-long","too-short","project-brand","other-competitor","market-competitor","claimed-by-alias"]);u3.enum;const d3=k(["too-long","too-short","blocked","already-matched","subsumed","project-brand","other-competitor","over-limit"]);d3.enum;const m3=y(s()).describe(`Operator-curated names this competitor goes by in answer text (at most ${Lq}, each ${Vq} characters or fewer, at least ${c3} letters or digits).`);d({aliases:m3});const Kc=s().trim().min(1).refine(e=>!!VO(e),{message:"Competitor domain must be a valid domain or URL"}),$q=d({domain:Kc,aliases:m3.optional()}),X0=Fe([Kc,$q]),eS=d({domain:s(),before:y(s()),after:y(s())}).strict(),Kq=d({domain:s(),alias:s(),reason:u3,conflictsWith:s().optional(),conflictingName:s().optional(),markets:y(s()).optional(),supersededRevision:m().int().optional()}).strict(),Gq=d({domain:s(),alias:s(),reason:d3,stored:N(),conflictsWith:s().optional(),conflictingName:s().optional()}).strict();function p3(e,n){return Number((n===Fa.percent?e:e*100).toFixed(6))}function h3(e){return Math.round(Number((e*10).toFixed(4)))/10}function um(e,n=Fa.fraction){if(e==null||!Number.isFinite(e))return"—";const i=p3(e,n);if(i===0)return"0%";const r=i<0?"-":"",u=Math.abs(i);if(u===100)return`${r}100%`;const h=h3(u);return h===0?`${r}<0.1%`:h===100&&u<100?`${r}>99.9%`:`${r}${h.toFixed(1)}%`}function Mae(e){return Number.isFinite(e)?Math.abs(e)>=1e6?`${(e/1e6).toFixed(1)}M`:Math.abs(e)>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString("en-US"):"—"}function Bae(e){if(!e)return"—";try{const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),i={month:"short",day:"numeric",year:"numeric"},r=n&&n[1]&&n[2]&&n[3]?new Date(Date.UTC(Number(n[1]),Number(n[2])-1,Number(n[3]))):new Date(e);return Number.isNaN(r.getTime())?e:r.toLocaleDateString("en-US",n?{...i,timeZone:"UTC"}:i)}catch{return e}}const Hq=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Rc(e,n=new Date){const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),r=i?Hq[Number(i[2])-1]:void 0;if(!i||!r)return e;const u=`${r} ${Number(i[3])}`;return Number(i[1])===n.getFullYear()?u:`${u}, ${i[1]}`}function Lae(e,n,i=800){const r=[];if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(n))return r;for(let u=e;u<=n&&(r.push(u),!(r.length>=i));u=Fq(u,1));return r}function Fq(e,n){if(!Number.isFinite(n))return e;const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!i?.[1]||!i[2]||!i[3])return e;const r=new Date(Date.UTC(Number(i[1]),Number(i[2])-1,Number(i[3])+Math.trunc(n)));if(Number.isNaN(r.getTime()))return e;const u=r.getUTCFullYear(),h=String(r.getUTCMonth()+1).padStart(2,"0"),f=String(r.getUTCDate()).padStart(2,"0");return`${u}-${h}-${f}`}function Uae(e,n=Fa.fraction){const i=p3(e,n);if(i===0)return{direction:"none",magnitude:"0"};const r=h3(Math.abs(i));return{direction:i>0?"up":"down",magnitude:r===0?"<0.1":r.toFixed(1)}}function Vae(e,n="UTC"){const i=new Date(e);if(!Number.isFinite(i.getTime()))return null;const r={weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"};try{return i.toLocaleString("en-US",{...r,timeZone:n})}catch{return i.toLocaleString("en-US",{...r,timeZone:"UTC"})}}const Qq=d({basis:k(["tracked","observed"]).nullable(),availability:k(["measured","not-measured","unavailable"]),reason:k(["select-query-class","answer-selection","no-competitors","insufficient-observed","no-answers","no-mentions","unavailable"]).nullable()}),J0=Qq.partial().shape,f3=k(["introduced","repointed","retired"]),Zq=f3.enum;d({modelId:s().trim().min(1),date:s().regex(/^\d{4}-\d{2}-\d{2}$/,"date must be YYYY-MM-DD"),kind:f3,confirmed:N(),sourceUrl:s().url(),note:s().min(1)});const Yq=[{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.'}];Zq.repointed;new Set(Yq.map(e=>e.modelId.toLowerCase()));const Xq=k(["not-exposed","no-known-change","known-change"]);Xq.enum;const Jq=d({modelId:s().trim().min(1),date:s().regex(/^\d{4}-\d{2}-\d{2}$/),confirmed:N(),sourceUrl:s().url()}),Wq=d({status:k(["no-known-change","known-change"]),modelIds:y(s().trim().min(1)).min(1),changes:y(Jq),changeCount:m().int().nonnegative(),unverifiedChangeCount:m().int().nonnegative(),firstChangeDate:s().optional(),lastChangeDate:s().optional(),knownGoodAsOf:s(),checkedThroughPeriodEnd:N()}),eM={openai:"ChatGPT",chatgpt:"ChatGPT",anthropic:"Claude",claude:"Claude",google:"Gemini",gemini:"Gemini",perplexity:"Perplexity"};function tM(e){const n=e.trim().toLowerCase();return eM[n]??e.charAt(0).toUpperCase()+e.slice(1)}function Bf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):0}function bc(e){return typeof e=="string"&&e.trim().length>=10?e.trim().slice(0,10):null}function Lf(e){return[...new Set(e.filter(n=>n!==null))].sort()}function nM(e,n,i){const r=i(e),u=Array.isArray(n.changes)?n.changes:[],h=Bf(n.changeCount)||u.length,f=Math.min(h,Bf(n.unverifiedChangeCount)||Bf(n.unconfirmedChangeCount)||u.filter(j=>j.confirmed===!1).length),b=bc(n.knownGoodAsOf),v=n.checkedThroughPeriodEnd!==!1,x={engine:r,confirmedCount:h-f,unconfirmedCount:f,knownGoodAsOf:b,checkedThroughPeriodEnd:v};if(u.length>0)return{...x,confirmedDates:Lf(u.filter(j=>j.confirmed!==!1).map(j=>bc(j.date))),unconfirmedDates:Lf(u.filter(j=>j.confirmed===!1).map(j=>bc(j.date)))};const S=Lf([bc(n.firstChangeDate),bc(n.lastChangeDate)]);return h===0?{...x,confirmedDates:[],unconfirmedDates:[]}:f===0?{...x,confirmedDates:S,unconfirmedDates:[]}:x.confirmedCount===0?{...x,confirmedDates:[],unconfirmedDates:S}:{...x,confirmedDates:[],unconfirmedDates:[]}}function aM(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 tS(e,n){return e.length===0?null:e.length===1&&n<=1?`on ${Rc(e[0])}`:`more than once between ${Rc(e[0])} and ${Rc(e[e.length-1])}`}function iM(e){const n=tS(e.confirmedDates,e.confirmedCount),i=tS(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 u=e.unconfirmedCount>1?"more times":"once more";return`${r} was updated inside this period, and may have been updated ${u}, though that is not confirmed.`}function nS(e){const n=e.filter(r=>!r.checkedThroughPeriodEnd&&r.knownGoodAsOf!==null);if(n.length===0)return null;const i=n.map(r=>r.knownGoodAsOf).sort()[0];return`We last checked for model updates on ${Rc(i)}, and this period runs past that date, so there may be later updates we do not know about.`}function $ae(e,n={}){const i=n.engineName??tM,r=Object.entries(e??{}).map(([S,j])=>nM(S,j??{},i)).sort((S,j)=>S.engine.localeCompare(j.engine));if(r.length===0)return null;const u=r.filter(S=>S.confirmedCount+S.unconfirmedCount>0);if(u.length===0){const S=[...new Set(r.map(q=>q.engine))],j=S.length>1,C=nS(r),T=[...new Set(r.map(q=>q.knownGoodAsOf).filter(q=>q!==null))].sort(),z=C??(T.length>0?`We last checked for model updates on ${Rc(T[0])}.`:null);return{kind:"no-known-change",text:`No model updates are on record for ${aM(S)} in this period.`,detail:`${j?"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.${z?` ${z}`:""}`}}const h=u.reduce((S,j)=>S+j.confirmedCount+j.unconfirmedCount,0),f=u.some(S=>S.confirmedCount>0),b=h===1?"this update":"these updates",v=f?`Some of the movement in these numbers may come from ${b} 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 ${b} rather than from a real change in how AI answers about you, so compare periods carefully.`,x=nS(r);return{kind:"change",text:`${u.map(iM).join(" ")} ${v}${x?` ${x}`:""}`}}const W0=k(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);W0.enum;const e1=k(["cited","aspirational","wasted-surface"]),aS=e1.enum;aS.cited,aS.aspirational;const ou=k(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),sM=ou.enum;sM["direct-competitor"];const Zm=k(["queued","seeding","probing","completed","failed"]);Zm.enum;const g3=d({domain:s().min(1),hits:m().int().positive(),competitorType:ou.default("unknown")}),oM=d({id:s(),sessionId:s(),projectId:s(),query:s(),bucket:e1.nullable().default(null),citationState:Ki,citedDomains:y(s()).default([]),answerMentioned:N().nullable().default(null),createdAt:s()}),rM=d({id:s(),projectId:s(),status:Zm,icpDescription:s().nullable().optional(),seedProvider:s().nullable().optional(),seedCountRaw:m().int().nullable().optional(),seedCount:m().int().nullable().optional(),seedFromAnswerCount:m().int().nullable().optional(),seedFromGroundingCount:m().int().nullable().optional(),seedBrandFilteredCount:m().int().nullable().optional(),buyerDescription:s().nullable().optional(),locations:y(Jt).nullable().optional(),seedRawCandidates:y(s()).nullable().optional(),dedupClusterMinSims:y(m()).nullable().optional(),dedupBandPairFraction:we().nullable().optional(),dedupPairsTotal:m().int().nullable().optional(),seedProviders:y(s()).nullable().optional(),seedProviderCounts:Ke(s(),m().int()).nullable().optional(),canonicalCount:m().int().nullable().optional(),dedupThreshold:m().nullable().optional(),probeCount:m().int().nullable().optional(),citedCount:m().int().nullable().default(null),aspirationalCount:m().int().nullable().default(null),wastedCount:m().int().nullable().default(null),competitorMap:y(g3).default([]),warning:s().nullable().optional(),error:s().nullable().optional(),startedAt:s().nullable().optional(),finishedAt:s().nullable().optional(),createdAt:s()});rM.extend({probes:y(oM).default([])});const lM=500,cM=8,uM=["gemini","openai"],dM=k(uM);d({icpDescription:s().min(1).optional(),buyerDescription:s().min(1).optional(),seedProviders:y(dM).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:m().min(0).max(1).optional(),maxProbes:m().int().positive().max(lM).optional(),probeConcurrency:m().int().min(1).max(cM).optional(),locations:y(s().min(1)).optional()});d({buckets:y(e1).min(1).optional(),includeCompetitors:N().optional(),competitorTypes:y(ou).min(1).optional()});const t1=d({domain:s().min(1),hits:m().int().positive(),competitorType:ou,sources:y(g3)}),y3=k(["already-tracked","project-domain","shared-host","claimed-by-alias"]);y3.enum;const b3=t1.extend({reason:y3,message:s()});d({sessionId:s(),projectId:s(),status:Zm,queriesByBucket:d({cited:y(s()),aspirational:y(s()),"wasted-surface":y(s())}),suggestedCompetitors:y(t1),skippedCompetitors:y(b3)});d({sessionId:s(),projectId:s(),promoted:d({queries:y(s()),competitors:y(s())}),skipped:d({queries:y(s()),competitors:y(s())}),competitorDetails:d({promoted:y(t1),skipped:y(b3)})});Fe([E("cli"),s().regex(/^discovery:.+$/)]);const mM=d({query:s().min(1),probeHits:m().int().positive()}),pM=d({rawCandidates:m().int().nonnegative(),admitted:m().int().nonnegative(),rejected:d({belowFloor:m().int().nonnegative(),length:m().int().nonnegative(),navigational:m().int().nonnegative(),duplicate:m().int().nonnegative(),offAnchor:m().int().nonnegative(),semanticDuplicate:m().int().nonnegative()})});d({sessionId:s(),projectId:s(),provider:s(),status:Zm,minProbeHits:m().int().positive(),anchorApplied:N(),semanticNoveltyApplied:N(),candidates:y(mM),stats:pM});const n1=k(["own","direct-competitor","ota-aggregator","editorial-media","other"]);n1.enum;const Ls=k(tl.metrics),iS=k(["improving","declining","stable"]),hM=k(["mentioned","cited"]);hM.enum;const zg=d({citationRate:we(),cited:m().int(),total:m().int(),mentionRate:we(),mentionedCount:m().int()}),sl=s().trim().min(1),fM=y(sl).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]})}),Do=Ue("status",[d({status:E("known"),model:sl}),d({status:E("unknown")}),d({status:E("mixed"),models:fM,includesUnknown:N()})]),gM=d({observedAt:s(),bucketStartDate:s(),from:Do,to:Do,fromPreWindowAnchor:N().optional(),anchorObservedAt:s().optional()}),v3=d({latestObservation:d({observedAt:s(),state:Do}),events:y(gM),eventTotal:m().int().nonnegative().optional(),anchorUnavailable:N().optional()}),yM=Ke(s(),v3),bM=v3.extend({latestServedModelIds:y(sl).default([])}),vM=Ke(s(),bM),xM=d({observedAt:s(),configured:Do,served:Do}),wM=d({scope:k(["non-brand","pooled"]),rate:we().nullable(),projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative()}),SM=d({startDate:s(),endDate:s(),dataStartDate:s(),dataEndDate:s(),sweepCount:m().int().nonnegative(),citationRate:we(),cited:m().int(),total:m().int(),queryCount:m().int(),mentionRate:we(),mentionedCount:m().int(),mentionShare:wM,byProvider:Ke(s(),zg),modelEvidenceByProvider:Ke(s(),Do).default({}),basketRevision:m().int().nullable().default(null)}),Uf=d({first:we(m().min(0).max(1)),latest:we(m().min(0).max(1)),delta:we(m().min(-1).max(1))}),kM=d({citationRate:Uf.nullable(),mentionRate:Uf.nullable(),mentionShare:Uf.nullable()}),jM=d({revision:m().int(),at:s(),added:y(s()),removed:y(s())}),AM=d({date:s(),delta:m().int(),label:s()}),NM=d({at:s(),identity:K2}),a1=s().nullable().describe("When the names the project's competitors are matched by last changed: a tracked competitor's curated or stored auto-detected names (a block counts only when it removes a stored name), a detection pass that stored or removed a market-only competitor's learned names, a write that claimed, released or dropped a market-only competitor's learned names, or a published revision that renamed a market pin; null if never. The competitor landscape reads every period with the current names, so a figure for any period quoted before this time was restated at this time. Analytics mention share and project-frame visibility-compare share of voice read only tracked competitors' names, so a market pin or learned-name change moves this time without changing them. Adding or removing a competitor or a pin is a names change only when it moves a stored or learned name."),i1=s().nullable().describe("When the tracked competitor set last changed: a non-empty competitor add, removal, replacement, or discovery promotion. Older replacement audit rows without added/removed fields count conservatively; an identical replacement with both arrays empty does not. Null when the set never changed.");d({window:Ls,mentionShareScope:k(["non-brand","pooled"]),buckets:y(SM),overall:zg,byProvider:Ke(s(),zg),trend:iS,mentionTrend:iS,windowChange:kM.default(()=>({citationRate:null,mentionRate:null,mentionShare:null})),queryChanges:y(AM),basketChanges:y(jM).default([]),executionIdentityChanges:y(NM).default([]),referenceBasketRevision:m().int().nullable().default(null),modelAttribution:yM.default({}),servedModelAttribution:vM.default({}),modelServiceMismatch:Ke(s(),xM).default({}),modelPointerChanges:Ke(s(),Wq).default({}),competitorIdentityChangedAt:a1.optional(),competitorSetChangedAt:i1.optional()});const sS=d({category:W0,label:s(),count:m().int(),percentage:we(),topDomains:y(d({domain:s(),count:m().int()}))}),CM=d({domain:s(),rank:m().int().positive().optional(),count:m().int(),percentage:we(),answerShare:we().optional(),category:W0,label:s(),surfaceClass:n1}),_M=d({surfaceClass:n1,label:s(),count:m().int(),percentage:we(),domainCount:m().int()}),oS=d({totalCitedSlots:m().int(),answerTotal:m().int().optional(),answersWithSources:m().int().optional(),domainTotal:m().int(),entries:y(CM),truncatedDomainCount:m().int(),truncatedCitedSlots:m().int(),bySurfaceClass:y(_M)}),TM=d({answers:y(s()),distinctDomains:y(s()),answerDomainPairs:y(s()),runs:y(s())}),EM=k(["measurement-plan","query-text"]);d({runId:s().trim().min(1).optional(),queryClass:q0.optional(),includeByQuery:k(["true","false","1","0"]).optional()});d({ranked:oS,byProvider:Ke(s(),oS),providersWithoutSources:y(s()).optional(),answerTotal:m().int().optional(),runCount:m().int().optional(),pooledAcrossRuns:N().optional(),unclassifiedAnswers:m().int().optional(),filters:d({runId:s().nullable(),queryClass:q0,queryClassBasis:Fe([EM,de()]),includeByQuery:N()}).optional(),runId:s(),runIds:y(s()).optional(),countUnits:TM.optional(),window:Ls,limit:m().int().nullable(),overall:y(sS),byQuery:Ke(s(),y(sS)).optional()});const x3=k(["own","direct-competitor","ota-aggregator","editorial-media","other","unknown"]),w3=Ue("kind",[d({kind:E("project")}).strict(),d({kind:E("group"),groupKey:s().trim().min(1)}).strict(),d({kind:E("all-markets")}).strict()]),S3=k(["all","branded","non-brand"]),k3=k(["project","all-markets"]);d({window:Ls.optional(),groupKey:s().trim().min(1).optional(),scope:k3.optional(),provider:s().trim().min(1).optional(),model:sl.optional(),groupBy:E("model").optional(),queryClass:S3.optional(),location:s().trim().min(1).optional(),runId:s().trim().min(1).optional(),answers:k(["all","not-mentioned"]).optional()}).strict().superRefine((e,n)=>{e.scope==="all-markets"&&e.groupKey!==void 0&&n.addIssue({code:"custom",path:["groupKey"],message:"groupKey cannot be combined with scope=all-markets"}),e.model!==void 0&&e.provider===void 0&&n.addIssue({code:"custom",path:["provider"],message:"provider is required when filtering by model"})});const Ts=d({domain:s().trim().min(1),label:s().trim().min(1),surfaceClass:x3,pinned:N(),mentionCount:m().int().nonnegative(),shareOfVoice:ot(m().min(0).max(100)).nullable(),citationCount:m().int().nonnegative(),answeredResults:m().int().nonnegative(),firstSeenAt:s().datetime().nullable(),lastSeenAt:s().datetime().nullable(),sampleUrls:y(s().url()).max(3)}).strict(),j3=d({answeredResults:m().int().nonnegative(),sourceResults:m().int().nonnegative(),missingAnswerTextResults:m().int().nonnegative(),mentionCredits:m().int().nonnegative(),incompleteSourceResults:m().int().nonnegative(),excludedProbeResults:m().int().nonnegative(),excludedNonCompletedResults:m().int().nonnegative()}).strict(),RM=d({answers:y(s()),distinctNames:y(s()),runs:y(s())}).strict(),DM=50,zM=d({...J0,comparison:y(d({domain:s(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:s(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),provider:s().trim().min(1),model:sl.nullable(),servedModels:Do,snapshotCount:m().int().positive(),project:Ts,pinned:y(Ts),observed:y(Ts),otherSources:y(Ts),evidence:j3,truncated:N()}).strict(),IM=d({basis:E("requested-model"),groups:y(zM).max(DM),totalGroups:m().int().nonnegative(),truncated:N()}).strict();d({...J0,comparison:y(d({domain:s(),mentions:m().int().nonnegative()})).optional(),observedNames:y(d({name:s(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),answerSelection:d({answers:E("not-mentioned"),populationSize:m().int().nonnegative(),answerCount:m().int().nonnegative(),unknownMentionAnswers:m().int().nonnegative()}).strict().optional(),window:Ls,scope:w3,project:Ts,pinned:y(Ts),observed:y(Ts),otherSources:y(Ts),evidence:j3,modelComparison:IM.optional(),marketState:d({activeRevision:m().int().positive(),draft:d({etag:s().trim().min(1),pendingCompetitorDomains:y(s().trim().min(1))}).strict().nullable()}).strict().nullable(),filters:d({scope:k3,groupKey:s().nullable(),provider:s().nullable(),model:sl.optional(),groupBy:E("model").optional(),queryClass:S3,location:s().nullable(),runId:s().nullable(),answers:k(["all","not-mentioned"]).optional()}).strict(),truncated:N(),runCount:m().int().nonnegative().optional(),runIds:y(s()).optional(),countUnits:RM.optional(),competitorIdentityChangedAt:a1.optional(),competitorSetChangedAt:i1.optional(),competitorListRestated:N().optional()}).strict();const s1=d({total:m().int(),checked:m().int(),mentioned:m().int(),cited:m().int(),mentionRate:we().nullable(),citedRate:we().nullable()}),A3=s1.extend({provider:s(),firstObserved:s(),lastObserved:s()}),OM=s1.extend({queryId:s().nullable(),query:s(),firstObserved:s(),lastObserved:s(),providers:y(A3).optional()}),PM=d({since:s().nullable(),until:s().nullable(),lastRuns:m().int().nullable(),runCount:m().int()}),qM=k(["provider"]),Ig=d({domain:s(),mentions:m().int()}),Og=d({...J0,measurementScope:k(["project","all-markets"]).optional(),queryClass:k(["branded","non-brand","pooled"]),percent:ot().nullable(),competitorCount:m().int().nonnegative(),projectMentions:m().int(),competitorMentions:m().int(),snapshotsWithAnswerText:m().int(),perCompetitor:y(Ig)});d({project:s(),groupBy:qM.optional(),window:PM,totals:s1,byProvider:y(A3).optional(),queries:y(OM),shareOfVoice:Og.optional()});const MM=k(["within-noise","moved","insufficient-data","model-discontinuous","model-unknown"]),BM=k(["up","down","flat"]),rS=d({availability:k(["available","no-observations","no-competitive-frame","classification-unavailable"]),point:we().nullable(),ciLow:we().nullable(),ciHigh:we().nullable(),numerator:m().int(),denominator:m().int(),excludedUnknown:m().int().nonnegative().optional()}),LM=k(["mention-share-of-voice","cited-share-of-voice","mention-rate","cited-rate","mention-rate-branded","cited-rate-branded","mention-rate-non-brand","cited-rate-non-brand"]),UM=d({key:LM,label:s(),queryClass:k(["all","branded","non-brand","pooled"]),driftRobust:N(),from:rS,to:rS,rateRatio:m().nullable(),direction:Fe([BM,de()]),verdict:MM}),dm=d({month:s(),since:s(),until:s(),runCount:m().int(),lowRunCount:N()}),N3=d({queryCount:m().int(),excludedFromOnly:m().int(),excludedToOnly:m().int(),providers:y(s()),excludedProviders:y(s())}),C3=d({provider:s(),fromModels:y(s()),toModels:y(s())}),VM=k(["included","model-discontinuous","model-unknown"]),$M=d({provider:s(),status:VM,fromModels:y(s()),toModels:y(s())}),KM=k(["comparable","model-discontinuous","model-unknown","insufficient-data"]),_3=d({status:KM,comparedProviders:y(s()),providers:y($M)}),GM=d({provider:s(),from:d({checked:m().int(),mentioned:m().int(),cited:m().int()}),to:d({checked:m().int(),mentioned:m().int(),cited:m().int()})}),HM=d({from:d({count:m().int(),of:m().int()}),to:d({count:m().int(),of:m().int()})}),FM=d({scope:k(["project","group","market","property"]).optional(),scopeKey:s().min(1).optional(),marketKey:s().min(1).optional(),provider:s().min(1).optional(),location:s().min(1).optional()}),QM=d({from:dm,to:dm,basket:N3,continuity:_3,modelChanges:y(C3)});d({project:s(),selection:FM.optional(),classComparison:QM.optional(),from:dm,to:dm,basket:N3,metrics:y(UM),queriesMentioned:HM,byProvider:y(GM),modelChanges:y(C3),continuity:_3,competitors:d({from:y(Ig),to:y(Ig)}),competitorIdentityChangedAt:a1.optional(),competitorSetChangedAt:i1.optional()});const T3=k(["add","remove","replace","aliases"]),zd=T3.enum,E3=k(["basis-changed","auto-alias-rescan-pending","no-latest-sweep","pooled"]);E3.enum;Ue("change",[d({change:E(zd.add),competitors:y(X0).min(1)}).strict(),d({change:E(zd.remove),competitors:y(s().trim().min(1)).min(1)}).strict(),d({change:E(zd.replace),competitors:y(Kc)}).strict(),d({change:E(zd.aliases),domain:Kc,aliases:y(s().trim().min(1)),mode:k(["set","add"])}).strict()]);const R3=d({instrument:E("competitor-landscape"),queryClass:k(["non-brand","pooled"]),scope:k(["project","all-markets"]),runIds:y(s()),runCount:m().int().nonnegative(),sweepAt:s().datetime().nullable(),before:Og,after:Og,deltaPercent:ot().nullable(),restatesHistory:E(!0),caveats:y(E3)}).strict(),ZM=d({limit:m().int().positive(),count:m().int().nonnegative(),acknowledgementRequired:N()}).strict();d({project:s().trim().min(1),change:T3,plan:d({added:y(s()),alreadyTracked:y(s()),removed:y(s()),aliasChanges:y(eS),droppedAliases:y(Kq),autoAliasChanges:y(eS),droppedAutoAliases:y(Gq)}).strict(),bulkAdd:ZM,impact:R3}).strict();const D3=k(["openai-annotation","claude-citation","gemini-support","perplexity-marker","answer-link","answer-host"]);D3.enum;const z3=d({name:s(),directPairs:m().int().nonnegative(),cooccurrences:m().int().nonnegative(),namingAnswers:m().int().nonnegative(),precision:we(m().min(0).max(1)),lift:m().nonnegative().nullable().optional(),nameCasedAnswers:m().int().nonnegative().optional(),runs:m().int().nonnegative(),firstSeen:s(),lastSeen:s(),addedAt:s()}),YM=k(["added","kept","removed","review","rejected"]),I3=k(["name-shape","too-few-pairs","too-few-runs","too-few-naming-answers","low-precision","low-lift","lowercase-usage","other-competitor-dominates","no-label-affinity","needs-approval","subsumed","too-long","too-short","blocked","already-matched","project-brand","other-competitor","over-limit"]),XM=d({name:s(),status:YM,reason:I3.optional(),conflictsWith:s().optional(),directPairs:m().int().nonnegative(),runs:m().int().nonnegative(),cooccurrences:m().int().nonnegative(),namingAnswers:m().int().nonnegative(),citingAnswers:m().int().nonnegative(),nameCasedAnswers:m().int().nonnegative(),precision:we(m().min(0).max(1)).nullable(),lift:m().nonnegative().nullable(),otherCompetitorPairs:m().int().nonnegative(),labelAffinity:N(),via:y(D3),firstSeen:s(),lastSeen:s()}),JM=d({domain:s(),marketKeys:y(s()).optional(),aliases:y(s()),autoAliases:y(z3),blockedAliases:y(s()),added:y(s()),removed:y(d({name:s(),reason:I3,conflictsWith:s().optional()})),candidates:y(XM)});d({project:s(),applied:N(),changed:N(),scan:d({runs:m().int().nonnegative(),snapshots:m().int().nonnegative(),answers:m().int().nonnegative(),maxRuns:m().int().positive(),maxSnapshots:m().int().positive(),providerCitations:N()}),thresholds:d({minDirectPairs:m().int().positive(),minRuns:m().int().positive(),minNamingAnswers:m().int().positive(),minPrecision:we(m().min(0).max(1)),minLift:m().positive(),minNameCasedShare:we(m().min(0).max(1)),minKeyLength:m().int().positive(),dominanceMultiple:m().positive(),removeBelowPrecision:we(m().min(0).max(1)),removeBelowLift:m().nonnegative(),removeBelowNameCasedShare:we(m().min(0).max(1))}),competitors:y(JM),impact:R3.optional()});d({aliases:y(s().trim().min(1)).min(1).describe("Names to block from (or release back to) answer-derived auto-detection for this competitor. Compared by brand key, so case, spacing and punctuation variants are one name.")});const Ym=k(["cli","api","config-file"]);function WM(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 eB(e,n){return n?e.some(i=>i.label===n):!0}const o1=k(["off","preview","apply"]);o1.options;const r1=o1.optional().describe("Answer-derived competitor alias detection mode for the unattended passes queued after a completed or partial sweep, a competitor add, an unblock or a market pin write that changes pins: `off` (no pass), `preview` (the pass logs what it would add or remove and stores nothing; a new project starts here) or `apply` (the pass stores detected names and removes stored ones it no longer keeps, which restates every period's competitor counts). Omit to keep the stored mode. An explicit apply (POST /projects/{name}/competitor-auto-aliases) stores in every mode."),l1=20,c1=200,tB=d({displayName:s().min(1),canonicalDomain:s().min(1),ownedDomains:y(s().min(1)).optional(),aliases:y(s()).optional(),country:s().length(2),language:s().min(2),tags:y(s()).optional(),labels:Ke(s(),s()).optional(),providers:y(bt).optional(),providerModels:Mo.optional(),providerDispatchModes:al.optional(),locations:y(Jt).optional(),defaultLocation:s().nullable().optional(),measurement:ui.optional(),autoExtractBacklinks:N().optional(),qualifiedAliases:y(s().trim().min(1).max(c1)).max(l1).optional(),negativeReviewMaxStars:Bm.nullable().optional(),siteAuditMaxPages:su.nullable().optional(),competitorAutoAliases:r1,configSource:Ym.optional()});d({displayName:s().min(1).optional(),canonicalDomain:s().min(1).optional(),ownedDomains:y(s().min(1)).optional(),aliases:y(s()).optional(),country:s().length(2).optional(),language:s().min(2).optional(),tags:y(s()).optional(),labels:Ke(s(),s()).optional(),providers:y(bt).optional(),providerModels:Mo.optional(),providerDispatchModes:al.optional(),locations:y(Jt).optional(),defaultLocation:s().nullable().optional(),measurement:ui.partial().strict().optional(),autoExtractBacklinks:N().optional(),qualifiedAliases:y(s().trim().min(1).max(c1)).max(l1).optional(),negativeReviewMaxStars:Bm.nullable().optional(),siteAuditMaxPages:su.nullable().optional(),competitorAutoAliases:r1,expectedConfigRevision:m().int().positive().optional()}).strict();tB.extend({name:s().trim().min(1).max(120)});const nB=d({id:s(),name:s(),displayName:s().optional(),canonicalDomain:s(),ownedDomains:y(s()).default([]),aliases:y(s()).default([]),qualifiedAliases:y(s()).default([]),country:s().length(2),language:s().min(2),tags:y(s()).default([]),labels:Ke(s(),s()).default({}),providers:y(s()).default([]),providerModels:Mo.default({}),providerDispatchModes:al.default({}),locations:y(Jt).default([]),defaultLocation:s().nullable().optional(),measurement:ui.default(f2),autoExtractBacklinks:N().default(!1),negativeReviewMaxStars:Bm.nullable().optional(),siteAuditMaxPages:su.nullable().optional(),competitorAutoAliases:o1.optional().describe("Answer-derived competitor alias detection mode for the unattended passes queued after a completed or partial sweep, a competitor add, an unblock or a market pin write that changes pins. `preview` (every project's default): the pass scores the stored answers and logs what it would add or remove, storing nothing. `apply`: the pass stores the detected names and removes stored ones it no longer keeps; the read-time competitor matchers then use them, restating every period's competitor counts (see competitorIdentityChangedAt). `off`: no pass runs. An explicit apply (POST /projects/{name}/competitor-auto-aliases) stores in every mode; switching to preview or off keeps names already stored. Absent only from a server that predates the setting."),answerFieldsRecompute:k(["full","competitors"]).nullable().optional(),configSource:Ym.default("cli"),configRevision:m().int().positive().default(1),createdAt:s().optional(),updatedAt:s().optional()});d({defaultLocation:s()});d({id:s(),query:s(),createdAt:s(),queryClass:Bo.nullable().optional()});d({id:s(),keyword:s(),createdAt:s()});d({queries:y(s().trim().min(1)).min(1)});d({keywords:y(s().trim().min(1)).min(1)});d({provider:bt,count:m().int().min(1).max(20).optional()});d({queries:y(s()),provider:s()});d({keywords:y(s()),provider:s()});d({id:s(),domain:s(),aliases:y(s()),autoAliases:y(z3).optional(),blockedAliases:y(s()).optional(),marketKeys:y(s()).optional(),createdAt:s()});d({competitors:y(s().trim().min(1)).min(1)});d({competitors:y(X0).min(1),acknowledgeBulkAdd:N().optional()});d({competitors:y(Kc),acknowledgeBulkAdd:N().optional()});function O3(e){const n=[e.canonicalDomain,...e.ownedDomains??[]],i=new Set,r=[];for(const u of n){const h=u.trim();if(!h)continue;const f=Lc(h);i.has(f)||(i.add(f),r.push(h))}return r}function aB(e,n){if(!n||n.length===0)return[];const i=e?.trim().toLowerCase()??"",r=new Set,u=[];for(const h of n){const f=h.trim();if(!f)continue;const b=f.toLowerCase();b!==i&&(r.has(b)||(r.add(b),u.push(f)))}return u}function iB(e){const n=[],i=new Set,r=h=>{const f=za(h);!f||i.has(f)||(i.add(f),n.push(h))},u=e.displayName?.trim()??"";u&&r(u);for(const h of aB(e.displayName,e.aliases))r(h);for(const h of O3({canonicalDomain:e.canonicalDomain??"",ownedDomains:e.ownedDomains??[]})){const f=E0(h);if(za(f).length>=Bq)r(f);else{const b=Lc(h);b.includes(".")&&r(b)}}return n}const sB=d({name:s().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(s(),s()).optional().default({})}),P3=d({preset:s().min(1).optional(),cron:s().min(1).optional(),recurrence:qm.optional(),timezone:s().optional().default("UTC"),providers:y(bt).optional().default([]),enabled:N().optional()});function q3(e){return[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1}const M3={message:'Exactly one of "preset", "cron", or "recurrence" must be provided'},oB=P3.refine(q3,M3).optional(),rB=d({id:s().min(1).optional(),channel:E("webhook"),url:s().url(),events:y(Mm).min(1)}),lB=d({gsc:d({propertyUrl:s()}).optional(),syncSchedule:d({preset:s().optional(),cron:s().optional()}).optional()}).optional(),Pg=y(s().min(1)),B3={displayName:s().min(1),canonicalDomain:s().min(1),ownedDomains:y(s().min(1)).optional().default([]),aliases:y(s().min(1)).optional().default([]),qualifiedAliases:y(s().min(1).max(c1)).max(l1).optional(),country:s().length(2),language:s().min(2),queries:Pg.optional(),keywords:Pg.optional(),competitors:y(X0).optional().default([]),providers:y(bt).optional().default([]),providerModels:Mo.optional().default({}),providerDispatchModes:al.optional(),locations:y(Jt).optional().default([]),defaultLocation:s().optional(),measurement:ui.optional().default(f2),schedule:oB,notifications:y(rB).optional().default([]),google:lB,autoExtractBacklinks:N().optional().default(!1),negativeReviewMaxStars:Bm.optional(),siteAuditMaxPages:su.nullable().optional(),competitorAutoAliases:r1};function L3(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=WM(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),eB(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})}const cB=d(B3).superRefine(L3),uB=d({apiVersion:E("canonry/v1"),kind:E("Project"),metadata:sB,spec:cB});uB.extend({spec:d({...B3,queries:Pg,providerModels:Mo.optional(),schedule:P3.extend({enabled:N()}).refine(q3,M3).optional(),autoExtractBacklinks:N().optional()}).superRefine(L3)});function sn(e){return d({before:e.nullable(),after:e.nullable()})}const dB=d({displayName:s().optional(),canonicalDomain:s().optional(),ownedDomains:y(s()).optional(),aliases:y(s()).optional(),qualifiedAliases:y(s()).optional(),country:s().optional(),language:s().optional(),labels:Ke(s(),s()).optional(),providers:y(s()).optional(),providerModels:Mo.optional(),providerDispatchModes:al.optional(),"measurement.marketingHosts":ui.shape.marketingHosts.optional(),"measurement.brandTerms":ui.shape.brandTerms.optional(),"measurement.leadEventNames":ui.shape.leadEventNames.optional(),locations:y(Jt).optional(),defaultLocation:s().nullable().optional(),autoExtractBacklinks:N().optional(),negativeReviewMaxStars:m().int().nullable().optional(),siteAuditMaxPages:m().int().nullable().optional(),competitorAutoAliases:k(["off","preview","apply"]).optional(),configSource:Ym.optional()}).strict(),mB=d({displayName:sn(s()).optional(),canonicalDomain:sn(s()).optional(),ownedDomains:sn(y(s())).optional(),aliases:sn(y(s())).optional(),qualifiedAliases:sn(y(s())).optional(),country:sn(s()).optional(),language:sn(s()).optional(),labels:sn(Ke(s(),s())).optional(),providers:sn(y(s())).optional(),providerModels:sn(Mo).optional(),providerDispatchModes:sn(al).optional(),"measurement.marketingHosts":sn(ui.shape.marketingHosts).optional(),"measurement.brandTerms":sn(ui.shape.brandTerms).optional(),"measurement.leadEventNames":sn(ui.shape.leadEventNames).optional(),locations:sn(y(Jt)).optional(),defaultLocation:sn(s()).optional(),autoExtractBacklinks:sn(N()).optional(),negativeReviewMaxStars:sn(m().int()).optional(),siteAuditMaxPages:sn(m().int().nullable()).optional(),competitorAutoAliases:sn(k(["off","preview","apply"])).optional(),configSource:sn(Ym).optional()}).strict(),qg=d({cron:s().optional(),preset:s().optional(),recurrence:qm.optional(),timezone:s(),providers:y(s()),enabled:N()}).strict(),pB=d({domain:s(),alias:s(),reason:k(["too-long","too-short","project-brand","other-competitor","market-competitor","claimed-by-alias"]),conflictsWith:s().optional(),conflictingName:s().optional(),markets:y(s()).optional()}).strict(),hB=d({id:s(),url:s().optional(),urlHost:s(),events:y(s()),enabled:N(),source:s().optional()});d({project:d({id:s(),name:s()}),configRevision:m().int(),fields:dB,queries:y(d({id:s(),text:s()})),competitors:y(d({id:s(),domain:s(),aliases:y(s())})),schedule:qg.nullable(),notifications:y(hB),managed:d({queries:N(),competitors:N(),schedule:N(),notifications:N()}),detachedSnapshotCount:m().int().nonnegative()});const U3=d({urlHost:s(),events:y(s())}),fB=U3.extend({id:s()}),gB=d({id:s(),urlHost:s(),urlChanged:N(),eventsBefore:y(s()),eventsAfter:y(s())});d({project:d({id:s().nullable(),name:s()}),action:k(["create","update","none"]),changed:N(),configRevision:d({before:m().int().nullable(),after:m().int()}),fields:mB,queries:d({managed:N(),added:y(s()),removed:y(s()),unchangedCount:m().int().nonnegative(),snapshotsDetached:m().int().nonnegative()}),competitors:d({managed:N(),added:y(s()),removed:y(s()),aliasChanges:y(d({domain:s(),before:y(s()),after:y(s())})),droppedAliases:y(pB)}),schedule:d({managed:N(),action:k(["create","update","delete","none"]),before:qg.nullable(),after:qg.nullable()}),notifications:d({managed:N(),added:y(U3),removed:y(fB),kept:y(gB),secretsRotated:m().int().nonnegative()}),effects:y(k(["mention-backfill","competitor-rescore","competitor-auto-alias-rescan","schedule-reload","gsc-property-update"]))});const V3=k(["stored","live","write"]);Object.freeze(V3.enum);const yB=1,bB=s().refine(e=>e.trim().length>0,{message:"Must not be blank"}),$3=d({displayName:s(),aliases:y(s()),canonicalDomain:s(),ownedDomains:y(s()),qualifiedAliases:y(s()).optional()}).strict(),K3=d({provider:bt.refine(e=>e.trim().length>0,{message:"Provider must not be blank"}),requestedModel:s().nullable()}).strict(),G3=d({domain:s(),label:s(),aliases:y(s())}).strict(),H3=d({queryId:bB,queryText:s(),provenance:s().nullable()}).strict(),vB=H3.extend({queryClass:Bo.nullable()}).strict();function F3(e,n){const i=new Set;e.engines.forEach((h,f)=>{const b=h.provider.trim().toLocaleLowerCase("en");i.has(b)&&n.addIssue({code:fe.custom,path:["engines",f,"provider"],message:`Duplicate engine provider "${h.provider}"`}),i.add(b)});const r=new Set;e.queries.forEach((h,f)=>{r.has(h.queryId)&&n.addIssue({code:fe.custom,path:["queries",f,"queryId"],message:`Duplicate query id "${h.queryId}"`}),r.add(h.queryId)});const u=new Set;e.competitors?.forEach((h,f)=>{const b=h.domain;u.has(b)&&n.addIssue({code:fe.custom,path:["competitors",f,"domain"],message:`Duplicate competitor domain "${h.domain}"`}),u.add(b)})}d({capturedAt:s().datetime(),identity:$3,country:s(),language:s(),location:Jt.nullable(),engines:y(K3).min(1),competitors:y(G3).optional(),queries:y(H3)}).strict().superRefine(F3);d({schemaVersion:E(yB),capturedAt:s().datetime(),identity:$3,country:s(),language:s(),location:Jt.nullable(),engines:y(K3).min(1),competitors:y(G3).optional(),queries:y(vB)}).strict().superRefine(F3);const xB=k(["auto","simple","advanced"]),wB=k(["simple","advanced"]),Q3=k(["branded","non-brand","unknown","all"]),SB=k(["branded","non-brand","unknown"]),u1=k(["project","group","market","property"]),Z3=Ue("kind",[d({kind:E("all")}).strict(),d({kind:E("none")}).strict(),d({kind:E("exact"),value:s().trim().min(1)}).strict()]);function kB(e){if(e===void 0||e==="")return{kind:"all"};const n=e.normalize("NFKC").trim();return n===""?{kind:"all"}:n.toLocaleLowerCase("en")==="none"?{kind:"none"}:{kind:"exact",value:n}}const St=s().trim().min(1),Gi=s().datetime(),jB={mode:xB.default("auto"),queryClass:Q3.default("non-brand"),scope:u1.default("project"),scopeKey:St.optional(),marketKey:St.optional(),provider:St.optional(),model:St.optional(),location:s().trim().min(1).optional(),from:Gi.optional(),to:Gi.optional(),revision:m().int().positive().optional(),runId:St.optional(),queryKey:St.optional(),queryId:St.optional(),search:s().trim().min(1).optional(),cursor:St.optional(),limit:m().int().min(1).max(100).default(50)},mm=d(jB).strict().superRefine((e,n)=>{e.scope!=="project"&&e.scopeKey===void 0&&n.addIssue({code:fe.custom,path:["scopeKey"],message:`scopeKey is required for ${e.scope} scope`}),e.scope==="project"&&e.scopeKey!==void 0&&n.addIssue({code:fe.custom,path:["scopeKey"],message:"scopeKey is not valid for project scope"}),e.scope==="market"&&e.marketKey!==void 0&&n.addIssue({code:fe.custom,path:["marketKey"],message:"marketKey is not valid for market scope"}),e.from!==void 0&&e.to!==void 0&&e.from>e.to&&n.addIssue({code:fe.custom,path:["to"],message:"to must be on or after from"}),e.queryKey!==void 0&&e.queryId!==void 0&&n.addIssue({code:fe.custom,path:["queryId"],message:"queryKey and queryId cannot both be supplied"})});mm.transform(e=>({...e,location:kB(e.location)}));const Da=d({numerator:m().int().nonnegative().nullable(),denominator:m().int().nonnegative().nullable(),rate:we(m().min(0).max(1)).nullable(),reason:k(["no-population","incomplete","evidence-incomplete","identity-ambiguous","not-applicable"]).optional(),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{if(e.numerator===null||e.denominator===null||e.rate===null){(e.numerator!==null||e.denominator!==null||e.rate!==null||e.reason===void 0)&&n.addIssue({code:fe.custom,message:"Unavailable rates require null values and a reason"}),e.unattributed!==void 0&&n.addIssue({code:fe.custom,path:["unattributed"],message:"Only an available rate can leave answers out"}),e.unchecked!==void 0&&n.addIssue({code:fe.custom,path:["unchecked"],message:"Only an available rate can leave answers out"});return}e.reason!==void 0&&n.addIssue({code:fe.custom,message:"Available rates cannot carry a reason"}),e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:fe.custom,path:["unchecked"],message:"A rate reads one signal: unattributed (mention) and unchecked (citation) cannot share it"});const{numerator:r,denominator:u}=e;u===null||r===null||(u===0&&n.addIssue({code:fe.custom,path:["denominator"],message:"Available rates require a positive denominator"}),r>u&&n.addIssue({code:fe.custom,path:["numerator"],message:"Numerator cannot exceed denominator"}))}),Y3=Ue("kind",[d({kind:E("frozen-simple"),definitionRevision:de()}).strict(),d({kind:E("legacy-simple"),definitionRevision:de()}).strict(),d({kind:E("frozen-advanced"),definitionRevision:m().int().positive()}).strict(),d({kind:E("unsupported-advanced-v1"),definitionRevision:m().int().positive()}).strict()]),pm=d({id:St,label:s().trim().min(1),kind:u1,targetCount:m().int().nonnegative(),parentGroupIds:y(St).optional(),marketKeys:y(St).optional()}).strict(),AB=d({provider:St,model:St}).strict(),NB=d({providers:y(St),models:y(AB),locations:y(Z3)}).strict(),CB=d({queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Da,citationCoverage:Da,propertyReach:Da,outcomes:d({bothSignals:m().int().nonnegative(),mentionedOnly:m().int().nonnegative(),citedOnly:m().int().nonnegative(),neither:m().int().nonnegative(),notMeasured:m().int().nonnegative(),total:m().int().nonnegative()}).strict().superRefine((e,n)=>{e.bothSignals+e.mentionedOnly+e.citedOnly+e.neither+e.notMeasured!==e.total&&n.addIssue({code:fe.custom,message:"Outcome partition must sum to total"})}),notMeasuredUnchecked:m().int().positive().optional()}).strict().superRefine((e,n)=>{e.notMeasuredUnchecked!==void 0&&e.notMeasuredUnchecked>e.outcomes.notMeasured&&n.addIssue({code:fe.custom,path:["notMeasuredUnchecked"],message:"notMeasuredUnchecked is a subset of outcomes.notMeasured"})}),_B=d({runId:St,createdAt:Gi,revision:m().int().positive().nullable(),provenance:Y3,queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Da,citationCoverage:Da,continuity:d({state:k(["first","comparable","definition-changed","model-changed","legacy-unknown"]),comparedRunId:s().nullable()}).strict()}).strict(),TB=d({sourceSnapshotIds:y(St).default([]),queryKey:St,queryId:s().nullable(),query:s(),provider:St,model:s().nullable(),location:s().nullable(),targetKeys:y(St),marketKeys:y(St).optional(),answerCount:m().int().nonnegative(),mentionCoverage:Da,citationCoverage:Da,uncheckedSources:d({answers:m().int().positive(),citedAnswers:m().int().nonnegative(),citedTargetKeys:y(St)}).strict().superRefine((e,n)=>{e.citedAnswers>e.answers&&n.addIssue({code:fe.custom,path:["citedAnswers"],message:"citedAnswers cannot exceed answers"}),e.citedAnswers===0!=(e.citedTargetKeys.length===0)&&n.addIssue({code:fe.custom,path:["citedTargetKeys"],message:"citedTargetKeys is empty exactly when no saved link cites a Property"})}).optional()}).strict(),EB=d({answerId:St,runId:St,queryKey:St,query:s(),provider:St,model:s().nullable(),location:s().nullable(),targetKeys:y(St),mentioned:N().nullable(),mentionUnavailableReason:E("identity-ambiguous").optional(),cited:N().nullable(),answerText:s().nullable(),createdAt:Gi,sources:y(s()),observedCompetitors:y(St)}).strict(),RB=d({domain:St,answerCount:m().int().nonnegative(),mentionCoverage:Da,citationCoverage:Da}).strict(),DB=d({name:St,answerCount:m().int().nonnegative()}).strict(),zB=Ue("state",[d({state:E("available")}).strict(),d({state:E("unavailable"),reason:E("frozen-competitor-identity-missing")}).strict()]),lS=d({id:St,label:s().trim().min(1),queryCount:m().int().nonnegative(),mentionCoverage:Da,citationCoverage:Da}).strict();function cS(e){return d({items:y(e),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict()}const X3=k(["current-unavailable","previous-unavailable","not-applicable"]),Kae=X3.enum,Vf=Ue("state",[d({state:E("available"),previous:Da,delta:we(m().min(-1).max(1))}).strict(),d({state:E("unavailable"),reason:X3}).strict()]),uS=d({id:St,createdAt:Gi,completedAt:Gi.nullable()}).strict(),J3=k(["no-selected-run","no-previous-run","scoped-run","partial-run","definition-changed","model-changed","legacy-unknown"]),Gae=J3.enum,IB=Ue("state",[d({state:E("available"),previousRun:uS,mentionCoverage:Vf,citationCoverage:Vf,propertyReach:Vf}).strict(),d({state:E("unavailable"),reason:J3,previousRun:uS.nullable()}).strict()]),OB=d({queryClass:SB,summary:CB,trend:y(_B),comparison:IB.optional(),queries:cS(TB),evidence:cS(EB),competitorAvailability:zB,competitors:y(RB),observedCompetitors:y(DB),breakdown:d({properties:y(lS),groups:y(lS)}).strict()}).strict(),PB=k(["measured","not-measured","partial"]),qB=d({state:PB,activeRevision:m().int().positive().nullable(),measuredRevision:m().int().positive().nullable(),awaitingSweep:N(),pendingAssignmentCount:m().int().nonnegative(),completedAt:Gi.nullable()}).strict(),MB=d({mode:wB,queryClass:Q3,scope:pm,market:pm.optional(),provider:s().nullable(),model:s().nullable(),location:Z3,time:d({from:Gi.nullable(),to:Gi.nullable()}).strict(),revision:m().int().positive().nullable(),run:d({id:s().nullable(),explicit:N()}).strict(),provenance:Y3,measurement:qB,availability:Ue("state",[d({state:E("available")}).strict(),d({state:E("unsupported"),reason:E("advanced-v1")}).strict()])}).strict();d({selection:MB,scopeOptions:y(pm),filterOptions:NB,populations:y(OB).min(1)}).strict().superRefine((e,n)=>{const i=e.selection.queryClass==="all"?["branded","non-brand","unknown"]:[e.selection.queryClass],r=e.populations.map(u=>u.queryClass);(r.length!==i.length||r.some((u,h)=>u!==i[h]))&&n.addIssue({code:fe.custom,path:["populations"],message:"Populations must exactly match the selected query class order"});for(const[u,h]of e.populations.entries()){const f=h.comparison;if(f?.state==="available")for(const b of["mentionCoverage","citationCoverage","propertyReach"]){const v=f[b];if(v.state!=="available")continue;const x=["populations",u,"comparison",b],S=h.summary[b].rate,j=v.previous.rate;S===null&&n.addIssue({code:fe.custom,path:x,message:"Available changes require a current rate"}),j===null&&n.addIssue({code:fe.custom,path:[...x,"previous","rate"],message:"Available changes require a previous rate"}),S!==null&&j!==null&&Math.abs(v.delta-(S-j))>Number.EPSILON&&n.addIssue({code:fe.custom,path:[...x,"delta"],message:"Delta must equal current minus previous"}),e.selection.run.id===null&&n.addIssue({code:fe.custom,path:x,message:"Available changes require a selected run"})}}});const W3=k(["retired-scope","retired-market"]),BB=W3.enum,LB=d({reason:W3,kind:u1.exclude(["project"]),key:St}).strict().superRefine((e,n)=>{e.reason===BB["retired-market"]&&e.kind!=="market"&&n.addIssue({code:fe.custom,path:["kind"],message:"retired-market details must name a market"})});function Hae(e){const n=LB.safeParse(e);return n.success?n.data:void 0}function UB(e,n){let i=e;for(const[r,u]of Object.entries(n))i=i.split(`{${r}}`).join(u);return i.trim()}const d1=s().regex(/^[a-f0-9]{64}$/),pa=s().trim().min(1).max(256),Qa=s().trim().min(1).max(4e3),m1=s().datetime(),Xm=s().regex(/^qtw_[a-f0-9]{64}$/),eA=s().regex(/^qtp_[a-f0-9]{64}$/),p1=k(["simple","advanced"]),tA=d({templateId:pa,templateVersion:s().trim().min(1).max(256),template:Qa,bindings:Ke(s().trim().min(1).max(128),s().trim().min(1).max(128)),output:Qa}).strict(),VB=d({source:k(["manual","query-set","template","research","discovery"]),sourceId:pa.nullable(),capturedAt:s().datetime(),template:tA.optional()}).strict().superRefine((e,n)=>{e.source==="template"&&e.template===void 0&&n.addIssue({code:fe.custom,path:["template"],message:"Template provenance is required for a template query."}),e.source!=="template"&&e.template!==void 0&&n.addIssue({code:fe.custom,path:["template"],message:"Only a template query may carry template provenance."})}),$B=Ue("source",[d({source:E("manual"),text:Qa}).strict(),d({source:E("template"),templateId:pa,templateVersion:s().trim().min(1).max(256),template:Qa}).strict(),d({source:E("research"),researchRunQueryId:pa}).strict(),d({source:E("discovery"),discoveryProbeId:pa}).strict()]),h1=d({targetKeys:y(ge).optional(),groupKeys:y(ge).optional(),marketKeys:y(ge).optional()}).strict(),KB=d({providers:y(bt).min(1),models:Ke(bt,s().trim().min(1)),location:s().trim().min(1).nullable()}).strict(),GB=d({input:$B,audience:h1.optional(),contexts:y(KB).min(1).optional(),queryClass:Bo.optional()}).strict(),HB=d({queryId:pa.optional(),queryText:Qa.optional(),audience:h1.optional()}).strict().superRefine((e,n)=>{e.queryId===void 0==(e.queryText===void 0)&&n.addIssue({code:fe.custom,message:"Provide exactly one of queryId or queryText."})}),FB=d({queryId:pa,audience:h1.optional(),text:Qa.optional(),queryClass:Fe([Bo,de()]).optional()}).strict().superRefine((e,n)=>{e.text===void 0&&e.queryClass===void 0&&n.addIssue({code:fe.custom,message:"Provide query text or a classification change."})}),QB=d({additions:y(GB),removals:y(HB),edits:y(FB).optional()}).strict(),ZB=QB.extend({expectedWorkspaceVersion:Xm}).strict();ZB.extend({previewToken:eA,reviewedAt:m1}).strict();const YB=d({stableKey:ge,label:s().trim().min(1)}).strict(),XB=d({stableKey:ge,parentGroupKey:ge.optional(),label:s().trim().min(1),targetKeys:y(ge)}).strict(),JB=d({stableKey:ge,groupKey:ge.optional(),label:s().trim().min(1),usageEdges:y(B0)}).strict(),WB=d({targetKey:ge,groupKeys:y(ge),marketKeys:y(ge),queryClass:Bo.nullable(),classificationSource:k(["frozen","server","operator"]),contexts:y(Vm).min(1)}).strict(),nA=d({queryId:pa,queryText:Qa,normalizedText:Qa,provenance:VB.nullable(),state:k(["tracked","awaiting-sweep"]),lastMeasuredAt:s().datetime().nullable(),assignments:y(WB)}).strict(),eL=d({researchRunId:pa,researchRunQueryId:pa,queryText:Qa,createdAt:s().datetime()}).strict(),tL=d({discoverySessionId:pa,discoveryProbeId:pa,queryText:Qa,createdAt:s().datetime()}).strict();d({mode:p1,workspaceVersion:Xm,active:d({revision:m().int().positive(),compiledChecksum:d1}).strict().nullable(),defaultContexts:y(Vm),targets:y(YB),groups:y(XB),markets:y(JB),scopeOptions:y(pm).optional(),tracked:y(nA),savedSources:d({research:y(eL),discovery:y(tL)}).strict()}).strict();const Id=d({queryId:pa,queryText:Qa,assignmentCount:m().int().nonnegative()}).strict(),aA=d({added:y(Id),removed:y(Id),reused:y(Id),unchanged:y(Id),noOp:N()}).strict(),iA=d({existingNodes:m().int().nonnegative(),existingProviderCalls:m().int().nonnegative(),nextSweepNodes:m().int().nonnegative(),nextSweepProviderCalls:m().int().nonnegative(),addedNodes:m().int().nonnegative(),addedProviderCalls:m().int().nonnegative(),removedNodes:m().int().nonnegative(),removedProviderCalls:m().int().nonnegative()}).strict();d({mode:p1,workspaceVersion:Xm,previewToken:eA,reviewedAt:m1,active:d({revision:m().int().positive(),compiledChecksum:d1}).strict().nullable(),tracked:y(nA),diff:aA,workload:iA}).strict();d({committed:N(),mode:p1,workspaceVersion:Xm,reviewedAt:m1,active:d({revision:m().int().positive(),compiledChecksum:d1}).strict().nullable(),diff:aA,workload:iA}).strict();k(["proposed","alias","shared","unmatched","excluded"]);k(["primary-match","exact-slug-match","excluded-slug","shared-path","unmatched-path","alias-without-primary","unsupported-slug"]);const nL=k(["invalid-url","unowned-host","duplicate-url","url-cap-reached"]),aL=d({kind:k(["exact","prefix","suffix","contains"]),value:s().trim().min(1)}).strict(),dS=d({host:s().trim().min(1),pathTemplate:s().trim().min(1)}).strict(),f1=d({primary:dS,aliases:y(dS).optional(),excludedSlugSuffixes:y(s().trim().min(1)).optional(),excludedSlugPatterns:y(aL).optional()}).strict();d({sitemapUrl:s().url().refine(e=>{try{const n=new URL(e).protocol;return n==="http:"||n==="https:"}catch{return!1}},"Sitemap URL must use http or https"),rule:f1,maxUrls:m().int().positive().max(1e4).optional()}).strict();const $f=d({url:s(),canonicalUrl:s().nullable(),classification:k(["shared","unmatched","excluded"]),reason:k(["excluded-slug","shared-path","unmatched-path","alias-without-primary","unsupported-slug"])}).strict().superRefine((e,n)=>{({shared:["shared-path"],unmatched:["unmatched-path","alias-without-primary","unsupported-slug"],excluded:["excluded-slug"]})[e.classification].includes(e.reason)||n.addIssue({code:"custom",message:"Discovery classification and reason do not match"})}),iL=d({classification:E("proposed"),reason:E("primary-match"),stableKey:bn,slug:s().trim().min(1),label:s().trim().min(1),primaryUrl:s().url(),aliasCoverageUrls:y(s().url())}).strict(),sL=d({classification:E("alias"),reason:E("exact-slug-match"),slug:s().trim().min(1),url:s().url(),targetStableKey:bn}).strict(),oL=d({kind:nL,url:s(),canonicalUrl:s().nullable(),duplicateOf:s().optional()}).strict();d({proposed:y(iL),aliases:y(sL),shared:y($f),unmatched:y($f),excluded:y($f),diagnostics:y(oL)}).strict().superRefine((e,n)=>{const i=[["shared",["shared"]],["unmatched",["unmatched"]],["excluded",["excluded"]]];for(const[r,u]of i)for(const h of e[r])u.includes(h.classification)||n.addIssue({code:"custom",path:[r],message:"Discovery item is in the wrong result bucket"})});const g1=k(["assigned","sibling","ownedUnmapped","external","ambiguous","invalid"]),sA=k(["baseline","target"]),oA=k(["incomplete","evidence-incomplete","identity-ambiguous","no-population","aliasless","no-competitors","no-project-aliases"]),zo=Fe([d({numerator:m().int().nonnegative(),denominator:m().int().positive(),rate:we(m().min(0).max(1)),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict(),d({numerator:de(),denominator:de(),rate:de(),reason:oA}).strict()]).superRefine((e,n)=>{e.numerator!==null&&e.numerator>e.denominator&&n.addIssue({code:"custom",path:["numerator"],message:"Rate numerator cannot exceed denominator"}),e.numerator!==null&&e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:"custom",path:["unchecked"],message:"A rate reads one signal: unattributed (mention) and unchecked (citation) cannot share it"})}),rL=s().trim().min(1).overwrite(e=>e.toLocaleLowerCase("en")),lL=d({executionId:s().trim().min(1),queryText:s().trim().min(1),provider:rL,context:Jt.nullable(),requestedModel:s().trim().min(1).optional()}).strict();d({schemaVersion:E(1),expectedSlots:y(lL)}).strict().superRefine((e,n)=>{const i=new Set;for(const[r,u]of e.expectedSlots.entries()){const h=[u.executionId,u.provider].join("\0");i.has(h)&&n.addIssue({code:"custom",path:["expectedSlots",r],message:"Duplicate expected provider slot"}),i.add(h)}});const Jm=d({executed:m().int().nonnegative(),expected:m().int().nonnegative(),complete:N(),sourceComplete:N(),sourceCompleteObservations:m().int().nonnegative(),answerComplete:N()}).strict(),mS=Fe([d({domain:s().trim().min(1),own:N(),presentIn:m().int().nonnegative(),of:m().int().positive()}).strict(),d({domain:s().trim().min(1),own:N(),presentIn:de(),of:de(),reason:oA}).strict()]),cL=d({domains:y(mS),providers:y(d({provider:bt,domains:y(mS)}).strict())}).strict(),uL=d({provider:bt,completeness:Jm,answerCoverage:zo}).strict(),dL=d({id:s().trim().min(1),label:s().trim().min(1),targetIds:y(s().trim().min(1)),completeness:Jm,answerCoverage:zo,targetCoverage:zo,sov:cL,providers:y(uL)}).strict(),mL=d({provider:bt,completeness:Jm,citationCoverage:zo,mentionCoverage:zo}).strict(),pL=d({id:s().trim().min(1),label:s().trim().min(1),completeness:Jm,citationCoverage:zo,mentionCoverage:zo,providers:y(mL)}).strict(),rA=d({observationId:s().trim().min(1),expectedSlotId:s().trim().min(1),executionId:s().trim().min(1),usageEdgeId:s().trim().min(1),usageEdgeType:sA,provider:bt,queryText:s().trim().min(1),location:s().nullable(),sourceUrl:s(),bridged:N(),historical:N(),evidenceComplete:N(),classification:g1,normalizedUrl:s().nullable(),matchedTargetIds:y(s().trim().min(1)),matchedUrlIds:y(s().trim().min(1))}).strict(),hL=d({sourceUrl:s(),normalizedUrl:s().nullable(),classification:g1,matchedTargetIds:y(s().trim().min(1)),matchedUrlIds:y(s().trim().min(1))}).strict(),fL=d({observationId:s().trim().min(1),expectedSlotId:s().trim().min(1),executionId:s().trim().min(1),usageEdgeId:s().trim().min(1),usageEdgeType:sA,provider:bt,queryText:s().trim().min(1),location:s().nullable(),queryClass:Fe([k(["branded","non-brand"]),de()]),mentioned:N().nullable(),cited:N().nullable(),sources:y(hL),sourceCount:m().int().nonnegative(),sourcesTruncated:N(),bridged:N(),historical:N(),evidenceComplete:N()}).strict(),gL=d({sourceUrl:s(),normalizedUrl:s().nullable(),matchedUrlIds:y(s().trim().min(1))}).strict(),yL=d({observationId:s().trim().min(1),expectedSlotId:s().trim().min(1),executionId:s().trim().min(1),provider:bt,queryText:s().trim().min(1),location:s().nullable(),queryClass:k(["branded","non-brand"]),assignedTargetKeys:y(ge).min(1),sources:y(gL).min(1),sourceCount:m().int().positive(),sourcesTruncated:N(),evidenceComplete:N()}).strict(),bL=d({bridgedObservationIds:y(s()),historicalObservationIds:y(s()),evidenceIncompleteObservationIds:y(s()),ambiguousObservationIds:y(s()),unmatchedObservationIds:y(s())}).strict(),vL=d({id:s().trim().min(1),status:k(["completed","partial"]),createdAt:s().datetime(),startedAt:s().datetime().nullable(),finishedAt:s().datetime().nullable()}).strict();d({revision:m().int().positive(),queryClass:ea.nullable().optional(),run:vL.nullable(),groups:y(dL),targets:y(pL),evidence:y(rA),diagnostics:bL}).strict();d({property:d({targetKey:ge,label:s().min(1)}).strict(),queryClass:ea,measurement:d({state:U0,displayedRunId:s().min(1).optional(),completedAt:s().datetime().optional()}).strict(),evidence:_o(rA).optional(),answers:_o(fL).optional(),otherQueries:_o(yL).optional()}).strict().refine(e=>[e.evidence,e.answers,e.otherQueries].filter(n=>n!==void 0).length===1,{message:"Exactly one of evidence, answers or otherQueries is present, naming the shape that was served."});const y1=k(["queued","running","completed","partial","failed"]);y1.enum;const lA=k(["not_answer_visibility","not_plan_run","scoped_or_probe","status_not_partial","plan_revision_changed","manifest_unreadable","model_not_frozen","model_retired","provider_not_in_plan","provider_nothing_missing","provider_not_configured","too_old","superseded","quota_insufficient"]);lA.enum;d({providers:y(bt).min(1).optional(),dryRun:N().optional()}).strict();const cA=d({id:s(),runId:s(),projectId:s(),status:y1,providers:y(s()),expected:m().int().nonnegative(),filled:m().int().nonnegative(),error:s().nullable(),createdAt:s(),startedAt:s().nullable(),finishedAt:s().nullable()}),xL=d({runId:s(),status:ta,planned:N(),readable:N(),expected:m().int().nonnegative(),executed:m().int().nonnegative(),missing:m().int().nonnegative(),missingByProvider:Ke(s(),m().int().nonnegative()),fillable:N(),refusal:d({code:lA,message:s()}).nullable(),latestFill:cA.nullable()}),wL=k(["queued","already-complete","dry-run"]);d({outcome:wL,completeness:xL,fill:cA.nullable()});const fa=s().trim().min(1),Us=s().trim().min(1),SL=s().trim().min(1),je=m().int().nonnegative(),ru=d({state:U0,displayedRunId:fa.nullable(),planRevision:m().int().positive(),completedAt:s().datetime().nullable()}).strict(),Lo=d({targetKey:ge,label:Us}).strict(),ha={runId:fa.optional(),provider:bt.optional(),location:SL.optional()},Io=s().trim().min(1),Kf=5,kL=10,jL=5,AL=10,NL="tied Properties have both zero mentions and zero citations; ordered by name, not ranked",b1=k(["weakest-properties","strongest-mentions","weakest-mentions","excluded-mentions","markets","observed-names","cited-domains"]);b1.enum;d({runId:ha.runId,groupKey:ge.optional(),queryClass:ea.default("non-brand"),provider:ha.provider,location:ha.location,limit:m().int().positive().max(50).optional(),includeNestedMarkets:N().optional(),compact:N().optional(),list:b1.optional(),cursor:fa.optional(),answers:k(["all","not-mentioned"]).optional()}).strict();const pS=Eg,uA={metro:pS.nullable(),otherMetros:y(pS).min(1).optional(),submarkets:y(Us),queries:je},dA=d({name:Io,answers:je}).strict(),CL=d({name:Io,occurrences:je}).strict(),Wm=d({domain:s().trim().min(1),answers:je}).strict(),_L=Lo.extend({...uA,mentionCoverage:pn,citationCoverage:pn,flags:je,namedInsteadInAnswerText:y(dA).max(Kf).optional(),namedInsteadInAnswerTextTotal:je.optional(),citedDomains:y(Wm).max(Kf).optional(),citedDomainsTotal:je.optional(),recommendedInstead:y(CL).max(Kf).optional().meta({deprecated:!0,description:"Deprecated: read namedInsteadInAnswerText, which carries the same names in the same order. occurrences counts answers, exactly as answers does there."}),recommendedInsteadTotal:je.optional().meta({deprecated:!0,description:"Deprecated: read namedInsteadInAnswerTextTotal, which it always equals."}),recommendedInsteadTruncated:N().optional().meta({deprecated:!0,description:"Deprecated: true when namedInsteadInAnswerTextTotal exceeds the names returned in namedInsteadInAnswerText."})}).strict().superRefine((e,n)=>{e.namedInsteadInAnswerText!==void 0&&(e.namedInsteadInAnswerTextTotal===void 0||e.namedInsteadInAnswerText.length>e.namedInsteadInAnswerTextTotal)&&n.addIssue({code:fe.custom,path:["namedInsteadInAnswerTextTotal"],message:"Total cannot be smaller than the returned names"}),e.citedDomains!==void 0&&(e.citedDomainsTotal===void 0||e.citedDomains.length>e.citedDomainsTotal)&&n.addIssue({code:fe.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),e.recommendedInsteadTotal!==e.namedInsteadInAnswerTextTotal&&n.addIssue({code:fe.custom,path:["recommendedInsteadTotal"],message:"The deprecated total must equal namedInsteadInAnswerTextTotal"}),e.recommendedInstead!==void 0&&(e.recommendedInsteadTotal===void 0||e.recommendedInstead.length>e.recommendedInsteadTotal)&&n.addIssue({code:fe.custom,path:["recommendedInsteadTotal"],message:"Total cannot be smaller than the returned replacements"}),e.recommendedInstead!==void 0&&e.recommendedInsteadTotal!==void 0&&e.recommendedInsteadTruncated!==e.recommendedInstead.length<e.recommendedInsteadTotal&&n.addIssue({code:fe.custom,path:["recommendedInsteadTruncated"],message:"Truncation must agree with the replacement total"})}),TL=d({metro:Us.nullable(),count:m().int().positive()}).strict(),EL=d({count:m().int().min(2),mentionRate:we(),citationRate:we(),note:k([NL,"tied Properties are ordered by name, not ranked"]),byMetro:y(TL).optional(),namedInstead:y(dA).max(AL).optional(),namedInsteadTotal:je.optional()}).strict().superRefine((e,n)=>{e.namedInstead!==void 0&&(e.namedInsteadTotal===void 0||e.namedInstead.length>e.namedInsteadTotal)&&n.addIssue({code:fe.custom,path:["namedInsteadTotal"],message:"Total cannot be smaller than the returned names"})}),RL=d({basis:E("initial-weakest-selection-and-zero-signal-tie").optional(),properties:je,answers:je,domains:y(Wm).max(kL),domainTotal:je,ownDomainAnswers:je.optional()}).strict().superRefine((e,n)=>{e.ownDomainAnswers!==void 0&&e.ownDomainAnswers>e.answers&&n.addIssue({code:fe.custom,path:["ownDomainAnswers"],message:"Own-domain answers cannot exceed the basis"}),e.domains.length>e.domainTotal&&n.addIssue({code:fe.custom,path:["domainTotal"],message:"Total cannot be smaller than the returned domains"}),e.domains.some(i=>i.answers>e.answers)&&n.addIssue({code:fe.custom,path:["domains"],message:"A domain cannot be cited by more answers than the basis holds"})}),DL=d({groupKey:ge,label:Us,parentGroupKey:ge.nullable(),childMarketCount:je,propertyCount:je,propertiesMentioned:Eo,propertiesNeverMentioned:Eo.optional(),mentionCoverage:pn,citationCoverage:pn}).strict(),zL=d({population:E("top-level-markets"),queryClass:ea,totalMarkets:je,eligibleMarketCount:je,excludedMarketCount:je,items:y(d({groupKey:ge,label:Us,propertyCount:je,mentionCoverage:pn.options[0],citationCoverage:pn.options[0]}).strict()).max(jL)}).strict(),hS=Lo.extend({...uA,mentionCoverage:pn.options[0],citationCoverage:pn}).strict(),IL=d({eligiblePropertyCount:je,strongest:y(hS).max(50),weakest:y(hS).max(50),excluded:y(Lo.extend({reason:tu}).strict()),truncated:N(),excludedTotal:je.optional()}).strict();d({portfolio:d({groupKey:ge.nullable(),label:Us.nullable(),measurementScope:Fe([k(["full","spot_check"]),de()])}).strict(),measurement:ru,queryClass:ea,engines:y(bt),metrics:d({propertiesMentioned:Eo,propertiesNeverMentioned:Eo.optional(),mentionCoverage:pn,citationCoverage:pn}).strict(),weakestMarkets:zL.optional().describe("Compact unscoped ranking from actual full top-level metro aggregates before pagination. Each rate uses the complete selected run/filter/class market population; tiedAtWeakest.byMetro counts only zero-signal Properties and never supplies these rates."),weakestProperties:y(_L),tiedAtWeakest:EL.nullable(),weakestAnswerSources:RL.nullable().optional(),mentionRanking:IL,markets:y(DL),totalMarkets:je,marketsTruncated:N(),totalProperties:je,truncated:N(),pageList:b1.optional(),nextCursor:fa.nullable().optional(),detailsOmitted:y(s()).optional(),answerEvidence:d({answers:E("not-mentioned"),populationSize:je,answerCount:je,unknownMentionAnswers:je,observedNames:y(d({name:Io,answerCount:je}).strict()),observedNamesTotal:je,citedDomains:y(Wm),citedDomainsTotal:je}).strict().optional()}).strict().superRefine((e,n)=>{const i=e.detailsOmitted?.includes("weakestProperties.answerEvidence")??!1,r=["namedInsteadInAnswerText","namedInsteadInAnswerTextTotal","citedDomains","citedDomainsTotal","recommendedInstead","recommendedInsteadTotal","recommendedInsteadTruncated"];i||e.weakestProperties.forEach((u,h)=>{for(const f of r)u[f]===void 0&&n.addIssue({code:fe.custom,path:["weakestProperties",h,f],message:"Detailed evidence is required unless explicitly omitted by the compact projection"})}),e.weakestAnswerSources===void 0&&!e.detailsOmitted?.includes("weakestAnswerSources")&&n.addIssue({code:fe.custom,path:["weakestAnswerSources"],message:"Source evidence is required unless explicitly omitted by the compact projection"}),e.marketsTruncated!==e.markets.length<e.totalMarkets&&n.addIssue({code:fe.custom,path:["marketsTruncated"],message:"Market truncation must agree with the market total"})});d({targetKey:ge,runId:ha.runId,provider:ha.provider,location:ha.location,queryClass:ea.optional(),offset:m().int().nonnegative().optional(),limit:m().int().positive().max(100).optional()}).strict();k(["answered","missing"]);const Mg={queryId:fa,text:Us,class:M0,provider:bt,requestedModel:s().nullable(),servedModel:s().nullable(),location:s().nullable()},OL=Ue("status",[d({resultId:fa,...Mg,status:E("answered"),mentioned:N().nullable(),cited:N().nullable(),recommendedInstead:y(Io),answerExcerpt:s().nullable()}).strict(),d({resultId:de(),...Mg,status:E("missing"),mentioned:de(),cited:de(),recommendedInstead:y(Io).length(0),answerExcerpt:de()}).strict()]);d({property:Lo,measurement:ru,queryClass:ea,questions:y(OL),total:je,truncated:N()}).strict();d({targetKey:ge,resultId:fa}).strict();const PL=d({url:fa,classification:g1,matchedTargetKeys:y(ge),assigned:N(),historical:N(),evidenceComplete:N()}).strict().superRefine((e,n)=>{e.assigned!==(e.classification==="assigned")&&n.addIssue({code:fe.custom,path:["assigned"],message:"Assigned must agree with the source attribution classification"})});d({property:Lo,measurement:ru,question:d({resultId:fa,...Mg,status:E("answered")}).strict(),mentioned:N().nullable(),cited:N().nullable(),recommendedInstead:y(Io),answer:s().nullable(),sources:y(PL),captureStatus:Fe([Lm,de()]),retrievalStatus:Fe([j0,de()]),retrievalContract:Fe([A0,de()])}).strict();d({targetKey:ge,runId:ha.runId,provider:ha.provider,location:ha.location,queryClass:ea.optional(),limit:m().int().positive().max(50).optional()}).strict();const qL=Ue("state",[d({state:E("available"),answeredResults:je,targetMissResults:je,recommendationOccurrences:je}).strict(),d({state:E("unavailable"),reason:tu}).strict()]),ML=d({name:Io,occurrences:je,providers:y(bt).max(5),providerTotal:je,providersTruncated:N(),questions:y(Us).max(5),questionTotal:je,questionsTruncated:N()}).strict().superRefine((e,n)=>{(e.providers.length>e.providerTotal||e.questions.length>e.questionTotal)&&n.addIssue({code:fe.custom,message:"Evidence totals cannot be smaller than returned evidence"}),e.providersTruncated!==e.providers.length<e.providerTotal&&n.addIssue({code:fe.custom,path:["providersTruncated"],message:"Provider truncation must agree with its total"}),e.questionsTruncated!==e.questions.length<e.questionTotal&&n.addIssue({code:fe.custom,path:["questionsTruncated"],message:"Question truncation must agree with its total"})}),BL=10;d({property:Lo,measurement:ru,queryClass:ea,basis:qL,competitors:y(ML),total:je,truncated:N(),citedDomains:y(Wm).max(BL).optional(),citedDomainsTotal:je.optional(),citedDomainsAnswers:je.optional()}).strict().superRefine((e,n)=>{const{citedDomains:i,citedDomainsTotal:r,citedDomainsAnswers:u}=e;if(i!==void 0){if(r===void 0||u===void 0){n.addIssue({code:fe.custom,path:["citedDomains"],message:"Cited domains require their total and answer basis"});return}i.length>r&&n.addIssue({code:fe.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),i.some(h=>h.answers>u)&&n.addIssue({code:fe.custom,path:["citedDomains"],message:"A domain cannot be cited by more answers than the basis holds"})}});const mA=k(["magnitude","label"]),LL=2,UL=k(["all","group","property"]);d({runId:ha.runId,scope:UL.default("all"),groupKey:ge.optional(),targetKey:ge.optional(),queryClass:ea.default(yP),provider:ha.provider,location:ha.location,limit:m().int().positive().max(50).optional(),sort:mA.optional()}).strict().superRefine((e,n)=>{e.scope==="all"&&(e.groupKey!==void 0||e.targetKey!==void 0)&&n.addIssue({code:fe.custom,path:["scope"],message:"All scope cannot name a group or Property"}),e.scope==="group"&&(e.groupKey===void 0||e.targetKey!==void 0)&&n.addIssue({code:fe.custom,path:["groupKey"],message:"Group scope requires groupKey only"}),e.scope==="property"&&(e.targetKey===void 0||e.groupKey!==void 0)&&n.addIssue({code:fe.custom,path:["targetKey"],message:"Property scope requires targetKey only"})});const pA=k(["no_previous_run","execution_identity_changed","incomplete","not_comparable"]),hA=ru.extend({executionIdentity:fa.nullable(),measurementScope:Fe([k(["full","spot_check"]),de()])}).strict();function fA(e,n){if(e.previous.state!=="available"||e.current.state!=="available"){n.addIssue({code:fe.custom,message:"Available deltas require two available metrics"});return}Math.abs(e.delta-(e.current.value-e.previous.value))>Number.EPSILON&&n.addIssue({code:fe.custom,path:["delta"],message:"Delta must equal current minus previous"})}const gA=d({state:E("unavailable"),reason:tu}).strict(),hm=Ue("state",[d({state:E("available"),previous:pn,current:pn,delta:we()}).strict().superRefine(fA),gA]),VL=Ue("state",[d({state:E("available"),previous:Eo,current:Eo,delta:m().int()}).strict().superRefine(fA),gA]),Gf=d({propertiesMentioned:VL,mentionCoverage:hm,citationCoverage:hm}).strict(),$L=d({improved:je,declined:je,mixed:je,withinNoise:je,unchanged:je,notComparable:je,total:je,noiseAnswers:E(LL)}).strict().superRefine((e,n)=>{e.improved+e.declined+e.mixed+e.withinNoise+e.unchanged+e.notComparable!==e.total&&n.addIssue({code:fe.custom,path:["total"],message:"Move buckets must sum to total"})}),KL=Lo.extend({mentionCoverage:hm,citationCoverage:hm,flags:je,mentionAnswersDelta:m().int().nullable().optional(),citationAnswersDelta:m().int().nullable().optional(),denominatorChanged:N().optional(),withinNoise:N().optional(),mentionWithinNoise:N().nullable().optional(),citationWithinNoise:N().nullable().optional()}).strict();d({current:hA,queryClass:ea.optional(),comparison:Ue("state",[d({state:E("available"),previous:d({displayedRunId:fa,planRevision:m().int().positive(),completedAt:s().datetime().nullable(),executionIdentity:fa,measurementScope:k(["full","spot_check"])}).strict(),metrics:Gf,metricsByClass:d({branded:Gf,nonBrand:Gf}).strict().optional(),sort:mA.optional(),distribution:$L.optional(),changedProperties:y(KL),totalProperties:je,truncated:N()}).strict(),d({state:E("unavailable"),reason:pA}).strict()])}).strict().superRefine((e,n)=>{if(e.comparison.state!=="available")return;const{distribution:i}=e.comparison;if(i!==void 0&&i.total-i.unchanged!==e.comparison.totalProperties&&n.addIssue({code:fe.custom,path:["comparison","distribution"],message:"Changed Properties must equal the distribution total less unchanged"}),e.current.displayedRunId===null||e.current.executionIdentity===null){n.addIssue({code:fe.custom,path:["current"],message:"A comparison requires an identified current run"});return}e.comparison.previous.planRevision!==e.current.planRevision&&n.addIssue({code:fe.custom,path:["comparison","previous","planRevision"],message:"Comparisons cannot cross plan revisions"}),e.comparison.previous.executionIdentity!==e.current.executionIdentity&&n.addIssue({code:fe.custom,path:["comparison","previous","executionIdentity"],message:"Comparisons cannot cross execution identities"})});d({runId:ha.runId}).strict();const GL=k(["no_completed_run","incomplete","evidence_incomplete","no_population","not_applicable"]),lu=d({state:E("unavailable"),reason:GL}).strict(),HL=d({state:E("available"),expected:je,executed:je,answered:je,missing:je}).strict(),FL=Ue("state",[HL,lu]).superRefine((e,n)=>{e.state==="available"&&(e.executed+e.missing!==e.expected&&n.addIssue({code:fe.custom,message:"Expected must equal executed plus missing"}),e.answered>e.executed&&n.addIssue({code:fe.custom,path:["answered"],message:"Answered cannot exceed executed"}))}),QL=d({state:E("available"),complete:je,partial:je,failed:je,unsupported:je,notRecorded:je}).strict(),ZL=Ue("state",[QL,lu]),YL=d({state:E("available"),used:je,notUsed:je,unknown:je,notApplicable:je,notRecorded:je}).strict(),XL=Ue("state",[YL,lu]),JL=d({state:E("available"),expectedQuestions:je,answeredQuestions:je,missingQuestions:je}).strict(),WL=Ue("state",[JL,lu]).superRefine((e,n)=>{e.state==="available"&&e.answeredQuestions+e.missingQuestions!==e.expectedQuestions&&n.addIssue({code:fe.custom,message:"Expected questions must equal answered plus missing"})}),fS=Ue("state",[d({state:E("available"),answered:je,unattributed:je}).strict(),lu]).superRefine((e,n)=>{e.state==="available"&&e.unattributed>e.answered&&n.addIssue({code:fe.custom,path:["unattributed"],message:"Unattributed answers cannot exceed answered"})}),eU=d({status:y1,providers:y(s()),expected:je,filled:je,createdAt:s(),finishedAt:s().nullable()}).strict();d({run:hA,completeness:FL,capture:ZL,retrieval:XL,population:WL,comparison:Ue("state",[d({state:E("available"),previousDisplayedRunId:fa}).strict(),d({state:E("unavailable"),reason:pA}).strict()]),unattributedByClass:d({branded:fS,nonBrand:fS}).strict().optional(),latestFill:eU.nullable().optional()}).strict().superRefine((e,n)=>{if(e.completeness.state!=="available")return;const i=e.completeness.executed;e.capture.state==="available"&&e.capture.complete+e.capture.partial+e.capture.failed+e.capture.unsupported+e.capture.notRecorded!==i&&n.addIssue({code:fe.custom,path:["capture"],message:"Capture counts must total executed snapshots"}),e.retrieval.state==="available"&&e.retrieval.used+e.retrieval.notUsed+e.retrieval.unknown+e.retrieval.notApplicable+e.retrieval.notRecorded!==i&&n.addIssue({code:fe.custom,path:["retrieval"],message:"Retrieval counts must total executed snapshots"})});const Fr=s().regex(/^[a-f0-9]{64}$/),Za=s().trim().min(1).max(256),di=m().int().positive(),gS=d({kind:k(["user","api-key","system"]),id:s().trim().min(1),label:s().trim().min(1)}).strict(),tU=k(["proposed","included","excluded"]),nU=k(["manual","sitemap"]),v1=d({stableKey:ge,label:s().trim().min(1),status:tU,aliases:y(s().trim().min(1)),identityAliases:y(s().trim().min(1)).optional(),urlMatchers:y(s().trim().min(1)),source:nU,discoveredUrl:s().trim().min(1).optional(),discoveryIdentity:s().trim().min(1).optional()}).strict(),ep=d({providers:y(bt).optional(),models:Ke(bt,s().trim().min(1)).optional(),locations:y(s().trim().min(1)).optional()}).strict(),aU=k(["branded","non-brand","unclassified"]),iU=k(["rule","operator"]),yA=d({targetKey:ge,queryId:Za,contextOverride:ep.optional(),executionContexts:y(Vm.extend({executionNodeKey:s().min(1).optional()})).min(1).optional(),queryProvenance:E2.optional(),queryClass:aU,classificationSource:iU}).strict().superRefine((e,n)=>{e.contextOverride!==void 0&&e.executionContexts!==void 0&&n.addIssue({code:"custom",path:["executionContexts"],message:"Use either frozen execution contexts or a context override, not both."})}),tp=T2,bA=d({stableKey:ge,label:s().trim().min(1),parentGroupKey:ge.optional(),targetKeys:y(ge),competitors:y(tp)}).strict(),sU=d({sitemapUrl:s().url(),rule:f1,exclusions:y(s().trim().min(1)),inputChecksum:Fr,reviewedAt:s().datetime().optional()}).strict(),oU=d({providers:y(bt),models:Ke(bt,s().trim().min(1)).optional(),locations:y(s().trim().min(1))}).strict(),vA=R2,rU=d({defaultContext:oU,targets:y(v1),assignments:y(yA),groups:y(bA),reportingScopes:y(vA).optional(),discovery:sU.optional()}).strict(),lU=d({id:s().trim().min(1),projectId:s().trim().min(1),schemaVersion:E(2),baseActiveVersionId:s().trim().min(1).nullable(),baseActiveRevision:di.nullable(),authoring:rU,createdBy:gS,updatedBy:gS,createdAt:s().datetime(),updatedAt:s().datetime()}).strict(),x1=d({targets:m().int().nonnegative(),includedTargets:m().int().nonnegative(),assignments:m().int().nonnegative(),unclassifiedAssignments:m().int().nonnegative(),groups:m().int().nonnegative(),competitors:m().int().nonnegative()}).strict(),cU=d({code:s().trim().min(1),message:s().trim().min(1),path:y(Fe([s(),m().int()]))}).strict(),xA=d({etag:s().trim().min(1),changed:N(),warnings:y(cU),counts:x1}).strict();d({draft:lU.nullable(),etag:s().trim().min(1).nullable()}).strict();_o(v1);_o(yA);_o(bA);d({search:s().optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(L0).optional()}).strict();d({expectedActiveRevision:di.nullable()}).strict();d({sitemapUrl:s().url(),rule:f1,exclusions:y(s().trim().min(1)).optional()}).strict();const uU=d({discoveryIdentity:s().trim().min(1),action:k(["create","rebind","ignore"]),targetKey:ge.optional(),label:s().trim().min(1).optional()}).strict();d({selections:y(uU),selectedTargetKeys:y(ge).optional()}).strict().superRefine((e,n)=>{e.selections.length===0&&e.selectedTargetKeys===void 0&&n.addIssue({code:"custom",message:"A proposal or reviewed Property selection is required."}),e.selectedTargetKeys&&new Set(e.selectedTargetKeys).size!==e.selectedTargetKeys.length&&n.addIssue({code:"custom",path:["selectedTargetKeys"],message:"Property keys must be unique."})});d({target:v1}).strict();d({targetKey:ge,label:s().trim().min(1)}).strict();d({targetKey:ge,mergedKeys:y(ge).min(1)}).strict();d({targetKey:ge,cleanup:E("assignments-and-group-memberships").optional()}).strict();d({targetKey:ge,discoveryIdentity:s().trim().min(1),discoveredUrl:s().url()}).strict();const wA={targetKeys:y(ge).optional(),groupKeys:y(ge).optional()};function SA(e,n){(e.targetKeys?.length??0)===0&&(e.groupKeys?.length??0)===0&&n.addIssue({code:"custom",message:"At least one Target or group selector is required."})}d(wA).strict().superRefine(SA);const dU=d({...wA,queryIds:y(Za).min(1),contextOverride:ep.optional()}).strict().superRefine(SA);Fe([d({targetKey:ge,queryIds:y(Za).min(1),contextOverride:ep.optional()}).strict(),dU]);const mU=d({groupKey:ge,label:s().trim().min(1),memberCount:m().int().positive()}).strict();d({draftEtag:s().trim().min(1),groups:y(mU),resolvedTargetKeys:y(ge),overlapCount:m().int().nonnegative(),assignments:d({requested:m().int().nonnegative(),added:m().int().nonnegative(),alreadyPresent:m().int().nonnegative()}).strict(),execution:d({addedNodes:m().int().nonnegative(),addedProviderCalls:m().int().nonnegative(),fullRunNodes:m().int().nonnegative(),fullRunProviderCalls:m().int().nonnegative()}).strict()}).strict();d({pairs:y(d({targetKey:ge,queryId:Za}).strict()).min(1),contextOverride:ep.optional()}).strict();Fe([d({targetKey:ge,queryId:Za}).strict(),d({targetKeys:y(ge).min(1),queryId:Za}).strict()]);d({targetKey:ge}).strict();d({queryClass:M0,assignments:y(d({targetKey:ge,queryId:Za}).strict()).min(1)}).strict();d({group:d({stableKey:ge,label:s().trim().min(1),parentGroupKey:ge.nullable().optional(),targetKeys:y(ge),competitors:y(tp).optional()}).strict()}).strict();d({market:vA}).strict();d({groupKey:ge}).strict();d({groupKey:ge,competitor:tp}).strict();d({expectedActiveRevision:di,groupKey:ge,domain:s().trim().min(1).refine(e=>Wc(e)!==null,"A competitor domain must be a valid hostname"),label:s().trim().min(1).optional(),aliases:y(s().trim().min(1)).optional()}).strict();xA.extend({groupKey:ge,competitor:tp,draftCreated:N(),published:d({revision:di,competitorsChanged:E(!1)}).strict()}).strict();d({groupKey:ge,competitorKey:ge}).strict();const fm=d({ruleId:s().trim().min(1),severity:k(["fail","warn"]),message:s().trim().min(1),path:y(Fe([s(),m().int()]))}).strict();Ue("ok",[d({ok:E(!0),compiledChecksum:Fr,checks:y(fm),counts:x1,plan:$m}).strict(),d({ok:E(!1),compiledChecksum:de(),checks:y(fm).min(1)}).strict()]);const yS=d({added:y(s().trim().min(1)),removed:y(s().trim().min(1)),changed:y(s().trim().min(1)),unchanged:y(s().trim().min(1))}).strict(),pU=d({activeRevision:di.nullable(),targets:yS,groups:yS,assignments:d({added:m().int().nonnegative(),removed:m().int().nonnegative(),reclassified:m().int().nonnegative()}).strict(),execution:d({addedNodeKeys:y(s().trim().min(1)),removedNodeKeys:y(s().trim().min(1))}).strict()}).strict();Ue("ok",[d({ok:E(!0),compiledChecksum:Fr,checks:y(fm),counts:x1,plan:$m,diff:pU}).strict(),d({ok:E(!1),compiledChecksum:de(),checks:y(fm).min(1),diff:de()}).strict()]);d({expectedActiveRevision:di.nullable(),expectedCompiledChecksum:Fr}).strict();d({published:N(),active:d({revision:di,checksum:Fr,compiledChecksum:Fr,createdAt:s().datetime(),plan:$m}).strict()}).strict();d({discarded:N()}).strict();d({expectedActiveRevision:di}).strict();d({deactivated:N(),previousRevision:di.nullable()}).strict();const hU=k(["republish_required","setup_in_progress","awaiting_first_run","operational","simple"]),fU=k(["republish_setup","continue_setup","run_measurement","view_measurement","start_setup"]),gU=k(["simple","draft-only","active-v1","active-v2"]);d({state:hU,nextAction:fU,mode:gU,answerVisibilityProviderReady:N(),activeRevision:di.nullable(),activeSchemaVersion:Fe([E(1),E(2)]).nullable(),draft:d({etag:s().trim().min(1),updatedAt:s().datetime()}).strict().nullable()}).strict();const kA=d({id:s().trim().min(1),projectId:s().trim().min(1),name:s().trim().min(1),description:s().nullable(),itemCount:m().int().nonnegative(),createdAt:s().datetime(),updatedAt:s().datetime()}).strict(),yU=d({queryId:Za,queryText:s().min(1),position:m().int().nonnegative()}).strict();kA.extend({items:y(yU)}).strict();d({querySets:y(kA)}).strict();d({name:s().trim().min(1),description:s().nullable().optional(),queryIds:y(Za)}).strict();const bU=d({id:s().trim().min(1),projectId:s().trim().min(1),name:s().trim().min(1),description:s().nullable(),pattern:s().trim().min(1),variables:y(s().trim().min(1)),createdAt:s().datetime(),updatedAt:s().datetime()}).strict();d({templates:y(bU)}).strict();d({name:s().trim().min(1),description:s().nullable().optional(),pattern:s().trim().min(1),variables:y(s().trim().min(1))}).strict();d({bindings:y(Ke(s().trim().min(1),s().trim().min(1))).min(1),querySetId:s().trim().min(1).optional()}).strict();d({created:y(d({queryId:Za,queryText:s().min(1)}).strict()),existing:y(d({queryId:Za,queryText:s().min(1)}).strict())}).strict();const gm=s().regex(/^[a-f0-9]{64}$/),np=m().int().positive();d({stableKey:ge,kind:k(["target","group"]),retiredAt:s().datetime().nullable()}).strict();d({csv:s()}).strict();k(["matched","ambiguous","unmatched","invalid","duplicate","proposed","excluded"]);const vU=k(["column-count","missing-property","missing-group","invalid-url","property-not-found","property-label-ambiguous","url-not-exact-match","target-proposed","target-excluded","group-label-ambiguous","group-key-conflict"]),Bg=d({dataRow:np,property:s(),group:s(),url:s().nullable(),normalizedProperty:s(),normalizedGroupLabel:s()}).strict(),vc=Bg.extend({reason:vU}),xU=d({source:k(["draft-target","draft-group","persisted-segment","retired-segment","proposed-group"]),stableKey:ge,kind:k(["target","group"]).optional(),retiredAt:s().datetime().nullable().optional(),normalizedGroupLabel:s().optional()}).strict(),wU=d({proposedGroupKey:ge,evidence:y(xU).min(1)}).strict(),SU=Ue("status",[Bg.extend({status:E("matched"),targetKey:ge,groupKey:ge}).strict(),vc.extend({status:E("ambiguous"),candidateTargetKeys:y(ge).min(1).optional(),candidateGroupKeys:y(ge).min(1).optional()}).strict(),vc.extend({status:E("unmatched")}).strict(),vc.extend({status:E("invalid"),groupKeyConflict:wU.optional()}).strict(),Bg.extend({status:E("duplicate"),duplicateOfRow:np,targetKey:ge,groupKey:ge}).strict(),vc.extend({status:E("proposed"),targetKey:ge}).strict(),vc.extend({status:E("excluded"),targetKey:ge}).strict()]),kU=d({normalizedGroupLabel:s(),groupKey:ge,label:s().trim().min(1),action:k(["create","extend"]),matchedRows:y(np),targetKeys:y(ge),addedTargetKeys:y(ge),unchangedTargetKeys:y(ge)}).strict(),jU=d({dataRows:m().int().nonnegative(),matchedRows:m().int().nonnegative(),ambiguousRows:m().int().nonnegative(),unmatchedRows:m().int().nonnegative(),invalidRows:m().int().nonnegative(),duplicateRows:m().int().nonnegative(),proposedRows:m().int().nonnegative(),excludedRows:m().int().nonnegative(),needsAttention:m().int().nonnegative(),groupsReady:m().int().nonnegative(),groupsToCreate:m().int().nonnegative(),groupsToExtend:m().int().nonnegative(),membershipsReady:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();d({draftEtag:s().trim().min(1),sourceChecksum:gm,previewChecksum:gm,rows:y(SU),groupChanges:y(kU),counts:jU}).strict();d({csv:s(),sourceChecksum:gm,previewChecksum:gm,acceptedRows:y(np).min(1)}).strict().superRefine((e,n)=>{new Set(e.acceptedRows).size!==e.acceptedRows.length&&n.addIssue({code:"custom",path:["acceptedRows"],message:"Accepted CSV data rows must be unique."})});xA.extend({appliedRows:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();const Co=d({slope:m(),intercept:m(),r2:m(),start:m(),end:m(),n:m(),startIndex:m(),endIndex:m()}),AU=k(["gsc","ga4","gbp"]);d({id:s(),domain:s(),connectionType:AU,propertyId:s().nullable().optional(),sitemapUrl:s().nullable().optional(),scopes:y(s()).default([]),createdAt:s(),updatedAt:s()});const NU=d({date:s(),query:s(),page:s(),country:s().nullable().optional(),device:s().nullable().optional(),clicks:m(),impressions:m(),ctr:we(),position:m()});k(["clicks","impressions","date"]);d({rows:y(NU),totalMatching:m(),truncated:N(),latestAvailableDate:s().nullable()});const CU=d({date:s(),clicks:m(),impressions:m(),ctr:we(),position:m().nullable()}),jA=d({startDate:s().nullable(),endDate:s().nullable(),latestDataDate:s().nullable(),daysSinceLatestData:m().nullable()}),_U=d({clicks:Co.nullable(),impressions:Co.nullable(),ctr:Co.nullable(),position:Co.nullable()}),bS=d({startDate:s(),endDate:s(),clicks:m(),impressions:m(),ctr:we().nullable(),position:m().nullable(),source:k(["property-daily","dimensioned","mixed","empty"])}),TU=d({days:m(),basis:k(["prior-window","split-window"]).optional(),prior:bS,trailing:bS,comparable:N(),change:d({clicks:we().nullable(),impressions:we().nullable(),ctr:we().nullable(),position:we().nullable()})});d({totals:d({clicks:m(),impressions:m(),ctr:we(),position:m().nullable(),positionDays:m(),days:m()}),daily:y(CU),window:jA.optional(),trends:_U.optional(),periodComparison:TU.nullable().optional()});const EU=d({page:s(),clicks:m(),impressions:m(),ctr:we()});d({rows:y(EU),totals:d({clicks:m(),impressions:m(),ctr:we(),days:m(),coveredFrom:s().nullable(),coveredThrough:s().nullable(),complete:N()}).nullable(),totalsSource:E("property-daily"),rankedFrom:s().nullable(),rankedThrough:s().nullable()});const RU=k(["google","page-summed","mixed"]),DU=d({query:s(),clicks:m(),impressions:m(),ctr:we(),position:m(),days:m(),source:RU});d({rows:y(DU),totalMatching:m(),truncated:N(),window:jA.extend({earliestDataDate:s().nullable().optional()})});const Lg=d({id:s(),url:s(),indexingState:s().nullable().optional(),verdict:s().nullable().optional(),coverageState:s().nullable().optional(),pageFetchState:s().nullable().optional(),robotsTxtState:s().nullable().optional(),crawlTime:s().nullable().optional(),lastCrawlResult:s().nullable().optional(),isMobileFriendly:N().nullable().optional(),richResults:y(s()).default([]),referringUrls:y(s()).default([]),inspectedAt:s()});k(["stable","reindexed","deindexed","still-missing","new"]);const zU=d({url:s(),previousState:s().nullable(),currentState:s().nullable(),transitionDate:s()}),IU=d({reason:s(),count:m(),urls:y(Lg).default([])});d({summary:d({total:m(),indexed:m(),notIndexed:m(),deindexed:m(),percentage:ot(),indexedShare:we(m().min(0).max(1)).nullable(),notIndexedShare:we(m().min(0).max(1)).nullable()}),lastInspectedAt:s().nullable(),lastSyncedAt:s().nullable(),indexed:y(Lg).default([]),notIndexed:y(Lg).default([]),deindexed:y(zU).default([]),reasonGroups:y(IU).default([])});d({url:s(),type:k(["URL_UPDATED","URL_DELETED"]),notifiedAt:s()});const OU=d({url:s(),type:k(["URL_UPDATED","URL_DELETED"]),notifiedAt:s(),status:k(["success","error"]),error:s().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(OU).default([])});d({date:s(),indexed:m(),notIndexed:m(),unknownPages:m().default(0),verifiedByInspection:m().default(0),derivedFromImpressions:m().default(0),reasonBreakdown:Ke(s(),m()).default({})});const PU=d({siteUrl:s(),permissionLevel:s()});d({sites:y(PU).default([])});const qU=d({type:s(),submitted:s(),indexed:s().optional().describe("Deprecated compatibility field.")}),AA=d({path:s(),parentSitemapUrl:s().optional(),lastSubmitted:s().optional(),isPending:N().optional(),isSitemapsIndex:N().optional(),type:s().optional(),lastDownloaded:s().optional(),warnings:s().optional(),errors:s().optional(),contents:y(qU).optional()});d({sitemaps:y(AA).default([]),summary:d({total:m().int().nonnegative(),indexes:m().int().nonnegative(),files:m().int().nonnegative()}),preferredSubmissionUrls:y(s()).default([])});d({sitemapUrls:y(s().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 MU=d({sitemapUrl:s(),status:k(["accepted","error"]),submittedAt:s().optional(),error:s().optional()});d({summary:d({total:m().int().nonnegative(),accepted:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(MU)});d({sitemaps:y(AA),primarySitemapUrl:s(),run:d({id:s(),projectId:s(),kind:s(),status:s(),trigger:s(),createdAt:s()}).nullable()});const mt=s().trim().min(1),vS=s().regex(/^[a-f0-9]{64}$/i),BU=k(["not-connected","selection-required","connected","stale"]),Od=BU.enum,LU=k(["live","draft"]),NA=LU.enum,Zd=d({accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),selectedAt:s().nullable()}).strict(),Hf=d({id:mt,projectId:mt,scopes:y(s()).default([]),selection:Zd,lastValidatedAt:s().nullable(),lastSnapshotAt:s().nullable(),createdAt:s(),updatedAt:s()}).strict(),CA=d({id:mt,path:s(),name:s(),shareData:N().nullable()}).strict(),_A=d({accountId:mt,id:mt,path:s(),name:s(),publicId:s().nullable(),domainName:s().nullable(),usageContexts:y(s())}).strict(),w1=d({accountId:mt,containerId:mt,id:mt,path:s(),name:s(),description:s().nullable(),fingerprint:s().nullable()}).strict(),UU=d({accounts:y(CA),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();d({accountId:mt,containers:y(_A),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();d({accountId:mt,containerId:mt,workspaces:y(w1),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();const VU=d({id:mt,name:s(),type:s(),paused:N(),firingTriggerIds:y(mt),blockingTriggerIds:y(mt),referencedVariableIds:y(mt),parameterKeys:y(s()),fingerprint:s().nullable()}).strict(),$U=d({id:mt,name:s(),type:s(),customEventNames:y(s()),filterKeys:y(s()),autoEventFilterKeys:y(s()),fingerprint:s().nullable()}).strict(),KU=d({id:mt,name:s(),type:s(),dataLayerVariableName:s().nullable(),parameterKeys:y(s()),fingerprint:s().nullable()}).strict(),TA=k(["recognized","unknown"]),xS=TA.enum,GU=k(["literal","variable-ref","absent","unknown"]),ap=GU.enum,HU=s().trim().min(5).max(132).regex(/^\{\{\w[\w ./-]{0,127}\}\}$/),ol=d({source:E(ap.absent),literal:de(),variableRef:de()}).strict(),rl=d({source:E(ap.unknown),literal:de(),variableRef:de()}).strict(),ll=d({source:E(ap["variable-ref"]),literal:de(),variableRef:HU}).strict();function cu(e){return d({source:E(ap.literal),literal:e,variableRef:de()}).strict()}const FU=s().trim().max(23).regex(/^(?:AW-)?\d{1,20}$/i),QU=s().trim().min(1).max(128).regex(/^[\w-]+$/),ZU=s().trim().min(1).max(20).regex(/^(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$/),YU=s().trim().length(3).regex(/^[a-z]{3}$/i);Ue("source",[cu(s().trim().min(1).max(256)),ll,ol,rl]);const XU=Ue("source",[cu(FU),ll,ol,rl]),JU=Ue("source",[cu(QU),ll,ol,rl]),WU=Ue("source",[cu(ZU),ll,ol,rl]),eV=Ue("source",[ll,ol,rl]),tV=Ue("source",[cu(YU),ll,ol,rl]),EA=k(["all-pages","custom-event","filtered","unknown"]);EA.enum;const wS=d({operator:s().trim().min(1).max(64),value:s().max(2048),negated:N(),ignoreCase:N()}).strict(),nV=d({triggerId:mt,triggerType:s(),eventPredicates:y(wS),hostnamePredicates:y(wS),unsupportedConditionCount:m().int().nonnegative()}).strict(),RA=k(["not-google-ads-tag","unsupported-tag-type","custom-html-opaque","conversion-id-unresolved","conversion-label-unresolved","value-mapping-missing","transaction-id-mapping-missing","currency-mapping-missing","trigger-unresolved","hostname-filter-unresolved"]);RA.enum;const aV=d({tagId:mt,tagType:s(),recognition:TA,recognitionReason:s().nullable(),conversionId:XU,conversionLabel:JU,value:WU,transactionId:eV,currency:tV,triggerStrategy:EA,triggerIds:y(mt),triggerPredicates:y(nV),reviewReasons:y(RA)}).strict().superRefine((e,n)=>{e.recognition===xS.recognized&&e.recognitionReason!==null&&n.addIssue({code:fe.custom,path:["recognitionReason"],message:"Recognized assessments cannot carry an unknown-recognition reason."}),e.recognition===xS.unknown&&!e.recognitionReason&&n.addIssue({code:fe.custom,path:["recognitionReason"],message:"Unknown assessments require a recognition reason."})}),DA=d({accountId:mt,containerId:mt,workspaceId:mt.nullable(),tags:y(VU),triggers:y($U),variables:y(KU),googleAdsTagAssessments:y(aV).default([])}).strict(),iV=d({accountId:mt,containerId:mt,id:mt,path:s(),name:s(),description:s().nullable(),fingerprint:s().nullable(),deleted:N()}).strict(),zA=d({source:E(NA.live),version:iV,graph:DA,fetchedAt:s()}).strict(),IA=d({source:E(NA.draft),workspace:w1,graph:DA,conflictCount:m().int().nonnegative(),fetchedAt:s()}).strict(),sV=d({account:CA,container:_A,workspaces:y(w1),live:zA.nullable(),draft:IA.nullable(),fetchedAt:s()}).strict();Ue("status",[d({connected:E(!1),status:E(Od["not-connected"]),connection:de(),selection:de()}).strict(),d({connected:E(!0),status:E(Od["selection-required"]),connection:Hf,selection:Zd}).strict(),d({connected:E(!0),status:E(Od.connected),connection:Hf,selection:Zd}).strict(),d({connected:E(!0),status:E(Od.stale),connection:Hf,selection:Zd}).strict()]);const OA=k(["accounts","container","live","draft"]),Pd=OA.enum,S1=d({id:mt,projectId:mt,connectionId:mt,runId:mt,kind:OA,accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),payloadChecksum:vS,rawPayloadSha256:vS.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:s(),createdAt:s()}).strict(),oV=Ue("kind",[d({kind:E(Pd.accounts),data:UU}).strict(),d({kind:E(Pd.container),data:sV}).strict(),d({kind:E(Pd.live),data:zA}).strict(),d({kind:E(Pd.draft),data:IA}).strict()]),rV=d({metadata:S1,payload:oV}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:fe.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),Jn=s().trim().min(1),lV=s().trim().min(1).refine(e=>Wc(e)!==null,"Expected a hostname or http(s) URL."),k1=k(["configured","statically-consistent","runtime-unverified","observed"]);k1.enum;const PA=k(["pass","fail","unknown"]);PA.enum;const qA=k(["ads-connection-missing","ads-conversion-action-missing","ads-goal-missing","ads-goal-not-biddable","ads-action-not-primary","gtm-connection-missing","gtm-live-graph-missing","gtm-tag-missing","gtm-tag-unrecognized","gtm-tag-paused","gtm-trigger-missing","gtm-variable-missing","gtm-event-mismatch","gtm-hostname-mismatch","gtm-value-mapping-missing","gtm-transaction-id-mapping-missing","gtm-currency-mapping-missing","gtm-conversion-id-mismatch","gtm-conversion-label-mismatch","runtime-event-not-observed","runtime-gtm-not-observed","runtime-ads-not-observed"]);qA.enum;const MA=d({id:Jn,projectId:Jn,name:s().trim().min(1),eventName:s().trim().min(1),googleAds:d({customerId:Jn,conversionActionId:Jn,conversionId:s().trim().min(1).optional(),conversionLabel:s().trim().min(1).optional(),campaignIds:y(Jn).max(50).default([]),requireBiddableGoal:N().default(!0),requirePrimaryAction:N().default(!0)}).strict(),gtm:d({accountId:Jn,containerId:Jn,tagId:Jn,triggerIds:y(Jn).default([]),variableIds:y(Jn).default([])}).strict(),runtime:d({verificationRequired:N().default(!0),requireTransactionId:N().default(!0),requireValue:N().default(!0),requireCurrency:N().default(!0),productionHosts:y(lV).default([])}).strict(),createdAt:s(),updatedAt:s()}).strict();MA.omit({id:!0,projectId:!0,createdAt:!0,updatedAt:!0});const BA=k(["not-run","consistent","inconsistent"]);BA.enum;const LA=k(["not-run","not-observed","observed"]);LA.enum;d({staticCheck:BA,runtimeVerificationRequired:N(),runtimeObservation:LA}).strict();const cV=d({code:qA,subject:s().trim().min(1),outcome:PA,status:k1,evidenceIds:y(Jn).default([])}).strict(),uV=d({contract:MA,status:k1,findings:y(cV),evaluatedAt:s()}).strict(),SS=d({id:Jn,name:s(),detail:s(),active:N()});d({googleAds:d({customerId:Jn.nullable(),syncedAt:s().nullable(),conversionActions:y(SS)}),gtm:d({containerId:Jn.nullable(),syncedAt:s().nullable(),tags:y(SS)})});const Dc=s().trim().min(1);function kS(e){const n=e.trim();return/^\d{10}$/.test(n)?n:/^\d{3}-\d{3}-\d{4}$/.test(n)?n.replaceAll("-",""):null}const dV=/^[\w-]+$/;function j1(e){const n=e.trim();return dV.test(n)?n:null}function mV(e){const n=e.trim();return/^accounts\/([\w-]+)$/.exec(n)?.[1]??j1(n)}function pV(e,n){const i=e.trim(),r=/^accounts\/([\w-]+)\/containers\/([\w-]+)$/.exec(i);return r?r[1]===n?r[2]:null:j1(i)}function hV(e,n,i){const r=e.trim(),u=/^accounts\/([\w-]+)\/containers\/([\w-]+)\/workspaces\/([\w-]+)$/.exec(r);return u?u[1]===n&&u[2]===i?u[3]:null:j1(r)}function fV(e){const n=kS(e.customerId);if(!n)return null;if(e.loginCustomerId===null)return{loginCustomerId:null,customerId:n};if(e.loginCustomerId===void 0)return{customerId:n};const i=kS(e.loginCustomerId);return i?{loginCustomerId:i,customerId:n}:null}function gV(e){const n=mV(e.accountId);if(!n)return null;const i=pV(e.containerId,n);if(!i)return null;if(e.workspaceId===void 0)return{accountId:n,containerId:i};const r=hV(e.workspaceId,n,i);return r?{accountId:n,containerId:i,workspaceId:r}:null}const ip=k(["google-ads","gtm"]);ip.enum;d({provider:ip,publicUrl:s().url().optional(),developerToken:s().trim().min(1).max(512).optional()}).strict();d({provider:ip,authorizationUrl:s().url(),redirectUri:s().url(),expiresAt:s().nullable()}).strict();d({loginCustomerId:Dc.nullable().optional(),customerId:Dc}).strict().superRefine((e,n)=>{fV(e)||n.addIssue({code:fe.custom,message:"Expected ten-digit Google Ads customer IDs, with optional 3-3-4 display hyphens."})});d({accountId:Dc,containerId:Dc,workspaceId:Dc.optional()}).strict().superRefine((e,n)=>{gV(e)||n.addIssue({code:fe.custom,message:"GTM resource paths must match the selected account and container."})});d({provider:ip,disconnected:N()}).strict();const UA=100;d({snapshots:y(O0).max(UA),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:Z9}).strict();d({snapshots:y(S1).max(UA),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:rV}).strict();d({assessment:uV,googleAdsSnapshot:O0.nullable(),gtmSnapshot:S1.nullable()}).strict();function yV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}d({id:s(),domain:s(),siteUrl:s().nullable().optional(),createdAt:s(),updatedAt:s()});const Ff=d({id:s(),url:s(),httpCode:m().nullable().optional(),inIndex:N().nullable().optional(),lastCrawledDate:s().nullable().optional(),inIndexDate:s().nullable().optional(),inspectedAt:s(),documentSize:m().nullable().optional(),anchorCount:m().nullable().optional(),discoveryDate:s().nullable().optional()});d({summary:d({total:m(),indexed:m(),notIndexed:m(),unknown:m().optional(),percentage:ot()}),lastInspectedAt:s().nullable(),indexed:y(Ff).default([]),notIndexed:y(Ff).default([]),unknown:y(Ff).default([]).optional()});d({query:s(),impressions:m(),clicks:m(),ctr:we(),averagePosition:m()});d({date:s(),indexed:m(),notIndexed:m(),unknown:m()});const bV=d({url:s(),status:k(["success","error"]),submittedAt:s(),error:s().optional()});d({summary:d({total:m().int().nonnegative(),succeeded:m().int().nonnegative(),failed:m().int().nonnegative()}),results:y(bV).default([])});const VA=d({url:s(),verified:N()});d({sites:y(VA).default([])});d({connected:N(),domain:s(),siteUrl:s().nullable(),createdAt:s().nullable(),updatedAt:s().nullable()});d({connected:N(),domain:s(),siteUrl:s().nullable(),availableSites:y(VA).default([])});d({siteUrl:s()});const vV=d({name:s(),alive:N(),lastUsed:s().nullable()});d({connected:N(),endpoint:s(),version:s().optional(),browserVersion:s().optional(),targets:y(vV).default([])});const Uo=k(["live","staging"]);d({projectName:s(),url:s(),stagingUrl:s().optional(),username:s(),defaultEnv:Uo,createdAt:s(),updatedAt:s()});const jS=d({url:s(),reachable:N(),pageCount:m().nullable().optional(),version:s().nullable().optional(),error:s().nullable().optional(),plugins:y(s()).optional(),authenticatedUser:d({id:m(),slug:s()}).nullable().optional()});d({connected:N(),projectName:s(),defaultEnv:Uo,live:jS.nullable(),staging:jS.nullable(),adminUrl:s().nullable().optional()});const $A=d({id:m(),slug:s(),title:s(),status:s(),modifiedAt:s().nullable().optional(),link:s().nullable().optional()});d({env:Uo,pages:y($A)});const KA=d({title:s().nullable(),description:s().nullable(),noindex:N().nullable(),writable:N().default(!1),writeTargets:y(s()).default([])}),xV=d({type:s(),json:Ke(s(),kn())}),wV=$A.extend({env:Uo,content:s(),seo:KA,schemaBlocks:y(xV).default([])}),AS=wV.extend({contentHash:s(),contentSnippet:s()}),GA=d({manualRequired:E(!0),targetUrl:s(),adminUrl:s().nullable().optional(),content:s(),nextSteps:y(s()).default([])}),SV=d({slug:s(),severity:k(["high","medium","low"]),code:k(["noindex","missing-seo-title","missing-meta-description","missing-schema","thin-content"]),message:s()});d({slug:s(),title:s(),status:s(),wordCount:m(),seo:KA,schemaPresent:N(),issues:y(SV).default([])});const kV=d({slug:s(),status:k(["applied","skipped","manual"]),error:s().optional(),manualAssist:GA.optional()});d({env:Uo,strategy:k(["plugin","manual"]),results:y(kV)});const jV=d({slug:s(),status:k(["deployed","stripped","skipped","failed"]),schemasInjected:y(s()).optional(),manualAssist:GA.optional(),error:s().optional()});d({env:Uo,results:y(jV)});const AV=d({slug:s(),title:s(),canonrySchemas:y(s()),thirdPartySchemas:y(s()),hasCanonrySchema:N()});d({env:Uo,pages:y(AV)});const NV=d({name:s(),status:k(["completed","skipped","failed"]),summary:s().optional(),error:s().optional()});d({projectName:s(),steps:y(NV)});d({slug:s(),live:AS,staging:AS,hasDifferences:N(),differences:d({title:N(),slug:N(),content:N(),seoTitle:N(),seoDescription:N(),noindex:N(),schema:N()})});const CV=b2.shape.searchUnit.unwrap().enum;CV.query;const HA=d({name:s(),displayName:s().optional(),keyUrl:s().optional(),modelHint:s().optional(),model:s().optional(),defaultModel:s().optional(),configured:N(),quota:oO.optional(),vertexConfigured:N().optional()});d({configPath:s().min(1).max(4096).optional(),databasePath:s().min(1).max(4096).optional()}).strict().refine(e=>e.configPath===void 0==(e.databasePath===void 0),"configPath and databasePath must be supplied together");const _V=k(["install-identity-mismatch"]);_V.enum;d({reloaded:E(!0),providers:y(HA)});const TV=d({name:s(),displayName:s(),mode:k(["api","browser"]),modelConfigurable:N(),defaultModel:s(),knownModels:y(d({id:s(),displayName:s(),tier:k(["flagship","standard","fast","economy"])})).default([]),modelValidationPattern:d({source:s(),flags:s()}),modelValidationHint:s()}),NS=d({configured:N()});d({providers:y(HA).default([]),providerCatalog:y(TV).default([]),google:NS,bing:NS});const FA=k(["gsc","ga","gbp","bing","ads","google-ads","gtm","traffic"]);FA.enum;const A1=k(["ok","failing","stale","never-synced"]);A1.enum;const Gc=s().datetime({offset:!0}),EV=s().regex(/^\d{4}-\d{2}-\d{2}$/),RV=d({integration:FA,label:s(),runKind:No,sourceId:s().nullable(),state:A1,lastSuccessAt:Gc.nullable(),latestRunAt:Gc.nullable(),latestRunId:s().nullable(),latestStatus:ta.nullable(),latestTrigger:Km.nullable(),consecutiveFailures:m().int().nonnegative(),latestError:s().max(300).nullable(),dataThrough:EV.nullable(),dataAgeDays:m().int().nonnegative().nullable(),doctorChecks:y(s())}),DV=d({status:k(["ok","warn","fail"]),code:s(),summary:s(),checkedAt:Gc,notifiedAt:Gc.nullable()}),zV=d({project:s(),displayName:s(),state:k([...A1.options,"warning"]),health:DV.nullable(),integrations:y(RV)});d({generatedAt:Gc,summary:d({projects:m().int().nonnegative(),ok:m().int().nonnegative(),failing:m().int().nonnegative(),warning:m().int().nonnegative().optional(),stale:m().int().nonnegative(),neverSynced:m().int().nonnegative()}),projects:y(zV)});const IV=k(["recorded","errored","expired","canceled","parse_failed","duplicate"]);IV.enum;const OV=k(["not_plan_run","scoped_run","probe_run","batch_unavailable","model_not_frozen"]);OV.enum;Ow.standard,Ow.batch;const QA=k(["all","api","browser"]);QA.enum;const PV=k(["yes","no","unknown","not-mentioned"]),CS=y(s().min(1)),_S=d({companyName:s().min(1),domain:s().min(1),queries:CS.optional(),phrases:CS.optional(),competitors:y(s().min(1)).optional(),providers:y(s().trim().min(1)).min(1).optional().describe("Configured provider names to use for both answers and analysis. Omit to use all providers matching providerMode."),providerMode:QA.optional().describe("Filter providers by transport; defaults to all. Browser-only selection requires manual queries and uses no API provider for analysis.")}).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"]})});_S.safeExtend({competitors:_S.shape.competitors.default([])});const qV=d({name:s(),count:m().int().nonnegative()}),MV=d({id:s(),name:s(),weight:m(),score:m(),findings:y(d({type:s(),message:s()})).default([]),recommendations:y(s()).default([])}),BV=d({url:s(),finalUrl:s(),auditedAt:s(),overallScore:m(),summary:s(),factors:y(MV).default([])}),LV=d({industry:s(),summary:s(),services:y(s()).default([]),categoryTerms:y(s()).default([])}),UV=d({provider:s(),displayName:s(),model:s().nullable().optional(),mentioned:N(),cited:N(),describedAccurately:PV,accuracyNotes:s().nullable().optional(),incorrectClaims:y(s()).default([]),recommendedCompetitors:y(s()).default([]),citedDomains:y(s()).default([]),groundingSources:y(Gm).default([]),searchQueries:y(s()).default([]),answerText:s(),error:s().nullable().optional()}),VV=d({query:s(),providerResults:y(UV).default([])}),$V=d({totalQueries:m().int().nonnegative(),totalProviders:m().int().nonnegative(),totalComparisons:m().int().nonnegative(),mentionCount:m().int().nonnegative(),citationCount:m().int().nonnegative(),topCompetitors:y(qV).default([]),visibilityGap:s(),whatThisMeans:y(s()).default([]),recommendedActions:y(s()).default([])});d({companyName:s(),domain:s(),homepageUrl:s(),generatedAt:s(),queries:y(s()).default([]),competitors:y(s()).default([]),profile:LV,audit:BV,queryResults:y(VV).default([]),summary:$V});k(["json","csv"]);const KV=d({runId:s(),runKind:E("answer-visibility"),runStatus:ta,runTrigger:Km,runCreatedAt:s(),runStartedAt:s().nullable(),runFinishedAt:s().nullable(),snapshotId:s(),snapshotCreatedAt:s(),queryId:s().nullable(),query:s().nullable(),provider:s(),model:s().nullable(),location:s().nullable(),citationState:Ki,cited:N(),answerMentioned:N().nullable(),mentionState:Fe([Vc,de()]),citedDomains:y(s()),citedUrls:y(s()).nullable(),captureStatus:Fe([Lm,de()]),sourceCount:m().int().nonnegative().nullable(),resolvedCount:m().int().nonnegative().nullable(),captureVersion:m().int().positive().nullable(),competitorOverlap:y(s()),recommendedCompetitors:y(s()),answerText:s().nullable(),groundingSources:y(Gm),searchQueries:y(s())}),GV=d({since:s().nullable(),until:s().nullable(),includeProbes:N()});d({schemaVersion:E("canonry.results-export/v1"),generatedAt:s(),project:d({id:s(),name:s(),displayName:s(),canonicalDomain:s(),country:s(),language:s()}),filters:GV,recordCount:m().int().nonnegative(),records:y(KV)});d({runIds:y(s().trim().min(1)).max(100).default([]),researchRunIds:y(s().trim().min(1)).max(100).default([]),confirm:N().default(!1)}).strict().superRefine((e,n)=>{e.runIds.length+e.researchRunIds.length===0&&n.addIssue({code:"custom",message:"Select at least one saved run."}),(new Set(e.runIds).size!==e.runIds.length||new Set(e.researchRunIds).size!==e.researchRunIds.length)&&n.addIssue({code:"custom",message:"Run IDs must be unique."})});d({dryRun:N(),runIds:y(s()),researchRunIds:y(s()),querySnapshots:m().int().nonnegative(),researchQueries:m().int().nonnegative(),insights:m().int().nonnegative(),healthSnapshots:m().int().nonnegative()});const uu=k(["organic","paid"]);uu.enum;d({id:s(),projectId:s(),propertyId:s(),clientEmail:s(),connected:N(),createdAt:s(),updatedAt:s()});d({date:s(),landingPage:s(),sessions:m(),organicSessions:m(),users:m()});const N1=k(["session","first_user","manual_utm"]),HV=d({source:s(),medium:s(),trafficClass:uu,sessions:m(),users:m().optional(),sourceDimension:N1,share:we()}),FV=d({source:s(),medium:s(),trafficClass:uu,sourceDimension:N1,landingPage:s(),sessions:m(),users:m().optional()}),QV=d({source:s(),medium:s(),sessions:m(),users:m().optional(),channelGroup:s(),share:we()}),xc=d({sessions:m(),sharePct:ot(),sharePctDisplay:s()}),ZV=d({organic:xc,social:xc,direct:xc,ai:xc,other:xc}),YV=d({totalSessions:m(),totalOrganicSessions:m(),totalDirectSessions:m(),totalUsers:m().nullable(),topPages:y(d({landingPage:s(),sessions:m(),organicSessions:m(),directSessions:m(),users:m(),organicShare:we().nullable()})),aiReferrals:y(HV),aiReferralLandingPages:y(FV),aiSessionsDeduped:m(),aiUsersDeduped:m().optional(),paidAiSessionsDeduped:m(),paidAiUsersDeduped:m().optional(),organicAiSessionsDeduped:m(),organicAiUsersDeduped:m().optional(),aiSessionsBySession:m(),aiUsersBySession:m().optional(),paidAiSessionsBySession:m(),paidAiUsersBySession:m().optional(),organicAiSessionsBySession:m(),organicAiUsersBySession:m().optional(),socialReferrals:y(QV),socialSessions:m(),socialUsers:m().optional(),channelBreakdown:ZV,organicSharePct:ot(),aiSharePct:ot(),aiSharePctBySession:ot(),paidAiSharePct:ot(),paidAiSharePctBySession:ot(),organicAiSharePct:ot(),organicAiSharePctBySession:ot(),directSharePct:ot(),socialSharePct:ot(),organicSharePctDisplay:s(),aiSharePctDisplay:s(),aiSharePctBySessionDisplay:s(),paidAiSharePctDisplay:s(),paidAiSharePctBySessionDisplay:s(),organicAiSharePctDisplay:s(),organicAiSharePctBySessionDisplay:s(),directSharePctDisplay:s(),socialSharePctDisplay:s(),otherSessions:m(),otherSharePct:ot(),otherSharePctDisplay:s(),lastSyncedAt:s().nullable()});d({connected:N(),propertyId:s().nullable(),clientEmail:s().nullable(),authMethod:k(["service-account","oauth"]).nullable(),lastSyncedAt:s().nullable(),createdAt:s().nullable().optional(),updatedAt:s().nullable().optional()});const XV=d({propertyId:s(),displayName:s(),accountName:s()});d({properties:y(XV)});const C1=k(tl.gaSearchLanding),Fae=C1.options,Qae="28d",JV="(empty)";function Zae(e){return e===""?JV:e}const Yae=1e3,WV=k(["never-synced","ready","unavailable","error"]),ZA=d({organicGoogleSearchClicks:m().int().nonnegative(),organicGoogleSearchImpressions:m().int().nonnegative(),organicGoogleSearchClickThroughRate:we(m().min(0).max(1)).nullable(),organicGoogleSearchAveragePosition:m().nonnegative().nullable(),activeUsers:m().int().nonnegative()}),e$=ZA.extend({landingPage:s()});d({source:E("ga4-search-console-link"),status:WV,error:s().nullable(),syncedAt:s().datetime().nullable(),attemptedAt:s().datetime().nullable(),window:C1,windowStart:Is().nullable(),windowEnd:Is().nullable(),windowDays:m().int().positive().nullable(),timeZone:s().nullable(),subjectToThresholding:N(),dataLossFromOtherRow:N(),total:ZA.nullable(),reportRowCount:m().int().nonnegative().nullable(),rowsCapped:N(),totalRows:m().int().nonnegative(),limit:m().int().positive(),offset:m().int().nonnegative(),rows:y(e$)});function Xae(e){return e.organicGoogleSearchClicks>0||e.organicGoogleSearchImpressions>0}const t$=d({status:k(["ready","unavailable","error"]),windows:y(d({window:C1,rowCount:m().int().nonnegative(),reportRowCount:m().int().nonnegative(),rowsCapped:N()})),rowCount:m().int().nonnegative(),error:s().optional()});k(["traffic","ai","social","search-landing"]);d({synced:N(),rowCount:m().int().nonnegative(),aiReferralCount:m().int().nonnegative(),socialReferralCount:m().int().nonnegative(),days:m().int().nonnegative(),requestedDays:m().int().nonnegative(),clamped:N(),syncedAt:s(),measurement:d({acquisition:d({days:m().int().nonnegative(),status:k(["ready","error"]),rowCount:m().int().nonnegative(),error:s().optional()}),leads:d({days:m().int().nonnegative(),status:k(["ready","error","not-configured"]),rowCount:m().int().nonnegative(),attributionScope:k(["landing-page","channel"]).optional(),error:s().optional()}),searchLandingPages:t$.optional()}),syncedComponents:y(s()).optional()});const YA=k(["new","small-base","percent"]);YA.enum;const Ug=d({source:s(),sessions7d:m(),sessionsPrev7d:m(),changeSessions:m(),changePct:ot().nullable(),changeBasis:YA});d({socialSessions7d:m(),socialSessionsPrev7d:m(),trend7dPct:ot().nullable(),socialSessions30d:m(),socialSessionsPrev30d:m(),trend30dPct:ot().nullable(),biggestMover:Ug.nullable()});const wc=d({sessions7d:m(),sessionsPrev7d:m(),trend7dPct:ot().nullable(),sessions30d:m(),sessionsPrev30d:m(),trend30dPct:ot().nullable()});d({organic:wc,ai:wc,social:wc,direct:wc,total:wc,aiBiggestMover:Ug.nullable(),socialBiggestMover:Ug.nullable()});YV.extend({windowStart:s().nullable(),windowEnd:s().nullable(),windowDays:m().nullable(),periodStart:s().nullable(),periodEnd:s().nullable()});d({date:s(),source:s(),medium:s(),trafficClass:uu,landingPage:s(),sessions:m(),users:m(),sourceDimension:N1});const n$=d({source:s(),sessions:m(),paidSessions:m(),organicSessions:m()}),a$=d({date:s(),sessions:m(),paidSessions:m(),organicSessions:m(),bySource:y(n$)});d({days:y(a$),sources:y(s()),totalSessions:m(),totalPaidSessions:m(),totalOrganicSessions:m()});d({date:s(),source:s(),medium:s(),sessions:m(),users:m(),channelGroup:s()});d({date:s(),sessions:m(),organicSessions:m(),users:m(),usersSource:k(["deduplicated","landing-page-sum"])});const ym=k(["date","channelGroup","source","medium","hostName","landingPage"]);ym.enum;d({window:Ls.optional(),startDate:Is().optional(),endDate:Is().optional(),channel:s().optional(),source:s().optional(),medium:s().optional(),hostName:s().optional(),landingPage:s().optional(),pathPrefix:s().optional(),groupBy:s().refine(e=>e.split(",").every(n=>ym.safeParse(n.trim()).success),`groupBy must contain: ${ym.options.join(", ")}`).optional(),limit:m().int().min(1).max(1e3).optional(),offset:m().int().nonnegative().optional()}).strict();const i$=d({date:s().optional(),channelGroup:s().optional(),source:s().optional(),medium:s().optional(),hostName:s().optional(),landingPage:s().optional(),sessions:m().int().nonnegative()});d({source:E("ga4-acquisition"),status:Cg,error:s().nullable(),syncedAt:s().nullable(),scope:d({project:s(),attribution:E("project-only"),unavailableDimensions:y(k(["property","target","market"]))}),window:d({startDate:s().nullable(),endDate:s().nullable(),window:Ls}),coverage:d({earliestDate:s().nullable(),latestDate:s().nullable()}),filters:d({channel:s().nullable(),source:s().nullable(),medium:s().nullable(),hostName:s().nullable(),landingPage:s().nullable(),pathPrefix:s().nullable()}),groupBy:y(ym),channelGroups:y(s()),totalSessions:m().int().nonnegative(),totalRows:m().int().nonnegative(),limit:m().int(),offset:m().int(),rows:y(i$)});d({window:Ls.optional(),minAnswers:Ha().int().min(1).max(1e3).optional(),queryClass:k(["non-brand","branded","all"]).optional(),groupKey:s().trim().min(1).optional(),limit:Ha().int().min(1).max(100).optional()}).strict();const s$=d({name:s().trim().min(1),answerCount:m().int().nonnegative(),pairedAnswers:m().int().nonnegative()}).strict(),XA=k(["below-min-answers","not-named","unpaired-name","own-site","listing-marketplace","non-competitor-surface","claimed-by-alias","shared-host"]);XA.enum;const JA=k(["suggested","tracked","excluded"]);JA.enum;const o$=d({domain:s().trim().min(1),label:s().trim().min(1),names:y(s$).max(5),namingAnswers:m().int().nonnegative(),citingAnswers:m().int().nonnegative(),bothAnswers:m().int().nonnegative(),pairedAnswers:m().int().nonnegative(),namedByOtherNameAnswers:m().int().nonnegative(),sweeps:m().int().nonnegative(),firstSeenAt:s().datetime().nullable(),lastSeenAt:s().datetime().nullable(),surfaceClass:x3,tracked:N(),marketKeys:y(s().trim().min(1)).optional(),status:JA,reason:XA.nullable(),sampleUrls:y(s().url()).max(3)}).strict();d({project:s().trim().min(1),window:Ls,scope:w3,filters:d({queryClass:k(["non-brand","branded","all"]),groupKey:s().nullable(),limit:m().int().positive(),minAnswers:m().int().positive()}).strict(),thresholds:d({minAnswers:m().int().positive()}).strict(),candidates:y(o$),candidatesTotal:m().int().nonnegative(),excludedCounts:Ke(s(),m().int().nonnegative()),unresolvedNames:y(d({name:s().trim().min(1),answerCount:m().int().nonnegative()}).strict()),evidence:d({answeredResults:m().int().nonnegative(),sourceResults:m().int().nonnegative(),excludedProbeResults:m().int().nonnegative(),excludedNonCompletedResults:m().int().nonnegative()}).strict(),runCount:m().int().nonnegative(),runIds:y(s()),countUnits:d({answers:y(s()),distinctNames:y(s()),runs:y(s())}).strict(),truncated:N()}).strict();d({id:s(),projectId:s(),runId:s().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:Ke(s(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:s(),status:k(["ready","no-data"]),reason:E("no-runs-yet").optional()});const r$=d({view:k(["project","visibility","property","queries","site-health"]),unavailableReason:s().trim().min(1).max(512).optional(),selection:mm.optional(),page:d({runId:s().trim().min(1).max(256).optional(),nodeKey:s().trim().min(1).max(2048).optional()}).strict().optional()}).strict().superRefine((e,n)=>{e.page&&e.view!=="site-health"&&n.addIssue({code:"custom",message:"Page context requires Site Health."}),e.selection&&!["visibility","property","queries"].includes(e.view)&&n.addIssue({code:"custom",message:"Measurement selection requires a measurement view."})}),l$=d({maxToolCalls:m().int().min(1).max(100).default(30),timeoutMs:m().int().min(1e3).max(6e5).default(18e4)}).strict(),_1=k(["claude","openai","gemini","zai"]),c$=d({id:_1,label:s(),defaultModel:s(),configured:N(),keySource:k(["config","env"]).nullable()});d({providers:y(c$).default([]),defaultProvider:_1.nullable()});const u$=k(["aero","user","compaction"]);u$.enum;const WA=128;d({key:s().min(1).max(WA),value:s().min(1)});d({key:s().min(1).max(WA)});d({prompt:s().trim().min(1),conversationId:s().min(1).nullable().optional(),provider:_1.optional(),modelId:s().trim().min(1).optional(),scope:k(["all","read-only"]).optional(),profile:k(["default","ads-operator"]).optional(),context:r$.optional(),limits:l$.optional()});const d$=OI({role:s(),content:kn().optional()}),eN=d({id:s(),title:s(),active:N(),modelProvider:s(),modelId:s(),createdAt:s(),updatedAt:s()});eN.extend({messages:y(d$),isStreaming:N()});d({conversations:y(eN),currentConversationId:s().nullable(),nextOffset:m().int().nullable()});d({id:dI()}).strict();d({id:s(),status:E("deleted")});const m$=["status","changes","gaps","insights"],p$=k(m$),h$=d({text:s().optional(),tool:d({name:s(),label:s(),arguments:Ke(s(),kn()),result:kn(),durationMs:m().int().nonnegative()})}),f$=d({id:p$,steps:y(h$),answer:s()});d({project:s(),seededAt:s(),starters:y(f$)});d({offset:Ha().int().min(0).default(0),limit:Ha().int().min(1).max(100).default(50)}).strict();const cl=k(["commoncrawl","bing-webmaster"]);cl.enum;const T1=k(["queued","downloading","querying","ready","failed"]);T1.enum;d({id:s(),release:s(),status:T1,phaseDetail:s().nullable().optional(),vertexPath:s().nullable().optional(),edgesPath:s().nullable().optional(),vertexSha256:s().nullable().optional(),edgesSha256:s().nullable().optional(),vertexBytes:m().int().nullable().optional(),edgesBytes:m().int().nullable().optional(),projectsProcessed:m().int().nullable().optional(),domainsDiscovered:m().int().nullable().optional(),downloadStartedAt:s().nullable().optional(),downloadFinishedAt:s().nullable().optional(),queryStartedAt:s().nullable().optional(),queryFinishedAt:s().nullable().optional(),error:s().nullable().optional(),createdAt:s(),updatedAt:s()});const g$=d({linkingDomain:s(),numHosts:m().int(),source:cl}),y$=d({projectId:s(),release:s(),targetDomain:s(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:s(),queriedAt:s(),source:cl,excludedLinkingDomains:m().int().optional(),excludedHosts:m().int().optional()});d({source:cl,summary:y$.nullable(),total:m().int(),rows:y(g$)});d({release:s(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:s(),queriedAt:s(),source:cl});const b$=d({source:cl,connected:N(),hasData:N(),latestRelease:s().nullable(),totalLinkingDomains:m().int(),lastSyncedAt:s().nullable()});d({projectId:s(),targetDomain:s(),sources:y(b$),anyConnected:N(),anyData:N()});d({duckdbInstalled:N(),duckdbVersion:s().nullable().optional(),duckdbSpec:s(),pluginDir:s()});d({installed:N(),version:s(),path:s(),alreadyPresent:N()});d({release:s(),vertexUrl:s(),edgesUrl:s(),vertexBytes:m().int().nullable(),edgesBytes:m().int().nullable(),lastModified:s().nullable()});d({release:s(),syncStatus:T1.nullable(),bytes:m().int(),lastUsedAt:s().nullable()});const v$="jev-1.13.0",Pe=s().trim().min(1).max(256),At=m().int().nonnegative(),tN=Ya(e=>typeof e=="string"?[e]:e,y(Pe).min(1).max(100)),Yd=we(m().min(0).max(1)).nullable(),Hi=k(["favorable","mixed","unfavorable","factual","subject-not-mentioned","wrong-subject","ambiguous-subject","ambiguous-judgment","subject-not-applicable","unsupported-language","missing-source-text","input-too-large","invalid-conclusion-evidence","pending","running","waiting-to-retry","failed","canceled"]);Hi.enum;const E1=k(["disabled","not-measured","processing","partial","complete","failed","canceled","unsupported"]),R1=d({schemaVersion:Fe([E(1),E(2)]),requestedModel:E(v$),verdictVersion:Pe,identityVersion:Pe,evidenceVersion:Pe,segmentationVersion:Pe,preprocessingVersion:Pe,languagePolicy:E("en-only"),comparisonMethodVersion:E("wilson-independent-v1"),confidenceThreshold:m().min(0).max(1).nullable(),questions:d({identity:s(),judgment:s(),stance:s(),conclusion:s(),complaint:s()}).strict()}).strict();function nN(e){if(typeof e!="object"||e===null||!("schemaVersion"in e)||e.schemaVersion!==1)return e;const n=Object.fromEntries(Object.entries(e).filter(([i])=>i!=="themes"));return typeof n.questions=="object"&&n.questions!==null&&(n.questions=Object.fromEntries(Object.entries(n.questions).filter(([i])=>i!=="theme"))),n}Ya(nN,R1);const aN=d({id:Pe,displayName:s(),aliases:y(s()),qualifiedAliases:y(s()).default([]),urls:y(s()),mentionNotApplicable:N()}).strict(),x$=d({queryId:Pe,executionNodeKey:Pe.nullable(),targetId:Pe,propertyId:Pe.nullable(),groupId:Pe.nullable(),marketId:Pe.nullable(),queryClass:k(["branded","non-brand"]),queryText:s().optional(),location:s().nullable()}).strict(),iN=d({queryId:Pe,queryText:s(),queryClass:k(["branded","non-brand"]),provider:Pe,requestedModel:s().nullable(),servedModel:s().nullable(),location:s().nullable(),revision:m().int().nullable(),usageEdges:y(x$),locationContext:Jt.nullable().default(null)}).strict(),Hc=d({id:Pe,text:s().min(1),start:At,end:At}).strict(),sN=d({kind:k(["reported","estimated","unknown"]),inputTokens:At.nullable(),outputTokens:At.nullable()}).strict(),w$=d({sourceSnapshotId:Pe,sourceText:s(),sourceTextHash:Pe,subject:aN,subjectHash:Pe,context:iN,language:s(),definition:R1,sentences:y(Hc)}).strict();Ya(e=>typeof e!="object"||e===null||!("definition"in e)?e:{...e,definition:nN(e.definition)},w$);const Qf={returnedModel:s().nullable(),usage:sN},S$=Ue("kind",[d({kind:E("classified"),...Qf,returnedModel:s(),outcome:Hi,conclusion:y(Hc),complaint:y(Hc).nullable(),confidence:m().min(0).max(1).nullable()}).strict(),d({kind:E("abstained"),...Qf,outcome:Hi,reason:s()}).strict(),d({kind:E("failed"),...Qf,outcome:E("failed"),error:d({code:Pe,message:s(),retryable:N(),retryAfterMs:m().nonnegative().nullable()}).strict()}).strict()]).superRefine((e,n)=>{e.kind==="classified"&&["favorable","mixed","unfavorable"].includes(e.outcome)&&e.conclusion.length===0&&n.addIssue({code:"custom",path:["conclusion"],message:"Judgments require conclusion evidence"})});Ya(e=>typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="themes")):e,S$);const ul=d({runId:Pe.optional(),runIds:tN.optional(),revision:Ha().int().positive().optional(),mode:k(["auto","simple","advanced"]).default("auto"),queryClass:k(["branded","non-brand"]).default("branded"),scope:k(["project","property","group","market"]).default("project"),queryId:Pe.optional(),scopeKey:Pe.optional(),marketKey:Pe.optional(),provider:Pe.optional(),model:Pe.optional(),location:s().min(1).optional(),evaluationDefinitionId:Pe.optional(),executionNodeKey:Pe.optional()}).strict();function du(e,n){e.runId&&e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Choose runId or runIds, not both."}),e.runIds&&new Set(e.runIds).size!==e.runIds.length&&n.addIssue({code:"custom",path:["runIds"],message:"Run IDs must be unique."})}ul.superRefine(du);const k$=k(["assessments","locations"]),j$=25,oN=500;ul.extend({include:Ya(e=>typeof e=="string"?e.split(",").map(n=>n.trim()).filter(Boolean):e,y(k$).max(2)).optional(),queryLimit:Ha().int().min(1).max(oN).default(j$),queryCursor:s().min(1).max(16384).optional()}).superRefine(du);const A$=Ya(e=>{const n=typeof e=="string"?[e]:Array.isArray(e)?e:null;return n?[...new Set(n.flatMap(i=>typeof i=="string"?i.split(",").map(r=>r.trim()).filter(Boolean):[i]))]:e},y(Hi).min(1).max(Hi.options.length));ul.extend({assessmentId:Pe.optional(),outcome:A$.optional(),cursor:s().min(1).max(16384).optional(),limit:Ha().int().min(1).max(100).default(50)}).superRefine(du);ul.extend({fromRunId:Pe.describe("Run ID or previous-rated to select the preceding run with stored ratings in this scope."),toRunId:Pe}).superRefine((e,n)=>{du(e,n),e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Comparison requires one explicit run per period."})});const D1=ul.extend({runId:Pe.nullable(),revision:m().int().nullable(),evaluationDefinitionId:Pe.nullable(),mode:k(["simple","advanced"])}),z1=d(Object.fromEntries(Hi.options.map(e=>[e,At]))).strict(),N$=d({selected:At,eligibleAssessments:At,unadmittedAssessments:At,judged:At,distinctSourceAnswers:At,eligibleAnswers:At.optional(),ratedAnswers:At.optional(),ratedAnswerRate:Yd.optional(),subjectNotMentioned:At.nullable().optional().describe("Distinct admitted answers where every assessed subject in the selected scope is absent. Expected for non-brand queries; not missing classification. Null while disabled."),counts:z1,expectedProviderSlots:At,completedProviderSlots:At}).strict(),C$=d({favorableRate:Yd,mixedRate:Yd,unfavorableRate:Yd,favorableDisplay:s(),mixedDisplay:s(),unfavorableDisplay:s(),interval:d({low:m(),high:m()}).strict().nullable(),method:E("wilson-independent-v1"),limitation:s()}).strict(),Qr={state:E1,reason:s().nullable(),provisional:N(),coverage:N$,score:C$},TS=d({...Qr,selection:D1,runIds:y(Pe)}).strict(),ES=d({...Qr,queryClass:E("all"),pooled:E(!0).optional(),runIds:y(Pe)}).strict(),_$=d({configured:N(),branded:TS,nonBrand:TS,headlineQueryClass:E("branded").optional(),pooledOverall:ES.optional(),overall:ES.optional().describe("Deprecated compatibility field. Pooled branded and non-brand assessments; never use as the sentiment headline.")}).strict(),T$=d({assessmentId:Pe.nullable(),sourceSnapshotId:Pe,runId:Pe,subjectId:Pe,subjectLabel:s(),executionNodeKey:Pe.nullable(),provider:Pe,requestedModel:s().nullable(),servedModel:s().nullable(),location:s().nullable(),evaluationDefinitionId:Pe.nullable(),state:E1,outcome:Fe([Hi,de()]),reason:s().nullable()}).strict(),E$=d({...Qr,queryId:Pe,executionNodeKey:Pe.nullable().optional(),queryText:s(),queryClass:k(["branded","non-brand"]),sourceSnapshotIds:y(Pe),assessments:y(T$).default([]),locations:y(d({...Qr,location:s().nullable(),sourceSnapshotIds:y(Pe)}).strict())}).strict(),R$=d({...Qr,dimension:k(["provider","property","market","query"]),key:s(),label:s(),queryClass:k(["branded","non-brand"])}).strict(),Vg=d({...Qr,configured:N(),selection:D1,evaluationDefinition:R1.nullable(),breakdowns:y(R$),queries:y(E$),criticizedProperties:d({total:At,keys:y(s())}).strict().optional(),queryPage:d({total:At,limit:At,nextCursor:s().nullable()}).strict().optional()}).strict();d({enabled:N().optional()}).strict();const D$=d({installEnabled:N(),enabled:N(),ready:N(),readinessReasons:y(s()),model:s(),enablementEpoch:At,completionBoundary:At,evaluationDefinitionId:Pe.nullable(),actions:d({configure:N(),backfill:N()}).strict(),experimental:E(!0),disclosure:s()}).strict(),rN=ul.extend({runIds:tN.optional(),from:s().datetime().optional(),to:s().datetime().optional()}).superRefine(du);d({previewToken:s().min(1).max(65536),idempotencyKey:s().trim().min(1).max(128)}).strict();const z$=d({previewToken:s().nullable(),expiresAt:s().nullable(),selection:rN,evaluationDefinitionId:Pe.nullable(),eligibleAssessments:At,alreadyClassified:At,skipped:y(d({runId:Pe,reason:s(),count:At}).strict()),estimatedInputTokens:At,estimatedCostUsd:m().nonnegative().nullable(),estimateMethod:s()}).strict(),I$=k(["pending","running","waiting-to-retry","complete","partial","failed","canceled"]),O$=d({id:Pe,workItemId:Pe,dispatchedAt:s(),completedAt:s().nullable(),returnedModel:s().nullable(),usage:sN,errorCode:s().nullable()}).strict(),lN=d({id:Pe,projectId:Pe,origin:k(["automatic","backfill"]),state:I$,enablementEpoch:At,evaluationDefinitionId:Pe,selection:rN,createdAt:s(),updatedAt:s(),counts:z1,selected:At,cancellationReason:s().nullable(),attempts:y(O$),attemptCount:At.optional(),nextAttemptCursor:s().nullable().optional()}).strict(),P$=lN.omit({attempts:!0,attemptCount:!0,nextAttemptCursor:!0}).extend({attemptCount:At}).strict(),q$=d({jobs:y(P$)}).strict(),M$=50;d({attemptLimit:Ha().int().min(1).max(200).default(M$),attemptCursor:s().min(1).max(4096).optional()}).strict();const B$=d({assessmentId:Pe,runId:Pe,sourceSnapshotId:Pe,sourceText:s(),sourceTextHash:Pe,subject:aN,subjectHash:Pe,context:iN,evaluationDefinitionId:Pe,outcome:Hi,conclusion:y(Hc),complaint:y(Hc).nullable(),returnedModel:s().nullable(),reason:s().nullable()}).strict(),L$=d({state:E1,selection:D1.extend({assessmentId:Pe.optional(),outcome:y(Hi).optional()}),items:y(B$),nextCursor:s().nullable()}).strict(),U$=d({from:Vg,to:Vg,verdict:k(["improved","declined","no-clear-change"]).nullable(),favorableRateDelta:m().nullable(),refusalReasons:y(s()),commonUnits:At,excludedFrom:At,excludedTo:At,changedScope:N(),method:E("wilson-independent-v1"),limitation:s()}).strict(),I1=k(["positive","caution","negative","neutral"]),_s=d({label:s(),value:s(),delta:s(),tone:I1,description:s(),tooltip:s().optional(),trend:y(ot()),progress:ot().optional(),providerCoverage:s().optional()}),RS=d({projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative(),combinedMentionSnapshots:m().int().nonnegative(),perCompetitor:y(d({domain:s(),mentionSnapshots:m().int().nonnegative(),shareOfCompetitiveTotal:ot()})),ranking:y(d({kind:k(["project","competitor"]),domain:s().nullable(),mentionSnapshots:m().int().nonnegative(),share:we(m().min(0).max(1))})),snapshotsWithAnswerText:m().int().nonnegative(),snapshotsTotal:m().int().nonnegative(),score:ot(m().min(0).max(100)).nullable()}),V$=_s.extend({breakdown:RS,scope:k(["non-brand","pooled"]),branded:RS}),Zf=d({gained:m().int().nonnegative(),lost:m().int().nonnegative(),tone:I1,hasPreviousRun:N(),gainedQueries:y(s()).optional(),lostQueries:y(s()).optional()}),$$=d({hasPreviousRun:N(),comparable:N(),querySetChanged:N(),previousRunAt:s().nullable(),currentQueryCount:m().int().nonnegative(),previousQueryCount:m().int().nonnegative(),comparableQueryCount:m().int().nonnegative(),addedQueryCount:m().int().nonnegative(),removedQueryCount:m().int().nonnegative(),addedQueries:y(s()),removedQueries:y(s())}),K$=d({id:s(),projectId:s(),runId:s().nullable(),type:k(["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:k(["critical","high","medium","low"]),title:s(),query:s(),provider:s(),recommendation:d({action:s(),target:s().optional(),reason:s()}).optional(),cause:d({cause:s(),competitorDomain:s().optional(),details:s().optional()}).optional(),dismissed:N(),createdAt:s()}),G$=d({id:s(),projectId:s(),runId:s().nullable(),overallCitedRate:we(),overallMentionRate:we(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:Ke(s(),d({citedRate:we(),mentionRate:we(),cited:m().int().nonnegative(),mentioned:m().int().nonnegative(),total:m().int().nonnegative()})),createdAt:s(),status:k(["ready","no-data"]),reason:E("no-runs-yet").optional()});d({sentiment:_$.optional(),project:nB,latestRun:sq,health:G$.nullable(),topInsights:y(K$),queryClassScope:d({queryClass:E("all"),figures:y(s()),note:s()}).optional(),queryCounts:d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),notCitedQueries:m().int().nonnegative(),citedRate:we(),mentionedQueries:m().int().nonnegative(),notMentionedQueries:m().int().nonnegative(),mentionRate:we()}),providers:y(d({provider:s(),citedRate:we(),cited:m().int().nonnegative(),total:m().int().nonnegative()})),transitions:d({since:s().nullable(),gained:m().int().nonnegative(),lost:m().int().nonnegative(),emerging:m().int().nonnegative()}),scores:d({mention:_s,visibility:_s,mentionShare:V$,gapQueries:_s,mentionGaps:_s,indexCoverage:_s,competitorPressure:_s,runStatus:_s}),movementSummary:Zf,citationMovement:Zf,mentionMovement:Zf,movementComparison:$$,competitors:y(d({id:s(),domain:s(),aliases:y(s()).optional(),autoAliasNames:y(s()).optional(),citationCount:m().int().nonnegative(),totalQueries:m().int().nonnegative(),pressureLabel:k(["None","Low","Moderate","High"]),citedQueries:y(s())})),providerScores:y(d({provider:s(),model:s().nullable(),score:ot(),cited:m().int().nonnegative(),total:m().int().nonnegative(),trend:y(ot()).optional()})),attentionItems:y(d({id:s(),tone:I1,title:s(),detail:s(),actionLabel:s(),href:s()})),runHistory:y(d({runId:s(),createdAt:s(),citedCount:m().int().nonnegative(),totalCount:m().int().nonnegative(),citationRate:ot(),mentionedCount:m().int().nonnegative(),mentionRate:ot(),status:s()})),suggestedQueries:d({rows:y(d({query:s(),impressions:m(),clicks:m(),avgPosition:m(),reason:s()})),totalCandidates:m().int().nonnegative(),skippedAlreadyTracked:m().int().nonnegative()}),dateRangeLabel:s(),contextLabel:s()});k(["snapshot","insight"]);const H$=d({kind:E("snapshot"),id:s(),runId:s(),query:s(),provider:s(),model:s().nullable(),citationState:Ki,matchedField:k(["answerText","citedDomains","citedUrls","searchQueries","query"]),snippet:s(),createdAt:s()}),F$=d({kind:E("insight"),id:s(),runId:s().nullable(),type:k(["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:k(["critical","high","medium","low"]),title:s(),query:s(),provider:s(),matchedField:k(["title","query","recommendation","cause"]),snippet:s(),dismissed:N(),createdAt:s()}),Q$=Ue("kind",[H$,F$]);d({query:s(),totalHits:m().int().nonnegative(),truncated:N(),hits:y(Q$)});const cN=k(["create","expand","refresh","add-schema"]);cN.enum;const uN=k(["gsc","competitor-evidence","both"]);uN.enum;const dN=k(["high","medium","low"]);dN.enum;const Z$=k(["blog-post","comparison","listicle","how-to","guide","glossary"]);Z$.enum;const mN=k(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);mN.enum;const O1=k(["ownable","ceded"]);O1.enum;const Y$=d({url:s(),gscImpressions:m().nonnegative(),gscClicks:m().nonnegative(),gscAvgPosition:m().nonnegative().nullable(),organicSessions:m().nonnegative()}),X$=d({domain:s(),url:s(),title:s(),citationCount:m().int().nonnegative()}),J$=d({demand:m(),competitor:m(),absence:m(),gapSeverity:m()}),W$=d({actionId:s(),state:mN,lastUpdated:s()}),eK=d({targetRef:s(),query:s(),action:cN,ourBestPage:Y$.nullable(),winningCompetitor:X$.nullable(),score:m(),scoreBreakdown:J$,drivers:y(s()),demandSource:uN,actionConfidence:dN,existingAction:W$.nullable(),winnabilityClass:O1,winnability:we(m().min(0).max(1)).nullable()});d({targets:y(eK),contextMetrics:d({totalAiReferralSessions:m().int().nonnegative(),latestRunId:s(),runTimestamp:s()})});const tK=d({targetRef:s(),addressedUrl:s().nullable(),note:s().nullable(),dismissedAt:s()});d({dismissals:y(tK)});d({targetRef:s().min(1),addressedUrl:s().url().optional(),note:s().max(500).optional()});d({targetRef:s(),promptVersion:s(),provider:s(),model:s(),responseText:s(),costMillicents:m().int().nonnegative(),generatedAt:s()});d({provider:s().optional(),model:s().optional(),forceRefresh:N().optional()});const nK=d({targetQuery:s().trim().min(1),winnabilityClass:O1,angle:s().trim().min(1),whyWinnable:s().trim().min(1),schemaHookup:s().trim().min(1),controllableSurfaceRationale:s().trim().min(1)});d({targetRef:s(),promptVersion:s(),provider:s(),model:s(),brief:nK,costMillicents:m().int().nonnegative(),generatedAt:s()});const aK=d({domain:s(),competitorType:ou,hits:m().int().nonnegative(),updatedAt:s()});d({classifications:y(aK)});const iK=d({uri:s(),title:s(),domain:s(),isOurDomain:N(),isCompetitor:N(),citationCount:m().int().nonnegative(),providers:y(bt)}),sK=d({query:s(),groundingSources:y(iK)});d({sources:y(sK),latestRunId:s()});const oK=d({query:s(),competitorDomains:y(s()),competitorCount:m().int().nonnegative(),missRate:we(m().min(0).max(1)),lastSeenInRunId:s()});d({gaps:y(oK),latestRunId:s()});const pN=k(["ok","warn","fail","skipped"]);pN.enum;const P1=k(["global","project"]);P1.enum;const hN=k(["auth","config","providers","integrations","database","schedules","agent"]);hN.enum;const fN=k(["health","silent"]);fN.enum;const rK=s().regex(/^[1-9]\d{3}-(0[1-9]|1[0-2])$/,"Expected YYYY-MM"),lK=d({id:s(),category:hN,scope:P1,title:s(),status:pN,notificationPolicy:fN.optional().describe("Health checks page by default. Silent checks (report advisories and standing advisories) remain visible but never affect health alert state."),code:s().describe('Stable machine-readable code (e.g. "google.token.refresh-failed"). Use this for filtering and remediation logic.'),summary:s(),remediation:s().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:Ke(s(),kn()).optional().describe("Structured context — principal email, redirect URI, missing scopes, etc. Stable per check id."),durationMs:m().int().nonnegative().describe("How long the check took to execute.")});d({scope:P1,project:s().nullable().describe('Project name when scope is "project", null otherwise.'),reportMonths:y(rK).optional().describe("Calendar months evaluated by project report readiness checks."),generatedAt:s().describe("ISO-8601 timestamp when this doctor run started."),durationMs:m().int().nonnegative(),summary:d({total:m().int().nonnegative(),ok:m().int().nonnegative(),warn:m().int().nonnegative(),fail:m().int().nonnegative(),skipped:m().int().nonnegative()}),checks:y(lK)});function cK(e){return e.trim().toLowerCase()}const uK=d({provider:s(),citationState:Ki,cited:N(),mentioned:N(),runId:s(),runCreatedAt:s()}),dK=d({queryId:s(),query:s(),providers:y(uK),citedCount:m().int().nonnegative(),mentionedCount:m().int().nonnegative(),totalProviders:m().int().nonnegative()}),mK=d({queryId:s(),query:s(),provider:s(),citingCompetitors:y(s()),runId:s(),runCreatedAt:s()}),pK=d({providersConfigured:m().int().nonnegative(),providersCiting:m().int().nonnegative(),providersMentioning:m().int().nonnegative(),totalQueries:m().int().nonnegative(),queriesCitedAndMentioned:m().int().nonnegative(),queriesCitedOnly:m().int().nonnegative(),queriesMentionedOnly:m().int().nonnegative(),queriesInvisible:m().int().nonnegative(),latestRunId:s().nullable(),latestRunAt:s().nullable()});d({summary:pK,byQuery:y(dK),competitorGaps:y(mK),status:k(["ready","no-data"]),reason:k(["no-runs-yet","no-queries"]).optional()});const hK=Fe(s2(tl.organicEvidence).map(e=>E(e))),fK=k(["earliest","middle","prior","latest"]),qr=d({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),gN=d({name:fK,startDate:s(),endDate:s()}),gK=gN.extend({totals:qr}),yK=gN.extend({organicSessions:m().int().nonnegative()}),Yf=d({startDate:s(),endDate:s(),observedDays:m().int().nonnegative()}),qd=d({verified:m().int().nonnegative(),claimedUnverified:m().int().nonnegative(),unknownAiLike:m().int().nonnegative()}),DS=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({contractVersion:E("organic-evidence/v1"),periodDays:hK,asOfDate:s().nullable(),coverage:d({gsc:N(),ga4:N(),server:N(),visibility:N()}),sourceCoverage:d({gsc:Yf.nullable(),ga4:Yf.nullable(),server:Yf.nullable(),visibility:d({completedAt:s(),ageDays:m().nonnegative()}).nullable()}),gsc:d({propertyTotals:qr,namedBrand:qr,namedNonBrand:qr,suppressedOrUnreportedResidual:qr,cohorts:y(gK)}).nullable(),ga4:d({organicSessions:m().int().nonnegative(),cohorts:y(yK)}).nullable(),gaAiReferrals:d({paidSessions:m().int().nonnegative(),organicSessions:m().int().nonnegative()}).nullable(),server:d({crawlerHits:qd,userFetchHits:qd,referralSessions:DS}).nullable(),visibility:d({runId:s(),completedAt:s(),ageDays:m().nonnegative(),answerPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative()}).nullable(),measurement:t9,pages:y(d({path:s(),gsc:qr,ga4OrganicSessions:m().int().nonnegative(),server:d({crawlerHits:qd,userFetchHits:qd,referralSessions:DS})})),findings:y(d({tone:k(["positive","caution","neutral"]),title:s(),detail:s()})),limitations:y(d({code:s(),detail:s()}))});const bK=k(["claude","codex"]);bK.enum;const vK=k(["claude","codex","all"]);vK.enum;const yN=d({content:m().int().nonnegative(),sitemap:m().int().nonnegative(),robots:m().int().nonnegative(),asset:m().int().nonnegative(),other:m().int().nonnegative()}),xK=k(["content","sitemap","robots","asset","other"]),q1=k(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);q1.enum;const wK=k(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);wK.enum;const SK=k(["raw-request","aggregate-bucket"]),kK=SK.enum,jK=k(["observed","provider-aggregated","inferred"]),AK=jK.enum,NK=d({type:s().nullable(),labels:Ke(s(),s())}),CK=d({sourceType:q1,evidenceKind:E(kK["raw-request"]),confidence:E(AK.observed),eventId:s().min(1),observedAt:s().min(1),method:s().nullable(),requestUrl:s().nullable(),host:s().nullable(),path:s().min(1),queryString:s().nullable(),status:m().int().nullable(),userAgent:s().nullable(),remoteIp:s().nullable(),referer:s().nullable(),latencyMs:m().nullable(),requestSizeBytes:m().int().nullable(),responseSizeBytes:m().int().nullable(),providerResource:NK,providerLabels:Ke(s(),s())});d({events:y(CK),rawEntryCount:m().int().nonnegative(),skippedEntryCount:m().int().nonnegative(),nextPageToken:s().optional(),filter:s()});const bN=k(["connected","paused","error","archived"]),Jae=bN.enum,vN=k(["oauth","service-account"]);vN.enum;const xN=k(["verified","claimed_unverified","unknown_ai_like"]),Wae=xN.enum,_K=d({id:s().min(1),source:s().min(1),version:s().min(1)}),wN=d({manifestId:s().min(1),manifest:_K.nullable(),hits:m().int().nonnegative()});d({gcpProjectId:s().min(1),serviceName:s().nullable().optional(),location:s().nullable().optional(),authMode:vN});d({baseUrl:s().url(),username:s().min(1)});const M1=k(["production","preview"]);M1.enum;d({projectId:s().min(1),teamId:s().min(1),environment:M1});const SN=d({id:s(),projectId:s(),sourceType:q1,displayName:s(),status:bN,lastSyncedAt:s().nullable(),lastCursor:s().nullable(),lastError:s().nullable(),skippedThroughAt:s().nullable(),queueBacklogCount:m().int().nonnegative().nullable(),queueBacklogObservedAt:s().nullable(),archivedAt:s().nullable(),config:Ke(s(),kn()),createdAt:s(),updatedAt:s()});d({gcpProjectId:s().min(1),serviceName:s().min(1).optional(),location:s().min(1).optional(),displayName:s().min(1).optional(),keyJson:s().optional()});d({baseUrl:s().url(),username:s().min(1),applicationPassword:s().min(1),displayName:s().min(1).optional()});d({projectId:s().min(1),teamId:s().min(1),token:s().min(1),environment:M1.optional(),displayName:s().min(1).optional()});const TK=k(["direct-push","queue-pull"]),dl=TK.enum,B1=s().regex(/^(?=.{1,63}$)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,"Cloudflare Queue name must be 1-63 characters, use only letters, numbers, or dashes, and start and end with a letter or number"),kN=d({schemaVersion:E(1),workerVersion:s().min(1),expectedBotListVersion:s().min(1),zoneId:s().nullable()}),EK=kN.extend({deliveryMode:E(dl["direct-push"]),accountId:s().nullable()}),RK=kN.extend({deliveryMode:E(dl["queue-pull"]),accountId:s().min(1),queueId:s().min(1),queueName:B1,retentionSeconds:m().int().min(60).max(1209600)});function jN(e){if(typeof e!="object"||e===null||Array.isArray(e))return e;const n=e;return"deliveryMode"in n?e:{...n,deliveryMode:"direct-push"}}Ya(jN,Ue("deliveryMode",[EK,RK]));const AN=d({displayName:s().min(1).optional(),zoneId:s().min(1).optional()}),DK=AN.extend({deliveryMode:E(dl["direct-push"]),accountId:s().min(1).optional()}),zK=AN.extend({deliveryMode:E(dl["queue-pull"]),accountId:s().min(1),queueId:s().min(1),queueName:B1,retentionSeconds:m().int().min(60).max(1209600),apiToken:s().min(1)});Ya(jN,Ue("deliveryMode",[DK,zK]));const NN=d({sourceId:s().min(1),workerScript:s().min(1),wranglerToml:s().min(1),workerVersion:s().min(1),instructions:s().min(1)}),IK=NN.extend({deliveryMode:E(dl["direct-push"]),activationRequired:N().default(!1)}),OK=NN.extend({deliveryMode:E(dl["queue-pull"]),activationRequired:N().default(!1),accountId:s().min(1),queueId:s().min(1),queueName:B1,retentionSeconds:m().int().min(60).max(1209600)});Ue("deliveryMode",[IK,OK]);const PK=d({eventId:s().min(1),observedAt:s().datetime(),method:s().nullable(),host:s().nullable(),path:s().min(1),queryString:s().nullable(),status:m().int().nullable(),userAgent:s().nullable(),remoteIp:s().nullable(),referer:s().nullable(),cf:d({verifiedBot:N().nullable(),botScore:m().int().nullable(),country:s().nullable(),asn:m().int().nullable(),asOrganization:s().nullable()}).nullable()});d({schemaVersion:E(1),workerVersion:s().min(1),events:y(PK).min(1).max(100)});d({acceptedEvents:m().int(),droppedEvents:m().int(),workerVersionAck:s(),crawlerBucketRows:m().int(),aiUserFetchBucketRows:m().int(),aiReferralBucketRows:m().int(),sampleRows:m().int()});d({sourceId:s(),runId:s(),syncedAt:s(),pulledEvents:m().int().nonnegative(),selfTrafficExcluded:m().int().nonnegative(),crawlerHits:m().int().nonnegative(),aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),unknownHits:m().int().nonnegative(),crawlerBucketRows:m().int().nonnegative(),aiUserFetchBucketRows:m().int().nonnegative(),aiReferralBucketRows:m().int().nonnegative(),sampleRows:m().int().nonnegative(),remainingBacklogCount:m().int().nonnegative().optional(),windowStart:s(),windowEnd:s()});d({days:m().int().positive().optional()});d({advanceToNow:E(!0)});d({sourceId:s(),runId:s(),status:ta,windowStart:s(),windowEnd:s(),daysRequested:m().int().positive(),daysApplied:m().int().positive()});const qK=d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:yN,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),sampleCount:m().int().nonnegative()});d({sources:y(SN)});const MK=SN.extend({totals24h:qK,latestRun:d({runId:s(),status:ta,startedAt:s().nullable(),finishedAt:s().nullable(),error:s().nullable()}).nullable()});d({sources:y(MK)});const BK=k(["crawler","ai-user-fetch","ai-referral"]),L1=BK.enum,CN=k(["hour","day"]);CN.enum;const LK=d({bucket:s(),crawlerHits:m().int().nonnegative(),aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),measured:N()}),UK=d({kind:E(L1.crawler),sourceId:s(),tsHour:s(),botId:s(),operator:s(),verificationStatus:s(),verificationManifests:y(wN).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:s(),pathClass:xK,status:m().int(),hits:m().int().nonnegative()}),VK=d({kind:E(L1["ai-user-fetch"]),sourceId:s(),tsHour:s(),botId:s(),operator:s(),verificationStatus:s(),verificationManifests:y(wN).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:s(),status:m().int(),hits:m().int().nonnegative()}),$K=d({kind:E(L1["ai-referral"]),sourceId:s(),tsHour:s(),product:s(),operator:s(),sourceDomain:s(),evidenceType:s(),landingPathNormalized:s(),status:m().int(),hits:m().int().nonnegative(),paidHits:m().int().nonnegative(),organicHits:m().int().nonnegative(),unknownHits:m().int().nonnegative()}),KK=Ue("kind",[UK,VK,$K]);d({windowStart:s(),windowEnd:s(),series:d({granularity:CN,points:y(LK),coverageStart:s().nullable(),trends:d({crawlerContentHits:Co.nullable(),aiUserFetchHits:Co.nullable(),aiReferralLandedHits:Co.nullable()})}),totals:d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:yN,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),aiReferralPaidHits:m().int().nonnegative(),aiReferralOrganicHits:m().int().nonnegative(),aiReferralUnknownHits:m().int().nonnegative()}),eventRows:d({total:m().int().nonnegative(),returned:m().int().nonnegative(),truncated:N()}),events:y(KK)});const _N=k(["crawler","ai-user-fetch","ai-referral","unknown"]);_N.enum;d({kind:k(["crawler","ai-user-fetch","ai-referral","unknown","all"]).optional(),sourceId:s().min(1).optional(),since:Fe([sm({offset:!0}),Is()],{error:"Expected an ISO timestamp or YYYY-MM-DD date"}).optional(),until:Fe([sm({offset:!0}),Is()],{error:"Expected an ISO timestamp or YYYY-MM-DD date"}).optional(),path:s().optional(),limit:m().int().min(1).max(500).optional(),offset:m().int().nonnegative().optional()}).strict();const zS=d({botId:s().nullish(),operator:s().nullish(),product:s().nullish(),verificationStatus:xN.nullish(),verificationManifest:d({id:s().nullish(),source:s().nullish(),version:s().nullish()}).nullish(),matchedUserAgent:s().nullish()}),GK=d({crawler:zS.extend({purpose:s().nullish()}).nullable().default(null),aiUserFetch:zS.nullable().default(null),aiReferral:d({operator:s().nullish(),product:s().nullish(),sourceDomain:s().nullish(),evidenceType:k(["referer","utm","referer-utm"]).nullish(),trafficClass:uu.nullish()}).nullable().default(null)}),HK=d({id:s(),sourceId:s(),ts:s(),kind:_N,pathNormalized:s(),status:m().int().nullable(),refererHost:s().nullable(),userAgent:s().nullable(),classifier:GK});d({scope:d({project:s(),sourceId:s().nullable(),attribution:E("project-source-only"),unavailableDimensions:y(k(["property","target","market"]))}),windowStart:s(),windowEnd:s(),retentionDays:E(30),sampling:d({complete:E(!1),perSync:E(100),perBackfill:E(500),perPushHour:E(100)}),totalRows:m().int().nonnegative(),limit:m().int(),offset:m().int(),samples:y(HK)});const U1=k(["admin","viewer"]),FK=/^[a-z\d][\w.-]{0,63}$/i,QK=s().regex(FK,"A name may use letters, digits, dots, dashes and underscores, and must start with a letter or digit."),IS=12,ZK=s().min(IS,`A password must be at least ${IS} characters.`),TN=d({id:s(),name:s(),role:U1,createdAt:s(),lastLoginAt:s().nullable()});d({users:y(TN)});d({name:QK,password:ZK,role:U1});d({name:s().min(1),password:s().min(1)});d({authRequired:N(),user:TN.pick({name:!0,role:!0}).nullable()});const EN=k(["queued","running","completed","partial","failed"]),eie=EN.enum,RN=k(["queued","running","completed","failed"]),tie=RN.enum,YK=20,XK=20,$g=50,DN=d({kind:k(["market","property"]),key:ge,expectedPlanRevision:m().int().positive().optional()}).strict(),JK=d({kind:k(["market","property"]),key:ge,label:s().trim().min(1),planRevision:m().int().positive()}).strict(),zN=s().min(1).max(4e3).refine(e=>e.trim().length>0,"Research queries cannot be blank.");function nie(e){const n=new Set;return e.filter(i=>{const r=cK(i);return!r||n.has(r)?!1:(n.add(r),!0)})}function WK(e,n){const i=e?e.kind==="market"?{market:e.label,submarket:e.label}:{property:e.label,propertyBrand:e.label}:{};return n?{...i,location:n.label}:i}function aie(e,n,i){const r=new Set(e.variables),u=[...e.pattern.matchAll(/\{([^{}]+)\}/g)].map(x=>x[1]),h=[...new Set(u.filter(x=>!r.has(x)))];if(h.length)throw wg("The selected research template contains undeclared placeholders: "+h.join(", "));const f=WK(n,i),b=e.variables.filter(x=>f[x]===void 0);if(b.length)throw wg("The selected research template requires unavailable bindings: "+b.join(", "));const v=Object.fromEntries(e.variables.map(x=>[x,f[x]]));return{bindings:v,output:UB(e.pattern,v)}}const IN=d({templateId:s().trim().min(1).max(256),templateVersion:s().trim().min(1).max(256),bindingLocation:Jt.nullable().optional()}).strict();d({queries:y(zN).min(1).max(50),provider:s().trim().min(1).optional(),model:s().trim().min(1).max(200).optional(),location:Jt.nullable().optional(),scope:DN.optional(),template:IN.optional(),idempotencyKey:s().trim().min(1).max(128).optional()}).superRefine((e,n)=>{e.model&&!e.provider&&n.addIssue({code:fe.custom,path:["provider"],message:"provider is required when model is supplied"})});const eG=DN.extend({expectedPlanRevision:m().int().positive()}).strict(),tG=d({queries:y(zN).min(1).max($g),provider:s().trim().min(1),model:s().trim().min(1).max(200),location:Jt.nullable(),scope:eG.optional(),template:IN.optional()}).strict();d({idempotencyKey:s().trim().min(1).max(128),runs:y(tG).min(1).max(XK)}).strict().superRefine((e,n)=>{e.runs.reduce((r,u)=>r+u.queries.length,0)>$g&&n.addIssue({code:fe.custom,path:["runs"],message:`A research batch may contain at most ${$g} concrete queries across all destinations`})});const nG=d({kind:k(["api-key","user"]),id:s(),name:s(),role:U1.nullable(),limited:N().optional()}),ON=d({id:s(),projectId:s(),status:EN,provider:s(),requestedModel:s().nullable(),resolvedModel:s(),location:Jt.nullable(),scope:JK.nullable().optional(),template:tA.nullable().optional(),totalQueries:m().int(),completedQueries:m().int(),failedQueries:m().int(),error:s().nullable(),initiatedBy:nG.nullable(),startedAt:s().nullable(),finishedAt:s().nullable(),createdAt:s()}),aG=d({id:s(),position:m().int(),query:s(),queryClass:Bo.nullable().optional(),status:RN,requestedModel:s().nullable(),resolvedModel:s(),servedModel:s().nullable(),answerText:s().nullable(),groundingSources:y(Gm),citedDomains:y(s()),searchQueries:y(s()),namedCompetitors:y(s()).default([]),citedCompetitorDomains:y(s()).default([]),answerMentioned:N().nullable(),citationState:Ki.nullable(),error:s().nullable(),startedAt:s().nullable(),finishedAt:s().nullable(),createdAt:s()}),iG=ON.extend({queries:y(aG)});d({runs:y(iG)});const sG=d({name:s(),displayName:s(),modelConfigurable:N(),defaultModel:s(),knownModels:y(d({id:s(),displayName:s()}))});d({runs:y(ON),nextCursor:s().nullable().optional(),providers:y(sG).optional(),access:d({canRun:N(),dailyRunLimit:m().int().positive().nullable()}).optional()});d({apiKey:s().min(1)});d({id:s(),name:s(),status:s(),currencyCode:s().nullable(),timezone:s().nullable(),url:s().nullable(),reviewStatus:s().nullable(),integrityReviewStatus:s().nullable(),integrityDecision:s().nullable()});d({q:s().trim().min(1).max(200),limit:m().int().min(1).max(100).default(20)});const oG=d({id:s(),type:s(),canonicalName:s(),countryCode:s(),name:s(),regionCode:s().nullable()});d({count:m().int().nonnegative(),query:s(),results:y(oG)});const rG=d({id:s(),clientType:s().optional(),name:s().optional(),pixelId:s().optional()});d({pixels:y(rG)});const lG=d({id:s(),name:s().optional()}),cG=d({id:s(),name:s().optional(),eventType:s().optional(),customEventName:s().nullable().optional(),attributionWindowDays:m().int().positive().optional(),adAccountId:s().optional(),sourceIds:y(s()).optional(),sources:y(lG).optional(),archived:N().optional(),version:m().int().nonnegative().optional()});d({eventSettings:y(cG)});d({connected:N(),adAccountId:s().nullable().optional(),displayName:s().nullable().optional(),currencyCode:s().nullable().optional(),timezone:s().nullable().optional(),status:s().nullable().optional(),reviewStatus:s().nullable().optional(),integrityReviewStatus:s().nullable().optional(),integrityDecision:s().nullable().optional(),lastSyncedAt:s().nullable().optional(),conversionTrackingConfigured:N().optional()});d({disconnected:N()});d({runId:s(),status:s()});const uG=["campaign_id","ad_group_id","ad_id","ad_account_id","oppref"],dG=/^[\w.-]+=[^&#\s]*$/,mG=/\{([^}]*)\}/g,Vo=s().min(1).max(1e3).superRefine((e,n)=>{const i=u=>n.addIssue({code:"custom",message:u});if(e.startsWith("?")||e.startsWith("&")){i("Tracking template must not start with ? or &");return}const r=new Set;for(const u of e.split("&")){if(!dG.test(u)){i(`Tracking template pair '${u}' must be key=value without whitespace, # or &`);return}const h=u.slice(0,u.indexOf("="));if(r.has(h)){i(`Tracking template repeats the parameter '${h}'`);return}r.add(h)}for(const u of e.matchAll(mG)){const h=u[1];if(!uG.includes(h)){i(`Tracking template macro '{${h}}' is not supported`);return}}}),pG=d({type:s().nullable().optional(),title:s().nullable().optional(),body:s().nullable().optional(),targetUrl:s().nullable().optional(),fileId:s().nullable().optional()}),mu=k(["impressions","clicks"]);mu.enum;const pu=k(["impression","click"]);pu.enum;const hG=d({id:s(),adGroupId:s(),name:s(),status:s(),reviewStatus:s().nullable().optional(),creative:pG.nullable().optional(),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()}),fG=d({id:s(),campaignId:s(),name:s(),description:s().nullable().optional(),status:s(),billingEventType:Fe([pu,de()]).optional(),maxBidMicros:m().int().nullable().optional(),contextHints:y(s()).default([]),ads:y(hG).default([]),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()}),gG=d({id:s(),name:s(),description:s().nullable().optional(),status:s(),startTime:m().int().nullable().optional(),endTime:m().int().nullable().optional(),biddingType:Fe([mu,de()]).optional(),dailySpendLimitMicros:m().int().nullable().optional(),lifetimeSpendLimitMicros:m().int().nullable().optional(),conversionEventSettingIds:y(s()).default([]),locationIds:y(s()).optional(),adGroups:y(fG).default([]),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()});d({campaigns:y(gG)});const PN=k(["campaign","ad_group"]);PN.enum;const yG=d({level:PN,entityId:s(),date:s(),impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable(),inProgress:N()});d({rows:y(yG),currencyCode:s().nullable().optional()});const qN=d({from:s().nullable(),to:s().nullable(),inProgressDate:s().nullable()}),MN=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:we().nullable(),cpcMicros:m().int().nullable()});d({connected:N(),displayName:s().nullable().optional(),currencyCode:s().nullable().optional(),lastSyncedAt:s().nullable().optional(),campaignCount:m().int(),adGroupCount:m().int(),adCount:m().int(),window:qN,totals:MN});const BN=k(["unavailable","partial","complete"]);BN.enum;const LN=k(["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"]);LN.enum;const UN=k(["unavailable","reported"]);UN.enum;const bG={storedSnapshot:"stored_ads_snapshot"},VN=k(["unavailable","partial_snapshot","metrics_unavailable","observed_activity","no_observed_activity"]);VN.enum;const vG=d({id:s(),name:s(),status:s(),reviewStatus:s().nullable()}),xG=d({id:s(),name:s(),status:s(),billingEventType:Fe([pu,de()]),maxBidMicros:m().int().nullable(),contextHints:y(s()),ads:y(vG)}),wG=d({id:s(),name:s(),status:s(),biddingType:Fe([mu,de()]),dailySpendLimitMicros:m().int().nullable(),lifetimeSpendLimitMicros:m().int().nullable(),conversionEventSettingIds:y(s()),adGroups:y(xG)});d({snapshot:d({status:BN,issue:Fe([LN,de()]),lastSyncedAt:s().nullable(),campaignCount:m().int().nonnegative(),adGroupCount:m().int().nonnegative(),adCount:m().int().nonnegative(),sourceSync:d({runId:s(),status:ta}).nullable()}),historicalCampaignRollups:d({status:UN,window:qN,totals:MN.nullable()}),storedConfiguration:d({basis:E(bG.storedSnapshot),connection:d({status:s().nullable(),reviewStatus:s().nullable(),integrityReviewStatus:s().nullable(),integrityDecision:s().nullable(),conversionTrackingConfigured:N()}).nullable(),campaigns:y(wG)}),assessment:d({state:VN})});const mi=s().min(8).max(128).regex(/^[\w.:-]+$/,"operationKey may contain letters, numbers, dot, underscore, colon, and hyphen"),Kt=s().min(1).max(200),$o=s().min(3).max(1e3).refine(e=>e.trim().length>0),Zr=m().int().min(946684800).max(4102444800),Yr=m().int().positive().max(Number.MAX_SAFE_INTEGER),V1=s().regex(/^[a-f0-9]{64}$/),$N=y(Kt).max(100).refine(e=>new Set(e).size===e.length,"conversionEventSettingIds must be unique"),KN=s().url().refine(e=>new URL(e).protocol==="https:",{message:"URL must use https"}),GN=k(["image_upload","campaign_create","campaign_update","campaign_pause","campaign_archive","campaign_tree_activate","ad_group_create","ad_group_update","ad_group_pause","ad_group_archive","ad_create","ad_update","ad_pause","ad_archive"]);GN.enum;const HN=k(["pending","reconciling","succeeded","failed","unknown"]),Vr=HN.enum,FN=k(["known_entity","create_fingerprint","manual_only"]);FN.enum;const QN=k([Vr.pending,Vr.unknown,Vr.reconciling]);QN.enum;const ZN=k(["active","paused","archived"]);ZN.enum;const YN=k(["file","campaign","ad_group","ad"]);YN.enum;const XN=k(["campaign","ad_group","ad"]);XN.enum;const $1=d({id:Kt,expectedUpdatedAt:m().int().nonnegative()}).strict(),SG=$1,bm=1e3;function kG(e){return 1+e.campaign.adGroups.reduce((n,i)=>n+1+i.ads.length,0)}const jG=$1.extend({ads:y(SG).min(1).max(bm-1)}).strict(),AG=$1.extend({adGroups:y(jG).min(1).max(bm-1)}).strict();function OS(e,n,i){for(let r=1;r<e.length;r+=1)if(d2(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 JN=d({campaign:AG}).strict().superRefine((e,n)=>{kG(e)>bm&&n.addIssue({code:"custom",path:["campaign"],message:`Activation manifests may contain at most ${bm} entities`}),OS(e.campaign.adGroups,["campaign","adGroups"],n);const r=new Set;for(let u=0;u<e.campaign.adGroups.length;u+=1){const h=e.campaign.adGroups[u];OS(h.ads,["campaign","adGroups",u,"ads"],n);for(let f=0;f<h.ads.length;f+=1){const b=h.ads[f];r.has(b.id)&&n.addIssue({code:"custom",path:["campaign","adGroups",u,"ads",f,"id"],message:"An ad may appear only once in an activation manifest"}),r.add(b.id)}}}),WN=V1,NG=k(["approved","executing","consumed","revoked","expired","unknown"]),$i=NG.enum,CG=k(["pending","executing","active","failed","rollback_executing","rolled_back","rollback_failed","unknown"]),Vs=CG.enum,_G=d({name:$o.optional(),description:s().max(4e3).nullable().optional(),status:ZN.optional(),startTime:Zr.nullable().optional(),endTime:Zr.nullable().optional(),lifetimeSpendLimitMicros:Yr.min(1e6).optional(),locationIds:y(Kt).max(100).optional(),biddingType:mu.optional(),conversionEventSettingIds:$N.optional(),campaignId:Kt.optional(),contextHints:y(s().min(1).max(1e3)).max(100).optional(),maxBidMicros:Yr.max(1e8).optional(),billingEventType:pu.optional(),adGroupId:Kt.optional(),creativeFingerprint:V1.optional(),landingPageQueryStringTemplate:Vo.nullable().optional()}).strict();d({operationKey:mi,imageUrl:KN});d({operationKey:mi,name:$o,description:s().max(4e3).optional(),startTime:Zr.optional(),endTime:Zr.optional(),lifetimeSpendLimitMicros:Yr.min(1e6),locationIds:y(Kt).min(1).max(100),biddingType:mu.optional(),conversionEventSettingIds:$N.optional(),landingPageQueryStringTemplate:Vo.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"})});d({operationKey:mi,campaignId:Kt,name:$o,description:s().max(4e3).optional(),contextHints:y(s().min(1).max(1e3)).min(1).max(100),maxBidMicros:Yr.max(1e8),billingEventType:pu.optional(),landingPageQueryStringTemplate:Vo.optional()});const eC=d({title:s().min(3).max(50),body:s().min(1).max(100),targetUrl:KN,fileId:Kt});d({operationKey:mi,adGroupId:Kt,name:$o,creative:eC,landingPageQueryStringTemplate:Vo.optional()});function K1(e){return Object.keys(e).some(n=>n!=="operationKey"&&n!=="expectedUpdatedAt")}d({operationKey:mi,expectedUpdatedAt:m().int().nonnegative(),name:$o.optional(),description:s().max(4e3).nullable().optional(),startTime:Zr.nullable().optional(),endTime:Zr.nullable().optional(),lifetimeSpendLimitMicros:Yr.min(1e6).optional(),locationIds:y(Kt).min(1).max(100).optional(),landingPageQueryStringTemplate:Vo.nullable().optional()}).refine(K1,{message:"At least one campaign field must be updated"});d({operationKey:mi,expectedUpdatedAt:m().int().nonnegative(),name:$o.optional(),description:s().max(4e3).nullable().optional(),contextHints:y(s().min(1).max(1e3)).min(1).max(100).optional(),maxBidMicros:Yr.max(1e8).optional(),landingPageQueryStringTemplate:Vo.nullable().optional()}).refine(K1,{message:"At least one ad group field must be updated"});d({operationKey:mi,expectedUpdatedAt:m().int().nonnegative(),name:$o.optional(),creative:eC.optional(),landingPageQueryStringTemplate:Vo.nullable().optional()}).refine(K1,{message:"At least one ad field must be updated"});d({operationKey:mi});d({operationKey:mi,expectedUpdatedAt:m().int().nonnegative()});const sp=d({id:s(),adAccountId:s().nullable(),operationKey:s(),kind:GN,state:HN,entityType:Fe([YN,de()]),entityId:s().nullable(),upstreamUpdatedAt:m().int().nullable(),errorCode:s().nullable(),errorMessage:s().nullable(),reconcileStrategy:Fe([FN,de()]),reconcileParentId:Kt.nullable(),reconcileFingerprint:V1.nullable(),reconcileFields:_G.nullable(),reconcileAttempts:m().int().nonnegative(),lastReconciledAt:s().nullable(),createdAt:s(),updatedAt:s()});d({operation:sp,replayed:N()});const Pt=sm({offset:!0}),ml={id:Kt,projectId:Kt,adAccountId:Kt,manifestHash:WN,manifest:JN,executorApiKeyId:Kt,approverApiKeyId:Kt,expiresAt:Pt,approvedAt:Pt,createdAt:Pt,updatedAt:Pt,revocationRequestedAt:Pt.nullable()},TG=d({...ml,state:E($i.approved),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),EG=d({...ml,state:E($i.executing),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),RG=d({...ml,state:E($i.consumed),operationId:Kt,executionStartedAt:Pt,consumedAt:Pt,revokedAt:de(),expiredAt:de()}).strict(),DG=d({...ml,state:E($i.revoked),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:Pt,expiredAt:de()}).strict(),zG=d({...ml,state:E($i.expired),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:Pt}).strict(),IG=d({...ml,state:E($i.unknown),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),tC=Ue("state",[TG,EG,RG,DG,zG,IG]).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!==$i.executing&&e.state!==$i.unknown&&e.state!==$i.consumed&&n.addIssue({code:"custom",path:["revocationRequestedAt"],message:"Only an executing, cancelled, or unresolved activation can carry a cancellation request"})}),$s={id:Kt,operationId:Kt,ordinal:m().int().nonnegative(),entityType:XN,entityId:Kt,expectedUpdatedAt:m().int().nonnegative(),createdAt:Pt,updatedAt:Pt},hu={errorCode:de(),errorMessage:de()},G1={errorCode:s().min(1).max(100),errorMessage:s().min(1).max(500),remediation:s().min(1).max(500)},OG=d({...$s,...hu,state:E(Vs.pending),providerUpdatedAt:de(),remediation:de(),startedAt:de(),finishedAt:de()}).strict(),PG=d({...$s,...hu,state:E(Vs.executing),providerUpdatedAt:de(),remediation:de(),startedAt:Pt,finishedAt:de()}).strict(),qG=d({...$s,...hu,state:E(Vs.active),providerUpdatedAt:m().int().nonnegative(),remediation:de(),startedAt:Pt,finishedAt:Pt}).strict(),MG=d({...$s,...G1,state:E(Vs.failed),providerUpdatedAt:Fe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),BG=d({...$s,...hu,state:E(Vs.rollback_executing),providerUpdatedAt:m().int().nonnegative(),remediation:s().min(1).max(500),startedAt:Pt,finishedAt:de()}).strict(),LG=d({...$s,...hu,state:E(Vs.rolled_back),providerUpdatedAt:m().int().nonnegative(),remediation:s().min(1).max(500),startedAt:Pt,finishedAt:Pt}).strict(),UG=d({...$s,...G1,state:E(Vs.rollback_failed),providerUpdatedAt:m().int().nonnegative(),startedAt:Pt,finishedAt:Pt}).strict(),VG=d({...$s,...G1,state:E(Vs.unknown),providerUpdatedAt:Fe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),$G=Ue("state",[OG,PG,qG,MG,BG,LG,UG,VG]),Kg={exact:"exact",refreshSemanticallyUnchanged:"refresh_semantically_unchanged"},KG=k([Kg.exact,Kg.refreshSemanticallyUnchanged]);d({manifest:JN,executorApiKeyId:Kt,expiresAt:Pt,versionPolicy:KG.default(Kg.exact)}).strict();d({grant:tC}).strict();d({}).strict();d({operationKey:mi,grantId:Kt,manifestHash:WN}).strict();d({grant:tC,operation:sp,steps:y($G)}).strict();const GG=[Vr.pending,Vr.unknown,Vr.reconciling];function HG(e){if(e===void 0||e==="")return GG;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}d({state:Ya(HG,y(QN).min(1).max(3).refine(e=>new Set(e).size===e.length,"state values must be unique")),limit:Ha().int().min(1).max(200).default(100),cursor:s().min(1).max(1e3).optional()});d({operations:y(sp),count:m().int().nonnegative(),nextCursor:s().nullable()});d({}).strict();d({operation:sp,resolved:N()});d({campaignId:s().min(1).max(200).optional(),lookbackDays:Ha().int().min(1).max(30).default(7)});const nC=k(["campaign","ad_group","ad"]);nC.enum;const aC=k(["both","live-only","stored-only"]);aC.enum;const FG=E("live-provider-read"),QG=d({date:s().nullable(),startTime:m().nullable(),endTime:m().nullable(),impressions:m().nullable(),clicks:m().nullable(),spend:m().nullable(),conversions:m().nullable(),ctr:we().nullable(),cpc:m().nullable(),cpm:m().nullable()}),PS=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int()}),ZG=d({date:s(),live:PS.nullable(),stored:PS.nullable(),drifted:N()}),YG=d({field:s(),live:s().nullable(),stored:s().nullable()}),XG=d({name:s().nullable(),status:s(),reviewStatus:s().nullable(),mode:s().nullable(),updatedAt:m().nullable()}),JG=d({name:s(),status:s(),reviewStatus:s().nullable(),upstreamUpdatedAt:m().nullable(),syncedAt:s()}),WG=d({entityType:nC,id:s(),parentId:s().nullable(),presence:aC,live:XG.nullable(),stored:JG.nullable(),fieldDeltas:y(YG),liveMetrics:y(QG).nullable(),metricDeltas:y(ZG).nullable(),drifted:N()}),eH=d({surface:s(),entityId:s().nullable(),upstreamStatus:m().int().nullable()});d({basis:FG,fetchedAt:s(),adAccountId:s(),storedSnapshotSyncedAt:s().nullable(),metricsWindow:d({lookbackDays:m().int().positive()}),bounds:d({maxCampaigns:m().int().positive(),maxAdGroupsPerCampaign:m().int().positive(),maxAdsPerAdGroup:m().int().positive(),maxReaderCalls:m().int().positive(),readerCalls:m().int().nonnegative(),maxPagesPerReaderCall:m().int().positive(),maxUpstreamHttpRequests:m().int().positive(),truncated:N()}),entities:y(WG),drift:d({entitiesCompared:m().int().nonnegative(),driftedEntities:m().int().nonnegative(),statusDrifted:m().int().nonnegative(),metricsDrifted:m().int().nonnegative()}),errors:y(eH)});const tH=d({status:k(["available","unavailable","not-supported"])}),qS="*";function iC(e){if(e?.some(n=>n.trim().toLowerCase()==="report"))return"The report embed tab has been retired. Remove report from the allowed tabs; explicitly configure overview to display AI Visibility."}const nH=k(["enabled","configured_disabled","CANONRY_TELEMETRY_DISABLED","DO_NOT_TRACK","CI","NO_CONFIG","CONFIG_UNAVAILABLE"]),aH=k(["server","local"]);d({enabled:N(),configuredEnabled:N(),reason:nH,anonymousId:s().regex(/^[0-9a-f]{8}\.\.\.$/i).optional(),target:aH.optional()}).strict();const ft=1,Xf=k(["system","project","queries","competitors","run","finish"]),iH=k(["copy_agent_command","connect_server_traffic","connect_search_console","connect_analytics","connect_business_profile","set_schedule","add_notification","open_project","review_page_health"]),Jf=k(["0","1","2-3","4-5","6-10","11+"]);function li(e){return!Number.isFinite(e)||e<=0?"0":e<2?"1":e<4?"2-3":e<6?"4-5":e<11?"6-10":"11+"}const MS=k(["api_unavailable","database_unavailable","worker_unavailable","no_provider","no_queries","provider_save_failed","project_create_failed","query_save_failed","run_rejected","run_failed","run_cancelled","rate_limited","provider_auth","network","unknown"]),sH=k(["wizard","platform","site_health"]),Md=d({eventId:s().uuid(),flowVersion:E(ft),onboardingSessionId:s().uuid(),surface:sH.optional()});Ue("event",[Md.extend({event:E("onboarding.started"),step:Xf,resumed:N()}).strict(),Md.extend({event:E("onboarding.step_completed"),step:Xf,method:k(["existing","inline","manual","generated","skipped","automatic"]),countBucket:Jf.optional(),nextAction:iH.optional()}).strict(),Md.extend({event:E("onboarding.blocked"),step:Xf,action:k(["continue","configure_provider","generate_queries","save","launch_run","retry_run"]),reasonCode:MS}).strict(),Md.extend({event:E("run.requested"),origin:E("dashboard_setup"),result:k(["queued","rejected"]),kind:k(["answer_visibility","site_health"]).optional(),providerCountBucket:Jf,queryCountBucket:Jf,reasonCode:MS.optional()}).strict()]);d({accepted:N()});k(["cli","mcp-stdio","mcp-http","aero","api","dashboard"]);const oH=["cli","mcp-stdio","mcp-http","aero","api","dashboard","system"],H1=k(oH);H1.enum;const sC=["provider","gsc","ga4","bing","gbp","google_ads","gtm","openai_ads","traffic_cloudflare","traffic_vercel","traffic_cloud_run","wordpress","backlinks","webhook","agent_webhook","cdp","traffic_wordpress"],F1=k(sC),oC=F1.enum,rH=["connect","disconnect","test","reauth","select"],rC=k(rH);rC.enum;const lH=["started","succeeded","failed","cancelled"],lC=k(lH),BS=lC.enum,cH=["succeeded","partial","failed","skipped","cancelled"],cC=k(cH),uH=cC.enum,dH=["manual","scheduled","agent","startup","retry","push"],uC=k(dH);uC.enum;const mH=["AUTH_DENIED","OAUTH_CANCELLED","OAUTH_STATE_INVALID","INVALID_CREDENTIALS","PERMISSION_MISSING","NOT_CONNECTED","ALREADY_CONNECTED","NOT_FOUND","ACCOUNT_NOT_FOUND","PROPERTY_NOT_FOUND","QUOTA_EXCEEDED","RATE_LIMITED","BILLING","NETWORK","TIMEOUT","HTTP_4XX","HTTP_5XX","BLOCKED_UNSAFE_URL","VALIDATION","UNSUPPORTED","NO_DATA","NOT_DUE","GATE_REFUSED","OPERATION_IN_PROGRESS","QUARANTINED","CANCELLED_BY_USER","SERVER_RESTARTED","INTERNAL","UNKNOWN","PORT_IN_USE","MIGRATION_FAILED","UNCAUGHT_EXCEPTION","UNHANDLED_REJECTION"],Q1=k(mH);Q1.enum;const dC={search_console:["sync","inspect","sitemap_submit"],ga4:["sync"],bing:["sync","inspect"],gbp:["sync","reviews"],google_ads:["sync"],gtm:["sync"],openai_ads:["sync","operation","activation","reconcile"],server_traffic:["sync","ingest","backfill","reset"],backlinks:["install","sync","extract"],content:["analyze","brief"],research:["run"],discovery:["run"],sentiment:["run"],aero:["turn"],webhooks:["deliver","test"],schedules:["slot"],exports:["export"],providers:["reload"],wordpress:["schema_deploy","llms_txt","meta_write","publish"],measurement:["publish"],insights:["generate"],site_liveness:["check"],reports:["download"],data_refresh:["refresh"],server:["start","crash"]},pH=Object.keys(dC),mC=k(pH);mC.enum;const hH=["rows","pages","urls","links","domains","reviews","events","crawlerHits","aiReferralHits","aiUserFetchHits","campaigns","operations","queries","snapshots","briefs","gaps","targets","insights","toolCalls","toolErrors","modelCalls","inputTokens","outputTokens","cachedTokens","costMicros","attempts","deliveries","failures","skipped","providers","items","bytes"],fH=new Set(hH),pC=1e12,hC=m().int().min(0).max(pC),gH=Ke(s(),hC).refine(e=>Object.keys(e).length>0&&Object.keys(e).length<=12,"counts must have 1 to 12 keys").refine(e=>Object.keys(e).every(n=>fH.has(n)),"unknown count key"),yH=["first_party","slack","discord"],Z1=k(yH);Z1.enum;const bH=["2xx","3xx","4xx","5xx","timeout","network","blocked"],fC=k(bH);fC.enum;const vH=["under_1s","1s_to_10s","10s_to_1m","1m_to_5m","5m_to_30m","30m_or_more"],op=k(vH);op.enum;const gC=s().regex(/^[A-Z_$][\w$]{0,39}$/i),yC=s().regex(/^[a-z0-9][a-z0-9._-]{0,39}$/),Y1=k(xg),bC=s().regex(/^[A-Z0-9][\w.:/@-]{0,99}$/i).refine(e=>!e.includes("://"),"a model id is never a URL"),vC=s().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/);d({integration:F1,provider:Y1.optional(),action:rC,status:lC,reasonCode:Q1.optional(),errorName:gC.optional(),target:Z1.optional(),surface:H1.optional(),agent:yC.optional(),durationBucket:op.optional(),attempt:m().int().min(1).max(1e6).optional(),first:E(!0).optional()}).strict().refine(e=>e.integration===oC.provider==(e.provider!==void 0),"provider is required for, and only for, integration provider").refine(e=>e.status===BS.succeeded||e.status===BS.started||e.reasonCode!==void 0,"a failed or cancelled attempt needs a reasonCode");d({feature:mC,operation:s().regex(/^[a-z][a-z_]{0,31}$/),status:cC,trigger:uC.optional(),surface:H1.optional(),agent:yC.optional(),reasonCode:Q1.optional(),errorName:gC.optional(),durationBucket:op.optional(),counts:gH.optional(),target:Z1.optional(),eventType:Mm.optional(),statusClass:fC.optional(),provider:Y1.optional(),model:bC.optional(),modelProvider:vC.optional(),sampleRate:m().int().min(1).max(1e6).optional(),droppedBefore:m().int().min(0).max(pC).optional(),domainHash:s().regex(/^[0-9a-f]{64}$/).optional(),first:E(!0).optional()}).strict().refine(e=>dC[e.feature].includes(e.operation),"operation is not one this feature reports").refine(e=>e.status===uH.succeeded||e.reasonCode!==void 0,"a non-succeeded outcome needs a reasonCode");const xH=["npm","homebrew","docker","source"],wH=k(xH),SH=s().regex(/^[a-z0-9][a-z0-9-]{0,31}$/),kH=["projects","queries","competitors","locations","schedules","webhooks","agentWebhooks","trafficSources","googleConnections","bingConnections","backlinkSources","adsAccounts"],jH=["sweeps","audits","providerCalls","inputTokens","outputTokens","costMicros","aeroTurns","aeroModelCalls","aeroInputTokens","aeroOutputTokens","aeroCostMicros","webhookDeliveries"],Wf=e=>{const n=new Set(e);return Ke(s(),hC).refine(i=>Object.keys(i).every(r=>n.has(r)),"unknown key")};d({providers:y(Y1).max(xg.length),integrations:y(F1.exclude([oC.provider])).max(sC.length),counts:Wf(kH),usage24h:Wf(jH),providerCalls24h:Wf(xg).optional(),agentProvider:vC.optional(),agentModel:bC.optional(),uptimeBucket:op.optional(),installSource:wH.optional(),installRef:SH.optional()}).strict();const xC=["/","/projects","/projects/:projectName","/projects/:projectName/portfolio","/projects/:projectName/search-console","/projects/:projectName/conversions","/projects/:projectName/local","/projects/:projectName/discovery","/projects/:projectName/queries","/projects/:projectName/properties/:targetKey","/projects/:projectName/report","/projects/:projectName/activity","/projects/:projectName/backlinks","/projects/:projectName/technical-aeo","/projects/:projectName/history","/projects/:projectName/settings","/runs","/history","/settings","/setup","/backlinks","/traffic","/traffic/:projectName/:sourceId","not-found","other"],AH=k(xC),wC=["overview","portfolio","search-console","conversions","local","discovery","queries","properties","report","activity","backlinks","technical-aeo","history","settings","other"],Bd=k(wC),NH=["sweep.launch","sweep.cancel","site_audit.launch","project.create","project.update","project.delete","query.add","query.delete","query.generate","competitor.save","competitor.delete","schedule.save","schedule.delete","provider.save","settings.save","integration.connect_started","integration.connect","integration.disconnect","traffic.sync","notification.save","notification.test","measurement_plan.publish","property_names.save","discovery.run","api_key.create","api_key.revoke","export.download","report.download","aero.open","aero.send","filter.change","search.submit"],CH=k(NH),_H=["google","gsc","ga","bing","gbp","wordpress","openai_ads","google_ads","gtm","traffic_cloudflare","traffic_vercel","traffic_cloud_run","traffic_wordpress"],TH=k(_H),EH=["provider","model","location","window","query_class","other"],RH=k(EH),DH=["csv","json","html"],zH=["render","unhandled","api"],IH=["4xx","5xx","network"],OH=["LCP","INP","CLS","FCP","TTFB"],PH=["good","needs-improvement","poor"],SC=/^[a-z][a-z0-9-]{0,39}$/,kC=/^[a-z_$][\w$]{0,39}$/i,qH=/^\/api\/v1(?:\/(?:[a-z][a-z0-9-]*(?:\.[a-z]+)?|\{[A-Za-z]+\}))*$/,jC=160,MH=new Set(["accounts","activation-grants","ad-groups","ads","cache","campaigns","competitors","confirm","connections","containers","contracts","conversations","dismissals","insights","jobs","keys","locations","measurement-query-sets","measurement-query-templates","notifications","operations","projects","providers","queries","recommendations","runs","screenshots","segments","sessions","snapshots","sources","users","versions"]),BH=new Set(["ads/account","ads/activation-grants","ads/ad-groups","ads/ads","ads/campaigns","ads/connect","ads/connection","ads/conversions","ads/delivery-diagnostics","ads/files","ads/geo","ads/insights","ads/live-delivery","ads/operations","ads/status","ads/summary","ads/sync","keys/self","locations/default","locations/discover","notifications/events","operations/logs","providers/reload","queries/generate","queries/replace-preview","runs/latest","snapshots/diff"]),LH=/^\{[a-z]+\}$/i;function AC(e){if(e.length>jC||e.includes("://")||!qH.test(e))return!1;const n=e.split("/").slice(3);return n.every((i,r)=>{const u=n[r-1];return u===void 0||!MH.has(u)?!0:LH.test(i)||BH.has(`${u}/${i}`)})}const Ld=d({eventId:s().uuid(),uiSessionId:s().uuid(),page:AH});Ue("event",[Ld.extend({event:E("ui.page_viewed"),tab:Bd.optional()}).strict(),Ld.extend({event:E("ui.action"),action:CH,tab:Bd.optional(),integration:TH.optional(),format:k(DH).optional(),filter:RH.optional()}).strict(),Ld.extend({event:E("ui.error"),kind:k(zH),tab:Bd.optional(),component:s().regex(SC).optional(),errorName:s().regex(kC).optional(),route:s().max(jC).refine(AC,"route must be a route template").optional(),method:k(["GET","POST","PUT","PATCH","DELETE"]).optional(),statusClass:k(IH).optional(),status:m().int().min(400).max(599).optional()}).strict(),Ld.extend({event:E("ui.vitals"),metric:k(OH),rating:k(PH),tab:Bd.optional()}).strict()]);function UH(e){if(!e)return"other";if(e==="*"||e==="$"||e.endsWith("/*")||e.endsWith("/$"))return"not-found";const n=e.replace(/\$([a-z]\w*)/gi,":$1").replace(/(.)\/+$/,"$1");return xC.includes(n)?n:"other"}function NC(e){if(e==="/projects/:projectName")return"overview";const n=/^\/projects\/:projectName\/([a-z-]+)/.exec(e);if(!n)return;const i=n[1];return wC.includes(i)?i:"other"}const VH=["struggle","bug","improvement","other"],$H=k(VH),Sc={summary:500,details:4e3,area:40,command:120,errorCode:40};d({kind:$H,summary:s().trim().min(1).max(Sc.summary),details:s().trim().min(1).max(Sc.details).optional(),area:s().trim().min(1).max(Sc.area).optional(),command:s().trim().min(1).max(Sc.command).optional(),errorCode:s().trim().min(1).max(Sc.errorCode).optional()}).strict();d({accepted:N(),id:s()});const KH=4;function GH(e){return e.length<KH}const CC=k(["trace","debug","info","warn","error","fatal"]),_C=d({runId:s().min(1).max(256).optional(),projectId:s().min(1).max(256).optional(),requestId:s().min(1).max(256).optional(),actor:s().min(1).max(512).optional(),credentialId:s().min(1).max(512).optional(),userAgent:s().min(1).max(512).optional(),actorSession:s().min(1).max(512).optional(),method:s().min(1).max(16).optional(),route:s().min(1).max(256).optional(),operationId:s().min(1).max(256).optional(),jobId:s().min(1).max(256).optional(),taskId:s().min(1).max(256).optional(),traceId:s().min(1).max(256).optional(),provider:s().min(1).max(256).optional(),errorCode:s().min(1).max(128).optional(),attempt:m().finite().optional(),count:m().finite().optional(),total:m().finite().optional(),progress:m().finite().optional(),httpStatus:m().finite().optional(),statusCode:m().finite().optional(),durationMs:m().finite().optional(),bytes:m().finite().optional(),retryAfterMs:m().finite().optional(),retriable:N().optional(),retrying:N().optional(),cancelled:N().optional(),success:N().optional()}).strict(),TC=d({cursor:s().min(1).max(512),ts:s().datetime(),level:CC,module:s().min(1).max(256),action:s().min(1).max(256),message:s().max(4096).optional(),runId:s().min(1).max(256).optional(),projectId:s().min(1).max(256).optional(),context:_C}).strict();d({level:CC.optional(),module:s().trim().min(1).max(256).optional(),runId:s().trim().min(1).max(256).optional(),projectId:s().trim().min(1).max(256).optional(),actor:s().trim().min(1).max(512).optional(),requestId:s().trim().min(1).max(256).optional(),since:s().datetime().optional(),until:s().datetime().optional(),limit:Ha().int().min(1).max(200).default(100),cursor:s().trim().min(1).max(512).optional()}).strict().superRefine((e,n)=>{e.since&&e.until&&Date.parse(e.since)>Date.parse(e.until)&&n.addIssue({code:fe.custom,path:["until"],message:'"until" must be on or after "since".'})});const EC=d({maxEntries:m().int().positive(),maxAgeSeconds:m().int().positive()}).strict(),HH=d({entries:y(TC),nextCursor:s().min(1).max(512).nullable(),truncated:m().int().nonnegative(),dropped:m().int().nonnegative(),retention:k(["process","durable"]),retentionPolicy:EC.optional(),captureErrors:m().int().nonnegative().optional(),observedAt:s().datetime()}).strict(),FH=d(_C.shape),QH=d({...TC.shape,context:FH});d({...HH.shape,entries:y(QH),retentionPolicy:d(EC.shape).optional()});function eg(e){return e!==""&&/^[\w./:@%+=,-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}d({startDate:jn,endDate:jn,sourceId:s().trim().min(1).optional(),burstThreshold:m().int().min(1).max(1e6).optional(),ratioThreshold:m().min(1).max(1e3).optional(),limit:m().int().min(1).max(500).optional()}).strict();const yo=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({scope:d({project:s(),sourceId:s().nullable(),attribution:E("project-source-only"),unavailableDimensions:y(k(["property","target","market"]))}),window:d({startDate:jn,endDate:jn,timeZone:E("UTC")}),rule:d({version:E("hourly-normalized-path-v1"),burstThreshold:m().int().positive(),ratioThreshold:m().positive(),calibration:k(["uncalibrated-default","request-override"]),grouping:y(s()),confirmsAutomation:E(!1)}),totals:d({raw:yo,redirects:yo,subresources:yo,countable:yo,suspected:yo,adjustedEstimate:yo}),bursts:y(d({sourceId:s(),product:s(),landingPathNormalized:s(),tsHour:s(),counts:yo})),evidence:d({total:m().int().nonnegative(),returned:m().int().nonnegative(),truncated:N()}),comparison:d({status:E("unavailable"),serverCountable:m().int().nonnegative(),serverObservation:k(["missing","observed-zero","observed-positive"]),gaSessions:m().int().nonnegative().nullable(),gaObservation:k(["missing","observed-zero","observed-positive"]),observedRatio:m().nonnegative().nullable(),observedRatioAboveThreshold:N().nullable(),ratio:de(),reasons:y(s()),gaScope:E("project")}),caveats:y(s())});const ZH=new Set(["optional","nullable","default","prefault","readonly","catch","nonoptional"]),LS=64;function Xd(e){return e._zod.def}function bo(e,n){return e.clone({...Xd(e),...n})}function US(e){if(e.length!==0){if(e.every(n=>typeof n=="string"))return s();if(e.every(n=>typeof n=="number"))return m();if(e.every(n=>typeof n=="boolean"))return N()}}function RC(e,n,i,r){if(r>LS)throw new Error(`tolerantReadSchema: schema nesting exceeds ${LS} levels`);const u=i.get(e);if(u)return u;const h=v=>RC(v,n,i,r+1),f=Xd(e);let b=e;if(f.type==="object"){const v=Object.fromEntries(Object.entries(e.shape).map(([j,C])=>[j,h(C)])),x=f.catchall,S=n.get(e)??(x&&Xd(x).type!=="never"?h(x):void 0);b=S?d(v).catchall(S):d(v)}else if(ZH.has(f.type)){const v=f.innerType,x=h(v);b=x===v?e:bo(e,{innerType:x})}else if(f.type==="array"){const v=f.element,x=h(v);b=x===v?e:bo(e,{element:x})}else if(f.type==="pipe"){const v=f.in,x=f.out,S=h(v),j=h(x);b=S===v&&j===x?e:bo(e,{in:S,out:j})}else if(f.type==="union"){const v=f.options,x=v.map(h);b=x.some((j,C)=>j!==v[C])?f.discriminator?Fe(x):bo(e,{options:x}):e}else if(f.type==="record"){const v=f.keyType,x=f.valueType,S=Xd(v).type==="enum"?s():v,j=h(x);b=S===v&&j===x?e:bo(e,{keyType:S,valueType:j})}else if(f.type==="intersection"){const v=f.left,x=f.right,S=h(v),j=h(x);b=S===v&&j===x?e:bo(e,{left:S,right:j})}else if(f.type==="tuple"){const v=f.items,x=f.rest,S=v.map(h),j=x&&h(x);b=j!==x||S.some((T,z)=>T!==v[z])?bo(e,{items:S,rest:j}):e}else if(f.type==="lazy"){const v=f.getter;b=nO(()=>h(v()))}else f.type==="enum"?b=US(Object.values(f.entries))??e:f.type==="literal"&&(b=US(f.values)??e);return i.set(e,b),b}function Ko(e,n={}){const i=new Map(n.openKeys??[]);return RC(e,i,new Map,0)}const Go={openKeys:[[z1,m().int().nonnegative()]]};Ko(D$,Go);Ko(Vg,Go);Ko(L$,Go);Ko(U$,Go);Ko(z$,Go);Ko(lN,Go);Ko(q$,Go);const YH=s2(tl.trafficAnalytics);Fe(YH.map(e=>E(e))).describe("Traffic activity window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const vo=d({current:m(),prior:m(),deltaPct:ot().nullable()}),XH=d({windowStart:s(),windowEnd:s(),coverageStart:s().nullable(),priorWindowComplete:N(),hasData:N().describe("True when the selected or prior window has stored crawler, user-fetch, countable referral or operator evidence, or the selected window has referral redirects. False means no qualifying stored evidence; it can occur with no, paused, errored or never-synced ingestion and out-of-window observations. It does not establish measured zero traffic or source health."),verifiedCrawlerHits:vo,unverifiedCrawlerHits:vo,aiUserFetchHits:vo,referralArrivals:vo,referralRedirects:m().int().nonnegative(),referralArrivalsByClass:d({paid:vo,organic:vo,unclassified:vo}),referralArrivalsClassSummary:s(),byOperator:y(d({operator:s(),verifiedHits:m(),unverifiedHits:m(),userFetchHits:m(),referralArrivals:m(),deltaPct:ot().nullable()})),topCrawledPaths:y(d({path:s(),verifiedHits:m(),unverifiedHits:m().default(0),distinctOperators:m()})),referralProducts:y(d({product:s(),arrivals:m(),distinctLandingPaths:m()})),dailyTrend:y(d({date:s(),verifiedCrawlerHits:m(),unverifiedCrawlerHits:m().default(0),userFetchHits:m(),referralArrivals:m()})),topReferralLandingPaths:y(d({path:s(),arrivals:m(),distinctProducts:m()}))});d({activity:XH.nullable()});const iie={ambiguous:"Property identity unverified"},sie="No answer could be tied to one property";function JH(e){return e.denominator===null||e.denominator===void 0||e.unattributed===void 0||e.unattributed<=0?null:`${e.unattributed} of ${e.denominator+e.unattributed} answers could not be tied to one property`}function WH(e){if(e.denominator===null||e.denominator===void 0||e.unchecked===void 0||e.unchecked<=0)return null;const n=e.denominator+e.unchecked;return`${e.unchecked} of ${n} ${n===1?"answer":"answers"} had sources that could not be checked`}const DC=d({name:s(),type:k(["string","boolean"]),multiple:N()}),eF=d({id:s(),path:y(s()).min(1),usage:s(),supportsDryRun:N(),windows:y(s()).optional(),options:y(DC),access:V3});d({version:s(),globalOptions:y(DC),groups:y(d({root:s(),section:s(),summary:s(),commands:y(eF)}))});const tF="canonry.onboarding-session.v1",vm="canonry.onboarding-launched-run.v1",X1="canonry.onboarding-handoff.v1",nF=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,aF=["system","project","queries","competitors","run"];function iF(e){return aF[e]??"system"}function sF(e){if(!e.apiReady)return"api_unavailable";if(e.databaseConfigured===!1)return"database_unavailable";if(!e.workerReady)return"worker_unavailable";if(!e.providerReady)return"no_provider"}function oF(e){return e.apiStatus.state!=="checking"&&e.workerStatus.state!=="checking"}const rF={NO_PROVIDER:"no_provider",NO_QUERIES:"no_queries",RATE_LIMITED:"rate_limited",QUOTA_EXCEEDED:"rate_limited",PROVIDER_AUTH:"provider_auth",PROVIDERS_FAILING:"provider_auth",AUTH_INVALID:"provider_auth",FORBIDDEN:"provider_auth",NETWORK:"network",CONNECTION_ERROR:"network",RUN_IN_PROGRESS:"run_rejected",RUN_CANCELLED:"run_cancelled"};function zc(e,n){const i=e&&typeof e=="object"&&"code"in e?String(e.code):"";return rF[i]??n}function J1(){return zC(tF)}function zC(e){try{const n=typeof window<"u"?window.sessionStorage.getItem(e):null;if(n&&nF.test(n))return n;const i=wm();return typeof window<"u"&&window.sessionStorage.setItem(e,i),i}catch{return wm()}}function W1(){return wm()}function IC(e){if(!e||typeof e!="object")return!1;const n=e;return typeof n.projectName=="string"&&n.projectName.length>0&&typeof n.runId=="string"&&n.runId.length>0&&typeof n.handled=="boolean"}function OC(e,n){try{typeof window<"u"&&window.sessionStorage.setItem(vm,JSON.stringify({projectName:e,runId:n,handled:!1}))}catch{}}function PC(e){if(!e)return null;try{if(typeof window>"u")return null;const n=window.sessionStorage.getItem(vm);if(!n)return null;const i=JSON.parse(n);return!IC(i)||i.projectName!==e||i.handled?null:i}catch{return null}}function xm(e){try{if(typeof window>"u")return;const n=window.sessionStorage.getItem(vm);if(!n)return;const i=JSON.parse(n);if(!IC(i)||i.runId!==e)return;window.sessionStorage.setItem(vm,JSON.stringify({...i,handled:!0}))}catch{}}function lF(e){try{typeof window<"u"&&window.sessionStorage.setItem(X1,e)}catch{}}function cF(e){if(!e)return!1;try{return typeof window<"u"&&window.sessionStorage.getItem(X1)===e}catch{return!1}}function uF(){try{typeof window<"u"&&window.sessionStorage.removeItem(X1)}catch{}}function wm(){const e=globalThis.crypto;if(e.randomUUID)return e.randomUUID();const n=new Uint8Array(16);if(e.getRandomValues)e.getRandomValues(n);else for(let r=0;r<n.length;r+=1)n[r]=Math.floor(Math.random()*256);n[6]=n[6]&15|64,n[8]=n[8]&63|128;const i=[...n].map(r=>r.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}const dF="canonry.ui-session.v1",mF="canonry.ui-pages.v1",pF="canonry.ui-errors.v1",VS="canonry.ui-sent.v1",hF=30,fF=120,gF=200,Yt={sender:null,disabled:!1,page:"other",landingPage:null,pendingVitals:[],memory:new Map,sentAt:null,now:()=>Date.now()};function yF(e){Yt.sender=e.enabled===!1?null:e.send,Yt.disabled=!1,e.now&&(Yt.now=e.now)}function bF(e){const n=UH(e);if(Yt.page=n,Yt.landingPage===null){Yt.landingPage=n;const r=Yt.pendingVitals;Yt.pendingVitals=[];for(const[u,h]of r)qC(u,h)}const i=NC(n);MC(mF,`${n}|${i??""}`,{event:"ui.page_viewed"})}function Ho(e,n={}){ey({event:"ui.action",action:e,...n})}const vF=800,xF=1e3,tg=new Map;let kc,ng="";function wF(e){if(!Yt.sender)return;const n=tg.get(e);n&&clearTimeout(n),tg.set(e,setTimeout(()=>{tg.delete(e),Ho("filter.change",{filter:e})},vF))}function oie(e,n=!1){if(!Yt.sender)return;kc&&clearTimeout(kc),kc=void 0;const i=e.trim();if(i.length===0){ng="";return}const r=()=>{kc=void 0,i!==ng&&(ng=i,Ho("search.submit"))};n?r():kc=setTimeout(r,xF)}const SF={measurementProvider:"provider",measurementModel:"model",measurementLocation:"location",measurementFrom:"window",measurementTo:"window",runWindow:"window",queryClass:"query_class",class:"query_class",measurementScope:"other",measurementScopeKey:"other",measurementMarketKey:"other",scope:"other",runStatus:"other",runKind:"other",runProject:"other"};function kF(e,n){const i=new Set;for(const[r,u]of Object.entries(SF))jF(e[r],n[r])||i.add(u);for(const r of i)wF(r)}function jF(e,n){const i=r=>r==null||r===""?"":JSON.stringify(r);return i(e)===i(n)}function Sm(e){const n=PF(e.error),i=e.route&&AC(e.route)?e.route:void 0;if(e.kind==="api"&&!i)return;const r=LC(e.method),u=typeof e.status=="number"&&e.status>=400&&e.status<=599?e.status:void 0,h=e.network?"network":u===void 0?void 0:u>=500?"5xx":"4xx",f=e.component&&SC.test(e.component)?e.component:void 0,b=[e.kind,Yt.page,f,n,r,i,u??h].join("|");MC(pF,b,{event:"ui.error",kind:e.kind,...f?{component:f}:{},...n?{errorName:n}:{},...i?{route:i}:{},...r?{method:r}:{},...h?{statusClass:h}:{},...u?{status:u}:{}})}function AF(e,n){if(Yt.landingPage===null){Yt.pendingVitals.push([e,n]);return}qC(e,n)}function qC(e,n){const i=Yt.landingPage??"other";ey({event:"ui.vitals",metric:e,rating:n},i)}const NF=[["POST","/api/v1/projects/{name}/runs","sweep.launch"],["POST","/api/v1/runs/{id}/cancel","sweep.cancel"],["POST","/api/v1/projects/{name}/technical-aeo/runs","site_audit.launch"],["POST","/api/v1/projects","project.create"],["PUT","/api/v1/projects/{name}","project.create",void 0,201],["PUT","/api/v1/projects/{name}","project.update",void 0,200],["DELETE","/api/v1/projects/{name}","project.delete"],["POST","/api/v1/projects/{name}/queries","query.add"],["PUT","/api/v1/projects/{name}/queries","query.add"],["DELETE","/api/v1/projects/{name}/queries","query.delete"],["DELETE","/api/v1/projects/{name}/queries/{id}","query.delete"],["POST","/api/v1/projects/{name}/queries/generate","query.generate"],["PUT","/api/v1/projects/{name}/competitors","competitor.save"],["POST","/api/v1/projects/{name}/competitors","competitor.save"],["DELETE","/api/v1/projects/{name}/competitors/{id}","competitor.delete"],["PUT","/api/v1/projects/{name}/schedule","schedule.save"],["DELETE","/api/v1/projects/{name}/schedule","schedule.delete"],["PUT","/api/v1/settings/providers/{name}","provider.save"],["PUT","/api/v1/settings/google","settings.save"],["PUT","/api/v1/settings/bing","settings.save"],["PUT","/api/v1/settings/cdp","settings.save"],["PUT","/api/v1/projects/{name}/sentiment/settings","settings.save"],["POST","/api/v1/projects/{name}/google/connect","integration.connect_started","google"],["POST","/api/v1/projects/{name}/ga/connect","integration.connect","ga"],["DELETE","/api/v1/projects/{name}/ga/disconnect","integration.disconnect","ga"],["POST","/api/v1/projects/{name}/bing/connect","integration.connect","bing"],["DELETE","/api/v1/projects/{name}/bing/disconnect","integration.disconnect","bing"],["PUT","/api/v1/projects/{name}/gbp/locations/{locationName}/selection","integration.connect","gbp"],["DELETE","/api/v1/projects/{name}/gbp/connection","integration.disconnect","gbp"],["POST","/api/v1/projects/{name}/wordpress/connect","integration.connect","wordpress"],["DELETE","/api/v1/projects/{name}/wordpress/disconnect","integration.disconnect","wordpress"],["POST","/api/v1/projects/{name}/ads/connect","integration.connect","openai_ads"],["DELETE","/api/v1/projects/{name}/ads/connection","integration.disconnect","openai_ads"],["POST","/api/v1/projects/{name}/google-ads/oauth/connect","integration.connect_started","google_ads"],["PUT","/api/v1/projects/{name}/google-ads/selection","integration.connect","google_ads"],["DELETE","/api/v1/projects/{name}/google-ads/connection","integration.disconnect","google_ads"],["POST","/api/v1/projects/{name}/gtm/oauth/connect","integration.connect_started","gtm"],["PUT","/api/v1/projects/{name}/gtm/selection","integration.connect","gtm"],["DELETE","/api/v1/projects/{name}/gtm/connection","integration.disconnect","gtm"],["POST","/api/v1/projects/{name}/traffic/connect/cloudflare","integration.connect","traffic_cloudflare"],["POST","/api/v1/projects/{name}/traffic/connect/vercel","integration.connect","traffic_vercel"],["POST","/api/v1/projects/{name}/traffic/connect/cloud-run","integration.connect","traffic_cloud_run"],["POST","/api/v1/projects/{name}/traffic/connect/wordpress","integration.connect","traffic_wordpress"],["POST","/api/v1/projects/{name}/traffic/sources/{id}/sync","traffic.sync"],["POST","/api/v1/projects/{name}/notifications","notification.save"],["POST","/api/v1/projects/{name}/measurement-plan/draft/actions/publish","measurement_plan.publish"],["POST","/api/v1/projects/{name}/measurement-plan/draft/actions/upsert-target","property_names.save"],["POST","/api/v1/projects/{name}/discover/run","discovery.run"],["POST","/api/v1/keys","api_key.create"],["POST","/api/v1/keys/{id}/revoke","api_key.revoke"]],$S="/api/v1/projects/{name}/google/connections/{type}",CF={gsc:"gsc",ga4:"ga",gbp:"gbp"};function _F(e,n,i){const r=e==="PUT"&&n===`${$S}/property`?"integration.connect":e==="DELETE"&&n===$S?"integration.disconnect":void 0;if(!r)return;const u=i?/\/google\/connections\/([^/?#]+)/.exec(i)?.[1]:void 0,h=u&&CF[decodeURIComponent(u)]||"google";return[e,n,r,h]}const TF=[["GET",/^\/api\/v1\/projects\/\{name\}\/schedule$/,[404]],["*",/^\/api\/v1\/projects\/\{name\}\/measurement-plan(?:\/draft(?:\/.*)?)?$/,[404,409,412]],["GET",/^\/api\/v1\/projects\/\{name\}\/technical-aeo\/runs\/\{runId\}\/progress$/,[404]],["GET",/^\/api\/v1\/projects\/\{name\}\/backlinks\/domains$/,[404]],["POST",/^\/api\/v1\/projects$/,[409]],["PUT",/^\/api\/v1\/projects\/\{name\}$/,[409]]];function EF(e,n,i){return TF.some(([r,u,h])=>(r==="*"||r===e)&&u.test(n)&&h.includes(i))}const RF=/^\/api\/v1\/(?:telemetry|feedback)(?:\/|$)/;function km(e){if(!e.route||RF.test(e.route))return;const n=LC(e.method);if(e.network||typeof e.status=="number"&&e.status>=400){if(e.status===401||typeof e.status=="number"&&e.status<500&&EF(n,e.route,e.status))return;Sm({kind:"api",route:e.route,method:n,status:e.status,network:e.network});return}if(!n||n==="GET")return;const i=_F(n,e.route,e.path)??NF.find(([r,u,,,h])=>r===n&&u===e.route&&(h===void 0||h===e.status));i&&Ho(i[2],i[3]?{integration:i[3]}:{})}function MC(e,n,i){const r=zF(e);if(!r.has(n)&&ey(i)){r.add(n);try{window.sessionStorage.setItem(e,JSON.stringify([...r].slice(-gF)))}catch{}}}function ey(e,n){try{const i=Yt.sender;if(!i||Yt.disabled||!DF())return!1;const r=n??Yt.page,u=NC(r),h={...e,eventId:wm(),uiSessionId:zC(dF),page:r,...u?{tab:u}:{}};return i(h).then(f=>{f&&f.accepted===!1&&(Yt.disabled=!0)},()=>{}),!0}catch{return!1}}function DF(){const e=Yt.now(),n=(Yt.sentAt??=OF(VS)).filter(i=>e-i<36e5&&i<=e);if(Yt.sentAt=n,n.length>=fF||n.filter(i=>e-i<6e4).length>=hF)return!1;n.push(e);try{window.sessionStorage.setItem(VS,JSON.stringify(n))}catch{}return!0}function zF(e){let n=Yt.memory.get(e);return n||(n=new Set(IF(e)),Yt.memory.set(e,n)),n}function BC(e){try{const n=window.sessionStorage.getItem(e),i=n?JSON.parse(n):[];return Array.isArray(i)?i:[]}catch{return[]}}function IF(e){return BC(e).filter(n=>typeof n=="string")}function OF(e){return BC(e).filter(n=>typeof n=="number"&&Number.isFinite(n))}function PF(e){const n=e instanceof Error?e.name:e&&typeof e=="object"&&"name"in e?String(e.name):void 0;return n&&kC.test(n)?n:void 0}function LC(e){const n=e?.toUpperCase();return n==="GET"||n==="POST"||n==="PUT"||n==="PATCH"||n==="DELETE"?n:void 0}class yn extends Error{code;statusCode;details;constructor(n,i,r,u){super(n),this.name="ApiError",this.code=r??"UNKNOWN",this.statusCode=i,this.details=u}}function rie(e){if(e instanceof yn)return e.details;if(typeof e!="object"||e===null)return;const n=e.error,i=typeof n=="object"&&n!==null?n.details:e.details;return typeof i=="object"&&i!==null&&!Array.isArray(i)?i:void 0}function To(){if(typeof window>"u")return!1;const e=window.__CANONRY_CONFIG__?.demo;return e?.enabled===!0&&e.readOnly===!0&&e.sampleData===!0}function qF(){if(typeof window>"u")return"legacy";const e=window.__CANONRY_CONFIG__?.dashboard?.onboardingMode??window.__CANONRY_CONFIG__?.onboardingMode;return e==="platform"||e==="auto"||e==="legacy"?e:"auto"}function MF(){if(typeof window>"u")return;const e=window.__CANONRY_CONFIG__?.embed?.renderToken;return typeof e=="string"&&e.length>0?e:void 0}function UC(e){const n=MF();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 u=new URL(r).origin;if(i.origin!==u)return e;const f=`${lp().replace(/\/$/,"")}/api/v1`;return i.pathname!==f&&!i.pathname.startsWith(`${f}/`)?e:(i.searchParams.set("token",n),/^[a-z][a-z\d+.-]*:/i.test(e)?i.toString():`${i.pathname}${i.search}${i.hash}`)}function BF(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 VC(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function LF(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showResourceLinks!==!1}function UF(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showAgentBar!==!1}function VF(){return typeof window>"u"?!1:window.__CANONRY_CONFIG__?.agent?.allowViewers===!0}function ty(){return To()}function $F(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showUpdateNotification!==!1}function So(){return KF(Oe["answer-visibility"])}function KF(e){if(typeof window>"u")return!1;const n=window.__CANONRY_CONFIG__?.dashboard;return n?.managedRunKinds!==void 0?n.managedRunKinds.includes(e):e===Oe["answer-visibility"]&&n?.managedSweeps===!0}function GF(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.research;if(e?.allowViewers!==!0)return null;const n=e.viewerDailyRunLimit;return{allowViewers:!0,viewerDailyRunLimit:Number.isInteger(n)&&(n??0)>0?n:YK}}function KS(){return GF()?"Analyst":"View only"}function rp(){return VC()!==null}function HF(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const $C=HF();function FF(){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 lp(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function QF(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 ZF(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:"||!QF(e.hostname))return;const i=e.port?`:${e.port}`:"",r=n?n.replace(/\/$/,""):"";return`${e.protocol}//localhost${i}${r}`}function lie(e){return`${e.replace(/\/$/,"")}/api/v1/google/callback`}function cie(e){return`${e.replace(/\/$/,"")}/api/v1/google-marketing/callback`}function YF(){if(!(typeof window>"u"))return ZF(window.location,lp())}function XF(e){return`${lp()}${e}`}function JF(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 WF(){return""}function eQ(){return!!WF()}let KC=null;function GS(e){KC=e}function ny(){KC?.()}const J=yR({baseUrl:FF()});J.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&ny(),e));J.interceptors.request.use(e=>{const n=UC(e.url);return n===e.url?e:BF(e,n)});async function ye(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}`,u,h;if(typeof n.error=="object"&&n.error!==null){const f=n.error.error;if(typeof f=="string")r=f;else if(f&&typeof f=="object"){const b=f;b.message&&(r=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}else{const b=n.error;b.message&&(r=b.message),b.code&&(u=b.code),b.details&&(h=b.details)}}else typeof n.error=="string"&&(r=n.error);throw new yn(r,i,u,h)}if(n.response.status!==204)return n.data}async function Ks(e,n){const i=n?.body!=null,r=await fetch(UC(`${$C}${e}`),{...n,credentials:n?.credentials??"same-origin",headers:{...i?{"Content-Type":"application/json"}:{},...n?.headers}});if(!r.ok){const u=await r.text();let h=`API ${r.status}: ${r.statusText}`,f,b;if(u)try{const v=JSON.parse(u);typeof v.error=="string"?h=v.error:v.error?.message?(h=v.error.message,f=v.error.code,b=v.error.details):v.message&&(h=v.message)}catch{h=u}throw r.status===401&&!e.startsWith("/session")&&!e.startsWith("/auth/")&&ny(),new yn(h,r.status,f,b)}if(r.status!==204)return r.json()}function tQ(e){return ye(()=>gj({client:J,path:{name:e}}))}function uie(e){return ye(()=>vj({client:J,path:{name:e}}))}function Gg(e){return ye(()=>xj({client:J,path:{id:e}}))}function GC(e){return ye(()=>bj({client:J,path:{name:e}}))}function nQ(e,n,i){return ye(()=>FT({client:J,path:{name:e},query:{location:n,limit:i}}))}function HC(e,n){return ye(()=>_8({client:J,path:{name:e},query:{location:n?.location,since:n?.since}}))}function FC(e,n){return ye(()=>aT({client:J,path:{name:e},body:n}))}function aQ(e){return ye(()=>tT({client:J,body:e}))}function iQ(e,n){return ye(()=>IT({client:J,path:{name:e},body:{queries:n}}))}function sQ(e,n){return ye(()=>zT({client:J,path:{name:e},body:{queries:n}}))}function die(e,n){return ye(()=>DT({client:J,path:{name:e},body:{queries:n}}))}function oQ(e,n,i){return ye(()=>qT({client:J,path:{name:e},body:{competitors:n}}))}function mie(e,n,i){return ye(()=>PT({client:J,path:{name:e},body:{competitors:n,...i?.acknowledgeBulkAdd!==void 0?{acknowledgeBulkAdd:i.acknowledgeBulkAdd}:{}}}))}function pie(e,n){return ye(()=>MT({client:J,path:{name:e,id:n}}))}async function hie(e,n){const i=await tQ(e);return FC(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,...n.siteAuditMaxPages!==void 0?{siteAuditMaxPages:n.siteAuditMaxPages}:{}})}function rQ(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ye(()=>LT({client:J,path:{name:e},body:i}))}function fie(e,n){return ye(()=>TT({client:J,path:{name:e},body:n}))}async function gie(e,n){await ye(()=>ET({client:J,path:{name:e,label:n}}))}function yie(e,n){return ye(()=>RT({client:J,path:{name:e},body:{label:n}}))}async function bie(e){await ye(()=>nT({client:J,path:{name:e}}))}function vie(){return ye(()=>wj({client:J}))}function HS(){return Ks("/session")}function lQ(e,n){return Ks("/session/setup",{method:"POST",body:JSON.stringify({password:e}),...n?{headers:{Authorization:`Bearer ${n}`}}:{}})}function cQ(e){return Ks("/session",{method:"POST",body:JSON.stringify({password:e})})}function uQ(e){return Ks("/session",{method:"POST",body:JSON.stringify({apiKey:e})})}function dQ(){return Ks("/session",{method:"DELETE"})}function ag(){return ye(()=>JT({client:J}))}function FS(){return Ks("/auth/session")}function mQ(e,n){return Ks("/auth/login",{method:"POST",body:JSON.stringify({name:e,password:n})})}function QS(){return Ks("/auth/logout",{method:"POST"})}function QC(e,n){return ye(()=>YT({client:J,path:{name:e},body:n}))}async function ay(e){for(let n=0;n<2;n+=1)try{await ye(()=>dE({client:J,body:e}));return}catch(i){if(!(!(i instanceof yn)||i.statusCode>=500)||n===1)return}}function xie(e){return ye(()=>XT({client:J,body:e}))}function wie(e,n){return ye(()=>aE({client:J,path:{name:e},body:n}))}async function Sie(e,n){await ye(()=>tE({client:J,path:{name:e},query:n===void 0?void 0:{expectedUpdatedAt:n}}))}function kie(e){return ye(()=>sE({client:J,path:{name:e}}))}function jie(e,n){return ye(()=>oE({client:J,path:{name:e},body:n}))}async function Aie(e,n){await ye(()=>rE({client:J,path:{name:e,id:n}}))}async function Nie(e,n){const i=await ye(()=>lE({client:J,path:{name:e,id:n}}));return i.ok&&Ho("notification.test"),i}function pQ(e,n,i){return ye(()=>OT({client:J,path:{name:e},body:{provider:n,count:i}}))}function hQ(e){return ye(()=>KT({client:J,body:e}))}function fQ(e){return ye(()=>$T({client:J,body:e??{}}))}function Cie(e,n){const i=YF();return ye(()=>OE({client:J,path:{name:e},body:{type:n,...i?{publicUrl:i}:{}}}))}function _ie(e,n){return ye(()=>PE({client:J,path:{name:e,type:n}}))}function Tie(e,n,i){return ye(()=>ME({client:J,path:{name:e,type:n},body:{propertyId:i}}))}function Eie(e,n,i){return ye(()=>BE({client:J,path:{name:e,type:n},body:{sitemapUrl:i}}))}function gQ(e,n){return ye(()=>LE({client:J,path:{name:e},body:n??{}}))}function Rie(e,n){const i={};return n&&n!=="all"&&(i.window=n),ye(()=>QT({client:J,path:{name:e},query:i}))}function Die(e,n){return ye(()=>$E({client:J,path:{name:e},body:{url:n}}))}function yQ(e,n){return ye(()=>ZE({client:J,path:{name:e},body:n??{}}))}function zie(e,n){return ye(()=>QE({client:J,path:{name:e},query:n?{sitemapIndex:n}:void 0}))}function Iie(e,n){return ye(()=>W6({client:J,path:{name:e},body:{sitemapUrls:n}}))}function bQ(e,n){return ye(()=>cR({client:J,path:{name:e},body:n??{}}))}function Oie(e,n){return ye(()=>Y8({client:J,path:{name:e},body:n??{}}))}function Pie(){return ye(()=>Sj({client:J}))}function qie(e,n){return ye(()=>eE({client:J,body:{host:e,port:n}}))}function Mie(e,n){return ye(()=>YE({client:J,path:{name:e},body:n}))}function Bie(e,n){return ye(()=>s8({client:J,path:{name:e},body:{apiKey:n}}))}function Lie(e){return ye(()=>o8({client:J,path:{name:e}}))}function Uie(e,n){return ye(()=>c8({client:J,path:{name:e},body:{siteUrl:n}}))}function Vie(e,n){return ye(()=>m8({client:J,path:{name:e},body:{url:n}}))}function $ie(e,n){return ye(()=>p8({client:J,path:{name:e},body:{}}))}function Kie(e,n){return ye(()=>h8({client:J,path:{name:e},body:n}))}function Gie(e){return ye(()=>WT({client:J,body:{apiKey:e}}))}function vQ(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function Hie(e,n){const i=await fetch(`${$C}/projects/${encodeURIComponent(e)}/results/export?format=${n}`,{credentials:"same-origin",headers:{}});if(!i.ok)throw km({method:"GET",route:"/api/v1/projects/{name}/results/export",status:i.status}),new yn(`Failed to download results: ${i.status}`,i.status);Ho("export.download",{format:n});const r=await i.blob(),u=URL.createObjectURL(r),h=vQ(i.headers.get("Content-Disposition"))??`canonry-results-${e}.${n}`,f=document.createElement("a");f.href=u,f.download=h,document.body.appendChild(f),f.click(),document.body.removeChild(f),URL.revokeObjectURL(u)}function Fie(e,n){return ye(()=>x8({client:J,path:{name:e},body:{}}))}function Qie(e,n){return ye(()=>g8({client:J,path:{name:e},body:n}))}function Zie(e){return ye(()=>y8({client:J,path:{name:e}}))}function Yie(e,n){return ye(()=>U8({client:J,path:{name:e},body:n}))}function Xie(e,n){return ye(()=>V8({client:J,path:{name:e},body:n}))}function Jie(e,n){return ye(()=>$8({client:J,path:{name:e},body:n}))}function Wie(e,n,i){return ye(()=>K8({client:J,path:{name:e,id:n},body:i??{}}))}function ese(e,n,i){return ye(()=>G8({client:J,path:{name:e,id:n},body:{}}))}function tse(e,n){return ye(()=>A8({client:J,path:{name:e},query:{runId:n}}))}function xQ(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 wQ(e,n){const i=XF(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:JF(e,r.status)};const u=await r.json(),h=typeof u.version=="string"?u.version:"unknown",f=typeof u.databaseUrlConfigured=="boolean"?u.databaseUrlConfigured:void 0,b=typeof u.lastHeartbeatAt=="string"?u.lastHeartbeatAt:void 0,v=xQ(u.updateAvailable),x=tH.safeParse(u.mcp),S=[h,f===!1?"database not configured":"database configured",b?`heartbeat ${b}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:S,version:h,databaseConfigured:f,lastHeartbeatAt:b,...v?{updateAvailable:v}:{},...x.success?{mcp:x.data}:{}}}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 nse(){return ye(()=>T8({client:J}))}function ase(){return ye(()=>E8({client:J}))}function ise(){return ye(()=>z8({client:J}))}function sse(){return ye(()=>R8({client:J}))}function ose(e){return ye(()=>D8({client:J,body:e?{release:e}:{}}))}function rse(){return ye(()=>I8({client:J}))}function lse(){return ye(()=>O8({client:J}))}function cse(e){return ye(()=>P8({client:J,path:{release:e}}))}function use(e,n={}){return ye(()=>M8({client:J,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function dse(e,n={}){return ye(()=>B8({client:J,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 mse(e,n={}){return ye(()=>L8({client:J,path:{name:e},query:{source:n.source}}))}function pse(e,n){return ye(()=>q8({client:J,path:{name:e},body:{release:void 0}}))}async function ZS(e,n){return ye(()=>mR({client:J,path:{name:e},query:n}))}async function SQ(e,n){return ye(()=>pR({client:J,path:{name:e},body:{id:n}}))}async function kQ(e,n){return ye(()=>fR({client:J,path:{name:e,id:n}}))}async function jQ(e,n){return ye(()=>hR({client:J,path:{name:e,id:n}}))}async function AQ(e,n){const i=f=>ye(()=>dT({client:J,path:{name:e},query:{...n,include:["assessments","locations"],queryLimit:oN,queryCursor:f}})),r=await i(),u=[...r.queries];let h=r.queryPage?.nextCursor??null;for(;h;){const f=await i(h);u.push(...f.queries),h=f.queryPage?.nextCursor??null}return{...r,queries:u,...r.queryPage?{queryPage:{...r.queryPage,nextCursor:null}}:{}}}function Jd(e){return ye(()=>cT({client:J,path:{name:e}}))}function NQ(e,n){return ye(()=>uT({client:J,path:{name:e},body:n}))}function CQ(e,n,i){return ye(()=>mT({client:J,path:{name:e},query:{...n,cursor:i,limit:50}}))}function _Q(e,n){return ye(()=>pT({client:J,path:{name:e},query:n}))}function TQ(e,n,i){return ye(()=>hT({client:J,path:{name:e},body:{previewToken:n,idempotencyKey:i}}))}function EQ(e){return ye(()=>fT({client:J,path:{name:e}}))}function RQ(e,n,i){return ye(()=>gT({client:J,path:{name:e,jobId:n},query:{attemptCursor:i}}))}const ZC={account:null,canWrite:!0,isAdmin:!0},DQ={account:null,canWrite:!1,isAdmin:!1};function zQ(e){const n=e.scopes.includes(qS);return{account:null,canWrite:!e.readOnly&&n,isAdmin:e.projectId===null&&e.scopes.includes(qS)}}const YC=_.createContext(ZC);function IQ({account:e,apiKey:n,apiKeyPending:i=!1,children:r}){const u=i?DQ:n?zQ(n):e?{account:e,canWrite:e.role==="admin",isAdmin:e.role==="admin"}:ZC;return l.jsx(YC.Provider,{value:u,children:r})}function ga(){return _.useContext(YC)}const XC="View only — your account cannot change this.";function gn(e){return(...n)=>{e(...n)}}const OQ=6e3,PQ=5,qQ=180;let qn=[],MQ=0;const Hg=new Set,Fg=new Map,Qg=new Map;function jm(){const e=[...qn];for(const n of Hg)n(e)}function iy(e){const n=Fg.get(e);n&&(clearTimeout(n),Fg.delete(e));const i=Qg.get(e);i&&(clearTimeout(i),Qg.delete(e))}function JC(e){iy(e);const n=qn.length;qn=qn.filter(i=>i.id!==e),qn.length!==n&&jm()}function YS(e){iy(e.id),Fg.set(e.id,setTimeout(()=>{Zg(e.id)},e.durationMs))}function BQ(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function vn(e,n="negative",i=OQ){const r=BQ(e,n,i),u={id:String(++MQ),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 h=qn.find(f=>f.dedupeKey===r.dedupeKey);if(h){if((r.dedupeMode??"drop")==="drop")return h.id;const f={...h,title:u.title,detail:u.detail,tone:u.tone,durationMs:u.durationMs,cta:u.cta,state:"open"};return qn=qn.map(b=>b.id===h.id?f:b),jm(),YS(f),h.id}}return qn.length>=PQ&&JC(qn[0].id),qn=[...qn,u],jm(),YS(u),u.id}function Zg(e){const n=qn.find(i=>i.id===e);!n||n.state==="closing"||(iy(e),qn=qn.map(i=>i.id===e?{...i,state:"closing"}:i),jm(),Qg.set(e,setTimeout(()=>{JC(e)},qQ)))}function LQ(e){return Hg.add(e),()=>{Hg.delete(e)}}function XS(){return qn}const Yg={project:"getApiV1ProjectsByName",google:"getApiV1ProjectsByNameGoogle",gsc:"getApiV1ProjectsByNameGoogleGsc",bing:"getApiV1ProjectsByNameBing",ga:"getApiV1ProjectsByNameGa",gbp:"getApiV1ProjectsByNameGbp",ads:"getApiV1ProjectsByNameAds",googleAds:"getApiV1ProjectsByNameGoogleAds",gtm:"getApiV1ProjectsByNameGtm",conversionTracking:"getApiV1ProjectsByNameConversionTracking",traffic:"getApiV1ProjectsByNameTraffic",discovery:"getApiV1ProjectsByNameDiscover",researchRuns:"getApiV1ProjectsByNameResearchRuns",visibilityReport:"getApiV1ProjectsByNameVisibilityReport",queryTracking:"getApiV1ProjectsByNameQueryTracking",technicalAeo:"getApiV1ProjectsByNameTechnicalAeo",runs:"getApiV1ProjectsByNameRuns",runAdmission:"getApiV1ProjectsByNameRunAdmission"};function Pn(e,n){const i=Yg[n];return e.invalidateQueries({predicate:r=>{const u=r.queryKey[0];return typeof u?._id=="string"&&u._id.startsWith(i)}})}function hse(e,n){return e.invalidateQueries({predicate:i=>{const r=i.queryKey[0];return r?.path?.name!==n||typeof r._id!="string"?!1:r._id.startsWith("getApiV1ProjectsByNameMeasurement")||r._id===Yg.queryTracking||r._id===Yg.visibilityReport||r._id==="getApiV1ProjectsByNameQueries"||r._id==="getApiV1ProjectsByName"}})}const UQ=new Set(["getApiV1Projects","getApiV1Runs","getApiV1History","getApiV1NotificationsEvents"]);function VQ(e,n,i){if(!["POST","PUT","PATCH","DELETE"].includes(n.method))return;const u=new URL(n.url).pathname.match(/\/api\/v1\/(.*)$/)?.[1];if(!u||/^(?:telemetry|feedback|auth|session)(?:\/|$)/.test(u))return;const h=u.match(/^projects\/([^/]+)(?:\/(.*))?$/),f=h?h[2]??"":u;if(n.method==="POST"&&/(?:^|\/)(?:[^/]*-preview|preview(?:-[^/]+)?|test|generate)$/.test(f))return;const b=i&&typeof i=="object"?i:null;if(b?.dryRun===!0||u.endsWith("/results/clear")&&b?.confirm!==!0)return;const v=h?decodeURIComponent(h[1]):null,x=h?.[2]?.startsWith("agent/")??!1,S=new Set(v?[v]:[]),j=new Set;if(v)for(const P of e.getQueryCache().getAll()){const M=P.queryKey[0],L=P.state.data,$=M?._id==="getApiV1Projects"&&Array.isArray(L)?L:L&&typeof L=="object"&&"project"in L?[L.project]:M?._id==="getApiV1ProjectsByName"?[L]:[];for(const Q of $)Q&&(Q.name===v||Q.id===v)&&(S.add(Q.name),S.add(Q.id),j.add(Q.id))}const C=P=>{const M=P.queryKey[0];if(x)return M?.path?.name===v&&M._id?.startsWith("getApiV1ProjectsByNameAgent")===!0||P.queryKey[0]==="aero-preview"&&P.queryKey[1]===v;if(M?._id?.startsWith("getApiV1ProjectsByName")&&M.path?.name&&S.has(M.path.name))return!0;const L=P.queryKey[0];if(["projects","project-dashboard-full","project-overview-slim"].includes(L))return j.has(P.queryKey[1]);if(["sentiment","gbp-section-insights","analytics-metrics","aero-preview"].includes(L))return L==="analytics-metrics"&&h?.[2]?.startsWith("competitors")?!1:S.has(P.queryKey[1]);if(L==="setup")return S.has(P.queryKey[2]);const $=P.state.data;return M?._id==="getApiV1RunsById"&&!!$?.projectId&&j.has($.projectId)},T=P=>UQ.has(P.queryKey[0]?._id??""),z=n.method==="POST"&&/^(?:runs|technical-aeo\/runs|discover\/run|backlinks\/extract|google\/gsc\/(?:sync|inspect-sitemap)|bing\/inspect-sitemap|(?:gbp|ads|google-ads|gtm)\/sync)$/.test(f),q=P=>{const M=P.queryKey[0];return T(P)||["getApiV1ProjectsByName","getApiV1ProjectsByNameOverview","getApiV1ProjectsByNameRuns","getApiV1ProjectsByNameTechnicalAeoRuns","getApiV1ProjectsByNameTimeline"].includes(M?._id??"")||P.queryKey[0]==="project-dashboard-full"&&P.queryKey[3]==="overview"||P.queryKey[0]==="project-overview-slim"},R=v?P=>C(P)&&(!z||q(P))||!x&&T(P):P=>!z||q(P);if(e.cancelQueries({predicate:R,type:"active"}),h&&!h[2]&&n.method==="DELETE"){e.removeQueries({predicate:C}),e.setQueriesData({predicate:P=>P.queryKey[0]?._id==="getApiV1Projects"},P=>P?.filter(M=>!S.has(M.name)&&!S.has(M.id))),e.setQueriesData({predicate:P=>P.queryKey[0]?._id==="getApiV1Runs"},P=>P?.filter(M=>!j.has(M.projectId))),e.invalidateQueries({predicate:T});return}e.invalidateQueries({predicate:R})}const $Q=5*6e4,Wd=30*6e4,fse=3e4,gse=6e4,Es=3e4,KQ=2e3,GQ=3e4;let JS;function HQ(){const e=new e6({defaultOptions:{queries:{staleTime:$Q,retry:1,refetchOnWindowFocus:!1}},mutationCache:new t6({onError:(u,h,f,b)=>{b.meta?.skipGlobalErrorToast||vn({title:u instanceof Error?u.message:"An unexpected error occurred",tone:"negative"})}})});JS?.();const n=new WeakSet,i=J.interceptors.request.use(u=>(n.add(u),u)),r=J.interceptors.response.use((u,h,f)=>(u.ok&&n.has(h)&&VQ(e,h,f.body),u));return JS=()=>{J.interceptors.request.eject(i),J.interceptors.response.eject(r)},e}const FQ="modulepreload",QQ=function(e,n){return new URL(e,n).href},WS={},Zi=function(n,i,r){let u=Promise.resolve();if(i&&i.length>0){let x=function(S){return Promise.all(S.map(j=>Promise.resolve(j).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};const f=document.getElementsByTagName("link"),b=document.querySelector("meta[property=csp-nonce]"),v=b?.nonce||b?.getAttribute("nonce");u=x(i.map(S=>{if(S=QQ(S,r),S in WS)return;WS[S]=!0;const j=S.endsWith(".css"),C=j?'[rel="stylesheet"]':"";if(r)for(let z=f.length-1;z>=0;z--){const q=f[z];if(q.href===S&&(!j||q.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${S}"]${C}`))return;const T=document.createElement("link");if(T.rel=j?"stylesheet":FQ,j||(T.as="script"),T.crossOrigin="",T.href=S,v&&T.setAttribute("nonce",v),document.head.appendChild(T),j)return new Promise((z,q)=>{T.addEventListener("load",z),T.addEventListener("error",()=>q(new Error(`Unable to preload CSS for ${S}`)))})}))}function h(f){const b=new Event("vite:preloadError",{cancelable:!0});if(b.payload=f,window.dispatchEvent(b),!b.defaultPrevented)throw f}return u.then(f=>{for(const b of f||[])b.status==="rejected"&&h(b.reason);return n().catch(h)})},sy=_.createContext({view:null,publish:()=>()=>{}});function ZQ({children:e}){const[n,i]=_.useState(null),r=_.useCallback(u=>(i(u),()=>i(h=>h===u?null:h)),[]);return l.jsx(sy.Provider,{value:_.useMemo(()=>({view:n,publish:r}),[n,r]),children:e})}function yse(e,n){const{publish:i}=_.useContext(sy),r=JSON.stringify(n);_.useEffect(()=>i({project:e,context:JSON.parse(r)}),[i,e,r])}function YQ(e,n){const{view:i}=_.useContext(sy);return i?.project===e&&i.context.view===n.view?i.context:n}var XQ=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(XQ||{});const bse={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},vse={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},JQ=F0;function xse(e){return e.endsWith("%")?{figure:e.slice(0,-1),sign:"%"}:{figure:e,sign:""}}function wse(e,n){return n==="cited"?WH(e):JH(e)}function Sse(e,n){const i=Lc(e);switch(n){case"cited":return`${i} cited (any page)`;case"emerging":return`${i} newly cited (any page)`;case"lost":return`${i} citation lost (any page)`;case"not-cited":return`${i} not cited (any page)`;case"pending":return"Pending"}}function WQ(e){const n=[];if(e.message&&n.push(e.message),e.providers)for(const[i,r]of Object.entries(e.providers)){const u=`[${i}] ${r.message}`;r.raw!==void 0?n.push(`${u}
53
+
54
+ ${JSON.stringify(r.raw,null,2)}`):n.push(u)}return n.length>0?n.join(`
55
+
56
+ `):"Run failed."}function eZ(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function tZ(e,n,i=new Date){const r=new Date(e);if(Number.isNaN(r.getTime()))return e;const u=r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});return n&&new Date(n).toDateString()===r.toDateString()?u:`${nZ(e,i)}, ${u}`}function nZ(e,n=new Date){const i=new Date(e);return Number.isNaN(i.getTime())?e:i.getFullYear()===n.getFullYear()?aZ(e):i.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function aZ(e){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function iZ(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function kse(e){return e===null?"Unknown":e?"Pass":"Fail"}function ek(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function jse(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function Ase(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 Nse(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 u=e.match(/^daily(?:@(\d+))?$/);if(u){const f=u[1]?parseInt(u[1]):6;return`Every day at ${ek(f)} · ${r}`}const h=e.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(h){const f={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},b=h[2]?parseInt(h[2]):6;return`Every ${f[h[1]]} at ${ek(b)} · ${r}`}return`${e} · ${r}`}function sZ(e,n){return n&&n!==e?`${e} · ${n}`:e}function Cse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return sZ(e,n)}function oZ(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 rZ(e,n){return!n||n.includes(e)}const WC=["overview","search-console","local","activity","backlinks","technical-aeo","history","settings"],lZ=new Set(WC);function cZ(e){if(iC(e))return[];const n=e??WC,i=[...new Set(n.filter(r=>lZ.has(r)))];return i.length>0?i:["overview"]}function _se(e){return e?cZ(e.projectTabs):void 0}function Tse(e,n){return rZ(e,n)||!n?e:n.includes("overview")?"overview":n[0]??"overview"}const tk={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},uZ=/^(?:#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})|rgba?\([0-9.,%\s/]+\)|hsla?\([0-9.,%\s/a-z]+\))$/i;function dZ(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function mZ(e){if(!e)return{};const n={};for(const[i,r]of Object.entries(e)){const u=Object.hasOwn(tk,i)?tk[i]:void 0;if(!u||typeof r!="string")continue;const h=r.trim();uZ.test(h)&&(n[u]=h)}return n}const he=(e,n,i,r)=>{const u={_id:e,baseUrl:n?.baseUrl||(n?.client??I).getConfig().baseUrl};return i&&(u._infinite=i),n?.body&&(u.body=n.body),n?.headers&&(u.headers=n.headers),n?.path&&(u.path=n.path),n?.query&&(u.query=n.query),[u]},Xr=e=>he("getApiV1Projects",e),Fo=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await eT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Xr(e)}),pZ=e=>he("getApiV1ProjectsByName",e),hZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await gj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:pZ(e)}),fZ=e=>he("getApiV1ProjectsByNameMeasurementPlan",e),Ese=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await iT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:fZ(e)}),gZ=e=>he("getApiV1ProjectsByNameMeasurementReport",e),Rse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gZ(e)}),yZ=e=>he("getApiV1ProjectsByNameMeasurementSetup",e),bZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await oT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yZ(e)}),vZ=e=>he("getApiV1ProjectsByNameMeasurementPlanDraft",e),Dse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vZ(e)}),fu=(e,n)=>{const i={...e[0]};return n.body&&(i.body={...e[0].body,...n.body}),n.headers&&(i.headers={...e[0].headers,...n.headers}),n.path&&(i.path={...e[0].path,...n.path}),n.query&&(i.query={...e[0].query,...n.query}),i},zse=e=>({mutationFn:async i=>{const{data:r}=await lT({...e,...i,throwOnError:!0});return r}}),xZ=e=>he("getApiV1ProjectsByNameMeasurementOverview",e),Ise=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xZ(e)}),wZ=e=>he("getApiV1ProjectsByNameMeasurementOverview",e,!0),Ose=e=>Zc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=fu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await yj({...e,...h,signal:r,throwOnError:!0});return f},queryKey:wZ(e)}),SZ=e=>he("getApiV1ProjectsByNameVisibilityReport",e),Pse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SZ(e)}),kZ=e=>he("getApiV1ProjectsByNameMeasurementPropertyEvidence",e,!0),qse=e=>Zc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=fu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await bT({...e,...h,signal:r,throwOnError:!0});return f},queryKey:kZ(e)}),jZ=e=>he("getApiV1ProjectsByNameMeasurementQuestionResult",e),Mse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jZ(e)}),AZ=e=>he("getApiV1ProjectsByNameMeasurementPropertyCompetitors",e),Bse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await xT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AZ(e)}),NZ=e=>he("getApiV1ProjectsByNameMeasurementQueryTemplates",e),Lse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NZ(e)}),Use=e=>({mutationFn:async i=>{const{data:r}=await ST({...e,...i,throwOnError:!0});return r}}),CZ=e=>he("getApiV1ProjectsByNameResearchRuns",e,!0),Vse=e=>Zc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=fu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await kT({...e,...h,signal:r,throwOnError:!0});return f},queryKey:CZ(e)}),$se=e=>({mutationFn:async i=>{const{data:r}=await jT({...e,...i,throwOnError:!0});return r}}),_Z=e=>he("getApiV1ProjectsByNameQueryTracking",e),Kse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_Z(e)}),Gse=e=>({mutationFn:async i=>{const{data:r}=await NT({...e,...i,throwOnError:!0});return r}}),Hse=e=>({mutationFn:async i=>{const{data:r}=await CT({...e,...i,throwOnError:!0});return r}}),TZ=e=>he("getApiV1ProjectsByNameResearchRunsByRunId",e),Fse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _T({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:TZ(e)}),e4=e=>he("getApiV1ProjectsByNameQueries",e),Qse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:e4(e)}),EZ=e=>he("getApiV1ProjectsByNameAnalyticsCompetitors",e),Zse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await BT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EZ(e)}),RZ=e=>he("getApiV1ProjectsByNameRuns",e),t4=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RZ(e)}),DZ=e=>he("getApiV1ProjectsByNameRunAdmission",e),Yse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await UT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DZ(e)}),n4=e=>he("getApiV1Runs",e),Fc=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await VT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:n4(e)}),zZ=e=>he("getApiV1RunsById",e),oy=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await xj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zZ(e)}),IZ=e=>he("getApiV1ProjectsByNameHistory",e),Xse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await GT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:IZ(e)}),OZ=e=>he("getApiV1History",e),Jse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await HT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OZ(e)}),PZ=e=>he("getApiV1ProjectsByNameSnapshotsDiff",e),Wse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ZT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:PZ(e)}),qZ=e=>he("getApiV1Settings",e),MZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:qZ(e)}),BZ=e=>he("getApiV1ProjectsByNameSchedule",e),LZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:BZ(e)}),UZ=e=>he("getApiV1ProjectsByNameSchedules",e),eoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await iE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UZ(e)}),a4=e=>he("getApiV1Telemetry",e),VZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:a4(e)}),$Z=e=>({mutationFn:async i=>{const{data:r}=await uE({...e,...i,throwOnError:!0});return r}}),KZ=e=>he("getApiV1CdpStatus",e),GZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Sj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:KZ(e)}),HZ=e=>he("getApiV1ProjectsByNameGoogleAdsStatus",e),toe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:HZ(e)}),noe=e=>({mutationFn:async i=>{const{data:r}=await hE({...e,...i,throwOnError:!0});return r}}),FZ=e=>he("getApiV1ProjectsByNameGoogleAdsCustomers",e),aoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:FZ(e)}),ioe=e=>({mutationFn:async i=>{const{data:r}=await gE({...e,...i,throwOnError:!0});return r}}),soe=e=>({mutationFn:async i=>{const{data:r}=await yE({...e,...i,throwOnError:!0});return r}}),QZ=e=>he("getApiV1ProjectsByNameGoogleAdsPerformance",e),ooe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:QZ(e)}),ZZ=e=>he("getApiV1ProjectsByNameGoogleAdsSnapshots",e),roe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:ZZ(e)}),loe=e=>({mutationFn:async i=>{const{data:r}=await xE({...e,...i,throwOnError:!0});return r}}),YZ=e=>he("getApiV1ProjectsByNameGtmStatus",e),coe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:YZ(e)}),uoe=e=>({mutationFn:async i=>{const{data:r}=await SE({...e,...i,throwOnError:!0});return r}}),XZ=e=>he("getApiV1ProjectsByNameGtmAccounts",e),doe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:XZ(e)}),JZ=e=>he("getApiV1ProjectsByNameGtmAccountsByAccountIdContainers",e),moe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:JZ(e)}),WZ=e=>he("getApiV1ProjectsByNameGtmAccountsByAccountIdContainersByContainerIdWorkspaces",e),poe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:WZ(e)}),hoe=e=>({mutationFn:async i=>{const{data:r}=await NE({...e,...i,throwOnError:!0});return r}}),foe=e=>({mutationFn:async i=>{const{data:r}=await CE({...e,...i,throwOnError:!0});return r}}),eY=e=>he("getApiV1ProjectsByNameGtmSnapshots",e),goe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _E({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:eY(e)}),yoe=e=>({mutationFn:async i=>{const{data:r}=await TE({...e,...i,throwOnError:!0});return r}}),tY=e=>he("getApiV1ProjectsByNameConversionTrackingOptions",e),boe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await EE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:tY(e)}),nY=e=>he("getApiV1ProjectsByNameConversionTrackingContracts",e),voe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await RE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:nY(e)}),xoe=e=>({mutationFn:async i=>{const{data:r}=await DE({...e,...i,throwOnError:!0});return r}}),aY=e=>he("getApiV1ProjectsByNameConversionTrackingContractsByContractIdIntegrity",e),woe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await zE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:aY(e)}),iY=e=>he("getApiV1ProjectsByNameGoogleConnections",e),Soe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await IE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:iY(e)}),sY=e=>he("getApiV1ProjectsByNameGoogleProperties",e),koe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await qE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:sY(e)}),oY=e=>he("getApiV1ProjectsByNameGoogleGscPerformance",e),joe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await UE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:oY(e)}),rY=e=>he("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),Aoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await VE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:rY(e)}),lY=e=>he("getApiV1ProjectsByNameGoogleGscInspections",e),Noe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await KE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lY(e)}),cY=e=>he("getApiV1ProjectsByNameGoogleGscDeindexed",e),Coe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await GE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:cY(e)}),uY=e=>he("getApiV1ProjectsByNameGoogleGscCoverage",e),_oe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await HE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:uY(e)}),dY=e=>he("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),Toe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await FE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:dY(e)}),Eoe=e=>he("getApiV1ProjectsByNameGoogleGscSitemaps",e),mY=e=>he("getApiV1ProjectsByNameGbpLocations",e),Roe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await XE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:mY(e)}),Doe=e=>({mutationFn:async i=>{const{data:r}=await JE({...e,...i,throwOnError:!0});return r}}),zoe=e=>({mutationFn:async i=>{const{data:r}=await WE({...e,...i,throwOnError:!0});return r}}),pY=e=>he("getApiV1ProjectsByNameGbpKeywords",e),Ioe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await e8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:pY(e)}),hY=e=>he("getApiV1ProjectsByNameGbpPlaceActions",e),Ooe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await t8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:hY(e)}),fY=e=>he("getApiV1ProjectsByNameGbpLodging",e),Poe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await n8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:fY(e)}),gY=e=>he("getApiV1ProjectsByNameGbpPlaces",e),qoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await a8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gY(e)}),yY=e=>he("getApiV1ProjectsByNameGbpSummary",e),Moe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await i8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yY(e)}),bY=e=>he("getApiV1ProjectsByNameBingStatus",e),Boe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await r8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:bY(e)}),vY=e=>he("getApiV1ProjectsByNameBingSites",e),Loe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await l8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vY(e)}),xY=e=>he("getApiV1ProjectsByNameBingCoverage",e),Uoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await u8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xY(e)}),wY=e=>he("getApiV1ProjectsByNameBingInspections",e),Voe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await d8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wY(e)}),SY=e=>he("getApiV1ProjectsByNameBingPerformance",e),$oe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await f8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SY(e)}),kY=e=>he("getApiV1ProjectsByNameGaStatus",e),Koe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await b8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kY(e)}),jY=e=>he("getApiV1ProjectsByNameGaSearchLandingPages",e),Goe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await v8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jY(e)}),AY=e=>he("getApiV1ProjectsByNameGaTraffic",e),Hoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await w8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AY(e)}),NY=e=>he("getApiV1ProjectsByNameGaAiReferralDaily",e),Foe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await S8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NY(e)}),CY=e=>he("getApiV1ProjectsByNameGaSocialReferralHistory",e),Qoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await k8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:CY(e)}),_Y=e=>he("getApiV1ProjectsByNameGaSessionHistory",e),Zoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await j8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_Y(e)}),TY=e=>he("getApiV1ProjectsByNameHealthHistory",e),Yoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await N8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:TY(e)}),EY=e=>he("getApiV1ProjectsByNameCitationsVisibility",e),Xoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await C8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EY(e)}),RY=e=>he("getApiV1ProjectsByNameTrafficSources",e),Joe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await H8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RY(e)}),DY=e=>he("getApiV1ProjectsByNameTrafficStatus",e),Woe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await F8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DY(e)}),zY=e=>he("getApiV1ProjectsByNameTrafficSourcesById",e),ere=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Q8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zY(e)}),IY=e=>he("getApiV1ProjectsByNameTrafficEvents",e),tre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Z8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:IY(e)}),OY=e=>he("getApiV1ProjectsByNameDiscoverSessions",e),nre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await X8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OY(e)}),PY=e=>he("getApiV1ProjectsByNameDiscoverSessionsById",e),are=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await J8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:PY(e)}),qY=e=>he("getApiV1ProjectsByNameTechnicalAeo",e),MY=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await W8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:qY(e)}),BY=e=>he("getApiV1ProjectsByNameTechnicalAeoPages",e),ire=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await eR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:BY(e)}),LY=e=>he("getApiV1ProjectsByNameTechnicalAeoTrend",e),sre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:LY(e)}),UY=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawl",e),ore=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await nR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UY(e)}),VY=e=>he("getApiV1ProjectsByNameTechnicalAeoGraph",e),rre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await aR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:VY(e)}),$Y=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit",e),lre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await iR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$Y(e)}),KY=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e),cre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:KY(e)}),GY=e=>he("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e,!0),ure=e=>Zc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=fu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await kj({...e,...h,signal:r,throwOnError:!0});return f},queryKey:GY(e)}),HY=e=>he("getApiV1ProjectsByNameTechnicalAeoStructure",e,!0),dre=e=>Zc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=fu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await sR({...e,...h,signal:r,throwOnError:!0});return f},queryKey:HY(e)}),FY=e=>he("getApiV1ProjectsByNameTechnicalAeoInternalLinksNeighbors",e),mre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await oR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:FY(e)}),QY=e=>he("getApiV1ProjectsByNameTechnicalAeoDeadLinks",e),pre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:QY(e)}),ZY=e=>he("getApiV1ProjectsByNameTechnicalAeoRuns",e),hre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:ZY(e)}),YY=e=>he("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdProgress",e),fre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:YY(e)}),XY=e=>he("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdPageHealthPreview",e),gre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:XY(e)}),JY=e=>he("getApiV1ProjectsByNameAgentProviders",e),WY=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await gR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:JY(e)});function nk(e){return e.state==="ok"?"positive":e.state==="checking"||e.state==="disabled"?"neutral":"negative"}function i4(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 yre(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"}}const bre={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function vre(e){return e>=50?"positive":e>=25?"caution":"negative"}function eX(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function Jr(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
57
+ `):void 0}function tX(e,n,i){const r=e.filter(f=>f.id!=="mcp").map(f=>{if(f.id==="api")return{...f,tone:nk(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(f.id==="worker")return{...f,tone:nk(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":n.workerStatus.state==="disabled"?"Disabled":"Needs attention",meta:n.workerStatus.detail};const b=i.providerStatuses.filter(j=>j.state==="ready").length,v=i.providerStatuses.length,x=b>0,S=i.providerStatuses.filter(j=>j.state==="ready").map(j=>eX(j)).join(" · ");return{...f,label:"Providers",tone:x?"positive":"caution",detail:`${b} of ${v} configured`,meta:S||"None configured"}}),u=n.apiStatus.mcp,h={id:"mcp",label:"MCP",tone:"neutral",detail:"Unknown",meta:"MCP status is not available from this server."};return n.apiStatus.state==="checking"?(h.detail="Checking",h.meta="Checking MCP availability."):n.apiStatus.state==="ok"&&u&&(u.status==="available"?(h.tone="positive",h.detail="Available",h.meta="MCP is available for agent connections. This checks the server transport, not an individual client connection."):u.status==="unavailable"?(h.tone="negative",h.detail="Unavailable",h.meta="The MCP transport is not fully available. Contact your Canonry team."):(h.detail="Not enabled",h.meta="This server does not provide an MCP endpoint.")),r.splice(Math.max(0,r.findIndex(f=>f.id==="api")+1),0,h),r}function nX(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 aX(e,n,i){const r=nX(n,i),u=structuredClone(e);return u.healthChecks=u.healthChecks.map(h=>{if(h.id==="api")return{...h,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(h.id==="worker")return{...h,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const f=i.providerStatuses.some(b=>b.state==="ready");return{...h,detail:f?"At least one provider configured.":"No providers configured.",state:f?"ready":"attention"}}),u.launchState.enabled=r===void 0,u.launchState.blockedReason=r,u.launchState.summary=r??"Queue a visibility sweep first, then follow with a site audit to explain movement.",u}const s4="canonry.run-tracker",Xg=new Set;let ak=!1,iX=0,cp={runs:{},batches:{}};function sX(){const e=Fi();for(const n of Xg)n(e)}function oX(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function rX(){typeof window>"u"||window.sessionStorage.setItem(s4,JSON.stringify(cp))}function o4(){ak||(ak=!0,!(typeof window>"u")&&(cp=oX(window.sessionStorage.getItem(s4))))}function up(e){cp=e,rX(),sX()}function Fi(){return o4(),cp}function r4(e){return o4(),Xg.add(e),()=>{Xg.delete(e)}}function ry(e){const n=Fi();up({...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 ig(e){const n=Fi();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;up({...n,runs:r})}function lX(e){const n=Fi(),i=`batch_${Date.now()}_${++iX}`;return up({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function cX(e){const n=Fi();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;up({...n,batches:r})}function uX(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const dX=10*6e4;function mX(e,n,i,r){return e.filter(u=>!n.has(u.runId)&&i-(u.trackedAt??0)>=r)}function pX(e,n){let i=0,r=0,u=0,h=0,f=0;for(const b of e){const v=n[b]?.status;v==="completed"?i+=1:v==="partial"?r+=1:v==="failed"?u+=1:v==="cancelled"?h+=1:f+=1}return{completed:i,partial:r,failed:u,cancelled:h,pending:f,finished:f===0}}const ik=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sk=ej,l4=(e,n)=>i=>{var r;if(n?.variants==null)return sk(e,i?.class,i?.className);const{variants:u,defaultVariants:h}=n,f=Object.keys(u).map(x=>{const S=i?.[x],j=h?.[x];if(S===null)return null;const C=ik(S)||ik(j);return u[x][C]}),b=i&&Object.entries(i).reduce((x,S)=>{let[j,C]=S;return C===void 0||(x[j]=C),x},{}),v=n==null||(r=n.compoundVariants)===null||r===void 0?void 0:r.reduce((x,S)=>{let{class:j,className:C,...T}=S;return Object.entries(T).every(z=>{let[q,R]=z;return Array.isArray(R)?R.includes({...h,...b}[q]):{...h,...b}[q]===R})?[...x,j,C]:x},[]);return sk(e,f,v,i?.class,i?.className)},hX=(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},fX=(e,n)=>({classGroupId:e,validator:n}),c4=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),Am="-",ok=[],gX="arbitrary..",yX=e=>{const n=vX(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return bX(f);const b=f.split(Am),v=b[0]===""&&b.length>1?1:0;return u4(b,v,n)},getConflictingClassGroupIds:(f,b)=>{if(b){const v=r[f],x=i[f];return v?x?hX(x,v):v:x||ok}return i[f]||ok}}},u4=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const u=e[n],h=i.nextPart.get(u);if(h){const x=u4(e,n+1,h);if(x)return x}const f=i.validators;if(f===null)return;const b=n===0?e.join(Am):e.slice(n).join(Am),v=f.length;for(let x=0;x<v;x++){const S=f[x];if(S.validator(b))return S.classGroupId}},bX=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?gX+r:void 0})(),vX=e=>{const{theme:n,classGroups:i}=e;return xX(i,n)},xX=(e,n)=>{const i=c4();for(const r in e){const u=e[r];ly(u,i,r,n)}return i},ly=(e,n,i,r)=>{const u=e.length;for(let h=0;h<u;h++){const f=e[h];wX(f,n,i,r)}},wX=(e,n,i,r)=>{if(typeof e=="string"){SX(e,n,i);return}if(typeof e=="function"){kX(e,n,i,r);return}jX(e,n,i,r)},SX=(e,n,i)=>{const r=e===""?n:d4(n,e);r.classGroupId=i},kX=(e,n,i,r)=>{if(AX(e)){ly(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(fX(i,e))},jX=(e,n,i,r)=>{const u=Object.entries(e),h=u.length;for(let f=0;f<h;f++){const[b,v]=u[f];ly(v,d4(n,b),i,r)}},d4=(e,n)=>{let i=e;const r=n.split(Am),u=r.length;for(let h=0;h<u;h++){const f=r[h];let b=i.nextPart.get(f);b||(b=c4(),i.nextPart.set(f,b)),i=b}return i},AX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,NX=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,i=Object.create(null),r=Object.create(null);const u=(h,f)=>{i[h]=f,n++,n>e&&(n=0,r=i,i=Object.create(null))};return{get(h){let f=i[h];if(f!==void 0)return f;if((f=r[h])!==void 0)return u(h,f),f},set(h,f){h in i?i[h]=f:u(h,f)}}},Jg="!",rk=":",CX=[],lk=(e,n,i,r,u)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:u}),_X=e=>{const{prefix:n,experimentalParseClassName:i}=e;let r=u=>{const h=[];let f=0,b=0,v=0,x;const S=u.length;for(let q=0;q<S;q++){const R=u[q];if(f===0&&b===0){if(R===rk){h.push(u.slice(v,q)),v=q+1;continue}if(R==="/"){x=q;continue}}R==="["?f++:R==="]"?f--:R==="("?b++:R===")"&&b--}const j=h.length===0?u:u.slice(v);let C=j,T=!1;j.endsWith(Jg)?(C=j.slice(0,-1),T=!0):j.startsWith(Jg)&&(C=j.slice(1),T=!0);const z=x&&x>v?x-v:void 0;return lk(h,T,C,z)};if(n){const u=n+rk,h=r;r=f=>f.startsWith(u)?h(f.slice(u.length)):lk(CX,!1,f,void 0,!0)}if(i){const u=r;r=h=>i({className:h,parseClassName:u})}return r},TX=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((i,r)=>{n.set(i,1e6+r)}),i=>{const r=[];let u=[];for(let h=0;h<i.length;h++){const f=i[h],b=f[0]==="[",v=n.has(f);b||v?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(f)):u.push(f)}return u.length>0&&(u.sort(),r.push(...u)),r}},EX=e=>({cache:NX(e.cacheSize),parseClassName:_X(e),sortModifiers:TX(e),...yX(e)}),RX=/\s+/,DX=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:h}=n,f=[],b=e.trim().split(RX);let v="";for(let x=b.length-1;x>=0;x-=1){const S=b[x],{isExternal:j,modifiers:C,hasImportantModifier:T,baseClassName:z,maybePostfixModifierPosition:q}=i(S);if(j){v=S+(v.length>0?" "+v:v);continue}let R=!!q,P=r(R?z.substring(0,q):z);if(!P){if(!R){v=S+(v.length>0?" "+v:v);continue}if(P=r(z),!P){v=S+(v.length>0?" "+v:v);continue}R=!1}const M=C.length===0?"":C.length===1?C[0]:h(C).join(":"),L=T?M+Jg:M,$=L+P;if(f.indexOf($)>-1)continue;f.push($);const Q=u(P,R);for(let ae=0;ae<Q.length;++ae){const V=Q[ae];f.push(L+V)}v=S+(v.length>0?" "+v:v)}return v},zX=(...e)=>{let n=0,i,r,u="";for(;n<e.length;)(i=e[n++])&&(r=m4(i))&&(u&&(u+=" "),u+=r);return u},m4=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=m4(e[r]))&&(i&&(i+=" "),i+=n);return i},IX=(e,...n)=>{let i,r,u,h;const f=v=>{const x=n.reduce((S,j)=>j(S),e());return i=EX(x),r=i.cache.get,u=i.cache.set,h=b,b(v)},b=v=>{const x=r(v);if(x)return x;const S=DX(v,i);return u(v,S),S};return h=f,(...v)=>h(zX(...v))},OX=[],fn=e=>{const n=i=>i[e]||OX;return n.isThemeGetter=!0,n},p4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PX=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MX=/\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$/,BX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,UX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=e=>PX.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),Cs=e=>!!e&&Number.isInteger(Number(e)),sg=e=>e.endsWith("%")&&st(e.slice(0,-1)),Bi=e=>qX.test(e),f4=()=>!0,VX=e=>MX.test(e)&&!BX.test(e),cy=()=>!1,$X=e=>LX.test(e),KX=e=>UX.test(e),GX=e=>!Re(e)&&!De(e),HX=e=>Gs(e,b4,cy),Re=e=>p4.test(e),xo=e=>Gs(e,v4,VX),ck=e=>Gs(e,eJ,st),FX=e=>Gs(e,w4,f4),QX=e=>Gs(e,x4,cy),uk=e=>Gs(e,g4,cy),ZX=e=>Gs(e,y4,KX),Ud=e=>Gs(e,S4,$X),De=e=>h4.test(e),jc=e=>Qo(e,v4),YX=e=>Qo(e,x4),dk=e=>Qo(e,g4),XX=e=>Qo(e,b4),JX=e=>Qo(e,y4),Vd=e=>Qo(e,S4,!0),WX=e=>Qo(e,w4,!0),Gs=(e,n,i)=>{const r=p4.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},Qo=(e,n,i=!1)=>{const r=h4.exec(e);return r?r[1]?n(r[1]):i:!1},g4=e=>e==="position"||e==="percentage",y4=e=>e==="image"||e==="url",b4=e=>e==="length"||e==="size"||e==="bg-size",v4=e=>e==="length",eJ=e=>e==="number",x4=e=>e==="family-name",w4=e=>e==="number"||e==="weight",S4=e=>e==="shadow",tJ=()=>{const e=fn("color"),n=fn("font"),i=fn("text"),r=fn("font-weight"),u=fn("tracking"),h=fn("leading"),f=fn("breakpoint"),b=fn("container"),v=fn("spacing"),x=fn("radius"),S=fn("shadow"),j=fn("inset-shadow"),C=fn("text-shadow"),T=fn("drop-shadow"),z=fn("blur"),q=fn("perspective"),R=fn("aspect"),P=fn("ease"),M=fn("animate"),L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...$(),De,Re],ae=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto","contain","none"],Z=()=>[De,Re,v],X=()=>[Ns,"full","auto",...Z()],Ce=()=>[Cs,"none","subgrid",De,Re],tt=()=>["auto",{span:["full",Cs,De,Re]},Cs,De,Re],Ge=()=>[Cs,"auto",De,Re],Ve=()=>["auto","min","max","fr",De,Re],ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Le=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...Z()],W=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],ve=()=>[Ns,"screen","full","dvw","lvw","svw","min","max","fit",...Z()],Ae=()=>[Ns,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Z()],se=()=>[e,De,Re],Se=()=>[...$(),dk,uk,{position:[De,Re]}],Me=()=>["no-repeat",{repeat:["","x","y","space","round"]}],xe=()=>["auto","cover","contain",XX,HX,{size:[De,Re]}],pe=()=>[sg,jc,xo],ce=()=>["","none","full",x,De,Re],ue=()=>["",st,jc,xo],_e=()=>["solid","dashed","dotted","double"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[st,sg,dk,uk],Ct=()=>["","none",z,De,Re],me=()=>["none",st,De,Re],Be=()=>["none",st,De,Re],Ne=()=>[st,De,Re],re=()=>[Ns,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Bi],breakpoint:[Bi],color:[f4],container:[Bi],"drop-shadow":[Bi],ease:["in","out","in-out"],font:[GX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Bi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Bi],shadow:[Bi],spacing:["px",st],text:[Bi],"text-shadow":[Bi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,Re,De,R]}],container:["container"],columns:[{columns:[st,Re,De,b]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],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:Q()}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Cs,"auto",De,Re]}],basis:[{basis:[Ns,"full","auto",b,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,Ns,"auto","initial","none",Re]}],grow:[{grow:["",st,De,Re]}],shrink:[{shrink:["",st,De,Re]}],order:[{order:[Cs,"first","last","none",De,Re]}],"grid-cols":[{"grid-cols":Ce()}],"col-start-end":[{col:tt()}],"col-start":[{"col-start":Ge()}],"col-end":[{"col-end":Ge()}],"grid-rows":[{"grid-rows":Ce()}],"row-start-end":[{row:tt()}],"row-start":[{"row-start":Ge()}],"row-end":[{"row-end":Ge()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Ve()}],"auto-rows":[{"auto-rows":Ve()}],gap:[{gap:Z()}],"gap-x":[{"gap-x":Z()}],"gap-y":[{"gap-y":Z()}],"justify-content":[{justify:[...ke(),"normal"]}],"justify-items":[{"justify-items":[...Le(),"normal"]}],"justify-self":[{"justify-self":["auto",...Le()]}],"align-content":[{content:["normal",...ke()]}],"align-items":[{items:[...Le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Le(),{baseline:["","last"]}]}],"place-content":[{"place-content":ke()}],"place-items":[{"place-items":[...Le(),"baseline"]}],"place-self":[{"place-self":["auto",...Le()]}],p:[{p:Z()}],px:[{px:Z()}],py:[{py:Z()}],ps:[{ps:Z()}],pe:[{pe:Z()}],pbs:[{pbs:Z()}],pbe:[{pbe:Z()}],pt:[{pt:Z()}],pr:[{pr:Z()}],pb:[{pb:Z()}],pl:[{pl:Z()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":Z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Z()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...ve()]}],"min-inline-size":[{"min-inline":["auto",...ve()]}],"max-inline-size":[{"max-inline":["none",...ve()]}],"block-size":[{block:["auto",...Ae()]}],"min-block-size":[{"min-block":["auto",...Ae()]}],"max-block-size":[{"max-block":["none",...Ae()]}],w:[{w:[b,"screen",...W()]}],"min-w":[{"min-w":[b,"screen","none",...W()]}],"max-w":[{"max-w":[b,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",i,jc,xo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,WX,FX]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sg,Re]}],"font-family":[{font:[YX,QX,n]}],"font-features":[{"font-features":[Re]}],"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:[u,De,Re]}],"line-clamp":[{"line-clamp":[st,"none",De,ck]}],leading:[{leading:[h,...Z()]}],"list-image":[{"list-image":["none",De,Re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",De,Re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:se()}],"text-color":[{text:se()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[..._e(),"wavy"]}],"text-decoration-thickness":[{decoration:[st,"from-font","auto",De,xo]}],"text-decoration-color":[{decoration:se()}],"underline-offset":[{"underline-offset":[st,"auto",De,Re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",De,Re]}],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",De,Re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Se()}],"bg-repeat":[{bg:Me()}],"bg-size":[{bg:xe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cs,De,Re],radial:["",De,Re],conic:[Cs,De,Re]},JX,ZX]}],"bg-color":[{bg:se()}],"gradient-from-pos":[{from:pe()}],"gradient-via-pos":[{via:pe()}],"gradient-to-pos":[{to:pe()}],"gradient-from":[{from:se()}],"gradient-via":[{via:se()}],"gradient-to":[{to:se()}],rounded:[{rounded:ce()}],"rounded-s":[{"rounded-s":ce()}],"rounded-e":[{"rounded-e":ce()}],"rounded-t":[{"rounded-t":ce()}],"rounded-r":[{"rounded-r":ce()}],"rounded-b":[{"rounded-b":ce()}],"rounded-l":[{"rounded-l":ce()}],"rounded-ss":[{"rounded-ss":ce()}],"rounded-se":[{"rounded-se":ce()}],"rounded-ee":[{"rounded-ee":ce()}],"rounded-es":[{"rounded-es":ce()}],"rounded-tl":[{"rounded-tl":ce()}],"rounded-tr":[{"rounded-tr":ce()}],"rounded-br":[{"rounded-br":ce()}],"rounded-bl":[{"rounded-bl":ce()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[..._e(),"hidden","none"]}],"divide-style":[{divide:[..._e(),"hidden","none"]}],"border-color":[{border:se()}],"border-color-x":[{"border-x":se()}],"border-color-y":[{"border-y":se()}],"border-color-s":[{"border-s":se()}],"border-color-e":[{"border-e":se()}],"border-color-bs":[{"border-bs":se()}],"border-color-be":[{"border-be":se()}],"border-color-t":[{"border-t":se()}],"border-color-r":[{"border-r":se()}],"border-color-b":[{"border-b":se()}],"border-color-l":[{"border-l":se()}],"divide-color":[{divide:se()}],"outline-style":[{outline:[..._e(),"none","hidden"]}],"outline-offset":[{"outline-offset":[st,De,Re]}],"outline-w":[{outline:["",st,jc,xo]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",S,Vd,Ud]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",j,Vd,Ud]}],"inset-shadow-color":[{"inset-shadow":se()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:se()}],"ring-offset-w":[{"ring-offset":[st,xo]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",C,Vd,Ud]}],"text-shadow-color":[{"text-shadow":se()}],opacity:[{opacity:[st,De,Re]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ze()}],"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":[st]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":se()}],"mask-image-linear-to-color":[{"mask-linear-to":se()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":se()}],"mask-image-t-to-color":[{"mask-t-to":se()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":se()}],"mask-image-r-to-color":[{"mask-r-to":se()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":se()}],"mask-image-b-to-color":[{"mask-b-to":se()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":se()}],"mask-image-l-to-color":[{"mask-l-to":se()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":se()}],"mask-image-x-to-color":[{"mask-x-to":se()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":se()}],"mask-image-y-to-color":[{"mask-y-to":se()}],"mask-image-radial":[{"mask-radial":[De,Re]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":se()}],"mask-image-radial-to-color":[{"mask-radial-to":se()}],"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":$()}],"mask-image-conic-pos":[{"mask-conic":[st]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":se()}],"mask-image-conic-to-color":[{"mask-conic-to":se()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Se()}],"mask-repeat":[{mask:Me()}],"mask-size":[{mask:xe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",De,Re]}],filter:[{filter:["","none",De,Re]}],blur:[{blur:Ct()}],brightness:[{brightness:[st,De,Re]}],contrast:[{contrast:[st,De,Re]}],"drop-shadow":[{"drop-shadow":["","none",T,Vd,Ud]}],"drop-shadow-color":[{"drop-shadow":se()}],grayscale:[{grayscale:["",st,De,Re]}],"hue-rotate":[{"hue-rotate":[st,De,Re]}],invert:[{invert:["",st,De,Re]}],saturate:[{saturate:[st,De,Re]}],sepia:[{sepia:["",st,De,Re]}],"backdrop-filter":[{"backdrop-filter":["","none",De,Re]}],"backdrop-blur":[{"backdrop-blur":Ct()}],"backdrop-brightness":[{"backdrop-brightness":[st,De,Re]}],"backdrop-contrast":[{"backdrop-contrast":[st,De,Re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",st,De,Re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[st,De,Re]}],"backdrop-invert":[{"backdrop-invert":["",st,De,Re]}],"backdrop-opacity":[{"backdrop-opacity":[st,De,Re]}],"backdrop-saturate":[{"backdrop-saturate":[st,De,Re]}],"backdrop-sepia":[{"backdrop-sepia":["",st,De,Re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Z()}],"border-spacing-x":[{"border-spacing-x":Z()}],"border-spacing-y":[{"border-spacing-y":Z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",De,Re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[st,"initial",De,Re]}],ease:[{ease:["linear","initial",P,De,Re]}],delay:[{delay:[st,De,Re]}],animate:[{animate:["none",M,De,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[q,De,Re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Be()}],"scale-x":[{"scale-x":Be()}],"scale-y":[{"scale-y":Be()}],"scale-z":[{"scale-z":Be()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[De,Re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:se()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:se()}],"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",De,Re]}],"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":Z()}],"scroll-mx":[{"scroll-mx":Z()}],"scroll-my":[{"scroll-my":Z()}],"scroll-ms":[{"scroll-ms":Z()}],"scroll-me":[{"scroll-me":Z()}],"scroll-mbs":[{"scroll-mbs":Z()}],"scroll-mbe":[{"scroll-mbe":Z()}],"scroll-mt":[{"scroll-mt":Z()}],"scroll-mr":[{"scroll-mr":Z()}],"scroll-mb":[{"scroll-mb":Z()}],"scroll-ml":[{"scroll-ml":Z()}],"scroll-p":[{"scroll-p":Z()}],"scroll-px":[{"scroll-px":Z()}],"scroll-py":[{"scroll-py":Z()}],"scroll-ps":[{"scroll-ps":Z()}],"scroll-pe":[{"scroll-pe":Z()}],"scroll-pbs":[{"scroll-pbs":Z()}],"scroll-pbe":[{"scroll-pbe":Z()}],"scroll-pt":[{"scroll-pt":Z()}],"scroll-pr":[{"scroll-pr":Z()}],"scroll-pb":[{"scroll-pb":Z()}],"scroll-pl":[{"scroll-pl":Z()}],"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",De,Re]}],fill:[{fill:["none",...se()]}],"stroke-w":[{stroke:[st,jc,xo,ck]}],stroke:[{stroke:["none",...se()]}],"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"]}},nJ=IX(tJ);function Oa(...e){return nJ(ej(e))}const aJ=l4("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"}}),le=_.forwardRef(({className:e,variant:n,size:i,asChild:r=!1,...u},h)=>{const f=r?c6:"button";return l.jsx(f,{ref:h,className:Oa(aJ({variant:n,size:i,className:e})),...u})});le.displayName="Button";const iJ=l4("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 k4({className:e,variant:n,...i}){return l.jsx("div",{className:Oa(iJ({variant:n}),e),...i})}const sJ=220;function mk({compact:e=!1,version:n,updateAvailable:i,onDismissUpdate:r}){const u=!e&&n&&n!=="unknown",[h,f]=_.useState(!1),b=!e&&i&&r,v=()=>{f(!0),window.setTimeout(()=>{r?.(),f(!1)},sJ)};return e?l.jsxs(at,{to:"/",className:"brand-lockup brand-lockup-compact","aria-label":"Canonry home",children:[l.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"}),l.jsx("span",{className:"brand-copy",children:l.jsx("span",{className:"brand-mark",children:"Canonry"})})]}):l.jsxs("div",{className:"brand-lockup brand-lockup-wrapper",children:[l.jsx(at,{to:"/",className:"brand-icon-link","aria-label":"Canonry home",tabIndex:-1,children:l.jsx("img",{className:"brand-icon",src:"./favicon.svg",alt:"","aria-hidden":"true"})}),l.jsxs("div",{className:"brand-copy",children:[l.jsx(at,{to:"/",className:"brand-mark",children:"Canonry"}),!b&&u?l.jsxs("span",{className:"brand-version",children:["v",n]}):null]}),b?l.jsxs("span",{className:`brand-update-bubble ${h?"brand-update-bubble-closing":""}`,role:"status","aria-live":"polite",children:[l.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:[l.jsxs("span",{className:"brand-update-bubble-from",children:["v",i.current]}),l.jsx(qc,{className:"brand-update-bubble-arrow size-3","aria-hidden":"true"}),l.jsxs("span",{className:"brand-update-bubble-to",children:["v",i.latest]})]}),l.jsx("button",{type:"button",className:"brand-update-bubble-dismiss",onClick:v,"aria-label":`Dismiss update notification for v${i.latest}`,children:l.jsx(Wr,{className:"size-3","aria-hidden":"true"})})]}):null]})}function oJ({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",muse:"border-indigo-800/50 bg-indigo-950/40 text-indigo-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 l.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${r}`,children:e})}function Sn({tone:e,children:n,...i}){const r=e==="positive"?"success":e==="caution"?"warning":e==="negative"?"destructive":"neutral";return l.jsx(k4,{variant:r,...i,children:n})}function uy({status:e}){return l.jsx(Sn,{tone:i4(e),children:eZ(e)})}const Wg=Wk,rJ=Yk,j4=_.forwardRef(({className:e,...n},i)=>l.jsx(m0,{ref:i,className:Oa("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));j4.displayName=m0.displayName;const lJ=400,cJ=1200,uJ=720,Nm=_.forwardRef(({className:e,children:n,...i},r)=>{const[u,h]=_.useState(uJ),f=_.useRef(!1),b=_.useRef(0),v=_.useRef(0),x=_.useCallback(C=>{f.current=!0,b.current=C.clientX,v.current=u,C.target.setPointerCapture(C.pointerId),C.preventDefault()},[u]),S=_.useCallback(C=>{if(!f.current)return;const T=b.current-C.clientX,z=Math.min(cJ,Math.max(lJ,v.current+T));h(z)},[]),j=_.useCallback(()=>{f.current=!1},[]);return l.jsxs(rJ,{children:[l.jsx(j4,{}),l.jsxs(p0,{ref:r,className:Oa("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(${u}px, 100vw)`},...i,children:[l.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:x,onPointerMove:S,onPointerUp:j}),n,l.jsxs(Xk,{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:[l.jsx(Wr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Nm.displayName=p0.displayName;const e0=({className:e,...n})=>l.jsx("div",{className:Oa("flex flex-col gap-1.5 pr-10",e),...n}),Cm=_.forwardRef(({className:e,...n},i)=>l.jsx(h0,{ref:i,className:Oa("text-lg font-medium text-primary",e),...n}));Cm.displayName=h0.displayName;const _m=_.forwardRef(({className:e,...n},i)=>l.jsx(Jk,{ref:i,className:Oa("text-sm text-muted",e),...n}));_m.displayName=Jk.displayName;function $d({title:e,subtitle:n,children:i,open:r,onClose:u}){return l.jsx(Wg,{open:r,onOpenChange:h=>h?void 0:u(),children:l.jsxs(Nm,{children:[l.jsxs(e0,{className:"drawer-head",children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),l.jsx(Cm,{id:"drawer-title",children:e}),l.jsx(_m,{className:"sr-only",children:n})]}),l.jsx("div",{className:"drawer-body",children:i})]})})}function ma({text:e,placement:n="top"}){const[i,r]=_.useState(null),u=_.useRef(null),h=_.useRef(null),f=_.useRef(!1),b=_.useCallback(()=>{if(!u.current)return;const S=u.current.getBoundingClientRect(),j=S.left+S.width/2,C=Math.min(224,window.innerWidth-16)/2;r({top:n==="bottom"?S.bottom:S.top,left:n==="bottom"?Math.max(C+8,Math.min(j,window.innerWidth-C-8)):j})},[n]);_.useLayoutEffect(()=>{if(n!=="bottom"||!i||!h.current)return;const S=h.current.getBoundingClientRect().bottom-window.innerHeight+8;if(S<=0)return;const j=Math.max(0,i.top-S);j!==i.top&&r({...i,top:j})},[n,i]);const v=_.useCallback(()=>r(null),[]),x=_.useCallback(()=>{i===null?b():v()},[i,b,v]);return l.jsxs("span",{className:"info-tooltip-wrapper",onMouseEnter:b,onMouseLeave:v,children:[l.jsx("button",{ref:u,type:"button",className:"info-tooltip-trigger","aria-label":e,"aria-expanded":i!==null,onFocus:b,onBlur:v,onPointerDown:()=>{f.current=i!==null&&u.current?.ownerDocument.activeElement===u.current},onClick:S=>{S.detail===0?x():f.current?v():b()},onKeyDown:S=>{S.key==="Escape"&&v()},children:l.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),i!==null&&n6.createPortal(l.jsx("span",{ref:h,"aria-hidden":"true",style:{position:"fixed",top:i.top,left:i.left,transform:n==="bottom"?"translateX(-50%) translateY(8px)":"translateX(-50%) translateY(calc(-100% - 8px))",zIndex:9999,pointerEvents:"none",width:n==="bottom"?"min(14rem, calc(100vw - 1rem))":"14rem",padding:"0.5rem 0.75rem",fontSize:n==="bottom"?"13px":"11px",fontWeight:400,textTransform:"none",letterSpacing:"normal",lineHeight:n==="bottom"?"18px":"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)]})}function dJ(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function t0({url:e,title:n}){const i=dJ(e),r=i&&/^https?:\/\//i.test(i)?i:null;return l.jsxs("span",{className:"block min-w-0 text-sm leading-6 [overflow-wrap:anywhere]",children:[n&&n!==e?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"mb-1 block font-medium text-heading",children:n})," "]}):null,r?l.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"text-link underline underline-offset-2 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:e}):l.jsx("span",{className:"text-secondary",children:e})]})}function mJ(e){return[...e.mentionedCompetitorTerms??(e.mentionedCompetitorDomains??[]).flatMap(i=>{const r=E0(i);return r.length>=4?[r]:[]}),...e.recommendedCompetitors??[]].filter(i=>i.trim().length>2)}const pJ=/[\s\-_]+/;function hJ(e){const n=e.split(pJ).filter(Boolean);return n.length===0?null:n.map(yV).join("[\\s\\-_]*")}function pk(e,n){const i=fJ(n),r=e.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(x=>x.startsWith("**")&&x.endsWith("**")?{type:"bold",value:x.slice(2,-2)}:{type:"text",value:x}),u=i.flatMap(x=>x.terms).filter(x=>x.trim().length>1);if(u.length===0)return r.map((x,S)=>x.type==="bold"?Ir.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},x.value):x.value).filter(Boolean);const f=[...u].sort((x,S)=>S.length-x.length).map(hJ).filter(x=>!!x);if(f.length===0)return r.map((x,S)=>x.type==="bold"?Ir.createElement("strong",{key:`b-${S}`,className:"text-strong font-semibold"},x.value):x.value).filter(Boolean);const b=new RegExp(`(${f.join("|")})`,"gi"),v=new Map;for(const x of i)for(const S of x.terms){const j=za(S);j&&!v.has(j)&&v.set(j,x.className)}return r.flatMap((x,S)=>x.value.split(b).map((C,T)=>{if(!C)return null;if(T%2===1){const q=v.get(za(C))??"answer-highlight";return x.type==="bold"?Ir.createElement("mark",{key:`hl-${S}-${T}`,className:q},Ir.createElement("strong",{className:"text-strong font-semibold"},C)):Ir.createElement("mark",{key:`hl-${S}-${T}`,className:q},C)}return x.type==="bold"?Ir.createElement("strong",{key:`b-${S}-${T}`,className:"text-strong font-semibold"},C):C})).filter(Boolean)}function fJ(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function og(e,n){const i=e.mentionedCompetitorDomains!==void 0?e:n,r=i?.mentionedCompetitorTerms;return{citedCompetitorDomains:[...e.citedCompetitorDomains??n?.citedCompetitorDomains??[]],mentionedCompetitorDomains:[...i?.mentionedCompetitorDomains??[]],...r!==void 0?{mentionedCompetitorTerms:[...r]}:{}}}function rg(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 gJ({evidence:e,project:n,onClose:i}){const[r,u]=_.useState(!1),[h,f]=_.useState("mentions"),[b,v]=_.useState(-1),[x,S]=_.useState(null),[j,C]=_.useState(!1),[T,z]=_.useState({}),q=O3(n.project),R=new Set(q.map(Lc)),P=e.runHistory,M=P.length>1,[L,$]=_.useState(null),Q=_.useRef(!1);_.useEffect(()=>{if(Q.current||e.answerSnippet&&(e.visibilityState!=null||e.answerMentioned!=null))return;const pe=P.at(-1);pe&&(Q.current=!0,Gg(pe.runId).then(ce=>{const ue=ce.snapshots?.find(_e=>_e.query===e.query&&_e.provider===e.provider);ue&&$({citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:pe.visibilityTransition,provider:ue.provider,model:ue.model??e.model,answerSnippet:ue.answerText??e.answerSnippet,citedDomains:ue.citedDomains??e.citedDomains,...og(ue,e),recommendedCompetitors:ue.recommendedCompetitors??e.recommendedCompetitors??[],matchedTerms:ue.matchedTerms??e.matchedTerms??[],groundingSources:ue.groundingSources??e.groundingSources,searchQueries:ue.searchQueries,evidenceUrls:ue.citedUrls??[],changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary})}).catch(()=>{}))},[e,P]);const ae=b>=0&&x!==null,V=ae?x:L||{citationState:e.citationState,answerMentioned:e.answerMentioned,visibilityState:e.visibilityState,visibilityTransition:P.at(-1)?.visibilityTransition,provider:e.provider,model:e.model,answerSnippet:e.answerSnippet,citedDomains:e.citedDomains,...og(e),recommendedCompetitors:e.recommendedCompetitors??[],matchedTerms:e.matchedTerms??[],groundingSources:e.groundingSources,searchQueries:e.searchQueries??[],evidenceUrls:e.evidenceUrls,changeLabel:e.visibilityChangeLabel??e.changeLabel,summary:e.summary},Z=V.visibilityState==="pending"||V.citationState==="pending",X=Z?!1:V.visibilityState!=null?V.visibilityState==="visible":V.answerMentioned!=null?V.answerMentioned:V.citationState===Ec.cited||V.citationState==="emerging",Ce=V.answerMentioned!=null||V.visibilityState!=null||V.mentionedCompetitorDomains.length>0||V.recommendedCompetitors.length>0,tt=V.citedDomains.length>0||V.citedCompetitorDomains.length>0||V.groundingSources.length>0||V.evidenceUrls.length>0,Ge=n.project.displayName||n.project.name,Ve=[...q.map(Lc),Ge,Ge.split(" ").slice(0,2).join(" "),...V.matchedTerms].filter(pe=>pe.trim().length>2),ke=mJ(V),Le=[{terms:Ve,className:"answer-highlight-brand"},...ke.length>0?[{terms:ke,className:"answer-highlight-competitor"}]:[]],B=Z?"pending":V.visibilityTransition==="lost"?"lost":X?"mentioned":"not-mentioned",W=_.useRef(0),ve=_.useCallback(async pe=>{const ce=++W.current;if(pe===-1||pe===P.length-1){v(-1),S(null),u(!1);return}v(pe),u(!1);const ue=P[pe],_e=`${ue.runId}::${e.query}::${e.provider}`;if(T[_e]){S(T[_e]);return}C(!0);try{const Ze=await Gg(ue.runId);if(ce!==W.current)return;const Ee=Ze.snapshots?.find(me=>me.query===e.query&&me.provider===e.provider)??Ze.snapshots?.find(me=>me.query===e.query),Ct=Ee?{citationState:Ee.citationState,answerMentioned:Ee.answerMentioned,visibilityState:Ee.visibilityState,visibilityTransition:ue.visibilityTransition,provider:Ee.provider,model:Ee.model??null,answerSnippet:Ee.answerText??"",citedDomains:Ee.citedDomains,...og(Ee),recommendedCompetitors:Ee.recommendedCompetitors??[],matchedTerms:Ee.matchedTerms??[],groundingSources:Ee.groundingSources,searchQueries:Ee.searchQueries,evidenceUrls:Ee.citedUrls??[],changeLabel:rg(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:""}:{citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:ue.visibilityTransition,provider:e.provider,model:ue.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:rg(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:"Snapshot data not available for this run."};z(me=>({...me,[_e]:Ct})),S(Ct)}catch{if(ce!==W.current)return;S({citationState:ue.citationState,answerMentioned:ue.answerMentioned,visibilityState:ue.visibilityState,visibilityTransition:ue.visibilityTransition,provider:e.provider,model:ue.model??null,answerSnippet:"",citedDomains:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],recommendedCompetitors:[],matchedTerms:[],groundingSources:[],searchQueries:[],evidenceUrls:[],changeLabel:rg(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:"Failed to load historical run data."})}finally{ce===W.current&&C(!1)}},[P,e.query,e.provider,T]),se=(ae||e.historyScope!=="provider")&&V.model?`${V.provider} (${V.model}) · ${V.changeLabel.toLowerCase()}`:`${V.provider} · ${V.changeLabel.toLowerCase()}`,Se=!ae&&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(" · "):"",Me=X?{label:"Mentioned in answer",title:"Your brand or domain is mentioned in this answer",meta:se}:V.visibilityTransition==="lost"?{label:"Mention lost",title:"Your brand no longer appears in this answer",meta:se}:Z?{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:se},xe=()=>{if(!V.answerSnippet)return null;const pe=V.answerSnippet.split(`
58
+ `),ce=[];let ue=[],_e=0;const Ze=()=>{if(ue.length===0)return;const Ee=ue.join(" ").trim();Ee&&ce.push(l.jsx("p",{className:ce.length>0?"mt-2.5":"",children:pk(Ee,Le)},_e++)),ue=[]};for(const Ee of pe){const Ct=Ee.trim();if(/^[-\u2013\u2014]{3,}$/.test(Ct)){Ze(),ce.push(l.jsx("hr",{className:"border-default my-3"},_e++));continue}const me=Ct.match(/^(#{1,3})\s+(\S.*)$/);if(me){Ze();const Be=me[1].length,Ne=me[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s]+/u,"").trim()||me[2],re=Be===1?"text-[13px] font-semibold text-heading mt-4 mb-1":Be===2?"text-xs font-semibold text-strong mt-3 mb-0.5":"text-xs font-medium text-neutral mt-2";ce.push(l.jsx("p",{className:re,children:pk(Ne,Le)},_e++));continue}if(Ct===""){Ze();continue}ue.push(Ct)}return Ze(),ce};return l.jsx(Wk,{open:!0,onOpenChange:pe=>{pe||i()},children:l.jsxs(Yk,{children:[l.jsx(m0,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),l.jsxs(p0,{className:"evidence-modal","aria-describedby":void 0,children:[l.jsxs("div",{className:"evidence-modal-header",children:[l.jsxs("div",{className:"min-w-0 flex-1",children:[l.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," ","·"," ",V.provider||"All providers"]}),l.jsx(h0,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),l.jsxs(Xk,{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:[l.jsx(Wr,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}),M&&l.jsxs("div",{className:"evidence-modal-timeline",children:[l.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),l.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:P.map((pe,ce)=>{const ue=b===-1&&ce===P.length-1||b===ce,_e=pe.visibilityState??(pe.answerMentioned?"visible":"not-visible"),Ze=pe.visibilityTransition??_e,Ee=_e==="visible"?"bg-positive-400":Ze==="emerging"?"bg-caution-400":Ze==="lost"?"bg-negative-400":"bg-mono-600",me=new Date(pe.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"}),Be=!!(pe.model&&ce>0&&P[ce-1]?.model&&P[ce-1].model!==pe.model);return l.jsxs("button",{type:"button",className:`evidence-run-dot ${ue?"evidence-run-dot--selected":""}`,onClick:()=>{ve(ce===P.length-1?-1:ce)},"aria-label":[`Run ${me}: ${_e}`,pe.model?`model ${pe.model}`:null,Be?"model changed":null].filter(Boolean).join(" — "),"aria-pressed":ue,children:[l.jsx("span",{className:`size-2 rounded-full ${Ee} ${Be?"ring-1 ring-caution-300/80 ring-offset-2 ring-offset-bg":""}`,"aria-hidden":"true"}),l.jsx("span",{className:"text-[10px] text-muted",children:me})]},ce)})}),b>=0&&b<P.length&&l.jsxs("p",{className:"text-[11px] text-muted mt-1",children:["Viewing run from ",new Date(P[b].createdAt).toLocaleString()," ","—"," ",l.jsx("span",{className:"capitalize",children:P[b].visibilityState??(P[b].answerMentioned?"visible":"not-visible")}),l.jsxs("button",{type:"button",className:"text-secondary hover:text-strong ml-2",onClick:()=>{ve(-1)},children:["←"," Back to latest"]})]}),!ae&&(e.modelTransitions?.length??0)>0&&l.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:e.modelTransitions.map(pe=>l.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:`${pe.fromModel??"unknown"} -> ${pe.toModel??"unknown"} on ${new Date(pe.createdAt).toLocaleDateString()}`},`${pe.runId}:${pe.toModel??"unknown"}`))})]}),l.jsxs("div",{className:"evidence-modal-body",children:[j&&l.jsxs("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-muted text-sm",children:["Loading historical run data","…"]}),!j&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:"evidence-modal-main",children:[l.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${B}`,children:[l.jsx("p",{className:`evidence-position-label evidence-position-label--${B}`,children:Me.label}),l.jsx("p",{className:`evidence-position-title evidence-position-title--${B}`,children:Me.title}),l.jsx("p",{className:"evidence-position-meta",children:Me.meta}),Se&&l.jsx("p",{className:"mt-1 text-[11px] text-muted",children:Se})]}),V.answerSnippet&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),l.jsx("div",{className:`answer-snippet-block ${r?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:xe()}),V.answerSnippet.length>280&&l.jsx("button",{type:"button",className:"mt-1.5 text-xs text-muted hover:text-neutral transition-colors",onClick:()=>u(!r),children:r?"↑ Collapse":"↓ Show full answer"})]}),!V.answerSnippet&&!j&&l.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"}),V.searchQueries.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Web searches the model ran"}),l.jsx(ma,{text:"The search queries this AI model issued while researching your prompt. They reveal how the model reformulated your query — the phrasings worth optimizing your content for. Distinct from grounding sources (what it found) and citations (what it linked)."})]}),l.jsx("ul",{className:"grid gap-1",children:V.searchQueries.map((pe,ce)=>l.jsxs("li",{className:"flex items-start gap-2 text-sm text-neutral",children:[l.jsx(f0,{className:"size-3.5 mt-0.5 shrink-0 text-faint","aria-hidden":"true"}),l.jsx("span",{className:"break-words",children:pe})]},`${ce}-${pe}`))})]}),!ae&&e.relatedTechnicalSignals.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:X?"Why you're visible":"What to fix"}),l.jsx("div",{className:"action-items-list",children:e.relatedTechnicalSignals.map((pe,ce)=>l.jsxs("div",{className:"action-item",children:[l.jsx("svg",{className:`action-item-icon ${X?"text-positive-400":"text-caution-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:X?l.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):l.jsxs(l.Fragment,{children:[l.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),l.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),l.jsx("span",{className:"action-item-text",children:pe})]},ce))})]}),V.summary&&l.jsx("p",{className:"text-xs text-faint border-t border-subtle pt-3 mt-1",children:V.summary})]}),l.jsxs("div",{className:"evidence-modal-sidebar",children:[(Ce||tt)&&l.jsxs("div",{className:"sidebar-tabs",children:[l.jsx("button",{className:`sidebar-tab ${h==="mentions"?"sidebar-tab--active":""}`,onClick:()=>f("mentions"),type:"button",title:"Canonry's answer-level visibility assessment and any company names extracted from the answer text.",children:"Mentions"}),l.jsx("button",{className:`sidebar-tab ${h==="sources"?"sidebar-tab--active":""}`,onClick:()=>f("sources"),type:"button",title:"Grounding links the model used to build the answer. These are supporting sources, not the primary visibility signal.",children:"Sources"})]}),h==="mentions"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Mention in answer"}),l.jsx(ma,{text:"Canonry scans the AI answer for your owned domains and project name. This is independent from grounding or citation sources."})]}),l.jsxs("div",{className:`mention-status mention-status--${X?"mentioned":"not-mentioned"}`,children:[l.jsx("span",{className:"mention-status-icon",children:Z?"…":X?"✓":"—"}),l.jsx("span",{className:"mention-status-label",children:Z?"Pending":X?"Mentioned":"Not mentioned"})]}),V.matchedTerms.length>0&&l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Matched in answer"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:V.matchedTerms.map(pe=>l.jsx("span",{className:"mention-chip mention-chip--brand",children:pe},pe))})]}),!Z&&!X&&V.matchedTerms.length===0&&l.jsxs("div",{className:"mt-2",children:[l.jsx("p",{className:"text-[10px] uppercase tracking-wide text-muted mb-1.5",children:"Searched for"}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:Ve.map(pe=>l.jsx("span",{className:"mention-chip mention-chip--muted",children:pe},pe))}),l.jsx("p",{className:"text-[11px] text-faint mt-1.5",children:"None of these appear in the answer text."})]})]}),(V.recommendedCompetitors.length>0||V.mentionedCompetitorDomains.length>0)&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Competitors in answer"}),l.jsx(ma,{text:"Competitors detected in the answer text. Includes tracked competitor brands and names extracted by Canonry; source-link competitors stay in the Sources tab."})]}),l.jsx("div",{className:"flex flex-wrap gap-1.5",children:(()=>{const pe=V.mentionedCompetitorDomains.map(_e=>_e.replace(/^www\./,"")),ce=new Set(pe.map(_e=>za(_e.replace(/\.[^.]+$/,""))));return[...V.recommendedCompetitors.filter(_e=>!ce.has(za(_e))),...pe].map(_e=>l.jsx("span",{className:"mention-chip mention-chip--competitor",children:_e},_e))})()})]})]}),h==="sources"&&l.jsxs(l.Fragment,{children:[V.citedDomains.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsx("span",{children:"Domains from source links"}),l.jsx(ma,{text:"These domains were extracted from grounding or citation URLs. They are supporting-source metadata, not proof that the answer text mentioned them."})]}),l.jsx("div",{className:"citation-leaderboard",children:V.citedDomains.map((pe,ce)=>{const ue=pe.toLowerCase().replace(/^www\./,""),_e=R.has(ue),Ze=!_e&&V.citedCompetitorDomains.some(Ct=>Ct.toLowerCase().replace(/^www\./,"")===ue),Ee=_e?"you":Ze?"competitor":"other";return l.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${Ee}`,children:[l.jsxs("span",{className:"citation-leaderboard-rank",children:["#",ce+1]}),l.jsx("span",{className:"citation-leaderboard-domain",children:pe}),_e&&l.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),Ze&&l.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},pe)})})]}),V.groundingSources.length>0&&l.jsxs("div",{children:[l.jsxs("div",{className:"drawer-section-label flex items-center",children:[l.jsxs("span",{children:["Grounding source links (",V.groundingSources.length,")"]}),l.jsx(ma,{text:"Links the model used as grounding or supporting context while producing the answer. These are not the same thing as answer visibility."})]}),l.jsx("ul",{className:"grid min-w-0 gap-3",children:V.groundingSources.map((pe,ce)=>l.jsx("li",{className:"min-w-0",children:l.jsx(t0,{url:pe.uri,title:pe.title})},ce))})]}),V.evidenceUrls.length>0&&l.jsxs("div",{children:[l.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),l.jsx("ul",{className:"grid min-w-0 gap-3",children:V.evidenceUrls.map(pe=>l.jsx("li",{className:"min-w-0",children:l.jsx(t0,{url:pe})},pe))})]}),V.citedDomains.length===0&&V.groundingSources.length===0&&V.evidenceUrls.length===0&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No source data ",ae?"for this run":"yet"]})]}),!Ce&&!tt&&l.jsxs("div",{className:"flex items-center justify-center h-24 text-faint text-sm",children:["No answer visibility data ",ae?"for this run":"yet"]})]})]})]})]})]})})}function yJ(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function bJ(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function vJ(e,n){return bJ(yJ(e),n)}function Ka(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 lg=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:zf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["lead gen"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:zf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],aliases:[],qualifiedAliases:[],country:"US",language:"en",tags:["multi-location"],labels:{},providers:[],providerModels:{},providerDispatchModes:{},measurement:zf,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1}];function dp(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 hk=dp({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:"6 minutes 12 seconds",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),xJ=dp({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",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),fk=dp({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:"5 minutes 7 seconds",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),wJ=dp({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:"Running",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),SJ=[{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:Ka(["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:Ka(["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:Ka(["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:Ka(["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:Ka(["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:Ka(["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:Ka(["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:Ka(["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:Ka(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];lg[0],9/21,8/21,4/21,lg[1],11/17,6/17,Ka(["cited","cited","cited","cited","cited"]),lg[2],15/19,4/19,Ka(["not-cited","not-cited","not-cited","cited"]);function kJ(e,n){return e.runs.find(i=>i.id===n)}function jJ(e,n){for(const i of e.projects){const r=i.visibilityEvidence.find(u=>u.id===n);if(r)return{project:i,evidence:r}}}function AJ(e,n,i){if(e){const r=e.visibilityEvidence.find(u=>u.id===i);if(r)return{project:e,evidence:r}}if(n)return jJ(n,i)}const NJ={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"},CJ={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"},_J={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"},TJ={regression:!0,gain:!0,opportunity:!0,"first-citation":!0,"provider-pickup":!0,"persistent-gap":!0,"competitor-gained":!1,"competitor-lost":!1,"gbp-lodging-gap":!1,"gbp-listing-discrepancy":!1,"gbp-cta-gap":!1,"gbp-description-missing":!1,"gbp-metric-drop":!1,"gbp-keyword-drop":!1},EJ={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 RJ(e){return{id:e.id,tone:NJ[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??EJ[e.type],actionGroup:CJ[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:_J[e.type],siteCitation:TJ[e.type]}]}}function DJ(e){return e.filter(n=>!n.dismissed).map(RJ)}function A4(e){return{id:e.id,name:e.name,displayName:e.displayName,canonicalDomain:e.canonicalDomain,ownedDomains:e.ownedDomains??[],aliases:e.aliases??[],qualifiedAliases:e.qualifiedAliases,country:e.country,language:e.language,tags:e.tags,labels:e.labels,providers:e.providers??[],providerModels:e.providerModels??{},providerDispatchModes:e.providerDispatchModes??{},measurement:e.measurement,locations:e.locations??[],defaultLocation:e.defaultLocation??null,autoExtractBacklinks:e.autoExtractBacklinks??!1,siteAuditMaxPages:e.siteAuditMaxPages??null,configSource:e.configSource,configRevision:e.configRevision,createdAt:e.createdAt,updatedAt:e.updatedAt}}function wo(e,n){return`${e} ${n}${e===1?"":"s"}`}function zJ(e,n){if(!e)return"Waiting";if(!n)return"Running";const i=new Date(n).getTime()-new Date(e).getTime();if(i<1e3)return"under 1 second";const r=Math.floor(i/1e3),u=Math.floor(r/3600),h=Math.floor(r%3600/60),f=r%60;return u>0?h>0?`${wo(u,"hour")} ${wo(h,"minute")}`:wo(u,"hour"):h>0?f>0?`${wo(h,"minute")} ${wo(f,"second")}`:wo(h,"minute"):wo(f,"second")}function N4(e){switch(e){case Oe["answer-visibility"]:return"Answer visibility sweep";case Oe["gsc-sync"]:return"GSC sync";case Oe["inspect-sitemap"]:return"Sitemap inspection";case Oe["ga-sync"]:return"GA sync";case Oe["traffic-sync"]:return"Traffic sync";case Oe["bing-inspect"]:return"Bing URL inspection";case Oe["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Oe["site-audit"]:return"Site audit";case Oe["backlink-extract"]:return"Backlink extract";case Oe["aeo-discover-seed"]:return"Discovery (seed phase)";case Oe["aeo-discover-probe"]:return"Discovery (probe phase)";case Oe["gbp-sync"]:return"Business Profile sync";case Oe["ads-sync"]:return"ChatGPT ads sync";case Oe["google-ads-sync"]:return"Google Ads sync";case Oe["gtm-sync"]:return"Tag Manager sync"}}function IJ(e){switch(e){case Ga.manual:return"Manual";case Ga.scheduled:return"Scheduled";case Ga["config-apply"]:return"Config apply";case Ga.probe:return"Spot check";default:return e}}function gu(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:N4(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:tZ(e.startedAt||e.createdAt),duration:zJ(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?C4(e.error):OJ(e),summary:PJ(e),triggerLabel:IJ(e.trigger)}}function C4(e){const n=F0(e);return n.length>200?n.slice(0,200)+"…":n}function OJ(e){switch(e.status){case Nt.queued:return"Waiting for execution slot.";case Nt.running:return"Provider queries in progress.";case Nt.completed:return"All queries checked.";case Nt.partial:return"Run completed with some queries skipped.";case Nt.failed:return e.error?C4(e.error):"Run failed.";case Nt.cancelled:return"Run was cancelled.";default:return""}}function PJ(e){const n=N4(e.kind);switch(e.status){case Nt.queued:return`${n} queued`;case Nt.running:return`${n} in progress`;case Nt.completed:return`${n} completed`;case Nt.partial:return`${n} partially completed`;case Nt.failed:return`${n} failed`;case Nt.cancelled:return`${n} cancelled`;default:return e.status}}function qJ(e,n,i,r,u){const h=[];let f=0;const b=new Set;if(i.length>0){const v=i.flatMap(R=>R.snapshots??[]),x=new Map;for(const R of v)if(R.query){const P=`${R.query}::${R.provider}::${R.location??""}`;x.set(P,R)}const S=new Set(v.map(R=>R.location??null));S.size===0&&S.add(null);const j=new Set(v.map(R=>R.provider)),C=new Set(n.flatMap(R=>Object.keys(R.providerRuns??{}))),T=[...new Set([...j,...C])].sort(),z=T.length>0?T:["gemini"],q=new Set(v.flatMap(R=>R.query?[R.query]:[]));for(const R of n){if(R.runs.length===0&&!q.has(R.query))continue;b.add(R.query);const P=R.runs.at(-1),M=P?.transition??"not-cited";for(const L of z){const $=[...S].filter(V=>x.has(`${R.query}::${L}::${V??""}`)),Q=(R.providerRuns?.[L]?.length??0)>0,ae=$.length>0?$:Q?[null]:[];for(const V of ae){const Z=V??"",X=x.get(`${R.query}::${L}::${Z}`),Ce=X?.model??null,tt=Ce?`${L}:${Ce}`:null,Ge=R.providerRuns?.[L],Ve=tt?R.modelRuns?.[tt]:void 0,ke=Ht=>Ht?.filter($e=>($e.location??null)===V),Le=$.length>0?ke(Ge):Ge,B=$.length>0?ke(Ve):Ve,W=(Le?.length?Le:null)??(B?.length?B:null),ve=Le?.length?"provider":B?.length?"model":"query",Ae=X&&W?W.findIndex(Ht=>Ht.runId===X.runId):-1,se=X?Ae>=0?W.slice(0,Ae+1):null:W,Se=X!==void 0&&se===null,Me=se?se.at(-1).transition:Se?X.citationState===Ec.cited?"cited":"not-cited":M,xe=se?se.at(-1).visibilityTransition??(se.at(-1).visibilityState==="visible"?"visible":"not-visible"):Se?X.visibilityState==="visible"?"visible":"not-visible":P?.visibilityTransition??(P?.visibilityState==="visible"?"visible":"not-visible"),pe=W?.at(-1)?.citationState,ce=W?.at(-1)?.visibilityState,ue=X?Me==="lost"?"lost":Me==="emerging"?"emerging":X.citationState===Ec.cited?"cited":"not-cited":pe===Ec.cited?"cited":"not-cited",_e=X?.visibilityState??(ce==="visible"?"visible":ce==="pending"?"pending":"not-visible"),Ze=se?gk(se):Se?1:gk(R.runs),Ee=se?yk(se):Se?1:yk(R.runs),Ct=MJ(R,L),me=(W??R.runs).map(Ht=>({runId:Ht.runId,citationState:Ht.citationState,createdAt:Ht.createdAt,model:Ct.get(Ht.runId)??null,answerMentioned:Ht.answerMentioned,visibilityState:Ht.visibilityState,visibilityTransition:Ht.visibilityTransition,mentionState:Ht.mentionState,mentionTransition:Ht.mentionTransition})),Be=BJ(me),Ne=ve==="provider"&&Be.length<=1?"model":ve,re=LJ(me),Ye=X?.citedCompetitorDomains??[],vt=X?.mentionedCompetitorDomains??[],Mn=[...new Set([...Ye,...vt,...X?.competitorOverlap??[]])];h.push({id:`evidence_${e}_${f++}`,query:R.query,queryId:X?.queryId??null,sourceSnapshotId:X?.id??null,sourceRunId:X?.runId??null,queryClass:u?.classify(R.query)??null,provider:X?.provider??L,model:X?.model??null,location:X?.location??V,citationState:ue,answerMentioned:X?.answerMentioned,visibilityState:_e,visibilityChangeLabel:bk(xe,Ee,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:bk(Me,Ze),answerSnippet:X?.answerText??"",citedDomains:X?.citedDomains??[],evidenceUrls:X?.citedUrls??[],citedCompetitorDomains:Ye,mentionedCompetitorDomains:vt,mentionedCompetitorTerms:X?.mentionedCompetitorTerms??[],competitorDomains:Mn,recommendedCompetitors:X?.recommendedCompetitors??[],matchedTerms:X?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:X?.groundingSources??[],searchQueries:X?.searchQueries??[],summary:UJ(_e,xe,R.query),runHistory:me,historyScope:Ne,modelsSeen:Be,modelTransitions:re})}}}}for(const v of r)b.has(v.query)||h.push({id:`evidence_${e}_${f++}`,query:v.query,queryId:v.id,sourceSnapshotId:null,sourceRunId:null,queryClass:u?.classify(v.query)??null,provider:"",model:null,location:null,citationState:"pending",visibilityState:"pending",visibilityChangeLabel:"Awaiting first run",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],citedCompetitorDomains:[],mentionedCompetitorDomains:[],mentionedCompetitorTerms:[],competitorDomains:[],recommendedCompetitors:[],matchedTerms:[],relatedTechnicalSignals:[],groundingSources:[],searchQueries:[],summary:`"${v.query}" has been added but no visibility run has been triggered yet.`,runHistory:[],historyScope:"query",modelsSeen:[],modelTransitions:[]});return h}function MJ(e,n){const i=new Map,r=`${n}:`;for(const[u,h]of Object.entries(e.modelRuns??{})){if(!u.startsWith(r))continue;const f=u.slice(r.length),b=f==="unknown"?null:f;for(const v of h)i.set(v.runId,b)}return i}function BJ(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function LJ(e){const n=[];let i=null;for(const r of e){const u=r.model??null;u!==i&&i!==null&&n.push({runId:r.runId,createdAt:r.createdAt,fromModel:i,toModel:u}),i=u}return n}function gk(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 yk(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 bk(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?`${Ac(r.positive)} in latest run`:`${Ac(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return Ac(r.first);case"not-cited":case"not-visible":return n<=1?`${Ac(r.negative)} in latest run`:`${Ac(r.negative)} across ${n} runs`;default:return e}}function Ac(e){return e.charAt(0).toUpperCase()+e.slice(1)}function UJ(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 _4(e){const n=A4(e.project),i=aP(iB(e.project)),r=qJ(n.name,e.timeline,e.latestRunDetails,e.queries,i),h=[...e.runs].sort((f,b)=>b.createdAt.localeCompare(f.createdAt)).map(f=>gu(f,e.project.displayName||e.project.name));return e.overview?VJ(n,e.overview,r,h):$J(n,r,h)}function T4(e){return e.filter(n=>n.kind===Oe["answer-visibility"]&&n.trigger!==Ga.probe&&(n.status===Nt.completed||n.status===Nt.partial))}function VJ(e,n,i,r){const u=DJ(n.topInsights);for(const h of n.attentionItems)h.id.startsWith("insight_")||u.push({id:h.id,tone:h.tone,title:h.title,detail:h.detail,actionLabel:h.actionLabel,actionGroup:"investigate",affectedPhrases:[]});return{project:e,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,movementComparison:n.movementComparison,insights:u,visibilityEvidence:i,competitors:n.competitors.map(h=>({id:h.id,domain:h.domain,aliases:h.aliases??[],autoAliases:h.autoAliasNames??[],citationCount:h.citationCount,totalQueries:h.totalQueries,pressureLabel:h.pressureLabel,citedQueries:h.citedQueries,movement:"",notes:""})),recentRuns:r.slice(0,5),visibilitySweeps:T4(r),suggestedQueries:n.suggestedQueries}}function vk(){return{projectMentionSnapshots:0,competitorMentionSnapshots:0,combinedMentionSnapshots:0,perCompetitor:[],ranking:[],snapshotsWithAnswerText:0,snapshotsTotal:0,score:null}}function $J(e,n,i){const r={label:"",value:"No data",delta:"Loading…",tone:"neutral",description:"",tooltip:"",trend:[]};return{project:e,contextLabel:`${e.country} / ${e.language.toUpperCase()}`,mentionSummary:{...r,label:"Mention Coverage"},visibilitySummary:{...r,label:"Citation Coverage"},mentionShareSummary:{...r,label:"Mention Share",scope:"non-brand",unavailable:!0,breakdown:vk(),branded:vk()},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"},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),visibilitySweeps:T4(i),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function KJ(e){const n=A4(e.project),i=[...e.runs].sort((C,T)=>T.createdAt.localeCompare(C.createdAt)),r=i.find(C=>C.kind===Oe["answer-visibility"])??i[0]??e.overview?.latestRun?.run??void 0,u=e.project.displayName||e.project.name,h=r?gu(r,u):GJ(e.project.id,u),f=e.overview;if(!f)return{project:n,hasMeasurement:!1,mentionScore:0,mentionDelta:"No data",mentionTone:"neutral",lastRun:h,insight:"No runs completed yet.",trend:[],competitorPressureLabel:"None"};const b=f.scores.mention,v=b.progress??0,x=f.queryCounts.mentionedQueries,S=f.queryCounts.totalQueries,j=f.providers.length;return{project:n,hasMeasurement:S>0&&b.progress!=null,mentionScore:v,mentionDelta:S>0?`${x} of ${S} queries`:"No data",mentionTone:b.tone,providerCoverage:b.providerCoverage,lastRun:h,insight:S>0?`${x} of ${S} queries mentioned across ${j} provider${j===1?"":"s"}.`:"No runs completed yet.",trend:b.trend??[],competitorPressureLabel:f.scores.competitorPressure.value,sentiment:f.sentiment}}function GJ(e,n){return{id:"none",projectId:e,projectName:n,kind:Oe["answer-visibility"],kindLabel:"No runs yet",status:Nt.queued,trigger:Ga.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function HJ(e,n){const i=[],r=[],u=[];for(const f of e){r.push(_4(f)),u.push(KJ(f));const b=[...f.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt));for(const v of b)i.push(gu(v,f.project.displayName||f.project.name))}i.sort((f,b)=>b.createdAt.localeCompare(f.createdAt));const h=e.length>0;return{portfolioOverview:{projects:u,attentionItems:h?FJ(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"}],...h?{}:{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:h,ctaLabel:h?"Trigger run":"Create a project first",summary:h?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(f=>({name:f.name,displayName:f.displayName,keyUrl:f.keyUrl,modelHint:f.modelHint,model:f.model,defaultModel:f.defaultModel,state:f.configured?"ready":"needs-config",detail:f.configured?"Provider is configured.":f.name.toLowerCase()==="local"?"Base URL is missing.":"API key is missing.",quota:f.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 FJ(e){const n=[];for(const i of e){const r=i.visibilityEvidence.filter(h=>h.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 u=i.recentRuns.filter(h=>h.status===Nt.running||h.status===Nt.queued);u.length>0&&n.push({id:`attention_${i.project.id}_active`,tone:"neutral",title:`${i.project.displayName||i.project.name} has active runs`,detail:`${u.length} run${u.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 E4=_.createContext(null);E4.Provider;function yu(){return _.useContext(E4)}function mp(e,n={}){const r=yu()?.dashboard??null,u=n.includeSettings??!0,h=n.includeOverviews??!0,f=n.pauseProjectPolling??!1,{isAdmin:b}=ga(),v=!r&&h&&!rp(),x=yt({...Fc({client:J,query:{kind:"answer-visibility"}}),enabled:!r,staleTime:Es,refetchInterval:Q=>Q.state.data?.some(Z=>Z.status==="running"||Z.status==="queued")?3e3:Es}),S=yt({...Fc({client:J,query:{excludeKinds:[Oe["bing-inspect"],Oe["traffic-sync"]],limit:5}}),enabled:v,staleTime:Es,refetchInterval:Q=>Q.state.data?.some(ae=>ae.status===Nt.running||ae.status===Nt.queued)?3e3:Es}),j=yt({...Fo({client:J}),enabled:!r,refetchInterval:f?!1:Q=>{const ae=Q.state.data,V=x.data?.some(X=>X.status==="running"||X.status==="queued");return(ae?.length??0)===0||!!V?KQ:GQ}}),C=yt({...MZ({client:J}),enabled:!r&&u&&b}),T=j.data??[],z=x.data??[],q=a6({queries:T.map(Q=>{const ae=z.filter(X=>X.projectId===Q.id),V=ae.filter(X=>(X.status==="completed"||X.status==="partial")&&X.kind==="answer-visibility"&&X.trigger!=="probe").sort((X,Ce)=>Ce.createdAt.localeCompare(X.createdAt)),Z=V.length>0?V[0].id:"no-run";return{queryKey:["project-overview-slim",Q.id,Z],queryFn:async()=>{const X=await HC(Q.name).catch(()=>null);return{project:Q,runs:ae,queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:X}},enabled:!r&&h&&j.isSuccess&&x.isSuccess,staleTime:Wd}})}),R=!h||q.every(Q=>Q.isSuccess),P=_.useMemo(()=>{if(r)return r;if(!j.data||!x.data||T.length>0&&!R)return null;const Q=new Map(T.map(Z=>[Z.id,Z])),ae=h?q.map(Z=>{if(!Z.data)return null;const X=Q.get(Z.data.project.id);return X?{...Z.data,project:X,runs:z.filter(Ce=>Ce.projectId===X.id)}:null}).filter(Z=>Z!=null):T.map((Z,X)=>{const Ce=q[X]?.data;return{project:Z,runs:z.filter(tt=>tt.projectId===Z.id),queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:Ce?.overview??null}}),V=HJ(ae,C.data??null);return v&&(V.portfolioOverview.recentRuns=(S.data??[]).filter(Z=>Z.trigger!==Ga.probe&&Q.has(Z.projectId)).map(Z=>{const X=Q.get(Z.projectId);return gu(Z,X.displayName||X.name)})),V},[r,j.data,x.data,C.data,h,R,q,T,z,v,S.data]),M=!r&&(j.isError||x.isError),L=!r&&!P&&!M,$=_.useCallback(async()=>{const Q=[j.refetch(),x.refetch(),...v?[S.refetch()]:[],...h?q.map(ae=>ae.refetch()):[]];u&&b&&Q.push(C.refetch()),await Promise.all(Q)},[u,b,h,v,S.refetch,q,j.refetch,x.refetch,C.refetch]);return{dashboard:P,isLoading:L,isError:M,activityLoading:v&&S.isPending,activityError:v&&S.isError,refetch:$}}function QJ(e){return JSON.stringify(e.filter(n=>n.kind==="answer-visibility"&&n.trigger!=="probe"&&(n.status==="completed"||n.status==="partial")).map(n=>[n.id,n.status]).sort(([n],[i])=>n.localeCompare(i)))}async function n0(e,n,i="active"){const r=u=>{const h=u.queryKey[0];return h?._id==="getApiV1ProjectsByNameAnalyticsCompetitors"&&h.path?.name===n};return i==="active"&&await e.cancelQueries({predicate:r}),e.invalidateQueries({predicate:r,refetchType:i})}function xre(e,n,i){const r=Os(),u=_.useRef({projectName:e,revision:n,enabled:i});_.useEffect(()=>{const h=u.current;u.current={projectName:e,revision:n,enabled:i},!(!i||!h.enabled||h.projectName!==e||h.revision===n)&&n0(r,e)},[i,e,r,n])}const ZJ=20;function YJ(e,n={}){const i=Os(),r=yu(),u=_.useMemo(()=>!r||!e?null:r.dashboard.projects.find(Q=>Q.project.name===e)??null,[r,e]),h=yt({...hZ({client:J,path:{name:e??""}}),enabled:!!e&&!u,staleTime:Wd,refetchOnWindowFocus:"always"}),f=yt({...t4({client:J,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:Es,refetchOnWindowFocus:"always",refetchInterval:Q=>Q.state.data?.some(Z=>Z.projectId===h.data?.id&&(Z.status==="running"||Z.status==="queued"))?3e3:Es}),b=h.data??null,v=_.useMemo(()=>b?(f.data??[]).filter(Q=>Q.projectId===b.id):[],[b,f.data]),{latestRunIds:x,latestRunIdsKey:S,latestVisibilityRevision:j}=_.useMemo(()=>{const Q=v.filter(Z=>(Z.status==="completed"||Z.status==="partial")&&Z.kind==="answer-visibility"&&Z.trigger!=="probe").sort((Z,X)=>X.createdAt.localeCompare(Z.createdAt)),ae=Q[0]?.createdAt??null,V=ae?Q.filter(Z=>Z.createdAt===ae).map(Z=>Z.id):[];return{latestRunIds:V,latestRunIdsKey:[...V].sort().join(","),latestVisibilityRevision:ae?`${ae}:${[...V].sort().join(",")}`:"none"}},[v]),C=!!b&&!!e&&f.isSuccess,T=yt({queryKey:["project-dashboard-full",b?.id??null,S||"none","overview"],queryFn:async()=>({project:b,overview:await HC(e)}),enabled:C&&n.overview===!0,staleTime:Wd,refetchOnWindowFocus:"always"}),z=yt({queryKey:["project-dashboard-full",b?.id??null,S||"none","evidence"],queryFn:async()=>{const[Q,ae,V]=await Promise.all([GC(e),nQ(e,void 0,ZJ),Promise.all(x.map(Z=>Gg(Z)))]);return{project:b,queries:Q,timeline:ae,latestRunDetails:V}},enabled:C&&n.evidence===!0,staleTime:Wd,refetchOnWindowFocus:"always"}),q=_.useMemo(()=>{if(!b||!f.data)return u;const Q=n.evidence?z.data:void 0,ae={project:b,runs:v,queries:Q?.queries??[],timeline:Q?.timeline??[],latestRunDetails:Q?.latestRunDetails??[],overview:n.overview?T.data?.overview??null:null},V=_4(ae);return u&&!(n.overview&&T.data)?{...u,project:V.project,recentRuns:V.recentRuns,visibilitySweeps:V.visibilitySweeps,visibilityEvidence:Q?V.visibilityEvidence:u.visibilityEvidence}:V},[b,v,z.data,T.data,u,n.evidence,n.overview,f.data]),R=_.useCallback(async()=>{await Promise.all([h.refetch(),f.refetch(),i.invalidateQueries({queryKey:["project-dashboard-full",b?.id??null]})])},[h.refetch,f.refetch,i,b?.id]),P=h.isError||f.isError,M=!u&&(h.isLoading||f.isLoading),L=!!e&&n.overview===!0&&!u&&!P&&T.isPending,$=!!e&&n.evidence===!0&&!u&&!P&&z.isPending;return{commandCenter:q,project:b,isLoading:M,isError:P,overviewLoading:L,overviewError:n.overview===!0&&T.isError&&!T.data,evidenceLoading:$,evidenceError:n.evidence===!0&&z.isError&&!z.data,latestVisibilityRevision:j,competitorHistoryRevision:QJ(v),refetch:R}}const XJ=["health"];async function JJ(){const e=await wQ("/health","API"),n=To()&&e.state==="ok"?{label:"Worker",state:"disabled",detail:"Background execution is disabled in this public demo."}: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 dy(e,n){return yt({queryKey:XJ,queryFn:JJ,enabled:e,refetchInterval:15e3,initialData:n})}function WJ(e){return yt({...oy({client:J,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function my(){const e=Ps(),n=Qk({strict:!1}),i=i6({select:v=>v.location.pathname}),r=n.runId??null,u=n.evidenceId??null;return{runId:r,evidenceId:u,openRun:v=>{e({to:i,from:Vn.to,search:x=>({...x,runId:v,evidenceId:void 0})})},openEvidence:v=>{e({to:i,from:Vn.to,search:x=>({...x,evidenceId:v,runId:void 0})})},closeDrawer:()=>{e({to:i,from:Vn.to,search:v=>({...v,runId:void 0,evidenceId:void 0})})}}}const eW={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function tW(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function nW(){const e=_.useSyncExternalStore(LQ,XS,XS),n=Ps(),{openRun:i}=my(),r=_.useCallback(h=>{Zg(h)},[]),u=_.useCallback(h=>{h.cta&&(h.cta.intent==="open-run-drawer"?i(h.cta.runId):n({to:"/runs"}),Zg(h.id))},[n,i]);return e.length===0?null:l.jsx("div",{className:"toast-viewport","aria-label":"Notifications",children:e.map(h=>l.jsxs("section",{role:h.tone==="negative"?"alert":"status","aria-live":h.tone==="negative"?"assertive":"polite","data-state":h.state,className:`toast-card ${eW[h.tone]}`,children:[l.jsxs("div",{className:"toast-copy",children:[l.jsx("p",{className:"toast-title",children:h.title}),h.detail?l.jsx("p",{className:"toast-detail",children:h.detail}):null,h.cta?l.jsx("button",{type:"button",className:"toast-action",onClick:()=>u(h),"aria-label":tW(h),children:h.cta.label}):null]}),l.jsx("button",{type:"button",onClick:()=>r(h.id),className:"toast-dismiss","aria-label":"Dismiss",children:l.jsx(Wr,{className:"size-3.5"})})]},h.id))})}const aW="https://github.com/Canonry/canonry",iW="https://canonry.ai",xk="Run it from your agent with the MCP server, API, CLI, and plugins for Claude Code and Codex.",sW=[{title:"Visibility",links:[["AI visibility","/projects/summit-roofing"],["Search engines","/projects/summit-roofing/search-console"],["Traffic & conversions","/projects/summit-roofing/conversions"]]},{title:"Portfolio",links:[["Properties & markets","/projects/harbor-resorts"],["Queries & research","/projects/harbor-resorts/queries"],["Activity","/projects/harbor-resorts/activity"]]},{title:"Website",links:[["Site health","/projects/summit-roofing/technical-aeo"],["Local presence","/projects/summit-roofing/local"],["Backlinks","/projects/summit-roofing/backlinks"]]}];function oW(){const e=_.useId();if(!To())return null;const n=lp(),i=`${e}-new-tab`,r={target:"_blank",rel:"noopener noreferrer","aria-describedby":i};return l.jsxs("aside",{className:"demo-banner","aria-label":"Public demo",children:[l.jsx("p",{className:"demo-banner-name",children:"Canonry demo"}),l.jsx("p",{className:"demo-banner-facts",children:"View only. Fictional data."}),l.jsx("p",{className:"demo-banner-agent",children:xk}),l.jsxs("div",{className:"demo-banner-actions",children:[l.jsxs("a",{className:"demo-banner-primary",href:iW,...r,children:["canonry.ai",l.jsx(tj,{"aria-hidden":"true",size:14})]}),l.jsxs("a",{className:"demo-banner-secondary",href:aW,...r,children:[l.jsx(nj,{"aria-hidden":"true",size:15}),"GitHub"]}),l.jsxs("details",{onKeyDown:u=>{u.key==="Escape"&&(u.currentTarget.open=!1,u.currentTarget.querySelector("summary")?.focus())},children:[l.jsxs("summary",{children:["Explore ",l.jsx(Yc,{"aria-hidden":"true",size:14})]}),l.jsxs("div",{className:"demo-banner-panel",children:[l.jsx("p",{className:"demo-banner-panel-agent",children:xk}),l.jsxs("nav",{className:"demo-banner-examples","aria-label":"Demo examples",children:[l.jsx("a",{href:`${n}/projects/summit-roofing`,children:"Standard business"}),l.jsx("a",{href:`${n}/projects/harbor-resorts`,children:"Property portfolio"})]}),l.jsx("nav",{className:"demo-banner-features","aria-label":"Demo feature directory",children:sW.map(({title:u,links:h})=>l.jsxs("section",{"aria-label":u,children:[l.jsx("h2",{children:u}),l.jsx("ul",{children:h.map(([f,b])=>l.jsx("li",{children:l.jsx("a",{href:`${n}${b}`,children:f})},b))})]},u))})]})]})]}),l.jsx("span",{id:i,hidden:!0,children:"Opens in a new tab"})]})}function Ic(e){switch(e){case Oe["answer-visibility"]:return"Visibility sweep";case Oe["gsc-sync"]:return"GSC sync";case Oe["inspect-sitemap"]:return"Sitemap inspection";case Oe["ga-sync"]:return"GA sync";case Oe["traffic-sync"]:return"Traffic sync";case Oe["bing-inspect"]:return"Bing URL inspection";case Oe["bing-inspect-sitemap"]:return"Bing sitemap inspection";case Oe["site-audit"]:return"Technical audit";case Oe["backlink-extract"]:return"Backlink extract";case Oe["aeo-discover-seed"]:return"Discovery (seed phase)";case Oe["aeo-discover-probe"]:return"Discovery (probe phase)";case Oe["gbp-sync"]:return"Business Profile sync";case Oe["ads-sync"]:return"ChatGPT ads sync";case Oe["google-ads-sync"]:return"Google Ads sync";case Oe["gtm-sync"]:return"Tag Manager sync"}}function wk(e){return e==="running"?"Running":e==="queued"?"Queued":e==="partial"?"Partial":e==="completed"?"Completed":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Starting"}function rW(){const e=_.useSyncExternalStore(r4,Fi,Fi),n=_.useMemo(()=>Object.values(e.runs),[e.runs]),i=n.length>0,r=yt({...Fc({client:J}),enabled:i,staleTime:Es}),u=_.useMemo(()=>new Map((r.data??[]).map(b=>[b.id,b.status])),[r.data]);if(!i)return null;const h=n.map(b=>({...b,status:u.get(b.runId)??b.lastAnnouncedStatus})),f=h.length===1?Ic(h[0].kind):`${h.length} active tasks`;return l.jsxs("div",{className:"task-center",children:[l.jsxs("p",{className:"sr-only",role:"status","aria-live":"polite",children:[h.length," active ",h.length===1?"task":"tasks","."," ",h.map(b=>`${Ic(b.kind)} ${wk(b.status)}`).join(". "),"."]}),l.jsxs("details",{className:"task-center-details",children:[l.jsxs("summary",{className:"task-center-trigger",children:[l.jsx(Rs,{className:"size-3.5 shrink-0 motion-safe:animate-spin","aria-hidden":"true"}),l.jsx("span",{className:"task-center-summary",children:f}),l.jsx("span",{className:"task-center-count","aria-hidden":"true",children:h.length}),l.jsx(Yc,{className:"task-center-chevron size-3.5 shrink-0","aria-hidden":"true"})]}),l.jsxs("div",{className:"task-center-panel",children:[l.jsxs("div",{className:"task-center-heading",children:[l.jsx("span",{children:"Active tasks"}),l.jsx("span",{className:"tabular-nums text-faint",children:h.length})]}),l.jsx("ul",{className:"task-center-list",children:h.map(b=>l.jsxs("li",{className:"task-center-item",children:[l.jsxs("div",{className:"min-w-0",children:[l.jsx("p",{className:"truncate text-[13px] font-medium text-strong",children:Ic(b.kind)}),l.jsx("p",{className:"mt-0.5 truncate text-xs text-muted",children:b.projectLabel??b.projectId})]}),l.jsx(Sn,{tone:b.status==="failed"?"negative":b.status==="partial"?"caution":"neutral",children:wk(b.status)})]},b.runId))}),l.jsx(at,{to:"/runs",className:"task-center-footer-link",children:"View all runs"})]})]})]})}const py={queryClass:"all"},lW=["all","non-brand","branded"];function R4(e){return typeof e=="string"&&lW.includes(e)}function cW(e){const n=R4(e.class)?e.class:py.queryClass,i=e.scope;if(typeof i!="string"||i==="all"||i.length===0)return{scope:"all",queryClass:n};const r=i.startsWith("group:")?i.slice(6):"";return r?{scope:"group",groupKey:r,queryClass:n}:{scope:"all",queryClass:n}}function wre(e,n){return n===null||e===null?!1:e!==n}function Sre(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===py.queryClass?void 0:e.queryClass}}function uW(e,n){if(!(typeof e!="string"||e.length>16384||!n))try{const i=JSON.parse(e);if(typeof i!="object"||i===null||Array.isArray(i))return;const r=i,u=f=>typeof f=="string"&&f.trim().length>0,h=f=>f===null||u(f);return r.queryKey!==n||!u(r.provider)||r.queryClass!=="branded"&&r.queryClass!=="non-brand"&&r.queryClass!=="unknown"||!h(r.model)||!h(r.location)||!h(r.runId)||r.revision!==null&&(typeof r.revision!="number"||!Number.isSafeInteger(r.revision)||r.revision<=0)?void 0:{queryKey:n,queryClass:r.queryClass,provider:r.provider,model:r.model,location:r.location,runId:r.runId,revision:r.revision}}catch{return}}function dW(e){const n=x=>typeof e[x]=="string"&&e[x]!==""?e[x]:void 0,i=cW({scope:n("scope"),class:n("class")}),r=n("measurementScope")??(i.scope==="group"?"group":"project"),u=n("measurementScopeKey")??(n("measurementScope")?void 0:i.groupKey),h=n("queryClass")??n("class"),f={measurementScope:u&&(r==="group"||r==="market"||r==="property")?r:"project",queryClass:h==="unknown"||R4(h)?h:py.queryClass};f.measurementScope!=="project"&&(f.measurementScopeKey=u);for(const[x,S]of[["measurementMarketKey","marketKey"],["measurementProvider","provider"],["measurementModel","model"],["measurementLocation","location"],["measurementFrom","from"],["measurementTo","to"],["measurementRunId","measurementRunId"],["measurementQueryKey","queryKey"]]){const j=n(x);j!==void 0&&(f[S]=j)}const b=Number(e.measurementRevision);Number.isSafeInteger(b)&&b>0&&(f.revision=b);const v=uW(e.measurementAnswer,f.queryKey);return v&&(f.answer=v),f}function mW(e){return{scope:e.measurementScope,scopeKey:e.measurementScopeKey,marketKey:e.marketKey,queryClass:e.queryClass,provider:e.provider,model:e.model,location:e.location,from:e.from,to:e.to,revision:e.revision,runId:e.measurementRunId,limit:25}}function kre(e,n){const i={...e,...n};return["measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId"].some(r=>r in n)?(i.measurementQueryKey=n.measurementQueryKey,i.measurementAnswer=n.measurementAnswer):"measurementQueryKey"in n&&!("measurementAnswer"in n)&&(i.measurementAnswer=void 0),"measurementScope"in n&&(i.scope=void 0,"measurementMarketKey"in n||(i.measurementMarketKey=void 0),i.measurementQueryKey=void 0,n.measurementScope==="project"&&(i.measurementScopeKey=void 0)),"queryClass"in n&&(i.class=void 0),i}function jre(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}function pW(e,n){const i=/\/properties\/([^/]+)/.exec(e),r=dW(n);if(i)return{view:"property",selection:mm.parse({scope:"property",scopeKey:decodeURIComponent(i[1]),queryClass:r.queryClass,limit:10})};if(e.endsWith("/technical-aeo"))return{view:"site-health"};if(e.endsWith("/queries")&&n.queryWorkspace==="research")return{view:"project"};const u=/^\/projects\/[^/]+\/?$/.test(e);if(u||e.endsWith("/queries")){const h=mm.safeParse(mW(e.endsWith("/queries")?{measurementScope:r.measurementScope,measurementScopeKey:r.measurementScopeKey,queryClass:r.queryClass}:r));return{view:u?"visibility":"queries",...h.success?{selection:h.data}:{unavailableReason:"The current measurement filters are invalid. Correct them before asking Aero about this view."}}}return{view:"project"}}function hW(e,n={}){const{threshold:i=80}=n,r=_.useRef(null),u=_.useRef({scrollHeight:0,wasAtEnd:!0});function h(v){return v.scrollHeight-v.scrollTop-v.clientHeight}function f(){const v=r.current;return v?h(v)<=i:!0}function b(){const v=r.current;v&&(v.scrollTop=v.scrollHeight,u.current.wasAtEnd=!0,u.current.scrollHeight=v.scrollHeight)}return _.useEffect(()=>{const v=r.current;if(!v)return;const x=()=>{u.current.wasAtEnd=h(v)<=i};return v.addEventListener("scroll",x,{passive:!0}),()=>v.removeEventListener("scroll",x)},[i]),_.useLayoutEffect(()=>{const v=r.current;if(!v)return;const x=v.scrollHeight;x>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=x),u.current.scrollHeight=x},e),_.useEffect(()=>{const v=r.current;if(!v||typeof ResizeObserver>"u")return;const x=new ResizeObserver(()=>{const S=v.scrollHeight;S>u.current.scrollHeight&&u.current.wasAtEnd&&(v.scrollTop=S),u.current.scrollHeight=S});return x.observe(v),v.firstElementChild&&x.observe(v.firstElementChild),()=>x.disconnect()},[]),{ref:r,scrollToEnd:b,isAtEnd:f}}const a0="Sweeps are run by your Canonry team",fW="Scans are run by your Canonry team",Sk="Next sweep unavailable",gW="Sweep running…",yW="Next sweep:";function bW(e,n){try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:n??"UTC"}).format(new Date(e))}catch{return null}}function vW({projectName:e,kind:n=Oe["answer-visibility"],running:i=!1,loadSchedule:r=!0}){const u=n===Oe["site-audit"],h=yt({...LZ({client:J,path:{name:e},query:{kind:n}}),enabled:r&&!!e,retry:!1,refetchInterval:6e4}),f=h.isError?void 0:h.data,b=f?.enabled&&f.nextRunAt?new Date(f.nextRunAt):null,v=b&&Number.isFinite(b.getTime())?u?b.toLocaleString("en-GB",{weekday:"long",day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",timeZone:"UTC",hourCycle:"h23"}):bW(b.toISOString(),f?.timezone):null,S=(h.error instanceof yn?h.error.code:h.error?.error?.code)==="NOT_FOUND",j=!v||S||!f?.enabled;return l.jsx("p",{className:"text-sm text-secondary",role:"status",children:u?l.jsxs(l.Fragment,{children:[i&&l.jsx("span",{className:"text-neutral",children:"Scan running… · "}),v&&b?l.jsxs(l.Fragment,{children:["Next scan ",l.jsxs("time",{dateTime:b.toISOString(),children:[v," UTC"]})," · managed by your Canonry team"]}):fW]}):i?gW:j?Sk:v&&b?l.jsxs(l.Fragment,{children:[yW," ",l.jsx("time",{dateTime:b.toISOString(),children:v})]}):Sk})}const xW=300,wW=400,SW=900,kW=32,kk=28;let jW=0;function AW(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function i0(){return new DOMException("Preview stopped","AbortError")}function NW(e,n){return n?.aborted?Promise.reject(i0()):new Promise((i,r)=>{const u=()=>{clearTimeout(h),r(i0())},h=setTimeout(()=>{n?.removeEventListener("abort",u),i()},e);n?.addEventListener("abort",u,{once:!0})})}function CW(e){const n=e.match(/\S+\s*|\s+/g)??[];if(n.length<2)return[];const i=Math.ceil(n.length/kW),r=[];for(let u=i;u<n.length;u+=i)r.push(n.slice(0,u).join(""));return r}function _W(e){return typeof e=="string"?e:JSON.stringify(e??null)}async function TW({starter:e,signal:n,onEvent:i,reducedMotion:r=!1}){const u=async b=>{if(n?.aborted)throw i0();r||await NW(b,n)},h=Date.now(),f=++jW;await u(xW);for(const[b,v]of e.steps.entries()){const{name:x,label:S,arguments:j,result:C,durationMs:T}=v.tool,z=`preview-${e.id}-${f}-${b}`,q={role:"assistant",timestamp:Date.now(),stopReason:"toolUse",content:[...v.text?[{type:"text",text:v.text}]:[],{type:"toolCall",id:z,name:x,arguments:j}]};i({type:"message_end",message:q}),i({type:"tool_execution_start",toolCallId:z,toolName:x,label:S,args:j}),await u(Math.min(SW,Math.max(wW,T))),i({type:"tool_execution_end",toolCallId:z,toolName:x,result:C,isError:!1});const R={role:"toolResult",toolCallId:z,timestamp:Date.now(),isError:!1,aeroToolLabel:S,aeroDurationMs:T,content:[{type:"text",text:_W(C)}]};i({type:"message_end",message:R})}if(!r){for(const b of CW(e.answer))await u(kk),i({type:"message_update",message:{role:"assistant",content:[{type:"text",text:b}]},assistantMessageEvent:{}});await u(kk)}i({type:"message_end",message:{role:"assistant",timestamp:Date.now(),stopReason:"stop",content:[{type:"text",text:e.answer}]}}),i({type:"aero_turn_status",status:{reason:"completed",toolCalls:e.steps.length,modelCalls:e.steps.length+1,durationMs:Date.now()-h}})}async function pp(e){try{return await e.json()}catch{return{}}}function EW(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const hp=EW();function fp(e){e===401&&ny()}async function cg(e){const n=await fetch(`${hp}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){fp(n.status);const i=await pp(n);throw new yn(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function RW(e){const n=await fetch(`${hp}/projects/${encodeURIComponent(e)}/agent/preview`,{credentials:"include"});if(!n.ok){fp(n.status);const i=await pp(n);throw new yn(i.error?.message??`preview fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function DW(e){const n=await fetch(`${hp}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){fp(n.status);const i=await pp(n);throw new yn(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function zW({project:e,prompt:n,conversationId:i,provider:r,modelId:u,scope:h,profile:f,context:b,limits:v,signal:x,onEvent:S}){const j={prompt:n};i!==void 0&&(j.conversationId=i),r&&(j.provider=r),u&&(j.modelId=u),h&&(j.scope=h),f&&(j.profile=f),b&&(j.context=b),v&&(j.limits=v);const C=await fetch(`${hp}/projects/${encodeURIComponent(e)}/agent/prompt`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify(j),signal:x});if(!C.ok||!C.body){fp(C.status),km({method:"POST",route:"/api/v1/projects/{name}/agent/prompt",status:C.status});const M=await pp(C);throw new yn(M.error?.message??`prompt failed: ${C.status}`,C.status,M.error?.code)}Ho("aero.send");let T=!1;const z=C.body.getReader(),q=new TextDecoder;let R="";const P=()=>{z.cancel().catch(()=>{})};x?.addEventListener("abort",P,{once:!0}),x?.aborted&&P();try{for(;;){const{value:M,done:L}=await z.read();if(L)break;R+=q.decode(M,{stream:!0});let $=R.indexOf(`
59
+
60
+ `);for(;$!==-1;){const Q=R.slice(0,$);R=R.slice($+2);for(const ae of Q.split(`
61
+ `)){if(!ae.startsWith("data:"))continue;const V=ae.slice(5).trim();if(!V)continue;let Z;try{Z=JSON.parse(V)}catch{continue}Z.type==="stream_close"&&(T=!0),S(Z)}$=R.indexOf(`
62
+
63
+ `)}}if(x?.aborted)throw new DOMException("Turn stopped","AbortError");if(!T)throw new Error("Connection ended before Aero finished. Review the partial answer before retrying.")}finally{x?.removeEventListener("abort",P);try{z.releaseLock()}catch{}}}function em(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const s0=[{id:"status",label:"Status",prompt:"Give me a quick status: the latest sweep, which engines answered, and anything that needs attention."},{id:"changes",label:"What changed",prompt:"Compare the latest complete sweep with the one before it. Lead with mentions, then citations. Keep branded and non-brand queries separate if the project splits them, and say which changes are bigger than normal run-to-run noise."},{id:"gaps",label:"Biggest gaps",prompt:"Which tracked queries does no engine mention us on, and who gets named instead? Group them by topic or market."},{id:"insights",label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."}],IW="https://canonry.ai",OW="This demo plays sample answers only. Pick a starting point, or type / to choose one.",PW="Stopped. The sample answer so far is kept.";function jk(e){return{queryKey:["aero-preview",e],queryFn:()=>RW(e),staleTime:1/0,gcTime:1/0}}const Ak=[{command:"/status",label:"Status",prompt:"Give me a quick status: the latest sweep, which engines answered, and anything that needs attention."},{command:"/changes",label:"What changed",prompt:"Compare the latest complete sweep with the one before it. Lead with mentions, then citations. Keep branded and non-brand queries separate if the project splits them, and say which changes are bigger than normal run-to-run noise."},{command:"/gaps",label:"Biggest gaps",prompt:"Which tracked queries does no engine mention us on, and who gets named instead? Group them by topic or market."},{command:"/insights",label:"Top insights",prompt:"Walk me through the 3 most severe active insights and what to do about each."},{command:"/last-run",label:"Last run",prompt:"Summarize the latest run for this project: which engines answered, what moved in mentions and citations, and anything that failed."},{command:"/run-sweep",label:"Run sweep now",prompt:"Run a new answer-visibility sweep for this project now and tell me when it lands."},{command:"/queries",label:"Queries",prompt:"List the tracked queries for this project and flag any that are obvious duplicates or underperformers."},{command:"/competitors",label:"Competitors",prompt:"Which competitors do engines name most often on queries where we are not named, and on which engines?"},{command:"/new",label:"New conversation (save current)",action:"new"}],Kd=e=>`canonry:aero:provider:${e}`,qW=e=>`canonry:aero:scope:${e}`;function Nk(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function MW(e,n){if(!(typeof window>"u"))try{window.localStorage.setItem(e,n)}catch{}}function Ck(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function BW({projectName:e,context:n,preview:i=ty()}){const r=So(),{canWrite:u,account:h}=ga(),f=Os(),b=h?.role==="viewer",[v,x]=_.useState(!1),[S,j]=_.useState(!1),[C,T]=_.useState([]),[z,q]=_.useState(void 0),R=_.useRef(!1),[P,M]=_.useState(!1),[L,$]=_.useState(!1),[Q,ae]=_.useState(null),[V,Z]=_.useState(!1),[X,Ce]=_.useState(!1),[tt,Ge]=_.useState(null),Ve=_.useRef(!1),[ke,Le]=_.useState(""),[B,W]=_.useState(!1),[ve,Ae]=_.useState([]),[se,Se]=_.useState(""),[Me,xe]=_.useState(null),[pe,ce]=_.useState(null),[ue,_e]=_.useState(null),Ze=_.useRef(!0),[Ee,Ct]=_.useState(()=>Nk(Kd(e))??null),me=r||b||i?null:Ee,[Be]=_.useState(()=>Nk(qW(e))==="all"?"all":"read-only"),Ne=r||b||i?"read-only":Be,re=_.useRef(null),Ye=_.useRef(null),vt=_.useRef(null),Mn=_.useRef(null),{ref:Ht}=hW([C,se,ve]),$e=_.useRef(null);_.useLayoutEffect(()=>{const oe=$e.current;if(!oe)return;oe.style.height="auto";const ze=S?VW:UW;oe.scrollHeight>0&&(oe.style.height=`${Math.min(oe.scrollHeight,ze)}px`)},[ke,S,v]);const[ct,Ft]=_.useState(0),Qt=_.useMemo(()=>{const oe=ke.trimStart();if(!oe.startsWith("/"))return[];if(/\s/.test(oe))return[];const ze=oe.toLowerCase();return Ak.filter(Je=>(!(r||b)||Je.command!=="/run-sweep")&&(!b||Je.action!=="new")&&(!i||s0.some(Ot=>Ot.prompt===Je.prompt))&&(Je.command.startsWith(ze)||Je.label.toLowerCase().includes(ze.slice(1))))},[ke,r,b,i]);_.useEffect(()=>{Ft(oe=>Qt.length===0?0:Math.min(oe,Qt.length-1))},[Qt.length]);const Rn=yt({...WY({client:J,path:{name:e}}),enabled:!b&&!i,staleTime:6e4}),Vt=_.useMemo(()=>{const oe=Rn.data?.providers??[];if(me){const Je=oe.find(Ot=>Ot.id===me&&Ot.configured);if(Je)return Je}const ze=Rn.data?.defaultProvider;return ze?oe.find(Je=>Je.id===ze)??null:null},[me,Rn.data]),hi=b||i||Vt!==null;yt({...jk(e),enabled:i&&v}),_.useEffect(()=>{if(!Rn.data||!me)return;Rn.data.providers.find(ze=>ze.id===me&&ze.configured)||(Ct(null),Ck(Kd(e)))},[Rn.data,me,e]);const Hs=_.useCallback(oe=>{Ct(oe),oe?MW(Kd(e),oe):Ck(Kd(e))},[e]);_.useEffect(()=>{if(!v)return;const oe=ze=>{ze.key==="Escape"&&(L?$(!1):S?j(!1):x(!1))};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[v,S,L]);const fi=_.useRef(null);_.useEffect(()=>{v||(fi.current=null)},[v]),_.useEffect(()=>{if(!v||!hi||i)return;let oe=!1;fi.current!==e&&(fi.current=e,xe(null));const ze=()=>{oe||B||Ve.current||cg(e).then(et=>{oe||Ve.current||(Ce(et.isStreaming??!1),q(et.conversationId??null),!oe&&!et.isStreaming&&(Ye.current===null||et.updatedAt&&et.updatedAt!==Ye.current.previous)&&(T(et.messages),re.current=et.updatedAt,Ye.current=null))}).catch(et=>{oe||xe(Li(et))})};ze();const Ot=window.setInterval(ze,15e3);return()=>{oe=!0,window.clearInterval(Ot)}},[v,e,B,hi,V,i]),_.useEffect(()=>(Ze.current=!0,()=>{Ze.current=!1,Mn.current?.abort()}),[e]);async function Dn(oe,ze=n){const Je=oe.trim();if(!Je||L||B||V||Ve.current||X||!hi)return;if(i){await Zo(Je);return}if(r&&/^\/run-sweep(?:\s|$)/i.test(Je)){xe(a0);return}xe(null),ce(null),_e({prompt:Je,context:ze}),Le(""),W(!0),Se(""),vt.current=null,Ae([]),Ye.current={previous:re.current};const Ot={role:"user",content:Je,timestamp:Date.now(),aeroContext:ze};T(kt=>[...kt,Ot]);const et=new AbortController;Mn.current=et;try{await zW({project:e,prompt:Je,conversationId:z,provider:me??void 0,scope:Ne,context:ze,signal:et.signal,onEvent:Fs});const kt=await cg(e);Ze.current&&!kt.isStreaming&&(q(kt.conversationId??null),T(kt.messages),re.current=kt.updatedAt,Ye.current=null)}catch(kt){if(!Ze.current)return;b&&(Ye.current=null);const rn=vt.current;rn&&em(rn).trim()&&T(yi=>[...yi,rn]),et.signal.aborted?ce("Stopped. Partial response preserved. An action already dispatched may still finish."):xe(Li(kt))}finally{Ze.current&&(W(!1),Se(""),Ae(kt=>kt.map(rn=>rn.endedAt===void 0?{...rn,interrupted:!0}:rn))),Mn.current=null}}async function Zo(oe){const ze=Ak.find(et=>et.command===oe.toLowerCase())?.prompt??oe,Je=s0.find(et=>et.prompt===ze)?.id;if(!Je){xe(null),_e(null),ce(OW);return}xe(null),ce(null),_e({prompt:ze}),Le(""),W(!0),Se(""),vt.current=null,Ae([]),T(et=>[...et,{role:"user",content:ze,timestamp:Date.now()}]);const Ot=new AbortController;Mn.current=Ot;try{const et=await f.ensureQueryData(jk(e));if(Ot.signal.aborted)throw new DOMException("Preview stopped","AbortError");const kt=et.starters.find(rn=>rn.id===Je);if(!kt)throw new Error("This demo has no sample answer for that starting point.");await TW({starter:kt,signal:Ot.signal,onEvent:Fs,reducedMotion:AW()})}catch(et){if(!Ze.current)return;const kt=vt.current;kt&&em(kt).trim()&&T(rn=>[...rn,kt]),Ot.signal.aborted?ce(PW):xe(Li(et))}finally{Ze.current&&(W(!1),Se(""),Ae(et=>et.map(kt=>kt.endedAt===void 0?{...kt,interrupted:!0}:kt))),Mn.current=null}}function Fs(oe){if(Ze.current)switch(oe.type){case"message_update":oe.message.role==="assistant"&&(vt.current=oe.message),Se(em(oe.message));break;case"message_end":if(oe.message.role!=="user"){const ze=oe.message;T(Je=>[...Je,ze])}oe.message.role==="assistant"&&(vt.current=null,Se(""),oe.message.errorMessage&&xe(oe.message.errorMessage));break;case"aero_turn_status":oe.status?.reason==="tool-limit"?ce("Tool-call limit reached. Partial response preserved."):oe.status?.reason==="time-limit"?ce("Time limit reached. Partial response preserved."):oe.status?.reason==="completed"?_e(null):oe.status?.reason==="error"&&xe(ze=>ze??"Aero could not finish this answer. Retry to ask again.");break;case"tool_execution_start":Ae(ze=>[...ze,{id:oe.toolCallId,name:oe.toolName,label:oe.label,args:oe.args,startedAt:Date.now()}]);break;case"tool_execution_end":Ae(ze=>ze.map(Je=>Je.id===oe.toolCallId?{...Je,endedAt:Date.now(),isError:oe.isError,result:oe.result}:Je));break;case"error":xe(oe.message);break}}async function Qs(oe,ze=!1){if(!(B||X||Ve.current)){Ve.current=!0,Z(!0),xe(null);try{await oe();const Je=await cg(e);if(!Ze.current)return;Ye.current=null,re.current=Je.updatedAt,q(Je.conversationId??null),T(Je.messages),Ae([]),Se(""),ce(null),_e(null),Ge(null),$(ze),ae(ze?await ZS(e):null),$e.current?.focus()}catch(Je){Ze.current&&xe(Li(Je))}finally{Ve.current=!1,Ze.current&&Z(!1)}}}async function gi(){if(i){if(B)return;T([]),Ae([]),Se(""),xe(null),ce(null),_e(null),$e.current?.focus();return}await Qs(()=>b?DW(e):SQ(e,crypto.randomUUID()))}async function xn(oe=!1){if(!(Ve.current||R.current)){R.current=!0,M(!0),$(!0),xe(null);try{const ze=await ZS(e,{offset:oe?Q?.nextOffset??0:0});Ze.current&&ae(Je=>oe&&Je?{...ze,conversations:[...Je.conversations,...ze.conversations]}:ze)}catch(ze){Ze.current&&xe(Li(ze))}finally{R.current=!1,Ze.current&&M(!1)}}}const Et=C.length===0,Kn=!(b||i);if(Kn&&Rn.isPending)return null;if(Kn&&Rn.isError)return l.jsx("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",children:l.jsxs("div",{role:"status",className:"flex w-full max-w-3xl flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-base bg-bg/95 px-4 py-2 text-sm shadow-lg",children:[l.jsx(Nd,{className:"h-4 w-4 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"font-medium text-strong",children:"Aero could not check provider availability."}),l.jsx(le,{variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",onClick:()=>{Rn.refetch()},children:"Try again"})]})});const Zt=Vt&&!Vt.configured?Vt:null;if(Kn&&(!Vt||Zt))return l.jsx("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-40 flex justify-center p-3",children:l.jsxs("div",{role:"status",className:"flex w-full max-w-3xl flex-wrap items-center gap-x-2 gap-y-1 rounded-lg border border-base bg-bg/95 px-4 py-2 text-sm shadow-lg",children:[l.jsx(Nd,{className:"h-4 w-4 text-muted","aria-hidden":"true"}),l.jsxs("span",{className:"flex items-center gap-1.5 font-medium text-strong",children:[Zt?`Aero is set to ${Zt.label.replace(/\s+\(.+\)$/,"")}, which has no API key.`:"Aero needs an answer-engine provider.",l.jsx(ma,{text:Zt?`Set ${D4(Zt.id)} on the server, or providers.${Zt.id}.apiKey in its config.yaml.`:"Aero is the built-in AEO analyst. It reads your Canonry data with you once a provider is connected."})]}),Zt?null:u?l.jsx(le,{asChild:!0,variant:"outline",size:"sm",className:"pointer-events-auto ml-auto",children:l.jsx(at,{to:"/settings",children:"Open Settings"})}):l.jsx("span",{className:"ml-auto text-secondary",children:"Ask an administrator to configure one."})]})});const Zs=v&&S?"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",qa=S?"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",na=S?"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 l.jsx("div",{className:Zs,onClick:oe=>{S&&oe.target===oe.currentTarget&&j(!1)},children:l.jsx("div",{className:qa,children:v?l.jsxs("div",{"data-aero-panel":!0,className:S?"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:[l.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-mono-800/70 px-4 py-2.5",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx(Nd,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),l.jsx("span",{className:"text-sm font-medium text-heading",children:"Aero"}),l.jsx("span",{className:"text-[10px] uppercase tracking-wider text-muted",children:B||X?"working…":e})]}),l.jsxs("div",{className:"flex items-center gap-1",children:[!r&&!b&&!i&&l.jsx(LW,{providers:Rn.data?.providers??[],active:Vt,override:me,onPick:Hs,disabled:B}),l.jsx("button",{type:"button",onClick:()=>j(oe=>!oe),className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":S?"Collapse":"Expand",title:S?"Collapse":"Expand",children:S?l.jsx(u6,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.jsx(d6,{className:"h-3.5 w-3.5","aria-hidden":"true"})}),l.jsx("button",{type:"button",onClick:()=>{j(!1),x(!1)},className:"rounded-md p-1.5 text-muted transition hover:bg-surface-inset hover:text-strong","aria-label":"Close Aero",children:l.jsx(Wr,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),l.jsxs("div",{className:"flex flex-wrap items-center gap-2 border-b border-subtle px-4 py-2",children:[l.jsxs(le,{variant:"outline",size:"sm",disabled:B||X||V,onClick:gn(gi),title:b||i?"Clear this conversation and start fresh.":"Save this conversation and start fresh. Shared project notes are kept.",children:[l.jsx(hg,{className:"h-3.5 w-3.5","aria-hidden":"true"})," New conversation"]}),!b&&!i&&l.jsxs(le,{variant:"ghost",size:"sm","aria-expanded":L,"aria-controls":"aero-history",disabled:V,onClick:()=>{L?$(!1):xn()},children:[l.jsx(aj,{className:"h-3.5 w-3.5","aria-hidden":"true"})," History"]})]}),L?l.jsxs("div",{id:"aero-history",className:na,"aria-label":"Conversation history",children:[l.jsxs("h3",{className:"mb-2 text-sm font-medium text-heading",children:["Conversations in ",e]}),Q?Q.conversations.length===0?l.jsx("p",{className:"text-sm text-secondary",children:"No saved conversations yet. Your conversations will appear here."}):l.jsx("ul",{className:"divide-y divide-default",children:Q.conversations.map(oe=>l.jsxs("li",{className:"py-2",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsxs("button",{className:"min-w-0 flex-1 rounded-md px-2 py-1 text-left hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-positive-500",disabled:B||X||V,onClick:()=>{oe.active?$(!1):Qs(()=>kQ(e,oe.id))},children:[l.jsx("span",{className:"block truncate text-sm text-heading",children:oe.title}),l.jsxs("span",{className:"text-xs text-secondary",children:[oe.active?"Current · ":"",new Date(oe.updatedAt).toLocaleString()]})]}),l.jsx(le,{variant:"ghost",size:"sm",disabled:B||X||V,"aria-label":`Delete conversation: ${oe.title}`,onClick:()=>Ge(oe.id),children:"Delete"})]}),tt===oe.id&&l.jsxs("div",{role:"group","aria-label":"Confirm conversation deletion",className:"mt-2 rounded-md border border-default p-3 text-sm text-secondary",children:[l.jsx("p",{children:"Delete this conversation permanently? Shared project notes will be kept."}),l.jsxs("div",{className:"mt-2 flex gap-2",children:[l.jsx(le,{variant:"destructive",size:"sm",disabled:V,onClick:()=>{Qs(async()=>{await jQ(e,oe.id)},!0)},children:"Delete conversation"}),l.jsx(le,{variant:"ghost",size:"sm",disabled:V,onClick:()=>Ge(null),children:"Cancel"})]})]})]},oe.id))}):l.jsx("p",{className:"text-sm text-secondary",children:P?"Loading history…":"History could not be loaded. Close and reopen History to retry."}),Q?.nextOffset!=null&&l.jsx(le,{variant:"ghost",size:"sm",disabled:P,onClick:()=>{xn(!0)},children:P?"Loading…":"Load more"})]}):l.jsxs("div",{ref:Ht,className:na,children:[Et&&!B&&l.jsxs("div",{className:"flex flex-col gap-3 py-2",children:[l.jsx("p",{className:"text-sm text-secondary",children:i?l.jsxs(l.Fragment,{children:["See how Aero answers about ",l.jsx("span",{className:"text-strong",children:e}),". Choose a starting point."]}):l.jsxs(l.Fragment,{children:["Ask about ",l.jsx("span",{className:"text-strong",children:e})," or choose a starting point."]})}),l.jsx(_k,{onPick:oe=>{Dn(oe)}})]}),HW(C,e,me,Ne,ve,B,!!se.trim(),!b&&!i),B&&se&&l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsx(O4,{content:se})]}),B&&!se&&ve.every(oe=>oe.endedAt!==void 0)&&l.jsx(nee,{}),i&&!Et&&!B&&l.jsxs("div",{className:"mt-4 flex flex-col gap-2 border-t border-subtle pt-3",children:[l.jsx("p",{className:"text-xs text-secondary",children:"Try another starting point."}),l.jsx(_k,{onPick:oe=>{Dn(oe)}})]})]}),(Me||pe)&&l.jsxs("div",{role:Me?"alert":"status",className:"mx-3 my-2 flex flex-wrap items-center gap-2 rounded-md border border-base bg-surface px-3 py-2 text-sm text-secondary",children:[l.jsx("span",{className:"flex-1",children:Me??pe}),ue&&!B&&l.jsx(le,{variant:"outline",size:"sm",onClick:()=>{Ne==="all"?(Le(ue.prompt),$e.current?.focus()):Dn(ue.prompt,ue.context)},children:Ne==="all"?"Review prompt":"Retry"})]}),i&&l.jsxs("p",{className:"border-t border-subtle px-4 py-2 text-xs text-secondary",children:["Sample answers on demo data."," ",l.jsxs("a",{href:IW,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-0.5 text-positive-400 underline decoration-positive-700 hover:decoration-positive-400",children:["Aero answers from your own Canonry data.",l.jsx(tj,{className:"h-3 w-3","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})]}),l.jsxs("div",{className:"relative",children:[!L&&Qt.length>0&&l.jsx(KW,{title:i?"Starting points":"Commands",matches:Qt,selectedIndex:ct,onHover:Ft,onPick:oe=>{Le(""),$e.current?.focus(),oe.action==="new"?gi():Dn(oe.prompt)}}),l.jsxs("form",{className:"flex items-end gap-2 border-t border-mono-800/70 bg-bg/80 px-3 py-2.5",onSubmit:oe=>{if(oe.preventDefault(),Qt.length>0){const ze=Qt[ct];Le(""),ze.action==="new"?gi():Dn(ze.prompt);return}Dn(ke)},children:[l.jsx("textarea",{ref:$e,value:ke,onChange:oe=>Le(oe.target.value),onKeyDown:oe=>{if(Qt.length>0){if(oe.key==="ArrowDown"){oe.preventDefault(),Ft(ze=>(ze+1)%Qt.length);return}if(oe.key==="ArrowUp"){oe.preventDefault(),Ft(ze=>(ze-1+Qt.length)%Qt.length);return}if(oe.key==="Tab"){oe.preventDefault();const ze=Qt[ct];Le(`${ze.command} `);return}if(oe.key==="Escape"){oe.preventDefault(),Le("");return}}if(oe.key==="Enter"&&!oe.shiftKey)if(oe.preventDefault(),Qt.length>0){const ze=Qt[ct];Le(""),ze.action==="new"?gi():Dn(ze.prompt)}else Dn(ke)},disabled:L||V,placeholder:L?"Open a conversation to continue…":i?"Type / for a starting point":"Ask Aero, or / for commands…","aria-label":"Message Aero",rows:S?3:1,className:"flex-1 resize-none overflow-y-auto bg-transparent text-sm text-heading placeholder:text-mono-600 focus:outline-none disabled:opacity-60"}),B?l.jsxs(le,{type:"button",variant:"outline",size:"sm",onClick:()=>Mn.current?.abort(),"aria-label":"Stop Aero",children:[l.jsx(ij,{className:"h-3.5 w-3.5","aria-hidden":"true"})," Stop"]}):l.jsx(le,{type:"submit",size:"sm",disabled:!ke.trim()||L||V||X,"aria-label":"Send",children:l.jsx(m6,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}):l.jsx("button",{type:"button",onClick:()=>{x(!0),Ho("aero.open")},className:"flex w-full items-center justify-between rounded-lg border border-mono-800/80 bg-bg/95 px-4 py-2 text-left text-sm text-secondary shadow-lg transition hover:border-strong hover:bg-bg-elevated/90 hover:text-strong",children:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx(Nd,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]})})})})}function LW({providers:e,active:n,override:i,onPick:r,disabled:u}){const[h,f]=_.useState(!1),b=_.useRef(null);if(_.useEffect(()=>{if(!h)return;const x=j=>{b.current?.contains(j.target)||f(!1)},S=j=>{j.key==="Escape"&&f(!1)};return window.addEventListener("mousedown",x),window.addEventListener("keydown",S),()=>{window.removeEventListener("mousedown",x),window.removeEventListener("keydown",S)}},[h]),e.length===0)return null;const v=n?.label.replace(/\s+\(.+\)$/,"")??"No provider";return l.jsxs("div",{ref:b,className:"relative",children:[l.jsxs("button",{type:"button",onClick:()=>f(x=>!x),disabled:u,className:"flex items-center gap-1 rounded-md px-2 py-1 text-sm text-secondary transition hover:bg-surface-inset hover:text-strong disabled:opacity-50","aria-label":"Switch agent model","aria-haspopup":"listbox","aria-expanded":h,title:n?`${n.label} · ${n.defaultModel}`:"Pick a provider",children:[l.jsx("span",{className:"font-medium text-strong",children:v}),l.jsx(Yc,{className:"h-3 w-3","aria-hidden":"true"})]}),h&&l.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:[l.jsx("div",{className:"border-b border-default px-3 py-2 text-sm font-medium text-secondary",children:"Answer engine"}),l.jsx("ul",{className:"max-h-72 overflow-y-auto py-1",children:e.map(x=>{const S=n?.id===x.id,j=i===x.id;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":S,disabled:!x.configured,onClick:()=>{x.configured&&(r(j?null:x.id),f(!1))},className:"flex w-full items-center gap-2 px-3 py-2.5 text-left text-sm transition enabled:hover:bg-bg-elevated disabled:cursor-not-allowed disabled:opacity-60",title:x.configured?x.defaultModel:`Add ${D4(x.id)} in Settings or your environment`,children:[l.jsx("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:S?l.jsx(Xc,{className:"h-3 w-3 text-positive-400","aria-hidden":"true"}):null}),l.jsx("span",{className:"min-w-0 flex-1 truncate font-medium text-heading",children:x.label.replace(/\s+\(.+\)$/,"")}),j&&l.jsx("span",{className:"rounded-md border border-positive-800/60 bg-positive-950/60 px-2 py-0.5 text-[11px] text-positive",children:"Selected"}),!x.configured&&l.jsx("span",{className:"rounded-md border border-base px-2 py-0.5 text-[11px] text-secondary",children:"Needs setup"})]})},x.id)})}),i&&l.jsx("button",{type:"button",onClick:()=>{r(null),f(!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 default"})]})]})}const UW=144,VW=288,ug=288,$W=8;function KW({title:e,matches:n,selectedIndex:i,onHover:r,onPick:u}){const h=_.useRef(null),f=_.useRef(null),b=_.useRef(null),[v,x]=_.useState(ug);return _.useLayoutEffect(()=>{const S=h.current,j=S?.closest("[data-aero-panel]"),C=S?.parentElement;if(!S||!j||!C)return;const T=C.getBoundingClientRect().top-j.getBoundingClientRect().top-$W*2-(f.current?.getBoundingClientRect().height??0);x(T>0?Math.min(ug,Math.floor(T)):ug)},[n.length]),_.useEffect(()=>{b.current?.querySelector('[aria-selected="true"]')?.scrollIntoView?.({block:"nearest"})},[i]),l.jsxs("div",{ref:h,className:"absolute inset-x-3 bottom-full mb-2 overflow-hidden rounded-lg border border-base bg-bg/98 shadow-2xl",children:[l.jsx("div",{ref:f,className:"border-b border-default px-3 py-1.5 text-[10px] uppercase tracking-wider text-muted",children:e}),l.jsx("ul",{ref:b,role:"listbox",className:"overflow-y-auto py-1",style:{maxHeight:v},children:n.map((S,j)=>{const C=j===i;return l.jsx("li",{children:l.jsxs("button",{type:"button",role:"option","aria-selected":C,onMouseEnter:()=>r(j),onClick:()=>u(S),className:`flex w-full items-center gap-3 px-3 py-2 text-left text-sm transition ${C?"bg-bg-elevated text-heading":"text-neutral hover:bg-bg-elevated/60"}`,children:[l.jsx("span",{className:"font-medium",children:S.label}),l.jsx("span",{className:"ml-auto font-mono text-[11px] text-secondary",children:S.command})]})},S.command)})})]})}function _k({onPick:e}){return l.jsx("div",{className:"flex flex-wrap gap-1.5",children:s0.map(n=>l.jsx("button",{type:"button",onClick:()=>e(n.prompt),className:"rounded-md border border-base bg-bg-elevated/70 px-3 py-1.5 text-sm text-neutral transition hover:border-strong hover:bg-mono-800/70 hover:text-heading",children:n.label},n.label))})}function D4(e){switch(e){case"claude":return"ANTHROPIC_API_KEY";case"openai":return"OPENAI_API_KEY";case"gemini":return"GEMINI_API_KEY";case"zai":return"ZAI_API_KEY"}}function GW(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function HW(e,n,i,r,u,h,f,b=!0){const v=[];let x=[],S=0;for(let C=e.length-1;C>=0;C--)if(e[C].role==="user"){S=C+1;break}const j=(C=!1)=>{x.length!==0&&(v.push(l.jsx(eee,{trails:x,betweenSteps:C&&h&&!f},`tools:${x[0].id}`)),x=[])};for(let C=0;C<e.length;C++){const T=e[C],z=GW(T,C);if(T.role==="user"){j();const q=typeof T.content=="string"?T.content:JSON.stringify(T.content);if(q.startsWith("[system]"))continue;v.push(l.jsx(FW,{text:q,projectName:n,providerOverride:i,scope:r,context:T.aeroContext,cliCopy:b},z));continue}if(T.role==="assistant"){const q=new Map;let R=C+1;for(;R<e.length&&e[R].role==="toolResult";){const $=e[R];q.set($.toolCallId,$),R++}const P=h&&C>=S,M=ZW(T,q).map($=>{const Q=u.find(V=>V.id===$.id),ae={...$,...Q,label:$.label??Q?.label};return{...ae,interrupted:ae.endedAt===void 0&&(!P||ae.interrupted)}}),L=em(T);L.trim()&&(j(),v.push(l.jsxs("div",{className:"mt-3",children:[l.jsx("div",{className:"mb-0.5 text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsx(O4,{content:L})]},z))),x.push(...M),C=R-1;continue}}return j(!0),v}function FW({text:e,projectName:n,providerOverride:i,scope:r,context:u,cliCopy:h=!0}){const[f,b]=_.useState(!1),v=_.useMemo(()=>QW(n,e,i,r,u),[n,e,i,r,u]);async function x(){try{await navigator.clipboard.writeText(v),b(!0),window.setTimeout(()=>b(!1),1500)}catch{}}return l.jsxs("div",{className:"group relative mt-3 rounded-md bg-bg-elevated/60 px-3 py-2 text-strong",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-muted",children:"You"}),h&&l.jsx("button",{type:"button",onClick:gn(x),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:v,children:f?l.jsxs(l.Fragment,{children:[l.jsx(Xc,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):l.jsxs(l.Fragment,{children:[l.jsx(g0,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),l.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function QW(e,n,i,r,u){const h=["canonry","agent","ask",eg(e),eg(n)];return i&&h.push("--provider",i),r==="read-only"&&h.push("--scope","read-only"),u&&h.push("--context",eg(JSON.stringify(u))),h.join(" ")}function ZW(e,n){const i=[];for(const r of e.content){if(r.type!=="toolCall")continue;const u=r,h=n.get(u.id);i.push({id:u.id,name:u.name,args:u.arguments,label:h?.aeroToolLabel,durationMs:h?.aeroDurationMs,endedAt:h?.timestamp,isError:h?.isError,result:h?.content})}return i}const Tk=new Set(["aero_list_toolkits","aero_load_toolkit"]),YW=new Map([["Read","Reading"],["List","Listing"],["Get","Getting"],["Load","Loading"],["Find","Finding"],["Check","Checking"],["Compare","Comparing"],["Inspect","Inspecting"],["Preview","Previewing"],["Search","Searching"],["Show","Showing"],["Run","Running"]]);function $r(e){return e.endedAt===void 0&&!e.interrupted}function o0(e){return e.label??e.name.replace(/^(?:canonry|aero)_/,"").replace(/_/g," ")}function z4(e){const n=e.durationMs??(e.endedAt!=null&&e.startedAt!=null?e.endedAt-e.startedAt:null);return n==null||n<0?null:n}function I4(e){let n=null;for(const i of e){const r=z4(i);r!=null&&(n=(n??0)+r)}return n}function hy(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function XW(e){const n=Math.floor(Math.max(0,e)/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function dg(e,n,i){return`${e} ${e===1?n:i}`}function Ek(e=""){return YW.get(e.charAt(0).toUpperCase()+e.slice(1))}function JW(e){const[n,...i]=e.trim().split(/\s+/),r=Ek(n);if(!r)return"Working…";if(i[0]==="or"||i[0]==="and"){const u=Ek(i[1]);return u?`${[r,i[0],u.toLowerCase(),...i.slice(2)].join(" ")}…`:"Working…"}return`${[r,...i].join(" ")}…`}function WW(e){const[n,i]=_.useState(()=>Date.now());return _.useEffect(()=>{if(!e)return;const r=()=>i(Date.now()),u=window.setTimeout(r,0),h=window.setInterval(r,1e3);return()=>{window.clearTimeout(u),window.clearInterval(h)}},[e]),n}function eee({trails:e,betweenSteps:n}){const[i,r]=_.useState(!1),u=_.useId(),h=e.filter($=>!Tk.has($.name)),f=e.filter($=>Tk.has($.name)),b=h.filter($r),v=b.length>0?b[b.length-1]:void 0,x=f.some($r),S=v!==void 0||x||n,j=h.length>0?h:f,C=j.filter($=>!$r($)&&$.isError===!0).length,T=e.some($=>$.interrupted),z=e.flatMap($=>$.startedAt===void 0?[]:[$.startedAt]),q=z.length>0?Math.min(...z):void 0,R=WW(S),P=I4(j),M=S?v?JW(o0(v)):x?"Loading tools…":"Working…":h.length>0?dg(h.length,"step","steps"):dg(f.length,"setup step","setup steps"),L=new Map;for(const $ of h){const Q=o0($),ae=L.get(Q);ae?ae.push($):L.set(Q,[$])}return l.jsxs("div",{className:"mt-3 rounded-md border border-mono-800/70 bg-surface-hover",children:[l.jsxs("button",{type:"button",onClick:()=>r($=>!$),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":i,"aria-controls":u,children:[l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:S?l.jsx(Rs,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):C>0?l.jsx(Rm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):T?l.jsx(ij,{className:"h-3 w-3 text-muted","aria-hidden":"true"}):l.jsx(Xc,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"min-w-0 truncate text-sm font-medium text-heading",children:M}),C>0&&l.jsxs("span",{className:"shrink-0 rounded-md border border-negative-800/50 bg-negative-950/20 px-1.5 py-0.5 text-[10px] text-negative-400",children:[C," failed"]}),T&&l.jsx("span",{className:"shrink-0 rounded-md border border-mono-800/70 px-1.5 py-0.5 text-[10px] text-muted",children:"interrupted"}),l.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-2 text-[10px] text-muted",children:[S?l.jsxs(l.Fragment,{children:[v&&l.jsxs("span",{children:["step ",h.indexOf(v)+1]}),q!==void 0&&l.jsx("span",{className:"tabular-nums","aria-hidden":"true",children:XW(R-q)})]}):P!=null&&l.jsx("span",{className:"tabular-nums",children:hy(P)}),l.jsx(Jc,{className:`h-3 w-3 transition-transform ${i?"rotate-90":""}`,"aria-hidden":"true"})]})]}),i&&l.jsxs("div",{id:u,className:"space-y-1.5 border-t border-default px-2.5 py-2",children:[[...L].map(([$,Q])=>l.jsx(Rk,{trails:Q,title:$},`label:${$}`)),f.length>0&&l.jsx(Rk,{trails:f,title:`+ ${dg(f.length,"setup step","setup steps")}`,muted:!0},"setup")]})]})}function Rk({trails:e,title:n,muted:i=!1}){const[r,u]=_.useState(!1),h=_.useId(),f=!i&&e.length===1,b=e.some($r),v=e.filter(C=>!$r(C)&&C.isError===!0).length,x=e.some(C=>C.interrupted),S=I4(e),j=f?()=>u(!0):void 0;return l.jsxs("div",{className:f?void 0:i?"rounded-md":"rounded-md border border-mono-800/70 bg-surface-hover",onFocus:j,onClick:j,children:[!f&&l.jsxs("button",{type:"button",onClick:()=>u(C=>!C),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":r,"aria-controls":h,children:[!i&&l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:b?l.jsx(Rs,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):v>0?l.jsx(Rm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(sj,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:i?"text-xs text-muted":"text-sm font-medium text-heading",children:n}),!i&&l.jsxs("span",{className:"text-[10px] text-muted",children:["×",e.length]}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[b?l.jsx("span",{className:"text-positive-400",children:"running…"}):l.jsxs(l.Fragment,{children:[v>0?l.jsxs("span",{className:"text-negative-400",children:[v," failed"]}):l.jsx("span",{children:x?"interrupted":"done"}),S!=null&&l.jsx("span",{className:"tabular-nums",children:hy(S)})]}),l.jsx(Jc,{className:`h-3 w-3 transition-transform ${r?"rotate-90":""}`,"aria-hidden":"true"})]})]}),(f||r)&&l.jsx("div",{id:h,className:f?void 0:"space-y-1.5 px-2.5 pb-2",children:e.map(C=>l.jsx(tee,{trail:C},C.id))})]})}function tee({trail:e}){const[n,i]=_.useState(!1),r=$r(e),u=!r&&e.isError===!0,h=z4(e),f=h==null?null:hy(h),b=u?"border-negative-800/50":r?"border-positive-800/50":"border-mono-800/70",v=u?"bg-negative-950/20":r?"bg-positive-950/20":"bg-surface-hover";return l.jsxs("div",{className:`rounded-md border ${b} ${v}`,children:[l.jsxs("button",{type:"button",onClick:()=>i(x=>!x),className:"flex w-full items-center gap-2 px-2.5 py-1.5 text-left","aria-expanded":n,children:[l.jsx("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:r?l.jsx(Rs,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):u?l.jsx(Rm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(sj,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"text-sm font-medium text-heading",children:o0(e)}),l.jsxs("span",{className:"ml-auto flex items-center gap-2 text-[10px] text-muted",children:[r?l.jsx("span",{className:"text-positive-400",children:"running…"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{children:e.interrupted?"interrupted":u?"failed":"done"}),f&&l.jsx("span",{children:f})]}),l.jsx(Jc,{className:`h-3 w-3 transition-transform ${n?"rotate-90":""}`,"aria-hidden":"true"})]})]}),n&&l.jsxs("div",{className:"border-t border-default px-2.5 py-2 text-[11px] text-secondary",children:[l.jsx("div",{className:"mb-2 text-xs text-secondary",children:e.name}),l.jsx("div",{className:"mb-1 text-xs text-secondary",children:"Inputs"}),l.jsx("pre",{className:"mb-2 overflow-x-auto whitespace-pre-wrap break-all text-xs text-neutral",children:Dk(e.args)}),!r&&e.result!==void 0&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"mb-1 text-[9px] uppercase tracking-wider text-faint",children:u?"Error":"Result"}),l.jsx("pre",{className:"overflow-x-auto whitespace-pre-wrap break-all text-xs text-neutral",children:Dk(e.result)})]})]})]})}function Dk(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 O4({content:e}){return l.jsx("div",{className:"text-heading",children:l.jsx(_6,{remarkPlugins:[T6],components:{h1:n=>l.jsx("h1",{...n,className:"mt-3 mb-2 text-base font-semibold text-primary"}),h2:n=>l.jsx("h2",{...n,className:"mt-3 mb-2 text-sm font-semibold text-primary"}),h3:n=>l.jsx("h3",{...n,className:"mt-3 mb-1.5 text-sm font-semibold text-heading"}),h4:n=>l.jsx("h4",{...n,className:"mt-2 mb-1 text-xs font-semibold uppercase tracking-wide text-neutral"}),p:n=>l.jsx("p",{...n,className:"mb-2 leading-relaxed"}),ul:n=>l.jsx("ul",{...n,className:"mb-2 ml-4 list-disc space-y-1"}),ol:n=>l.jsx("ol",{...n,className:"mb-2 ml-4 list-decimal space-y-1"}),li:n=>l.jsx("li",{...n,className:"marker:text-mono-600"}),strong:n=>l.jsx("strong",{...n,className:"font-semibold text-primary"}),em:n=>l.jsx("em",{...n,className:"text-strong"}),code:({children:n,...i})=>l.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=>l.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=>l.jsx("a",{...n,className:"text-positive-400 underline decoration-positive-700 hover:decoration-positive-400",target:"_blank",rel:"noopener noreferrer"}),table:n=>l.jsx("div",{className:"mb-2 overflow-x-auto",children:l.jsx("table",{...n,className:"w-full border-collapse text-xs"})}),thead:n=>l.jsx("thead",{...n,className:"border-b border-base"}),th:n=>l.jsx("th",{...n,className:"px-2 py-1 text-left font-semibold text-neutral"}),tr:n=>l.jsx("tr",{...n,className:"border-b border-mono-900"}),td:n=>l.jsx("td",{...n,className:"px-2 py-1 text-strong"}),blockquote:n=>l.jsx("blockquote",{...n,className:"mb-2 border-l-2 border-strong pl-3 italic text-secondary"}),hr:()=>l.jsx("hr",{className:"my-3 border-base"})},children:e})})}function nee(){return l.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[l.jsx("div",{className:"text-[10px] uppercase tracking-wider text-positive-400",children:"Aero"}),l.jsxs("div",{className:"flex items-center gap-1","aria-label":"Aero is thinking",children:[l.jsx("span",{className:"aero-dot h-1.5 w-1.5 rounded-full bg-positive-400/80"}),l.jsx("span",{className:"aero-dot aero-dot-2 h-1.5 w-1.5 rounded-full bg-positive-400/60"}),l.jsx("span",{className:"aero-dot aero-dot-3 h-1.5 w-1.5 rounded-full bg-positive-400/40"})]})]})}function P4({isAdmin:e,account:n}){return e||n?.role==="viewer"&&VF()}function aee(){const{isAdmin:e,account:n}=ga(),i=Zk(),r=/^\/projects\/([^/]+)/.exec(i.pathname),u=r?decodeURIComponent(r[1]):null,h=yt({...Fo({client:J}),enabled:u!==null,staleTime:6e4}),f=pW(i.pathname,i.search),b=h.data??[],v=b.find(C=>C.id===u)??b.find(C=>C.name===u),x=YQ(v?.name??u??"",f),S=ty(),j=S||P4({isAdmin:e,account:n});return!u||!j||!v?null:l.jsx(BW,{projectName:v.name,context:x,preview:S},v.name)}function zk(e,n,i){switch(e.invalidateQueries({queryKey:n4({client:J})}),e.invalidateQueries({queryKey:Xr({client:J})}),Pn(e,"runs"),n){case Oe["answer-visibility"]:n0(e,i,"none"),Pn(e,"visibilityReport"),Pn(e,"queryTracking");return;case Oe["backlink-extract"]:return;case Oe["site-audit"]:Pn(e,"technicalAeo");return;case Oe["gsc-sync"]:case Oe["inspect-sitemap"]:Pn(e,"gsc");return;case Oe["ga-sync"]:Pn(e,"ga");return;case Oe["traffic-sync"]:Pn(e,"ga"),Pn(e,"traffic");return;case Oe["bing-inspect"]:case Oe["bing-inspect-sitemap"]:Pn(e,"bing");return;case Oe["aeo-discover-seed"]:case Oe["aeo-discover-probe"]:n0(e,i);return;case Oe["gbp-sync"]:Pn(e,"gbp");return;case Oe["ads-sync"]:Pn(e,"ads");return;case Oe["google-ads-sync"]:Pn(e,"googleAds"),Pn(e,"conversionTracking");return;case Oe["gtm-sync"]:Pn(e,"gtm"),Pn(e,"conversionTracking");return;default:return n}}const Ik=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:nj},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:x6},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:w6}],Ok=e=>({label:e,state:"checking",detail:"Checking service health"}),iee={apiStatus:Ok("API"),workerStatus:Ok("Worker")};function see(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function oee(e){const n=Ic(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function ree(e,n){return e.error?`${n}: ${F0(e.error)}`:e.location?`${n} · ${e.location}`:n}function Pk(e,n,i){if(n)return n;const r=i.find(u=>u.id===e);return r?.displayName||r?.name||e}function lee(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 cee(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function uee(){const e=Os(),n=_.useSyncExternalStore(r4,Fi,Fi),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=yt({...Fc({client:J}),enabled:i,staleTime:Es,refetchInterval:3e3}),u=yt({...Fo({client:J}),enabled:i}),h=_.useRef({}),f=_.useCallback(()=>{r.refetch()},[r.refetch]);return _.useEffect(()=>{i&&f()},[i,f]),_.useEffect(()=>{if(!i||typeof window>"u")return;const b=()=>{document.visibilityState==="visible"&&f()};return window.addEventListener("focus",f),document.addEventListener("visibilitychange",b),()=>{window.removeEventListener("focus",f),document.removeEventListener("visibilitychange",b)}},[i,f]),_.useEffect(()=>{const b=r.data??[],v=u.data??[],x=Object.fromEntries(b.map(j=>[j.id,j])),S=Object.fromEntries(b.map(j=>[j.id,j.status]));for(const j of Object.values(n.runs)){const C=x[j.runId];if(!C||!uX(C.status)||(h.current[C.id]??j.lastAnnouncedStatus)===C.status)continue;const z=v.find(R=>R.id===C.projectId);if(z&&zk(e,C.kind,z.name),j.sourceAction==="run-all"){ig(C.id);continue}const q=Pk(C.projectId,j.projectLabel,v);vn({title:oee(C),detail:ree(C,q),tone:see(C.status),dedupeKey:`run:${C.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:C.id}}),ig(C.id)}if(r.data!==void 0){const j=new Set(b.map(T=>T.id)),C=mX(Object.values(n.runs),j,Date.now(),dX);for(const T of C){const z=v.find(q=>q.id===T.projectId);z&&zk(e,T.kind,z.name),T.sourceAction!=="run-all"&&vn({title:`${Ic(T.kind)} status unavailable`,detail:Pk(T.projectId,T.projectLabel,v),tone:"neutral",dedupeKey:`run-stale:${T.runId}`,dedupeMode:"replace"}),ig(T.runId)}}for(const j of Object.values(n.batches)){const C=pX(j.runIds,x);C.finished&&(vn({title:"Run-all batch finished",detail:lee(C,j.skippedCount),tone:cee(C),dedupeKey:`batch:${j.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),cX(j.batchId))}h.current=S},[u.data,r.data,n,e]),null}function dee(){const{account:e,isAdmin:n}=ga(),i=yu(),r=_.useMemo(()=>VC(),[]),u=_.useMemo(LF,[]),h=_.useMemo(UF,[]),f=ty()||h&&P4({isAdmin:n,account:e}),b=_.useMemo($F,[]),v=Zk(),{dashboard:x,isLoading:S,refetch:j}=mp(void 0,{includeSettings:!r,includeOverviews:!1,pauseProjectPolling:v.pathname==="/setup"}),z=dy(!i,i?.health).data??i?.health??iee,{runId:q,evidenceId:R,closeDrawer:P}=my(),[M,L]=_.useState(!1),[$,Q]=_.useState(()=>{if(typeof window>"u")return!1;try{return window.localStorage.getItem("canonry:sidebarHidden")==="true"}catch{return!1}}),[ae,V]=_.useState(()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("canonry:dismissedUpdateVersion")}catch{return null}}),[Z]=_.useState(()=>typeof window>"u"?null:new URLSearchParams(window.location.search).get("force-update")),X=Z?{current:z.apiStatus.version??"0.0.0",latest:Z,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:z.apiStatus.updateAvailable,Ce=b&&X&&X.latest!==ae,tt=()=>{if(X){try{window.localStorage.setItem("canonry:dismissedUpdateVersion",X.latest)}catch{}V(X.latest)}},Ge=()=>{const re=!$;try{re?window.localStorage.setItem("canonry:sidebarHidden","true"):window.localStorage.removeItem("canonry:sidebarHidden")}catch{}Q(re)},Ve=WJ(q),ke=Ve.data??null,Le=Ve.isLoading;_.useEffect(()=>{ke&&ke.status!=="running"&&ke.status!=="queued"&&j()},[ke?.status,j]),_.useEffect(()=>{L(!1)},[v.pathname]),_.useEffect(()=>{if(typeof window>"u"||!q&&!R)return;const re=Ye=>{Ye.key==="Escape"&&P()};return window.addEventListener("keydown",re),()=>{window.removeEventListener("keydown",re)}},[q,R,P]);const B=x??i?.dashboard??null,W=v.pathname==="/setup",ve=W&&B!==null&&B.portfolioOverview.projects.length===0,Ae=W&&(v.search.onboarding==="site-health"||v.search.onboarding==="first-run"||v.search.onboarding==="complete"),[se,Se]=_.useState(ve);_.useEffect(()=>{W?ve&&Se(!0):Se(!1)},[ve,W]);const xe=W&&(Ae||ve||se||W&&B===null),pe=xe?"app-shell-focus":$?"app-shell-sidebar-hidden":"",ce=q?(B?kJ(B,q):void 0)??(ke?gu(ke,B?.projects.find(re=>re.project.id===ke.projectId)?.project.displayName??B?.projects.find(re=>re.project.id===ke.projectId)?.project.name??"Unknown project"):void 0):void 0,ue=_.useMemo(()=>vJ(v.pathname,B),[v.pathname,B]),{commandCenter:_e,evidenceLoading:Ze,evidenceError:Ee,isError:Ct,refetch:me}=YJ(R?ue:null,{evidence:!0}),Be=_.useMemo(()=>{if(R)return AJ(_e,B,R)},[R,_e,B]),Ne=(()=>{const re=v.pathname;if(re==="/")return"All projects";if(re==="/projects")return"Projects";if(re==="/runs")return"Runs";if(re==="/history")return"History";if(re==="/settings")return"Settings";if(re==="/setup")return"Setup";if(re==="/backlinks")return"Backlink data";if(re==="/traffic"||re.startsWith("/traffic/"))return"Traffic sources";if(re.startsWith("/projects/")){const Ye=B?.projects.find(vt=>vt.project.name===ue);return Ye?.project.displayName||Ye?.project.name||ue||"Projects"}return"Not found"})();if(r){const re=iC(r.projectTabs),Ye=!r.views||r.views.includes(oZ(v.pathname));return l.jsxs("div",{className:"app-shell app-shell-embed","data-theme":dZ(r.theme),style:mZ(r.theme),children:[l.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),l.jsx("main",{id:"content",className:"page-shell",children:re?l.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This embed uses the retired Report tab. Update its allowed tabs to show AI Visibility."}):Ye?l.jsx(pg,{}):l.jsx("div",{className:"embed-view-unavailable",role:"status",children:"This view is not available in embed mode."})})]})}return l.jsxs(l.Fragment,{children:[l.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),l.jsx(oW,{}),l.jsxs("div",{className:`app-shell ${pe}${To()?" app-shell-demo":""}`,children:[!xe&&!$&&l.jsxs("aside",{id:"desktop-sidebar",className:"sidebar","aria-label":"Primary navigation",children:[l.jsx("div",{className:"sidebar-brand",children:l.jsx(mk,{version:z.apiStatus.version,updateAvailable:Ce?X:null,onDismissUpdate:tt})}),l.jsxs("nav",{className:"sidebar-nav",children:[l.jsxs(at,{to:"/",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(p6,{className:"sidebar-icon"}),l.jsx("span",{children:"All projects"})]}),l.jsxs(at,{to:"/projects",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(h6,{className:"sidebar-icon"}),l.jsx("span",{children:"Projects"})]}),l.jsxs(at,{to:"/runs",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(f6,{className:"sidebar-icon"}),l.jsx("span",{children:"Runs"})]}),l.jsxs(at,{to:"/history",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(aj,{className:"sidebar-icon"}),l.jsx("span",{children:"History"})]}),l.jsxs(at,{to:"/traffic",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!1},children:[l.jsx(g6,{className:"sidebar-icon"}),l.jsx("span",{children:"Traffic sources"})]}),!To()&&l.jsxs(at,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(y6,{className:"sidebar-icon"}),l.jsx("span",{children:"Backlink data"})]}),n&&l.jsxs(at,{to:"/settings",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(b6,{className:"sidebar-icon"}),l.jsx("span",{children:"Settings"})]}),S?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),[1,2,3].map(re=>l.jsxs("div",{className:"sidebar-skeleton-item",children:[l.jsx("span",{className:"skeleton-circle size-2"}),l.jsx("span",{className:"skeleton-text flex-1",style:{width:`${50+re*15}%`}})]},re))]}):B&&B.projects.length>0?l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Tracked projects"}),B.projects.map(re=>{const Ye=re.visibilitySummary.tone;return l.jsxs(at,{to:"/projects/$projectName",params:{projectName:re.project.name},className:"sidebar-project",activeProps:{className:"sidebar-project sidebar-project-active"},children:[l.jsx("span",{className:`sidebar-dot sidebar-dot-${Ye}`}),l.jsx("span",{children:re.project.displayName||re.project.name})]},re.project.id)})]}):S?null:l.jsxs(l.Fragment,{children:[l.jsx("p",{className:"sidebar-section-title",children:"Resources"}),n&&l.jsxs(at,{to:"/setup",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(v6,{className:"sidebar-icon"}),l.jsx("span",{children:"Setup"})]})]})]}),e&&l.jsxs("div",{className:"sidebar-account",children:[l.jsxs("div",{className:"sidebar-account-identity",children:[l.jsx("span",{className:"sidebar-account-name",children:e.name}),e.role==="viewer"?l.jsx("span",{className:"sidebar-account-role",children:KS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:gn(async()=>{await QS(),window.location.reload()}),children:"Sign out"})]}),u?l.jsx("div",{className:"sidebar-footer",children:Ik.map(({label:re,href:Ye,Icon:vt})=>l.jsx("a",{className:"sidebar-footer-icon",href:Ye,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,children:l.jsx(vt,{className:"size-4"})},Ye))}):null]}),l.jsxs("div",{className:"main-area",children:[l.jsxs("header",{className:"topbar",children:[l.jsxs("div",{className:"topbar-left",children:[!xe&&l.jsx(le,{className:"sidebar-privacy-toggle",variant:"ghost",size:"icon",type:"button","aria-label":$?"Show sidebar":"Hide sidebar","aria-controls":$?void 0:"desktop-sidebar","aria-expanded":!$,title:$?"Show sidebar":"Hide sidebar",onClick:Ge,children:$?l.jsx(S6,{className:"size-4"}):l.jsx(k6,{className:"size-4"})}),l.jsx("div",{className:"topbar-brand-mobile",children:l.jsx(mk,{compact:!0})}),l.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[l.jsx(at,{to:"/",children:"Home"}),l.jsx(Jc,{className:"breadcrumb-sep size-3"}),l.jsx("span",{className:"breadcrumb-current",children:Ne})]})]}),l.jsxs("div",{className:"topbar-actions",children:[l.jsx(rW,{}),l.jsxs("div",{className:"health-pill-row",children:[l.jsxs("span",{className:`health-pill health-pill-${z.apiStatus.state}`,title:Jr(z.apiStatus),children:["API ",z.apiStatus.state==="ok"?"ok":z.apiStatus.state]}),l.jsx("span",{className:`health-pill health-pill-${z.workerStatus.state}`,title:Jr(z.workerStatus),children:`Worker ${z.workerStatus.state==="ok"?"ok":z.workerStatus.state}`})]}),xe?null:l.jsxs(le,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":M,"aria-controls":"mobile-nav",onClick:()=>L(re=>!re),children:[l.jsx(j6,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),xe?null:l.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${M?"mobile-nav-open":""}`,children:[l.jsxs(le,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>L(!1),children:[l.jsx(Wr,{className:"size-5"}),l.jsx("span",{className:"sr-only",children:"Close navigation"})]}),l.jsx(at,{to:"/",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"All projects"}),l.jsx(at,{to:"/projects",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Projects"}),l.jsx(at,{to:"/runs",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Runs"}),l.jsx(at,{to:"/history",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"History"}),l.jsx(at,{to:"/traffic",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!1},children:"Traffic sources"}),!To()&&l.jsx(at,{to:"/backlinks",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Backlink data"}),n&&l.jsx(at,{to:"/settings",className:"mobile-nav-link",activeProps:{className:"mobile-nav-link mobile-nav-link-active"},activeOptions:{exact:!0},children:"Settings"}),B&&B.projects.length>0?l.jsxs("div",{className:"mobile-nav-section",children:[l.jsx("p",{className:"mobile-nav-section-title",children:"Tracked projects"}),B.projects.map(re=>l.jsx(at,{to:"/projects/$projectName",params:{projectName:re.project.name},className:"mobile-nav-link",children:re.project.name},re.project.id))]}):null,e&&l.jsxs("div",{className:"mobile-nav-section",children:[l.jsx("p",{className:"mobile-nav-section-title",children:"Signed in"}),l.jsxs("div",{className:"sidebar-account",children:[l.jsxs("div",{className:"sidebar-account-identity",children:[l.jsx("span",{className:"sidebar-account-name",children:e.name}),e.role==="viewer"?l.jsx("span",{className:"sidebar-account-role",children:KS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm","data-testid":"mobile-sign-out",onClick:gn(async()=>{await QS(),window.location.reload()}),children:"Sign out"})]})]})]}),l.jsx("main",{id:"content",className:`page-shell ${f&&ue?"pb-20":""}`.trim(),children:S&&!i?l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-40"}),l.jsx("div",{className:"skeleton-text-sm w-72"})]}),l.jsx("div",{className:"page-skeleton-grid",children:[1,2,3].map(re=>l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton-text w-full"}),l.jsx("div",{className:"skeleton-text-sm w-3/4"})]},re))}),l.jsx("div",{className:"page-skeleton-grid",style:{gridTemplateColumns:"1fr 1fr"},children:[1,2].map(re=>l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-20"}),l.jsx("div",{className:"space-y-2",children:[1,2,3].map(Ye=>l.jsx("div",{className:"skeleton-text-sm w-full"},Ye))})]},re))})]}):l.jsx(pg,{})}),l.jsxs("footer",{className:"footer",children:[l.jsxs("span",{className:"footer-brand",children:[l.jsx("span",{children:l.jsx("a",{href:"https://canonry.ai",children:"Canonry"})}),z.apiStatus.version&&z.apiStatus.version!=="unknown"?l.jsxs("span",{className:"footer-version",children:["v",z.apiStatus.version]}):null]}),u?l.jsx("div",{className:"footer-links",children:Ik.map(({label:re,href:Ye,Icon:vt})=>l.jsx("a",{href:Ye,target:"_blank",rel:"noopener noreferrer",title:re,"aria-label":re,className:"footer-icon",children:l.jsx(vt,{className:"size-3.5"})},Ye))}):null]})]}),q&&!ce&&Le?l.jsx($d,{open:!0,title:"Loading run details",subtitle:"Fetching the durable run record",onClose:P,children:l.jsx("p",{className:"text-sm text-muted",role:"status",children:"Loading run details…"})}):null,q&&!ce&&Ve.isError?l.jsx($d,{open:!0,title:"Run unavailable",subtitle:"The run could not be loaded",onClose:P,children:l.jsx("p",{className:"text-sm text-negative",children:Ve.error instanceof Error?Ve.error.message:"Run details are unavailable."})}):null,ce?l.jsxs($d,{open:!0,title:ce.summary,subtitle:`${ce.projectName} · ${ce.kindLabel}`,onClose:P,children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[l.jsx(uy,{status:ce.status}),l.jsx("span",{className:"text-secondary",children:ce.startedAt}),l.jsx("span",{className:"text-muted",children:ce.duration}),l.jsx("span",{className:"text-faint",children:ce.triggerLabel})]}),ce.status==="failed"&&ce.statusDetail&&l.jsx("p",{className:"mt-2 text-sm text-negative",children:ce.statusDetail}),l.jsxs("div",{className:"mt-4",children:[l.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-muted mb-2",children:"Activity Log"}),Le?l.jsx("p",{className:"text-sm text-muted",children:"Loading run details..."}):ke?.snapshots&&ke.snapshots.length>0?l.jsxs("div",{className:"space-y-2",children:[ke.snapshots.map(re=>l.jsxs("div",{className:"rounded-lg border border-default bg-surface p-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[l.jsx("p",{className:"text-sm font-medium text-strong truncate",children:re.query??"Unknown query"}),l.jsxs("div",{className:"flex items-center gap-1.5",children:[l.jsx(oJ,{provider:re.provider}),l.jsx(k4,{variant:re.citationState===Ec.cited?"success":"neutral",children:re.citationState})]})]}),re.model&&l.jsx("p",{className:"text-[11px] text-muted font-mono",children:re.model}),re.citedDomains.length>0&&l.jsxs("p",{className:"text-xs text-muted mt-1",children:[l.jsx("span",{className:"text-secondary",children:"Sources:"})," ",re.citedDomains.join(", ")]}),re.citedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor cited: ",re.citedCompetitorDomains.join(", ")]}),re.mentionedCompetitorDomains.length>0&&l.jsxs("p",{className:"text-xs text-negative-400/80 mt-0.5",children:["Competitor mentioned: ",re.mentionedCompetitorDomains.join(", ")]}),re.groundingSources&&re.groundingSources.length>0&&l.jsxs("details",{className:"mt-2",children:[l.jsxs("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:[re.groundingSources.length," grounding source",re.groundingSources.length!==1?"s":""]}),l.jsx("ul",{className:"mt-2 space-y-3",children:re.groundingSources.map((Ye,vt)=>l.jsx("li",{className:"min-w-0",children:l.jsx(t0,{url:Ye.uri,title:Ye.title})},vt))})]}),re.answerText&&l.jsxs("details",{className:"mt-1",children:[l.jsx("summary",{className:"text-xs text-muted cursor-pointer hover:text-secondary",children:"Answer preview"}),l.jsx("p",{className:"mt-1 text-xs text-secondary leading-relaxed whitespace-pre-wrap",children:re.answerText})]})]},re.id)),ke.status==="running"&&l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),"Running remaining queries..."]})]}):ke&&ke.status===Nt.running?l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-caution-500 animate-pulse"}),ke.kind===Oe["answer-visibility"]?"Waiting for first query result...":"Run is in progress..."]}):ke&&ke.status===Nt.queued?l.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-muted",children:[l.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-mono-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):ke&&ke.error?l.jsxs("div",{className:"rounded-lg border border-negative-800/40 bg-negative-950/20 p-3",children:[l.jsx("p",{className:"text-sm font-medium text-negative mb-2",children:"Run failed"}),l.jsx("pre",{className:"max-h-48 overflow-y-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-negative",children:WQ(ke.error)})]}):ce.kind!==Oe["answer-visibility"]?l.jsx("p",{className:"text-sm text-secondary",children:ce.status===Nt.completed?"Run completed.":ce.status===Nt.partial?"Run completed with partial results.":ce.status===Nt.cancelled?"Run cancelled.":ce.status===Nt.failed?"Run failed.":"No run details available."}):l.jsx("p",{className:"text-sm text-muted",children:"No snapshot data available."})]})]}):null,R&&!Be?l.jsx($d,{open:!0,title:Ze?"Loading answer":"Answer unavailable",subtitle:"Query evidence",onClose:P,children:Ze?l.jsx("p",{role:"status",className:"text-sm text-secondary",children:"Loading answer…"}):l.jsxs(l.Fragment,{children:[l.jsx("p",{role:"alert",className:"text-sm text-secondary",children:Ee||Ct?"Could not load this answer.":"This answer is not in the available query evidence."}),l.jsx(le,{type:"button",variant:"outline",onClick:()=>{me()},children:"Retry"})]})}):null,Be?l.jsx(gJ,{evidence:Be.evidence,project:Be.project,onClose:P}):null,l.jsx(uee,{}),l.jsx(nW,{}),f?l.jsx(aee,{}):null]})]})}class mee extends _.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack),Sm({kind:"render",error:n,component:this.props.name??"root"})}handleReset=()=>{this.setState({error:null})};render(){return this.state.error?l.jsx("div",{className:"page-container",children:l.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-20 text-center",children:[l.jsx("div",{className:"rounded-full bg-negative-950/40 p-3",children:l.jsx(Rm,{className:"size-6 text-negative-400"})}),l.jsx("h2",{className:"text-lg font-semibold text-heading",children:"Something went wrong"}),l.jsx("p",{className:"text-sm text-secondary max-w-md",children:this.state.error.message||"An unexpected error occurred while rendering this page."}),l.jsxs("div",{className:"flex gap-3 mt-2",children:[l.jsxs(le,{variant:"secondary",size:"sm",onClick:this.handleReset,children:[l.jsx(A6,{className:"size-3.5 mr-1.5"}),"Try again"]}),l.jsx(le,{variant:"secondary",size:"sm",onClick:()=>{const n=window.__CANONRY_CONFIG__?.basePath?.replace(/\/$/,"")??"";window.location.href=n||"/"},children:"Go home"})]})]})}):this.props.children}}const Ta=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Oa("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));Ta.displayName="Card";const Lr=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Oa("flex flex-col gap-1.5 p-5",e),...n}));Lr.displayName="CardHeader";const q4=_.forwardRef(({className:e,...n},i)=>l.jsx("h3",{ref:i,className:Oa("font-medium tracking-tight text-primary",e),...n}));q4.displayName="CardTitle";const Tm=_.forwardRef(({className:e,...n},i)=>l.jsx("p",{ref:i,className:Oa("text-sm text-muted",e),...n}));Tm.displayName="CardDescription";const ko=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Oa("p-5 pt-0",e),...n}));ko.displayName="CardContent";function r0({disabled:e,title:n,...i}){const{canWrite:r}=ga();return r?l.jsx(le,{disabled:e,title:n,...i}):l.jsx(le,{...i,disabled:!0,title:XC})}function fy({title:e,children:n}){const{isAdmin:i}=ga();return i?l.jsx(l.Fragment,{children:n}):l.jsxs(Ta,{className:"surface-card mx-auto mt-8 max-w-lg",children:[l.jsxs(Lr,{children:[l.jsxs(q4,{children:[e," is for administrators"]}),l.jsx(Tm,{children:"Your account has view-only access. You can read everything this install has measured; changing how it is set up needs an administrator account."})]}),l.jsx(ko,{children:l.jsx("p",{className:"supporting-copy",children:"If you need to make a change here, ask an administrator on this install."})})]})}function Are(e,n,i){return{mode:n,scope:e.measurementScope,scopeKey:e.measurementScopeKey,marketKey:e.marketKey,queryClass:e.queryClass==="non-brand"?"non-brand":"branded",provider:e.provider,model:e.model,location:e.location,runId:e.measurementRunId,revision:e.revision,evaluationDefinitionId:i}}function Nre(e,n,i){const r=[...new Set(n.filter(u=>!i||u.provider===i).map(u=>u.sourceRunId).filter(u=>!!u))].sort();return{...e,mode:"simple",scope:"project",scopeKey:void 0,marketKey:void 0,provider:i||void 0,model:void 0,revision:void 0,runId:r.length===1?r[0]:void 0,runIds:r.length>1?r:void 0}}function Oc(e,n,i,r){return["sentiment",e,n,i??null,r??null]}const M4=5e3,pee=new Set(["pending","running","waiting-to-retry"]);function qk(e){return pee.has(e.state)}function hee(e){const n=e?.coverage.counts;return!!(n&&n.pending+n.running+n["waiting-to-retry"]>0)}function fee(e,n){return hee(e)||n?M4:!1}function gee(e,n,i=!0){const r=yt({queryKey:Oc(e,"settings"),queryFn:()=>Jd(e),retry:!1,staleTime:0,refetchOnWindowFocus:"always"}),u=yt({queryKey:Oc(e,"jobs"),queryFn:()=>EQ(e),enabled:!!r.data?.actions.configure,retry:!1,refetchOnWindowFocus:"always",refetchInterval:x=>x.state.data?.jobs.some(qk)?M4:!1}),h=!!u.data?.jobs.some(qk),f=x=>{const S={...n,queryClass:x};return{queryKey:Oc(e,"summary",S),queryFn:()=>AQ(e,S),enabled:i&&!!(r.data?.enabled&&r.data.installEnabled),retry:!1,staleTime:0,refetchOnWindowFocus:"always",refetchInterval:j=>fee(j.state.data,h)}},b=yt(f("branded")),v=yt(f("non-brand"));return{settings:r,branded:b,nonBrand:v,jobs:u}}const Vi={branded:"Branded","non-brand":"Non-brand"},gy=10;function yy(e){return e>=gy}const We={states:{disabled:"Sentiment is off.","not-measured":"No ratings yet.",processing:"Analyzing sentiment…",canceled:"Analysis canceled.",partial:"Partial results.",failed:"Analysis failed.",complete:"Analysis complete.",unsupported:"Sentiment unavailable."},noJudgments:"No ratings available.",tooFew:"too few",minRated:`Shown from ${gy} ratings`,partial:"Partial results",columns:{favorable:"Favorable",rated:"With opinion"},title:"Sentiment",subtitle:"How AI answers describe you in queries that name you",rated:"Share of answers that give an opinion (favorable, mixed or unfavorable) about who they name",noAnswers:"No answers yet",ratedUnavailable:"Unavailable",details:{ratedAnswers:"Answers with an opinion",unadmitted:"Checks not yet analyzed",checksCaption:"Not counted in the favorable share:",interval:"Likely range (95%)"},nonBrand:{label:"Non-brand queries",none:"No unfavorable or mixed answers in non-brand queries.",noneSoFar:"No unfavorable or mixed answers in non-brand queries so far.",notRated:"Non-brand answers are not rated yet.",view:"View answers",evidence:"Non-brand queries, unfavorable and mixed",rowNone:"No unfavorable or mixed answers",rowLabel:"Unfavorable or mixed",help:"A non-brand answer almost always names you to recommend you, so its favorable share is near 100% and says little. Sentiment is measured on branded queries; unfavorable or mixed answers to non-brand queries are listed here when they happen."},properties:{title:"Most criticized properties",evidence:"unfavorable and mixed",viewAll:"View all unfavorable and mixed answers",allEvidence:"Branded queries, unfavorable and mixed"},overall:"Favorable share of ratings in answers to branded queries. Each saved answer-subject assessment counts once. Answers with no opinion, or where it is unclear who they name, are left out.",favorable:"The favorable share of favorable, mixed and unfavorable ratings in answers to branded queries. Each rating covers one subject named in an answer; answers with no opinion are left out."},Pc="—",yee={factual:"Named, no opinion","subject-not-mentioned":"Not named in the answer","wrong-subject":"Named someone else","ambiguous-subject":"Unclear which one was meant","ambiguous-judgment":"Opinion unclear","subject-not-applicable":"Not applicable","unsupported-language":"Not in English","missing-source-text":"No answer text","input-too-large":"Answer too long to rate","invalid-conclusion-evidence":"Rating set aside",pending:"Waiting to be rated",running:"Being rated","waiting-to-retry":"Retrying"};function Qi(e){return yee[e]??e.replaceAll("-"," ").replace(/^./,n=>n.toUpperCase())}const Oo=["favorable","mixed","unfavorable"];function B4(e){return e==="favorable"?"positive":e==="unfavorable"?"negative":e==="mixed"?"caution":"neutral"}const Qc=["mixed","unfavorable"];function L4(e){return e.interval?`${um(e.interval.low,Fa.fraction)} to ${um(e.interval.high,Fa.fraction)}`:null}const gp={favorable:"progress-fill-info",mixed:"progress-fill-caution",unfavorable:"progress-fill-negative"};function tm(e){return`${e} ${e===1?"rating":"ratings"}`}function yp(e){return e.score.favorableRate!==null&&e.coverage.judged>0}function l0(e){return e.state==="complete"&&!e.provisional&&e.coverage.unadmittedAssessments===0}function U4(e){return e.state==="complete"?We.partial:We.states[e.state]}function by(e){return e?yp(e)&&yy(e.coverage.judged):!1}function bee({value:e,label:n}){const{counts:i,judged:r}=e.coverage;if(!yp(e))return l.jsx("div",{className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"empty","aria-hidden":"true"});const u=Oo.map(h=>`${i[h]} ${h}`).join(", ");return by(e)?l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${e.score.favorableDisplay} favorable of ${tm(r)}`,className:"sentiment-bar","data-sentiment-bar":"rated",children:Oo.filter(h=>i[h]>0).map(h=>l.jsx("span",{"data-outcome":h,className:`sentiment-bar-segment ${gp[h]}`,style:{flexGrow:i[h]},title:`${Qi(h)}: ${i[h]} of ${tm(r)}`},h))}):l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${tm(r)}, favorable share ${We.minRated.toLowerCase()}`,className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"too-few"})}function vee({value:e,label:n}){const{counts:i,judged:r}=e.coverage;return l.jsx("div",{role:"img","aria-label":`${n}: ${Oo.map(u=>`${i[u]} ${u}`).join(", ")}, ${tm(r)}`,className:"sentiment-property-bar",children:Oo.filter(u=>i[u]>0).map(u=>l.jsx("span",{"data-outcome":u,className:`sentiment-bar-segment ${gp[u]}`,style:{flexGrow:i[u]}},u))})}function xee(e){const n=new Map(e.breakdowns.filter(i=>i.dimension==="property").map(i=>[i.key,i]));return(e.criticizedProperties?.keys??[]).flatMap(i=>n.get(i)??[])}function wee({value:e,label:n}){return l.jsx("div",{role:"group","aria-label":`${n} favorable share`,className:"sentiment-class-favorable",children:by(e)?l.jsx("span",{className:"sentiment-class-share",children:e.score.favorableDisplay}):l.jsxs(l.Fragment,{children:[l.jsx("span",{"aria-hidden":"true",className:"sentiment-class-empty",title:We.minRated,children:Pc}),l.jsx("span",{className:"sr-only",children:We.minRated})]})})}function See({ratedAnswers:e=0,eligibleAnswers:n=0}){return`${e} of ${n} ${n===1?"answer":"answers"} rated`}function kee(e){const{eligibleAnswers:n}=e;return n===void 0?{display:Pc,detail:We.ratedUnavailable,empty:!0}:n<=0?{display:Pc,detail:We.noAnswers,empty:!0}:e.ratedAnswerRate===null||e.ratedAnswerRate===void 0?{display:Pc,detail:We.states.disabled,empty:!0}:{display:um(e.ratedAnswerRate,Fa.fraction),detail:See(e),empty:!1}}function jee({coverage:e,label:n}){const{display:i,detail:r,empty:u}=kee(e);return l.jsxs("div",{role:"group","aria-label":`${n} share rated`,className:"sentiment-class-ratings",children:[l.jsx("span",{"aria-hidden":"true",className:u?"sentiment-class-empty":void 0,title:r,children:i}),l.jsx("span",{className:"sr-only",children:u?r:`${i}, ${r}`})]})}function Aee({value:e}){return yp(e)?e.provisional?l.jsx("p",{className:"sentiment-class-note text-caution",children:We.partial}):null:l.jsx("p",{className:"sentiment-class-note",children:e.state==="complete"?We.noJudgments:We.states[e.state]})}function Nee(e){return!!(e.coverage.selected||e.coverage.eligibleAssessments||e.reason)}function Cee({value:e,queryClass:n,open:i,setOpenClass:r}){const u=_.useContext(pi),h=_.useId(),f=_.useId(),b=_.useId(),v=_.useRef(null),x=_.useRef(null),S=_.useCallback(()=>r(R=>R===n?null:R),[r,n]);_.useEffect(()=>{if(!i)return;const R=$=>$ instanceof Node&&!!(v.current?.contains($)||x.current?.contains($)),P=$=>{R($.target)||S()},M=$=>{R($.target)||S()},L=$=>{$.key==="Escape"&&(S(),v.current?.focus())};return document.addEventListener("pointerdown",P),document.addEventListener("focusin",M),document.addEventListener("keydown",L),()=>{document.removeEventListener("pointerdown",P),document.removeEventListener("focusin",M),document.removeEventListener("keydown",L)}},[i,S]);const{coverage:j,score:C}=e,T=L4(C),z=j.judged>0&&!yy(j.judged),q=n==="branded"?xee(e):[];return Nee(e)?l.jsxs(l.Fragment,{children:[l.jsx("button",{ref:v,type:"button",className:"sentiment-class-details-toggle","aria-label":`${Vi[n]} details`,"aria-expanded":i,"aria-controls":h,onClick:()=>r(R=>R===n?null:n),children:l.jsx(Yc,{className:"sentiment-class-details-chevron","aria-hidden":"true"})}),l.jsxs("div",{ref:x,id:h,role:"group","aria-labelledby":f,className:"sentiment-class-details",hidden:!i,children:[l.jsx("p",{id:f,className:"sentiment-class-details-title",children:Vi[n]}),l.jsxs("dl",{className:"sentiment-details-list",children:[(j.eligibleAnswers??0)>0&&l.jsxs("div",{children:[l.jsx("dt",{children:We.details.ratedAnswers}),l.jsxs("dd",{children:[j.ratedAnswers??0," of ",j.eligibleAnswers]})]}),z&&Oo.filter(R=>j.counts[R]>0).map(R=>l.jsxs("div",{children:[l.jsx("dt",{children:Qi(R)}),l.jsx("dd",{children:j.counts[R]})]},R)),z&&l.jsxs("div",{children:[l.jsx("dt",{children:"Favorable share"}),l.jsx("dd",{children:We.minRated})]}),T&&l.jsxs("div",{children:[l.jsxs("dt",{children:[We.details.interval," ",l.jsx(ma,{text:C.limitation,placement:"bottom"})]}),l.jsx("dd",{children:T})]})]}),u&&q.length>0&&l.jsxs("div",{className:"sentiment-details-properties",role:"group","aria-labelledby":b,children:[l.jsxs("p",{id:b,className:"sentiment-details-subtitle",children:[We.properties.title,e.criticizedProperties&&e.criticizedProperties.total>q.length?l.jsxs("span",{className:"sentiment-details-subtitle-count",children:[" · ",q.length," of ",e.criticizedProperties.total]}):null]}),l.jsx("ul",{children:q.map(R=>l.jsxs("li",{className:"sentiment-property",children:[l.jsx("button",{type:"button",className:"sentiment-property-name","aria-label":`View ${We.properties.evidence} answers for ${R.label}`,onClick:()=>{if(!v.current)return;const P=c0(u,e);u.openEvidence({...P,queryClass:n,scope:"property",scopeKey:R.key,marketKey:P.scope==="market"?P.scopeKey:P.marketKey,outcome:Qc},`${R.label}, ${We.properties.evidence}`,v.current)},children:R.label}),l.jsxs("span",{className:"sentiment-property-count",children:[R.coverage.counts.favorable," of ",R.coverage.judged," favorable"]}),l.jsx(vee,{value:R,label:R.label})]},R.key))}),l.jsx("button",{type:"button",className:"sentiment-property-name sentiment-details-view-all",onClick:()=>{v.current&&u.openEvidence({...c0(u,e),queryClass:n,outcome:Qc},We.properties.allEvidence,v.current)},children:We.properties.viewAll})]}),(j.unadmittedAssessments>0||Object.entries(j.counts).some(([R,P])=>P>0&&!Oo.includes(R)))&&l.jsx("p",{className:"sentiment-details-caption",children:We.details.checksCaption}),l.jsxs("dl",{className:"sentiment-details-list",children:[j.unadmittedAssessments>0&&l.jsxs("div",{children:[l.jsx("dt",{children:We.details.unadmitted}),l.jsx("dd",{children:j.unadmittedAssessments})]}),Object.entries(j.counts).filter(([R,P])=>P>0&&!["favorable","mixed","unfavorable"].includes(R)).map(([R,P])=>l.jsxs("div",{children:[l.jsx("dt",{children:Qi(R)}),l.jsx("dd",{children:P})]},R))]}),e.reason&&l.jsx("p",{className:"sentiment-class-details-reason",children:e.reason})]})]}):null}function vy(e){return!!(e?.configured&&e.branded.coverage.judged>0&&e.branded.score.favorableRate!==null)&&!rp()}function _ee({value:e}){if(!vy(e))return null;const n=e.branded,i=n.coverage.judged,r=L4(n.score),u=`${We.overall} ${i} of ${n.coverage.selected} judged${r?`, 95% interval ${r}`:""}. ${n.provisional?"Provisional. ":""}${We.states[n.state]}${n.reason?` ${n.reason}`:""}`;return l.jsx("div",{className:"project-row-stat","data-sentiment-score":!0,children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsxs("div",{className:"flex items-center gap-1",children:[l.jsx("p",{className:"metric-inline-label",children:"Sentiment"}),l.jsx("span",{className:"relative z-10",children:l.jsx(ma,{text:u,placement:"bottom"})})]}),yy(i)?l.jsxs("p",{className:"metric-inline-value",children:[n.score.favorableDisplay,l.jsx("span",{className:"sr-only",children:" favorable judgments, branded queries"})]}):l.jsxs("p",{className:"metric-inline-value text-secondary",children:[We.tooFew,l.jsxs("span",{className:"sr-only",children:[" ratings for a favorable share, ",i," of ",gy," needed, branded queries"]})]}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})})}const pi=_.createContext(null);function c0(e,n){const{selection:i}=n;return{...e.selection,...i,runId:i.runId??void 0,runIds:i.runId?void 0:i.runIds,revision:i.revision??void 0,evaluationDefinitionId:i.evaluationDefinitionId??void 0}}function Cre(){return _.useContext(pi)?.configured??!1}function _re({projectName:e,selection:n,runOptions:i=[],waitForResolvedRun:r=!1,evidenceReady:u=!0,hasSourceEvidence:h=!0,children:f}){return l.jsx(Tee,{projectName:e,selection:n,runOptions:i,waitForResolvedRun:r,evidenceReady:u,hasSourceEvidence:h,children:f})}function Tee({projectName:e,selection:n,runOptions:i,waitForResolvedRun:r,evidenceReady:u,hasSourceEvidence:h,children:f}){const b=JSON.stringify([e,n]),[v,x]=_.useState(null),S=_.useCallback(Ve=>x(ke=>ke?.key===b&&ke?.runId===Ve?.runId&&ke?.revision===Ve?.revision?ke:Ve?{...Ve,key:b}:null),[b]),j=u&&(!r||v?.key===b),C=r&&j&&v?{...n,runId:v.runId,revision:v.revision}:n,T=JSON.stringify([e,C]),{settings:z,branded:q,nonBrand:R,jobs:P}=gee(e,C,j&&h),[M,L]=_.useState(!1),[$,Q]=_.useState(null),ae=_.useRef(null);_.useEffect(()=>{L(!1),Q(null)},[T]);const V=j&&!!(z.data?.enabled&&z.data.installEnabled),X=(n.queryClass==="non-brand"?R.data:q.data)?.selection,Ce={...C,...X?{...X,runId:X.runId??void 0,runIds:X.runId?void 0:X.runIds,revision:X.revision??void 0,evaluationDefinitionId:X.evaluationDefinitionId??void 0}:{}},tt=Ce.runId&&!i.some(Ve=>Ve.id===Ce.runId)?[{id:Ce.runId,label:"Displayed sweep"},...i]:i,Ge=Ve=>{Ve.preventDefault(),ae.current?.focus()};return l.jsxs(pi.Provider,{value:{projectName:e,selection:C,resolveSource:S,settings:z,summaries:{branded:q,"non-brand":R},configured:V,hasSourceEvidence:h,openManage:Ve=>{ae.current=Ve,L(!0)},openEvidence:(Ve,ke,Le)=>{ae.current=Le,Q({selection:Ve,label:ke})}},children:[f,l.jsx(Wg,{open:M&&!!z.data?.actions.configure,onOpenChange:L,children:l.jsxs(Nm,{onCloseAutoFocus:Ge,className:"overflow-y-auto",children:[l.jsxs(e0,{children:[l.jsx(Cm,{children:"Manage sentiment"}),l.jsx(_m,{children:"Classify saved answers and review the cost before submitting a backfill."})]}),z.data?.actions.configure&&l.jsx(Vee,{projectName:e,settings:z.data,selection:Ce,runOptions:tt},JSON.stringify([z.data.evaluationDefinitionId,z.data.enabled,z.data.enablementEpoch])),P.data&&l.jsx(qee,{projectName:e,jobs:P.data.jobs})]})}),l.jsx(Wg,{open:$!==null,onOpenChange:Ve=>{Ve||Q(null)},children:l.jsxs(Nm,{onCloseAutoFocus:Ge,className:"overflow-y-auto",children:[l.jsxs(e0,{children:[l.jsxs(Cm,{children:["Sentiment evidence",$?`: ${$.label}`:""]}),l.jsx(_m,{children:"Stored judgments and exact quotations for the selected query and scope."})]}),$&&l.jsx(Iee,{projectName:e,selection:$.selection},JSON.stringify($.selection))]})})]})}function Tre(e,n){const i=_.useContext(pi)?.resolveSource;_.useEffect(()=>{i?.(e?{runId:e,revision:void 0}:null)},[i,e,n])}function Mk(){const e=_.useContext(pi);return e?.settings.data?.actions.configure?l.jsx(r0,{type:"button",variant:"outline",size:"sm",onClick:n=>e.openManage(n.currentTarget),children:e.settings.data.enabled?"Manage sentiment":"Enable sentiment"}):null}function V4(e,n){return!e?.configured||n==="unknown"||n==="unclassified"?null:["branded"]}function Eee({queryClass:e="all"}){const n=_.useContext(pi),i=V4(n,e);return!n?.hasSourceEvidence||!i?.some(r=>by(n.summaries[r].data))?null:l.jsx("ul",{className:"sentiment-legend","aria-hidden":"true",children:Oo.map(r=>l.jsxs("li",{children:[l.jsx("span",{className:`sentiment-legend-swatch ${gp[r]}`}),Qi(r)]},r))})}function Ree({queryClass:e}){const n=_.useContext(pi);if(!n?.hasSourceEvidence)return null;const i=n.summaries["non-brand"],r=i.data,u=e==="non-brand";if(!r)return u?i.isError?l.jsxs("p",{role:"alert",className:"sentiment-nonbrand-note",children:["Couldn’t load non-brand sentiment. ",l.jsx(le,{variant:"ghost",onClick:()=>{i.refetch()},children:"Retry"})]}):l.jsx("p",{role:"status",className:"sentiment-nonbrand-note",children:"Loading non-brand sentiment…"}):null;const h=r.coverage.counts;return h.unfavorable===0&&h.mixed===0?u?l0(r)?l.jsx("p",{className:"sentiment-nonbrand-note",children:We.nonBrand.none}):yp(r)?l.jsx("p",{className:"sentiment-nonbrand-note",children:We.nonBrand.noneSoFar}):l.jsx("p",{className:"sentiment-nonbrand-note",children:r.state==="not-measured"?We.nonBrand.notRated:`${We.nonBrand.label}: ${U4(r)}`}):null:l.jsx("div",{className:"sentiment-nonbrand",role:"group","aria-label":We.nonBrand.label,children:l.jsxs("div",{className:"sentiment-nonbrand-line",children:[l.jsxs("span",{className:"sentiment-nonbrand-label",children:[We.nonBrand.label,l.jsx(ma,{text:We.nonBrand.help})]}),l.jsxs("span",{className:"sentiment-nonbrand-counts",children:[Qc.slice().reverse().filter(f=>h[f]>0).map(f=>l.jsxs("span",{children:[l.jsx("span",{"aria-hidden":"true",className:`sentiment-legend-swatch ${gp[f]}`}),h[f]," ",f]},f)),!l0(r)&&l.jsx("span",{className:"text-caution",children:We.partial})]}),l.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:f=>n.openEvidence({...c0(n,r),queryClass:"non-brand",outcome:Qc},We.nonBrand.evidence,f.currentTarget),children:We.nonBrand.view})]})})}function Ere({queryClass:e="all",legend:n=!0,manage:i=!1}){const r=_.useContext(pi),u=V4(r,e),[h,f]=_.useState(null);if(!r)return null;if(!u){const v=r.settings.data;return!i||!v?.actions.configure?null:l.jsxs("div",{className:"sentiment-headlines-title",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"sentiment-headlines-heading",children:We.title}),!(v.enabled&&v.installEnabled)&&l.jsx("p",{className:"sentiment-headlines-subtitle",children:We.states.disabled})]}),l.jsx(Mk,{})]})}const b=r.hasSourceEvidence&&u.some(v=>r.summaries[v].data);return l.jsxs("div",{className:"sentiment-headlines",role:"group","aria-label":"Favorable answer scores",children:[l.jsxs("div",{className:"sentiment-headlines-title",children:[l.jsxs("div",{children:[l.jsx("h3",{className:"sentiment-headlines-heading",children:We.title}),l.jsx("p",{className:"sentiment-headlines-subtitle",children:We.subtitle})]}),i&&l.jsx(Mk,{})]}),n&&l.jsx(Eee,{queryClass:e}),b&&l.jsxs("div",{className:"sentiment-headlines-columns","aria-hidden":"true",children:[l.jsx("span",{className:"sentiment-headlines-favorable",children:We.columns.favorable}),l.jsx("span",{className:"sentiment-headlines-ratings",title:We.rated,children:We.columns.rated})]}),u.map(v=>{const x=r.summaries[v];return l.jsxs("div",{className:"sentiment-class","data-query-class":v,children:[l.jsxs("div",{className:"sentiment-class-label",children:[l.jsx("span",{children:Vi[v]}),l.jsx(ma,{text:We.favorable})]}),r.hasSourceEvidence?x.data?l.jsxs(l.Fragment,{children:[l.jsx(bee,{value:x.data,label:Vi[v]}),l.jsx(wee,{value:x.data,label:Vi[v]}),l.jsx(jee,{coverage:x.data.coverage,label:Vi[v]}),l.jsx(Aee,{value:x.data}),l.jsx(Cee,{value:x.data,queryClass:v,open:h===v,setOpenClass:f})]}):x.isError?l.jsxs("p",{role:"alert",className:"sentiment-class-status",children:["Couldn’t load sentiment. ",l.jsx(le,{variant:"ghost",onClick:()=>{x.refetch()},children:"Retry"})]}):l.jsx("p",{role:"status",className:"sentiment-class-status",children:"Loading sentiment…"}):l.jsx("p",{className:"sentiment-class-status",children:"No saved answers."})]},v)}),e!=="branded"&&l.jsx(Ree,{queryClass:e})]})}function Rre({queryId:e,sourceSnapshotIds:n=[],queryClass:i,location:r,showLabel:u=!1}){const h=_.useContext(pi);if(!h?.configured)return null;const f=i?h.summaries[i]:void 0,b=h.hasSourceEvidence?f?.data:void 0,v=b?.queries.filter(C=>C.queryClass===i&&(e?C.queryId===e:n.length>0)&&n.every(T=>C.sourceSnapshotIds.includes(T)))??[],x=v.length===1?v[0]:void 0,S=r===void 0?x:x?.locations.find(C=>C.location===r);if(!x||!S)return l.jsx("span",{className:"text-sm text-secondary",children:h.hasSourceEvidence&&f?.isPending&&(e||n.length)?"Loading…":"Unavailable"});const j={...h.selection,...b.selection,runId:b.selection.runId??void 0,runIds:b.selection.runId?void 0:b.selection.runIds,revision:b.selection.revision??void 0,evaluationDefinitionId:b.selection.evaluationDefinitionId??void 0,queryClass:x.queryClass,queryId:x.queryId,executionNodeKey:x.executionNodeKey??void 0,...r===void 0?{}:{location:r??"none"}};if(x.queryClass==="non-brand"){if(S.state==="unsupported")return l.jsx("span",{className:"text-sm text-secondary",children:"Unavailable"});const{unfavorable:C,mixed:T}=S.coverage.counts;if(C===0&&T===0){const z=u&&l.jsx("span",{className:"block text-sm font-normal text-secondary",children:We.nonBrand.rowLabel});return l0(S)?l.jsxs("span",{className:"text-sm text-muted",children:[z,l.jsx("span",{"aria-hidden":"true",title:We.nonBrand.rowNone,children:Pc}),l.jsx("span",{className:"sr-only",children:We.nonBrand.rowNone})]}):l.jsxs("span",{className:"text-sm text-secondary",children:[z,l.jsx("span",{children:U4(S)})]})}return l.jsxs(le,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-col items-start gap-0 px-1","aria-label":`View unfavorable and mixed answers for ${x.queryText}`,onKeyDown:z=>z.stopPropagation(),onClick:z=>{z.stopPropagation(),h.openEvidence({...j,outcome:Qc},`${x.queryText}, unfavorable and mixed`,z.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:We.nonBrand.rowLabel}),C>0&&l.jsxs("span",{className:"text-sm text-negative",children:[C," unfavorable"]}),T>0&&l.jsxs("span",{className:"text-sm text-caution",children:[T," mixed"]}),S.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}return l.jsxs(le,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-col items-start gap-0 px-1","aria-label":`View ${Vi[x.queryClass]} sentiment evidence for ${x.queryText}`,onKeyDown:C=>C.stopPropagation(),onClick:C=>{C.stopPropagation(),h.openEvidence(j,x.queryText,C.currentTarget)},children:[u&&l.jsx("span",{className:"text-sm font-normal text-secondary",children:"Favorable"}),l.jsx("span",{className:"font-mono text-primary",children:S.score.favorableDisplay}),l.jsxs("span",{className:"text-sm font-normal text-secondary",children:[S.coverage.judged," judged"]}),S.provisional&&l.jsx("span",{className:"text-xs font-normal text-caution",children:"Provisional"})]})}function Dee(e){return e.outcome==="subject-not-mentioned"?"Not mentioned":e.outcome==="running"?"Classifying":e.outcome==="waiting-to-retry"?"Retrying":e.outcome?Qi(e.outcome):e.state==="not-measured"?"Not classified":e.state==="processing"?"Classifying":e.state==="failed"?"Failed":e.state==="canceled"?"Canceled":"Unavailable"}function Dre({queryId:e,sourceSnapshotIds:n,queryClass:i,provider:r,model:u,location:h,showSubjects:f=!1,showLabel:b=!1}){const v=_.useContext(pi);if(!v?.configured)return null;const x=i?v.summaries[i]:void 0,S=v.hasSourceEvidence?x?.data:void 0,j=S?.queries.filter(z=>z.queryClass===i&&(!e||z.queryId===e)&&n.length>0&&n.every(q=>z.sourceSnapshotIds.includes(q)))??[],C=j.length===1?j[0]:void 0,T=C?.assessments?.filter(z=>n.includes(z.sourceSnapshotId)&&z.provider===r&&z.location===h&&(u===void 0||z.servedModel===u))??[];return l.jsxs("div",{role:"group",className:"text-sm text-secondary","aria-label":`${r||"Saved answer"} sentiment`,children:[b&&l.jsx("span",{className:"block text-sm text-secondary",children:"Sentiment"}),T.length?T.map(z=>{const q=Dee(z),R=B4(z.outcome),P=l.jsxs(l.Fragment,{children:[f&&l.jsxs("span",{children:[z.subjectLabel," · "]}),l.jsx(Sn,{tone:R,className:"max-w-full shrink-0 rounded-none border-0 bg-transparent p-0 text-sm font-normal tracking-normal [overflow-wrap:normal]",children:q})]}),M={...v.selection,...S.selection,runId:S.selection.runId??void 0,runIds:S.selection.runId?void 0:S.selection.runIds,revision:S.selection.revision??void 0,evaluationDefinitionId:S.selection.evaluationDefinitionId??void 0,queryClass:C.queryClass,queryId:C.queryId,executionNodeKey:C.executionNodeKey??void 0,assessmentId:z.assessmentId??void 0};return l.jsxs("div",{className:"flex items-center gap-1",children:[z.assessmentId?l.jsx(le,{type:"button",variant:"ghost",className:"h-auto min-h-11 flex-wrap justify-start whitespace-normal px-1 text-left text-sm","aria-label":`View ${z.provider} sentiment evidence for ${z.subjectLabel}: ${q}`,onKeyDown:L=>L.stopPropagation(),onClick:L=>{L.stopPropagation(),v.openEvidence(M,`${C.queryText} · ${z.provider} · ${z.subjectLabel}`,L.currentTarget)},children:P}):l.jsx("span",{children:P}),z.reason&&l.jsx(ma,{text:z.reason})]},JSON.stringify([z.sourceSnapshotId,z.subjectId,z.assessmentId]))}):l.jsx("span",{children:v.hasSourceEvidence&&x?.isPending&&n.length?"Loading…":"Unavailable"})]})}function zee({item:e}){return l.jsxs("article",{className:"space-y-4 border-b border-default py-5 text-sm text-secondary",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[l.jsx("strong",{className:"text-primary",children:e.subject.displayName}),l.jsx(Sn,{tone:B4(e.outcome),children:Qi(e.outcome)}),l.jsx("span",{children:Vi[e.context.queryClass]}),l.jsx("span",{children:e.context.provider}),l.jsx("span",{children:e.context.servedModel??"Source model unavailable"}),l.jsx("span",{children:e.context.location??"No location"})]}),e.reason&&l.jsx("p",{children:e.reason}),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-heading",children:"Conclusion evidence"}),e.conclusion.length?e.conclusion.map(n=>l.jsx("blockquote",{className:"mb-2 border-l border-strong pl-3 text-primary",children:n.text},`${n.id}:${n.start}`)):l.jsx("p",{children:"No valid conclusion evidence is available."})]}),l.jsxs("section",{children:[l.jsx("h3",{className:"mb-2 text-heading",children:"Complaint evidence"}),e.complaint?.length?e.complaint.map(n=>l.jsx("blockquote",{className:"mb-2 border-l border-strong pl-3 text-primary",children:n.text},`${n.id}:${n.start}`)):l.jsx("p",{children:"No complaint was identified."})]}),l.jsxs("details",{children:[l.jsx("summary",{className:"cursor-pointer",children:"Original source answer"}),l.jsx("p",{className:"mt-2 whitespace-pre-wrap break-words text-primary",children:e.sourceText})]}),l.jsxs("details",{children:[l.jsx("summary",{className:"cursor-pointer",children:"Assessment provenance"}),l.jsxs("dl",{className:"mt-3 space-y-2 break-all",children:[l.jsx("dt",{children:"Query"}),l.jsx("dd",{children:e.context.queryText}),l.jsx("dt",{children:"Subject"}),l.jsxs("dd",{children:[e.subject.displayName," (",e.subject.id,")"]}),l.jsx("dt",{children:"Run"}),l.jsx("dd",{children:e.runId}),l.jsx("dt",{children:"Revision"}),l.jsx("dd",{children:e.context.revision??"Unavailable"}),l.jsx("dt",{children:"Evaluator"}),l.jsx("dd",{children:e.returnedModel??"Unavailable"}),l.jsx("dt",{children:"Evaluation definition"}),l.jsx("dd",{children:e.evaluationDefinitionId}),l.jsx("dt",{children:"Source snapshot"}),l.jsx("dd",{children:e.sourceSnapshotId}),l.jsx("dt",{children:"Source hash"}),l.jsx("dd",{children:e.sourceTextHash}),e.context.usageEdges.map((n,i)=>l.jsxs("div",{children:[l.jsx("dt",{children:"Assignment"}),l.jsxs("dd",{children:["Target ",n.targetId,"; Property ",n.propertyId??"None","; market ",n.marketId??"None","; ",n.queryClass]})]},i))]})]})]})}function Iee({projectName:e,selection:n}){const[i,r]=_.useState(),u=yt({queryKey:Oc(e,"evidence",n,i),queryFn:()=>CQ(e,n,i),retry:!1});return u.isPending?l.jsx("p",{role:"status",className:"mt-4 text-sm text-secondary",children:"Loading sentiment evidence…"}):u.isError?l.jsxs("p",{role:"alert",className:"mt-4 text-sm text-secondary",children:["Could not load sentiment evidence. ",l.jsx(le,{variant:"outline",onClick:()=>{u.refetch()},children:"Retry evidence"})]}):l.jsxs(l.Fragment,{children:[u.data.items.length?u.data.items.map(h=>l.jsx(zee,{item:h},h.assessmentId)):l.jsx("p",{className:"mt-4 text-sm text-secondary",children:"No stored sentiment evidence for this query and scope."}),l.jsxs("div",{className:"mt-3 flex gap-2",children:[i&&l.jsx(le,{variant:"outline",onClick:()=>r(void 0),children:"First evidence page"}),u.data.nextCursor&&l.jsx(le,{variant:"outline",onClick:()=>r(u.data.nextCursor??void 0),children:"Next evidence page"})]})]})}function Oee({projectName:e,jobId:n}){const[i,r]=_.useState(),u=yt({queryKey:Oc(e,`job:${n}`,void 0,i),queryFn:()=>RQ(e,n,i),retry:!1});return u.isPending?l.jsx("p",{role:"status",children:"Loading attempts…"}):u.isError?l.jsxs("p",{role:"alert",children:["Could not load attempts. ",l.jsx(le,{variant:"outline",onClick:()=>{u.refetch()},children:"Retry attempts"})]}):l.jsxs(l.Fragment,{children:[u.data.attempts.map(h=>l.jsxs("p",{children:[h.errorCode??"Request complete","; ",h.usage.kind==="unknown"?"Usage unknown":`${h.usage.inputTokens??"Unknown"} input tokens (${h.usage.kind})`]},h.id)),l.jsxs("div",{className:"mt-2 flex gap-2",children:[i&&l.jsx(le,{variant:"outline",onClick:()=>r(void 0),children:"Newest attempts"}),u.data.nextAttemptCursor&&l.jsx(le,{variant:"outline",onClick:()=>r(u.data.nextAttemptCursor??void 0),children:"Older attempts"})]})]})}function Pee({projectName:e,job:n}){const[i,r]=_.useState(!1);return l.jsxs("details",{onToggle:u=>r(u.currentTarget.open),children:[l.jsx("summary",{children:"Job details"}),n.cancellationReason&&l.jsx("p",{children:n.cancellationReason}),Object.entries(n.counts).filter(([,u])=>u>0).map(([u,h])=>l.jsxs("p",{children:[Qi(u),": ",h]},u)),l.jsxs("p",{children:["Attempts: ",n.attemptCount]}),i&&n.attemptCount>0&&l.jsx(Oee,{projectName:e,jobId:n.id})]})}function qee({projectName:e,jobs:n}){return l.jsxs("details",{className:"mt-6 text-sm text-secondary",children:[l.jsx("summary",{className:"cursor-pointer",children:"Recent sentiment jobs"}),n.length===0?l.jsx("p",{className:"mt-2",children:"No sentiment jobs have been submitted."}):l.jsx("div",{className:"data-table-wrapper mt-3",children:l.jsxs("table",{className:"data-table","aria-label":"Sentiment jobs",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Submitted"}),l.jsx("th",{children:"State"}),l.jsx("th",{children:"Selected"}),l.jsx("th",{children:"Details"})]})}),l.jsx("tbody",{children:n.map(i=>l.jsxs("tr",{children:[l.jsx("td",{children:iZ(i.createdAt)}),l.jsx("td",{children:Qi(i.state)}),l.jsx("td",{children:i.selected}),l.jsx("td",{children:l.jsx(Pee,{projectName:e,job:i})})]},i.id))})]})})]})}const Mee={probe:"Probe sweeps","unsupported-run-kind":"Not an answer sweep","failed-run":"Failed sweep","incomplete-run":"Incomplete sweep","legacy-missing-provenance":"Saved without its frozen query and subject record","legacy-missing-language":"Saved before the answer language was recorded","excluded-branded":"Branded answers (backfill that class separately)","excluded-non-brand":"Non-brand answers (backfill that class separately)"};function Bee(e){return Mee[e]??Qi(e)}function $4(e){return[e.provider&&`engine ${e.provider}`,e.model&&`model ${e.model}`,e.location&&(e.location==="none"?"no location":`location ${e.location}`),e.scope!=="project"&&e.scopeKey&&`${e.scope} ${e.scopeKey}`,e.marketKey&&`market ${e.marketKey}`,e.queryId&&`query ${e.queryId}`,e.revision!==void 0&&`revision ${e.revision}`].filter(n=>!!n)}function Lee(e){const n=$4(e);return[`${Vi[e.queryClass]} queries`,...n.length?n:["whole sweep"]].join(" · ")}function Uee(e,n,i,r){return r?{...e,queryClass:i,queryId:void 0,runIds:void 0,runId:n}:{mode:"auto",scope:"project",queryClass:i,runId:n}}function Vee({projectName:e,settings:n,selection:i,runOptions:r}){const u=Os(),[h,f]=_.useState(n.enabled),[b,v]=_.useState(i.runId??""),[x,S]=_.useState(i.queryClass),[j,C]=_.useState(!1),[T,z]=_.useState(null),q=_.useRef(null),R=$4({...i,queryId:void 0}),P=()=>u.invalidateQueries({queryKey:["sentiment",e]}),M=()=>{z(null),q.current=null},L=ci({mutationFn:async()=>{if(!(await Jd(e)).actions.configure)throw new Error("Administrator permission is required to configure sentiment.");return NQ(e,{enabled:h})},onSuccess:async()=>{M(),await P(),await u.invalidateQueries({queryKey:["project-overview-slim"]})},onError:P}),$=ci({mutationFn:async()=>{if(!(await Jd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return _Q(e,Uee(i,b,x,j&&R.length>0))},onSuccess:V=>{z(V),q.current=crypto.randomUUID()},onError:P}),Q=ci({mutationFn:async()=>{if(!T?.previewToken||!q.current)throw new Error("Create and review a backfill preview first.");if(!(await Jd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return TQ(e,T.previewToken,q.current)},onSuccess:async()=>{M(),await P()},onError:P}),ae=L.isPending||$.isPending||Q.isPending;return l.jsxs("div",{className:"mt-5 space-y-5 text-sm text-secondary",children:[l.jsx("p",{children:n.disclosure}),!n.ready&&l.jsx("p",{children:n.readinessReasons.join("; ")||"An operator must configure sentiment on this installation."}),l.jsxs("form",{className:"space-y-3",onSubmit:V=>{V.preventDefault(),L.mutate()},children:[l.jsxs("label",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"checkbox",checked:h,disabled:ae,onChange:V=>{f(V.target.checked),M()}}),"Enable project sentiment"]}),l.jsx("p",{children:"Enabling applies to future completed sweeps. Past sweeps require an explicit backfill."}),l.jsx(r0,{type:"submit",disabled:ae,children:L.isPending?"Saving…":"Save sentiment settings"}),L.isError&&l.jsx("p",{role:"alert",children:Li(L.error)}),L.isSuccess&&l.jsx("p",{role:"status",children:"Sentiment settings saved."})]}),n.actions.backfill&&l.jsxs("section",{className:"space-y-3",children:[l.jsx("h3",{children:"Backfill a saved sweep"}),l.jsxs("label",{className:"block",children:["Saved sweep",l.jsxs("select",{className:"mt-1 block w-full rounded-md border border-default bg-bg p-2 text-primary",value:b,disabled:ae,onChange:V=>{v(V.target.value),M()},children:[l.jsx("option",{value:"",children:"Select a saved sweep"}),r.map(V=>l.jsx("option",{value:V.id,children:V.label},V.id))]})]}),l.jsxs("label",{className:"block",children:["Query class",l.jsxs("select",{className:"mt-1 block w-full rounded-md border border-default bg-bg p-2 text-primary",value:x,disabled:ae,onChange:V=>{S(V.target.value),M()},children:[l.jsx("option",{value:"non-brand",children:"Non-brand"}),l.jsx("option",{value:"branded",children:"Branded"})]})]}),l.jsx("p",{children:"The backfill covers every engine, location and query of the chosen sweep for this query class."}),R.length>0&&l.jsxs("label",{className:"flex items-start gap-2",children:[l.jsx("input",{type:"checkbox",className:"mt-1",checked:j,disabled:ae,onChange:V=>{C(V.target.checked),M()}}),l.jsxs("span",{children:["Limit to the current view",l.jsx("span",{className:"block",children:R.join(" · ")})]})]}),l.jsx(le,{variant:"outline",disabled:ae||!b||!n.enabled||!n.ready,onClick:()=>{M(),$.mutate()},children:$.isPending?"Preparing preview…":"Preview sentiment backfill"}),$.isError&&l.jsx("p",{role:"alert",children:Li($.error)}),T&&l.jsxs("div",{className:"space-y-3",children:[l.jsxs("dl",{className:"grid grid-cols-[1fr_auto] gap-2",children:[l.jsx("dt",{children:"Selection"}),l.jsx("dd",{className:"text-right",children:Lee(T.selection)}),l.jsx("dt",{children:"Eligible assessments"}),l.jsx("dd",{children:T.eligibleAssessments}),l.jsx("dt",{children:"Already classified"}),l.jsx("dd",{children:T.alreadyClassified}),l.jsx("dt",{children:"Estimated input tokens"}),l.jsx("dd",{children:T.estimatedInputTokens}),l.jsx("dt",{children:"Estimated cost (USD)"}),l.jsx("dd",{children:T.estimatedCostUsd??"Unavailable"})]}),l.jsx(ma,{text:T.estimateMethod}),T.eligibleAssessments===0&&l.jsx("p",{children:"No saved answers in this selection can be classified."}),T.skipped.length>0&&l.jsxs("div",{children:[l.jsx("p",{children:"Not included:"}),l.jsx("ul",{"aria-label":"Skipped assessments",className:"list-disc pl-5",children:T.skipped.map(V=>l.jsxs("li",{children:[Bee(V.reason),": ",V.count]},`${V.runId}:${V.reason}`))})]}),l.jsx(r0,{disabled:ae||!T.previewToken||T.eligibleAssessments===0,onClick:()=>Q.mutate(),children:Q.isPending?"Submitting…":"Confirm sentiment backfill"})]}),Q.isError&&l.jsxs("p",{role:"alert",children:[Li(Q.error)," Retry uses the same request key."]}),Q.isSuccess&&l.jsx("p",{role:"status",children:"Backfill submitted. Progress is available in Recent jobs."})]})]})}const $ee=20,Kee=6;function Gee({points:e,tone:n}){const i=_.useId();if(e.length===0)return null;const r=42,u=132,h=5,f=u-h*2,b=r-h*2,v=b-Kee,x=R=>h+R/Math.max(e.length-1,1)*f,S=GH(e),j=Math.min(...e),C=Math.max(...e),T=Math.max(C-j,$ee),z=(C+j)/2-T/2,q=e.map((R,P)=>({x:x(P),y:h+(1-(R-z)/T)*v}));return l.jsxs("svg",{className:`sparkline sparkline-${n}${S?" sparkline-provisional":""}`,viewBox:`0 0 ${u} ${r}`,"aria-hidden":"true",children:[l.jsx("defs",{children:l.jsx("clipPath",{id:i,children:l.jsx("rect",{x:h,y:h,width:f,height:b,rx:"8"})})}),l.jsx("line",{className:"sparkline-guide",x1:h,x2:u-h,y1:r-h,y2:r-h}),q.length===1?l.jsx("circle",{className:"sparkline-point",cx:q[0].x,cy:q[0].y,r:"3"}):l.jsx("polyline",{clipPath:`url(#${i})`,points:q.map(R=>`${R.x},${R.y}`).join(" "),vectorEffect:"non-scaling-stroke"})]})}function Hee({project:e,sentimentColumn:n}){return l.jsxs("div",{className:`project-row relative${n?" project-row-with-sentiment":""}`,children:[l.jsx("div",{className:"project-row-chart",children:l.jsx(Gee,{points:e.trend,tone:i4(e.lastRun.status)})}),l.jsxs("div",{className:"project-row-primary",children:[l.jsxs(at,{to:"/projects/$projectName",params:{projectName:e.project.name},className:"after:absolute after:inset-0 after:rounded-xl focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-mono-400",children:[l.jsx("p",{className:"project-name",children:e.project.name}),l.jsx("p",{className:"project-domain",children:e.project.canonicalDomain})]}),l.jsx("p",{className:"project-insight",children:e.insight})]}),l.jsx("div",{className:"project-row-stat",children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsx("p",{className:"metric-inline-label",children:"Mentioned"}),l.jsx("p",{className:`metric-inline-value ${e.mentionTone==="caution"?"text-caution-400":""}`,children:e.hasMeasurement===!1?"Not measured":um(e.mentionScore,Fa.percent)}),l.jsx("p",{className:`metric-inline-caption${e.providerCoverage?" text-caution":""}`,title:e.providerCoverage,children:e.providerCoverage?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"sr-only",children:"Partial sweep: "}),e.providerCoverage]}):e.mentionDelta})]})}),l.jsx("div",{className:"project-row-stat",children:l.jsxs("div",{className:"metric-inline-block",children:[l.jsxs("p",{className:"metric-inline-label",children:[l.jsx("span",{"aria-hidden":"true",children:"Pressure"}),l.jsx("span",{className:"sr-only",children:"Competitor pressure"})]}),l.jsx("p",{className:"metric-inline-value",children:e.hasMeasurement===!1?"Not measured":e.competitorPressureLabel}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})}),vy(e.sentiment)?l.jsx(_ee,{value:e.sentiment}):n&&l.jsx("div",{className:"project-row-stat","aria-hidden":"true","data-sentiment-placeholder":!0}),l.jsx("span",{className:"project-row-link",children:l.jsx(Jc,{className:"h-4 w-4 text-muted"})})]})}function Fee(){const{isAdmin:e}=ga(),n=yu(),{dashboard:i,isLoading:r,isError:u,activityLoading:h,activityError:f,refetch:b}=mp(),v=i??n?.dashboard,S=dy(!n,n?.health),{openRun:j}=my();if(u&&!v)return l.jsxs("div",{className:"page-container",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"All projects unavailable"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project list."})]})}),l.jsxs("div",{className:"max-w-xl rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:"Your projects have not been changed."}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(le,{type:"button",variant:"secondary",className:"mt-4",onClick:()=>{b()},children:"Retry loading projects"})]})]});if(!v||r)return l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-32"}),l.jsx("div",{className:"skeleton-text-sm w-64"})]}),l.jsx("div",{className:"space-y-3",children:[1,2,3].map(M=>l.jsxs("div",{className:"rounded-xl border border-default bg-surface p-4 flex items-center gap-4",children:[l.jsxs("div",{className:"flex-1 space-y-2",children:[l.jsx("div",{className:"skeleton-text w-36"}),l.jsx("div",{className:"skeleton-text-sm w-48"})]}),l.jsx("div",{className:"skeleton-text w-16"}),l.jsx("div",{className:"skeleton-text w-16"}),l.jsx("div",{className:"skeleton h-8 w-20 rounded"})]},M))})]});const C=v.portfolioOverview,T=C.projects.length>0&&C.projects.every(M=>M.hasMeasurement===!1),z=C.projects.some(M=>vy(M.sentiment)),q=C.attentionItems.map(M=>T&&M.id==="attention_stable"?{...M,tone:"neutral",title:"Awaiting first measurement",detail:"Visibility results will appear after the first sweep."}:M),R=S.data??n?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},P=tX(C.systemHealth.filter(M=>e||M.id==="api"||M.id==="worker"),R,v.settings);return l.jsxs("div",{className:"page-container",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"All projects"}),l.jsx("p",{className:"page-subtitle",children:"Visibility across all projects."})]})}),C.projects.length>0?l.jsx("div",{className:"project-list project-list-scrollable",children:C.projects.map(M=>l.jsx(Hee,{project:M,sentimentColumn:z},M.project.id))}):l.jsxs(Ta,{className:"surface-card empty-card",children:[l.jsx("h3",{children:C.emptyState?.title??"No projects yet"}),l.jsx("p",{className:"supporting-copy",children:C.emptyState?.detail}),l.jsx(le,{size:"sm",asChild:!0,children:l.jsx(at,{to:C.emptyState?.ctaHref==="/setup"||!C.emptyState?.ctaHref?"/setup":"/",children:C.emptyState?.ctaLabel??"Launch setup"})})]}),l.jsxs("div",{className:"overview-secondary-grid",children:[q.length>0&&l.jsxs("section",{className:"overview-secondary-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),l.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),l.jsx("div",{className:"attention-list attention-list-scrollable",children:q.map(M=>M.href?l.jsxs(at,{to:M.href,className:`attention-item attention-item-${M.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:M.title}),l.jsx("p",{className:"attention-detail",children:M.detail})]}),M.actionLabel&&l.jsx("span",{className:"attention-action",children:M.actionLabel})]},M.id):l.jsxs("div",{className:`attention-item attention-item-static attention-item-${M.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:M.title}),l.jsx("p",{className:"attention-detail",children:M.detail})]}),M.actionLabel&&l.jsx("span",{className:"attention-action",children:M.actionLabel})]},M.id))})]}),l.jsxs("section",{className:"overview-secondary-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),l.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),l.jsx("div",{className:"compact-stack compact-stack-scrollable",children:f?l.jsxs("div",{role:"alert",children:[l.jsx("p",{className:"text-sm text-secondary",children:"Recent jobs could not be loaded."}),l.jsx(le,{type:"button",variant:"secondary",className:"mt-3",onClick:()=>{b()},children:"Retry loading activity"})]}):h?l.jsx("p",{className:"supporting-copy",role:"status",children:"Loading recent jobs…"}):C.recentRuns.length>0?C.recentRuns.map(M=>l.jsxs("button",{className:"compact-run",type:"button",onClick:()=>j(M.id),children:[l.jsxs("div",{children:[l.jsx("p",{className:"compact-run-title",children:M.projectName}),l.jsx("p",{className:"compact-run-detail",children:M.summary})]}),l.jsx(uy,{status:M.status})]},M.id)):l.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),l.jsxs("section",{className:"page-section",children:[l.jsx("div",{className:"section-head section-head-inline",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),l.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),l.jsx("div",{className:"divide-y divide-default border-y border-default",children:P.map(M=>{const L=M.id==="api"?R.apiStatus:M.id==="worker"?R.workerStatus:void 0,$=L?L.state==="ok"?void 0:Jr(L):M.tone==="positive"?void 0:M.meta;return l.jsxs("div",{className:"flex items-start justify-between gap-4 py-3",children:[l.jsxs("div",{children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:M.label}),$&&l.jsx("p",{className:"mt-1 text-sm text-secondary",children:$})]}),l.jsx(Sn,{tone:M.tone,title:L?Jr(L):M.meta,children:M.detail})]},M.id)})})]})]})}const Qee='a, button, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"], [role="menuitem"]';function Zee(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return!1;const n=e.target;if(n&&typeof n.closest=="function"&&n.closest(Qee))return!1;const i=typeof window<"u"?window.getSelection():null;return!(i&&!i.isCollapsed&&i.toString().trim()!=="")}function Yee({onApplied:e}){const{canWrite:n}=ga(),[i,r]=_.useState(""),[u,h]=_.useState(!1),[f,b]=_.useState([]),[v,x]=_.useState([]);if(rp()||!n)return null;const S=async()=>{if(!i.trim())return;h(!0),b([]),x([]);const j=E6(i),C=[],T=[];for(let z=0;z<j.length;z++){const q=j[z];if(q.errors.length>0){C.push(`Document ${z+1}: ${q.errors[0]?.message}`);continue}const R=q.toJSON();if(!(!R||typeof R!="object"))try{const P=await hQ(R);T.push(`Applied "${P.displayName||P.name}" (revision ${P.configRevision})`)}catch(P){C.push(`Document ${z+1}: ${Li(P)}`)}}b(T),x(C),h(!1),T.length>0&&(vn({title:"YAML applied",detail:`Applied ${T.length} document${T.length===1?"":"s"} successfully.`,tone:C.length>0?"caution":"positive",dedupeKey:"yaml:apply",dedupeMode:"replace"}),e())};return l.jsxs("section",{className:"mt-8",children:[l.jsx("div",{className:"page-section-divider"}),l.jsx("div",{className:"section-head mt-6",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),l.jsx("h2",{className:"text-sm font-medium text-strong",children:"Apply YAML"})]})}),l.jsxs("p",{className:"text-muted text-sm mb-3",children:["Paste a ",l.jsx("code",{className:"text-secondary",children:"canonry.yaml"})," config (multi-document YAML with ",l.jsx("code",{className:"text-secondary",children:"---"})," separators supported)."]}),l.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
65
+ kind: Project
66
+ metadata:
67
+ name: my-project
68
+ spec:
69
+ canonicalDomain: example.com
70
+ country: US
71
+ language: en
72
+ queries: []`,value:i,onChange:j=>r(j.target.value)}),f.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:f.map((j,C)=>l.jsx("li",{className:"text-positive-400 text-sm",children:j},C))}),v.length>0&&l.jsx("ul",{className:"mt-2 space-y-1",children:v.map((j,C)=>l.jsx("li",{className:"text-negative-400 text-sm",children:j},C))}),l.jsx("div",{className:"mt-3",children:l.jsx(le,{type:"button",disabled:!i.trim()||u,onClick:gn(S),children:u?"Applying...":"Apply"})})]})}function Xee(){const{dashboard:e,isLoading:n,refetch:i}=mp(),{canWrite:r,isAdmin:u}=ga(),h=Ps();if(!e||n)return l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-28"}),l.jsx("div",{className:"skeleton-text-sm w-40"})]}),l.jsxs("div",{className:"rounded-xl border border-default bg-surface overflow-hidden",children:[l.jsx("div",{className:"p-3 border-b border-default flex gap-8",children:["Name","Domain","Mentions","Last run","Country"].map(b=>l.jsx("div",{className:"skeleton-text-sm w-16"},b))}),[1,2,3].map(b=>l.jsxs("div",{className:"p-3 border-b border-subtle flex gap-8 items-center",children:[l.jsxs("div",{className:"flex-1 space-y-1",children:[l.jsx("div",{className:"skeleton-text w-28"}),l.jsx("div",{className:"skeleton-text-sm w-16"})]}),l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton h-5 w-14 rounded-full"}),l.jsx("div",{className:"skeleton h-5 w-16 rounded-full"}),l.jsx("div",{className:"skeleton-text-sm w-8"})]},b))]})]});const f=e.projects;return l.jsxs("div",{className:"page-container",children:[l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Projects"}),l.jsxs("p",{className:"page-subtitle",children:[f.length," project",f.length!==1?"s":""," tracked"]})]}),u?l.jsx("div",{className:"page-header-right",children:l.jsxs(le,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(hg,{className:"size-4 mr-1.5"}),f.length===0?"Map a site":"Add project"]})}):null]}),f.length>0?l.jsx("div",{className:"data-table-wrapper",children:l.jsxs("table",{className:"data-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{children:"Name"}),l.jsx("th",{children:"Domain"}),l.jsx("th",{children:"Mentions"}),l.jsx("th",{children:"Last run"}),l.jsx("th",{className:"text-right",children:"Country"})]})}),l.jsx("tbody",{children:f.map(b=>{const v=b.recentRuns[0];return l.jsxs("tr",{className:"cursor-pointer",onClick:x=>{Zee(x)&&h({to:"/projects/$projectName",params:{projectName:b.project.name}})},children:[l.jsxs("td",{children:[l.jsx(at,{to:"/projects/$projectName",params:{projectName:b.project.name},className:"text-heading font-medium hover:underline",children:b.project.displayName||b.project.name}),l.jsx("p",{className:"text-[11px] text-muted",children:b.project.name})]}),l.jsx("td",{className:"text-secondary",children:b.project.canonicalDomain}),l.jsx("td",{children:l.jsx(Sn,{tone:b.mentionSummary.tone,children:b.mentionSummary.value})}),l.jsx("td",{className:"text-muted text-sm",children:v?l.jsx(uy,{status:v.status}):l.jsx("span",{className:"text-faint",children:"No runs"})}),l.jsx("td",{className:"text-right text-muted",children:b.project.country})]},b.project.id)})})]})}):l.jsxs(Ta,{className:"surface-card empty-card",children:[l.jsx("h3",{children:"No projects yet"}),l.jsx("p",{className:"supporting-copy",children:"Map a public site to capture its Page Health baseline and exact fixes."}),u?l.jsxs(le,{type:"button",onClick:()=>{h({to:"/setup",search:{experience:"platform"}})},children:[l.jsx(hg,{className:"size-4 mr-1.5"}),"Map a site"]}):null]}),r?l.jsx(Yee,{onApplied:()=>{i()}}):null]})}class Jee extends Error{constructor(){super(XC),this.name="ViewOnlyError"}}function Wee(e){if(!e.canWrite)throw new Jee}function pl(){const e=ga();return()=>{Wee(e)}}function ete(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function tte(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 xy(e,n){ry({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),vn({title:ete(e.kind),detail:tte(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function nte(e){const n=e.filter(f=>f.status!=="conflict"&&f.status!=="error"),i=e.filter(f=>f.status==="conflict"),r=e.filter(f=>f.status==="error"),u=i.length+r.length;if(n.length===0){const f=[r.length>0?`${r.length} need provider or query setup`:null,i.length>0?`${i.length} already have an active run`:null].filter(b=>b!==null);vn({title:"No runs queued",detail:f.length>0?`${f.join("; ")}.`:"No projects were available to queue.",tone:"caution",durationMs:8e3,dedupeKey:"run-all:conflict",dedupeMode:"replace"});return}for(const f of n)ry({id:f.id,projectId:f.projectId,kind:f.kind,projectLabel:f.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const h=lX({runIds:n.map(f=>f.id),queuedCount:n.length,skippedCount:u});vn({title:"Run-all batch queued",detail:u>0?`${n.length} project${n.length===1?"":"s"} queued; ${u} need attention or already have an active run.`:`${n.length} project${n.length===1?"":"s"} queued.`,tone:u>0?"caution":"neutral",dedupeKey:`batch:${h}`,dedupeMode:"replace"})}function bp(e,n){if(e instanceof yn&&e.code==="PROVIDERS_FAILING"){vn({title:"Sweep not started",detail:"Every provider keeps failing on its account. The AI Visibility notice says when sweeps resume.",tone:"caution",durationMs:8e3,dedupeKey:`providers-failing:${n?.projectKey??"project"}:${n?.sourceAction??"run"}`,dedupeMode:"replace"});return}if(e instanceof yn&&e.code==="RUN_IN_PROGRESS"){vn({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}vn({title:e instanceof Error?e.message:"Failed to queue run",tone:"negative"})}function ate(){const e=pl();return ci({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>rQ(n,i),onSuccess:(n,i)=>{xy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{i.sourceAction!=="setup-launch"&&bp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function zre(){const e=pl();return ci({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:n=>fQ(n),onSuccess:n=>{nte(n)},onError:n=>{vn({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function ite(){const e=pl();return ci({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,body:i})=>bQ(n,i),onSuccess:(n,i)=>{ry({id:n.runId,projectId:i.projectId,kind:Oe["site-audit"],projectLabel:i.projectLabel??i.projectName,sourceAction:"site-audit",lastAnnouncedStatus:n.status}),vn({title:n.status==="running"?"Site Health scan already running":"Site Health scan queued",detail:`${i.projectLabel??i.projectName} will refresh automatically when the scan finishes.`,tone:"neutral",dedupeKey:`run:${n.runId}`,dedupeMode:"replace"})},onError:(n,i)=>{i.suppressErrorToast||bp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"site-audit"})}})}function Ire(){const e=pl();return ci({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>gQ(n,i),onSuccess:(n,i)=>{xy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{bp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function Ore(){const e=pl();return ci({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>yQ(n,i),onSuccess:(n,i)=>{xy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{bp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function ste(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 Pre(){const e=pl();return ci({onMutate:e,mutationFn:({projectName:n,queries:i})=>sQ(n,i)})}const Bk=[{id:"site",label:"Scan site",optional:!1},{id:"fixes",label:"Page health",optional:!1},{id:"visibility",label:"AI Visibility",optional:!0},{id:"done",label:"Next steps",optional:!1}],ote={skipped:"Skipped",pending:"In progress",incomplete:"Didn’t finish",unknown:null};function Po({current:e,outcomes:n={}}){const i=Bk.findIndex(r=>r.id===e);return l.jsx("ol",{"aria-label":"Onboarding progress",className:"grid border-y border-default sm:grid-cols-4 sm:divide-x sm:divide-default",children:Bk.map((r,u)=>{const h=u<i?n[r.id]:void 0,f=u<i&&h===void 0,b=u===i,v=h?ote[h]:null;return l.jsxs("li",{"aria-current":b?"step":void 0,className:"flex min-h-12 items-center gap-3 py-2 sm:px-3 sm:first:pl-0 sm:last:pr-0",children:[l.jsx("span",{"aria-hidden":"true",className:`flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold tabular-nums ${b?"border-accent bg-accent text-on-inverse":f?"border-positive bg-positive-soft text-positive":"border-default bg-surface-subtle text-muted"}`,children:f?"✓":h==="skipped"||h==="incomplete"?"–":u+1}),l.jsxs("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-2",children:[l.jsx("span",{className:`text-sm font-medium ${b||f?"text-heading":"text-secondary"}`,children:r.label}),v?l.jsx("span",{className:"text-[13px] text-secondary",children:v}):r.optional&&!h?l.jsx("span",{className:"text-[13px] text-secondary",children:"Optional"}):null,f?l.jsx("span",{className:"sr-only",children:"Complete"}):null]})]},r.id)})})}function rte(){return[{id:"search-console",icon:f0,label:"Search Console",detail:"Compare answer engines with the queries you already rank for.",action:"Connect",to:"/projects/$projectName/search-console"},{id:"analytics",icon:oj,label:"Google Analytics",detail:"See the traffic answer engines actually send you.",action:"Connect",to:"/projects/$projectName/activity"},{id:"schedule",icon:rj,label:"Scheduled sweeps",detail:"Re-measure on a schedule instead of by hand.",action:"Set up",to:"/projects/$projectName/settings"},{id:"notifications",icon:fg,label:"Notifications",detail:"Send a webhook when a sweep finishes or a score moves.",action:"Set up",to:"/projects/$projectName/settings"},{id:"local",icon:lj,label:"Local presence",detail:"Track the Google Business Profile behind local answers.",action:"Open",to:"/projects/$projectName/local"},{id:"agent",icon:N6,label:"Your agent",detail:"Read this project from Claude Code, Codex, or any MCP client.",action:"Docs",href:"https://github.com/Canonry/canonry/blob/main/docs/mcp.md"}]}function lte({projectName:e}){const n=rte();return l.jsxs("section",{"aria-labelledby":"next-steps-heading",className:"mt-6 border-t border-default pt-5",children:[l.jsx("h2",{id:"next-steps-heading",className:"text-sm font-medium text-heading",children:"What else this project can do"}),l.jsx("ul",{className:"mt-3 divide-y divide-default",children:n.map(({id:i,icon:r,label:u,detail:h,action:f,to:b,href:v})=>l.jsxs("li",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 py-3",children:[l.jsx(r,{className:"size-4 shrink-0 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"min-w-36 text-sm font-medium text-heading",children:u}),l.jsx("span",{className:"min-w-0 flex-1 text-sm text-secondary",children:h}),b?l.jsxs(at,{to:b,params:{projectName:e},className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:[f,l.jsxs("span",{className:"sr-only",children:[" ",u]})]}):l.jsxs("a",{href:v,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:[f,l.jsxs("span",{className:"sr-only",children:[" ",u]})]})]},i))})]})}function cte({providerName:e,keyUrl:n,modelHint:i,compact:r=!1,leadingField:u,secondaryActions:h,onSaved:f}){const b=Os(),v=e.toLowerCase()==="local",x=r&&e.toLowerCase()==="gemini"&&!!n,[S,j]=_.useState(""),[C,T]=_.useState(""),[z,q]=_.useState(""),[R,P]=_.useState(""),[M,L]=_.useState(""),[$,Q]=_.useState(""),[ae,V]=_.useState(!1),[Z,X]=_.useState(null),[Ce,tt]=_.useState(!1),Ge=v?C.trim().length>0:S.trim().length>0;async function Ve(){if(Ge){V(!0),X(null),tt(!1);try{const Se=ue=>{const _e=parseInt(ue.trim(),10);return Number.isFinite(_e)&&_e>0?_e:void 0},Me={},xe=Se(R);xe!==void 0&&(Me.maxConcurrency=xe);const pe=Se(M);pe!==void 0&&(Me.maxRequestsPerMinute=pe);const ce=Se($);ce!==void 0&&(Me.maxRequestsPerDay=ce),await QC(e.toLowerCase(),{...S.trim()?{apiKey:S.trim()}:{},...C.trim()?{baseUrl:C.trim()}:{},...z.trim()?{model:z.trim()}:{},...Object.keys(Me).length>0?{quota:Me}:{}}),j(""),T(""),q(""),P(""),L(""),Q(""),tt(!0),Pn(b,"runAdmission"),vn({title:"Provider updated",detail:`${e} configuration saved.`,tone:"positive",dedupeKey:`settings:provider:${e}`,dedupeMode:"replace"}),f()}catch(Se){X(Se instanceof Error?Se.message:"Failed to update provider")}finally{V(!1)}}}const ke=i??"Use default model",Le=r?"block text-sm font-medium text-secondary":"text-sm text-secondary",B=r?"setup-input min-h-11 w-full":"mt-0.5 w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",W=l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:r?"space-y-1.5":void 0,children:[l.jsx("label",{className:Le,htmlFor:`model-${e}`,children:"Model (optional)"}),l.jsx("input",{id:`model-${e}`,type:"text",className:B,placeholder:ke,value:z,onChange:Se=>q(Se.target.value)})]}),l.jsxs("div",{children:[l.jsx("label",{className:Le,children:"Quota (optional)"}),l.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:r?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"Concurrent",value:R,onChange:Se=>P(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Max concurrent"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:r?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/min",value:M,onChange:Se=>L(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Per minute"})]}),l.jsxs("div",{children:[l.jsx("input",{type:"number",min:"1",className:r?"setup-input min-h-11 w-full":"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:"/day",value:$,onChange:Se=>Q(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Per day"})]})]})]})]}),ve=v?l.jsxs("div",{className:r?"space-y-1.5":void 0,children:[l.jsx("label",{className:Le,htmlFor:`base-url-${e}`,children:"Base URL"}),l.jsx("input",{id:`base-url-${e}`,type:"text",className:B,placeholder:"http://localhost:11434/v1",value:C,onChange:Se=>T(Se.target.value)}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Use any OpenAI-compatible endpoint, such as Ollama or vLLM."})]}):null,Ae=l.jsxs("div",{className:r?"min-w-0 space-y-1.5":void 0,children:[l.jsxs("div",{className:r?"flex items-center justify-between gap-3":"flex items-center justify-between",children:[l.jsxs("label",{className:Le,htmlFor:`api-key-${e}`,children:["API key",v?" (optional)":""]}),n&&!x&&l.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-secondary hover:text-neutral underline underline-offset-2",children:["Get API key ","↗"]})]}),l.jsx("input",{id:`api-key-${e}`,type:"password",autoComplete:"new-password",autoCapitalize:"none",spellCheck:!1,className:B,placeholder:v?"Optional. Most local servers do not need one.":`Enter ${e} API key`,value:S,onChange:Se=>j(Se.target.value)})]}),se=l.jsx(le,{type:"button",size:r?"default":"sm",className:r?"min-h-11":void 0,disabled:!Ge||ae,onClick:gn(Ve),children:ae?"Saving...":r?"Save connection":"Save"});return l.jsxs("div",{className:r?"space-y-3":"mt-3 rounded-lg border border-base bg-bg-elevated/40 p-3 space-y-2",children:[x&&l.jsxs("div",{className:"flex flex-wrap items-start gap-x-6 gap-y-3 pb-2",children:[l.jsxs("div",{className:"min-w-0 flex-1 basis-72 space-y-1",children:[l.jsx("h3",{className:"text-base font-semibold text-heading",children:"Start with Gemini’s free tier"}),l.jsxs("p",{className:"max-w-prose text-sm text-secondary",children:["Get a key in Google AI Studio, then paste it below. Free usage has model and rate limits; paid usage is billed by Google."," ",l.jsx("a",{href:"https://ai.google.dev/gemini-api/docs/pricing",target:"_blank",rel:"noopener noreferrer",className:"text-link underline underline-offset-2 focus-visible:outline-2 focus-visible:outline-offset-2",children:"Pricing and limits"})]})]}),l.jsx(le,{variant:"outline",className:"min-h-11",asChild:!0,children:l.jsxs("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:["Get a free Gemini API key ","↗"]})})]}),r?l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:u?"grid items-start gap-3 sm:grid-cols-[minmax(0,0.7fr)_minmax(0,1.3fr)]":void 0,children:[u,Ae]}),ve]}):l.jsxs(l.Fragment,{children:[ve,Ae]}),r?l.jsxs("details",{children:[l.jsx("summary",{className:"min-h-11 cursor-pointer text-sm text-secondary py-3",children:"Advanced provider settings"}),l.jsx("div",{className:"space-y-3 pt-2",children:W})]}):W,Z&&l.jsx("p",{role:"alert",className:"text-sm text-negative-400",children:Z}),Ce&&l.jsx("p",{className:"text-sm text-positive-400",children:"Provider updated."}),r?l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[se,h]}):se]})}const Em="cdp:chatgpt";function jo(e){return e.trim().toLowerCase()}function ute({projectProviders:e,configuredApiProviders:n,cdpConfigured:i}){const r=e.map(jo),u=new Set(r),h=r.length===0||r.some(x=>x!==Em),f=r.length===0||u.has(Em);if(h&&n!==void 0&&n.map(jo).some(S=>r.length===0||u.has(S))||f&&i===!0)return!0;if(!(h&&n===void 0||f&&i===void 0))return!1}const dte=[{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"}],mte=[{label:"Queries"},{label:"First sweep"}];function Lk(e,n){return(e==="completed"||e==="partial")&&n>0}function Uk(e){return e.launchReady?e.hasProject?e.queryCount===0?2:e.competitorCount===0&&!e.hasRunAttempt?3:4:1:0}function K4(e){return e.queryCounts.total>0}function pte(e,n){return n?e.find(i=>i.project.name===n)??null:e.find(i=>!K4(i))??e.at(0)??null}function hte({current:e,labels:n}){return l.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((i,r)=>{const u=r<e,h=r===e;return l.jsxs("div",{className:`setup-step ${u?"setup-step-done":""} ${h?"setup-step-active":""}`,role:"listitem","aria-current":h?"step":void 0,children:[l.jsx("span",{className:"setup-step-number",children:u?"✓":r+1}),l.jsx("span",{children:i.label})]},i.label)})})}function fte({visibilityProjectName:e,siteHealthOnboarding:n=!1,onboardingFinish:i=n}={}){const{canWrite:r}=ga();return e&&r?l.jsx(Vk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}):l.jsx(fy,{title:e?"Set up AI Visibility":"Setup",children:l.jsx(Vk,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i})})}function Vk({visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}){const r=yu(),{isAdmin:u}=ga(),{dashboard:h,isLoading:f,refetch:b}=mp(void 0,{pauseProjectPolling:!0,includeSettings:u}),v=h??r?.dashboard,x=Ps(),S=_.useCallback(C=>{C&&e&&C.focus()},[e]),j=()=>{if(!e){x({to:"/",replace:!0});return}if(i){x({to:"/setup",search:{onboarding:"complete",setupProject:e,skipped:"visibility"},replace:!0});return}x({to:"/projects/$projectName",params:{projectName:e},replace:!0})};return!v||f?l.jsxs("div",{className:"page-skeleton",children:[l.jsxs("div",{className:"page-skeleton-header",children:[l.jsx("div",{className:"skeleton-text h-6 w-24"}),l.jsx("div",{className:"skeleton-text-sm w-80"})]}),l.jsxs("div",{className:"page-skeleton-card",children:[l.jsx("div",{className:"skeleton-text w-32"}),l.jsx("div",{className:"space-y-3 mt-3",children:[1,2,3].map(C=>l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("div",{className:"space-y-1 flex-1",children:[l.jsx("div",{className:"skeleton-text w-24"}),l.jsx("div",{className:"skeleton-text-sm w-48"})]}),l.jsx("div",{className:"skeleton h-6 w-16 rounded-full"})]},C))})]})]}):e&&!v.projects.some(C=>C.project.name===e)?l.jsxs("div",{className:"page-container",children:[n?l.jsx(Po,{current:"visibility"}):null,l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{ref:S,tabIndex:-1,className:"page-title",children:"Set up AI Visibility"}),l.jsx("p",{className:"page-subtitle",children:"Choose what to track, then run your first visibility sweep."})]}),n?l.jsx("div",{className:"page-header-right",children:l.jsx(le,{type:"button",variant:"outline",onClick:j,children:"Skip AI Visibility"})}):null]}),l.jsxs(Ta,{role:"alert",className:"compact-stack",children:[l.jsx("h2",{children:"Project not found"}),l.jsx("p",{className:"text-secondary",children:"Canonry could not find the project handed off from Site Health. Refresh the project list or choose a project to continue."}),l.jsxs("div",{className:"flex flex-wrap gap-2",children:[l.jsx(le,{type:"button",variant:"outline",onClick:()=>{b()},children:"Retry"}),l.jsx(le,{type:"button",asChild:!0,children:l.jsx(at,{to:"/projects",children:"View projects"})})]})]})]}):l.jsx(gte,{dashboard:v,initialHealth:r?.health,enableLiveStatus:!r,refetch:b,visibilityProjectName:e,visibilityHeadingRef:S,siteHealthOnboarding:n,onboardingFinish:i})}function gte({dashboard:e,initialHealth:n,enableLiveStatus:i,refetch:r,visibilityProjectName:u,visibilityHeadingRef:h,siteHealthOnboarding:f,onboardingFinish:b}){const v=e.settings,{isAdmin:x}=ga(),j=dy(i,n).data??n??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},C=aX(e.setup,j,v),T=!!u,z=Ps(),q=Os(),R=_.useRef(J1()).current,P=_.useRef(new Set),M=_.useCallback((H,Xe)=>{if(Xe){if(P.current.has(Xe))return;P.current.add(Xe)}ay({surface:"wizard",...H,eventId:W1()})},[]),L=pte(e.projects,u),$=L?e.runs.filter(H=>H.projectId===L.project.id).sort((H,Xe)=>Xe.createdAt.localeCompare(H.createdAt)):[],Q=L?.queryCounts.total??0,ae=L?.project.name,V=yt({queryKey:["setup","resume-queries",ae],queryFn:()=>ae?GC(ae):Promise.resolve([]),enabled:!!ae}),Z=V.data??[],X=V.data?.length??Q,Ce=L?.competitors.map(H=>H.domain)??[],tt=$.at(0)??null,Ge=!!L&&K4(L),Ve=!!L&&V.isPending,ke=T?2:Uk({launchReady:C.launchState.enabled,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ge}),Le=Uk({launchReady:!0,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ge}),[B,W]=_.useState(ke),[ve,Ae]=_.useState(!Ve),se=T&&(Ve||!ve),[Se,Me]=_.useState(L?.project.name??""),[xe,pe]=_.useState(L?.project.displayName??""),[ce,ue]=_.useState(L?.project.canonicalDomain??""),[_e,Ze]=_.useState(L?.project.country??"US"),[Ee,Ct]=_.useState(L?.project.language??"en"),[me,Be]=_.useState(L?.project.autoExtractBacklinks??!1),[Ne,re]=_.useState(L?.project.name??null),[Ye,vt]=_.useState(null),[Mn,Ht]=_.useState(!1),$e=()=>{if(!Ne){z({to:"/",replace:!!u});return}z({to:f?"/projects/$projectName/technical-aeo":"/projects/$projectName",params:{projectName:Ne},replace:!!u})},ct=(H=!1)=>{if(!b||!Ne){$e();return}z({to:"/setup",search:{onboarding:"complete",setupProject:Ne,...H?{skipped:"visibility"}:{}},replace:!0})},Ft=()=>ct(!0),[Qt,Rn]=_.useState(Z.map(H=>H.query).join(`
73
+ `)),[Vt,hi]=_.useState(X>0),[Hs,fi]=_.useState(null),[Dn,Zo]=_.useState(!1),[Fs,Qs]=_.useState(!1),gi=v.providerStatuses.filter(H=>H.state==="ready"),xn=L?.project.providers.map(jo)??[],Et=gi.filter(H=>xn.length===0||xn.includes(jo(H.name))),Kn=gi.map(H=>jo(H.name)),Zt=Et.length>0,Zs=xn.length===0||xn.includes(Em),qa=T&&!x,na=yt({...bZ({client:J,path:{name:ae??""}}),enabled:qa&&!!ae,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:"always",retry:!1}),oe=na.data?.answerVisibilityProviderReady,ze=qa&&(na.isError||na.isSuccess&&typeof oe!="boolean"),Je=yt({...GZ({client:J}),enabled:!qa&&Zs&&!Zt,staleTime:6e4,retry:!1}),Ot=Zs?Je.isSuccess?typeof Je.data.browserVersion=="string":Je.isError?!1:void 0:!1,et=qa?na.isSuccess&&na.isFetchedAfterMount&&!na.isFetching?oe:void 0:ute({projectProviders:xn,configuredApiProviders:Kn,cdpConfigured:Ot}),kt=Et.length+(Ot===!0?1:0),[rn,yi]=_.useState(Et[0]?.name??""),[Yo,Ys]=_.useState(5),[bu,hl]=_.useState(!1),[fl,gl]=_.useState(null),[yl,bl]=_.useState(""),Xo=_.useRef(!1),vu=_.useCallback(H=>{!H||!Xo.current||(Xo.current=!1,H.focus({preventScroll:!0}))},[]),[ya,ln]=_.useState(!1),[zn,Yi]=_.useState(!1),[Jo,xu]=_.useState(!1),Wo=v.providerStatuses.filter(H=>jo(H.name)!==Em&&(xn.length===0||xn.includes(jo(H.name)))),aa=Wo.find(H=>H.name===yl)??Wo.find(H=>H.state!=="ready")??Wo.at(0),Xi=`Help me choose AI Visibility queries for Canonry project ${JSON.stringify(Ne??Se)} (${ce}).
74
+ 1. Read the project, its existing tracked queries, and Site Health findings. Ask about my customers, services, and locations if needed, then propose relevant customer queries.
75
+ 2. Check the configured connection's capabilities, then use Canonry's Research flow to test a small approved batch. Retrieve saved answers and any available sources. Compare brand mentions separately from site citations; unavailable citation evidence is not a "not cited" result. Text-only routes can inform query research but cannot establish an AI Visibility baseline. Research does not add queries to tracking. If more candidates are needed, propose ICP Discovery separately.
76
+ 3. Recommend a short list with reasons. Ask before provider usage. Once I approve, preserve existing queries and return the combined list, one query per line, for me to paste into setup. Do not change tracked queries or launch a visibility sweep.`,vl=async()=>{xu(!1);try{await navigator.clipboard.writeText(Xi),Yi(!0)}catch{xu(!0)}},[bi,Ji]=_.useState(Ce.join(`
77
+ `)),[Wi,es]=_.useState(Ce.length>0),[tn,xl]=_.useState(null),[wl,Xa]=_.useState(!1),Sl=_.useRef(PC(ae)).current?.runId??null,kl=_.useRef(Sl),[Ja,wp]=_.useState(!!Sl||!!tt&&!Ge),[vi,Js]=_.useState(!1),[An,In]=_.useState(null),[ts,Sp]=_.useState(Sl??(Ge?null:tt?.id??null)),jl=ate(),Wa=yt({...oy({client:J,path:{id:ts??""}}),enabled:!!ts,refetchInterval:({state:H})=>{const Xe=H.data?.status;return Xe==="completed"||Xe==="partial"||Xe==="failed"||Xe==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[ns,wu]=_.useState(""),[On,er]=_.useState(!1),[Al,tr]=_.useState(null),Gn=Se.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ia=Qt.split(`
78
+ `).map(H=>H.trim()).filter(Boolean),xi=bi.split(`
79
+ `).map(H=>H.trim()).filter(Boolean),ba=Math.max(X,Vt?ia.length:0),va=sF({apiReady:j.apiStatus.state==="ok",databaseConfigured:j.apiStatus.databaseConfigured,workerReady:j.workerStatus.state==="ok",providerReady:et!==!1}),ei=(va&&va!=="no_provider"?C.launchState.blockedReason:ze?"Provider readiness could not be checked. Try again.":et===void 0?"Checking provider readiness before launch.":va==="no_provider"?"Launch is blocked until a provider allowed by this project is configured.":void 0)??(Ne?ba===0?"Add at least one query before launching the first sweep.":void 0:"Create a project before launching the first sweep.");_.useEffect(()=>{ve||Ve||(T||W(ke),Z.length>0&&(Rn(Z.map(H=>H.query).join(`
80
+ `)),hi(!0)),Ae(!0))},[Z,ke,T,ve,Ve]),_.useEffect(()=>{if(Et.length===0){yi("");return}Et.some(H=>H.name===rn)||yi(Et[0].name)},[Et,rn]),_.useEffect(()=>{ve&&(M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.started",step:iF(ke),resumed:!!L},"onboarding.started"),!L&&ke>0&&M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"))},[M,ke,R,ve,L]),_.useEffect(()=>{T||!oF(j)||!va||M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"system",action:va==="no_provider"?"configure_provider":"continue",reasonCode:va},`onboarding.blocked:system:${va}`)},[M,j,T,R,va]);const Ma=Wa.data?.status,nr=Wa.data?.snapshots?.length??0;_.useEffect(()=>{if(!Ja||!Ma)return;const H=kl.current;if(!H||H!==ts)return;if(Lk(Ma,nr)){M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"run",method:"automatic",countBucket:li(nr)},"onboarding.step_completed:run"),xm(H);return}const Xe=Ma==="cancelled"?"run_cancelled":Ma==="failed"||(Ma==="completed"||Ma==="partial")&&nr===0?"run_failed":void 0;Xe&&(M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Xe},`onboarding.blocked:run:${Xe}`),xm(H))},[M,ts,R,Ma,nr,Ja]);const jp=async()=>{if(!(!Gn||!ce)){Ht(!0),vt(null);try{const H=await FC(Gn,{displayName:xe||Se,canonicalDomain:ce,country:_e,language:Ee,autoExtractBacklinks:me});re(Gn),vn({title:"Project created",detail:`${H.displayName||H.name} is ready for setup.`,tone:"positive",dedupeKey:`project:create:${H.name}`,dedupeMode:"drop"}),await r(),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),W(2)}catch(H){vt(H instanceof Error?H.message:"Failed to create project"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"project",action:"save",reasonCode:"project_create_failed"},"onboarding.blocked:project:project_create_failed")}finally{Ht(!1)}}},ar=async()=>{if(!Ne)return;const H=ia;if(H.length!==0){Zo(!0),fi(null);try{await iQ(Ne,H),hi(!0),T?await Promise.all([q.invalidateQueries({queryKey:e4({client:J,path:{name:Ne}})}),q.invalidateQueries({predicate:ste}),q.invalidateQueries({queryKey:["setup","resume-queries",Ne]})]):await r(),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"queries",method:Fs?"generated":"manual",countBucket:li(H.length)},"onboarding.step_completed:queries"),W(T?4:3)}catch(Xe){fi(Xe instanceof Error?Xe.message:"Failed to save queries"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"queries",action:"save",reasonCode:"query_save_failed"},"onboarding.blocked:queries:query_save_failed")}finally{Zo(!1)}}},Ba=async()=>{if(!(!Ne||!rn)){hl(!0),gl(null);try{const H=await pQ(Ne,rn,Yo);if(H.queries.length>0){const Xe=Qt?Qt.trimEnd()+`
81
+ `+H.queries.join(`
82
+ `):H.queries.join(`
83
+ `);Rn(Xe),Qs(!0)}}catch(H){gl(H instanceof Error?H.message:"Failed to generate queries"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"queries",action:"generate_queries",reasonCode:zc(H,"unknown")},"onboarding.blocked:queries:generate")}finally{hl(!1)}}},Nl=async()=>{if(!Ne)return;const H=xi;if(H.length!==0){Xa(!0),xl(null);try{await oQ(Ne,H),es(!0),await r(),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"competitors",method:"manual",countBucket:li(H.length)},"onboarding.step_completed:competitors"),W(4)}catch(Xe){xl(Xe instanceof Error?Xe.message:"Failed to save competitors"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"competitors",action:"save",reasonCode:"unknown"},"onboarding.blocked:competitors:save")}finally{Xa(!1)}}},Cl=async()=>{const H=ns.trim();if(H){er(!0),tr(null);try{await QC("gemini",{apiKey:H}),vn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),wu(""),await r(),yi(v.providerStatuses.find(Xe=>Xe.name.toLowerCase()==="gemini")?.name??"gemini"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"system",method:"inline"},"onboarding.step_completed:system")}catch(Xe){tr(Xe instanceof Error?Xe.message:"Failed to save Gemini key"),M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"system",action:"configure_provider",reasonCode:"provider_save_failed"},"onboarding.blocked:system:provider_save_failed")}finally{er(!1)}}},wi=async()=>{if(!So()){if(!Ne||ei){In(ei??"Complete setup before launching the first sweep.");const H=va??(Ne?ba===0?"no_queries":"run_rejected":"unknown");qa||M({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:li(kt),queryCountBucket:li(ba),reasonCode:H});return}Js(!0),In(null);try{const H=await jl.mutateAsync({projectName:Ne,projectLabel:xe||Se||Ne,sourceAction:"setup-launch"});Sp(H.id),wp(!0),OC(Ne,H.id),kl.current=H.id,qa||M({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"queued",providerCountBucket:li(kt),queryCountBucket:li(ba)}),await r()}catch(H){In(H instanceof Error?H.message:"Failed to queue the visibility sweep. Retry when the instance is ready."),qa||M({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:li(kt),queryCountBucket:li(ba),reasonCode:zc(H,"run_rejected")})}finally{Js(!1)}}},Bn=()=>W(H=>T?2:Math.max(0,H-1)),ir=(H,Xe,Si)=>{M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:H,method:"existing",...Si===void 0?{}:{countBucket:li(Si)}},`onboarding.step_completed:${H}`),W(Xe)},_l=()=>{if(M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"queries",method:"skipped",countBucket:"0"},"onboarding.step_completed:queries"),T){Ft();return}W(3)},Tl=()=>{M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"competitors",method:"skipped",countBucket:"0"},"onboarding.step_completed:competitors"),W(4)},Ws=T?"section":Ta,xa=et!==!0||Ot===!0?l.jsx(le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",onClick:()=>{r(),Zs&&Je.refetch()},children:"Check again"}):null,El=(et===!1||ya)&&!!aa,eo=T&&(B===2||B===4)?x?l.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-3 border-b border-default pb-6 mb-6",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[l.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:et===!1?"Connect a provider":"Answer engine provider"}),l.jsx(Sn,{tone:et===!0?"positive":"neutral",children:et===!0?"Configured":et===!1?"Not connected":"Checking"})]}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:et===!0?Et.length>0?`${Et.map(H=>H.displayName??H.name).join(", ")} available for this project. Research and sweeps use your provider account.`:"ChatGPT in Chrome is configured for sweeps. Query Research needs an API provider.":et===!1?"An answer engine is required for visibility sweeps. You can save queries now and connect later.":"Checking available providers. You can choose queries while this finishes."}),et===!1||ya?aa?l.jsx("div",{children:l.jsx(cte,{compact:!0,leadingField:l.jsxs("div",{className:"min-w-0 space-y-1.5",children:[l.jsx("label",{className:"block text-sm font-medium text-secondary",htmlFor:"setup-provider",children:"Provider to connect"}),l.jsx("select",{ref:vu,id:"setup-provider",className:"setup-input",value:aa.name,onChange:H=>{H.target.value!==aa.name&&(Xo.current=document.activeElement===H.currentTarget,bl(H.target.value))},children:Wo.map(H=>l.jsx("option",{value:H.name,children:H.displayName??H.name},H.name))})]}),secondaryActions:xa,providerName:aa.name,keyUrl:aa.keyUrl,modelHint:aa.modelHint,onSaved:()=>{ln(!1),r()}},aa.name)}):l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:xn.length>0?`This project's provider selection is ${xn.join(", ")}. Configure an allowed provider in Settings, or change the selection in project Settings.`:"Provider configuration is unavailable here. Open Settings to connect an answer engine, then check again."}):null,l.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[et===!0&&!ya&&aa?l.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:()=>ln(!0),children:"Configure a provider"}):null,!aa||Ot===!0?l.jsx(le,{type:"button",variant:"outline",size:"sm",asChild:!0,children:l.jsx(at,{to:"/settings",target:"_blank",rel:"noopener noreferrer",children:"Open provider settings"})}):null,El?null:xa]})]}):l.jsxs("section",{"aria-labelledby":"setup-provider-heading",className:"space-y-2 border-b border-default pb-6 mb-6",children:[l.jsx("h2",{id:"setup-provider-heading",className:"text-lg font-semibold text-heading",children:"Answer engine provider"}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:"Provider settings are managed by an administrator."}),ze?l.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Provider readiness could not be checked. Try again."}):l.jsx("p",{className:"max-w-prose text-sm text-secondary",role:"status",children:et===!0?"An answer engine is available for this project.":et===!1?"Ask an administrator to connect an answer engine for this project. You can save queries now.":"Checking provider readiness. You can save queries now."}),l.jsx(le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",disabled:na.isFetching,onClick:()=>{na.refetch()},children:ze?"Retry provider check":"Check again"})]}):null,ti=(()=>{switch(B){case 0:return l.jsxs(Ta,{className:"surface-card step-card",children:[l.jsx("div",{className:"section-head",children:l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),l.jsx("h2",{children:"System check"})]})}),l.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),l.jsx("div",{className:"compact-stack",children:C.healthChecks.map(H=>l.jsxs("div",{className:"health-check-row",children:[l.jsxs("div",{children:[l.jsx("p",{className:"run-row-title",children:H.label}),l.jsx("p",{className:"supporting-copy",children:H.detail}),H.id==="provider"&&H.state!=="ready"&&l.jsxs("div",{className:"mt-3 rounded-md border border-default bg-bg-elevated/40 p-3 space-y-2",children:[l.jsxs("p",{className:"text-xs text-secondary",children:["Paste a Gemini key to enable visibility checks (free at"," ",l.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"}),")."]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("input",{type:"password",value:ns,onChange:Xe=>wu(Xe.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:On}),l.jsx(le,{type:"button",size:"sm",disabled:On||!ns.trim(),onClick:gn(Cl),children:On?"Saving...":"Save"})]}),Al&&l.jsxs("div",{role:"alert",className:"space-y-1 text-xs text-negative",children:[l.jsx("p",{children:Al}),l.jsx("p",{children:"Check that the key is complete, then retry Save."})]}),l.jsxs("p",{className:"text-sm text-secondary",children:["Connect more answer engines later in"," ",l.jsx(at,{to:"/settings",className:"text-link hover:underline",children:"Settings"}),"."]})]})]}),l.jsx(Sn,{tone:H.state==="ready"?"positive":"caution",title:H.id==="api"?Jr(j.apiStatus):H.id==="worker"?Jr(j.workerStatus):H.detail,children:H.state==="ready"?"Ready":"Attention"})]},H.id))}),l.jsxs("div",{className:"setup-nav",children:[C.launchState.blockedReason?l.jsx("p",{role:"status",className:"supporting-copy text-negative",children:C.launchState.blockedReason}):l.jsx("span",{}),l.jsx(le,{type:"button",disabled:!C.launchState.enabled,title:C.launchState.blockedReason,onClick:()=>{M({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"),W(Le)},children:"Continue"})]})]});case 1:return l.jsxs(Ta,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),l.jsx("h2",{children:"Create project"})]}),Ne?l.jsx(Sn,{tone:"positive",children:"Created"}):null]}),Ne?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-neutral",children:["Project ",l.jsx("span",{className:"text-heading font-medium",children:Ne})," created successfully."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Bn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>ir("project",2),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),l.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:Se,onChange:H=>Me(H.target.value)}),Gn&&Gn!==Se?l.jsxs("p",{className:"supporting-copy",children:["Slug: ",Gn]}):null]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),l.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:xe,onChange:H=>pe(H.target.value)})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),l.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:ce,onChange:H=>ue(H.target.value)})]}),l.jsxs("div",{className:"setup-field-row",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),l.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:_e,onChange:H=>Ze(H.target.value.toUpperCase())})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),l.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:Ee,onChange:H=>Ct(H.target.value.toLowerCase())})]})]}),l.jsxs("label",{className:"flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong",children:[l.jsx("input",{type:"checkbox",className:"mt-0.5 h-4 w-4 rounded border-strong bg-bg",checked:me,onChange:H=>Be(H.target.checked)}),l.jsxs("span",{className:"flex-1",children:[l.jsx("span",{className:"block text-sm text-heading",children:"Auto-extract backlinks"}),l.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."," ",l.jsx(at,{to:"/backlinks",className:"text-positive-400 hover:text-positive underline underline-offset-2",children:"Manage backlinks"})]})]})]}),Ye?l.jsx("p",{className:"text-negative-400 text-sm",children:Ye}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Bn,children:"Back"}),l.jsx(le,{type:"button",disabled:!Gn||!ce||Mn,onClick:gn(jp),children:Mn?"Creating...":"Create project"})]})]})]});case 2:return l.jsxs(Ws,{className:T?"visibility-setup-section step-card":"surface-card step-card","aria-labelledby":"setup-queries-heading",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:T?"Step 1 of 2":"Step 3 of 5"}),l.jsx("h2",{id:"setup-queries-heading",children:"Add queries"})]}),se?l.jsx(Sn,{tone:"neutral",children:"Loading"}):V.isError?l.jsx(Sn,{tone:"negative",children:"Load failed"}):Vt?l.jsxs(Sn,{tone:"positive",children:[ia.length," saved"]}):l.jsxs(Sn,{tone:"neutral",children:[ia.length," quer",ia.length!==1?"ies":"y"]})]}),l.jsx("p",{className:"supporting-copy",children:"Add the queries your customers use, one per line. You can refine your list later."}),l.jsxs("div",{className:"space-y-2 border-b border-default pb-4",children:[l.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[l.jsxs("div",{className:"min-w-0 space-y-1",children:[l.jsx("h3",{className:"text-sm font-semibold text-heading",children:"Research queries with your agent"}),l.jsx("p",{className:"max-w-prose text-sm text-secondary",children:"Ask your agent to compare answers and available sources with Canonry Research, then recommend queries. Research does not change your tracked queries."})]}),l.jsx(le,{type:"button",variant:"outline",size:"sm",className:"min-h-11 shrink-0 self-start",onClick:gn(vl),children:zn?"Research prompt copied":"Copy research prompt"})]}),l.jsxs("details",{open:Jo||void 0,className:"text-sm text-secondary",children:[l.jsx("summary",{className:"min-h-11 cursor-pointer py-3 text-link",children:"View agent prompt"}),l.jsx("textarea",{"aria-label":"Agent query research prompt",readOnly:!0,className:"setup-textarea mt-2 w-full",rows:8,value:Xi})]}),Jo?l.jsx("p",{role:"alert",className:"text-sm text-negative",children:"Could not copy. Select and copy the prompt above."}):null]}),se?l.jsx("div",{className:"rounded-md border border-default bg-bg-elevated/40 p-4 text-sm text-secondary",role:"status",children:"Loading saved queries…"}):V.isError?l.jsxs("div",{className:"compact-stack",children:[l.jsx("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:"Saved queries could not be loaded. Retry before changing the query basket."}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?$e:Bn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>{V.refetch()},children:"Retry loading queries"})]})]}):Vt?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:ia.map(H=>l.jsx("li",{children:H},H))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?$e:Bn,children:"Back"}),l.jsx(le,{type:"button",variant:"outline",onClick:()=>hi(!1),children:"Edit queries"}),l.jsx(le,{type:"button",onClick:()=>ir("queries",T?4:3,ia.length),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[Et.length>0?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[l.jsx("span",{className:"flex-1 border-t border-base"}),"auto-generate",l.jsx("span",{className:"flex-1 border-t border-base"})]}),l.jsxs("div",{className:"flex items-end gap-2",children:[l.jsxs("div",{className:"setup-field flex-1",children:[l.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),l.jsx("select",{id:"gen-provider",className:"setup-input",value:rn,onChange:H=>yi(H.target.value),children:Et.map(H=>l.jsxs("option",{value:H.name,children:[H.displayName??H.name,H.model?` (${H.model})`:""]},H.name))})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),l.jsx("select",{id:"gen-count",className:"setup-input",value:Yo,onChange:H=>Ys(Number(H.target.value)),children:[3,5,10,15,20].map(H=>l.jsx("option",{value:H,children:H},H))})]}),l.jsx(le,{type:"button",variant:"outline",disabled:bu||!rn,onClick:gn(Ba),children:bu?"Analyzing site...":"Generate"})]}),fl?l.jsx("p",{className:"text-negative-400 text-sm",children:fl}):null]}):null,T?null:l.jsxs("div",{className:"flex items-center gap-2 text-muted text-xs uppercase tracking-wide",children:[l.jsx("span",{className:"flex-1 border-t border-base"}),"or type manually",l.jsx("span",{className:"flex-1 border-t border-base"})]}),l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"queries",children:"Queries (one per line)"}),l.jsx("textarea",{id:"queries",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
84
+ best invisalign downtown brooklyn
85
+ pediatric dentist brooklyn heights`,value:Qt,onChange:H=>Rn(H.target.value)})]}),Hs?l.jsx("p",{className:"text-negative-400 text-sm",children:Hs}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?$e:Bn,children:"Back"}),l.jsx(le,{type:"button",variant:"ghost",onClick:_l,children:T?"Finish without AI Visibility":"Skip for now"}),l.jsx(le,{type:"button",disabled:ia.length===0||Dn,onClick:gn(ar),children:Dn?"Saving...":`Save ${ia.length} quer${ia.length!==1?"ies":"y"}`})]})]})]});case 3:return l.jsxs(Ta,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),l.jsx("h2",{children:"Add competitors"})]}),Wi?l.jsx(Sn,{tone:"positive",children:"Saved"}):null]}),l.jsx("p",{className:"supporting-copy",children:"Optional. Domains that compete for the same queries, one per line. You can add them later from the project."}),Wi?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:xi.map(H=>l.jsx("li",{children:H},H))}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Bn,children:"Back"}),l.jsx(le,{type:"button",onClick:()=>ir("competitors",4,xi.length),children:"Continue"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{className:"setup-field",children:[l.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),l.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
86
+ competitor2.com`,value:bi,onChange:H=>Ji(H.target.value)})]}),tn?l.jsx("p",{className:"text-negative-400 text-sm",children:tn}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Bn,children:"Back"}),l.jsx("div",{className:"flex gap-2",children:xi.length===0?l.jsx(le,{type:"button",onClick:Tl,children:"Continue without competitors"}):l.jsxs(l.Fragment,{children:[l.jsx(le,{type:"button",variant:"outline",onClick:Tl,children:"Skip"}),l.jsx(le,{type:"button",disabled:wl,onClick:gn(Nl),children:wl?"Saving...":`Save ${xi.length} competitor${xi.length!==1?"s":""}`})]})})]})]})]});case 4:{const H=Wa.data,Xe=H?.status??(ts===tt?.id?tt.status:void 0),Si=Xe==="completed"||Xe==="partial"||Xe==="failed"||Xe==="cancelled",as=H?.snapshots??[],La=H?.queryCounts,Rl=Xe?Lk(Xe,as.length):!1,Nn=Ge&&!Ja,ki=An??(H?.error?JQ(H.error):Xe==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Xe==="completed"||Xe==="partial")&&as.length===0?"The sweep finished without producing any snapshots.":tt?.statusDetail||"The sweep did not produce a baseline.");let ni=null;return Nn||Rl?ni=l.jsx(Sn,{tone:"positive",children:"Complete"}):An&&!Ja?ni=l.jsx(Sn,{tone:"negative",children:"Failed"}):Si?ni=l.jsx(Sn,{tone:"negative",children:Xe==="cancelled"?"Cancelled":"Failed"}):Ja&&(ni=l.jsx(Sn,{tone:"caution",children:"Running"})),l.jsxs(Ta,{className:"surface-card step-card",children:[l.jsxs("div",{className:"section-head",children:[l.jsxs("div",{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:T?"Step 2 of 2":"Step 5 of 5"}),l.jsx("h2",{children:So()?"AI Visibility":"Launch first run"})]}),ni]}),Nn?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-secondary",children:["Setup is complete. ",l.jsx("span",{className:"text-strong font-medium",children:Ne})," already has a successful answer-visibility baseline."]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",onClick:()=>ct(),children:f?"Finish setup":"Open project dashboard →"})]})]}):!Ja&&So()?l.jsxs("div",{className:"compact-stack",children:[Ne?l.jsx(vW,{projectName:Ne}):l.jsx("p",{className:"text-sm text-secondary",children:a0}),An&&l.jsx("p",{role:"alert",className:"text-sm text-negative",children:An}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",onClick:$e,children:"Open project dashboard →"})]})]}):Ja?Si?Rl?l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"text-neutral",children:["Sweep complete. Your first answer-visibility snapshot for"," ",l.jsx("span",{className:"text-heading font-medium",children:Ne}),":"]}),l.jsxs("div",{className:"grid grid-cols-3 gap-2 mt-1",children:[l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Mentioned"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:La?l.jsxs(l.Fragment,{children:[La.mentionedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",La.totalQueries]})]}):"Unavailable"}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries naming your brand"})]}),l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Cited"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:La?l.jsxs(l.Fragment,{children:[La.citedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",La.totalQueries]})]}):"Unavailable"}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"queries citing your site"})]}),l.jsxs("div",{className:"rounded-md border border-default bg-surface p-3",children:[l.jsx("p",{className:"text-xs font-medium text-secondary",children:"Results"}),l.jsx("p",{className:"text-2xl font-bold tabular-nums text-primary mt-1",children:as.length}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),!b&&Ne?l.jsx(lte,{projectName:Ne}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",onClick:()=>ct(),children:f?"Finish setup":"Open project dashboard →"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:ki}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:So()?a0:x?"Fix provider or query configuration if needed, then retry without leaving setup.":"Ask an administrator to review the provider and query configuration."})]}),l.jsxs("div",{className:"setup-nav",children:[x&&!So()?l.jsx(le,{type:"button",variant:"outline",asChild:!0,children:l.jsx(at,{to:"/settings",children:"Configure providers"})}):l.jsx("span",{}),So()||!x?l.jsx(le,{type:"button",onClick:$e,children:"Open project dashboard →"}):l.jsx(le,{type:"button",disabled:vi||!!ei,onClick:gn(wi),children:vi?"Retrying...":"Retry visibility sweep"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsx("p",{className:"text-neutral",children:"Sweep running. This usually takes 30 to 60 seconds."}),l.jsx("div",{className:"rounded-md border border-default bg-surface p-3 text-xs text-muted",children:l.jsxs("p",{children:["Status: ",l.jsx("span",{className:"text-neutral",children:Xe??"queued"})]})}),Wa.isError&&l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:Wa.error instanceof Error?Wa.error.message:"Could not refresh the sweep status."}),l.jsx(le,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{Wa.refetch()},children:"Retry status check"})]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx("span",{}),l.jsx(le,{type:"button",variant:"outline",onClick:f?()=>ct():$e,children:f?"Finish setup":"Watch on project page"})]})]}):l.jsxs("div",{className:"compact-stack",children:[l.jsxs("p",{className:"supporting-copy",children:["Your queries are saved. Run a first sweep to get a baseline for"," ",l.jsx("span",{className:"text-heading font-medium",children:Ne}),", or finish and run it later from the project. A sweep calls the answer engines, so it costs provider usage."]}),(ei||An)&&l.jsxs("div",{role:"alert",className:"rounded-md border border-negative bg-negative-soft p-3 text-sm text-negative",children:[l.jsx("p",{children:An??ei}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:"Resolve the blocker above, then retry the sweep here."})]}),l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:Bn,children:"Back"}),l.jsx(le,{type:"button",variant:"ghost",onClick:Ft,children:"Finish without running"}),va==="no_provider"&&!T?l.jsx(le,{type:"button",asChild:!0,children:l.jsx(at,{to:"/settings",children:"Configure a provider"})}):l.jsx(le,{type:"button",disabled:vi||!!ei,title:ei,onClick:gn(wi),children:vi?"Launching...":An?"Retry visibility sweep":"Launch visibility sweep"})]})]})]})}default:return null}})();return l.jsxs("div",{className:T?"page-container visibility-setup":"page-container",children:[f?l.jsx(Po,{current:"visibility"}):null,l.jsxs("div",{className:"page-header",children:[l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{ref:u?h:void 0,tabIndex:u?-1:void 0,className:"page-title",children:u?"Set up AI Visibility":"Setup"}),l.jsx("p",{className:"page-subtitle",children:u?"Connect an answer engine, then choose queries for your first sweep.":"Create a project and run its first visibility check."})]}),f?l.jsx("div",{className:"page-header-right",children:l.jsx(le,{type:"button",variant:"outline",className:"min-h-11",onClick:Ft,children:"Skip AI Visibility"})}):null]}),f?null:l.jsx(hte,{current:T?B===4?1:0:B,labels:T?mte:dte}),l.jsxs("section",{className:"setup-wizard",children:[eo,ti]})]})}const mg="canonry mcp install --client claude-code",yte="https://github.com/Canonry/canonry/blob/main/docs/mcp.md";function bte(){const e=_.useRef(J1()).current,n=_.useRef(new Set),i=_.useCallback((r,u)=>{n.current.has(r)||(n.current.add(r),ay({...u,flowVersion:ft,onboardingSessionId:e,surface:"platform",eventId:W1()}))},[e]);return _.useEffect(()=>{i("started",{event:"onboarding.started",step:"finish",resumed:!1})},[i]),_.useCallback(r=>{i(`action:${r}`,{event:"onboarding.step_completed",step:"finish",method:"manual",nextAction:r})},[i])}const vp=_.createContext(()=>{});function vte({projectName:e,skippedVisibility:n=!1}){const i=yt({...MY({client:J,path:{name:e}}),retry:!1}),r=i.data?.hasData?i.data:null,u=bte(),h=$k(e,Oe["site-audit"]),f=$k(e,Oe["answer-visibility"]),b={...h?{site:h,fixes:h}:{},...xte(f,n)};return l.jsx(vp.Provider,{value:u,children:l.jsxs("div",{className:"page-container max-w-6xl py-8 md:py-10",children:[l.jsx(Po,{current:"done",outcomes:b}),l.jsxs("header",{className:"relative mx-auto mt-12 max-w-2xl text-center md:mt-16",children:[l.jsx(wte,{}),l.jsx("p",{className:"onb-reveal mt-6 text-sm font-medium text-positive",style:Ra(250),children:"Setup complete"}),l.jsx("h1",{className:"onb-reveal mt-2 text-5xl font-semibold tracking-tight text-heading md:text-6xl",style:Ra(350),children:"You’re set."}),l.jsxs("p",{className:"onb-reveal mx-auto mt-4 max-w-xl text-lg text-secondary",style:Ra(450),children:["Canonry is tracking ",l.jsx("span",{className:"font-medium text-heading",children:e}),". Here’s how to get the most out of it from here."]})]}),l.jsxs("div",{className:"mt-14 grid gap-4 md:grid-cols-6",children:[l.jsx(Gd,{className:"md:col-span-4 md:row-span-2",delayMs:600,labelledBy:"onb-agent-heading",children:l.jsx(jte,{projectName:e})}),l.jsx(Gd,{className:"md:col-span-2 md:row-span-2",delayMs:700,labelledBy:"onb-data-heading",children:l.jsx(Cte,{projectName:e})}),l.jsx(Gd,{className:"md:col-span-3",delayMs:800,labelledBy:"onb-schedule-heading",children:l.jsx(Ete,{projectName:e})}),l.jsx(Gd,{className:"md:col-span-3",delayMs:900,labelledBy:"onb-alerts-heading",children:l.jsx(Rte,{projectName:e,score:r?.aggregateScore??null})})]}),l.jsxs("div",{className:"onb-reveal mt-12 flex flex-col items-center gap-3 sm:flex-row sm:justify-center",style:Ra(1e3),children:[l.jsx(le,{asChild:!0,className:"h-11 rounded-full px-6 text-base md:h-11",children:l.jsxs(at,{to:"/projects/$projectName",params:{projectName:e},replace:!0,onClick:()=>u("open_project"),children:["Open ",e,l.jsx(qc,{className:"size-4","aria-hidden":"true"})]})}),l.jsx(le,{asChild:!0,variant:"ghost",className:"h-11 rounded-full px-5 md:h-11",children:l.jsx(at,{to:"/projects/$projectName/technical-aeo",params:{projectName:e},replace:!0,onClick:()=>u("review_page_health"),children:"Review page health"})})]})]})})}function $k(e,n){const i=yt({...t4({client:J,path:{name:e},query:{kind:n,limit:20}}),retry:!1,refetchInterval:r=>Kk(r.state.status==="success"?{isSuccess:!0,data:r.state.data}:{isSuccess:!1})==="pending"?5e3:!1});return Kk(i)}function xte(e,n){return e===void 0?{}:n?{visibility:"skipped"}:{visibility:e}}function Kk(e){if(!e.isSuccess||!e.data)return"unknown";const n=e.data.filter(i=>i.trigger!==Ga.probe);if(!n.some(i=>i.status===Nt.completed||i.status===Nt.partial))return n.some(i=>i.status===Nt.queued||i.status===Nt.running)?"pending":n.length>0?"incomplete":"skipped"}function Ra(e){return{"--onb-delay":`${e}ms`}}function wte(){return l.jsx("div",{className:"onb-check relative mx-auto size-20","aria-hidden":"true",children:l.jsxs("svg",{viewBox:"0 0 80 80",className:"relative size-20",children:[l.jsx("circle",{className:"onb-check-ring",cx:"40",cy:"40",r:"36",fill:"none",strokeWidth:"3",pathLength:"1"}),l.jsx("path",{className:"onb-check-mark",d:"M25 41 L35 51 L56 30",fill:"none",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round",pathLength:"1"})]})})}function Gd({className:e="",delayMs:n,labelledBy:i,children:r}){return l.jsx("section",{"aria-labelledby":i,className:`onb-reveal onb-tile flex flex-col overflow-hidden rounded-2xl border border-default bg-surface p-6 md:p-7 ${e}`,style:Ra(n),children:r})}function xp({id:e,eyebrow:n,title:i,children:r}){return l.jsxs("div",{children:[l.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted",children:n}),l.jsx("h2",{id:e,className:"mt-1.5 text-2xl font-semibold tracking-tight text-heading",children:i}),l.jsx("p",{className:"mt-2 text-sm text-secondary",children:r})]})}const Hd=[{id:"diagnose",label:"Diagnose",prompt:"Why did we lose citations this week?",calls:["canonry_insights_list","canonry_competitor_landscape"],reply:"Two engines started citing a competitor’s comparison page instead of yours. Want me to draft one that answers the same query?"},{id:"fix",label:"Fix",prompt:"Fix the weakest pages on the site.",calls:["canonry_technical_aeo_pages","canonry_site_health_page_audit"],reply:"The lowest-scoring pages are missing structured data and answer-first intros. I’ve written the changes for you to review."},{id:"automate",label:"Automate",prompt:"Re-check everything every Monday and tell me in Slack.",calls:["canonry_schedule_set","canonry_agent_webhook_attach"],reply:"Done. A sweep runs every Monday, and I’ll post what changed to Slack."}],Ste=9e3;function kte(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function jte({projectName:e}){const n=_.useContext(vp),[i,r]=_.useState(0),[u,h]=_.useState(!1),[f,b]=_.useState(!1);_.useEffect(()=>{if(u||kte())return;const S=window.setTimeout(()=>r(j=>(j+1)%Hd.length),Ste);return()=>window.clearTimeout(S)},[i,u]);const v=async()=>{try{await navigator.clipboard.writeText(mg),n("copy_agent_command"),b(!0),window.setTimeout(()=>b(!1),1800)}catch{vn({tone:"negative",title:"Could not copy the command",detail:`Run ${mg} in your terminal.`})}},x=Hd[i]??Hd[0];return l.jsxs(l.Fragment,{children:[l.jsxs(xp,{id:"onb-agent-heading",eyebrow:"Your agent",title:"Let your agent run it.",children:["Your agent can do everything in Canonry: diagnose a drop, fix pages, run sweeps and scans, and write the client report. Use Claude Code, Codex, Cursor, or Aero, the analyst built into"," ",l.jsx("span",{className:"text-heading",children:e})," that reviews every sweep on its own."]}),l.jsxs("div",{className:"mt-6 flex flex-1 flex-col rounded-xl border border-default bg-bg",onMouseEnter:()=>h(!0),onMouseLeave:()=>h(!1),onFocus:()=>h(!0),children:[l.jsxs("div",{className:"flex items-center gap-1 border-b border-default px-3 py-2",role:"tablist","aria-label":"Example agent sessions",children:[Hd.map((S,j)=>l.jsx("button",{type:"button",role:"tab","aria-selected":j===i,onClick:()=>{r(j),h(!0)},className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${j===i?"bg-surface-inset text-heading":"text-muted hover:text-secondary"}`,children:S.label},S.id)),l.jsx("span",{className:"ml-auto text-xs text-faint",children:"Example"})]}),l.jsxs("div",{role:"tabpanel","aria-label":`${x.label} example`,className:"flex-1 p-4 font-mono text-[13px] leading-relaxed",children:[l.jsxs("p",{className:"onb-type text-heading",style:Ra(150),children:[l.jsx("span",{className:"text-muted",children:"> "}),x.prompt]}),x.calls.map((S,j)=>l.jsxs("p",{className:"onb-line mt-1 text-muted first:mt-3",style:Ra(1300+j*450),children:[l.jsx("span",{className:"text-positive",children:"●"})," ",S]},S)),l.jsx("p",{className:"onb-line mt-3 text-secondary",style:Ra(1500+x.calls.length*450),children:x.reply}),l.jsx("span",{className:"onb-caret mt-2 inline-block h-4 w-2 bg-current align-middle text-secondary",style:Ra(1900+x.calls.length*450),"aria-hidden":"true"})]},x.id)]}),l.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2",children:[l.jsx("code",{className:"min-w-0 flex-1 truncate rounded-lg border border-default bg-surface-inset px-3 py-2 font-mono text-[13px] text-heading",children:mg}),l.jsxs(le,{type:"button",variant:"secondary",size:"sm",className:"h-9 md:h-9",onClick:()=>{v()},children:[f?l.jsx(Xc,{className:"size-4","aria-hidden":"true"}):l.jsx(g0,{className:"size-4","aria-hidden":"true"}),f?"Copied":"Copy"]}),l.jsx("a",{href:yte,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:"Other clients"})]})]})}const Ate=[{icon:f0,label:"Search Console",action:"connect_search_console",to:"/projects/$projectName/search-console"},{icon:oj,label:"Google Analytics",action:"connect_analytics",to:"/projects/$projectName/activity"},{icon:lj,label:"Business Profile",action:"connect_business_profile",to:"/projects/$projectName/local"}],Nte=["GPTBot","ClaudeBot","PerplexityBot"];function Cte({projectName:e}){const n=_.useContext(vp);return l.jsxs(l.Fragment,{children:[l.jsx(xp,{id:"onb-data-heading",eyebrow:"Server-side traffic",title:"See the AI bots.",children:"AI crawlers and answer-engine fetches never run JavaScript, so Google Analytics never sees them. Canonry reads them straight from your server."}),l.jsx(_te,{}),l.jsxs(at,{to:"/traffic",onClick:()=>n("connect_server_traffic"),"aria-label":"Connect server-side traffic",className:"group flex items-center gap-3 rounded-xl border border-strong bg-surface-inset px-4 py-3 text-sm font-medium text-heading transition-colors hover:bg-surface-inset-hover",children:[l.jsx(cj,{className:"size-4 text-positive","aria-hidden":"true"}),l.jsxs("span",{className:"flex-1",children:["Connect your server",l.jsx("span",{className:"block text-xs font-normal text-secondary",children:"Cloudflare, Vercel, WordPress, or Cloud Run"})]}),l.jsx(qc,{className:"size-4 text-link transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]}),l.jsx("p",{className:"mt-5 text-xs font-medium uppercase tracking-wide text-muted",children:"Also connect"}),l.jsx("ul",{className:"mt-1 divide-y divide-default",children:Ate.map(({icon:i,label:r,action:u,to:h})=>l.jsx("li",{children:l.jsxs(at,{to:h,params:{projectName:e},"aria-label":`Connect ${r}`,onClick:()=>n(u),className:"group flex items-center gap-3 py-2.5 text-sm text-heading",children:[l.jsx(i,{className:"size-4 text-muted","aria-hidden":"true"}),l.jsx("span",{className:"flex-1",children:r}),l.jsx(qc,{className:"size-3.5 text-link transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},r))})]})}function _te(){const e=[22,70,118];return l.jsxs("div",{className:"relative my-6 h-36","aria-hidden":"true",children:[l.jsx("svg",{viewBox:"0 0 200 140",preserveAspectRatio:"none",className:"absolute inset-0 size-full",children:e.map((n,i)=>l.jsx("path",{className:"onb-flow",style:Ra(i*400),d:`M20 ${n} C 100 ${n}, 118 70, 170 70`,fill:"none",strokeWidth:"1.5"},n))}),Nte.map((n,i)=>l.jsx("span",{className:"onb-bot absolute left-0 -translate-y-1/2 rounded-md border border-default bg-bg-elevated px-2 py-1 font-mono text-[11px] text-secondary",style:{top:`${(e[i]??70)/140*100}%`,...Ra(i*600)},children:n},n)),l.jsx("span",{className:"onb-hub absolute right-0 top-1/2 flex size-11 -translate-y-1/2 items-center justify-center rounded-2xl bg-accent text-on-inverse",children:l.jsx(cj,{className:"size-5"})})]})}const Tte=["M","T","W","T","F","S","S"];function Ete({projectName:e}){return l.jsxs(l.Fragment,{children:[l.jsx(xp,{id:"onb-schedule-heading",eyebrow:"Scheduled sweeps",title:"Runs on its own.",children:"Re-measure every week without lifting a finger, so a drop shows up before a customer notices."}),l.jsx("ol",{className:"mt-6 grid grid-cols-7 gap-2","aria-hidden":"true",children:Tte.map((n,i)=>l.jsxs("li",{className:"flex flex-col items-center gap-2",children:[l.jsx("span",{className:"onb-day size-3 rounded-full bg-surface-inset",style:Ra(i*500)}),l.jsx("span",{className:"text-xs text-muted",children:n})]},i))}),l.jsx(G4,{projectName:e,to:"/projects/$projectName/settings",icon:rj,label:"Set a schedule",action:"set_schedule"})]})}function Rte({projectName:e,score:n}){return l.jsxs(l.Fragment,{children:[l.jsx(xp,{id:"onb-alerts-heading",eyebrow:"Notifications",title:"Hear about changes.",children:"Get a webhook in Slack or anywhere else when a sweep finishes or a score moves."}),l.jsxs("div",{className:"relative mt-6 flex h-14 items-center","aria-hidden":"true",children:[l.jsx("span",{className:"onb-bell flex size-10 items-center justify-center rounded-full border border-default bg-bg-elevated",children:l.jsx(fg,{className:"size-4 text-secondary"})}),l.jsxs("span",{className:"onb-toast ml-3 flex items-center gap-2 rounded-xl border border-default bg-bg-elevated px-3 py-2 text-sm shadow-[0_8px_24px_var(--color-shadow-panel)]",children:[l.jsx("span",{className:"size-2 rounded-full bg-positive-400"}),l.jsx("span",{className:"text-heading",children:e}),l.jsx("span",{className:"text-secondary",children:n===null?"sweep finished":`page health ${n}`})]})]}),l.jsx(G4,{projectName:e,to:"/projects/$projectName/settings",icon:fg,label:"Add a notification",action:"add_notification"})]})}function G4({projectName:e,to:n,icon:i,label:r,action:u}){const h=_.useContext(vp);return l.jsxs(at,{to:n,params:{projectName:e},onClick:()=>h(u),className:"group mt-6 inline-flex items-center gap-2 self-start text-sm font-medium text-link",children:[l.jsx(i,{className:"size-4","aria-hidden":"true"}),r,l.jsx(qc,{className:"size-3.5 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})}const Dte=_.lazy(async()=>({default:(await Zi(()=>import("./SiteHealthSection-C-JaNKpS.js").then(n=>n.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),zte=`Public pages only, crawled from this computer and stored locally. The first scan reads up to ${o3} pages, then stops.`,Ite=1800,Ote="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",Pte="Help me set up Canonry for my public site.\n\nUse the official Canonry docs:\n- Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent\n- CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md\n- Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md\n- MCP setup: https://github.com/Canonry/canonry/blob/main/docs/mcp.md\n\nPick one path and stay on it. Use connected Canonry tools (plugin or MCP) only if you have them and I have not pointed you at a specific install. A connected tool runs in its own process and never sees `CANONRY_CONFIG_DIR`, `CANONRY_PORT`, or anything else you export in a shell, so it always acts on my default install. If I named a config directory, a port, or a sandbox, that is the shell path: use `cnry` and tell me which path you chose. Never mix the two in one run, and never create a duplicate project. The `cnry` and `canonry` commands are interchangeable.\n\n1. Ask for my public domain, country, and language. Do not create or scan anything yet. Country and language are only applied when a project is created, so if you reuse an existing project, report its country and language instead of changing them.\n2. Shell path only: confirm `cnry` is on PATH, then run `cnry --version`. If Canonry is missing, propose `npm install -g @canonry/canonry` and wait for approval. Then run `cnry doctor --format json`, which is the command that says whether config, database, and server are in place. `cnry --version` does not read config and succeeds on a completely unconfigured install, so it cannot answer this. If config is missing, run `cnry bootstrap` yourself: it is not interactive, takes about a second, and is safe to rerun. Do not hand it to me and wait. The interactive command is `cnry init`, which is optional provider and OAuth setup that Page Health does not need. Bootstrap prints an API key, so do not repeat its output back to me, and never ask me to paste passwords, API keys, OAuth credentials, or command output.\n3. Confirm the API is reachable. `cnry doctor --format json` reports it, and any project read exits non-zero with `CONNECTION_ERROR` when it is not. If it is unreachable, propose `cnry start` and wait for approval. Use `cnry start`, which is the background daemon, and not `cnry serve`, which runs in the foreground and will block you until I stop it, even though some error messages suggest it. Stop anything you started with `cnry stop`.\n4. List projects with the connected project tool or `cnry project list --format json`, and reuse one whose domain matches. Confirm the proposed name is not already assigned to a different domain. To find out whether a project has already been scanned, run `cnry technical-aeo score <project> --format json` with no `--run-id`, which reports the latest run. Read the `hasData` field, not the score: this command exits 0 and reports `aggregateScore: 0` for a project that has never been scanned, so reading the score alone would have you tell me my site scored zero. If `hasData` is true and `runStatus` is `completed` or `partial`, read that scan instead of starting a new one. If no project matches, show the exact create operation and wait for approval.\n5. Propose a bounded Site Health scan: `--max-pages 100` for a first look, plus whether dead-link checking is on (it is off unless you pass `--check-dead-links`). Show the connected operation or the exact `cnry technical-aeo run <project> --max-pages 100 --wait --format json` command with the project name filled in, and wait for separate approval before scanning. `--wait` polls for up to 15 minutes and returns only the run id and status. If the status it returns is still `queued` or `running`, the scan has not finished: do not rerun it or report results, poll `cnry technical-aeo progress <project> --run-id <run-id> --format json` until it is terminal. If `--wait` outruns your own tool timeout first, recover the run id with `cnry technical-aeo score <project> --format json` and poll the same way.\n6. When the run is `completed` or `partial`, read `cnry technical-aeo crawl <project> --run-id <run-id> --format json` first. It is the only one of these commands that carries `termination` and `complete`; the score and pages commands do not. Then read `cnry technical-aeo score <project> --run-id <run-id> --format json` and `cnry technical-aeo pages <project> --run-id <run-id> --sort score-asc --limit 10 --format jsonl`. Tell me the termination reason in plain words and whether the scan covered the whole site or stopped at a page, link, depth, or time limit. A `partial` run scored the pages it reached and not my site, so never present it as a full-site result. If it stopped early, the fix depends on the reason, so say which: a page or depth limit needs a larger budget, a time limit needs a smaller scan (a lower `--max-pages` or `--max-depth`). If the run failed or was cancelled, inspect the run error and stop.\n7. Summarize only completed evidence, then propose AI Visibility setup. Ask before you add queries, connect providers, start a provider-backed or quota-consuming run, edit files, or publish.";function qte(e,n){return e==="legacy"?"legacy":e==="platform"?"platform":n.state==="success"?n.projectCount===0?"platform":"legacy":n.state==="error"?"retry":"loading"}const Mte="2000-01-01T00:00:00.000Z",Bte=5e3;function Lte(e,n){const i=new Set,r=new Map;for(const f of n)f.trigger!==Ga.probe&&(r.has(f.projectId)||r.set(f.projectId,f.id),(f.status===Nt.completed||f.status===Nt.partial)&&i.add(f.projectId));const h=(e.every(f=>f.createdAt)?[...e].sort((f,b)=>(f.createdAt??"").localeCompare(b.createdAt??"")||f.name.localeCompare(b.name)):e).find(f=>!i.has(f.id));return h?{projectName:h.name,runId:r.get(h.id)}:null}const H4=[{value:"US",label:"United States"},{value:"CA",label:"Canada"},{value:"GB",label:"United Kingdom"},{value:"AU",label:"Australia"},{value:"NZ",label:"New Zealand"},{value:"IE",label:"Ireland"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"ES",label:"Spain"},{value:"IT",label:"Italy"},{value:"NL",label:"Netherlands"},{value:"BR",label:"Brazil"},{value:"MX",label:"Mexico"},{value:"IN",label:"India"},{value:"SG",label:"Singapore"},{value:"JP",label:"Japan"}],F4=[{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"it",label:"Italian"},{value:"pt",label:"Portuguese"},{value:"nl",label:"Dutch"},{value:"ja",label:"Japanese"}];function Ute(e,n){try{const i=new Intl.DisplayNames(["en"],{type:"region"}),r=new Intl.DisplayNames(["en"],{type:"language"}),u=e.length===2?i.of(e.toUpperCase()):void 0,h=n?r.of(n.toLowerCase()):void 0;return`${u??(e||"Country")} · ${h??(n||"Language")}`}catch{return`${e||"Country"} · ${n||"Language"}`}}function Vte(e,n){const i=e.trim().toUpperCase(),r=n.trim().toLowerCase();return{countryValid:H4.some(u=>u.value===i),languageValid:F4.some(u=>u.value===r)}}function $te(e){const n=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(n)||n.includes(":")}function Kte(e){const n=e.trim();if(!n)return null;const i=/^[a-z][a-z\d+.-]*:\/\//i.test(n)?n:`https://${n}`;let r;try{r=new URL(i)}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:")return null;const u=r.hostname.toLowerCase().replace(/^www\./,"");if(!u||u==="localhost"||$te(u)||!u.includes("."))return null;const h=u.replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return h?{canonicalDomain:u,projectName:h,displayName:u}:null}async function Gte(e,n=Ite){let i;const r=new Promise(h=>{i=setTimeout(()=>h({state:"timed-out"}),n)}),u=await Promise.race([e.then(h=>({state:"queued",run:h})),r]);return i&&clearTimeout(i),u}function Hte(e,n){e.catch(()=>{vn({title:"Site Health scan did not start",detail:"The project is safe. Choose Run scan in Site Health to retry.",tone:"negative",dedupeKey:`site-health-dispatch:${n}`})})}function Q4(e){const n=_.useRef(J1()).current,i=_.useRef(new Set),r=_.useCallback((u,h)=>{if(h){if(i.current.has(h))return;i.current.add(h)}ay({...u,surface:e,eventId:W1()})},[e]);return{onboardingSessionId:n,emit:r}}function Gk(e,n){return e instanceof yn&&e.statusCode===409?"A project with this name already exists. Change the project name, or open the existing project.":e instanceof Error&&e.message?e.message:n}function u0(){return l.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Preparing setup"}),l.jsx("p",{className:"page-subtitle",children:"Checking the projects already on this install."})]})}),l.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-default bg-surface p-4 text-sm text-secondary",role:"status",children:[l.jsx(Rs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function Fte({onRetry:e}){return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Can’t load projects"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not confirm whether this install already has a project."})]})}),l.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:"Setup is paused to protect existing projects."}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(le,{type:"button",className:"mt-4",variant:"secondary",onClick:e,children:"Retry project check"})]})]})}function Qte({projectName:e,initialRunId:n}){return l.jsx(fy,{title:"Site Health setup",children:l.jsx(Zte,{projectName:e,initialRunId:n})})}function Zte({projectName:e,initialRunId:n}){const i=Ps(),r=yt({...Fo({client:J}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:h}=Q4("site_health"),[f]=_.useState(()=>cF(n));_.useEffect(()=>{f&&uF()},[f]),_.useEffect(()=>{e&&h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.started",step:"run",resumed:!!n&&!f},"onboarding.started")},[h,f,n,u,e]),_.useEffect(()=>{!e||!n||PC(e)?.runId!==n&&OC(e,n)},[n,e]);const v=yt({...oy({client:J,path:{id:n??""}}),enabled:!!n,refetchInterval:({state:T})=>{const z=T.data?.status;return z==="completed"||z==="partial"||z==="failed"||z==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if(_.useEffect(()=>{if(!e||!n||!v)return;if(v==="completed"||v==="partial"){h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"automatic"},"onboarding.step_completed:run"),xm(n);return}if(v!=="failed"&&v!=="cancelled")return;const T=v==="cancelled"?"run_cancelled":"run_failed";h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:T},`onboarding.blocked:run:${T}`),xm(n)},[h,n,u,e,v]),!e)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project not found"}),l.jsx("p",{className:"page-subtitle",children:"This setup link does not identify a project."})]})}),l.jsx(le,{type:"button",variant:"secondary",onClick:()=>{i({to:"/projects"})},children:"View projects"})]});if(r.isPending)return l.jsxs("div",{className:"page-container max-w-3xl","aria-busy":"true","aria-live":"polite",children:[l.jsx(Po,{current:"site"}),l.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Rs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health setup…"]})]});if(r.isError)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Can’t resume setup"}),l.jsx("p",{className:"page-subtitle",children:"Canonry could not load the project for this Site Health scan."})]})}),l.jsxs("div",{className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",children:[l.jsx("p",{className:"text-sm text-secondary",children:"Check the connection or sign in again, then retry."}),l.jsx(le,{type:"button",className:"mt-4",variant:"secondary",onClick:()=>{r.refetch()},children:"Retry project check"})]})]});const x=r.data.find(T=>T.name===e);if(!x)return l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx("div",{className:"page-header",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project not found"}),l.jsxs("p",{className:"page-subtitle",children:["Canonry could not find ",e,". It will not open a different project."]})]})}),l.jsx(le,{type:"button",variant:"secondary",onClick:()=>{i({to:"/projects"})},children:"View projects"})]});const S=()=>{i({to:"/setup",search:{onboarding:"site-health",setupProject:x.name},replace:!0})},j=()=>{i({to:"/setup",search:{experience:"legacy",onboarding:"site-health",setupProject:x.name},replace:!0})},C=()=>{h({flowVersion:ft,onboardingSessionId:u,event:"onboarding.step_completed",step:"run",method:"skipped"},"onboarding.step_completed:run"),i({to:"/setup",search:{onboarding:"complete",setupProject:x.name,skipped:"visibility"},replace:!0})};return l.jsxs("div",{className:"page-container max-w-7xl py-8 md:py-10",children:[l.jsx("h1",{className:"sr-only",children:"Set up Canonry"}),l.jsx(_.Suspense,{fallback:l.jsxs("div",{className:"space-y-5",children:[l.jsx(Po,{current:"site"}),l.jsxs("div",{className:"flex min-h-72 items-center justify-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Rs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:l.jsx(Dte,{projectName:x.name,projectId:x.id,initialRunId:n,onReleaseInitialRun:S,showOnboardingActions:!0,onContinueOnboarding:j,onSkipOnboarding:C})})]})}function Yte(){const e=Qk({from:"/setup"}),n=e.onboarding==="site-health"&&!e.setupProject,i=e.onboarding==="site-health"&&e.experience!=="legacy",r=qF(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":r,[h,f]=_.useState(!1),[b,v]=_.useState(void 0),x=yt({...Fo({client:J}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),S=yt({...Fc({client:J,query:{kind:Oe["site-audit"],since:Mte,limit:Bte}}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),j=u==="auto"&&x.isSuccess&&x.isFetchedAfterMount&&x.data.length===0;_.useEffect(()=>{j&&f(!0)},[j]);const C=u!=="auto"?{state:"idle"}:x.isSuccess&&x.isFetchedAfterMount?{state:"success",projectCount:x.data.length}:x.isError?{state:"error"}:{state:"loading"},T=u==="legacy"?"legacy":h||j?"platform":qte(u,C);if(e.onboarding==="complete"&&e.setupProject)return l.jsx(vte,{projectName:e.setupProject,skippedVisibility:e.skipped==="visibility"});if(n||i)return l.jsx(Qte,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});const z=u==="auto"&&T==="legacy"&&!e.setupProject&&x.isSuccess;if(z&&b===void 0)return S.isError?v(null):S.isSuccess&&S.isFetchedAfterMount&&v(Lte(x.data,S.data)),l.jsx(u0,{});const q=z?b:null;return q?l.jsx(Xte,{projectName:q.projectName,runId:q.runId}):T==="legacy"?l.jsx(fte,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health",onboardingFinish:e.onboarding==="site-health"||e.onboarding==="first-run"}):T==="loading"?l.jsx(u0,{}):T==="retry"?l.jsx(Fte,{onRetry:()=>{x.refetch()}}):l.jsx(Jte,{onActivationStarted:()=>f(!0),skipSiteScan:e.siteScan==="skip"})}function Xte({projectName:e,runId:n}){const i=Ps();return _.useEffect(()=>{i({to:"/setup",search:{onboarding:"site-health",setupProject:e,...n?{siteHealthRunId:n}:{}},replace:!0})},[i,e,n]),l.jsx(u0,{})}function Jte({onActivationStarted:e,skipSiteScan:n}){return l.jsx(fy,{title:"Site Health setup",children:l.jsx(Wte,{onActivationStarted:e,skipSiteScan:n})})}function Wte({onActivationStarted:e,skipSiteScan:n}){const i=Ps(),r=Os(),u=ite(),h=yt({...VZ({client:J}),retry:!1}),f=ci($Z()),[b,v]=_.useState(""),[x,S]=_.useState(""),[j,C]=_.useState(""),[T,z]=_.useState("US"),[q,R]=_.useState("en"),[P,M]=_.useState(!1),[L,$]=_.useState("idle"),[Q,ae]=_.useState(null),[V,Z]=_.useState(null),[X,Ce]=_.useState(!1),[tt,Ge]=_.useState(null),[Ve,ke]=_.useState(!1),Le=h.isError?void 0:h.data,B=typeof Le?.enabled=="boolean"?Le.enabled:null,W=f.isPending?f.variables.body.enabled:B,[ve,Ae]=_.useState(null),se=_.useRef(null),{onboardingSessionId:Se,emit:Me}=Q4("platform");_.useEffect(()=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[Me,Se]);const xe=Kte(b),pe=x||xe?.projectName||"",ce=j||xe?.displayName||"",ue=L==="creating"||L==="dispatching",_e=V??tt,Ze=Ute(T,q),{countryValid:Ee,languageValid:Ct}=Vte(T,q),me=Ee&&Ct;_.useEffect(()=>{_e&&se.current?.focus()},[_e]);const Be=($e,ct)=>i({to:"/setup",search:{...ct?{siteHealthRunId:ct}:{},onboarding:"site-health",setupProject:$e.name},replace:!0}),Ne=async $e=>{$("dispatching"),Ge(null);try{const ct=u.mutateAsync({projectName:$e.name,projectId:$e.id,projectLabel:$e.displayName||$e.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:o3}}),Ft=await Gte(ct);if(Ft.state==="queued"){Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),lF(Ft.run.runId),await Be($e,Ft.run.runId);return}ct.then(()=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},Qt=>{Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:zc(Qt,"run_rejected")})}),Hte(ct,$e.id),await Be($e)}catch(ct){$("recovery"),Ge(Gk(ct,"The project was created, but the Site Health scan could not be started."));const Ft=zc(ct,"run_rejected");Me({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Ft}),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Ft},`onboarding.blocked:run:${Ft}`)}},re=async $e=>{if($e.preventDefault(),!(!xe||!n&&!P||!me||ue)){$("creating"),Z(null),Ce(!1),Ge(null);try{const ct=await aQ({name:pe,displayName:ce,canonicalDomain:xe.canonicalDomain,country:T,language:q});if(e(),ae(ct),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await r.invalidateQueries({queryKey:Xr({client:J})}),n){await i({to:"/setup",search:{experience:"legacy",onboarding:"first-run",setupProject:ct.name},replace:!0});return}await Ne(ct)}catch(ct){$("idle");const Ft=ct instanceof yn&&ct.statusCode===409;Ce(Ft),Z(Gk(ct,"Could not create the project. Try again.")),Me({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.blocked",step:"project",action:"save",reasonCode:zc(ct,"project_create_failed")},"onboarding.blocked:project"),Ft&&(e(),r.invalidateQueries({queryKey:Xr({client:J})}))}}},Ye=()=>{Q&&!ue&&Ne(Q)},vt=()=>{ue||i({to:"/projects"})},Mn=async()=>{try{await navigator.clipboard.writeText(Pte),ke(!0)}catch{vn({tone:"negative",title:"Could not copy setup request",detail:"Open the agent quickstart to continue with the CLI instead."})}},Ht=async $e=>{Ae(null);try{const ct=await f.mutateAsync({client:J,body:{enabled:$e}});r.setQueryData(a4({client:J}),ct),ct.enabled!==$e&&Ae(`The server kept telemetry ${ct.enabled?"on":"off"}. Check its telemetry settings.`)}catch{Ae("Could not update telemetry. Try again.")}};return Q&&L==="recovery"?l.jsxs("div",{className:"page-container max-w-3xl",children:[l.jsx(Po,{current:"site"}),l.jsx("div",{className:"page-header mt-8",children:l.jsxs("div",{className:"page-header-left",children:[l.jsx("h1",{className:"page-title",children:"Project created"}),l.jsxs("p",{className:"page-subtitle",children:[Q.displayName||Q.name," is ready. The Site Health scan needs another try."]})]})}),l.jsxs("div",{ref:se,className:"rounded-lg border border-negative bg-negative-soft p-4",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:tt}),l.jsx("p",{className:"mt-1 text-sm text-secondary",children:"You can retry the scan or continue setup and retry from Site Health."}),l.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[l.jsx(le,{type:"button",onClick:Ye,children:"Retry Site Health scan"}),l.jsx(le,{type:"button",variant:"secondary",onClick:()=>{Be(Q)},children:"Continue setup"})]})]})]}):l.jsxs("div",{className:"page-container max-w-xl py-8 md:py-12",children:[n?null:l.jsx(Po,{current:"site"}),l.jsxs("header",{className:`mb-8 ${n?"":"mt-8"}`,children:[l.jsx("h1",{id:"site-map-setup-title",className:"text-2xl font-semibold tracking-[-0.025em] text-heading",children:n?"Create a project":"Scan your site"}),l.jsx("p",{className:"mt-2 max-w-lg text-sm leading-6 text-secondary",children:n?"Add a public domain, then choose the queries you want to track. No site scan will run.":"Enter your public website to see its pages, structure, internal links, and technical SEO scores."})]}),l.jsxs("form",{"aria-labelledby":"site-map-setup-title",className:"space-y-6",onSubmit:gn(re),noValidate:!0,children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm font-medium text-heading",htmlFor:"launchpad-domain",children:"Website URL"}),l.jsx("input",{id:"launchpad-domain",className:"h-11 w-full rounded-md border border-strong bg-bg-elevated/50 px-3 text-base text-heading outline-none transition placeholder:text-muted focus:border-mono-500 focus:ring-1 focus:ring-mono-500",type:"text",inputMode:"url",autoComplete:"url",autoCapitalize:"none",spellCheck:!1,required:!0,"aria-invalid":!!(b&&!xe),"aria-describedby":b&&!xe?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:$e=>{v($e.target.value),Z(null),Ce(!1)}}),l.jsx("p",{id:"launchpad-domain-hint",className:"text-sm text-secondary",children:n?l.jsxs(l.Fragment,{children:["A public domain is still required."," ",l.jsx(at,{to:"/setup",search:{experience:"platform"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Map with Site Health instead"})]}):l.jsxs(l.Fragment,{children:["Only public pages are scanned."," ",l.jsx(at,{to:"/setup",search:{experience:"platform",onboarding:"first-run",siteScan:"skip"},className:"font-medium text-link underline-offset-4 hover:underline",children:"Set up without a site scan"})]})}),b&&!xe?l.jsx("p",{id:"launchpad-domain-error",className:"text-sm text-negative",role:"alert",children:"Enter a public domain, such as example.com."}):null]}),l.jsxs("details",{className:"group border-y border-default",children:[l.jsxs("summary",{className:"flex min-h-11 cursor-pointer list-none items-center justify-between gap-4 py-3 text-sm [&::-webkit-details-marker]:hidden",children:[l.jsx("span",{className:"font-medium text-heading",children:"Project name and locale"}),l.jsxs("span",{className:"flex items-center gap-2 text-secondary",children:[Ze,l.jsx(Yc,{className:"size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none","aria-hidden":"true"})]})]}),l.jsxs("div",{className:"space-y-5 border-t border-default py-4",children:[xe?l.jsxs("div",{children:[l.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Project"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-project-name",children:"Project name"}),l.jsx("input",{id:"launchpad-project-name",className:"setup-input h-10",type:"text",value:pe,onChange:$e=>S($e.target.value)})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-display-name",children:"Display name"}),l.jsx("input",{id:"launchpad-display-name",className:"setup-input h-10",type:"text",value:ce,onChange:$e=>C($e.target.value)})]})]})]}):null,l.jsxs("div",{children:[l.jsx("p",{className:"mb-3 text-sm font-medium text-heading",children:"Locale"}),l.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-country",children:"Country"}),l.jsx("select",{id:"launchpad-country",className:"setup-input h-10",value:T,onChange:$e=>z($e.target.value),children:H4.map($e=>l.jsx("option",{value:$e.value,children:$e.label},$e.value))})]}),l.jsxs("div",{className:"grid gap-2",children:[l.jsx("label",{className:"text-sm text-secondary",htmlFor:"launchpad-language",children:"Language"}),l.jsx("select",{id:"launchpad-language",className:"setup-input h-10",value:q,onChange:$e=>R($e.target.value),children:F4.map($e=>l.jsx("option",{value:$e.value,children:$e.label},$e.value))})]})]})]})]})]}),n?null:l.jsxs("label",{className:"flex min-h-11 cursor-pointer items-start gap-3 py-2",children:[l.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg",type:"checkbox",checked:P,onChange:$e=>M($e.target.checked),"aria-label":"Allow Canonry to scan this public site."}),l.jsxs("span",{className:"flex items-center gap-1.5",children:[l.jsx("span",{className:"text-sm leading-5 text-heading",children:"Allow Canonry to scan this public site."}),l.jsx(ma,{text:zte})]})]}),_e?l.jsxs("div",{ref:se,className:"rounded-md border border-negative bg-negative-soft p-3",role:"alert",tabIndex:-1,children:[l.jsx("p",{className:"text-sm font-medium text-heading",children:_e}),X?l.jsx(le,{type:"button",variant:"secondary",size:"sm",className:"mt-3",onClick:vt,children:"View projects"}):null]}):null,l.jsxs("div",{className:"grid gap-2",children:[l.jsx(le,{className:"h-11 w-full",type:"submit",disabled:!xe||!n&&!P||!me||ue,children:L==="creating"||L==="dispatching"?l.jsxs(l.Fragment,{children:[l.jsx(Rs,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"})," ",n?"Creating project…":"Mapping site…"]}):n?"Create project":"Scan site"}),L==="dispatching"?l.jsx("span",{className:"text-center text-sm text-secondary",role:"status",children:"Opening Site Health when the scan is ready."}):null]})]}),l.jsxs("section",{className:"mt-8 border-t border-default pt-6","aria-labelledby":"agent-setup-title",children:[l.jsx("p",{id:"agent-setup-title",className:"text-sm font-medium text-heading",children:"Use your agent instead"}),l.jsx("p",{className:"mt-1 text-sm leading-5 text-secondary",children:"Copy a complete CLI setup request into any agent."}),l.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-1",children:[l.jsxs(le,{type:"button",variant:"ghost",size:"sm",className:"-ml-3",onClick:gn(Mn),children:[Ve?l.jsx(Xc,{className:"size-3.5","aria-hidden":"true"}):l.jsx(g0,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{"aria-live":"polite",children:Ve?"Copied setup request":"Copy setup request"})]}),l.jsx(le,{asChild:!0,variant:"ghost",size:"sm",children:l.jsxs("a",{href:Ote,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",l.jsx(C6,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{className:"sr-only",children:" (opens in a new tab)"})]})})]})]}),B!==null?l.jsxs("section",{className:"mt-6 border-t border-default pt-5","aria-labelledby":"telemetry-title",children:[l.jsxs("label",{className:`flex min-h-11 items-start gap-3 py-2 ${f.isPending?"cursor-wait":"cursor-pointer"}`,children:[l.jsx("input",{className:"mt-0.5 size-4 shrink-0 rounded border-strong bg-bg accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mono-500 disabled:cursor-wait",type:"checkbox",checked:W??!1,disabled:f.isPending,onChange:$e=>{Ht($e.target.checked)},"aria-describedby":"telemetry-detail"}),l.jsxs("span",{className:"grid gap-0.5",children:[l.jsx("span",{id:"telemetry-title",className:"text-sm leading-5 text-heading",children:"Share anonymous product telemetry"}),l.jsx("span",{id:"telemetry-detail",className:"max-w-[70ch] text-sm leading-5 text-secondary",children:"Helps prioritize improvements. Canonry does not send raw domains, URLs, queries, answer content, or credentials."})]})]}),f.isPending?l.jsx("p",{className:"mt-1 text-sm text-secondary",role:"status",children:"Saving preference…"}):null,ve?l.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:ve}):null]}):null]})}function ene(){return l.jsx("div",{className:"page-container",children:l.jsx("section",{className:"page-section",children:l.jsxs(Ta,{className:"surface-card empty-card",children:[l.jsx("h1",{children:"Route not found"}),l.jsx("p",{children:"The current path does not map to a dashboard view."}),l.jsx(le,{asChild:!0,children:l.jsx(at,{to:"/",children:"Return to overview"})})]})})})}const Pa=qs(()=>Zi(()=>import("./ProjectPage-CIeU-buk.js"),__vite__mapDeps([5,1,0,2,3,4,6,7,8,9,10,11,12]),import.meta.url),"ProjectPage"),tne=qs(()=>Zi(()=>import("./RunsPage-DI6eJATZ.js"),__vite__mapDeps([13,1,11,4,2,7,12]),import.meta.url),"RunsPage"),nne=qs(()=>Zi(()=>import("./HistoryPage-r36HX1cC.js"),__vite__mapDeps([14,1,10,11,4,2,7,12]),import.meta.url),"HistoryPage"),ane=qs(()=>Zi(()=>import("./SettingsPage-Bw7GdXxs.js"),__vite__mapDeps([15,1,11,4,2,7,12]),import.meta.url),"SettingsPage"),ine=qs(()=>Zi(()=>import("./BacklinksPage-C6x9ELjk.js"),__vite__mapDeps([16,1,9,2,11,4,7,12]),import.meta.url),"BacklinksPage"),sne=qs(()=>Zi(()=>import("./TrafficPage-Cnsp276v.js"),__vite__mapDeps([17,1,8,2,11,4,7,12]),import.meta.url),"TrafficPage"),one=qs(()=>Zi(()=>import("./TrafficSourceDetailPage-CBIaJk7e.js"),__vite__mapDeps([18,1,8,3,4,2,11,7,12]),import.meta.url),"TrafficSourceDetailPage"),rne=qs(()=>Zi(()=>import("./MeasurementPropertyPage-ComoCzR4.js"),__vite__mapDeps([19,1,3,4,6,7,2,11,12]),import.meta.url),"MeasurementPropertyPage");function lne(){return l.jsx(mee,{children:l.jsx(ZQ,{children:l.jsx(dee,{})})})}const Vn=s6()({component:lne,validateSearch:e=>({manageQueries:e.manageQueries===!0||e.manageQueries==="true"?!0:void 0,runId:typeof e.runId=="string"?e.runId:void 0,siteHealthRunId:typeof e.siteHealthRunId=="string"?e.siteHealthRunId: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,onboarding:e.onboarding==="site-health"||e.onboarding==="first-run"||e.onboarding==="complete"?e.onboarding:void 0,experience:e.experience==="legacy"||e.experience==="platform"?e.experience:void 0,siteScan:e.siteScan==="skip"?"skip":void 0,skipped:e.skipped==="visibility"?"visibility":void 0,setupProject:typeof e.setupProject=="string"?e.setupProject:void 0,scope:typeof e.scope=="string"?e.scope:void 0,class:typeof e.class=="string"?e.class:void 0,...Object.fromEntries(["queryWorkspace","researchMode","trackingQueryId","measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId","measurementQueryKey","measurementAnswer"].map(n=>[n,typeof e[n]=="string"?e[n]:void 0]))})}),cne=Bt({getParentRoute:()=>Vn,path:"/",component:Fee,beforeLoad:async({context:e})=>{let n=e.queryClient.getQueryData(Xr({client:J}));if(n===void 0)try{n=await e.queryClient.ensureQueryData(Fo({client:J}))}catch{return}if(n.length===0)throw d0({to:"/setup"})}}),une=Bt({getParentRoute:()=>Vn,path:"/projects",component:Xee}),dne=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,$n=Bt({getParentRoute:()=>Vn,path:"/projects/$projectName",component:()=>l.jsx(pg,{}),beforeLoad:async({context:e,params:n,location:i})=>{const r=n.projectName;if(!dne.test(r))return;let u=e.queryClient.getQueryData(Xr({client:J}));if(!u)try{u=await e.queryClient.ensureQueryData(Fo({client:J}))}catch{return}const h=u.find(f=>f.id===r);if(h)throw d0({to:i.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(h.name)}`),replace:!0})}}),mne=Bt({getParentRoute:()=>$n,path:"/",component:()=>l.jsx(Pa,{tab:"overview"})}),pne=Bt({getParentRoute:()=>$n,path:"/portfolio",component:()=>l.jsx(Pa,{tab:"portfolio"})}),hne=Bt({getParentRoute:()=>$n,path:"/search-console",component:()=>l.jsx(Pa,{tab:"search-console"})}),fne=Bt({getParentRoute:()=>$n,path:"/conversions",component:()=>l.jsx(Pa,{tab:"conversions"})}),gne=Bt({getParentRoute:()=>$n,path:"/local",component:()=>l.jsx(Pa,{tab:"local"})}),yne=Bt({getParentRoute:()=>$n,path:"/discovery",component:()=>l.jsx(Pa,{tab:"discovery"})}),bne=Bt({getParentRoute:()=>$n,path:"/queries",component:()=>l.jsx(Pa,{tab:"queries"})}),vne=Bt({getParentRoute:()=>$n,path:"/properties/$targetKey",component:()=>l.jsx(rne,{})}),xne=Bt({getParentRoute:()=>$n,path:"/report",beforeLoad:({params:e})=>{throw d0({to:"/projects/$projectName",params:e,replace:!0})}}),wne=Bt({getParentRoute:()=>$n,path:"/activity",component:()=>l.jsx(Pa,{tab:"activity"})}),Sne=Bt({getParentRoute:()=>$n,path:"/backlinks",component:()=>l.jsx(Pa,{tab:"backlinks"})}),kne=Bt({getParentRoute:()=>$n,path:"/technical-aeo",component:()=>l.jsx(Pa,{tab:"technical-aeo"})}),jne=Bt({getParentRoute:()=>$n,path:"/history",component:()=>l.jsx(Pa,{tab:"history"})}),Ane=Bt({getParentRoute:()=>$n,path:"/settings",component:()=>l.jsx(Pa,{tab:"settings"})}),Nne=Bt({getParentRoute:()=>Vn,path:"/runs",component:tne}),Cne=Bt({getParentRoute:()=>Vn,path:"/history",component:nne}),_ne=Bt({getParentRoute:()=>Vn,path:"/settings",component:ane,beforeLoad:({context:e})=>{}}),Tne=Bt({getParentRoute:()=>Vn,path:"/setup",component:Yte}),Ene=Bt({getParentRoute:()=>Vn,path:"/backlinks",component:ine}),Rne=Bt({getParentRoute:()=>Vn,path:"/traffic",component:sne}),Dne=Bt({getParentRoute:()=>Vn,path:"/traffic/$projectName/$sourceId",component:one}),zne=Bt({getParentRoute:()=>Vn,path:"*",component:ene}),Ine=Vn.addChildren([cne,une,$n.addChildren([mne,pne,hne,fne,gne,yne,bne,vne,xne,wne,Sne,kne,jne,Ane]),Nne,Cne,_ne,Tne,Ene,Rne,Dne,zne]);function One(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const Hk=One(),Pne=Hk==="/"?"":Hk.replace(/\/$/,"");function qne(e,n){return o6({routeTree:Ine,basepath:Pne||"/",context:{queryClient:e},...n?.initialEntries})}let Fk=!1;async function Mne(e){return(await mE({client:J,body:e,keepalive:!0})).data}function Bne(){Fk||typeof window>"u"||(Fk=!0,!(rp()||To())&&(yF({send:Mne}),J.interceptors.request.use((e,n)=>{const i=n.fetch??globalThis.fetch,r=typeof n.url=="string"?n.url:void 0;return n.fetch=async(u,h)=>{try{return await i(u,h)}catch(f){throw f instanceof DOMException&&f.name==="AbortError"||km({method:e.method,route:r,network:!0}),f}},e}),J.interceptors.response.use((e,n,i)=>(km({method:n.method,route:typeof i.url=="string"?i.url:void 0,path:Une(n.url),status:e.status}),e)),window.addEventListener("error",e=>{Sm({kind:"unhandled",error:e.error})}),window.addEventListener("unhandledrejection",e=>{Sm({kind:"unhandled",error:e.reason})}),Hne()))}function Lne(e){let n=null;const i=()=>{const r=e.state.matches.at(-1);if(!r)return;bF(r.fullPath);const u=e.state.location;if(!u)return;const h=u.search&&typeof u.search=="object"?u.search:{};n&&n.pathname===u.pathname&&kF(n.search,h),n={pathname:u.pathname,search:h}};return i(),e.subscribe("onResolved",i)}function Une(e){try{return new URL(e,window.location.origin).pathname}catch{return}}const Vne={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function $ne(e,n){const[i,r]=Vne[e];return n<=i?"good":n<=r?"needs-improvement":"poor"}function Kne(){let e=0,n=0,i=-1/0,r=-1/0;return{add(u){u.hadRecentInput||(u.startTime-r<1e3&&u.startTime-i<5e3?n+=u.value:(n=u.value,i=u.startTime),r=u.startTime,e=Math.max(e,n))},value:()=>e}}function Gne(){let e=0;return{add(n){n.interactionId&&(e=Math.max(e,n.duration))},value:()=>e}}function Hne(){if(typeof PerformanceObserver>"u")return;const e=new Set,n=(b,v)=>{e.has(b)||!Number.isFinite(v)||(e.add(b),AF(b,$ne(b,v)))},i=(b,v,x={})=>{try{new PerformanceObserver(S=>v(S.getEntries())).observe({type:b,buffered:!0,...x})}catch{}};try{const b=performance.getEntriesByType("navigation")[0];b&&b.responseStart>0&&n("TTFB",b.responseStart)}catch{}i("paint",b=>{const v=b.find(x=>x.name==="first-contentful-paint");v&&n("FCP",v.startTime)});let r=0;i("largest-contentful-paint",b=>{const v=b.at(-1);v&&(r=v.startTime)});const u=Kne();i("layout-shift",b=>{for(const v of b)u.add({startTime:v.startTime,value:v.value??0,hadRecentInput:v.hadRecentInput===!0})});const h=Gne();i("event",b=>{for(const v of b)h.add(v)},{durationThreshold:40});const f=()=>{r>0&&n("LCP",r),n("CLS",u.value()),h.value()>0&&n("INP",h.value())};document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&f()}),window.addEventListener("pagehide",f)}const Fne=6e4,Qne="Anyone with this password can sign in to this dashboard.",Pr={label:"Root API key",help:"To create the password from here, enter the root API key (apiKey in config.yaml). It is used once and not saved.",missing:"Enter the root API key.",rejected:"That is not the root API key for this install.",show:"Show passwords and key"};function Zne(){const e=_.useRef(eQ()).current,[n,i]=_.useState(e?"ready":"checking"),[r,u]=_.useState(null),[h,f]=_.useState(null),[b,v]=_.useState(e),[x,S]=_.useState(!1),[j,C]=_.useState(""),[T,z]=_.useState(""),[q,R]=_.useState(""),[P,M]=_.useState(!1),[L,$]=_.useState("password"),[Q,ae]=_.useState(!1),[V,Z]=_.useState(""),[X,Ce]=_.useState(null),[tt,Ge]=_.useState(!1),[Ve,ke]=_.useState(!1),Le=_.useRef(null),B=_.useRef(null),W=_.useRef(null),ve=()=>{const me=r?`${r.name}:${r.role}`:e?"api-key:explicit":h?`api-key:${h.id}`:"no-accounts";if(!Le.current||W.current!==me){B.current?.clear();const Be=HQ();B.current=Be,Le.current=qne(Be),Lne(Le.current),W.current=me}return{queryClient:B.current,router:Le.current}},Ae=me=>me.authRequired?(S(!0),u(me.user),f(null),v(!1),i(me.user?"ready":"account-login"),!0):!1;_.useEffect(()=>{let me=!1;const Be=async(Ne,re=!1)=>{try{const Ye=await ag();if(me)return;f(Ye),v(!1),i("ready")}catch(Ye){if(me)return;if(re&&Ye instanceof yn&&Ye.statusCode===401)return dQ().then(()=>{me||(Ce(null),f(null),v(!1),ke(!0),i("login"))}).catch(vt=>{me||(Ce(vt instanceof Error?vt.message:"Could not clear the invalid session"),i(Ne))});Ce(Ye instanceof Error?Ye.message:"Could not verify API key access"),i(Ne)}};return e?(Be("api-key-error"),()=>{me=!0}):(Promise.allSettled([FS(),HS()]).then(([Ne,re])=>{if(me||Ne.status==="fulfilled"&&Ae(Ne.value))return;if(re.status==="rejected"){const vt=re.reason;Ce(vt instanceof Error?vt.message:"Failed to reach the Canonry API"),i("login");return}const Ye=re.value;Ye.authenticated?(v(!0),Be("api-key-error",!0)):(f(null),v(!1),i(Ye.setupRequired?"setup":"login"))}),()=>{me=!0})},[]),_.useEffect(()=>{if(n!=="ready"||e)return;const me=setInterval(()=>{if(x){FS().then(Be=>{Be.authRequired&&!Be.user&&(ke(!0),u(null),f(null),i("account-login"))}).catch(()=>{});return}HS().then(Be=>{Be.authenticated||(ke(!0),f(null),i(Be.setupRequired?"setup":"login"))}).catch(()=>{})},Fne);return GS(()=>{ke(!0),u(null),f(null),v(!1),i(x?"account-login":"login")}),()=>{clearInterval(me),GS(null)}},[n,x,e]);const se=async me=>{if(me.preventDefault(),!T.trim()||T.trim().length<8){Ce("Password must be at least 8 characters");return}if(T!==q){Ce("Passwords do not match");return}const Be=V.trim();if(Q&&!Be){Ce(Pr.missing);return}Ge(!0),Ce(null);try{if(!(await lQ(T.trim(),Q?Be:void 0)).authenticated){Ce("Setup failed");return}z(""),R(""),Z(""),ae(!1),M(!1),ke(!1),f(null),v(!0),i("checking");try{const re=await ag();f(re),v(!1),i("ready")}catch(re){Ce(re instanceof Error?re.message:"Could not verify API key access"),i("api-key-error")}}catch(Ne){if(Ne instanceof yn&&Ne.statusCode===401&&Ne.code==="AUTH_REQUIRED"){Ce(Q?Pr.rejected:null),ae(!0);return}Ce(Ne instanceof yn||Ne instanceof Error?Ne.message:"Setup failed")}finally{Ge(!1)}},Se=me=>{z(me),Ce(null)},Me=me=>{Z(me),Ce(null)},xe=me=>{R(me),Ce(null)},pe=async me=>{if(me.preventDefault(),!!T.trim()){Ge(!0),Ce(null);try{if(!(L==="api-key"?await uQ(T.trim()):await cQ(T.trim())).authenticated){Ce(L==="api-key"?"Invalid API key":"Incorrect password");return}const Ne=await ag();f(Ne),v(!1),z(""),M(!1),ke(!1),i("ready")}catch(Be){Ce(Be instanceof yn||Be instanceof Error?Be.message:"Authentication failed")}finally{Ge(!1)}}},ce=me=>{$(me),z(""),M(!1),Ce(null)},ue=async me=>{if(me.preventDefault(),!(!j.trim()||!T)){Ge(!0),Ce(null);try{const Be=await mQ(j.trim(),T);if(!Be.user){Ce("Incorrect name or password.");return}z(""),ke(!1),u(Be.user),f(null),v(!1),i("ready")}catch(Be){Ce(Be instanceof yn?Be.message:"Incorrect name or password.")}finally{Ge(!1)}}};if(n==="ready"){const{queryClient:me,router:Be}=ve();return l.jsx(IQ,{account:r,apiKey:h,apiKeyPending:b,children:l.jsx(r6,{client:me,children:l.jsx(l6,{router:Be})})})}const _e=T.trim(),Ze=T.length>0&&_e.length<8,Ee=q.length>0&&T!==q,Ct=_e.length>=8&&T===q&&(!Q||V.trim().length>0);return l.jsx("div",{className:"min-h-screen bg-bg px-4 py-8",children:l.jsxs("div",{className:"mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5",children:[l.jsxs("div",{"data-testid":"auth-brand",className:"flex items-center gap-2.5",children:[l.jsx("img",{className:"size-7",src:"./favicon.svg",alt:"","aria-hidden":"true"}),l.jsx("span",{className:"text-lg font-semibold tracking-tight text-heading",children:"Canonry"})]}),l.jsx(Ta,{className:"surface-card w-full",children:n==="checking"?l.jsx(ko,{className:"py-8",children:l.jsx("p",{className:"supporting-copy text-center",children:"Connecting to Canonry…"})}):n==="api-key-error"?l.jsxs(l.Fragment,{children:[l.jsxs(Lr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Could not verify API key access"})]}),l.jsxs(ko,{className:"space-y-4",children:[l.jsx("p",{className:"supporting-copy",children:X??"Canonry could not verify this session’s access, so the dashboard stayed locked."}),l.jsx(le,{type:"button",className:"w-full",onClick:()=>{window.location.reload()},children:"Try again"})]})]}):n==="account-login"?l.jsxs(l.Fragment,{children:[l.jsxs(Lr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"})]}),l.jsxs(ko,{children:[Ve?l.jsx("p",{className:"mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-sm text-caution",children:"You were signed out — please sign in again."}):null,l.jsxs("form",{className:"space-y-4",onSubmit:gn(ue),children:[l.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-name",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:"Name"}),l.jsx("input",{autoFocus:!0,id:"account-name",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:"text",name:"username",autoComplete:"username",value:j,onChange:me=>{C(me.target.value),Ce(null)},"aria-invalid":!!X,"aria-describedby":X?"account-login-error":void 0})]}),l.jsxs("label",{className:"block space-y-1.5",htmlFor:"account-password",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:"Password"}),l.jsx("input",{id:"account-password",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",name:"password",autoComplete:"current-password",value:T,onChange:me=>Se(me.target.value),"aria-invalid":!!X,"aria-describedby":X?"account-login-error":void 0})]}),X?l.jsx("p",{id:"account-login-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!j.trim()||!T,children:tt?"Signing in…":"Sign in"})]})]})]}):n==="setup"?l.jsxs(l.Fragment,{children:[l.jsxs(Lr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"First-time setup"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Create a dashboard password"}),l.jsx(Tm,{children:Qne})]}),l.jsx(ko,{children:l.jsxs("form",{className:"space-y-4",onSubmit:gn(se),children:[l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-new",children:"Password"}),l.jsx("input",{autoFocus:!0,id:"dashboard-password-new",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:P?"text":"password",name:"new-password",autoComplete:"new-password",minLength:8,required:!0,value:T,onChange:me=>Se(me.target.value),"aria-invalid":Ze,"aria-describedby":"dashboard-password-new-help"}),l.jsx("span",{id:"dashboard-password-new-help","aria-live":"polite",className:Ze?"block text-sm text-negative-400":"block text-sm text-secondary",children:Ze?"Enter at least 8 characters.":"Use at least 8 characters."})]}),l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-password-confirm",children:"Confirm password"}),l.jsx("input",{id:"dashboard-password-confirm",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:P?"text":"password",name:"confirm-password",autoComplete:"new-password",minLength:8,required:!0,value:q,onChange:me=>xe(me.target.value),"aria-invalid":Ee,"aria-describedby":"dashboard-password-confirm-help"}),l.jsx("span",{id:"dashboard-password-confirm-help","aria-live":"polite",className:Ee?"block text-sm text-negative-400":"block text-sm text-secondary",children:Ee?"Passwords do not match.":"Enter the same password again."})]}),Q?l.jsxs("div",{className:"space-y-1.5",children:[l.jsx("label",{className:"block text-xs font-medium text-secondary",htmlFor:"dashboard-setup-root-key",children:Pr.label}),l.jsx("input",{autoFocus:!0,id:"dashboard-setup-root-key",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:P?"text":"password",name:"apiKey",autoComplete:"off",spellCheck:!1,required:!0,value:V,onChange:me=>Me(me.target.value),"aria-invalid":X===Pr.rejected,"aria-describedby":"dashboard-setup-root-key-help"}),l.jsx("span",{id:"dashboard-setup-root-key-help","aria-live":"polite",className:"block text-sm text-secondary",children:Pr.help})]}):null,l.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-password-show",children:[l.jsx("input",{id:"dashboard-password-show",type:"checkbox",checked:P,onChange:me=>M(me.target.checked)}),Q?Pr.show:"Show passwords"]}),X?l.jsx("p",{id:"dashboard-password-setup-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!Ct,children:tt?"Creating password…":"Create password and continue"})]})})]}):l.jsxs(l.Fragment,{children:[l.jsxs(Lr,{children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:"Dashboard access"}),l.jsx("h1",{className:"font-medium tracking-tight text-primary",children:"Sign in to Canonry"}),l.jsx(Tm,{children:L==="api-key"?"Enter an API key from this Canonry install. This opens the dashboard with that key’s access and does not change the password.":"Enter your dashboard password to continue."})]}),l.jsxs(ko,{children:[Ve?l.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,l.jsxs("form",{className:"space-y-4",onSubmit:gn(pe),children:[l.jsxs("label",{className:"block space-y-1.5",htmlFor:"dashboard-password-current",children:[l.jsx("span",{className:"text-xs font-medium text-secondary",children:L==="api-key"?"Canonry API key":"Password"}),l.jsx("input",{autoFocus:!0,id:"dashboard-password-current",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:P?"text":"password",name:L==="api-key"?"apiKey":"password",autoComplete:L==="api-key"?"off":"current-password",spellCheck:!1,required:!0,value:T,onChange:me=>Se(me.target.value),"aria-invalid":!!X,"aria-describedby":X?"dashboard-password-login-error":void 0})]}),l.jsxs("label",{className:"flex min-h-10 cursor-pointer items-center gap-2 text-sm text-secondary",htmlFor:"dashboard-login-password-show",children:[l.jsx("input",{id:"dashboard-login-password-show",type:"checkbox",checked:P,onChange:me=>M(me.target.checked)}),L==="api-key"?"Show API key":"Show password"]}),X?l.jsx("p",{id:"dashboard-password-login-error",role:"alert",className:"text-sm text-negative-400",children:X}):null,l.jsx(le,{type:"submit",disabled:tt||!T.trim(),children:tt?"Signing in…":"Open dashboard"}),l.jsx(le,{type:"button",variant:"ghost",onClick:()=>ce(L==="api-key"?"password":"api-key"),children:L==="api-key"?"Use dashboard password instead":"Forgot password? Use API key"})]})]})]})})]})})}const Z4=document.getElementById("root");if(!Z4)throw new Error("Expected #root element for web app bootstrap.");Bne();O6.createRoot(Z4).render(l.jsx(_.StrictMode,{children:l.jsx(Zne,{})}));export{dJ as $,To as A,le as B,Ec as C,Pn as D,gn as E,Hoe as F,Zoe as G,Qoe as H,ma as I,Fie as J,Zie as K,Qae as L,bre as M,Goe as N,Zae as O,Bae as P,Fae as Q,Fa as R,Mk as S,Sn as T,Xae as U,Qie as V,Yae as W,ga as X,XQ as Y,Ire as Z,Ore as _,yre as a,Rie as a$,iZ as a0,Lae as a1,bse as a2,kse as a3,vie as a4,gse as a5,Soe as a6,Aoe as a7,joe as a8,_ie as a9,zoe as aA,r4 as aB,Fi as aC,Doe as aD,r0 as aE,T9 as aF,E9 as aG,jae as aH,kae as aI,ise as aJ,use as aK,dse as aL,yn as aM,mse as aN,uie as aO,JQ as aP,uX as aQ,Gg as aR,pse as aS,Wd as aT,Xoe as aU,a0 as aV,So as aW,tZ as aX,$Q as aY,Pse as aZ,mW as a_,Cie as aa,Mie as ab,vn as ac,_oe as ad,Toe as ae,zie as af,Eoe as ag,Iie as ah,Eie as ai,Die as aj,Noe as ak,Coe as al,koe as am,Tie as an,t4 as ao,Oe as ap,Nt as aq,F0 as ar,Roe as as,Moe as at,Ioe as au,Poe as av,Ooe as aw,qoe as ax,tse as ay,ry as az,Sse as b,fie as b$,$ae as b0,Uae as b1,Li as b2,Tre as b3,Hae as b4,rie as b5,BB as b6,iie as b7,Gae as b8,wse as b9,Yoe as bA,Wse as bB,toe as bC,coe as bD,voe as bE,boe as bF,roe as bG,goe as bH,woe as bI,aoe as bJ,doe as bK,moe as bL,poe as bM,noe as bN,uoe as bO,ioe as bP,hoe as bQ,soe as bR,foe as bS,loe as bT,yoe as bU,xoe as bV,Wee as bW,ooe as bX,sie as bY,yie as bZ,gie as b_,Kae as ba,hZ as bb,MZ as bc,Vse as bd,Fse as be,$se as bf,eie as bg,nie as bh,XK as bi,aie as bj,NZ as bk,Use as bl,WK as bm,$g as bn,tie as bo,GF as bp,Kse as bq,Lse as br,_Z as bs,Gse as bt,hse as bu,Hse as bv,nre as bw,are as bx,Oie as by,n4 as bz,Sae as c,sQ as c$,Hie as c0,KF as c1,s3 as c2,su as c3,o3 as c4,Es as c5,Yse as c6,Aae as c7,UZ as c8,eoe as c9,GZ as cA,ute as cB,Pre as cC,kre as cD,cW as cE,Sre as cF,ate as cG,Qse as cH,Ese as cI,wre as cJ,Ose as cK,Rse as cL,aP as cM,iB as cN,Zse as cO,xre as cP,zse as cQ,hre as cR,bW as cS,nQ as cT,rZ as cU,vW as cV,mie as cW,Uq as cX,qae as cY,pie as cZ,die as c_,Nse as ca,Vae as cb,ek as cc,wie as cd,Sie as ce,jse as cf,Ase as cg,kie as ch,jie as ci,Nie as cj,Aie as ck,yu as cl,Fo as cm,VC as cn,Tse as co,_se as cp,YJ as cq,Wg as cr,Nm as cs,e0 as ct,Cm as cu,_m as cv,dW as cw,bZ as cx,jo as cy,Em as cz,aZ as d,Pae as d$,jre as d0,Are as d1,Nre as d2,_re as d3,hie as d4,pZ as d5,bie as d6,oJ as d7,Boe as d8,gQ as d9,dy as dA,cte as dB,Gie as dC,Jr as dD,nk as dE,nse as dF,sse as dG,rse as dH,lse as dI,ase as dJ,ose as dK,cse as dL,eg as dM,ese as dN,ere as dO,Zee as dP,Wae as dQ,L1 as dR,Cse as dS,Joe as dT,tre as dU,Wie as dV,Jae as dW,Xie as dX,Jie as dY,Yie as dZ,Woe as d_,$ie as da,Uoe as db,Voe as dc,$oe as dd,Loe as de,vse as df,Bie as dg,Lie as dh,Uie as di,Kie as dj,Vie as dk,uy as dl,Fc as dm,zre as dn,gu as dp,Xse as dq,Jse as dr,ZF as ds,lie as dt,cie as du,xie as dv,Pie as dw,qie as dx,fy as dy,mp as dz,nZ as e,dre as e$,p9 as e0,za as e1,h9 as e2,Bq as e3,Dse as e4,yse as e5,AP as e6,qse as e7,Ise as e8,Bse as e9,Ww as eA,Tae as eB,d2 as eC,Zi as eD,Oa as eE,_ae as eF,Sm as eG,oie as eH,MY as eI,sre as eJ,ire as eK,ite as eL,lre as eM,fW as eN,Nae as eO,fre as eP,gre as eQ,ore as eR,rre as eS,Cae as eT,ure as eU,pre as eV,cre as eW,mre as eX,Po as eY,Oae as eZ,Rae as e_,Mse as ea,pk as eb,ye as ec,wae as ed,xae as ee,vae as ef,bae as eg,fae as eh,hae as ei,yae as ej,gae as ek,pae as el,mae as em,sae as en,oae as eo,dae as ep,uae as eq,cae as er,rae as es,lae as et,iae as eu,aae as ev,nae as ew,rT as ex,oT as ey,Iae as ez,um as f,Eae as f0,pq as f1,zae as f2,Dae as f3,Ere as g,Cre as h,Rre as i,Dre as j,t0 as k,Wc as l,vre as m,cK as n,mJ as o,wF as p,fse as q,Koe as r,xse as s,eZ as t,my as u,Foe as v,Ta as w,Mae as x,J as y,rp as z};