@canonry/canonry 7.51.4 → 7.51.6

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 (172) hide show
  1. package/assets/assets/AccessControls-B5TqDgeq.js +1 -0
  2. package/assets/assets/AuditHistoryPanel-DgxiizOW.js +1 -0
  3. package/assets/assets/BacklinksPage-Ay6pdphx.js +1 -0
  4. package/assets/assets/ChartPrimitives-DIEeZdrs.js +1 -0
  5. package/assets/assets/Hint-Cn4lh0Do.js +1 -0
  6. package/assets/assets/HistoryPage-B11eFH21.js +1 -0
  7. package/assets/assets/InfoTooltip-TIx9qM5h.js +1 -0
  8. package/assets/assets/MeasurementPropertyPage-1UYI7mzP.js +4 -0
  9. package/assets/assets/ProjectPage-DoY0hftd.js +8 -0
  10. package/assets/assets/RunsPage-BPBmuQAS.js +1 -0
  11. package/assets/assets/SettingsPage-ClKnP8xy.js +1 -0
  12. package/assets/assets/SiteHealthSection-PWjKMmEn.js +2 -0
  13. package/assets/assets/TrafficPage-DkfGiJXR.js +40 -0
  14. package/assets/assets/TrafficSourceDetailPage-DQu0YNt2.js +1 -0
  15. package/assets/assets/async-handler-Bj3TnIRw.js +1 -0
  16. package/assets/assets/card-DYMyvhB9.js +60 -0
  17. package/assets/assets/extract-error-message-BRM1I_3L.js +1 -0
  18. package/assets/assets/format-helpers-DrkFERj3.js +3 -0
  19. package/assets/assets/index-CG1Jox52.js +39 -0
  20. package/assets/assets/index-CsPsaUr7.css +1 -0
  21. package/assets/assets/query-client-gRFnU4VF.js +1 -0
  22. package/assets/assets/react-query-lH82FULK.js +1 -0
  23. package/assets/assets/react-sigma_core.esm.min-D09H4byP.js +3225 -0
  24. package/assets/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  25. package/assets/assets/service-Cx0HSnE9.js +1 -0
  26. package/assets/assets/vendor-lucide-BjvO55Hk.js +1 -0
  27. package/assets/assets/vendor-markdown-DWjffpgb.js +29 -0
  28. package/assets/assets/vendor-radix-BU76HM0G.js +41 -0
  29. package/assets/assets/vendor-recharts-CsHBXoK8.js +59 -0
  30. package/assets/assets/vendor-tanstack-QhOrDhIL.js +2 -0
  31. package/assets/assets/vendor-yaml-Y43rmNgW.js +105 -0
  32. package/assets/index.html +16 -8
  33. package/dist/ads-ABAT3K4K.js +544 -0
  34. package/dist/agent-5G4DRLYX.js +70 -0
  35. package/dist/agent-ask-UDVCZRO7.js +139 -0
  36. package/dist/agent-conversations-5E4JP2QZ.js +52 -0
  37. package/dist/agent-memory-7IIJ4HGZ.js +92 -0
  38. package/dist/agent-providers-BOXPUXZ4.js +55 -0
  39. package/dist/agent-transcript-4O56G6PQ.js +77 -0
  40. package/dist/analytics-PKMWX5XL.js +240 -0
  41. package/dist/apply-OK4XEBDA.js +175 -0
  42. package/dist/backfill-2OT56CX2.js +41 -0
  43. package/dist/backlinks-547WCHND.js +303 -0
  44. package/dist/bing-ZVBV4ZD5.js +418 -0
  45. package/dist/bootstrap-HUB7XQ73.js +326 -0
  46. package/dist/cdp-KQKQ4PWJ.js +162 -0
  47. package/dist/chunk-2G6IP3MO.js +517 -0
  48. package/dist/chunk-42D2LE2B.js +1273 -0
  49. package/dist/chunk-4MJYGB56.js +124 -0
  50. package/dist/chunk-63ISSSGX.js +9150 -0
  51. package/dist/{chunk-HHRM3H3L.js → chunk-6G6FTDWC.js} +8082 -13941
  52. package/dist/chunk-6GO5VVAC.js +15 -0
  53. package/dist/{chunk-6GNV6VF4.js → chunk-73P65KPW.js} +2 -2
  54. package/dist/chunk-7B2Q4NJE.js +133 -0
  55. package/dist/{chunk-KU4TPVZV.js → chunk-7WZ2FPB4.js} +2 -13
  56. package/dist/chunk-AOJU5LKX.js +8 -0
  57. package/dist/chunk-B2FR2ZQ4.js +420 -0
  58. package/dist/chunk-B5J675KK.js +6557 -0
  59. package/dist/{chunk-YOGHHIGE.js → chunk-D6COIM3U.js} +17155 -17164
  60. package/dist/{chunk-KUS7M65J.js → chunk-DGVUTH7W.js} +6809 -32243
  61. package/dist/chunk-ELCLGWUT.js +83 -0
  62. package/dist/chunk-GO2J7SYT.js +1034 -0
  63. package/dist/chunk-HACZUMGM.js +145 -0
  64. package/dist/chunk-HM4NNKLG.js +94 -0
  65. package/dist/chunk-I3A56PFP.js +58 -0
  66. package/dist/chunk-I77PLCWG.js +961 -0
  67. package/dist/chunk-ISOQPVPY.js +232 -0
  68. package/dist/chunk-KFT5LOP2.js +610 -0
  69. package/dist/chunk-MLKGABMK.js +9 -0
  70. package/dist/chunk-MMEO22MF.js +38 -0
  71. package/dist/chunk-NHQ2U5I4.js +78 -0
  72. package/dist/chunk-PCXRFT3N.js +530 -0
  73. package/dist/chunk-PITHTCAX.js +15376 -0
  74. package/dist/chunk-QWKPSFGL.js +30 -0
  75. package/dist/chunk-RKIXES2B.js +609 -0
  76. package/dist/chunk-TSENU4GG.js +18 -0
  77. package/dist/{chunk-P6D6P337.js → chunk-TUTKNUMV.js} +7 -5
  78. package/dist/chunk-U3AHE2RT.js +1160 -0
  79. package/dist/chunk-UQ3MOZGC.js +644 -0
  80. package/dist/{chunk-35QQMVO6.js → chunk-VBCE4CLX.js} +6 -4
  81. package/dist/chunk-VJWDBFSL.js +69 -0
  82. package/dist/chunk-VYMZ3QXG.js +8264 -0
  83. package/dist/chunk-WAULJDKO.js +2686 -0
  84. package/dist/chunk-WDFI5YMD.js +204 -0
  85. package/dist/chunk-XEBKF4N5.js +8 -0
  86. package/dist/chunk-Z7IUAJOF.js +13 -0
  87. package/dist/{chunk-RUWELF3K.js → chunk-ZWJRY5UI.js} +358 -581
  88. package/dist/chunk-ZXUAWVWM.js +15 -0
  89. package/dist/citations-UYB2RU5U.js +106 -0
  90. package/dist/{cli-catalog-KTQ6BHEU.js → cli-catalog-F6FI7NB2.js} +5 -3
  91. package/dist/cli-commands-ZG5ILKDA.js +19 -0
  92. package/dist/cli.js +35 -29
  93. package/dist/competitor-EKP4R7YY.js +561 -0
  94. package/dist/content-DREE6JF3.js +257 -0
  95. package/dist/dashboard-ZALEOLLU.js +71 -0
  96. package/dist/demo-JG4Y22O4.js +75 -0
  97. package/dist/{demo-server-26UUDUM7.js → demo-server-3A4J2C65.js} +22 -9
  98. package/dist/discover-W6GMD2HS.js +372 -0
  99. package/dist/discover-eval-CKFZHRBW.js +282 -0
  100. package/dist/doctor-TNGBSUMA.js +152 -0
  101. package/dist/evidence-3H2GFQBZ.js +57 -0
  102. package/dist/export-cmd-WUIKU5GK.js +49 -0
  103. package/dist/ga-JI6REFO4.js +911 -0
  104. package/dist/gbp-4ENDM5NS.js +370 -0
  105. package/dist/google-HKQSCLOC.js +946 -0
  106. package/dist/google-marketing-KQR5J2S4.js +403 -0
  107. package/dist/health-cmd-TS7EMMCS.js +64 -0
  108. package/dist/history-MSD5DK6K.js +90 -0
  109. package/dist/index.d.ts +194 -60
  110. package/dist/index.js +29 -6
  111. package/dist/init-L6WAEOWX.js +432 -0
  112. package/dist/insights-RTZ3IZTD.js +63 -0
  113. package/dist/intelligence-service-TH52PCNJ.js +15 -0
  114. package/dist/keys-625DZBRM.js +116 -0
  115. package/dist/keyword-CW46RNRR.js +164 -0
  116. package/dist/logs-V33SHBIW.js +30 -0
  117. package/dist/mcp-DFEDPSEG.js +14 -0
  118. package/dist/mcp.js +14 -5
  119. package/dist/measurement-plan-6W37RUOP.js +42 -0
  120. package/dist/notify-DSUOT7WO.js +125 -0
  121. package/dist/organic-evidence-BMN6L4OB.js +53 -0
  122. package/dist/overview-WRRMBZ6S.js +213 -0
  123. package/dist/project-2GJIU3FE.js +460 -0
  124. package/dist/query-3XPMGJUA.js +211 -0
  125. package/dist/research-V433CKJ4.js +200 -0
  126. package/dist/results-export-RGBU7QQQ.js +27 -0
  127. package/dist/run-NIAC6OJN.js +31 -0
  128. package/dist/schedule-KDWXRIE7.js +177 -0
  129. package/dist/search-626MPUJN.js +42 -0
  130. package/dist/serve-73SMMASI.js +557 -0
  131. package/dist/session-7WWOETZB.js +47 -0
  132. package/dist/settings-VKFQO6F2.js +107 -0
  133. package/dist/skills-5HC5H7TE.js +33 -0
  134. package/dist/snapshot-BSJUHFBC.js +538 -0
  135. package/dist/src-F6HM73TN.js +316 -0
  136. package/dist/status-V4OWP7LZ.js +126 -0
  137. package/dist/support-ARF4HER7.js +24 -0
  138. package/dist/technical-aeo-TG7CGU3F.js +625 -0
  139. package/dist/telemetry-O2IUNUBW.js +118 -0
  140. package/dist/tools-2GJIDKND.js +41 -0
  141. package/dist/traffic-XV4I3UPH.js +1295 -0
  142. package/dist/users-VGBLDL5K.js +170 -0
  143. package/dist/visibility-stats-UKJYJ6PP.js +241 -0
  144. package/dist/wordpress-JZA7CGC6.js +600 -0
  145. package/package.json +30 -30
  146. package/assets/assets/AuditHistoryPanel-CtWNkC6F.js +0 -1
  147. package/assets/assets/BacklinksPage-Cs3_j55C.js +0 -1
  148. package/assets/assets/ChartPrimitives-B6ryduMN.js +0 -1
  149. package/assets/assets/Hint-DICI5Jq9.js +0 -1
  150. package/assets/assets/HistoryPage-_5Vwj01m.js +0 -1
  151. package/assets/assets/MeasurementPropertyPage-B2yBTUZd.js +0 -4
  152. package/assets/assets/ProjectPage-hs-9PcoS.js +0 -8
  153. package/assets/assets/RunsPage-B_mhz9vj.js +0 -1
  154. package/assets/assets/SettingsPage-D1Lzcw03.js +0 -1
  155. package/assets/assets/SiteHealthSection-CGlrPdrk.js +0 -4
  156. package/assets/assets/TrafficPage-C27a0rQp.js +0 -40
  157. package/assets/assets/TrafficSourceDetailPage-DOSoQySv.js +0 -1
  158. package/assets/assets/extract-error-message-itBoiivg.js +0 -1
  159. package/assets/assets/index-Br2WtEIO.css +0 -1
  160. package/assets/assets/index-CdAuyP-X.js +0 -86
  161. package/assets/assets/react-sigma_core.esm.min-CPYhSQFc.js +0 -312
  162. package/assets/assets/v2-overview-adapter-DQXWmK0B.js +0 -1
  163. package/assets/assets/vendor-lucide-Y6jANGfG.js +0 -1
  164. package/assets/assets/vendor-markdown-B4giJcws.js +0 -29
  165. package/assets/assets/vendor-radix-twS1M3FF.js +0 -45
  166. package/assets/assets/vendor-recharts-D_R6YxjS.js +0 -36
  167. package/assets/assets/vendor-tanstack-ZXXkndVj.js +0 -1
  168. package/assets/assets/vendor-yaml-GWJz5H2G.js +0 -131
  169. package/dist/chunk-EQTVQIM2.js +0 -23082
  170. package/dist/chunk-GZPJ7TSE.js +0 -10872
  171. package/dist/cli-commands-5ZODWR4I.js +0 -15
  172. package/dist/intelligence-service-ZGDBVFDE.js +0 -9
@@ -1,86 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-CGlrPdrk.js","./vendor-tanstack-ZXXkndVj.js","./vendor-lucide-Y6jANGfG.js","./ChartPrimitives-B6ryduMN.js","./vendor-recharts-D_R6YxjS.js","./ProjectPage-hs-9PcoS.js","./v2-overview-adapter-DQXWmK0B.js","./vendor-markdown-B4giJcws.js","./extract-error-message-itBoiivg.js","./Hint-DICI5Jq9.js","./AuditHistoryPanel-CtWNkC6F.js","./vendor-radix-twS1M3FF.js","./vendor-yaml-GWJz5H2G.js","./RunsPage-B_mhz9vj.js","./HistoryPage-_5Vwj01m.js","./SettingsPage-D1Lzcw03.js","./BacklinksPage-Cs3_j55C.js","./TrafficPage-C27a0rQp.js","./TrafficSourceDetailPage-DOSoQySv.js","./MeasurementPropertyPage-B2yBTUZd.js"])))=>i.map(i=>d[i]);
2
- import{c as i6,d as s6,r as _,j as l,Q as o6,M as r6,q as be,e as Yc,L as at,a as l6,t as Or,u as yt,f as c6,h as Ps,k as Ms,l as Zk,m as u6,n as Yk,O as fg,o as ui,p as d6,s as Bt,v as p0,x as qs,y as m6,z as p6,A as h6}from"./vendor-tanstack-ZXXkndVj.js";import{S as f6,O as h0,P as Xk,C as f0,a as Jk,T as g0,D as Wk,R as ej}from"./vendor-radix-twS1M3FF.js";import{c as tj}from"./vendor-recharts-D_R6YxjS.js";import{A as qc,X as el,S as y0,a as nj,G as aj,C as Xc,L as Ds,R as Cd,M as g6,b as y6,P as gg,H as ij,c as sj,d as b6,e as Jc,f as b0,T as Dm,g as Wc,W as oj,h as v6,i as x6,j as w6,k as S6,l as k6,m as j6,n as A6,B as N6,F as C6,o as _6,p as T6,q as E6,r as R6,s as rj,t as lj,u as yg,v as cj,w as D6,x as uj,E as I6}from"./vendor-lucide-Y6jANGfG.js";import{M as z6,r as O6}from"./vendor-markdown-B4giJcws.js";import{p as P6}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 Nf={exports:{}},bc={},Cf={exports:{}},_f={};var Xx;function M6(){return Xx||(Xx=1,(function(e){function n(B,W){var xe=B.length;B.push(W);e:for(;0<xe;){var Ae=xe-1>>>1,se=B[Ae];if(0<u(se,W))B[Ae]=W,B[xe]=se,xe=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],xe=B.pop();if(xe!==W){B[0]=xe;e:for(var Ae=0,se=B.length,Se=se>>>1;Ae<Se;){var qe=2*(Ae+1)-1,we=B[qe],pe=qe+1,ce=B[pe];if(0>u(we,xe))pe<se&&0>u(ce,we)?(B[Ae]=ce,B[pe]=xe,Ae=pe):(B[Ae]=we,B[qe]=xe,Ae=qe);else if(pe<se&&0>u(ce,xe))B[Ae]=ce,B[pe]=xe,Ae=pe;else break e}}return W}function u(B,W){var xe=B.sortIndex-W.sortIndex;return xe!==0?xe: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,I=!1,M=!1,R=!1,P=typeof setTimeout=="function"?setTimeout:null,q=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(M=!1,$(B),!I)if(i(v)!==null)I=!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:{I=!1,M&&(M=!1,q(V),V=-1),T=!0;var xe=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=xe,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 $e=new MessageChannel,ke=$e.port2;$e.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 xe=C;C=W;try{return B()}finally{C=xe}},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 xe=C;C=B;try{return W()}finally{C=xe}},e.unstable_scheduleCallback=function(B,W,xe){var Ae=e.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?Ae+xe:Ae):xe=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=xe+se,B={id:S++,callback:W,priorityLevel:B,startTime:xe,expirationTime:se,sortIndex:-1},xe>Ae?(B.sortIndex=xe,n(x,B),i(v)===null&&B===i(x)&&(M?(q(V),V=-1):M=!0,Le(Q,xe-Ae))):(B.sortIndex=se,n(v,B),I||T||(I=!0,ae||(ae=!0,Ge()))),B},e.unstable_shouldYield=Ce,e.unstable_wrapCallback=function(B){var W=C;return function(){var xe=C;C=W;try{return B.apply(this,arguments)}finally{C=xe}}}})(_f)),_f}var Jx;function q6(){return Jx||(Jx=1,Cf.exports=M6()),Cf.exports}var Wx;function B6(){if(Wx)return bc;Wx=1;var e=q6(),n=i6(),i=s6();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 y=p.alternate;if(y===null){if(c=p.return,c!==null){o=c;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===o)return v(p),t;if(y===c)return v(p),a;y=y.sibling}throw Error(r(188))}if(o.return!==c.return)o=p,c=y;else{for(var w=!1,A=p.child;A;){if(A===o){w=!0,o=p,c=y;break}if(A===c){w=!0,c=p,o=y;break}A=A.sibling}if(!w){for(A=y.child;A;){if(A===o){w=!0,o=y,c=p;break}if(A===c){w=!0,c=y,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"),I=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),q=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 $e=Symbol.for("react.client.reference");function ke(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===$e?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case M: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 I:return"Portal";case L:return t.displayName||"Context";case q: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,xe={pending:!1,data:null,method:null,action:null},Ae=[],se=-1;function Se(t){return{current:t}}function qe(t){0>se||(t.current=Ae[se],Ae[se]=null,se--)}function we(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(we(ue,a),we(ce,t),we(pe,null),a.nodeType){case 9:case 11:t=(t=a.documentElement)&&(t=t.namespaceURI)?xx(t):0;break;default:if(t=a.tagName,a=a.namespaceURI)a=xx(a),t=wx(a,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}qe(pe),we(pe,t)}function Ee(){qe(pe),qe(ce),qe(ue)}function Ct(t){t.memoizedState!==null&&we(_e,t);var a=pe.current,o=wx(a,t.type);a!==o&&(we(ce,t),we(pe,o))}function me(t){ce.current===t&&(qe(pe),qe(ce)),_e.current===t&&(qe(_e),hc._currentValue=xe)}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 y=c.DetermineComponentFrameRoot(),w=y[0],A=y[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 qn(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+=qn(t,o),o=t,t=t.return;while(t);return a}catch(c){return`
8
- Error generating stack: `+c.message+`
9
- `+c.stack}}var Ke=Object.prototype.hasOwnProperty,ct=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,Qt=e.unstable_shouldYield,Rn=e.unstable_requestPaint,Vt=e.unstable_now,fi=e.unstable_getCurrentPriorityLevel,Fs=e.unstable_ImmediatePriority,gi=e.unstable_UserBlockingPriority,Dn=e.unstable_NormalPriority,Yo=e.unstable_LowPriority,Qs=e.unstable_IdlePriority,Zs=e.log,yi=e.unstable_setDisableYieldValue,xn=null,Et=null;function Kn(t){if(typeof Zs=="function"&&yi(t),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(xn,t)}catch{}}var Zt=Math.clz32?Math.clz32:na,Ys=Math.log,qa=Math.LN2;function na(t){return t>>>=0,t===0?32:31-(Ys(t)/qa|0)|0}var oe=256,Ie=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,y=t.suspendedLanes,w=t.pingedLanes;t=t.warmLanes;var A=c&134217727;return A!==0?(c=A&~y,c!==0?p=Ot(c):(w&=A,w!==0?p=Ot(w):o||(o=A&~t,o!==0&&(p=Ot(o))))):(A=c&~y,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&y)===0&&(y=p&-p,o=a&-a,y>=o||y===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 bi(){var t=Je;return Je<<=1,(Je&62914560)===0&&(Je=4194304),t}function Xo(t){for(var a=[],o=0;31>o;o++)a.push(t);return a}function Xs(t,a){t.pendingLanes|=a,a!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function vu(t,a,o,c,p,y){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&&fl(t,c,0),y!==0&&p===0&&t.tag!==0&&(t.suspendedLanes|=y&~(w&~a))}function fl(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 gl(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 yl(t,a){var o=a&-a;return o=(o&42)!==0?1:bl(o),(o&(t.suspendedLanes|a))!==0?0:o}function bl(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 vl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Jo(){var t=W.p;return t!==0?t:(t=window.event,t===void 0?32:Kx(t.type))}function xu(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,In="__reactProps$"+ya,Xi="__reactContainer$"+ya,Wo="__reactEvents$"+ya,wu="__reactListeners$"+ya,er="__reactHandles$"+ya,aa="__reactResources$"+ya,Ji="__reactMarker$"+ya;function xl(t){delete t[ln],delete t[In],delete t[Wo],delete t[wu],delete t[er]}function vi(t){var a=t[ln];if(a)return a;for(var o=t.parentNode;o;){if(a=o[Xi]||o[ln]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(t=_x(t);t!==null;){if(o=t[ln])return o;t=_x(t)}return a}t=o,o=t.parentNode}return null}function Wi(t){if(t=t[ln]||t[Xi]){var a=t.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return t}return null}function es(t){var a=t.tag;if(a===5||a===26||a===27||a===6)return t.stateNode;throw Error(r(33))}function ts(t){var a=t[aa];return a||(a=t[aa]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function tn(t){t[Ji]=!0}var wl=new Set,Sl={};function Ja(t,a){Js(t,a),Js(t+"Capture",a)}function Js(t,a){for(Sl[t]=a,t=0;t<a.length;t++)wl.add(a[t])}var kl=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]*$"),jl={},Wa={};function kp(t){return Ke.call(Wa,t)?!0:Ke.call(jl,t)?!1:kl.test(t)?Wa[t]=!0:(jl[t]=!0,!1)}function xi(t,a,o){if(kp(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 Ws(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 zn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ns(t){var a=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function jp(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,y=c.set;return Object.defineProperty(t,a,{configurable:!0,get:function(){return p.call(this)},set:function(w){o=""+w,y.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 Al(t){if(!t._valueTracker){var a=ns(t)?"checked":"value";t._valueTracker=jp(t,a,""+t[a])}}function ei(t){if(!t)return!1;var a=t._valueTracker;if(!a)return!0;var o=a.getValue(),c="";return t&&(c=ns(t)?t.checked?"true":"false":t.value),t=c,t!==o?(a.setValue(t),!0):!1}function as(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 Su=/[\n"\\]/g;function On(t){return t.replace(Su,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function tr(t,a,o,c,p,y,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=""+zn(a)):t.value!==""+zn(a)&&(t.value=""+zn(a)):w!=="submit"&&w!=="reset"||t.removeAttribute("value"),a!=null?nr(t,w,zn(a)):o!=null?nr(t,w,zn(o)):c!=null&&t.removeAttribute("value"),p==null&&y!=null&&(t.defaultChecked=!!y),p!=null&&(t.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+zn(A):t.removeAttribute("name")}function Nl(t,a,o,c,p,y,w,A){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),a!=null||o!=null){if(!(y!=="submit"&&y!=="reset"||a!=null)){Al(t);return}o=o!=null?""+zn(o):"",a=a!=null?""+zn(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),Al(t)}function nr(t,a,o){a==="number"&&as(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=""+zn(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=""+zn(a),a!==t.value&&(t.value=a),o==null)){t.defaultValue!==a&&(t.defaultValue=a);return}t.defaultValue=o!=null?""+zn(o):""}function wi(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=zn(a),t.defaultValue=o,c=t.textContent,c===o&&c!==""&&c!==null&&(t.value=c),Al(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 Ap(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 ti(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&&Ap(t,p,c)}else for(var y in a)a.hasOwnProperty(y)&&Ap(t,y,a[y])}function Ba(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 ar=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"]]),Np=/^[\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 ir(t){return Np.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function La(){}var Cl=null;function _l(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Si=null,Bn=null;function sr(t){var a=Wi(t);if(a&&(t=a.stateNode)){var o=t[In]||null;e:switch(t=a.stateNode,a.type){case"input":if(tr(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[In]||null;if(!p)throw Error(r(90));tr(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&&ei(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 Tl=!1;function El(t,a,o){if(Tl)return t(a,o);Tl=!0;try{var c=t(a);return c}finally{if(Tl=!1,(Si!==null||Bn!==null)&&(sd(),Si&&(a=Si,t=Bn,Bn=Si=null,sr(a),t)))for(a=0;a<t.length;a++)sr(t[a])}}function eo(t,a){var o=t.stateNode;if(o===null)return null;var c=o[In]||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"),Rl=!1;if(xa)try{var to={};Object.defineProperty(to,"passive",{get:function(){Rl=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{Rl=!1}var ni=null,H=null,Xe=null;function ki(){if(Xe)return Xe;var t,a=H,o=a.length,c,p="value"in ni?ni.value:ni.textContent,y=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[y-c];c++);return Xe=p.slice(t,1<c?1-c:void 0)}function is(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 Ua(){return!0}function Dl(){return!1}function Nn(t){function a(o,c,p,y,w){this._reactName=o,this._targetInst=p,this.type=c,this.nativeEvent=y,this.target=w,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(o=t[A],this[A]=o?o(y):y[A]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Ua:Dl,this.isPropagationStopped=Dl,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=Ua)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ua)},persist:function(){},isPersistent:Ua}),a}var ji={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ai=Nn(ji),Il=j({},ji,{view:0,detail:0}),n5=Nn(Il),Cp,_p,zl,ku=j({},Il,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ep,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"?(Cp=t.screenX-zl.screenX,_p=t.screenY-zl.screenY):_p=Cp=0,zl=t),Cp)},movementY:function(t){return"movementY"in t?t.movementY:_p}}),ky=Nn(ku),a5=j({},ku,{dataTransfer:0}),i5=Nn(a5),s5=j({},Il,{relatedTarget:0}),Tp=Nn(s5),o5=j({},ji,{animationName:0,elapsedTime:0,pseudoElement:0}),r5=Nn(o5),l5=j({},ji,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),c5=Nn(l5),u5=j({},ji,{data:0}),jy=Nn(u5),d5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m5={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"},p5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function h5(t){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(t):(t=p5[t])?!!a[t]:!1}function Ep(){return h5}var f5=j({},Il,{key:function(t){if(t.key){var a=d5[t.key]||t.key;if(a!=="Unidentified")return a}return t.type==="keypress"?(t=is(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?m5[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ep,charCode:function(t){return t.type==="keypress"?is(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?is(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),g5=Nn(f5),y5=j({},ku,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ay=Nn(y5),b5=j({},Il,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ep}),v5=Nn(b5),x5=j({},ji,{propertyName:0,elapsedTime:0,pseudoElement:0}),w5=Nn(x5),S5=j({},ku,{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}),k5=Nn(S5),j5=j({},ji,{newState:0,oldState:0}),A5=Nn(j5),N5=[9,13,27,32],Rp=xa&&"CompositionEvent"in window,Ol=null;xa&&"documentMode"in document&&(Ol=document.documentMode);var C5=xa&&"TextEvent"in window&&!Ol,Ny=xa&&(!Rp||Ol&&8<Ol&&11>=Ol),Cy=" ",_y=!1;function Ty(t,a){switch(t){case"keyup":return N5.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ey(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var or=!1;function _5(t,a){switch(t){case"compositionend":return Ey(a);case"keypress":return a.which!==32?null:(_y=!0,Cy);case"textInput":return t=a.data,t===Cy&&_y?null:t;default:return null}}function T5(t,a){if(or)return t==="compositionend"||!Rp&&Ty(t,a)?(t=ki(),Xe=H=ni=null,or=!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 Ny&&a.locale!=="ko"?null:a.data;default:return null}}var E5={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 Ry(t){var a=t&&t.nodeName&&t.nodeName.toLowerCase();return a==="input"?!!E5[t.type]:a==="textarea"}function Dy(t,a,o,c){Si?Bn?Bn.push(c):Bn=[c]:Si=c,a=md(a,"onChange"),0<a.length&&(o=new ai("onChange","change",null,o,c),t.push({event:o,listeners:a}))}var Pl=null,Ml=null;function R5(t){hx(t,0)}function ju(t){var a=es(t);if(ei(a))return t}function Iy(t,a){if(t==="change")return a}var zy=!1;if(xa){var Dp;if(xa){var Ip="oninput"in document;if(!Ip){var Oy=document.createElement("div");Oy.setAttribute("oninput","return;"),Ip=typeof Oy.oninput=="function"}Dp=Ip}else Dp=!1;zy=Dp&&(!document.documentMode||9<document.documentMode)}function Py(){Pl&&(Pl.detachEvent("onpropertychange",My),Ml=Pl=null)}function My(t){if(t.propertyName==="value"&&ju(Ml)){var a=[];Dy(a,Ml,t,_l(t)),El(R5,a)}}function D5(t,a,o){t==="focusin"?(Py(),Pl=a,Ml=o,Pl.attachEvent("onpropertychange",My)):t==="focusout"&&Py()}function I5(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ju(Ml)}function z5(t,a){if(t==="click")return ju(a)}function O5(t,a){if(t==="input"||t==="change")return ju(a)}function P5(t,a){return t===a&&(t!==0||1/t===1/a)||t!==t&&a!==a}var sa=typeof Object.is=="function"?Object.is:P5;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(!Ke.call(a,p)||!sa(t[p],a[p]))return!1}return!0}function qy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function By(t,a){var o=qy(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=qy(o)}}function Ly(t,a){return t&&a?t===a?!0:t&&t.nodeType===3?!1:a&&a.nodeType===3?Ly(t,a.parentNode):"contains"in t?t.contains(a):t.compareDocumentPosition?!!(t.compareDocumentPosition(a)&16):!1:!1}function Uy(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var a=as(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=as(t.document)}return a}function zp(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 M5=xa&&"documentMode"in document&&11>=document.documentMode,rr=null,Op=null,Bl=null,Pp=!1;function Vy(t,a,o){var c=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Pp||rr==null||rr!==as(c)||(c=rr,"selectionStart"in c&&zp(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}),Bl&&ql(Bl,c)||(Bl=c,c=md(Op,"onSelect"),0<c.length&&(a=new ai("onSelect","select",null,a,o),t.push({event:a,listeners:c}),a.target=rr)))}function no(t,a){var o={};return o[t.toLowerCase()]=a.toLowerCase(),o["Webkit"+t]="webkit"+a,o["Moz"+t]="moz"+a,o}var lr={animationend:no("Animation","AnimationEnd"),animationiteration:no("Animation","AnimationIteration"),animationstart:no("Animation","AnimationStart"),transitionrun:no("Transition","TransitionRun"),transitionstart:no("Transition","TransitionStart"),transitioncancel:no("Transition","TransitionCancel"),transitionend:no("Transition","TransitionEnd")},Mp={},$y={};xa&&($y=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function ao(t){if(Mp[t])return Mp[t];if(!lr[t])return t;var a=lr[t],o;for(o in a)if(a.hasOwnProperty(o)&&o in $y)return Mp[t]=a[o];return t}var Ky=ao("animationend"),Gy=ao("animationiteration"),Hy=ao("animationstart"),q5=ao("transitionrun"),B5=ao("transitionstart"),L5=ao("transitioncancel"),Fy=ao("transitionend"),Qy=new Map,qp="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(" ");qp.push("scrollEnd");function Va(t,a){Qy.set(t,a),Ja(a,[t])}var Au=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=[],cr=0,Bp=0;function Nu(){for(var t=cr,a=Bp=cr=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 y=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}y!==0&&Zy(o,p,y)}}function Cu(t,a,o,c){wa[cr++]=t,wa[cr++]=a,wa[cr++]=o,wa[cr++]=c,Bp|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function Lp(t,a,o,c){return Cu(t,a,o,c),_u(t)}function io(t,a){return Cu(t,null,null,a),_u(t)}function Zy(t,a,o){t.lanes|=o;var c=t.alternate;c!==null&&(c.lanes|=o);for(var p=!1,y=t.return;y!==null;)y.childLanes|=o,c=y.alternate,c!==null&&(c.childLanes|=o),y.tag===22&&(t=y.stateNode,t===null||t._visibility&1||(p=!0)),t=y,y=y.return;return t.tag===3?(y=t.stateNode,p&&a!==null&&(p=31-Zt(o),t=y.hiddenUpdates,c=t[p],c===null?t[p]=[a]:c.push(a),a.lane=o|536870912),y):null}function _u(t){if(50<rc)throw rc=0,Zh=null,Error(r(185));for(var a=t.return;a!==null;)t=a,a=t.return;return t.tag===3?t.stateNode:null}var ur={};function U5(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 U5(t,a,o,c)}function Up(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ai(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 Yy(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 Tu(t,a,o,c,p,y){var w=0;if(c=t,typeof t=="function")Up(t)&&(w=1);else if(typeof t=="string")w=H_(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=y,t;case M:return so(o.children,p,y,a);case R:w=8,p|=24;break;case P:return t=oa(12,o,a,p|2),t.elementType=P,t.lanes=y,t;case Q:return t=oa(13,o,a,p),t.elementType=Q,t.lanes=y,t;case ae:return t=oa(19,o,a,p),t.elementType=ae,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case L:w=10;break e;case q: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=y,a}function so(t,a,o,c){return t=oa(7,t,c,a),t.lanes=o,t}function Vp(t,a,o){return t=oa(6,t,null,a),t.lanes=o,t}function Xy(t){var a=oa(18,null,null,0);return a.stateNode=t,a}function $p(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 Jy=new WeakMap;function Sa(t,a){if(typeof t=="object"&&t!==null){var o=Jy.get(t);return o!==void 0?o:(a={value:t,source:a,stack:Ht(a)},Jy.set(t,a),a)}return{value:t,source:a,stack:Ht(a)}}var dr=[],mr=0,Eu=null,Ll=0,ka=[],ja=0,ss=null,ii=1,si="";function Ni(t,a){dr[mr++]=Ll,dr[mr++]=Eu,Eu=t,Ll=a}function Wy(t,a,o){ka[ja++]=ii,ka[ja++]=si,ka[ja++]=ss,ss=t;var c=ii;t=si;var p=32-Zt(c)-1;c&=~(1<<p),o+=1;var y=32-Zt(a)+p;if(30<y){var w=p-p%5;y=(c&(1<<w)-1).toString(32),c>>=w,p-=w,ii=1<<32-Zt(a)+p|o<<p|c,si=y+t}else ii=1<<y|o<<p|c,si=t}function Kp(t){t.return!==null&&(Ni(t,1),Wy(t,1,0))}function Gp(t){for(;t===Eu;)Eu=dr[--mr],dr[mr]=null,Ll=dr[--mr],dr[mr]=null;for(;t===ss;)ss=ka[--ja],ka[ja]=null,si=ka[--ja],ka[ja]=null,ii=ka[--ja],ka[ja]=null}function eb(t,a){ka[ja++]=ii,ka[ja++]=si,ka[ja++]=ss,ii=a.id,si=a.overflow,ss=t}var Cn=null,Mt=null,ht=!1,os=null,Aa=!1,Hp=Error(r(519));function rs(t){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ul(Sa(a,t)),Hp}function tb(t){var a=t.stateNode,o=t.type,c=t.memoizedProps;switch(a[ln]=t,a[In]=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<cc.length;o++)lt(cc[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),Nl(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),wi(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||bx(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=La),a=!0):a=!1,a||rs(t,!0)}function nb(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 pr(t){if(t!==Cn)return!1;if(!ht)return nb(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")||df(t.type,t.memoizedProps)),o=!o),o&&Mt&&rs(t),nb(t),a===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Mt=Cx(t)}else if(a===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Mt=Cx(t)}else a===27?(a=Mt,ws(t.type)?(t=gf,gf=null,Mt=t):Mt=a):Mt=Cn?Ca(t.stateNode.nextSibling):null;return!0}function oo(){Mt=Cn=null,ht=!1}function Fp(){var t=os;return t!==null&&(Zn===null?Zn=t:Zn.push.apply(Zn,t),os=null),t}function Ul(t){os===null?os=[t]:os.push(t)}var Qp=Se(null),ro=null,Ci=null;function ls(t,a,o){we(Qp,a._currentValue),a._currentValue=o}function _i(t){t._currentValue=Qp.current,qe(Qp)}function Zp(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 Yp(t,a,o,c){var p=t.child;for(p!==null&&(p.return=t);p!==null;){var y=p.dependencies;if(y!==null){var w=p.child;y=y.firstContext;e:for(;y!==null;){var A=y;y=p;for(var D=0;D<a.length;D++)if(A.context===a[D]){y.lanes|=o,A=y.alternate,A!==null&&(A.lanes|=o),Zp(y.return,o,t),c||(w=null);break e}y=A.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(r(341));w.lanes|=o,y=w.alternate,y!==null&&(y.lanes|=o),Zp(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 hr(t,a,o,c){t=null;for(var p=a,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!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(hc):t=[hc])}p=p.return}t!==null&&Yp(a,t,o,c),a.flags|=262144}function Ru(t){for(t=t.firstContext;t!==null;){if(!sa(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function lo(t){ro=t,Ci=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function _n(t){return ab(ro,t)}function Du(t,a){return ro===null&&lo(t),ab(t,a)}function ab(t,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},Ci===null){if(t===null)throw Error(r(308));Ci=a,t.dependencies={lanes:0,firstContext:a},t.flags|=524288}else Ci=Ci.next=a;return o}var V5=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()})}},$5=e.unstable_scheduleCallback,K5=e.unstable_NormalPriority,cn={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xp(){return{controller:new V5,data:new Map,refCount:0}}function Vl(t){t.refCount--,t.refCount===0&&$5(K5,function(){t.controller.abort()})}var $l=null,Jp=0,fr=0,gr=null;function G5(t,a){if($l===null){var o=$l=[];Jp=0,fr=tf(),gr={status:"pending",value:void 0,then:function(c){o.push(c)}}}return Jp++,a.then(ib,ib),a}function ib(){if(--Jp===0&&$l!==null){gr!==null&&(gr.status="fulfilled");var t=$l;$l=null,fr=0,gr=null;for(var a=0;a<t.length;a++)(0,t[a])()}}function H5(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 sb=B.S;B.S=function(t,a){Vv=Vt(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&G5(t,a),sb!==null&&sb(t,a)};var co=Se(null);function Wp(){var t=co.current;return t!==null?t:zt.pooledCache}function Iu(t,a){a===null?we(co,co.current):we(co,a.pool)}function ob(){var t=Wp();return t===null?null:{parent:cn._currentValue,pool:t}}var yr=Error(r(460)),eh=Error(r(474)),zu=Error(r(542)),Ou={then:function(){}};function rb(t){return t=t.status,t==="fulfilled"||t==="rejected"}function lb(t,a,o){switch(o=t[o],o===void 0?t.push(a):o!==a&&(a.then(La,La),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw t=a.reason,ub(t),t;default:if(typeof a.status=="string")a.then(La,La);else{if(t=zt,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,ub(t),t}throw mo=a,yr}}function uo(t){try{var a=t._init;return a(t._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(mo=o,yr):o}}var mo=null;function cb(){if(mo===null)throw Error(r(459));var t=mo;return mo=null,t}function ub(t){if(t===yr||t===zu)throw Error(r(483))}var br=null,Kl=0;function Pu(t){var a=Kl;return Kl+=1,br===null&&(br=[]),lb(br,t,a)}function Gl(t,a){a=a.props.ref,t.ref=a!==void 0?a:null}function Mu(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 db(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=Ai(U,O),U.index=0,U.sibling=null,U}function y(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=Vp(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===M?ee(U,O,K.props.children,ne,K.key):O!==null&&(O.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===Z&&uo(He)===O.type)?(O=p(O,K.props),Gl(O,K),O.return=U,O):(O=Tu(K.type,K.key,K.props,null,U.mode,ne),Gl(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=$p(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=so(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=Vp(""+O,U.mode,K),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case T:return K=Tu(O.type,O.key,O.props,null,U.mode,K),Gl(K,O),K.return=U,K;case I:return O=$p(O,U.mode,K),O.return=U,O;case Z:return O=uo(O),ie(U,O,K)}if(Le(O)||Ge(O))return O=so(O,U.mode,K,null),O.return=U,O;if(typeof O.then=="function")return ie(U,Pu(O),K);if(O.$$typeof===L)return ie(U,Du(U,O),K);Mu(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 I:return K.key===He?G(U,O,K,ne):null;case Z:return K=uo(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,Pu(K),ne);if(K.$$typeof===L)return F(U,O,Du(U,K),ne);Mu(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 I:return U=U.get(ne.key===null?K:ne.key)||null,G(O,U,ne,He);case Z:return ne=uo(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,Pu(ne),He);if(ne.$$typeof===L)return Y(U,O,K,Du(O,ne),He);Mu(O,ne)}return null}function Te(U,O,K,ne){for(var He=null,xt=null,ze=O,it=O=0,dt=null;ze!==null&&it<K.length;it++){ze.index>it?(dt=ze,ze=null):dt=ze.sibling;var wt=F(U,ze,K[it],ne);if(wt===null){ze===null&&(ze=dt);break}t&&ze&&wt.alternate===null&&a(U,ze),O=y(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt,ze=dt}if(it===K.length)return o(U,ze),ht&&Ni(U,it),He;if(ze===null){for(;it<K.length;it++)ze=ie(U,K[it],ne),ze!==null&&(O=y(ze,O,it),xt===null?He=ze:xt.sibling=ze,xt=ze);return ht&&Ni(U,it),He}for(ze=c(ze);it<K.length;it++)dt=Y(ze,U,it,K[it],ne),dt!==null&&(t&&dt.alternate!==null&&ze.delete(dt.key===null?it:dt.key),O=y(dt,O,it),xt===null?He=dt:xt.sibling=dt,xt=dt);return t&&ze.forEach(function(Ns){return a(U,Ns)}),ht&&Ni(U,it),He}function Qe(U,O,K,ne){if(K==null)throw Error(r(151));for(var He=null,xt=null,ze=O,it=O=0,dt=null,wt=K.next();ze!==null&&!wt.done;it++,wt=K.next()){ze.index>it?(dt=ze,ze=null):dt=ze.sibling;var Ns=F(U,ze,wt.value,ne);if(Ns===null){ze===null&&(ze=dt);break}t&&ze&&Ns.alternate===null&&a(U,ze),O=y(Ns,O,it),xt===null?He=Ns:xt.sibling=Ns,xt=Ns,ze=dt}if(wt.done)return o(U,ze),ht&&Ni(U,it),He;if(ze===null){for(;!wt.done;it++,wt=K.next())wt=ie(U,wt.value,ne),wt!==null&&(O=y(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt);return ht&&Ni(U,it),He}for(ze=c(ze);!wt.done;it++,wt=K.next())wt=Y(ze,U,it,wt.value,ne),wt!==null&&(t&&wt.alternate!==null&&ze.delete(wt.key===null?it:wt.key),O=y(wt,O,it),xt===null?He=wt:xt.sibling=wt,xt=wt);return t&&ze.forEach(function(a6){return a(U,a6)}),ht&&Ni(U,it),He}function It(U,O,K,ne){if(typeof K=="object"&&K!==null&&K.type===M&&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===M){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&&uo(He)===O.type){o(U,O.sibling),ne=p(O,K.props),Gl(ne,K),ne.return=U,U=ne;break e}o(U,O);break}else a(U,O);O=O.sibling}K.type===M?(ne=so(K.props.children,U.mode,ne,K.key),ne.return=U,U=ne):(ne=Tu(K.type,K.key,K.props,null,U.mode,ne),Gl(ne,K),ne.return=U,U=ne)}return w(U);case I: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=$p(K,U.mode,ne),ne.return=U,U=ne}return w(U);case Z:return K=uo(K),It(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 It(U,O,Pu(K),ne);if(K.$$typeof===L)return It(U,O,Du(U,K),ne);Mu(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=Vp(K,U.mode,ne),ne.return=U,U=ne),w(U)):o(U,O)}return function(U,O,K,ne){try{Kl=0;var He=It(U,O,K,ne);return br=null,He}catch(ze){if(ze===yr||ze===zu)throw ze;var xt=oa(29,ze,null,U.mode);return xt.lanes=ne,xt.return=U,xt}}}var po=db(!0),mb=db(!1),cs=!1;function th(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nh(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 us(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function ds(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=_u(t),Zy(t,null,o),a}return Cu(t,c,a,o),_u(t)}function Hl(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,gl(t,o)}}function ah(t,a){var o=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,o===c)){var p=null,y=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};y===null?p=y=w:y=y.next=w,o=o.next}while(o!==null);y===null?p=y=a:y=y.next=a}else p=y=a;o={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:y,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 ih=!1;function Fl(){if(ih){var t=gr;if(t!==null)throw t}}function Ql(t,a,o,c){ih=!1;var p=t.updateQueue;cs=!1;var y=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?y=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(y!==null){var ie=p.baseState;w=0,ee=G=D=null,A=y;do{var F=A.lane&-536870913,Y=F!==A.lane;if(Y?(ut&F)===F:(c&F)===F){F!==0&&F===fr&&(ih=!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 It=o;switch(Qe.tag){case 1:if(Te=Qe.payload,typeof Te=="function"){ie=Te.call(It,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(It,ie,F):Te,F==null)break e;ie=j({},ie,F);break e;case 2:cs=!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,y===null&&(p.shared.lanes=0),gs|=w,t.lanes=w,t.memoizedState=ie}}function pb(t,a){if(typeof t!="function")throw Error(r(191,t));t.call(a)}function hb(t,a){var o=t.callbacks;if(o!==null)for(t.callbacks=null,t=0;t<o.length;t++)pb(o[t],a)}var vr=Se(null),qu=Se(0);function fb(t,a){t=Mi,we(qu,t),we(vr,a),Mi=t|a.baseLanes}function sh(){we(qu,Mi),we(vr,vr.current)}function oh(){Mi=qu.current,qe(vr),qe(qu)}var ra=Se(null),Na=null;function ms(t){var a=t.alternate;we(nn,nn.current&1),we(ra,t),Na===null&&(a===null||vr.current!==null||a.memoizedState!==null)&&(Na=t)}function rh(t){we(nn,nn.current),we(ra,t),Na===null&&(Na=t)}function gb(t){t.tag===22?(we(nn,nn.current),we(ra,t),Na===null&&(Na=t)):ps()}function ps(){we(nn,nn.current),we(ra,ra.current)}function la(t){qe(ra),Na===t&&(Na=null),qe(nn)}var nn=Se(0);function Bu(t){for(var a=t;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||hf(o)||ff(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 Ti=0,nt=null,Rt=null,un=null,Lu=!1,xr=!1,ho=!1,Uu=0,Zl=0,wr=null,F5=0;function Wt(){throw Error(r(321))}function lh(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 ch(t,a,o,c,p,y){return Ti=y,nt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,B.H=t===null||t.memoizedState===null?Wb:jh,ho=!1,y=o(c,p),ho=!1,xr&&(y=bb(a,o,c,p)),yb(t),y}function yb(t){B.H=Jl;var a=Rt!==null&&Rt.next!==null;if(Ti=0,un=Rt=nt=null,Lu=!1,Zl=0,wr=null,a)throw Error(r(300));t===null||dn||(t=t.dependencies,t!==null&&Ru(t)&&(dn=!0))}function bb(t,a,o,c){nt=t;var p=0;do{if(xr&&(wr=null),Zl=0,xr=!1,25<=p)throw Error(r(301));if(p+=1,un=Rt=null,t.updateQueue!=null){var y=t.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}B.H=ev,y=a(o,c)}while(xr);return y}function Q5(){var t=B.H,a=t.useState()[0];return a=typeof a.then=="function"?Yl(a):a,t=t.useState()[0],(Rt!==null?Rt.memoizedState:null)!==t&&(nt.flags|=1024),a}function uh(){var t=Uu!==0;return Uu=0,t}function dh(t,a,o){a.updateQueue=t.updateQueue,a.flags&=-2053,t.lanes&=~o}function mh(t){if(Lu){for(t=t.memoizedState;t!==null;){var a=t.queue;a!==null&&(a.pending=null),t=t.next}Lu=!1}Ti=0,un=Rt=nt=null,xr=!1,Zl=Uu=0,wr=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 Vu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yl(t){var a=Zl;return Zl+=1,wr===null&&(wr=[]),t=lb(wr,t,a),a=nt,(un===null?a.memoizedState:un.next)===null&&(a=a.alternate,B.H=a===null||a.memoizedState===null?Wb:jh),t}function $u(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Yl(t);if(t.$$typeof===L)return _n(t)}throw Error(r(438,String(t)))}function ph(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=Vu(),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 Ei(t,a){return typeof a=="function"?a(t):a}function Ku(t){var a=an();return hh(a,Rt,t)}function hh(t,a,o){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=o;var p=t.baseQueue,y=c.pending;if(y!==null){if(p!==null){var w=p.next;p.next=y.next,y.next=w}a.baseQueue=p=y,c.pending=null}if(y=t.baseState,p===null)t.memoizedState=y;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:(Ti&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===fr&&(ee=!0);else if((Ti&F)===F){G=G.next,F===fr&&(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=y):D=D.next=ie,nt.lanes|=F,gs|=F;ie=G.action,ho&&o(y,ie),y=G.hasEagerState?G.eagerState:o(y,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=y):D=D.next=F,nt.lanes|=ie,gs|=ie;G=G.next}while(G!==null&&G!==a);if(D===null?w=y:D.next=A,!sa(y,t.memoizedState)&&(dn=!0,ee&&(o=gr,o!==null)))throw o;t.memoizedState=y,t.baseState=w,t.baseQueue=D,c.lastRenderedState=y}return p===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function fh(t){var a=an(),o=a.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=t;var c=o.dispatch,p=o.pending,y=a.memoizedState;if(p!==null){o.pending=null;var w=p=p.next;do y=t(y,w.action),w=w.next;while(w!==p);sa(y,a.memoizedState)||(dn=!0),a.memoizedState=y,a.baseQueue===null&&(a.baseState=y),o.lastRenderedState=y}return[y,c]}function vb(t,a,o){var c=nt,p=an(),y=ht;if(y){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,bh(Sb.bind(null,c,p,t),[t]),p.getSnapshot!==a||w||un!==null&&un.memoizedState.tag&1){if(c.flags|=2048,Sr(9,{destroy:void 0},wb.bind(null,c,p,o,a),null),zt===null)throw Error(r(349));y||(Ti&127)!==0||xb(c,a,o)}return o}function xb(t,a,o){t.flags|=16384,t={getSnapshot:a,value:o},a=nt.updateQueue,a===null?(a=Vu(),nt.updateQueue=a,a.stores=[t]):(o=a.stores,o===null?a.stores=[t]:o.push(t))}function wb(t,a,o,c){a.value=o,a.getSnapshot=c,kb(a)&&jb(t)}function Sb(t,a,o){return o(function(){kb(a)&&jb(t)})}function kb(t){var a=t.getSnapshot;t=t.value;try{var o=a();return!sa(t,o)}catch{return!0}}function jb(t){var a=io(t,2);a!==null&&Yn(a,t,2)}function gh(t){var a=Ln();if(typeof t=="function"){var o=t;if(t=o(),ho){Kn(!0);try{o()}finally{Kn(!1)}}}return a.memoizedState=a.baseState=t,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:t},a}function Ab(t,a,o,c){return t.baseState=o,hh(t,Rt,typeof c=="function"?c:Ei)}function Z5(t,a,o,c,p){if(Fu(t))throw Error(r(485));if(t=a.action,t!==null){var y={payload:p,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){y.listeners.push(w)}};B.T!==null?o(!0):y.isTransition=!1,c(y),o=a.pending,o===null?(y.next=a.pending=y,Nb(a,y)):(y.next=o.next,a.pending=o.next=y)}}function Nb(t,a){var o=a.action,c=a.payload,p=t.state;if(a.isTransition){var y=B.T,w={};B.T=w;try{var A=o(p,c),D=B.S;D!==null&&D(w,A),Cb(t,a,A)}catch(G){yh(t,a,G)}finally{y!==null&&w.types!==null&&(y.types=w.types),B.T=y}}else try{y=o(p,c),Cb(t,a,y)}catch(G){yh(t,a,G)}}function Cb(t,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(c){_b(t,a,c)},function(c){return yh(t,a,c)}):_b(t,a,o)}function _b(t,a,o){a.status="fulfilled",a.value=o,Tb(a),t.state=o,a=t.pending,a!==null&&(o=a.next,o===a?t.pending=null:(o=o.next,a.next=o,Nb(t,o)))}function yh(t,a,o){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=o,Tb(a),a=a.next;while(a!==c)}t.action=null}function Tb(t){t=t.listeners;for(var a=0;a<t.length;a++)(0,t[a])()}function Eb(t,a){return a}function Rb(t,a){if(ht){var o=zt.formState;if(o!==null){e:{var c=nt;if(ht){if(Mt){t:{for(var p=Mt,y=Aa;p.nodeType!==8;){if(!y){p=null;break t}if(p=Ca(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Mt=Ca(p.nextSibling),c=p.data==="F!";break e}}rs(c)}c=!1}c&&(a=o[0])}}return o=Ln(),o.memoizedState=o.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eb,lastRenderedState:a},o.queue=c,o=Yb.bind(null,nt,c),c.dispatch=o,c=gh(!1),y=kh.bind(null,nt,!1,c.queue),c=Ln(),p={state:a,dispatch:null,action:t,pending:null},c.queue=p,o=Z5.bind(null,nt,p,y,o),p.dispatch=o,c.memoizedState=t,[a,o,!1]}function Db(t){var a=an();return Ib(a,Rt,t)}function Ib(t,a,o){if(a=hh(t,a,Eb)[0],t=Ku(Ei)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Yl(a)}catch(w){throw w===yr?zu:w}else c=a;a=an();var p=a.queue,y=p.dispatch;return o!==a.memoizedState&&(nt.flags|=2048,Sr(9,{destroy:void 0},Y5.bind(null,p,o),null)),[c,y,t]}function Y5(t,a){t.action=a}function zb(t){var a=an(),o=Rt;if(o!==null)return Ib(a,o,t);an(),a=a.memoizedState,o=an();var c=o.queue.dispatch;return o.memoizedState=t,[a,c,!1]}function Sr(t,a,o,c){return t={tag:t,create:o,deps:c,inst:a,next:null},a=nt.updateQueue,a===null&&(a=Vu(),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 Ob(){return an().memoizedState}function Gu(t,a,o,c){var p=Ln();nt.flags|=t,p.memoizedState=Sr(1|a,{destroy:void 0},o,c===void 0?null:c)}function Hu(t,a,o,c){var p=an();c=c===void 0?null:c;var y=p.memoizedState.inst;Rt!==null&&c!==null&&lh(c,Rt.memoizedState.deps)?p.memoizedState=Sr(a,y,o,c):(nt.flags|=t,p.memoizedState=Sr(1|a,y,o,c))}function Pb(t,a){Gu(8390656,8,t,a)}function bh(t,a){Hu(2048,8,t,a)}function X5(t){nt.flags|=4;var a=nt.updateQueue;if(a===null)a=Vu(),nt.updateQueue=a,a.events=[t];else{var o=a.events;o===null?a.events=[t]:o.push(t)}}function Mb(t){var a=an().memoizedState;return X5({ref:a,nextImpl:t}),function(){if((jt&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function qb(t,a){return Hu(4,2,t,a)}function Bb(t,a){return Hu(4,4,t,a)}function Lb(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 Ub(t,a,o){o=o!=null?o.concat([t]):null,Hu(4,4,Lb.bind(null,a,t),o)}function vh(){}function Vb(t,a){var o=an();a=a===void 0?null:a;var c=o.memoizedState;return a!==null&&lh(a,c[1])?c[0]:(o.memoizedState=[t,a],t)}function $b(t,a){var o=an();a=a===void 0?null:a;var c=o.memoizedState;if(a!==null&&lh(a,c[1]))return c[0];if(c=t(),ho){Kn(!0);try{t()}finally{Kn(!1)}}return o.memoizedState=[c,a],c}function xh(t,a,o){return o===void 0||(Ti&1073741824)!==0&&(ut&261930)===0?t.memoizedState=a:(t.memoizedState=o,t=Kv(),nt.lanes|=t,gs|=t,o)}function Kb(t,a,o,c){return sa(o,a)?o:vr.current!==null?(t=xh(t,o,c),sa(t,a)||(dn=!0),t):(Ti&42)===0||(Ti&1073741824)!==0&&(ut&261930)===0?(dn=!0,t.memoizedState=o):(t=Kv(),nt.lanes|=t,gs|=t,a)}function Gb(t,a,o,c,p){var y=W.p;W.p=y!==0&&8>y?y:8;var w=B.T,A={};B.T=A,kh(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=H5(D,c);Xl(t,a,ee,da(t))}else Xl(t,a,c,da(t))}catch(ie){Xl(t,a,{then:function(){},status:"rejected",reason:ie},da())}finally{W.p=y,w!==null&&A.types!==null&&(w.types=A.types),B.T=w}}function J5(){}function wh(t,a,o,c){if(t.tag!==5)throw Error(r(476));var p=Hb(t).queue;Gb(t,p,a,xe,o===null?J5:function(){return Fb(t),o(c)})}function Hb(t){var a=t.memoizedState;if(a!==null)return a;a={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:xe},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ei,lastRenderedState:o},next:null},t.memoizedState=a,t=t.alternate,t!==null&&(t.memoizedState=a),a}function Fb(t){var a=Hb(t);a.next===null&&(a=t.alternate.memoizedState),Xl(t,a.next.queue,{},da())}function Sh(){return _n(hc)}function Qb(){return an().memoizedState}function Zb(){return an().memoizedState}function W5(t){for(var a=t.return;a!==null;){switch(a.tag){case 24:case 3:var o=da();t=us(o);var c=ds(a,t,o);c!==null&&(Yn(c,a,o),Hl(c,a,o)),a={cache:Xp()},t.payload=a;return}a=a.return}}function e_(t,a,o){var c=da();o={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Fu(t)?Xb(a,o):(o=Lp(t,a,o,c),o!==null&&(Yn(o,t,c),Jb(o,a,c)))}function Yb(t,a,o){var c=da();Xl(t,a,o,c)}function Xl(t,a,o,c){var p={lane:c,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(Fu(t))Xb(a,p);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=a.lastRenderedReducer,y!==null))try{var w=a.lastRenderedState,A=y(w,o);if(p.hasEagerState=!0,p.eagerState=A,sa(A,w))return Cu(t,a,p,0),zt===null&&Nu(),!1}catch{}if(o=Lp(t,a,p,c),o!==null)return Yn(o,t,c),Jb(o,a,c),!0}return!1}function kh(t,a,o,c){if(c={lane:2,revertLane:tf(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},Fu(t)){if(a)throw Error(r(479))}else a=Lp(t,o,c,2),a!==null&&Yn(a,t,2)}function Fu(t){var a=t.alternate;return t===nt||a!==null&&a===nt}function Xb(t,a){xr=Lu=!0;var o=t.pending;o===null?a.next=a:(a.next=o.next,o.next=a),t.pending=a}function Jb(t,a,o){if((o&4194048)!==0){var c=a.lanes;c&=t.pendingLanes,o|=c,a.lanes=o,gl(t,o)}}var Jl={readContext:_n,use:$u,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};Jl.useEffectEvent=Wt;var Wb={readContext:_n,use:$u,useCallback:function(t,a){return Ln().memoizedState=[t,a===void 0?null:a],t},useContext:_n,useEffect:Pb,useImperativeHandle:function(t,a,o){o=o!=null?o.concat([t]):null,Gu(4194308,4,Lb.bind(null,a,t),o)},useLayoutEffect:function(t,a){return Gu(4194308,4,t,a)},useInsertionEffect:function(t,a){Gu(4,2,t,a)},useMemo:function(t,a){var o=Ln();a=a===void 0?null:a;var c=t();if(ho){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(ho){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=e_.bind(null,nt,t),[c.memoizedState,t]},useRef:function(t){var a=Ln();return t={current:t},a.memoizedState=t},useState:function(t){t=gh(t);var a=t.queue,o=Yb.bind(null,nt,a);return a.dispatch=o,[t.memoizedState,o]},useDebugValue:vh,useDeferredValue:function(t,a){var o=Ln();return xh(o,t,a)},useTransition:function(){var t=gh(!1);return t=Gb.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(),zt===null)throw Error(r(349));(ut&127)!==0||xb(c,a,o)}p.memoizedState=o;var y={value:o,getSnapshot:a};return p.queue=y,Pb(Sb.bind(null,c,y,t),[t]),c.flags|=2048,Sr(9,{destroy:void 0},wb.bind(null,c,y,o,a),null),o},useId:function(){var t=Ln(),a=zt.identifierPrefix;if(ht){var o=si,c=ii;o=(c&~(1<<32-Zt(c)-1)).toString(32)+o,a="_"+a+"R_"+o,o=Uu++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=F5++,a="_"+a+"r_"+o.toString(32)+"_";return t.memoizedState=a},useHostTransitionStatus:Sh,useFormState:Rb,useActionState:Rb,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=kh.bind(null,nt,!0,o),o.dispatch=a,[t,a]},useMemoCache:ph,useCacheRefresh:function(){return Ln().memoizedState=W5.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)}}},jh={readContext:_n,use:$u,useCallback:Vb,useContext:_n,useEffect:bh,useImperativeHandle:Ub,useInsertionEffect:qb,useLayoutEffect:Bb,useMemo:$b,useReducer:Ku,useRef:Ob,useState:function(){return Ku(Ei)},useDebugValue:vh,useDeferredValue:function(t,a){var o=an();return Kb(o,Rt.memoizedState,t,a)},useTransition:function(){var t=Ku(Ei)[0],a=an().memoizedState;return[typeof t=="boolean"?t:Yl(t),a]},useSyncExternalStore:vb,useId:Qb,useHostTransitionStatus:Sh,useFormState:Db,useActionState:Db,useOptimistic:function(t,a){var o=an();return Ab(o,Rt,t,a)},useMemoCache:ph,useCacheRefresh:Zb};jh.useEffectEvent=Mb;var ev={readContext:_n,use:$u,useCallback:Vb,useContext:_n,useEffect:bh,useImperativeHandle:Ub,useInsertionEffect:qb,useLayoutEffect:Bb,useMemo:$b,useReducer:fh,useRef:Ob,useState:function(){return fh(Ei)},useDebugValue:vh,useDeferredValue:function(t,a){var o=an();return Rt===null?xh(o,t,a):Kb(o,Rt.memoizedState,t,a)},useTransition:function(){var t=fh(Ei)[0],a=an().memoizedState;return[typeof t=="boolean"?t:Yl(t),a]},useSyncExternalStore:vb,useId:Qb,useHostTransitionStatus:Sh,useFormState:zb,useActionState:zb,useOptimistic:function(t,a){var o=an();return Rt!==null?Ab(o,Rt,t,a):(o.baseState=t,[t,o.queue.dispatch])},useMemoCache:ph,useCacheRefresh:Zb};ev.useEffectEvent=Mb;function Ah(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 Nh={enqueueSetState:function(t,a,o){t=t._reactInternals;var c=da(),p=us(c);p.payload=a,o!=null&&(p.callback=o),a=ds(t,p,c),a!==null&&(Yn(a,t,c),Hl(a,t,c))},enqueueReplaceState:function(t,a,o){t=t._reactInternals;var c=da(),p=us(c);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=ds(t,p,c),a!==null&&(Yn(a,t,c),Hl(a,t,c))},enqueueForceUpdate:function(t,a){t=t._reactInternals;var o=da(),c=us(o);c.tag=2,a!=null&&(c.callback=a),a=ds(t,c,o),a!==null&&(Yn(a,t,o),Hl(a,t,o))}};function tv(t,a,o,c,p,y,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,y,w):a.prototype&&a.prototype.isPureReactComponent?!ql(o,c)||!ql(p,y):!0}function nv(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&&Nh.enqueueReplaceState(a,a.state,null)}function fo(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 av(t){Au(t)}function iv(t){console.error(t)}function sv(t){Au(t)}function Qu(t,a){try{var o=t.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function ov(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 Ch(t,a,o){return o=us(o),o.tag=3,o.payload={element:null},o.callback=function(){Qu(t,a)},o}function rv(t){return t=us(t),t.tag=3,t}function lv(t,a,o,c){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=c.value;t.payload=function(){return p(y)},t.callback=function(){ov(a,o,c)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(t.callback=function(){ov(a,o,c),typeof p!="function"&&(ys===null?ys=new Set([this]):ys.add(this));var A=c.stack;this.componentDidCatch(c.value,{componentStack:A!==null?A:""})})}function t_(t,a,o,c,p){if(o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=o.alternate,a!==null&&hr(a,o,p,!0),o=ra.current,o!==null){switch(o.tag){case 31:case 13:return Na===null?od():o.alternate===null&&en===0&&(en=3),o.flags&=-257,o.flags|=65536,o.lanes=p,c===Ou?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([c]):a.add(c),Jh(t,c,p)),!1;case 22:return o.flags|=65536,c===Ou?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)),Jh(t,c,p)),!1}throw Error(r(435,o.tag))}return Jh(t,c,p),od(),!1}if(ht)return a=ra.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Hp&&(t=Error(r(422),{cause:c}),Ul(Sa(t,o)))):(c!==Hp&&(a=Error(r(423),{cause:c}),Ul(Sa(a,o))),t=t.current.alternate,t.flags|=65536,p&=-p,t.lanes|=p,c=Sa(c,o),p=Ch(t.stateNode,c,p),ah(t,p),en!==4&&(en=2)),!1;var y=Error(r(520),{cause:c});if(y=Sa(y,o),oc===null?oc=[y]:oc.push(y),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=Ch(o.stateNode,c,t),ah(o,t),!1;case 1:if(a=o.type,y=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ys===null||!ys.has(y))))return o.flags|=65536,p&=-p,o.lanes|=p,p=rv(p),lv(p,t,o,c),ah(o,p),!1}o=o.return}while(o!==null);return!1}var _h=Error(r(461)),dn=!1;function Tn(t,a,o,c){a.child=t===null?mb(a,null,o,c):po(a,t.child,o,c)}function cv(t,a,o,c,p){o=o.render;var y=a.ref;if("ref"in c){var w={};for(var A in c)A!=="ref"&&(w[A]=c[A])}else w=c;return lo(a),c=ch(t,a,o,w,y,p),A=uh(),t!==null&&!dn?(dh(t,a,p),Ri(t,a,p)):(ht&&A&&Kp(a),a.flags|=1,Tn(t,a,c,p),a.child)}function uv(t,a,o,c,p){if(t===null){var y=o.type;return typeof y=="function"&&!Up(y)&&y.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=y,dv(t,a,y,c,p)):(t=Tu(o.type,null,c,a,a.mode,p),t.ref=a.ref,t.return=a,a.child=t)}if(y=t.child,!Ph(t,p)){var w=y.memoizedProps;if(o=o.compare,o=o!==null?o:ql,o(w,c)&&t.ref===a.ref)return Ri(t,a,p)}return a.flags|=1,t=Ai(y,c),t.ref=a.ref,t.return=a,a.child=t}function dv(t,a,o,c,p){if(t!==null){var y=t.memoizedProps;if(ql(y,c)&&t.ref===a.ref)if(dn=!1,a.pendingProps=c=y,Ph(t,p))(t.flags&131072)!==0&&(dn=!0);else return a.lanes=t.lanes,Ri(t,a,p)}return Th(t,a,o,c,p)}function mv(t,a,o,c){var p=c.children,y=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(y=y!==null?y.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&~y}else c=0,a.child=null;return pv(t,a,y,o,c)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},t!==null&&Iu(a,y!==null?y.cachePool:null),y!==null?fb(a,y):sh(),gb(a);else return c=a.lanes=536870912,pv(t,a,y!==null?y.baseLanes|o:o,o,c)}else y!==null?(Iu(a,y.cachePool),fb(a,y),ps(),a.memoizedState=null):(t!==null&&Iu(a,null),sh(),ps());return Tn(t,a,p,o),a.child}function Wl(t,a){return t!==null&&t.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function pv(t,a,o,c,p){var y=Wp();return y=y===null?null:{parent:cn._currentValue,pool:y},a.memoizedState={baseLanes:o,cachePool:y},t!==null&&Iu(a,null),sh(),gb(a),t!==null&&hr(t,a,c,!0),a.childLanes=p,null}function Zu(t,a){return a=Xu({mode:a.mode,children:a.children},t.mode),a.ref=t.ref,t.child=a,a.return=t,a}function hv(t,a,o){return po(a,t.child,null,o),t=Zu(a,a.pendingProps),t.flags|=2,la(a),a.memoizedState=null,t}function n_(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=Zu(a,c),a.lanes=536870912,Wl(null,t);if(rh(a),(t=Mt)?(t=Nx(t,Aa),t=t!==null&&t.data==="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ss!==null?{id:ii,overflow:si}:null,retryLane:536870912,hydrationErrors:null},o=Xy(t),o.return=a,a.child=o,Cn=a,Mt=null)):t=null,t===null)throw rs(a);return a.lanes=536870912,null}return Zu(a,c)}var y=t.memoizedState;if(y!==null){var w=y.dehydrated;if(rh(a),p)if(a.flags&256)a.flags&=-257,a=hv(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||hr(t,a,o,!1),p=(o&t.childLanes)!==0,dn||p){if(c=zt,c!==null&&(w=yl(c,o),w!==0&&w!==y.retryLane))throw y.retryLane=w,io(t,w),Yn(c,t,w),_h;od(),a=hv(t,a,o)}else t=y.treeContext,Mt=Ca(w.nextSibling),Cn=a,ht=!0,os=null,Aa=!1,t!==null&&eb(a,t),a=Zu(a,c),a.flags|=4096;return a}return t=Ai(t.child,{mode:c.mode,children:c.children}),t.ref=a.ref,a.child=t,t.return=a,t}function Yu(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 Th(t,a,o,c,p){return lo(a),o=ch(t,a,o,c,void 0,p),c=uh(),t!==null&&!dn?(dh(t,a,p),Ri(t,a,p)):(ht&&c&&Kp(a),a.flags|=1,Tn(t,a,o,p),a.child)}function fv(t,a,o,c,p,y){return lo(a),a.updateQueue=null,o=bb(a,c,o,p),yb(t),c=uh(),t!==null&&!dn?(dh(t,a,y),Ri(t,a,y)):(ht&&c&&Kp(a),a.flags|=1,Tn(t,a,o,y),a.child)}function gv(t,a,o,c,p){if(lo(a),a.stateNode===null){var y=ur,w=o.contextType;typeof w=="object"&&w!==null&&(y=_n(w)),y=new o(c,y),a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=Nh,a.stateNode=y,y._reactInternals=a,y=a.stateNode,y.props=c,y.state=a.memoizedState,y.refs={},th(a),w=o.contextType,y.context=typeof w=="object"&&w!==null?_n(w):ur,y.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Ah(a,o,w,c),y.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(w=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),w!==y.state&&Nh.enqueueReplaceState(y,y.state,null),Ql(a,c,y,p),Fl(),y.state=a.memoizedState),typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(t===null){y=a.stateNode;var A=a.memoizedProps,D=fo(o,A);y.props=D;var G=y.context,ee=o.contextType;w=ur,typeof ee=="object"&&ee!==null&&(w=_n(ee));var ie=o.getDerivedStateFromProps;ee=typeof ie=="function"||typeof y.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,ee||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(A||G!==w)&&nv(a,y,c,w),cs=!1;var F=a.memoizedState;y.state=F,Ql(a,c,y,p),Fl(),G=a.memoizedState,A||F!==G||cs?(typeof ie=="function"&&(Ah(a,o,ie,c),G=a.memoizedState),(D=cs||tv(a,o,D,c,F,G,w))?(ee||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(a.flags|=4194308)):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=G),y.props=c,y.state=G,y.context=w,c=D):(typeof y.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{y=a.stateNode,nh(t,a),w=a.memoizedProps,ee=fo(o,w),y.props=ee,ie=a.pendingProps,F=y.context,G=o.contextType,D=ur,typeof G=="object"&&G!==null&&(D=_n(G)),A=o.getDerivedStateFromProps,(G=typeof A=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(w!==ie||F!==D)&&nv(a,y,c,D),cs=!1,F=a.memoizedState,y.state=F,Ql(a,c,y,p),Fl();var Y=a.memoizedState;w!==ie||F!==Y||cs||t!==null&&t.dependencies!==null&&Ru(t.dependencies)?(typeof A=="function"&&(Ah(a,o,A,c),Y=a.memoizedState),(ee=cs||tv(a,o,ee,c,F,Y,D)||t!==null&&t.dependencies!==null&&Ru(t.dependencies))?(G||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(c,Y,D),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(c,Y,D)),typeof y.componentDidUpdate=="function"&&(a.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof y.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=Y),y.props=c,y.state=Y,y.context=D,c=ee):(typeof y.componentDidUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||w===t.memoizedProps&&F===t.memoizedState||(a.flags|=1024),c=!1)}return y=c,Yu(t,a),c=(a.flags&128)!==0,y||c?(y=a.stateNode,o=c&&typeof o.getDerivedStateFromError!="function"?null:y.render(),a.flags|=1,t!==null&&c?(a.child=po(a,t.child,null,p),a.child=po(a,null,o,p)):Tn(t,a,o,p),a.memoizedState=y.state,t=a.child):t=Ri(t,a,p),t}function yv(t,a,o,c){return oo(),a.flags|=256,Tn(t,a,o,c),a.child}var Eh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Rh(t){return{baseLanes:t,cachePool:ob()}}function Dh(t,a,o){return t=t!==null?t.childLanes&~o:0,a&&(t|=ua),t}function bv(t,a,o){var c=a.pendingProps,p=!1,y=(a.flags&128)!==0,w;if((w=y)||(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?ms(a):ps(),(t=Mt)?(t=Nx(t,Aa),t=t!==null&&t.data!=="&"?t:null,t!==null&&(a.memoizedState={dehydrated:t,treeContext:ss!==null?{id:ii,overflow:si}:null,retryLane:536870912,hydrationErrors:null},o=Xy(t),o.return=a,a.child=o,Cn=a,Mt=null)):t=null,t===null)throw rs(a);return ff(t)?a.lanes=32:a.lanes=536870912,null}var A=c.children;return c=c.fallback,p?(ps(),p=a.mode,A=Xu({mode:"hidden",children:A},p),c=so(c,p,o,null),A.return=a,c.return=a,A.sibling=c,a.child=A,c=a.child,c.memoizedState=Rh(o),c.childLanes=Dh(t,w,o),a.memoizedState=Eh,Wl(null,c)):(ms(a),Ih(a,A))}var D=t.memoizedState;if(D!==null&&(A=D.dehydrated,A!==null)){if(y)a.flags&256?(ms(a),a.flags&=-257,a=zh(t,a,o)):a.memoizedState!==null?(ps(),a.child=t.child,a.flags|=128,a=null):(ps(),A=c.fallback,p=a.mode,c=Xu({mode:"visible",children:c.children},p),A=so(A,p,o,null),A.flags|=2,c.return=a,A.return=a,c.sibling=A,a.child=c,po(a,t.child,null,o),c=a.child,c.memoizedState=Rh(o),c.childLanes=Dh(t,w,o),a.memoizedState=Eh,a=Wl(null,c));else if(ms(a),ff(A)){if(w=A.nextSibling&&A.nextSibling.dataset,w)var G=w.dgst;w=G,c=Error(r(419)),c.stack="",c.digest=w,Ul({value:c,source:null,stack:null}),a=zh(t,a,o)}else if(dn||hr(t,a,o,!1),w=(o&t.childLanes)!==0,dn||w){if(w=zt,w!==null&&(c=yl(w,o),c!==0&&c!==D.retryLane))throw D.retryLane=c,io(t,c),Yn(w,t,c),_h;hf(A)||od(),a=zh(t,a,o)}else hf(A)?(a.flags|=192,a.child=t.child,a=null):(t=D.treeContext,Mt=Ca(A.nextSibling),Cn=a,ht=!0,os=null,Aa=!1,t!==null&&eb(a,t),a=Ih(a,c.children),a.flags|=4096);return a}return p?(ps(),A=c.fallback,p=a.mode,D=t.child,G=D.sibling,c=Ai(D,{mode:"hidden",children:c.children}),c.subtreeFlags=D.subtreeFlags&65011712,G!==null?A=Ai(G,A):(A=so(A,p,o,null),A.flags|=2),A.return=a,c.return=a,c.sibling=A,a.child=c,Wl(null,c),c=a.child,A=t.child.memoizedState,A===null?A=Rh(o):(p=A.cachePool,p!==null?(D=cn._currentValue,p=p.parent!==D?{parent:D,pool:D}:p):p=ob(),A={baseLanes:A.baseLanes|o,cachePool:p}),c.memoizedState=A,c.childLanes=Dh(t,w,o),a.memoizedState=Eh,Wl(t.child,c)):(ms(a),o=t.child,t=o.sibling,o=Ai(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 Ih(t,a){return a=Xu({mode:"visible",children:a},t.mode),a.return=t,t.child=a}function Xu(t,a){return t=oa(22,t,null,a),t.lanes=0,t}function zh(t,a,o){return po(a,t.child,null,o),t=Ih(a,a.pendingProps.children),t.flags|=2,a.memoizedState=null,t}function vv(t,a,o){t.lanes|=a;var c=t.alternate;c!==null&&(c.lanes|=a),Zp(t.return,a,o)}function Oh(t,a,o,c,p,y){var w=t.memoizedState;w===null?t.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:o,tailMode:p,treeForkCount:y}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=c,w.tail=o,w.tailMode=p,w.treeForkCount=y)}function xv(t,a,o){var c=a.pendingProps,p=c.revealOrder,y=c.tail;c=c.children;var w=nn.current,A=(w&2)!==0;if(A?(w=w&1|2,a.flags|=128):w&=1,we(nn,w),Tn(t,a,c,o),c=ht?Ll:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=a.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&vv(t,o,a);else if(t.tag===19)vv(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&&Bu(t)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Oh(a,!1,p,o,y,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&&Bu(t)===null){a.child=p;break}t=p.sibling,p.sibling=o,o=p,p=t}Oh(a,!0,o,null,y,c);break;case"together":Oh(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Ri(t,a,o){if(t!==null&&(a.dependencies=t.dependencies),gs|=a.lanes,(o&a.childLanes)===0)if(t!==null){if(hr(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=Ai(t,t.pendingProps),a.child=o,o.return=a;t.sibling!==null;)t=t.sibling,o=o.sibling=Ai(t,t.pendingProps),o.return=a;o.sibling=null}return a.child}function Ph(t,a){return(t.lanes&a)!==0?!0:(t=t.dependencies,!!(t!==null&&Ru(t)))}function a_(t,a,o){switch(a.tag){case 3:Ze(a,a.stateNode.containerInfo),ls(a,cn,t.memoizedState.cache),oo();break;case 27:case 5:Ct(a);break;case 4:Ze(a,a.stateNode.containerInfo);break;case 10:ls(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,rh(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(ms(a),a.flags|=128,null):(o&a.child.childLanes)!==0?bv(t,a,o):(ms(a),t=Ri(t,a,o),t!==null?t.sibling:null);ms(a);break;case 19:var p=(t.flags&128)!==0;if(c=(o&a.childLanes)!==0,c||(hr(t,a,o,!1),c=(o&a.childLanes)!==0),p){if(c)return xv(t,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),we(nn,nn.current),c)break;return null;case 22:return a.lanes=0,mv(t,a,o,a.pendingProps);case 24:ls(a,cn,t.memoizedState.cache)}return Ri(t,a,o)}function wv(t,a,o){if(t!==null)if(t.memoizedProps!==a.pendingProps)dn=!0;else{if(!Ph(t,o)&&(a.flags&128)===0)return dn=!1,a_(t,a,o);dn=(t.flags&131072)!==0}else dn=!1,ht&&(a.flags&1048576)!==0&&Wy(a,Ll,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(t=uo(a.elementType),a.type=t,typeof t=="function")Up(t)?(c=fo(t,c),a.tag=1,a=gv(null,a,t,c,o)):(a.tag=0,a=Th(null,a,t,c,o));else{if(t!=null){var p=t.$$typeof;if(p===$){a.tag=11,a=cv(null,a,t,c,o);break e}else if(p===V){a.tag=14,a=uv(null,a,t,c,o);break e}}throw a=ke(t)||t,Error(r(306,a,""))}}return a;case 0:return Th(t,a,a.type,a.pendingProps,o);case 1:return c=a.type,p=fo(c,a.pendingProps),gv(t,a,c,p,o);case 3:e:{if(Ze(a,a.stateNode.containerInfo),t===null)throw Error(r(387));c=a.pendingProps;var y=a.memoizedState;p=y.element,nh(t,a),Ql(a,c,null,o);var w=a.memoizedState;if(c=w.cache,ls(a,cn,c),c!==y.cache&&Yp(a,[cn],o,!0),Fl(),c=w.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=y,a.memoizedState=y,a.flags&256){a=yv(t,a,c,o);break e}else if(c!==p){p=Sa(Error(r(424)),a),Ul(p),a=yv(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,Mt=Ca(t.firstChild),Cn=a,ht=!0,os=null,Aa=!0,o=mb(a,null,c,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(oo(),c===p){a=Ri(t,a,o);break e}Tn(t,a,c,o)}a=a.child}return a;case 26:return Yu(t,a),t===null?(o=Dx(a.type,null,a.pendingProps,null))?a.memoizedState=o:ht||(o=a.type,t=a.pendingProps,c=pd(ue.current).createElement(o),c[ln]=a,c[In]=t,En(c,o,t),tn(c),a.stateNode=c):a.memoizedState=Dx(a.type,t.memoizedProps,a.pendingProps,t.memoizedState),null;case 27:return Ct(a),t===null&&ht&&(c=a.stateNode=Tx(a.type,a.pendingProps,ue.current),Cn=a,Aa=!0,p=Mt,ws(a.type)?(gf=p,Mt=Ca(c.firstChild)):Mt=p),Tn(t,a,a.pendingProps.children,o),Yu(t,a),t===null&&(a.flags|=4194304),a.child;case 5:return t===null&&ht&&((p=c=Mt)&&(c=I_(c,a.type,a.pendingProps,Aa),c!==null?(a.stateNode=c,Cn=a,Mt=Ca(c.firstChild),Aa=!1,p=!0):p=!1),p||rs(a)),Ct(a),p=a.type,y=a.pendingProps,w=t!==null?t.memoizedProps:null,c=y.children,df(p,y)?c=null:w!==null&&df(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=ch(t,a,Q5,null,null,o),hc._currentValue=p),Yu(t,a),Tn(t,a,c,o),a.child;case 6:return t===null&&ht&&((t=o=Mt)&&(o=z_(o,a.pendingProps,Aa),o!==null?(a.stateNode=o,Cn=a,Mt=null,t=!0):t=!1),t||rs(a)),null;case 13:return bv(t,a,o);case 4:return Ze(a,a.stateNode.containerInfo),c=a.pendingProps,t===null?a.child=po(a,null,c,o):Tn(t,a,c,o),a.child;case 11:return cv(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,ls(a,a.type,c.value),Tn(t,a,c.children,o),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,lo(a),p=_n(p),c=c(p),a.flags|=1,Tn(t,a,c,o),a.child;case 14:return uv(t,a,a.type,a.pendingProps,o);case 15:return dv(t,a,a.type,a.pendingProps,o);case 19:return xv(t,a,o);case 31:return n_(t,a,o);case 22:return mv(t,a,o,a.pendingProps);case 24:return lo(a),c=_n(cn),t===null?(p=Wp(),p===null&&(p=zt,y=Xp(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=o),p=y),a.memoizedState={parent:c,cache:p},th(a),ls(a,cn,p)):((t.lanes&o)!==0&&(nh(t,a),Ql(a,null,null,o),Fl()),p=t.memoizedState,y=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),ls(a,cn,c)):(c=y.cache,ls(a,cn,c),c!==p.cache&&Yp(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 Di(t){t.flags|=4}function Mh(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(Qv())t.flags|=8192;else throw mo=Ou,eh}else t.flags&=-16777217}function Sv(t,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Mx(a))if(Qv())t.flags|=8192;else throw mo=Ou,eh}function Ju(t,a){a!==null&&(t.flags|=4),t.flags&16384&&(a=t.tag!==22?bi():536870912,t.lanes|=a,Nr|=a)}function ec(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 qt(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 i_(t,a,o){var c=a.pendingProps;switch(Gp(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(a),null;case 1:return qt(a),null;case 3:return o=a.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),_i(cn),Ee(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(t===null||t.child===null)&&(pr(a)?Di(a):t===null||t.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Fp())),qt(a),null;case 26:var p=a.type,y=a.memoizedState;return t===null?(Di(a),y!==null?(qt(a),Sv(a,y)):(qt(a),Mh(a,p,null,c,o))):y?y!==t.memoizedState?(Di(a),qt(a),Sv(a,y)):(qt(a),a.flags&=-16777217):(t=t.memoizedProps,t!==c&&Di(a),qt(a),Mh(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&&Di(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return qt(a),null}t=pe.current,pr(a)?tb(a):(t=Tx(p,c,o),a.stateNode=t,Di(a))}return qt(a),null;case 5:if(me(a),p=a.type,t!==null&&a.stateNode!=null)t.memoizedProps!==c&&Di(a);else{if(!c){if(a.stateNode===null)throw Error(r(166));return qt(a),null}if(y=pe.current,pr(a))tb(a);else{var w=pd(ue.current);switch(y){case 1:y=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=w.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof c.is=="string"?w.createElement("select",{is:c.is}):w.createElement("select"),c.multiple?y.multiple=!0:c.size&&(y.size=c.size);break;default:y=typeof c.is=="string"?w.createElement(p,{is:c.is}):w.createElement(p)}}y[ln]=a,y[In]=c;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)y.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=y;e:switch(En(y,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&&Di(a)}}return qt(a),Mh(a,a.type,t===null?null:t.memoizedProps,a.pendingProps,o),null;case 6:if(t&&a.stateNode!=null)t.memoizedProps!==c&&Di(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(r(166));if(t=ue.current,pr(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||bx(t.nodeValue,o)),t||rs(a,!0)}else t=pd(t).createTextNode(c),t[ln]=a,a.stateNode=t}return qt(a),null;case 31:if(o=a.memoizedState,t===null||t.memoizedState!==null){if(c=pr(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 oo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),t=!1}else o=Fp(),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 qt(a),null;case 13:if(c=a.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(p=pr(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 oo(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;qt(a),p=!1}else p=Fp(),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),y=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(y=c.memoizedState.cachePool.pool),y!==p&&(c.flags|=2048)),o!==t&&o&&(a.child.flags|=8192),Ju(a,a.updateQueue),qt(a),null);case 4:return Ee(),t===null&&of(a.stateNode.containerInfo),qt(a),null;case 10:return _i(a.type),qt(a),null;case 19:if(qe(nn),c=a.memoizedState,c===null)return qt(a),null;if(p=(a.flags&128)!==0,y=c.rendering,y===null)if(p)ec(c,!1);else{if(en!==0||t!==null&&(t.flags&128)!==0)for(t=a.child;t!==null;){if(y=Bu(t),y!==null){for(a.flags|=128,ec(c,!1),t=y.updateQueue,a.updateQueue=t,Ju(a,t),a.subtreeFlags=0,t=o,o=a.child;o!==null;)Yy(o,t),o=o.sibling;return we(nn,nn.current&1|2),ht&&Ni(a,c.treeForkCount),a.child}t=t.sibling}c.tail!==null&&Vt()>ad&&(a.flags|=128,p=!0,ec(c,!1),a.lanes=4194304)}else{if(!p)if(t=Bu(y),t!==null){if(a.flags|=128,p=!0,t=t.updateQueue,a.updateQueue=t,Ju(a,t),ec(c,!0),c.tail===null&&c.tailMode==="hidden"&&!y.alternate&&!ht)return qt(a),null}else 2*Vt()-c.renderingStartTime>ad&&o!==536870912&&(a.flags|=128,p=!0,ec(c,!1),a.lanes=4194304);c.isBackwards?(y.sibling=a.child,a.child=y):(t=c.last,t!==null?t.sibling=y:a.child=y,c.last=y)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=Vt(),t.sibling=null,o=nn.current,we(nn,p?o&1|2:o&1),ht&&Ni(a,c.treeForkCount),t):(qt(a),null);case 22:case 23:return la(a),oh(),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&&(qt(a),a.subtreeFlags&6&&(a.flags|=8192)):qt(a),o=a.updateQueue,o!==null&&Ju(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&&qe(co),null;case 24:return o=null,t!==null&&(o=t.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),_i(cn),qt(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function s_(t,a){switch(Gp(a),a.tag){case 1:return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 3:return _i(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));oo()}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));oo()}return t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 19:return qe(nn),null;case 4:return Ee(),null;case 10:return _i(a.type),null;case 22:case 23:return la(a),oh(),t!==null&&qe(co),t=a.flags,t&65536?(a.flags=t&-65537|128,a):null;case 24:return _i(cn),null;case 25:return null;default:return null}}function kv(t,a){switch(Gp(a),a.tag){case 3:_i(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:qe(nn);break;case 10:_i(a.type);break;case 22:case 23:la(a),oh(),t!==null&&qe(co);break;case 24:_i(cn)}}function tc(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 y=o.create,w=o.inst;c=y(),w.destroy=c}o=o.next}while(o!==p)}}catch(A){Tt(a,a.return,A)}}function hs(t,a,o){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var y=p.next;c=y;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!==y)}}catch(ee){Tt(a,a.return,ee)}}function jv(t){var a=t.updateQueue;if(a!==null){var o=t.stateNode;try{hb(a,o)}catch(c){Tt(t,t.return,c)}}}function Av(t,a,o){o.props=fo(t.type,t.memoizedProps),o.state=t.memoizedState;try{o.componentWillUnmount()}catch(c){Tt(t,a,c)}}function nc(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 oi(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 Nv(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 qh(t,a,o){try{var c=t.stateNode;C_(c,t.type,o,a),c[In]=a}catch(p){Tt(t,t.return,p)}}function Cv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&ws(t.type)||t.tag===4}function Bh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Cv(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&&ws(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 Lh(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=La));else if(c!==4&&(c===27&&ws(t.type)&&(o=t.stateNode,a=null),t=t.child,t!==null))for(Lh(t,a,o),t=t.sibling;t!==null;)Lh(t,a,o),t=t.sibling}function Wu(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&&ws(t.type)&&(o=t.stateNode),t=t.child,t!==null))for(Wu(t,a,o),t=t.sibling;t!==null;)Wu(t,a,o),t=t.sibling}function _v(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[In]=o}catch(y){Tt(t,t.return,y)}}var Ii=!1,mn=!1,Uh=!1,Tv=typeof WeakSet=="function"?WeakSet:Set,wn=null;function o_(t,a){if(t=t.containerInfo,cf=xd,t=Uy(t),zp(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,y=c.focusNode;c=c.focusOffset;try{o.nodeType,y.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!==y||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===y&&++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(uf={focusedElem:t,selectionRange:o},xd=!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,y=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&&y!==null){t=void 0,o=a,p=y.memoizedProps,y=y.memoizedState,c=o.stateNode;try{var Te=fo(o.type,p);t=c.getSnapshotBeforeUpdate(Te,y),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)pf(t);else if(o===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":pf(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 Ev(t,a,o){var c=o.flags;switch(o.tag){case 0:case 11:case 15:Oi(t,o),c&4&&tc(5,o);break;case 1:if(Oi(t,o),c&4)if(t=o.stateNode,a===null)try{t.componentDidMount()}catch(w){Tt(o,o.return,w)}else{var p=fo(o.type,a.memoizedProps);a=a.memoizedState;try{t.componentDidUpdate(p,a,t.__reactInternalSnapshotBeforeUpdate)}catch(w){Tt(o,o.return,w)}}c&64&&jv(o),c&512&&nc(o,o.return);break;case 3:if(Oi(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{hb(t,a)}catch(w){Tt(o,o.return,w)}}break;case 27:a===null&&c&4&&_v(o);case 26:case 5:Oi(t,o),a===null&&c&4&&Nv(o),c&512&&nc(o,o.return);break;case 12:Oi(t,o);break;case 31:Oi(t,o),c&4&&Iv(t,o);break;case 13:Oi(t,o),c&4&&zv(t,o),c&64&&(t=o.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(o=f_.bind(null,o),O_(t,o))));break;case 22:if(c=o.memoizedState!==null||Ii,!c){a=a!==null&&a.memoizedState!==null||mn,p=Ii;var y=mn;Ii=c,(mn=a)&&!y?Pi(t,o,(o.subtreeFlags&8772)!==0):Oi(t,o),Ii=p,mn=y}break;case 30:break;default:Oi(t,o)}}function Rv(t){var a=t.alternate;a!==null&&(t.alternate=null,Rv(a)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(a=t.stateNode,a!==null&&xl(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;)Dv(t,a,o),o=o.sibling}function Dv(t,a,o){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(xn,o)}catch{}switch(o.tag){case 26:mn||oi(o,a),zi(t,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:mn||oi(o,a);var c=$t,p=Hn;ws(o.type)&&($t=o.stateNode,Hn=!1),zi(t,a,o),dc(o.stateNode),$t=c,Hn=p;break;case 5:mn||oi(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(y){Tt(o,a,y)}else try{$t.removeChild(o.stateNode)}catch(y){Tt(o,a,y)}break;case 18:$t!==null&&(Hn?(t=$t,jx(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,o.stateNode),zr(t)):jx($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:hs(2,o,a),mn||hs(4,o,a),zi(t,a,o);break;case 1:mn||(oi(o,a),c=o.stateNode,typeof c.componentWillUnmount=="function"&&Av(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 Iv(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 zv(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 r_(t){switch(t.tag){case 31:case 13:case 19:var a=t.stateNode;return a===null&&(a=t.stateNode=new Tv),a;case 22:return t=t.stateNode,a=t._retryCache,a===null&&(a=t._retryCache=new Tv),a;default:throw Error(r(435,t.tag))}}function ed(t,a){var o=r_(t);a.forEach(function(c){if(!o.has(c)){o.add(c);var p=g_.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],y=t,w=a,A=w;e:for(;A!==null;){switch(A.tag){case 27:if(ws(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));Dv(y,w,p),$t=null,Hn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Ov(a,t),a=a.sibling}var $a=null;function Ov(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&&(hs(3,t,t.return),tc(3,t),hs(5,t,t.return));break;case 1:Fn(a,t),Qn(t),c&512&&(mn||o===null||oi(o,o.return)),c&64&&Ii&&(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=$a;if(Fn(a,t),Qn(t),c&512&&(mn||o===null||oi(o,o.return)),c&4){var y=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":y=p.getElementsByTagName("title")[0],(!y||y[Ji]||y[ln]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(c),p.head.insertBefore(y,p.querySelector("head > title"))),En(y,c,o),y[ln]=t,tn(y),c=y;break e;case"link":var w=Ox("link","href",p).get(c+(o.href||""));if(w){for(var A=0;A<w.length;A++)if(y=w[A],y.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&y.getAttribute("rel")===(o.rel==null?null:o.rel)&&y.getAttribute("title")===(o.title==null?null:o.title)&&y.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(A,1);break t}}y=p.createElement(c),En(y,c,o),p.head.appendChild(y);break;case"meta":if(w=Ox("meta","content",p).get(c+(o.content||""))){for(A=0;A<w.length;A++)if(y=w[A],y.getAttribute("content")===(o.content==null?null:""+o.content)&&y.getAttribute("name")===(o.name==null?null:o.name)&&y.getAttribute("property")===(o.property==null?null:o.property)&&y.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&y.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(A,1);break t}}y=p.createElement(c),En(y,c,o),p.head.appendChild(y);break;default:throw Error(r(468,c))}y[ln]=t,tn(y),c=y}t.stateNode=c}else Px(p,t.type,t.stateNode);else t.stateNode=zx(p,c,t.memoizedProps);else y!==c?(y===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):y.count--,c===null?Px(p,t.type,t.stateNode):zx(p,c,t.memoizedProps)):c===null&&t.stateNode!==null&&qh(t,t.memoizedProps,o.memoizedProps)}break;case 27:Fn(a,t),Qn(t),c&512&&(mn||o===null||oi(o,o.return)),o!==null&&c&4&&qh(t,t.memoizedProps,o.memoizedProps);break;case 5:if(Fn(a,t),Qn(t),c&512&&(mn||o===null||oi(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,qh(t,p,o!==null?o.memoizedProps:p)),c&1024&&(Uh=!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(gd=null,p=$a,$a=hd(a.containerInfo),Fn(a,t),$a=p,Qn(t),c&4&&o!==null&&o.memoizedState.isDehydrated)try{zr(a.containerInfo)}catch(Te){Tt(t,t.return,Te)}Uh&&(Uh=!1,Pv(t));break;case 4:c=$a,$a=hd(t.stateNode.containerInfo),Fn(a,t),Qn(t),$a=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,ed(t,c)));break;case 13:Fn(a,t),Qn(t),t.child.flags&8192&&t.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(nd=Vt()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,ed(t,c)));break;case 22:p=t.memoizedState!==null;var D=o!==null&&o.memoizedState!==null,G=Ii,ee=mn;if(Ii=G||p,mn=ee||D,Fn(a,t),mn=ee,Ii=G,Qn(t),c&8192)e:for(a=t.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||D||Ii||mn||go(t)),o=null,a=t;;){if(a.tag===5||a.tag===26){if(o===null){D=o=a;try{if(y=D.stateNode,p)w=y.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?Ax(Y,!0):Ax(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,ed(t,o))));break;case 19:Fn(a,t),Qn(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,ed(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(Cv(c)){o=c;break}c=c.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var p=o.stateNode,y=Bh(t);Wu(t,y,p);break;case 5:var w=o.stateNode;o.flags&32&&(ba(w,""),o.flags&=-33);var A=Bh(t);Wu(t,A,w);break;case 3:case 4:var D=o.stateNode.containerInfo,G=Bh(t);Lh(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 Pv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var a=t;Pv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),t=t.sibling}}function Oi(t,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Ev(t,a.alternate,a),a=a.sibling}function go(t){for(t=t.child;t!==null;){var a=t;switch(a.tag){case 0:case 11:case 14:case 15:hs(4,a,a.return),go(a);break;case 1:oi(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Av(a,a.return,o),go(a);break;case 27:dc(a.stateNode);case 26:case 5:oi(a,a.return),go(a);break;case 22:a.memoizedState===null&&go(a);break;case 30:go(a);break;default:go(a)}t=t.sibling}}function Pi(t,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=t,y=a,w=y.flags;switch(y.tag){case 0:case 11:case 15:Pi(p,y,o),tc(4,y);break;case 1:if(Pi(p,y,o),c=y,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(G){Tt(c,c.return,G)}if(c=y,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++)pb(D[p],A)}catch(G){Tt(c,c.return,G)}}o&&w&64&&jv(y),nc(y,y.return);break;case 27:_v(y);case 26:case 5:Pi(p,y,o),o&&c===null&&w&4&&Nv(y),nc(y,y.return);break;case 12:Pi(p,y,o);break;case 31:Pi(p,y,o),o&&w&4&&Iv(p,y);break;case 13:Pi(p,y,o),o&&w&4&&zv(p,y);break;case 22:y.memoizedState===null&&Pi(p,y,o),nc(y,y.return);break;case 30:break;default:Pi(p,y,o)}a=a.sibling}}function Vh(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&&Vl(o))}function $h(t,a){t=null,a.alternate!==null&&(t=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==t&&(a.refCount++,t!=null&&Vl(t))}function Ka(t,a,o,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Mv(t,a,o,c),a=a.sibling}function Mv(t,a,o,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Ka(t,a,o,c),p&2048&&tc(9,a);break;case 1:Ka(t,a,o,c);break;case 3:Ka(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&&Vl(t)));break;case 12:if(p&2048){Ka(t,a,o,c),t=a.stateNode;try{var y=a.memoizedProps,w=y.id,A=y.onPostCommit;typeof A=="function"&&A(w,a.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(D){Tt(a,a.return,D)}}else Ka(t,a,o,c);break;case 31:Ka(t,a,o,c);break;case 13:Ka(t,a,o,c);break;case 23:break;case 22:y=a.stateNode,w=a.alternate,a.memoizedState!==null?y._visibility&2?Ka(t,a,o,c):ac(t,a):y._visibility&2?Ka(t,a,o,c):(y._visibility|=2,kr(t,a,o,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Vh(w,a);break;case 24:Ka(t,a,o,c),p&2048&&$h(a.alternate,a);break;default:Ka(t,a,o,c)}}function kr(t,a,o,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var y=t,w=a,A=o,D=c,G=w.flags;switch(w.tag){case 0:case 11:case 15:kr(y,w,A,D,p),tc(8,w);break;case 23:break;case 22:var ee=w.stateNode;w.memoizedState!==null?ee._visibility&2?kr(y,w,A,D,p):ac(y,w):(ee._visibility|=2,kr(y,w,A,D,p)),p&&G&2048&&Vh(w.alternate,w);break;case 24:kr(y,w,A,D,p),p&&G&2048&&$h(w.alternate,w);break;default:kr(y,w,A,D,p)}a=a.sibling}}function ac(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:ac(o,c),p&2048&&Vh(c.alternate,c);break;case 24:ac(o,c),p&2048&&$h(c.alternate,c);break;default:ac(o,c)}a=a.sibling}}var ic=8192;function jr(t,a,o){if(t.subtreeFlags&ic)for(t=t.child;t!==null;)qv(t,a,o),t=t.sibling}function qv(t,a,o){switch(t.tag){case 26:jr(t,a,o),t.flags&ic&&t.memoizedState!==null&&F_(o,$a,t.memoizedState,t.memoizedProps);break;case 5:jr(t,a,o);break;case 3:case 4:var c=$a;$a=hd(t.stateNode.containerInfo),jr(t,a,o),$a=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ic,ic=16777216,jr(t,a,o),ic=c):jr(t,a,o));break;default:jr(t,a,o)}}function Bv(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 sc(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,Uv(c,t)}Bv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lv(t),t=t.sibling}function Lv(t){switch(t.tag){case 0:case 11:case 15:sc(t),t.flags&2048&&hs(9,t,t.return);break;case 3:sc(t);break;case 12:sc(t);break;case 22:var a=t.stateNode;t.memoizedState!==null&&a._visibility&2&&(t.return===null||t.return.tag!==13)?(a._visibility&=-3,td(t)):sc(t);break;default:sc(t)}}function td(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,Uv(c,t)}Bv(t)}for(t=t.child;t!==null;){switch(a=t,a.tag){case 0:case 11:case 15:hs(8,a,a.return),td(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,td(a));break;default:td(a)}t=t.sibling}}function Uv(t,a){for(;wn!==null;){var o=wn;switch(o.tag){case 0:case 11:case 15:hs(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:Vl(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,y=c.return;if(Rv(c),c===o){wn=null;break e}if(p!==null){p.return=y,wn=p;break e}wn=y}}}var l_={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}},c_=typeof WeakMap=="function"?WeakMap:Map,jt=0,zt=null,rt=null,ut=0,_t=0,ca=null,fs=!1,Ar=!1,Kh=!1,Mi=0,en=0,gs=0,yo=0,Gh=0,ua=0,Nr=0,oc=null,Zn=null,Hh=!1,nd=0,Vv=0,ad=1/0,id=null,ys=null,hn=0,bs=null,Cr=null,qi=0,Fh=0,Qh=null,$v=null,rc=0,Zh=null;function da(){return(jt&2)!==0&&ut!==0?ut&-ut:B.T!==null?tf():Jo()}function Kv(){if(ua===0)if((ut&536870912)===0||ht){var t=Ie;Ie<<=1,(Ie&3932160)===0&&(Ie=262144),ua=t}else ua=536870912;return t=ra.current,t!==null&&(t.flags|=32),ua}function Yn(t,a,o){(t===zt&&(_t===2||_t===9)||t.cancelPendingCommit!==null)&&(_r(t,0),vs(t,ut,ua,!1)),Xs(t,o),((jt&2)===0||t!==zt)&&(t===zt&&((jt&2)===0&&(yo|=o),en===4&&vs(t,ut,ua,!1)),ri(t))}function Gv(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?m_(t,a):Xh(t,a,!0),y=c;do{if(p===0){Ar&&!c&&vs(t,a,0,!1);break}else{if(o=t.current.alternate,y&&!u_(o)){p=Xh(t,a,!1),y=!1;continue}if(p===2){if(y=a,t.errorRecoveryDisabledLanes&y)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=oc;var D=A.current.memoizedState.isDehydrated;if(D&&(_r(A,w).flags|=256),w=Xh(A,w,!1),w!==2){if(Kh&&!D){A.errorRecoveryDisabledLanes|=y,yo|=y,p=4;break e}y=Zn,Zn=p,y!==null&&(Zn===null?Zn=y:Zn.push.apply(Zn,y))}p=w}if(y=!1,p!==2)continue}}if(p===1){_r(t,0),vs(t,a,0,!0);break}e:{switch(c=t,y=p,y){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:vs(c,a,ua,!fs);break e;case 2:Zn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(p=nd+300-Vt(),10<p)){if(vs(c,a,ua,!fs),et(c,0,!0)!==0)break e;qi=a,c.timeoutHandle=Sx(Hv.bind(null,c,o,Zn,id,Hh,a,ua,yo,Nr,fs,y,"Throttled",-0,0),p);break e}Hv(c,o,Zn,id,Hh,a,ua,yo,Nr,fs,y,null,-0,0)}}break}while(!0);ri(t)}function Hv(t,a,o,c,p,y,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:La},qv(a,y,ie);var Te=(y&62914560)===y?nd-Vt():(y&4194048)===y?Vv-Vt():0;if(Te=Q_(ie,Te),Te!==null){qi=y,t.cancelPendingCommit=Te(ex.bind(null,t,a,y,o,c,p,w,A,D,ee,ie,null,F,Y)),vs(t,y,w,!G);return}}ex(t,a,y,o,c,p,w,A,D)}function u_(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],y=p.getSnapshot;p=p.value;try{if(!sa(y(),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 vs(t,a,o,c){a&=~Gh,a&=~yo,t.suspendedLanes|=a,t.pingedLanes&=~a,c&&(t.warmLanes|=a),c=t.expirationTimes;for(var p=a;0<p;){var y=31-Zt(p),w=1<<y;c[y]=-1,p&=~w}o!==0&&fl(t,o,a)}function sd(){return(jt&6)===0?(lc(0),!1):!0}function Yh(){if(rt!==null){if(_t===0)var t=rt.return;else t=rt,Ci=ro=null,mh(t),br=null,Kl=0,t=rt;for(;t!==null;)kv(t.alternate,t),t=t.return;rt=null}}function _r(t,a){var o=t.timeoutHandle;o!==-1&&(t.timeoutHandle=-1,E_(o)),o=t.cancelPendingCommit,o!==null&&(t.cancelPendingCommit=null,o()),qi=0,Yh(),zt=t,rt=o=Ai(t.current,null),ut=a,_t=0,ca=null,fs=!1,Ar=kt(t,a),Kh=!1,Nr=ua=Gh=yo=gs=en=0,Zn=oc=null,Hh=!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),y=1<<p;a|=t[p],c&=~y}return Mi=a,Nu(),o}function Fv(t,a){nt=null,B.H=Jl,a===yr||a===zu?(a=cb(),_t=3):a===eh?(a=cb(),_t=4):_t=a===_h?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,ca=a,rt===null&&(en=1,Qu(t,Sa(a,t.current)))}function Qv(){var t=ra.current;return t===null?!0:(ut&4194048)===ut?Na===null:(ut&62914560)===ut||(ut&536870912)!==0?t===Na:!1}function Zv(){var t=B.H;return B.H=Jl,t===null?Jl:t}function Yv(){var t=B.A;return B.A=l_,t}function od(){en=4,fs||(ut&4194048)!==ut&&ra.current!==null||(Ar=!0),(gs&134217727)===0&&(yo&134217727)===0||zt===null||vs(zt,ut,ua,!1)}function Xh(t,a,o){var c=jt;jt|=2;var p=Zv(),y=Yv();(zt!==t||ut!==a)&&(id=null,_r(t,a)),a=!1;var w=en;e:do try{if(_t!==0&&rt!==null){var A=rt,D=ca;switch(_t){case 8:Yh(),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,Tr(t,A,D,G),o&&Ar){w=0;break e}break;default:G=_t,_t=0,ca=null,Tr(t,A,D,G)}}d_(),w=en;break}catch(ee){Fv(t,ee)}while(!0);return a&&t.shellSuspendCounter++,Ci=ro=null,jt=c,B.H=p,B.A=y,rt===null&&(zt=null,ut=0,Nu()),w}function d_(){for(;rt!==null;)Xv(rt)}function m_(t,a){var o=jt;jt|=2;var c=Zv(),p=Yv();zt!==t||ut!==a?(id=null,ad=Vt()+500,_r(t,a)):Ar=kt(t,a);e:do try{if(_t!==0&&rt!==null){a=rt;var y=ca;t:switch(_t){case 1:_t=0,ca=null,Tr(t,a,y,1);break;case 2:case 9:if(rb(y)){_t=0,ca=null,Jv(a);break}a=function(){_t!==2&&_t!==9||zt!==t||(_t=7),ri(t)},y.then(a,a);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:rb(y)?(_t=0,ca=null,Jv(a)):(_t=0,ca=null,Tr(t,a,y,7));break;case 5:var w=null;switch(rt.tag){case 26:w=rt.memoizedState;case 5:case 27:var A=rt;if(w?Mx(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,rd(G)):rt=null}break t}}_t=0,ca=null,Tr(t,a,y,5);break;case 6:_t=0,ca=null,Tr(t,a,y,6);break;case 8:Yh(),en=6;break e;default:throw Error(r(462))}}p_();break}catch(ee){Fv(t,ee)}while(!0);return Ci=ro=null,B.H=c,B.A=p,jt=o,rt!==null?0:(zt=null,ut=0,Nu(),en)}function p_(){for(;rt!==null&&!Qt();)Xv(rt)}function Xv(t){var a=wv(t.alternate,t,Mi);t.memoizedProps=t.pendingProps,a===null?rd(t):rt=a}function Jv(t){var a=t,o=a.alternate;switch(a.tag){case 15:case 0:a=fv(o,a,a.pendingProps,a.type,void 0,ut);break;case 11:a=fv(o,a,a.pendingProps,a.type.render,a.ref,ut);break;case 5:mh(a);default:kv(o,a),a=rt=Yy(a,Mi),a=wv(o,a,Mi)}t.memoizedProps=t.pendingProps,a===null?rd(t):rt=a}function Tr(t,a,o,c){Ci=ro=null,mh(a),br=null,Kl=0;var p=a.return;try{if(t_(t,p,a,o,ut)){en=1,Qu(t,Sa(o,t.current)),rt=null;return}}catch(y){if(p!==null)throw rt=p,y;en=1,Qu(t,Sa(o,t.current)),rt=null;return}a.flags&32768?(ht||c===1?t=!0:Ar||(ut&536870912)!==0?t=!1:(fs=t=!0,(c===2||c===9||c===3||c===6)&&(c=ra.current,c!==null&&c.tag===13&&(c.flags|=16384))),Wv(a,t)):rd(a)}function rd(t){var a=t;do{if((a.flags&32768)!==0){Wv(a,fs);return}t=a.return;var o=i_(a.alternate,a,Mi);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 Wv(t,a){do{var o=s_(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 ex(t,a,o,c,p,y,w,A,D){t.cancelPendingCommit=null;do ld();while(hn!==0);if((jt&6)!==0)throw Error(r(327));if(a!==null){if(a===t.current)throw Error(r(177));if(y=a.lanes|a.childLanes,y|=Bp,vu(t,o,y,w,A,D),t===zt&&(rt=zt=null,ut=0),Cr=a,bs=t,qi=o,Fh=y,Qh=p,$v=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,y_(Dn,function(){return sx(),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{o_(t,a,o)}finally{jt=w,W.p=p,B.T=c}}hn=1,tx(),nx(),ax()}}function tx(){if(hn===1){hn=0;var t=bs,a=Cr,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{Ov(a,t);var y=uf,w=Uy(t.containerInfo),A=y.focusedElem,D=y.selectionRange;if(w!==A&&A&&A.ownerDocument&&Ly(A.ownerDocument.documentElement,A)){if(D!==null&&zp(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),It=D.end===void 0?Qe:Math.min(D.end,Te);!Y.extend&&Qe>It&&(w=It,It=Qe,Qe=w);var U=By(A,Qe),O=By(A,It);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>It?(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}}xd=!!cf,uf=cf=null}finally{jt=p,W.p=c,B.T=o}}t.current=a,hn=2}}function nx(){if(hn===2){hn=0;var t=bs,a=Cr,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{Ev(t,a.alternate,a)}finally{jt=p,W.p=c,B.T=o}}hn=3}}function ax(){if(hn===4||hn===3){hn=0,Rn();var t=bs,a=Cr,o=qi,c=$v;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?hn=5:(hn=0,Cr=bs=null,ix(t,t.pendingLanes));var p=t.pendingLanes;if(p===0&&(ys=null),vl(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 y=t.onRecoverableError,w=0;w<c.length;w++){var A=c[w];y(A.value,{componentStack:A.stack})}}finally{B.T=a,W.p=p}}(qi&3)!==0&&ld(),ri(t),p=t.pendingLanes,(o&261930)!==0&&(p&42)!==0?t===Zh?rc++:(rc=0,Zh=t):rc=0,lc(0)}}function ix(t,a){(t.pooledCacheLanes&=a)===0&&(a=t.pooledCache,a!=null&&(t.pooledCache=null,Vl(a)))}function ld(){return tx(),nx(),ax(),sx()}function sx(){if(hn!==5)return!1;var t=bs,a=Fh;Fh=0;var o=vl(qi),c=B.T,p=W.p;try{W.p=32>o?32:o,B.T=null,o=Qh,Qh=null;var y=bs,w=qi;if(hn=0,Cr=bs=null,qi=0,(jt&6)!==0)throw Error(r(331));var A=jt;if(jt|=4,Lv(y.current),Mv(y,y.current,w,o),jt=A,lc(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(xn,y)}catch{}return!0}finally{W.p=p,B.T=c,ix(t,a)}}function ox(t,a,o){a=Sa(o,a),a=Ch(t.stateNode,a,2),t=ds(t,a,2),t!==null&&(Xs(t,2),ri(t))}function Tt(t,a,o){if(t.tag===3)ox(t,t,o);else for(;a!==null;){if(a.tag===3){ox(a,t,o);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ys===null||!ys.has(c))){t=Sa(o,t),o=rv(2),c=ds(a,o,2),c!==null&&(lv(o,c,a,t),Xs(c,2),ri(c));break}}a=a.return}}function Jh(t,a,o){var c=t.pingCache;if(c===null){c=t.pingCache=new c_;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)||(Kh=!0,p.add(o),t=h_.bind(null,t,a,o),a.then(t,t))}function h_(t,a,o){var c=t.pingCache;c!==null&&c.delete(a),t.pingedLanes|=t.suspendedLanes&o,t.warmLanes&=~o,zt===t&&(ut&o)===o&&(en===4||en===3&&(ut&62914560)===ut&&300>Vt()-nd?(jt&2)===0&&_r(t,0):Gh|=o,Nr===ut&&(Nr=0)),ri(t)}function rx(t,a){a===0&&(a=bi()),t=io(t,a),t!==null&&(Xs(t,a),ri(t))}function f_(t){var a=t.memoizedState,o=0;a!==null&&(o=a.retryLane),rx(t,o)}function g_(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),rx(t,o)}function y_(t,a){return ct(t,a)}var cd=null,Er=null,Wh=!1,ud=!1,ef=!1,xs=0;function ri(t){t!==Er&&t.next===null&&(Er===null?cd=Er=t:Er=Er.next=t),ud=!0,Wh||(Wh=!0,v_())}function lc(t,a){if(!ef&&ud){ef=!0;do for(var o=!1,c=cd;c!==null;){if(t!==0){var p=c.pendingLanes;if(p===0)var y=0;else{var w=c.suspendedLanes,A=c.pingedLanes;y=(1<<31-Zt(42|t)+1)-1,y&=p&~(w&~A),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(o=!0,dx(c,y))}else y=ut,y=et(c,c===zt?y:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(y&3)===0||kt(c,y)||(o=!0,dx(c,y));c=c.next}while(o);ef=!1}}function b_(){lx()}function lx(){ud=Wh=!1;var t=0;xs!==0&&T_()&&(t=xs);for(var a=Vt(),o=null,c=cd;c!==null;){var p=c.next,y=cx(c,a);y===0?(c.next=null,o===null?cd=p:o.next=p,p===null&&(Er=o)):(o=c,(t!==0||(y&3)!==0)&&(ud=!0)),c=p}hn!==0&&hn!==5||lc(t),xs!==0&&(xs=0)}function cx(t,a){for(var o=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var w=31-Zt(y),A=1<<w,D=p[w];D===-1?((A&o)===0||(A&c)!==0)&&(p[w]=rn(A,a)):D<=a&&(t.expiredLanes|=A),y&=~A}if(a=zt,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),vl(o)){case 2:case 8:o=gi;break;case 32:o=Dn;break;case 268435456:o=Qs;break;default:o=Dn}return c=ux.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 ux(t,a){if(hn!==0&&hn!==5)return t.callbackNode=null,t.callbackPriority=0,null;var o=t.callbackNode;if(ld()&&t.callbackNode!==o)return null;var c=ut;return c=et(t,t===zt?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Gv(t,c,a),cx(t,Vt()),t.callbackNode!=null&&t.callbackNode===o?ux.bind(null,t):null)}function dx(t,a){if(ld())return null;Gv(t,a,!0)}function v_(){R_(function(){(jt&6)!==0?ct(Fs,b_):lx()})}function tf(){if(xs===0){var t=fr;t===0&&(t=oe,oe<<=1,(oe&261888)===0&&(oe=256)),xs=t}return xs}function mx(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:ir(""+t)}function px(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 x_(t,a,o,c,p){if(a==="submit"&&o&&o.stateNode===p){var y=mx((p[In]||null).action),w=c.submitter;w&&(a=(a=w[In]||null)?mx(a.formAction):w.getAttribute("formAction"),a!==null&&(y=a,w=null));var A=new ai("action","action",null,c,p);t.push({event:A,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(xs!==0){var D=w?px(p,w):new FormData(p);wh(o,{pending:!0,data:D,method:p.method,action:y},null,D)}}else typeof y=="function"&&(A.preventDefault(),D=w?px(p,w):new FormData(p),wh(o,{pending:!0,data:D,method:p.method,action:y},y,D))},currentTarget:p}]})}}for(var nf=0;nf<qp.length;nf++){var af=qp[nf],w_=af.toLowerCase(),S_=af[0].toUpperCase()+af.slice(1);Va(w_,"on"+S_)}Va(Ky,"onAnimationEnd"),Va(Gy,"onAnimationIteration"),Va(Hy,"onAnimationStart"),Va("dblclick","onDoubleClick"),Va("focusin","onFocus"),Va("focusout","onBlur"),Va(q5,"onTransitionRun"),Va(B5,"onTransitionStart"),Va(L5,"onTransitionCancel"),Va(Fy,"onTransitionEnd"),Js("onMouseEnter",["mouseout","mouseover"]),Js("onMouseLeave",["mouseout","mouseover"]),Js("onPointerEnter",["pointerout","pointerover"]),Js("onPointerLeave",["pointerout","pointerover"]),Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cc="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(" "),k_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cc));function hx(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 y=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!==y&&p.isPropagationStopped())break e;y=A,p.currentTarget=G;try{y(p)}catch(ee){Au(ee)}p.currentTarget=null,y=D}else for(w=0;w<c.length;w++){if(A=c[w],D=A.instance,G=A.currentTarget,A=A.listener,D!==y&&p.isPropagationStopped())break e;y=A,p.currentTarget=G;try{y(p)}catch(ee){Au(ee)}p.currentTarget=null,y=D}}}}function lt(t,a){var o=a[Wo];o===void 0&&(o=a[Wo]=new Set);var c=t+"__bubble";o.has(c)||(fx(a,t,2,!1),o.add(c))}function sf(t,a,o){var c=0;a&&(c|=4),fx(o,t,c,a)}var dd="_reactListening"+Math.random().toString(36).slice(2);function of(t){if(!t[dd]){t[dd]=!0,wl.forEach(function(o){o!=="selectionchange"&&(k_.has(o)||sf(o,!1,t),sf(o,!0,t))});var a=t.nodeType===9?t:t.ownerDocument;a===null||a[dd]||(a[dd]=!0,sf("selectionchange",!1,a))}}function fx(t,a,o,c){switch(Kx(a)){case 2:var p=X_;break;case 8:p=J_;break;default:p=wf}o=p.bind(null,a,o,t),p=void 0,!Rl||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 rf(t,a,o,c,p){var y=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=vi(A),w===null)return;if(D=w.tag,D===5||D===6||D===26||D===27){c=y=w;continue e}A=A.parentNode}}c=c.return}El(function(){var G=y,ee=_l(o),ie=[];e:{var F=Qy.get(t);if(F!==void 0){var Y=ai,Te=t;switch(t){case"keypress":if(is(o)===0)break e;case"keydown":case"keyup":Y=g5;break;case"focusin":Te="focus",Y=Tp;break;case"focusout":Te="blur",Y=Tp;break;case"beforeblur":case"afterblur":Y=Tp;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=ky;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=i5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=v5;break;case Ky:case Gy:case Hy:Y=r5;break;case Fy:Y=w5;break;case"scroll":case"scrollend":Y=n5;break;case"wheel":Y=k5;break;case"copy":case"cut":case"paste":Y=c5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=Ay;break;case"toggle":case"beforetoggle":Y=A5}var Qe=(a&4)!==0,It=!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=eo(O,U),ne!=null&&Qe.push(uc(O,ne,K))),It)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!==Cl&&(Te=o.relatedTarget||o.fromElement)&&(vi(Te)||Te[Xi]))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?vi(Te):null,Te!==null&&(It=h(Te),Qe=Te.tag,Te!==It||Qe!==5&&Qe!==27&&Qe!==6)&&(Te=null)):(Y=null,Te=G),Y!==Te)){if(Qe=ky,ne="onMouseLeave",U="onMouseEnter",O="mouse",(t==="pointerout"||t==="pointerover")&&(Qe=Ay,ne="onPointerLeave",U="onPointerEnter",O="pointer"),It=Y==null?F:es(Y),K=Te==null?F:es(Te),F=new Qe(ne,O+"leave",Y,o,ee),F.target=It,F.relatedTarget=K,ne=null,vi(ee)===G&&(Qe=new Qe(U,O+"enter",Te,o,ee),Qe.target=K,Qe.relatedTarget=It,ne=Qe),It=ne,Y&&Te)t:{for(Qe=j_,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&&gx(ie,F,Y,Qe,!1),Te!==null&&It!==null&&gx(ie,It,Te,Qe,!0)}}e:{if(F=G?es(G):window,Y=F.nodeName&&F.nodeName.toLowerCase(),Y==="select"||Y==="input"&&F.type==="file")var xt=Iy;else if(Ry(F))if(zy)xt=O5;else{xt=I5;var ze=D5}else Y=F.nodeName,!Y||Y.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?G&&Ba(G.elementType)&&(xt=Iy):xt=z5;if(xt&&(xt=xt(t,G))){Dy(ie,xt,o,ee);break e}ze&&ze(t,F,G),t==="focusout"&&G&&F.type==="number"&&G.memoizedProps.value!=null&&nr(F,"number",F.value)}switch(ze=G?es(G):window,t){case"focusin":(Ry(ze)||ze.contentEditable==="true")&&(rr=ze,Op=G,Bl=null);break;case"focusout":Bl=Op=rr=null;break;case"mousedown":Pp=!0;break;case"contextmenu":case"mouseup":case"dragend":Pp=!1,Vy(ie,o,ee);break;case"selectionchange":if(M5)break;case"keydown":case"keyup":Vy(ie,o,ee)}var it;if(Rp)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 or?Ty(t,o)&&(dt="onCompositionEnd"):t==="keydown"&&o.keyCode===229&&(dt="onCompositionStart");dt&&(Ny&&o.locale!=="ko"&&(or||dt!=="onCompositionStart"?dt==="onCompositionEnd"&&or&&(it=ki()):(ni=ee,H="value"in ni?ni.value:ni.textContent,or=!0)),ze=md(G,dt),0<ze.length&&(dt=new jy(dt,t,null,o,ee),ie.push({event:dt,listeners:ze}),it?dt.data=it:(it=Ey(o),it!==null&&(dt.data=it)))),(it=C5?_5(t,o):T5(t,o))&&(dt=md(G,"onBeforeInput"),0<dt.length&&(ze=new jy("onBeforeInput","beforeinput",null,o,ee),ie.push({event:ze,listeners:dt}),ze.data=it)),x_(ie,t,G,o,ee)}hx(ie,a)})}function uc(t,a,o){return{instance:t,listener:a,currentTarget:o}}function md(t,a){for(var o=a+"Capture",c=[];t!==null;){var p=t,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=eo(t,o),p!=null&&c.unshift(uc(t,p,y)),p=eo(t,a),p!=null&&c.push(uc(t,p,y))),t.tag===3)return c;t=t.return}return[]}function j_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function gx(t,a,o,c,p){for(var y=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=eo(o,y),G!=null&&w.unshift(uc(o,G,D))):p||(G=eo(o,y),G!=null&&w.push(uc(o,G,D)))),o=o.return}w.length!==0&&t.push({event:a,listeners:w})}var A_=/\r\n?/g,N_=/\u0000|\uFFFD/g;function yx(t){return(typeof t=="string"?t:""+t).replace(A_,`
10
- `).replace(N_,"")}function bx(t,a){return a=yx(a),yx(t)===a}function Dt(t,a,o,c,p,y){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":Ws(t,"class",c);break;case"tabIndex":Ws(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Ws(t,o,c);break;case"style":ti(t,c,y);break;case"data":if(a!=="object"){Ws(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=ir(""+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 y=="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=ir(""+c),t.setAttribute(o,c);break;case"onClick":c!=null&&(t.onclick=La);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=ir(""+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),xi(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":xi(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=ar.get(o)||o,xi(t,o,c))}}function lf(t,a,o,c,p,y){switch(o){case"style":ti(t,c,y);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=La);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sl.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),y=t[In]||null,y=y!=null?y[o]:null,typeof y=="function"&&t.removeEventListener(a,y,p),typeof c=="function")){typeof y!="function"&&y!==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,""):xi(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,y;for(y in o)if(o.hasOwnProperty(y)){var w=o[y];if(w!=null)switch(y){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Dt(t,a,y,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=y=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":y=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)}}Nl(t,y,A,D,G,w,p,!1);return;case"select":lt("invalid",t),c=w=y=null;for(p in o)if(o.hasOwnProperty(p)&&(A=o[p],A!=null))switch(p){case"value":y=A;break;case"defaultValue":w=A;break;case"multiple":c=A;default:Dt(t,a,p,A,o,null)}a=y,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),y=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":y=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(91));break;default:Dt(t,a,w,A,o,null)}wi(t,c,p,y);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<cc.length;c++)lt(cc[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(Ba(a)){for(ee in o)o.hasOwnProperty(ee)&&(c=o[ee],c!==void 0&&lf(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 C_(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,y=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":y=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)}}tr(t,w,A,D,G,ee,y,p);return;case"select":Y=w=A=F=null;for(y in o)if(D=o[y],o.hasOwnProperty(y)&&D!=null)switch(y){case"value":break;case"multiple":Y=D;default:c.hasOwnProperty(y)||Dt(t,a,y,null,c,D)}for(p in c)if(y=c[p],D=o[p],c.hasOwnProperty(p)&&(y!=null||D!=null))switch(p){case"value":F=y;break;case"defaultValue":A=y;break;case"multiple":w=y;default:y!==D&&Dt(t,a,p,y,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],y=o[w],c.hasOwnProperty(w)&&(p!=null||y!=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!==y&&Dt(t,a,w,p,c,y)}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(Ba(a)){for(var It in o)F=o[It],o.hasOwnProperty(It)&&F!==void 0&&!c.hasOwnProperty(It)&&lf(t,a,It,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||lf(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 vx(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function __(){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],y=p.transferSize,w=p.initiatorType,A=p.duration;if(y&&A&&vx(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&&vx(ie)&&(D=D.responseEnd,w+=ee*(D<A?1:(A-G)/(D-G)))}if(--c,a+=8*(y+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 cf=null,uf=null;function pd(t){return t.nodeType===9?t:t.ownerDocument}function xx(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 wx(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 df(t,a){return t==="textarea"||t==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var mf=null;function T_(){var t=window.event;return t&&t.type==="popstate"?t===mf?!1:(mf=t,!0):(mf=null,!1)}var Sx=typeof setTimeout=="function"?setTimeout:void 0,E_=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,R_=typeof queueMicrotask=="function"?queueMicrotask:typeof kx<"u"?function(t){return kx.resolve(null).then(t).catch(D_)}:Sx;function D_(t){setTimeout(function(){throw t})}function ws(t){return t==="head"}function jx(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")dc(t.ownerDocument.documentElement);else if(o==="head"){o=t.ownerDocument.head,dc(o);for(var y=o.firstChild;y;){var w=y.nextSibling,A=y.nodeName;y[Ji]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&y.rel.toLowerCase()==="stylesheet"||o.removeChild(y),y=w}}else o==="body"&&dc(t.ownerDocument.body);o=p}while(o);zr(a)}function Ax(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 pf(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":pf(o),xl(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}t.removeChild(o)}}function I_(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[Ji])switch(a){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(y=t.getAttribute("rel"),y==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(y!==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(y=t.getAttribute("src"),(y!==(p.src==null?null:p.src)||t.getAttribute("type")!==(p.type==null?null:p.type)||t.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(a==="input"&&t.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&t.getAttribute("name")===y)return t}else return t;if(t=Ca(t.nextSibling),t===null)break}return null}function z_(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 Nx(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 hf(t){return t.data==="$?"||t.data==="$~"}function ff(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function O_(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 gf=null;function Cx(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 _x(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 Tx(t,a,o){switch(a=pd(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 dc(t){for(var a=t.attributes;a.length;)t.removeAttributeNode(a[0]);xl(t)}var _a=new Map,Ex=new Set;function hd(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Bi=W.d;W.d={f:P_,r:M_,D:q_,C:B_,L:L_,m:U_,X:$_,S:V_,M:K_};function P_(){var t=Bi.f(),a=sd();return t||a}function M_(t){var a=Wi(t);a!==null&&a.tag===5&&a.type==="form"?Fb(a):Bi.r(t)}var Rr=typeof document>"u"?null:document;function Rx(t,a,o){var c=Rr;if(c&&typeof a=="string"&&a){var p=On(a);p='link[rel="'+t+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),Ex.has(p)||(Ex.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 q_(t){Bi.D(t),Rx("dns-prefetch",t,null)}function B_(t,a){Bi.C(t,a),Rx("preconnect",t,a)}function L_(t,a,o){Bi.L(t,a,o);var c=Rr;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 y=p;switch(a){case"style":y=Dr(t);break;case"script":y=Ir(t)}_a.has(y)||(t=j({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:t,as:a},o),_a.set(y,t),c.querySelector(p)!==null||a==="style"&&c.querySelector(mc(y))||a==="script"&&c.querySelector(pc(y))||(a=c.createElement("link"),En(a,"link",t),tn(a),c.head.appendChild(a)))}}function U_(t,a){Bi.m(t,a);var o=Rr;if(o&&t){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+On(c)+'"][href="'+On(t)+'"]',y=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Ir(t)}if(!_a.has(y)&&(t=j({rel:"modulepreload",href:t},a),_a.set(y,t),o.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(pc(y)))return}c=o.createElement("link"),En(c,"link",t),tn(c),o.head.appendChild(c)}}}function V_(t,a,o){Bi.S(t,a,o);var c=Rr;if(c&&t){var p=ts(c).hoistableStyles,y=Dr(t);a=a||"default";var w=p.get(y);if(!w){var A={loading:0,preload:null};if(w=c.querySelector(mc(y)))A.loading=5;else{t=j({rel:"stylesheet",href:t,"data-precedence":a},o),(o=_a.get(y))&&yf(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,fd(w,a,c)}w={type:"stylesheet",instance:w,count:1,state:A},p.set(y,w)}}}function $_(t,a){Bi.X(t,a);var o=Rr;if(o&&t){var c=ts(o).hoistableScripts,p=Ir(t),y=c.get(p);y||(y=o.querySelector(pc(p)),y||(t=j({src:t,async:!0},a),(a=_a.get(p))&&bf(t,a),y=o.createElement("script"),tn(y),En(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function K_(t,a){Bi.M(t,a);var o=Rr;if(o&&t){var c=ts(o).hoistableScripts,p=Ir(t),y=c.get(p);y||(y=o.querySelector(pc(p)),y||(t=j({src:t,async:!0,type:"module"},a),(a=_a.get(p))&&bf(t,a),y=o.createElement("script"),tn(y),En(y,"link",t),o.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},c.set(p,y))}}function Dx(t,a,o,c){var p=(p=ue.current)?hd(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=Dr(o.href),o=ts(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=Dr(o.href);var y=ts(p).hoistableStyles,w=y.get(t);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,w),(y=p.querySelector(mc(t)))&&!y._p&&(w.instance=y,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),y||G_(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=Ir(o),o=ts(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 Dr(t){return'href="'+On(t)+'"'}function mc(t){return'link[rel="stylesheet"]['+t+"]"}function Ix(t){return j({},t,{"data-precedence":t.precedence,precedence:null})}function G_(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 Ir(t){return'[src="'+On(t)+'"]'}function pc(t){return"script[async]"+t}function zx(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),fd(c,o.precedence,t),a.instance=c;case"stylesheet":p=Dr(o.href);var y=t.querySelector(mc(p));if(y)return a.state.loading|=4,a.instance=y,tn(y),y;c=Ix(o),(p=_a.get(p))&&yf(c,p),y=(t.ownerDocument||t).createElement("link"),tn(y);var w=y;return w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),En(y,"link",c),a.state.loading|=4,fd(y,o.precedence,t),a.instance=y;case"script":return y=Ir(o.src),(p=t.querySelector(pc(y)))?(a.instance=p,tn(p),p):(c=o,(p=_a.get(y))&&(c=j({},o),bf(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,fd(c,o.precedence,t));return a.instance}function fd(t,a,o){for(var c=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,y=p,w=0;w<c.length;w++){var A=c[w];if(A.dataset.precedence===a)y=A;else if(y!==p)break}y?y.parentNode.insertBefore(t,y.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(t,a.firstChild))}function yf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.title==null&&(t.title=a.title)}function bf(t,a){t.crossOrigin==null&&(t.crossOrigin=a.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=a.referrerPolicy),t.integrity==null&&(t.integrity=a.integrity)}var gd=null;function Ox(t,a,o){if(gd===null){var c=new Map,p=gd=new Map;p.set(o,c)}else p=gd,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 y=o[p];if(!(y[Ji]||y[ln]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var w=y.getAttribute(a)||"";w=t+w;var A=c.get(w);A?A.push(y):c.set(w,[y])}}return c}function Px(t,a,o){t=t.ownerDocument||t,t.head.insertBefore(o,a==="title"?t.querySelector("head > title"):null)}function H_(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 Mx(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function F_(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=Dr(c.href),y=a.querySelector(mc(p));if(y){a=y._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(t.count++,t=yd.bind(t),a.then(t,t)),o.state.loading|=4,o.instance=y,tn(y);return}y=a.ownerDocument||a,c=Ix(c),(p=_a.get(p))&&yf(c,p),y=y.createElement("link"),tn(y);var w=y;w._p=new Promise(function(A,D){w.onload=A,w.onerror=D}),En(y,"link",c),o.instance=y}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(t.count++,o=yd.bind(t),a.addEventListener("load",o),a.addEventListener("error",o))}}var vf=0;function Q_(t,a){return t.stylesheets&&t.count===0&&vd(t,t.stylesheets),0<t.count||0<t.imgCount?function(o){var c=setTimeout(function(){if(t.stylesheets&&vd(t,t.stylesheets),t.unsuspend){var y=t.unsuspend;t.unsuspend=null,y()}},6e4+a);0<t.imgBytes&&vf===0&&(vf=62500*__());var p=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&vd(t,t.stylesheets),t.unsuspend)){var y=t.unsuspend;t.unsuspend=null,y()}},(t.imgBytes>vf?50:800)+a);return t.unsuspend=o,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function yd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)vd(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var bd=null;function vd(t,a){t.stylesheets=null,t.unsuspend!==null&&(t.count++,bd=new Map,a.forEach(Z_,t),bd=null,yd.call(t))}function Z_(t,a){if(!(a.state.loading&4)){var o=bd.get(t);if(o)var c=o.get(null);else{o=new Map,bd.set(t,o);for(var p=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var w=p[y];(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"),y=o.get(w)||c,y===c&&o.set(null,p),o.set(w,p),this.count++,c=yd.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),y?y.parentNode.insertBefore(p,y.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(p,t.firstChild)),a.state.loading|=4}}var hc={$$typeof:L,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function Y_(t,a,o,c,p,y,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=Xo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xo(0),this.hiddenUpdates=Xo(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=D,this.incompleteTransitions=new Map}function qx(t,a,o,c,p,y,w,A,D,G,ee,ie){return t=new Y_(t,a,o,w,D,G,ee,ie,A),a=1,y===!0&&(a|=24),y=oa(3,null,null,a),t.current=y,y.stateNode=t,a=Xp(),a.refCount++,t.pooledCache=a,a.refCount++,y.memoizedState={element:c,isDehydrated:o,cache:a},th(y),t}function Bx(t){return t?(t=ur,t):ur}function Lx(t,a,o,c,p,y){p=Bx(p),c.context===null?c.context=p:c.pendingContext=p,c=us(a),c.payload={element:o},y=y===void 0?null:y,y!==null&&(c.callback=y),o=ds(t,c,a),o!==null&&(Yn(o,t,a),Hl(o,t,a))}function Ux(t,a){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var o=t.retryLane;t.retryLane=o!==0&&o<a?o:a}}function xf(t,a){Ux(t,a),(t=t.alternate)&&Ux(t,a)}function Vx(t){if(t.tag===13||t.tag===31){var a=io(t,67108864);a!==null&&Yn(a,t,67108864),xf(t,67108864)}}function $x(t){if(t.tag===13||t.tag===31){var a=da();a=bl(a);var o=io(t,a);o!==null&&Yn(o,t,a),xf(t,a)}}var xd=!0;function X_(t,a,o,c){var p=B.T;B.T=null;var y=W.p;try{W.p=2,wf(t,a,o,c)}finally{W.p=y,B.T=p}}function J_(t,a,o,c){var p=B.T;B.T=null;var y=W.p;try{W.p=8,wf(t,a,o,c)}finally{W.p=y,B.T=p}}function wf(t,a,o,c){if(xd){var p=Sf(c);if(p===null)rf(t,a,c,wd,o),Gx(t,c);else if(e6(p,t,a,o,c))c.stopPropagation();else if(Gx(t,c),a&4&&-1<W_.indexOf(t)){for(;p!==null;){var y=Wi(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var w=Ot(y.pendingLanes);if(w!==0){var A=y;for(A.pendingLanes|=2,A.entangledLanes|=2;w;){var D=1<<31-Zt(w);A.entanglements[1]|=D,w&=~D}ri(y),(jt&6)===0&&(ad=Vt()+500,lc(0))}}break;case 31:case 13:A=io(y,2),A!==null&&Yn(A,y,2),sd(),xf(y,2)}if(y=Sf(c),y===null&&rf(t,a,c,wd,o),y===p)break;p=y}p!==null&&c.stopPropagation()}else rf(t,a,c,null,o)}}function Sf(t){return t=_l(t),kf(t)}var wd=null;function kf(t){if(wd=null,t=vi(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 wd=t,null}function Kx(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(fi()){case Fs:return 2;case gi:return 8;case Dn:case Yo:return 32;case Qs:return 268435456;default:return 32}default:return 32}}var jf=!1,Ss=null,ks=null,js=null,fc=new Map,gc=new Map,As=[],W_="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 Gx(t,a){switch(t){case"focusin":case"focusout":Ss=null;break;case"dragenter":case"dragleave":ks=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":fc.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":gc.delete(a.pointerId)}}function yc(t,a,o,c,p,y){return t===null||t.nativeEvent!==y?(t={blockedOn:a,domEventName:o,eventSystemFlags:c,nativeEvent:y,targetContainers:[p]},a!==null&&(a=Wi(a),a!==null&&Vx(a)),t):(t.eventSystemFlags|=c,a=t.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),t)}function e6(t,a,o,c,p){switch(a){case"focusin":return Ss=yc(Ss,t,a,o,c,p),!0;case"dragenter":return ks=yc(ks,t,a,o,c,p),!0;case"mouseover":return js=yc(js,t,a,o,c,p),!0;case"pointerover":var y=p.pointerId;return fc.set(y,yc(fc.get(y)||null,t,a,o,c,p)),!0;case"gotpointercapture":return y=p.pointerId,gc.set(y,yc(gc.get(y)||null,t,a,o,c,p)),!0}return!1}function Hx(t){var a=vi(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,xu(t.priority,function(){$x(o)});return}}else if(a===31){if(a=b(o),a!==null){t.blockedOn=a,xu(t.priority,function(){$x(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 Sd(t){if(t.blockedOn!==null)return!1;for(var a=t.targetContainers;0<a.length;){var o=Sf(t.nativeEvent);if(o===null){o=t.nativeEvent;var c=new o.constructor(o.type,o);Cl=c,o.target.dispatchEvent(c),Cl=null}else return a=Wi(o),a!==null&&Vx(a),t.blockedOn=o,!1;a.shift()}return!0}function Fx(t,a,o){Sd(t)&&o.delete(a)}function t6(){jf=!1,Ss!==null&&Sd(Ss)&&(Ss=null),ks!==null&&Sd(ks)&&(ks=null),js!==null&&Sd(js)&&(js=null),fc.forEach(Fx),gc.forEach(Fx)}function kd(t,a){t.blockedOn===a&&(t.blockedOn=null,jf||(jf=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,t6)))}var jd=null;function Qx(t){jd!==t&&(jd=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){jd===t&&(jd=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(kf(c||o)===null)continue;break}var y=Wi(o);y!==null&&(t.splice(a,3),a-=3,wh(y,{pending:!0,data:p,method:o.method,action:c},c,p))}}))}function zr(t){function a(D){return kd(D,t)}Ss!==null&&kd(Ss,t),ks!==null&&kd(ks,t),js!==null&&kd(js,t),fc.forEach(a),gc.forEach(a);for(var o=0;o<As.length;o++){var c=As[o];c.blockedOn===t&&(c.blockedOn=null)}for(;0<As.length&&(o=As[0],o.blockedOn===null);)Hx(o),o.blockedOn===null&&As.shift();if(o=(t.ownerDocument||t).$$reactFormReplay,o!=null)for(c=0;c<o.length;c+=3){var p=o[c],y=o[c+1],w=p[In]||null;if(typeof y=="function")w||Qx(o);else if(w){var A=null;if(y&&y.hasAttribute("formAction")){if(p=y,w=y[In]||null)A=w.formAction;else if(kf(p)!==null)continue}else A=w.action;typeof A=="function"?o[c+1]=A:(o.splice(c,3),c-=3),Qx(o)}}}function Zx(){function t(y){y.canIntercept&&y.info==="react-transition"&&y.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 y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.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 Af(t){this._internalRoot=t}Ad.prototype.render=Af.prototype.render=function(t){var a=this._internalRoot;if(a===null)throw Error(r(409));var o=a.current,c=da();Lx(o,c,t,a,null,null)},Ad.prototype.unmount=Af.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var a=t.containerInfo;Lx(t.current,2,null,t,null,null),sd(),a[Xi]=null}};function Ad(t){this._internalRoot=t}Ad.prototype.unstable_scheduleHydration=function(t){if(t){var a=Jo();t={blockedOn:null,target:t,priority:a};for(var o=0;o<As.length&&a!==0&&a<As[o].priority;o++);As.splice(o,0,t),o===0&&Hx(t)}};var Yx=n.version;if(Yx!=="19.2.4")throw Error(r(527,Yx,"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 n6={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Nd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Nd.isDisabled&&Nd.supportsFiber)try{xn=Nd.inject(n6),Et=Nd}catch{}}return bc.createRoot=function(t,a){if(!u(t))throw Error(r(299));var o=!1,c="",p=av,y=iv,w=sv;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&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=qx(t,1,!1,null,null,o,c,null,p,y,w,Zx),t[Xi]=a.current,of(t),new Af(a)},bc.hydrateRoot=function(t,a,o){if(!u(t))throw Error(r(299));var c=!1,p="",y=av,w=iv,A=sv,D=null;return o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(y=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(A=o.onRecoverableError),o.formState!==void 0&&(D=o.formState)),a=qx(t,1,!0,a,o??null,c,p,D,y,w,A,Zx),a.context=Bx(null),o=a.current,c=da(),c=bl(c),p=us(c),p.callback=null,ds(o,p,c),o=c,a.current.lanes=o,Xs(a,o),ri(a),t[Xi]=a.current,of(t),new Ad(a)},bc.version="19.2.4",bc}var ew;function L6(){if(ew)return Nf.exports;ew=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(),Nf.exports=B6(),Nf.exports}var U6=L6();const V6={bodySerializer:e=>JSON.stringify(e,(n,i)=>typeof i=="bigint"?i.toString():i)},$6=({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??(M=>new Promise(R=>setTimeout(R,M)));return{stream:async function*(){let M=h??3e3,R=0;const P=S.signal??new AbortController().signal;for(;!P.aborted;){R++;const q=S.headers instanceof Headers?S.headers:new Headers(S.headers);j!==void 0&&q.set("Last-Event-ID",j);try{const L={redirect:"follow",...S,body:S.serializedBody,headers:q,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 $e of Ge){const ke=$e.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)||(M=se)}let W,xe=!1;if(Le.length){const Ae=Le.join(`
14
- `);try{W=JSON.parse(Ae),xe=!0}catch{W=Ae}}xe&&(u&&await u(W),r&&(W=await r(W))),i?.({data:W,event:B,id:j,retry:M}),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(M*2**(R-1),b??3e4);await C($)}}}()}},K6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},G6=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},H6=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},dj=({allowReserved:e,explode:n,name:i,style:r,value:u})=>{if(!n){const b=(e?u:u.map(v=>encodeURIComponent(v))).join(G6(r));switch(r){case"label":return`.${b}`;case"matrix":return`;${i}=${b}`;case"simple":return b;default:return`${i}=${b}`}}const h=K6(r),f=u.map(b=>r==="label"||r==="simple"?e?b:encodeURIComponent(b):Im({allowReserved:e,name:i,value:b})).join(h);return r==="label"||r==="matrix"?h+f:f},Im=({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)}`},mj=({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=H6(r),b=Object.entries(u).map(([v,x])=>Im({allowReserved:e,name:r==="deepObject"?`${i}[${v}]`:v,value:x})).join(f);return r==="label"||r==="matrix"?f+b:b},F6=/\{[^{}]+\}/g,Q6=({path:e,url:n})=>{let i=n;const r=n.match(F6);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,dj({explode:h,name:f,style:b,value:v}));continue}if(typeof v=="object"){i=i.replace(u,mj({explode:h,name:f,style:b,value:v,valueOnly:!0}));continue}if(b==="matrix"){i=i.replace(u,`;${Im({name:f,value:v})}`);continue}const x=encodeURIComponent(b==="label"?`.${v}`:v);i=i.replace(u,x)}return i},Z6=({baseUrl:e,path:n,query:i,querySerializer:r,url:u})=>{const h=u.startsWith("/")?u:`/${u}`;let f=(e??"")+h;n&&(f=Q6({path:n,url:f}));let b=i?r(i):"";return b.startsWith("?")&&(b=b.substring(1)),b&&(f+=`?${b}`),f};function Y6(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 X6=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},pj=({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=dj({allowReserved:e,explode:!0,name:f,style:"form",value:b,...n});v&&h.push(v)}else if(typeof b=="object"){const v=mj({allowReserved:e,explode:!0,name:f,style:"deepObject",value:b,...i});v&&h.push(v)}else{const v=Im({allowReserved:e,name:f,value:b});v&&h.push(v)}}return h.join("&")},J6=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"}},W6=(e,n)=>n?!!(e.headers.has(n)||e.query?.[n]||e.headers.get("Cookie")?.includes(`${n}=`)):!1,eT=async({security:e,...n})=>{for(const i of e){if(W6(n,i.name))continue;const r=await X6(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}}},tw=e=>Z6({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:pj(e.querySerializer),url:e.url}),nw=(e,n)=>{const i={...e,...n};return i.baseUrl?.endsWith("/")&&(i.baseUrl=i.baseUrl.substring(0,i.baseUrl.length-1)),i.headers=hj(e.headers,n.headers),i},tT=e=>{const n=[];return e.forEach((i,r)=>{n.push([r,i])}),n},hj=(...e)=>{const n=new Headers;for(const i of e){if(!i)continue;const r=i instanceof Headers?tT(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 Tf{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 nT=()=>({error:new Tf,request:new Tf,response:new Tf}),aT=pj({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),iT={"Content-Type":"application/json"},fj=(e={})=>({...V6,headers:iT,parseAs:"auto",querySerializer:aT,...e}),gj=(e={})=>{let n=nw(fj(),e);const i=()=>({...n}),r=x=>(n=nw(n,x),i()),u=nT(),h=async x=>{const S={...n,...x,fetch:x.fetch??n.fetch??globalThis.fetch,headers:hj(n.headers,x.headers),serializedBody:void 0};S.security&&await eT({...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=tw(S);return{opts:S,url:j}},f=async x=>{const{opts:S,url:j}=await h(x),C={redirect:"follow",...S,body:Y6(S)};let T=new Request(j,C);for(const Q of u.request.fns)Q&&(T=await Q(T,S));const I=S.fetch;let M=await I(T);for(const Q of u.response.fns)Q&&(M=await Q(M,T,S));const R={request:T,response:M};if(M.ok){const Q=(S.parseAs==="auto"?J6(M.headers.get("Content-Type")):S.parseAs)??"json";if(M.status===204||M.headers.get("Content-Length")==="0"){let V;switch(Q){case"arrayBuffer":case"blob":case"text":V=await M[Q]();break;case"formData":V=new FormData;break;case"stream":V=M.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 M[Q]();break;case"stream":return S.responseStyle==="data"?M.body:{data:M.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 M.text();let q;try{q=JSON.parse(P)}catch{}const L=q??P;let $=L;for(const Q of u.error.fns)Q&&($=await Q(L,M,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 $6({...j,body:j.body,headers:j.headers,method:x,onRequest:async(T,I)=>{let M=new Request(T,I);for(const R of u.request.fns)R&&(M=await R(M,j));return M},url:C})};return{buildUrl:tw,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")}},z=gj(fj()),sT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps/submit",...e,headers:{"Content-Type":"application/json",...e.headers}}),oT=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e}),rT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects",...e,headers:{"Content-Type":"application/json",...e.headers}}),lT=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),yj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e}),cT=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),uT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan",...e}),dT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-report",...e}),mT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-setup",...e}),pT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft",...e}),rae=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/create",...e,headers:{"Content-Type":"application/json",...e.headers}}),lae=e=>(e.client??z).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}}),cae=e=>(e.client??z).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}}),uae=e=>(e.client??z).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}}),dae=e=>(e.client??z).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}}),mae=e=>(e.client??z).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}}),pae=e=>(e.client??z).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}}),hae=e=>(e.client??z).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}}),fae=e=>(e.client??z).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}}),gae=e=>(e.client??z).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}}),yae=e=>(e.client??z).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}}),bae=e=>(e.client??z).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}}),vae=e=>(e.client??z).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}}),xae=e=>(e.client??z).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}}),wae=e=>(e.client??z).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}}),hT=e=>(e.client??z).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}}),Sae=e=>(e.client??z).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}}),kae=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/compile-preview",...e}),jae=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/diff-preview",...e}),Aae=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/publish",...e,headers:{"Content-Type":"application/json",...e.headers}}),Nae=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-plan/draft/actions/discard",...e}),bj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-overview",...e}),fT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e}),gT=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/settings",...e,headers:{"Content-Type":"application/json",...e.headers}}),yT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment",...e}),bT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/evidence",...e}),vT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfill-preview",...e}),xT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/backfills",...e,headers:{"Content-Type":"application/json",...e.headers}}),wT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs",...e}),ST=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/sentiment/jobs/{jobId}",...e}),kT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/visibility-report",...e}),jT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-evidence",...e}),AT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-question-result",...e}),NT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-property-competitors",...e}),CT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates",...e}),_T=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/measurement-query-templates/{templateId}",...e,headers:{"Content-Type":"application/json",...e.headers}}),TT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs",...e}),ET=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/batches",...e,headers:{"Content-Type":"application/json",...e.headers}}),RT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking",...e}),DT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/preview",...e,headers:{"Content-Type":"application/json",...e.headers}}),IT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/query-tracking/commit",...e,headers:{"Content-Type":"application/json",...e.headers}}),zT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/research/runs/{runId}",...e}),OT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations",...e,headers:{"Content-Type":"application/json",...e.headers}}),PT=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/{label}",...e}),MT=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/locations/default",...e,headers:{"Content-Type":"application/json",...e.headers}}),qT=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),vj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e}),BT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),LT=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries",...e,headers:{"Content-Type":"application/json",...e.headers}}),UT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/queries/generate",...e,headers:{"Content-Type":"application/json",...e.headers}}),VT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),$T=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors",...e,headers:{"Content-Type":"application/json",...e.headers}}),KT=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/competitors/{id}",...e}),GT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/competitors",...e}),xj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e}),HT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),FT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/run-admission",...e}),QT=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e}),ZT=e=>(e?.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),wj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/runs/{id}",...e}),YT=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/apply",...e,headers:{"Content-Type":"application/json",...e.headers}}),XT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/history",...e}),JT=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/history",...e}),WT=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/timeline",...e}),eE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/analytics/metrics",...e}),tE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/snapshots/diff",...e}),Sj=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings",...e}),nE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/providers/{name}",...e,headers:{"Content-Type":"application/json",...e.headers}}),aE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/google",...e,headers:{"Content-Type":"application/json",...e.headers}}),iE=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/keys/self",...e}),sE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/bing",...e,headers:{"Content-Type":"application/json",...e.headers}}),oE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/settings/cdp",...e,headers:{"Content-Type":"application/json",...e.headers}}),rE=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),lE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e}),cE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedule",...e,headers:{"Content-Type":"application/json",...e.headers}}),uE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/schedules",...e}),dE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e}),mE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications",...e,headers:{"Content-Type":"application/json",...e.headers}}),pE=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}",...e}),hE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/notifications/{id}/test",...e}),fE=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e}),gE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry",...e,headers:{"Content-Type":"application/json",...e.headers}}),yE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/onboarding",...e,headers:{"Content-Type":"application/json",...e.headers}}),bE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/telemetry/ui",...e,headers:{"Content-Type":"application/json",...e.headers}}),kj=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/cdp/status",...e}),vE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/status",...e}),xE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),wE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/customers",...e}),SE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),kE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/sync",...e}),jE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/performance",...e}),AE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/snapshots",...e}),NE=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google-ads/connection",...e}),CE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/status",...e}),_E=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/oauth/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),TE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts",...e}),EE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers",...e}),RE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/accounts/{accountId}/containers/{containerId}/workspaces",...e}),DE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),IE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/sync",...e}),zE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/snapshots",...e}),OE=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gtm/connection",...e}),PE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/options",...e}),ME=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e}),qE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts",...e,headers:{"Content-Type":"application/json",...e.headers}}),BE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/conversion-tracking/contracts/{contractId}/integrity",...e}),LE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections",...e}),UE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),VE=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}",...e}),$E=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/properties",...e}),KE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/property",...e,headers:{"Content-Type":"application/json",...e.headers}}),GE=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/connections/{type}/sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),HE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),FE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance",...e}),QE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/performance/daily",...e}),ZE=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect",...e,headers:{"Content-Type":"application/json",...e.headers}}),YE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspections",...e}),XE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/deindexed",...e}),JE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage",...e}),WE=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/coverage/history",...e}),e8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/sitemaps",...e}),t8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/gsc/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),n8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/google/indexing/request",...e,headers:{"Content-Type":"application/json",...e.headers}}),a8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations",...e}),i8=e=>(e.client??z).put({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/locations/{locationName}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}}),s8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),o8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/keywords",...e}),r8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/place-actions",...e}),l8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/lodging",...e}),c8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/places",...e}),u8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/gbp/summary",...e}),d8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),m8=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/disconnect",...e}),p8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/status",...e}),h8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/sites",...e}),f8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/set-site",...e,headers:{"Content-Type":"application/json",...e.headers}}),g8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/coverage",...e}),y8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspections",...e}),b8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-url",...e,headers:{"Content-Type":"application/json",...e.headers}}),v8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/inspect-sitemap",...e,headers:{"Content-Type":"application/json",...e.headers}}),x8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/request-indexing",...e,headers:{"Content-Type":"application/json",...e.headers}}),w8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/bing/performance",...e}),S8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/connect",...e,headers:{"Content-Type":"application/json",...e.headers}}),k8=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/disconnect",...e}),j8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/status",...e}),A8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/search-landing-pages",...e}),N8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),C8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/traffic",...e}),_8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/ai-referral-daily",...e}),T8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/ga/session-history",...e}),E8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/insights",...e}),R8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/health/history",...e}),D8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/citations/visibility",...e}),I8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/overview",...e}),z8=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/status",...e}),O8=e=>(e?.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/install",...e}),P8=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e}),M8=e=>(e?.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs",...e,headers:{"Content-Type":"application/json",...e?.headers}}),q8=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/syncs/latest",...e}),B8=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/releases",...e}),L8=e=>(e?.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/latest-release",...e}),U8=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/backlinks/cache/{release}",...e}),V8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/extract",...e,headers:{"Content-Type":"application/json",...e.headers}}),$8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/summary",...e}),K8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/domains",...e}),G8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/backlinks/history",...e}),H8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/cloud-run",...e,headers:{"Content-Type":"application/json",...e.headers}}),F8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/wordpress",...e,headers:{"Content-Type":"application/json",...e.headers}}),Q8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/connect/vercel",...e,headers:{"Content-Type":"application/json",...e.headers}}),Z8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/sync",...e,headers:{"Content-Type":"application/json",...e.headers}}),Y8=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}/backfill",...e,headers:{"Content-Type":"application/json",...e.headers}}),X8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources",...e}),J8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/status",...e}),W8=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/sources/{id}",...e}),eR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/traffic/events",...e}),tR=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/run",...e,headers:{"Content-Type":"application/json",...e.headers}}),nR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions",...e}),aR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/discover/sessions/{id}",...e}),iR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo",...e}),sR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/pages",...e}),oR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/trend",...e}),rR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl",...e}),lR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/graph",...e}),cR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages/audit",...e}),jj=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/crawl/pages",...e}),uR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/structure",...e}),dR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/internal-links/neighbors",...e}),mR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/dead-links",...e}),pR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e}),hR=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs",...e,headers:{"Content-Type":"application/json",...e.headers}}),fR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/progress",...e}),gR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/technical-aeo/runs/{runId}/page-health-preview",...e}),yR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e}),bR=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations",...e,headers:{"Content-Type":"application/json",...e.headers}}),vR=e=>(e.client??z).delete({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}",...e}),xR=e=>(e.client??z).post({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/conversations/{id}/resume",...e}),wR=e=>(e.client??z).get({security:[{scheme:"bearer",type:"http"}],url:"/api/v1/projects/{name}/agent/providers",...e});function SR(e){const n={baseUrl:e.baseUrl,fetch:e.fetch,headers:{...e.headers??{}}};return gj(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 Vr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Aj extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Nj={};function Is(e){return Nj}function Cj(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 bg(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 v0(e){return e==null}function x0(e){const n=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(n,i)}function kR(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 aw=Symbol("evaluating");function gt(e,n,i){let r;Object.defineProperty(e,n,{get(){if(r!==aw)return r===void 0&&(r=aw,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 Bs(...e){const n={};for(const i of e){const r=Object.getOwnPropertyDescriptors(i);Object.assign(n,r)}return Object.defineProperties({},n)}function iw(e){return JSON.stringify(e)}function jR(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const _j="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Bc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const AR=zm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Gr(e){if(Bc(e)===!1)return!1;const n=e.constructor;if(n===void 0||typeof n!="function")return!0;const i=n.prototype;return!(Bc(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function Tj(e){return Gr(e)?{...e}:Array.isArray(e)?[...e]:e}const NR=new Set(["string","number","symbol"]);function Hr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ls(e,n,i){const r=new e._zod.constr(n??e._zod.def);return(!n||i?.parent)&&(r._zod.parent=e),r}function Me(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 CR(e){return Object.keys(e).filter(n=>e[n]._zod.optin==="optional"&&e[n]._zod.optout==="optional")}const _R={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 TR(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=Bs(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 Ls(e,h)}function ER(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=Bs(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 Ls(e,h)}function RR(e,n){if(!Gr(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=Bs(e._zod.def,{get shape(){const h={...e._zod.def.shape,...n};return qo(this,"shape",h),h}});return Ls(e,u)}function DR(e,n){if(!Gr(n))throw new Error("Invalid input to safeExtend: expected a plain object");const i=Bs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...n};return qo(this,"shape",r),r}});return Ls(e,i)}function IR(e,n){const i=Bs(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 Ls(e,i)}function zR(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=Bs(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 Ls(n,f)}function OR(e,n,i){const r=Bs(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 Ls(n,r)}function Br(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 Lr(e,n){return n.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(e),i})}function _d(e){return typeof e=="string"?e:e?.message}function zs(e,n,i){const r={...e,path:e.path??[]};if(!e.message){const u=_d(e.inst?._zod.def?.error?.(e))??_d(n?.error?.(e))??_d(i.customError?.(e))??_d(i.localeError?.(e))??"Invalid input";r.message=u}return delete r.inst,delete r.continue,n?.reportInput||delete r.input,r}function w0(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Lc(...e){const[n,i,r]=e;return typeof n=="string"?{message:n,code:"custom",input:i,inst:r}:{...n}}const Ej=(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,bg,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Rj=te("$ZodError",Ej),Dj=te("$ZodError",Ej,{Parent:Error});function PR(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 MR(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 S0=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 Vr;if(f.issues.length){const b=new(u?.Err??e)(f.issues.map(v=>zs(v,h,Is())));throw _j(b,u?.callee),b}return f.value},k0=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,Is())));throw _j(b,u?.callee),b}return f.value},Om=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 Vr;return h.issues.length?{success:!1,error:new(e??Rj)(h.issues.map(f=>zs(f,u,Is())))}:{success:!0,data:h.value}},qR=Om(Dj),Pm=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,Is())))}:{success:!0,data:h.value}},BR=Pm(Dj),LR=e=>(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return S0(e)(n,i,u)},UR=e=>(n,i,r)=>S0(e)(n,i,r),VR=e=>async(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return k0(e)(n,i,u)},$R=e=>async(n,i,r)=>k0(e)(n,i,r),KR=e=>(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Om(e)(n,i,u)},GR=e=>(n,i,r)=>Om(e)(n,i,r),HR=e=>async(n,i,r)=>{const u=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Pm(e)(n,i,u)},FR=e=>async(n,i,r)=>Pm(e)(n,i,r),QR=/^[cC][^\s-]{8,}$/,ZR=/^[0-9a-z]+$/,YR=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,XR=/^[0-9a-vA-V]{20}$/,JR=/^[A-Za-z0-9]{27}$/,WR=/^[a-zA-Z0-9_-]{21}$/,e7=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,t7=/^([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})$/,sw=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)$/,n7=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,a7="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function i7(){return new RegExp(a7,"u")}const s7=/^(?:(?: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])$/,o7=/^(([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}|:))$/,r7=/^((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])$/,l7=/^(([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])$/,c7=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ij=/^[A-Za-z0-9_-]*$/,u7=/^\+[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])))",d7=new RegExp(`^${zj}$`);function Oj(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 m7(e){return new RegExp(`^${Oj(e)}$`)}function p7(e){const n=Oj({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 h7=e=>{const n=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},f7=/^-?\d+$/,Pj=/^-?\d+(?:\.\d+)?$/,g7=/^(?:true|false)$/i,y7=/^null$/i,b7=/^[^A-Z]*$/,v7=/^[^a-z]*$/,Wn=te("$ZodCheck",(e,n)=>{var i;e._zod??(e._zod={}),e._zod.def=n,(i=e._zod).onattach??(i.onattach=[])}),Mj={number:"number",bigint:"bigint",object:"date"},qj=te("$ZodCheckLessThan",(e,n)=>{Wn.init(e,n);const i=Mj[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})}}),Bj=te("$ZodCheckGreaterThan",(e,n)=>{Wn.init(e,n);const i=Mj[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})}}),x7=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):kR(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})}}),w7=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]=_R[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=f7)}),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})}}),S7=te("$ZodCheckMaxLength",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!v0(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=w0(u);r.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),k7=te("$ZodCheckMinLength",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!v0(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=w0(u);r.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:u,inst:e,continue:!n.abort})}}),j7=te("$ZodCheckLengthEquals",(e,n)=>{var i;Wn.init(e,n),(i=e._zod.def).when??(i.when=r=>{const u=r.value;return!v0(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=w0(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})}}),Mm=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=()=>{})}),A7=te("$ZodCheckRegex",(e,n)=>{Mm.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})}}),N7=te("$ZodCheckLowerCase",(e,n)=>{n.pattern??(n.pattern=b7),Mm.init(e,n)}),C7=te("$ZodCheckUpperCase",(e,n)=>{n.pattern??(n.pattern=v7),Mm.init(e,n)}),_7=te("$ZodCheckIncludes",(e,n)=>{Wn.init(e,n);const i=Hr(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})}}),T7=te("$ZodCheckStartsWith",(e,n)=>{Wn.init(e,n);const i=new RegExp(`^${Hr(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})}}),E7=te("$ZodCheckEndsWith",(e,n)=>{Wn.init(e,n);const i=new RegExp(`.*${Hr(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})}}),R7=te("$ZodCheckOverwrite",(e,n)=>{Wn.init(e,n),e._zod.check=i=>{i.value=n.tx(i.value)}});class D7{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 I7={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=I7;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=Br(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 Vr;if(S||T instanceof Promise)S=(S??Promise.resolve()).then(async()=>{await T,f.issues.length!==C&&(x||(x=Br(f,C)))});else{if(f.issues.length===C)continue;x||(x=Br(f,C))}}return S?S.then(()=>f):f},h=(f,b,v)=>{if(Br(f))return f.aborted=!0,f;const x=u(b,r,v);if(x instanceof Promise){if(v.async===!1)throw new Vr;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 Vr;return v.then(x=>u(x,r,b))}return u(v,r,b)}}gt(e,"~standard",()=>({validate:u=>{try{const h=qR(e,u);return h.success?{value:h.data}:{issues:h.error?.issues}}catch{return BR(e,u).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),j0=te("$ZodString",(e,n)=>{Lt.init(e,n),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??h7(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)=>{Mm.init(e,n),j0.init(e,n)}),z7=te("$ZodGUID",(e,n)=>{n.pattern??(n.pattern=t7),Gt.init(e,n)}),O7=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=sw(r))}else n.pattern??(n.pattern=sw());Gt.init(e,n)}),P7=te("$ZodEmail",(e,n)=>{n.pattern??(n.pattern=n7),Gt.init(e,n)}),M7=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})}}}),q7=te("$ZodEmoji",(e,n)=>{n.pattern??(n.pattern=i7()),Gt.init(e,n)}),B7=te("$ZodNanoID",(e,n)=>{n.pattern??(n.pattern=WR),Gt.init(e,n)}),L7=te("$ZodCUID",(e,n)=>{n.pattern??(n.pattern=QR),Gt.init(e,n)}),U7=te("$ZodCUID2",(e,n)=>{n.pattern??(n.pattern=ZR),Gt.init(e,n)}),V7=te("$ZodULID",(e,n)=>{n.pattern??(n.pattern=YR),Gt.init(e,n)}),$7=te("$ZodXID",(e,n)=>{n.pattern??(n.pattern=XR),Gt.init(e,n)}),K7=te("$ZodKSUID",(e,n)=>{n.pattern??(n.pattern=JR),Gt.init(e,n)}),G7=te("$ZodISODateTime",(e,n)=>{n.pattern??(n.pattern=p7(n)),Gt.init(e,n)}),H7=te("$ZodISODate",(e,n)=>{n.pattern??(n.pattern=d7),Gt.init(e,n)}),F7=te("$ZodISOTime",(e,n)=>{n.pattern??(n.pattern=m7(n)),Gt.init(e,n)}),Q7=te("$ZodISODuration",(e,n)=>{n.pattern??(n.pattern=e7),Gt.init(e,n)}),Z7=te("$ZodIPv4",(e,n)=>{n.pattern??(n.pattern=s7),Gt.init(e,n),e._zod.bag.format="ipv4"}),Y7=te("$ZodIPv6",(e,n)=>{n.pattern??(n.pattern=o7),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})}}}),X7=te("$ZodCIDRv4",(e,n)=>{n.pattern??(n.pattern=r7),Gt.init(e,n)}),J7=te("$ZodCIDRv6",(e,n)=>{n.pattern??(n.pattern=l7),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 Lj(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const W7=te("$ZodBase64",(e,n)=>{n.pattern??(n.pattern=c7),Gt.init(e,n),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{Lj(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!n.abort})}});function eD(e){if(!Ij.test(e))return!1;const n=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=n.padEnd(Math.ceil(n.length/4)*4,"=");return Lj(i)}const tD=te("$ZodBase64URL",(e,n)=>{n.pattern??(n.pattern=Ij),Gt.init(e,n),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{eD(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!n.abort})}}),nD=te("$ZodE164",(e,n)=>{n.pattern??(n.pattern=u7),Gt.init(e,n)});function aD(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 iD=te("$ZodJWT",(e,n)=>{Gt.init(e,n),e._zod.check=i=>{aD(i.value,n.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!n.abort})}}),Uj=te("$ZodNumber",(e,n)=>{Lt.init(e,n),e._zod.pattern=e._zod.bag.pattern??Pj,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}}),sD=te("$ZodNumberFormat",(e,n)=>{w7.init(e,n),Uj.init(e,n)}),oD=te("$ZodBoolean",(e,n)=>{Lt.init(e,n),e._zod.pattern=g7,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}}),rD=te("$ZodNull",(e,n)=>{Lt.init(e,n),e._zod.pattern=y7,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}}),lD=te("$ZodUnknown",(e,n)=>{Lt.init(e,n),e._zod.parse=i=>i}),cD=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 ow(e,n,i){e.issues.length&&n.issues.push(...Lr(i,e.issues)),n.value[i]=e.value}const uD=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=>ow(x,i,f))):ow(v,i,f)}return h.length?Promise.all(h).then(()=>i):i}});function am(e,n,i,r,u){if(e.issues.length){if(u&&!(i in r))return;n.issues.push(...Lr(i,e.issues))}e.value===void 0?i in r&&(n.value[i]=void 0):n.value[i]=e.value}function Vj(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=CR(e.shape);return{...e,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(i)}}function $j(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=>am(T,i,j,n,S))):am(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 dD=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(()=>Vj(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=Bc,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],I=T._zod.optout==="optional",M=T._zod.run({value:x[C],issues:[]},v);M instanceof Promise?S.push(M.then(R=>am(R,b,C,x,I))):am(M,b,C,x,I)}return h?$j(S,x,b,v,r.value,e):S.length?Promise.all(S).then(()=>b):b}}),mD=te("$ZodObjectJIT",(e,n)=>{dD.init(e,n);const i=e._zod.parse,r=zm(()=>Vj(n)),u=C=>{const T=new D7(["shape","payload","ctx"]),I=r.value,M=L=>{const $=iw(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 I.keys)R[L]=`key_${P++}`;T.write("const newResult = {};");for(const L of I.keys){const $=R[L],Q=iw(L),V=C[L]?._zod?.optout==="optional";T.write(`const ${$} = ${M(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 q=T.compile();return(L,$)=>q(C,L,$)};let h;const f=Bc,b=!Nj.jitless,x=b&&AR.value,S=n.catchall;let j;e._zod.parse=(C,T)=>{j??(j=r.value);const I=C.value;return f(I)?b&&x&&T?.async===!1&&T.jitless!==!0?(h||(h=u(n.shape)),C=h(C,T),S?$j([],I,C,T,j,e):C):i(C,T):(C.issues.push({expected:"object",code:"invalid_type",input:I,inst:e}),C)}});function rw(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=>!Br(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,Is())))}),n)}const Kj=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=>x0(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=>rw(v,u,e,h)):rw(b,u,e,h)}}),pD=te("$ZodDiscriminatedUnion",(e,n)=>{n.inclusive=!1,Kj.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(!Bc(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)}}),hD=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])=>lw(i,v,x)):lw(i,h,f)}});function vg(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(Gr(e)&&Gr(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=vg(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=vg(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 lw(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}),Br(e))return e;const f=vg(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 fD=te("$ZodRecord",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{const u=i.value;if(!Gr(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(...Lr(x,j.issues)),i.value[x]=j.value})):(S.issues.length&&i.issues.push(...Lr(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"&&Pj.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,Is())),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(...Lr(b,j.issues)),i.value[v.value]=j.value})):(S.issues.length&&i.issues.push(...Lr(b,S.issues)),i.value[v.value]=S.value)}}return h.length?Promise.all(h).then(()=>i):i}}),gD=te("$ZodEnum",(e,n)=>{Lt.init(e,n);const i=Cj(n.entries),r=new Set(i);e._zod.values=r,e._zod.pattern=new RegExp(`^(${i.filter(u=>NR.has(typeof u)).map(u=>typeof u=="string"?Hr(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}}),yD=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"?Hr(r):r?Hr(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}}),bD=te("$ZodTransform",(e,n)=>{Lt.init(e,n),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Aj(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 Vr;return i.value=u,i}});function cw(e,n){return e.issues.length&&n===void 0?{issues:[],value:void 0}:e}const Gj=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(`^(${x0(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=>cw(h,i.value)):cw(u,i.value)}return i.value===void 0?i:n.innerType._zod.run(i,r)}}),vD=te("$ZodExactOptional",(e,n)=>{Gj.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)}),xD=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(`^(${x0(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)}),wD=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=>uw(h,n)):uw(u,n)}});function uw(e,n){return e.value===void 0&&(e.value=n.defaultValue),e}const SD=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))}),kD=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=>dw(h,e)):dw(u,e)}});function dw(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 jD=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,Is()))},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,Is()))},input:i.value}),i.issues=[]),i)}}),AD=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=>Td(f,n.in,r)):Td(h,n.in,r)}const u=n.in._zod.run(i,r);return u instanceof Promise?u.then(h=>Td(h,n.out,r)):Td(u,n.out,r)}});function Td(e,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:e.value,issues:e.issues},i)}const ND=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(mw):mw(u)}});function mw(e){return e.value=Object.freeze(e.value),e}const CD=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)}),_D=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=>pw(h,i,r,e));pw(u,i,r,e)}});function pw(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(Lc(u))}}var hw;class TD{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 ED(){return new TD}(hw=globalThis).__zod_globalRegistry??(hw.__zod_globalRegistry=ED());const Cc=globalThis.__zod_globalRegistry;function RD(e,n){return new e({type:"string",...Me(n)})}function DD(e,n){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Me(n)})}function fw(e,n){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Me(n)})}function Hj(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Me(n)})}function ID(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Me(n)})}function zD(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Me(n)})}function OD(e,n){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Me(n)})}function PD(e,n){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Me(n)})}function MD(e,n){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Me(n)})}function qD(e,n){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Me(n)})}function BD(e,n){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Me(n)})}function LD(e,n){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Me(n)})}function UD(e,n){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Me(n)})}function VD(e,n){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Me(n)})}function $D(e,n){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Me(n)})}function KD(e,n){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Me(n)})}function GD(e,n){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Me(n)})}function HD(e,n){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Me(n)})}function FD(e,n){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Me(n)})}function QD(e,n){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Me(n)})}function ZD(e,n){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Me(n)})}function YD(e,n){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Me(n)})}function XD(e,n){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Me(n)})}function JD(e,n){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Me(n)})}function WD(e,n){return new e({type:"string",format:"date",check:"string_format",...Me(n)})}function eI(e,n){return new e({type:"string",format:"time",check:"string_format",precision:null,...Me(n)})}function tI(e,n){return new e({type:"string",format:"duration",check:"string_format",...Me(n)})}function nI(e,n){return new e({type:"number",checks:[],...Me(n)})}function aI(e,n){return new e({type:"number",coerce:!0,checks:[],...Me(n)})}function iI(e,n){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Me(n)})}function sI(e,n){return new e({type:"boolean",...Me(n)})}function oI(e,n){return new e({type:"null",...Me(n)})}function rI(e){return new e({type:"unknown"})}function lI(e,n){return new e({type:"never",...Me(n)})}function gw(e,n){return new qj({check:"less_than",...Me(n),value:e,inclusive:!1})}function Ef(e,n){return new qj({check:"less_than",...Me(n),value:e,inclusive:!0})}function yw(e,n){return new Bj({check:"greater_than",...Me(n),value:e,inclusive:!1})}function Rf(e,n){return new Bj({check:"greater_than",...Me(n),value:e,inclusive:!0})}function bw(e,n){return new x7({check:"multiple_of",...Me(n),value:e})}function Fj(e,n){return new S7({check:"max_length",...Me(n),maximum:e})}function im(e,n){return new k7({check:"min_length",...Me(n),minimum:e})}function Qj(e,n){return new j7({check:"length_equals",...Me(n),length:e})}function cI(e,n){return new A7({check:"string_format",format:"regex",...Me(n),pattern:e})}function uI(e){return new N7({check:"string_format",format:"lowercase",...Me(e)})}function dI(e){return new C7({check:"string_format",format:"uppercase",...Me(e)})}function mI(e,n){return new _7({check:"string_format",format:"includes",...Me(n),includes:e})}function pI(e,n){return new T7({check:"string_format",format:"starts_with",...Me(n),prefix:e})}function hI(e,n){return new E7({check:"string_format",format:"ends_with",...Me(n),suffix:e})}function tl(e){return new R7({check:"overwrite",tx:e})}function fI(e){return tl(n=>n.normalize(e))}function gI(){return tl(e=>e.trim())}function yI(){return tl(e=>e.toLowerCase())}function bI(){return tl(e=>e.toUpperCase())}function vI(){return tl(e=>jR(e))}function xI(e,n,i){return new e({type:"array",element:n,...Me(i)})}function wI(e,n,i){return new e({type:"custom",check:"custom",fn:n,...Me(i)})}function SI(e){const n=kI(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(Lc(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(Lc(u))}},e(i.value,i)));return n}function kI(e,n){const i=new Wn({check:"custom",...Me(n)});return i._zod.check=e,i}function Zj(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??Cc,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 Yj(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??(I=>I);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 Xj(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 M in v)M==="$ref"||M==="allOf"||M in x||delete v[M];if(T.$ref&&C.def)for(const M in v)M==="$ref"||M==="allOf"||M in C.def&&JSON.stringify(v[M])===JSON.stringify(C.def[M])&&delete v[M]}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:sm(n,"input",e.processors),output:sm(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 jI=(e,n={})=>i=>{const r=Zj({...i,processors:n});return on(e,r),Yj(r,e),Xj(r,e)},sm=(e,n,i={})=>r=>{const{libraryOptions:u,target:h}=r??{},f=Zj({...u??{},target:h,io:n,processors:i});return on(e,f),Yj(f,e),Xj(f,e)},AI={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},NI=(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=AI[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}))])}},CI=(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)},_I=(e,n,i,r)=>{i.type="boolean"},TI=(e,n,i,r)=>{n.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},EI=(e,n,i,r)=>{i.not={}},RI=(e,n,i,r)=>{},DI=(e,n,i,r)=>{const u=e._zod.def,h=Cj(u.entries);h.every(f=>typeof f=="number")&&(i.type="number"),h.every(f=>typeof f=="string")&&(i.type="string"),i.enum=h},II=(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},zI=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},OI=(e,n,i,r)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},PI=(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"]})},MI=(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)},qI=(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},BI=(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},LI=(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)}},UI=(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"}]},VI=(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=(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))},KI=(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)))},GI=(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},HI=(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},FI=(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},Jj=(e,n,i,r)=>{const u=e._zod.def;on(u.innerType,n,r);const h=n.seen.get(e);h.ref=u.innerType},QI=(e,n,i,r)=>{const u=e._zod.innerType;on(u,n,r);const h=n.seen.get(e);h.ref=u},ZI=te("ZodISODateTime",(e,n)=>{G7.init(e,n),Xt.init(e,n)});function om(e){return JD(ZI,e)}const YI=te("ZodISODate",(e,n)=>{H7.init(e,n),Xt.init(e,n)});function Os(e){return WD(YI,e)}const XI=te("ZodISOTime",(e,n)=>{F7.init(e,n),Xt.init(e,n)});function JI(e){return eI(XI,e)}const WI=te("ZodISODuration",(e,n)=>{Q7.init(e,n),Xt.init(e,n)});function ez(e){return tI(WI,e)}const tz=(e,n)=>{Rj.init(e,n),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>MR(e,i)},flatten:{value:i=>PR(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,bg,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,bg,2)}},isEmpty:{get(){return e.issues.length===0}}})},Oa=te("ZodError",tz,{Parent:Error}),nz=S0(Oa),az=k0(Oa),iz=Om(Oa),sz=Pm(Oa),oz=LR(Oa),rz=UR(Oa),lz=VR(Oa),cz=$R(Oa),uz=KR(Oa),dz=GR(Oa),mz=HR(Oa),pz=FR(Oa),Ut=te("ZodType",(e,n)=>(Lt.init(e,n),Object.assign(e["~standard"],{jsonSchema:{input:sm(e,"input"),output:sm(e,"output")}}),e.toJSONSchema=jI(e,{}),e.def=n,e.type=n.type,Object.defineProperty(e,"_def",{value:n}),e.check=(...i)=>e.clone(Bs(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)=>Ls(e,i,r),e.brand=()=>e,e.register=((i,r)=>(i.add(e,r),e)),e.parse=(i,r)=>nz(e,i,r,{callee:e.parse}),e.safeParse=(i,r)=>iz(e,i,r),e.parseAsync=async(i,r)=>az(e,i,r,{callee:e.parseAsync}),e.safeParseAsync=async(i,r)=>sz(e,i,r),e.spa=e.safeParseAsync,e.encode=(i,r)=>oz(e,i,r),e.decode=(i,r)=>rz(e,i,r),e.encodeAsync=async(i,r)=>lz(e,i,r),e.decodeAsync=async(i,r)=>cz(e,i,r),e.safeEncode=(i,r)=>uz(e,i,r),e.safeDecode=(i,r)=>dz(e,i,r),e.safeEncodeAsync=async(i,r)=>mz(e,i,r),e.safeDecodeAsync=async(i,r)=>pz(e,i,r),e.refine=(i,r)=>e.check(cO(i,r)),e.superRefine=i=>e.check(uO(i)),e.overwrite=i=>e.check(tl(i)),e.optional=()=>ww(e),e.exactOptional=()=>Qz(e),e.nullable=()=>Sw(e),e.nullish=()=>ww(Sw(e)),e.nonoptional=i=>eO(e,i),e.array=()=>g(e),e.or=i=>Fe([e,i]),e.and=i=>$z(e,i),e.transform=i=>wg(e,n2(i)),e.default=i=>Xz(e,i),e.prefault=i=>Wz(e,i),e.catch=i=>nO(e,i),e.pipe=i=>wg(e,i),e.readonly=()=>sO(e),e.describe=i=>{const r=e.clone();return Cc.add(r,{description:i}),r},Object.defineProperty(e,"description",{get(){return Cc.get(e)?.description},configurable:!0}),e.meta=(...i)=>{if(i.length===0)return Cc.get(e);const r=e.clone();return Cc.add(r,i[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=i=>i(e),e)),Wj=te("_ZodString",(e,n)=>{j0.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>NI(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(cI(...r)),e.includes=(...r)=>e.check(mI(...r)),e.startsWith=(...r)=>e.check(pI(...r)),e.endsWith=(...r)=>e.check(hI(...r)),e.min=(...r)=>e.check(im(...r)),e.max=(...r)=>e.check(Fj(...r)),e.length=(...r)=>e.check(Qj(...r)),e.nonempty=(...r)=>e.check(im(1,...r)),e.lowercase=r=>e.check(uI(r)),e.uppercase=r=>e.check(dI(r)),e.trim=()=>e.check(gI()),e.normalize=(...r)=>e.check(fI(...r)),e.toLowerCase=()=>e.check(yI()),e.toUpperCase=()=>e.check(bI()),e.slugify=()=>e.check(vI())}),hz=te("ZodString",(e,n)=>{j0.init(e,n),Wj.init(e,n),e.email=i=>e.check(DD(fz,i)),e.url=i=>e.check(PD(yz,i)),e.jwt=i=>e.check(XD(Dz,i)),e.emoji=i=>e.check(MD(bz,i)),e.guid=i=>e.check(fw(vw,i)),e.uuid=i=>e.check(Hj(_c,i)),e.uuidv4=i=>e.check(ID(_c,i)),e.uuidv6=i=>e.check(zD(_c,i)),e.uuidv7=i=>e.check(OD(_c,i)),e.nanoid=i=>e.check(qD(vz,i)),e.guid=i=>e.check(fw(vw,i)),e.cuid=i=>e.check(BD(xz,i)),e.cuid2=i=>e.check(LD(wz,i)),e.ulid=i=>e.check(UD(Sz,i)),e.base64=i=>e.check(QD(Tz,i)),e.base64url=i=>e.check(ZD(Ez,i)),e.xid=i=>e.check(VD(kz,i)),e.ksuid=i=>e.check($D(jz,i)),e.ipv4=i=>e.check(KD(Az,i)),e.ipv6=i=>e.check(GD(Nz,i)),e.cidrv4=i=>e.check(HD(Cz,i)),e.cidrv6=i=>e.check(FD(_z,i)),e.e164=i=>e.check(YD(Rz,i)),e.datetime=i=>e.check(om(i)),e.date=i=>e.check(Os(i)),e.time=i=>e.check(JI(i)),e.duration=i=>e.check(ez(i))});function s(e){return RD(hz,e)}const Xt=te("ZodStringFormat",(e,n)=>{Gt.init(e,n),Wj.init(e,n)}),fz=te("ZodEmail",(e,n)=>{P7.init(e,n),Xt.init(e,n)}),vw=te("ZodGUID",(e,n)=>{z7.init(e,n),Xt.init(e,n)}),_c=te("ZodUUID",(e,n)=>{O7.init(e,n),Xt.init(e,n)});function gz(e){return Hj(_c,e)}const yz=te("ZodURL",(e,n)=>{M7.init(e,n),Xt.init(e,n)}),bz=te("ZodEmoji",(e,n)=>{q7.init(e,n),Xt.init(e,n)}),vz=te("ZodNanoID",(e,n)=>{B7.init(e,n),Xt.init(e,n)}),xz=te("ZodCUID",(e,n)=>{L7.init(e,n),Xt.init(e,n)}),wz=te("ZodCUID2",(e,n)=>{U7.init(e,n),Xt.init(e,n)}),Sz=te("ZodULID",(e,n)=>{V7.init(e,n),Xt.init(e,n)}),kz=te("ZodXID",(e,n)=>{$7.init(e,n),Xt.init(e,n)}),jz=te("ZodKSUID",(e,n)=>{K7.init(e,n),Xt.init(e,n)}),Az=te("ZodIPv4",(e,n)=>{Z7.init(e,n),Xt.init(e,n)}),Nz=te("ZodIPv6",(e,n)=>{Y7.init(e,n),Xt.init(e,n)}),Cz=te("ZodCIDRv4",(e,n)=>{X7.init(e,n),Xt.init(e,n)}),_z=te("ZodCIDRv6",(e,n)=>{J7.init(e,n),Xt.init(e,n)}),Tz=te("ZodBase64",(e,n)=>{W7.init(e,n),Xt.init(e,n)}),Ez=te("ZodBase64URL",(e,n)=>{tD.init(e,n),Xt.init(e,n)}),Rz=te("ZodE164",(e,n)=>{nD.init(e,n),Xt.init(e,n)}),Dz=te("ZodJWT",(e,n)=>{iD.init(e,n),Xt.init(e,n)}),A0=te("ZodNumber",(e,n)=>{Uj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>CI(e,r,u),e.gt=(r,u)=>e.check(yw(r,u)),e.gte=(r,u)=>e.check(Rf(r,u)),e.min=(r,u)=>e.check(Rf(r,u)),e.lt=(r,u)=>e.check(gw(r,u)),e.lte=(r,u)=>e.check(Ef(r,u)),e.max=(r,u)=>e.check(Ef(r,u)),e.int=r=>e.check(xw(r)),e.safe=r=>e.check(xw(r)),e.positive=r=>e.check(yw(0,r)),e.nonnegative=r=>e.check(Rf(0,r)),e.negative=r=>e.check(gw(0,r)),e.nonpositive=r=>e.check(Ef(0,r)),e.multipleOf=(r,u)=>e.check(bw(r,u)),e.step=(r,u)=>e.check(bw(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 nI(A0,e)}const Iz=te("ZodNumberFormat",(e,n)=>{sD.init(e,n),A0.init(e,n)});function xw(e){return iI(Iz,e)}const zz=te("ZodBoolean",(e,n)=>{oD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>_I(e,i,r)});function N(e){return sI(zz,e)}const Oz=te("ZodNull",(e,n)=>{rD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>TI(e,i,r)});function de(e){return oI(Oz,e)}const Pz=te("ZodUnknown",(e,n)=>{lD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>RI()});function kn(){return rI(Pz)}const Mz=te("ZodNever",(e,n)=>{cD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>EI(e,i,r)});function qz(e){return lI(Mz,e)}const Bz=te("ZodArray",(e,n)=>{uD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>PI(e,i,r,u),e.element=n.element,e.min=(i,r)=>e.check(im(i,r)),e.nonempty=i=>e.check(im(1,i)),e.max=(i,r)=>e.check(Fj(i,r)),e.length=(i,r)=>e.check(Qj(i,r)),e.unwrap=()=>e.element});function g(e,n){return xI(Bz,e,n)}const e2=te("ZodObject",(e,n)=>{mD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>MI(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:qz()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=i=>RR(e,i),e.safeExtend=i=>DR(e,i),e.merge=i=>IR(e,i),e.pick=i=>TR(e,i),e.omit=i=>ER(e,i),e.partial=(...i)=>zR(a2,e,i[0]),e.required=(...i)=>OR(i2,e,i[0])});function d(e,n){const i={type:"object",shape:e??{},...Me(n)};return new e2(i)}function Lz(e,n){return new e2({type:"object",shape:e,catchall:kn(),...Me(n)})}const t2=te("ZodUnion",(e,n)=>{Kj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>qI(e,i,r,u),e.options=n.options});function Fe(e,n){return new t2({type:"union",options:e,...Me(n)})}const Uz=te("ZodDiscriminatedUnion",(e,n)=>{t2.init(e,n),pD.init(e,n)});function Ve(e,n,i){return new Uz({type:"union",options:n,discriminator:e,...Me(i)})}const Vz=te("ZodIntersection",(e,n)=>{hD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>BI(e,i,r,u)});function $z(e,n){return new Vz({type:"intersection",left:e,right:n})}const Kz=te("ZodRecord",(e,n)=>{fD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>LI(e,i,r,u),e.keyType=n.keyType,e.valueType=n.valueType});function Ue(e,n,i){return new Kz({type:"record",keyType:e,valueType:n,...Me(i)})}const xg=te("ZodEnum",(e,n)=>{gD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(r,u,h)=>DI(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 xg({...n,checks:[],...Me(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 xg({...n,checks:[],...Me(u),entries:h})}});function k(e,n){const i=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new xg({type:"enum",entries:i,...Me(n)})}const Gz=te("ZodLiteral",(e,n)=>{yD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>II(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 Gz({type:"literal",values:Array.isArray(e)?e:[e],...Me(n)})}const Hz=te("ZodTransform",(e,n)=>{bD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>OI(e,i),e._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Aj(e.constructor.name);i.addIssue=h=>{if(typeof h=="string")i.issues.push(Lc(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(Lc(f))}};const u=n.transform(i.value,i);return u instanceof Promise?u.then(h=>(i.value=h,i)):(i.value=u,i)}});function n2(e){return new Hz({type:"transform",transform:e})}const a2=te("ZodOptional",(e,n)=>{Gj.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Jj(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function ww(e){return new a2({type:"optional",innerType:e})}const Fz=te("ZodExactOptional",(e,n)=>{vD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>Jj(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function Qz(e){return new Fz({type:"optional",innerType:e})}const Zz=te("ZodNullable",(e,n)=>{xD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>UI(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function Sw(e){return new Zz({type:"nullable",innerType:e})}const Yz=te("ZodDefault",(e,n)=>{wD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>$I(e,i,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Xz(e,n){return new Yz({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Tj(n)}})}const Jz=te("ZodPrefault",(e,n)=>{SD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>KI(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function Wz(e,n){return new Jz({type:"prefault",innerType:e,get defaultValue(){return typeof n=="function"?n():Tj(n)}})}const i2=te("ZodNonOptional",(e,n)=>{kD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>VI(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function eO(e,n){return new i2({type:"nonoptional",innerType:e,...Me(n)})}const tO=te("ZodCatch",(e,n)=>{jD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>GI(e,i,r,u),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function nO(e,n){return new tO({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}const aO=te("ZodPipe",(e,n)=>{AD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>HI(e,i,r,u),e.in=n.in,e.out=n.out});function wg(e,n){return new aO({type:"pipe",in:e,out:n})}const iO=te("ZodReadonly",(e,n)=>{ND.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>FI(e,i,r,u),e.unwrap=()=>e._zod.def.innerType});function sO(e){return new iO({type:"readonly",innerType:e})}const oO=te("ZodLazy",(e,n)=>{CD.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>QI(e,i,r,u),e.unwrap=()=>e._zod.def.getter()});function rO(e){return new oO({type:"lazy",getter:e})}const lO=te("ZodCustom",(e,n)=>{_D.init(e,n),Ut.init(e,n),e._zod.processJSONSchema=(i,r,u)=>zI(e,i)});function cO(e,n={}){return wI(lO,e,n)}function uO(e){return SI(e)}function Xa(e,n){return wg(n2(e),n)}const he={custom:"custom"};function Fa(e){return aI(A0,e)}const s2=d({id:s(),name:s(),keyPrefix:s(),scopes:g(s()),projectId:s().nullable(),projectName:s().nullable(),readOnly:N(),operator:N().optional(),createdAt:s(),lastUsedAt:s().nullable(),revokedAt:s().nullable()});d({keys:g(s2)});d({name:s().min(1).max(100),scopes:g(s()).min(1).optional(),projectId:s().optional()});s2.extend({key:s()});const N0=k(["used","not-used","unknown","not-applicable"]);N0.enum;const C0=k(["native-auto-v1","search-required-v1"]);C0.enum;const dO=d({maxConcurrency:m().int().positive(),maxRequestsPerMinute:m().int().positive(),maxRequestsPerDay:m().int().positive()}),Sg=["gemini","openai","claude","perplexity","muse","local","cdp:chatgpt"],bt=s().min(1),Bo=Ue(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()}),_0=k(["answer-visibility","traffic-sync","gbp-sync","data-refresh","backlinks-sync","site-audit","ads-sync","doctor"]);_0.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:_0,cronExpr:s(),recurrence:qm.nullable().optional(),preset:s().nullable().optional(),timezone:s().default("UTC"),enabled:N().default(!0),providers:g(bt).default([]),sourceId:s().nullable().optional(),lastRunAt:s().nullable().optional(),nextRunAt:s().nullable().optional(),createdAt:s(),updatedAt:s()});const mO=s().datetime();d({kind:_0.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:g(bt).optional().default([]),sourceId:s().optional(),expectedUpdatedAt:mO.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 Bm=k(["citation.lost","citation.gained","run.completed","run.failed","insight.critical","insight.high","health.degraded","health.recovered","health.urgent","health.urgent-resolved","review.negative","review.rating-dropped"]);d({id:s(),projectId:s(),channel:E("webhook"),url:s().url(),urlDisplay:s(),urlHost:s(),events:g(Bm),enabled:N().default(!0),source:s().optional(),webhookSecret:s().optional(),createdAt:s(),updatedAt:s()});d({channel:E("webhook"),url:s().url(),events:g(Bm).min(1),source:s().optional()});class pO 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 kg(e,n){return new pO("VALIDATION_ERROR",e,400,n)}function Ui(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 nl={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 hO(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 fO(e){const n=hO(e);if(n===null)throw kg(`Invalid window "${e}".`);return n==="all"?null:n.days}function o2(e){return e.map(n=>fO(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"},gO="anthropic.com",yO=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bO=/[\0-\x1F\x7F-\x9F]/,vO=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/,xO=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;var wO=class{src_Any=yO.source;src_Cc=bO.source;src_Z=xO.source;src_P=vO.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")}},Df={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)},SO={"http:":Df,"https:":Df,"ftp:":Df,"//":{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)}},kO="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",jO="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function AO(){const e=jO.split("|");return kO.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 NO={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:AO(),urlAuth:!1,maxLength:1e4},kw=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}},CO=class{__opts__;__schemas__;re;constructor(e={}){const{rebuilder:n,...i}=e;this.__opts__={...NO,...i},this.__schemas__={...SO},this.re=n||new wO,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 q=u.exec(e);if(!q){j=!0,b=void 0;break}const L=h.exec(e.slice(Math.max(0,q.index-65),q.index));if(L){if(b={schema:"mailto:",index:q.index-L[1].length,lastIndex:q.index+q[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 q=r.exec(e);if(!q){S=!0,f=void 0;break}if(f={schema:"",index:q.index+q[1].length,lastIndex:q.index+q[0].length},f.index>=C)break;r.lastIndex<T&&(r.lastIndex=T)}let I=b;(!I||f&&(f.index<I.index||f.index===I.index&&f.lastIndex>I.lastIndex))&&(I=f);let M;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(I&&v.index>I.index)break;const q=v;v=void 0;const L=this.testSchemaAt(e,q.schema,q.lastIndex);if(L){M={schema:q.schema,index:q.index,lastIndex:q.lastIndex+L};break}}let R=M;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 kw(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 kw(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 r2=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 _O(e,n){return e.endsWith(n)?e.length===n.length||e[e.length-n.length-1]===".":!1}function TO(e,n){const i=e.length-n.length-2,r=e.lastIndexOf(".",i);return r===-1?e:e.slice(r+1)}function EO(e,n,i){if(i.validHosts!==null){const u=i.validHosts;for(const h of u)if(_O(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:TO(n,e)}function RO(e,n){return e.slice(0,-n.length-1)}const If=/[\t\n\r]/g;let jg=!1;function jw(e){return e>=97&&e<=122||e>=48&&e<=57||e>127||e>=65&&e<=90||e===45||e===95}function Aw(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 Tc(e,n,i=!1){let r=0,u=e.length,h=!1,f=!1;if(jg=!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=Aw(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 q=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&q<2;)r+=1,q+=1;if(q<2)return null}else{for(let q=r;q<R;q+=1){const L=e.charCodeAt(q)|32;if(!(L>=97&&L<=122||L>=48&&L<=57||L===46||L===45||L===43)){const $=e.charCodeAt(q);return $===9||$===10||$===13?Tc(e.replace(If,""),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 q=r;q<u;q+=1){const L=e.charCodeAt(q);if(L===9||L===10||L===13)return Tc(e.replace(If,""),n,i);if(L===58){P=q;break}if(L===47||L===92||L===63||L===35)break}if(P!==-1){let q=!1;for(let L=P+1;L<u;L+=1){const $=e.charCodeAt(L);if($===47||$===92||$===63||$===35)break;if($===64){q=!0;break}}if(!q){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=Aw(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,I=r-1,M=-1;if(i&&r<u){const R=e.charCodeAt(r);(!(jw(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-I>64||M===46||M===45)&&(T=!1),I=R):(P<48||P>57)&&(P!==45||M===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&&!jw(P)&&(T=!1);i&&(M=P)}if(C)return Tc(e.replace(If,""),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-I-1<=63&&M!==45&&(jg=!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 DO(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 IO(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 zO(e){return IO(e)||DO(e)}const OO=["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 PO(e){for(const n of OO)if(e.endsWith(n)&&(e.length===n.length||e.charCodeAt(e.length-n.length-1)===46))return!0;return!1}function Nw(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function Cw(e){if(e.length>255||e.length===0||!Nw(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(!(Nw(h)||h===45||h===95)||h===45&&i===46)return!1;i=h}return r-n-1<=63&&i!==45}function l2({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 MO=l2({});function qO(e){return e===void 0?MO:l2(e)}function BO(e,n){return n.length===e.length?"":e.slice(0,-n.length-1)}function LO(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function T0(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 E0(e,n,i,r,u){const h=qO(r);if(typeof e!="string")return u;let f=!1;return h.extractHostname?h.mixedInputs?(f=Cw(e),u.hostname=Tc(e,f,h.validateHostname)):u.hostname=Tc(e,!1,h.validateHostname):u.hostname=e,h.detectIp&&u.hostname!==null&&(u.isIp=zO(u.hostname),u.isIp)?u:h.validateHostname&&h.extractHostname&&u.hostname!==null&&!(f&&u.hostname===e)&&!jg&&!Cw(u.hostname)?(u.hostname=null,u):(n===0||u.hostname===null||(n===5&&h.detectSpecialUse&&(u.isSpecialUse=PO(u.hostname)),i(u.hostname,h,u),n===2||u.publicSuffix===null)||(u.domain=EO(u.publicSuffix,u.hostname,h),n===3||u.domain===null)||(u.subdomain=BO(u.hostname,u.domain),n===4)||(u.domainWithoutSuffix=RO(u.domain,u.publicSuffix)),u)}function UO(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 No=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]),rm=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]),lm=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]),_w=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]),Ag="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",VO=621,$O=625,c2=No.length,u2=lm.length,d2=new Uint32Array(u2),Qd=new Uint32Array(u2),Ng=new Int32Array(c2).fill(-1);for(let e=0,n=0;e<c2;e+=1)for(let i=rm[e];i<rm[e+1];i+=1){d2[i]=n;const r=n+lm[i];let u=5381;for(let h=r-1;h>=n;h-=1)u=u*33^Ag.charCodeAt(h);Qd[i]=u>>>0,lm[i]===1&&Ag.charCodeAt(n)===42&&(Ng[e]=i),n=r}let Vi=-1,Cg=0,_g=0;function Tw(e,n,i,r){if(lm[e]!==r)return!1;const u=d2[e];for(let h=0;h<r;h+=1)if(Ag.charCodeAt(u+h)!==n.charCodeAt(i+h))return!1;return!0}function Ew(e,n,i,r,u){let h=rm[e],f=rm[e+1];for(;h<f;){const b=h+f>>>1,v=Qd[b];if(v<n)h=b+1;else if(v>n)f=b;else{for(let x=b;x>=h&&Qd[x]===n;x-=1)if(Tw(x,i,r,u))return x;for(let x=b+1;x<f&&Qd[x]===n;x+=1)if(Tw(x,i,r,u))return x;return-1}}return-1}function Rw(e,n,i){let r=n,u=e.length,h=5381;Vi=-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=Ew(r,h>>>0,e,x,u-x);if(S===-1&&(S=Ng[r]),S===-1)return Vi!==-1;r=_w[S],(No[r]&i)!==0&&(Vi=r,Cg=x,_g=u),u=b,h=5381}else h=h*33^v}let f=Ew(r,h>>>0,e,0,u);return f===-1&&(f=Ng[r]),f!==-1&&(r=_w[f],(No[r]&i)!==0&&(Vi=r,Cg=0,_g=u)),Vi!==-1}function R0(e,n,i){if(UO(e,n,i))return;const r=(n.allowPrivateDomains?2:0)|(n.allowIcannDomains?1:0);if(Rw(e,$O,r)){i.isIcann=(No[Vi]&1)!==0,i.isPrivate=(No[Vi]&2)!==0,i.publicSuffix=e.slice(_g+1);return}if(Rw(e,VO,r)){i.isIcann=(No[Vi]&1)!==0,i.isPrivate=(No[Vi]&2)!==0,i.publicSuffix=e.slice(Cg);return}i.isIcann=!1,i.isPrivate=!1;const u=e.lastIndexOf(".");i.publicSuffix=u===-1?e:e.slice(u+1)}const Fr=LO();function KO(e,n){return T0(Fr),E0(e,0,R0,n,Fr).hostname}function GO(e,n){return T0(Fr),E0(e,3,R0,n,Fr).domain}function HO(e,n){return T0(Fr),E0(e,5,R0,n,Fr).domainWithoutSuffix}function m2(e,n){return e<n?-1:e>n?1:0}const p2={allowPrivateDomains:!0};new CO({fuzzyLink:!0,fuzzyEmail:!1}).tlds(r2);function eu(e){if(e==null)return null;const n=e.trim();if(!n)return null;const i=KO(n);return i?i.replace(/^www\./i,"").toLowerCase():null}function FO(e){return e==null||e.trim()===""?"":GO(e,p2)?.toLowerCase()??""}function Uc(e){return eu(e)??e.trim().toLowerCase().replace(/^www\./,"")}function D0(e){return e==null||e.trim()===""?"":HO(e,p2)?.toLowerCase()??""}function Cae(e){return D0(e)||e}const I0=k(["chatgpt","perplexity","gemini","claude","copilot","grok","deepseek","meta-ai","phind","you-com"]),li=I0.enum,Lm=[{engine:li.chatgpt,label:"ChatGPT",domains:[Xn.chatgpt,Xn.chatgptLegacy,Xn.openai],tokens:["chatgpt","openai"],labels:["chatgpt","openai"],appIds:["com.openai.chatgpt"]},{engine:li.perplexity,label:"Perplexity",domains:[Xn.perplexity],tokens:["perplexity"],labels:["perplexity"],appIds:["ai.perplexity.app.android"]},{engine:li.gemini,label:"Gemini",domains:[Xn.gemini,Xn.bard],tokens:["gemini","bard"],labels:[],appIds:["com.google.android.apps.bard"]},{engine:li.claude,label:"Claude",domains:[Xn.claude,gO],tokens:["claude","anthropic"],labels:["claude","anthropic"],appIds:["com.anthropic.claude"]},{engine:li.copilot,label:"Copilot",domains:[Xn.copilotMicrosoft,Xn.copilot],tokens:["copilot"],labels:[],appIds:["com.microsoft.copilot"]},{engine:li.grok,label:"Grok",domains:[Xn.grok],tokens:["grok"],labels:[],appIds:["ai.x.grok"]},{engine:li.deepseek,label:"DeepSeek",domains:[Xn.deepseek],tokens:["deepseek"],labels:["deepseek"],appIds:["com.deepseek.chat"]},{engine:li["meta-ai"],label:"Meta AI",domains:[Xn.metaAi],tokens:[],labels:[],appIds:["com.facebook.stella"]},{engine:li.phind,label:"Phind",domains:[Xn.phind],tokens:["phind"],labels:["phind"],appIds:[]},{engine:li["you-com"],label:"You.com",domains:[Xn.you],tokens:[],labels:[],appIds:[]}];new Map(Lm.flatMap(e=>e.tokens.map(n=>[n,e.engine])));new Map(Lm.flatMap(e=>e.appIds.map(n=>[n,e.engine])));new Map(Lm.flatMap(e=>e.labels.map(n=>[n,e.engine])));new Map(Lm.map(e=>[e.engine,e.label]));const QO=k(["fraction","percent"]),Qa=QO.enum,ZO="x-unit";function h2(e,n){return e.meta({[ZO]:n})}function ve(e=m()){return h2(e,Qa.fraction)}function ot(e=m()){return h2(e,Qa.percent)}Qa.fraction+"",Qa.percent+"";function zf(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 Dw(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 YO=s().trim().min(1).refine(e=>Dw(e)!==null,{message:"Marketing hosts must be valid hostnames without credentials or ports"}).overwrite(e=>Dw(e)??e),XO=s().trim().min(1),JO=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"}),di=d({marketingHosts:g(YO).overwrite(e=>zf(e,!0)),brandTerms:g(XO).overwrite(e=>zf(e,!0)),leadEventNames:g(JO).overwrite(e=>zf(e))});function WO(){return{marketingHosts:[],brandTerms:[],leadEventNames:["generate_lead"]}}const Of=Object.freeze({marketingHosts:Object.freeze([]),brandTerms:Object.freeze([]),leadEventNames:Object.freeze(["generate_lead"])}),f2=()=>WO(),Tg=k(["never-synced","ready","error"]),e9=k(["landing-page","channel"]),t9=k(nl.gaMeasurementAnalysis),n9=k(["marketing","all"]),Ec=Os(),al=d({label:k(["earliest","middle","previous","latest"]),startDate:Ec,endDate:Ec}),Pf=al.extend({sessions:m().int().nonnegative()}),Iw=al.extend({eventCount:m().int().nonnegative()}),zw=al.extend({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),a9=al.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()}),Mf=al.extend({eventCount:m().int().nonnegative(),sessions:m().int().nonnegative(),leadRate:ve(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 Ow=d({periods:g(Mf),engines:g(d({engine:I0,label:s(),sources:g(s()),periods:g(Mf)})),unattributed:d({sources:g(s()),periods:g(Mf)})}),i9=d({leadRateAvailable:N(),leadRateUnavailableReason:g2.nullable(),organic:Ow,paid:Ow}),s9=al.extend({sessions:m().int().nonnegative(),engagementRate:ve(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()}),o9=d({window:t9,bucketDays:E(30),filters:d({hostScope:n9,marketingHosts:g(s()),pathPrefix:s().nullable(),brandTerms:g(s()),queryMixScope:E("property")}),acquisition:d({status:Tg,error:s().nullable(),syncedAt:s().datetime().nullable(),periods:g(Pf),channels:g(d({channelGroup:s(),periods:g(Pf)})),pages:g(d({hostName:s(),landingPage:s(),periods:g(Pf)}))}),leads:d({status:Tg,error:s().nullable(),syncedAt:s().datetime().nullable(),attributionScope:e9.nullable(),hostAndPathFiltersApplied:N(),periods:g(Iw),channels:g(d({channelGroup:s(),periods:g(Iw)})),aiEngines:i9}),engagement:d({status:k(["ready","unavailable"]),availableFromDate:Ec.nullable(),latestDate:Ec.nullable(),periods:g(s9)}),searchDemand:d({status:k(["ready","unavailable"]),periods:g(a9),queries:g(d({query:s(),classification:k(["branded","non-branded"]),periods:g(zw)})),pages:g(d({hostName:s(),landingPage:s(),periods:g(zw)})),latestDate:Ec.nullable()})}),tu=k(["sync","batch"]);tu.enum;const il=Ue(s(),tu),y2=k(["submitting","submitted","ended","ingested","cancelled","failed","unknown"]),Pw=y2.enum;Pw.submitted,Pw.ended;const z0=k(["standard","batch"]),Mw=z0.enum,r9=d({inputTokens:m().int().nonnegative(),cachedInputTokens:m().int().nonnegative(),cacheWriteTokens:m().int().nonnegative(),outputTokens:m().int().nonnegative(),searchCount:m().int().nonnegative()}),l9=r9.extend({pricingTier:z0,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:Ue(s().min(1),b2).default({})}).strict();d({enabled:N().default(!1),maxRequestsPerBatch:m().int().positive().optional(),deadlineHours:m().positive().optional()}).strict();const c9=new Intl.Segmenter("en",{granularity:"word"}),u9=/[^\p{L}\p{N}]+/gu,d9=/[\p{L}\p{N}]+/gu,m9=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,p9=new RegExp("\\P{ASCII}","u");function h9(e){if(!p9.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&&m9.test(u)?u:i}return n}function v2(e){return h9(e.normalize("NFKC")).toLocaleLowerCase("en")}function x2(e){const n=[];for(const i of c9.segment(e))if(i.isWordLike)for(const r of i.segment.match(d9)??[])n.push(r);return n}function f9(e){return x2(v2(e))}function za(e){return f9(e).join("")}const qw=new WeakMap;function g9(e){if(!e)return null;const n=v2(e);return{normalized:n,stripped:n.replace(u9,"")}}function y9(e){const n=qw.get(e);if(n)return n;const i=x2(e.normalized);return qw.set(e,i),i}function b9(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 v9(e,n){if(!n||e.keys.size===0)return!1;const i=typeof n=="string"?g9(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=y9(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 x9=d({name:s(),accountName:s().nullable(),type:s().nullable(),role:s().nullable()});d({accounts:g(x9),total:m().int().nonnegative()});const w9=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:g(s()),description:s().nullable(),serviceArea:Ue(s(),kn()).nullable(),regularHours:Ue(s(),kn()).nullable(),primaryPhone:s().nullable(),openStatus:s().nullable(),openingDate:s().nullable(),selected:N(),syncedAt:s().nullable(),createdAt:s(),updatedAt:s()});d({locations:g(w9),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:g(s()).optional(),daysOfMetrics:m().int().positive().max(540).optional(),monthsOfKeywords:m().int().positive().max(18).optional()});d({runId:s(),status:s()});const S9=d({locationName:s(),date:s(),metric:s(),value:m().int()});d({metrics:g(S9),total:m().int().nonnegative()});const k9=d({locationName:s(),periodStart:s(),periodEnd:s(),keyword:s(),valueCount:m().int().nullable(),valueThreshold:m().int().nullable()});d({keywords:g(k9),total:m().int().nonnegative(),thresholdedPct:ot(m().min(0).max(100))});const j9=d({locationName:s(),placeActionLinkName:s(),placeActionType:s(),uri:s().nullable(),isPreferred:N(),providerType:s().nullable()});d({placeActions:g(j9),total:m().int().nonnegative()});const A9=d({locationName:s(),populatedGroupCount:m().int().nonnegative(),syncedAt:s(),attributes:Ue(s(),kn())});d({lodging:g(A9),total:m().int().nonnegative()});const N9=d({name:s(),valueType:s(),values:g(Fe([N(),s()])),unsetValues:g(s()),uris:g(s())}),C9=d({locationName:s(),attributeCount:m().int().nonnegative(),syncedAt:s(),attributes:g(N9)});d({attributes:g(C9),total:m().int().nonnegative()});const _9=d({locationName:s(),placeId:s(),tier:s(),amenities:g(s()),syncedAt:s(),place:Ue(s(),kn())});d({places:g(_9),total:m().int().nonnegative()});const w2=k(["gbp","places"]),Um=m().int().min(1).max(4),T9=k(["ok","unavailable","error"]),S2=k(["none","baseline","stale","pending","sent","skipped","suppressed"]);S2.enum;const E9=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()}),R9=d({locationName:s(),displayName:s(),reviewsAccess:T9.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:g(R9),reviews:g(E9),total:m().int().nonnegative()});d({scope:d({locationName:s().nullable(),locationCount:m().int().nonnegative()}),performance:d({totals:Ue(s(),m()),recent7d:Ue(s(),m()),prior7d:Ue(s(),m()),deltaPct:Ue(s(),ot().nullable())}),freshness:d({dataThroughDate:s().nullable(),latestStoredDate:s().nullable(),pendingDays:m().int().nonnegative()}),timeseries:g(d({date:s(),pending:N(),metrics:Ue(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 D9={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 I9(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 _ae(e){return D9[e]??I9(e)}const z9=["BUSINESS_DIRECTION_REQUESTS","WEBSITE_CLICKS","CALL_CLICKS"],O9=["BUSINESS_IMPRESSIONS_DESKTOP_SEARCH","BUSINESS_IMPRESSIONS_MOBILE_SEARCH","BUSINESS_IMPRESSIONS_DESKTOP_MAPS","BUSINESS_IMPRESSIONS_MOBILE_MAPS"];function Tae(e){return z9.includes(e)?"conversion":O9.includes(e)?"reach":"other"}const pt=s().trim().min(1),Bw=s().regex(/^[a-f0-9]{64}$/i);function P9(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(P9,{message:"Expected a calendar date as YYYY-MM-DD."});function M9(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 q9=k(["not-connected","selection-required","connected","stale"]),Ed=q9.enum,k2=k(["enabled","suspended","closed","canceled","unspecified","unknown"]);k2.enum;const O0=k(["enabled","paused","removed","unknown"]);O0.enum;const j2=k(["enabled","hidden","removed","unknown"]);j2.enum;const P0=k(["customer","campaign"]);P0.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(),qf=d({id:pt,projectId:pt,scopes:g(s()).default([]),selection:N2,lastValidatedAt:s().nullable(),lastInventorySnapshotAt:s().nullable(),lastMetricsSnapshotAt:s().nullable(),createdAt:s(),updatedAt:s()}).strict(),Eg=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(),B9=d({customers:g(Eg),totalAccessible:m().int().nonnegative(),truncated:N(),selection:N2,fetchedAt:s()}).strict();Ve("status",[d({connected:E(!1),status:E(Ed["not-connected"]),connection:de(),selectedCustomer:de()}).strict(),d({connected:E(!0),status:E(Ed["selection-required"]),connection:qf,selectedCustomer:de()}).strict(),d({connected:E(!0),status:E(Ed.connected),connection:qf,selectedCustomer:Eg}).strict(),d({connected:E(!0),status:E(Ed.stale),connection:qf,selectedCustomer:Eg}).strict()]);const L9=d({id:pt,resourceName:pt,name:s(),status:O0,advertisingChannelType:s().nullable(),biddingStrategyType:s().nullable()}).strict(),U9=d({id:pt,resourceName:pt,name:s(),status:j2,category:s(),origin:s(),primaryForGoal:N(),includeInConversionsMetric:N()}).strict(),V9=d({category:s(),origin:s(),biddable:N()}).strict(),$9=d({campaignId:pt,category:s(),origin:s(),biddable:N()}).strict(),K9=d({id:pt,name:s(),conversionActionIds:g(pt)}).strict(),G9=d({campaignId:pt,goalConfigLevel:P0,customGoalId:pt.nullable()}).strict(),H9=d({customerId:pt,fetchedAt:s(),campaigns:g(L9),conversionActions:g(U9),customerConversionGoals:g(V9),campaignConversionGoals:g($9),campaignConversionGoalsComplete:N().optional(),customConversionGoals:g(K9),campaignGoalConfigurations:g(G9)}).strict(),F9=d({source:A2,category:s().nullable(),origin:s().nullable(),customGoalId:pt.nullable(),biddable:N().nullable(),conversionActionIds:g(pt),primaryConversionActionIds:g(pt),secondaryConversionActionIds:g(pt),missingConversionActionIds:g(pt)}).strict(),Q9=d({campaignId:pt,goalConfigLevel:P0,customGoalId:pt.nullable(),missingCustomGoalId:pt.nullable(),goals:g(F9)}).strict();d({customerId:pt,derivedAt:s(),campaigns:g(Q9)}).strict();const C2=50,Rg=31,Z9=C2*Rg,Y9=d({campaignIds:g(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:he.custom,path:["campaignIds"],message:"Campaign IDs must be unique."}),e.endDate<e.startDate){n.addIssue({code:he.custom,path:["endDate"],message:"endDate must not precede startDate."});return}M9(e.startDate,e.endDate)>Rg&&n.addIssue({code:he.custom,path:["endDate"],message:`Campaign metrics may cover at most ${Rg} calendar days.`})}),X9=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(),J9=d({query:Y9,rows:g(X9).max(Z9),truncated:N(),fetchedAt:s()}).strict(),_2=k(["accessible-customers","inventory","campaign-metrics"]),Bf=_2.enum,M0=d({id:pt,projectId:pt,connectionId:pt,runId:pt,kind:_2,customerId:pt.nullable(),payloadChecksum:Bw,rawPayloadSha256:Bw.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:s(),createdAt:s()}).strict(),W9=Ve("kind",[d({kind:E(Bf["accessible-customers"]),data:B9}).strict(),d({kind:E(Bf.inventory),data:H9}).strict(),d({kind:E(Bf["campaign-metrics"]),data:J9}).strict()]),eP=d({metadata:M0,payload:W9}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:he.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),tP=k(nl.googleAdsMetrics),q0=d({impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),conversionValueMicros:m().int().nonnegative().nullable(),ctr:ve().nullable(),cpcMicros:m().int().nonnegative().nullable(),conversionRate:ve().nullable(),costPerConversionMicros:m().int().nonnegative().nullable()}),nP=d({date:jn,origin:k(["provider","filled"]),impressions:m().int().nonnegative(),clicks:m().int().nonnegative(),costMicros:m().int().nonnegative(),conversions:m().nonnegative(),ctr:ve().nullable()}),aP=d({campaignId:pt,name:s().nullable(),status:O0,totals:q0}),iP=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()}),sP=d({startDate:jn,endDate:jn,days:m().int().positive(),totals:q0}),oP=d({days:m().int().positive(),prior:sP,change:d({impressions:ve().nullable(),clicks:ve().nullable(),costMicros:ve().nullable(),conversions:ve().nullable(),ctr:ve().nullable(),conversionRate:ve().nullable()})});d({window:tP,startDate:jn,endDate:jn,days:m().int().positive(),totals:q0,daily:g(nP),campaigns:g(aP),comparison:oP.nullable(),comparisonUnavailableReason:k(["insufficient-history","no-snapshot"]).nullable(),source:iP.nullable()});const Vm=k(["complete","partial","failed","unsupported"]);Vm.enum;const rP=["branded","non-brand"],Lo=k(rP),B0=k(["all","branded","non-brand"]);function lP(e){const n=e.filter(r=>za(r).length>0);if(n.length===0)return null;const i=b9(n);return i.keys.size===0?null:{matcher:i,classify(r){return v9(i,r)?"branded":"non-brand"}}}const cP=2,uP=s().regex(/^[a-f0-9]{64}$/),$m=s().trim().min(1).max(256),Lw=k(["sensitive","insensitive"]),fe=s().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),dP=s().trim().min(1).refine(e=>eu(e)!==null,"A competitor domain must be a valid hostname"),mP=Ve("kind",[d({kind:E("exact"),url:s().min(1),pathCase:Lw}).strict(),d({kind:E("prefix"),host:s().min(1),pathPrefix:s().min(1),pathCase:Lw}).strict(),d({kind:E("host"),host:s().min(1)}).strict()]),pP=d({canonicalHost:s().min(1),ownedHosts:g(s().min(1)),names:g(s().min(1))}).strict(),hP=d({projectBrand:pP}).strict(),fP=d({stableKey:fe,label:s().trim().min(1),aliases:g(s().min(1)),identityAliases:g(s().trim().min(1)).optional(),urlMatchers:g(mP),mentionNotApplicable:N(),discoveryIdentity:s().min(1).nullable()}).strict(),T2=d({stableKey:fe,label:s().trim().min(1),domain:dP,aliases:g(s().min(1))}).strict(),gP=d({stableKey:fe,label:s().trim().min(1),parentGroupKey:fe.optional(),targetKeys:g(fe),competitors:g(T2)}).strict(),yP=k(["manual","query-set","template","discovery","research"]),bP=d({templateId:s().trim().min(1).max(256),templateVersion:s().trim().min(1).max(256),template:s().trim().min(1).max(4e3),bindings:Ue(s().trim().min(1).max(128),s().trim().min(1).max(128)),output:s().trim().min(1).max(4e3)}).strict(),E2=d({source:yP,sourceId:s().min(1).nullable(),capturedAt:s().datetime(),template:bP.optional()}).strict(),vP=d({queryId:$m,queryText:s().min(1),provenance:E2}).strict(),Km=d({providers:g(bt).min(1),models:Ue(bt,s().min(1)),location:Jt.nullable()}).strict(),xP=d({stableKey:s().min(1),queryId:$m,queryText:s().min(1),context:Km,expectedSnapshots:m().int().nonnegative()}).strict(),L0=Lo,wP=d({targetKey:fe,queryId:$m,queryClass:L0,classificationSource:k(["server","operator"]).optional(),executionNodeKey:s().min(1)}).strict(),U0=d({executionNodeKey:s().min(1),targetKey:fe,queryId:$m}).strict(),R2=d({stableKey:fe,label:s().trim().min(1),kind:E("market"),groupKey:fe.optional(),usageEdges:g(U0)}).strict();function Uw(e){return[e.executionNodeKey,e.targetKey,e.queryId].join("\0")}const Gm=d({schemaVersion:E(cP),identities:hP,targets:g(fP),groups:g(gP),querySnapshots:g(vP),assignments:g(wP),executionNodes:g(xP),usageEdges:g(U0),reportingScopes:g(R2).optional(),compiledChecksum:uP}).strict().superRefine((e,n)=>{const i=new Set;for(const b of e.executionNodes)i.has(b.stableKey)&&n.addIssue({code:he.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:he.custom,path:["usageEdges",v,"executionNodeKey"],message:`Usage edge references unknown execution node "${b.executionNodeKey}"`}),r.has(b.targetKey)||n.addIssue({code:he.custom,path:["usageEdges",v,"targetKey"],message:`Usage edge references unknown Target "${b.targetKey}"`})});const u=new Set(e.usageEdges.map(Uw)),h=new Set;e.reportingScopes?.forEach((b,v)=>{if(h.has(b.stableKey)&&n.addIssue({code:he.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:he.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=Uw(S);u.has(C)||n.addIssue({code:he.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:he.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:he.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:he.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:he.custom,path:["groups",v,"parentGroupKey"],message:"A group cannot be its own parent."});return}const S=f.get(x);if(!S){n.addIssue({code:he.custom,path:["groups",v,"parentGroupKey"],message:"Group parent does not exist: "+x});return}const j=new Set(S.targetKeys);b.targetKeys.forEach((I,M)=>{j.has(I)||n.addIssue({code:he.custom,path:["groups",v,"targetKeys",M],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:he.custom,path:["groups",v,"parentGroupKey"],message:"Group parent relationships cannot contain a cycle."});break}C.add(T.stableKey);const I=f.get(T.parentGroupKey);if(!I)break;T=I}});for(const b of e.groups)for(const v of b.targetKeys)r.has(v)||n.addIssue({code:he.custom,path:["groups"],message:`Group "${b.stableKey}" references unknown Target "${v}"`})}),V0=100;function To(e){return d({items:g(e),nextCursor:s().min(1).nullable(),totalEstimate:m().int().nonnegative().optional()}).strict()}const nu=k(["no_completed_run","plan_v1","no_population","evidence_incomplete","identity_ambiguous","not_applicable"]),pn=Ve("state",[d({state:E("available"),value:ve(),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:nu}).strict()]),Ro=Ve("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:nu}).strict()]),D2=k(["all","group","market","property"]),ea=B0,SP="non-brand",kP=k(["label-asc","label-desc","citationCoverage-asc","citationCoverage-desc","mentionCoverage-asc","mentionCoverage-desc"]),$0=k(["not_measured","queued","running","complete","partial","failed"]),jP=k(["run_measurement","review_flags","complete_setup","republish_setup","none"]);d({scope:D2,groupKey:fe.optional(),marketKey:fe.optional(),targetKey:fe.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:kP.optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(V0).optional(),compact:N().optional()}).strict();const AP=d({provider:bt,mentionCoverage:pn,citationCoverage:pn}).strict(),NP=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(),Dg=d({groupKey:fe,label:s().trim().min(1)}).strict(),CP=d({targetKey:fe,label:s().min(1),metro:Dg.nullable().optional(),otherMetros:g(Dg).min(1).optional(),mentionCoverage:pn,citationCoverage:pn,providers:g(AP),flags:m().int().nonnegative()}).strict(),_P=d({kind:k(["project","competitor"]),stableKey:s().min(1),label:s().min(1),domain:s().min(1),credits:m().int().nonnegative(),share:ve(m().min(0).max(1))}).strict(),TP=d({groupKey:fe,queryClass:E("non-brand"),denominator:m().int().positive(),entries:g(_P)}).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:$0,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:jP,count:m().int().nonnegative().optional()}).strict(),metrics:d({propertiesMentioned:Ro,mentionCoverage:pn,citationCoverage:pn,brandPresence:pn,sov:pn.describe("Deprecated alias of brandPresence carrying the identical value. Remove once the browser migrates.")}).strict(),properties:To(CP),outcomes:NP,flags:d({total:m().int().nonnegative()}).strict(),namedShareOfVoice:TP.optional(),detailsOmitted:g(s()).optional()}).strict();const I2=k(["sources","answers","other-queries"]),EP=I2.enum;EP.sources;d({targetKey:fe,queryClass:ea.optional(),provider:bt.optional(),location:s().trim().min(1).optional(),runId:s().trim().min(1).optional(),shape:I2.optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(V0).optional()}).strict();const z2=1,au=m().int().positive(),bn=s().trim().min(1).max(128).regex(/^[a-z0-9][\w.~-]*$/i,"Must be a URL-safe stable key"),iu=s().trim().min(1).max(256),Vw=k(["sensitive","insensitive"]);function cm(e){const n=eu(e);if(!n)throw new Error(`Invalid measurement host: ${e}`);return n}function RP(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 $w(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 RP(n.replace(/%[0-9a-f]{2}/gi,i=>i.toUpperCase()))}function Ig(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 DP(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 Kw(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=cm(i.hostname),u=Ig(DP(n));return`https://${r}${u}`}const Vc=s().trim().min(1).refine(e=>{try{return cm(e),!0}catch{return!1}},"A target URL matcher host must be a valid hostname").overwrite(e=>cm(e)),IP=s().trim().min(1).refine(e=>{try{return Ig(e),!0}catch{return!1}},"A target URL matcher pathPrefix must be an absolute path without query or fragment").overwrite(e=>Ig(e)),zP=s().trim().min(1).refine(e=>{try{return Kw(e),!0}catch{return!1}},"A target exact matcher must be an HTTP(S) URL without credentials, port, query, or fragment").overwrite(e=>Kw(e)),OP=Ve("kind",[d({kind:E("exact"),url:zP,pathCase:Vw}).strict(),d({kind:E("prefix"),host:Vc,pathPrefix:IP,pathCase:Vw}).strict(),d({kind:E("host"),host:Vc}).strict()]),P2=s().trim().min(1).max(256).refine(e=>za(e).length>0,"A target alias must contain mention text"),PP=Ue(s().trim().min(1),s()),MP=Vc,M2=d({stableKey:bn,label:s().trim().min(1),urls:g(OP).min(1),aliases:g(P2),metadata:PP.optional()}).strict(),K0=d({stableKey:bn,label:s().trim().min(1),targetKeys:g(bn).min(1),competitors:g(MP).optional()}).strict(),q2=d({targetKey:bn,queryIds:g(iu).min(1),context:Jt.nullable().optional()}).strict();function qP(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 Lf(e,n,i,r,u){for(const h of qP(n,u))e.addIssue({code:"custom",path:[...i],message:`Duplicate ${r}: ${h}`})}function Gw(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:cm(n.hostname),pathname:O2(n.pathname||"/")}}function BP(e,n,i,r){return e===i||(n==="insensitive"||r==="insensitive")&&$w(e)===$w(i)}function LP(e,n){if(e.kind!==n.kind)return!1;const i=Gw(e),r=Gw(n);return i.host!==r.host?!1:e.kind==="host"||n.kind==="host"?!0:BP(i.pathname,e.pathCase,r.pathname,n.pathCase)}function UP(e){const n=new Set;return[...e].sort(m2).filter(i=>{const r=za(i);return n.has(r)?!1:(n.add(r),!0)})}const B2=d({schemaVersion:E(z2),targets:g(M2).min(1),groups:g(K0).optional(),targetQuerySelections:g(q2).optional()}).strict().superRefine((e,n)=>{const i=e.groups??[],r=e.targetQuerySelections??[];Lf(n,e.targets.map(v=>v.stableKey),["targets"],"target stable key"),Lf(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 UP(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&&LP(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)=>{Lf(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:au.nullable(),plan:B2}).strict();const VP=d({queryId:iu,queryText:s().min(1)}).strict(),G0=d({stableKey:s().min(1),queryText:s().min(1),context:Jt.nullable(),expectedSnapshots:m().int().nonnegative()}).strict(),$P=d({kind:E("baseline"),executionNodeKey:s().min(1),queryId:iu}).strict(),KP=d({kind:E("target"),executionNodeKey:s().min(1),queryId:iu,targetKey:bn}).strict(),zg=Ve("kind",[$P,KP]),L2=d({code:E("target-alias-prefix-overlap"),message:s().min(1),targetKeys:g(bn).min(1),aliases:g(s().min(1)).min(1)}).strict(),U2=M2.extend({mentionNotApplicable:N()}),V2=d({schemaVersion:E(z2),defaultContext:Jt.nullable(),effectiveOwnedHosts:g(Vc),projectCanonicalHost:Vc,projectBrandNames:g(P2),targets:g(U2),groups:g(K0),targetQuerySelections:g(q2),querySnapshots:g(VP),executionNodes:g(G0),usageEdges:g(zg),warnings:g(L2)}).strict(),GP=V2,$2=Ve("schemaVersion",[V2,Gm]),H0=s().regex(/^[a-f0-9]{64}$/),F0=s().datetime(),K2=d({schemaVersion:E(1),language:s().min(1).optional(),providers:g(s().min(1)).min(1),models:Ue(s().min(1),s().min(1)),checksum:s().regex(/^[a-f0-9]{64}$/)}).strict(),HP=d({groups:g(bn).optional(),targets:g(bn).optional()}).strict(),FP=d({groups:g(bn),targets:g(bn),queries:g(s().min(1)),resolvedTargets:g(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:au,checksum:H0,createdAt:F0,plan:$2}).nullable()});d({versions:g(d({revision:au,checksum:H0,createdAt:F0,active:N()}))});d({version:d({revision:au,checksum:H0,createdAt:F0,active:N(),plan:$2})});const Zd=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(),QP=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:QP,severity:k(["fail","warn"]),message:s().min(1),path:g(Fe([s(),m().int()]))}).strict(),ZP=d({baseline:m().int().nonnegative(),target:m().int().nonnegative()}).strict(),H2=d({ok:E(!0),checks:g(G2),executionNodes:g(G0),dedupSaved:m().int().nonnegative(),usageEdges:ZP,estCostUsd:de(),plan:GP,warnings:g(L2),counts:Zd}).strict(),F2=d({ok:E(!1),checks:g(G2).min(1),executionNodes:g(G0).length(0),dedupSaved:E(0),usageEdges:d({baseline:E(0),target:E(0)}).strict(),estCostUsd:de()}).strict();Ve("ok",[H2,F2]);const Rd=d({targetKey:bn,context:Jt.nullable(),queryIds:g(iu)}).strict();function Hw(e){return d({added:g(e),removed:g(e),changed:g(d({stableKey:bn,before:e,after:e}).strict()),unchanged:g(bn)}).strict()}const YP=H2.extend({diff:d({activeRevision:au.nullable(),targets:Hw(U2),groups:Hw(K0),querySelections:d({added:g(Rd),removed:g(Rd),changed:g(d({targetKey:bn,before:Rd,after:Rd}).strict()),unchanged:g(d({targetKey:bn,context:Jt.nullable()}).strict())}).strict(),execution:d({addedNodeKeys:g(s().min(1)),removedNodeKeys:g(s().min(1)),addedUsageEdges:g(zg),removedUsageEdges:g(zg),counts:d({before:Zd.nullable(),after:Zd,delta:Zd.nullable()}).strict()}).strict()}).strict()}).strict(),XP=F2.extend({diff:de()}).strict();Ve("ok",[YP,XP]);const Q0=k(["PROVIDER_AUTH","PROVIDER_BILLING","RATE_LIMITED","PROVIDER_UNAVAILABLE","NETWORK","TIMEOUT","PARSE_ERROR","UNKNOWN"]),Eae=Q0.enum,ta=k(["queued","running","completed","partial","failed","cancelled"]),Nt=ta.enum,Co=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=Co.enum;d({kind:Co.optional(),excludeKind:Co.optional(),excludeKinds:Xa(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},g(Co).max(Co.options.length)).optional(),status:ta.optional()});const Hm=k(["manual","scheduled","config-apply","backfill","probe"]),Ha=Hm.enum,Gi=k(["cited","not-cited"]),Rc=Gi.enum,um=k(["visible","not-visible"]);um.enum;const $c=k(["mentioned","not-mentioned"]);$c.enum;const Q2=k(["new","cited","lost","emerging","not-cited"]);Q2.enum;const JP=k(["new","mentioned","lost","emerging","not-mentioned"]);JP.enum;const WP=k([Ha.manual,Ha.probe]);d({kind:E(Oe["answer-visibility"]).optional(),trigger:WP.optional(),providers:g(bt).optional(),queries:g(s().min(1)).min(1).optional(),measurementScope:HP.optional(),location:s().min(1).optional(),allLocations:N().optional(),noLocation:N().optional(),dispatchMode:tu.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:Q0,consecutiveRuns:m().int().positive(),since:s(),latestRunId:s(),retryAfter:s()}),eM=d({message:s(),raw:kn().optional(),code:Q0.optional(),skipped:N().optional()}),tM=d({message:s().optional(),providers:Ue(s(),eM).optional()}),nM=Ue(s(),E(tu.enum.batch)),aM=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()}),iM=d({provider:s(),pricingTier:z0,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()}),sM=d({sourceId:s().nullable().optional(),id:s(),projectId:s(),kind:Co,status:ta,trigger:Hm.default("manual"),measurementPlanVersionId:s().nullable().optional(),measurementManifest:Ue(s(),kn()).nullable().optional(),measurementScope:FP.nullable().optional(),measurementExecutionIdentity:K2.nullable().optional(),location:s().nullable().optional(),queries:g(s()).nullable().optional(),startedAt:s().nullable().optional(),finishedAt:s().nullable().optional(),error:tM.nullable().optional(),queryBasketRevision:m().int().nullable().optional(),dispatchModes:nM.optional(),skippedProviders:Ue(s(),Z2).optional(),createdAt:s()}),Fw=d({refused:N(),retryAfter:s().nullable(),providers:Ue(s(),Z2)});function Z0(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 Fm=d({uri:s(),title:s()}),Y2=d({uri:s(),title:s(),kind:k(["search-result","page-read"]),query:s().nullable()}),oM=d({status:k(["applied","ignored","browser-implicit","unknown"]),resolved:Jt.nullable().optional()}),X2=d({id:s(),runId:s(),queryId:s(),query:s().optional(),provider:bt,citationState:Gi,answerMentioned:N().optional(),visibilityState:um.optional(),mentionState:$c.optional(),transition:Q2.optional(),answerText:s().nullable().optional(),citedDomains:g(s()).default([]),citedUrls:g(s()).nullable().default(null),captureStatus:Fe([Vm,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([N0,de()]).default(null),retrievalContract:Fe([C0,de()]).default(null),competitorOverlap:g(s()).default([]),citedCompetitorDomains:g(s()).default([]),mentionedCompetitorDomains:g(s()).default([]),mentionedCompetitorTerms:g(s()).default([]),recommendedCompetitors:g(s()).default([]),matchedTerms:g(s()).default([]),groundingSources:g(Fm).default([]),searchQueries:g(s()).default([]),retrievedSources:g(Y2).nullable().default(null),model:s().nullable().optional(),servedModel:s().nullable().optional(),location:s().nullable().optional(),requestedContext:Jt.nullable().optional(),supportedContext:oM.nullable().optional(),dispatchMode:Fe([tu,de()]).optional(),stopReason:s().nullable().optional(),usage:l9.nullable().optional(),createdAt:s()});d({snapshots:g(X2),total:m().int().nonnegative()});const rM=d({queryId:s().nullable(),query:s().nullable(),run1State:Gi.nullable(),run2State:Gi.nullable(),run1AnswerMentioned:N().nullable(),run2AnswerMentioned:N().nullable(),run1VisibilityState:um.nullable(),run2VisibilityState:um.nullable(),run1MentionState:$c.nullable().optional(),run2MentionState:$c.nullable().optional(),changed:N(),visibilityChanged:N()});d({run1:s(),run2:s(),diff:g(rM)});const lM=d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),mentionedQueries:m().int().nonnegative()}),cM=sM.extend({snapshots:g(X2).optional(),queryCounts:lM.nullable().optional(),providerBatches:g(aM).optional(),usage:g(iM).optional()}),uM=d({totalRuns:m().int().nonnegative(),run:cM.nullable(),admission:Fw.optional(),manualAdmission:Fw.optional()}),Qw=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:Qw.optional().describe("Inclusive ISO 8601 lower bound."),until:Qw.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:Xa(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},g(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 Y0=Fe([ta,de()]),X0=k(["pass","partial","fail"]),Rae=X0.enum,J2=k(["up","down","flat"]);J2.enum;const dM=d({id:s(),name:s(),weight:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null),avgScore:m(),status:X0,pagesPassing:m().int().nonnegative(),pagesPartial:m().int().nonnegative(),pagesFailing:m().int().nonnegative()}),mM=d({factorId:s(),factorName:s(),avgScore:m(),affectedPages:m().int().nonnegative(),totalPages:m().int().nonnegative(),affectedPct:ot(m().nonnegative()),topRecommendations:g(s()).default([])}),Ra=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:g(d({runId:s(),createdAt:s(),complete:N(),pages:m().int().nonnegative()})).max(10),candidatesTruncated:N()});d({project:s(),hasData:N(),runId:s().nullable(),runStatus:Y0,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([J2,de()]),previousScore:m().nullable(),previousAuditedAt:s().nullable(),runSelection:Ra.optional(),factors:g(dM).default([]),affectedPageRanking:d({basis:E("pages-below-pass"),scope:E("audited-pages"),pagesAudited:m().int().nonnegative(),items:g(d({factorId:s(),pagesBelowPass:m().int().nonnegative(),pagesFailing:m().int().nonnegative(),pagesPartial:m().int().nonnegative()})),unavailableFactorIds:g(s())}).optional(),crossCuttingIssues:g(mM).default([]),prioritizedFixes:g(s()).default([])});const W2=d({id:s(),name:s(),weight:m(),score:m(),sharePct:ot(m().min(0).max(100)).nullable().default(null)}),pM=d({url:s(),overallScore:m(),status:k(["success","error"]),error:s().nullable().optional(),factors:g(W2).default([])});d({project:s(),runId:s().nullable(),auditedAt:s().nullable(),runSelection:Ra.optional(),total:m().int().nonnegative(),pages:g(pM).default([])});const hM=d({runId:s(),auditedAt:s(),aggregateScore:m(),pagesAudited:m().int().nonnegative()});d({project:s(),points:g(hM).default([])});const fM=k(["disabled","complete","partial","unavailable"]);fM.enum;const sl=k(["indexable","redirect-terminal","canonical-to-other","robots-disallow","noindex","non-html","fetch-error","not-fetched","unknown"]);sl.enum;const e3=d({healthReason:sl,pages:m().int().nonnegative(),exampleUrl:s()}),t3=d({scope:E("selected-snapshot"),total:m().int().nonnegative(),eligible:m().int().nonnegative(),excluded:m().int().nonnegative(),excludedReasons:g(e3).max(sl.options.length)}),n3=d({recentDates:g(jn).max(10),totalDates:m().int().nonnegative(),matchingMonthDayDates:g(jn).max(10),matchingMonthDayTotal:m().int().nonnegative()}),gM=d({pagesDiscovered:m().int().nonnegative(),pagesFetched:m().int().nonnegative(),pagesEligible:m().int().nonnegative(),edges:m().int().nonnegative(),findings:m().int().nonnegative()}),yM=Ve("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:Ra.optional(),requestedDate:jn.optional(),availableScanDates:n3.optional(),inventorySummary:t3.nullable().optional(),runStatus:Y0,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:Ue(s(),kn()).default({}),complete:N(),termination:s().nullable(),detailsAvailable:N(),counts:gM,deadLinks:yM});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 Qm=k(["eligible","hidden","resource","redirect","failed","unchecked"]),Dae=Qm.enum,Iae=Qm.options,Pr={discovered:"discovered",robotsBlocked:"robots-blocked",html:"html",redirect:"redirect",nonHtml:"non-html",fetchError:"fetch-error"},Dd={indexable:"indexable",noindex:"noindex",blocked:"blocked",unknown:"unknown"},bM={robotsDisallow:"robots-disallow",redirectTerminal:"redirect-terminal",metaRobotsNoindex:"meta-robots-noindex",xRobotsNoindex:"x-robots-noindex",canonicalToOther:"canonical-to-other",notHtmlOrUnavailable:"not-html-or-unavailable"};function vM(e){return e.indexabilityReasons?.some(n=>n===bM.canonicalToOther)===!0||e.nodeKey!==void 0&&e.canonicalNodeKey!==null&&e.canonicalNodeKey!==void 0&&e.canonicalNodeKey!==e.nodeKey}function zae(e){switch(e.fetchState){case Pr.fetchError:return"failed";case Pr.discovered:return"unchecked";case Pr.nonHtml:return"resource";case Pr.redirect:return"redirect";case Pr.robotsBlocked:return"hidden";case Pr.html:break;default:return"unchecked"}if(vM(e))return"hidden";switch(e.indexabilityState){case Dd.indexable:return"eligible";case Dd.noindex:case Dd.blocked:return"hidden";case Dd.unknown:default:return"unchecked"}}const Oae=15,xM=k(["navigation","content","unknown"]);xM.enum;const wM=d({navigation:m().int().nonnegative(),content:m().int().nonnegative(),unknown:m().int().nonnegative()}),a3=k(["placement","ubiquity","unmeasured"]);a3.enum;const Zm=k(["applied","applied-placement","applied-placement-with-ubiquity","applied-placement-partial","unavailable-too-few-pages","unavailable-legacy-scan"]);Zm.enum;function Pae(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 Ym=k(["all","content","template"]);Ym.enum;const SM=k(["anchor","redirect","canonical","link"]);SM.enum;const Kc=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:g(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:Qm,healthReason:sl.optional()}),i3=d({type:k(["found","missing","info","timeout","unreachable"]),code:s().min(1),message:s().min(1)}),Zw=W2.extend({status:X0,applicable:N().nullable(),findings:g(i3).default([]),recommendations:g(s()).default([]),advisoryRecommendations:g(s()).optional()}),Yw=d({id:s().min(1),severity:k(["critical","warning"]),detail:s().min(1),recommendation:s().min(1)}),Id=d({project:s(),runId:s(),complete:N(),termination:s().nullable(),runSelection:Ra.optional()}),Xw=d({nodeKey:s(),url:s(),auditState:s()});Ve("state",[d({state:E("no-crawl"),project:s(),runId:de()}),Id.extend({state:E("details-unavailable")}),Id.extend({state:E("not-found")}),Id.merge(Xw).extend({state:E("not-audited"),auditScore:de(),factors:g(Zw).length(0).default([]),criticalDefects:g(Yw).length(0).default([])}),Id.merge(Xw).extend({state:E("ready"),auditScore:m(),evidenceState:k(["complete","scores-only"]),factors:g(Zw).default([]),criticalDefects:g(Yw).default([])})]);const kM=k(["applied","unavailable-legacy-scan"]),su={complete:N(),termination:s().nullable(),runSelection:Ra.optional()};d({project:s(),hasCrawlData:N(),runId:s().nullable(),...su,requestedDate:jn.optional(),availableScanDates:n3.optional(),inventorySummary:t3.nullable().optional(),healthReasonCounts:g(e3).max(sl.options.length).nullable().optional(),total:m().int().nonnegative(),nextCursor:s().nullable(),healthStateFilter:Fe([kM,de()]).default(null),pages:g(Kc).default([])});const jM=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(),...su,parentPath:s(),nextCursor:s().nullable(),children:g(jM).default([])});const Do=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:g(s()).default([]),isTemplate:Fe([N(),de()]),templateRatio:Fe([ve(),de()]),templateSource:a3,placementOccurrences:Fe([wM,de()])}),AM=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:Qm,healthReason:sl.optional(),x:m(),y:m()}),NM=d({edgeKey:s(),sourceNodeKey:s(),targetNodeKey:s(),followable:N(),occurrences:m().int().positive(),isTemplate:N()}),CM=k(["no-crawl","legacy-snapshot","details-unavailable","layout-failed","empty-crawl"]),_M=Ve("state",[d({state:E("ready"),version:s().min(1),computedAt:s().min(1),templateLinksExcluded:N()}),d({state:E("unavailable"),version:de(),reason:CM})]);d({project:s(),hasCrawlData:N(),runId:s().nullable(),rootNodeKey:s().nullable(),...su,layout:_M,templateDetection:Zm,linkKind:Ym,totalNodes:m().int().nonnegative(),totalEdges:m().int().nonnegative(),totalTemplateEdges:m().int().nonnegative(),totalContentEdges:m().int().nonnegative(),nodes:g(AM).default([]),edges:g(NM).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),sampled:N()});const Mae=2e4,qae=5e4,TM=k(["focus","inbound","outbound","both","transitive"]),EM=Kc.extend({distance:m().int().nonnegative(),relationToFocus:TM});d({project:s(),hasCrawlData:N(),runId:s().nullable(),complete:N(),termination:s().nullable(),runSelection:Ra.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:g(EM).default([]),edges:g(Do).default([]),omittedNodes:m().int().nonnegative(),omittedEdges:m().int().nonnegative(),countAccuracy:k(["exact","lower-bound"]),truncated:N()});const Jw=d({nodeKey:s(),url:s(),path:s()});d({project:s(),runId:s().nullable(),complete:N(),termination:s().nullable(),runSelection:Ra.optional(),state:k(["no-crawl","details-unavailable","found","unreachable","truncated"]),from:Jw.nullable(),to:Jw.nullable(),maxDepth:m().int().positive(),visitedNodes:m().int().nonnegative(),nodes:g(Kc).default([]),edges:g(Do).default([])});const s3=k(["added","removed","changed"]),RM=d({entity:E("page"),change:s3,key:s(),changedFields:g(s()).default([]),before:Kc.nullable(),after:Kc.nullable()}),DM=d({entity:E("link"),change:s3,key:s(),changedFields:g(s()).default([]),before:Do.nullable(),after:Do.nullable()}),IM=Ve("entity",[RM,DM]),Ww=d({added:m().int().nonnegative(),removed:m().int().nonnegative(),changed:m().int().nonnegative()}),zM=d({scope:k(["all","pages","links"]),change:k(["all","added","removed","changed"])});Ve("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:g(s()).min(1)}),d({project:s(),state:E("ready"),fromRunId:s(),toRunId:s(),versions:d({crawlSchema:s(),normalization:s(),indexability:s(),linkScore:s()}),filters:zM,summaryState:k(["exact","omitted-on-continuation"]),summary:d({pages:Ww,links:Ww}).nullable(),total:m().int().nonnegative().nullable(),nextCursor:s().nullable(),changes:g(IM).default([])})]);d({project:s(),hasCrawlData:N(),runId:s().nullable(),...su,total:m().int().nonnegative(),nextCursor:s().nullable(),templateDetection:Zm,linkKind:Ym,edges:g(Do).default([])});d({project:s(),hasCrawlData:N(),runId:s().nullable(),...su,nodeKey:s().nullable(),url:s().nullable(),templateDetection:Zm,linkKind:Ym,inbound:g(Do).default([]),outbound:g(Do).default([]),inboundTruncated:N(),outboundTruncated:N()});const eS=d({findingKey:s(),severity:s(),sourceNodeKey:s().nullable(),sourceUrl:s().nullable(),targetNodeKey:s().nullable(),targetUrl:s().nullable(),evidence:Ue(s(),kn()).default({})});Ve("state",[d({project:s(),runId:s().nullable(),state:E("unavailable"),legacyAuditAvailable:N(),runSelection:Ra.optional()}),d({project:s(),runId:s(),state:E("disabled"),checkDeadLinks:E(!1),runSelection:Ra.optional()}),d({project:s(),runId:s(),state:E("complete"),checkDeadLinks:E(!0),runSelection:Ra.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:s().nullable(),deadLinks:g(eS).default([])}),d({project:s(),runId:s(),state:E("partial"),checkDeadLinks:E(!0),runSelection:Ra.optional(),checked:m().int().nonnegative(),found:m().int().nonnegative(),unverified:m().int().nonnegative(),total:m().int().nonnegative(),nextCursor:s().nullable(),deadLinks:g(eS).default([])})]);const o3=5e4,ou=m().int().min(1).max(o3);function OM(e){return`${e.toLocaleString("en-US")} ${e===1?"page":"pages"}`}function Bae(e){return`full site (up to ${OM(o3)})`}const Lae=10,r3=100;d({sitemapUrl:s().url().optional(),limit:m().int().positive().max(2e3).optional(),maxPages:ou.optional(),maxEdges:m().int().positive().max(1e6).optional(),maxDepth:m().int().min(0).max(100).optional(),checkDeadLinks:N().default(!1),includeGeo:N().default(!1),includeAgentSkills:N().default(!0)});d({runId:s(),status:ta});const PM=d({runId:s(),status:ta,createdAt:s(),startedAt:s().nullable(),finishedAt:s().nullable(),hasCrawlData:N()});d({project:s(),preferredRunId:s().nullable().optional(),scans:g(PM).default([])});const MM=k(["queued","discovering","checking","arranging-map","completed","partial","failed","cancelled"]),qM=d({state:k(["pending","ready","unavailable"]),layoutVersion:s().nullable(),failureCode:s().nullable(),updatedAt:s().nullable()}),BM=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:MM,attempt:BM.nullable(),layout:qM,error:s().nullable()});const LM=k(["waiting","collecting","terminal"]),UM=d({nodeKey:s(),url:s(),auditScore:m(),checksNeedingAttention:m().int().nonnegative()});d({project:s(),runId:s(),status:ta,state:LM,attemptId:s().nullable(),pagesAudited:m().int().nonnegative(),updatedAt:s().nullable(),examples:g(UM).max(12).default([])});d({schemaVersion:E("1.0"),groupIdentityVersion:E("duplicate-metadata-v1"),siteIssues:g(d({key:s().min(1).nullable(),code:s().min(1),message:s(),affectedUrls:g(s().min(1))}))});const J0=100;d({runId:s().min(1).max(128).optional(),cursor:s().min(1).max(2048).optional(),limit:m().int().min(1).max(J0).optional()}).strict();const VM=k(["actionable","advisory","unverified","informational"]),l3=d({nodeKey:s().nullable(),url:s(),message:s().max(400),messageTruncated:N(),recommendations:g(s().max(400)).max(3),recommendationsScope:k(["factor","issue","none"]),recommendationsTruncated:N()}),$M=d({id:s(),stableIdentity:N(),code:s(),source:k(["page-finding","cross-page","critical-defect"]),severity:k(["critical","warning"]).nullable(),factorId:s().nullable(),findingType:i3.shape.type,disposition:VM,message:s().max(400),messageTruncated:N(),affectedPages:m().int().nonnegative(),examples:g(l3).max(3),examplesTruncated:N()}),KM=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()}),c3=d({project:s(),runId:s().nullable(),attemptId:s().nullable(),auditedAt:s().nullable(),runStatus:Y0,complete:N(),termination:s().nullable(),runSelection:Ra.optional(),state:k(["no-crawl","unavailable","partial","available"]),coverage:KM,total:m().int().nonnegative().nullable(),nextCursor:s().nullable()});c3.extend({issues:g($M).max(J0)});c3.extend({issueId:s(),pages:g(l3).max(J0)});new Set(r2.map(e=>e.toLowerCase()));const GM=4,u3=3;function Uae(e){return e.filter(n=>za(n).length>=u3)}const HM=10,Vae=24,FM="bulk-add-unacknowledged";k([FM]);const QM=80,d3=k(["too-long","too-short","project-brand","other-competitor","market-competitor","claimed-by-alias"]);d3.enum;const m3=k(["too-long","too-short","blocked","already-matched","subsumed","project-brand","other-competitor","over-limit"]);m3.enum;const p3=g(s()).describe(`Operator-curated names this competitor goes by in answer text (at most ${HM}, each ${QM} characters or fewer, at least ${u3} letters or digits).`);d({aliases:p3});const Gc=s().trim().min(1).refine(e=>!!FO(e),{message:"Competitor domain must be a valid domain or URL"}),ZM=d({domain:Gc,aliases:p3.optional()}),W0=Fe([Gc,ZM]),tS=d({domain:s(),before:g(s()),after:g(s())}).strict(),YM=d({domain:s(),alias:s(),reason:d3,conflictsWith:s().optional(),conflictingName:s().optional(),markets:g(s()).optional(),supersededRevision:m().int().optional()}).strict(),XM=d({domain:s(),alias:s(),reason:m3,stored:N(),conflictsWith:s().optional(),conflictingName:s().optional()}).strict();function h3(e,n){return Number((n===Qa.percent?e:e*100).toFixed(6))}function f3(e){return Math.round(Number((e*10).toFixed(4)))/10}function dm(e,n=Qa.fraction){if(e==null||!Number.isFinite(e))return"—";const i=h3(e,n);if(i===0)return"0%";const r=i<0?"-":"",u=Math.abs(i);if(u===100)return`${r}100%`;const h=f3(u);return h===0?`${r}<0.1%`:h===100&&u<100?`${r}>99.9%`:`${r}${h.toFixed(1)}%`}function $ae(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 Kae(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 JM=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Dc(e,n=new Date){const i=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e),r=i?JM[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 Gae(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=WM(u,1));return r}function WM(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 Hae(e,n=Qa.fraction){const i=h3(e,n);if(i===0)return{direction:"none",magnitude:"0"};const r=f3(Math.abs(i));return{direction:i>0?"up":"down",magnitude:r===0?"<0.1":r.toFixed(1)}}function Fae(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 eq=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()}),e1=eq.partial().shape,g3=k(["introduced","repointed","retired"]),tq=g3.enum;d({modelId:s().trim().min(1),date:s().regex(/^\d{4}-\d{2}-\d{2}$/,"date must be YYYY-MM-DD"),kind:g3,confirmed:N(),sourceUrl:s().url(),note:s().min(1)});const nq=[{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.'}];tq.repointed;new Set(nq.map(e=>e.modelId.toLowerCase()));const aq=k(["not-exposed","no-known-change","known-change"]);aq.enum;const iq=d({modelId:s().trim().min(1),date:s().regex(/^\d{4}-\d{2}-\d{2}$/),confirmed:N(),sourceUrl:s().url()}),sq=d({status:k(["no-known-change","known-change"]),modelIds:g(s().trim().min(1)).min(1),changes:g(iq),changeCount:m().int().nonnegative(),unverifiedChangeCount:m().int().nonnegative(),firstChangeDate:s().optional(),lastChangeDate:s().optional(),knownGoodAsOf:s(),checkedThroughPeriodEnd:N()}),oq={openai:"ChatGPT",chatgpt:"ChatGPT",anthropic:"Claude",claude:"Claude",google:"Gemini",gemini:"Gemini",perplexity:"Perplexity"};function rq(e){const n=e.trim().toLowerCase();return oq[n]??e.charAt(0).toUpperCase()+e.slice(1)}function Uf(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):0}function vc(e){return typeof e=="string"&&e.trim().length>=10?e.trim().slice(0,10):null}function Vf(e){return[...new Set(e.filter(n=>n!==null))].sort()}function lq(e,n,i){const r=i(e),u=Array.isArray(n.changes)?n.changes:[],h=Uf(n.changeCount)||u.length,f=Math.min(h,Uf(n.unverifiedChangeCount)||Uf(n.unconfirmedChangeCount)||u.filter(j=>j.confirmed===!1).length),b=vc(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:Vf(u.filter(j=>j.confirmed!==!1).map(j=>vc(j.date))),unconfirmedDates:Vf(u.filter(j=>j.confirmed===!1).map(j=>vc(j.date)))};const S=Vf([vc(n.firstChangeDate),vc(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 cq(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 nS(e,n){return e.length===0?null:e.length===1&&n<=1?`on ${Dc(e[0])}`:`more than once between ${Dc(e[0])} and ${Dc(e[e.length-1])}`}function uq(e){const n=nS(e.confirmedDates,e.confirmedCount),i=nS(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 aS(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 ${Dc(i)}, and this period runs past that date, so there may be later updates we do not know about.`}function Qae(e,n={}){const i=n.engineName??rq,r=Object.entries(e??{}).map(([S,j])=>lq(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(M=>M.engine))],j=S.length>1,C=aS(r),T=[...new Set(r.map(M=>M.knownGoodAsOf).filter(M=>M!==null))].sort(),I=C??(T.length>0?`We last checked for model updates on ${Dc(T[0])}.`:null);return{kind:"no-known-change",text:`No model updates are on record for ${cq(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.${I?` ${I}`:""}`}}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=aS(r);return{kind:"change",text:`${u.map(uq).join(" ")} ${v}${x?` ${x}`:""}`}}const t1=k(["competitor","directory","social","forum","news","reference","blog","ecommerce","video","academic","other"]);t1.enum;const n1=k(["cited","aspirational","wasted-surface"]),iS=n1.enum;iS.cited,iS.aspirational;const ru=k(["direct-competitor","ota-aggregator","editorial-media","other","unknown"]),dq=ru.enum;dq["direct-competitor"];const Xm=k(["queued","seeding","probing","completed","failed"]);Xm.enum;const y3=d({domain:s().min(1),hits:m().int().positive(),competitorType:ru.default("unknown")}),mq=d({id:s(),sessionId:s(),projectId:s(),query:s(),bucket:n1.nullable().default(null),citationState:Gi,citedDomains:g(s()).default([]),answerMentioned:N().nullable().default(null),createdAt:s()}),pq=d({id:s(),projectId:s(),status:Xm,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:g(Jt).nullable().optional(),seedRawCandidates:g(s()).nullable().optional(),dedupClusterMinSims:g(m()).nullable().optional(),dedupBandPairFraction:ve().nullable().optional(),dedupPairsTotal:m().int().nullable().optional(),seedProviders:g(s()).nullable().optional(),seedProviderCounts:Ue(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:g(y3).default([]),warning:s().nullable().optional(),error:s().nullable().optional(),startedAt:s().nullable().optional(),finishedAt:s().nullable().optional(),createdAt:s()});pq.extend({probes:g(mq).default([])});const hq=500,fq=8,gq=["gemini","openai"],yq=k(gq);d({icpDescription:s().min(1).optional(),buyerDescription:s().min(1).optional(),seedProviders:g(yq).min(1).transform(e=>[...new Set(e)].sort()).optional(),dedupThreshold:m().min(0).max(1).optional(),maxProbes:m().int().positive().max(hq).optional(),probeConcurrency:m().int().min(1).max(fq).optional(),locations:g(s().min(1)).optional()});d({buckets:g(n1).min(1).optional(),includeCompetitors:N().optional(),competitorTypes:g(ru).min(1).optional()});const a1=d({domain:s().min(1),hits:m().int().positive(),competitorType:ru,sources:g(y3)}),b3=k(["already-tracked","project-domain","shared-host","claimed-by-alias"]);b3.enum;const v3=a1.extend({reason:b3,message:s()});d({sessionId:s(),projectId:s(),status:Xm,queriesByBucket:d({cited:g(s()),aspirational:g(s()),"wasted-surface":g(s())}),suggestedCompetitors:g(a1),skippedCompetitors:g(v3)});d({sessionId:s(),projectId:s(),promoted:d({queries:g(s()),competitors:g(s())}),skipped:d({queries:g(s()),competitors:g(s())}),competitorDetails:d({promoted:g(a1),skipped:g(v3)})});Fe([E("cli"),s().regex(/^discovery:.+$/)]);const bq=d({query:s().min(1),probeHits:m().int().positive()}),vq=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:Xm,minProbeHits:m().int().positive(),anchorApplied:N(),semanticNoveltyApplied:N(),candidates:g(bq),stats:vq});const i1=k(["own","direct-competitor","ota-aggregator","editorial-media","other"]);i1.enum;const Us=k(nl.metrics),sS=k(["improving","declining","stable"]),xq=k(["mentioned","cited"]);xq.enum;const Og=d({citationRate:ve(),cited:m().int(),total:m().int(),mentionRate:ve(),mentionedCount:m().int()}),ol=s().trim().min(1),wq=g(ol).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]})}),Io=Ve("status",[d({status:E("known"),model:ol}),d({status:E("unknown")}),d({status:E("mixed"),models:wq,includesUnknown:N()})]),Sq=d({observedAt:s(),bucketStartDate:s(),from:Io,to:Io,fromPreWindowAnchor:N().optional(),anchorObservedAt:s().optional()}),x3=d({latestObservation:d({observedAt:s(),state:Io}),events:g(Sq),eventTotal:m().int().nonnegative().optional(),anchorUnavailable:N().optional()}),kq=Ue(s(),x3),jq=x3.extend({latestServedModelIds:g(ol).default([])}),Aq=Ue(s(),jq),Nq=d({observedAt:s(),configured:Io,served:Io}),Cq=d({scope:k(["non-brand","pooled"]),rate:ve().nullable(),projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative()}),_q=d({startDate:s(),endDate:s(),dataStartDate:s(),dataEndDate:s(),sweepCount:m().int().nonnegative(),citationRate:ve(),cited:m().int(),total:m().int(),queryCount:m().int(),mentionRate:ve(),mentionedCount:m().int(),mentionShare:Cq,byProvider:Ue(s(),Og),modelEvidenceByProvider:Ue(s(),Io).default({}),basketRevision:m().int().nullable().default(null)}),$f=d({first:ve(m().min(0).max(1)),latest:ve(m().min(0).max(1)),delta:ve(m().min(-1).max(1))}),Tq=d({citationRate:$f.nullable(),mentionRate:$f.nullable(),mentionShare:$f.nullable()}),Eq=d({revision:m().int(),at:s(),added:g(s()),removed:g(s())}),Rq=d({date:s(),delta:m().int(),label:s()}),Dq=d({at:s(),identity:K2}),s1=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."),o1=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:Us,mentionShareScope:k(["non-brand","pooled"]),buckets:g(_q),overall:Og,byProvider:Ue(s(),Og),trend:sS,mentionTrend:sS,windowChange:Tq.default(()=>({citationRate:null,mentionRate:null,mentionShare:null})),queryChanges:g(Rq),basketChanges:g(Eq).default([]),executionIdentityChanges:g(Dq).default([]),referenceBasketRevision:m().int().nullable().default(null),modelAttribution:kq.default({}),servedModelAttribution:Aq.default({}),modelServiceMismatch:Ue(s(),Nq).default({}),modelPointerChanges:Ue(s(),sq).default({}),competitorIdentityChangedAt:s1.optional(),competitorSetChangedAt:o1.optional()});const oS=d({category:t1,label:s(),count:m().int(),percentage:ve(),topDomains:g(d({domain:s(),count:m().int()}))}),Iq=d({domain:s(),rank:m().int().positive().optional(),count:m().int(),percentage:ve(),answerShare:ve().optional(),category:t1,label:s(),surfaceClass:i1}),zq=d({surfaceClass:i1,label:s(),count:m().int(),percentage:ve(),domainCount:m().int()}),rS=d({totalCitedSlots:m().int(),answerTotal:m().int().optional(),answersWithSources:m().int().optional(),domainTotal:m().int(),entries:g(Iq),truncatedDomainCount:m().int(),truncatedCitedSlots:m().int(),bySurfaceClass:g(zq)}),Oq=d({answers:g(s()),distinctDomains:g(s()),answerDomainPairs:g(s()),runs:g(s())}),Pq=k(["measurement-plan","query-text"]);d({runId:s().trim().min(1).optional(),queryClass:B0.optional(),includeByQuery:k(["true","false","1","0"]).optional()});d({ranked:rS,byProvider:Ue(s(),rS),providersWithoutSources:g(s()).optional(),answerTotal:m().int().optional(),runCount:m().int().optional(),pooledAcrossRuns:N().optional(),unclassifiedAnswers:m().int().optional(),filters:d({runId:s().nullable(),queryClass:B0,queryClassBasis:Fe([Pq,de()]),includeByQuery:N()}).optional(),runId:s(),runIds:g(s()).optional(),countUnits:Oq.optional(),window:Us,limit:m().int().nullable(),overall:g(oS),byQuery:Ue(s(),g(oS)).optional()});const w3=k(["own","direct-competitor","ota-aggregator","editorial-media","other","unknown"]),S3=Ve("kind",[d({kind:E("project")}).strict(),d({kind:E("group"),groupKey:s().trim().min(1)}).strict(),d({kind:E("all-markets")}).strict()]),k3=k(["all","branded","non-brand"]),j3=k(["project","all-markets"]);d({window:Us.optional(),groupKey:s().trim().min(1).optional(),scope:j3.optional(),provider:s().trim().min(1).optional(),model:ol.optional(),groupBy:E("model").optional(),queryClass:k3.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 Es=d({domain:s().trim().min(1),label:s().trim().min(1),surfaceClass:w3,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:g(s().url()).max(3)}).strict(),A3=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(),Mq=d({answers:g(s()),distinctNames:g(s()),runs:g(s())}).strict(),qq=50,Bq=d({...e1,comparison:g(d({domain:s(),mentions:m().int().nonnegative()})).optional(),observedNames:g(d({name:s(),answerCount:m().int().nonnegative()})).optional(),observedNamesTotal:m().int().nonnegative().optional(),provider:s().trim().min(1),model:ol.nullable(),servedModels:Io,snapshotCount:m().int().positive(),project:Es,pinned:g(Es),observed:g(Es),otherSources:g(Es),evidence:A3,truncated:N()}).strict(),Lq=d({basis:E("requested-model"),groups:g(Bq).max(qq),totalGroups:m().int().nonnegative(),truncated:N()}).strict();d({...e1,comparison:g(d({domain:s(),mentions:m().int().nonnegative()})).optional(),observedNames:g(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:Us,scope:S3,project:Es,pinned:g(Es),observed:g(Es),otherSources:g(Es),evidence:A3,modelComparison:Lq.optional(),marketState:d({activeRevision:m().int().positive(),draft:d({etag:s().trim().min(1),pendingCompetitorDomains:g(s().trim().min(1))}).strict().nullable()}).strict().nullable(),filters:d({scope:j3,groupKey:s().nullable(),provider:s().nullable(),model:ol.optional(),groupBy:E("model").optional(),queryClass:k3,location:s().nullable(),runId:s().nullable(),answers:k(["all","not-mentioned"]).optional()}).strict(),truncated:N(),runCount:m().int().nonnegative().optional(),runIds:g(s()).optional(),countUnits:Mq.optional(),competitorIdentityChangedAt:s1.optional(),competitorSetChangedAt:o1.optional(),competitorListRestated:N().optional()}).strict();const r1=d({total:m().int(),checked:m().int(),mentioned:m().int(),cited:m().int(),mentionRate:ve().nullable(),citedRate:ve().nullable()}),N3=r1.extend({provider:s(),firstObserved:s(),lastObserved:s()}),Uq=r1.extend({queryId:s().nullable(),query:s(),firstObserved:s(),lastObserved:s(),providers:g(N3).optional()}),Vq=d({since:s().nullable(),until:s().nullable(),lastRuns:m().int().nullable(),runCount:m().int()}),$q=k(["provider"]),Pg=d({domain:s(),mentions:m().int()}),Mg=d({...e1,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:g(Pg)});d({project:s(),groupBy:$q.optional(),window:Vq,totals:r1,byProvider:g(N3).optional(),queries:g(Uq),shareOfVoice:Mg.optional()});const Kq=k(["within-noise","moved","insufficient-data","model-discontinuous","model-unknown"]),Gq=k(["up","down","flat"]),lS=d({availability:k(["available","no-observations","no-competitive-frame","classification-unavailable"]),point:ve().nullable(),ciLow:ve().nullable(),ciHigh:ve().nullable(),numerator:m().int(),denominator:m().int(),excludedUnknown:m().int().nonnegative().optional(),excludedNoRetrieval:m().int().nonnegative().optional()}),Hq=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"]),Fq=d({key:Hq,label:s(),queryClass:k(["all","branded","non-brand","pooled"]),driftRobust:N(),from:lS,to:lS,rateRatio:m().nullable(),direction:Fe([Gq,de()]),verdict:Kq}),mm=d({month:s(),since:s(),until:s(),runCount:m().int(),lowRunCount:N()}),C3=d({queryCount:m().int(),excludedFromOnly:m().int(),excludedToOnly:m().int(),providers:g(s()),excludedProviders:g(s())}),_3=d({provider:s(),fromModels:g(s()),toModels:g(s())}),Qq=k(["included","model-discontinuous","model-unknown"]),Zq=d({provider:s(),status:Qq,fromModels:g(s()),toModels:g(s())}),Yq=k(["comparable","model-discontinuous","model-unknown","insufficient-data"]),T3=d({status:Yq,comparedProviders:g(s()),providers:g(Zq)}),Xq=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()})}),Jq=d({from:d({count:m().int(),of:m().int()}),to:d({count:m().int(),of:m().int()})}),Wq=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()}),eB=d({from:mm,to:mm,basket:C3,continuity:T3,modelChanges:g(_3)});d({project:s(),selection:Wq.optional(),classComparison:eB.optional(),from:mm,to:mm,basket:C3,metrics:g(Fq),queriesMentioned:Jq,byProvider:g(Xq),modelChanges:g(_3),continuity:T3,competitors:d({from:g(Pg),to:g(Pg)}),competitorIdentityChangedAt:s1.optional(),competitorSetChangedAt:o1.optional()});const E3=k(["add","remove","replace","aliases"]),zd=E3.enum,R3=k(["basis-changed","auto-alias-rescan-pending","no-latest-sweep","pooled"]);R3.enum;Ve("change",[d({change:E(zd.add),competitors:g(W0).min(1)}).strict(),d({change:E(zd.remove),competitors:g(s().trim().min(1)).min(1)}).strict(),d({change:E(zd.replace),competitors:g(Gc)}).strict(),d({change:E(zd.aliases),domain:Gc,aliases:g(s().trim().min(1)),mode:k(["set","add"])}).strict()]);const D3=d({instrument:E("competitor-landscape"),queryClass:k(["non-brand","pooled"]),scope:k(["project","all-markets"]),runIds:g(s()),runCount:m().int().nonnegative(),sweepAt:s().datetime().nullable(),before:Mg,after:Mg,deltaPercent:ot().nullable(),restatesHistory:E(!0),caveats:g(R3)}).strict(),tB=d({limit:m().int().positive(),count:m().int().nonnegative(),acknowledgementRequired:N()}).strict();d({project:s().trim().min(1),change:E3,plan:d({added:g(s()),alreadyTracked:g(s()),removed:g(s()),aliasChanges:g(tS),droppedAliases:g(YM),autoAliasChanges:g(tS),droppedAutoAliases:g(XM)}).strict(),bulkAdd:tB,impact:D3}).strict();const I3=k(["openai-annotation","claude-citation","gemini-support","perplexity-marker","answer-link","answer-host"]);I3.enum;const z3=d({name:s(),directPairs:m().int().nonnegative(),cooccurrences:m().int().nonnegative(),namingAnswers:m().int().nonnegative(),precision:ve(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()}),nB=k(["added","kept","removed","review","rejected"]),O3=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"]),aB=d({name:s(),status:nB,reason:O3.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:ve(m().min(0).max(1)).nullable(),lift:m().nonnegative().nullable(),otherCompetitorPairs:m().int().nonnegative(),labelAffinity:N(),via:g(I3),firstSeen:s(),lastSeen:s()}),iB=d({domain:s(),marketKeys:g(s()).optional(),aliases:g(s()),autoAliases:g(z3),blockedAliases:g(s()),added:g(s()),removed:g(d({name:s(),reason:O3,conflictsWith:s().optional()})),candidates:g(aB)});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:ve(m().min(0).max(1)),minLift:m().positive(),minNameCasedShare:ve(m().min(0).max(1)),minKeyLength:m().int().positive(),dominanceMultiple:m().positive(),removeBelowPrecision:ve(m().min(0).max(1)),removeBelowLift:m().nonnegative(),removeBelowNameCasedShare:ve(m().min(0).max(1))}),competitors:g(iB),impact:D3.optional()});d({aliases:g(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 Jm=k(["cli","api","config-file"]);function sB(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 oB(e,n){return n?e.some(i=>i.label===n):!0}const l1=k(["off","preview","apply"]);l1.options;const c1=l1.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."),u1=20,d1=200,rB=d({displayName:s().min(1),canonicalDomain:s().min(1),ownedDomains:g(s().min(1)).optional(),aliases:g(s()).optional(),country:s().length(2),language:s().min(2),tags:g(s()).optional(),labels:Ue(s(),s()).optional(),providers:g(bt).optional(),providerModels:Bo.optional(),providerDispatchModes:il.optional(),locations:g(Jt).optional(),defaultLocation:s().nullable().optional(),measurement:di.optional(),autoExtractBacklinks:N().optional(),qualifiedAliases:g(s().trim().min(1).max(d1)).max(u1).optional(),negativeReviewMaxStars:Um.nullable().optional(),siteAuditMaxPages:ou.nullable().optional(),competitorAutoAliases:c1,configSource:Jm.optional()});d({displayName:s().min(1).optional(),canonicalDomain:s().min(1).optional(),ownedDomains:g(s().min(1)).optional(),aliases:g(s()).optional(),country:s().length(2).optional(),language:s().min(2).optional(),tags:g(s()).optional(),labels:Ue(s(),s()).optional(),providers:g(bt).optional(),providerModels:Bo.optional(),providerDispatchModes:il.optional(),locations:g(Jt).optional(),defaultLocation:s().nullable().optional(),measurement:di.partial().strict().optional(),autoExtractBacklinks:N().optional(),qualifiedAliases:g(s().trim().min(1).max(d1)).max(u1).optional(),negativeReviewMaxStars:Um.nullable().optional(),siteAuditMaxPages:ou.nullable().optional(),competitorAutoAliases:c1,expectedConfigRevision:m().int().positive().optional()}).strict();rB.extend({name:s().trim().min(1).max(120)});const lB=d({id:s(),name:s(),displayName:s().optional(),canonicalDomain:s(),ownedDomains:g(s()).default([]),aliases:g(s()).default([]),qualifiedAliases:g(s()).default([]),country:s().length(2),language:s().min(2),tags:g(s()).default([]),labels:Ue(s(),s()).default({}),providers:g(s()).default([]),providerModels:Bo.default({}),providerDispatchModes:il.default({}),locations:g(Jt).default([]),defaultLocation:s().nullable().optional(),measurement:di.default(f2),autoExtractBacklinks:N().default(!1),negativeReviewMaxStars:Um.nullable().optional(),siteAuditMaxPages:ou.nullable().optional(),competitorAutoAliases:l1.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:Jm.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:Lo.nullable().optional()});d({id:s(),keyword:s(),createdAt:s()});d({queries:g(s().trim().min(1)).min(1)});d({keywords:g(s().trim().min(1)).min(1)});d({provider:bt,count:m().int().min(1).max(20).optional()});d({queries:g(s()),provider:s()});d({keywords:g(s()),provider:s()});d({id:s(),domain:s(),aliases:g(s()),autoAliases:g(z3).optional(),blockedAliases:g(s()).optional(),marketKeys:g(s()).optional(),createdAt:s()});d({competitors:g(s().trim().min(1)).min(1)});d({competitors:g(W0).min(1),acknowledgeBulkAdd:N().optional()});d({competitors:g(Gc),acknowledgeBulkAdd:N().optional()});function P3(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=Uc(h);i.has(f)||(i.add(f),r.push(h))}return r}function cB(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 uB(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 cB(e.displayName,e.aliases))r(h);for(const h of P3({canonicalDomain:e.canonicalDomain??"",ownedDomains:e.ownedDomains??[]})){const f=D0(h);if(za(f).length>=GM)r(f);else{const b=Uc(h);b.includes(".")&&r(b)}}return n}const dB=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:Ue(s(),s()).optional().default({})}),M3=d({preset:s().min(1).optional(),cron:s().min(1).optional(),recurrence:qm.optional(),timezone:s().optional().default("UTC"),providers:g(bt).optional().default([]),enabled:N().optional()});function q3(e){return[e.preset,e.cron,e.recurrence].filter(n=>n!==void 0).length===1}const B3={message:'Exactly one of "preset", "cron", or "recurrence" must be provided'},mB=M3.refine(q3,B3).optional(),pB=d({id:s().min(1).optional(),channel:E("webhook"),url:s().url(),events:g(Bm).min(1)}),hB=d({gsc:d({propertyUrl:s()}).optional(),syncSchedule:d({preset:s().optional(),cron:s().optional()}).optional()}).optional(),qg=g(s().min(1)),L3={displayName:s().min(1),canonicalDomain:s().min(1),ownedDomains:g(s().min(1)).optional().default([]),aliases:g(s().min(1)).optional().default([]),qualifiedAliases:g(s().min(1).max(d1)).max(u1).optional(),country:s().length(2),language:s().min(2),queries:qg.optional(),keywords:qg.optional(),competitors:g(W0).optional().default([]),providers:g(bt).optional().default([]),providerModels:Bo.optional().default({}),providerDispatchModes:il.optional(),locations:g(Jt).optional().default([]),defaultLocation:s().optional(),measurement:di.optional().default(f2),schedule:mB,notifications:g(pB).optional().default([]),google:hB,autoExtractBacklinks:N().optional().default(!1),negativeReviewMaxStars:Um.optional(),siteAuditMaxPages:ou.nullable().optional(),competitorAutoAliases:c1};function U3(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=sB(e.locations);i.length>0&&n.addIssue({code:"custom",message:`Duplicate location labels are not allowed: ${i.join(", ")}`,path:["locations"]}),oB(e.locations,e.defaultLocation)||n.addIssue({code:"custom",message:`defaultLocation "${e.defaultLocation}" must match a configured location label`,path:["defaultLocation"]})}const fB=d(L3).superRefine(U3),gB=d({apiVersion:E("canonry/v1"),kind:E("Project"),metadata:dB,spec:fB});gB.extend({spec:d({...L3,queries:qg,providerModels:Bo.optional(),schedule:M3.extend({enabled:N()}).refine(q3,B3).optional(),autoExtractBacklinks:N().optional()}).superRefine(U3)});function sn(e){return d({before:e.nullable(),after:e.nullable()})}const yB=d({displayName:s().optional(),canonicalDomain:s().optional(),ownedDomains:g(s()).optional(),aliases:g(s()).optional(),qualifiedAliases:g(s()).optional(),country:s().optional(),language:s().optional(),labels:Ue(s(),s()).optional(),providers:g(s()).optional(),providerModels:Bo.optional(),providerDispatchModes:il.optional(),"measurement.marketingHosts":di.shape.marketingHosts.optional(),"measurement.brandTerms":di.shape.brandTerms.optional(),"measurement.leadEventNames":di.shape.leadEventNames.optional(),locations:g(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:Jm.optional()}).strict(),bB=d({displayName:sn(s()).optional(),canonicalDomain:sn(s()).optional(),ownedDomains:sn(g(s())).optional(),aliases:sn(g(s())).optional(),qualifiedAliases:sn(g(s())).optional(),country:sn(s()).optional(),language:sn(s()).optional(),labels:sn(Ue(s(),s())).optional(),providers:sn(g(s())).optional(),providerModels:sn(Bo).optional(),providerDispatchModes:sn(il).optional(),"measurement.marketingHosts":sn(di.shape.marketingHosts).optional(),"measurement.brandTerms":sn(di.shape.brandTerms).optional(),"measurement.leadEventNames":sn(di.shape.leadEventNames).optional(),locations:sn(g(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(Jm).optional()}).strict(),Bg=d({cron:s().optional(),preset:s().optional(),recurrence:qm.optional(),timezone:s(),providers:g(s()),enabled:N()}).strict(),vB=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:g(s()).optional()}).strict(),xB=d({id:s(),url:s().optional(),urlHost:s(),events:g(s()),enabled:N(),source:s().optional()});d({project:d({id:s(),name:s()}),configRevision:m().int(),fields:yB,queries:g(d({id:s(),text:s()})),competitors:g(d({id:s(),domain:s(),aliases:g(s())})),schedule:Bg.nullable(),notifications:g(xB),managed:d({queries:N(),competitors:N(),schedule:N(),notifications:N()}),detachedSnapshotCount:m().int().nonnegative()});const V3=d({urlHost:s(),events:g(s())}),wB=V3.extend({id:s()}),SB=d({id:s(),urlHost:s(),urlChanged:N(),eventsBefore:g(s()),eventsAfter:g(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:bB,queries:d({managed:N(),added:g(s()),removed:g(s()),unchangedCount:m().int().nonnegative(),snapshotsDetached:m().int().nonnegative()}),competitors:d({managed:N(),added:g(s()),removed:g(s()),aliasChanges:g(d({domain:s(),before:g(s()),after:g(s())})),droppedAliases:g(vB)}),schedule:d({managed:N(),action:k(["create","update","delete","none"]),before:Bg.nullable(),after:Bg.nullable()}),notifications:d({managed:N(),added:g(V3),removed:g(wB),kept:g(SB),secretsRotated:m().int().nonnegative()}),effects:g(k(["mention-backfill","competitor-rescore","competitor-auto-alias-rescan","schedule-reload","gsc-property-update"]))});const $3=k(["stored","live","write"]);Object.freeze($3.enum);const kB=1,jB=s().refine(e=>e.trim().length>0,{message:"Must not be blank"}),K3=d({displayName:s(),aliases:g(s()),canonicalDomain:s(),ownedDomains:g(s()),qualifiedAliases:g(s()).optional()}).strict(),G3=d({provider:bt.refine(e=>e.trim().length>0,{message:"Provider must not be blank"}),requestedModel:s().nullable()}).strict(),H3=d({domain:s(),label:s(),aliases:g(s())}).strict(),F3=d({queryId:jB,queryText:s(),provenance:s().nullable()}).strict(),AB=F3.extend({queryClass:Lo.nullable()}).strict();function Q3(e,n){const i=new Set;e.engines.forEach((h,f)=>{const b=h.provider.trim().toLocaleLowerCase("en");i.has(b)&&n.addIssue({code:he.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:he.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:he.custom,path:["competitors",f,"domain"],message:`Duplicate competitor domain "${h.domain}"`}),u.add(b)})}d({capturedAt:s().datetime(),identity:K3,country:s(),language:s(),location:Jt.nullable(),engines:g(G3).min(1),competitors:g(H3).optional(),queries:g(F3)}).strict().superRefine(Q3);d({schemaVersion:E(kB),capturedAt:s().datetime(),identity:K3,country:s(),language:s(),location:Jt.nullable(),engines:g(G3).min(1),competitors:g(H3).optional(),queries:g(AB)}).strict().superRefine(Q3);const NB=k(["auto","simple","advanced"]),CB=k(["simple","advanced"]),Z3=k(["branded","non-brand","unknown","all"]),_B=k(["branded","non-brand","unknown"]),m1=k(["project","group","market","property"]),Y3=Ve("kind",[d({kind:E("all")}).strict(),d({kind:E("none")}).strict(),d({kind:E("exact"),value:s().trim().min(1)}).strict()]);function TB(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),Hi=s().datetime(),EB={mode:NB.default("auto"),queryClass:Z3.default("non-brand"),scope:m1.default("project"),scopeKey:St.optional(),marketKey:St.optional(),provider:St.optional(),model:St.optional(),location:s().trim().min(1).optional(),from:Hi.optional(),to:Hi.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)},pm=d(EB).strict().superRefine((e,n)=>{e.scope!=="project"&&e.scopeKey===void 0&&n.addIssue({code:he.custom,path:["scopeKey"],message:`scopeKey is required for ${e.scope} scope`}),e.scope==="project"&&e.scopeKey!==void 0&&n.addIssue({code:he.custom,path:["scopeKey"],message:"scopeKey is not valid for project scope"}),e.scope==="market"&&e.marketKey!==void 0&&n.addIssue({code:he.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:he.custom,path:["to"],message:"to must be on or after from"}),e.queryKey!==void 0&&e.queryId!==void 0&&n.addIssue({code:he.custom,path:["queryId"],message:"queryKey and queryId cannot both be supplied"})});pm.transform(e=>({...e,location:TB(e.location)}));const Ia=d({numerator:m().int().nonnegative().nullable(),denominator:m().int().nonnegative().nullable(),rate:ve(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:he.custom,message:"Unavailable rates require null values and a reason"}),e.unattributed!==void 0&&n.addIssue({code:he.custom,path:["unattributed"],message:"Only an available rate can leave answers out"}),e.unchecked!==void 0&&n.addIssue({code:he.custom,path:["unchecked"],message:"Only an available rate can leave answers out"});return}e.reason!==void 0&&n.addIssue({code:he.custom,message:"Available rates cannot carry a reason"}),e.unattributed!==void 0&&e.unchecked!==void 0&&n.addIssue({code:he.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:he.custom,path:["denominator"],message:"Available rates require a positive denominator"}),r>u&&n.addIssue({code:he.custom,path:["numerator"],message:"Numerator cannot exceed denominator"}))}),X3=Ve("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()]),hm=d({id:St,label:s().trim().min(1),kind:m1,targetCount:m().int().nonnegative(),parentGroupIds:g(St).optional(),marketKeys:g(St).optional()}).strict(),RB=d({provider:St,model:St}).strict(),DB=d({providers:g(St),models:g(RB),locations:g(Y3)}).strict(),IB=d({queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Ia,citationCoverage:Ia,propertyReach:Ia,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:he.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:he.custom,path:["notMeasuredUnchecked"],message:"notMeasuredUnchecked is a subset of outcomes.notMeasured"})}),zB=d({runId:St,createdAt:Hi,revision:m().int().positive().nullable(),provenance:X3,queryCount:m().int().nonnegative(),answerCount:m().int().nonnegative(),mentionCoverage:Ia,citationCoverage:Ia,continuity:d({state:k(["first","comparable","definition-changed","model-changed","legacy-unknown"]),comparedRunId:s().nullable()}).strict()}).strict(),OB=d({sourceSnapshotIds:g(St).default([]),queryKey:St,queryId:s().nullable(),query:s(),provider:St,model:s().nullable(),location:s().nullable(),targetKeys:g(St),marketKeys:g(St).optional(),answerCount:m().int().nonnegative(),mentionCoverage:Ia,citationCoverage:Ia,uncheckedSources:d({answers:m().int().positive(),citedAnswers:m().int().nonnegative(),citedTargetKeys:g(St)}).strict().superRefine((e,n)=>{e.citedAnswers>e.answers&&n.addIssue({code:he.custom,path:["citedAnswers"],message:"citedAnswers cannot exceed answers"}),e.citedAnswers===0!=(e.citedTargetKeys.length===0)&&n.addIssue({code:he.custom,path:["citedTargetKeys"],message:"citedTargetKeys is empty exactly when no saved link cites a Property"})}).optional()}).strict(),PB=d({answerId:St,runId:St,queryKey:St,query:s(),provider:St,model:s().nullable(),location:s().nullable(),targetKeys:g(St),mentioned:N().nullable(),mentionUnavailableReason:E("identity-ambiguous").optional(),cited:N().nullable(),answerText:s().nullable(),createdAt:Hi,sources:g(s()),observedCompetitors:g(St)}).strict(),MB=d({domain:St,answerCount:m().int().nonnegative(),mentionCoverage:Ia,citationCoverage:Ia}).strict(),qB=d({name:St,answerCount:m().int().nonnegative()}).strict(),BB=Ve("state",[d({state:E("available")}).strict(),d({state:E("unavailable"),reason:E("frozen-competitor-identity-missing")}).strict()]),cS=d({id:St,label:s().trim().min(1),queryCount:m().int().nonnegative(),mentionCoverage:Ia,citationCoverage:Ia}).strict();function uS(e){return d({items:g(e),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict()}const J3=k(["current-unavailable","previous-unavailable","not-applicable"]),Zae=J3.enum,Kf=Ve("state",[d({state:E("available"),previous:Ia,delta:ve(m().min(-1).max(1))}).strict(),d({state:E("unavailable"),reason:J3}).strict()]),dS=d({id:St,createdAt:Hi,completedAt:Hi.nullable()}).strict(),W3=k(["no-selected-run","no-previous-run","scoped-run","partial-run","definition-changed","model-changed","legacy-unknown"]),Yae=W3.enum,LB=Ve("state",[d({state:E("available"),previousRun:dS,mentionCoverage:Kf,citationCoverage:Kf,propertyReach:Kf}).strict(),d({state:E("unavailable"),reason:W3,previousRun:dS.nullable()}).strict()]),UB=d({queryClass:_B,summary:IB,trend:g(zB),comparison:LB.optional(),queries:uS(OB),evidence:uS(PB),competitorAvailability:BB,competitors:g(MB),observedCompetitors:g(qB),breakdown:d({properties:g(cS),groups:g(cS)}).strict()}).strict(),VB=k(["measured","not-measured","partial"]),$B=d({state:VB,activeRevision:m().int().positive().nullable(),measuredRevision:m().int().positive().nullable(),awaitingSweep:N(),pendingAssignmentCount:m().int().nonnegative(),completedAt:Hi.nullable()}).strict(),KB=d({mode:CB,queryClass:Z3,scope:hm,market:hm.optional(),provider:s().nullable(),model:s().nullable(),location:Y3,time:d({from:Hi.nullable(),to:Hi.nullable()}).strict(),revision:m().int().positive().nullable(),run:d({id:s().nullable(),explicit:N()}).strict(),provenance:X3,measurement:$B,availability:Ve("state",[d({state:E("available")}).strict(),d({state:E("unsupported"),reason:E("advanced-v1")}).strict()])}).strict();d({selection:KB,scopeOptions:g(hm),filterOptions:DB,populations:g(UB).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:he.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:he.custom,path:x,message:"Available changes require a current rate"}),j===null&&n.addIssue({code:he.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:he.custom,path:[...x,"delta"],message:"Delta must equal current minus previous"}),e.selection.run.id===null&&n.addIssue({code:he.custom,path:x,message:"Available changes require a selected run"})}}});const eA=k(["retired-scope","retired-market"]),GB=eA.enum,HB=d({reason:eA,kind:m1.exclude(["project"]),key:St}).strict().superRefine((e,n)=>{e.reason===GB["retired-market"]&&e.kind!=="market"&&n.addIssue({code:he.custom,path:["kind"],message:"retired-market details must name a market"})});function Xae(e){const n=HB.safeParse(e);return n.success?n.data:void 0}function FB(e,n){let i=e;for(const[r,u]of Object.entries(n))i=i.split(`{${r}}`).join(u);return i.trim()}const p1=s().regex(/^[a-f0-9]{64}$/),pa=s().trim().min(1).max(256),Za=s().trim().min(1).max(4e3),h1=s().datetime(),Wm=s().regex(/^qtw_[a-f0-9]{64}$/),tA=s().regex(/^qtp_[a-f0-9]{64}$/),f1=k(["simple","advanced"]),nA=d({templateId:pa,templateVersion:s().trim().min(1).max(256),template:Za,bindings:Ue(s().trim().min(1).max(128),s().trim().min(1).max(128)),output:Za}).strict(),QB=d({source:k(["manual","query-set","template","research","discovery"]),sourceId:pa.nullable(),capturedAt:s().datetime(),template:nA.optional()}).strict().superRefine((e,n)=>{e.source==="template"&&e.template===void 0&&n.addIssue({code:he.custom,path:["template"],message:"Template provenance is required for a template query."}),e.source!=="template"&&e.template!==void 0&&n.addIssue({code:he.custom,path:["template"],message:"Only a template query may carry template provenance."})}),ZB=Ve("source",[d({source:E("manual"),text:Za}).strict(),d({source:E("template"),templateId:pa,templateVersion:s().trim().min(1).max(256),template:Za}).strict(),d({source:E("research"),researchRunQueryId:pa}).strict(),d({source:E("discovery"),discoveryProbeId:pa}).strict()]),g1=d({targetKeys:g(fe).optional(),groupKeys:g(fe).optional(),marketKeys:g(fe).optional()}).strict(),YB=d({providers:g(bt).min(1),models:Ue(bt,s().trim().min(1)),location:s().trim().min(1).nullable()}).strict(),XB=d({input:ZB,audience:g1.optional(),contexts:g(YB).min(1).optional(),queryClass:Lo.optional()}).strict(),JB=d({queryId:pa.optional(),queryText:Za.optional(),audience:g1.optional()}).strict().superRefine((e,n)=>{e.queryId===void 0==(e.queryText===void 0)&&n.addIssue({code:he.custom,message:"Provide exactly one of queryId or queryText."})}),WB=d({queryId:pa,audience:g1.optional(),text:Za.optional(),queryClass:Fe([Lo,de()]).optional()}).strict().superRefine((e,n)=>{e.text===void 0&&e.queryClass===void 0&&n.addIssue({code:he.custom,message:"Provide query text or a classification change."})}),eL=d({additions:g(XB),removals:g(JB),edits:g(WB).optional()}).strict(),tL=eL.extend({expectedWorkspaceVersion:Wm}).strict();tL.extend({previewToken:tA,reviewedAt:h1}).strict();const nL=d({stableKey:fe,label:s().trim().min(1)}).strict(),aL=d({stableKey:fe,parentGroupKey:fe.optional(),label:s().trim().min(1),targetKeys:g(fe)}).strict(),iL=d({stableKey:fe,groupKey:fe.optional(),label:s().trim().min(1),usageEdges:g(U0)}).strict(),sL=d({targetKey:fe,groupKeys:g(fe),marketKeys:g(fe),queryClass:Lo.nullable(),classificationSource:k(["frozen","server","operator"]),contexts:g(Km).min(1)}).strict(),aA=d({queryId:pa,queryText:Za,normalizedText:Za,provenance:QB.nullable(),state:k(["tracked","awaiting-sweep"]),lastMeasuredAt:s().datetime().nullable(),assignments:g(sL)}).strict(),oL=d({researchRunId:pa,researchRunQueryId:pa,queryText:Za,createdAt:s().datetime()}).strict(),rL=d({discoverySessionId:pa,discoveryProbeId:pa,queryText:Za,createdAt:s().datetime()}).strict();d({mode:f1,workspaceVersion:Wm,active:d({revision:m().int().positive(),compiledChecksum:p1}).strict().nullable(),defaultContexts:g(Km),targets:g(nL),groups:g(aL),markets:g(iL),scopeOptions:g(hm).optional(),tracked:g(aA),savedSources:d({research:g(oL),discovery:g(rL)}).strict()}).strict();const Od=d({queryId:pa,queryText:Za,assignmentCount:m().int().nonnegative()}).strict(),iA=d({added:g(Od),removed:g(Od),reused:g(Od),unchanged:g(Od),noOp:N()}).strict(),sA=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:f1,workspaceVersion:Wm,previewToken:tA,reviewedAt:h1,active:d({revision:m().int().positive(),compiledChecksum:p1}).strict().nullable(),tracked:g(aA),diff:iA,workload:sA}).strict();d({committed:N(),mode:f1,workspaceVersion:Wm,reviewedAt:h1,active:d({revision:m().int().positive(),compiledChecksum:p1}).strict().nullable(),diff:iA,workload:sA}).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 lL=k(["invalid-url","unowned-host","duplicate-url","url-cap-reached"]),cL=d({kind:k(["exact","prefix","suffix","contains"]),value:s().trim().min(1)}).strict(),mS=d({host:s().trim().min(1),pathTemplate:s().trim().min(1)}).strict(),y1=d({primary:mS,aliases:g(mS).optional(),excludedSlugSuffixes:g(s().trim().min(1)).optional(),excludedSlugPatterns:g(cL).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:y1,maxUrls:m().int().positive().max(1e4).optional()}).strict();const Gf=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"})}),uL=d({classification:E("proposed"),reason:E("primary-match"),stableKey:bn,slug:s().trim().min(1),label:s().trim().min(1),primaryUrl:s().url(),aliasCoverageUrls:g(s().url())}).strict(),dL=d({classification:E("alias"),reason:E("exact-slug-match"),slug:s().trim().min(1),url:s().url(),targetStableKey:bn}).strict(),mL=d({kind:lL,url:s(),canonicalUrl:s().nullable(),duplicateOf:s().optional()}).strict();d({proposed:g(uL),aliases:g(dL),shared:g(Gf),unmatched:g(Gf),excluded:g(Gf),diagnostics:g(mL)}).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 b1=k(["assigned","sibling","ownedUnmapped","external","ambiguous","invalid"]),oA=k(["baseline","target"]),rA=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:ve(m().min(0).max(1)),unattributed:m().int().positive().optional(),unchecked:m().int().positive().optional()}).strict(),d({numerator:de(),denominator:de(),rate:de(),reason:rA}).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"})}),pL=s().trim().min(1).overwrite(e=>e.toLocaleLowerCase("en")),hL=d({executionId:s().trim().min(1),queryText:s().trim().min(1),provider:pL,context:Jt.nullable(),requestedModel:s().trim().min(1).optional()}).strict();d({schemaVersion:E(1),expectedSlots:g(hL)}).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 ep=d({executed:m().int().nonnegative(),expected:m().int().nonnegative(),complete:N(),sourceComplete:N(),sourceCompleteObservations:m().int().nonnegative(),answerComplete:N()}).strict(),pS=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:rA}).strict()]),fL=d({domains:g(pS),providers:g(d({provider:bt,domains:g(pS)}).strict())}).strict(),gL=d({provider:bt,completeness:ep,answerCoverage:zo}).strict(),yL=d({id:s().trim().min(1),label:s().trim().min(1),targetIds:g(s().trim().min(1)),completeness:ep,answerCoverage:zo,targetCoverage:zo,sov:fL,providers:g(gL)}).strict(),bL=d({provider:bt,completeness:ep,citationCoverage:zo,mentionCoverage:zo}).strict(),vL=d({id:s().trim().min(1),label:s().trim().min(1),completeness:ep,citationCoverage:zo,mentionCoverage:zo,providers:g(bL)}).strict(),lA=d({observationId:s().trim().min(1),expectedSlotId:s().trim().min(1),executionId:s().trim().min(1),usageEdgeId:s().trim().min(1),usageEdgeType:oA,provider:bt,queryText:s().trim().min(1),location:s().nullable(),sourceUrl:s(),bridged:N(),historical:N(),evidenceComplete:N(),classification:b1,normalizedUrl:s().nullable(),matchedTargetIds:g(s().trim().min(1)),matchedUrlIds:g(s().trim().min(1))}).strict(),xL=d({sourceUrl:s(),normalizedUrl:s().nullable(),classification:b1,matchedTargetIds:g(s().trim().min(1)),matchedUrlIds:g(s().trim().min(1))}).strict(),wL=d({observationId:s().trim().min(1),expectedSlotId:s().trim().min(1),executionId:s().trim().min(1),usageEdgeId:s().trim().min(1),usageEdgeType:oA,provider:bt,queryText:s().trim().min(1),location:s().nullable(),queryClass:Fe([k(["branded","non-brand"]),de()]),mentioned:N().nullable(),cited:N().nullable(),sources:g(xL),sourceCount:m().int().nonnegative(),sourcesTruncated:N(),bridged:N(),historical:N(),evidenceComplete:N()}).strict(),SL=d({sourceUrl:s(),normalizedUrl:s().nullable(),matchedUrlIds:g(s().trim().min(1))}).strict(),kL=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:g(fe).min(1),sources:g(SL).min(1),sourceCount:m().int().positive(),sourcesTruncated:N(),evidenceComplete:N()}).strict(),jL=d({bridgedObservationIds:g(s()),historicalObservationIds:g(s()),evidenceIncompleteObservationIds:g(s()),ambiguousObservationIds:g(s()),unmatchedObservationIds:g(s())}).strict(),AL=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:AL.nullable(),groups:g(yL),targets:g(vL),evidence:g(lA),diagnostics:jL}).strict();d({property:d({targetKey:fe,label:s().min(1)}).strict(),queryClass:ea,measurement:d({state:$0,displayedRunId:s().min(1).optional(),completedAt:s().datetime().optional()}).strict(),evidence:To(lA).optional(),answers:To(wL).optional(),otherQueries:To(kL).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 v1=k(["queued","running","completed","partial","failed"]);v1.enum;const cA=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"]);cA.enum;d({providers:g(bt).min(1).optional(),dryRun:N().optional()}).strict();const uA=d({id:s(),runId:s(),projectId:s(),status:v1,providers:g(s()),expected:m().int().nonnegative(),filled:m().int().nonnegative(),error:s().nullable(),createdAt:s(),startedAt:s().nullable(),finishedAt:s().nullable()}),NL=d({runId:s(),status:ta,planned:N(),readable:N(),expected:m().int().nonnegative(),executed:m().int().nonnegative(),missing:m().int().nonnegative(),missingByProvider:Ue(s(),m().int().nonnegative()),fillable:N(),refusal:d({code:cA,message:s()}).nullable(),latestFill:uA.nullable()}),CL=k(["queued","already-complete","dry-run"]);d({outcome:CL,completeness:NL,fill:uA.nullable()});const fa=s().trim().min(1),Vs=s().trim().min(1),_L=s().trim().min(1),je=m().int().nonnegative(),lu=d({state:$0,displayedRunId:fa.nullable(),planRevision:m().int().positive(),completedAt:s().datetime().nullable()}).strict(),Uo=d({targetKey:fe,label:Vs}).strict(),ha={runId:fa.optional(),provider:bt.optional(),location:_L.optional()},Oo=s().trim().min(1),Hf=5,TL=10,EL=5,RL=10,DL="tied Properties have both zero mentions and zero citations; ordered by name, not ranked",x1=k(["weakest-properties","strongest-mentions","weakest-mentions","excluded-mentions","markets","observed-names","cited-domains"]);x1.enum;d({runId:ha.runId,groupKey:fe.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:x1.optional(),cursor:fa.optional(),answers:k(["all","not-mentioned"]).optional()}).strict();const hS=Dg,dA={metro:hS.nullable(),otherMetros:g(hS).min(1).optional(),submarkets:g(Vs),queries:je},mA=d({name:Oo,answers:je}).strict(),IL=d({name:Oo,occurrences:je}).strict(),tp=d({domain:s().trim().min(1),answers:je}).strict(),zL=Uo.extend({...dA,mentionCoverage:pn,citationCoverage:pn,flags:je,namedInsteadInAnswerText:g(mA).max(Hf).optional(),namedInsteadInAnswerTextTotal:je.optional(),citedDomains:g(tp).max(Hf).optional(),citedDomainsTotal:je.optional(),recommendedInstead:g(IL).max(Hf).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:he.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:he.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),e.recommendedInsteadTotal!==e.namedInsteadInAnswerTextTotal&&n.addIssue({code:he.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:he.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:he.custom,path:["recommendedInsteadTruncated"],message:"Truncation must agree with the replacement total"})}),OL=d({metro:Vs.nullable(),count:m().int().positive()}).strict(),PL=d({count:m().int().min(2),mentionRate:ve(),citationRate:ve(),note:k([DL,"tied Properties are ordered by name, not ranked"]),byMetro:g(OL).optional(),namedInstead:g(mA).max(RL).optional(),namedInsteadTotal:je.optional()}).strict().superRefine((e,n)=>{e.namedInstead!==void 0&&(e.namedInsteadTotal===void 0||e.namedInstead.length>e.namedInsteadTotal)&&n.addIssue({code:he.custom,path:["namedInsteadTotal"],message:"Total cannot be smaller than the returned names"})}),ML=d({basis:E("initial-weakest-selection-and-zero-signal-tie").optional(),properties:je,answers:je,domains:g(tp).max(TL),domainTotal:je,ownDomainAnswers:je.optional()}).strict().superRefine((e,n)=>{e.ownDomainAnswers!==void 0&&e.ownDomainAnswers>e.answers&&n.addIssue({code:he.custom,path:["ownDomainAnswers"],message:"Own-domain answers cannot exceed the basis"}),e.domains.length>e.domainTotal&&n.addIssue({code:he.custom,path:["domainTotal"],message:"Total cannot be smaller than the returned domains"}),e.domains.some(i=>i.answers>e.answers)&&n.addIssue({code:he.custom,path:["domains"],message:"A domain cannot be cited by more answers than the basis holds"})}),qL=d({groupKey:fe,label:Vs,parentGroupKey:fe.nullable(),childMarketCount:je,propertyCount:je,propertiesMentioned:Ro,propertiesNeverMentioned:Ro.optional(),mentionCoverage:pn,citationCoverage:pn}).strict(),BL=d({population:E("top-level-markets"),queryClass:ea,totalMarkets:je,eligibleMarketCount:je,excludedMarketCount:je,items:g(d({groupKey:fe,label:Vs,propertyCount:je,mentionCoverage:pn.options[0],citationCoverage:pn.options[0]}).strict()).max(EL)}).strict(),fS=Uo.extend({...dA,mentionCoverage:pn.options[0],citationCoverage:pn}).strict(),LL=d({eligiblePropertyCount:je,strongest:g(fS).max(50),weakest:g(fS).max(50),excluded:g(Uo.extend({reason:nu}).strict()),truncated:N(),excludedTotal:je.optional()}).strict();d({portfolio:d({groupKey:fe.nullable(),label:Vs.nullable(),measurementScope:Fe([k(["full","spot_check"]),de()])}).strict(),measurement:lu,queryClass:ea,engines:g(bt),metrics:d({propertiesMentioned:Ro,propertiesNeverMentioned:Ro.optional(),mentionCoverage:pn,citationCoverage:pn}).strict(),weakestMarkets:BL.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:g(zL),tiedAtWeakest:PL.nullable(),weakestAnswerSources:ML.nullable().optional(),mentionRanking:LL,markets:g(qL),totalMarkets:je,marketsTruncated:N(),totalProperties:je,truncated:N(),pageList:x1.optional(),nextCursor:fa.nullable().optional(),detailsOmitted:g(s()).optional(),answerEvidence:d({answers:E("not-mentioned"),populationSize:je,answerCount:je,unknownMentionAnswers:je,observedNames:g(d({name:Oo,answerCount:je}).strict()),observedNamesTotal:je,citedDomains:g(tp),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:he.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:he.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:he.custom,path:["marketsTruncated"],message:"Market truncation must agree with the market total"})});d({targetKey:fe,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 Lg={queryId:fa,text:Vs,class:L0,provider:bt,requestedModel:s().nullable(),servedModel:s().nullable(),location:s().nullable()},UL=Ve("status",[d({resultId:fa,...Lg,status:E("answered"),mentioned:N().nullable(),cited:N().nullable(),recommendedInstead:g(Oo),answerExcerpt:s().nullable()}).strict(),d({resultId:de(),...Lg,status:E("missing"),mentioned:de(),cited:de(),recommendedInstead:g(Oo).length(0),answerExcerpt:de()}).strict()]);d({property:Uo,measurement:lu,queryClass:ea,questions:g(UL),total:je,truncated:N()}).strict();d({targetKey:fe,resultId:fa}).strict();const VL=d({url:fa,classification:b1,matchedTargetKeys:g(fe),assigned:N(),historical:N(),evidenceComplete:N()}).strict().superRefine((e,n)=>{e.assigned!==(e.classification==="assigned")&&n.addIssue({code:he.custom,path:["assigned"],message:"Assigned must agree with the source attribution classification"})});d({property:Uo,measurement:lu,question:d({resultId:fa,...Lg,status:E("answered")}).strict(),mentioned:N().nullable(),cited:N().nullable(),recommendedInstead:g(Oo),answer:s().nullable(),sources:g(VL),captureStatus:Fe([Vm,de()]),retrievalStatus:Fe([N0,de()]),retrievalContract:Fe([C0,de()])}).strict();d({targetKey:fe,runId:ha.runId,provider:ha.provider,location:ha.location,queryClass:ea.optional(),limit:m().int().positive().max(50).optional()}).strict();const $L=Ve("state",[d({state:E("available"),answeredResults:je,targetMissResults:je,recommendationOccurrences:je}).strict(),d({state:E("unavailable"),reason:nu}).strict()]),KL=d({name:Oo,occurrences:je,providers:g(bt).max(5),providerTotal:je,providersTruncated:N(),questions:g(Vs).max(5),questionTotal:je,questionsTruncated:N()}).strict().superRefine((e,n)=>{(e.providers.length>e.providerTotal||e.questions.length>e.questionTotal)&&n.addIssue({code:he.custom,message:"Evidence totals cannot be smaller than returned evidence"}),e.providersTruncated!==e.providers.length<e.providerTotal&&n.addIssue({code:he.custom,path:["providersTruncated"],message:"Provider truncation must agree with its total"}),e.questionsTruncated!==e.questions.length<e.questionTotal&&n.addIssue({code:he.custom,path:["questionsTruncated"],message:"Question truncation must agree with its total"})}),GL=10;d({property:Uo,measurement:lu,queryClass:ea,basis:$L,competitors:g(KL),total:je,truncated:N(),citedDomains:g(tp).max(GL).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:he.custom,path:["citedDomains"],message:"Cited domains require their total and answer basis"});return}i.length>r&&n.addIssue({code:he.custom,path:["citedDomainsTotal"],message:"Total cannot be smaller than the returned domains"}),i.some(h=>h.answers>u)&&n.addIssue({code:he.custom,path:["citedDomains"],message:"A domain cannot be cited by more answers than the basis holds"})}});const pA=k(["magnitude","label"]),HL=2,FL=k(["all","group","property"]);d({runId:ha.runId,scope:FL.default("all"),groupKey:fe.optional(),targetKey:fe.optional(),queryClass:ea.default(SP),provider:ha.provider,location:ha.location,limit:m().int().positive().max(50).optional(),sort:pA.optional()}).strict().superRefine((e,n)=>{e.scope==="all"&&(e.groupKey!==void 0||e.targetKey!==void 0)&&n.addIssue({code:he.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:he.custom,path:["groupKey"],message:"Group scope requires groupKey only"}),e.scope==="property"&&(e.targetKey===void 0||e.groupKey!==void 0)&&n.addIssue({code:he.custom,path:["targetKey"],message:"Property scope requires targetKey only"})});const hA=k(["no_previous_run","execution_identity_changed","incomplete","not_comparable"]),fA=lu.extend({executionIdentity:fa.nullable(),measurementScope:Fe([k(["full","spot_check"]),de()])}).strict();function gA(e,n){if(e.previous.state!=="available"||e.current.state!=="available"){n.addIssue({code:he.custom,message:"Available deltas require two available metrics"});return}Math.abs(e.delta-(e.current.value-e.previous.value))>Number.EPSILON&&n.addIssue({code:he.custom,path:["delta"],message:"Delta must equal current minus previous"})}const yA=d({state:E("unavailable"),reason:nu}).strict(),fm=Ve("state",[d({state:E("available"),previous:pn,current:pn,delta:ve()}).strict().superRefine(gA),yA]),QL=Ve("state",[d({state:E("available"),previous:Ro,current:Ro,delta:m().int()}).strict().superRefine(gA),yA]),Ff=d({propertiesMentioned:QL,mentionCoverage:fm,citationCoverage:fm}).strict(),ZL=d({improved:je,declined:je,mixed:je,withinNoise:je,unchanged:je,notComparable:je,total:je,noiseAnswers:E(HL)}).strict().superRefine((e,n)=>{e.improved+e.declined+e.mixed+e.withinNoise+e.unchanged+e.notComparable!==e.total&&n.addIssue({code:he.custom,path:["total"],message:"Move buckets must sum to total"})}),YL=Uo.extend({mentionCoverage:fm,citationCoverage:fm,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:fA,queryClass:ea.optional(),comparison:Ve("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:Ff,metricsByClass:d({branded:Ff,nonBrand:Ff}).strict().optional(),sort:pA.optional(),distribution:ZL.optional(),changedProperties:g(YL),totalProperties:je,truncated:N()}).strict(),d({state:E("unavailable"),reason:hA}).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:he.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:he.custom,path:["current"],message:"A comparison requires an identified current run"});return}e.comparison.previous.planRevision!==e.current.planRevision&&n.addIssue({code:he.custom,path:["comparison","previous","planRevision"],message:"Comparisons cannot cross plan revisions"}),e.comparison.previous.executionIdentity!==e.current.executionIdentity&&n.addIssue({code:he.custom,path:["comparison","previous","executionIdentity"],message:"Comparisons cannot cross execution identities"})});d({runId:ha.runId}).strict();const XL=k(["no_completed_run","incomplete","evidence_incomplete","no_population","not_applicable"]),cu=d({state:E("unavailable"),reason:XL}).strict(),JL=d({state:E("available"),expected:je,executed:je,answered:je,missing:je}).strict(),WL=Ve("state",[JL,cu]).superRefine((e,n)=>{e.state==="available"&&(e.executed+e.missing!==e.expected&&n.addIssue({code:he.custom,message:"Expected must equal executed plus missing"}),e.answered>e.executed&&n.addIssue({code:he.custom,path:["answered"],message:"Answered cannot exceed executed"}))}),eU=d({state:E("available"),complete:je,partial:je,failed:je,unsupported:je,notRecorded:je}).strict(),tU=Ve("state",[eU,cu]),nU=d({state:E("available"),used:je,notUsed:je,unknown:je,notApplicable:je,notRecorded:je}).strict(),aU=Ve("state",[nU,cu]),iU=d({state:E("available"),expectedQuestions:je,answeredQuestions:je,missingQuestions:je}).strict(),sU=Ve("state",[iU,cu]).superRefine((e,n)=>{e.state==="available"&&e.answeredQuestions+e.missingQuestions!==e.expectedQuestions&&n.addIssue({code:he.custom,message:"Expected questions must equal answered plus missing"})}),gS=Ve("state",[d({state:E("available"),answered:je,unattributed:je}).strict(),cu]).superRefine((e,n)=>{e.state==="available"&&e.unattributed>e.answered&&n.addIssue({code:he.custom,path:["unattributed"],message:"Unattributed answers cannot exceed answered"})}),oU=d({status:v1,providers:g(s()),expected:je,filled:je,createdAt:s(),finishedAt:s().nullable()}).strict();d({run:fA,completeness:WL,capture:tU,retrieval:aU,population:sU,comparison:Ve("state",[d({state:E("available"),previousDisplayedRunId:fa}).strict(),d({state:E("unavailable"),reason:hA}).strict()]),unattributedByClass:d({branded:gS,nonBrand:gS}).strict().optional(),latestFill:oU.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:he.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:he.custom,path:["retrieval"],message:"Retrieval counts must total executed snapshots"})});const Qr=s().regex(/^[a-f0-9]{64}$/),Ya=s().trim().min(1).max(256),mi=m().int().positive(),yS=d({kind:k(["user","api-key","system"]),id:s().trim().min(1),label:s().trim().min(1)}).strict(),rU=k(["proposed","included","excluded"]),lU=k(["manual","sitemap"]),w1=d({stableKey:fe,label:s().trim().min(1),status:rU,aliases:g(s().trim().min(1)),identityAliases:g(s().trim().min(1)).optional(),urlMatchers:g(s().trim().min(1)),source:lU,discoveredUrl:s().trim().min(1).optional(),discoveryIdentity:s().trim().min(1).optional()}).strict(),np=d({providers:g(bt).optional(),models:Ue(bt,s().trim().min(1)).optional(),locations:g(s().trim().min(1)).optional()}).strict(),cU=k(["branded","non-brand","unclassified"]),uU=k(["rule","operator"]),bA=d({targetKey:fe,queryId:Ya,contextOverride:np.optional(),executionContexts:g(Km.extend({executionNodeKey:s().min(1).optional()})).min(1).optional(),queryProvenance:E2.optional(),queryClass:cU,classificationSource:uU}).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."})}),ap=T2,vA=d({stableKey:fe,label:s().trim().min(1),parentGroupKey:fe.optional(),targetKeys:g(fe),competitors:g(ap)}).strict(),dU=d({sitemapUrl:s().url(),rule:y1,exclusions:g(s().trim().min(1)),inputChecksum:Qr,reviewedAt:s().datetime().optional()}).strict(),mU=d({providers:g(bt),models:Ue(bt,s().trim().min(1)).optional(),locations:g(s().trim().min(1))}).strict(),xA=R2,pU=d({defaultContext:mU,targets:g(w1),assignments:g(bA),groups:g(vA),reportingScopes:g(xA).optional(),discovery:dU.optional()}).strict(),hU=d({id:s().trim().min(1),projectId:s().trim().min(1),schemaVersion:E(2),baseActiveVersionId:s().trim().min(1).nullable(),baseActiveRevision:mi.nullable(),authoring:pU,createdBy:yS,updatedBy:yS,createdAt:s().datetime(),updatedAt:s().datetime()}).strict(),S1=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(),fU=d({code:s().trim().min(1),message:s().trim().min(1),path:g(Fe([s(),m().int()]))}).strict(),wA=d({etag:s().trim().min(1),changed:N(),warnings:g(fU),counts:S1}).strict();d({draft:hU.nullable(),etag:s().trim().min(1).nullable()}).strict();To(w1);To(bA);To(vA);d({search:s().optional(),cursor:s().trim().min(1).optional(),limit:m().int().positive().max(V0).optional()}).strict();d({expectedActiveRevision:mi.nullable()}).strict();d({sitemapUrl:s().url(),rule:y1,exclusions:g(s().trim().min(1)).optional()}).strict();const gU=d({discoveryIdentity:s().trim().min(1),action:k(["create","rebind","ignore"]),targetKey:fe.optional(),label:s().trim().min(1).optional()}).strict();d({selections:g(gU),selectedTargetKeys:g(fe).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:w1}).strict();d({targetKey:fe,label:s().trim().min(1)}).strict();d({targetKey:fe,mergedKeys:g(fe).min(1)}).strict();d({targetKey:fe,cleanup:E("assignments-and-group-memberships").optional()}).strict();d({targetKey:fe,discoveryIdentity:s().trim().min(1),discoveredUrl:s().url()}).strict();const SA={targetKeys:g(fe).optional(),groupKeys:g(fe).optional()};function kA(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(SA).strict().superRefine(kA);const yU=d({...SA,queryIds:g(Ya).min(1),contextOverride:np.optional()}).strict().superRefine(kA);Fe([d({targetKey:fe,queryIds:g(Ya).min(1),contextOverride:np.optional()}).strict(),yU]);const bU=d({groupKey:fe,label:s().trim().min(1),memberCount:m().int().positive()}).strict();d({draftEtag:s().trim().min(1),groups:g(bU),resolvedTargetKeys:g(fe),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:g(d({targetKey:fe,queryId:Ya}).strict()).min(1),contextOverride:np.optional()}).strict();Fe([d({targetKey:fe,queryId:Ya}).strict(),d({targetKeys:g(fe).min(1),queryId:Ya}).strict()]);d({targetKey:fe}).strict();d({queryClass:L0,assignments:g(d({targetKey:fe,queryId:Ya}).strict()).min(1)}).strict();d({group:d({stableKey:fe,label:s().trim().min(1),parentGroupKey:fe.nullable().optional(),targetKeys:g(fe),competitors:g(ap).optional()}).strict()}).strict();d({market:xA}).strict();d({groupKey:fe}).strict();d({groupKey:fe,competitor:ap}).strict();d({expectedActiveRevision:mi,groupKey:fe,domain:s().trim().min(1).refine(e=>eu(e)!==null,"A competitor domain must be a valid hostname"),label:s().trim().min(1).optional(),aliases:g(s().trim().min(1)).optional()}).strict();wA.extend({groupKey:fe,competitor:ap,draftCreated:N(),published:d({revision:mi,competitorsChanged:E(!1)}).strict()}).strict();d({groupKey:fe,competitorKey:fe}).strict();const gm=d({ruleId:s().trim().min(1),severity:k(["fail","warn"]),message:s().trim().min(1),path:g(Fe([s(),m().int()]))}).strict();Ve("ok",[d({ok:E(!0),compiledChecksum:Qr,checks:g(gm),counts:S1,plan:Gm}).strict(),d({ok:E(!1),compiledChecksum:de(),checks:g(gm).min(1)}).strict()]);const bS=d({added:g(s().trim().min(1)),removed:g(s().trim().min(1)),changed:g(s().trim().min(1)),unchanged:g(s().trim().min(1))}).strict(),vU=d({activeRevision:mi.nullable(),targets:bS,groups:bS,assignments:d({added:m().int().nonnegative(),removed:m().int().nonnegative(),reclassified:m().int().nonnegative()}).strict(),execution:d({addedNodeKeys:g(s().trim().min(1)),removedNodeKeys:g(s().trim().min(1))}).strict()}).strict();Ve("ok",[d({ok:E(!0),compiledChecksum:Qr,checks:g(gm),counts:S1,plan:Gm,diff:vU}).strict(),d({ok:E(!1),compiledChecksum:de(),checks:g(gm).min(1),diff:de()}).strict()]);d({expectedActiveRevision:mi.nullable(),expectedCompiledChecksum:Qr}).strict();d({published:N(),active:d({revision:mi,checksum:Qr,compiledChecksum:Qr,createdAt:s().datetime(),plan:Gm}).strict()}).strict();d({discarded:N()}).strict();d({expectedActiveRevision:mi}).strict();d({deactivated:N(),previousRevision:mi.nullable()}).strict();const xU=k(["republish_required","setup_in_progress","awaiting_first_run","operational","simple"]),wU=k(["republish_setup","continue_setup","run_measurement","view_measurement","start_setup"]),SU=k(["simple","draft-only","active-v1","active-v2"]);d({state:xU,nextAction:wU,mode:SU,answerVisibilityProviderReady:N(),activeRevision:mi.nullable(),activeSchemaVersion:Fe([E(1),E(2)]).nullable(),draft:d({etag:s().trim().min(1),updatedAt:s().datetime()}).strict().nullable()}).strict();const jA=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(),kU=d({queryId:Ya,queryText:s().min(1),position:m().int().nonnegative()}).strict();jA.extend({items:g(kU)}).strict();d({querySets:g(jA)}).strict();d({name:s().trim().min(1),description:s().nullable().optional(),queryIds:g(Ya)}).strict();const jU=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:g(s().trim().min(1)),createdAt:s().datetime(),updatedAt:s().datetime()}).strict();d({templates:g(jU)}).strict();d({name:s().trim().min(1),description:s().nullable().optional(),pattern:s().trim().min(1),variables:g(s().trim().min(1))}).strict();d({bindings:g(Ue(s().trim().min(1),s().trim().min(1))).min(1),querySetId:s().trim().min(1).optional()}).strict();d({created:g(d({queryId:Ya,queryText:s().min(1)}).strict()),existing:g(d({queryId:Ya,queryText:s().min(1)}).strict())}).strict();const ym=s().regex(/^[a-f0-9]{64}$/),ip=m().int().positive();d({stableKey:fe,kind:k(["target","group"]),retiredAt:s().datetime().nullable()}).strict();d({csv:s()}).strict();k(["matched","ambiguous","unmatched","invalid","duplicate","proposed","excluded"]);const AU=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"]),Ug=d({dataRow:ip,property:s(),group:s(),url:s().nullable(),normalizedProperty:s(),normalizedGroupLabel:s()}).strict(),xc=Ug.extend({reason:AU}),NU=d({source:k(["draft-target","draft-group","persisted-segment","retired-segment","proposed-group"]),stableKey:fe,kind:k(["target","group"]).optional(),retiredAt:s().datetime().nullable().optional(),normalizedGroupLabel:s().optional()}).strict(),CU=d({proposedGroupKey:fe,evidence:g(NU).min(1)}).strict(),_U=Ve("status",[Ug.extend({status:E("matched"),targetKey:fe,groupKey:fe}).strict(),xc.extend({status:E("ambiguous"),candidateTargetKeys:g(fe).min(1).optional(),candidateGroupKeys:g(fe).min(1).optional()}).strict(),xc.extend({status:E("unmatched")}).strict(),xc.extend({status:E("invalid"),groupKeyConflict:CU.optional()}).strict(),Ug.extend({status:E("duplicate"),duplicateOfRow:ip,targetKey:fe,groupKey:fe}).strict(),xc.extend({status:E("proposed"),targetKey:fe}).strict(),xc.extend({status:E("excluded"),targetKey:fe}).strict()]),TU=d({normalizedGroupLabel:s(),groupKey:fe,label:s().trim().min(1),action:k(["create","extend"]),matchedRows:g(ip),targetKeys:g(fe),addedTargetKeys:g(fe),unchangedTargetKeys:g(fe)}).strict(),EU=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:ym,previewChecksum:ym,rows:g(_U),groupChanges:g(TU),counts:EU}).strict();d({csv:s(),sourceChecksum:ym,previewChecksum:ym,acceptedRows:g(ip).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."})});wA.extend({appliedRows:m().int().nonnegative(),addedMemberships:m().int().nonnegative(),unchangedMemberships:m().int().nonnegative()}).strict();const _o=d({slope:m(),intercept:m(),r2:m(),start:m(),end:m(),n:m(),startIndex:m(),endIndex:m()}),RU=k(["gsc","ga4","gbp"]);d({id:s(),domain:s(),connectionType:RU,propertyId:s().nullable().optional(),sitemapUrl:s().nullable().optional(),scopes:g(s()).default([]),createdAt:s(),updatedAt:s()});d({authUrl:s().url(),redirectUri:s().url()}).strict();const DU=d({date:s(),query:s(),page:s(),country:s().nullable().optional(),device:s().nullable().optional(),clicks:m(),impressions:m(),ctr:ve(),position:m()});k(["clicks","impressions","date"]);d({rows:g(DU),totalMatching:m(),truncated:N(),latestAvailableDate:s().nullable()});const IU=d({date:s(),clicks:m(),impressions:m(),ctr:ve(),position:m().nullable()}),AA=d({startDate:s().nullable(),endDate:s().nullable(),latestDataDate:s().nullable(),daysSinceLatestData:m().nullable()}),zU=d({clicks:_o.nullable(),impressions:_o.nullable(),ctr:_o.nullable(),position:_o.nullable()}),vS=d({startDate:s(),endDate:s(),clicks:m(),impressions:m(),ctr:ve().nullable(),position:m().nullable(),source:k(["property-daily","dimensioned","mixed","empty"])}),OU=d({days:m(),basis:k(["prior-window","split-window"]).optional(),prior:vS,trailing:vS,comparable:N(),change:d({clicks:ve().nullable(),impressions:ve().nullable(),ctr:ve().nullable(),position:ve().nullable()})});d({totals:d({clicks:m(),impressions:m(),ctr:ve(),position:m().nullable(),positionDays:m(),days:m()}),daily:g(IU),window:AA.optional(),trends:zU.optional(),periodComparison:OU.nullable().optional()});const PU=d({page:s(),clicks:m(),impressions:m(),ctr:ve()});d({rows:g(PU),totals:d({clicks:m(),impressions:m(),ctr:ve(),days:m(),coveredFrom:s().nullable(),coveredThrough:s().nullable(),complete:N()}).nullable(),totalsSource:E("property-daily"),rankedFrom:s().nullable(),rankedThrough:s().nullable()});const MU=k(["google","page-summed","mixed"]),qU=d({query:s(),clicks:m(),impressions:m(),ctr:ve(),position:m(),days:m(),source:MU});d({rows:g(qU),totalMatching:m(),truncated:N(),window:AA.extend({earliestDataDate:s().nullable().optional()})});const Vg=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:g(s()).default([]),referringUrls:g(s()).default([]),inspectedAt:s()});k(["stable","reindexed","deindexed","still-missing","new"]);const BU=d({url:s(),previousState:s().nullable(),currentState:s().nullable(),transitionDate:s()}),LU=d({reason:s(),count:m(),urls:g(Vg).default([])});d({summary:d({total:m(),indexed:m(),notIndexed:m(),deindexed:m(),percentage:ot(),indexedShare:ve(m().min(0).max(1)).nullable(),notIndexedShare:ve(m().min(0).max(1)).nullable()}),lastInspectedAt:s().nullable(),lastSyncedAt:s().nullable(),indexed:g(Vg).default([]),notIndexed:g(Vg).default([]),deindexed:g(BU).default([]),reasonGroups:g(LU).default([])});d({url:s(),type:k(["URL_UPDATED","URL_DELETED"]),notifiedAt:s()});const UU=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:g(UU).default([])});d({date:s(),indexed:m(),notIndexed:m(),unknownPages:m().default(0),verifiedByInspection:m().default(0),derivedFromImpressions:m().default(0),reasonBreakdown:Ue(s(),m()).default({})});const VU=d({siteUrl:s(),permissionLevel:s()});d({sites:g(VU).default([])});const $U=d({type:s(),submitted:s(),indexed:s().optional().describe("Deprecated compatibility field.")}),NA=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:g($U).optional()});d({sitemaps:g(NA).default([]),summary:d({total:m().int().nonnegative(),indexes:m().int().nonnegative(),files:m().int().nonnegative()}),preferredSubmissionUrls:g(s()).default([])});d({sitemapUrls:g(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 KU=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:g(KU)});d({sitemaps:g(NA),primarySitemapUrl:s(),run:d({id:s(),projectId:s(),kind:s(),status:s(),trigger:s(),createdAt:s()}).nullable()});const mt=s().trim().min(1),xS=s().regex(/^[a-f0-9]{64}$/i),GU=k(["not-connected","selection-required","connected","stale"]),Pd=GU.enum,HU=k(["live","draft"]),CA=HU.enum,Yd=d({accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),selectedAt:s().nullable()}).strict(),Qf=d({id:mt,projectId:mt,scopes:g(s()).default([]),selection:Yd,lastValidatedAt:s().nullable(),lastSnapshotAt:s().nullable(),createdAt:s(),updatedAt:s()}).strict(),_A=d({id:mt,path:s(),name:s(),shareData:N().nullable()}).strict(),TA=d({accountId:mt,id:mt,path:s(),name:s(),publicId:s().nullable(),domainName:s().nullable(),usageContexts:g(s())}).strict(),k1=d({accountId:mt,containerId:mt,id:mt,path:s(),name:s(),description:s().nullable(),fingerprint:s().nullable()}).strict(),FU=d({accounts:g(_A),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();d({accountId:mt,containers:g(TA),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();d({accountId:mt,containerId:mt,workspaces:g(k1),totalAccessible:m().int().nonnegative(),truncated:N(),fetchedAt:s()}).strict();const QU=d({id:mt,name:s(),type:s(),paused:N(),firingTriggerIds:g(mt),blockingTriggerIds:g(mt),referencedVariableIds:g(mt),parameterKeys:g(s()),fingerprint:s().nullable()}).strict(),ZU=d({id:mt,name:s(),type:s(),customEventNames:g(s()),filterKeys:g(s()),autoEventFilterKeys:g(s()),fingerprint:s().nullable()}).strict(),YU=d({id:mt,name:s(),type:s(),dataLayerVariableName:s().nullable(),parameterKeys:g(s()),fingerprint:s().nullable()}).strict(),EA=k(["recognized","unknown"]),wS=EA.enum,XU=k(["literal","variable-ref","absent","unknown"]),sp=XU.enum,JU=s().trim().min(5).max(132).regex(/^\{\{\w[\w ./-]{0,127}\}\}$/),rl=d({source:E(sp.absent),literal:de(),variableRef:de()}).strict(),ll=d({source:E(sp.unknown),literal:de(),variableRef:de()}).strict(),cl=d({source:E(sp["variable-ref"]),literal:de(),variableRef:JU}).strict();function uu(e){return d({source:E(sp.literal),literal:e,variableRef:de()}).strict()}const WU=s().trim().max(23).regex(/^(?:AW-)?\d{1,20}$/i),eV=s().trim().min(1).max(128).regex(/^[\w-]+$/),tV=s().trim().min(1).max(20).regex(/^(?:0|[1-9]\d{0,11})(?:\.\d{1,6})?$/),nV=s().trim().length(3).regex(/^[a-z]{3}$/i);Ve("source",[uu(s().trim().min(1).max(256)),cl,rl,ll]);const aV=Ve("source",[uu(WU),cl,rl,ll]),iV=Ve("source",[uu(eV),cl,rl,ll]),sV=Ve("source",[uu(tV),cl,rl,ll]),oV=Ve("source",[cl,rl,ll]),rV=Ve("source",[uu(nV),cl,rl,ll]),RA=k(["all-pages","custom-event","filtered","unknown"]);RA.enum;const SS=d({operator:s().trim().min(1).max(64),value:s().max(2048),negated:N(),ignoreCase:N()}).strict(),lV=d({triggerId:mt,triggerType:s(),eventPredicates:g(SS),hostnamePredicates:g(SS),unsupportedConditionCount:m().int().nonnegative()}).strict(),DA=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"]);DA.enum;const cV=d({tagId:mt,tagType:s(),recognition:EA,recognitionReason:s().nullable(),conversionId:aV,conversionLabel:iV,value:sV,transactionId:oV,currency:rV,triggerStrategy:RA,triggerIds:g(mt),triggerPredicates:g(lV),reviewReasons:g(DA)}).strict().superRefine((e,n)=>{e.recognition===wS.recognized&&e.recognitionReason!==null&&n.addIssue({code:he.custom,path:["recognitionReason"],message:"Recognized assessments cannot carry an unknown-recognition reason."}),e.recognition===wS.unknown&&!e.recognitionReason&&n.addIssue({code:he.custom,path:["recognitionReason"],message:"Unknown assessments require a recognition reason."})}),IA=d({accountId:mt,containerId:mt,workspaceId:mt.nullable(),tags:g(QU),triggers:g(ZU),variables:g(YU),googleAdsTagAssessments:g(cV).default([])}).strict(),uV=d({accountId:mt,containerId:mt,id:mt,path:s(),name:s(),description:s().nullable(),fingerprint:s().nullable(),deleted:N()}).strict(),zA=d({source:E(CA.live),version:uV,graph:IA,fetchedAt:s()}).strict(),OA=d({source:E(CA.draft),workspace:k1,graph:IA,conflictCount:m().int().nonnegative(),fetchedAt:s()}).strict(),dV=d({account:_A,container:TA,workspaces:g(k1),live:zA.nullable(),draft:OA.nullable(),fetchedAt:s()}).strict();Ve("status",[d({connected:E(!1),status:E(Pd["not-connected"]),connection:de(),selection:de()}).strict(),d({connected:E(!0),status:E(Pd["selection-required"]),connection:Qf,selection:Yd}).strict(),d({connected:E(!0),status:E(Pd.connected),connection:Qf,selection:Yd}).strict(),d({connected:E(!0),status:E(Pd.stale),connection:Qf,selection:Yd}).strict()]);const PA=k(["accounts","container","live","draft"]),Md=PA.enum,j1=d({id:mt,projectId:mt,connectionId:mt,runId:mt,kind:PA,accountId:mt.nullable(),containerId:mt.nullable(),workspaceId:mt.nullable(),payloadChecksum:xS,rawPayloadSha256:xS.nullable(),rawPayloadBytes:m().int().nonnegative().nullable(),redactedFieldCount:m().int().nonnegative(),capturedAt:s(),createdAt:s()}).strict(),mV=Ve("kind",[d({kind:E(Md.accounts),data:FU}).strict(),d({kind:E(Md.container),data:dV}).strict(),d({kind:E(Md.live),data:zA}).strict(),d({kind:E(Md.draft),data:OA}).strict()]),pV=d({metadata:j1,payload:mV}).strict().superRefine((e,n)=>{e.metadata.kind!==e.payload.kind&&n.addIssue({code:he.custom,path:["payload","kind"],message:"Snapshot metadata and payload kinds must match."})}),Jn=s().trim().min(1),hV=s().trim().min(1).refine(e=>eu(e)!==null,"Expected a hostname or http(s) URL."),A1=k(["configured","statically-consistent","runtime-unverified","observed"]);A1.enum;const MA=k(["pass","fail","unknown"]);MA.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 BA=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:g(Jn).max(50).default([]),requireBiddableGoal:N().default(!0),requirePrimaryAction:N().default(!0)}).strict(),gtm:d({accountId:Jn,containerId:Jn,tagId:Jn,triggerIds:g(Jn).default([]),variableIds:g(Jn).default([])}).strict(),runtime:d({verificationRequired:N().default(!0),requireTransactionId:N().default(!0),requireValue:N().default(!0),requireCurrency:N().default(!0),productionHosts:g(hV).default([])}).strict(),createdAt:s(),updatedAt:s()}).strict();BA.omit({id:!0,projectId:!0,createdAt:!0,updatedAt:!0});const LA=k(["not-run","consistent","inconsistent"]);LA.enum;const UA=k(["not-run","not-observed","observed"]);UA.enum;d({staticCheck:LA,runtimeVerificationRequired:N(),runtimeObservation:UA}).strict();const fV=d({code:qA,subject:s().trim().min(1),outcome:MA,status:A1,evidenceIds:g(Jn).default([])}).strict(),gV=d({contract:BA,status:A1,findings:g(fV),evaluatedAt:s()}).strict(),kS=d({id:Jn,name:s(),detail:s(),active:N()});d({googleAds:d({customerId:Jn.nullable(),syncedAt:s().nullable(),conversionActions:g(kS)}),gtm:d({containerId:Jn.nullable(),syncedAt:s().nullable(),tags:g(kS)})});const Ic=s().trim().min(1);function jS(e){const n=e.trim();return/^\d{10}$/.test(n)?n:/^\d{3}-\d{3}-\d{4}$/.test(n)?n.replaceAll("-",""):null}const yV=/^[\w-]+$/;function N1(e){const n=e.trim();return yV.test(n)?n:null}function bV(e){const n=e.trim();return/^accounts\/([\w-]+)$/.exec(n)?.[1]??N1(n)}function vV(e,n){const i=e.trim(),r=/^accounts\/([\w-]+)\/containers\/([\w-]+)$/.exec(i);return r?r[1]===n?r[2]:null:N1(i)}function xV(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:N1(r)}function wV(e){const n=jS(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=jS(e.loginCustomerId);return i?{loginCustomerId:i,customerId:n}:null}function SV(e){const n=bV(e.accountId);if(!n)return null;const i=vV(e.containerId,n);if(!i)return null;if(e.workspaceId===void 0)return{accountId:n,containerId:i};const r=xV(e.workspaceId,n,i);return r?{accountId:n,containerId:i,workspaceId:r}:null}const op=k(["google-ads","gtm"]);op.enum;d({provider:op,publicUrl:s().url().optional(),developerToken:s().trim().min(1).max(512).optional()}).strict();d({provider:op,authorizationUrl:s().url(),redirectUri:s().url(),expiresAt:s().nullable()}).strict();d({loginCustomerId:Ic.nullable().optional(),customerId:Ic}).strict().superRefine((e,n)=>{wV(e)||n.addIssue({code:he.custom,message:"Expected ten-digit Google Ads customer IDs, with optional 3-3-4 display hyphens."})});d({accountId:Ic,containerId:Ic,workspaceId:Ic.optional()}).strict().superRefine((e,n)=>{SV(e)||n.addIssue({code:he.custom,message:"GTM resource paths must match the selected account and container."})});d({provider:op,disconnected:N()}).strict();const VA=100;d({snapshots:g(M0).max(VA),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:eP}).strict();d({snapshots:g(j1).max(VA),nextCursor:s().nullable(),total:m().int().nonnegative()}).strict();d({snapshot:pV}).strict();d({assessment:gV,googleAdsSnapshot:M0.nullable(),gtmSnapshot:j1.nullable()}).strict();function kV(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}d({id:s(),domain:s(),siteUrl:s().nullable().optional(),createdAt:s(),updatedAt:s()});const Zf=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:g(Zf).default([]),notIndexed:g(Zf).default([]),unknown:g(Zf).default([]).optional()});d({query:s(),impressions:m(),clicks:m(),ctr:ve(),averagePosition:m()});d({date:s(),indexed:m(),notIndexed:m(),unknown:m()});const jV=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:g(jV).default([])});const $A=d({url:s(),verified:N()});d({sites:g($A).default([])});d({connected:N(),domain:s(),siteUrl:s().nullable(),createdAt:s().nullable(),updatedAt:s().nullable()});d({connected:N(),domain:s(),siteUrl:s().nullable(),availableSites:g($A).default([])});d({siteUrl:s()});const AV=d({name:s(),alive:N(),lastUsed:s().nullable()});d({connected:N(),endpoint:s(),version:s().optional(),browserVersion:s().optional(),targets:g(AV).default([])});const Vo=k(["live","staging"]);d({projectName:s(),url:s(),stagingUrl:s().optional(),username:s(),defaultEnv:Vo,createdAt:s(),updatedAt:s()});const AS=d({url:s(),reachable:N(),pageCount:m().nullable().optional(),version:s().nullable().optional(),error:s().nullable().optional(),plugins:g(s()).optional(),authenticatedUser:d({id:m(),slug:s()}).nullable().optional()});d({connected:N(),projectName:s(),defaultEnv:Vo,live:AS.nullable(),staging:AS.nullable(),adminUrl:s().nullable().optional()});const KA=d({id:m(),slug:s(),title:s(),status:s(),modifiedAt:s().nullable().optional(),link:s().nullable().optional()});d({env:Vo,pages:g(KA)});const GA=d({title:s().nullable(),description:s().nullable(),noindex:N().nullable(),writable:N().default(!1),writeTargets:g(s()).default([])}),NV=d({type:s(),json:Ue(s(),kn())}),CV=KA.extend({env:Vo,content:s(),seo:GA,schemaBlocks:g(NV).default([])}),NS=CV.extend({contentHash:s(),contentSnippet:s()}),HA=d({manualRequired:E(!0),targetUrl:s(),adminUrl:s().nullable().optional(),content:s(),nextSteps:g(s()).default([])}),_V=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:GA,schemaPresent:N(),issues:g(_V).default([])});const TV=d({slug:s(),status:k(["applied","skipped","manual"]),error:s().optional(),manualAssist:HA.optional()});d({env:Vo,strategy:k(["plugin","manual"]),results:g(TV)});const EV=d({slug:s(),status:k(["deployed","stripped","skipped","failed"]),schemasInjected:g(s()).optional(),manualAssist:HA.optional(),error:s().optional()});d({env:Vo,results:g(EV)});const RV=d({slug:s(),title:s(),canonrySchemas:g(s()),thirdPartySchemas:g(s()),hasCanonrySchema:N()});d({env:Vo,pages:g(RV)});const DV=d({name:s(),status:k(["completed","skipped","failed"]),summary:s().optional(),error:s().optional()});d({projectName:s(),steps:g(DV)});d({slug:s(),live:NS,staging:NS,hasDifferences:N(),differences:d({title:N(),slug:N(),content:N(),seoTitle:N(),seoDescription:N(),noindex:N(),schema:N()})});const IV=b2.shape.searchUnit.unwrap().enum;IV.query;const FA=d({name:s(),displayName:s().optional(),keyUrl:s().optional(),modelHint:s().optional(),model:s().optional(),defaultModel:s().optional(),configured:N(),quota:dO.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 zV=k(["install-identity-mismatch"]);zV.enum;d({reloaded:E(!0),providers:g(FA)});const OV=d({name:s(),displayName:s(),mode:k(["api","browser"]),modelConfigurable:N(),defaultModel:s(),knownModels:g(d({id:s(),displayName:s(),tier:k(["flagship","standard","fast","economy"])})).default([]),modelValidationPattern:d({source:s(),flags:s()}),modelValidationHint:s()}),CS=d({configured:N()});d({providers:g(FA).default([]),providerCatalog:g(OV).default([]),google:CS,bing:CS});const QA=k(["gsc","ga","gbp","bing","ads","google-ads","gtm","traffic"]);QA.enum;const C1=k(["ok","failing","stale","never-synced"]);C1.enum;const Hc=s().datetime({offset:!0}),PV=s().regex(/^\d{4}-\d{2}-\d{2}$/),MV=d({integration:QA,label:s(),runKind:Co,sourceId:s().nullable(),state:C1,lastSuccessAt:Hc.nullable(),latestRunAt:Hc.nullable(),latestRunId:s().nullable(),latestStatus:ta.nullable(),latestTrigger:Hm.nullable(),consecutiveFailures:m().int().nonnegative(),latestError:s().max(300).nullable(),dataThrough:PV.nullable(),dataAgeDays:m().int().nonnegative().nullable(),doctorChecks:g(s())}),qV=d({status:k(["ok","warn","fail"]),code:s(),summary:s(),checkedAt:Hc,notifiedAt:Hc.nullable()}),BV=d({project:s(),displayName:s(),state:k([...C1.options,"warning"]),health:qV.nullable(),integrations:g(MV)});d({generatedAt:Hc,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:g(BV)});const LV=k(["recorded","errored","expired","canceled","parse_failed","duplicate"]);LV.enum;const UV=k(["not_plan_run","scoped_run","probe_run","batch_unavailable","model_not_frozen"]);UV.enum;Mw.standard,Mw.batch;const ZA=k(["all","api","browser"]);ZA.enum;const VV=k(["yes","no","unknown","not-mentioned"]),_S=g(s().min(1)),TS=d({companyName:s().min(1),domain:s().min(1),queries:_S.optional(),phrases:_S.optional(),competitors:g(s().min(1)).optional(),providers:g(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:ZA.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"]})});TS.safeExtend({competitors:TS.shape.competitors.default([])});const $V=d({name:s(),count:m().int().nonnegative()}),KV=d({id:s(),name:s(),weight:m(),score:m(),findings:g(d({type:s(),message:s()})).default([]),recommendations:g(s()).default([])}),GV=d({url:s(),finalUrl:s(),auditedAt:s(),overallScore:m(),summary:s(),factors:g(KV).default([])}),HV=d({industry:s(),summary:s(),services:g(s()).default([]),categoryTerms:g(s()).default([])}),FV=d({provider:s(),displayName:s(),model:s().nullable().optional(),mentioned:N(),cited:N(),describedAccurately:VV,accuracyNotes:s().nullable().optional(),incorrectClaims:g(s()).default([]),recommendedCompetitors:g(s()).default([]),citedDomains:g(s()).default([]),groundingSources:g(Fm).default([]),searchQueries:g(s()).default([]),answerText:s(),error:s().nullable().optional()}),QV=d({query:s(),providerResults:g(FV).default([])}),ZV=d({totalQueries:m().int().nonnegative(),totalProviders:m().int().nonnegative(),totalComparisons:m().int().nonnegative(),mentionCount:m().int().nonnegative(),citationCount:m().int().nonnegative(),topCompetitors:g($V).default([]),visibilityGap:s(),whatThisMeans:g(s()).default([]),recommendedActions:g(s()).default([])});d({companyName:s(),domain:s(),homepageUrl:s(),generatedAt:s(),queries:g(s()).default([]),competitors:g(s()).default([]),profile:HV,audit:GV,queryResults:g(QV).default([]),summary:ZV});k(["json","csv"]);const YV=d({runId:s(),runKind:E("answer-visibility"),runStatus:ta,runTrigger:Hm,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:Gi,cited:N(),answerMentioned:N().nullable(),mentionState:Fe([$c,de()]),citedDomains:g(s()),citedUrls:g(s()).nullable(),captureStatus:Fe([Vm,de()]),sourceCount:m().int().nonnegative().nullable(),resolvedCount:m().int().nonnegative().nullable(),captureVersion:m().int().positive().nullable(),competitorOverlap:g(s()),recommendedCompetitors:g(s()),answerText:s().nullable(),groundingSources:g(Fm),searchQueries:g(s())}),XV=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:XV,recordCount:m().int().nonnegative(),records:g(YV)});d({runIds:g(s().trim().min(1)).max(100).default([]),researchRunIds:g(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:g(s()),researchRunIds:g(s()),querySnapshots:m().int().nonnegative(),researchQueries:m().int().nonnegative(),insights:m().int().nonnegative(),healthSnapshots:m().int().nonnegative()});const du=k(["organic","paid"]);du.enum;const YA=k(["instagram","facebook","pinterest","linkedin","x","youtube","tiktok","reddit","threads","snapchat","nextdoor","quora"]),Ta=YA.enum,XA=[{platform:Ta.instagram,label:"Instagram",domains:["instagram.com"],labels:["instagram","ig","igshopping"]},{platform:Ta.facebook,label:"Facebook",domains:["facebook.com","fb.com","fb.me","messenger.com"],labels:["facebook","fb","messenger"]},{platform:Ta.pinterest,label:"Pinterest",domains:["pinterest.com","pin.it","pinterest.ca","pinterest.co.uk","pinterest.com.au","pinterest.de","pinterest.fr","pinterest.es","pinterest.it","pinterest.com.mx"],labels:["pinterest"]},{platform:Ta.linkedin,label:"LinkedIn",domains:["linkedin.com","lnkd.in"],labels:["linkedin"]},{platform:Ta.x,label:"X",domains:["x.com","twitter.com","t.co"],labels:["twitter","x"]},{platform:Ta.youtube,label:"YouTube",domains:["youtube.com","youtu.be"],labels:["youtube"]},{platform:Ta.tiktok,label:"TikTok",domains:["tiktok.com"],labels:["tiktok"]},{platform:Ta.reddit,label:"Reddit",domains:["reddit.com","redd.it"],labels:["reddit"]},{platform:Ta.threads,label:"Threads",domains:["threads.net","threads.com"],labels:["threads"]},{platform:Ta.snapchat,label:"Snapchat",domains:["snapchat.com"],labels:["snapchat"]},{platform:Ta.nextdoor,label:"Nextdoor",domains:["nextdoor.com"],labels:["nextdoor"]},{platform:Ta.quora,label:"Quora",domains:["quora.com"],labels:["quora"]}];new Map(XA.flatMap(e=>e.labels.map(n=>[n,e.platform])));new Map(XA.map(e=>[e.platform,e.label]));const JA=d({series:g(d({key:s(),label:s(),sessions:m()})),otherCount:m(),days:g(d({date:s(),sessions:m(),values:Ue(s(),m())}))});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 _1=k(["session","first_user","manual_utm"]),WA=d({source:s(),medium:s(),trafficClass:du,sessions:m(),users:m().optional(),sourceDimension:_1,share:ve()}),JV=d({source:s(),medium:s(),trafficClass:du,sourceDimension:_1,landingPage:s(),sessions:m(),users:m().optional()}),eN=d({source:s(),medium:s(),sessions:m(),users:m().optional(),channelGroup:s(),share:ve()}),WV=d({platform:YA.nullable(),label:s(),sessions:m(),organicSessions:m(),paidSessions:m(),share:ve(),sources:g(eN)}),e$=d({engine:I0.nullable(),label:s(),sessions:m(),organicSessions:m(),paidSessions:m(),share:ve(),sources:g(WA)}),wc=d({sessions:m(),sharePct:ot(),sharePctDisplay:s()}),t$=d({organic:wc,social:wc,direct:wc,ai:wc,other:wc}),n$=d({totalSessions:m(),totalOrganicSessions:m(),totalDirectSessions:m(),totalUsers:m().nullable(),topPages:g(d({landingPage:s(),sessions:m(),organicSessions:m(),directSessions:m(),users:m(),organicShare:ve().nullable()})),aiReferrals:g(WA),aiReferralLandingPages:g(JV),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(),aiEngines:g(e$),socialReferrals:g(eN),socialPlatforms:g(WV),socialPlatformDaily:JA,socialSessions:m(),paidSocialSessions:m(),paidSocialShare:ve(),socialUsers:m().optional(),channelBreakdown:t$,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 a$=d({propertyId:s(),displayName:s(),accountName:s()});d({properties:g(a$)});const T1=k(nl.gaSearchLanding),Jae=T1.options,Wae="28d",i$="(empty)";function eie(e){return e===""?i$:e}const tie=1e3,s$=k(["never-synced","ready","unavailable","error"]),tN=d({organicGoogleSearchClicks:m().int().nonnegative(),organicGoogleSearchImpressions:m().int().nonnegative(),organicGoogleSearchClickThroughRate:ve(m().min(0).max(1)).nullable(),organicGoogleSearchAveragePosition:m().nonnegative().nullable(),activeUsers:m().int().nonnegative()}),o$=tN.extend({landingPage:s()});d({source:E("ga4-search-console-link"),status:s$,error:s().nullable(),syncedAt:s().datetime().nullable(),attemptedAt:s().datetime().nullable(),window:T1,windowStart:Os().nullable(),windowEnd:Os().nullable(),windowDays:m().int().positive().nullable(),timeZone:s().nullable(),subjectToThresholding:N(),dataLossFromOtherRow:N(),total:tN.nullable(),reportRowCount:m().int().nonnegative().nullable(),rowsCapped:N(),totalRows:m().int().nonnegative(),limit:m().int().positive(),offset:m().int().nonnegative(),rows:g(o$)});function nie(e){return e.organicGoogleSearchClicks>0||e.organicGoogleSearchImpressions>0}const r$=d({status:k(["ready","unavailable","error"]),windows:g(d({window:T1,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:r$.optional()}),syncedComponents:g(s()).optional()});const nN=k(["new","small-base","percent"]);nN.enum;const $g=d({source:s(),sessions7d:m(),sessionsPrev7d:m(),changeSessions:m(),changePct:ot().nullable(),changeBasis:nN});d({socialSessions7d:m(),socialSessionsPrev7d:m(),trend7dPct:ot().nullable(),socialSessions30d:m(),socialSessionsPrev30d:m(),trend30dPct:ot().nullable(),biggestMover:$g.nullable()});const Sc=d({sessions7d:m(),sessionsPrev7d:m(),trend7dPct:ot().nullable(),sessions30d:m(),sessionsPrev30d:m(),trend30dPct:ot().nullable()});d({organic:Sc,ai:Sc,social:Sc,direct:Sc,total:Sc,aiBiggestMover:$g.nullable(),socialBiggestMover:$g.nullable()});n$.extend({windowStart:s().nullable(),windowEnd:s().nullable(),windowDays:m().nullable(),periodStart:s().nullable(),periodEnd:s().nullable()});d({date:s(),source:s(),medium:s(),trafficClass:du,landingPage:s(),sessions:m(),users:m(),sourceDimension:_1});const l$=d({source:s(),sessions:m(),paidSessions:m(),organicSessions:m()}),c$=d({date:s(),sessions:m(),paidSessions:m(),organicSessions:m(),bySource:g(l$)});d({days:g(c$),sources:g(s()),totalSessions:m(),totalPaidSessions:m(),totalOrganicSessions:m(),byEngine:JA});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 bm=k(["date","channelGroup","source","medium","hostName","landingPage"]);bm.enum;d({window:Us.optional(),startDate:Os().optional(),endDate:Os().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=>bm.safeParse(n.trim()).success),`groupBy must contain: ${bm.options.join(", ")}`).optional(),limit:m().int().min(1).max(1e3).optional(),offset:m().int().nonnegative().optional()}).strict();const u$=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:Tg,error:s().nullable(),syncedAt:s().nullable(),scope:d({project:s(),attribution:E("project-only"),unavailableDimensions:g(k(["property","target","market"]))}),window:d({startDate:s().nullable(),endDate:s().nullable(),window:Us}),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:g(bm),channelGroups:g(s()),totalSessions:m().int().nonnegative(),totalRows:m().int().nonnegative(),limit:m().int(),offset:m().int(),rows:g(u$)});d({window:Us.optional(),minAnswers:Fa().int().min(1).max(1e3).optional(),queryClass:k(["non-brand","branded","all"]).optional(),groupKey:s().trim().min(1).optional(),limit:Fa().int().min(1).max(100).optional()}).strict();const d$=d({name:s().trim().min(1),answerCount:m().int().nonnegative(),pairedAnswers:m().int().nonnegative()}).strict(),aN=k(["below-min-answers","not-named","unpaired-name","own-site","listing-marketplace","non-competitor-surface","claimed-by-alias","shared-host"]);aN.enum;const iN=k(["suggested","tracked","excluded"]);iN.enum;const m$=d({domain:s().trim().min(1),label:s().trim().min(1),names:g(d$).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:w3,tracked:N(),marketKeys:g(s().trim().min(1)).optional(),status:iN,reason:aN.nullable(),sampleUrls:g(s().url()).max(3)}).strict();d({project:s().trim().min(1),window:Us,scope:S3,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:g(m$),candidatesTotal:m().int().nonnegative(),excludedCounts:Ue(s(),m().int().nonnegative()),unresolvedNames:g(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:g(s()),countUnits:d({answers:g(s()),distinctNames:g(s()),runs:g(s())}).strict(),truncated:N()}).strict();d({id:s(),projectId:s(),runId:s().nullable(),overallCitedRate:ve(),overallMentionRate:ve(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:Ue(s(),d({citedRate:ve(),mentionRate:ve(),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 p$=d({view:k(["project","visibility","property","queries","site-health"]),unavailableReason:s().trim().min(1).max(512).optional(),selection:pm.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."})}),h$=d({maxToolCalls:m().int().min(1).max(100).default(30),timeoutMs:m().int().min(1e3).max(6e5).default(18e4)}).strict(),E1=k(["claude","openai","gemini","zai"]),f$=d({id:E1,label:s(),defaultModel:s(),configured:N(),keySource:k(["config","env"]).nullable()});d({providers:g(f$).default([]),defaultProvider:E1.nullable()});const g$=k(["aero","user","compaction"]);g$.enum;const sN=128;d({key:s().min(1).max(sN),value:s().min(1)});d({key:s().min(1).max(sN)});d({prompt:s().trim().min(1),conversationId:s().min(1).nullable().optional(),provider:E1.optional(),modelId:s().trim().min(1).optional(),scope:k(["all","read-only"]).optional(),profile:k(["default","ads-operator"]).optional(),context:p$.optional(),limits:h$.optional()});const y$=Lz({role:s(),content:kn().optional()}),oN=d({id:s(),title:s(),active:N(),modelProvider:s(),modelId:s(),createdAt:s(),updatedAt:s()});oN.extend({messages:g(y$),isStreaming:N()});d({conversations:g(oN),currentConversationId:s().nullable(),nextOffset:m().int().nullable()});d({id:gz()}).strict();d({id:s(),status:E("deleted")});const b$=["status","changes","gaps","insights"],v$=k(b$),x$=d({text:s().optional(),tool:d({name:s(),label:s(),arguments:Ue(s(),kn()),result:kn(),durationMs:m().int().nonnegative()})}),w$=d({id:v$,steps:g(x$),answer:s()});d({project:s(),seededAt:s(),starters:g(w$)});d({offset:Fa().int().min(0).default(0),limit:Fa().int().min(1).max(100).default(50)}).strict();const ul=k(["commoncrawl","bing-webmaster"]);ul.enum;const R1=k(["queued","downloading","querying","ready","failed"]);R1.enum;d({id:s(),release:s(),status:R1,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 S$=d({linkingDomain:s(),numHosts:m().int(),source:ul}),k$=d({projectId:s(),release:s(),targetDomain:s(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:s(),queriedAt:s(),source:ul,excludedLinkingDomains:m().int().optional(),excludedHosts:m().int().optional()});d({source:ul,summary:k$.nullable(),total:m().int(),rows:g(S$)});d({release:s(),totalLinkingDomains:m().int(),totalHosts:m().int(),top10HostsShare:s(),queriedAt:s(),source:ul});const j$=d({source:ul,connected:N(),hasData:N(),latestRelease:s().nullable(),totalLinkingDomains:m().int(),lastSyncedAt:s().nullable()});d({projectId:s(),targetDomain:s(),sources:g(j$),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:R1.nullable(),bytes:m().int(),lastUsedAt:s().nullable()});const A$="jev-1.13.0",Pe=s().trim().min(1).max(256),At=m().int().nonnegative(),rN=Xa(e=>typeof e=="string"?[e]:e,g(Pe).min(1).max(100)),Xd=ve(m().min(0).max(1)).nullable(),Fi=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"]);Fi.enum;const D1=k(["disabled","not-measured","processing","partial","complete","failed","canceled","unsupported"]),I1=d({schemaVersion:Fe([E(1),E(2)]),requestedModel:E(A$),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 lN(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}Xa(lN,I1);const cN=d({id:Pe,displayName:s(),aliases:g(s()),qualifiedAliases:g(s()).default([]),urls:g(s()),mentionNotApplicable:N()}).strict(),N$=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(),uN=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:g(N$),locationContext:Jt.nullable().default(null)}).strict(),Fc=d({id:Pe,text:s().min(1),start:At,end:At}).strict(),dN=d({kind:k(["reported","estimated","unknown"]),inputTokens:At.nullable(),outputTokens:At.nullable()}).strict(),C$=d({sourceSnapshotId:Pe,sourceText:s(),sourceTextHash:Pe,subject:cN,subjectHash:Pe,context:uN,language:s(),definition:I1,sentences:g(Fc)}).strict();Xa(e=>typeof e!="object"||e===null||!("definition"in e)?e:{...e,definition:lN(e.definition)},C$);const Yf={returnedModel:s().nullable(),usage:dN},_$=Ve("kind",[d({kind:E("classified"),...Yf,returnedModel:s(),outcome:Fi,conclusion:g(Fc),complaint:g(Fc).nullable(),confidence:m().min(0).max(1).nullable()}).strict(),d({kind:E("abstained"),...Yf,outcome:Fi,reason:s()}).strict(),d({kind:E("failed"),...Yf,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"})});Xa(e=>typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).filter(([n])=>n!=="themes")):e,_$);const dl=d({runId:Pe.optional(),runIds:rN.optional(),revision:Fa().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 mu(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."})}dl.superRefine(mu);const T$=k(["assessments","locations"]),E$=25,mN=500;dl.extend({include:Xa(e=>typeof e=="string"?e.split(",").map(n=>n.trim()).filter(Boolean):e,g(T$).max(2)).optional(),queryLimit:Fa().int().min(1).max(mN).default(E$),queryCursor:s().min(1).max(16384).optional()}).superRefine(mu);const R$=Xa(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},g(Fi).min(1).max(Fi.options.length));dl.extend({assessmentId:Pe.optional(),outcome:R$.optional(),cursor:s().min(1).max(16384).optional(),limit:Fa().int().min(1).max(100).default(50)}).superRefine(mu);dl.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)=>{mu(e,n),e.runIds&&n.addIssue({code:"custom",path:["runIds"],message:"Comparison requires one explicit run per period."})});const z1=dl.extend({runId:Pe.nullable(),revision:m().int().nullable(),evaluationDefinitionId:Pe.nullable(),mode:k(["simple","advanced"])}),O1=d(Object.fromEntries(Fi.options.map(e=>[e,At]))).strict(),D$=d({selected:At,eligibleAssessments:At,unadmittedAssessments:At,judged:At,distinctSourceAnswers:At,eligibleAnswers:At.optional(),ratedAnswers:At.optional(),ratedAnswerRate:Xd.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:O1,expectedProviderSlots:At,completedProviderSlots:At}).strict(),I$=d({favorableRate:Xd,mixedRate:Xd,unfavorableRate:Xd,favorableDisplay:s(),mixedDisplay:s(),unfavorableDisplay:s(),interval:d({low:m(),high:m()}).strict().nullable(),method:E("wilson-independent-v1"),limitation:s()}).strict(),Zr={state:D1,reason:s().nullable(),provisional:N(),coverage:D$,score:I$},ES=d({...Zr,selection:z1,runIds:g(Pe)}).strict(),RS=d({...Zr,queryClass:E("all"),pooled:E(!0).optional(),runIds:g(Pe)}).strict(),z$=d({configured:N(),branded:ES,nonBrand:ES,headlineQueryClass:E("branded").optional(),pooledOverall:RS.optional(),overall:RS.optional().describe("Deprecated compatibility field. Pooled branded and non-brand assessments; never use as the sentiment headline.")}).strict(),O$=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:D1,outcome:Fe([Fi,de()]),reason:s().nullable()}).strict(),P$=d({...Zr,queryId:Pe,executionNodeKey:Pe.nullable().optional(),queryText:s(),queryClass:k(["branded","non-brand"]),sourceSnapshotIds:g(Pe),assessments:g(O$).default([]),locations:g(d({...Zr,location:s().nullable(),sourceSnapshotIds:g(Pe)}).strict())}).strict(),M$=d({...Zr,dimension:k(["provider","property","market","query"]),key:s(),label:s(),queryClass:k(["branded","non-brand"])}).strict(),Kg=d({...Zr,configured:N(),selection:z1,evaluationDefinition:I1.nullable(),breakdowns:g(M$),queries:g(P$),criticizedProperties:d({total:At,keys:g(s())}).strict().optional(),queryPage:d({total:At,limit:At,nextCursor:s().nullable()}).strict().optional()}).strict();d({enabled:N().optional()}).strict();const q$=d({installEnabled:N(),enabled:N(),ready:N(),readinessReasons:g(s()),model:s(),enablementEpoch:At,completionBoundary:At,evaluationDefinitionId:Pe.nullable(),actions:d({configure:N(),backfill:N()}).strict(),experimental:E(!0),disclosure:s()}).strict(),pN=dl.extend({runIds:rN.optional(),from:s().datetime().optional(),to:s().datetime().optional()}).superRefine(mu);d({previewToken:s().min(1).max(65536),idempotencyKey:s().trim().min(1).max(128)}).strict();const B$=d({previewToken:s().nullable(),expiresAt:s().nullable(),selection:pN,evaluationDefinitionId:Pe.nullable(),eligibleAssessments:At,alreadyClassified:At,skipped:g(d({runId:Pe,reason:s(),count:At}).strict()),estimatedInputTokens:At,estimatedCostUsd:m().nonnegative().nullable(),estimateMethod:s()}).strict(),L$=k(["pending","running","waiting-to-retry","complete","partial","failed","canceled"]),U$=d({id:Pe,workItemId:Pe,dispatchedAt:s(),completedAt:s().nullable(),returnedModel:s().nullable(),usage:dN,errorCode:s().nullable()}).strict(),hN=d({id:Pe,projectId:Pe,origin:k(["automatic","backfill"]),state:L$,enablementEpoch:At,evaluationDefinitionId:Pe,selection:pN,createdAt:s(),updatedAt:s(),counts:O1,selected:At,cancellationReason:s().nullable(),attempts:g(U$),attemptCount:At.optional(),nextAttemptCursor:s().nullable().optional()}).strict(),V$=hN.omit({attempts:!0,attemptCount:!0,nextAttemptCursor:!0}).extend({attemptCount:At}).strict(),$$=d({jobs:g(V$)}).strict(),K$=50;d({attemptLimit:Fa().int().min(1).max(200).default(K$),attemptCursor:s().min(1).max(4096).optional()}).strict();const G$=d({assessmentId:Pe,runId:Pe,sourceSnapshotId:Pe,sourceText:s(),sourceTextHash:Pe,subject:cN,subjectHash:Pe,context:uN,evaluationDefinitionId:Pe,outcome:Fi,conclusion:g(Fc),complaint:g(Fc).nullable(),returnedModel:s().nullable(),reason:s().nullable()}).strict(),H$=d({state:D1,selection:z1.extend({assessmentId:Pe.optional(),outcome:g(Fi).optional()}),items:g(G$),nextCursor:s().nullable()}).strict(),F$=d({from:Kg,to:Kg,verdict:k(["improved","declined","no-clear-change"]).nullable(),favorableRateDelta:m().nullable(),refusalReasons:g(s()),commonUnits:At,excludedFrom:At,excludedTo:At,changedScope:N(),method:E("wilson-independent-v1"),limitation:s()}).strict(),P1=k(["positive","caution","negative","neutral"]),Ts=d({label:s(),value:s(),delta:s(),tone:P1,description:s(),tooltip:s().optional(),trend:g(ot()),progress:ot().optional(),providerCoverage:s().optional()}),DS=d({projectMentionSnapshots:m().int().nonnegative(),competitorMentionSnapshots:m().int().nonnegative(),combinedMentionSnapshots:m().int().nonnegative(),perCompetitor:g(d({domain:s(),mentionSnapshots:m().int().nonnegative(),shareOfCompetitiveTotal:ot()})),ranking:g(d({kind:k(["project","competitor"]),domain:s().nullable(),mentionSnapshots:m().int().nonnegative(),share:ve(m().min(0).max(1))})),snapshotsWithAnswerText:m().int().nonnegative(),snapshotsTotal:m().int().nonnegative(),score:ot(m().min(0).max(100)).nullable()}),Q$=Ts.extend({breakdown:DS,scope:k(["non-brand","pooled"]),branded:DS}),Xf=d({gained:m().int().nonnegative(),lost:m().int().nonnegative(),tone:P1,hasPreviousRun:N(),gainedQueries:g(s()).optional(),lostQueries:g(s()).optional()}),Z$=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:g(s()),removedQueries:g(s())}),Y$=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()}),X$=d({id:s(),projectId:s(),runId:s().nullable(),overallCitedRate:ve(),overallMentionRate:ve(),totalPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),providerBreakdown:Ue(s(),d({citedRate:ve(),mentionRate:ve(),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:z$.optional(),project:lB,latestRun:uM,health:X$.nullable(),topInsights:g(Y$),queryClassScope:d({queryClass:E("all"),figures:g(s()),note:s()}).optional(),queryCounts:d({totalQueries:m().int().nonnegative(),citedQueries:m().int().nonnegative(),notCitedQueries:m().int().nonnegative(),citedRate:ve(),mentionedQueries:m().int().nonnegative(),notMentionedQueries:m().int().nonnegative(),mentionRate:ve()}),providers:g(d({provider:s(),citedRate:ve(),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:Ts,visibility:Ts,mentionShare:Q$,gapQueries:Ts,mentionGaps:Ts,indexCoverage:Ts,competitorPressure:Ts,runStatus:Ts}),movementSummary:Xf,citationMovement:Xf,mentionMovement:Xf,movementComparison:Z$,competitors:g(d({id:s(),domain:s(),aliases:g(s()).optional(),autoAliasNames:g(s()).optional(),citationCount:m().int().nonnegative(),totalQueries:m().int().nonnegative(),pressureLabel:k(["None","Low","Moderate","High"]),citedQueries:g(s())})),providerScores:g(d({provider:s(),model:s().nullable(),score:ot(),cited:m().int().nonnegative(),total:m().int().nonnegative(),trend:g(ot()).optional()})),attentionItems:g(d({id:s(),tone:P1,title:s(),detail:s(),actionLabel:s(),href:s()})),runHistory:g(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:g(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 J$=d({kind:E("snapshot"),id:s(),runId:s(),query:s(),provider:s(),model:s().nullable(),citationState:Gi,matchedField:k(["answerText","citedDomains","citedUrls","searchQueries","query"]),snippet:s(),createdAt:s()}),W$=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()}),eK=Ve("kind",[J$,W$]);d({query:s(),totalHits:m().int().nonnegative(),truncated:N(),hits:g(eK)});const fN=k(["create","expand","refresh","add-schema"]);fN.enum;const gN=k(["gsc","competitor-evidence","both"]);gN.enum;const yN=k(["high","medium","low"]);yN.enum;const tK=k(["blog-post","comparison","listicle","how-to","guide","glossary"]);tK.enum;const bN=k(["proposed","briefed","payload-generated","draft-created","published","validated","dismissed"]);bN.enum;const M1=k(["ownable","ceded"]);M1.enum;const nK=d({url:s(),gscImpressions:m().nonnegative(),gscClicks:m().nonnegative(),gscAvgPosition:m().nonnegative().nullable(),organicSessions:m().nonnegative()}),aK=d({domain:s(),url:s(),title:s(),citationCount:m().int().nonnegative()}),iK=d({demand:m(),competitor:m(),absence:m(),gapSeverity:m()}),sK=d({actionId:s(),state:bN,lastUpdated:s()}),oK=d({targetRef:s(),query:s(),action:fN,ourBestPage:nK.nullable(),winningCompetitor:aK.nullable(),score:m(),scoreBreakdown:iK,drivers:g(s()),demandSource:gN,actionConfidence:yN,existingAction:sK.nullable(),winnabilityClass:M1,winnability:ve(m().min(0).max(1)).nullable()});d({targets:g(oK),contextMetrics:d({totalAiReferralSessions:m().int().nonnegative(),latestRunId:s(),runTimestamp:s()})});const rK=d({targetRef:s(),addressedUrl:s().nullable(),note:s().nullable(),dismissedAt:s()});d({dismissals:g(rK)});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 lK=d({targetQuery:s().trim().min(1),winnabilityClass:M1,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:lK,costMillicents:m().int().nonnegative(),generatedAt:s()});const cK=d({domain:s(),competitorType:ru,hits:m().int().nonnegative(),updatedAt:s()});d({classifications:g(cK)});const uK=d({uri:s(),title:s(),domain:s(),isOurDomain:N(),isCompetitor:N(),citationCount:m().int().nonnegative(),providers:g(bt)}),dK=d({query:s(),groundingSources:g(uK)});d({sources:g(dK),latestRunId:s()});const mK=d({query:s(),competitorDomains:g(s()),competitorCount:m().int().nonnegative(),missRate:ve(m().min(0).max(1)),lastSeenInRunId:s()});d({gaps:g(mK),latestRunId:s()});const vN=k(["ok","warn","fail","skipped"]);vN.enum;const q1=k(["global","project"]);q1.enum;const xN=k(["auth","config","providers","integrations","database","schedules","agent"]);xN.enum;const wN=k(["health","silent"]);wN.enum;const pK=s().regex(/^[1-9]\d{3}-(0[1-9]|1[0-2])$/,"Expected YYYY-MM"),hK=d({id:s(),category:xN,scope:q1,title:s(),status:vN,notificationPolicy:wN.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.'),urgent:N().optional().describe('True when this result is a problem a person has to act on now (the website is down, daily data stopped arriving, a sync keeps failing). Urgent results are what the health.urgent notification event reports. A result set aside under its failing cause (status "skipped", code "<id>.superseded") keeps the flag: the problem is still open.'),summary:s(),remediation:s().nullable().optional().describe('Operator-facing next step. Null when status is "ok" or no specific remediation applies.'),details:Ue(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:q1,project:s().nullable().describe('Project name when scope is "project", null otherwise.'),reportMonths:g(pK).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:g(hK)});function fK(e){return e.trim().toLowerCase()}const gK=d({provider:s(),citationState:Gi,cited:N(),mentioned:N(),runId:s(),runCreatedAt:s()}),yK=d({queryId:s(),query:s(),providers:g(gK),citedCount:m().int().nonnegative(),mentionedCount:m().int().nonnegative(),totalProviders:m().int().nonnegative()}),bK=d({queryId:s(),query:s(),provider:s(),citingCompetitors:g(s()),runId:s(),runCreatedAt:s()}),vK=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:vK,byQuery:g(yK),competitorGaps:g(bK),status:k(["ready","no-data"]),reason:k(["no-runs-yet","no-queries"]).optional()});const xK=Fe(o2(nl.organicEvidence).map(e=>E(e))),wK=k(["earliest","middle","prior","latest"]),qr=d({clicks:m().int().nonnegative(),impressions:m().int().nonnegative()}),SN=d({name:wK,startDate:s(),endDate:s()}),SK=SN.extend({totals:qr}),kK=SN.extend({organicSessions:m().int().nonnegative()}),Jf=d({startDate:s(),endDate:s(),observedDays:m().int().nonnegative()}),qd=d({verified:m().int().nonnegative(),claimedUnverified:m().int().nonnegative(),unknownAiLike:m().int().nonnegative()}),IS=d({total:m().int().nonnegative(),paid:m().int().nonnegative(),organic:m().int().nonnegative(),unknown:m().int().nonnegative()});d({contractVersion:E("organic-evidence/v1"),periodDays:xK,asOfDate:s().nullable(),coverage:d({gsc:N(),ga4:N(),server:N(),visibility:N()}),sourceCoverage:d({gsc:Jf.nullable(),ga4:Jf.nullable(),server:Jf.nullable(),visibility:d({completedAt:s(),ageDays:m().nonnegative()}).nullable()}),gsc:d({propertyTotals:qr,namedBrand:qr,namedNonBrand:qr,suppressedOrUnreportedResidual:qr,cohorts:g(SK)}).nullable(),ga4:d({organicSessions:m().int().nonnegative(),cohorts:g(kK)}).nullable(),gaAiReferrals:d({paidSessions:m().int().nonnegative(),organicSessions:m().int().nonnegative()}).nullable(),server:d({crawlerHits:qd,userFetchHits:qd,referralSessions:IS}).nullable(),visibility:d({runId:s(),completedAt:s(),ageDays:m().nonnegative(),answerPairs:m().int().nonnegative(),mentionedPairs:m().int().nonnegative(),citedPairs:m().int().nonnegative()}).nullable(),measurement:o9,pages:g(d({path:s(),gsc:qr,ga4OrganicSessions:m().int().nonnegative(),server:d({crawlerHits:qd,userFetchHits:qd,referralSessions:IS})})),findings:g(d({tone:k(["positive","caution","neutral"]),title:s(),detail:s()})),limitations:g(d({code:s(),detail:s()}))});const jK=k(["claude","codex"]);jK.enum;const AK=k(["claude","codex","all"]);AK.enum;const kN=d({content:m().int().nonnegative(),sitemap:m().int().nonnegative(),robots:m().int().nonnegative(),asset:m().int().nonnegative(),other:m().int().nonnegative()}),NK=k(["content","sitemap","robots","asset","other"]),B1=k(["cloud-run","wordpress","cloudflare","vercel","generic-log"]);B1.enum;const CK=k(["raw-request-events","aggregate-request-metrics","request-url","status-code","user-agent","remote-ip","referer","cursor-pull"]);CK.enum;const _K=k(["raw-request","aggregate-bucket"]),TK=_K.enum,EK=k(["observed","provider-aggregated","inferred"]),RK=EK.enum,DK=d({type:s().nullable(),labels:Ue(s(),s())}),IK=d({sourceType:B1,evidenceKind:E(TK["raw-request"]),confidence:E(RK.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:DK,providerLabels:Ue(s(),s())});d({events:g(IK),rawEntryCount:m().int().nonnegative(),skippedEntryCount:m().int().nonnegative(),nextPageToken:s().optional(),filter:s()});const jN=k(["connected","paused","error","archived"]),aie=jN.enum,AN=k(["oauth","service-account"]);AN.enum;const NN=k(["verified","claimed_unverified","unknown_ai_like"]),iie=NN.enum,zK=d({id:s().min(1),source:s().min(1),version:s().min(1)}),CN=d({manifestId:s().min(1),manifest:zK.nullable(),hits:m().int().nonnegative()});d({gcpProjectId:s().min(1),serviceName:s().nullable().optional(),location:s().nullable().optional(),authMode:AN});d({baseUrl:s().url(),username:s().min(1)});const L1=k(["production","preview"]);L1.enum;d({projectId:s().min(1),teamId:s().min(1),environment:L1});const _N=d({id:s(),projectId:s(),sourceType:B1,displayName:s(),status:jN,lastSyncedAt:s().nullable(),lastCursor:s().nullable(),lastError:s().nullable(),skippedThroughAt:s().nullable(),queueBacklogCount:m().int().nonnegative().nullable(),queueBacklogObservedAt:s().nullable(),archivedAt:s().nullable(),config:Ue(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:L1.optional(),displayName:s().min(1).optional()});const OK=k(["direct-push","queue-pull"]),ml=OK.enum,U1=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"),TN=d({schemaVersion:E(1),workerVersion:s().min(1),expectedBotListVersion:s().min(1),zoneId:s().nullable()}),PK=TN.extend({deliveryMode:E(ml["direct-push"]),accountId:s().nullable()}),MK=TN.extend({deliveryMode:E(ml["queue-pull"]),accountId:s().min(1),queueId:s().min(1),queueName:U1,retentionSeconds:m().int().min(60).max(1209600)});function EN(e){if(typeof e!="object"||e===null||Array.isArray(e))return e;const n=e;return"deliveryMode"in n?e:{...n,deliveryMode:"direct-push"}}Xa(EN,Ve("deliveryMode",[PK,MK]));const RN=d({displayName:s().min(1).optional(),zoneId:s().min(1).optional()}),qK=RN.extend({deliveryMode:E(ml["direct-push"]),accountId:s().min(1).optional()}),BK=RN.extend({deliveryMode:E(ml["queue-pull"]),accountId:s().min(1),queueId:s().min(1),queueName:U1,retentionSeconds:m().int().min(60).max(1209600),apiToken:s().min(1)});Xa(EN,Ve("deliveryMode",[qK,BK]));const DN=d({sourceId:s().min(1),workerScript:s().min(1),wranglerToml:s().min(1),workerVersion:s().min(1),instructions:s().min(1)}),LK=DN.extend({deliveryMode:E(ml["direct-push"]),activationRequired:N().default(!1)}),UK=DN.extend({deliveryMode:E(ml["queue-pull"]),activationRequired:N().default(!1),accountId:s().min(1),queueId:s().min(1),queueName:U1,retentionSeconds:m().int().min(60).max(1209600)});Ve("deliveryMode",[LK,UK]);const VK=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:g(VK).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 $K=d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:kN,aiUserFetchHits:m().int().nonnegative(),aiReferralHits:m().int().nonnegative(),aiReferralLandedHits:m().int().nonnegative(),aiReferralRedirectedHits:m().int().nonnegative(),sampleCount:m().int().nonnegative()});d({sources:g(_N)});const KK=_N.extend({totals24h:$K,latestRun:d({runId:s(),status:ta,startedAt:s().nullable(),finishedAt:s().nullable(),error:s().nullable()}).nullable()});d({sources:g(KK)});const GK=k(["crawler","ai-user-fetch","ai-referral"]),V1=GK.enum,IN=k(["hour","day"]);IN.enum;const HK=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()}),FK=d({kind:E(V1.crawler),sourceId:s(),tsHour:s(),botId:s(),operator:s(),verificationStatus:s(),verificationManifests:g(CN).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:s(),pathClass:NK,status:m().int(),hits:m().int().nonnegative()}),QK=d({kind:E(V1["ai-user-fetch"]),sourceId:s(),tsHour:s(),botId:s(),operator:s(),verificationStatus:s(),verificationManifests:g(CN).optional(),verificationUnattributedHits:m().int().nonnegative().optional(),pathNormalized:s(),status:m().int(),hits:m().int().nonnegative()}),ZK=d({kind:E(V1["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()}),YK=Ve("kind",[FK,QK,ZK]);d({windowStart:s(),windowEnd:s(),series:d({granularity:IN,points:g(HK),coverageStart:s().nullable(),trends:d({crawlerContentHits:_o.nullable(),aiUserFetchHits:_o.nullable(),aiReferralLandedHits:_o.nullable()})}),totals:d({crawlerHits:m().int().nonnegative(),crawlerContentHits:m().int().nonnegative(),crawlerInfraHits:m().int().nonnegative(),crawlerSegments:kN,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:g(YK)});const zN=k(["crawler","ai-user-fetch","ai-referral","unknown"]);zN.enum;d({kind:k(["crawler","ai-user-fetch","ai-referral","unknown","all"]).optional(),sourceId:s().min(1).optional(),since:Fe([om({offset:!0}),Os()],{error:"Expected an ISO timestamp or YYYY-MM-DD date"}).optional(),until:Fe([om({offset:!0}),Os()],{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:NN.nullish(),verificationManifest:d({id:s().nullish(),source:s().nullish(),version:s().nullish()}).nullish(),matchedUserAgent:s().nullish()}),XK=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:du.nullish()}).nullable().default(null)}),JK=d({id:s(),sourceId:s(),ts:s(),kind:zN,pathNormalized:s(),status:m().int().nullable(),refererHost:s().nullable(),userAgent:s().nullable(),classifier:XK});d({scope:d({project:s(),sourceId:s().nullable(),attribution:E("project-source-only"),unavailableDimensions:g(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:g(JK)});const $1=k(["admin","viewer"]),WK=/^[a-z\d][\w.-]{0,63}$/i,eG=s().regex(WK,"A name may use letters, digits, dots, dashes and underscores, and must start with a letter or digit."),OS=12,tG=s().min(OS,`A password must be at least ${OS} characters.`),ON=d({id:s(),name:s(),role:$1,createdAt:s(),lastLoginAt:s().nullable()});d({users:g(ON)});d({name:eG,password:tG,role:$1});d({name:s().min(1),password:s().min(1)});d({authRequired:N(),user:ON.pick({name:!0,role:!0}).nullable()});const PN=k(["queued","running","completed","partial","failed"]),sie=PN.enum,MN=k(["queued","running","completed","failed"]),oie=MN.enum,nG=20,aG=20,Gg=50,qN=d({kind:k(["market","property"]),key:fe,expectedPlanRevision:m().int().positive().optional()}).strict(),iG=d({kind:k(["market","property"]),key:fe,label:s().trim().min(1),planRevision:m().int().positive()}).strict(),BN=s().min(1).max(4e3).refine(e=>e.trim().length>0,"Research queries cannot be blank.");function rie(e){const n=new Set;return e.filter(i=>{const r=fK(i);return!r||n.has(r)?!1:(n.add(r),!0)})}function sG(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 lie(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 kg("The selected research template contains undeclared placeholders: "+h.join(", "));const f=sG(n,i),b=e.variables.filter(x=>f[x]===void 0);if(b.length)throw kg("The selected research template requires unavailable bindings: "+b.join(", "));const v=Object.fromEntries(e.variables.map(x=>[x,f[x]]));return{bindings:v,output:FB(e.pattern,v)}}const LN=d({templateId:s().trim().min(1).max(256),templateVersion:s().trim().min(1).max(256),bindingLocation:Jt.nullable().optional()}).strict();d({queries:g(BN).min(1).max(50),provider:s().trim().min(1).optional(),model:s().trim().min(1).max(200).optional(),location:Jt.nullable().optional(),scope:qN.optional(),template:LN.optional(),idempotencyKey:s().trim().min(1).max(128).optional()}).superRefine((e,n)=>{e.model&&!e.provider&&n.addIssue({code:he.custom,path:["provider"],message:"provider is required when model is supplied"})});const oG=qN.extend({expectedPlanRevision:m().int().positive()}).strict(),rG=d({queries:g(BN).min(1).max(Gg),provider:s().trim().min(1),model:s().trim().min(1).max(200),location:Jt.nullable(),scope:oG.optional(),template:LN.optional()}).strict();d({idempotencyKey:s().trim().min(1).max(128),runs:g(rG).min(1).max(aG)}).strict().superRefine((e,n)=>{e.runs.reduce((r,u)=>r+u.queries.length,0)>Gg&&n.addIssue({code:he.custom,path:["runs"],message:`A research batch may contain at most ${Gg} concrete queries across all destinations`})});const lG=d({kind:k(["api-key","user"]),id:s(),name:s(),role:$1.nullable(),limited:N().optional()}),UN=d({id:s(),projectId:s(),status:PN,provider:s(),requestedModel:s().nullable(),resolvedModel:s(),location:Jt.nullable(),scope:iG.nullable().optional(),template:nA.nullable().optional(),totalQueries:m().int(),completedQueries:m().int(),failedQueries:m().int(),error:s().nullable(),initiatedBy:lG.nullable(),startedAt:s().nullable(),finishedAt:s().nullable(),createdAt:s()}),cG=d({id:s(),position:m().int(),query:s(),queryClass:Lo.nullable().optional(),status:MN,requestedModel:s().nullable(),resolvedModel:s(),servedModel:s().nullable(),answerText:s().nullable(),groundingSources:g(Fm),citedDomains:g(s()),searchQueries:g(s()),retrievedSources:g(Y2).nullable().default(null),namedCompetitors:g(s()).default([]),citedCompetitorDomains:g(s()).default([]),answerMentioned:N().nullable(),citationState:Gi.nullable(),error:s().nullable(),startedAt:s().nullable(),finishedAt:s().nullable(),createdAt:s()}),uG=UN.extend({queries:g(cG)});d({runs:g(uG)});const dG=d({name:s(),displayName:s(),modelConfigurable:N(),defaultModel:s(),knownModels:g(d({id:s(),displayName:s()}))});d({runs:g(UN),nextCursor:s().nullable().optional(),providers:g(dG).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 mG=d({id:s(),type:s(),canonicalName:s(),countryCode:s(),name:s(),regionCode:s().nullable()});d({count:m().int().nonnegative(),query:s(),results:g(mG)});const pG=d({id:s(),clientType:s().optional(),name:s().optional(),pixelId:s().optional()});d({pixels:g(pG)});const hG=d({id:s(),name:s().optional()}),fG=d({id:s(),name:s().optional(),eventType:s().optional(),customEventName:s().nullable().optional(),attributionWindowDays:m().int().positive().optional(),adAccountId:s().optional(),sourceIds:g(s()).optional(),sources:g(hG).optional(),archived:N().optional(),version:m().int().nonnegative().optional()});d({eventSettings:g(fG)});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 gG=["campaign_id","ad_group_id","ad_id","ad_account_id","oppref"],yG=/^[\w.-]+=[^&#\s]*$/,bG=/\{([^}]*)\}/g,$o=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(!yG.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(bG)){const h=u[1];if(!gG.includes(h)){i(`Tracking template macro '{${h}}' is not supported`);return}}}),vG=d({type:s().nullable().optional(),title:s().nullable().optional(),body:s().nullable().optional(),targetUrl:s().nullable().optional(),fileId:s().nullable().optional()}),pu=k(["impressions","clicks"]);pu.enum;const hu=k(["impression","click"]);hu.enum;const xG=d({id:s(),adGroupId:s(),name:s(),status:s(),reviewStatus:s().nullable().optional(),creative:vG.nullable().optional(),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()}),wG=d({id:s(),campaignId:s(),name:s(),description:s().nullable().optional(),status:s(),billingEventType:Fe([hu,de()]).optional(),maxBidMicros:m().int().nullable().optional(),contextHints:g(s()).default([]),ads:g(xG).default([]),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()}),SG=d({id:s(),name:s(),description:s().nullable().optional(),status:s(),startTime:m().int().nullable().optional(),endTime:m().int().nullable().optional(),biddingType:Fe([pu,de()]).optional(),dailySpendLimitMicros:m().int().nullable().optional(),lifetimeSpendLimitMicros:m().int().nullable().optional(),conversionEventSettingIds:g(s()).default([]),locationIds:g(s()).optional(),adGroups:g(wG).default([]),landingPageQueryStringTemplate:s().nullable().optional(),upstreamUpdatedAt:m().int().nullable().optional(),syncedAt:s().optional()});d({campaigns:g(SG)});const VN=k(["campaign","ad_group"]);VN.enum;const kG=d({level:VN,entityId:s(),date:s(),impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:ve().nullable(),cpcMicros:m().int().nullable(),inProgress:N()});d({rows:g(kG),currencyCode:s().nullable().optional()});const $N=d({from:s().nullable(),to:s().nullable(),inProgressDate:s().nullable()}),KN=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int(),ctr:ve().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:$N,totals:KN});const GN=k(["unavailable","partial","complete"]);GN.enum;const HN=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"]);HN.enum;const FN=k(["unavailable","reported"]);FN.enum;const jG={storedSnapshot:"stored_ads_snapshot"},QN=k(["unavailable","partial_snapshot","metrics_unavailable","observed_activity","no_observed_activity"]);QN.enum;const AG=d({id:s(),name:s(),status:s(),reviewStatus:s().nullable()}),NG=d({id:s(),name:s(),status:s(),billingEventType:Fe([hu,de()]),maxBidMicros:m().int().nullable(),contextHints:g(s()),ads:g(AG)}),CG=d({id:s(),name:s(),status:s(),biddingType:Fe([pu,de()]),dailySpendLimitMicros:m().int().nullable(),lifetimeSpendLimitMicros:m().int().nullable(),conversionEventSettingIds:g(s()),adGroups:g(NG)});d({snapshot:d({status:GN,issue:Fe([HN,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:FN,window:$N,totals:KN.nullable()}),storedConfiguration:d({basis:E(jG.storedSnapshot),connection:d({status:s().nullable(),reviewStatus:s().nullable(),integrityReviewStatus:s().nullable(),integrityDecision:s().nullable(),conversionTrackingConfigured:N()}).nullable(),campaigns:g(CG)}),assessment:d({state:QN})});const pi=s().min(8).max(128).regex(/^[\w.:-]+$/,"operationKey may contain letters, numbers, dot, underscore, colon, and hyphen"),Kt=s().min(1).max(200),Ko=s().min(3).max(1e3).refine(e=>e.trim().length>0),Yr=m().int().min(946684800).max(4102444800),Xr=m().int().positive().max(Number.MAX_SAFE_INTEGER),K1=s().regex(/^[a-f0-9]{64}$/),ZN=g(Kt).max(100).refine(e=>new Set(e).size===e.length,"conversionEventSettingIds must be unique"),YN=s().url().refine(e=>new URL(e).protocol==="https:",{message:"URL must use https"}),XN=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"]);XN.enum;const JN=k(["pending","reconciling","succeeded","failed","unknown"]),$r=JN.enum,WN=k(["known_entity","create_fingerprint","manual_only"]);WN.enum;const eC=k([$r.pending,$r.unknown,$r.reconciling]);eC.enum;const tC=k(["active","paused","archived"]);tC.enum;const nC=k(["file","campaign","ad_group","ad"]);nC.enum;const aC=k(["campaign","ad_group","ad"]);aC.enum;const G1=d({id:Kt,expectedUpdatedAt:m().int().nonnegative()}).strict(),_G=G1,vm=1e3;function TG(e){return 1+e.campaign.adGroups.reduce((n,i)=>n+1+i.ads.length,0)}const EG=G1.extend({ads:g(_G).min(1).max(vm-1)}).strict(),RG=G1.extend({adGroups:g(EG).min(1).max(vm-1)}).strict();function PS(e,n,i){for(let r=1;r<e.length;r+=1)if(m2(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 iC=d({campaign:RG}).strict().superRefine((e,n)=>{TG(e)>vm&&n.addIssue({code:"custom",path:["campaign"],message:`Activation manifests may contain at most ${vm} entities`}),PS(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];PS(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)}}}),sC=K1,DG=k(["approved","executing","consumed","revoked","expired","unknown"]),Ki=DG.enum,IG=k(["pending","executing","active","failed","rollback_executing","rolled_back","rollback_failed","unknown"]),$s=IG.enum,zG=d({name:Ko.optional(),description:s().max(4e3).nullable().optional(),status:tC.optional(),startTime:Yr.nullable().optional(),endTime:Yr.nullable().optional(),lifetimeSpendLimitMicros:Xr.min(1e6).optional(),locationIds:g(Kt).max(100).optional(),biddingType:pu.optional(),conversionEventSettingIds:ZN.optional(),campaignId:Kt.optional(),contextHints:g(s().min(1).max(1e3)).max(100).optional(),maxBidMicros:Xr.max(1e8).optional(),billingEventType:hu.optional(),adGroupId:Kt.optional(),creativeFingerprint:K1.optional(),landingPageQueryStringTemplate:$o.nullable().optional()}).strict();d({operationKey:pi,imageUrl:YN});d({operationKey:pi,name:Ko,description:s().max(4e3).optional(),startTime:Yr.optional(),endTime:Yr.optional(),lifetimeSpendLimitMicros:Xr.min(1e6),locationIds:g(Kt).min(1).max(100),biddingType:pu.optional(),conversionEventSettingIds:ZN.optional(),landingPageQueryStringTemplate:$o.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:pi,campaignId:Kt,name:Ko,description:s().max(4e3).optional(),contextHints:g(s().min(1).max(1e3)).min(1).max(100),maxBidMicros:Xr.max(1e8),billingEventType:hu.optional(),landingPageQueryStringTemplate:$o.optional()});const oC=d({title:s().min(3).max(50),body:s().min(1).max(100),targetUrl:YN,fileId:Kt});d({operationKey:pi,adGroupId:Kt,name:Ko,creative:oC,landingPageQueryStringTemplate:$o.optional()});function H1(e){return Object.keys(e).some(n=>n!=="operationKey"&&n!=="expectedUpdatedAt")}d({operationKey:pi,expectedUpdatedAt:m().int().nonnegative(),name:Ko.optional(),description:s().max(4e3).nullable().optional(),startTime:Yr.nullable().optional(),endTime:Yr.nullable().optional(),lifetimeSpendLimitMicros:Xr.min(1e6).optional(),locationIds:g(Kt).min(1).max(100).optional(),landingPageQueryStringTemplate:$o.nullable().optional()}).refine(H1,{message:"At least one campaign field must be updated"});d({operationKey:pi,expectedUpdatedAt:m().int().nonnegative(),name:Ko.optional(),description:s().max(4e3).nullable().optional(),contextHints:g(s().min(1).max(1e3)).min(1).max(100).optional(),maxBidMicros:Xr.max(1e8).optional(),landingPageQueryStringTemplate:$o.nullable().optional()}).refine(H1,{message:"At least one ad group field must be updated"});d({operationKey:pi,expectedUpdatedAt:m().int().nonnegative(),name:Ko.optional(),creative:oC.optional(),landingPageQueryStringTemplate:$o.nullable().optional()}).refine(H1,{message:"At least one ad field must be updated"});d({operationKey:pi});d({operationKey:pi,expectedUpdatedAt:m().int().nonnegative()});const rp=d({id:s(),adAccountId:s().nullable(),operationKey:s(),kind:XN,state:JN,entityType:Fe([nC,de()]),entityId:s().nullable(),upstreamUpdatedAt:m().int().nullable(),errorCode:s().nullable(),errorMessage:s().nullable(),reconcileStrategy:Fe([WN,de()]),reconcileParentId:Kt.nullable(),reconcileFingerprint:K1.nullable(),reconcileFields:zG.nullable(),reconcileAttempts:m().int().nonnegative(),lastReconciledAt:s().nullable(),createdAt:s(),updatedAt:s()});d({operation:rp,replayed:N()});const Pt=om({offset:!0}),pl={id:Kt,projectId:Kt,adAccountId:Kt,manifestHash:sC,manifest:iC,executorApiKeyId:Kt,approverApiKeyId:Kt,expiresAt:Pt,approvedAt:Pt,createdAt:Pt,updatedAt:Pt,revocationRequestedAt:Pt.nullable()},OG=d({...pl,state:E(Ki.approved),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),PG=d({...pl,state:E(Ki.executing),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),MG=d({...pl,state:E(Ki.consumed),operationId:Kt,executionStartedAt:Pt,consumedAt:Pt,revokedAt:de(),expiredAt:de()}).strict(),qG=d({...pl,state:E(Ki.revoked),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:Pt,expiredAt:de()}).strict(),BG=d({...pl,state:E(Ki.expired),operationId:de(),executionStartedAt:de(),consumedAt:de(),revokedAt:de(),expiredAt:Pt}).strict(),LG=d({...pl,state:E(Ki.unknown),operationId:Kt,executionStartedAt:Pt,consumedAt:de(),revokedAt:de(),expiredAt:de()}).strict(),rC=Ve("state",[OG,PG,MG,qG,BG,LG]).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!==Ki.executing&&e.state!==Ki.unknown&&e.state!==Ki.consumed&&n.addIssue({code:"custom",path:["revocationRequestedAt"],message:"Only an executing, cancelled, or unresolved activation can carry a cancellation request"})}),Ks={id:Kt,operationId:Kt,ordinal:m().int().nonnegative(),entityType:aC,entityId:Kt,expectedUpdatedAt:m().int().nonnegative(),createdAt:Pt,updatedAt:Pt},fu={errorCode:de(),errorMessage:de()},F1={errorCode:s().min(1).max(100),errorMessage:s().min(1).max(500),remediation:s().min(1).max(500)},UG=d({...Ks,...fu,state:E($s.pending),providerUpdatedAt:de(),remediation:de(),startedAt:de(),finishedAt:de()}).strict(),VG=d({...Ks,...fu,state:E($s.executing),providerUpdatedAt:de(),remediation:de(),startedAt:Pt,finishedAt:de()}).strict(),$G=d({...Ks,...fu,state:E($s.active),providerUpdatedAt:m().int().nonnegative(),remediation:de(),startedAt:Pt,finishedAt:Pt}).strict(),KG=d({...Ks,...F1,state:E($s.failed),providerUpdatedAt:Fe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),GG=d({...Ks,...fu,state:E($s.rollback_executing),providerUpdatedAt:m().int().nonnegative(),remediation:s().min(1).max(500),startedAt:Pt,finishedAt:de()}).strict(),HG=d({...Ks,...fu,state:E($s.rolled_back),providerUpdatedAt:m().int().nonnegative(),remediation:s().min(1).max(500),startedAt:Pt,finishedAt:Pt}).strict(),FG=d({...Ks,...F1,state:E($s.rollback_failed),providerUpdatedAt:m().int().nonnegative(),startedAt:Pt,finishedAt:Pt}).strict(),QG=d({...Ks,...F1,state:E($s.unknown),providerUpdatedAt:Fe([m().int().nonnegative(),de()]),startedAt:Pt,finishedAt:Pt}).strict(),ZG=Ve("state",[UG,VG,$G,KG,GG,HG,FG,QG]),Hg={exact:"exact",refreshSemanticallyUnchanged:"refresh_semantically_unchanged"},YG=k([Hg.exact,Hg.refreshSemanticallyUnchanged]);d({manifest:iC,executorApiKeyId:Kt,expiresAt:Pt,versionPolicy:YG.default(Hg.exact)}).strict();d({grant:rC}).strict();d({}).strict();d({operationKey:pi,grantId:Kt,manifestHash:sC}).strict();d({grant:rC,operation:rp,steps:g(ZG)}).strict();const XG=[$r.pending,$r.unknown,$r.reconciling];function JG(e){if(e===void 0||e==="")return XG;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:Xa(JG,g(eC).min(1).max(3).refine(e=>new Set(e).size===e.length,"state values must be unique")),limit:Fa().int().min(1).max(200).default(100),cursor:s().min(1).max(1e3).optional()});d({operations:g(rp),count:m().int().nonnegative(),nextCursor:s().nullable()});d({}).strict();d({operation:rp,resolved:N()});d({campaignId:s().min(1).max(200).optional(),lookbackDays:Fa().int().min(1).max(30).default(7)});const lC=k(["campaign","ad_group","ad"]);lC.enum;const cC=k(["both","live-only","stored-only"]);cC.enum;const WG=E("live-provider-read"),eH=d({date:s().nullable(),startTime:m().nullable(),endTime:m().nullable(),impressions:m().nullable(),clicks:m().nullable(),spend:m().nullable(),conversions:m().nullable(),ctr:ve().nullable(),cpc:m().nullable(),cpm:m().nullable()}),MS=d({impressions:m().int(),clicks:m().int(),spendMicros:m().int(),conversions:m().int()}),tH=d({date:s(),live:MS.nullable(),stored:MS.nullable(),drifted:N()}),nH=d({field:s(),live:s().nullable(),stored:s().nullable()}),aH=d({name:s().nullable(),status:s(),reviewStatus:s().nullable(),mode:s().nullable(),updatedAt:m().nullable()}),iH=d({name:s(),status:s(),reviewStatus:s().nullable(),upstreamUpdatedAt:m().nullable(),syncedAt:s()}),sH=d({entityType:lC,id:s(),parentId:s().nullable(),presence:cC,live:aH.nullable(),stored:iH.nullable(),fieldDeltas:g(nH),liveMetrics:g(eH).nullable(),metricDeltas:g(tH).nullable(),drifted:N()}),oH=d({surface:s(),entityId:s().nullable(),upstreamStatus:m().int().nullable()});d({basis:WG,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:g(sH),drift:d({entitiesCompared:m().int().nonnegative(),driftedEntities:m().int().nonnegative(),statusDrifted:m().int().nonnegative(),metricsDrifted:m().int().nonnegative()}),errors:g(oH)});const rH=d({status:k(["available","unavailable","not-supported"])}),qS="*";function uC(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 lH=k(["enabled","configured_disabled","CANONRY_TELEMETRY_DISABLED","DO_NOT_TRACK","CI","NO_CONFIG","CONFIG_UNAVAILABLE"]),cH=k(["server","local"]);d({enabled:N(),configuredEnabled:N(),reason:lH,anonymousId:s().regex(/^[0-9a-f]{8}\.\.\.$/i).optional(),target:cH.optional()}).strict();const ft=1,Wf=k(["system","project","queries","competitors","run","finish"]),uH=k(["copy_agent_command","connect_server_traffic","connect_search_console","connect_analytics","connect_business_profile","set_schedule","add_notification","open_project","review_page_health"]),eg=k(["0","1","2-3","4-5","6-10","11+"]);function ci(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 BS=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"]),dH=k(["wizard","platform","site_health"]),Bd=d({eventId:s().uuid(),flowVersion:E(ft),onboardingSessionId:s().uuid(),surface:dH.optional()});Ve("event",[Bd.extend({event:E("onboarding.started"),step:Wf,resumed:N()}).strict(),Bd.extend({event:E("onboarding.step_completed"),step:Wf,method:k(["existing","inline","manual","generated","skipped","automatic"]),countBucket:eg.optional(),nextAction:uH.optional()}).strict(),Bd.extend({event:E("onboarding.blocked"),step:Wf,action:k(["continue","configure_provider","generate_queries","save","launch_run","retry_run"]),reasonCode:BS}).strict(),Bd.extend({event:E("run.requested"),origin:E("dashboard_setup"),result:k(["queued","rejected"]),kind:k(["answer_visibility","site_health"]).optional(),providerCountBucket:eg,queryCountBucket:eg,reasonCode:BS.optional()}).strict()]);d({accepted:N()});k(["cli","mcp-stdio","mcp-http","aero","api","dashboard"]);const mH=["cli","mcp-stdio","mcp-http","aero","api","dashboard","system"],Q1=k(mH);Q1.enum;const dC=["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"],Z1=k(dC),mC=Z1.enum,pH=["connect","disconnect","test","reauth","select"],pC=k(pH);pC.enum;const hH=["started","succeeded","failed","cancelled"],hC=k(hH),LS=hC.enum,fH=["succeeded","partial","failed","skipped","cancelled"],fC=k(fH),gH=fC.enum,yH=["manual","scheduled","agent","startup","retry","push"],gC=k(yH);gC.enum;const bH=["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"],Y1=k(bH);Y1.enum;const yC={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"]},vH=Object.keys(yC),bC=k(vH);bC.enum;const xH=["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"],wH=new Set(xH),vC=1e12,xC=m().int().min(0).max(vC),SH=Ue(s(),xC).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=>wH.has(n)),"unknown count key"),kH=["first_party","slack","discord"],X1=k(kH);X1.enum;const jH=["2xx","3xx","4xx","5xx","timeout","network","blocked"],wC=k(jH);wC.enum;const AH=["under_1s","1s_to_10s","10s_to_1m","1m_to_5m","5m_to_30m","30m_or_more"],lp=k(AH);lp.enum;const SC=s().regex(/^[A-Z_$][\w$]{0,39}$/i),kC=s().regex(/^[a-z0-9][a-z0-9._-]{0,39}$/),J1=k(Sg),jC=s().regex(/^[A-Z0-9][\w.:/@-]{0,99}$/i).refine(e=>!e.includes("://"),"a model id is never a URL"),AC=s().regex(/^[a-z0-9][a-z0-9._-]{0,31}$/);d({integration:Z1,provider:J1.optional(),action:pC,status:hC,reasonCode:Y1.optional(),errorName:SC.optional(),target:X1.optional(),surface:Q1.optional(),agent:kC.optional(),durationBucket:lp.optional(),attempt:m().int().min(1).max(1e6).optional(),first:E(!0).optional()}).strict().refine(e=>e.integration===mC.provider==(e.provider!==void 0),"provider is required for, and only for, integration provider").refine(e=>e.status===LS.succeeded||e.status===LS.started||e.reasonCode!==void 0,"a failed or cancelled attempt needs a reasonCode");d({feature:bC,operation:s().regex(/^[a-z][a-z_]{0,31}$/),status:fC,trigger:gC.optional(),surface:Q1.optional(),agent:kC.optional(),reasonCode:Y1.optional(),errorName:SC.optional(),durationBucket:lp.optional(),counts:SH.optional(),target:X1.optional(),eventType:Bm.optional(),statusClass:wC.optional(),provider:J1.optional(),model:jC.optional(),modelProvider:AC.optional(),sampleRate:m().int().min(1).max(1e6).optional(),droppedBefore:m().int().min(0).max(vC).optional(),domainHash:s().regex(/^[0-9a-f]{64}$/).optional(),first:E(!0).optional()}).strict().refine(e=>yC[e.feature].includes(e.operation),"operation is not one this feature reports").refine(e=>e.status===gH.succeeded||e.reasonCode!==void 0,"a non-succeeded outcome needs a reasonCode");const NH=["npm","homebrew","docker","source"],CH=k(NH),_H=s().regex(/^[a-z0-9][a-z0-9-]{0,31}$/),TH=["projects","queries","competitors","locations","schedules","webhooks","agentWebhooks","trafficSources","googleConnections","bingConnections","backlinkSources","adsAccounts"],EH=["sweeps","audits","providerCalls","inputTokens","outputTokens","costMicros","aeroTurns","aeroModelCalls","aeroInputTokens","aeroOutputTokens","aeroCostMicros","webhookDeliveries"],tg=e=>{const n=new Set(e);return Ue(s(),xC).refine(i=>Object.keys(i).every(r=>n.has(r)),"unknown key")};d({providers:g(J1).max(Sg.length),integrations:g(Z1.exclude([mC.provider])).max(dC.length),counts:tg(TH),usage24h:tg(EH),providerCalls24h:tg(Sg).optional(),agentProvider:AC.optional(),agentModel:jC.optional(),uptimeBucket:lp.optional(),installSource:CH.optional(),installRef:_H.optional()}).strict();const NC=["/","/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"],RH=k(NC),CC=["overview","portfolio","search-console","conversions","local","discovery","queries","properties","report","activity","backlinks","technical-aeo","history","settings","other"],Ld=k(CC),DH=["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"],IH=k(DH),zH=["google","gsc","ga","bing","gbp","wordpress","openai_ads","google_ads","gtm","traffic_cloudflare","traffic_vercel","traffic_cloud_run","traffic_wordpress"],OH=k(zH),PH=["provider","model","location","window","query_class","other"],MH=k(PH),qH=["csv","json","html"],BH=["render","unhandled","api"],LH=["4xx","5xx","network"],UH=["LCP","INP","CLS","FCP","TTFB"],VH=["good","needs-improvement","poor"],_C=/^[a-z][a-z0-9-]{0,39}$/,TC=/^[a-z_$][\w$]{0,39}$/i,$H=/^\/api\/v1(?:\/(?:[a-z][a-z0-9-]*(?:\.[a-z]+)?|\{[A-Za-z]+\}))*$/,EC=160,KH=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"]),GH=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"]),HH=/^\{[a-z]+\}$/i;function RC(e){if(e.length>EC||e.includes("://")||!$H.test(e))return!1;const n=e.split("/").slice(3);return n.every((i,r)=>{const u=n[r-1];return u===void 0||!KH.has(u)?!0:HH.test(i)||GH.has(`${u}/${i}`)})}const Ud=d({eventId:s().uuid(),uiSessionId:s().uuid(),page:RH});Ve("event",[Ud.extend({event:E("ui.page_viewed"),tab:Ld.optional()}).strict(),Ud.extend({event:E("ui.action"),action:IH,tab:Ld.optional(),integration:OH.optional(),format:k(qH).optional(),filter:MH.optional()}).strict(),Ud.extend({event:E("ui.error"),kind:k(BH),tab:Ld.optional(),component:s().regex(_C).optional(),errorName:s().regex(TC).optional(),route:s().max(EC).refine(RC,"route must be a route template").optional(),method:k(["GET","POST","PUT","PATCH","DELETE"]).optional(),statusClass:k(LH).optional(),status:m().int().min(400).max(599).optional()}).strict(),Ud.extend({event:E("ui.vitals"),metric:k(UH),rating:k(VH),tab:Ld.optional()}).strict()]);function FH(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 NC.includes(n)?n:"other"}function DC(e){if(e==="/projects/:projectName")return"overview";const n=/^\/projects\/:projectName\/([a-z-]+)/.exec(e);if(!n)return;const i=n[1];return CC.includes(i)?i:"other"}const QH=["struggle","bug","improvement","other"],ZH=k(QH),kc={summary:500,details:4e3,area:40,command:120,errorCode:40};d({kind:ZH,summary:s().trim().min(1).max(kc.summary),details:s().trim().min(1).max(kc.details).optional(),area:s().trim().min(1).max(kc.area).optional(),command:s().trim().min(1).max(kc.command).optional(),errorCode:s().trim().min(1).max(kc.errorCode).optional()}).strict();d({accepted:N(),id:s()});const YH=4;function XH(e){return e.length<YH}const IC=k(["trace","debug","info","warn","error","fatal"]),zC=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(),OC=d({cursor:s().min(1).max(512),ts:s().datetime(),level:IC,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:zC}).strict();d({level:IC.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:Fa().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:he.custom,path:["until"],message:'"until" must be on or after "since".'})});const PC=d({maxEntries:m().int().positive(),maxAgeSeconds:m().int().positive()}).strict(),JH=d({entries:g(OC),nextCursor:s().min(1).max(512).nullable(),truncated:m().int().nonnegative(),dropped:m().int().nonnegative(),retention:k(["process","durable"]),retentionPolicy:PC.optional(),captureErrors:m().int().nonnegative().optional(),observedAt:s().datetime()}).strict(),WH=d(zC.shape),eF=d({...OC.shape,context:WH});d({...JH.shape,entries:g(eF),retentionPolicy:d(PC.shape).optional()});function ng(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 bo=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:g(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:g(s()),confirmsAutomation:E(!1)}),totals:d({raw:bo,redirects:bo,subresources:bo,countable:bo,suspected:bo,adjustedEstimate:bo}),bursts:g(d({sourceId:s(),product:s(),landingPathNormalized:s(),tsHour:s(),counts:bo})),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:g(s()),gaScope:E("project")}),caveats:g(s())});const tF=new Set(["optional","nullable","default","prefault","readonly","catch","nonoptional"]),US=64;function Jd(e){return e._zod.def}function vo(e,n){return e.clone({...Jd(e),...n})}function VS(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 MC(e,n,i,r){if(r>US)throw new Error(`tolerantReadSchema: schema nesting exceeds ${US} levels`);const u=i.get(e);if(u)return u;const h=v=>MC(v,n,i,r+1),f=Jd(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&&Jd(x).type!=="never"?h(x):void 0);b=S?d(v).catchall(S):d(v)}else if(tF.has(f.type)){const v=f.innerType,x=h(v);b=x===v?e:vo(e,{innerType:x})}else if(f.type==="array"){const v=f.element,x=h(v);b=x===v?e:vo(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:vo(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):vo(e,{options:x}):e}else if(f.type==="record"){const v=f.keyType,x=f.valueType,S=Jd(v).type==="enum"?s():v,j=h(x);b=S===v&&j===x?e:vo(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:vo(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,I)=>T!==v[I])?vo(e,{items:S,rest:j}):e}else if(f.type==="lazy"){const v=f.getter;b=rO(()=>h(v()))}else f.type==="enum"?b=VS(Object.values(f.entries))??e:f.type==="literal"&&(b=VS(f.values)??e);return i.set(e,b),b}function Go(e,n={}){const i=new Map(n.openKeys??[]);return MC(e,i,new Map,0)}const Ho={openKeys:[[O1,m().int().nonnegative()]]};Go(q$,Ho);Go(Kg,Ho);Go(H$,Ho);Go(F$,Ho);Go(B$,Ho);Go(hN,Ho);Go($$,Ho);const nF=o2(nl.trafficAnalytics);Fe(nF.map(e=>E(e))).describe("Traffic activity window in days (7, 14, 30, or 90). Defaults to 30 when omitted.");const xo=d({current:m(),prior:m(),deltaPct:ot().nullable()}),aF=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:xo,unverifiedCrawlerHits:xo,aiUserFetchHits:xo,referralArrivals:xo,referralRedirects:m().int().nonnegative(),referralArrivalsByClass:d({paid:xo,organic:xo,unclassified:xo}),referralArrivalsClassSummary:s(),byOperator:g(d({operator:s(),verifiedHits:m(),unverifiedHits:m(),userFetchHits:m(),referralArrivals:m(),deltaPct:ot().nullable()})),topCrawledPaths:g(d({path:s(),verifiedHits:m(),unverifiedHits:m().default(0),distinctOperators:m()})),referralProducts:g(d({product:s(),arrivals:m(),distinctLandingPaths:m()})),dailyTrend:g(d({date:s(),verifiedCrawlerHits:m(),unverifiedCrawlerHits:m().default(0),userFetchHits:m(),referralArrivals:m()})),topReferralLandingPaths:g(d({path:s(),arrivals:m(),distinctProducts:m()}))});d({activity:aF.nullable()});const cie={ambiguous:"Property identity unverified"},uie="No answer could be tied to one property";function iF(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 sF(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 qC=d({name:s(),type:k(["string","boolean"]),multiple:N()}),oF=d({id:s(),path:g(s()).min(1),usage:s(),supportsDryRun:N(),windows:g(s()).optional(),options:g(qC),access:$3});d({version:s(),globalOptions:g(qC),groups:g(d({root:s(),section:s(),summary:s(),commands:g(oF)}))});const rF="canonry.onboarding-session.v1",xm="canonry.onboarding-launched-run.v1",W1="canonry.onboarding-handoff.v1",lF=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,cF=["system","project","queries","competitors","run"];function uF(e){return cF[e]??"system"}function dF(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 mF(e){return e.apiStatus.state!=="checking"&&e.workerStatus.state!=="checking"}const pF={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 pF[i]??n}function ey(){return BC(rF)}function BC(e){try{const n=typeof window<"u"?window.sessionStorage.getItem(e):null;if(n&&lF.test(n))return n;const i=Sm();return typeof window<"u"&&window.sessionStorage.setItem(e,i),i}catch{return Sm()}}function ty(){return Sm()}function LC(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 UC(e,n){try{typeof window<"u"&&window.sessionStorage.setItem(xm,JSON.stringify({projectName:e,runId:n,handled:!1}))}catch{}}function VC(e){if(!e)return null;try{if(typeof window>"u")return null;const n=window.sessionStorage.getItem(xm);if(!n)return null;const i=JSON.parse(n);return!LC(i)||i.projectName!==e||i.handled?null:i}catch{return null}}function wm(e){try{if(typeof window>"u")return;const n=window.sessionStorage.getItem(xm);if(!n)return;const i=JSON.parse(n);if(!LC(i)||i.runId!==e)return;window.sessionStorage.setItem(xm,JSON.stringify({...i,handled:!0}))}catch{}}function hF(e){try{typeof window<"u"&&window.sessionStorage.setItem(W1,e)}catch{}}function fF(e){if(!e)return!1;try{return typeof window<"u"&&window.sessionStorage.getItem(W1)===e}catch{return!1}}function gF(){try{typeof window<"u"&&window.sessionStorage.removeItem(W1)}catch{}}function Sm(){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 yF="canonry.ui-session.v1",bF="canonry.ui-pages.v1",vF="canonry.ui-errors.v1",$S="canonry.ui-sent.v1",xF=30,wF=120,SF=200,Yt={sender:null,disabled:!1,page:"other",landingPage:null,pendingVitals:[],memory:new Map,sentAt:null,now:()=>Date.now()};function kF(e){Yt.sender=e.enabled===!1?null:e.send,Yt.disabled=!1,e.now&&(Yt.now=e.now)}function jF(e){const n=FH(e);if(Yt.page=n,Yt.landingPage===null){Yt.landingPage=n;const r=Yt.pendingVitals;Yt.pendingVitals=[];for(const[u,h]of r)$C(u,h)}const i=DC(n);KC(bF,`${n}|${i??""}`,{event:"ui.page_viewed"})}function Fo(e,n={}){ny({event:"ui.action",action:e,...n})}const AF=800,NF=1e3,ag=new Map;let jc,ig="";function CF(e){if(!Yt.sender)return;const n=ag.get(e);n&&clearTimeout(n),ag.set(e,setTimeout(()=>{ag.delete(e),Fo("filter.change",{filter:e})},AF))}function die(e,n=!1){if(!Yt.sender)return;jc&&clearTimeout(jc),jc=void 0;const i=e.trim();if(i.length===0){ig="";return}const r=()=>{jc=void 0,i!==ig&&(ig=i,Fo("search.submit"))};n?r():jc=setTimeout(r,NF)}const _F={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 TF(e,n){const i=new Set;for(const[r,u]of Object.entries(_F))EF(e[r],n[r])||i.add(u);for(const r of i)CF(r)}function EF(e,n){const i=r=>r==null||r===""?"":JSON.stringify(r);return i(e)===i(n)}function km(e){const n=VF(e.error),i=e.route&&RC(e.route)?e.route:void 0;if(e.kind==="api"&&!i)return;const r=HC(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&&_C.test(e.component)?e.component:void 0,b=[e.kind,Yt.page,f,n,r,i,u??h].join("|");KC(vF,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 RF(e,n){if(Yt.landingPage===null){Yt.pendingVitals.push([e,n]);return}$C(e,n)}function $C(e,n){const i=Yt.landingPage??"other";ny({event:"ui.vitals",metric:e,rating:n},i)}const DF=[["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"]],KS="/api/v1/projects/{name}/google/connections/{type}",IF={gsc:"gsc",ga4:"ga",gbp:"gbp"};function zF(e,n,i){const r=e==="PUT"&&n===`${KS}/property`?"integration.connect":e==="DELETE"&&n===KS?"integration.disconnect":void 0;if(!r)return;const u=i?/\/google\/connections\/([^/?#]+)/.exec(i)?.[1]:void 0,h=u&&IF[decodeURIComponent(u)]||"google";return[e,n,r,h]}const OF=[["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 PF(e,n,i){return OF.some(([r,u,h])=>(r==="*"||r===e)&&u.test(n)&&h.includes(i))}const MF=/^\/api\/v1\/(?:telemetry|feedback)(?:\/|$)/;function jm(e){if(!e.route||MF.test(e.route))return;const n=HC(e.method);if(e.network||typeof e.status=="number"&&e.status>=400){if(e.status===401||typeof e.status=="number"&&e.status<500&&PF(n,e.route,e.status))return;km({kind:"api",route:e.route,method:n,status:e.status,network:e.network});return}if(!n||n==="GET")return;const i=zF(n,e.route,e.path)??DF.find(([r,u,,,h])=>r===n&&u===e.route&&(h===void 0||h===e.status));i&&Fo(i[2],i[3]?{integration:i[3]}:{})}function KC(e,n,i){const r=BF(e);if(!r.has(n)&&ny(i)){r.add(n);try{window.sessionStorage.setItem(e,JSON.stringify([...r].slice(-SF)))}catch{}}}function ny(e,n){try{const i=Yt.sender;if(!i||Yt.disabled||!qF())return!1;const r=n??Yt.page,u=DC(r),h={...e,eventId:Sm(),uiSessionId:BC(yF),page:r,...u?{tab:u}:{}};return i(h).then(f=>{f&&f.accepted===!1&&(Yt.disabled=!0)},()=>{}),!0}catch{return!1}}function qF(){const e=Yt.now(),n=(Yt.sentAt??=UF($S)).filter(i=>e-i<36e5&&i<=e);if(Yt.sentAt=n,n.length>=wF||n.filter(i=>e-i<6e4).length>=xF)return!1;n.push(e);try{window.sessionStorage.setItem($S,JSON.stringify(n))}catch{}return!0}function BF(e){let n=Yt.memory.get(e);return n||(n=new Set(LF(e)),Yt.memory.set(e,n)),n}function GC(e){try{const n=window.sessionStorage.getItem(e),i=n?JSON.parse(n):[];return Array.isArray(i)?i:[]}catch{return[]}}function LF(e){return GC(e).filter(n=>typeof n=="string")}function UF(e){return GC(e).filter(n=>typeof n=="number"&&Number.isFinite(n))}function VF(e){const n=e instanceof Error?e.name:e&&typeof e=="object"&&"name"in e?String(e.name):void 0;return n&&TC.test(n)?n:void 0}function HC(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 mie(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 Eo(){if(typeof window>"u")return!1;const e=window.__CANONRY_CONFIG__?.demo;return e?.enabled===!0&&e.readOnly===!0&&e.sampleData===!0}function $F(){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 KF(){if(typeof window>"u")return;const e=window.__CANONRY_CONFIG__?.embed?.renderToken;return typeof e=="string"&&e.length>0?e:void 0}function FC(e){const n=KF();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=`${up().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 GF(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 QC(){if(typeof window>"u")return null;const e=window.__CANONRY_CONFIG__?.embed;return e?.enabled?e:null}function HF(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showResourceLinks!==!1}function FF(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showAgentBar!==!1}function QF(){return typeof window>"u"?!1:window.__CANONRY_CONFIG__?.agent?.allowViewers===!0}function ay(){return Eo()}function ZF(){return typeof window>"u"?!0:window.__CANONRY_CONFIG__?.dashboard?.showUpdateNotification!==!1}function ko(){return YF(Oe["answer-visibility"])}function YF(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 XF(){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:nG}}function GS(){return XF()?"Analyst":"View only"}function cp(){return QC()!==null}function JF(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const ZC=JF();function WF(){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 up(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,""):""}function eQ(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 tQ(e,n){if(e.protocol!=="http:"&&e.protocol!=="https:"||!eQ(e.hostname))return;const i=e.port?`:${e.port}`:"",r=n?n.replace(/\/$/,""):"";return`${e.protocol}//localhost${i}${r}`}function pie(e){return`${e.replace(/\/$/,"")}/api/v1/google/callback`}function hie(e){return`${e.replace(/\/$/,"")}/api/v1/google-marketing/callback`}function nQ(){if(!(typeof window>"u"))return tQ(window.location,up())}function aQ(e){return`${up()}${e}`}function iQ(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 sQ(){return""}function oQ(){return!!sQ()}let YC=null;function HS(e){YC=e}function iy(){YC?.()}const J=SR({baseUrl:WF()});J.interceptors.response.use((e,n)=>(e.status===401&&!n.url.includes("/api/v1/session")&&iy(),e));J.interceptors.request.use(e=>{const n=FC(e.url);return n===e.url?e:GF(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 Gs(e,n){const i=n?.body!=null,r=await fetch(FC(`${ZC}${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/")&&iy(),new yn(h,r.status,f,b)}if(r.status!==204)return r.json()}function rQ(e){return ye(()=>yj({client:J,path:{name:e}}))}function fie(e){return ye(()=>xj({client:J,path:{name:e}}))}function Fg(e){return ye(()=>wj({client:J,path:{id:e}}))}function XC(e){return ye(()=>vj({client:J,path:{name:e}}))}function lQ(e,n,i){return ye(()=>WT({client:J,path:{name:e},query:{location:n,limit:i}}))}function JC(e,n){return ye(()=>I8({client:J,path:{name:e},query:{location:n?.location,since:n?.since}}))}function WC(e,n){return ye(()=>cT({client:J,path:{name:e},body:n}))}function cQ(e){return ye(()=>rT({client:J,body:e}))}function uQ(e,n){return ye(()=>LT({client:J,path:{name:e},body:{queries:n}}))}function dQ(e,n){return ye(()=>BT({client:J,path:{name:e},body:{queries:n}}))}function gie(e,n){return ye(()=>qT({client:J,path:{name:e},body:{queries:n}}))}function mQ(e,n,i){return ye(()=>$T({client:J,path:{name:e},body:{competitors:n}}))}function yie(e,n,i){return ye(()=>VT({client:J,path:{name:e},body:{competitors:n,...i?.acknowledgeBulkAdd!==void 0?{acknowledgeBulkAdd:i.acknowledgeBulkAdd}:{}}}))}function bie(e,n){return ye(()=>KT({client:J,path:{name:e,id:n}}))}async function vie(e,n){const i=await rQ(e);return WC(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 pQ(e,n){const i={};return n?.location&&(i.location=n.location),n?.allLocations&&(i.allLocations=!0),n?.noLocation&&(i.noLocation=!0),ye(()=>HT({client:J,path:{name:e},body:i}))}function xie(e,n){return ye(()=>OT({client:J,path:{name:e},body:n}))}async function wie(e,n){await ye(()=>PT({client:J,path:{name:e,label:n}}))}function Sie(e,n){return ye(()=>MT({client:J,path:{name:e},body:{label:n}}))}async function kie(e){await ye(()=>lT({client:J,path:{name:e}}))}function jie(){return ye(()=>Sj({client:J}))}function FS(){return Gs("/session")}function hQ(e,n){return Gs("/session/setup",{method:"POST",body:JSON.stringify({password:e}),...n?{headers:{Authorization:`Bearer ${n}`}}:{}})}function fQ(e){return Gs("/session",{method:"POST",body:JSON.stringify({password:e})})}function gQ(e){return Gs("/session",{method:"POST",body:JSON.stringify({apiKey:e})})}function yQ(){return Gs("/session",{method:"DELETE"})}function sg(){return ye(()=>iE({client:J}))}function QS(){return Gs("/auth/session")}function bQ(e,n){return Gs("/auth/login",{method:"POST",body:JSON.stringify({name:e,password:n})})}function ZS(){return Gs("/auth/logout",{method:"POST"})}function e4(e,n){return ye(()=>nE({client:J,path:{name:e},body:n}))}async function sy(e){for(let n=0;n<2;n+=1)try{await ye(()=>yE({client:J,body:e}));return}catch(i){if(!(!(i instanceof yn)||i.statusCode>=500)||n===1)return}}function Aie(e){return ye(()=>aE({client:J,body:e}))}function Nie(e,n){return ye(()=>cE({client:J,path:{name:e},body:n}))}async function Cie(e,n){await ye(()=>rE({client:J,path:{name:e},query:n===void 0?void 0:{expectedUpdatedAt:n}}))}function _ie(e){return ye(()=>dE({client:J,path:{name:e}}))}function Tie(e,n){return ye(()=>mE({client:J,path:{name:e},body:n}))}async function Eie(e,n){await ye(()=>pE({client:J,path:{name:e,id:n}}))}async function Rie(e,n){const i=await ye(()=>hE({client:J,path:{name:e,id:n}}));return i.ok&&Fo("notification.test"),i}function vQ(e,n,i){return ye(()=>UT({client:J,path:{name:e},body:{provider:n,count:i}}))}function xQ(e){return ye(()=>YT({client:J,body:e}))}function wQ(e){return ye(()=>ZT({client:J,body:e??{}}))}function Die(e,n){const i=nQ();return ye(()=>UE({client:J,path:{name:e},body:{type:n,...i?{publicUrl:i}:{}}}))}function Iie(e,n){return ye(()=>VE({client:J,path:{name:e,type:n}}))}function zie(e,n,i){return ye(()=>KE({client:J,path:{name:e,type:n},body:{propertyId:i}}))}function Oie(e,n,i){return ye(()=>GE({client:J,path:{name:e,type:n},body:{sitemapUrl:i}}))}function SQ(e,n){return ye(()=>HE({client:J,path:{name:e},body:n??{}}))}function Pie(e,n){const i={};return n&&n!=="all"&&(i.window=n),ye(()=>eE({client:J,path:{name:e},query:i}))}function Mie(e,n){return ye(()=>ZE({client:J,path:{name:e},body:{url:n}}))}function kQ(e,n){return ye(()=>t8({client:J,path:{name:e},body:n??{}}))}function qie(e,n){return ye(()=>e8({client:J,path:{name:e},query:n?{sitemapIndex:n}:void 0}))}function Bie(e,n){return ye(()=>sT({client:J,path:{name:e},body:{sitemapUrls:n}}))}function jQ(e,n){return ye(()=>hR({client:J,path:{name:e},body:n??{}}))}function Lie(e,n){return ye(()=>tR({client:J,path:{name:e},body:n??{}}))}function Uie(){return ye(()=>kj({client:J}))}function Vie(e,n){return ye(()=>oE({client:J,body:{host:e,port:n}}))}function $ie(e,n){return ye(()=>n8({client:J,path:{name:e},body:n}))}function Kie(e,n){return ye(()=>d8({client:J,path:{name:e},body:{apiKey:n}}))}function Gie(e){return ye(()=>m8({client:J,path:{name:e}}))}function Hie(e,n){return ye(()=>f8({client:J,path:{name:e},body:{siteUrl:n}}))}function Fie(e,n){return ye(()=>b8({client:J,path:{name:e},body:{url:n}}))}function Qie(e,n){return ye(()=>v8({client:J,path:{name:e},body:{}}))}function Zie(e,n){return ye(()=>x8({client:J,path:{name:e},body:n}))}function Yie(e){return ye(()=>sE({client:J,body:{apiKey:e}}))}function AQ(e){return e?/filename\s*=\s*"?([^";]+)"?/i.exec(e)?.[1]??null:null}async function Xie(e,n){const i=await fetch(`${ZC}/projects/${encodeURIComponent(e)}/results/export?format=${n}`,{credentials:"same-origin",headers:{}});if(!i.ok)throw jm({method:"GET",route:"/api/v1/projects/{name}/results/export",status:i.status}),new yn(`Failed to download results: ${i.status}`,i.status);Fo("export.download",{format:n});const r=await i.blob(),u=URL.createObjectURL(r),h=AQ(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 Jie(e,n){return ye(()=>N8({client:J,path:{name:e},body:{}}))}function Wie(e,n){return ye(()=>S8({client:J,path:{name:e},body:n}))}function ese(e){return ye(()=>k8({client:J,path:{name:e}}))}function tse(e,n){return ye(()=>H8({client:J,path:{name:e},body:n}))}function nse(e,n){return ye(()=>F8({client:J,path:{name:e},body:n}))}function ase(e,n){return ye(()=>Q8({client:J,path:{name:e},body:n}))}function ise(e,n,i){return ye(()=>Z8({client:J,path:{name:e,id:n},body:i??{}}))}function sse(e,n,i){return ye(()=>Y8({client:J,path:{name:e,id:n},body:{}}))}function ose(e,n){return ye(()=>E8({client:J,path:{name:e},query:{runId:n}}))}function NQ(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 CQ(e,n){const i=aQ(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:iQ(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=NQ(u.updateAvailable),x=rH.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 rse(){return ye(()=>z8({client:J}))}function lse(){return ye(()=>O8({client:J}))}function cse(){return ye(()=>q8({client:J}))}function use(){return ye(()=>P8({client:J}))}function dse(e){return ye(()=>M8({client:J,body:e?{release:e}:{}}))}function mse(){return ye(()=>B8({client:J}))}function pse(){return ye(()=>L8({client:J}))}function hse(e){return ye(()=>U8({client:J,path:{release:e}}))}function fse(e,n={}){return ye(()=>$8({client:J,path:{name:e},query:{release:n.release,excludeCrawlers:n.excludeCrawlers?"1":void 0,source:n.source}}))}function gse(e,n={}){return ye(()=>K8({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 yse(e,n={}){return ye(()=>G8({client:J,path:{name:e},query:{source:n.source}}))}function bse(e,n){return ye(()=>V8({client:J,path:{name:e},body:{release:void 0}}))}async function YS(e,n){return ye(()=>yR({client:J,path:{name:e},query:n}))}async function _Q(e,n){return ye(()=>bR({client:J,path:{name:e},body:{id:n}}))}async function TQ(e,n){return ye(()=>xR({client:J,path:{name:e,id:n}}))}async function EQ(e,n){return ye(()=>vR({client:J,path:{name:e,id:n}}))}async function RQ(e,n){const i=f=>ye(()=>yT({client:J,path:{name:e},query:{...n,include:["assessments","locations"],queryLimit:mN,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 Wd(e){return ye(()=>fT({client:J,path:{name:e}}))}function DQ(e,n){return ye(()=>gT({client:J,path:{name:e},body:n}))}function IQ(e,n,i){return ye(()=>bT({client:J,path:{name:e},query:{...n,cursor:i,limit:50}}))}function zQ(e,n){return ye(()=>vT({client:J,path:{name:e},query:n}))}function OQ(e,n,i){return ye(()=>xT({client:J,path:{name:e},body:{previewToken:n,idempotencyKey:i}}))}function PQ(e){return ye(()=>wT({client:J,path:{name:e}}))}function MQ(e,n,i){return ye(()=>ST({client:J,path:{name:e,jobId:n},query:{attemptCursor:i}}))}const t4={account:null,canWrite:!0,isAdmin:!0},qQ={account:null,canWrite:!1,isAdmin:!1};function BQ(e){const n=e.scopes.includes(qS);return{account:null,canWrite:!e.readOnly&&n,isAdmin:e.projectId===null&&e.scopes.includes(qS)}}const n4=_.createContext(t4);function LQ({account:e,apiKey:n,apiKeyPending:i=!1,children:r}){const u=i?qQ:n?BQ(n):e?{account:e,canWrite:e.role==="admin",isAdmin:e.role==="admin"}:t4;return l.jsx(n4.Provider,{value:u,children:r})}function ga(){return _.useContext(n4)}const a4="View only — your account cannot change this.";function gn(e){return(...n)=>{e(...n)}}const UQ=6e3,VQ=5,$Q=180;let Mn=[],KQ=0;const Qg=new Set,Zg=new Map,Yg=new Map;function Am(){const e=[...Mn];for(const n of Qg)n(e)}function oy(e){const n=Zg.get(e);n&&(clearTimeout(n),Zg.delete(e));const i=Yg.get(e);i&&(clearTimeout(i),Yg.delete(e))}function i4(e){oy(e);const n=Mn.length;Mn=Mn.filter(i=>i.id!==e),Mn.length!==n&&Am()}function XS(e){oy(e.id),Zg.set(e.id,setTimeout(()=>{Xg(e.id)},e.durationMs))}function GQ(e,n,i){return typeof e=="string"?{title:e,tone:n,durationMs:i}:e}function vn(e,n="negative",i=UQ){const r=GQ(e,n,i),u={id:String(++KQ),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=Mn.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 Mn=Mn.map(b=>b.id===h.id?f:b),Am(),XS(f),h.id}}return Mn.length>=VQ&&i4(Mn[0].id),Mn=[...Mn,u],Am(),XS(u),u.id}function Xg(e){const n=Mn.find(i=>i.id===e);!n||n.state==="closing"||(oy(e),Mn=Mn.map(i=>i.id===e?{...i,state:"closing"}:i),Am(),Yg.set(e,setTimeout(()=>{i4(e)},$Q)))}function HQ(e){return Qg.add(e),()=>{Qg.delete(e)}}function JS(){return Mn}const Jg={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=Jg[n];return e.invalidateQueries({predicate:r=>{const u=r.queryKey[0];return typeof u?._id=="string"&&u._id.startsWith(i)}})}function vse(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===Jg.queryTracking||r._id===Jg.visibilityReport||r._id==="getApiV1ProjectsByNameQueries"||r._id==="getApiV1ProjectsByName"}})}const FQ=new Set(["getApiV1Projects","getApiV1Runs","getApiV1History","getApiV1NotificationsEvents"]);function QQ(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 q=P.queryKey[0],L=P.state.data,$=q?._id==="getApiV1Projects"&&Array.isArray(L)?L:L&&typeof L=="object"&&"project"in L?[L.project]:q?._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 q=P.queryKey[0];if(x)return q?.path?.name===v&&q._id?.startsWith("getApiV1ProjectsByNameAgent")===!0||P.queryKey[0]==="aero-preview"&&P.queryKey[1]===v;if(q?._id?.startsWith("getApiV1ProjectsByName")&&q.path?.name&&S.has(q.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 q?._id==="getApiV1RunsById"&&!!$?.projectId&&j.has($.projectId)},T=P=>FQ.has(P.queryKey[0]?._id??""),I=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),M=P=>{const q=P.queryKey[0];return T(P)||["getApiV1ProjectsByName","getApiV1ProjectsByNameOverview","getApiV1ProjectsByNameRuns","getApiV1ProjectsByNameTechnicalAeoRuns","getApiV1ProjectsByNameTimeline"].includes(q?._id??"")||P.queryKey[0]==="project-dashboard-full"&&P.queryKey[3]==="overview"||P.queryKey[0]==="project-overview-slim"},R=v?P=>C(P)&&(!I||M(P))||!x&&T(P):P=>!I||M(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(q=>!S.has(q.name)&&!S.has(q.id))),e.setQueriesData({predicate:P=>P.queryKey[0]?._id==="getApiV1Runs"},P=>P?.filter(q=>!j.has(q.projectId))),e.invalidateQueries({predicate:T});return}e.invalidateQueries({predicate:R})}const ZQ=5*6e4,em=30*6e4,xse=3e4,wse=6e4,Rs=3e4,YQ=2e3,XQ=3e4;let WS;function JQ(){const e=new o6({defaultOptions:{queries:{staleTime:ZQ,retry:1,refetchOnWindowFocus:!1}},mutationCache:new r6({onError:(u,h,f,b)=>{b.meta?.skipGlobalErrorToast||vn({title:u instanceof Error?u.message:"An unexpected error occurred",tone:"negative"})}})});WS?.();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)&&QQ(e,h,f.body),u));return WS=()=>{J.interceptors.request.eject(i),J.interceptors.response.eject(r)},e}const WQ="modulepreload",eZ=function(e,n){return new URL(e,n).href},ek={},Yi=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=eZ(S,r),S in ek)return;ek[S]=!0;const j=S.endsWith(".css"),C=j?'[rel="stylesheet"]':"";if(r)for(let I=f.length-1;I>=0;I--){const M=f[I];if(M.href===S&&(!j||M.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${S}"]${C}`))return;const T=document.createElement("link");if(T.rel=j?"stylesheet":WQ,j||(T.as="script"),T.crossOrigin="",T.href=S,v&&T.setAttribute("nonce",v),document.head.appendChild(T),j)return new Promise((I,M)=>{T.addEventListener("load",I),T.addEventListener("error",()=>M(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)})},ry=_.createContext({view:null,publish:()=>()=>{}});function tZ({children:e}){const[n,i]=_.useState(null),r=_.useCallback(u=>(i(u),()=>i(h=>h===u?null:h)),[]);return l.jsx(ry.Provider,{value:_.useMemo(()=>({view:n,publish:r}),[n,r]),children:e})}function Sse(e,n){const{publish:i}=_.useContext(ry),r=JSON.stringify(n);_.useEffect(()=>i({project:e,context:JSON.parse(r)}),[i,e,r])}function nZ(e,n){const{view:i}=_.useContext(ry);return i?.project===e&&i.context.view===n.view?i.context:n}var aZ=(e=>(e.Clicks="clicks",e.Impressions="impressions",e.CTR="ctr",e.Position="position",e))(aZ||{});const kse={clicks:"Clicks",impressions:"Impressions",ctr:"CTR",position:"Position"},jse={clicks:"Clicks",impressions:"Impr",ctr:"CTR",position:"Pos"},iZ=Z0;function Ase(e){return e.endsWith("%")?{figure:e.slice(0,-1),sign:"%"}:{figure:e,sign:""}}function Nse(e,n){return n==="cited"?sF(e):iF(e)}function Cse(e,n){const i=Uc(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 sZ(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 oZ(e){return e.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function rZ(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:`${lZ(e,i)}, ${u}`}function lZ(e,n=new Date){const i=new Date(e);return Number.isNaN(i.getTime())?e:i.getFullYear()===n.getFullYear()?cZ(e):i.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function cZ(e){const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function uZ(e){if(!e)return"—";try{return new Date(e).toLocaleString()}catch{return e}}function _se(e){return e===null?"Unknown":e?"Pass":"Fail"}function tk(e){return e===0?"12:00 AM":e<12?`${e}:00 AM`:e===12?"12:00 PM":`${e-12}:00 PM`}function Tse(e,n){return e==="twice-daily"?"twice-daily":e.startsWith("weekly@")?`${e}@${n}`:`daily@${n}`}function Ese(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 Rse(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 ${tk(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 ${tk(b)} · ${r}`}return`${e} · ${r}`}function dZ(e,n){return n&&n!==e?`${e} · ${n}`:e}function Dse(){const e=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Intl.DateTimeFormat("en-US",{timeZoneName:"short"}).formatToParts().find(i=>i.type==="timeZoneName")?.value;return dZ(e,n)}function mZ(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 pZ(e,n){return!n||n.includes(e)}const s4=["overview","search-console","local","activity","backlinks","technical-aeo","history","settings"],hZ=new Set(s4);function fZ(e){if(uC(e))return[];const n=e??s4,i=[...new Set(n.filter(r=>hZ.has(r)))];return i.length>0?i:["overview"]}function Ise(e){return e?fZ(e.projectTabs):void 0}function zse(e,n){return pZ(e,n)||!n?e:n.includes("overview")?"overview":n[0]??"overview"}const nk={bg:"--canonry-embed-bg",fg:"--canonry-embed-fg",accent:"--color-link"},gZ=/^(?:#(?:[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 yZ(e){const n=e?.mode?.trim();return n==="light"||n==="dark"?n:void 0}function bZ(e){if(!e)return{};const n={};for(const[i,r]of Object.entries(e)){const u=Object.hasOwn(nk,i)?nk[i]:void 0;if(!u||typeof r!="string")continue;const h=r.trim();gZ.test(h)&&(n[u]=h)}return n}const ge=(e,n,i,r)=>{const u={_id:e,baseUrl:n?.baseUrl||(n?.client??z).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]},Jr=e=>ge("getApiV1Projects",e),Qo=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await oT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:Jr(e)}),vZ=e=>ge("getApiV1ProjectsByName",e),xZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await yj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vZ(e)}),wZ=e=>ge("getApiV1ProjectsByNameMeasurementPlan",e),Ose=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wZ(e)}),SZ=e=>ge("getApiV1ProjectsByNameMeasurementReport",e),Pse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await dT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SZ(e)}),kZ=e=>ge("getApiV1ProjectsByNameMeasurementSetup",e),jZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await mT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kZ(e)}),AZ=e=>ge("getApiV1ProjectsByNameMeasurementPlanDraft",e),Mse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AZ(e)}),gu=(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},qse=e=>({mutationFn:async i=>{const{data:r}=await hT({...e,...i,throwOnError:!0});return r}}),NZ=e=>ge("getApiV1ProjectsByNameMeasurementOverview",e),Bse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await bj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NZ(e)}),CZ=e=>ge("getApiV1ProjectsByNameMeasurementOverview",e,!0),Lse=e=>Yc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=gu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await bj({...e,...h,signal:r,throwOnError:!0});return f},queryKey:CZ(e)}),_Z=e=>ge("getApiV1ProjectsByNameVisibilityReport",e),Use=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_Z(e)}),TZ=e=>ge("getApiV1ProjectsByNameMeasurementPropertyEvidence",e,!0),Vse=e=>Yc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=gu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await jT({...e,...h,signal:r,throwOnError:!0});return f},queryKey:TZ(e)}),EZ=e=>ge("getApiV1ProjectsByNameMeasurementQuestionResult",e),$se=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EZ(e)}),RZ=e=>ge("getApiV1ProjectsByNameMeasurementPropertyCompetitors",e),Kse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await NT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:RZ(e)}),DZ=e=>ge("getApiV1ProjectsByNameMeasurementQueryTemplates",e),Gse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await CT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DZ(e)}),Hse=e=>({mutationFn:async i=>{const{data:r}=await _T({...e,...i,throwOnError:!0});return r}}),IZ=e=>ge("getApiV1ProjectsByNameResearchRuns",e,!0),Fse=e=>Yc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=gu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await TT({...e,...h,signal:r,throwOnError:!0});return f},queryKey:IZ(e)}),Qse=e=>({mutationFn:async i=>{const{data:r}=await ET({...e,...i,throwOnError:!0});return r}}),zZ=e=>ge("getApiV1ProjectsByNameQueryTracking",e),Zse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await RT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zZ(e)}),Yse=e=>({mutationFn:async i=>{const{data:r}=await DT({...e,...i,throwOnError:!0});return r}}),Xse=e=>({mutationFn:async i=>{const{data:r}=await IT({...e,...i,throwOnError:!0});return r}}),OZ=e=>ge("getApiV1ProjectsByNameResearchRunsByRunId",e),Jse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await zT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OZ(e)}),o4=e=>ge("getApiV1ProjectsByNameQueries",e),Wse=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:o4(e)}),PZ=e=>ge("getApiV1ProjectsByNameAnalyticsCompetitors",e),eoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await GT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:PZ(e)}),MZ=e=>ge("getApiV1ProjectsByNameRuns",e),r4=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await xj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:MZ(e)}),qZ=e=>ge("getApiV1ProjectsByNameRunAdmission",e),toe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await FT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:qZ(e)}),l4=e=>ge("getApiV1Runs",e),Qc=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await QT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:l4(e)}),BZ=e=>ge("getApiV1RunsById",e),ly=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:BZ(e)}),LZ=e=>ge("getApiV1ProjectsByNameHistory",e),noe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await XT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:LZ(e)}),UZ=e=>ge("getApiV1History",e),aoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await JT({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:UZ(e)}),VZ=e=>ge("getApiV1ProjectsByNameSnapshotsDiff",e),ioe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await tE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:VZ(e)}),$Z=e=>ge("getApiV1Settings",e),KZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await Sj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:$Z(e)}),GZ=e=>ge("getApiV1ProjectsByNameSchedule",e),HZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:GZ(e)}),FZ=e=>ge("getApiV1ProjectsByNameSchedules",e),soe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await uE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:FZ(e)}),c4=e=>ge("getApiV1Telemetry",e),QZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:c4(e)}),ZZ=e=>({mutationFn:async i=>{const{data:r}=await gE({...e,...i,throwOnError:!0});return r}}),YZ=e=>ge("getApiV1CdpStatus",e),XZ=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await kj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:YZ(e)}),JZ=e=>ge("getApiV1ProjectsByNameGoogleAdsStatus",e),ooe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await vE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:JZ(e)}),roe=e=>({mutationFn:async i=>{const{data:r}=await xE({...e,...i,throwOnError:!0});return r}}),WZ=e=>ge("getApiV1ProjectsByNameGoogleAdsCustomers",e),loe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:WZ(e)}),coe=e=>({mutationFn:async i=>{const{data:r}=await SE({...e,...i,throwOnError:!0});return r}}),uoe=e=>({mutationFn:async i=>{const{data:r}=await kE({...e,...i,throwOnError:!0});return r}}),eY=e=>ge("getApiV1ProjectsByNameGoogleAdsPerformance",e),doe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:eY(e)}),tY=e=>ge("getApiV1ProjectsByNameGoogleAdsSnapshots",e),moe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await AE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:tY(e)}),poe=e=>({mutationFn:async i=>{const{data:r}=await NE({...e,...i,throwOnError:!0});return r}}),nY=e=>ge("getApiV1ProjectsByNameGtmStatus",e),hoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await CE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:nY(e)}),foe=e=>({mutationFn:async i=>{const{data:r}=await _E({...e,...i,throwOnError:!0});return r}}),aY=e=>ge("getApiV1ProjectsByNameGtmAccounts",e),goe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await TE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:aY(e)}),iY=e=>ge("getApiV1ProjectsByNameGtmAccountsByAccountIdContainers",e),yoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await EE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:iY(e)}),sY=e=>ge("getApiV1ProjectsByNameGtmAccountsByAccountIdContainersByContainerIdWorkspaces",e),boe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await RE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:sY(e)}),voe=e=>({mutationFn:async i=>{const{data:r}=await DE({...e,...i,throwOnError:!0});return r}}),xoe=e=>({mutationFn:async i=>{const{data:r}=await IE({...e,...i,throwOnError:!0});return r}}),oY=e=>ge("getApiV1ProjectsByNameGtmSnapshots",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:oY(e)}),Soe=e=>({mutationFn:async i=>{const{data:r}=await OE({...e,...i,throwOnError:!0});return r}}),rY=e=>ge("getApiV1ProjectsByNameConversionTrackingOptions",e),koe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await PE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:rY(e)}),lY=e=>ge("getApiV1ProjectsByNameConversionTrackingContracts",e),joe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await ME({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:lY(e)}),Aoe=e=>({mutationFn:async i=>{const{data:r}=await qE({...e,...i,throwOnError:!0});return r}}),cY=e=>ge("getApiV1ProjectsByNameConversionTrackingContractsByContractIdIntegrity",e),Noe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await BE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:cY(e)}),uY=e=>ge("getApiV1ProjectsByNameGoogleConnections",e),Coe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await LE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:uY(e)}),dY=e=>ge("getApiV1ProjectsByNameGoogleProperties",e),_oe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await $E({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:dY(e)}),mY=e=>ge("getApiV1ProjectsByNameGoogleGscPerformance",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:mY(e)}),pY=e=>ge("getApiV1ProjectsByNameGoogleGscPerformanceDaily",e),Eoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await QE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:pY(e)}),hY=e=>ge("getApiV1ProjectsByNameGoogleGscInspections",e),Roe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await YE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:hY(e)}),fY=e=>ge("getApiV1ProjectsByNameGoogleGscDeindexed",e),Doe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await XE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:fY(e)}),gY=e=>ge("getApiV1ProjectsByNameGoogleGscCoverage",e),Ioe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await JE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:gY(e)}),yY=e=>ge("getApiV1ProjectsByNameGoogleGscCoverageHistory",e),zoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await WE({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:yY(e)}),Ooe=e=>ge("getApiV1ProjectsByNameGoogleGscSitemaps",e),bY=e=>ge("getApiV1ProjectsByNameGbpLocations",e),Poe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await a8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:bY(e)}),Moe=e=>({mutationFn:async i=>{const{data:r}=await i8({...e,...i,throwOnError:!0});return r}}),qoe=e=>({mutationFn:async i=>{const{data:r}=await s8({...e,...i,throwOnError:!0});return r}}),vY=e=>ge("getApiV1ProjectsByNameGbpKeywords",e),Boe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await o8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:vY(e)}),xY=e=>ge("getApiV1ProjectsByNameGbpPlaceActions",e),Loe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await r8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:xY(e)}),wY=e=>ge("getApiV1ProjectsByNameGbpLodging",e),Uoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await l8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:wY(e)}),SY=e=>ge("getApiV1ProjectsByNameGbpPlaces",e),Voe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await c8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:SY(e)}),kY=e=>ge("getApiV1ProjectsByNameGbpSummary",e),$oe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await u8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:kY(e)}),jY=e=>ge("getApiV1ProjectsByNameBingStatus",e),Koe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await p8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:jY(e)}),AY=e=>ge("getApiV1ProjectsByNameBingSites",e),Goe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await h8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:AY(e)}),NY=e=>ge("getApiV1ProjectsByNameBingCoverage",e),Hoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await g8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:NY(e)}),CY=e=>ge("getApiV1ProjectsByNameBingInspections",e),Foe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await y8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:CY(e)}),_Y=e=>ge("getApiV1ProjectsByNameBingPerformance",e),Qoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await w8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:_Y(e)}),TY=e=>ge("getApiV1ProjectsByNameGaStatus",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:TY(e)}),EY=e=>ge("getApiV1ProjectsByNameGaSearchLandingPages",e),Yoe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await A8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:EY(e)}),RY=e=>ge("getApiV1ProjectsByNameGaTraffic",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:RY(e)}),DY=e=>ge("getApiV1ProjectsByNameGaAiReferralDaily",e),Joe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await _8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:DY(e)}),IY=e=>ge("getApiV1ProjectsByNameGaSessionHistory",e),Woe=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await T8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:IY(e)}),zY=e=>ge("getApiV1ProjectsByNameHealthHistory",e),ere=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await R8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:zY(e)}),OY=e=>ge("getApiV1ProjectsByNameCitationsVisibility",e),tre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await D8({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:OY(e)}),PY=e=>ge("getApiV1ProjectsByNameTrafficSources",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:PY(e)}),MY=e=>ge("getApiV1ProjectsByNameTrafficStatus",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:MY(e)}),qY=e=>ge("getApiV1ProjectsByNameTrafficSourcesById",e),ire=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=>ge("getApiV1ProjectsByNameTrafficEvents",e),sre=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=>ge("getApiV1ProjectsByNameDiscoverSessions",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:LY(e)}),UY=e=>ge("getApiV1ProjectsByNameDiscoverSessionsById",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:UY(e)}),VY=e=>ge("getApiV1ProjectsByNameTechnicalAeo",e),$Y=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await iR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:VY(e)}),KY=e=>ge("getApiV1ProjectsByNameTechnicalAeoPages",e),lre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await sR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:KY(e)}),GY=e=>ge("getApiV1ProjectsByNameTechnicalAeoTrend",e),cre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await oR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:GY(e)}),HY=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawl",e),ure=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await rR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:HY(e)}),FY=e=>ge("getApiV1ProjectsByNameTechnicalAeoGraph",e),dre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await lR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:FY(e)}),QY=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPagesAudit",e),mre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await cR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:QY(e)}),ZY=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e),pre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await jj({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:ZY(e)}),YY=e=>ge("getApiV1ProjectsByNameTechnicalAeoCrawlPages",e,!0),hre=e=>Yc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=gu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await jj({...e,...h,signal:r,throwOnError:!0});return f},queryKey:YY(e)}),XY=e=>ge("getApiV1ProjectsByNameTechnicalAeoStructure",e,!0),fre=e=>Yc({queryFn:async({pageParam:n,queryKey:i,signal:r})=>{const h=gu(i,typeof n=="object"?n:{query:{cursor:n}}),{data:f}=await uR({...e,...h,signal:r,throwOnError:!0});return f},queryKey:XY(e)}),JY=e=>ge("getApiV1ProjectsByNameTechnicalAeoInternalLinksNeighbors",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:JY(e)}),WY=e=>ge("getApiV1ProjectsByNameTechnicalAeoDeadLinks",e),yre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await mR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:WY(e)}),eX=e=>ge("getApiV1ProjectsByNameTechnicalAeoRuns",e),bre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await pR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:eX(e)}),tX=e=>ge("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdProgress",e),vre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await fR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:tX(e)}),nX=e=>ge("getApiV1ProjectsByNameTechnicalAeoRunsByRunIdPageHealthPreview",e),xre=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await gR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:nX(e)}),aX=e=>ge("getApiV1ProjectsByNameAgentProviders",e),iX=e=>be({queryFn:async({queryKey:n,signal:i})=>{const{data:r}=await wR({...e,...n[0],signal:i,throwOnError:!0});return r},queryKey:aX(e)});function ak(e){return e.state==="ok"?"positive":e.state==="checking"||e.state==="disabled"?"neutral":"negative"}function u4(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 wre(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 Sre={positive:"text-positive-400",caution:"text-caution-400",negative:"text-negative-400",neutral:"text-secondary"};function kre(e){return e>=50?"positive":e>=25?"caution":"negative"}function sX(e){return e.displayName??e.name.charAt(0).toUpperCase()+e.name.slice(1)}function Wr(e){const n=[e.detail,e.hint].filter(Boolean);return n.length>0?n.join(`
57
- `):void 0}function oX(e,n,i){const r=e.filter(f=>f.id!=="mcp").map(f=>{if(f.id==="api")return{...f,tone:ak(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(f.id==="worker")return{...f,tone:ak(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=>sX(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 rX(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 lX(e,n,i){const r=rX(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 d4="canonry.run-tracker",Wg=new Set;let ik=!1,cX=0,dp={runs:{},batches:{}};function uX(){const e=Qi();for(const n of Wg)n(e)}function dX(e){if(!e)return{runs:{},batches:{}};try{const n=JSON.parse(e);return{runs:n.runs??{},batches:n.batches??{}}}catch{return{runs:{},batches:{}}}}function mX(){typeof window>"u"||window.sessionStorage.setItem(d4,JSON.stringify(dp))}function m4(){ik||(ik=!0,!(typeof window>"u")&&(dp=dX(window.sessionStorage.getItem(d4))))}function mp(e){dp=e,mX(),uX()}function Qi(){return m4(),dp}function p4(e){return m4(),Wg.add(e),()=>{Wg.delete(e)}}function cy(e){const n=Qi();mp({...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 og(e){const n=Qi();if(!n.runs[e])return;const{[e]:i,...r}=n.runs;mp({...n,runs:r})}function pX(e){const n=Qi(),i=`batch_${Date.now()}_${++cX}`;return mp({...n,batches:{...n.batches,[i]:{batchId:i,runIds:e.runIds,queuedCount:e.queuedCount,skippedCount:e.skippedCount}}}),i}function hX(e){const n=Qi();if(!n.batches[e])return;const{[e]:i,...r}=n.batches;mp({...n,batches:r})}function fX(e){return e==="completed"||e==="partial"||e==="failed"||e==="cancelled"}const gX=10*6e4;function yX(e,n,i,r){return e.filter(u=>!n.has(u.runId)&&i-(u.trackedAt??0)>=r)}function bX(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 sk=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ok=tj,h4=(e,n)=>i=>{var r;if(n?.variants==null)return ok(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=sk(S)||sk(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(I=>{let[M,R]=I;return Array.isArray(R)?R.includes({...h,...b}[M]):{...h,...b}[M]===R})?[...x,j,C]:x},[]);return ok(e,f,v,i?.class,i?.className)},vX=(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},xX=(e,n)=>({classGroupId:e,validator:n}),f4=(e=new Map,n=null,i)=>({nextPart:e,validators:n,classGroupId:i}),Nm="-",rk=[],wX="arbitrary..",SX=e=>{const n=jX(e),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return kX(f);const b=f.split(Nm),v=b[0]===""&&b.length>1?1:0;return g4(b,v,n)},getConflictingClassGroupIds:(f,b)=>{if(b){const v=r[f],x=i[f];return v?x?vX(x,v):v:x||rk}return i[f]||rk}}},g4=(e,n,i)=>{if(e.length-n===0)return i.classGroupId;const u=e[n],h=i.nextPart.get(u);if(h){const x=g4(e,n+1,h);if(x)return x}const f=i.validators;if(f===null)return;const b=n===0?e.join(Nm):e.slice(n).join(Nm),v=f.length;for(let x=0;x<v;x++){const S=f[x];if(S.validator(b))return S.classGroupId}},kX=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?wX+r:void 0})(),jX=e=>{const{theme:n,classGroups:i}=e;return AX(i,n)},AX=(e,n)=>{const i=f4();for(const r in e){const u=e[r];uy(u,i,r,n)}return i},uy=(e,n,i,r)=>{const u=e.length;for(let h=0;h<u;h++){const f=e[h];NX(f,n,i,r)}},NX=(e,n,i,r)=>{if(typeof e=="string"){CX(e,n,i);return}if(typeof e=="function"){_X(e,n,i,r);return}TX(e,n,i,r)},CX=(e,n,i)=>{const r=e===""?n:y4(n,e);r.classGroupId=i},_X=(e,n,i,r)=>{if(EX(e)){uy(e(r),n,i,r);return}n.validators===null&&(n.validators=[]),n.validators.push(xX(i,e))},TX=(e,n,i,r)=>{const u=Object.entries(e),h=u.length;for(let f=0;f<h;f++){const[b,v]=u[f];uy(v,y4(n,b),i,r)}},y4=(e,n)=>{let i=e;const r=n.split(Nm),u=r.length;for(let h=0;h<u;h++){const f=r[h];let b=i.nextPart.get(f);b||(b=f4(),i.nextPart.set(f,b)),i=b}return i},EX=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,RX=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)}}},e0="!",lk=":",DX=[],ck=(e,n,i,r,u)=>({modifiers:e,hasImportantModifier:n,baseClassName:i,maybePostfixModifierPosition:r,isExternal:u}),IX=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 M=0;M<S;M++){const R=u[M];if(f===0&&b===0){if(R===lk){h.push(u.slice(v,M)),v=M+1;continue}if(R==="/"){x=M;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(e0)?(C=j.slice(0,-1),T=!0):j.startsWith(e0)&&(C=j.slice(1),T=!0);const I=x&&x>v?x-v:void 0;return ck(h,T,C,I)};if(n){const u=n+lk,h=r;r=f=>f.startsWith(u)?h(f.slice(u.length)):ck(DX,!1,f,void 0,!0)}if(i){const u=r;r=h=>i({className:h,parseClassName:u})}return r},zX=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}},OX=e=>({cache:RX(e.cacheSize),parseClassName:IX(e),sortModifiers:zX(e),...SX(e)}),PX=/\s+/,MX=(e,n)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:h}=n,f=[],b=e.trim().split(PX);let v="";for(let x=b.length-1;x>=0;x-=1){const S=b[x],{isExternal:j,modifiers:C,hasImportantModifier:T,baseClassName:I,maybePostfixModifierPosition:M}=i(S);if(j){v=S+(v.length>0?" "+v:v);continue}let R=!!M,P=r(R?I.substring(0,M):I);if(!P){if(!R){v=S+(v.length>0?" "+v:v);continue}if(P=r(I),!P){v=S+(v.length>0?" "+v:v);continue}R=!1}const q=C.length===0?"":C.length===1?C[0]:h(C).join(":"),L=T?q+e0:q,$=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},qX=(...e)=>{let n=0,i,r,u="";for(;n<e.length;)(i=e[n++])&&(r=b4(i))&&(u&&(u+=" "),u+=r);return u},b4=e=>{if(typeof e=="string")return e;let n,i="";for(let r=0;r<e.length;r++)e[r]&&(n=b4(e[r]))&&(i&&(i+=" "),i+=n);return i},BX=(e,...n)=>{let i,r,u,h;const f=v=>{const x=n.reduce((S,j)=>j(S),e());return i=OX(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=MX(v,i);return u(v,S),S};return h=f,(...v)=>h(qX(...v))},LX=[],fn=e=>{const n=i=>i[e]||LX;return n.isThemeGetter=!0,n},v4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,x4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,UX=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,VX=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$X=/\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$/,KX=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GX=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HX=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cs=e=>UX.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),_s=e=>!!e&&Number.isInteger(Number(e)),rg=e=>e.endsWith("%")&&st(e.slice(0,-1)),Li=e=>VX.test(e),w4=()=>!0,FX=e=>$X.test(e)&&!KX.test(e),dy=()=>!1,QX=e=>GX.test(e),ZX=e=>HX.test(e),YX=e=>!Re(e)&&!De(e),XX=e=>Hs(e,j4,dy),Re=e=>v4.test(e),wo=e=>Hs(e,A4,FX),uk=e=>Hs(e,sJ,st),JX=e=>Hs(e,C4,w4),WX=e=>Hs(e,N4,dy),dk=e=>Hs(e,S4,dy),eJ=e=>Hs(e,k4,ZX),Vd=e=>Hs(e,_4,QX),De=e=>x4.test(e),Ac=e=>Zo(e,A4),tJ=e=>Zo(e,N4),mk=e=>Zo(e,S4),nJ=e=>Zo(e,j4),aJ=e=>Zo(e,k4),$d=e=>Zo(e,_4,!0),iJ=e=>Zo(e,C4,!0),Hs=(e,n,i)=>{const r=v4.exec(e);return r?r[1]?n(r[1]):i(r[2]):!1},Zo=(e,n,i=!1)=>{const r=x4.exec(e);return r?r[1]?n(r[1]):i:!1},S4=e=>e==="position"||e==="percentage",k4=e=>e==="image"||e==="url",j4=e=>e==="length"||e==="size"||e==="bg-size",A4=e=>e==="length",sJ=e=>e==="number",N4=e=>e==="family-name",C4=e=>e==="number"||e==="weight",_4=e=>e==="shadow",oJ=()=>{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"),I=fn("blur"),M=fn("perspective"),R=fn("aspect"),P=fn("ease"),q=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=()=>[Cs,"full","auto",...Z()],Ce=()=>[_s,"none","subgrid",De,Re],tt=()=>["auto",{span:["full",_s,De,Re]},_s,De,Re],Ge=()=>[_s,"auto",De,Re],$e=()=>["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=()=>[Cs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Z()],xe=()=>[Cs,"screen","full","dvw","lvw","svw","min","max","fit",...Z()],Ae=()=>[Cs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...Z()],se=()=>[e,De,Re],Se=()=>[...$(),mk,dk,{position:[De,Re]}],qe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],we=()=>["auto","cover","contain",nJ,XX,{size:[De,Re]}],pe=()=>[rg,Ac,wo],ce=()=>["","none","full",x,De,Re],ue=()=>["",st,Ac,wo],_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,rg,mk,dk],Ct=()=>["","none",I,De,Re],me=()=>["none",st,De,Re],Be=()=>["none",st,De,Re],Ne=()=>[st,De,Re],re=()=>[Cs,"full",...Z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Li],breakpoint:[Li],color:[w4],container:[Li],"drop-shadow":[Li],ease:["in","out","in-out"],font:[YX],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Li],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Li],shadow:[Li],spacing:["px",st],text:[Li],"text-shadow":[Li],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Cs,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:[_s,"auto",De,Re]}],basis:[{basis:[Cs,"full","auto",b,...Z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,Cs,"auto","initial","none",Re]}],grow:[{grow:["",st,De,Re]}],shrink:[{shrink:["",st,De,Re]}],order:[{order:[_s,"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":$e()}],"auto-rows":[{"auto-rows":$e()}],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",...xe()]}],"min-inline-size":[{"min-inline":["auto",...xe()]}],"max-inline-size":[{"max-inline":["none",...xe()]}],"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,Ac,wo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,iJ,JX]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",rg,Re]}],"font-family":[{font:[tJ,WX,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,uk]}],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,wo]}],"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:qe()}],"bg-size":[{bg:we()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_s,De,Re],radial:["",De,Re],conic:[_s,De,Re]},aJ,eJ]}],"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,Ac,wo]}],"outline-color":[{outline:se()}],shadow:[{shadow:["","none",S,$d,Vd]}],"shadow-color":[{shadow:se()}],"inset-shadow":[{"inset-shadow":["none",j,$d,Vd]}],"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,wo]}],"ring-offset-color":[{"ring-offset":se()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":se()}],"text-shadow":[{"text-shadow":["none",C,$d,Vd]}],"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:qe()}],"mask-size":[{mask:we()}],"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,$d,Vd]}],"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",q,De,Re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[M,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,Ac,wo,uk]}],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"]}},rJ=BX(oJ);function Pa(...e){return rJ(tj(e))}const lJ=h4("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?f6:"button";return l.jsx(f,{ref:h,className:Pa(lJ({variant:n,size:i,className:e})),...u})});le.displayName="Button";const cJ=h4("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 T4({className:e,variant:n,...i}){return l.jsx("div",{className:Pa(cJ({variant:n}),e),...i})}const uJ=220;function pk({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)},uJ)};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(el,{className:"size-3","aria-hidden":"true"})})]}):null]})}function dJ({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(T4,{variant:r,...i,children:n})}function my({status:e}){return l.jsx(Sn,{tone:u4(e),children:oZ(e)})}const t0=ej,mJ=Xk,E4=_.forwardRef(({className:e,...n},i)=>l.jsx(h0,{ref:i,className:Pa("fixed inset-0 z-50 bg-overlay-scrim/70 backdrop-blur-sm",e),...n}));E4.displayName=h0.displayName;const pJ=400,hJ=1200,fJ=720,Cm=_.forwardRef(({className:e,children:n,...i},r)=>{const[u,h]=_.useState(fJ),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,I=Math.min(hJ,Math.max(pJ,v.current+T));h(I)},[]),j=_.useCallback(()=>{f.current=!1},[]);return l.jsxs(mJ,{children:[l.jsx(E4,{}),l.jsxs(f0,{ref:r,className:Pa("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(Jk,{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(el,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});Cm.displayName=f0.displayName;const n0=({className:e,...n})=>l.jsx("div",{className:Pa("flex flex-col gap-1.5 pr-10",e),...n}),_m=_.forwardRef(({className:e,...n},i)=>l.jsx(g0,{ref:i,className:Pa("text-lg font-medium text-primary",e),...n}));_m.displayName=g0.displayName;const Tm=_.forwardRef(({className:e,...n},i)=>l.jsx(Wk,{ref:i,className:Pa("text-sm text-muted",e),...n}));Tm.displayName=Wk.displayName;function Kd({title:e,subtitle:n,children:i,open:r,onClose:u}){return l.jsx(t0,{open:r,onOpenChange:h=>h?void 0:u(),children:l.jsxs(Cm,{children:[l.jsxs(n0,{className:"drawer-head",children:[l.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),l.jsx(_m,{id:"drawer-title",children:e}),l.jsx(Tm,{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&&l6.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 gJ(e){const n=(e??"").trim();return n&&(n.startsWith("/")||/^https?:\/\//i.test(n)||/^mailto:/i.test(n))?n:null}function a0({url:e,title:n}){const i=gJ(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 yJ(e){return[...e.mentionedCompetitorTerms??(e.mentionedCompetitorDomains??[]).flatMap(i=>{const r=D0(i);return r.length>=4?[r]:[]}),...e.recommendedCompetitors??[]].filter(i=>i.trim().length>2)}const bJ=/[\s\-_]+/;function vJ(e){const n=e.split(bJ).filter(Boolean);return n.length===0?null:n.map(kV).join("[\\s\\-_]*")}function hk(e,n){const i=xJ(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"?Or.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(vJ).filter(x=>!!x);if(f.length===0)return r.map((x,S)=>x.type==="bold"?Or.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 M=v.get(za(C))??"answer-highlight";return x.type==="bold"?Or.createElement("mark",{key:`hl-${S}-${T}`,className:M},Or.createElement("strong",{className:"text-strong font-semibold"},C)):Or.createElement("mark",{key:`hl-${S}-${T}`,className:M},C)}return x.type==="bold"?Or.createElement("strong",{key:`b-${S}-${T}`,className:"text-strong font-semibold"},C):C})).filter(Boolean)}function xJ(e){return e.length===0?[]:typeof e[0]=="string"?[{terms:e,className:"answer-highlight"}]:e}function lg(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 cg(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 wJ({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,I]=_.useState({}),M=P3(n.project),R=new Set(M.map(Uc)),P=e.runHistory,q=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,Fg(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,...lg(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,...lg(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===Rc.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,$e=[...M.map(Uc),Ge,Ge.split(" ").slice(0,2).join(" "),...V.matchedTerms].filter(pe=>pe.trim().length>2),ke=yJ(V),Le=[{terms:$e,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),xe=_.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 Fg(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,...lg(Ee),recommendedCompetitors:Ee.recommendedCompetitors??[],matchedTerms:Ee.matchedTerms??[],groundingSources:Ee.groundingSources,searchQueries:Ee.searchQueries,evidenceUrls:Ee.citedUrls??[],changeLabel:cg(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:cg(ue.mentionTransition??ue.visibilityTransition,ue.mentionState??ue.visibilityState),summary:"Snapshot data not available for this run."};I(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:cg(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(" · "):"",qe=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},we=()=>{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:hk(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:hk(Ne,Le)},_e++));continue}if(Ct===""){Ze();continue}ue.push(Ct)}return Ze(),ce};return l.jsx(ej,{open:!0,onOpenChange:pe=>{pe||i()},children:l.jsxs(Xk,{children:[l.jsx(h0,{className:"fixed inset-0 z-50 bg-overlay-scrim/80 backdrop-blur-sm"}),l.jsxs(f0,{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(g0,{className:"text-lg font-semibold text-primary truncate",children:e.query})]}),l.jsxs(Jk,{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(el,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Close"})]})]}),q&&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:()=>{xe(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:()=>{xe(-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:qe.label}),l.jsx("p",{className:`evidence-position-title evidence-position-title--${B}`,children:qe.title}),l.jsx("p",{className:"evidence-position-meta",children:qe.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:we()}),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(y0,{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:$e.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(a0,{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(a0,{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 SJ(e){const n=e.match(/^\/projects\/([^/]+)/);if(!n)return null;try{return decodeURIComponent(n[1])}catch{return n[1]}}function kJ(e,n){return e?n?.projects.find(r=>r.project.name===e||r.project.id===e)?.project.name??e:null}function jJ(e,n){return kJ(SJ(e),n)}function Ga(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 ug=[{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:Of,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:Of,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:Of,locations:[],defaultLocation:null,autoExtractBacklinks:!1,siteAuditMaxPages:null,configSource:"cli",configRevision:1}];function pp(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 fk=pp({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"}),AJ=pp({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"}),gk=pp({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"}),NJ=pp({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"}),CJ=[{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:Ga(["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:Ga(["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:Ga(["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:Ga(["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:Ga(["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:Ga(["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:Ga(["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:Ga(["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:Ga(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}];ug[0],9/21,8/21,4/21,ug[1],11/17,6/17,Ga(["cited","cited","cited","cited","cited"]),ug[2],15/19,4/19,Ga(["not-cited","not-cited","not-cited","cited"]);function _J(e,n){return e.runs.find(i=>i.id===n)}function TJ(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 EJ(e,n,i){if(e){const r=e.visibilityEvidence.find(u=>u.id===i);if(r)return{project:e,evidence:r}}if(n)return TJ(n,i)}const RJ={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"},DJ={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"},IJ={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"},zJ={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},OJ={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 PJ(e){return{id:e.id,tone:RJ[e.type],title:e.title,detail:e.cause?.details??e.cause?.cause??"",actionLabel:e.recommendation?.action??OJ[e.type],actionGroup:DJ[e.type],affectedPhrases:[{query:e.query,evidenceId:"",provider:e.provider,citationState:IJ[e.type],siteCitation:zJ[e.type]}]}}function MJ(e){return e.filter(n=>!n.dismissed).map(PJ)}function R4(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 So(e,n){return`${e} ${n}${e===1?"":"s"}`}function qJ(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?`${So(u,"hour")} ${So(h,"minute")}`:So(u,"hour"):h>0?f>0?`${So(h,"minute")} ${So(f,"second")}`:So(h,"minute"):So(f,"second")}function D4(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 BJ(e){switch(e){case Ha.manual:return"Manual";case Ha.scheduled:return"Scheduled";case Ha["config-apply"]:return"Config apply";case Ha.probe:return"Spot check";default:return e}}function yu(e,n){return{id:e.id,projectId:e.projectId,projectName:n,kind:e.kind,kindLabel:D4(e.kind),status:e.status,trigger:e.trigger??"manual",location:e.location??null,createdAt:e.createdAt,startedAt:rZ(e.startedAt||e.createdAt),duration:qJ(e.startedAt??null,e.finishedAt??null),statusDetail:e.error?I4(e.error):LJ(e),summary:UJ(e),triggerLabel:BJ(e.trigger)}}function I4(e){const n=Z0(e);return n.length>200?n.slice(0,200)+"…":n}function LJ(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?I4(e.error):"Run failed.";case Nt.cancelled:return"Run was cancelled.";default:return""}}function UJ(e){const n=D4(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 VJ(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(),I=T.length>0?T:["gemini"],M=new Set(v.flatMap(R=>R.query?[R.query]:[]));for(const R of n){if(R.runs.length===0&&!M.has(R.query))continue;b.add(R.query);const P=R.runs.at(-1),q=P?.transition??"not-cited";for(const L of I){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],$e=tt?R.modelRuns?.[tt]:void 0,ke=Ht=>Ht?.filter(Ke=>(Ke.location??null)===V),Le=$.length>0?ke(Ge):Ge,B=$.length>0?ke($e):$e,W=(Le?.length?Le:null)??(B?.length?B:null),xe=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,qe=se?se.at(-1).transition:Se?X.citationState===Rc.cited?"cited":"not-cited":q,we=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?qe==="lost"?"lost":qe==="emerging"?"emerging":X.citationState===Rc.cited?"cited":"not-cited":pe===Rc.cited?"cited":"not-cited",_e=X?.visibilityState??(ce==="visible"?"visible":ce==="pending"?"pending":"not-visible"),Ze=se?yk(se):Se?1:yk(R.runs),Ee=se?bk(se):Se?1:bk(R.runs),Ct=$J(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=KJ(me),Ne=xe==="provider"&&Be.length<=1?"model":xe,re=GJ(me),Ye=X?.citedCompetitorDomains??[],vt=X?.mentionedCompetitorDomains??[],qn=[...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:vk(we,Ee,{positive:"visible",negative:"not visible",first:"first visibility"}),changeLabel:vk(qe,Ze),answerSnippet:X?.answerText??"",citedDomains:X?.citedDomains??[],evidenceUrls:X?.citedUrls??[],citedCompetitorDomains:Ye,mentionedCompetitorDomains:vt,mentionedCompetitorTerms:X?.mentionedCompetitorTerms??[],competitorDomains:qn,recommendedCompetitors:X?.recommendedCompetitors??[],matchedTerms:X?.matchedTerms??[],relatedTechnicalSignals:[],groundingSources:X?.groundingSources??[],searchQueries:X?.searchQueries??[],summary:HJ(_e,we,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 $J(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 KJ(e){const n=new Set;for(const i of e)i.model&&n.add(i.model);return[...n]}function GJ(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 yk(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 bk(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 vk(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?`${Nc(r.positive)} in latest run`:`${Nc(r.positive)} for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return Nc(r.first);case"not-cited":case"not-visible":return n<=1?`${Nc(r.negative)} in latest run`:`${Nc(r.negative)} across ${n} runs`;default:return e}}function Nc(e){return e.charAt(0).toUpperCase()+e.slice(1)}function HJ(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 z4(e){const n=R4(e.project),i=lP(uB(e.project)),r=VJ(n.name,e.timeline,e.latestRunDetails,e.queries,i),h=[...e.runs].sort((f,b)=>b.createdAt.localeCompare(f.createdAt)).map(f=>yu(f,e.project.displayName||e.project.name));return e.overview?FJ(n,e.overview,r,h):QJ(n,r,h)}function O4(e){return e.filter(n=>n.kind===Oe["answer-visibility"]&&n.trigger!==Ha.probe&&(n.status===Nt.completed||n.status===Nt.partial))}function FJ(e,n,i,r){const u=MJ(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:O4(r),suggestedQueries:n.suggestedQueries}}function xk(){return{projectMentionSnapshots:0,competitorMentionSnapshots:0,combinedMentionSnapshots:0,perCompetitor:[],ranking:[],snapshotsWithAnswerText:0,snapshotsTotal:0,score:null}}function QJ(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:xk(),branded:xk()},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:O4(i),suggestedQueries:{rows:[],totalCandidates:0,skippedAlreadyTracked:0}}}function ZJ(e){const n=R4(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?yu(r,u):YJ(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 YJ(e,n){return{id:"none",projectId:e,projectName:n,kind:Oe["answer-visibility"],kindLabel:"No runs yet",status:Nt.queued,trigger:Ha.manual,createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""}}function XJ(e,n){const i=[],r=[],u=[];for(const f of e){r.push(z4(f)),u.push(ZJ(f));const b=[...f.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt));for(const v of b)i.push(yu(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?JJ(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 JJ(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 P4=_.createContext(null);P4.Provider;function bu(){return _.useContext(P4)}function hp(e,n={}){const r=bu()?.dashboard??null,u=n.includeSettings??!0,h=n.includeOverviews??!0,f=n.pauseProjectPolling??!1,{isAdmin:b}=ga(),v=!r&&h&&!cp(),x=yt({...Qc({client:J,query:{kind:"answer-visibility"}}),enabled:!r,staleTime:Rs,refetchInterval:Q=>Q.state.data?.some(Z=>Z.status==="running"||Z.status==="queued")?3e3:Rs}),S=yt({...Qc({client:J,query:{excludeKinds:[Oe["bing-inspect"],Oe["traffic-sync"]],limit:5}}),enabled:v,staleTime:Rs,refetchInterval:Q=>Q.state.data?.some(ae=>ae.status===Nt.running||ae.status===Nt.queued)?3e3:Rs}),j=yt({...Qo({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?YQ:XQ}}),C=yt({...KZ({client:J}),enabled:!r&&u&&b}),T=j.data??[],I=x.data??[],M=c6({queries:T.map(Q=>{const ae=I.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 JC(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:em}})}),R=!h||M.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?M.map(Z=>{if(!Z.data)return null;const X=Q.get(Z.data.project.id);return X?{...Z.data,project:X,runs:I.filter(Ce=>Ce.projectId===X.id)}:null}).filter(Z=>Z!=null):T.map((Z,X)=>{const Ce=M[X]?.data;return{project:Z,runs:I.filter(tt=>tt.projectId===Z.id),queries:[],competitors:[],timeline:[],latestRunDetails:[],previousRunDetails:[],gscCoverage:null,bingCoverage:null,dbInsights:null,overview:Ce?.overview??null}}),V=XJ(ae,C.data??null);return v&&(V.portfolioOverview.recentRuns=(S.data??[]).filter(Z=>Z.trigger!==Ha.probe&&Q.has(Z.projectId)).map(Z=>{const X=Q.get(Z.projectId);return yu(Z,X.displayName||X.name)})),V},[r,j.data,x.data,C.data,h,R,M,T,I,v,S.data]),q=!r&&(j.isError||x.isError),L=!r&&!P&&!q,$=_.useCallback(async()=>{const Q=[j.refetch(),x.refetch(),...v?[S.refetch()]:[],...h?M.map(ae=>ae.refetch()):[]];u&&b&&Q.push(C.refetch()),await Promise.all(Q)},[u,b,h,v,S.refetch,M,j.refetch,x.refetch,C.refetch]);return{dashboard:P,isLoading:L,isError:q,activityLoading:v&&S.isPending,activityError:v&&S.isError,refetch:$}}function WJ(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 i0(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 jre(e,n,i){const r=Ps(),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)&&i0(r,e)},[i,e,r,n])}const eW=20;function tW(e,n={}){const i=Ps(),r=bu(),u=_.useMemo(()=>!r||!e?null:r.dashboard.projects.find(Q=>Q.project.name===e)??null,[r,e]),h=yt({...xZ({client:J,path:{name:e??""}}),enabled:!!e&&!u,staleTime:em,refetchOnWindowFocus:"always"}),f=yt({...r4({client:J,path:{name:e??""},query:{kind:"answer-visibility"}}),enabled:!!e,staleTime:Rs,refetchOnWindowFocus:"always",refetchInterval:Q=>Q.state.data?.some(Z=>Z.projectId===h.data?.id&&(Z.status==="running"||Z.status==="queued"))?3e3:Rs}),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 JC(e)}),enabled:C&&n.overview===!0,staleTime:em,refetchOnWindowFocus:"always"}),I=yt({queryKey:["project-dashboard-full",b?.id??null,S||"none","evidence"],queryFn:async()=>{const[Q,ae,V]=await Promise.all([XC(e),lQ(e,void 0,eW),Promise.all(x.map(Z=>Fg(Z)))]);return{project:b,queries:Q,timeline:ae,latestRunDetails:V}},enabled:C&&n.evidence===!0,staleTime:em,refetchOnWindowFocus:"always"}),M=_.useMemo(()=>{if(!b||!f.data)return u;const Q=n.evidence?I.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=z4(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,I.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,q=!u&&(h.isLoading||f.isLoading),L=!!e&&n.overview===!0&&!u&&!P&&T.isPending,$=!!e&&n.evidence===!0&&!u&&!P&&I.isPending;return{commandCenter:M,project:b,isLoading:q,isError:P,overviewLoading:L,overviewError:n.overview===!0&&T.isError&&!T.data,evidenceLoading:$,evidenceError:n.evidence===!0&&I.isError&&!I.data,latestVisibilityRevision:j,competitorHistoryRevision:WJ(v),refetch:R}}const nW=["health"];async function aW(){const e=await CQ("/health","API"),n=Eo()&&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 py(e,n){return yt({queryKey:nW,queryFn:aW,enabled:e,refetchInterval:15e3,initialData:n})}function iW(e){return yt({...ly({client:J,path:{id:e??""}}),enabled:!!e,refetchInterval:n=>{const i=n.state.data?.status;return i==="running"||i==="queued"?3e3:!1}})}function hy(){const e=Ms(),n=Zk({strict:!1}),i=u6({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 sW={negative:"toast-card-negative",caution:"toast-card-caution",positive:"toast-card-positive",neutral:"toast-card-neutral"};function oW(e){if(e.cta)return`${e.cta.label}: ${e.title}`}function rW(){const e=_.useSyncExternalStore(HQ,JS,JS),n=Ms(),{openRun:i}=hy(),r=_.useCallback(h=>{Xg(h)},[]),u=_.useCallback(h=>{h.cta&&(h.cta.intent==="open-run-drawer"?i(h.cta.runId):n({to:"/runs"}),Xg(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 ${sW[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":oW(h),children:h.cta.label}):null]}),l.jsx("button",{type:"button",onClick:()=>r(h.id),className:"toast-dismiss","aria-label":"Dismiss",children:l.jsx(el,{className:"size-3.5"})})]},h.id))})}const lW="https://github.com/Canonry/canonry",cW="https://canonry.ai",wk="Run it from your agent with the MCP server, API, CLI, and plugins for Claude Code and Codex.",uW=[{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 dW(){const e=_.useId();if(!Eo())return null;const n=up(),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:wk}),l.jsxs("div",{className:"demo-banner-actions",children:[l.jsxs("a",{className:"demo-banner-primary",href:cW,...r,children:["canonry.ai",l.jsx(nj,{"aria-hidden":"true",size:14})]}),l.jsxs("a",{className:"demo-banner-secondary",href:lW,...r,children:[l.jsx(aj,{"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(Xc,{"aria-hidden":"true",size:14})]}),l.jsxs("div",{className:"demo-banner-panel",children:[l.jsx("p",{className:"demo-banner-panel-agent",children:wk}),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:uW.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 Oc(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 Sk(e){return e==="running"?"Running":e==="queued"?"Queued":e==="partial"?"Partial":e==="completed"?"Completed":e==="failed"?"Failed":e==="cancelled"?"Cancelled":"Starting"}function mW(){const e=_.useSyncExternalStore(p4,Qi,Qi),n=_.useMemo(()=>Object.values(e.runs),[e.runs]),i=n.length>0,r=yt({...Qc({client:J}),enabled:i,staleTime:Rs}),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?Oc(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=>`${Oc(b.kind)} ${Sk(b.status)}`).join(". "),"."]}),l.jsxs("details",{className:"task-center-details",children:[l.jsxs("summary",{className:"task-center-trigger",children:[l.jsx(Ds,{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(Xc,{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:Oc(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:Sk(b.status)})]},b.runId))}),l.jsx(at,{to:"/runs",className:"task-center-footer-link",children:"View all runs"})]})]})]})}const fy={queryClass:"all"},pW=["all","non-brand","branded"];function M4(e){return typeof e=="string"&&pW.includes(e)}function hW(e){const n=M4(e.class)?e.class:fy.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 Are(e,n){return n===null||e===null?!1:e!==n}function Nre(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===fy.queryClass?void 0:e.queryClass}}function fW(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 gW(e){const n=x=>typeof e[x]=="string"&&e[x]!==""?e[x]:void 0,i=hW({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"||M4(h)?h:fy.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=fW(e.measurementAnswer,f.queryKey);return v&&(f.answer=v),f}function yW(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 Cre(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 _re(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}function bW(e,n){const i=/\/properties\/([^/]+)/.exec(e),r=gW(n);if(i)return{view:"property",selection:pm.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=pm.safeParse(yW(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 vW(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 s0="Sweeps are run by your Canonry team",xW="Scans are run by your Canonry team",kk="Next sweep unavailable",wW="Sweep running…",SW="Next sweep:";function kW(e,n){try{return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",timeZone:n??"UTC"}).format(new Date(e))}catch{return null}}function jW({projectName:e,kind:n=Oe["answer-visibility"],running:i=!1,loadSchedule:r=!0}){const u=n===Oe["site-audit"],h=yt({...HZ({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"}):kW(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"]}):xW]}):i?wW:j?kk:v&&b?l.jsxs(l.Fragment,{children:[SW," ",l.jsx("time",{dateTime:b.toISOString(),children:v})]}):kk})}const AW=300,NW=400,CW=900,_W=32,jk=28;let TW=0;function EW(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function o0(){return new DOMException("Preview stopped","AbortError")}function RW(e,n){return n?.aborted?Promise.reject(o0()):new Promise((i,r)=>{const u=()=>{clearTimeout(h),r(o0())},h=setTimeout(()=>{n?.removeEventListener("abort",u),i()},e);n?.addEventListener("abort",u,{once:!0})})}function DW(e){const n=e.match(/\S+\s*|\s+/g)??[];if(n.length<2)return[];const i=Math.ceil(n.length/_W),r=[];for(let u=i;u<n.length;u+=i)r.push(n.slice(0,u).join(""));return r}function IW(e){return typeof e=="string"?e:JSON.stringify(e??null)}async function zW({starter:e,signal:n,onEvent:i,reducedMotion:r=!1}){const u=async b=>{if(n?.aborted)throw o0();r||await RW(b,n)},h=Date.now(),f=++TW;await u(AW);for(const[b,v]of e.steps.entries()){const{name:x,label:S,arguments:j,result:C,durationMs:T}=v.tool,I=`preview-${e.id}-${f}-${b}`,M={role:"assistant",timestamp:Date.now(),stopReason:"toolUse",content:[...v.text?[{type:"text",text:v.text}]:[],{type:"toolCall",id:I,name:x,arguments:j}]};i({type:"message_end",message:M}),i({type:"tool_execution_start",toolCallId:I,toolName:x,label:S,args:j}),await u(Math.min(CW,Math.max(NW,T))),i({type:"tool_execution_end",toolCallId:I,toolName:x,result:C,isError:!1});const R={role:"toolResult",toolCallId:I,timestamp:Date.now(),isError:!1,aeroToolLabel:S,aeroDurationMs:T,content:[{type:"text",text:IW(C)}]};i({type:"message_end",message:R})}if(!r){for(const b of DW(e.answer))await u(jk),i({type:"message_update",message:{role:"assistant",content:[{type:"text",text:b}]},assistantMessageEvent:{}});await u(jk)}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 fp(e){try{return await e.json()}catch{return{}}}function OW(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath.replace(/\/$/,"")+"/api/v1":"/api/v1"}const gp=OW();function yp(e){e===401&&iy()}async function dg(e){const n=await fetch(`${gp}/projects/${encodeURIComponent(e)}/agent/transcript`,{credentials:"include"});if(!n.ok){yp(n.status);const i=await fp(n);throw new yn(i.error?.message??`transcript fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function PW(e){const n=await fetch(`${gp}/projects/${encodeURIComponent(e)}/agent/preview`,{credentials:"include"});if(!n.ok){yp(n.status);const i=await fp(n);throw new yn(i.error?.message??`preview fetch failed: ${n.status}`,n.status,i.error?.code)}return await n.json()}async function MW(e){const n=await fetch(`${gp}/projects/${encodeURIComponent(e)}/agent/transcript`,{method:"DELETE",credentials:"include"});if(!n.ok){yp(n.status);const i=await fp(n);throw new yn(i.error?.message??`reset failed: ${n.status}`,n.status,i.error?.code)}}async function qW({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(`${gp}/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){yp(C.status),jm({method:"POST",route:"/api/v1/projects/{name}/agent/prompt",status:C.status});const q=await fp(C);throw new yn(q.error?.message??`prompt failed: ${C.status}`,C.status,q.error?.code)}Fo("aero.send");let T=!1;const I=C.body.getReader(),M=new TextDecoder;let R="";const P=()=>{I.cancel().catch(()=>{})};x?.addEventListener("abort",P,{once:!0}),x?.aborted&&P();try{for(;;){const{value:q,done:L}=await I.read();if(L)break;R+=M.decode(q,{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{I.releaseLock()}catch{}}}function tm(e){return!e||e.role!=="assistant"?"":e.content.filter(n=>n.type==="text").map(n=>n.text).join("")}const r0=[{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."}],BW="https://canonry.ai",LW="This demo plays sample answers only. Pick a starting point, or type / to choose one.",UW="Stopped. The sample answer so far is kept.";function Ak(e){return{queryKey:["aero-preview",e],queryFn:()=>PW(e),staleTime:1/0,gcTime:1/0}}const Nk=[{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"}],Gd=e=>`canonry:aero:provider:${e}`,VW=e=>`canonry:aero:scope:${e}`;function Ck(e){if(typeof window>"u")return null;try{return window.localStorage.getItem(e)}catch{return null}}function $W(e,n){if(!(typeof window>"u"))try{window.localStorage.setItem(e,n)}catch{}}function _k(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}function KW({projectName:e,context:n,preview:i=ay()}){const r=ko(),{canWrite:u,account:h}=ga(),f=Ps(),b=h?.role==="viewer",[v,x]=_.useState(!1),[S,j]=_.useState(!1),[C,T]=_.useState([]),[I,M]=_.useState(void 0),R=_.useRef(!1),[P,q]=_.useState(!1),[L,$]=_.useState(!1),[Q,ae]=_.useState(null),[V,Z]=_.useState(!1),[X,Ce]=_.useState(!1),[tt,Ge]=_.useState(null),$e=_.useRef(!1),[ke,Le]=_.useState(""),[B,W]=_.useState(!1),[xe,Ae]=_.useState([]),[se,Se]=_.useState(""),[qe,we]=_.useState(null),[pe,ce]=_.useState(null),[ue,_e]=_.useState(null),Ze=_.useRef(!0),[Ee,Ct]=_.useState(()=>Ck(Gd(e))??null),me=r||b||i?null:Ee,[Be]=_.useState(()=>Ck(VW(e))==="all"?"all":"read-only"),Ne=r||b||i?"read-only":Be,re=_.useRef(null),Ye=_.useRef(null),vt=_.useRef(null),qn=_.useRef(null),{ref:Ht}=vW([C,se,xe]),Ke=_.useRef(null);_.useLayoutEffect(()=>{const oe=Ke.current;if(!oe)return;oe.style.height="auto";const Ie=S?FW:HW;oe.scrollHeight>0&&(oe.style.height=`${Math.min(oe.scrollHeight,Ie)}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 Ie=oe.toLowerCase();return Nk.filter(Je=>(!(r||b)||Je.command!=="/run-sweep")&&(!b||Je.action!=="new")&&(!i||r0.some(Ot=>Ot.prompt===Je.prompt))&&(Je.command.startsWith(Ie)||Je.label.toLowerCase().includes(Ie.slice(1))))},[ke,r,b,i]);_.useEffect(()=>{Ft(oe=>Qt.length===0?0:Math.min(oe,Qt.length-1))},[Qt.length]);const Rn=yt({...iX({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 Ie=Rn.data?.defaultProvider;return Ie?oe.find(Je=>Je.id===Ie)??null:null},[me,Rn.data]),fi=b||i||Vt!==null;yt({...Ak(e),enabled:i&&v}),_.useEffect(()=>{if(!Rn.data||!me)return;Rn.data.providers.find(Ie=>Ie.id===me&&Ie.configured)||(Ct(null),_k(Gd(e)))},[Rn.data,me,e]);const Fs=_.useCallback(oe=>{Ct(oe),oe?$W(Gd(e),oe):_k(Gd(e))},[e]);_.useEffect(()=>{if(!v)return;const oe=Ie=>{Ie.key==="Escape"&&(L?$(!1):S?j(!1):x(!1))};return window.addEventListener("keydown",oe),()=>window.removeEventListener("keydown",oe)},[v,S,L]);const gi=_.useRef(null);_.useEffect(()=>{v||(gi.current=null)},[v]),_.useEffect(()=>{if(!v||!fi||i)return;let oe=!1;gi.current!==e&&(gi.current=e,we(null));const Ie=()=>{oe||B||$e.current||dg(e).then(et=>{oe||$e.current||(Ce(et.isStreaming??!1),M(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||we(Ui(et))})};Ie();const Ot=window.setInterval(Ie,15e3);return()=>{oe=!0,window.clearInterval(Ot)}},[v,e,B,fi,V,i]),_.useEffect(()=>(Ze.current=!0,()=>{Ze.current=!1,qn.current?.abort()}),[e]);async function Dn(oe,Ie=n){const Je=oe.trim();if(!Je||L||B||V||$e.current||X||!fi)return;if(i){await Yo(Je);return}if(r&&/^\/run-sweep(?:\s|$)/i.test(Je)){we(s0);return}we(null),ce(null),_e({prompt:Je,context:Ie}),Le(""),W(!0),Se(""),vt.current=null,Ae([]),Ye.current={previous:re.current};const Ot={role:"user",content:Je,timestamp:Date.now(),aeroContext:Ie};T(kt=>[...kt,Ot]);const et=new AbortController;qn.current=et;try{await qW({project:e,prompt:Je,conversationId:I,provider:me??void 0,scope:Ne,context:Ie,signal:et.signal,onEvent:Qs});const kt=await dg(e);Ze.current&&!kt.isStreaming&&(M(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&&tm(rn).trim()&&T(bi=>[...bi,rn]),et.signal.aborted?ce("Stopped. Partial response preserved. An action already dispatched may still finish."):we(Ui(kt))}finally{Ze.current&&(W(!1),Se(""),Ae(kt=>kt.map(rn=>rn.endedAt===void 0?{...rn,interrupted:!0}:rn))),qn.current=null}}async function Yo(oe){const Ie=Nk.find(et=>et.command===oe.toLowerCase())?.prompt??oe,Je=r0.find(et=>et.prompt===Ie)?.id;if(!Je){we(null),_e(null),ce(LW);return}we(null),ce(null),_e({prompt:Ie}),Le(""),W(!0),Se(""),vt.current=null,Ae([]),T(et=>[...et,{role:"user",content:Ie,timestamp:Date.now()}]);const Ot=new AbortController;qn.current=Ot;try{const et=await f.ensureQueryData(Ak(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 zW({starter:kt,signal:Ot.signal,onEvent:Qs,reducedMotion:EW()})}catch(et){if(!Ze.current)return;const kt=vt.current;kt&&tm(kt).trim()&&T(rn=>[...rn,kt]),Ot.signal.aborted?ce(UW):we(Ui(et))}finally{Ze.current&&(W(!1),Se(""),Ae(et=>et.map(kt=>kt.endedAt===void 0?{...kt,interrupted:!0}:kt))),qn.current=null}}function Qs(oe){if(Ze.current)switch(oe.type){case"message_update":oe.message.role==="assistant"&&(vt.current=oe.message),Se(tm(oe.message));break;case"message_end":if(oe.message.role!=="user"){const Ie=oe.message;T(Je=>[...Je,Ie])}oe.message.role==="assistant"&&(vt.current=null,Se(""),oe.message.errorMessage&&we(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"&&we(Ie=>Ie??"Aero could not finish this answer. Retry to ask again.");break;case"tool_execution_start":Ae(Ie=>[...Ie,{id:oe.toolCallId,name:oe.toolName,label:oe.label,args:oe.args,startedAt:Date.now()}]);break;case"tool_execution_end":Ae(Ie=>Ie.map(Je=>Je.id===oe.toolCallId?{...Je,endedAt:Date.now(),isError:oe.isError,result:oe.result}:Je));break;case"error":we(oe.message);break}}async function Zs(oe,Ie=!1){if(!(B||X||$e.current)){$e.current=!0,Z(!0),we(null);try{await oe();const Je=await dg(e);if(!Ze.current)return;Ye.current=null,re.current=Je.updatedAt,M(Je.conversationId??null),T(Je.messages),Ae([]),Se(""),ce(null),_e(null),Ge(null),$(Ie),ae(Ie?await YS(e):null),Ke.current?.focus()}catch(Je){Ze.current&&we(Ui(Je))}finally{$e.current=!1,Ze.current&&Z(!1)}}}async function yi(){if(i){if(B)return;T([]),Ae([]),Se(""),we(null),ce(null),_e(null),Ke.current?.focus();return}await Zs(()=>b?MW(e):_Q(e,crypto.randomUUID()))}async function xn(oe=!1){if(!($e.current||R.current)){R.current=!0,q(!0),$(!0),we(null);try{const Ie=await YS(e,{offset:oe?Q?.nextOffset??0:0});Ze.current&&ae(Je=>oe&&Je?{...Ie,conversations:[...Je.conversations,...Ie.conversations]}:Ie)}catch(Ie){Ze.current&&we(Ui(Ie))}finally{R.current=!1,Ze.current&&q(!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(Cd,{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(Cd,{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 ${q4(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 Ys=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:Ys,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(Cd,{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(GW,{providers:Rn.data?.providers??[],active:Vt,override:me,onPick:Fs,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(g6,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.jsx(y6,{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(el,{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(yi),title:b||i?"Clear this conversation and start fresh.":"Save this conversation and start fresh. Shared project notes are kept.",children:[l.jsx(gg,{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(ij,{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):Zs(()=>TQ(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:()=>{Zs(async()=>{await EQ(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(Tk,{onPick:oe=>{Dn(oe)}})]}),XW(C,e,me,Ne,xe,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(U4,{content:se})]}),B&&!se&&xe.every(oe=>oe.endedAt!==void 0)&&l.jsx(ree,{}),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(Tk,{onPick:oe=>{Dn(oe)}})]})]}),(qe||pe)&&l.jsxs("div",{role:qe?"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:qe??pe}),ue&&!B&&l.jsx(le,{variant:"outline",size:"sm",onClick:()=>{Ne==="all"?(Le(ue.prompt),Ke.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:BW,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(nj,{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(ZW,{title:i?"Starting points":"Commands",matches:Qt,selectedIndex:ct,onHover:Ft,onPick:oe=>{Le(""),Ke.current?.focus(),oe.action==="new"?yi():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 Ie=Qt[ct];Le(""),Ie.action==="new"?yi():Dn(Ie.prompt);return}Dn(ke)},children:[l.jsx("textarea",{ref:Ke,value:ke,onChange:oe=>Le(oe.target.value),onKeyDown:oe=>{if(Qt.length>0){if(oe.key==="ArrowDown"){oe.preventDefault(),Ft(Ie=>(Ie+1)%Qt.length);return}if(oe.key==="ArrowUp"){oe.preventDefault(),Ft(Ie=>(Ie-1+Qt.length)%Qt.length);return}if(oe.key==="Tab"){oe.preventDefault();const Ie=Qt[ct];Le(`${Ie.command} `);return}if(oe.key==="Escape"){oe.preventDefault(),Le("");return}}if(oe.key==="Enter"&&!oe.shiftKey)if(oe.preventDefault(),Qt.length>0){const Ie=Qt[ct];Le(""),Ie.action==="new"?yi():Dn(Ie.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:()=>qn.current?.abort(),"aria-label":"Stop Aero",children:[l.jsx(sj,{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(b6,{className:"h-4 w-4","aria-hidden":"true"})})]})]})]}):l.jsx("button",{type:"button",onClick:()=>{x(!0),Fo("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(Cd,{className:"h-4 w-4 text-positive-400","aria-hidden":"true"}),"Ask Aero about ",e,"…"]})})})})}function GW({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(Xc,{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 ${q4(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(Jc,{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 HW=144,FW=288,mg=288,QW=8;function ZW({title:e,matches:n,selectedIndex:i,onHover:r,onPick:u}){const h=_.useRef(null),f=_.useRef(null),b=_.useRef(null),[v,x]=_.useState(mg);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-QW*2-(f.current?.getBoundingClientRect().height??0);x(T>0?Math.min(mg,Math.floor(T)):mg)},[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 Tk({onPick:e}){return l.jsx("div",{className:"flex flex-wrap gap-1.5",children:r0.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 q4(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 YW(e,n){const i=e.timestamp??0;return`${e.role}:${i}:${n}`}function XW(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(see,{trails:x,betweenSteps:C&&h&&!f},`tools:${x[0].id}`)),x=[])};for(let C=0;C<e.length;C++){const T=e[C],I=YW(T,C);if(T.role==="user"){j();const M=typeof T.content=="string"?T.content:JSON.stringify(T.content);if(M.startsWith("[system]"))continue;v.push(l.jsx(JW,{text:M,projectName:n,providerOverride:i,scope:r,context:T.aeroContext,cliCopy:b},I));continue}if(T.role==="assistant"){const M=new Map;let R=C+1;for(;R<e.length&&e[R].role==="toolResult";){const $=e[R];M.set($.toolCallId,$),R++}const P=h&&C>=S,q=eee(T,M).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=tm(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(U4,{content:L})]},I))),x.push(...q),C=R-1;continue}}return j(!0),v}function JW({text:e,projectName:n,providerOverride:i,scope:r,context:u,cliCopy:h=!0}){const[f,b]=_.useState(!1),v=_.useMemo(()=>WW(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(Jc,{className:"h-2.5 w-2.5 text-positive-400","aria-hidden":"true"}),"Copied"]}):l.jsxs(l.Fragment,{children:[l.jsx(b0,{className:"h-2.5 w-2.5","aria-hidden":"true"}),"Copy as CLI"]})})]}),l.jsx("div",{className:"whitespace-pre-wrap",children:e})]})}function WW(e,n,i,r,u){const h=["canonry","agent","ask",ng(e),ng(n)];return i&&h.push("--provider",i),r==="read-only"&&h.push("--scope","read-only"),u&&h.push("--context",ng(JSON.stringify(u))),h.join(" ")}function eee(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 Ek=new Set(["aero_list_toolkits","aero_load_toolkit"]),tee=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 Kr(e){return e.endedAt===void 0&&!e.interrupted}function l0(e){return e.label??e.name.replace(/^(?:canonry|aero)_/,"").replace(/_/g," ")}function B4(e){const n=e.durationMs??(e.endedAt!=null&&e.startedAt!=null?e.endedAt-e.startedAt:null);return n==null||n<0?null:n}function L4(e){let n=null;for(const i of e){const r=B4(i);r!=null&&(n=(n??0)+r)}return n}function gy(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function nee(e){const n=Math.floor(Math.max(0,e)/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}function pg(e,n,i){return`${e} ${e===1?n:i}`}function Rk(e=""){return tee.get(e.charAt(0).toUpperCase()+e.slice(1))}function aee(e){const[n,...i]=e.trim().split(/\s+/),r=Rk(n);if(!r)return"Working…";if(i[0]==="or"||i[0]==="and"){const u=Rk(i[1]);return u?`${[r,i[0],u.toLowerCase(),...i.slice(2)].join(" ")}…`:"Working…"}return`${[r,...i].join(" ")}…`}function iee(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 see({trails:e,betweenSteps:n}){const[i,r]=_.useState(!1),u=_.useId(),h=e.filter($=>!Ek.has($.name)),f=e.filter($=>Ek.has($.name)),b=h.filter(Kr),v=b.length>0?b[b.length-1]:void 0,x=f.some(Kr),S=v!==void 0||x||n,j=h.length>0?h:f,C=j.filter($=>!Kr($)&&$.isError===!0).length,T=e.some($=>$.interrupted),I=e.flatMap($=>$.startedAt===void 0?[]:[$.startedAt]),M=I.length>0?Math.min(...I):void 0,R=iee(S),P=L4(j),q=S?v?aee(l0(v)):x?"Loading tools…":"Working…":h.length>0?pg(h.length,"step","steps"):pg(f.length,"setup step","setup steps"),L=new Map;for(const $ of h){const Q=l0($),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(Ds,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):C>0?l.jsx(Dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):T?l.jsx(sj,{className:"h-3 w-3 text-muted","aria-hidden":"true"}):l.jsx(Jc,{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:q}),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]}),M!==void 0&&l.jsx("span",{className:"tabular-nums","aria-hidden":"true",children:nee(R-M)})]}):P!=null&&l.jsx("span",{className:"tabular-nums",children:gy(P)}),l.jsx(Wc,{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(Dk,{trails:Q,title:$},`label:${$}`)),f.length>0&&l.jsx(Dk,{trails:f,title:`+ ${pg(f.length,"setup step","setup steps")}`,muted:!0},"setup")]})]})}function Dk({trails:e,title:n,muted:i=!1}){const[r,u]=_.useState(!1),h=_.useId(),f=!i&&e.length===1,b=e.some(Kr),v=e.filter(C=>!Kr(C)&&C.isError===!0).length,x=e.some(C=>C.interrupted),S=L4(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(Ds,{className:"h-3 w-3 animate-spin text-positive-400 motion-reduce:animate-none","aria-hidden":"true"}):v>0?l.jsx(Dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(oj,{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:gy(S)})]}),l.jsx(Wc,{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(oee,{trail:C},C.id))})]})}function oee({trail:e}){const[n,i]=_.useState(!1),r=Kr(e),u=!r&&e.isError===!0,h=B4(e),f=h==null?null:gy(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(Ds,{className:"h-3 w-3 animate-spin text-positive-400","aria-hidden":"true"}):u?l.jsx(Dm,{className:"h-3 w-3 text-negative-400","aria-hidden":"true"}):l.jsx(oj,{className:"h-3 w-3 text-muted","aria-hidden":"true"})}),l.jsx("span",{className:"text-sm font-medium text-heading",children:l0(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(Wc,{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:Ik(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:Ik(e.result)})]})]})]})}function Ik(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 U4({content:e}){return l.jsx("div",{className:"text-heading",children:l.jsx(z6,{remarkPlugins:[O6],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 ree(){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 V4({isAdmin:e,account:n}){return e||n?.role==="viewer"&&QF()}function lee(){const{isAdmin:e,account:n}=ga(),i=Yk(),r=/^\/projects\/([^/]+)/.exec(i.pathname),u=r?decodeURIComponent(r[1]):null,h=yt({...Qo({client:J}),enabled:u!==null,staleTime:6e4}),f=bW(i.pathname,i.search),b=h.data??[],v=b.find(C=>C.id===u)??b.find(C=>C.name===u),x=nZ(v?.name??u??"",f),S=ay(),j=S||V4({isAdmin:e,account:n});return!u||!j||!v?null:l.jsx(KW,{projectName:v.name,context:x,preview:S},v.name)}function zk(e,n,i){switch(e.invalidateQueries({queryKey:l4({client:J})}),e.invalidateQueries({queryKey:Jr({client:J})}),Pn(e,"runs"),n){case Oe["answer-visibility"]:i0(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"]:i0(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 Ok=[{label:"GitHub",href:"https://github.com/Canonry/canonry",Icon:aj},{label:"Docs",href:"https://github.com/Canonry/canonry/tree/main/docs",Icon:N6},{label:"Changelog",href:"https://github.com/Canonry/canonry/releases",Icon:C6}],Pk=e=>({label:e,state:"checking",detail:"Checking service health"}),cee={apiStatus:Pk("API"),workerStatus:Pk("Worker")};function uee(e){return e==="completed"?"positive":e==="partial"?"caution":"negative"}function dee(e){const n=Oc(e.kind);return e.status==="completed"?`${n} completed`:e.status==="partial"?`${n} completed with partial results`:e.status==="cancelled"?`${n} cancelled`:`${n} failed`}function mee(e,n){return e.error?`${n}: ${Z0(e.error)}`:e.location?`${n} · ${e.location}`:n}function Mk(e,n,i){if(n)return n;const r=i.find(u=>u.id===e);return r?.displayName||r?.name||e}function pee(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 hee(e){return e.failed>0||e.cancelled>0?"negative":e.partial>0?"caution":"positive"}function fee(){const e=Ps(),n=_.useSyncExternalStore(p4,Qi,Qi),i=Object.keys(n.runs).length>0||Object.keys(n.batches).length>0,r=yt({...Qc({client:J}),enabled:i,staleTime:Rs,refetchInterval:3e3}),u=yt({...Qo({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||!fX(C.status)||(h.current[C.id]??j.lastAnnouncedStatus)===C.status)continue;const I=v.find(R=>R.id===C.projectId);if(I&&zk(e,C.kind,I.name),j.sourceAction==="run-all"){og(C.id);continue}const M=Mk(C.projectId,j.projectLabel,v);vn({title:dee(C),detail:mee(C,M),tone:uee(C.status),dedupeKey:`run:${C.id}`,dedupeMode:"replace",cta:{label:"View run",intent:"open-run-drawer",runId:C.id}}),og(C.id)}if(r.data!==void 0){const j=new Set(b.map(T=>T.id)),C=yX(Object.values(n.runs),j,Date.now(),gX);for(const T of C){const I=v.find(M=>M.id===T.projectId);I&&zk(e,T.kind,I.name),T.sourceAction!=="run-all"&&vn({title:`${Oc(T.kind)} status unavailable`,detail:Mk(T.projectId,T.projectLabel,v),tone:"neutral",dedupeKey:`run-stale:${T.runId}`,dedupeMode:"replace"}),og(T.runId)}}for(const j of Object.values(n.batches)){const C=bX(j.runIds,x);C.finished&&(vn({title:"Run-all batch finished",detail:pee(C,j.skippedCount),tone:hee(C),dedupeKey:`batch:${j.batchId}`,dedupeMode:"replace",cta:{label:"View runs",intent:"go-to-runs"}}),hX(j.batchId))}h.current=S},[u.data,r.data,n,e]),null}function gee(){const{account:e,isAdmin:n}=ga(),i=bu(),r=_.useMemo(()=>QC(),[]),u=_.useMemo(HF,[]),h=_.useMemo(FF,[]),f=ay()||h&&V4({isAdmin:n,account:e}),b=_.useMemo(ZF,[]),v=Yk(),{dashboard:x,isLoading:S,refetch:j}=hp(void 0,{includeSettings:!r,includeOverviews:!1,pauseProjectPolling:v.pathname==="/setup"}),I=py(!i,i?.health).data??i?.health??cee,{runId:M,evidenceId:R,closeDrawer:P}=hy(),[q,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:I.apiStatus.version??"0.0.0",latest:Z,url:"https://www.npmjs.com/package/@canonry/canonry",upgradeCommand:"npm install -g @canonry/canonry"}:I.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)},$e=iW(M),ke=$e.data??null,Le=$e.isLoading;_.useEffect(()=>{ke&&ke.status!=="running"&&ke.status!=="queued"&&j()},[ke?.status,j]),_.useEffect(()=>{L(!1)},[v.pathname]),_.useEffect(()=>{if(typeof window>"u"||!M&&!R)return;const re=Ye=>{Ye.key==="Escape"&&P()};return window.addEventListener("keydown",re),()=>{window.removeEventListener("keydown",re)}},[M,R,P]);const B=x??i?.dashboard??null,W=v.pathname==="/setup",xe=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(xe);_.useEffect(()=>{W?xe&&Se(!0):Se(!1)},[xe,W]);const we=W&&(Ae||xe||se||W&&B===null),pe=we?"app-shell-focus":$?"app-shell-sidebar-hidden":"",ce=M?(B?_J(B,M):void 0)??(ke?yu(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(()=>jJ(v.pathname,B),[v.pathname,B]),{commandCenter:_e,evidenceLoading:Ze,evidenceError:Ee,isError:Ct,refetch:me}=tW(R?ue:null,{evidence:!0}),Be=_.useMemo(()=>{if(R)return EJ(_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=uC(r.projectTabs),Ye=!r.views||r.views.includes(mZ(v.pathname));return l.jsxs("div",{className:"app-shell app-shell-embed","data-theme":yZ(r.theme),style:bZ(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(fg,{}):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(dW,{}),l.jsxs("div",{className:`app-shell ${pe}${Eo()?" app-shell-demo":""}`,children:[!we&&!$&&l.jsxs("aside",{id:"desktop-sidebar",className:"sidebar","aria-label":"Primary navigation",children:[l.jsx("div",{className:"sidebar-brand",children:l.jsx(pk,{version:I.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(v6,{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(x6,{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(w6,{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(ij,{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(S6,{className:"sidebar-icon"}),l.jsx("span",{children:"Traffic sources"})]}),!Eo()&&l.jsxs(at,{to:"/backlinks",className:"sidebar-link",activeProps:{className:"sidebar-link sidebar-link-active"},activeOptions:{exact:!0},children:[l.jsx(k6,{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(j6,{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(A6,{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:GS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm",onClick:gn(async()=>{await ZS(),window.location.reload()}),children:"Sign out"})]}),u?l.jsx("div",{className:"sidebar-footer",children:Ok.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:[!we&&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(_6,{className:"size-4"}):l.jsx(T6,{className:"size-4"})}),l.jsx("div",{className:"topbar-brand-mobile",children:l.jsx(pk,{compact:!0})}),l.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[l.jsx(at,{to:"/",children:"Home"}),l.jsx(Wc,{className:"breadcrumb-sep size-3"}),l.jsx("span",{className:"breadcrumb-current",children:Ne})]})]}),l.jsxs("div",{className:"topbar-actions",children:[l.jsx(mW,{}),l.jsxs("div",{className:"health-pill-row",children:[l.jsxs("span",{className:`health-pill health-pill-${I.apiStatus.state}`,title:Wr(I.apiStatus),children:["API ",I.apiStatus.state==="ok"?"ok":I.apiStatus.state]}),l.jsx("span",{className:`health-pill health-pill-${I.workerStatus.state}`,title:Wr(I.workerStatus),children:`Worker ${I.workerStatus.state==="ok"?"ok":I.workerStatus.state}`})]}),we?null:l.jsxs(le,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":q,"aria-controls":"mobile-nav",onClick:()=>L(re=>!re),children:[l.jsx(E6,{className:"size-4"}),l.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),we?null:l.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${q?"mobile-nav-open":""}`,children:[l.jsxs(le,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>L(!1),children:[l.jsx(el,{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"}),!Eo()&&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:GS()}):null]}),l.jsx(le,{type:"button",variant:"ghost",size:"sm","data-testid":"mobile-sign-out",onClick:gn(async()=>{await ZS(),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(fg,{})}),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"})}),I.apiStatus.version&&I.apiStatus.version!=="unknown"?l.jsxs("span",{className:"footer-version",children:["v",I.apiStatus.version]}):null]}),u?l.jsx("div",{className:"footer-links",children:Ok.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]})]}),M&&!ce&&Le?l.jsx(Kd,{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,M&&!ce&&$e.isError?l.jsx(Kd,{open:!0,title:"Run unavailable",subtitle:"The run could not be loaded",onClose:P,children:l.jsx("p",{className:"text-sm text-negative",children:$e.error instanceof Error?$e.error.message:"Run details are unavailable."})}):null,ce?l.jsxs(Kd,{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(my,{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(dJ,{provider:re.provider}),l.jsx(T4,{variant:re.citationState===Rc.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(a0,{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:sZ(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(Kd,{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(wJ,{evidence:Be.evidence,project:Be.project,onClose:P}):null,l.jsx(fee,{}),l.jsx(rW,{}),f?l.jsx(lee,{}):null]})]})}class yee extends _.Component{state={error:null};static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,i){console.error("[ErrorBoundary]",n,i.componentStack),km({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(Dm,{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(R6,{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 Ea=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Pa("rounded-xl border border-base bg-bg/75 shadow-[0_0_0_1px_var(--color-shadow-hairline)]",e),...n}));Ea.displayName="Card";const Ur=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Pa("flex flex-col gap-1.5 p-5",e),...n}));Ur.displayName="CardHeader";const $4=_.forwardRef(({className:e,...n},i)=>l.jsx("h3",{ref:i,className:Pa("font-medium tracking-tight text-primary",e),...n}));$4.displayName="CardTitle";const Em=_.forwardRef(({className:e,...n},i)=>l.jsx("p",{ref:i,className:Pa("text-sm text-muted",e),...n}));Em.displayName="CardDescription";const jo=_.forwardRef(({className:e,...n},i)=>l.jsx("div",{ref:i,className:Pa("p-5 pt-0",e),...n}));jo.displayName="CardContent";function c0({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:a4})}function yy({title:e,children:n}){const{isAdmin:i}=ga();return i?l.jsx(l.Fragment,{children:n}):l.jsxs(Ea,{className:"surface-card mx-auto mt-8 max-w-lg",children:[l.jsxs(Ur,{children:[l.jsxs($4,{children:[e," is for administrators"]}),l.jsx(Em,{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(jo,{children:l.jsx("p",{className:"supporting-copy",children:"If you need to make a change here, ask an administrator on this install."})})]})}function Tre(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 Ere(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 Pc(e,n,i,r){return["sentiment",e,n,i??null,r??null]}const K4=5e3,bee=new Set(["pending","running","waiting-to-retry"]);function qk(e){return bee.has(e.state)}function vee(e){const n=e?.coverage.counts;return!!(n&&n.pending+n.running+n["waiting-to-retry"]>0)}function xee(e,n){return vee(e)||n?K4:!1}function wee(e,n,i=!0){const r=yt({queryKey:Pc(e,"settings"),queryFn:()=>Wd(e),retry:!1,staleTime:0,refetchOnWindowFocus:"always"}),u=yt({queryKey:Pc(e,"jobs"),queryFn:()=>PQ(e),enabled:!!r.data?.actions.configure,retry:!1,refetchOnWindowFocus:"always",refetchInterval:x=>x.state.data?.jobs.some(qk)?K4:!1}),h=!!u.data?.jobs.some(qk),f=x=>{const S={...n,queryClass:x};return{queryKey:Pc(e,"summary",S),queryFn:()=>RQ(e,S),enabled:i&&!!(r.data?.enabled&&r.data.installEnabled),retry:!1,staleTime:0,refetchOnWindowFocus:"always",refetchInterval:j=>xee(j.state.data,h)}},b=yt(f("branded")),v=yt(f("non-brand"));return{settings:r,branded:b,nonBrand:v,jobs:u}}const $i={branded:"Branded","non-brand":"Non-brand"},by=10;function vy(e){return e>=by}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 ${by} 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."},Mc="—",See={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 Zi(e){return See[e]??e.replaceAll("-"," ").replace(/^./,n=>n.toUpperCase())}const Po=["favorable","mixed","unfavorable"];function G4(e){return e==="favorable"?"positive":e==="unfavorable"?"negative":e==="mixed"?"caution":"neutral"}const Zc=["mixed","unfavorable"];function H4(e){return e.interval?`${dm(e.interval.low,Qa.fraction)} to ${dm(e.interval.high,Qa.fraction)}`:null}const bp={favorable:"progress-fill-info",mixed:"progress-fill-caution",unfavorable:"progress-fill-negative"};function nm(e){return`${e} ${e===1?"rating":"ratings"}`}function vp(e){return e.score.favorableRate!==null&&e.coverage.judged>0}function u0(e){return e.state==="complete"&&!e.provisional&&e.coverage.unadmittedAssessments===0}function F4(e){return e.state==="complete"?We.partial:We.states[e.state]}function xy(e){return e?vp(e)&&vy(e.coverage.judged):!1}function kee({value:e,label:n}){const{counts:i,judged:r}=e.coverage;if(!vp(e))return l.jsx("div",{className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"empty","aria-hidden":"true"});const u=Po.map(h=>`${i[h]} ${h}`).join(", ");return xy(e)?l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${e.score.favorableDisplay} favorable of ${nm(r)}`,className:"sentiment-bar","data-sentiment-bar":"rated",children:Po.filter(h=>i[h]>0).map(h=>l.jsx("span",{"data-outcome":h,className:`sentiment-bar-segment ${bp[h]}`,style:{flexGrow:i[h]},title:`${Zi(h)}: ${i[h]} of ${nm(r)}`},h))}):l.jsx("div",{role:"img","aria-label":`${n}: ${u}, ${nm(r)}, favorable share ${We.minRated.toLowerCase()}`,className:"sentiment-bar sentiment-bar-track","data-sentiment-bar":"too-few"})}function jee({value:e,label:n}){const{counts:i,judged:r}=e.coverage;return l.jsx("div",{role:"img","aria-label":`${n}: ${Po.map(u=>`${i[u]} ${u}`).join(", ")}, ${nm(r)}`,className:"sentiment-property-bar",children:Po.filter(u=>i[u]>0).map(u=>l.jsx("span",{"data-outcome":u,className:`sentiment-bar-segment ${bp[u]}`,style:{flexGrow:i[u]}},u))})}function Aee(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 Nee({value:e,label:n}){return l.jsx("div",{role:"group","aria-label":`${n} favorable share`,className:"sentiment-class-favorable",children:xy(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:Mc}),l.jsx("span",{className:"sr-only",children:We.minRated})]})})}function Cee({ratedAnswers:e=0,eligibleAnswers:n=0}){return`${e} of ${n} ${n===1?"answer":"answers"} rated`}function _ee(e){const{eligibleAnswers:n}=e;return n===void 0?{display:Mc,detail:We.ratedUnavailable,empty:!0}:n<=0?{display:Mc,detail:We.noAnswers,empty:!0}:e.ratedAnswerRate===null||e.ratedAnswerRate===void 0?{display:Mc,detail:We.states.disabled,empty:!0}:{display:dm(e.ratedAnswerRate,Qa.fraction),detail:Cee(e),empty:!1}}function Tee({coverage:e,label:n}){const{display:i,detail:r,empty:u}=_ee(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 Eee({value:e}){return vp(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 Ree(e){return!!(e.coverage.selected||e.coverage.eligibleAssessments||e.reason)}function Dee({value:e,queryClass:n,open:i,setOpenClass:r}){const u=_.useContext(hi),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()},q=$=>{R($.target)||S()},L=$=>{$.key==="Escape"&&(S(),v.current?.focus())};return document.addEventListener("pointerdown",P),document.addEventListener("focusin",q),document.addEventListener("keydown",L),()=>{document.removeEventListener("pointerdown",P),document.removeEventListener("focusin",q),document.removeEventListener("keydown",L)}},[i,S]);const{coverage:j,score:C}=e,T=H4(C),I=j.judged>0&&!vy(j.judged),M=n==="branded"?Aee(e):[];return Ree(e)?l.jsxs(l.Fragment,{children:[l.jsx("button",{ref:v,type:"button",className:"sentiment-class-details-toggle","aria-label":`${$i[n]} details`,"aria-expanded":i,"aria-controls":h,onClick:()=>r(R=>R===n?null:n),children:l.jsx(Xc,{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:$i[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]})]}),I&&Po.filter(R=>j.counts[R]>0).map(R=>l.jsxs("div",{children:[l.jsx("dt",{children:Zi(R)}),l.jsx("dd",{children:j.counts[R]})]},R)),I&&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&&M.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>M.length?l.jsxs("span",{className:"sentiment-details-subtitle-count",children:[" · ",M.length," of ",e.criticizedProperties.total]}):null]}),l.jsx("ul",{children:M.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=d0(u,e);u.openEvidence({...P,queryClass:n,scope:"property",scopeKey:R.key,marketKey:P.scope==="market"?P.scopeKey:P.marketKey,outcome:Zc},`${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(jee,{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({...d0(u,e),queryClass:n,outcome:Zc},We.properties.allEvidence,v.current)},children:We.properties.viewAll})]}),(j.unadmittedAssessments>0||Object.entries(j.counts).some(([R,P])=>P>0&&!Po.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:Zi(R)}),l.jsx("dd",{children:P})]},R))]}),e.reason&&l.jsx("p",{className:"sentiment-class-details-reason",children:e.reason})]})]}):null}function wy(e){return!!(e?.configured&&e.branded.coverage.judged>0&&e.branded.score.favorableRate!==null)&&!cp()}function Iee({value:e}){if(!wy(e))return null;const n=e.branded,i=n.coverage.judged,r=H4(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"})})]}),vy(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 ",by," needed, branded queries"]})]}),l.jsx("p",{className:"metric-inline-caption","aria-hidden":"true"})]})})}const hi=_.createContext(null);function d0(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 Rre(){return _.useContext(hi)?.configured??!1}function Dre({projectName:e,selection:n,runOptions:i=[],waitForResolvedRun:r=!1,evidenceReady:u=!0,hasSourceEvidence:h=!0,children:f}){return l.jsx(zee,{projectName:e,selection:n,runOptions:i,waitForResolvedRun:r,evidenceReady:u,hasSourceEvidence:h,children:f})}function zee({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($e=>x(ke=>ke?.key===b&&ke?.runId===$e?.runId&&ke?.revision===$e?.revision?ke:$e?{...$e,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:I,branded:M,nonBrand:R,jobs:P}=wee(e,C,j&&h),[q,L]=_.useState(!1),[$,Q]=_.useState(null),ae=_.useRef(null);_.useEffect(()=>{L(!1),Q(null)},[T]);const V=j&&!!(I.data?.enabled&&I.data.installEnabled),X=(n.queryClass==="non-brand"?R.data:M.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($e=>$e.id===Ce.runId)?[{id:Ce.runId,label:"Displayed sweep"},...i]:i,Ge=$e=>{$e.preventDefault(),ae.current?.focus()};return l.jsxs(hi.Provider,{value:{projectName:e,selection:C,resolveSource:S,settings:I,summaries:{branded:M,"non-brand":R},configured:V,hasSourceEvidence:h,openManage:$e=>{ae.current=$e,L(!0)},openEvidence:($e,ke,Le)=>{ae.current=Le,Q({selection:$e,label:ke})}},children:[f,l.jsx(t0,{open:q&&!!I.data?.actions.configure,onOpenChange:L,children:l.jsxs(Cm,{onCloseAutoFocus:Ge,className:"overflow-y-auto",children:[l.jsxs(n0,{children:[l.jsx(_m,{children:"Manage sentiment"}),l.jsx(Tm,{children:"Classify saved answers and review the cost before submitting a backfill."})]}),I.data?.actions.configure&&l.jsx(Fee,{projectName:e,settings:I.data,selection:Ce,runOptions:tt},JSON.stringify([I.data.evaluationDefinitionId,I.data.enabled,I.data.enablementEpoch])),P.data&&l.jsx(Vee,{projectName:e,jobs:P.data.jobs})]})}),l.jsx(t0,{open:$!==null,onOpenChange:$e=>{$e||Q(null)},children:l.jsxs(Cm,{onCloseAutoFocus:Ge,className:"overflow-y-auto",children:[l.jsxs(n0,{children:[l.jsxs(_m,{children:["Sentiment evidence",$?`: ${$.label}`:""]}),l.jsx(Tm,{children:"Stored judgments and exact quotations for the selected query and scope."})]}),$&&l.jsx(Bee,{projectName:e,selection:$.selection},JSON.stringify($.selection))]})})]})}function Ire(e,n){const i=_.useContext(hi)?.resolveSource;_.useEffect(()=>{i?.(e?{runId:e,revision:void 0}:null)},[i,e,n])}function Bk(){const e=_.useContext(hi);return e?.settings.data?.actions.configure?l.jsx(c0,{type:"button",variant:"outline",size:"sm",onClick:n=>e.openManage(n.currentTarget),children:e.settings.data.enabled?"Manage sentiment":"Enable sentiment"}):null}function Q4(e,n){return!e?.configured||n==="unknown"||n==="unclassified"?null:["branded"]}function Oee({queryClass:e="all"}){const n=_.useContext(hi),i=Q4(n,e);return!n?.hasSourceEvidence||!i?.some(r=>xy(n.summaries[r].data))?null:l.jsx("ul",{className:"sentiment-legend","aria-hidden":"true",children:Po.map(r=>l.jsxs("li",{children:[l.jsx("span",{className:`sentiment-legend-swatch ${bp[r]}`}),Zi(r)]},r))})}function Pee({queryClass:e}){const n=_.useContext(hi);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?u0(r)?l.jsx("p",{className:"sentiment-nonbrand-note",children:We.nonBrand.none}):vp(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}: ${F4(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:[Zc.slice().reverse().filter(f=>h[f]>0).map(f=>l.jsxs("span",{children:[l.jsx("span",{"aria-hidden":"true",className:`sentiment-legend-swatch ${bp[f]}`}),h[f]," ",f]},f)),!u0(r)&&l.jsx("span",{className:"text-caution",children:We.partial})]}),l.jsx(le,{type:"button",variant:"outline",size:"sm",onClick:f=>n.openEvidence({...d0(n,r),queryClass:"non-brand",outcome:Zc},We.nonBrand.evidence,f.currentTarget),children:We.nonBrand.view})]})})}function zre({queryClass:e="all",legend:n=!0,manage:i=!1}){const r=_.useContext(hi),u=Q4(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(Bk,{})]})}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(Bk,{})]}),n&&l.jsx(Oee,{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:$i[v]}),l.jsx(ma,{text:We.favorable})]}),r.hasSourceEvidence?x.data?l.jsxs(l.Fragment,{children:[l.jsx(kee,{value:x.data,label:$i[v]}),l.jsx(Nee,{value:x.data,label:$i[v]}),l.jsx(Tee,{coverage:x.data.coverage,label:$i[v]}),l.jsx(Eee,{value:x.data}),l.jsx(Dee,{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(Pee,{queryClass:e})]})}function Ore({queryId:e,sourceSnapshotIds:n=[],queryClass:i,location:r,showLabel:u=!1}){const h=_.useContext(hi);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 I=u&&l.jsx("span",{className:"block text-sm font-normal text-secondary",children:We.nonBrand.rowLabel});return u0(S)?l.jsxs("span",{className:"text-sm text-muted",children:[I,l.jsx("span",{"aria-hidden":"true",title:We.nonBrand.rowNone,children:Mc}),l.jsx("span",{className:"sr-only",children:We.nonBrand.rowNone})]}):l.jsxs("span",{className:"text-sm text-secondary",children:[I,l.jsx("span",{children:F4(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:I=>I.stopPropagation(),onClick:I=>{I.stopPropagation(),h.openEvidence({...j,outcome:Zc},`${x.queryText}, unfavorable and mixed`,I.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 ${$i[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 Mee(e){return e.outcome==="subject-not-mentioned"?"Not mentioned":e.outcome==="running"?"Classifying":e.outcome==="waiting-to-retry"?"Retrying":e.outcome?Zi(e.outcome):e.state==="not-measured"?"Not classified":e.state==="processing"?"Classifying":e.state==="failed"?"Failed":e.state==="canceled"?"Canceled":"Unavailable"}function Pre({queryId:e,sourceSnapshotIds:n,queryClass:i,provider:r,model:u,location:h,showSubjects:f=!1,showLabel:b=!1}){const v=_.useContext(hi);if(!v?.configured)return null;const x=i?v.summaries[i]:void 0,S=v.hasSourceEvidence?x?.data:void 0,j=S?.queries.filter(I=>I.queryClass===i&&(!e||I.queryId===e)&&n.length>0&&n.every(M=>I.sourceSnapshotIds.includes(M)))??[],C=j.length===1?j[0]:void 0,T=C?.assessments?.filter(I=>n.includes(I.sourceSnapshotId)&&I.provider===r&&I.location===h&&(u===void 0||I.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(I=>{const M=Mee(I),R=G4(I.outcome),P=l.jsxs(l.Fragment,{children:[f&&l.jsxs("span",{children:[I.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:M})]}),q={...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:I.assessmentId??void 0};return l.jsxs("div",{className:"flex items-center gap-1",children:[I.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 ${I.provider} sentiment evidence for ${I.subjectLabel}: ${M}`,onKeyDown:L=>L.stopPropagation(),onClick:L=>{L.stopPropagation(),v.openEvidence(q,`${C.queryText} · ${I.provider} · ${I.subjectLabel}`,L.currentTarget)},children:P}):l.jsx("span",{children:P}),I.reason&&l.jsx(ma,{text:I.reason})]},JSON.stringify([I.sourceSnapshotId,I.subjectId,I.assessmentId]))}):l.jsx("span",{children:v.hasSourceEvidence&&x?.isPending&&n.length?"Loading…":"Unavailable"})]})}function qee({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:G4(e.outcome),children:Zi(e.outcome)}),l.jsx("span",{children:$i[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 Bee({projectName:e,selection:n}){const[i,r]=_.useState(),u=yt({queryKey:Pc(e,"evidence",n,i),queryFn:()=>IQ(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(qee,{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 Lee({projectName:e,jobId:n}){const[i,r]=_.useState(),u=yt({queryKey:Pc(e,`job:${n}`,void 0,i),queryFn:()=>MQ(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 Uee({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:[Zi(u),": ",h]},u)),l.jsxs("p",{children:["Attempts: ",n.attemptCount]}),i&&n.attemptCount>0&&l.jsx(Lee,{projectName:e,jobId:n.id})]})}function Vee({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:uZ(i.createdAt)}),l.jsx("td",{children:Zi(i.state)}),l.jsx("td",{children:i.selected}),l.jsx("td",{children:l.jsx(Uee,{projectName:e,job:i})})]},i.id))})]})})]})}const $ee={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 Kee(e){return $ee[e]??Zi(e)}function Z4(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 Gee(e){const n=Z4(e);return[`${$i[e.queryClass]} queries`,...n.length?n:["whole sweep"]].join(" · ")}function Hee(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 Fee({projectName:e,settings:n,selection:i,runOptions:r}){const u=Ps(),[h,f]=_.useState(n.enabled),[b,v]=_.useState(i.runId??""),[x,S]=_.useState(i.queryClass),[j,C]=_.useState(!1),[T,I]=_.useState(null),M=_.useRef(null),R=Z4({...i,queryId:void 0}),P=()=>u.invalidateQueries({queryKey:["sentiment",e]}),q=()=>{I(null),M.current=null},L=ui({mutationFn:async()=>{if(!(await Wd(e)).actions.configure)throw new Error("Administrator permission is required to configure sentiment.");return DQ(e,{enabled:h})},onSuccess:async()=>{q(),await P(),await u.invalidateQueries({queryKey:["project-overview-slim"]})},onError:P}),$=ui({mutationFn:async()=>{if(!(await Wd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return zQ(e,Hee(i,b,x,j&&R.length>0))},onSuccess:V=>{I(V),M.current=crypto.randomUUID()},onError:P}),Q=ui({mutationFn:async()=>{if(!T?.previewToken||!M.current)throw new Error("Create and review a backfill preview first.");if(!(await Wd(e)).actions.backfill)throw new Error("Administrator permission is required to backfill sentiment.");return OQ(e,T.previewToken,M.current)},onSuccess:async()=>{q(),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),q()}}),"Enable project sentiment"]}),l.jsx("p",{children:"Enabling applies to future completed sweeps. Past sweeps require an explicit backfill."}),l.jsx(c0,{type:"submit",disabled:ae,children:L.isPending?"Saving…":"Save sentiment settings"}),L.isError&&l.jsx("p",{role:"alert",children:Ui(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),q()},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),q()},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),q()}}),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:()=>{q(),$.mutate()},children:$.isPending?"Preparing preview…":"Preview sentiment backfill"}),$.isError&&l.jsx("p",{role:"alert",children:Ui($.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:Gee(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:[Kee(V.reason),": ",V.count]},`${V.runId}:${V.reason}`))})]}),l.jsx(c0,{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:[Ui(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 Qee=20,Zee=6;function Yee({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-Zee,x=R=>h+R/Math.max(e.length-1,1)*f,S=XH(e),j=Math.min(...e),C=Math.max(...e),T=Math.max(C-j,Qee),I=(C+j)/2-T/2,M=e.map((R,P)=>({x:x(P),y:h+(1-(R-I)/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}),M.length===1?l.jsx("circle",{className:"sparkline-point",cx:M[0].x,cy:M[0].y,r:"3"}):l.jsx("polyline",{clipPath:`url(#${i})`,points:M.map(R=>`${R.x},${R.y}`).join(" "),vectorEffect:"non-scaling-stroke"})]})}function Xee({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(Yee,{points:e.trend,tone:u4(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":dm(e.mentionScore,Qa.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"})]})}),wy(e.sentiment)?l.jsx(Iee,{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(Wc,{className:"h-4 w-4 text-muted"})})]})}function Jee(){const{isAdmin:e}=ga(),n=bu(),{dashboard:i,isLoading:r,isError:u,activityLoading:h,activityError:f,refetch:b}=hp(),v=i??n?.dashboard,S=py(!n,n?.health),{openRun:j}=hy();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(q=>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"})]},q))})]});const C=v.portfolioOverview,T=C.projects.length>0&&C.projects.every(q=>q.hasMeasurement===!1),I=C.projects.some(q=>wy(q.sentiment)),M=C.attentionItems.map(q=>T&&q.id==="attention_stable"?{...q,tone:"neutral",title:"Awaiting first measurement",detail:"Visibility results will appear after the first sweep."}:q),R=S.data??n?.health??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},P=oX(C.systemHealth.filter(q=>e||q.id==="api"||q.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(q=>l.jsx(Xee,{project:q,sentimentColumn:I},q.project.id))}):l.jsxs(Ea,{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:[M.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:M.map(q=>q.href?l.jsxs(at,{to:q.href,className:`attention-item attention-item-${q.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:q.title}),l.jsx("p",{className:"attention-detail",children:q.detail})]}),q.actionLabel&&l.jsx("span",{className:"attention-action",children:q.actionLabel})]},q.id):l.jsxs("div",{className:`attention-item attention-item-static attention-item-${q.tone}`,children:[l.jsxs("div",{children:[l.jsx("p",{className:"attention-title",children:q.title}),l.jsx("p",{className:"attention-detail",children:q.detail})]}),q.actionLabel&&l.jsx("span",{className:"attention-action",children:q.actionLabel})]},q.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(q=>l.jsxs("button",{className:"compact-run",type:"button",onClick:()=>j(q.id),children:[l.jsxs("div",{children:[l.jsx("p",{className:"compact-run-title",children:q.projectName}),l.jsx("p",{className:"compact-run-detail",children:q.summary})]}),l.jsx(my,{status:q.status})]},q.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(q=>{const L=q.id==="api"?R.apiStatus:q.id==="worker"?R.workerStatus:void 0,$=L?L.state==="ok"?void 0:Wr(L):q.tone==="positive"?void 0:q.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:q.label}),$&&l.jsx("p",{className:"mt-1 text-sm text-secondary",children:$})]}),l.jsx(Sn,{tone:q.tone,title:L?Wr(L):q.meta,children:q.detail})]},q.id)})})]})]})}const Wee='a, button, input, select, textarea, label, [role="button"], [role="link"], [role="checkbox"], [role="menuitem"]';function ete(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(Wee))return!1;const i=typeof window<"u"?window.getSelection():null;return!(i&&!i.isCollapsed&&i.toString().trim()!=="")}function tte({onApplied:e}){const{canWrite:n}=ga(),[i,r]=_.useState(""),[u,h]=_.useState(!1),[f,b]=_.useState([]),[v,x]=_.useState([]);if(cp()||!n)return null;const S=async()=>{if(!i.trim())return;h(!0),b([]),x([]);const j=P6(i),C=[],T=[];for(let I=0;I<j.length;I++){const M=j[I];if(M.errors.length>0){C.push(`Document ${I+1}: ${M.errors[0]?.message}`);continue}const R=M.toJSON();if(!(!R||typeof R!="object"))try{const P=await xQ(R);T.push(`Applied "${P.displayName||P.name}" (revision ${P.configRevision})`)}catch(P){C.push(`Document ${I+1}: ${Ui(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 nte(){const{dashboard:e,isLoading:n,refetch:i}=hp(),{canWrite:r,isAdmin:u}=ga(),h=Ms();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(gg,{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=>{ete(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(my,{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(Ea,{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(gg,{className:"size-4 mr-1.5"}),"Map a site"]}):null]}),r?l.jsx(tte,{onApplied:()=>{i()}}):null]})}class ate extends Error{constructor(){super(a4),this.name="ViewOnlyError"}}function ite(e){if(!e.canWrite)throw new ate}function hl(){const e=ga();return()=>{ite(e)}}function ste(e){return e==="gsc-sync"?"GSC sync queued":e==="inspect-sitemap"?"Sitemap inspection queued":"Visibility sweep queued"}function ote(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 Sy(e,n){cy({id:e.id,projectId:e.projectId,kind:e.kind,projectLabel:n.projectLabel,sourceAction:n.sourceAction,lastAnnouncedStatus:"queued"}),vn({title:ste(e.kind),detail:ote(n.projectLabel,e.kind),tone:"neutral",dedupeKey:`run:${e.id}`,dedupeMode:"replace"})}function rte(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)cy({id:f.id,projectId:f.projectId,kind:f.kind,projectLabel:f.projectName,sourceAction:"run-all",lastAnnouncedStatus:"queued"});const h=pX({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 xp(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 lte(){const e=hl();return ui({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>pQ(n,i),onSuccess:(n,i)=>{Sy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})},onError:(n,i)=>{i.sourceAction!=="setup-launch"&&xp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:i.sourceAction})}})}function Mre(){const e=hl();return ui({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:n=>wQ(n),onSuccess:n=>{rte(n)},onError:n=>{vn({title:n instanceof Error?n.message:"Failed to queue runs",tone:"negative"})}})}function cte(){const e=hl();return ui({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,body:i})=>jQ(n,i),onSuccess:(n,i)=>{cy({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||xp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"site-audit"})}})}function qre(){const e=hl();return ui({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>SQ(n,i),onSuccess:(n,i)=>{Sy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})},onError:(n,i)=>{xp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"gsc-sync"})}})}function Bre(){const e=hl();return ui({onMutate:e,meta:{skipGlobalErrorToast:!0},mutationFn:({projectName:n,opts:i})=>kQ(n,i),onSuccess:(n,i)=>{Sy(n,{projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})},onError:(n,i)=>{xp(n,{projectKey:i.projectName,projectLabel:i.projectLabel??i.projectName,sourceAction:"inspect-sitemap"})}})}function ute(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 Lre(){const e=hl();return ui({onMutate:e,mutationFn:({projectName:n,queries:i})=>dQ(n,i)})}const Lk=[{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}],dte={skipped:"Skipped",pending:"In progress",incomplete:"Didn’t finish",unknown:null};function Mo({current:e,outcomes:n={}}){const i=Lk.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:Lk.map((r,u)=>{const h=u<i?n[r.id]:void 0,f=u<i&&h===void 0,b=u===i,v=h?dte[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 mte(){return[{id:"search-console",icon:y0,label:"Search Console",detail:"Compare answer engines with the queries you already rank for.",action:"Connect",to:"/projects/$projectName/search-console"},{id:"analytics",icon:rj,label:"Google Analytics",detail:"See the traffic answer engines actually send you.",action:"Connect",to:"/projects/$projectName/activity"},{id:"schedule",icon:lj,label:"Scheduled sweeps",detail:"Re-measure on a schedule instead of by hand.",action:"Set up",to:"/projects/$projectName/settings"},{id:"notifications",icon:yg,label:"Notifications",detail:"Send a webhook when a sweep finishes or a score moves.",action:"Set up",to:"/projects/$projectName/settings"},{id:"local",icon:cj,label:"Local presence",detail:"Track the Google Business Profile behind local answers.",action:"Open",to:"/projects/$projectName/local"},{id:"agent",icon:D6,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 pte({projectName:e}){const n=mte();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 hte({providerName:e,keyUrl:n,modelHint:i,compact:r=!1,leadingField:u,secondaryActions:h,onSaved:f}){const b=Ps(),v=e.toLowerCase()==="local",x=r&&e.toLowerCase()==="gemini"&&!!n,[S,j]=_.useState(""),[C,T]=_.useState(""),[I,M]=_.useState(""),[R,P]=_.useState(""),[q,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 $e(){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},qe={},we=Se(R);we!==void 0&&(qe.maxConcurrency=we);const pe=Se(q);pe!==void 0&&(qe.maxRequestsPerMinute=pe);const ce=Se($);ce!==void 0&&(qe.maxRequestsPerDay=ce),await e4(e.toLowerCase(),{...S.trim()?{apiKey:S.trim()}:{},...C.trim()?{baseUrl:C.trim()}:{},...I.trim()?{model:I.trim()}:{},...Object.keys(qe).length>0?{quota:qe}:{}}),j(""),T(""),M(""),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:I,onChange:Se=>M(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:q,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"})]})]})]})]}),xe=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($e),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]}),xe]}):l.jsxs(l.Fragment,{children:[xe,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 Rm="cdp:chatgpt";function Ao(e){return e.trim().toLowerCase()}function fte({projectProviders:e,configuredApiProviders:n,cdpConfigured:i}){const r=e.map(Ao),u=new Set(r),h=r.length===0||r.some(x=>x!==Rm),f=r.length===0||u.has(Rm);if(h&&n!==void 0&&n.map(Ao).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 gte=[{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"}],yte=[{label:"Queries"},{label:"First sweep"}];function Uk(e,n){return(e==="completed"||e==="partial")&&n>0}function Vk(e){return e.launchReady?e.hasProject?e.queryCount===0?2:e.competitorCount===0&&!e.hasRunAttempt?3:4:1:0}function Y4(e){return e.queryCounts.total>0}function bte(e,n){return n?e.find(i=>i.project.name===n)??null:e.find(i=>!Y4(i))??e.at(0)??null}function vte({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 xte({visibilityProjectName:e,siteHealthOnboarding:n=!1,onboardingFinish:i=n}={}){const{canWrite:r}=ga();return e&&r?l.jsx($k,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}):l.jsx(yy,{title:e?"Set up AI Visibility":"Setup",children:l.jsx($k,{visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i})})}function $k({visibilityProjectName:e,siteHealthOnboarding:n,onboardingFinish:i}){const r=bu(),{isAdmin:u}=ga(),{dashboard:h,isLoading:f,refetch:b}=hp(void 0,{pauseProjectPolling:!0,includeSettings:u}),v=h??r?.dashboard,x=Ms(),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(Mo,{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(Ea,{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(wte,{dashboard:v,initialHealth:r?.health,enableLiveStatus:!r,refetch:b,visibilityProjectName:e,visibilityHeadingRef:S,siteHealthOnboarding:n,onboardingFinish:i})}function wte({dashboard:e,initialHealth:n,enableLiveStatus:i,refetch:r,visibilityProjectName:u,visibilityHeadingRef:h,siteHealthOnboarding:f,onboardingFinish:b}){const v=e.settings,{isAdmin:x}=ga(),j=py(i,n).data??n??{apiStatus:{label:"API",state:"checking",detail:"Checking service health"},workerStatus:{label:"Worker",state:"checking",detail:"Checking service health"}},C=lX(e.setup,j,v),T=!!u,I=Ms(),M=Ps(),R=_.useRef(ey()).current,P=_.useRef(new Set),q=_.useCallback((H,Xe)=>{if(Xe){if(P.current.has(Xe))return;P.current.add(Xe)}sy({surface:"wizard",...H,eventId:ty()})},[]),L=bte(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?XC(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&&Y4(L),$e=!!L&&V.isPending,ke=T?2:Vk({launchReady:C.launchState.enabled,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ge}),Le=Vk({launchReady:!0,hasProject:!!L,queryCount:X,competitorCount:Ce.length,hasRunAttempt:$.length>0||Ge}),[B,W]=_.useState(ke),[xe,Ae]=_.useState(!$e),se=T&&($e||!xe),[Se,qe]=_.useState(L?.project.name??""),[we,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),[qn,Ht]=_.useState(!1),Ke=()=>{if(!Ne){I({to:"/",replace:!!u});return}I({to:f?"/projects/$projectName/technical-aeo":"/projects/$projectName",params:{projectName:Ne},replace:!!u})},ct=(H=!1)=>{if(!b||!Ne){Ke();return}I({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,fi]=_.useState(X>0),[Fs,gi]=_.useState(null),[Dn,Yo]=_.useState(!1),[Qs,Zs]=_.useState(!1),yi=v.providerStatuses.filter(H=>H.state==="ready"),xn=L?.project.providers.map(Ao)??[],Et=yi.filter(H=>xn.length===0||xn.includes(Ao(H.name))),Kn=yi.map(H=>Ao(H.name)),Zt=Et.length>0,Ys=xn.length===0||xn.includes(Rm),qa=T&&!x,na=yt({...jZ({client:J,path:{name:ae??""}}),enabled:qa&&!!ae,staleTime:0,refetchOnMount:"always",refetchOnWindowFocus:"always",retry:!1}),oe=na.data?.answerVisibilityProviderReady,Ie=qa&&(na.isError||na.isSuccess&&typeof oe!="boolean"),Je=yt({...XZ({client:J}),enabled:!qa&&Ys&&!Zt,staleTime:6e4,retry:!1}),Ot=Ys?Je.isSuccess?typeof Je.data.browserVersion=="string":Je.isError?!1:void 0:!1,et=qa?na.isSuccess&&na.isFetchedAfterMount&&!na.isFetching?oe:void 0:fte({projectProviders:xn,configuredApiProviders:Kn,cdpConfigured:Ot}),kt=Et.length+(Ot===!0?1:0),[rn,bi]=_.useState(Et[0]?.name??""),[Xo,Xs]=_.useState(5),[vu,fl]=_.useState(!1),[gl,yl]=_.useState(null),[bl,vl]=_.useState(""),Jo=_.useRef(!1),xu=_.useCallback(H=>{!H||!Jo.current||(Jo.current=!1,H.focus({preventScroll:!0}))},[]),[ya,ln]=_.useState(!1),[In,Xi]=_.useState(!1),[Wo,wu]=_.useState(!1),er=v.providerStatuses.filter(H=>Ao(H.name)!==Rm&&(xn.length===0||xn.includes(Ao(H.name)))),aa=er.find(H=>H.name===bl)??er.find(H=>H.state!=="ready")??er.at(0),Ji=`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.`,xl=async()=>{wu(!1);try{await navigator.clipboard.writeText(Ji),Xi(!0)}catch{wu(!0)}},[vi,Wi]=_.useState(Ce.join(`
77
- `)),[es,ts]=_.useState(Ce.length>0),[tn,wl]=_.useState(null),[Sl,Ja]=_.useState(!1),kl=_.useRef(VC(ae)).current?.runId??null,jl=_.useRef(kl),[Wa,kp]=_.useState(!!kl||!!tt&&!Ge),[xi,Ws]=_.useState(!1),[An,zn]=_.useState(null),[ns,jp]=_.useState(kl??(Ge?null:tt?.id??null)),Al=lte(),ei=yt({...ly({client:J,path:{id:ns??""}}),enabled:!!ns,refetchInterval:({state:H})=>{const Xe=H.data?.status;return Xe==="completed"||Xe==="partial"||Xe==="failed"||Xe==="cancelled"?!1:2e3},refetchIntervalInBackground:!0}),[as,Su]=_.useState(""),[On,tr]=_.useState(!1),[Nl,nr]=_.useState(null),Gn=Se.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),ia=Qt.split(`
78
- `).map(H=>H.trim()).filter(Boolean),wi=vi.split(`
79
- `).map(H=>H.trim()).filter(Boolean),ba=Math.max(X,Vt?ia.length:0),va=dF({apiReady:j.apiStatus.state==="ok",databaseConfigured:j.apiStatus.databaseConfigured,workerReady:j.workerStatus.state==="ok",providerReady:et!==!1}),ti=(va&&va!=="no_provider"?C.launchState.blockedReason:Ie?"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(()=>{xe||$e||(T||W(ke),Z.length>0&&(Rn(Z.map(H=>H.query).join(`
80
- `)),fi(!0)),Ae(!0))},[Z,ke,T,xe,$e]),_.useEffect(()=>{if(Et.length===0){bi("");return}Et.some(H=>H.name===rn)||bi(Et[0].name)},[Et,rn]),_.useEffect(()=>{xe&&(q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.started",step:uF(ke),resumed:!!L},"onboarding.started"),!L&&ke>0&&q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"system",method:"automatic"},"onboarding.step_completed:system"))},[q,ke,R,xe,L]),_.useEffect(()=>{T||!mF(j)||!va||q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"system",action:va==="no_provider"?"configure_provider":"continue",reasonCode:va},`onboarding.blocked:system:${va}`)},[q,j,T,R,va]);const Ba=ei.data?.status,ar=ei.data?.snapshots?.length??0;_.useEffect(()=>{if(!Wa||!Ba)return;const H=jl.current;if(!H||H!==ns)return;if(Uk(Ba,ar)){q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"run",method:"automatic",countBucket:ci(ar)},"onboarding.step_completed:run"),wm(H);return}const Xe=Ba==="cancelled"?"run_cancelled":Ba==="failed"||(Ba==="completed"||Ba==="partial")&&ar===0?"run_failed":void 0;Xe&&(q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Xe},`onboarding.blocked:run:${Xe}`),wm(H))},[q,ns,R,Ba,ar,Wa]);const Np=async()=>{if(!(!Gn||!ce)){Ht(!0),vt(null);try{const H=await WC(Gn,{displayName:we||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(),q({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"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"project",action:"save",reasonCode:"project_create_failed"},"onboarding.blocked:project:project_create_failed")}finally{Ht(!1)}}},ir=async()=>{if(!Ne)return;const H=ia;if(H.length!==0){Yo(!0),gi(null);try{await uQ(Ne,H),fi(!0),T?await Promise.all([M.invalidateQueries({queryKey:o4({client:J,path:{name:Ne}})}),M.invalidateQueries({predicate:ute}),M.invalidateQueries({queryKey:["setup","resume-queries",Ne]})]):await r(),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"queries",method:Qs?"generated":"manual",countBucket:ci(H.length)},"onboarding.step_completed:queries"),W(T?4:3)}catch(Xe){gi(Xe instanceof Error?Xe.message:"Failed to save queries"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"queries",action:"save",reasonCode:"query_save_failed"},"onboarding.blocked:queries:query_save_failed")}finally{Yo(!1)}}},La=async()=>{if(!(!Ne||!rn)){fl(!0),yl(null);try{const H=await vQ(Ne,rn,Xo);if(H.queries.length>0){const Xe=Qt?Qt.trimEnd()+`
81
- `+H.queries.join(`
82
- `):H.queries.join(`
83
- `);Rn(Xe),Zs(!0)}}catch(H){yl(H instanceof Error?H.message:"Failed to generate queries"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"queries",action:"generate_queries",reasonCode:zc(H,"unknown")},"onboarding.blocked:queries:generate")}finally{fl(!1)}}},Cl=async()=>{if(!Ne)return;const H=wi;if(H.length!==0){Ja(!0),wl(null);try{await mQ(Ne,H),ts(!0),await r(),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"competitors",method:"manual",countBucket:ci(H.length)},"onboarding.step_completed:competitors"),W(4)}catch(Xe){wl(Xe instanceof Error?Xe.message:"Failed to save competitors"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"competitors",action:"save",reasonCode:"unknown"},"onboarding.blocked:competitors:save")}finally{Ja(!1)}}},_l=async()=>{const H=as.trim();if(H){tr(!0),nr(null);try{await e4("gemini",{apiKey:H}),vn({title:"Gemini configured",detail:"Provider is ready — continuing setup.",tone:"positive",dedupeKey:"setup:gemini:configured",dedupeMode:"drop"}),Su(""),await r(),bi(v.providerStatuses.find(Xe=>Xe.name.toLowerCase()==="gemini")?.name??"gemini"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"system",method:"inline"},"onboarding.step_completed:system")}catch(Xe){nr(Xe instanceof Error?Xe.message:"Failed to save Gemini key"),q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.blocked",step:"system",action:"configure_provider",reasonCode:"provider_save_failed"},"onboarding.blocked:system:provider_save_failed")}finally{tr(!1)}}},Si=async()=>{if(!ko()){if(!Ne||ti){zn(ti??"Complete setup before launching the first sweep.");const H=va??(Ne?ba===0?"no_queries":"run_rejected":"unknown");qa||q({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:ci(kt),queryCountBucket:ci(ba),reasonCode:H});return}Ws(!0),zn(null);try{const H=await Al.mutateAsync({projectName:Ne,projectLabel:we||Se||Ne,sourceAction:"setup-launch"});jp(H.id),kp(!0),UC(Ne,H.id),jl.current=H.id,qa||q({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"queued",providerCountBucket:ci(kt),queryCountBucket:ci(ba)}),await r()}catch(H){zn(H instanceof Error?H.message:"Failed to queue the visibility sweep. Retry when the instance is ready."),qa||q({flowVersion:ft,onboardingSessionId:R,event:"run.requested",origin:"dashboard_setup",result:"rejected",providerCountBucket:ci(kt),queryCountBucket:ci(ba),reasonCode:zc(H,"run_rejected")})}finally{Ws(!1)}}},Bn=()=>W(H=>T?2:Math.max(0,H-1)),sr=(H,Xe,ki)=>{q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:H,method:"existing",...ki===void 0?{}:{countBucket:ci(ki)}},`onboarding.step_completed:${H}`),W(Xe)},Tl=()=>{if(q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"queries",method:"skipped",countBucket:"0"},"onboarding.step_completed:queries"),T){Ft();return}W(3)},El=()=>{q({flowVersion:ft,onboardingSessionId:R,event:"onboarding.step_completed",step:"competitors",method:"skipped",countBucket:"0"},"onboarding.step_completed:competitors"),W(4)},eo=T?"section":Ea,xa=et!==!0||Ot===!0?l.jsx(le,{type:"button",variant:"ghost",size:"sm",className:"min-h-11",onClick:()=>{r(),Ys&&Je.refetch()},children:"Check again"}):null,Rl=(et===!1||ya)&&!!aa,to=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(hte,{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:xu,id:"setup-provider",className:"setup-input",value:aa.name,onChange:H=>{H.target.value!==aa.name&&(Jo.current=document.activeElement===H.currentTarget,vl(H.target.value))},children:er.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,Rl?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."}),Ie?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:Ie?"Retry provider check":"Check again"})]}):null,ni=(()=>{switch(B){case 0:return l.jsxs(Ea,{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:as,onChange:Xe=>Su(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||!as.trim(),onClick:gn(_l),children:On?"Saving...":"Save"})]}),Nl&&l.jsxs("div",{role:"alert",className:"space-y-1 text-xs text-negative",children:[l.jsx("p",{children:Nl}),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"?Wr(j.apiStatus):H.id==="worker"?Wr(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:()=>{q({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(Ea,{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:()=>sr("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=>qe(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:we,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||qn,onClick:gn(Np),children:qn?"Creating...":"Create project"})]})]})]});case 2:return l.jsxs(eo,{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(xl),children:In?"Research prompt copied":"Copy research prompt"})]}),l.jsxs("details",{open:Wo||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:Ji})]}),Wo?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?Ke: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?Ke:Bn,children:"Back"}),l.jsx(le,{type:"button",variant:"outline",onClick:()=>fi(!1),children:"Edit queries"}),l.jsx(le,{type:"button",onClick:()=>sr("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=>bi(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:Xo,onChange:H=>Xs(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:vu||!rn,onClick:gn(La),children:vu?"Analyzing site...":"Generate"})]}),gl?l.jsx("p",{className:"text-negative-400 text-sm",children:gl}):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)})]}),Fs?l.jsx("p",{className:"text-negative-400 text-sm",children:Fs}):null,l.jsxs("div",{className:"setup-nav",children:[l.jsx(le,{type:"button",variant:"outline",onClick:T?Ke:Bn,children:"Back"}),l.jsx(le,{type:"button",variant:"ghost",onClick:Tl,children:T?"Finish without AI Visibility":"Skip for now"}),l.jsx(le,{type:"button",disabled:ia.length===0||Dn,onClick:gn(ir),children:Dn?"Saving...":`Save ${ia.length} quer${ia.length!==1?"ies":"y"}`})]})]})]});case 3:return l.jsxs(Ea,{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"})]}),es?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."}),es?l.jsxs("div",{className:"compact-stack",children:[l.jsx("ul",{className:"detail-list",children:wi.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:()=>sr("competitors",4,wi.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:vi,onChange:H=>Wi(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:wi.length===0?l.jsx(le,{type:"button",onClick:El,children:"Continue without competitors"}):l.jsxs(l.Fragment,{children:[l.jsx(le,{type:"button",variant:"outline",onClick:El,children:"Skip"}),l.jsx(le,{type:"button",disabled:Sl,onClick:gn(Cl),children:Sl?"Saving...":`Save ${wi.length} competitor${wi.length!==1?"s":""}`})]})})]})]})]});case 4:{const H=ei.data,Xe=H?.status??(ns===tt?.id?tt.status:void 0),ki=Xe==="completed"||Xe==="partial"||Xe==="failed"||Xe==="cancelled",is=H?.snapshots??[],Ua=H?.queryCounts,Dl=Xe?Uk(Xe,is.length):!1,Nn=Ge&&!Wa,ji=An??(H?.error?iZ(H.error):Xe==="cancelled"?"The sweep was cancelled before it produced a baseline.":(Xe==="completed"||Xe==="partial")&&is.length===0?"The sweep finished without producing any snapshots.":tt?.statusDetail||"The sweep did not produce a baseline.");let ai=null;return Nn||Dl?ai=l.jsx(Sn,{tone:"positive",children:"Complete"}):An&&!Wa?ai=l.jsx(Sn,{tone:"negative",children:"Failed"}):ki?ai=l.jsx(Sn,{tone:"negative",children:Xe==="cancelled"?"Cancelled":"Failed"}):Wa&&(ai=l.jsx(Sn,{tone:"caution",children:"Running"})),l.jsxs(Ea,{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:ko()?"AI Visibility":"Launch first run"})]}),ai]}),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 →"})]})]}):!Wa&&ko()?l.jsxs("div",{className:"compact-stack",children:[Ne?l.jsx(jW,{projectName:Ne}):l.jsx("p",{className:"text-sm text-secondary",children:s0}),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:Ke,children:"Open project dashboard →"})]})]}):Wa?ki?Dl?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:Ua?l.jsxs(l.Fragment,{children:[Ua.mentionedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",Ua.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:Ua?l.jsxs(l.Fragment,{children:[Ua.citedQueries,l.jsxs("span",{className:"text-faint text-lg",children:[" / ",Ua.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:is.length}),l.jsx("p",{className:"mt-0.5 text-sm text-secondary",children:"completed engine checks"})]})]}),!b&&Ne?l.jsx(pte,{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:ji}),l.jsx("p",{className:"mt-1 text-xs text-secondary",children:ko()?s0: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&&!ko()?l.jsx(le,{type:"button",variant:"outline",asChild:!0,children:l.jsx(at,{to:"/settings",children:"Configure providers"})}):l.jsx("span",{}),ko()||!x?l.jsx(le,{type:"button",onClick:Ke,children:"Open project dashboard →"}):l.jsx(le,{type:"button",disabled:xi||!!ti,onClick:gn(Si),children:xi?"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"})]})}),ei.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:ei.error instanceof Error?ei.error.message:"Could not refresh the sweep status."}),l.jsx(le,{type:"button",variant:"outline",size:"sm",className:"mt-2",onClick:()=>{ei.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():Ke,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."]}),(ti||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??ti}),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:xi||!!ti,title:ti,onClick:gn(Si),children:xi?"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(Mo,{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(vte,{current:T?B===4?1:0:B,labels:T?yte:gte}),l.jsxs("section",{className:"setup-wizard",children:[to,ni]})]})}const hg="canonry mcp install --client claude-code",Ste="https://github.com/Canonry/canonry/blob/main/docs/mcp.md";function kte(){const e=_.useRef(ey()).current,n=_.useRef(new Set),i=_.useCallback((r,u)=>{n.current.has(r)||(n.current.add(r),sy({...u,flowVersion:ft,onboardingSessionId:e,surface:"platform",eventId:ty()}))},[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 wp=_.createContext(()=>{});function jte({projectName:e,skippedVisibility:n=!1}){const i=yt({...$Y({client:J,path:{name:e}}),retry:!1}),r=i.data?.hasData?i.data:null,u=kte(),h=Kk(e,Oe["site-audit"]),f=Kk(e,Oe["answer-visibility"]),b={...h?{site:h,fixes:h}:{},...Ate(f,n)};return l.jsx(wp.Provider,{value:u,children:l.jsxs("div",{className:"page-container max-w-6xl py-8 md:py-10",children:[l.jsx(Mo,{current:"done",outcomes:b}),l.jsxs("header",{className:"relative mx-auto mt-12 max-w-2xl text-center md:mt-16",children:[l.jsx(Nte,{}),l.jsx("p",{className:"onb-reveal mt-6 text-sm font-medium text-positive",style:Da(250),children:"Setup complete"}),l.jsx("h1",{className:"onb-reveal mt-2 text-5xl font-semibold tracking-tight text-heading md:text-6xl",style:Da(350),children:"You’re set."}),l.jsxs("p",{className:"onb-reveal mx-auto mt-4 max-w-xl text-lg text-secondary",style:Da(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(Hd,{className:"md:col-span-4 md:row-span-2",delayMs:600,labelledBy:"onb-agent-heading",children:l.jsx(Tte,{projectName:e})}),l.jsx(Hd,{className:"md:col-span-2 md:row-span-2",delayMs:700,labelledBy:"onb-data-heading",children:l.jsx(Dte,{projectName:e})}),l.jsx(Hd,{className:"md:col-span-3",delayMs:800,labelledBy:"onb-schedule-heading",children:l.jsx(Ote,{projectName:e})}),l.jsx(Hd,{className:"md:col-span-3",delayMs:900,labelledBy:"onb-alerts-heading",children:l.jsx(Pte,{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:Da(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 Kk(e,n){const i=yt({...r4({client:J,path:{name:e},query:{kind:n,limit:20}}),retry:!1,refetchInterval:r=>Gk(r.state.status==="success"?{isSuccess:!0,data:r.state.data}:{isSuccess:!1})==="pending"?5e3:!1});return Gk(i)}function Ate(e,n){return e===void 0?{}:n?{visibility:"skipped"}:{visibility:e}}function Gk(e){if(!e.isSuccess||!e.data)return"unknown";const n=e.data.filter(i=>i.trigger!==Ha.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 Da(e){return{"--onb-delay":`${e}ms`}}function Nte(){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 Hd({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:Da(n),children:r})}function Sp({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 Fd=[{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."}],Cte=9e3;function _te(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Tte({projectName:e}){const n=_.useContext(wp),[i,r]=_.useState(0),[u,h]=_.useState(!1),[f,b]=_.useState(!1);_.useEffect(()=>{if(u||_te())return;const S=window.setTimeout(()=>r(j=>(j+1)%Fd.length),Cte);return()=>window.clearTimeout(S)},[i,u]);const v=async()=>{try{await navigator.clipboard.writeText(hg),n("copy_agent_command"),b(!0),window.setTimeout(()=>b(!1),1800)}catch{vn({tone:"negative",title:"Could not copy the command",detail:`Run ${hg} in your terminal.`})}},x=Fd[i]??Fd[0];return l.jsxs(l.Fragment,{children:[l.jsxs(Sp,{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:[Fd.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:Da(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:Da(1300+j*450),children:[l.jsx("span",{className:"text-positive",children:"●"})," ",S]},S)),l.jsx("p",{className:"onb-line mt-3 text-secondary",style:Da(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:Da(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:hg}),l.jsxs(le,{type:"button",variant:"secondary",size:"sm",className:"h-9 md:h-9",onClick:()=>{v()},children:[f?l.jsx(Jc,{className:"size-4","aria-hidden":"true"}):l.jsx(b0,{className:"size-4","aria-hidden":"true"}),f?"Copied":"Copy"]}),l.jsx("a",{href:Ste,target:"_blank",rel:"noreferrer",className:"text-sm font-medium text-link underline-offset-4 hover:underline",children:"Other clients"})]})]})}const Ete=[{icon:y0,label:"Search Console",action:"connect_search_console",to:"/projects/$projectName/search-console"},{icon:rj,label:"Google Analytics",action:"connect_analytics",to:"/projects/$projectName/activity"},{icon:cj,label:"Business Profile",action:"connect_business_profile",to:"/projects/$projectName/local"}],Rte=["GPTBot","ClaudeBot","PerplexityBot"];function Dte({projectName:e}){const n=_.useContext(wp);return l.jsxs(l.Fragment,{children:[l.jsx(Sp,{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(Ite,{}),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(uj,{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:Ete.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 Ite(){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:Da(i*400),d:`M20 ${n} C 100 ${n}, 118 70, 170 70`,fill:"none",strokeWidth:"1.5"},n))}),Rte.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}%`,...Da(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(uj,{className:"size-5"})})]})}const zte=["M","T","W","T","F","S","S"];function Ote({projectName:e}){return l.jsxs(l.Fragment,{children:[l.jsx(Sp,{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:zte.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:Da(i*500)}),l.jsx("span",{className:"text-xs text-muted",children:n})]},i))}),l.jsx(X4,{projectName:e,to:"/projects/$projectName/settings",icon:lj,label:"Set a schedule",action:"set_schedule"})]})}function Pte({projectName:e,score:n}){return l.jsxs(l.Fragment,{children:[l.jsx(Sp,{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(yg,{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(X4,{projectName:e,to:"/projects/$projectName/settings",icon:yg,label:"Add a notification",action:"add_notification"})]})}function X4({projectName:e,to:n,icon:i,label:r,action:u}){const h=_.useContext(wp);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 Mte=_.lazy(async()=>({default:(await Yi(()=>import("./SiteHealthSection-CGlrPdrk.js").then(n=>n.d),__vite__mapDeps([0,1,2,3,4]),import.meta.url)).SiteHealthSection})),qte=`Public pages only, crawled from this computer and stored locally. The first scan reads up to ${r3} pages, then stops.`,Bte=1800,Lte="https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent",Ute="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 Vte(e,n){return e==="legacy"?"legacy":e==="platform"?"platform":n.state==="success"?n.projectCount===0?"platform":"legacy":n.state==="error"?"retry":"loading"}const $te="2000-01-01T00:00:00.000Z",Kte=5e3;function Gte(e,n){const i=new Set,r=new Map;for(const f of n)f.trigger!==Ha.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 J4=[{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"}],W4=[{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 Hte(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 Fte(e,n){const i=e.trim().toUpperCase(),r=n.trim().toLowerCase();return{countryValid:J4.some(u=>u.value===i),languageValid:W4.some(u=>u.value===r)}}function Qte(e){const n=e.replace(/^\[|\]$/g,"");return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(n)||n.includes(":")}function Zte(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"||Qte(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 Yte(e,n=Bte){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 Xte(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 e5(e){const n=_.useRef(ey()).current,i=_.useRef(new Set),r=_.useCallback((u,h)=>{if(h){if(i.current.has(h))return;i.current.add(h)}sy({...u,surface:e,eventId:ty()})},[e]);return{onboardingSessionId:n,emit:r}}function Hk(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 m0(){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(Ds,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading projects…"]})]})}function Jte({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 Wte({projectName:e,initialRunId:n}){return l.jsx(yy,{title:"Site Health setup",children:l.jsx(ene,{projectName:e,initialRunId:n})})}function ene({projectName:e,initialRunId:n}){const i=Ms(),r=yt({...Qo({client:J}),enabled:!!e,retry:!1,refetchOnMount:"always"}),{onboardingSessionId:u,emit:h}=e5("site_health"),[f]=_.useState(()=>fF(n));_.useEffect(()=>{f&&gF()},[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||VC(e)?.runId!==n&&UC(e,n)},[n,e]);const v=yt({...ly({client:J,path:{id:n??""}}),enabled:!!n,refetchInterval:({state:T})=>{const I=T.data?.status;return I==="completed"||I==="partial"||I==="failed"||I==="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"),wm(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}`),wm(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(Mo,{current:"site"}),l.jsxs("div",{className:"mt-8 flex items-center gap-3 text-sm text-secondary",role:"status",children:[l.jsx(Ds,{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(Mo,{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(Ds,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),"Loading Site Health…"]})]}),children:l.jsx(Mte,{projectName:x.name,projectId:x.id,initialRunId:n,onReleaseInitialRun:S,showOnboardingActions:!0,onContinueOnboarding:j,onSkipOnboarding:C})})]})}function tne(){const e=Zk({from:"/setup"}),n=e.onboarding==="site-health"&&!e.setupProject,i=e.onboarding==="site-health"&&e.experience!=="legacy",r=$F(),u=e.experience==="legacy"?"legacy":e.experience==="platform"?"platform":r,[h,f]=_.useState(!1),[b,v]=_.useState(void 0),x=yt({...Qo({client:J}),enabled:u==="auto",retry:!1,refetchOnMount:"always"}),S=yt({...Qc({client:J,query:{kind:Oe["site-audit"],since:$te,limit:Kte}}),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":Vte(u,C);if(e.onboarding==="complete"&&e.setupProject)return l.jsx(jte,{projectName:e.setupProject,skippedVisibility:e.skipped==="visibility"});if(n||i)return l.jsx(Wte,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});const I=u==="auto"&&T==="legacy"&&!e.setupProject&&x.isSuccess;if(I&&b===void 0)return S.isError?v(null):S.isSuccess&&S.isFetchedAfterMount&&v(Gte(x.data,S.data)),l.jsx(m0,{});const M=I?b:null;return M?l.jsx(nne,{projectName:M.projectName,runId:M.runId}):T==="legacy"?l.jsx(xte,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding==="site-health",onboardingFinish:e.onboarding==="site-health"||e.onboarding==="first-run"}):T==="loading"?l.jsx(m0,{}):T==="retry"?l.jsx(Jte,{onRetry:()=>{x.refetch()}}):l.jsx(ane,{onActivationStarted:()=>f(!0),skipSiteScan:e.siteScan==="skip"})}function nne({projectName:e,runId:n}){const i=Ms();return _.useEffect(()=>{i({to:"/setup",search:{onboarding:"site-health",setupProject:e,...n?{siteHealthRunId:n}:{}},replace:!0})},[i,e,n]),l.jsx(m0,{})}function ane({onActivationStarted:e,skipSiteScan:n}){return l.jsx(yy,{title:"Site Health setup",children:l.jsx(ine,{onActivationStarted:e,skipSiteScan:n})})}function ine({onActivationStarted:e,skipSiteScan:n}){const i=Ms(),r=Ps(),u=cte(),h=yt({...QZ({client:J}),retry:!1}),f=ui(ZZ()),[b,v]=_.useState(""),[x,S]=_.useState(""),[j,C]=_.useState(""),[T,I]=_.useState("US"),[M,R]=_.useState("en"),[P,q]=_.useState(!1),[L,$]=_.useState("idle"),[Q,ae]=_.useState(null),[V,Z]=_.useState(null),[X,Ce]=_.useState(!1),[tt,Ge]=_.useState(null),[$e,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,[xe,Ae]=_.useState(null),se=_.useRef(null),{onboardingSessionId:Se,emit:qe}=e5("platform");_.useEffect(()=>{qe({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.started",step:"project",resumed:!1},"onboarding.started")},[qe,Se]);const we=Zte(b),pe=x||we?.projectName||"",ce=j||we?.displayName||"",ue=L==="creating"||L==="dispatching",_e=V??tt,Ze=Hte(T,M),{countryValid:Ee,languageValid:Ct}=Fte(T,M),me=Ee&&Ct;_.useEffect(()=>{_e&&se.current?.focus()},[_e]);const Be=(Ke,ct)=>i({to:"/setup",search:{...ct?{siteHealthRunId:ct}:{},onboarding:"site-health",setupProject:Ke.name},replace:!0}),Ne=async Ke=>{$("dispatching"),Ge(null);try{const ct=u.mutateAsync({projectName:Ke.name,projectId:Ke.id,projectLabel:Ke.displayName||Ke.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:r3}}),Ft=await Yte(ct);if(Ft.state==="queued"){qe({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"}),hF(Ft.run.runId),await Be(Ke,Ft.run.runId);return}ct.then(()=>{qe({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"queued",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0"})},Qt=>{qe({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:zc(Qt,"run_rejected")})}),Xte(ct,Ke.id),await Be(Ke)}catch(ct){$("recovery"),Ge(Hk(ct,"The project was created, but the Site Health scan could not be started."));const Ft=zc(ct,"run_rejected");qe({flowVersion:ft,onboardingSessionId:Se,event:"run.requested",origin:"dashboard_setup",result:"rejected",kind:"site_health",providerCountBucket:"0",queryCountBucket:"0",reasonCode:Ft}),qe({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.blocked",step:"run",action:"retry_run",reasonCode:Ft},`onboarding.blocked:run:${Ft}`)}},re=async Ke=>{if(Ke.preventDefault(),!(!we||!n&&!P||!me||ue)){$("creating"),Z(null),Ce(!1),Ge(null);try{const ct=await cQ({name:pe,displayName:ce,canonicalDomain:we.canonicalDomain,country:T,language:M});if(e(),ae(ct),qe({flowVersion:ft,onboardingSessionId:Se,event:"onboarding.step_completed",step:"project",method:"manual"},"onboarding.step_completed:project"),await r.invalidateQueries({queryKey:Jr({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(Hk(ct,"Could not create the project. Try again.")),qe({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:Jr({client:J})}))}}},Ye=()=>{Q&&!ue&&Ne(Q)},vt=()=>{ue||i({to:"/projects"})},qn=async()=>{try{await navigator.clipboard.writeText(Ute),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 Ke=>{Ae(null);try{const ct=await f.mutateAsync({client:J,body:{enabled:Ke}});r.setQueryData(c4({client:J}),ct),ct.enabled!==Ke&&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(Mo,{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(Mo,{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&&!we),"aria-describedby":b&&!we?"launchpad-domain-hint launchpad-domain-error":"launchpad-domain-hint",placeholder:"https://example.com",value:b,onChange:Ke=>{v(Ke.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&&!we?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(Xc,{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:[we?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:Ke=>S(Ke.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:Ke=>C(Ke.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:Ke=>I(Ke.target.value),children:J4.map(Ke=>l.jsx("option",{value:Ke.value,children:Ke.label},Ke.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:M,onChange:Ke=>R(Ke.target.value),children:W4.map(Ke=>l.jsx("option",{value:Ke.value,children:Ke.label},Ke.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:Ke=>q(Ke.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:qte})]})]}),_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:!we||!n&&!P||!me||ue,children:L==="creating"||L==="dispatching"?l.jsxs(l.Fragment,{children:[l.jsx(Ds,{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(qn),children:[$e?l.jsx(Jc,{className:"size-3.5","aria-hidden":"true"}):l.jsx(b0,{className:"size-3.5","aria-hidden":"true"}),l.jsx("span",{"aria-live":"polite",children:$e?"Copied setup request":"Copy setup request"})]}),l.jsx(le,{asChild:!0,variant:"ghost",size:"sm",children:l.jsxs("a",{href:Lte,target:"_blank",rel:"noopener noreferrer",children:["Agent quickstart",l.jsx(I6,{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:Ke=>{Ht(Ke.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,xe?l.jsx("p",{className:"mt-1 text-sm text-negative",role:"alert",children:xe}):null]}):null]})}function sne(){return l.jsx("div",{className:"page-container",children:l.jsx("section",{className:"page-section",children:l.jsxs(Ea,{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 Ma=qs(()=>Yi(()=>import("./ProjectPage-hs-9PcoS.js"),__vite__mapDeps([5,1,0,2,3,4,6,7,8,9,10,11,12]),import.meta.url),"ProjectPage"),one=qs(()=>Yi(()=>import("./RunsPage-B_mhz9vj.js"),__vite__mapDeps([13,1,11,4,2,7,12]),import.meta.url),"RunsPage"),rne=qs(()=>Yi(()=>import("./HistoryPage-_5Vwj01m.js"),__vite__mapDeps([14,1,10,11,4,2,7,12]),import.meta.url),"HistoryPage"),lne=qs(()=>Yi(()=>import("./SettingsPage-D1Lzcw03.js"),__vite__mapDeps([15,1,11,4,2,7,12]),import.meta.url),"SettingsPage"),cne=qs(()=>Yi(()=>import("./BacklinksPage-Cs3_j55C.js"),__vite__mapDeps([16,1,9,2,11,4,7,12]),import.meta.url),"BacklinksPage"),une=qs(()=>Yi(()=>import("./TrafficPage-C27a0rQp.js"),__vite__mapDeps([17,1,8,2,11,4,7,12]),import.meta.url),"TrafficPage"),dne=qs(()=>Yi(()=>import("./TrafficSourceDetailPage-DOSoQySv.js"),__vite__mapDeps([18,1,8,3,4,2,11,7,12]),import.meta.url),"TrafficSourceDetailPage"),mne=qs(()=>Yi(()=>import("./MeasurementPropertyPage-B2yBTUZd.js"),__vite__mapDeps([19,1,3,4,6,7,2,11,12]),import.meta.url),"MeasurementPropertyPage");function pne(){return l.jsx(yee,{children:l.jsx(tZ,{children:l.jsx(gee,{})})})}const Vn=d6()({component:pne,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]))})}),hne=Bt({getParentRoute:()=>Vn,path:"/",component:Jee,beforeLoad:async({context:e})=>{let n=e.queryClient.getQueryData(Jr({client:J}));if(n===void 0)try{n=await e.queryClient.ensureQueryData(Qo({client:J}))}catch{return}if(n.length===0)throw p0({to:"/setup"})}}),fne=Bt({getParentRoute:()=>Vn,path:"/projects",component:nte}),gne=/^[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(fg,{}),beforeLoad:async({context:e,params:n,location:i})=>{const r=n.projectName;if(!gne.test(r))return;let u=e.queryClient.getQueryData(Jr({client:J}));if(!u)try{u=await e.queryClient.ensureQueryData(Qo({client:J}))}catch{return}const h=u.find(f=>f.id===r);if(h)throw p0({to:i.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(h.name)}`),replace:!0})}}),yne=Bt({getParentRoute:()=>$n,path:"/",component:()=>l.jsx(Ma,{tab:"overview"})}),bne=Bt({getParentRoute:()=>$n,path:"/portfolio",component:()=>l.jsx(Ma,{tab:"portfolio"})}),vne=Bt({getParentRoute:()=>$n,path:"/search-console",component:()=>l.jsx(Ma,{tab:"search-console"})}),xne=Bt({getParentRoute:()=>$n,path:"/conversions",component:()=>l.jsx(Ma,{tab:"conversions"})}),wne=Bt({getParentRoute:()=>$n,path:"/local",component:()=>l.jsx(Ma,{tab:"local"})}),Sne=Bt({getParentRoute:()=>$n,path:"/discovery",component:()=>l.jsx(Ma,{tab:"discovery"})}),kne=Bt({getParentRoute:()=>$n,path:"/queries",component:()=>l.jsx(Ma,{tab:"queries"})}),jne=Bt({getParentRoute:()=>$n,path:"/properties/$targetKey",component:()=>l.jsx(mne,{})}),Ane=Bt({getParentRoute:()=>$n,path:"/report",beforeLoad:({params:e})=>{throw p0({to:"/projects/$projectName",params:e,replace:!0})}}),Nne=Bt({getParentRoute:()=>$n,path:"/activity",component:()=>l.jsx(Ma,{tab:"activity"})}),Cne=Bt({getParentRoute:()=>$n,path:"/backlinks",component:()=>l.jsx(Ma,{tab:"backlinks"})}),_ne=Bt({getParentRoute:()=>$n,path:"/technical-aeo",component:()=>l.jsx(Ma,{tab:"technical-aeo"})}),Tne=Bt({getParentRoute:()=>$n,path:"/history",component:()=>l.jsx(Ma,{tab:"history"})}),Ene=Bt({getParentRoute:()=>$n,path:"/settings",component:()=>l.jsx(Ma,{tab:"settings"})}),Rne=Bt({getParentRoute:()=>Vn,path:"/runs",component:one}),Dne=Bt({getParentRoute:()=>Vn,path:"/history",component:rne}),Ine=Bt({getParentRoute:()=>Vn,path:"/settings",component:lne,beforeLoad:({context:e})=>{}}),zne=Bt({getParentRoute:()=>Vn,path:"/setup",component:tne}),One=Bt({getParentRoute:()=>Vn,path:"/backlinks",component:cne}),Pne=Bt({getParentRoute:()=>Vn,path:"/traffic",component:une}),Mne=Bt({getParentRoute:()=>Vn,path:"/traffic/$projectName/$sourceId",component:dne}),qne=Bt({getParentRoute:()=>Vn,path:"*",component:sne}),Bne=Vn.addChildren([hne,fne,$n.addChildren([yne,bne,vne,xne,wne,Sne,kne,jne,Ane,Nne,Cne,_ne,Tne,Ene]),Rne,Dne,Ine,zne,One,Pne,Mne,qne]);function Lne(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:"/"}const Fk=Lne(),Une=Fk==="/"?"":Fk.replace(/\/$/,"");function Vne(e,n){return m6({routeTree:Bne,basepath:Une||"/",context:{queryClient:e},...n?.initialEntries})}let Qk=!1;async function $ne(e){return(await bE({client:J,body:e,keepalive:!0})).data}function Kne(){Qk||typeof window>"u"||(Qk=!0,!(cp()||Eo())&&(kF({send:$ne}),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"||jm({method:e.method,route:r,network:!0}),f}},e}),J.interceptors.response.use((e,n,i)=>(jm({method:n.method,route:typeof i.url=="string"?i.url:void 0,path:Hne(n.url),status:e.status}),e)),window.addEventListener("error",e=>{km({kind:"unhandled",error:e.error})}),window.addEventListener("unhandledrejection",e=>{km({kind:"unhandled",error:e.reason})}),Xne()))}function Gne(e){let n=null;const i=()=>{const r=e.state.matches.at(-1);if(!r)return;jF(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&&TF(n.search,h),n={pathname:u.pathname,search:h}};return i(),e.subscribe("onResolved",i)}function Hne(e){try{return new URL(e,window.location.origin).pathname}catch{return}}const Fne={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function Qne(e,n){const[i,r]=Fne[e];return n<=i?"good":n<=r?"needs-improvement":"poor"}function Zne(){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 Yne(){let e=0;return{add(n){n.interactionId&&(e=Math.max(e,n.duration))},value:()=>e}}function Xne(){if(typeof PerformanceObserver>"u")return;const e=new Set,n=(b,v)=>{e.has(b)||!Number.isFinite(v)||(e.add(b),RF(b,Qne(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=Zne();i("layout-shift",b=>{for(const v of b)u.add({startTime:v.startTime,value:v.value??0,hadRecentInput:v.hadRecentInput===!0})});const h=Yne();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 Jne=6e4,Wne="Anyone with this password can sign in to this dashboard.",Mr={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 eae(){const e=_.useRef(oQ()).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,I]=_.useState(""),[M,R]=_.useState(""),[P,q]=_.useState(!1),[L,$]=_.useState("password"),[Q,ae]=_.useState(!1),[V,Z]=_.useState(""),[X,Ce]=_.useState(null),[tt,Ge]=_.useState(!1),[$e,ke]=_.useState(!1),Le=_.useRef(null),B=_.useRef(null),W=_.useRef(null),xe=()=>{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=JQ();B.current=Be,Le.current=Vne(Be),Gne(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 sg();if(me)return;f(Ye),v(!1),i("ready")}catch(Ye){if(me)return;if(re&&Ye instanceof yn&&Ye.statusCode===401)return yQ().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([QS(),FS()]).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){QS().then(Be=>{Be.authRequired&&!Be.user&&(ke(!0),u(null),f(null),i("account-login"))}).catch(()=>{});return}FS().then(Be=>{Be.authenticated||(ke(!0),f(null),i(Be.setupRequired?"setup":"login"))}).catch(()=>{})},Jne);return HS(()=>{ke(!0),u(null),f(null),v(!1),i(x?"account-login":"login")}),()=>{clearInterval(me),HS(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!==M){Ce("Passwords do not match");return}const Be=V.trim();if(Q&&!Be){Ce(Mr.missing);return}Ge(!0),Ce(null);try{if(!(await hQ(T.trim(),Q?Be:void 0)).authenticated){Ce("Setup failed");return}I(""),R(""),Z(""),ae(!1),q(!1),ke(!1),f(null),v(!0),i("checking");try{const re=await sg();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?Mr.rejected:null),ae(!0);return}Ce(Ne instanceof yn||Ne instanceof Error?Ne.message:"Setup failed")}finally{Ge(!1)}},Se=me=>{I(me),Ce(null)},qe=me=>{Z(me),Ce(null)},we=me=>{R(me),Ce(null)},pe=async me=>{if(me.preventDefault(),!!T.trim()){Ge(!0),Ce(null);try{if(!(L==="api-key"?await gQ(T.trim()):await fQ(T.trim())).authenticated){Ce(L==="api-key"?"Invalid API key":"Incorrect password");return}const Ne=await sg();f(Ne),v(!1),I(""),q(!1),ke(!1),i("ready")}catch(Be){Ce(Be instanceof yn||Be instanceof Error?Be.message:"Authentication failed")}finally{Ge(!1)}}},ce=me=>{$(me),I(""),q(!1),Ce(null)},ue=async me=>{if(me.preventDefault(),!(!j.trim()||!T)){Ge(!0),Ce(null);try{const Be=await bQ(j.trim(),T);if(!Be.user){Ce("Incorrect name or password.");return}I(""),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}=xe();return l.jsx(LQ,{account:r,apiKey:h,apiKeyPending:b,children:l.jsx(p6,{client:me,children:l.jsx(h6,{router:Be})})})}const _e=T.trim(),Ze=T.length>0&&_e.length<8,Ee=M.length>0&&T!==M,Ct=_e.length>=8&&T===M&&(!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(Ea,{className:"surface-card w-full",children:n==="checking"?l.jsx(jo,{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(Ur,{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(jo,{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(Ur,{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(jo,{children:[$e?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(Ur,{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(Em,{children:Wne})]}),l.jsx(jo,{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:M,onChange:me=>we(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:Mr.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=>qe(me.target.value),"aria-invalid":X===Mr.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:Mr.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=>q(me.target.checked)}),Q?Mr.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(Ur,{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(Em,{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(jo,{children:[$e?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=>q(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 t5=document.getElementById("root");if(!t5)throw new Error("Expected #root element for web app bootstrap.");Kne();U6.createRoot(t5).render(l.jsx(_.StrictMode,{children:l.jsx(eae,{})}));export{uZ as $,Pn as A,le as B,Rc as C,gn as D,Xoe as E,Woe as F,Ea as G,Jie as H,ma as I,ese as J,Wae as K,Yoe as L,Sre as M,eie as N,Kae as O,Jae as P,nie as Q,Qa as R,Bk as S,Sn as T,Wie as U,tie as V,ga as W,aZ as X,qre as Y,Bre as Z,gJ as _,wre as a,Qae as a$,Gae as a0,kse as a1,_se as a2,jie as a3,wse as a4,Coe as a5,Eoe as a6,Toe as a7,Iie as a8,Die as a9,p4 as aA,Qi as aB,Moe as aC,c0 as aD,z9 as aE,O9 as aF,Tae as aG,_ae as aH,cse as aI,fse as aJ,gse as aK,yn as aL,yse as aM,fie as aN,iZ as aO,fX as aP,Fg as aQ,bse as aR,em as aS,tre as aT,s0 as aU,ko as aV,rZ as aW,ZQ as aX,Use as aY,yW as aZ,Pie as a_,$ie as aa,vn as ab,Ioe as ac,zoe as ad,qie as ae,Ooe as af,Bie as ag,Oie as ah,Mie as ai,Roe as aj,Doe as ak,_oe as al,zie as am,r4 as an,Oe as ao,Nt as ap,Z0 as aq,Poe as ar,$oe as as,Boe as at,Uoe as au,Loe as av,Voe as aw,ose as ax,cy as ay,qoe as az,Cse as b,Xie as b$,Hae as b0,Ui as b1,Ire as b2,Xae as b3,mie as b4,GB as b5,cie as b6,Yae as b7,Nse as b8,Zae as b9,ioe as bA,ooe as bB,hoe as bC,joe as bD,koe as bE,moe as bF,woe as bG,Noe as bH,loe as bI,goe as bJ,yoe as bK,boe as bL,roe as bM,foe as bN,coe as bO,voe as bP,uoe as bQ,xoe as bR,poe as bS,Soe as bT,Aoe as bU,ite as bV,doe as bW,uie as bX,Sie as bY,wie as bZ,xie as b_,xZ as ba,KZ as bb,Fse as bc,Jse as bd,Qse as be,sie as bf,rie as bg,aG as bh,lie as bi,DZ as bj,Hse as bk,sG as bl,Gg as bm,oie as bn,XF as bo,Zse as bp,Gse as bq,zZ as br,Yse as bs,vse as bt,Xse as bu,ore as bv,rre as bw,Lie as bx,l4 as by,ere as bz,Cae as c,_re as c$,YF as c0,o3 as c1,ou as c2,r3 as c3,Rs as c4,toe as c5,Eae as c6,FZ as c7,soe as c8,Rse as c9,fte as cA,Lre as cB,Cre as cC,hW as cD,Nre as cE,lte as cF,Wse as cG,Ose as cH,Are as cI,Lse as cJ,Pse as cK,lP as cL,uB as cM,eoe as cN,jre as cO,qse as cP,bre as cQ,kW as cR,lQ as cS,pZ as cT,jW as cU,yie as cV,FM as cW,Vae as cX,bie as cY,gie as cZ,dQ as c_,Fae as ca,tk as cb,Nie as cc,Cie as cd,Tse as ce,Ese as cf,_ie as cg,Tie as ch,Rie as ci,Eie as cj,bu as ck,Qo as cl,QC as cm,zse as cn,Ise as co,tW as cp,t0 as cq,Cm as cr,n0 as cs,_m as ct,Tm as cu,gW as cv,jZ as cw,Ao as cx,Rm as cy,XZ as cz,cZ as d,b9 as d$,Tre as d0,Ere as d1,Dre as d2,vie as d3,vZ as d4,kie as d5,dJ as d6,Koe as d7,SQ as d8,Qie as d9,hte as dA,Yie as dB,Wr as dC,ak as dD,rse as dE,use as dF,mse as dG,pse as dH,lse as dI,dse as dJ,hse as dK,ng as dL,sse as dM,ire as dN,ete as dO,iie as dP,V1 as dQ,Dse as dR,nre as dS,sre as dT,ise as dU,aie as dV,nse as dW,ase as dX,tse as dY,are as dZ,Uae as d_,Hoe as da,Foe as db,Qoe as dc,Goe as dd,jse as de,Kie as df,Gie as dg,Hie as dh,Zie as di,Fie as dj,my as dk,Qc as dl,Mre as dm,yu as dn,noe as dp,aoe as dq,tQ as dr,pie as ds,hie as dt,Aie as du,Uie as dv,Vie as dw,yy as dx,hp as dy,py as dz,lZ as e,Oae as e$,za as e0,v9 as e1,GM as e2,Mse as e3,Sse as e4,EP as e5,Vse as e6,Bse as e7,Kse as e8,$se as e9,zae as eA,m2 as eB,Yi as eC,Pa as eD,Iae as eE,km as eF,die as eG,$Y as eH,cre as eI,lre as eJ,cte as eK,mre as eL,xW as eM,Rae as eN,vre as eO,xre as eP,ure as eQ,dre as eR,Dae as eS,hre as eT,yre as eU,pre as eV,gre as eW,Mo as eX,Lae as eY,Pae as eZ,fre as e_,hk as ea,ye as eb,Nae as ec,Aae as ed,jae as ee,kae as ef,xae as eg,vae as eh,Sae as ei,wae as ej,bae as ek,yae as el,uae as em,dae as en,gae as eo,fae as ep,hae as eq,mae as er,pae as es,cae as et,lae as eu,rae as ev,pT as ew,mT as ex,OM as ey,Bae as ez,dm as f,bM as f0,qae as f1,Mae as f2,zre as g,Rre as h,Ore as i,Pre as j,a0 as k,eu as l,kre as m,fK as n,yJ as o,CF as p,xse as q,Zoe as r,Ase as s,oZ as t,hy as u,Joe as v,$ae as w,J as x,cp as y,Eo as z};